uid
stringlengths
6
55
question
stringlengths
34
465
context_short
sequence
context_long
sequence
tags
sequence
answer
stringlengths
1
25
relation
stringclasses
1 value
wso2php@php@142
wso2php -- wso2 web-services framework for php wso2 will no longer continue with any new developments of the wso2 web-services framework for @placeholder .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
php
UNK_RELATION
collectionfs@file-management@93
collectionfs -- collectionfs is a suite of meteor-packages that together provide a complete @placeholder solution including uploading downloading storage synchronization manipulation and copying .
{ "confidence": [ 56.71771240234375, 55.32887649536133, 54.958961486816406, 54.958961486816406, 54.511417388916016, 51.947147369384766, 48.25450897216797, 47.2873420715332, 46.495758056640625, 46.495758056640625, 45.32899475097656, 45.243011474609375, 44.781776428222656, 44.69792556762695, 42.926490783691406, 41.224063873291016, 40.80930709838867, 40.41999816894531, 40.0009765625, 39.99589157104492, 37.85483932495117, 37.7818489074707, 37.7818489074707, 36.70150375366211, 36.61508560180664, 36.40290451049805, 35.9908332824707, 35.2166862487793, 35.2166862487793, 35.2166862487793, 33.42567443847656, 33.2210693359375, 33.2210693359375, 33.2210693359375, 32.53665542602539, 32.05430603027344, 32.05430603027344, 32.05430603027344, 31.116504669189453, 30.65591049194336, 30.42977523803711, 30.42977523803711, 30.42977523803711, 29.971492767333984, 29.700702667236328, 29.263011932373047, 27.303424835205078, 27.303424835205078, 27.303424835205078, 26.45977020263672, 26.136661529541016, 26.136661529541016, 24.738264083862305, 24.163135528564453, 23.60858917236328, 23.56853675842285, 22.76998519897461, 22.623292922973633, 22.520191192626953, 22.21796417236328, 22.021686553955078, 22.021686553955078, 22.021686553955078, 21.849842071533203, 21.849842071533203, 21.84597396850586, 20.863515853881836, 20.863515853881836, 20.506704330444336, 20.39904022216797, 20.262935638427734, 20.262935638427734, 20.262935638427734, 20.262935638427734, 20.231285095214844, 20.097225189208984, 19.999774932861328, 19.65280532836914, 19.579504013061523, 19.339557647705078, 19.284679412841797, 19.096172332763672, 19.07198143005371, 18.747955322265625, 18.747955322265625, 18.747955322265625, 18.747955322265625, 18.747955322265625, 18.747955322265625, 18.747955322265625, 18.747955322265625, 18.541006088256836, 18.541006088256836, 17.820755004882812, 17.820755004882812, 17.820755004882812, 17.697776794433594, 17.652061462402344, 17.581192016601562, 17.581192016601562 ], "content": [ "Have you check out the CollectionFS documentation https : github.com CollectionFS Meteor-CollectionFS display-an-uploaded-image", "github.com CollectionFS Meteor-CollectionFS issues 457 https : github.com CollectionFS Meteor-CollectionFS issues 457 Check the example Icellan posts toward the bottom of the thread .", "From CollectionFs docs https : github.com CollectionFS Meteor-CollectionFS url .. . .. . url .. . .. . Returns the HTTP file URL for the current FS.File .", "Have you tried this github.com CollectionFS https : github.com CollectionFS Meteor-CollectionFS transformwrite--transformread", "Documentation https : github.com CollectionFS Meteor-CollectionFS transformwrite--transformread .", "I am basing my code on one provided by CollectionFS documentation https : github.com CollectionFS Meteor-CollectionFS file-manipulation : .. . .. . how do I get source dimensions here to make my resize target dynamic", "I m using CollectionFS for image upload in a Meteor React application .", "And here is my Image CollectionFS .", "I would like to resize image upon upload with Meteor CollectionFS .", "I serve a bunch of images from my Meteor app with CollectionFS .", "I am using Meteor-CollectionFS to store images on Amazon S3 .", "Would anyone know if the cfs : dropbox https : github.com CollectionFS Meteor-CollectionFS tree master packages dropbox package has a function that returns the url to the dropbox file instead of the local url", "So I m trying to implement a simple user-avatar upload with Meteor CollectionFS and the cfs : filesystem packages .", "UPDATE 2 .. . .. . Maybe one way is to use FS.File Reference https : github.com CollectionFS Meteor-CollectionFS storing-fsfile-references-in-your-objects", "I am using CollectionFs to Upload profile pictures .", "As suggested at the issue tracker https : github.com CollectionFS Meteor-CollectionFS issues 526 issuecomment-71944535 .. . .. . Since CFS already applies a transform it would not be a good idea to use collection helpers .", "And can you please provide a full collectionFS collection definition .", "I want to get some images from one cfs Meteor CollectionFS db to another db .", "What you re looking for is called a transformRead in CollectionFS .", "I m using the CollectionFS https : github.com CollectionFS Meteor-CollectionFS to store and download files from my application .. . .. . And I want to execute a server-side function when the file is downloaded without using jQuery because it s not really credible and can be bypassed .", "I am working on one Meteor App where I am using CollectionFS to upload Files .", "You cannot however update the file that CollectionFS has stored for you .", "Short example of using http to download a file that was uploaded via collectionFS .", "I cannot seem to find any documentation that will explain how I can get the filename and filepath of an uploaded collectionFS image into my meteor method .", "I m trying to get the url for files that I upload using collectionFS .", "I am using CollectionFS with GridFS to upload images : .. . .. . However when uploading I get an error : .. . .. . I ve tried calling Accounts . storedLoginToken in the Meteor shell and it gives the same error .", "Unfortunately I am aware that development for collectionFS seems to have ceased https : forums.meteor.com t deprecating-collectionfs 16921 but I m hoping that someone here has come across the same obstacle and solved it .", "How can I get a buffer from my CollectionFS files", "It employs CollectionFS and cfs : s3 package to manage AWS S3 bucket and store images there .", "Normally you just use the .url method of the CollectionFS object to display it .", "In order to fix my problem I need to somehow get the key-value in this schema stored by collectionFS : .. . .. . So I can do uploadedimages : key .. . .. . QUESTION .. . .. . Is there a way to get the key-value from collectionFS", "In the CollectionFS doc says underlying Mongo.Collection instance available through myFSCollection.files missed that part .", "im trying to upload folder to the server and keep the structure of the folder in the server using collectionFS and filesystem .", "I ve got problems with displaying data from collectionFS gridFS where I stored the data for some pictures .", "I am using CollectionFS package to upload Images over my meteor application but not able to validate file using filters so far I can upload any file of any extension and of any size .", "If I used a callback function I get error that stream is unreadable which I assume is due to the way collectionFS works .", "Thank you for your answer Is it recommended to use collectionFS because the project is deprecated and it has 314 issues", "in my web-app some news-and-events-entries have cover-images some don t images are stored with CollectionFS .", "This is where the collectionFS is defined in that package I am just unsure how to incorporate it github.com meteor-typescript meteor-typescript-libs blob master https : github.com meteor-typescript meteor-typescript-libs blob master definitions collectionfs.d.ts", "How can I get in a call back after inserting a file using collectionFS the key-value", "CollectionFS already has its own transform function applied therefore you cannot overwrite that with ones from the collection helpers package .", "My question is after I save these PDFs to Mongo using CollectionFS like I do above how do I retrieve and serve these PDFs", "If you use the .url method on the collectionFS file object you can fetch it via http instead of trying to read it directly from the server .", "How can I get video upload to work through collectionFS in a deployed Meteor 1.3 application and more importantly without losing the uploaded files upon a new app deploy .", "I m trying to figure how to take an Image a file using CollectionFS https : github.com CollectionFS Meteor-CollectionFS and insert the Image s Id into my Items imageId field : .. . .. . lib collections items.js .. . .. . lib collections images.js .. . .. . Right now my allow rules are : .. . .. . server allows.js .. . .. . I m using Autoform so my form looks like this : .. . .. . client item form.html .. . .. . Right now when I select browse and select an image it will be in the database and I want to take that id it has and place it in the Item that is created afterwards but how do I fetch that particular image", "I have some files on server how can I indentify them and put the ID name size in a collection like what is done by collectionFS", "I just discovered atmospherejs.com maximum multi-transform https : atmospherejs.com maximum multi-transform which may help you apply helper-like transforms to your collectionfs instances .", "Now to access that information in the client since you cannot apply a transform or a helper on the collectionFS documents you can create a global template helper : .. . .. . Now you can use that helper in your templates :", "To serve these already existing PDFs directly to the client I do it this way and it works very well : .. . .. . I save these PDFs to Mongo using CollectionFS Later I shall generate PDFs and save them .", "If You re interested with uploading to gridfs I recommend my article : mrmnmly.net posts saving-images-from-api-in-meteor-apps http : mrmnmly.net posts saving-images-from-api-in-meteor-apps", "After everything works you can go back to setting up those but beware that there might be more issues when it comes to CollectionFS especially when it comes to styling generated by autoForm .", "using collectionfs like so : .. . .. . however in the makeThumb function if I were to use gm.size which is asynchronous I wouldn t get the size back before the function finishes .", "This is what I have that doesn t work : .. . .. . I get the error : .. . .. . I have also tried using the conventional CollectionFS definition : .. . .. . The error I get then is : .. . .. . Any thoughts", "Uploading and storing the image is successful .", "This would happen when the image is uploaded into the public or private folder as in the Meteor- assets package of the meteor app .", "This is code for uploading just like on docs .", "You may be using this call before uploading the images .", "Please also check it as well github.com PankajJatav meteor-image-upload-demo https : github.com PankajJatav meteor-image-upload-demo", "Personally I stopped using a lot of the old meteor plugins and switched instead to mostly npm modules mostly because a lot of the meteor-packages don t seem to be under active development any longer .", "I am working on a Meteor application .", "I uploaded the code here : https : github.com LeafyCode meteor-cfs-autoform", "My Meteor app contains images folder which grasp sample images .", "What is the best way to manage access rights to these images using meteor users", "If I put that images to .meteor folder it will be removed by meteor reset command so I hope to persist the images to public folder .", "the meteor default db is meteor gridFS maya be storing data in its own db .", "You mean make an http-get request in meteor with the url of the file if you can provide some simple example I would really appreciate it", "It can t be a coincidence that both packages fail to work.. .", "A minute vs days of other big name packages", "I ve tried both aldeed meteor-tabular and aslagle reactive-table but both fail because the collection doesn t appear to exist .", "So I added this to my NGINX-configuration : .. . .. . But the response headers I get are still : .. . .. . Note on URL format .. . My CollectionFS serves image in the following URL format : https : example.com cfs files images id originalName token veryLongToken store sizeName .. . .. . .. . .. . I am sure my NGINX is working and can set caching headers because my files in public images get cached correctly : .. . .. . has header", "i have the method to resize in meteor CFS like the page .", "on server files or .meteor local build programs server files", "You most definitely do not want to use the .meteor folder at all .", "Note that you must meteor add http to get access to the http package .", "Being a beginner I was stuck at uploading images and then showing them for my users for days .", "Those messages are typings related I found in google : meteor-typescript-libs https : github.com meteor-typescript meteor-typescript-libs .", "Just take a look at the problems I faced while using these packages : .. . .. . 1 .", "I m working on a Meteor + Angular application .", "I d like to be able to pass the URL of an uploaded image in javascript in the tutorial example making a photoblog in meteor http : experimentsinmeteor.com photo-blog-part-1 .", "I have this code in my event .. . .. . This is my html .. . .. . This is my collections code .. . .. . When i try uploading an image no image is uploaded and no collection is created .", "This worked for me in the past in Meteor 1.2 when I could still use Meteor Up no X but not anymore .", "The error occurs here in the Meteor code : .. . .. . Any help would be much appreciated .", "That s why I do the manipulation first and then writeStream to the store.. .", "I am trying to upload some images to AWS when I return from a Meteor method call .", "I am trying to save uploaded images into public images folder of my meteor project so I wrote this code .", "So how can I set path or what to save images to public images folder instead of .meteor folder", "For instance you could create a map myImages on the same level as your Meteor projects .", "In my meteor app is there a way to declare a global variable that simply can fetch me information from this database", "check using the mongo client with mongo localhost : 3001 meteor and see if you other collection is there .", "That folder is used strictly by the meteor app build tools to do their processing and adding updating files there could have undesired consequences .", "Ho you forgot to add that you first need to meteor add http package for use HTTP.get", "In the reactive-table case I m getting the error that the argument is not an instance of Mongo.Collection a cursor or an array while with meteor-tabular it fails to start because it encounters a ReferenceError and states that Documents isn t defined .", "Let s suppose that you have set routing in you Meteor app with Iron Router or Flow Router and for user-profile page you have set-up route path something like this : user : id .", "But when I upload images the files are saved into .. . .. . .meteor local build programs server images .. . .. . folder instead of public images folder .", "I m creating a web app using meteorjs that uploads files on server I m not using any package what does contain the .meteor build folder", "This is probably the package you want : .. . .. . https : github.com tomitrescak meteor-uploads .. . .. . it has a nice UI too and much less trouble than FSCollection .", "I am trying to define a collection in a angular2 - meteor app using typescript .", "For atmospherejs added packages this works .", "In Meteor anything in public is made public to the user via URL so you could simply expose the files that way .", "I am using meteor Collection FS and raix : ui-dropped-event in order to allow users to upload images ." ] }
{ "confidence": [ 65.72196197509766, 63.925750732421875, 62.04850769042969, 60.334190368652344, 60.11962127685547, 56.754634857177734, 56.754634857177734, 55.27716827392578, 54.59154510498047, 53.49874496459961, 52.49378204345703, 52.03855514526367, 52.028629302978516, 51.77503204345703, 51.163352966308594, 51.05049133300781, 50.29528045654297, 48.730323791503906, 48.561309814453125, 48.561309814453125 ], "content": [ "Question : I would like to resize image upon upload with Meteor CollectionFS . But I would like to resize based on image dimensions . For example I want to resize image that is 1000x500 into 1024x512 but 60x100 into 64x128 - for that I need to know source dimensions . I am basing my code on one provided by CollectionFS documentation https : github.com CollectionFS Meteor-CollectionFS file-manipulation : .. . .. . how do I get source dimensions here to make my resize target dynamic Maybe there are some graphicsmagick function .. . Answer : There s an async GraphicsMagick function for returning the size dimensions of the image . Notes from the gm npm package page on Github regarding this : .. . .. . GOTCHA : when working with input streams and any identify operation size format etc you must pass bufferStream : true if you also need to convert write or stream the image afterwards NOTE : this buffers the readStream in memory", "Question : null .. . Answer : Case scenario : creating a Meteor app that sends html emails among the image hosting options I would like to include a third-party one that would allow for local testing - ie . dropbox . Unfortunately I am aware that development for collectionFS seems to have ceased https : forums.meteor.com t deprecating-collectionfs 16921 but I m hoping that someone here has come across the same obstacle and solved it . The problem I m having is that although I can get the files to upload and display on my localhost I would need the actual dropbox link for embedded images to appear in the emails that the application sends . Would anyone know if the cfs : dropbox https : github.com CollectionFS Meteor-CollectionFS tree master packages dropbox package has a function that returns the url to the dropbox file instead of the local url", "Question : I am trying to define a collection in a angular2 - meteor app using typescript . This is what I have that doesn t work : .. . .. . I get the error : .. . .. . I have also tried using the conventional CollectionFS definition : .. . .. . The error I get then is : .. . .. . Any thoughts Comment : Those messages are typings related I found in google : meteor-typescript-libs https : github.com meteor-typescript meteor-typescript-libs . I don t know if it is official or not you can take a look at it . Comment : @EricMartinez I also found that . This is where the collectionFS is defined in that package I am just unsure how to incorporate it github.com meteor-typescript meteor-typescript-libs blob master https : github.com meteor-typescript meteor-typescript-libs blob master definitions collectionfs.d.ts .. . Answer : For atmospherejs added packages this works . Try Comment : Thanks for the reply . Can you please expound on your answer . What atmospherejs package And can you please provide a full collectionFS collection definition .", "Question : I m using the CollectionFS https : github.com CollectionFS Meteor-CollectionFS to store and download files from my application .. . .. . And I want to execute a server-side function when the file is downloaded without using jQuery because it s not really credible and can be bypassed . I was wondering if there s any undocumented function workaround to execute my code hook when there s a download something like this : .. . .. . Thanks Comment : If filesCollection is a Mongo collection you can use this package to add before after hooks : atmospherejs.com matb33 collection-hooks https : atmospherejs.com matb33 collection-hooks .. . Answer : What you re looking for is called a transformRead in CollectionFS . It s the mirror function of transformWrite . Documentation https : github.com CollectionFS Meteor-CollectionFS transformwrite--transformread .", "Question : null .. . Answer : I am using CollectionFS with GridFS to upload images : .. . .. . However when uploading I get an error : .. . .. . I ve tried calling Accounts . storedLoginToken in the Meteor shell and it gives the same error . The error occurs here in the Meteor code : .. . .. . Any help would be much appreciated .", "Question : I published my whole folder with images but how generate automatically url in my code for each image .. . Answer : Just use url method . From CollectionFs docs https : github.com CollectionFS Meteor-CollectionFS url .. . .. . url .. . .. . Returns the HTTP file URL for the current FS.File . .. . Specify a store attribute to get the URL for a specific store . If you don t specify the store name the URL will be for the copy in the first defined store . If you use several stores for example I m using file store for thumbs and S3 for full images for one collection then define store or it returns first store url .", "Question : Need help for this . I have tried upload some image i would like to check that width and height before insert to db.I stuck when try to check while at lib collection . thx in advanced . Comment : Have you tried this github.com CollectionFS https : github.com CollectionFS Meteor-CollectionFS transformwrite--transformread .. . Answer : You should be able to do it in server-side . If you want to do it in client-side you can try like this . But not sure about browser support . Note : I have taken plane js approach . Not using package collection .", "Question : null .. . Answer : So I m trying to implement a simple user-avatar upload with Meteor CollectionFS and the cfs : filesystem packages . This is how I defined my Collections : .. . .. . And this is how I upload my files : .. . .. . This works fine the files appear in the appropriate folder . However I would like the files to only be name username.extension but instead they have the following pattern collectionName-id-username.extension . I would like to name the files that way because then I could recreate the image-url from the username alone and wouldn t have the overhead of publishing the ImageCollections together with the UserCollection -- stupid idea", "Question : I m trying to figure how to take an Image a file using CollectionFS https : github.com CollectionFS Meteor-CollectionFS and insert the Image s Id into my Items imageId field : .. . .. . lib collections items.js .. . .. . lib collections images.js .. . .. . Right now my allow rules are : .. . .. . server allows.js .. . .. . I m using Autoform so my form looks like this : .. . .. . client item form.html .. . .. . Right now when I select browse and select an image it will be in the database and I want to take that id it has and place it in the Item that is created afterwards but how do I fetch that particular image I figured this is a good way to reference an image . UPDATE 1 .. . .. . Find out the ID is actually located hidden after a file is selected : .. . .. . So I m trying to get ma633fFpKHYewCRm8 to be placed as a String in the ImageId . UPDATE 2 .. . .. . Maybe one way is to use FS.File Reference https : github.com CollectionFS Meteor-CollectionFS storing-fsfile-references-in-your-objects .. . Answer : I have solved the same problem rather simpler after file is inserted I just call a method that does the related collection update : .. . .. . client.html .. . .. . lib.js .. . .. . client.js .. . .. . server.js .. . .. . as you are using autoForm and simpleSchema it might not be so easy but I suggest to you to forget about autoForm and simpleSchema at first and try to make it work with simple html and default collections . After everything works you can go back to setting up those but beware that there might be more issues when it comes to CollectionFS especially when it comes to styling generated by autoForm .", "Question : I am working on a Meteor application . Currently I have a few PDFs on my server . To serve these already existing PDFs directly to the client I do it this way and it works very well : .. . .. . I save these PDFs to Mongo using CollectionFS Later I shall generate PDFs and save them . For now I am just directly saving these already existing PDFs to Mongo as I first want to get the Mongo part to work . . My question is after I save these PDFs to Mongo using CollectionFS like I do above how do I retrieve and serve these PDFs .. . Answer : After a lot of searching and trying I ve finally gotten it to work .", "Question : Im trying let the user Upload a txt file and then let him click a button analyze and then perform some analysis . I have the app working locally Im using FS.Collection and FileSystem however I had several problems deploying to meteor.com . Here is my collection : .. . .. . and here is how I try to read the uploaded file : .. . .. . The above works in local but not after I deploy to meteor.com in the debug messages I see something like this : Error : ENOENT no such file or directory .. . .. . So I do not know how to read the file when the app is deployed how would you do it or do you think I should deploy the app to Amazon EC2 Im afraid to deploy to amazon and have the same problem.. . Comment : I suspect that meteor.com doesn t give you access to the local file system . If you use the .url method on the collectionFS file object you can fetch it via http instead of trying to read it directly from the server . This will also protect you later when you decide to use gridfs or S3 as your storage adapter instead of server local disk . Comment : You mean make an http-get request in meteor with the url of the file if you can provide some simple example I would really appreciate it .. . Answer : Short example of using http to download a file that was uploaded via collectionFS . Note that you must meteor add http to get access to the http package . Comment : You saved my life . Thanks it works like a charm Comment : contentos de ser de ayuda Comment : Ho you forgot to add that you first need to meteor add http package for use HTTP.get", "Question : null .. . Answer : How can I get in a call back after inserting a file using collectionFS the key-value I m building a cms which handles file uploads to show in different apps I m able to see the uploaded file using image.url in the cms but I m unable to view the images uploaded using this method in the other apps . Every app is connecting to the same database and I m uploading the images into my server using : .. . .. . I m then using nginx to serve those images so I can access them via http : domain.com uploadedimages . In order to fix my problem I need to somehow get the key-value in this schema stored by collectionFS : .. . .. . So I can do uploadedimages : key .. . .. . QUESTION .. . .. . Is there a way to get the key-value from collectionFS Comment : Normally you just use the .url method of the CollectionFS object to display it . Comment : I think I temporary found a solution by doing scope.slideshows.url uploadedimages images- fileObj . id - fileObj.name", "Question : null .. . Answer : I m using CollectionFS for image upload in a Meteor React application . The uploaded images are saved on the server file system in a non-public folder . What is the best way to manage access rights to these images using meteor users Scenario : .. . .. . 1 . Client sends request with current user id and image id .. . 2 . Server checks if user is allowed to access image .. . 3 . If positive : server sends the image to the client .. . .. . How can step 3 be implemented Boundary condition : The server may not make a restart after the image is uploaded . This would happen when the image is uploaded into the public or private folder as in the Meteor- assets package of the meteor app .", "Question : I m trying to insert an image into a pdf I m creating server-side with PDFkit . I m using cfs : dropbox to store my files . Before when I was using cvs : filesystem it was easy to add the images to my pdf s cause they were right there . Now that they re stored remotely I m not sure how to add them since PDFkit does not support adding images with just the url . It will however accept a buffer . How can I get a buffer from my CollectionFS files So far I have something like this : .. . .. . I tried getting the buffer two ways so far : .. . .. . First using dataMan but the last command never comes back : .. . .. . Second buffering the stream manually : .. . .. . That never seems to come back either . I double-checked my doc to make sure it was there and it has a valid url and the image appears when I put the url in my browser . Am I missing something Comment : what do you mean by never comes back How where-in your code are you using these solutions . The second one should work . Comment : also are you calling readStream.read anywhere Comment : By never comes back I mean the callback for the end event is never executed I don t see the log message in the console . Comment : In my second attempt I called readStream.read at the end of the third line . Comment : github.com CollectionFS Meteor-CollectionFS issues 457 https : github.com CollectionFS Meteor-CollectionFS issues 457 Check the example Icellan posts toward the bottom of the thread . Note : make sure to replace readable with data in the event handler . .. . Answer : I had to do something similar and since there s no answer to this question here is how I do it : .. . .. . Hope it ll help Comment : I haven t tested it but it looks like exactly what I was trying to figure out . Back in July I just saved the base 64 string straight on the collection but that uses more space . Thanks for your help .", "Question : null .. . Answer : I have some files on server how can I indentify them and put the ID name size in a collection like what is done by collectionFS Comment : These are files stored on your server already Why do you want them in a collection if they are already in your server s filesystem Comment : yes there are stored in the server . I want them in a collection to create a list and manage them and when the clients clicks on the filename I send the file ID to the server to send the file from server to client . Comment : It seems to me that you are making it way more complicated than it needs to be . In Meteor anything in public is made public to the user via URL so you could simply expose the files that way . If you are trying to provide a layer for ACLs well that s another story . You could use the built-in fs filesystem module in Node to read-write files and simply store the location . It is typically advised not to store files directly in the DB directly but store them as real files and link via path in the DB . Comment : Thank you for your answer Is it recommended to use collectionFS because the project is deprecated and it has 314 issues and if i store files using gridFS where do I find the file in order to convert it Comment : Personally I stopped using a lot of the old meteor plugins and switched instead to mostly npm modules mostly because a lot of the meteor-packages don t seem to be under active development any longer . Things like autoform and simpleschema seem to not be merging PRs and so bugs and enhancements are no longer happening on a regular basis . For the ORM stuff I have switched to jagi : astronomy . It s really a personal preference thing at this point but for me I like to use tools that have regular active development .", "Question : null .. . Answer : I serve a bunch of images from my Meteor app with CollectionFS . I know that this isn t best practice but it s a very small app without budget . .. . .. . As these images will never change they would change their name if I uploaded new ones they could be aggressively cached . So I added this to my NGINX-configuration : .. . .. . But the response headers I get are still : .. . .. . Note on URL format .. . My CollectionFS serves image in the following URL format : https : example.com cfs files images id originalName token veryLongToken store sizeName .. . .. . .. . .. . I am sure my NGINX is working and can set caching headers because my files in public images get cached correctly : .. . .. . has header", "Question : null .. . Answer : My Meteor app contains images folder which grasp sample images . And here is my Image CollectionFS . So I hope to know how to get all files in images folder and run Images.insert per that files in Meteor.startup so that I can set Images Collection at the start point without even file-upload input box action . Please help me", "Question : I m writing to this collection : .. . .. . With a form made with AutoForm . Data is written but I don t find a way to show the image associated with every document in the collection......I have only the id in fileId and don t find the way to publish correctly image with specific documents it refers.. . Comment : Have you check out the CollectionFS documentation https : github.com CollectionFS Meteor-CollectionFS display-an-uploaded-image Comment : Yes but I think the problem is more about mongodb and relationship - I don t know well NoSQL.....with MySQL I make a join and take what I need... . Comment : Then could you share the pub sub code you ve written to send data to the client Maybe something is wrong there . . Comment : gist.github.com Digital-Steel 70bc09da635a5cf0b33fea26b89e00c1 https : gist.github.com Digital-Steel 70bc09da635a5cf0b33fea26b89e00c1 .. . Answer : It looks like your GiftCards collection includes a single foreign key reference to the Images collection as fileId . This is actually just like SQL in the sense that the primary-key of the Images collection is used as a foreign key in GiftCards . Now you want to display a gift card and its related single image . Then you need a helper to return the url of the image : Comment : Ok but if I want to have ALL GiftCards list using a each gift cards Comment : each giftCards showOneGiftCard each then just make a giftCards helper that returns GiftCards.find Comment : ok done but with let img Images.findOne this.fileId this is the data context of one GiftCard give SyntaxError : Unexpected identifier img and without give : Failed to load resource : Comment : gist.github.com Digital-Steel 70bc09da635a5cf0b33fea26b89e00c1 https : gist.github.com Digital-Steel 70bc09da635a5cf0b33fea26b89e00c1 Comment : The problem is probably with token and security", "Question : I am using CollectionFS package to upload Images over my meteor application but not able to validate file using filters so far I can upload any file of any extension and of any size . template .. . .. . client upload picture.js .. . .. . lib collection images.js is .. . Answer : need to replace the key filters with filter after that it will start working as normal", "Question : I cannot seem to find any documentation that will explain how I can get the filename and filepath of an uploaded collectionFS image into my meteor method . I am able to get the image URL on the client-side no problem using helpers but I cannot seem to figure out how I can send the filename and filepath of the attached image to my method . Method JS .. . .. . Controller JS .. . Answer : You can use the insert callback to get this informations :" ] }
[ "yes-answer-long", "yes-answer-short" ]
file-management
UNK_RELATION
eclipse-jsdt@javascript@124
eclipse-jsdt -- the javascript development tools jsdt provide plug-ins that implement an ide supporting the development of @placeholder applications and javascript within web-applications .
{ "confidence": [ 56.42477035522461, 54.47105026245117, 52.42080307006836, 52.07534408569336, 51.95646667480469, 51.32235336303711, 47.84408187866211, 46.153465270996094, 45.11833190917969, 44.79971694946289, 44.66584777832031, 42.30472946166992, 42.30472946166992, 42.30472946166992, 41.50546646118164, 41.50546646118164, 41.50546646118164, 39.75054168701172, 37.06813049316406, 35.11737823486328, 34.352386474609375, 33.84892272949219, 33.23662185668945, 32.41200256347656, 31.310653686523438, 30.236888885498047, 29.959495544433594, 29.714458465576172, 29.50546646118164, 28.582212448120117, 28.400989532470703, 26.89800453186035, 26.89800453186035, 26.89800453186035, 26.829164505004883, 26.686969757080078, 26.344711303710938, 25.000289916992188, 25.000289916992188, 25.000289916992188, 25.000289916992188, 24.75693702697754, 24.75693702697754, 24.4874267578125, 24.366771697998047, 24.193126678466797, 24.132949829101562, 23.475624084472656, 23.348085403442383, 23.21854591369629, 23.13941764831543, 22.537988662719727, 22.321287155151367, 22.321287155151367, 22.321287155151367, 22.321287155151367, 22.321287155151367, 22.321287155151367, 21.888525009155273, 21.65653419494629, 21.575286865234375, 21.575286865234375, 21.219268798828125, 21.219268798828125, 21.219268798828125, 21.219268798828125, 21.219268798828125, 21.00792121887207, 20.851381301879883, 20.706605911254883, 20.544811248779297, 20.544811248779297, 20.544811248779297, 19.789392471313477, 19.789392471313477, 19.60458755493164, 18.96923828125, 18.892709732055664, 17.669349670410156, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795, 15.98266887664795 ], "content": [ "How to build .min.js and .min.js.map files using Eclipse JSDT JavaScript Developement Tools", "This is in Eclipse Version : 4.2.1 with Eclipse Web Developer Tools 3.4.1 and JavaScript Development Tools 1.4.1 .", "The JavaScript source editor in JSDT flags trailing commas as errors :", "I suggest you that you read stackoverflow.com questions 609316 debug-javascript-in-eclipse http : stackoverflow.com questions 609316 debug-javascript-in-eclipse In Eclipse Neon JSDT Team will provide perhaps a launch with node", "update Basically Eclipse with JSDT can t do the job .", "I have a strange issue with outlining of JavaScript files in Eclipse 4.2 using JSDT 1.4.1 .", "I think the 3.6 refers to the Eclipse WTP of which JSDT is a component .", "It seems that you are using ES6 syntax code and JSDT Validator doesn t support this ECMA version so it s a problem with JSDT .", "By the way there is a fork of JSDT that is a candidate for merging to official JSDT called JSDT+NJSDoc that handles such cross file analysis extremely efficiently and adds other features : https : bitbucket.org nexj webtools.jsdt.core", "Without this fix JSDT throws Runtime disconnected exception .", "Following JavaScript Beautifier plug-in is available for Eclipse .", "I am using Eclipse JSDT and the default formatting settings change something like .. . .. . to be on one ugly line .", "I m using the Eclipse editor with JSDT to work through some Firefox add-on examples .", "I ve downloaded JSDT Eclipse Indigo and I m running it on Windows 7 64-bit .", "I assumed that after so many years of developing JSDT it would work .", "Thank you John it seems JSDT has problems with object literals .", "The current release of JSDT was built-in October 2014 well after this fix was committed .", "In a pretty good article http : www.enterprisedojo.com 2010 12 19 beware-the-trailing-comma-of-death on the subject the author mentions : .. . .. . On the tools front my preference for combating these devils is the Eclipse JavaScript Development Tools .", "Standard JSDT can seem non-deterministic when it come to completions across files .", "http : www.enterprisedojo.com wp-content uploads 2010 12 jsdtRules.png .. . .. . However using Eclipse Indigo with WTP JSDT I m not seeing trailing commas as errors and I can t find a proper setting to fix this .", "Is there a downloadable package or how to build from the source code JSDT 3.6 with this bug fix https : bugs.eclipse.org bugs show bug.cgi id 425044", "I have the following JavaScript code template in Eclipse .", "How do I setup Eclipse to flag trailing commas in JavaScript as errors", "I have : .. . .. . disabled the JavaScript Validation in Preferences - Validation .. . .. . disabled JavaScript semantic validation in Preferences - JavaScript - Validator - Errors Warnings .. . .. . disabled all relevant builders in project properties .. . .. . manually edited my .project file to remove all JavaScript-related items .. . .. . edited the Include path for JavaScript in Preferences - JavaScript - Include Path .. . .. . added exclusion patterns to my project JavaScript settings .. . .. . manually located the nodejs executable that the Tern plugin used and deleted it just in case that would do anything .. . .. . deleted the JSDT plugin altogether .. . .. . anything and everything else that I could possibly think of .. . .. . And yet JavaScript is still validated improperly of course because eclipse s JavaScript validation is terrible .", "The first line gives the error - Syntax error on token delete this token .. . .. . The last line gives the error - Syntax error insert to complete Block .. . .. . Is there something wrong with this code or is it JSDT that is wrong", "https : github.com atlanto eclipse-javascript-formatter .. . .. . It can be used to span single statement - multiple variable declarations into multiple lines .", "In eclipse using a JavaScript project i set the never-read-variable-scanner to error Alt+wp JavaScript - Validator - Errors Warnings .. . .. . Now i habe the function MyFunction .. . .. . Everything works fine .", "I usually prefer Eclipse but NB has gotten better recently and it works well for me when I m doing JS development .", "It s maybe a BUG try this code in other IDE and if this work the problem is on eclipse", "Your issue is the same than EcmaScript 6 - Tern IDE for Eclipse validation errors http : stackoverflow.com questions 33479015 ecmascript-6-tern-ide-for-eclipse-validation-errors", "Here http : stackoverflow.com questions 12600168 is-there-an-eclipse-plugin-that-creates-an-outline-view-for-the-javascript-reve 12837009 12837009 is a similar question asked .", "Make sure you re in the correct perspective ie JavaScript as opposed to Java .", "If I added it specifically using the new JavaScript file option it worked fine .", "sorry I am new to JavaScript How to use this lisperator.net uglifyjs", "Eclipse JavaScript outline view http : i.stack.imgur.com iQPDQ.png .. . .. . How can I get the variable properties also be reflected according to the access annotation in the Eclipse outline view", "I m writing an eclipse-plugin for JOII http : joii.harold.info but got stuck on modifying the outline in a JavaScript editor .", "I found the issue of this question while reading this post http : www.kajabity.com 2012 02 how-i-introduced-jsdoc-into-a-javascript-project-and-found-my-eclipse-outline .", "I would expect it to be in Preferences under JavaScript - Validator - Errors Warnings with the other similar options but it s not .", "Slightly off topic but you should also look into using JSLint to check the syntax of the JavaScript code .", "Right click JavaScript Resources under the Source tab MyProject WebContent is listed as included all and excluded none .", "You can use an external builder to run build scripts for your Javascript tasks .", "There is however no outline for it besides the default javascript stuff .", "Harold why not writing a tern plugin in JavaScript for JOII", "enter image description here http : i.stack.imgur.com itrDo.png .. . .. . Is it really so impossible to have IDE-trickery such as code assist and completion AKA the whole reason to use an IDE in the first place with Eclipse even working with projects bigger than two lines-of-code", "Right click the js directory and choose new other JavaScript source file and call it DomStuff.js with the following content : .. . .. . Right click the js directory again and choose new other JavaScript source file and call it WorkFlow.js .. . .. . When I type MyApp . then press control + space I get a box saying No Default Proposals .", "can t I do it with Eclipse", "More information about using the above plug-in is given in the README.md file .", "You can Increase the memory available to eclipse by providing the -Xms and -Xmx parameters at startup for e.g : eclipse -vmargs -Xms256M -Xmx1024M .", "the Customize View - Content - JavaScript Elements thing seems to have finally worked .", "assuming you are using the repository version of eclipse the file should be etc eclipse.ini http : stackoverflow.com questions 8419099 where-does-eclipse-look-for-eclipse-ini-under-linux .", "I ve got this huge Node.JS project in Eclipse .", "As many of us know IE7 is not quite friendly with JavaScript code containing trailing commas which can be a large problem for projects using modern JS framerworks and containing a lot of JS code .", "There is a good plugin for Eclipse http : marketplace.eclipse.org content phonegap-android-jslintjshint .", "If you want the troublesome way to get it to work in Eclipse then keep reading .", "It seems that Eclipse has problems with objects declared as object literals .", "More info at the eclipse wiki https : wiki.eclipse.org FAQ How do I increase the heap size available to Eclipse 3F .", "What are your -Xmx and -Xms settings for eclipse check your eclipse.ini .", "WTP 3.6 was released with Eclipse Luna so there should be no need to build anything .", "I ve just figured out how to enable jQuery code assist in Eclipse Kepler partly thanks to this http : stackoverflow.com questions 11731884 jquery-autocompletion-with-eclipse-juno-java-ee post .", "Name it MyProject and web content folder name is WebContent .", "Code assist for id does provide the expected functions like bind and on .", "just provide apply and call which are only some of the JS function methods .", "The style before formatting is recommended by JSLint so I am wondering can Eclipse be set to format it this way", "Filed a workaround with Eclipse : bugs.eclipse.org bugs show bug.cgi id 379114 https : bugs.eclipse.org bugs show bug.cgi id 379114", "Additional information .. . .. . Eclipse does not show several functions of this closure the above is just a minimal example .", "enter image description here http : i.stack.imgur.com DcO2m.png .. . .. . Please share the secret option with me that makes Eclipse usable .", "I am running Eclipse Luna latest available and am still suffering this puzzle .", "I open a project with file new static web project .", "Eclipse has always been sluggish but now it s gotten to the point where after every few keystrokes Eclipse will freeze for minutes with the processor at 100 often ending with some random useless error message like garbage-collection ran out-of-memory or whatever .", "I can see all variable and function properties in the Eclipse outline view .", "I have a closure defined like this : .. . .. . After some researching I found out that I need the jsDoc annotations to make the functions show up in Eclipse .", "The syntax used in file that defines code assist for document in Eclipse looks a lot like the code in default externs used by the closure compiler .", "Note - Eclipse Mars and WTP 3.7 are all in release candidate status you should plan to upgrade to the final release due at the end of June .", "I ve had the same dialog advising me to disable pretty much everything else that is useful to the point that Eclipse is starting to become quite similar to your next enhanced Notepad application .", "screenshot of bad outline http : i.stack.imgur.com Eixxd.png .. . .. . I was tested all filtering options jsdoc and study Eclipse preferences but has no idea what to do to make something2 visible in outline view", "Because if you add @memberOf to one the members then Eclipse recognizes all members in the outline view .", "Setting up the main types in types.js .. . .. . A file that isn t used at all in my code but tells Eclipse how to auto complete : .. . .. . An implementation of workflow : .. . .. . This can be converted to a myapp.workflow.createOrder .. . syntax by replacing myapp.types.WorkFlow.prototype with myapp.workflow removing myapp.workflow new myapp.types.WorkFlow and removing the goog.require myapp.types .", "However instead of have a path like usr bin npm though you would just use a path like C : tools sometool.exe .. . the browserify part is not really relevant to the process BTW you can set up any external command you want for the builder .", "After that your plugin will work for Vim Emacs Atom Sublime and Eclipse github.com angelozerr tern.java https : github.com angelozerr tern.java", "It looks like the fix for another bug involving erroneous syntax errors on the comma operator https : bugs.eclipse.org bugs show bug.cgi id 329716 also removed the syntax-error on trailing commas in initializers .", "That s technically correct the standard says they re allowed and IE7 is just nonconformant .", "There s a feature request https : bugs.eclipse.org bugs show bug.cgi id 325280 open asking that they be reinstated .", "Just voted for this fix....thanks for the link .", "It will warn you about the trailing comma but also about many other potential problems .", "The instructions for setting it up : http : www.mobiledevelopersolutions.com home announce-1 mds12released-nowwithjslintjshint", "Also I found in Helios that if I added a JS file to the project by right-clicking and adding a new File which I would then name with a .js extension didn t make the UI pick up that it should be treated as a JS file--no syntax-highlighting checking etc .", "As an aside NetBeans will also do this for you and I have had no problems with it not recognizing commas .", "The existing formatter settings does not offer controls over the comma statement it seems .", "Are you using Aptana or JSBeautifier", "Seems incredible that it s still unresolved.. .", "Link is not working", "Its a little late I guess but I do this : .. . .. . Or I do this : .. . .. . The second one shifts the variables to the beginning of the line but that s a trade off you ll have to live with .", "The first functions shows up but the second does not .", "It is just not listed .", "And the really weird thing : If I remove the contents of the first function completely the second function will show up just fine .", "Is there some mistake in my syntax that does cause this behaviour", "The complete script works fine when I test my project in the browser Google Chrome and gets validated by jsLint except some things where I do not accept the jsLint way of writing code .", "The lost functions seem to be quite random sometimes a single one is missing sometimes several in a row .", "Also there are functions between the missing ones that are shown in the outline like this : shown shown missing shown missing missing .. ." ] }
{ "confidence": [ 75.43265533447266, 73.98351287841797, 73.20203399658203, 70.13896942138672, 68.90503692626953, 67.71876525878906, 65.62715911865234, 64.0656967163086, 57.032188415527344, 50.5435791015625, 46.464420318603516, 40.614280700683594, 40.43738555908203, 35.87116241455078, 30.430574417114258, 29.14362144470215, 28.172550201416016, 27.075843811035156, 25.24508285522461 ], "content": [ "Question : I open a project with file new static web project . Name it MyProject and web content folder name is WebContent . Right click the WebContent directory and add a js directory . Right click the js directory and choose new other JavaScript source file and call it DomStuff.js with the following content : .. . .. . Right click the js directory again and choose new other JavaScript source file and call it WorkFlow.js .. . .. . When I type MyApp . then press control + space I get a box saying No Default Proposals . It s like auto complete only works when all the code is in one file . Right click JavaScript Resources under the Source tab MyProject WebContent is listed as included all and excluded none . This is in Eclipse Version : 4.2.1 with Eclipse Web Developer Tools 3.4.1 and JavaScript Development Tools 1.4.1 . For as long as I remember I never got the auto complete to work on code outside the file I am currently working on . Is this normal or am I missing some setting here Comment : Have you tried Aptana Comment : @epascarello No I have not tried it yet . I assumed that after so many years of developing JSDT it would work . I may be just a setting I m missing somewhere . .. . Answer : Standard JSDT can seem non-deterministic when it come to completions across files . That is because even if the project is configured correctly then the most expensive type of it s source code-analysis only occurs on files that are open . Do you get the same result if both files are open By the way there is a fork of JSDT that is a candidate for merging to official JSDT called JSDT+NJSDoc that handles such cross file analysis extremely efficiently and adds other features : https : bitbucket.org nexj webtools.jsdt.core Comment : Thank you John it seems JSDT has problems with object literals . If I declare my objects as constructor functions it works fine across files . When creating an object on Window.prototype kapital W it works and has code assist on every file just like document.getEl.. . will suggest in every file . Comment : I have updated my question with the solution I am thinking about not sure yet . I can close all files and have only one file open to have code assist on other files even though they are closed . The syntax used in file that defines code assist for document in Eclipse looks a lot like the code in default externs used by the closure compiler . Every object is a function and every property is declared on the functions prototype .", "Question : As many of us know IE7 is not quite friendly with JavaScript code containing trailing commas which can be a large problem for projects using modern JS framerworks and containing a lot of JS code . In a pretty good article http : www.enterprisedojo.com 2010 12 19 beware-the-trailing-comma-of-death on the subject the author mentions : .. . .. . On the tools front my preference for combating these devils is the Eclipse JavaScript Development Tools . The JavaScript source editor in JSDT flags trailing commas as errors : http : www.enterprisedojo.com wp-content uploads 2010 12 jsdtRules.png .. . .. . However using Eclipse Indigo with WTP JSDT I m not seeing trailing commas as errors and I can t find a proper setting to fix this . How do I setup Eclipse to flag trailing commas in JavaScript as errors Comment : I would expect it to be in Preferences under JavaScript - Validator - Errors Warnings with the other similar options but it s not . .. . Answer : Slightly off topic but you should also look into using JSLint to check the syntax of the JavaScript code . It will warn you about the trailing comma but also about many other potential problems . There is a good plugin for Eclipse http : marketplace.eclipse.org content phonegap-android-jslintjshint . The instructions for setting it up : http : www.mobiledevelopersolutions.com home announce-1 mds12released-nowwithjslintjshint", "Question : As many of us know IE7 is not quite friendly with JavaScript code containing trailing commas which can be a large problem for projects using modern JS framerworks and containing a lot of JS code . In a pretty good article http : www.enterprisedojo.com 2010 12 19 beware-the-trailing-comma-of-death on the subject the author mentions : .. . .. . On the tools front my preference for combating these devils is the Eclipse JavaScript Development Tools . The JavaScript source editor in JSDT flags trailing commas as errors : http : www.enterprisedojo.com wp-content uploads 2010 12 jsdtRules.png .. . .. . However using Eclipse Indigo with WTP JSDT I m not seeing trailing commas as errors and I can t find a proper setting to fix this . How do I setup Eclipse to flag trailing commas in JavaScript as errors Comment : I would expect it to be in Preferences under JavaScript - Validator - Errors Warnings with the other similar options but it s not . .. . Answer : It looks like the fix for another bug involving erroneous syntax errors on the comma operator https : bugs.eclipse.org bugs show bug.cgi id 329716 also removed the syntax-error on trailing commas in initializers . That s technically correct the standard says they re allowed and IE7 is just nonconformant . There s a feature request https : bugs.eclipse.org bugs show bug.cgi id 325280 open asking that they be reinstated . Comment : Just voted for this fix....thanks for the link .", "Question : As many of us know IE7 is not quite friendly with JavaScript code containing trailing commas which can be a large problem for projects using modern JS framerworks and containing a lot of JS code . In a pretty good article http : www.enterprisedojo.com 2010 12 19 beware-the-trailing-comma-of-death on the subject the author mentions : .. . .. . On the tools front my preference for combating these devils is the Eclipse JavaScript Development Tools . The JavaScript source editor in JSDT flags trailing commas as errors : http : www.enterprisedojo.com wp-content uploads 2010 12 jsdtRules.png .. . .. . However using Eclipse Indigo with WTP JSDT I m not seeing trailing commas as errors and I can t find a proper setting to fix this . How do I setup Eclipse to flag trailing commas in JavaScript as errors Comment : I would expect it to be in Preferences under JavaScript - Validator - Errors Warnings with the other similar options but it s not . .. . Answer : Make sure you re in the correct perspective ie JavaScript as opposed to Java . Also I found in Helios that if I added a JS file to the project by right-clicking and adding a new File which I would then name with a .js extension didn t make the UI pick up that it should be treated as a JS file--no syntax-highlighting checking etc . If I added it specifically using the new JavaScript file option it worked fine . Comment : As an aside NetBeans will also do this for you and I have had no problems with it not recognizing commas . I usually prefer Eclipse but NB has gotten better recently and it works well for me when I m doing JS development .", "Question : null .. . Answer : I ve downloaded JSDT Eclipse Indigo and I m running it on Windows 7 64-bit . I ve wrote a simple JS code that prints Hello World to the screen . When I try to run the code via CTRL+F11 I get the following error : .. . .. . The selection cannot be launched and there are no recent launches . What is the problem and how do I fix it Comment : I suggest you that you read stackoverflow.com questions 609316 debug-javascript-in-eclipse http : stackoverflow.com questions 609316 debug-javascript-in-eclipse In Eclipse Neon JSDT Team will provide perhaps a launch with node", "Question : I m using the Eclipse editor with JSDT to work through some Firefox add-on examples . The following code generates errors . The first line gives the error - Syntax error on token delete this token .. . .. . The last line gives the error - Syntax error insert to complete Block .. . .. . Is there something wrong with this code or is it JSDT that is wrong .. . Answer : It seems that you are using ES6 syntax code and JSDT Validator doesn t support this ECMA version so it s a problem with JSDT . Your issue is the same than EcmaScript 6 - Tern IDE for Eclipse validation errors http : stackoverflow.com questions 33479015 ecmascript-6-tern-ide-for-eclipse-validation-errors", "Question : I open a project with file new static web project . Name it MyProject and web content folder name is WebContent . Right click the WebContent directory and add a js directory . Right click the js directory and choose new other JavaScript source file and call it DomStuff.js with the following content : .. . .. . Right click the js directory again and choose new other JavaScript source file and call it WorkFlow.js .. . .. . When I type MyApp . then press control + space I get a box saying No Default Proposals . It s like auto complete only works when all the code is in one file . Right click JavaScript Resources under the Source tab MyProject WebContent is listed as included all and excluded none . This is in Eclipse Version : 4.2.1 with Eclipse Web Developer Tools 3.4.1 and JavaScript Development Tools 1.4.1 . For as long as I remember I never got the auto complete to work on code outside the file I am currently working on . Is this normal or am I missing some setting here Comment : Have you tried Aptana Comment : @epascarello No I have not tried it yet . I assumed that after so many years of developing JSDT it would work . I may be just a setting I m missing somewhere . .. . Answer : update Basically Eclipse with JSDT can t do the job . Tried to define all my namespaces with constructor functions but it s all too much trouble . Trying netbeans now and it ll assist most of the closure library and all of my code . Some things like goog.array won t complete because goog.array is never defined . When adding goog.array new Object to the array.js it ll complete goog.array and goog.array.ArrayLike . These modded js file go in your js libs directory of your project . If you want the troublesome way to get it to work in Eclipse then keep reading . It seems that Eclipse has problems with objects declared as object literals . Declaring my complex types with a constructor function seems to do the trick . An instance of the root object has to be created on Window capital W . update .. . .. . Here are 3 files I use to split up the definition and the implementation a little so it s easier with google-closure . Setting up the main types in types.js .. . .. . A file that isn t used at all in my code but tells Eclipse how to auto complete : .. . .. . An implementation of workflow : .. . .. . This can be converted to a myapp.workflow.createOrder .. . syntax by replacing myapp.types.WorkFlow.prototype with myapp.workflow removing myapp.workflow new myapp.types.WorkFlow and removing the goog.require myapp.types . Maybe this can be automated in the build compile process if needed . I am not sure if creating a single object with the help from a constructor function is much more expensive than just having goog.require create myapp.workflow and adding properties to it as I used to do and as it s done in closure library .", "Question : I am using Eclipse JSDT and the default formatting settings change something like .. . .. . to be on one ugly line . The style before formatting is recommended by JSLint so I am wondering can Eclipse be set to format it this way The existing formatter settings does not offer controls over the comma statement it seems . Comment : Filed a workaround with Eclipse : bugs.eclipse.org bugs show bug.cgi id 379114 https : bugs.eclipse.org bugs show bug.cgi id 379114 Comment : Are you using Aptana or JSBeautifier Comment : Seems incredible that it s still unresolved.. . .. . Answer : Following JavaScript Beautifier plug-in is available for Eclipse . https : github.com atlanto eclipse-javascript-formatter .. . .. . It can be used to span single statement - multiple variable declarations into multiple lines . More information about using the above plug-in is given in the README.md file . Comment : Link is not working", "Question : null .. . Answer : Is there a downloadable package or how to build from the source code JSDT 3.6 with this bug fix https : bugs.eclipse.org bugs show bug.cgi id 425044 My attempt to build from the package attached to this bug fix failed with org.apache.maven.reactor.MavenExecutionException : Cannot find layout implementation corresponding to : p2 for remote repository with id : license-feature ... . Without this fix JSDT throws Runtime disconnected exception . Comment : I think the 3.6 refers to the Eclipse WTP of which JSDT is a component . WTP 3.6 was released with Eclipse Luna so there should be no need to build anything . The current release of JSDT was built-in October 2014 well after this fix was committed . Comment : OK I m answering my own question . I was able to find WTP 3.7.0RC2 which works and does not throws Runtime disconnected or any other exception so far at - build.eclipse.org webtools committers http : build.eclipse.org webtools committers - Hope it helps to others . Comment : Note - Eclipse Mars and WTP 3.7 are all in release candidate status you should plan to upgrade to the final release due at the end of June . Comment : @ greg-449 I could not wait till the end of June . Fortunately I proved that Mars and WTP 3.7 can work together . The only difference is that I do not see a prompt that the debugger is suspended in the console window .", "Question : How to build .min.js and .min.js.map files using Eclipse JSDT JavaScript Developement Tools Comment : jscompress.com http : jscompress.com Comment : can t I do it with Eclipse Comment : github.com oncereply jscompressor https : github.com oncereply jscompressor Comment : jscompressor doesn t generate map files It is also not very comfortable tool .. . Answer : You can use an external builder to run build scripts for your Javascript tasks . Go to Project -- Properties and choose Builders . Then you can add an external builder to launch an external program with whatever arguments you need . Setting up an external builder for NPM http : i.stack.imgur.com bbfR7.png .. . .. . You can se the builder to run automatically by using the Build Options tab and setting the Run The Builder : options : .. . .. . enter image description here http : i.stack.imgur.com l8rTx.png Comment : how to add the browserify builder on Windows Comment : The process is the same . However instead of have a path like usr bin npm though you would just use a path like C : tools sometool.exe .. . the browserify part is not really relevant to the process BTW you can set up any external command you want for the builder . Comment : What builder can I use on Windows Comment : You can set up a builder for whatever external you would normally use for processing your JS files.. . if you have something like a grunt file you could just call that or you could use some external tool directly like lisperator.net uglifyjs http : lisperator.net uglifyjs Comment : sorry I am new to JavaScript How to use this lisperator.net uglifyjs", "Question : I am using Eclipse JSDT and the default formatting settings change something like .. . .. . to be on one ugly line . The style before formatting is recommended by JSLint so I am wondering can Eclipse be set to format it this way The existing formatter settings does not offer controls over the comma statement it seems . Comment : Filed a workaround with Eclipse : bugs.eclipse.org bugs show bug.cgi id 379114 https : bugs.eclipse.org bugs show bug.cgi id 379114 Comment : Are you using Aptana or JSBeautifier Comment : Seems incredible that it s still unresolved.. . .. . Answer : Its a little late I guess but I do this : .. . .. . Or I do this : .. . .. . The second one shifts the variables to the beginning of the line but that s a trade off you ll have to live with .", "Question : I know that there are many questions on stackoverflow regarding this issue but none of them solve the issue at all and I need deeper insight into this problem . I have tried everything that everyone suggested and more to no avail whatsoever . I have : .. . .. . disabled the JavaScript Validation in Preferences - Validation .. . .. . disabled JavaScript semantic validation in Preferences - JavaScript - Validator - Errors Warnings .. . .. . disabled all relevant builders in project properties .. . .. . manually edited my .project file to remove all JavaScript-related items .. . .. . edited the Include path for JavaScript in Preferences - JavaScript - Include Path .. . .. . added exclusion patterns to my project JavaScript settings .. . .. . manually located the nodejs executable that the Tern plugin used and deleted it just in case that would do anything .. . .. . deleted the JSDT plugin altogether .. . .. . anything and everything else that I could possibly think of .. . .. . And yet JavaScript is still validated improperly of course because eclipse s JavaScript validation is terrible . This causes constant hangs and freezes and makes the experience so terrible I m considering managing the whole project in Notepad++ . I cannot understand how this could be so difficult to fix . Any insight would be profoundly appreciated . FWIW it s a maven-based project using a wildfly archetype . .. . Answer : In the view menu of the Project Explorer choose Customize View.. . then in the dialog in the Content tab disable JavaScript Elements . You also have to disable the Validation builder right-click on project folder : Properties Builders and delete the errors in the Problems view to get rid of all JS errors . Comment : I ll look into your response tomorrow morning thanks . Comment : the Customize View - Content - JavaScript Elements thing seems to have finally worked . Thanks .", "Question : null .. . Answer : I have a strange issue with outlining of JavaScript files in Eclipse 4.2 using JSDT 1.4.1 . I have a closure defined like this : .. . .. . After some researching I found out that I need the jsDoc annotations to make the functions show up in Eclipse . The first functions shows up but the second does not . It is just not listed . And the really weird thing : If I remove the contents of the first function completely the second function will show up just fine . Is there some mistake in my syntax that does cause this behaviour The complete script works fine when I test my project in the browser Google Chrome and gets validated by jsLint except some things where I do not accept the jsLint way of writing code . Additional information .. . .. . Eclipse does not show several functions of this closure the above is just a minimal example . The lost functions seem to be quite random sometimes a single one is missing sometimes several in a row . Also there are functions between the missing ones that are shown in the outline like this : shown shown missing shown missing missing .. . I double checked that every single function has the @memberOf jsDoc annotation which should make it visible in the outline . The missing functions are not recognized as function blocks by the editor so I cannot fold them the shown function can be folded . Removing the content from the calcGridLocation function enables code-folding on the detectCollision function . Comment : Any particular reason for var foo function .. . instead of simply function foo .. . Comment : I adopted that style of closure definition from another library I used in this project since I didn t know much about closures and stuff when I started this . So I have no idea if it has any particular reason but I guess most likely the answer is no Comment : Recommended reading : kangax.github.com nfe http : kangax.github.com nfe Comment : Interesting read . I just changed the inner functions to the function name .. . style of definition and I guess now I know why it was done that way before : jsLint marks every function-call or using any function as a parameter for jQuery handlers as error because it is used before it was defined . Well it didn t solve my problem too.. .", "Question : In eclipse using a JavaScript project i set the never-read-variable-scanner to error Alt+wp JavaScript - Validator - Errors Warnings .. . .. . Now i habe the function MyFunction .. . .. . Everything works fine . But if i remove the + sign its telling me self is never read . Is it a bug or a feature and why Comment : I d call it a bug . The code is essentially nonsense with the + . .. . Answer : It s maybe a BUG try this code in other IDE and if this work the problem is on eclipse Comment : Id created a bug report bugs.eclipse.org bugs show bug.cgi id 464805 https : bugs.eclipse.org bugs show bug.cgi id 464805 this will proove your answer the best i think . Comment : ok but I don t said I m sure", "Question : null .. . Answer : I have the following JavaScript code template in Eclipse . I can see all variable and function properties in the Eclipse outline view . But the access annotation @private @protected and @public is only reflected for teh function properties in the outline view not for the variable properties . See the green red yellow functions but the variables all green . Eclipse JavaScript outline view http : i.stack.imgur.com iQPDQ.png .. . .. . How can I get the variable properties also be reflected according to the access annotation in the Eclipse outline view Comment : Why no @memberOf for them Comment : Because if you add @memberOf to one the members then Eclipse recognizes all members in the outline view . But you can add it if you need it .", "Question : I have such code but can not turn on outline of function if it defined in anonymous function - there is not problem with class . How can I outline something2 - please share some hints I can mark all function as constructors but it is invalid approach . screenshot of bad outline http : i.stack.imgur.com Eixxd.png .. . .. . I was tested all filtering options jsdoc and study Eclipse preferences but has no idea what to do to make something2 visible in outline view second attempt http : i.stack.imgur.com 7zSGA.png Comment : I am running Eclipse Luna latest available and am still suffering this puzzle . .. . Answer : You have a small typo in the @memberOf annotation . Change to a capital O and it should work just fine : .. . .. . Outline Screenshot http : i.stack.imgur.com AGbZo.png .. . .. . Remove the @constructor annotation if appropriate to get something3 in the outline and not the constructor function . Here http : stackoverflow.com questions 12600168 is-there-an-eclipse-plugin-that-creates-an-outline-view-for-the-javascript-reve 12837009 12837009 is a similar question asked . Follow the link in the answer to get some more information . Comment : From my perspective your recipe seems to work . I find it interesting that the tag needs to be @memberOf as opposed to @memberof see .. . usejsdoc.org tags-memberof.html http : usejsdoc.org tags-memberof.html Comment : Indeed you are right . I found the issue of this question while reading this post http : www.kajabity.com 2012 02 how-i-introduced-jsdoc-into-a-javascript-project-and-found-my-eclipse-outline . It seems to be an odd behavior of the outline view . But I don t have any details about the implementation .", "Question : I ve tried so much I m almost breaking my laptop on my forehead . But it was an expensive piece of equipment and I need it for my job so I will try StackOverflow first . I ve got this huge Node.JS project in Eclipse . Eclipse has always been sluggish but now it s gotten to the point where after every few keystrokes Eclipse will freeze for minutes with the processor at 100 often ending with some random useless error message like garbage-collection ran out-of-memory or whatever . Whatever it is I don t need it to happen after every few keystrokes Sometimes this error message appears with the advise to disable Template Proposals . I ve had the same dialog advising me to disable pretty much everything else that is useful to the point that Eclipse is starting to become quite similar to your next enhanced Notepad application . enter image description here http : i.stack.imgur.com itrDo.png .. . .. . Is it really so impossible to have IDE-trickery such as code assist and completion AKA the whole reason to use an IDE in the first place with Eclipse even working with projects bigger than two lines-of-code Why would Ctrl+Space take a minute of 100 CPU when the only assist I have enabled is a handful of templates and the others are disabled enter image description here http : i.stack.imgur.com DcO2m.png .. . .. . Please share the secret option with me that makes Eclipse usable . .. . Answer : 1 . Preferences -- Editors -- Content Assist : disable auto activation . You can still use it with Ctrl + Space . 2 . Disable build on save for the workspace . 3 . As a last resort disable Preferences -- Validation .. . .. . 4 . You can Increase the memory available to eclipse by providing the -Xms and -Xmx parameters at startup for e.g : eclipse -vmargs -Xms256M -Xmx1024M . More info at the eclipse wiki https : wiki.eclipse.org FAQ How do I increase the heap size available to Eclipse 3F . Comment : Thank you . Although just loading a bunch of templates should not take longer than starting an entire mission in Doom 3 I will try this out today and see if this fixes the problem . Comment : What are your -Xmx and -Xms settings for eclipse check your eclipse.ini . Increase the memory . Comment : Oh I don t know anything about that . I found three configs and appended the settings you mentioned to the bottom of the question . Comment : assuming you are using the repository version of eclipse the file should be etc eclipse.ini http : stackoverflow.com questions 8419099 where-does-eclipse-look-for-eclipse-ini-under-linux . Putting them in in this file would mean you don t have to specify the arguments at each startup .", "Question : null .. . Answer : I m writing an eclipse-plugin for JOII http : joii.harold.info but got stuck on modifying the outline in a JavaScript editor . I have a ContentAssistant that provides me with a list of ICompletionProposal and got the IJavaCompletionProposalComputer functioning perfectly giving me nice code completions as I type . There is however no outline for it besides the default javascript stuff . So the question is : How do I hook the ContentAssistant into something that alters updates the outline view Example code I m parsing with the plugin : .. . .. . In the outline SomeClass is shown as : SomeClass : Any but I d like it to display itself as an actual class with the members . I ve been searching all day litterally for an example on this but no luck. . Thanks in advance Comment : An outline view usually uses some sort of listener to listen for changes to the document or the abstract-syntax-tree or some or model of the document contents and updates from that . Comment : Harold why not writing a tern plugin in JavaScript for JOII After that your plugin will work for Vim Emacs Atom Sublime and Eclipse github.com angelozerr tern.java https : github.com angelozerr tern.java", "Question : I ve just figured out how to enable jQuery code assist in Eclipse Kepler partly thanks to this http : stackoverflow.com questions 11731884 jquery-autocompletion-with-eclipse-juno-java-ee post . So yeah I ve got code assist on some of the API but not on things like .ajax or .parseJSON . Code assist for id does provide the expected functions like bind and on . . just provide apply and call which are only some of the JS function methods . It also seems to matter where-in code I call on yielding different results in different places . What could be the reason for this I d love to have code assist for the methods . .. . Answer : Disclaimer I m the author of tern.java . I suggest you that you install tern.java https : github.com angelozerr tern.java wiki Installation-Update-Site and you activate jQuery support https : github.com angelozerr tern.java wiki Tern- -jQuery-support . You will benefit with the whole case that you wish to have : .. . .. . .ajax http : i.stack.imgur.com Ur8Mq.png" ] }
[ "yes-answer-long", "yes-answer-short" ]
javascript
UNK_RELATION
diamond-operator@perl@53
diamond-operator -- the diamond-operator is used in @placeholder for i o and in java for generics .
{ "confidence": [ 58.35022735595703, 57.614707946777344, 55.222007751464844, 55.222007751464844, 55.16075134277344, 54.55615234375, 53.81842803955078, 53.78717803955078, 53.57427978515625, 53.57427978515625, 53.202171325683594, 53.14826965332031, 52.49815368652344, 52.00859069824219, 52.00859069824219, 52.00859069824219, 50.62162780761719, 49.221527099609375, 49.221527099609375, 49.221527099609375, 49.221527099609375, 49.15428161621094, 48.990013122558594, 48.990013122558594, 48.95599365234375, 48.913238525390625, 48.001434326171875, 47.828407287597656, 47.65583038330078, 47.65583038330078, 47.35883712768555, 46.29970169067383, 45.79314422607422, 45.79314422607422, 45.79314422607422, 45.77930450439453, 45.77930450439453, 45.77930450439453, 45.77930450439453, 45.77930450439453, 45.54558563232422, 45.353660583496094, 45.287261962890625, 45.287261962890625, 44.445892333984375, 43.78661346435547, 43.651023864746094, 43.38096618652344, 43.35839080810547, 43.35839080810547, 43.255226135253906, 43.255226135253906, 42.88019561767578, 42.88019561767578, 42.737186431884766, 42.737186431884766, 41.79269790649414, 41.79269790649414, 41.79269790649414, 41.79269790649414, 41.79269790649414, 41.79269790649414, 41.79269790649414, 41.79269790649414, 41.68953323364258, 41.68953323364258, 41.68953323364258, 41.21330261230469, 41.00366973876953, 40.71952819824219, 40.45562744140625, 40.448875427246094, 40.207847595214844, 39.91617202758789, 39.91617202758789, 39.77002716064453, 39.77002716064453, 39.45478057861328, 39.252254486083984, 38.84300231933594, 38.842437744140625, 38.794952392578125, 38.76795959472656, 38.69695281982422, 38.659034729003906, 38.659034729003906, 38.20433044433594, 38.20433044433594, 38.20433044433594, 38.20433044433594, 38.04801940917969, 37.61098098754883, 37.37852478027344, 37.28169250488281, 37.275238037109375, 37.164772033691406, 36.72559356689453, 36.541481018066406 ], "content": [ "The code should works diamond-operator is used correctly .", "Here is an example of diamond-operator .", "is it good to use the diamond-operator with wildcards", "What that diamond shaped operator does", "Note : If you are still learning Java and or learning about the diamond-operator See the answer in this quesiton : What is the point of the diamond-operator in Java 7", "With Java 7 they finally implemented the diamond-operator which lets you omit the repetition on initialization when working with generics .", "ok if you are talking about that diamond-operator it is called as generics .. . .. . Generics are evaluated at compile-time and not at run time .. . .. . why generics", "The ternary-operator and the diamond-operator don t get along very well .", "By making the diamond-operator implicit you would break it .", "The absence of the diamond-operator indicates construction of a raw type .", "My problem is should i used diamond-operator instead", "Java 7 has improved the diamond-operator .. . .. . In Java 6 .. . .. . In Java 7 .. . .. . In Java 7 Types have been removed from diamond-operator on Right hand side RHS .", "http : stackoverflow.com questions 4166966 what-is-the-point-of-the-diamond-operator-in-java-7", "But for object instantiation that feature was added only with the Diamond Operator .", "Purpose of the diamond-operator is to simplify instantiation of generic classes .", "But how about the diamond-operator is it optionnal to repeat it", "Actually as of Java 7 this should work - diamond-operator voting for reopen too .", "Now the necessity was to maximize developer productivity hence the invention of the diamond-operator .", "Does anyone know what is happening inside diamond-operator", "Note that the info in the diamond-operator tag already answers your question .", "So why it throws warning if you miss diamond-operator altogether", "When you don t add the String in the diamond in the right hand side of the equation you are using the diamond-operator .", "Due to type-erasure the diamond-operator and generics in general have the same run-time performance as they always have e.g .", "You aren t really answering the question is it good to use the diamond-operator with wildcards you are just explaining in general wildcards and generics. .", "This question already has an answer here : .. . .. . Java ternary-operator influence on generics type-inference questions 24289320 java-ternary-operator-influence-on-generics-type-inference 2 answers .. . .. . When I try to use the diamond-operator as follows : .. . .. . It works perfectly .", "Diamond operator http : www.javaworld.com article 2074080 core-java jdk-7--the-diamond-operator.html is one of the new feature of Jdk 7 .", "+1 So can we conclude that conditional-operator doesn t work with diamond-operator", "I ve set everything I could find to Java 1.7 including all the steps described here : Diamond operator not working in java 1.7 http : stackoverflow.com questions 22834938 diamond-operator-not-working-in-java-1-7 .. . .. . 2 Nowhere in my code does the operator exist like that .", "When writing a traditional Unix Linux program perl provides the diamond-operator .", "Or does the diamond-operator do some magic to make this just as efficient as the latter", "what part of this is available since Java 7 regarding diamond-operator you still don t understand", "The diamond-operator introduced in Java 7 is only used as in your last example new ArrayList to indicate that generic type parameters for constructor calls should be inferred .", "This is kind of a follow up question on the discussion : .. . .. . Why doesn t the diamond-operator work within a addAll call in Java 7", "This question already has an answer here : .. . .. . What is the point of the diamond-operator in Java 7", "The diamond-operator was added to reduce the verbosity of the Java code but you don t actually have to use it .", "The diamond-operator is a nice feature as you don t have to repeat yourself .", "The diamond-operator provides no type information it just says the compiler it ll be fine .", "At any place where the diamond-operator is legal it could be inferred by the compiler .", "My understanding is that diamond-operator is trying to make development easier .", "I m using the diamond-operator to initiate objects within a list .", "You should the Java 7 diamond-operator http : www.javaworld.com article 2074080 core-java jdk-7--the-diamond-operator.html because often you ll be coding to the interface and not using the same class for the reference and the instance .", "Related question : .. . .. . Convert existing generics to diamond syntax http : stackoverflow.com questions 6796545 convert-existing-generics-to-diamond-syntax but this is in NetBeans .", "diamond-operator is used to specify what type of data you are going to use in the Collections .", "list4 attempts to use the diamond-operator similar to list2 but this is a compile error with the message cannot be used with anonymous classes .", "Passing in the IObserver on the right side compiles fine but I have to use the diamond-operator .", "If you are using Java 7 and above you can use the diamond-operator http : docs.oracle.com javase tutorial java generics types.html diamond : .. . .. . Also when declaring your variables it is good practice to use the interfaces when possible instead of the concrete classes .", "For example for this class : .. . .. . .. . .. . I get an illegat start of type error : .. . .. . I know that the diamond-operator can be used since JDK7 to have type-inference with generics so I am perplexed on why I get this error .", "I m wondering if there are any known performance differences in terms of the Java 7 diamond-operator versus the language construct for previous versions of Java .", "Diamond operator will work only when you don t have wildcard as your generic type in you LHS. .", "Doesn t diamond-operator define the right part of the assignment with the same type parameters as the left side", "Just hover your mouse over this tag and read the first sentence of its description : The diamond-operator was introduced in Java SE 7", "If the compiler can infer it then using the diamond-operator as it s called will produce the same result in Java 7 and up as the code above : .. . .. . There are situations of course where it can t .", "Here is my arraylist : - public class Register newpatient extends javax.swing.JFrame .. . .. . To be honest i have no idea what is a diamond-operator actually is .", "and after this line If I have done like this : .. . .. . It gives compilation error : .. . .. . What is this error and is it good to use the diamond-operator with wildcards", "questions 4166966 what-is-the-point-of-the-diamond-operator-in-java-7 7 answers .. . .. . I have an arraylist with type patient class and the arraylist type has been underlined in yellow and the IDE has mentioned redundant type arguments in new expression use diamond-operator instead .", "After importing a project into Android studio if I want to compile or run the project it throws an error : .. . .. . Error : 61 65 java : diamond-operator is not supported in -source 1.6 .. . use -source 7 or higher to enable diamond-operator .. . .. . Does anyone know what it is and how to solve it", "Why can t be this implemented as simply taking the string from the variable s declaration and put it into the diamond-operator", "The new diamond-operator is purely implemented to save programmers from having to redundantly specify the type twice .", "The diamond-operator is just a shortcut for specifying the whole generic type because it can be inferred .", "And it s perfectly fine to use the diamond-operator to create something that will be stored in a variable with a wildcard in its type .", "The diamond-operator makes no difference to what you get at run time and at run time there are no type parameters .", "diamond-operator is not supported in -source 1.6 Seems like you are using JDK6 update it to JDK7 or JDK8 .", "Here is an assignment statement : .. . .. . With diamond-operator : .. . .. . Edit .. . .. . Add that to your build.gradle . . .. . .. . Hope it will be useful for you .", "With Android KitKat buildToolsVersion 19 you can use the diamond-operator multi-catch strings in switches try-with-resources etc .", "stackoverflow.com questions 9512526 http : stackoverflow.com questions 9512526 java-7-diamond-operator-why-was-it-difficult-to-implement rq 1 some slight explanation", "The OP says they are new to Java so it sounded like they possibly just wanted a way to write that code whether they use the convenience of the diamond-operator or not", "If you re seeing that error message about the diamond-operator it probably means the version of Java you re using on the command-line is older than 1.7 .", "http : stackoverflow.com questions 7555652 why-doesnt-the-diamond-operator-work-within-a-addall-call-in-java-7 .. . .. . From the Java Tutorial .. . .. . http : docs.oracle.com javase tutorial java generics gentypeinference.html .. . .. . Note that the diamond often works in method calls however for greater clarity it is suggested that you use the diamond primarily to initialize a variable where it is declared .. . .. . So I am a bit confused about the first line .", "I believe the diamond-operator is meant to operate that way : to infer a specific type not a templated one .", "In this case the diamond op .", "This question already has an answer here : .. . .. . Double brace initialisation anonymous-inner-class with diamond-operator questions 9773733 double-brace-initialisation-anonymous-inner-class-with-diamond-operator 4 answers .. . .. . In JDK 1.7 I can create a Collection lets for e.g .", "In any Java source file using generics the old non-generic types should be forbidden you can always use if interfacing to legacy code and the useless diamond-operator should not exist .", "I am able to use anonymous-class for overriding functionality with generics this way : .. . .. . List String a new ArrayList .. . .. . The syntax is little different though we do not need the diamond-operator anymore with new ArrayList", "In theory the diamond-operator allows you to write more compact and readable code by saving repeated type arguments .", "The point for diamond-operator is simply to reduce typing of code when declaring generic types .", "The so-called diamond-operator reads line-by-line in scalar context from STDIN or the filename s specified as command-line arguments .", "It can now determine from the left side of the assignment String Object through the call to Collections.synchronizedMap to the diamond-operator in the parameter to that call new HashMap .", "If you have a java version 1.7 you can use the diamond notation .", "say a HashMap like this : .. . .. . With the diamond at the end .", "Why bother with the diamond at all", "Non-denotable types can occur as the result-of the inference used by diamond .", "Does this conclude that Diamond operator constraint is only while inserting the objects in a Collection .. . .. . Please note erasure-in-generics http : stackoverflow.com questions 313584 what-is-the-concept-of-erasure-in-generics-in-java is different question and doesn t provide answer to this question .", "I always define the type within the diamond brackets .", "Consider this Java code which attempts to instantiate some List s : .. . .. . list1 and list2 are straightforward list2 uses the new diamond-operator in Java 7 to reduce unnecessary repetition of the type parameters .", "As for the diamond-operator from Java 7 onwards you don t need to give the type arguments on while creating an instance of a generic class if you already are assigning a reference to a reference .", "In the main when initialized using the diamond-operator it doesn t compile Java 7 with derived-class passed to the Holder s constructor required A found B : .. . .. . But it compiles and works if the base type is specified in the right part : .. . .. . Why", "Yep but as said on stackoverflow.com questions 9773733 http : stackoverflow.com questions 9773733 double-brace-initialisation-anonymous-inner-class-with-diamond-operator it is also because of subclassing .", "How often would you have to compile code with diamond-operator until it takes longer than typing out the class name would have", "When you use a diamond-operator to create a new object of a generic class it means you don t want to be redundant on the type-parameter .", "My question is if there is either a way for it to be compatible with android and with the diamond-operator or if there is another way to write that line of code still using an arraylist it must be specified that it is a String .", "You have to specify the type explicitly : .. . .. . More info at these related questions : .. . .. . Java ternary-operator influence on generics type-inference http : stackoverflow.com questions 24289320 java-ternary-operator-influence-on-generics-type-inference .. . .. . Compilation error with generics and ternary-operator in JDK 7 http : stackoverflow.com questions 23381764 compilation-error-with-generics-and-ternary-operator-in-jdk-7", "The diamond-operator in java-7 allows code like the following : .. . .. . However in Java 5 6 I can simply write : .. . .. . My understanding of type-erasure is that these are exactly the same .", "questions 4166966 what-is-the-point-of-the-diamond-operator-in-java-7 7 answers .. . .. . I m using Android Studio and I write this : .. . .. . I have this message : .. . .. . Explicit type argument Button should be replaced by .. . .. . I m curious why would it be better to use diamond instead", "When does diamond work in method calls", "It is not that you must do it but it make your code nicer shorter so I have counter question : why not use diamond-operator", "of file FILENAME but how can I tell which file is currently used by the diamond", "The error message is Type mismatch : cannot convert from new ArrayList Integer to List String .. . .. . So with the declaration of list4 why can t the diamond-operator be used with anonymous classes", "I m using synchronizedMap as an example here but the same is true for other Collections methods unmodifiable synchronized etc .. . .. . But why does the diamond-operator not work as I would expect here" ] }
{ "confidence": [ 73.0392837524414, 69.19568634033203, 64.88318634033203, 64.08599090576172, 63.5578498840332, 62.62975311279297, 62.52323913574219, 62.51713180541992, 62.26837921142578, 62.11369705200195, 61.943443298339844, 61.53392028808594, 61.17076873779297, 60.945106506347656, 60.83658218383789, 60.76795196533203, 60.68497085571289, 60.43157196044922, 60.15989303588867, 59.446388244628906 ], "content": [ "Question : This question already has an answer here : .. . .. . Java ternary-operator influence on generics type-inference questions 24289320 java-ternary-operator-influence-on-generics-type-inference 2 answers .. . .. . When I try to use the diamond-operator as follows : .. . .. . It works perfectly . However when I try this : .. . .. . It doesn t compile messaging : Incompatible types : required List found ArrayList . Why is that Comment : Does not compile in eclipse or using the javac compiler Comment : May be you have custom List or ArrayList class not from java.util package Comment : @Pablo I tested with javac and the same error appears . .. . Answer : The ternary-operator and the diamond-operator don t get along very well . You have to specify the type explicitly : .. . .. . More info at these related questions : .. . .. . Java ternary-operator influence on generics type-inference http : stackoverflow.com questions 24289320 java-ternary-operator-influence-on-generics-type-inference .. . .. . Compilation error with generics and ternary-operator in JDK 7 http : stackoverflow.com questions 23381764 compilation-error-with-generics-and-ternary-operator-in-jdk-7 Comment : +1 So can we conclude that conditional-operator doesn t work with diamond-operator Comment : @s s It works but not in Java 7 . Comment : generics inference is best used with Java8", "Question : Java 7 has improved the diamond-operator .. . .. . In Java 6 .. . .. . In Java 7 .. . .. . In Java 7 Types have been removed from diamond-operator on Right hand side RHS . My question why don t remove complete diamond operate from RHS . I know it will throw the warning But java-7 could have removed the warning also . Logic behind my think : - As we have already defined that map will have string as key and object with Map myMap on LHS . With this compiler has sufficient info . So why it throws warning if you miss diamond-operator altogether I am surethere must be reason behind it but i am not getting it Comment : This is the difference between type-inference and raw-types . As always the answer is backwards compatibility . .. . Answer : The following code compiles and runs without error . A raw instance of SoftReference is created . Raw means that there is no generic type checking which is required to allow to mix generics with pre-generics code . By making the diamond-operator implicit you would break it .", "Question : This question already has an answer here : .. . .. . What is the point of the diamond-operator in Java 7 questions 4166966 what-is-the-point-of-the-diamond-operator-in-java-7 7 answers .. . .. . I have an arraylist with type patient class and the arraylist type has been underlined in yellow and the IDE has mentioned redundant type arguments in new expression use diamond-operator instead . My problem is should i used diamond-operator instead is it a must will i get any date lose or any other problem when storing records to the arraylist Here is my arraylist : - public class Register newpatient extends javax.swing.JFrame .. . .. . To be honest i have no idea what is a diamond-operator actually is . .. . Answer : diamond-operator is used to specify what type of data you are going to use in the Collections . eg . ArrayList String list new ArrayList String . In Java 7 we can eliminate the type like .. . .. . ArrayList String list new ArrayList", "Question : I m wondering if there are any known performance differences in terms of the Java 7 diamond-operator versus the language construct for previous versions of Java . Basically is it faster to use this : .. . .. . or to use this : .. . .. . Are they the same speed Comment : Maybe it compiles a few microseconds slower but apart form that none . Comment : I agree on that . I don t think that there are any differences in the resulting byte code . Comment : How often would you have to compile code with diamond-operator until it takes longer than typing out the class name would have .. . Answer : Negative . Due to type-erasure the diamond-operator and generics in general have the same run-time performance as they always have e.g . at run-time Collections just hold Object s .", "Question : This question already has an answer here : .. . .. . What is the point of the diamond-operator in Java 7 questions 4166966 what-is-the-point-of-the-diamond-operator-in-java-7 7 answers .. . .. . I have an arraylist with type patient class and the arraylist type has been underlined in yellow and the IDE has mentioned redundant type arguments in new expression use diamond-operator instead . My problem is should i used diamond-operator instead is it a must will i get any date lose or any other problem when storing records to the arraylist Here is my arraylist : - public class Register newpatient extends javax.swing.JFrame .. . .. . To be honest i have no idea what is a diamond-operator actually is . .. . Answer : Don t worry.Its not an evil.Its feature of JAVA 7 . Purpose of the diamond-operator is to simplify instantiation of generic classes . For example instead of .. . .. . with the diamond-operator we can write only .. . .. . If you want to know more about it and want to use it please have a quick look here http : java.dzone.com announcements java-7-do-we-really-need and decide whether it s useful to you or not Comment : Thanks alot found it useful for my coding .", "Question : This is kind of a follow up question on the discussion : .. . .. . Why doesn t the diamond-operator work within a addAll call in Java 7 http : stackoverflow.com questions 7555652 why-doesnt-the-diamond-operator-work-within-a-addall-call-in-java-7 .. . .. . From the Java Tutorial .. . .. . http : docs.oracle.com javase tutorial java generics gentypeinference.html .. . .. . Note that the diamond often works in method calls however for greater clarity it is suggested that you use the diamond primarily to initialize a variable where it is declared .. . .. . So I am a bit confused about the first line . When does diamond work in method calls A bit more explanation on how diamond-operator works can be found here : .. . .. . http : www.angelikalanger.com GenericsFAQ FAQSections TechnicalDetails.html What 20is 20type 20argument 20inference 20for 20constructors And from this I have tried the following which works fine : .. . .. . Give that I have : .. . .. . a call like the following compiles fine : .. . .. . The type-parameter in invoking the constructor in the method call of f above is inferred from the argument to the constructor i.e . Integer . So is this what is meant when the tutorial says .. . .. . Note that the diamond often works in method calls .. . .. . If not can anyone kind enough to provide an example where diamond works in method call Comment : @gurung its a typo . Bad case of cut and paste : .. . Answer : So is this what is meant when the tutorial says .. . .. . I think yes though there are a couple of gotchas when it comes to operators . In your case Box instantiation is a non-issue given that the type can be trivially inferred using the constructor argument . Try changing the constructor to not take in an Integer or T and see how the invocation fails . Similarly have a look at this class : .. . .. . Similarly the problem in your linked question regarding addAll can be simply solved by helping out the compiler a bit as follows : .. . .. . Diamond operators also seem to break when it comes to implementing anonymous classes as follows : .. . .. . Fortunately in this case the compiler is pretty explicit in mentioning that doesn t won t work with anonymous classes . Comment : good answer +1 .", "Question : After importing a project into Android studio if I want to compile or run the project it throws an error : .. . .. . Error : 61 65 java : diamond-operator is not supported in -source 1.6 .. . use -source 7 or higher to enable diamond-operator .. . .. . Does anyone know what it is and how to solve it Comment : diamond-operator is not supported in -source 1.6 Seems like you are using JDK6 update it to JDK7 or JDK8 . Comment : @Apurva Thanks for your cm but my jdk is 7 .. . Answer : Diamond operator http : www.javaworld.com article 2074080 core-java jdk-7--the-diamond-operator.html is one of the new feature of Jdk 7 . Please make sure you jdk version is 7 or not . Here is an example of diamond-operator . Here is an assignment statement : .. . .. . With diamond-operator : .. . .. . Edit .. . .. . Add that to your build.gradle . . .. . .. . Hope it will be useful for you .", "Question : This is kind of a follow up question on the discussion : .. . .. . Why doesn t the diamond-operator work within a addAll call in Java 7 http : stackoverflow.com questions 7555652 why-doesnt-the-diamond-operator-work-within-a-addall-call-in-java-7 .. . .. . From the Java Tutorial .. . .. . http : docs.oracle.com javase tutorial java generics gentypeinference.html .. . .. . Note that the diamond often works in method calls however for greater clarity it is suggested that you use the diamond primarily to initialize a variable where it is declared .. . .. . So I am a bit confused about the first line . When does diamond work in method calls A bit more explanation on how diamond-operator works can be found here : .. . .. . http : www.angelikalanger.com GenericsFAQ FAQSections TechnicalDetails.html What 20is 20type 20argument 20inference 20for 20constructors And from this I have tried the following which works fine : .. . .. . Give that I have : .. . .. . a call like the following compiles fine : .. . .. . The type-parameter in invoking the constructor in the method call of f above is inferred from the argument to the constructor i.e . Integer . So is this what is meant when the tutorial says .. . .. . Note that the diamond often works in method calls .. . .. . If not can anyone kind enough to provide an example where diamond works in method call Comment : @gurung its a typo . Bad case of cut and paste : .. . Answer : I don t think that it is worth thinking about when it works and when not . The compiler will tell you and thus you have to rewrite what s not working . There is not a real rationale behind it it s more like the developers have put the current limitations of the actual compiler s implementation at a specific time into the specification and told us : that s how it has to be . Java 8 lifts a lot of these limitations without the hell freezing over . E.g . compiles with Java 8 without any error . And why not", "Question : I have a code that I am migrating to Gradle when I run it on Eclipse without Gradle it runs fine but when I use the Eclipse plugin or try to run it trhough command-line I have problems with the diamond-operator . For example for this class : .. . .. . .. . .. . I get an illegat start of type error : .. . .. . I know that the diamond-operator can be used since JDK7 to have type-inference with generics so I am perplexed on why I get this error . Can you help me to fix it please Thanks in advance Comment : Where is this.inventory in the code you posted .. . Answer : Unless you specify the version of Java to use Gradle will compile your code using the version of the JVM currently in use . If you re seeing that error message about the diamond-operator it probably means the version of Java you re using on the command-line is older than 1.7 . You ll need to upgrade to a later version or if multiple versions are installed make another version active . It s almost always a good idea to explicitly specify the version by adding these lines to your build.gradle file : .. . .. . Reference : https : docs.gradle.org current userguide java plugin.html", "Question : This is kind of a follow up question on the discussion : .. . .. . Why doesn t the diamond-operator work within a addAll call in Java 7 http : stackoverflow.com questions 7555652 why-doesnt-the-diamond-operator-work-within-a-addall-call-in-java-7 .. . .. . From the Java Tutorial .. . .. . http : docs.oracle.com javase tutorial java generics gentypeinference.html .. . .. . Note that the diamond often works in method calls however for greater clarity it is suggested that you use the diamond primarily to initialize a variable where it is declared .. . .. . So I am a bit confused about the first line . When does diamond work in method calls A bit more explanation on how diamond-operator works can be found here : .. . .. . http : www.angelikalanger.com GenericsFAQ FAQSections TechnicalDetails.html What 20is 20type 20argument 20inference 20for 20constructors And from this I have tried the following which works fine : .. . .. . Give that I have : .. . .. . a call like the following compiles fine : .. . .. . The type-parameter in invoking the constructor in the method call of f above is inferred from the argument to the constructor i.e . Integer . So is this what is meant when the tutorial says .. . .. . Note that the diamond often works in method calls .. . .. . If not can anyone kind enough to provide an example where diamond works in method call Comment : @gurung its a typo . Bad case of cut and paste : .. . Answer : It s not really about method invocation . The standalone statement .. . .. . also compiles . There are enough information to infer T for Box i.e . from the Integer argument .. . .. . On the other hand this doesn t compile .. . .. . There s no way to know what kind of list is desired . this works because inference is helped by the target type Collection String Comment : new ArrayList as a stand-alone statement does compile .", "Question : I java-6 i can declare the arraylist as follows .. . .. . I prefer to use way 3 as its brief . Is there any difference between these ways Which one we should prefer and why Update : - I know in java-7 second way is recommended but my question is in context of java-6 . Which one is preferable To me way 3 also says p is an arraylist of integers same conveyed by way1 . So I find no difference except the fact IDE displays warning message : .. . .. . ArrayList is a raw type . References to generic type ArrayList E should be parameterized Comment : Note that the info in the diamond-operator tag already answers your question . Just hover your mouse over this tag and read the first sentence of its description : The diamond-operator was introduced in Java SE 7 Comment : Actually i meant generics on right hand side . see my update Comment : what part of this is available since Java 7 regarding diamond-operator you still don t understand It s like using generics in Java 1.4 or prior : it didn t exist so you can t use it there . Comment : After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense.. . Comment : Thats what i am trying to understand whats the difference btw List Integer p new ArrayList and List Integer p new ArrayList Integer . You said After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense. . . Why it does not make any sense when way 2 is allowed in java-6 . .. . Answer : Way 3 is not good . Mixing Generics and raw-types is naughty as you are making an assumption for runtime about types and can run into ClassCastExceptions like the following code : .. . .. . So for Java 6 always use way 1", "Question : I am very new to java but have been reading up a bit and was trying to make a fairly simple android app in Eclipse . I have the following line of code : .. . .. . Of course I get the error : .. . .. . is not allowed for source level below 1.7 .. . .. . So I change the source level to 1.7 in Eclipse and then I get the error : .. . .. . Android requires compiler compliance level 5.0 or 6.0 . Found 1.7 instead . Please use Android Tools Fix Project Properties . So I do this the compiler level then goes back to 1.6 and now I get the first error . My question is if there is either a way for it to be compatible with android and with the diamond-operator or if there is another way to write that line of code still using an arraylist it must be specified that it is a String . Thank you in advance Comment : Why can t you just cast it to String Comment : ArrayList String userNumbers new ArrayList String Arrays.asList userNumbersArray Comment : @Takendarkk It doesnt answer OP Comment : @KumarAbhinav I think it does . .. . Answer : Just change your line of code to .. . .. . That notation will be supported above and below version 1.7 . When you don t add the String in the diamond in the right hand side of the equation you are using the diamond-operator . The diamond-operator was added to reduce the verbosity of the Java code but you don t actually have to use it . You can still specify the type in the diamond on the right hand side of the equation if you wish . Note : If you are still learning Java and or learning about the diamond-operator See the answer in this quesiton : What is the point of the diamond-operator in Java 7 http : stackoverflow.com questions 4166966 what-is-the-point-of-the-diamond-operator-in-java-7 Comment : The OP says : My question is if there is either a way for it to be compatible with android and with the diamond-operator or if there is another way to write that line of code still using an arraylist it must be specified that it is a String . The OP says they are new to Java so it sounded like they possibly just wanted a way to write that code whether they use the convenience of the diamond-operator or not", "Question : If I am trying to do something like this : .. . .. . then the code compiles and runs fine but of which type the ArrayList has created and after this line If I have done like this : .. . .. . It gives compilation error : .. . .. . What is this error and is it good to use the diamond-operator with wildcards If YES then WHERE Comment : There are no different types of ArrayList for it to create . Type parameters only exist at compile-time . .. . Answer : but of which type was the ArrayList created Type parameters are just constraints applied at compile-time but type-erasure https : docs.oracle.com javase tutorial java generics erasure.html replaces all occurrences of the type-parameter by its erasure in your case Object . So if you re asking about the runtime type it will be a plain ArrayList which you can think of as ArrayList Object . is it good to use the diamond-operator with wildcards If YES then WHERE No . When you use a diamond-operator to create a new object of a generic class it means you don t want to be redundant on the type-parameter . It should not be combined with a wildcard-declared variable which does not have a concrete type-parameter . To summarize you should never write : .. . .. . You should only use the wild card when the type really does not matter . In particular don t use the wild card if you want to add items to the list because adding items means you know what type to add . It is likely to be used as a parameter of a method for instance when you don t access the value and just pass the list on or where you just access the list items as plain Objects . Comment : You aren t really answering the question is it good to use the diamond-operator with wildcards you are just explaining in general wildcards and generics. . Comment : I think I see what you mean . I ll update my answer .", "Question : I java-6 i can declare the arraylist as follows .. . .. . I prefer to use way 3 as its brief . Is there any difference between these ways Which one we should prefer and why Update : - I know in java-7 second way is recommended but my question is in context of java-6 . Which one is preferable To me way 3 also says p is an arraylist of integers same conveyed by way1 . So I find no difference except the fact IDE displays warning message : .. . .. . ArrayList is a raw type . References to generic type ArrayList E should be parameterized Comment : Note that the info in the diamond-operator tag already answers your question . Just hover your mouse over this tag and read the first sentence of its description : The diamond-operator was introduced in Java SE 7 Comment : Actually i meant generics on right hand side . see my update Comment : what part of this is available since Java 7 regarding diamond-operator you still don t understand It s like using generics in Java 1.4 or prior : it didn t exist so you can t use it there . Comment : After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense.. . Comment : Thats what i am trying to understand whats the difference btw List Integer p new ArrayList and List Integer p new ArrayList Integer . You said After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense. . . Why it does not make any sense when way 2 is allowed in java-6 . .. . Answer : There is no difference if you are using java-7 prefer the second method but is it not available in java-6 . It is a new addition http : docs.oracle.com javase 7 docs technotes guides language type-inference-generic-instance-creation.html to java-7 . Comment : I know in java-7 send way is recommended . But my question is in context of java 6.Which one is preferrable See my update .", "Question : I java-6 i can declare the arraylist as follows .. . .. . I prefer to use way 3 as its brief . Is there any difference between these ways Which one we should prefer and why Update : - I know in java-7 second way is recommended but my question is in context of java-6 . Which one is preferable To me way 3 also says p is an arraylist of integers same conveyed by way1 . So I find no difference except the fact IDE displays warning message : .. . .. . ArrayList is a raw type . References to generic type ArrayList E should be parameterized Comment : Note that the info in the diamond-operator tag already answers your question . Just hover your mouse over this tag and read the first sentence of its description : The diamond-operator was introduced in Java SE 7 Comment : Actually i meant generics on right hand side . see my update Comment : what part of this is available since Java 7 regarding diamond-operator you still don t understand It s like using generics in Java 1.4 or prior : it didn t exist so you can t use it there . Comment : After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense.. . Comment : Thats what i am trying to understand whats the difference btw List Integer p new ArrayList and List Integer p new ArrayList Integer . You said After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense. . . Why it does not make any sense when way 2 is allowed in java-6 . .. . Answer : Both are same .But there are version difference in both of this . But second way is not possible in java 6.In Java 7 if we not declare type in right side then by default it will take same type as left side . http : docs.oracle.com javase 7 docs technotes guides language type-inference-generic-instance-creation.html .. . .. . So as per your updates if you have to use Java 6 then you should use way1 .", "Question : I java-6 i can declare the arraylist as follows .. . .. . I prefer to use way 3 as its brief . Is there any difference between these ways Which one we should prefer and why Update : - I know in java-7 second way is recommended but my question is in context of java-6 . Which one is preferable To me way 3 also says p is an arraylist of integers same conveyed by way1 . So I find no difference except the fact IDE displays warning message : .. . .. . ArrayList is a raw type . References to generic type ArrayList E should be parameterized Comment : Note that the info in the diamond-operator tag already answers your question . Just hover your mouse over this tag and read the first sentence of its description : The diamond-operator was introduced in Java SE 7 Comment : Actually i meant generics on right hand side . see my update Comment : what part of this is available since Java 7 regarding diamond-operator you still don t understand It s like using generics in Java 1.4 or prior : it didn t exist so you can t use it there . Comment : After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense.. . Comment : Thats what i am trying to understand whats the difference btw List Integer p new ArrayList and List Integer p new ArrayList Integer . You said After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense. . . Why it does not make any sense when way 2 is allowed in java-6 . .. . Answer : The second way is not possible in Java 6 . It is the new way of inferring Generic instance in Java 7 . Comment : it was typo mistake corrected it .", "Question : I java-6 i can declare the arraylist as follows .. . .. . I prefer to use way 3 as its brief . Is there any difference between these ways Which one we should prefer and why Update : - I know in java-7 second way is recommended but my question is in context of java-6 . Which one is preferable To me way 3 also says p is an arraylist of integers same conveyed by way1 . So I find no difference except the fact IDE displays warning message : .. . .. . ArrayList is a raw type . References to generic type ArrayList E should be parameterized Comment : Note that the info in the diamond-operator tag already answers your question . Just hover your mouse over this tag and read the first sentence of its description : The diamond-operator was introduced in Java SE 7 Comment : Actually i meant generics on right hand side . see my update Comment : what part of this is available since Java 7 regarding diamond-operator you still don t understand It s like using generics in Java 1.4 or prior : it didn t exist so you can t use it there . Comment : After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense.. . Comment : Thats what i am trying to understand whats the difference btw List Integer p new ArrayList and List Integer p new ArrayList Integer . You said After your edit in Way2 now you re initializing a List Integer with a raw ArrayList which has no sense. . . Why it does not make any sense when way 2 is allowed in java-6 . .. . Answer : Both are same but way2 http : docs.oracle.com javase 7 docs technotes guides language type-inference-generic-instance-creation.html is available from java-7", "Question : The diamond-operator in java-7 allows code like the following : .. . .. . However in Java 5 6 I can simply write : .. . .. . My understanding of type-erasure is that these are exactly the same . The generic gets removed at runtime anyway . Why bother with the diamond at all What new functionality type safety does it allow If it doesn t yield any new functionality why do they mention it as a feature Is my understanding of this concept flawed Comment : Note that this is not an issue if you use static factory methods since Java does type-inference on method calls . Comment : when you disable warning it s actually useless.. . : like for me Comment : It s been answered but it is also in the Java tutorial around the middle of the page : docs.oracle.com javase tutorial java generics http : docs.oracle.com javase tutorial java generics genTypeInference.html Comment : Nice article about this on dZone https : dzone.com articles java-7-do-we-really-need . Comment : My view of it is that it is syntactic-sugar for List String list new LinkedList Whatever the type on the left is i.e . keeping it generic .. . Answer : The point for diamond-operator is simply to reduce typing of code when declaring generic types . It doesn t have any effect on runtime whatsoever . The only difference if you specify in Java 5 and 6 .. . .. . is that you have to specify @SuppressWarnings unchecked to the list otherwise you will get an unchecked cast warning . My understanding is that diamond-operator is trying to make development easier . It s got nothing to do on runtime execution of generics at all .", "Question : This question already has an answer here : .. . .. . What is the concept of erasure in generics in Java questions 313584 what-is-the-concept-of-erasure-in-generics-in-java 8 answers .. . What is a raw type and why shouldn t we use it questions 2770321 what-is-a-raw-type-and-why-shouldnt-we-use-it 12 answers .. . .. . Scenario : A method addList in class expects a List of Integer objects . main method sends an ArrayList argument containing objects of multiple types not just Integer . Result : Call to method addList is successful and it is also possible to retrieve the objects stored in the ArrayList and print them . Question : Should not we expect that on run-time when the list is received in the called method its content will be validated and it will result in some exception However in addList method if I am trying to insert a non- Integer object in the ArrayList it fails at compile-time only . Does this conclude that Diamond operator constraint is only while inserting the objects in a Collection .. . .. . Please note erasure-in-generics http : stackoverflow.com questions 313584 what-is-the-concept-of-erasure-in-generics-in-java is different question and doesn t provide answer to this question . .. . Answer : ok if you are talking about that diamond-operator it is called as generics .. . .. . Generics are evaluated at compile-time and not at run time .. . .. . why generics the only reason is generics provide type safety consider following example .. . .. . Why we Actually need generics So that our content can t be mutated like you do not want to add or mix salt to sugar and here you cannot add any other type of object and so becomes easy to access and process like its easy to access one type of objects . eg . What that diamond shaped operator does It provides type safety at compile-time like helps to stop while adding salt to sugar like .. . .. . Why it doesn t supports int float char but only wrapper class Because java revolves around objects only and we all know int float and char types do not have object .. . .. . one more thing you will notice extends super SomeType whats that .. . .. . Its simple inheritance and polymorphism . Why your code is not checking for one particular type .. . .. . its because you haven t bounded your code to any type and thus you can add any object to collection .. . .. . Edit 1 : Your code is not failing its working perfectly .. . .. . Edit : .. . .. . What represents represents Object class when used as Type means you cannot add anything but objects of Object class only .", "Question : The diamond-operator in java-7 allows code like the following : .. . .. . However in Java 5 6 I can simply write : .. . .. . My understanding of type-erasure is that these are exactly the same . The generic gets removed at runtime anyway . Why bother with the diamond at all What new functionality type safety does it allow If it doesn t yield any new functionality why do they mention it as a feature Is my understanding of this concept flawed Comment : Note that this is not an issue if you use static factory methods since Java does type-inference on method calls . Comment : when you disable warning it s actually useless.. . : like for me Comment : It s been answered but it is also in the Java tutorial around the middle of the page : docs.oracle.com javase tutorial java generics http : docs.oracle.com javase tutorial java generics genTypeInference.html Comment : Nice article about this on dZone https : dzone.com articles java-7-do-we-really-need . Comment : My view of it is that it is syntactic-sugar for List String list new LinkedList Whatever the type on the left is i.e . keeping it generic .. . Answer : Your understanding is slightly flawed . The diamond-operator is a nice feature as you don t have to repeat yourself . It makes sense to define the type once when you declare the type but just doesn t make sense to define it again on the right side . The DRY principle . Now to explain all the fuzz about defining types . You are right that the type is removed at runtime but once you want to retrieve something out of a List with type definition you get it back as the type you ve defined when declaring the list otherwise it would lose all specific features and have only the Object features except when you d cast the retrieved object to it s original type which can sometimes be very tricky and result in a ClassCastException . Using List String list new LinkedList will get you rawtype warnings . Comment : List String list new LinkedList is the correct code . You know this and I know this too . And the question as I understand it is : why only java compiler doesn t understand that this code is quite secure Comment : @Roman : List String list new LinkedList is not the correct code . Sure it would be nice if it were And it probably could have been if Java had generics from the beginning and didn t have to deal with backwards compatibility of generic types that used to be non-generic but it does . Comment : @ColinD Java really needn t to deal with backwards compatibility in each single line . In any Java source file using generics the old non-generic types should be forbidden you can always use if interfacing to legacy code and the useless diamond-operator should not exist ." ] }
[ "yes-answer-long", "yes-answer-short" ]
perl
UNK_RELATION
c++builder-xe2@visual-c++@65
c++ builder-xe2 -- the august 2011 version of c++ builder a rapid @placeholder development-environment .
{ "confidence": [ 60.10184097290039, 55.09773635864258, 53.73609924316406, 49.37818908691406, 49.37818908691406, 47.28984069824219, 44.9373664855957, 44.4896240234375, 42.23861312866211, 41.88044357299805, 41.587223052978516, 41.308067321777344, 41.308067321777344, 41.308067321777344, 41.308067321777344, 39.95404815673828, 39.95404815673828, 39.95404815673828, 39.88614273071289, 39.88614273071289, 38.955596923828125, 38.955596923828125, 38.955596923828125, 38.955596923828125, 38.86491775512695, 38.51476287841797, 38.290679931640625, 38.1612663269043, 37.64710235595703, 37.64710235595703, 37.64710235595703, 37.60157775878906, 37.022315979003906, 36.85948181152344, 36.85948181152344, 36.85948181152344, 36.85948181152344, 36.36979675292969, 35.552120208740234, 34.95219802856445, 34.69654846191406, 34.50700759887695, 34.50700759887695, 34.50700759887695, 33.8033561706543, 33.54668426513672, 32.86024475097656, 32.69110870361328, 32.69110870361328, 32.69110870361328, 32.69110870361328, 32.69110870361328, 32.69110870361328, 32.69110870361328, 31.89133644104004, 30.78356170654297, 30.338638305664062, 30.338638305664062, 30.338638305664062, 30.338638305664062, 30.123111724853516, 29.094867706298828, 28.58671760559082, 27.78750991821289, 27.78750991821289, 27.282621383666992, 27.282621383666992, 26.941286087036133, 26.394248962402344, 26.097820281982422, 25.654216766357422, 25.654216766357422, 25.654216766357422, 25.138126373291016, 24.93014907836914, 24.660343170166016, 24.660343170166016, 23.99390411376953, 23.506128311157227, 23.46641731262207, 23.46641731262207, 23.314090728759766, 23.314090728759766, 23.314090728759766, 23.02299690246582, 22.861106872558594, 22.568052291870117, 21.68172836303711, 21.641433715820312, 21.61414337158203, 21.500690460205078, 21.500690460205078, 21.460979461669922, 21.460979461669922, 20.972291946411133, 20.603233337402344, 20.390853881835938, 19.969758987426758, 19.969758987426758 ], "content": [ "Environment used is c++ builder xe2", "Using C++ Builder XE2 .", "I m using c++ Builder XE2 Rad Studio for this .", "I m using RAD Studio C++ Builder XE2 .", "There should be such constructor in C++ Builder at least after xe2 .", "I am prototyping a user-interface using C++Builder XE2 .", "I m using XE2 Rad Studio C++ Builder and the VCL GUI .", "Better use common c++builder http : stackoverflow.com questions tagged c 2b 2bbuilder tag along with the specific version c++builder-xe2 http : stackoverflow.com questions tagged c 2b 2bbuilder-xe2 tag to pay more attention -", "As there is no document about installation with C++ builder .", "A static version was added in Delphi 7 during the time when C++Builder was dead so it did not appear in C++ until C++Builder was resurrected in 2006 and anonymous procedure support was added in Delphi C++Builder 2009 .", "These are from C++ Builder XE3", "TScrollBox in C++Builder XE2 natively supports vertical-scrolling via a mouse wheel .", "Does anyone know how to read a DTD XML document with C++ Builder XE2", "I have 32-bit program written in c++ builder xe2 which have dynamicly linked bpl files .", "I am using C++ Builder XE2 but a Delphi solution would probably work for me .", "Its implementation for C++ has stoped in builder 6", "I am using C++ Builder XE3 .", "Maybe some C++ Builder project setting", "C++ Builder is an IDE not a class-library .", "Is there a way to do this in C++ Builder 2009", "I m currently trying to port an old owl-c++-builder-projekt to use XE2 and owlnext .", "It seems like C++ Builder XE2 doesn t support compressed 256x256 icons have not found this confirmed anywhere .", "I m new to COM libraries and I m stuck on using a COM DLL in my C++ Builder XE2 application .", "I added the flag largeaddressaware in BUilder XE2 under C++ linker Output Flags", "You would have to use profiling tools that support C++Builder such as AQTime .", "I try to describe it on two examples : .. . .. . 1.Today I converted one project from C++ Builder 6 to C++ Builder XE4 .", "The GUI was made in C++ Builder XE2 and I would like to import the generated DLL from VS C++ 2012 but I was not able to import it correctly .", "Embarcadaro C++ Xe2 Oracle 10g .", "I d like to ask you why do I need to call class operator directly in this situation : .. . .. . I m using Borland s C++ Builder XE2 .", "There is an example in Delphie here http : docwiki.embarcadero.com CodeExamples XE2 en Generics Collections TObjectStack 28Delphi 29 but I need help to translate it to C++ builder .", "2.I added to VCL project written in C++ Builder XE2 some files from JCL JEDI Code Library project .", "However in C++ Builder String is regarded as UnicodeString in default .", "If you want just to build the application with C++ Builder then you can do so by upgrading to OWLNext - it is an open-source upgrade for the OWL framework and works with the modern compilers like C++ Builder and Visual C++ .", "Nonetheless please restrict this question to asking how to install Boost.Log in C++ Builder .", "To be able to build the application with C++ Builder or to use VCL instead of OWL", "I work almost two years on various projects written in C++ Builder .", "Does C++ Builder linker support function-level linking", "I just thought if C++ Builder has some analogy to initialization and finalization blocks in Delphi .", "Currently I m using embarcadero c XE2 RAD Studio s C++ Builder which works with VCL and generates for every form a .dfm file a .h file and a .cpp file .", "I see this with C++Builder XE through XE3 .", "@keith : This project is not being written in Visual Studio it is being written in C++Builder instead .", "I have a resource script in my C++ Builder project .", "I need a method to run on the main thread in C++ Builder 2009 .", "Now I receive the following problem from the C++ Builder project :", "The application is made in C++ in Embarcadero XE2 .", "in my project i am using CImg library after image-processing i want to show my image result in a TBitmap in C++ Builder XE2 please someone tell me how to do that .", "I tried to use numerical-recipes version 3 http : www.nr.com codefile.php nr3 within my c++ project using c++ Builder from RAD XE 2 .", "Is there any way to make it scroll faster or maybe even better way of handling scrolling in c++ builder", "All examples I have seen out there are in Delphi and I m having dificulties to trasnlate these to C++ Builder .", "This is a FAQ for example How create an standalone without dll dependencies c++ builder console app like a delphi app", "There is no mention of C++ Builder in the list of supported compilers except that versions later than 5.5.1 might or might not work .", "Anyone who uses C++Builder will be able to recognize it but if people using Delphi only see the tag-it s meaningless .", "C++Builder only shipped with a limited subset of boost because those that didn t ship we re too problematic for people to use .", "C++Builder does not have any native functionality that wraps resource dialogs in classes .", "I am working on a larger c++ program using embarcadero s RAD XE2 .", "Edit : .. . .. . Can anyone help me on how to import that DLL generated by the above source code from Visual Studio C++ CLI into C++ Builder", "Ever since Embarcadero took over C++ Builder the quality has been on a steady down slope.. .", "I designed two forms in c++ builder : .. . .. . TfrmMain .. . TfrmChooseName .. . .. . In TfrmMain class I have button named btnNext .", "I am using C++ Builder XE3 and I have met a weird problem with AnsiString .", "Well I m close to abandon about twelve years of delphi and c++ builder due Embarcadero .", "Especially in C++Builder which cannot filter out unused RTL VCL code as well as Delphi can especially the Enhanced RTTI in particular but also Delphi Generics are not very well optimized yet compared to C++ templates .", "I use C++Builder XE2 and it doesn t support scrolling the TScrollBox natively so I use your approach but just the OnMouseWheel event scrolling down if WheelDelta is lower than 0 and scrolling up if it is higher than 0 .", "A simple sample code with BCB will be very appreciated as there are some samples with VC++ but my project is on C++ XE2 .", "On the other hand Logog does not natively support C++Builder so how are you passing AnsiString values to funcA which function are you actually calling", "I unsterstood that I need to use some utilities from the C++ Builder to convert the DLL generated by the Visual Studio into the Borland DLL format .", "http : stackoverflow.com questions 7787267 how-create-an-standalone-without-dll-dependencies-c-builder-console-app-like .. . .. . you must turn off two things .", "I am trying to display a FireMonkey form on a second monitor using C++Builder with following code : .. . .. . Unfortunately the Screen object does not have the Monitors property so how can do this in FireMonkey", "Version of Firebird used is 2.5.1 SuperServer from October 2011 .", "There is a way to use it in cbuilder XE2", "C C++ is a strongly typed language .", "I know there is Boost library in XE2 .", "Thanks that worked fine in XE2 as well", "This is a bug in XE2 or I m missing something", "If I close C++Builder and reopen it then force it to rebuild either by doing a rebuild all or making a minor change it compiles and runs fine .", "So TThread : : Synchronize both static and non-static versions most definitely exists in C++Builder 2009 which you can verify if you look at the declaration of the TThread class in Classes.hpp .", "XE2 introduced a native solution to this exact problem .", "It compiles in Embarcadero XE2 but goes back many years .", "C macros don t recurse .", "I was measuring the time with std : : clock since AQtime in XE2 is often crashing the IDE.. .", "The VCL headers have pragma statements to deal with the A W mapping issue in C++ .", "However I also want to use C++-Builder s VCL designer .", "I have a number of forms that are launched via COM in a XE2 DLL .", "To any actual XE2 users out there : what is the canonical way of doing this", "I haven t used XE2 yet still using RAD studio 2010 .", "It surely has more a c-feeling to it than a c++ but it s easier to rewrite and understand in my opinion .", "Reading http : docwiki.embarcadero.com Libraries XE2 en System.Classes.TThread.Synchronize it looks like they added the Synchronize functionality in XE2 .", "Chances are the BPL projects are not set to emit C++ files .", "The documentation here docwiki.embarcadero.com RADStudio XE2 en http : docwiki.embarcadero.com RADStudio XE2 en ILINK32.EXE the Incremental Linker tells you what to do .", "Working solution in C++ below .", "This is an older Builder AnsiString reference 1997 http : bcbjournal.org articles vol1 9708 An AnsiString class reference.htm that provides information about some of the constructors and conversions possible .", "In XE2 the Winapi : : Shlobj : : BROWSEINFO structure always maps to : : BROWSEINFOW regardless of the TCHAR setting .", "++ Embarcadero RAD Studio XE2 .. . .. . I need connect to a : : 6100 with TIdTCPClient through http-proxy .", "At work we have a rather large C++ VCL forms application .", "But if I write at the beginning of my c++ project .. . .. . .. . it gives me this error .", "You can also use OWLNext for a gradual migration to VCL - as VCL and OWL can co-exist in the same application so you can migrate your old OWL application to C++ Builder write any new UI in VCL and gradually rewrite the old UI in VCL - it might be easier and safer than rewriting the whole application with VCL .", "When I think on it restarting builder seemed to make it do a full link too .", "XE2 introduced a native solution to this very problem : there is a global bool variable named MSXML6 ProhibitDTD http : docwiki.embarcadero.com Libraries en Xml.Win.msxmldom.MSXML6 ProhibitDTD declared in Xml.Win.msxmldom.hpp .", "Open the project properties for each one and in the linker output set it to emit all C++ files .lib .hpp etc .", "If on the other hand they provide the source you can usually just rebuild them with the right settings to generate the files needed for c++ ." ] }
{ "confidence": [ 50.940879821777344, 50.906917572021484, 45.7653923034668, 45.33313751220703, 45.10868453979492, 45.10670471191406, 44.335147857666016, 43.19253921508789, 42.29741668701172, 42.0259895324707, 41.634117126464844, 41.126914978027344, 40.858863830566406, 40.64055633544922, 39.94573974609375, 39.69802474975586, 39.572044372558594, 39.572044372558594, 38.97855758666992, 38.44470977783203 ], "content": [ "Question : I have installed graphics32 1.9.1 1581 compiled and added the GR32 DSGN RSXE2 package . But it has no .h files and your components and components folders are visible only in Delphi projects . Its implementation for C++ has stoped in builder 6 There is a way to use it in cbuilder XE2 There is a substitute for Comment : Better use common c++builder http : stackoverflow.com questions tagged c 2b 2bbuilder tag along with the specific version c++builder-xe2 http : stackoverflow.com questions tagged c 2b 2bbuilder-xe2 tag to pay more attention - Comment : GR32 works up to XE4 that I ve tested so you should be fine . Chances are the BPL projects are not set to emit C++ files . Open the project properties for each one and in the linker output set it to emit all C++ files .lib .hpp etc . .. . Answer : If you only get the packages and not the full source then you are out of luck . If on the other hand they provide the source you can usually just rebuild them with the right settings to generate the files needed for c++ .", "Question : I need a method to run on the main thread in C++ Builder 2009 . Reading http : docwiki.embarcadero.com Libraries XE2 en System.Classes.TThread.Synchronize it looks like they added the Synchronize functionality in XE2 . Is there a way to do this in C++ Builder 2009 .. . Answer : it looks like they added the Synchronize functionality in XE2 .. . .. . I do not know where you got that idea from but TThread : : Synchronize has existed in the RTL as long as TThread itself has existed . Originally Synchronize was a non- static method so you could only call it from a live TThread object . A static version was added in Delphi 7 during the time when C++Builder was dead so it did not appear in C++ until C++Builder was resurrected in 2006 and anonymous procedure support was added in Delphi C++Builder 2009 . So TThread : : Synchronize both static and non-static versions most definitely exists in C++Builder 2009 which you can verify if you look at the declaration of the TThread class in Classes.hpp .", "Question : I am prototyping a user-interface using C++Builder XE2 . I need this project to run on all Windows PCs whether they have developer tools installed or not . How can I get all the required libraries to be linked into the .exe that I distribute to users so they can run the application What settings in Project Options should be set Users now report me this error : .. . .. . enter image description here http : i.stack.imgur.com ZDE0i.png .. . Answer : This is a FAQ for example How create an standalone without dll dependencies c++ builder console app like a delphi app http : stackoverflow.com questions 7787267 how-create-an-standalone-without-dll-dependencies-c-builder-console-app-like .. . .. . you must turn off two things . Use runtime packages and link with runtime libraries .", "Question : I was looking for an option to make mouse wheel work with scrollbox component so far I got this .. . .. . So far it works but it scrolls really slow . Is there any way to make it scroll faster or maybe even better way of handling scrolling in c++ builder .. . Answer : I use C++Builder XE2 and it doesn t support scrolling the TScrollBox natively so I use your approach but just the OnMouseWheel event scrolling down if WheelDelta is lower than 0 and scrolling up if it is higher than 0 . About the scrolling speed can t you just add subtract a higher constant to the Position variable Like in :", "Question : null .. . Answer : I want to display a customized item basically a colored table with variable column number and width . I m using c++ Builder XE2 Rad Studio for this . So I created a new class inherting from TGraphicControl overwriting void fastcall Paint void . The Problem : it takes quite some time between 15 and 30 ms to draw 12 colored rectangles with text so I expect to have done something wrong . I suspect ShadowRect to do things one could implement better but I m not really sure.. . Does anyone see my mistake here Code to Draw the Paint Event : Comment : Using the profiling tools that come free in Visual Studio 2015 should tell you which part of paint is running hot then come back with that info if you are still stuck . Comment : @keith : This project is not being written in Visual Studio it is being written in C++Builder instead . VS s profiling tools will not be much help . You would have to use profiling tools that support C++Builder such as AQTime . Comment : @Julian : not related to your issue but Canvas- TextOutA should be Canvas- TextOut instead . The VCL headers have pragma statements to deal with the A W mapping issue in C++ . Also the pos and text parameters of ShadowRect parameters should be const TRect and const String instead of const TRect and const String . Also ResetCanvasTools is redundant and should be removed since Paint and ShadowRect set the property values they need . There is no point in wasting effort resetting properties to default values just to change them again afterwards . Comment : @RemyLebeau Thanks for your help Sometimes I forget that passing parameters as values is creating copies using the parameter type s constructors.. . After removing the reset and using references this is drawn much faster . I have 16 of those items on my form and it takes around 100ms now to draw all of them . I was measuring the time with std : : clock since AQtime in XE2 is often crashing the IDE.. .", "Question : I know there is Boost library in XE2 . And currently I want to add Boost Log http : boost-log.sourceforge.net libs log doc html log tutorial.html . As there is no document about installation with C++ builder . I just copy the relative files into boost and libs folders C : Program Files Embarcadero RAD Studio 9.0 include boost 1 39 . And after I added the include boost log trivial.hpp . I saw tons of errors.. . .. . .. . Is there any tutorial or sample to show how to install Boost Log that I can follow Comment : There is no mention of C++ Builder in the list of supported compilers except that versions later than 5.5.1 might or might not work . The Boost version you have is 12 releases behind the current Boost release . Nonetheless please restrict this question to asking how to install Boost.Log in C++ Builder . Don t ask for alternative log libraries because it will detract from the main question of how to install . Ask about other libraries in a separate question . Comment : Removed the delphi tag . Even though Delphi is part of RAD Studio it can t possibly use Boost Log which is C++ only and so there s no way this question concerns Delphi . Anyone who uses C++Builder will be able to recognize it but if people using Delphi only see the tag-it s meaningless . Comment : Thanks for replies . I have edited my original question . .. . Answer : C++Builder only shipped with a limited subset of boost because those that didn t ship we re too problematic for people to use . Many of them won t compile or fail at runtime . I have high hopes for the upcoming clang-based compiler which has must better language compliance . Comment : Got it Thanks for reply", "Question : I work almost two years on various projects written in C++ Builder . During this time I noticed a few things related to size of resulting executable . I try to describe it on two examples : .. . .. . 1.Today I converted one project from C++ Builder 6 to C++ Builder XE4 . Here is the comparison of DLL sizes : .. . .. . Both binaries are compiled as release with static linking of additional libraries . No source code changes between these two versions except changing the global variable defining the library version and executable properties containing product info version description company and so on . 2.I added to VCL project written in C++ Builder XE2 some files from JCL JEDI Code Library project . No object from JCL is created in my code so I would think the linker shouldnt link the new methods even when they are part of code . Nevertheless the binary size increased from 17 900 000 to 19 300 000 . I don t have exact numbers because there were also other minor changes . Small part of this increase could be attributed to linking resource file JclUnicode.res which is 170 kB large . Nevertheless this is consistent with my long-term experience that when adding some external component to project the resulting change in binary size is not appropriate if we compare it with new functions for end-user . I have suspicion that there are large part of code in resulting binary that are never called . Unfortunately I don t know how to verify this hypothesis . Is there some tool that could analyse the resulting binary for never used code data Does C++ Builder linker support function-level linking This is a very practical issue if we take into consideration time needed for reading the executable from hard-drive to memory and size of RAM memory occuppied by program . My colleague who is developping embedded software said me a story how by removing never called functions from firmware reduced its size by 80 . .. . Answer : There have been numerous discussions on Embarcadero s forums https : forums.embarcadero.com related to the increase of executable file sizes in various versions . There have been substantial changes to the RTL VCL between BCB6 and XE4 . The switch to Unicode the introduction of Delphi Generics and Extended RTTI etc . They all contribute to file size . Especially in C++Builder which cannot filter out unused RTL VCL code as well as Delphi can especially the Enhanced RTTI in particular but also Delphi Generics are not very well optimized yet compared to C++ templates .", "Question : I have a number of forms that are launched via COM in a XE2 DLL . The caller is a VC 6 application . Every form that opens up shows up as an application in TaskManager I don t want that these windows are just dialog boxes not applications . Is there a setting I can use to not have these windows show I am using C++ Builder XE2 but a Delphi solution would probably work for me . .. . Answer : TaskManager shows top-level unowned windows . Your DLL windows do not have any owner windows specified . That is why they appear .", "Question : in my project i am using CImg library after image-processing i want to show my image result in a TBitmap in C++ Builder XE2 please someone tell me how to do that . Thanks . .. . Answer : You can write a processed image to a file using CImg .save bmp then open it with TFileStream and then load it with TBitmap.LoadFromStream . As an alternative you can create a memory mapped file or a name pipe then transform HANDLE to FILE .. . .. . and pass it to CImg .save bmp FILE and then load bitmap using THandleStream and TBitmap.LoadFromStream .", "Question : I m new in c++ and have problem with converting UnicodeString to string so now searching for easiest method to convert from one type to other . I want to use basic windows function which needs string with UnicodeString how to make code work Environment used is c++ builder xe2 Comment : WideCharToMultiByte http : msdn.microsoft.com en-us library windows desktop dd374130 v vs.85 .aspx is probably what you re looking for . Read carefully . It is fairly straight-forward . Comment : wstring convert isn t bad en.cppreference.com w cpp locale wstring convert http : en.cppreference.com w cpp locale wstring convert . .. . Answer : If you are looking for complete unicode support in C++ go for ICU API . Here is the website where you can find everything about it . http : site.icu-project.org", "Question : null .. . Answer : I m trying to declare a stack holding double types with the TStack object VCL . There is an example in Delphie here http : docwiki.embarcadero.com CodeExamples XE2 en Generics Collections TObjectStack 28Delphi 29 but I need help to translate it to C++ builder . I tried the following code : .. . .. . But it complains E2040 Declaration terminated incorrectly right after TStack . Comment : Do you need the actual class or can you use std : : stack Comment : Are you including the necessary headers Comment : Which TStack did you get The templated version in Generics.Collections or the non-templated legacy version from Contnrs Comment : concur with @chris . Unless you re married to some home-rolled TStack implementation std : : stack would probably suit you well . Comment : It s explained here : cpptruths.blogspot.co.uk 2005 10 http : cpptruths.blogspot.co.uk 2005 10 why-does-stdstackpop-returns-void.html and it s done that way for good reason", "Question : I am using C++ Builder XE3 and I have met a weird problem with AnsiString . Just look at below code .. . .. . Out of my imagine it works well in the first time however it throws a Bad Format Exception in the second time . And even I just called funcA once with Code 2 the problem remained . Since it makes no difference when I ShowMessage within temp1 or temp2 . I totally can not understand why the two times of call gave me different results . funcA is from a 3rd library with a little bit complicated code . So before I trace the code of this library I think I should know what the difference is with Code1 and Code2 . Thanks . Comment : From what library are the String and AnsiString classes from Comment : These are from C++ Builder XE3 Comment : C++ Builder is an IDE not a class-library . Comment : @Andr Caron this would be VCL .. . Answer : The first thing that came to my mind is that there is not an AnsiString from String constructor so that there is no way to assign a String type to an AnsiString . You do not mention a compiler error so it sounds like the compiler is doing something for you that is the wrong thing . This posting How to convert String to AnsiString http : forums.codeguru.com showthread.php 375155-How-to-convert-String-to-AnsiString provides a way to do so safely . Basically you need to reference the String variables char buffer in the assignment so that the compiler will do the right thing . This is an older Builder AnsiString reference 1997 http : bcbjournal.org articles vol1 9708 An AnsiString class reference.htm that provides information about some of the constructors and conversions possible . Comment : There should be such constructor in C++ Builder at least after xe2 . In fact I can use temp2 AnsiString uTemp2 . However I still get the same exception . Comment : @Willy did you try the method specified in the posting Comment : I have read the posting . However in C++ Builder String is regarded as UnicodeString in default . I think they are different cases . Comment : This answer is about std : : string the question is about a VCL String", "Question : I have a resource script in my C++ Builder project . It has been the same for the last 6 years and never complained in compile . Today suddenly I get resource.rc 4 : Allocate failed everytime I try to compile . I have tried to reastart and do a clean . Still the same error . This is my resource script : .. . .. . It fails on the first item IDI APPLICATION.ico and if I remove it it compiles . This is strange because it has not been changed in 6 years and now suddenly it will not compile . This particular icon file s size is 201KB the other two are 158KB each and the 3 cursors are 8KB each . When you add all upp it looks like it passes the magical boundary 512KB but hey a resource section can be much larger than that .. . Answer : I found out what the problem was . It seems like C++ Builder XE2 doesn t support compressed 256x256 icons have not found this confirmed anywhere . When I regenerated the icons without compression it compiles again . I have no idea why this suddenly happen but I m not surprised . Ever since Embarcadero took over C++ Builder the quality has been on a steady down slope.. .", "Question : I was looking for an option to make mouse wheel work with scrollbox component so far I got this .. . .. . So far it works but it scrolls really slow . Is there any way to make it scroll faster or maybe even better way of handling scrolling in c++ builder .. . Answer : TScrollBox in C++Builder XE2 natively supports vertical-scrolling via a mouse wheel . You do not need to do anything extra to enable that behavior . I just tested it it works fine . Comment : just came to say that mark this a correct . Also tested in XE3 Comment : I don t know it doesn t work for me I placed in groupbox oversize it for scroll bar to appear and nothing it doesn t work.Do you think it might have something to do with the fact that it s under Virtualbox Comment : Interesting : I did my original test in XE3 now in XE7 I cannot get the scroll wheel to work . This is a bog standard TScrollBox with a TPaint box in it .", "Question : null .. . Answer : I created a project using C++ CLI in Visual Studio 2012 . The GUI was made in C++ Builder XE2 and I would like to import the generated DLL from VS C++ 2012 but I was not able to import it correctly . Unfortunately when I run the code after I use the LoadLibrary function the variable load is NULL . Any help I unsterstood that I need to use some utilities from the C++ Builder to convert the DLL generated by the Visual Studio into the Borland DLL format . Edit : .. . .. . Can anyone help me on how to import that DLL generated by the above source code from Visual Studio C++ CLI into C++ Builder Edit2 I did a release build and I copied the DLL project also other DLL files I use OpenCV . Now I receive the following problem from the C++ Builder project : Comment : And what does GetLastError return Comment : When I call GetLastError nothing happens.. . Comment : What do you mean nothing happens What is the return-value of GetLastError msdn.microsoft.com en-us library windows desktop http : msdn.microsoft.com en-us library windows desktop ms684175 28v vs.85 29.aspx Please read the Return Value section of that link . You re obviously not following the instructions given when LoadLibrary returns NULL . Comment : I wrote the following code int error GetLastError and error 126 Comment : A failure of LoadLibrary has nothing to do with converting a DLL . You seem to think that LoadLibrary does something more than simply attempt to load a DLL into memory . It could be something as simple as the DLL not being found .", "Question : I have a number of forms that are launched via COM in a XE2 DLL . The caller is a VC 6 application . Every form that opens up shows up as an application in TaskManager I don t want that these windows are just dialog boxes not applications . Is there a setting I can use to not have these windows show I am using C++ Builder XE2 but a Delphi solution would probably work for me . .. . Answer : Set TForm.BorderStyle to bsToolWindow or bsSizeToolWin . That would cause WS EX TOOLWINDOW http : msdn.microsoft.com en-us library 61fe4bte.aspx included in Win32 window styles . Or you can manually set those if you override CreateParams http : docwiki.embarcadero.com Libraries en Vcl.Controls.TWinControl.CreateParams method . I also think WS POPUPWINDOW http : msdn.microsoft.com en-us library windows desktop ms632600.aspx is to be set in CreateParams it s description suggests it . Last but not least i d try to pass main window handle https : www.google.ru search client opera rls ru q mfc+hwnd sourceid opera ie utf-8 oe utf-8 channel suggest from C++ application then assign it as parent hwnd http : docwiki.embarcadero.com Libraries en Vcl.Controls.TWinControl.ParentWindow to your dialog windows if those windows are not modal .", "Question : When I try to read an XML document eagle file with an DTD I get the error : .. . .. . Project xx raised exception class EDOMParserError with message DTD is prohibited .. . .. . The XML header looks like this : .. . .. . If I remove the second line.. . .. . .. . ...everything works fine . After some googling it seems like the MSXML parser have an option called prohibitDTD set to true by default in earlier versions it was false . However it seems not possible to set this option to false from the TXMLDocument class . One solution seems to be a recompile of the .pas library or to create the interface on my own with CoCreateInstance . All examples I have seen out there are in Delphi and I m having dificulties to trasnlate these to C++ Builder . Does anyone know how to read a DTD XML document with C++ Builder XE2 My example code.. . Thank you.. . .. . Answer : XE2 introduced a native solution to this very problem : there is a global bool variable named MSXML6 ProhibitDTD http : docwiki.embarcadero.com Libraries en Xml.Win.msxmldom.MSXML6 ProhibitDTD declared in Xml.Win.msxmldom.hpp . You can set it to false before loading data into TXMLDocument : .. . .. . On a side note : it is generally not a good idea to create TXMLDocument instances dynamically like this . It is better to use the IXMLDocument interface instead : Comment : Thank you it works like a charm Strange that this very piece of information should be so hard to find.. . Why is IXMLDocument better than TXMLDocument As I understood IXMLDocument is a part of TXMLDocument . Comment : TXMLDocument implements the IXMLDocument interface so it has the same functionality . However if you dynamically instantiate TXMLDocument with a NULL Owner which you should do when creating short-lived XML objects it acts as a reference-counted object . This is documented behavior . It is not safe to assign a dynamic instance of TXMLDocument to a TXMLDocument variable unless it has an Owner assigned . Otherwise you have to assign it to a di IXMLDocument variable instead to maintain the reference count correctly . Comment : Thank you for the explanation . In my case the dynamic instance of TXMLDocument always have an owner and lives through the whole application . I have earlier project code working with TXMLDocument so I use it out of convenience to reuse the old code .", "Question : When I try to read an XML document eagle file with an DTD I get the error : .. . .. . Project xx raised exception class EDOMParserError with message DTD is prohibited .. . .. . The XML header looks like this : .. . .. . If I remove the second line.. . .. . .. . ...everything works fine . After some googling it seems like the MSXML parser have an option called prohibitDTD set to true by default in earlier versions it was false . However it seems not possible to set this option to false from the TXMLDocument class . One solution seems to be a recompile of the .pas library or to create the interface on my own with CoCreateInstance . All examples I have seen out there are in Delphi and I m having dificulties to trasnlate these to C++ Builder . Does anyone know how to read a DTD XML document with C++ Builder XE2 My example code.. . Thank you.. . .. . Answer : You need to copy MSXMLDOM.pas into your project folder and modify it in order to fix this issue . Change the implementation of function TMSDOMDocument.GetMSDocument to the following and then rebuild your project . Note you have to use IXMLDOMDocument2.setProperty instead of accessing ProhibitDTD directly as IXMLDOMDocument2 doesn t publish ProhibitDTD . Note that this will only work if you re not building with runtime packages This solution is from an Embarcadero forums post made by a member of TeamB I remembered reading it and found it in a search of those forums via CodeNewsFast http : codenewsfast.com - search functionality at the EMBT forums hasn t ever worked well and a recent rebuild or reindex or something has made it even worse than before . : - Comment : I am the TeamB member who discussed this workaround in the EMBT forums . This workaround is only needed in XE and earlier . XE2 introduced a native solution to this exact problem . See my answer . Comment : Yeah @Remy . I know . That s why I posted the link-to the search that I got it from so people would know I wasn t taking credit for coming up with the solution . : -", "Question : I m developing an application with a lot of small custom dialogs . These dialogs are e.g . giving choices displaying graphs or offer additional interfaces . Mostly they require very little markup-code and have few child elements . Currently I m using embarcadero c XE2 RAD Studio s C++ Builder which works with VCL and generates for every form a .dfm file a .h file and a .cpp file . Now I would like to keep an overview over the files produced and merge e.g . the .dfm files of multiple small dialogs . maybe even the .cpp and .h too . However I also want to use C++-Builder s VCL designer . Is there a way to merge .dfm files and still have the IDE s designer working as usual Or should I just dynamically generate those dialogs during runtime .. . Answer : You can use legasy TNotebook component Win3.1 page in RAD2007 to simulate many small dialogs in one file it works like page control without tab buttons . Create required number of pages in the component and activate needed page in constructor of the form .", "Question : I d like to ask you why do I need to call class operator directly in this situation : .. . .. . I m using Borland s C++ Builder XE2 . I would also like to ask you in which situations do I need to call class operator directly . .. . Answer : Panels is apparently a pointer and when you use on a pointer it treats it like a pointer to an array and tries to add the offset to the pointer to get a Panels object at the given offset which isn t want you want . You need to dereference the pointer either with Panels- operator 1 or StatusBar- Panels 1 to get to the object and call operator on it which is probably your desired behaviour . Comment : Thank you for your quick explanation : Comment : This bites quite often with Items properties where often you need to write Foo- Items- Items n where the equivalent Delphi code would be simply Foo.Items n ." ] }
[ "yes-answer-long", "yes-answer-short" ]
visual-c++
UNK_RELATION
prettyfaces@url-rewriting@43
prettyfaces -- prettyfaces is the leading @placeholder solution for servlet jsf and java-ee .
{ "confidence": [ 50.42060470581055, 46.32469940185547, 45.11867904663086, 45.02299499511719, 43.21992492675781, 42.6824836730957, 42.4300651550293, 42.331966400146484, 42.331966400146484, 42.13383865356445, 42.06411361694336, 41.61893844604492, 41.57682800292969, 41.34397888183594, 41.23656463623047, 41.20354461669922, 40.83213424682617, 40.00152587890625, 40.00152587890625, 39.98686599731445, 39.93486022949219, 39.82457733154297, 39.608741760253906, 39.608741760253906, 39.55438232421875, 39.295310974121094, 39.27750015258789, 38.616371154785156, 38.43126678466797, 38.36438751220703, 38.36438751220703, 38.307037353515625, 38.307037353515625, 38.041263580322266, 37.278297424316406, 37.278297424316406, 37.278297424316406, 37.278297424316406, 37.278297424316406, 37.273826599121094, 36.844810485839844, 36.844810485839844, 36.28190612792969, 36.168949127197266, 35.976593017578125, 35.976593017578125, 35.976593017578125, 35.976593017578125, 35.976593017578125, 35.976593017578125, 35.976593017578125, 35.976593017578125, 35.75709533691406, 35.207672119140625, 35.207672119140625, 35.207672119140625, 35.207672119140625, 35.18706512451172, 35.175025939941406, 35.040157318115234, 35.040157318115234, 34.99967956542969, 34.604270935058594, 34.44963455200195, 34.121585845947266, 34.121585845947266, 34.121585845947266, 34.121585845947266, 34.121585845947266, 34.121585845947266, 34.121585845947266, 34.121585845947266, 34.121585845947266, 34.121585845947266, 34.121585845947266, 34.119956970214844, 33.956703186035156, 33.53788757324219, 33.53788757324219, 33.53788757324219, 33.30256652832031, 32.819881439208984, 32.819881439208984, 32.819881439208984, 32.819881439208984, 32.819881439208984, 32.592735290527344, 32.592735290527344, 32.592735290527344, 32.538169860839844, 32.43779754638672, 31.88747787475586, 31.88747787475586, 31.838436126708984, 31.73216438293457, 31.73216438293457, 31.568910598754883, 31.150094985961914, 31.150094985961914 ], "content": [ "That however involves JSF and not Prettyfaces .", "With plain JSF there is no need to a filter without using PrettyFaces .", "My jsf project has an url with parameter like : .. . .. . I want to change it .. . .. . I use prettyfaces and there is an example in http : www.ocpsoft.org prettyfaces http : www.ocpsoft.org prettyfaces page .", "Site is based on Spring Webflow with JSF PrettyFaces and Promefaces .", "I m developing a web application using JSF 2 and prettyfaces .", "You can find instructions here : ocpsoft.org prettyfaces http : www.ocpsoft.org prettyfaces", "Not sure if this may confuse PrettyFaces .", "My prettyfaces version is 2.0.12.Final .", "What version of PrettyFaces are you using", "did you also had the same setup jsf prettyfaces", "I use jsf-2.2 prettyfaces-jsf 2-3.3.3 and have pages index.xhtml page .", "As the FAQ says it is necessary to enable any additional filters between PrettyFaces and JSF to listen to Servlet Forwards .", "I use this for the prettyfaces url-mapping : .. . .. . I use : .. . .. . primefaces 5.2 .. . jsf-2.2 mojarra .. . prettyfaces-jsf2-3.3.3 .. . tomcat 8.0 .. . .. .", "So PrettyFaces is handling this correctly .", "Change prettyfaces to JSF 2 compatible version for example prettyfaces-jsf2-3.3.3.jar .. . .. . prettyfaces-jsf12.. . is for JSF 1.2 prettyfaces-jsf2.. . is for JSF 2.x from OCPSoft doc http : www.ocpsoft.org docs prettyfaces 3.3.3 en-US html GettingStarted.html .. . .. . check if it proper defined in your project .", "Found a sufficient solution was posted here on stackoverflow.com before : Fileupload and PrettyFaces and JSF 2.2 http : stackoverflow.com questions 22943066 fileupload-and-prettyfaces-and-jsf-2-2 .. . .. . Not pretty but it works .", "I m working with JSF and PrettyFaces and I need to do the next thing .", "I am doing exactly the same PrettyFaces examples .", "prettyfaces works with other url without parameters .", "If you are using faces-config.xml for configuration use something like this : .. . .. . From the PrettyFaces documentation : .. . .. . Please note that PrettyFaces will automatically use the JSF converter registered for the type of the referenced bean property to convert the path parameter .", "This question already has an answer here : .. . .. . Fileupload and PrettyFaces and JSF 2.2 duplicate questions 22943066 fileupload-and-prettyfaces-and-jsf-2-2 2 answers .. . .. . we re using a Glassfish 4.0 with JSF 2.2 Mojarra 2.2.0 and PrettyFaces 2.0 .", "Yes you should only use the rewrite 2.0.12.Final artifacts including rewrite-config-prettyfaces-2.0.12.Final as documented on the prettyfaces website : ocpsoft.org prettyfaces http : ocpsoft.org prettyfaces", "@Lincoln PrettyFaces version is 2.0.11 Final", "Anyway try to update the Prettyfaces ersion .", "Can i reproduce the FURL with prettyfaces or should i implemented by mysefl like explains in this article .. . .. . I would definitely recommend PrettyFaces http : ocpsoft.com prettyfaces .", "You need to register the PrettyFaces filter in your application s Java configuration : .. . .. . Spring Boot could be improved to auto-configure this filter for you if PrettyFaces is on the classpath .", "This question already has an answer here : .. . .. . Primefaces FileUpload with PrettyFaces and JSF 2.2.3 questions 20492015 primefaces-fileupload-with-prettyfaces-and-jsf-2-2-3 3 answers .. . .. . I ve tried the solution from : Primefaces FileUpload with PrettyFaces and JSF 2.2.3 http : stackoverflow.com questions 20492015 primefaces-fileupload-with-prettyfaces-and-jsf-2-2-3 .. . .. . But it doesn t work for a few files tested under tomcat 7.0.50 .", "However PrettyFaces is not really designed for this level of customization so you might want to use Rewrite what PrettyFaces is written on directly : .. . .. . http : www.ocpsoft.org rewrite section-5 .. . .. . Rewrite pretty much takes the ConfigurationProvider API from PrettyFaces and makes it a first-class API .", "Is there any solution to configure PrettyFaces together with Struts 2 framework", "Don t know how Prettyfaces handles its actions .", "Additionally what version of PrettyFaces are you using", "And PrettyFaces 3.3.3 is also very old .", "Which version of PrettyFaces are you using", "I m using rewrite-servlet-2.0.12.Final.jar and rewrite-config-prettyfaces-2.0.12.Final.jar manually added no maven PrimeFaces 5.1 and Wildfly 8.1 .", "That s why PrettyFaces is forwarding these requests to the home page .", "PrettyFaces maps pretty URLs to internal URLs .", "In your PrettyFaces setup the search term is part of the path .", "The problems began when I implemented PrettyFaces .", "I do not advise using Primefaces + prettyfaces .", "Please see the updated installation instructions here : http : ocpsoft.org prettyfaces .. . .. . Note : PrettyFaces is now an extension of rewrite .", "Have you followed all the steps http : www.ocpsoft.org prettyfaces for the set up", "i think it is a prettyfaces bug but i want to use pretty-urls .", "I would use OCPsoft PrettyFaces or OCPsoft Rewrite for this : .. . .. . With PrettyFaces http : ocpsoft.com prettyfaces : .. . .. . create WEB-INF pretty-config.xml .. . .. . With Rewrite http : ocpsoft.com rewrite : .. . .. . I hope this helps .", "i opened new topic on ocpsoft : ocpsoft.org support prettyfaces-users http : ocpsoft.org support prettyfaces-users prettyfaces-issue-when-using-with-viewparam-converter i want to see your tests and if it is possible i want to send my test project to you .", "I am using PrettyFaces for modifying the URLs .", "PrettyFaces Configuration : .. . .. . And here s my web.xml file", "EDIT : It turns out that the issue is AppEngine and not PrettyFaces .", "Could you include your PrettyFaces configuration please", "Do you use any annotations to configure PrettyFaces or is this it", "You are mixing PrettyFaces and Rewrite in incompatible version .", "Lincoln is founder of OCPsoft the author of PrettyFaces and Rewrite .", "PrettyFaces changes the action attribute to the new pretty-url .", "i m using jsf 2.1 prettyfaces 3.3.3 and hibernate jpa 3.6.7 . i have country page and i m trying to send comment with commandbutton .", "Not sure about PrettyFaces part but stateless views are uhm stateless .", "This is the code menu.xhtml .. . .. . I want te rewrite those urls using prettyfaces .", "The prettyfaces action is probably out of the scope of the current flash state .", "So you are actually running into one of the edge effects of PrettyFaces .", "When using PrettyFaces Rewrite to rewrite URLs in a JSF application and PicketLink to secure it PicketLink does not seem to use the rewriting rules .", "i also have topic on ocpsoft : ocpsoft.org support prettyfaces-users http : ocpsoft.org support prettyfaces-users pretty-urls-turns-ugly-when-i-click-commandbutton-without-immediate-attribute", "I m using PrettyFaces with a path parameter and I have a h : commandButton which does some work and updates the page .", "I think you need rewrite-integration-faces if you are using rewrite-config-prettyfaces .", "I am using : prettyfaces-jsf2-3.3.3.jar + rewrite-servlet-2.0.12.Final.jar + jsf2.2", "According to this question http : stackoverflow.com questions 22245691 jsf-2-2-hinputfile-not-working-with-pretty-faces and this FAQ http : www.ocpsoft.org prettyfaces section-12 it is nessacary to define a filter between JSF and PrettyFaces to get a file-upload working .", "PrettyFaces is a dead simple URL rewriting engine .", "Are you implying that the problem disappears when you remove PrettyFaces", "For some reason PrettyFaces isn t starting up and I don t know why .", "I am New to the Prettyfaces .. . .. . Am I missing anything", "You are mixing different PrettyFaces versions : .. . .. . Update both to 3.3.3 and everything will be fine .", "Good day : .. . .. . I am conducting a search using prettyFaces style gmail .", "The button looks like this : .. . .. . After integrating prettyfaces this button doesn t work anymore .", "Could you try with PrettyFaces 2.0.12 and let us know the result", "The PrettyFaces configuration is cached in a field which JRebel seems to clear for some reason .", "I would bind the path parameters by using PrettyFaces injection as you suggested .", "I m having some problems with PrettyFaces on the pages I use p : fileupload .", "When I disable the PrettyFaces filter on the page everything works just fine .", "I think that somehow PrettyFaces stores some state in the viewscope when using named parameters and JSF does not like it inside a transient view .", "rewrite-config-prettyfaces-2.0.9.Final.jar rewrite-integration-faces-2.0.9.Final.jar rewrite-servlet-2.0.9.Final.jar on JBoss EAP 6.2", "When I use following code .. . .. . From following resource prettyfaces http : www.ocpsoft.org docs prettyfaces 3.3.0 en-US html inbound rewriting.html It makes a redirect I mean it changes URL in browser from foo to bar .", "For your reference this is the bean code for ViewChooserBean.java : .. . .. . After that prettyfaces then attempts to forward to the new view id seSiteProps but the new generated URL is not processed by pretty faces because from the logs : Request is not mapped using PrettyFaces .", "http : ocpsoft.org docs prettyfaces 3.3.3 en-US html outbound rewriting.html .. . .. . The final option would simply to remove the f : metadata and f : viewParam and use the built-in PrettyFaces functionality for managing view parameters instead .", "This question already has an answer here : .. . .. . Fileupload and PrettyFaces and JSF 2.2 duplicate questions 22943066 fileupload-and-prettyfaces-and-jsf-2-2 2 answers .. . .. . I m trying to upload a file to the glassfish application server v4.1 via h : inputfile .", "By default URL rewriters like PrettyFaces should merely forward not redirect .", "You should consider to use Rewrite with the PrettyFaces module instead .", "Have you tried a more recent version of Wildfly or PrettyFaces", "Prettyfaces converts in some way from pretty-urls to normal ones .", "The FAQ http : ocpsoft.org prettyfaces section-12 seems to cover your issue .", "I want to validate my url with prettyfaces and get an HTTP 404 if the object does not exist .", "I spent a lot of time but I can t fix what exacly I do wrong with PrettyFaces configuration .", "I do not use PrettyFaces and I usually only answer from top of head .", "I am using : .. . .. . prettyfaces-jsf2-3.3.3.jar .. . rewrite-servlet-2.0.12.Final.jar .. . JSF 2.2 .. . .. . UPDATE : .. . .. . After so much research I found the problem .", "If you need many custom mappings consider using your own ConfigurationProvider http : www.ocpsoft.org docs prettyfaces 3.3.3 en-US html Extensions.html ConfigurationProvider .", "It should look like this : .. . .. . Next you should use to generate your URLs in your XHTML pages : .. . .. . http : www.ocpsoft.org docs prettyfaces 3.3.3 en-US html outbound rewriting.html jsf .. . .. . Does this answer your question", "This means that PrettyFaces supports all JSF standard converters and converters that have been manually registered to be used for a specific type using the converter-for-class element in the faces-config.xml or the forClass attribute of the @FacesConverter annotation .", "I am trying to setup a dynamic web project with Java Server Faces 2.1.7 PrettyFaces jsf2-3.3.3 Richfaces 4.2.0 and Websphere Application Server 7 .", "That was at the beginning the reason why i d like to hide parameters in browser url .Another idea is this really a bad way to mix JSF navigation with PrettyFaces .", "That kind of page should be only for view move your file-upload form to another regular jsf page without prettyfaces filter", "When I add JARs .. . .. . rewrite-servlet-2.0.12.Final.jar .. . rewrite-config-prettyfaces-2.0.12.Final.jar .. . .. . to childProject Web-INf lib it works fine .", "I noticed that the SecurityFilter from PicketLink seems to come before the RewriteFilter from PrettyFaces Rewrite : .. . .. . So if PrettyFaces is wrapping the HttpServletResponse somehow to override the encodeRedirectUrl the SecurityFilter will not see this wrapped response as it comes before .", "You can do this with either a path parameter http : ocpsoft.org docs prettyfaces 3.3.3 en-US html Configuration.html config.pathparams or a query parameter http : ocpsoft.org docs prettyfaces 3.3.3 en-US html Configuration.html config.queryparams ." ] }
{ "confidence": [ 66.00936126708984, 64.07925415039062, 58.19891357421875, 57.85087585449219, 57.05946350097656, 56.699859619140625, 56.197181701660156, 54.22019958496094, 53.95660400390625, 53.80958557128906, 53.21245193481445, 52.63978576660156, 51.720794677734375, 51.58954620361328, 51.19066619873047, 51.19066619873047, 50.43290710449219, 50.347354888916016, 49.78705596923828, 49.483245849609375 ], "content": [ "Question : According to this question http : stackoverflow.com questions 22245691 jsf-2-2-hinputfile-not-working-with-pretty-faces and this FAQ http : www.ocpsoft.org prettyfaces section-12 it is nessacary to define a filter between JSF and PrettyFaces to get a file-upload working . With PrimeFaces and TomaHawk I need to define a filter . With plain JSF there is no need to a filter without using PrettyFaces . My web.xml is pretty simple . How can I define a filter for my usage .. . Answer : You can learn how to define filters here as described in the Oracle Java EE documentation : http : docs.oracle.com cd E13222 01 wls docs81 webapp filters.html", "Question : When I am adding the filter codes in my web.xml .. . .. . I am unable to upload a file and getting exception : .. . .. . The JSF code : .. . .. . If I remove the filter code from web.xml I am able to upload file and submit the form otherwise I am getting the above mentioned exception . I am using : .. . .. . prettyfaces-jsf2-3.3.3.jar .. . rewrite-servlet-2.0.12.Final.jar .. . JSF 2.2 .. . .. . UPDATE : .. . .. . After so much research I found the problem . My project structure is like this : .. . .. . Where parentProject is an EAR project and childProject is a web project . When I add JARs .. . .. . rewrite-servlet-2.0.12.Final.jar .. . rewrite-config-prettyfaces-2.0.12.Final.jar .. . .. . to childProject Web-INf lib it works fine . But the requirement is to add jars to parentProject EarContent lib when I am adding jars to this location prettyfaces mapping is not working . I could not find any solution . Comment : I am using : prettyfaces-jsf2-3.3.3.jar + rewrite-servlet-2.0.12.Final.jar + jsf2.2 Comment : Should I use : rewrite-config-servlet-2.0.12.Final.jar and rewrite-impl-servlet-2.0.12.Final.jar Comment : Yes you should only use the rewrite 2.0.12.Final artifacts including rewrite-config-prettyfaces-2.0.12.Final as documented on the prettyfaces website : ocpsoft.org prettyfaces http : ocpsoft.org prettyfaces .. . Answer : You are mixing PrettyFaces and Rewrite in incompatible version . You should use the following dependencies : .. . .. . That should work fine . : Comment : And what about entry in web.xml for filter Comment : You don t need to add anything if you are using a Servlet 3.x compatible container . See : ocpsoft.org rewrite docs configuration install http : www.ocpsoft.org rewrite docs configuration install Comment : When Im using rewrite-servlet-2.0.12.Final.jar rewrite-config-prettyfaces-2.0.12.Final.jar rewrite-integration-faces-2.0.12.Final.jar I could not even map any URL for all the url I am getting 404 . I htink the pretty-config.xml is not picking up", "Question : i m using jsf 2.1 prettyfaces 3.3.3 and hibernate jpa 3.6.7 . i have country page and i m trying to send comment with commandbutton . country.xhtml : .. . .. . countryConverter : .. . .. . pretty-config.xml : .. . .. . converter configuration in faces-config.xml : .. . .. . when i open localhost : 8080 test country england page firstly everything works well . but when i try to send comment via commandbutton countryConverter s getAsObject method is calling again with wrong string parameter such as test.CountryBean@bd9eff and entity can not be found . when i use with default ugly url such as localhost : 8080 test faces country.xhtml country england and try to send comment countryConverter s getAsObject method is calling with true string parameter and i can send comment successfully . i think it is a prettyfaces bug but i want to use pretty-urls . .. . Answer : Could you perhaps try to register your converter gobally for the EntityCountry type . If you are using faces-config.xml for configuration use something like this : .. . .. . From the PrettyFaces documentation : .. . .. . Please note that PrettyFaces will automatically use the JSF converter registered for the type of the referenced bean property to convert the path parameter . This means that PrettyFaces supports all JSF standard converters and converters that have been manually registered to be used for a specific type using the converter-for-class element in the faces-config.xml or the forClass attribute of the @FacesConverter annotation . If this doesn t work please open a topic on the OcpSoft support forums : .. . .. . http : ocpsoft.org support .. . .. . I hope this helps . : Comment : i edited and added my converter configuration in faces-config.xml to my question . same error occured again . i also have topic on ocpsoft : ocpsoft.org support prettyfaces-users http : ocpsoft.org support prettyfaces-users pretty-urls-turns-ugly-when-i-click-commandbutton-without-immediate-attribute Comment : I tried to reproduce this but in my tests everything works fine . Could you perhaps open a new thread on ocpsoft.org to discuss this issue Comment : did you try with entity objects when i create country class with simple java class everything works fine . the problem is occuring with entity objects . Comment : Yes I tested with entities . But that shouldn t make any difference . For the converter it is just an object . Comment : i opened new topic on ocpsoft : ocpsoft.org support prettyfaces-users http : ocpsoft.org support prettyfaces-users prettyfaces-issue-when-using-with-viewparam-converter i want to see your tests and if it is possible i want to send my test project to you . thank you .", "Question : null .. . Answer : My jsf project has an url with parameter like : .. . .. . I want to change it .. . .. . I use prettyfaces and there is an example in http : www.ocpsoft.org prettyfaces http : www.ocpsoft.org prettyfaces page . I added this : .. . .. . to prettyconfig.xml but nothing change . prettyfaces works with other url without parameters . What is wrong Comment : Could you list the dependencies you added to your project", "Question : null .. . Answer : I have a xhtml-form which should be submitted after clicking an p : commanButton . The button looks like this : .. . .. . After integrating prettyfaces this button doesn t work anymore . The method on the Bean named quote doesn t get invoked . I had a look to the html-output but couldn t see any differences between before- and after prettyfaces-html . I also tested the same code when removing the specific pretty-faces-mapping . it works fine then .. . I use this for the prettyfaces url-mapping : .. . .. . I use : .. . .. . primefaces 5.2 .. . jsf-2.2 mojarra .. . prettyfaces-jsf2-3.3.3 .. . tomcat 8.0 .. . .. . I also tried with ReWrite 3.00 - same result .. . .. . any suggestions thanks in advance Comment : This is not a jsf commandLink but a PrimeFaces commandButton . Bad title . And jsf-2.2 is a spec version not an implementation version . Comment : Does it work with an h : commandButton Comment : no neither .. . I mentioned primefaces in the question-text - but doesn t seem to have to do something with this Comment : Could you try with PrettyFaces 2.0.12 and let us know the result You can find instructions here : ocpsoft.org prettyfaces http : www.ocpsoft.org prettyfaces Comment : no .. . I tried also again with the plain jsf button .", "Question : This question already has an answer here : .. . .. . Primefaces FileUpload with PrettyFaces and JSF 2.2.3 questions 20492015 primefaces-fileupload-with-prettyfaces-and-jsf-2-2-3 3 answers .. . .. . I ve tried the solution from : Primefaces FileUpload with PrettyFaces and JSF 2.2.3 http : stackoverflow.com questions 20492015 primefaces-fileupload-with-prettyfaces-and-jsf-2-2-3 .. . .. . But it doesn t work for a few files tested under tomcat 7.0.50 . One of the files is : http : ftp.carnet.hr misc apache xerces j source Xerces-J-src.2.11.0-xml-schema-1.1-beta.zip .. . .. . Has someone a better solution for this problem other than removing the urlmapping EDIT : There is no error exception thrown File is shown in the PrimeFaces FileUpload but the listener is not fired JSF2.2 inputFile doesn t work too Comment : Can you give more details about the problem you face such as the error you get .. . Answer : On my similar project JSF+JQuery+PrettyFaces Rewrite the action and listener functions were called but the setPart Part part function wasn t called h : inputFile value bean.part . I found two solutions one was to add @MultipartConfig and @WebServlet + extends HttpServlet to beans that received upload Part files . However just adding the allowCasualMultipartParsing true entry was sufficient for my project .", "Question : This question already has an answer here : .. . .. . Fileupload and PrettyFaces and JSF 2.2 duplicate questions 22943066 fileupload-and-prettyfaces-and-jsf-2-2 2 answers .. . .. . we re using a Glassfish 4.0 with JSF 2.2 Mojarra 2.2.0 and PrettyFaces 2.0 . When trying to upload a file using h : inputFile with the corresponding form enctype multipart form-data the form action is only fired if the page is called directy but nothing happens if the pretty url is called . Many other questions have some similar issues e.g . How to use PrimeFaces p : fileUpload Listener method is never invoked http : stackoverflow.com questions 8875818 how-to-use-primefaces-pfileupload-listener-method-is-never-invoked but most of them seem to use PrimeFaces and have difficulties with the order of the filters etc . Since we want to keep the JSF method for uploading files I d like to know if there is a configuration of some filters of Mojarra that I might have missed . The web.xml does currently not contain any filter specs . the jsf file contains only this form .. . .. . and the backing bean looks like this .. . .. . then uncommenting these lines in the pretty-config.xml will yield the error while commenting them won t . I think the problem might be described in this post http : ocpsoft.org support topic problem-with-hinputfile by OCPSoft but there doesn t seem to be a solution yet . Comment : The FAQ http : ocpsoft.org prettyfaces section-12 seems to cover your issue . AFAIK JSF 2.2 h : inputFile component uses Servlet 3.0 capabilities in order to perform the file-upload . You ll need to check what kind of server is being hit in your application server in order to configure it in the web.xml basically what your linked answer does but changing the PF custom filter by the one used by you . Comment : but the FAQ states 3rd party component what I m trying to use is the file input of the default implementation . Which filter would I have to configure Comment : As the FAQ says it is necessary to enable any additional filters between PrettyFaces and JSF to listen to Servlet Forwards . You ll need to do some debugging work . Just check what kind of filter it must be covered by Servlet 3.0 spec is being hit when you upload a file . Anyway it would be nice from you to provide a minimal version of the code in order for us to replay the error . Check the SSCCE format http : www.sscce.org . Also specify your JSF 2.2 impl version I suppose it is Mojarra 2.2.0 . Comment : Can you give me a hint how I could debug which filters are actually hit Since the methods in my files are all ignored I don t really know where to start.. . Comment : You could begin with a point at FacesServlet . Anyway you haven t posted your web.xml here . .. . Answer : My suggestion is : page which is bookmarkable via pretty faces should not contain any submit form That kind of page should be only for view move your file-upload form to another regular jsf page without prettyfaces filter", "Question : This question already has an answer here : .. . .. . Fileupload and PrettyFaces and JSF 2.2 duplicate questions 22943066 fileupload-and-prettyfaces-and-jsf-2-2 2 answers .. . .. . we re using a Glassfish 4.0 with JSF 2.2 Mojarra 2.2.0 and PrettyFaces 2.0 . When trying to upload a file using h : inputFile with the corresponding form enctype multipart form-data the form action is only fired if the page is called directy but nothing happens if the pretty url is called . Many other questions have some similar issues e.g . How to use PrimeFaces p : fileUpload Listener method is never invoked http : stackoverflow.com questions 8875818 how-to-use-primefaces-pfileupload-listener-method-is-never-invoked but most of them seem to use PrimeFaces and have difficulties with the order of the filters etc . Since we want to keep the JSF method for uploading files I d like to know if there is a configuration of some filters of Mojarra that I might have missed . The web.xml does currently not contain any filter specs . the jsf file contains only this form .. . .. . and the backing bean looks like this .. . .. . then uncommenting these lines in the pretty-config.xml will yield the error while commenting them won t . I think the problem might be described in this post http : ocpsoft.org support topic problem-with-hinputfile by OCPSoft but there doesn t seem to be a solution yet . Comment : The FAQ http : ocpsoft.org prettyfaces section-12 seems to cover your issue . AFAIK JSF 2.2 h : inputFile component uses Servlet 3.0 capabilities in order to perform the file-upload . You ll need to check what kind of server is being hit in your application server in order to configure it in the web.xml basically what your linked answer does but changing the PF custom filter by the one used by you . Comment : but the FAQ states 3rd party component what I m trying to use is the file input of the default implementation . Which filter would I have to configure Comment : As the FAQ says it is necessary to enable any additional filters between PrettyFaces and JSF to listen to Servlet Forwards . You ll need to do some debugging work . Just check what kind of filter it must be covered by Servlet 3.0 spec is being hit when you upload a file . Anyway it would be nice from you to provide a minimal version of the code in order for us to replay the error . Check the SSCCE format http : www.sscce.org . Also specify your JSF 2.2 impl version I suppose it is Mojarra 2.2.0 . Comment : Can you give me a hint how I could debug which filters are actually hit Since the methods in my files are all ignored I don t really know where to start.. . Comment : You could begin with a point at FacesServlet . Anyway you haven t posted your web.xml here . .. . Answer : Just in case you want to do an implementation with primefaces i already use an implementation like this .. . .. . 1.- Configure Filter s in Web.xml .. . .. . 2.- Page implementation .. . .. . 3.- Bean implementation .. . .. . ShowCase Primefaces http : www.primefaces.org showcase ui file-upload basic.xhtml Comment : This doesn t answer the current question . If you want to share code-snippets use Github or so . Future users having trouble with p : fileUpload can just read stackoverflow.com q 8875818 http : stackoverflow.com q 8875818 as already linked in top of question .", "Question : This question already has an answer here : .. . .. . Primefaces FileUpload with PrettyFaces and JSF 2.2.3 questions 20492015 primefaces-fileupload-with-prettyfaces-and-jsf-2-2-3 3 answers .. . .. . I ve tried the solution from : Primefaces FileUpload with PrettyFaces and JSF 2.2.3 http : stackoverflow.com questions 20492015 primefaces-fileupload-with-prettyfaces-and-jsf-2-2-3 .. . .. . But it doesn t work for a few files tested under tomcat 7.0.50 . One of the files is : http : ftp.carnet.hr misc apache xerces j source Xerces-J-src.2.11.0-xml-schema-1.1-beta.zip .. . .. . Has someone a better solution for this problem other than removing the urlmapping EDIT : There is no error exception thrown File is shown in the PrimeFaces FileUpload but the listener is not fired JSF2.2 inputFile doesn t work too Comment : Can you give more details about the problem you face such as the error you get .. . Answer : I ve found a solution for my problem . The problem is the action attribute of the forms which are used for the upload . PrettyFaces changes the action attribute to the new pretty-url . If you change the action attribute to the real url the one with .xhtml .jsf .. . the fileupload works again and the allowCasualMultipartParsing true entry in the context-file tomcat is not needed anymore . To change the path place this script into the view your xhtml-file jquery needed : .. . .. . Now the fileupload is working for all of my files including the ones which not worked even with allowCasualMultipartParsing true solution . Tested with Primefaces4.0 FileUpload-Component . EDIT : .. . Is there any other better solution", "Question : I m starting with PrettyFaces and i would like a url like this : .. . .. . project car alter 120 -- this is pretty link . .. . .. . But when i send a GET request in JSF i got this : .. . .. . If i make this in pretty-config.xml : .. . .. . This don t work because i can t generate the pattern link . How can i solve this .. . Answer : First you should not hard-code your parameter values in the url-mapping configuration . It should look like this : .. . .. . Next you should use to generate your URLs in your XHTML pages : .. . .. . http : www.ocpsoft.org docs prettyfaces 3.3.3 en-US html outbound rewriting.html jsf .. . .. . Does this answer your question", "Question : I am attempting to migrate an application from JSF 1.2 to JSF 2.1 . The code below worked in the 1.2 . I am using PrettyFaces 3.3.3 MyFaces 2.1 . .. . .. . in pretty-config.xml : .. . .. . I have a request with URL : http : example.com myapp sites object 309847 This request successfully matches the url-mapping id seSite and getSiteViewId is invoked on seViewChooserBean and returns the result pretty : seSiteProps . I have debugged and confirmed this . For your reference this is the bean code for ViewChooserBean.java : .. . .. . After that prettyfaces then attempts to forward to the new view id seSiteProps but the new generated URL is not processed by pretty faces because from the logs : Request is not mapped using PrettyFaces . Continue . So I get 404 response for URL http : : example.com myapp sites object 309847 properties . Note that this url match to view id seSiteProps . I have debugged this up into the pretty faces filter and discovered the following : .. . .. . After the initial request for http : example.com myapp sites object 309847 the DynaviewEngine.processDynaView is invoked and generates the correct target url http : : example.com sites object 309847 properties and forwards via faces request . Then with a breakpoint in PrettyFilter.doFilter I observed the following : In PrettyFilter.doFilter method : isUrlMappingForward req returns false therefore request is not processed by prettyfaces . Why Also note that if I put the request http : : example.com myapp sites object 309847 properties directly in the browser the page IS processed by prettyfaces and isUrlMappingForward req returns true and it loads correctly in the browser . I was thinking I ve missed something obvious here as the problem hasn t been reported elsewhere as far as I can tell . Any help is greatly appreciated . Thanks . Brett .. . Answer : Actually I m very surprised that returning PrettyFaces navigation strings from dynaview methods ever worked . This isn t documented anywhere and I doubt that this has been tested in detail . So basically you are using the dynaview feature in an very weird way . So I recommend to return plain JSF view IDs instead which should work fine . See the documentation for details : .. . .. . http : ocpsoft.org docs prettyfaces 3.3.3 en-US html Configuration.html config.dynaview Comment : Ok thanks . Really interesting that it worked in JSF 1.2 version . In my debugging it looked like there was only one line of code stopping this functionality from working ie the urlMappingForward check . It was introduced to fix another bug fix 150 or something like that . Would be a good feature to have in my opinion .", "Question : This question already has an answer here : .. . .. . Fileupload and PrettyFaces and JSF 2.2 duplicate questions 22943066 fileupload-and-prettyfaces-and-jsf-2-2 2 answers .. . .. . I m trying to upload a file to the glassfish application server v4.1 via h : inputfile . xhtml-file and bean are prepared as almost every example in the web shows . I tried with and without Pretty Filter in web.xml allowCasualMultipartParsing in context.xml and a handful of other possible workarounds . None of them seemed to work i.e . I can t read the file properties inside the bean . Is there a solution that works 100 Comment : Are you implying that it works fine when you remove every single bit of PrettyFaces altogether and or when you run it on a different server than GlassFish Comment : Unfortunately I have to use these two for my bachelor thesis . So I don t know exactly if it works otherwise . : - Comment : Uh it s just to test and exclude so that we know where to focus for the root cause of the problem . Comment : I ve the same problem . You can use Prettyface on any other page than the one you upload files from and it s gonna work indeed . Comment : Apparently a possible work around is to force primefaces to use common file-upload . I m searching how to do this and will respond if it works when I find how to . .. . Answer : Found a sufficient solution was posted here on stackoverflow.com before : Fileupload and PrettyFaces and JSF 2.2 http : stackoverflow.com questions 22943066 fileupload-and-prettyfaces-and-jsf-2-2 .. . .. . Not pretty but it works . Comment : Prettier would be to report it to them so that they are informed about this bug and can fix it accordingly .", "Question : I use PrettyFaces to URL-rewriting I used Glassfish 4 as application server and I was managing well the urls with prettyfaces but after migration of server to WildFly 8.0 I can not get the page using its id defined in pretty-config.xml I can get the page only using the complet url ie domain : port . . page1.jsf .. . .. . here is web.xml : .. . .. . pretty-config.xml .. . .. . The dependency of prettyface defined in pom.xml : Comment : WildFly 8.0 is old and has some awkward bugs as to HTTP session handling . Try the current 8.2 instead and report . Comment : And PrettyFaces 3.3.3 is also very old . You should consider to use Rewrite with the PrettyFaces module instead . See : ocpsoft.org rewrite http : ocpsoft.org rewrite and the migration guide : ocpsoft.org rewrite docs migration prettyfaces3 http : ocpsoft.org rewrite docs migration prettyfaces3 Comment : @BalusC thank you very much you helped me to solve a lot of problems in these last days . chkal I did what you suggested and it works now . .. . Answer : Have you tried a more recent version of Wildfly or PrettyFaces Please see the updated installation instructions here : http : ocpsoft.org prettyfaces .. . .. . Note : PrettyFaces is now an extension of rewrite .", "Question : null .. . Answer : I have to add some SEO functionality for my site . Site is based on Spring Webflow with JSF PrettyFaces and Promefaces . I made URL like Hanover 100+300 . Everything is working OK . Prettyfaces redirected from this URL to app tyres with query params to parameters in bean . But I need to keep and see URL with first state . like Hanover 100+300.. . without redirecting it . What is the best way to do it Thanks pretty-faces.xml .. . .. . webflow.xml .. . .. . web.xml .. . .. . part of servlet-context.xml Comment : Just don t redirect then Comment : in summary i wanna have hamed states like app tyres state1 app tyres state2 app tyres state3 . not like app tyres execution e1s2 app tyres execution e1s3 app tyres execution e1s4 Comment : I know . By default URL rewriters like PrettyFaces should merely forward not redirect . So perhaps you misconfigured it to redirect instead of forward . Comment : Could you include your configuration in the question Comment : looking forward : if forward not possible . somebody could show another way", "Question : Do we always need to pass parameters to the URL to retrieve them In my example I can t get to retrieve my param named study How should i do that XHTML File Sender : .. . .. . XHTML File Recever : .. . .. . Pretty Config XML : .. . Answer : If you want to do it using prettyfaces yes you must because it s an url rewritting tool so the params must go into the url . For your code to work you should use the f : viewParam tag before using it in your receiver page : .. . .. . However if you want to get rid of sending the parameter via url you have the flash-scope as an alternative . That however involves JSF and not Prettyfaces . If you want to go with this solution I highly encourage you to avoid early versions of Mojarra JSF 2.x as they are buggy related to that . Comment : Ok.So it makes me think that there is a security problem . The user can pass every string in the URL and it will be treated as a parameter so i need to control in the backing bean the parameter . How do you handle this That was at the beginning the reason why i d like to hide parameters in browser url .Another idea is this really a bad way to mix JSF navigation with PrettyFaces . I explain my point . If you pass paremeters with your url in to-view-id then could you use prettyfaces to rewrite URL using this parameter to something agnostic . Comment : Prettyfaces converts in some way from pretty-urls to normal ones . You can define your view to be Participant New param and then the user will be able to introduce Participant New myParam to be redirected to addParticipant.xhtml param myParam . That also allows the user to introduce the last url directly to be redirected to the same page . Security problem There s no problem while you handle your param validation properly . Remember that GET requests shouldn t change DB state they are only performed to retrieve data . Using good validation and preventing sql-injection is enough .", "Question : we are trying to refactor an JSP XSLT application to JSF . We use a CMS for content-management . Technologies : JSF 2.0 using Mojarra PrimeFaces 2.2.1 and Tomcat 6.29 The organisation of the data structure is the following : There are Sites . Sites contain Channels . Channels contain Contents . Sites channels and content are translated . The URLs look like : http : whatever firstSite http : whatever firstSite aChannel http : whatever firstSite aChannel aSubChannel myGreatContent .. . .. . It s the translated name who is showing to the user . The siteName only appears once channel can appear many times and the content at maximum once .. . .. . For the moment we use commandLinks . The action call update the context of the application and return the page id . Now we want to reproduce the friendly URL and replace the commandlink navigation POST with h : link or outpulink GET . I read some stuffs about FURL with JSF and I saw the PrettyFaces s solution . Can i reproduce the FURL with prettyfaces or should i implemented by mysefl like explains in this article http : balusc.blogspot.com 2007 11 friendly-urls-in-jsf.html And with h : link i don t see actionListener or action attribute so how i can update my context .. . Answer : Can i reproduce the FURL with prettyfaces or should i implemented by mysefl like explains in this article .. . .. . I would definitely recommend PrettyFaces http : ocpsoft.com prettyfaces . You end up with less complicated code and configuration . The same is also mentioned in the top of the linked article . And with h : link i don t see actionListener or action attribute so how i can update my context .. . .. . The h : link only accepts a navigation outcome not an URL . Use h : outputLink instead . As to invoking actions on GET requests use the constructor or @PostConstruct of the bean which is associated with the view . Comment : For the h : link i think to use outcome like channel and use f : param to pass the id of the target channel like you present in your article . But for PrettyFaces I don t know how to start do you have some advices hints or resources for my situation", "Question : 1 I need to create custom patterns from interface . 2 My pretty-config.xml is so large . Is there a way to upload data to a pretty-config.xml from the database . Maybe there s another way to create patterns without having to edit the file .. . Answer : If you need many custom mappings consider using your own ConfigurationProvider http : www.ocpsoft.org docs prettyfaces 3.3.3 en-US html Extensions.html ConfigurationProvider . However PrettyFaces is not really designed for this level of customization so you might want to use Rewrite what PrettyFaces is written on directly : .. . .. . http : www.ocpsoft.org rewrite section-5 .. . .. . Rewrite pretty much takes the ConfigurationProvider API from PrettyFaces and makes it a first-class API . For example : http : www.ocpsoft.org rewrite examples .. . .. . Lincoln Comment : Thanks Lincoln Using the Rewrite annotations solved all my needs . Comment : Great Glad you got it working :", "Question : I v already check similar questions which declare that JSF 2.1 had this bug but I m using JSF 2.2 Let s detail : .. . .. . My environment : .. . .. . CDI : 1.1 .. . Dynamic Web Module : 3.0 .. . Java : 1.7 .. . JSF : 2.2 .. . PrettyFaces : 2.0.12.Final .. . .. . My Bean : .. . .. . That controller right now is just a mock which returns a one-element list . I m using pretty faces the pretty-config.xml is the following : .. . .. . In the home.xhtml I m going to omit irrelevant code but say that I call N times the homeBean for example home.buttonClicked .. . .. . .. . .. . OK Now the problem . .. . .. . Each one of those references to the HomeBean creates a new HomeBean instance If I debug it with a breakpoint at the @PostConstruct it s called N times so the controller is called N times and the log line HomeBean : initialized is printed N times . It s a @ViewScopped so I assume it will be alive for the entire view isn t it Let s say finally it renders the home page correctly.. . but the controller is going to be a DB access.. . I don t want a new DB access per image O O .. . .. . EDITED It s definitely related with pretty-faces because if I remove it it works perfectly fine . I ve configured Pretty faces as the following in the web.xml .. . .. . And the Pom dependencies are prettyfaces.version is 2.0.12.Final : .. . .. . What s going on there Thx very much . Comment : Are you implying that the problem disappears when you remove PrettyFaces I m namely not seeing why that would ever be relevant to the question in its current form yet you made implicitly a mention of it . Comment : @mantero : Could you check if this also happens if your change the pattern to pattern value home Comment : @BalusC yes I tried removing pretty faces and it seems to work fine again . Comment : @chkal Yes it still happens . Comment : You have a pattern pattern value provinceName . This pattern will also match URLs like style.css or image.css . That s why PrettyFaces is forwarding these requests to the home page . That s what is causing this problem . .. . Answer : The problem is caused by this mapping : .. . .. . This mapping is basically matching every URL beginning with a . So it doesn t just match foobar but also style.css and scripts.js and jquery.min.js and so on . There are basically two ways to fix this . First you could try to use a custom regular expression http : www.ocpsoft.org docs prettyfaces 3.3.3 en-US html Configuration.html config.pathparams.regex to restrict what the path parameter is allowed to contain . You could for example use something like this : .. . .. . This tells PrettyFaces that the province name must only contain letters but no number periods etc . This was something like style.css won t be matched any more . The second option is to use some kind of URL prefix like this : .. . .. . That s what I usually recommend as it is the most simply and straight forward way . :", "Question : When using PrettyFaces Rewrite to rewrite URLs in a JSF application and PicketLink to secure it PicketLink does not seem to use the rewriting rules . For example if I configure PicketLink with something like this : .. . .. . And have a rewrite rule like this : .. . .. . The user will be redirected to common login.xhtml instead of login . I know that I could use login as loginPage in PicketLink but until now I have been able to use PrettyFaces Rewrite in a totally transparent way for my application I could remove it and everything would still be working.. . but with ugly URLs . I noticed that the SecurityFilter from PicketLink seems to come before the RewriteFilter from PrettyFaces Rewrite : .. . .. . So if PrettyFaces is wrapping the HttpServletResponse somehow to override the encodeRedirectUrl the SecurityFilter will not see this wrapped response as it comes before . Is there a way to make the RewriteFilter come before the SecurityFilter I didn t declare those filters in my deployment descriptors they are being automatically registered via a web-fragment.xml for PrettyFaces and via a @WebListener for PicketLink . .. . Answer : You could try to add an absolute-ordering element to your web.xml to control the ordering . Something like :", "Question : null .. . Answer : I m using PrettyFaces with a path parameter and I have a h : commandButton which does some work and updates the page . I can t work out how to maintain the pretty url after the page updates . Is this possible I ve spent ages playing around with adding an f : param in various places but with no luck . Without the path parameter it works just fine . Here s a cut down example . pretty-config.xml includes : .. . .. . hello.xhtml includes : .. . .. . HelloBean.java : .. . .. . I navigate to say hello paul and then click on the command button . What I observe is that the page updates as expected but the url changes to the non-pretty one . In the html generated by navigating to hello paul the action on the form tag says hello.xhtml rather than hello paul so I think I m doing something wrong in my jsf not with what I return from the backing bean . I m using rewrite-servlet-2.0.12.Final.jar and rewrite-config-prettyfaces-2.0.12.Final.jar manually added no maven PrimeFaces 5.1 and Wildfly 8.1 . Thanks in advance Paul . Comment : Try adding rewrite-integration-faces-2.0.12.Final.jar to your dependencies . This may do the trick . Comment : Hi Christian thanks for the quick response . Adding just that jar gives me a java.lang.ClassNotFoundException : org.ocpsoft.rewrite.el.spi.BeanNameResolver . I also added rewrite-api-el-2.0.12.Final.jar but then got a strange one : ClassCastException : Service class org.ocpsoft.rewrite.faces.FacesBeanNameResolver did not implement the interface org.ocpsoft.rewrite.el.spi.BeanNameResolver . Sorry to be a pain Comment : I think you need rewrite-integration-faces if you are using rewrite-config-prettyfaces . You really should use Maven to get all the required dependencies . The ClassCastException is some kind of ClassLoader problem . Comment : Unfortunately we re not using maven and really don t want to have to switch over to it . I m trying to work around the ClassNotFoundException - will let you know how I get on . Thanks again . Comment : Thanks Christian I ve got it working now by adding rewrite-integration-faces . FYI the reason I was struggling with the ClassNotFoundException was that rewrite-integration-faces was being packaged in the EAR but the others were in the WAR despite me saving them all in EAR lib . I ve put them all in the WAR now . Thanks again" ] }
[ "yes-answer-long", "yes-answer-short" ]
url-rewriting
UNK_RELATION
intuit-partner-platform@quickbooks@154
intuit-partner-platform -- intuit developer an integration platform for building applications that work with core intuit products like quickbooks-online @placeholder for windows and financial data apis .
{ "confidence": [ 109.51919555664062, 102.17460632324219, 85.86270904541016, 82.23484802246094, 81.19618225097656, 79.7272720336914, 77.870849609375, 77.10369110107422, 72.06350708007812, 69.68721771240234, 67.7281494140625, 67.63256072998047, 66.38496398925781, 66.13853454589844, 64.16313171386719, 63.726619720458984, 63.503761291503906, 62.643760681152344, 62.06742858886719, 61.62063217163086, 61.559181213378906, 61.559181213378906, 61.45850372314453, 60.34592056274414, 59.027530670166016, 58.92441177368164, 58.92441177368164, 58.92441177368164, 58.92441177368164, 58.92441177368164, 58.22873306274414, 57.98740768432617, 56.90184020996094, 55.82535171508789, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.766571044921875, 55.646400451660156, 55.39082717895508, 55.39082717895508, 55.39082717895508, 55.39082717895508, 54.99980163574219, 54.99980163574219, 54.550411224365234, 54.51176834106445, 54.10490417480469, 53.46550750732422, 52.75605773925781, 52.75605773925781, 52.75605773925781, 52.75605773925781, 52.747806549072266, 52.747806549072266, 52.747806549072266, 52.56113052368164, 52.19479751586914, 51.94210433959961, 51.94210433959961, 51.06109619140625, 51.02696990966797, 50.528926849365234, 49.59821701049805, 49.59821701049805, 49.59821701049805, 49.59821701049805, 49.59821701049805, 49.59821701049805, 49.59821701049805, 49.59821701049805, 49.59821701049805, 49.59821701049805, 49.36263656616211, 49.04351043701172, 49.04351043701172, 48.980892181396484, 48.980892181396484, 48.980892181396484, 48.980892181396484, 48.980892181396484, 48.56698226928711, 48.56698226928711, 48.497032165527344, 48.015586853027344, 47.72545623779297, 47.710575103759766, 47.32065200805664, 47.042152404785156, 46.61594772338867, 46.056968688964844, 46.040870666503906 ], "content": [ "Intuit is removing Intuit Partner Platform IPP integration to desktop QuickBooks .", "Intuit Partner Platform and Intuit Anywhere works ONLY with USA versions of QuickBooks .", "I have been working on building an intuit quickbooks-online app .", "If you re an IPP Intuit Anywhere developer submit a support ticket to Intuit with a request for a 1-year development instance of QuickBooks Online .", "IPP Intuit Anywhere is the new platform only for SaaS applications .", "strike Intuit Anywhere Intuit Partner Platform - this is for SaaS apps where you re allowing many of your customers to connect their QuickBooks to your app for a monthly fee strike struck out because Intuit deprecated these APIs for QuickBooks desktop Windows .. . .. . 2 .", "Contact Intuit developer support. .", "Is it possible to use the Intuit Sync Manager to sync the company data up to Intuit and then just use the standard Online APIs to connect to that company file", "The Intuit Partner Platform API Explorer https : developer.intuit.com v2 apiexplorer apiname V3QBO though doesn t seem to have this as an option .", "This is interesting but it sounds like it s not supported by Intuit .", "Working with this developer directly through the Intuit Support .", "If so is intuit still accepting applications for the private beta", "strike Intuit has two ways to connect to QuickBooks : strike .. . .. . 1 .", "Did you try making a support ticket with Intuit", "I ve searched for -3002 -6502 and 20009 error codes for Intuit QuickBooks etc with no luck .", "I wrote the code to reconnect the Intuit .", "Does Intuit have plans to change this and if so when", "I can t see anywhere in the Intuit Partner Platform documentation that explains which countries my app will be available in or the limitations of the versions used in international countries .", "What does the XML JSON response from Intuit look like", "I m trying to use python with the rauth library to connect to the QBO api on the intuit-partner-platform and I ve mostly gotten it to work correctly .", "Is there any way or any query to fetch reports using Intuit SDK .", "Use this new utilty from intuit to test : apiexplorer.developer.intuit.com http : apiexplorer.developer.intuit.com", "were paying customers we have integration problems....largely caused by YOU intuit", "Intuit has setup a dummy FI for testing purpose .", "http : pastebin.com raw.php i 7VUB6whp .. . .. . You can also see my original Question Here on StackOverflow : Query for All Invoices With Open Balances using QuickBooks Online QBO Intuit Partner Platform IPP DevKit http : stackoverflow.com questions 14323815 query-for-all-invoices-with-open-balances-using-quickbooks-online-qbo-intuit-p .", "The last v3 schema Intuit released was complete and utter crap - littered with problems .", "I have a web application using Intuit API V3 written in vb.net .", "Otherwise use your actual Intuit username password for the rest of the steps .", "I replied on your Intuit Live Community question for this same issues .", "I am trying to send a PurchaseOrder created with Intuit .NET SDK v3 .", "I am building a page that would send a request to Intuit Reconnect API to renew the Oauth Token and Token secret values .", "I would also like to know if Intuit plans to support that feature in a near future", "Intuit still provides the traditional QBSDK SDK v12 which is useful if you are creating a custom integration for one company or focused entirely on desktop scenarios only .", "If it still does not work then you will likely have to contact Intuit and have them debug the data you are sending to them .", "Intuit has indicated they are working on internationalization but haven t given any timelines on that yet .", "The Oauth tokens geenrated by Intuit are known to have issues with Rest Clients .", "OR .. . .. . to debug client issues there is another OAUTH extension provided by Intuit for Fiddler2 .", "You can raise a support ticket with Intuit by logging into your developer.intuit.com account .", "Ohh Keith I know you back from the days of the Intuit forums .", "The basic outline is as follows .. . .. . The sample provided to me by Intuit is written with Spring .", "I am working on the last step of the OAuth dance with Intuit .", "Based on the stacktrace an intuit class com.intuit.ipp.aggcat.util.SAML2AssertionGenerator needs a saml jar on the classpath .", "As defined by intuit checklist We should not call OauthFlow again .", "We re just going live with the Intuit API feature on our live application .", "I am not sure if this is an Intuit system error OR an error on my part .", "Is there anyone at Intuit or other customers using the API to help us resolve this", "If we are we become confident that both the bank and Intuit APIs are well-behaved and that the problem is on our end somehow .", "I guess I am just confused what the Intuit Sync Manager is used for then", "I am using Intuit OAuth Access and OAuth API console for testing Using all security tokens .", "The way you re doing it the net result is the same functionality at a higher price since Intuit charges per connection .", "I also have cleared and reset both with my programs OAuth process and within the Intuit playground a number of times", "This is a high priority for Intuit and IPP and we ll share our detailed roadmap with the developer community ASAP .", "UPDATE .. . .. . I finished solved the problem with some help from an intuit relations developer .", "When I add an Intuit Quickbooks Online purchase order with SDK v3 it shows up in their online interface under the assigned Vendor s transaction list appropriately as a Purchase Order .", "If I call discoverAndAddAccounts again on refresh will I then add duplicate credentials information to the Intuit servers or will Intuit know the credentials is already added", "I m unable to access investment position data when using the Intuit Customer Account Data API .", "Been developing a simple application using the Intuit Quickbooks SDK Desktop and everything has been working great for the last 3 months of development .", "If you are able to duplicate that and provide logs you should post them so we can report it to Intuit as a bug .", "When updating JournalEntry objects using the Intuit QBO v3 API I am unable to remove an existing Entity .", "Our application loads jQuery 1.10.2 and then loads https : appcenter.intuit.com Content IA intuit.ipp.anywhere.js from Intuit .", "which also show how to store credit cards with Intuit in a PCI-compliant manner etc .", "In reference to the Customer Account Data API is there a way to get a listing of all possible categories that Intuit uses to categorize a transaction", "What happens when Intuit pulls data from institutions to update accounts info", "We re using the Intuit Customer Account Data API to connect to banks in our application .", "EDIT : .. . Intuit JE Doc http : developer-static.intuit.com SDKDocs QBV3Doc IPPDotNetDevKitV3 topic html 61129268-24e0-c56b-bc4c-801ca0a89e8b.htm .. . Intuit Line Doc http : developer-static.intuit.com SDKDocs QBV3Doc IPPDotNetDevKitV3 topic html 377b1d5e-3926-deea-2135-18b979d1a024.htm", "It looks like Intuit have changed some things since I last worked with the API .", "Are you able to make REST APIs calls from Google App Engine to Intuit", "Intuit has setup a dummy FI called CC Bank institutionId - 100000 for testing CAD APIs .", "Is this QuickBooks Online or QuickBooks for Windows or QuickBooks for Mac", "I read in the oauth.net documentation http : oauth.net core 1.0a auth step3 that this last call should be done via HTTP POST but I see nothing that describes what the post body should contain and nothing on the Intuit Partner Platform describes the POST body either so I am trying a GET instead .", "I also referenced this very good page : http : myarch.com classnotfound .. . .. . Given authorization is step 1 in using the Intuit Developer API I m kinda stuck .", "can you please share with me the Intuit JAVA SDK object you are using .", "We have reached out to Intuit in order to try and obtain these and have been told to just use 30-day trials .", "Do I need to create a new App in the Intuit App center for this new version of connecting", "Or can I continue to use the existing Intuit App we created for the QBD interface", "Using the returned verifier from Intuit I build my request to get the access token .", "I am always getting back a HTTP 1.1 401 Unauthorized error when I make my call to Intuit .", "define SAML X509 PRIVATE KEY PATH C : Program Files x86 Apache Software Foundation Apache2.2 htdocs Intuit keys intuit.key Is this correct", "you can get the above info from this file desktop local LOCALAPPDATA Intuit SyncManager SyncManager.sch", "Does Intuit provide a test bank in the institutions list that exercises the possible MFA scenarios", "Can you please submit a support ticket to Intuit with the Account ID that is missing the transactions so that we can diagnose the issue", "That website is for both QuickBooks Online and QuickBooks for Windows .", "Am implementing the exception-handling for the Intuit Customer Account Data API in my application .", "I am using the Intuit Customer Account data API and have successfully created an x.509 certificate and uploaded .", "The XML JSON responses are NOT irrelevant -- those are what allow you to actually track down errors and if it s a legitimate bug report it to Intuit .", "Consider the SigninWithIntuit scenerio : .. . .. . When a first user comes they click SigninWithIntuit in my application add their username and password authorize by Intuit and comeback in my site .", "After 6 months without an update and 6 months of falling behind schedule it s about time Intuit communicated something to developers .", "Intuit added a new ODBC user QBAdvancedReportingGroup which does have access to those tables however we are not able to add that user to the ODBC user list .", "In order to serve the Anywhere script locally you also need to make some modifications to the code for allowing the domain to point to the Intuit site .", "For example in my data I see Other Business Expenses Deductible Meals etc.. . .. . .. . Is there a more complete list of all schedule c categories intuit uses", "I set up an application with the Intuit Customer Account Data API and am running a Rails app using Aggcat gem https : github.com cloocher aggcat .", "I m not sure if this is a good option for you but we have created a pretty slick sync with QuickBooks using the SDK for the Method Integration platform .", "The documentation for the Intuit Partner Platform IPP QBO v3 API for reports such as this one for a Balance Sheet https : developer.intuit.com docs 0100 accounting 0400 references reports balancesheet refers to very promising-looking elements called Quick-Zoom URLs discussed near the bottom of the doc page I linked to .", "With QuickBooks Online outside of the USA yes .", "I began testing QuickBooks Online data today .", "But like you mentioned and what the Intuit documentation http : oauth.net core 1.0a auth step3 you linked to says the get access token request is supposed to be done using a POST request instead .", "In 2014 and 2015 Intuit added a new feature called Advanced Reporting which is a separate application that connects and makes a copy of the QB data and allows you to do drag-and-drop reporting in their Advanced Reporting application .", "You can connect to both QuickBooks Online and QuickBooks for Windows using C .", "I am not sure if you are using QuickBooks Online or for Windows .", "With QuickBooks Online USA I don t think so ." ] }
{ "confidence": [ 114.48974609375, 104.78549194335938, 102.34255981445312, 100.25379943847656, 98.29265594482422, 95.4886703491211, 92.26969146728516, 86.67840576171875, 84.43467712402344, 81.51165771484375, 81.36692810058594, 79.07704162597656, 78.22637176513672, 77.58784484863281, 76.49693298339844, 73.66130828857422, 73.1923828125, 72.82957458496094, 72.34873962402344, 72.23764038085938 ], "content": [ "Question : I can t see anywhere in the Intuit Partner Platform documentation that explains which countries my app will be available in or the limitations of the versions used in international countries . I ve been told by a QuickBooks Online sales rep that not all programs that work in the US version application center will work in international countries . I m specifically interested in knowing if users from Canada Jamaica the UK India and Australia can use my app if it is published on the Intuit App Center here in the US . .. . Answer : Intuit Partner Platform and Intuit Anywhere works ONLY with USA versions of QuickBooks . Period end of story . Intuit has indicated they are working on internationalization but haven t given any timelines on that yet . Sooo.. . .. . .. . I m specifically interested in knowing if users from Canada Jamaica the UK India and Australia can use my app if it is published on the Intuit App Center here in the US . No they won t be able to . Comment : Thank you Keith", "Question : I can t see anywhere in the Intuit Partner Platform documentation that explains which countries my app will be available in or the limitations of the versions used in international countries . I ve been told by a QuickBooks Online sales rep that not all programs that work in the US version application center will work in international countries . I m specifically interested in knowing if users from Canada Jamaica the UK India and Australia can use my app if it is published on the Intuit App Center here in the US . .. . Answer : At this time IPP only supports apps that integrate with QuickBooks Online QBO for the US market . However we do plan to enable developers who want to integrate with QBO for customers outside of the US where QBO becomes available . This is a high priority for Intuit and IPP and we ll share our detailed roadmap with the developer community ASAP . In the meantime you can register for today s webinar here http : ippblog.intuit.com blog 2013 02 registration-for-ipp-quickbooks-api-v3-webinar-.html that provides the roadmap for the IPP QuickBooks API including some details on global readiness . regards .. . Jarred", "Question : I need some guidelines here . I am creating an online booking system for my client that interfaces with QuickBooks on their internal network desktop QuickBooks not online . Do I need to go the full publish app route I do not wish to sell this app in the marketplace . This is merely a custom booking system designed and paid for by the client . It seems like I need to publish the app in the marketplace for them to be able to use it . Are there ways around this Comment : Sorry just for more clarification : Client is running quickbooks enterprise 13 on their local pc s Terminal Server . I am creating an online www booking system Asp.net that need to interface with their Quickbooks . What is the best way to achieve this I have started looking at the quickbooks API but as mentioned above I do not wish to publish this solution as an accessible App in your market place . Should I rather use the SDK with web connector or can I still use the Quickbooks API Thanks in advance . .. . Answer : Update 06 23 2015 - To connect to a desktop QuickBooks installation the SDK with the Web Connector is now the only recommended approach . Intuit is removing Intuit Partner Platform IPP integration to desktop QuickBooks . For more information see http : www.sleeter.com blog 2013 11 quickbooks-software-integration . strike Intuit has two ways to connect to QuickBooks : strike .. . .. . 1 . strike Intuit Anywhere Intuit Partner Platform - this is for SaaS apps where you re allowing many of your customers to connect their QuickBooks to your app for a monthly fee strike struck out because Intuit deprecated these APIs for QuickBooks desktop Windows .. . .. . 2 . SDK Web Connector - this can be used to integrate any type of app with QuickBooks for Windows .. . .. . For the SDK Web Connector you don t need to go through any publication process or anything like that . Just build the solution and connector your client . There s a pretty good overview of how the QuickBooks web connector works http : www.consolibyte.com docs index.php QuickBooks Web Connector Overview on our QuickBooks wiki http : www.consolibyte.com docs index.php QuickBooks . The QuickBooks SDK https : developer.intuit.com docs 0250 qb download also includes a huge PDF with detailed documentation about how to implement SDK Web Connector applications as well . Comment : Thanks Keith . That answers my question and confirms what I thought . The one problem I see myself experiencing using the web connector and the SDK to this I cant find a clear answer on in your docs is the fact that the web connector issues the connection to the web app hence no firewall ports . This does however imply that I cant push to quickbooks from the web app only accept request originating from quickbooks.. . I cant see how this will work for a booking system that needs to feed instructions to quickbooks not the other way around.. . Comment : The Web Connector will reach out every X minutes and ask your application for a list of things to do - you can then send it requests like add a customer add an invoice etc . So it won t be real-time but you CAN have the Web Connector add invoices add customers etc . The Web Connector uses the QuickBooks SDK . They are part of the same system . The Web Connector is just a way for web-applications to utilize the SDK . Comment : This understanding is correct yes : I now talk exclusively to the WC and it talks to the SDK which talks to Qbooks . I m not sure I would call that replacing it I would call it using the SDK but the statement is correct - you talk to the Web Connector it talks to the SDK QuickBooks . Comment : HI Keith . Sorry one more thing . I have read in the forums someone making the statement that you can give the web connector as much work as you want for as long as you want.. . Can this in theory mean that I can keep the connection open by not calling the complete event What would the timeout be in this scenario Also can I communicate asynchronously Multiple website visitors accessing using the web connector at the same time.. . I do not really wish to que work... . Comment : In theory you could keep the connection open indefinitely . In practice you certainly wouldn t want to because then no one would ever be able to log out of QuickBooks ever . You do want to queue work you just don t know it yet . : - Email me if you need more details and I can expand a bit more .", "Question : I can t see anywhere in the Intuit Partner Platform documentation that explains which countries my app will be available in or the limitations of the versions used in international countries . I ve been told by a QuickBooks Online sales rep that not all programs that work in the US version application center will work in international countries . I m specifically interested in knowing if users from Canada Jamaica the UK India and Australia can use my app if it is published on the Intuit App Center here in the US . .. . Answer : Update with regards to QBO v3 API . The QBO v3 API supports every country that has a QuickBooks Online version . Reference : https : intuitpartnerplatform.lc.intuit.com questions 902695-total-list-of-countries-supported-for-qbo-v3-api", "Question : We need to integrate our custom in house applications with quickbooks . When I saw the QB REST API and the IPP I was like Yay Finally Qb offered us something useful . It was a happy moment.... . .. . .. . Then I read this in the FAQ .. . .. . I want to integrate my custom non-SaaS single-tenant solution with QuickBooks API . Can I do this Not today but we are considering it . What Why were paying customers we have integration problems....largely caused by YOU intuit You already built it...I assume it works...so there s no effort whatsoever on your part So now you offer an API on a silver platter....but...oh wait....you can t use it . Somebody tell me that I m simply misunderstanding this... . .. . Answer : Your understanding is correct . IPP Intuit Anywhere is the new platform only for SaaS applications . Intuit still provides the traditional QBSDK SDK v12 which is useful if you are creating a custom integration for one company or focused entirely on desktop scenarios only . QBSDK Ref - https : developer.intuit.com docs 0025 quickbooksapi 0055 devkits 0250 qb Comment : The traditional SDK is junk for us...We do most of our business online . Our in-house CRM runs on Rails that REST API is exactly what we need . What good is a windows SDK gonna be on Linux Rails Comment : You can use the Web Connector or write a web-based bridge using the SDK . I imagine that IPP will be available someday for all apps but in the meantime the SDK Web Connector can do what you re asking .", "Question : The feature is documented here https : developer.intuit.com docs 0100 accounting 0300 developer guides change-data-capture . The Intuit Partner Platform API Explorer https : developer.intuit.com v2 apiexplorer apiname V3QBO though doesn t seem to have this as an option . It sounds like a very handy feature . I d like to test it but how .. . Answer : Write some code to call the CDC API . Run the code . The API Explorer does not support it . Comment : Thanks have you tried it and does it work Comment : Yes it works just fine . Sample code in PHP in case you re looking for it : github.com consolibyte quickbooks-php blob master docs https : github.com consolibyte quickbooks-php blob master docs partner platform example app ipp v3 example cdc.php Comment : JournalEntry deletions are not reported as far as I can tell . I ve tested the Purchase deletions DO . Comment : If you are able to duplicate that and provide logs you should post them so we can report it to Intuit as a bug . According to their docs it is supported - developer.intuit.com docs 0100 accounting 0300 developer guides https : developer.intuit.com docs 0100 accounting 0300 developer guides change-data-capture Comment : I can reproduce it and I reported it this morning in a developer support ticket . JE creates and updates appear to work deletions not .", "Question : I wrote a QB integration a few years ago that uses the Web Connector to read and write data to and from QB desktop products . It works well but I am not in love with the Web Connector . I am tasked with setting up another QB integration . I was hoping to avoid using the Web Connector this time . There are a few reasons why I am trying to avoid the Web Connector but the main reason is I would like to make this integration work with both Desktop and Online versions of QB . Is it possible to use the Intuit Sync Manager to sync the company data up to Intuit and then just use the standard Online APIs to connect to that company file I have done some testing and I can connect to QB Online via the Online APIs but I cannot seem to get it to see the synced company files . Any help with this would be great . Just looking for a little direction here . Thanks in advance for any help . .. . Answer : For QBO of-course you can use QBO REST APIs V3 API . Ref - https : developer.intuit.com docs 0025 quickbooksapi .. . .. . But for QBD QBSDK and web-connector is still the only approach . QBD V2 and V3 REST APIs are already deprecated . https : developer.intuit.com docs 0250 qb .. . https : developer.intuit.com docs 0250 qb 0010 get oriented 0080 quickbooks web connector .. . .. . FAQ https : developer.intuit.com docs 0025 quickbooksapi 0058 faq Does QuickBooks API support QuickBooks Desktop and QuickBooks Online.3F .. . .. . Thanks Comment : Thanks for the help . I guess I am just confused what the Intuit Sync Manager is used for then For some reason I thought I could use that and then just connect to the company file that it syncs . I guess I am wrong but I am still not sure what the point of the Sync Manager is . Thanks again Comment : SM used to help to upload QBD companys file s data from desktop to cloud and also to download cloud data to your desktop company file . And using QBD REST APIs V2 V3 both are deprecated now you could have interacted with your synced cloud data . As QBD APIs are deprecated so you can t take this approach anymore . To get details on SM please refer - developer.intuit.com docs 95 legacy qbd v2 qbd v2 reference https : developer.intuit.com docs 95 legacy qbd v2 qbd v2 reference 0300 sync manager Thanks Comment : Thanks again Manas . I see what you are saying but I know there are apps out there that use the Sync Manager to pull QBD data out and then integrate it with their web apps . Is this just not supported for new apps Are those apps going to have to change the way they work I am just trying to figure this all out . Thanks Comment : Correct . No new apps can take that approach . Existing app may may not use their old approach . But for new app qbsdk is the only solution . You can refer this migration guideline developer.intuit.com blog 2013 12 19 https : developer.intuit.com blog 2013 12 19 2014-roadmap-and-migration-dates-for-existing-developers . Comment : Thanks Manas . Makes sense . I also found this article that helped me understand what is going on - sleeter.com blog 2013 11 quickbooks-software-integration http : www.sleeter.com blog 2013 11 quickbooks-software-integration", "Question : We need to integrate our custom in house applications with quickbooks . When I saw the QB REST API and the IPP I was like Yay Finally Qb offered us something useful . It was a happy moment.... . .. . .. . Then I read this in the FAQ .. . .. . I want to integrate my custom non-SaaS single-tenant solution with QuickBooks API . Can I do this Not today but we are considering it . What Why were paying customers we have integration problems....largely caused by YOU intuit You already built it...I assume it works...so there s no effort whatsoever on your part So now you offer an API on a silver platter....but...oh wait....you can t use it . Somebody tell me that I m simply misunderstanding this... . .. . Answer : I m not sure if this is a good option for you but we have created a pretty slick sync with QuickBooks using the SDK for the Method Integration platform . You can use our API with the sync engine to do what you need . You ll need a Method account though which is 40.00 per month .", "Question : null .. . Answer : I need to create an application to add record Income and Spending to Intuit Quickbook Self Employed.please kindly advice me about source code to add a record . i have no idea anything . but i have got it s references . now I need only source code.please help me . Comment : What programming language Comment : C ..please help me to do this. . Comment : Is this QuickBooks Online or QuickBooks for Windows or QuickBooks for Mac Comment : developer.intuit.com sampleapps https : developer.intuit.com sampleapps here is the developer site of expecting quick book . i need to use online.because i need to connect this quick book to my application develop by c Comment : That website is for both QuickBooks Online and QuickBooks for Windows . You can connect to both QuickBooks Online and QuickBooks for Windows using C . So which version of QuickBooks are you using", "Question : We re currently using the Windows QBSDK to interact with QuickBooks . We re evaluating IPP going forward . However the QBSDK uses ListID s TransactionID s to identify objects and IPP uses a different scheme . Is there a way to determine the mapping between the two .. . Answer : Asked the same question at IDN and was told there is not away to perform this translation . However a little bit of assistance from a partner some careful watching of results between IPP and QuickBooks and I have a fairly decent answer . A typical ID in QuickBooks looks like this : .. . .. . The first portion is the identifier and the second portion is some form of timestamp . Treat the first portion as a 32-bit hexadecimal number and turn off the high bit . In this case you will get 1 . If you create the record first in QB then sync to IPP you will find a record identified in this manner : .. . .. . If you create the record first in IPP you will find a record identified in this manner : .. . .. . Once you sync you will find an external record reference for example : .. . .. . This would match to a transaction id in QuickBooks : .. . .. . Unfortunately this transform is not isomorphic because of the time stamp appended at the end of the identifier in QuickBooks . Therefore translating from a QuickBooks ID to a IPP based ID is trivial to perform . Translating the other way will require an enumeration of records in QuickBooks and matching up of the ID s . Comment : This is interesting but it sounds like it s not supported by Intuit . Not something I d want to use when it mattered .", "Question : We need to integrate our custom in house applications with quickbooks . When I saw the QB REST API and the IPP I was like Yay Finally Qb offered us something useful . It was a happy moment.... . .. . .. . Then I read this in the FAQ .. . .. . I want to integrate my custom non-SaaS single-tenant solution with QuickBooks API . Can I do this Not today but we are considering it . What Why were paying customers we have integration problems....largely caused by YOU intuit You already built it...I assume it works...so there s no effort whatsoever on your part So now you offer an API on a silver platter....but...oh wait....you can t use it . Somebody tell me that I m simply misunderstanding this... . .. . Answer : I have done a lot of integration with QB and prefer to use the RSSBus ADO.NET provider . It is infinitely easier than using Intuit s SDK and has great documentation such as - http : cdn.rssbus.com help RQ4 ado pg desktoptable-purchaseorders.htm . It works with the Desktop version and QB online . I am not affiliated with them at all just a happy customer", "Question : I have been working on building an intuit quickbooks-online app . During this time I have been using multiple users on the same quickbooks company account to test the initial flow of the application . This all worked fine until 12 20 2012 when I started getting this error : .. . .. . Oops An error has occurred . Please close this window and try again . Error Code : invalid database Message : The application has already been subscribed to by another user for this company .. . .. . Did something recently change Or is there a way to configure the application to allow this Comment : What s the user-case for this Why would you want more than one user to connect to the same QuickBooks file Comment : Right now with quickbooks-online you can have multiple users associated to the same company account even a accountant . If one of them adds the app we setup a user for them on our side which the other user won t have the login information for . Thus can t see our data that we calculate . We would like to allow everyone on that account to setup an account with us . Comment : Wouldn t it be easier just to store one set of OAuth credentials per company file in your app and always use those regardless of what actual user is logged in to your app The way you re doing it the net result is the same functionality at a higher price since Intuit charges per connection . Comment : Keith is right . You want to use the company owner s OAuth tokens to also serve other users how belong the same company . it is correct that this change was made w the recent IPP 3.9 release to prevent developers from creating these unnecessary connections . Comment : I understand but if customer comes to my site and wants to connect their Quickbooks and doesn t know that someone else has already setup the oAuth how can I verify who they are if the oAuth process fails because someone else has already set it up Wouldn t it be better if instead of stopping the user during oAuth process it returned to me that the user was verified and they are associated to this account .. . Answer : I don t understand your use-case . Only the administrator of QuickBooks can setup the sync or grant access to a 3rd party app . You would know the user belongs-to the same company and you would also know if that company has already been granted access . So there should be no confusion . Random users wont be authorizing access .. . .. . regards .. . Jarred", "Question : null .. . Answer : Over the past 48 hours we started seeing this error popping up for our customers across hundreds of dozens of realms accounts . This is happening with code that has been in production for 6 months without any changes . In searching on Stack Overflow and Google I haven t been able to find anyone else with thie issue . The error response we get is included below . Has anyone else ran into this problem and if so do you know of a solution I ve searched for -3002 -6502 and 20009 error codes for Intuit QuickBooks etc with no luck . Comment : Did you try making a support ticket with Intuit Hundreds of dozens of accounts sounds pretty major Comment : Yep - I did . Just hoping for a solution in less than 48 hours but doesn t sound like that s going to happen . Comment : Error went away. . but now it s back again .", "Question : I need to get a number of test accounts companies for QuickBooks Online so that we can finish developing and testing our app . We have reached out to Intuit in order to try and obtain these and have been told to just use 30-day trials . These periods are too short for our development cycle so we purchased accounts to use . These accounts have been shut off locked on us and we are just getting vague answers as to why . We would love to know why so that we can stop doing any possible harmful activity but alas it has been difficult to get any information in regards to that . Our developers are more than happy to work with their engineers to make this happen . Does anyone know how we can get test accounts so that we can test our application I hope that the answer is not the same as this StackOverflow Question http : stackoverflow.com questions 15937391 how-can-i-get-a-connection-ticket-to-quickbooks-online-for-dev-testing-a-one-off . We need test accounts to successfully test our application before we move forward . .. . Answer : You can t get true test e.g . non-production accounts from QuickBooks . They won t give you access to that environment . If you re an IPP Intuit Anywhere developer submit a support ticket to Intuit with a request for a 1-year development instance of QuickBooks Online . They will send you a coupon code for a one-year free trial . Otherwise you re SOL . Comment : Thank you I have done just that and they sent me this link http : docs.developer.intuit.com 0025 Intuit Anywhere 0010 Getting Started 0020 Connect Create Sample QuickBooks Data that pretty much described just that . Comment : cepatt I discussed this with the QBO team and we wanted to have a discussion with you as well . I wanted to find out why you were disconnected . Can you submit a support ticket and we can setup a phone call to discuss developer.intuit.com support thanks - Jarred Comment : @Jarred thank you for such a quick response . I have submitted a ticket with the subject As requested by Jarred Keneally . We have heard back from your QBO team after I already asked and got a response to this question . We have a meeting set up and I placed the details in said support case along with my contact information .", "Question : For some reason when I try to revert a credit memo in Quickbooks IPP I get a blank response . I removed the authorization header so I could post it below The request : .. . .. . The response : .. . .. . I m using the php devkit Comment : you can t revert credit memo if there is a linked transaction like against it Comment : so then how can I get it out of an error state Comment : An object can be reverted only if it has been synched with QuickBooks at least once . This implies that the object has been updated by Data Services that is by a Mod operation and yes there should not any linked transaction against it Comment : Thanks . How can I get it out of error state if it has already been synced once but does have transactions against it Comment : I figured it out . added ErroredObjectsOnly true to my query . .. . Answer : It turns out that you can t revert a credit memo according to the Intuit developer site : https : developer.intuit.com docs 0025 quickbooksapi 0050 data services v2 0500 quickbooks windows 0500 supported objects .. . .. . What I ended up doing to resolve the issue was doing a query with ErroredObjectsOnly true to get the currently errored credit memo : .. . .. . and then posting my credit memo back to intuit with valid fields . That bumped the CreditMemo out of error state and allowed it to sync .", "Question : I am working on the last step of the OAuth dance with Intuit . This is a Delphi XE2 desktop app and I am using the Indy components . I am successfully getting my request token from Intuit and the callback from their website is properly redirecting me to our web service after I authorize my app . Using the returned verifier from Intuit I build my request to get the access token . I am always getting back a HTTP 1.1 401 Unauthorized error when I make my call to Intuit . If I post the URL I build into Chrome browser I get a oauth problem signature invalid message . Obviously I don t have the fullest grasp of the OAuth thingy but I am pretty darn sure my signature is correct . I use the signature checking tool from Google here : http : oauth.googlecode.com svn code javascript example signature.html and my signature always matches . My signature base matches as well . Here are the keys values I am using to generate my signature and the URL I am generating from the result : .. . .. . If I plug all the above into Google s signature tool I get the same signature I got from my code . My signature base matches what I get from Google s tool also . Pasting the URL I build from my code below into Chrome browser give me the oauth problem error . Keep in mind my code to generate my signature works fine when building the URL for the get request token . It s just this last bit to get the all-important access token and access token secret where things are falling apart for me . I read in the oauth.net documentation http : oauth.net core 1.0a auth step3 that this last call should be done via HTTP POST but I see nothing that describes what the post body should contain and nothing on the Intuit Partner Platform describes the POST body either so I am trying a GET instead . I ve tried a POST with an empty body with no luck either . Any advice is appreciated . Cheers TJ Comment : TJ...just curious : did you ever figure this out My next project may be a desktop connection to QB Online via the IPP interfaces so OAuth is a burning question.. . Comment : @Mark - Sadly no . I am convinced that the implementation of the code used by Intuit has something a little odd in it that does not do the signing the same as I expect it to . They are doing the translation from request tokens to access tokens via website code . We did some trickery that allowed us to store the secret on our web service and use the same website code dll as Intuit on our web server to do the translation from request token secret to access token secret . It works but is not pretty . PM or email me if you need details . .. . Answer : When you enter a URL into a browser and let it go it performs a GET request . But like you mentioned and what the Intuit documentation http : oauth.net core 1.0a auth step3 you linked to says the get access token request is supposed to be done using a POST request instead . If you read section 5.2 http : oauth.net core 1.0a consumer req param of Intuit s documentation it says : .. . .. . OAuth Protocol Parameters are sent from the Consumer to the Service Provider in one of three methods in order of decreasing preference : .. . .. . 1 . In the HTTP Authorization header as defined in OAuth HTTP Authorization Scheme . 2 . As the HTTP POST request body with a content-type of application x-www-form-urlencoded . .. . 3 . Added to the URLs in the query part as defined by RFC3986 section 3 . You are doing 3 when you should be doing 2 instead . The correct POST request would look something like this : .. . .. . You mention that you are using Indy so such a POST request can be sent using code like this : .. . .. . Take particular note of the oauth signature value . What gets sent to the server must be url-encoded : .. . .. . By default TIdHTTP will url-encode the TStringList data for you when preparing the POST request so do not put url-encoded data in the TStringList : .. . .. . However if you want to put url-encoded data in the TStringList you will have to disable the hoForceEncodeParams flag in the TIdHTTP.HTTPOptions property . TIdHTTP will still send the TStringList data as name-value pairs with characters in between each pair but each pair s name and value will be sent as-is without being url-encoded by TIdHTTP . Comment : Remy Thank you so much for your clear and concise reply HOWEVER I am STILL getting a 401 Unauthorized error back from Intuit using the posting method you outlined above . I sent a post to a non-https url on our server so I could see the content going over the wire with Wireshark and it looks pretty much like your example . There are additional parameters for Accept and Accept-Encoding and User-Agent . I double-checked to make sure the signature is not being double-ULR-encoded . Any suggestions Comment : I also noticed my post was HTTP 1.0 not HTTP 1.1 even though I have ProtocolVersion set to pv1 1 . I m not sure that matters but I m looking at anything at this point . Comment : OK see in Indy code that HTTP 1.0 is always forced for POST . ADDITIONAL INFO : I dug through the headers of the reply from Intuit in the INDY code and am seeing the same signature invalid reply : WWW-Authenticate : OAuth oauth problem signature invalid FULL HEADERS : Date : Thu 13 Feb 2014 15 : 16 : 31 GMT D A Server : Apache D A WWW-Authenticate : OAuth oauth problem signature invalid D A Cache-Control : no-cache no-store D A Pragma : no-cache D A Content-Length : 31 D A Connection : close D A Content-Type : text plain D A X-Pad : avoid browser bug D A Comment : You can enable the hoKeepOrigProtocol flag in the HTTPOptions property to send an HTTP 1.1 request . You might also try sending the data In the HTTP Authorization header as defined in OAuth HTTP Authorization Scheme . 1 on Intuit s list of preferred transmission schemes which is also suggested by the presence of the WWW-Authenticate : OAuth header . You can use TIdHTTP.Request.CustomHeaders.Values Authorization : .. . for that . If it still does not work then you will likely have to contact Intuit and have them debug the data you are sending to them .", "Question : Is there anyway to get at my clients Tax Agencies when creating an invoice I m using the C IPP DevKit against QBO . I don t see it mentioned in the documentation however I can t imagine I ll be required to hard code all my clients tax tables into my app as that is silly . Comment : Contact Intuit developer support. . Comment : Are you looking for tax AGENCY data e.g . a Vendor in QuickBooks or tax RATES Those are two very different types of data and your question makes it sound as-if you re not quite sure which you re looking for.. . Comment : This is for QBO btw . When I m creating a new invoice I would prefer to select on of the named Tax Rate Agencies that are set up in : Company- Sales Tax- Add Edit tax rates and agencies so my clients can use the Sales Tax Center instead of having all the sales tax showing as Original Sales Tax on the invoices and lumping all together . Comment : and lumping all together in the sales tax center . Comment : OK those aren t really agencies in terms of the API those are a list of sales tax rates . So Jarred s answer isn t going to be applicable as it wasn t real clear what you were asking for . See my answer below and a related forum thread link . .. . Answer : What you re looking for the list of tax rates is not really what you re asking for tax agencies . In any case this thread answers your question : https : idnforums.intuit.com messageview.aspx catid 87 threadid 18930 enterthread y https : idnforums.intuit.com messageview.aspx catid 87 threadid 18930 enterthread y .. . .. . Unfortunately the answer is : .. . .. . In the current SDK or Services V2 this is a limitation that the tax code Id is not retained due to tax model changes . This limitation will be addressed in QBO Service V3 . Thus what you re trying to do can t be done right now . Comment : hehe the mythical v3 . Once again thanks for your help . Comment : Hahahaha you got that right I ve been asking for MONTHS now for an update on status.. . the guy who was leading the v3 project is on a different project now and doesn t know anything . The last v3 schema Intuit released was complete and utter crap - littered with problems . Who knows what or when they ll actually release . Ick Comment : Did you go to the V3 Webinar on 2 22 2013 If you missed it there is a recording here : ippblog.intuit.com blog 2013 02 http : ippblog.intuit.com blog 2013 02 quickbooks-api-v3-webinar-recording.html Comment : Thanks After 6 months without an update and 6 months of falling behind schedule it s about time Intuit communicated something to developers .", "Question : Been developing a simple application using the Intuit Quickbooks SDK Desktop and everything has been working great for the last 3 months of development . I put development on hold for a couple of weeks come back and my app just won t open the Quickbooks 2015 Enterprise data file . I can open it in Quickbooks make changes and it works fine file integrity is perfect - no errors . When I initiate the QBsessionManager I get an error : Could not start Quickbooks . This happens whether Quickbooks is open closed multiuser or single user mode makes no difference . As other forums suggested I looked to see if there was another phantom version of QB opened in taskmanager - there is not . Makes no difference . MultiUser SingleUser DontCare open mode does not matter either . This code has been working fine for months - suddenly does not work at all . In the QBSDKLOG.txt file I see the following : .. . .. . The only thing I can think of that changed is that Windows 8.1 had some updates that somehow make Quickbooks 2015 Enterprise incompatible with Windows Quickbooks has been plaqued with bugs like this for years but Intuit forums do not indicate a new bug cropping up - so I m at a loss . I can only guess as to what this new problem could be . NOTE : I m developing in Visual Studio 2015 on Windows 8.1 .. . Answer : There can be quite a few causes but one that always gets me and our users -- if you are running QuickBooks as Windows Administrator the Integrated Application your app must also be run as Windows Administrator and vice-versa . From the log you posted it looks like your app is running as Administrator . Like you said it s always good to make sure there aren t any phantom QBW32.exes running but if there are and you re not running QB Enterprise that usually gives a different error . If that doesn t do the trick this site has a list of 7 possible causes but for me it s usually the first thing I listed above : http : www.clearify.com wiki view 381 error-80040408-quickbooks-doesn-t-start Comment : Running VS2015 as an admin was the culprit I just realized I had to run VS as an admin for another project . I ll make a note of this . Comment : For others that are looking here are some more troubleshooting tips - intuitdeveloper.lc.intuit.com questions https : intuitdeveloper.lc.intuit.com questions 1143302-troubleshooting-could-not-start-quickbooks", "Question : I m trying to send a couple of quickbooks queries together in a batch request . I ve followed the formatting that Intuit gives here https : developer.intuit.com docs 0025 quickbooksapi 0050 data services 020 key concepts 00700 batch operation but I keep getting a ValidationFault . I m not sure what s causing the error so any help would be greatly appreciated . Thanks XML : .. . .. . Response I get back : .. . Answer : It turns out Intuit s documentation is incorrect at least for its QBOv3 REST API . At https : developer.intuit.com docs 0025 quickbooksapi 0050 data services 020 key concepts 00700 batch operation Intuit says the XML should be formatted in the way I showed in my first post but it should actually be formatted like so : .. . .. . I hope this helps others in the future Thanks for all of the replies they helped to narrow down the issue .", "Question : Here I am provideing you the complete scenario where I am getting the error while posting request for creating a new account . I am using Intuit OAuth Access and OAuth API console for testing Using all security tokens . https : appcenter.intuit.com Playground OAuth .. . .. . And the URL and request : .. . .. . Method : Post .. . .. . Format : XML JSON .. . .. . And getting the response error in html : .. . .. . and I have also checked with RESTClient utility but getting the same above error . Please note that the same url https : services.intuit.com sb account v2 570357960 with same security tokens is working fine for GET data I am getting data from QB desktop into my online Application . Comment : Post the rest of your HTTP request - e.g . your Content-Type and other HTTP headers . Comment : ContentType : application xml and Oauth credentials : OAuth realm https 3A 2F 2Fservices.intuit.com 2Fsb 2Faccount 2Fv2 2F570357960 oauth version 1.0 oauth signature method HMAC-SHA1 oauth nonce 5GUvzx2n8hzHhQd oauth timestamp 1358852371 oauth consumer key qyprdj6FkwCXWoq9Q8oRYlz33HXfN8 oauth token qyprdOFFjaKyki2o9pKUt0OoXXuFdaOc4520PHrNsQh24NTK oauth signature nClDmMfbDcurX0EjUJz69yxBtzQ 3D Comment : Getting error on RESTClient different from Playground : RestResponse Error RequestId 4a778df7fff740ae9c28931649af473e RequestName ErrorRequest RequestName ProcessedTime 2013-01-22T10 : 57 : 42+00 : 00 ProcessedTime ErrorCode 3200 ErrorCode ErrorDesc message Exception authenticating OAuth errorCode 003200 statusCode 401 source OAuthStrategy oauth problem signature invalid cause net.oauth.OAuthProblemException : signature invalid ErrorDesc Error RestResponse Comment : ConsumerKey : qyprdj6FkwCXWoq9Q8oRYlz33HXfN8 ConsumerSecret : WHElfjFy5ip8C7UGFQdSRnl9hCeDq4fivvyxTnX6 AccessToken : qyprdOFFjaKyki2o9pKUt0OoXXuFdaOc4520PHrNsQh24NTK TokenSecret : 73yLwpW3VZg3So5gURbDrUBtXQkV5CjToCbb6rkI And Request body is same as above . .. . Answer : As Keith said check the Content-Type . You will also need to use a RestClient for testing . The playground will not work for testing API calls . It only works for platform calls . Comment : My Issue resolved . Use this new utilty from intuit to test : apiexplorer.developer.intuit.com http : apiexplorer.developer.intuit.com" ] }
[ "yes-answer-long", "yes-answer-short" ]
quickbooks
UNK_RELATION
pocketgrid@grid-system@52
pocketgrid -- pocketgrid is a simple and small css @placeholder entirely based on css rules to define elements size .
{ "confidence": [ 54.99367904663086, 54.62551498413086, 54.60778045654297, 54.454750061035156, 52.946102142333984, 49.47254943847656, 46.00279998779297, 43.884220123291016, 39.12971115112305, 39.01616668701172, 38.549171447753906, 35.28401184082031, 33.06028747558594, 27.787458419799805, 26.50684356689453, 24.985424041748047, 24.985424041748047, 24.985424041748047, 22.936079025268555, 22.936079025268555, 22.936079025268555, 22.202800750732422, 20.27703857421875, 18.751853942871094, 18.219173431396484, 17.57245445251465, 17.481853485107422, 15.937313079833984, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281, 13.197944641113281 ], "content": [ "I just found this very interesting Grid Framework : PocketGrid http : arnaudleray.github.io pocketgrid docs basic-rules .", "I am using Pocketgrid http : arnaudleray.github.io pocketgrid to make the website responsive .", "I use PocketGrid http : arnaudleray.github.io pocketgrid docs creating-rows-and-columns-the-cool-way as CSS framework in particular its automatic rows http : arnaudleray.github.io pocketgrid docs automatic-rows-in-real-life feature and I would like to size each one using CSS indexes and not specific class name .", "I m ignoring default PocketGrid rules and consider only your custom code : .. . .. . the following rules are unuseful because PocketGrid has a Mobile First approach http : arnaudleray.github.io pocketgrid docs mobile-layout so this is default behaviour .", "I m the author of PocketGrid .", "I have the following HTML code : .. . .. . And I am using PocketGrid http : arnaudleray.github.io pocketgrid to have a responsive grid .", "You can find explanations in the documentation : arnaudleray.github.io pocketgrid docs gutters http : arnaudleray.github.io pocketgrid docs gutters You should not set a background on blocks .", "I m quite new to PocketGrid as I m just discovering it today .", "The way that pocketgrid works is that the thirty-block class should stack on top of seventy-block class when I reduce the size of my browser to that of a mobile device .", "I am starting a free project based on your PocketGrid and I would like to discuss about it with you in order to exchange links each other .", "I looked though the example provided by the pocketgrid - jsfiddle.net Ltydw83L http : jsfiddle.net Ltydw83L Now it works", "The default behavior of PocketGrid is to use top-left negative margins to manage gutters to allow having a full-page grid without external margins around .", "colored bar http : i.stack.imgur.com G34Ql.png .. . .. . The gutters are being placed using a technique described by the pocketgrid documentation http : arnaudleray.github.io pocketgrid docs gutters : .. . .. . There is a codepen here which provides a working example : http : codepen.io ghoti143 pen eZNXVW .. . .. . The problem I face is that when the relative proportion of any one color is sufficiently small the last color area wraps to the next line and looks like this : .. . .. .", "It s interesting beacuse it is only css no html classes to define object width so it totally respects principle about separation between content and style defined for html+css specs and it s minimal .", "There are no media-queries in the above css for your blocks", "The HTML : .. . .. . The CSS : .. . .. . Also on jsfiddle http : jsfiddle.net 4ZU64 28 .", "This is what my HTML looks like : .. . .. . This is what my CSS looks like :", "The problem is that CSS will not allow complex identifiers like you require .", "HTML : .. . .. . CSS : .. . .. . The drawback is that you need to declare the sidebar blocks before the main block.. . .. . .. . Hope this helps", "Hi arnaud I solved it with calc that is a very interesting css property even if not compatible with IE8 .", "You can use the css calc function to subtract out the 1px margins from the width calculations for each section .", "http : jsfiddle.net vmggcv0g .. . .. . Using the following query to change the list item state on mobiles when the screen is less than 480px : .. . .. . along with the box-sizing property to allow padding and borders on the list items with out this property the item width would exceed the 100 width as it will include the 1px border : .. . .. . Here s a great css-tricks article explaining the box-sizing property and css box model further : .. . .. . http : css-tricks.com box-sizing", "If I understand this correctly all you need to do is change your CSS to the following : .. . .. . Side note : your br tags should be br for jsfiddle to interpret them correctly .", "Thank you - I updated the CSS that I copied and pasted form your original fiddle that was sloppy of me not to so that you are only targeting .block : nth-of-type and it doesn t matter if you use line-breaks .. . : nth-child will count any children of the parent and mess with the math a little and break the pattern .", "The problem here is that in some situations the bars are too small now don t take up the whole width of the container .", "A few of the requirements are that there be a 1px gutter between the colors and that every color must be shown at a minimum of 1px no matter how small the relative width .", "It is a bar which shows colored areas in relative proportion to each other based on the input .", "You can still use the mixin in the media-query as long as you use the extend pseudo-elements in your selectors instead of in the mixin : .. . .. . and remove them from the mixin : .. . .. . See CodePen http : codepen.io helderdarocha pen sLuDl editors 110", "There are several example of it s power onto the link but... .", "I didn t find one of the most interesting : possibility to have a fixed width of a column i.e .", "Navigation one sided by another one that instead spans on all remaining horizonal space... .", "I found this link How do I float two divs side-by-side without specifying a width", "http : stackoverflow.com questions 8089590 how-do-i-float-two-divs-side-by-side-without-specifying-a-width but it does not run if I have an header floated due to Grid layout above navigation and content .", "Please could you help me", "I made a JSFiddle example for your problem : http : jsfiddle.net arleray 4ZU64 .. . .. . It uses the overflow : hidden trick to make the main block fluid between 2 fixed-width sidebars", "I ll study your proposed solution and maybe I ll replace my solution with yours .", "Thank you .", "Please can you contact me", "My email is in my profile .", "Thank you", "@LucaDetomi Could you mark my answer as accepted if it s ok for you", "Thanks", "So please forgive me if I m abusing your grid framework.. .", "Here s one alternate approach not requiring the use of calc and allowing you to markup your main content before the sidebars or in any order you like .", "This requires one extra container div containing the main block and sidebars .", "This container div is positioned relative to allow the absolute positioning of the 2 fixed-width sidebars .", "it s a great solution too especially for blocks order independence .", "As you told it requires an extra markup for container div but it s browser compatibility is surely more than calc solution .", "I created an Example http : codepen.io mdmoura pen AyaCt .. . .. . My LESS code is the following : .. . .. . QUESTION .. . .. . Is it possible to create a LESS Mixin so that I can reuse it to create many grids in a page and specifying the number of colums and gutter as parameters .", "I tried to change the code but I always get problems because of Extend .", "Could someone please help me out in making this code a mixin", "I would like to be able to use something like this : .. . .. . And also another wrapper in the same page and do something similar : .. . .. . Thank You Miguel", "What do you want in the mixin", "What problems did you have because of extend", "I placed the media-queries in the empty mixin you provided : codepen.io helderdarocha pen lyIkB editors 110 http : codepen.io helderdarocha pen lyIkB editors 110 What else do you want it to do", "I just update my question to better explain what I was trying to do .. .", "I wanted a more straight forward way to apply a grid to an element .", "It this possible", "If you call your mixin within the context of .wrapper you won t have any .block and .block-group selectors but .wrapper .block and .wrapper .block-group and your : extend will not match anything .", "You could pass the selector as a parameter to the mixin but the extend will also not match interpolated variables .", "Also you need to match top-level .block and .block-group so it even if it did match variables it wouldn t work anyway .", "You can call the mixin as you suggested and you can pass the name of the selector in a variable if you wish to apply a style to the div nested in your selector .", "So you could have this : .. . .. . which is like you suggested but passing the selector name as a parameter .", "Since the mixins are being called at top-level the .block selectors will be top-level as well and only the div selector will placed under the .wrapper context : .. . .. . There is one problem with the mixin above .", "Since you are going to call it inside the media query the scope of the extend will also be limited to the media-query .", "That s OK if you didn t have to extend any global selectors but in your case you do .", "I added a new wrapper to your example and a div in between .. . Something strange happens : the second wrapper has a top padding and the middle div overlaps that green area .", "Any idea why", "Here is the link : codepen.io mdmoura pen pgdEa http : codepen.io mdmoura pen pgdEa", "That s a padding .", "I m not sure what your expected result is but the order of padding margin is top right bottom left .", "Your gutter happens on top and left .", "Is that what you want", "The top one is not visible probably because it s negative margin is hiding it but if you place some div before the first wrapper you will see it .", "Perhaps what you want is : 0 -@gutter 0 -@gutter", "I am not 100 certain of the exact output you seek but I believe the following gives the essence of what you want which should at least get you what you need to make what you desire .", "But this isn t happening .", "Where am I going wrong", "Thanks pete for pointing out .", ":", "It seems you ve already sorted it but just for further and future help to anyone else having a similar issue with this or media-queries here s an example showing a similar navigation with a mobile media query change .", "Considering that you would 30-70 proportions only above mobile breakpoints you should include them in a specific media-query like : .. . .. . On screens below 480px wide every item is stacked over it you ll have 30-70 cols side-by-side", "I have 6 floated DIVs in two rows .", "I tried it in this jsFiddle http : jsfiddle.net pfg40qd1 but even if first 3 blocks first row are sized correctly next 3 ones are not .", "How to set .block : nth-child .. . in order to have : .. . .. . 1st and 4th blocks with 40 width .. . 2nd and 5th blocks with 20 and so on", "are you looking for odd and even", ": nth-child even and : nth-child odd", "No in general each block has an indepent width .", "Here casually first and thirs have the same but in general as I wrote I would like to set a different width for each block obviously in case of 100 DIVs first fourth seventh will have the same and similarly second fifth eighth and so on", "This solution works", "just a question : is a little counter-intuitive reasoning with negative values .", "Is possible to obtain the same result with positive values ad in Maioman solution that anyway does not run for the moment", "Sure you can", "See my edited answer .", "Old habit to go backwards for compatibility in an old program I used to use", "So basically you want .. . .. . .. . .. . 3n for every 3rd .block and 3n+1 for every .block after the 3rd block which includes the first block and .. . .. . .. . .. . 3n+2 for the middle .block second .block after the 3rd .block on each row which includes the second .block in the first row .", "This pattern will work for every row no matter how many rows you add as long as you want have 3 columns .", "Demo here https : jsfiddle.net Jayx 26101p20 1", "Great solution" ] }
{ "confidence": [ 78.07390594482422, 71.03672790527344, 70.7419662475586, 64.6999740600586, 60.94629669189453, 60.94629669189453, 60.94629669189453, 59.46719741821289, 55.824337005615234, 50.628543853759766, 43.18103790283203 ], "content": [ "Question : I am using Pocketgrid http : arnaudleray.github.io pocketgrid to make the website responsive . The way that pocketgrid works is that the thirty-block class should stack on top of seventy-block class when I reduce the size of my browser to that of a mobile device . But this isn t happening . Where am I going wrong This is what my HTML looks like : .. . .. . This is what my CSS looks like : Comment : There are no media-queries in the above css for your blocks Comment : Thanks pete for pointing out . I looked though the example provided by the pocketgrid - jsfiddle.net Ltydw83L http : jsfiddle.net Ltydw83L Now it works : .. . Answer : I m ignoring default PocketGrid rules and consider only your custom code : .. . .. . the following rules are unuseful because PocketGrid has a Mobile First approach http : arnaudleray.github.io pocketgrid docs mobile-layout so this is default behaviour . Considering that you would 30-70 proportions only above mobile breakpoints you should include them in a specific media-query like : .. . .. . On screens below 480px wide every item is stacked over it you ll have 30-70 cols side-by-side", "Question : I just found this very interesting Grid Framework : PocketGrid http : arnaudleray.github.io pocketgrid docs basic-rules . It s interesting beacuse it is only css no html classes to define object width so it totally respects principle about separation between content and style defined for html+css specs and it s minimal . There are several example of it s power onto the link but... . I didn t find one of the most interesting : possibility to have a fixed width of a column i.e . Navigation one sided by another one that instead spans on all remaining horizonal space... . I found this link How do I float two divs side-by-side without specifying a width http : stackoverflow.com questions 8089590 how-do-i-float-two-divs-side-by-side-without-specifying-a-width but it does not run if I have an header floated due to Grid layout above navigation and content . Please could you help me .. . Answer : I m the author of PocketGrid . I made a JSFiddle example for your problem : http : jsfiddle.net arleray 4ZU64 .. . .. . It uses the overflow : hidden trick to make the main block fluid between 2 fixed-width sidebars HTML : .. . .. . CSS : .. . .. . The drawback is that you need to declare the sidebar blocks before the main block.. . .. . .. . Hope this helps Comment : Hi arnaud I solved it with calc that is a very interesting css property even if not compatible with IE8 . I ll study your proposed solution and maybe I ll replace my solution with yours . Thank you . I am starting a free project based on your PocketGrid and I would like to discuss about it with you in order to exchange links each other . Please can you contact me My email is in my profile . Thank you Comment : @LucaDetomi Could you mark my answer as accepted if it s ok for you Thanks", "Question : I am using Pocketgrid http : arnaudleray.github.io pocketgrid to make the website responsive . The way that pocketgrid works is that the thirty-block class should stack on top of seventy-block class when I reduce the size of my browser to that of a mobile device . But this isn t happening . Where am I going wrong This is what my HTML looks like : .. . .. . This is what my CSS looks like : Comment : There are no media-queries in the above css for your blocks Comment : Thanks pete for pointing out . I looked though the example provided by the pocketgrid - jsfiddle.net Ltydw83L http : jsfiddle.net Ltydw83L Now it works : .. . Answer : It seems you ve already sorted it but just for further and future help to anyone else having a similar issue with this or media-queries here s an example showing a similar navigation with a mobile media query change . http : jsfiddle.net vmggcv0g .. . .. . Using the following query to change the list item state on mobiles when the screen is less than 480px : .. . .. . along with the box-sizing property to allow padding and borders on the list items with out this property the item width would exceed the 100 width as it will include the 1px border : .. . .. . Here s a great css-tricks article explaining the box-sizing property and css box model further : .. . .. . http : css-tricks.com box-sizing", "Question : I just found this very interesting Grid Framework : PocketGrid http : arnaudleray.github.io pocketgrid docs basic-rules . It s interesting beacuse it is only css no html classes to define object width so it totally respects principle about separation between content and style defined for html+css specs and it s minimal . There are several example of it s power onto the link but... . I didn t find one of the most interesting : possibility to have a fixed width of a column i.e . Navigation one sided by another one that instead spans on all remaining horizonal space... . I found this link How do I float two divs side-by-side without specifying a width http : stackoverflow.com questions 8089590 how-do-i-float-two-divs-side-by-side-without-specifying-a-width but it does not run if I have an header floated due to Grid layout above navigation and content . Please could you help me .. . Answer : I m quite new to PocketGrid as I m just discovering it today . So please forgive me if I m abusing your grid framework.. . Here s one alternate approach not requiring the use of calc and allowing you to markup your main content before the sidebars or in any order you like . This requires one extra container div containing the main block and sidebars . This container div is positioned relative to allow the absolute positioning of the 2 fixed-width sidebars . The HTML : .. . .. . The CSS : .. . .. . Also on jsfiddle http : jsfiddle.net 4ZU64 28 . Comment : it s a great solution too especially for blocks order independence . As you told it requires an extra markup for container div but it s browser compatibility is surely more than calc solution .", "Question : I have 6 floated DIVs in two rows . I use PocketGrid http : arnaudleray.github.io pocketgrid docs creating-rows-and-columns-the-cool-way as CSS framework in particular its automatic rows http : arnaudleray.github.io pocketgrid docs automatic-rows-in-real-life feature and I would like to size each one using CSS indexes and not specific class name . I tried it in this jsFiddle http : jsfiddle.net pfg40qd1 but even if first 3 blocks first row are sized correctly next 3 ones are not . How to set .block : nth-child .. . in order to have : .. . .. . 1st and 4th blocks with 40 width .. . 2nd and 5th blocks with 20 and so on Comment : are you looking for odd and even : nth-child even and : nth-child odd Comment : No in general each block has an indepent width . Here casually first and thirs have the same but in general as I wrote I would like to set a different width for each block obviously in case of 100 DIVs first fourth seventh will have the same and similarly second fifth eighth and so on .. . Answer : If I understand this correctly all you need to do is change your CSS to the following : .. . .. . Side note : your br tags should be br for jsfiddle to interpret them correctly . Comment : This solution works just a question : is a little counter-intuitive reasoning with negative values . Is possible to obtain the same result with positive values ad in Maioman solution that anyway does not run for the moment Comment : Sure you can See my edited answer . Old habit to go backwards for compatibility in an old program I used to use", "Question : I have 6 floated DIVs in two rows . I use PocketGrid http : arnaudleray.github.io pocketgrid docs creating-rows-and-columns-the-cool-way as CSS framework in particular its automatic rows http : arnaudleray.github.io pocketgrid docs automatic-rows-in-real-life feature and I would like to size each one using CSS indexes and not specific class name . I tried it in this jsFiddle http : jsfiddle.net pfg40qd1 but even if first 3 blocks first row are sized correctly next 3 ones are not . How to set .block : nth-child .. . in order to have : .. . .. . 1st and 4th blocks with 40 width .. . 2nd and 5th blocks with 20 and so on Comment : are you looking for odd and even : nth-child even and : nth-child odd Comment : No in general each block has an indepent width . Here casually first and thirs have the same but in general as I wrote I would like to set a different width for each block obviously in case of 100 DIVs first fourth seventh will have the same and similarly second fifth eighth and so on .. . Answer : So basically you want .. . .. . .. . .. . 3n for every 3rd .block and 3n+1 for every .block after the 3rd block which includes the first block and .. . .. . .. . .. . 3n+2 for the middle .block second .block after the 3rd .block on each row which includes the second .block in the first row . This pattern will work for every row no matter how many rows you add as long as you want have 3 columns . Demo here https : jsfiddle.net Jayx 26101p20 1 Comment : Great solution : - Comment : Thank you - I updated the CSS that I copied and pasted form your original fiddle that was sloppy of me not to so that you are only targeting .block : nth-of-type and it doesn t matter if you use line-breaks .. . : nth-child will count any children of the parent and mess with the math a little and break the pattern .", "Question : I have 6 floated DIVs in two rows . I use PocketGrid http : arnaudleray.github.io pocketgrid docs creating-rows-and-columns-the-cool-way as CSS framework in particular its automatic rows http : arnaudleray.github.io pocketgrid docs automatic-rows-in-real-life feature and I would like to size each one using CSS indexes and not specific class name . I tried it in this jsFiddle http : jsfiddle.net pfg40qd1 but even if first 3 blocks first row are sized correctly next 3 ones are not . How to set .block : nth-child .. . in order to have : .. . .. . 1st and 4th blocks with 40 width .. . 2nd and 5th blocks with 20 and so on Comment : are you looking for odd and even : nth-child even and : nth-child odd Comment : No in general each block has an indepent width . Here casually first and thirs have the same but in general as I wrote I would like to set a different width for each block obviously in case of 100 DIVs first fourth seventh will have the same and similarly second fifth eighth and so on .. . Answer : The problem is that CSS will not allow complex identifiers like you require . You are trying to format the following children : .. . .. . The only way I could think of doing it is to add a spacing div to ensure an even number of divs line then assign odd and even children a different style . http : jsfiddle.net pfg40qd1 2 .. . .. . EDIT : Alternatively if you know that there will always be three row just.. . .. . .. . ...and format the blocks with respect to the row div . Comment : Result that you posted is effectively what I need but If I have to use spacer divs so I would use class name on each one avoid to add non semantic divs . In some way I already used complex identifiers in clear : none clear : left descendants so I think that is possible in some ways Comment : Seems like @jaunt has cracked it .", "Question : I have 6 floated DIVs in two rows . I use PocketGrid http : arnaudleray.github.io pocketgrid docs creating-rows-and-columns-the-cool-way as CSS framework in particular its automatic rows http : arnaudleray.github.io pocketgrid docs automatic-rows-in-real-life feature and I would like to size each one using CSS indexes and not specific class name . I tried it in this jsFiddle http : jsfiddle.net pfg40qd1 but even if first 3 blocks first row are sized correctly next 3 ones are not . How to set .block : nth-child .. . in order to have : .. . .. . 1st and 4th blocks with 40 width .. . 2nd and 5th blocks with 20 and so on Comment : are you looking for odd and even : nth-child even and : nth-child odd Comment : No in general each block has an indepent width . Here casually first and thirs have the same but in general as I wrote I would like to set a different width for each block obviously in case of 100 DIVs first fourth seventh will have the same and similarly second fifth eighth and so on .. . Answer : you can use a syntax like nth-of-type 4n+1 nth-of-type 4n+2 nth-of-type 4n+3 and nth-of-type 4n+4 .. . .. . I suggest the use if nth-of-type instead of nth-child because it s suites better in your case .. . .. . check fiddle http : jsfiddle.net pfg40qd1 3 Comment : Mhmmm perfect fot nth-of-type suggestion but yours proposal about 4n+X does not run.. . Comment : @LucaDetomi in your fiddle it looked like you had a four cycle. . nevermind", "Question : I am creating a UI control . It is a bar which shows colored areas in relative proportion to each other based on the input . A few of the requirements are that there be a 1px gutter between the colors and that every color must be shown at a minimum of 1px no matter how small the relative width . The bar looks like this : .. . .. . colored bar http : i.stack.imgur.com G34Ql.png .. . .. . The gutters are being placed using a technique described by the pocketgrid documentation http : arnaudleray.github.io pocketgrid docs gutters : .. . .. . There is a codepen here which provides a working example : http : codepen.io ghoti143 pen eZNXVW .. . .. . The problem I face is that when the relative proportion of any one color is sufficiently small the last color area wraps to the next line and looks like this : .. . .. . enter image description here http : i.stack.imgur.com Z7rIf.png .. . .. . To replicate this issue visit the codepen project and enter this as the Threshold Array value : .. . .. . In this case the width style of the LightGreen area is 0.33333 . This equates to 0.495px at a bar width of 150px . However because of the requirement to always show at least 1px of width for each color the LightGreen area is consuming 2px of width 1px content + 1px padding . Thanks for any insights you may have .. . Answer : You can use the css calc function to subtract out the 1px margins from the width calculations for each section . For example http : codepen.io anon pen ZWGNVY Comment : Good suggestion The problem here is that in some situations the bars are too small now don t take up the whole width of the container . There are only 3 spacers 3px but a total of 4px is being subtracted .", "Question : I have the following HTML code : .. . .. . And I am using PocketGrid http : arnaudleray.github.io pocketgrid to have a responsive grid . I created an Example http : codepen.io mdmoura pen AyaCt .. . .. . My LESS code is the following : .. . .. . QUESTION .. . .. . Is it possible to create a LESS Mixin so that I can reuse it to create many grids in a page and specifying the number of colums and gutter as parameters . I tried to change the code but I always get problems because of Extend . Could someone please help me out in making this code a mixin I would like to be able to use something like this : .. . .. . And also another wrapper in the same page and do something similar : .. . .. . Thank You Miguel Comment : What do you want in the mixin What problems did you have because of extend I placed the media-queries in the empty mixin you provided : codepen.io helderdarocha pen lyIkB editors 110 http : codepen.io helderdarocha pen lyIkB editors 110 What else do you want it to do Comment : I just update my question to better explain what I was trying to do .. . I wanted a more straight forward way to apply a grid to an element . It this possible .. . Answer : If you call your mixin within the context of .wrapper you won t have any .block and .block-group selectors but .wrapper .block and .wrapper .block-group and your : extend will not match anything . You could pass the selector as a parameter to the mixin but the extend will also not match interpolated variables . Also you need to match top-level .block and .block-group so it even if it did match variables it wouldn t work anyway . You can call the mixin as you suggested and you can pass the name of the selector in a variable if you wish to apply a style to the div nested in your selector . So you could have this : .. . .. . which is like you suggested but passing the selector name as a parameter . Since the mixins are being called at top-level the .block selectors will be top-level as well and only the div selector will placed under the .wrapper context : .. . .. . There is one problem with the mixin above . Since you are going to call it inside the media query the scope of the extend will also be limited to the media-query . That s OK if you didn t have to extend any global selectors but in your case you do . You can still use the mixin in the media-query as long as you use the extend pseudo-elements in your selectors instead of in the mixin : .. . .. . and remove them from the mixin : .. . .. . See CodePen http : codepen.io helderdarocha pen sLuDl editors 110 Comment : I added a new wrapper to your example and a div in between .. . Something strange happens : the second wrapper has a top padding and the middle div overlaps that green area . Any idea why Here is the link : codepen.io mdmoura pen pgdEa http : codepen.io mdmoura pen pgdEa Comment : That s a padding . I m not sure what your expected result is but the order of padding margin is top right bottom left . Your gutter happens on top and left . Is that what you want The top one is not visible probably because it s negative margin is hiding it but if you place some div before the first wrapper you will see it . Comment : Perhaps what you want is : 0 -@gutter 0 -@gutter Comment : The default behavior of PocketGrid is to use top-left negative margins to manage gutters to allow having a full-page grid without external margins around . You can find explanations in the documentation : arnaudleray.github.io pocketgrid docs gutters http : arnaudleray.github.io pocketgrid docs gutters You should not set a background on blocks .", "Question : I have the following HTML code : .. . .. . And I am using PocketGrid http : arnaudleray.github.io pocketgrid to have a responsive grid . I created an Example http : codepen.io mdmoura pen AyaCt .. . .. . My LESS code is the following : .. . .. . QUESTION .. . .. . Is it possible to create a LESS Mixin so that I can reuse it to create many grids in a page and specifying the number of colums and gutter as parameters . I tried to change the code but I always get problems because of Extend . Could someone please help me out in making this code a mixin I would like to be able to use something like this : .. . .. . And also another wrapper in the same page and do something similar : .. . .. . Thank You Miguel Comment : What do you want in the mixin What problems did you have because of extend I placed the media-queries in the empty mixin you provided : codepen.io helderdarocha pen lyIkB editors 110 http : codepen.io helderdarocha pen lyIkB editors 110 What else do you want it to do Comment : I just update my question to better explain what I was trying to do .. . I wanted a more straight forward way to apply a grid to an element . It this possible .. . Answer : I am not 100 certain of the exact output you seek but I believe the following gives the essence of what you want which should at least get you what you need to make what you desire ." ] }
[ "yes-answer-long", "yes-answer-short" ]
grid-system
UNK_RELATION
popupcontrolextender@asp.net@83
popupcontrolextender -- the popupextender is part of the ajax control toolkit for @placeholder .
{ "confidence": [ 28.4920654296875, 27.998825073242188, 27.918701171875, 27.11682891845703, 25.356739044189453, 25.356739044189453, 25.356739044189453, 25.15536117553711, 24.063390731811523, 24.063390731811523, 24.063390731811523, 23.92464828491211, 22.73236846923828, 20.935699462890625, 20.89626693725586, 20.02083969116211, 19.27650260925293, 18.72749137878418, 18.279193878173828, 18.279193878173828, 17.51909065246582, 17.32694435119629, 17.32694435119629, 17.32694435119629, 17.248443603515625, 17.177379608154297, 17.11883544921875, 17.11883544921875, 14.751569747924805, 14.751569747924805, 14.751569747924805, 14.751569747924805, 14.483482360839844, 14.177644729614258, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 12.802010536193848, 11.508661270141602, 11.508661270141602, 11.508661270141602, 11.508661270141602, 11.508661270141602, 11.508661270141602, 11.508661270141602, 11.508661270141602 ], "content": [ "Solved by updating AJAX Control Toolkit to it s last version v15.1 from March 2015", "Each column contains either a DropDownList OR a TextBox a CheckBoxList and a PopUpControlExtender .", "First column is named Action which when clicked will display the ajax popupcontrolextender panel with two links Approve Reject .", "I would like to call a popup of the popupcontrolextender programmatically .", "I m currently playing around with the PopupControlExtender in the ajaxToolkit and can t quite get the functionality I want .", "So I use PopupControlExtender to edit some of the fields inside ListViewControl which itself is embedded inside an UpdatePanel .", "I have an PopupControlExtender that keeps giving a Web Service call failed : 500 error instead of showing the popup .", ".. . cc1 : PopupControlExtender .. . ItemTemplate .. . asp : TemplateField .. . Columns .. . asp : GridView .. . .. . asp : GridView ID GridView2 .. . .. .", "Is it possible to implement a context menu which appears when users perform a right-click on an item of interest using the PopupControlExtender", "If it is possible to do a right-click with the PopupControlExtender may I get some code examples", "Just have a hidden button on the form-for the PopupControlExtender then capture the right-click and call document.getElementById bla .click .. . .. . JS : .. . .. . Markup :", "From investigations so far it seems like the PopupControlExtender only works with left-clicks or the other choices are to write your own control or implement the entire solution in jQuery .", "Below is the code for the colun that contains both the targetControl image as well as the AJAX control itself .", "Below is the call to the popup extender control declaration .", "The PopupControlExtender can popup many ASP.NET controls but only examples popup a panel can be found on Internet.. . How to popup other controls such as a gridview", "Here is the code for the ajax control : .. . .. . Here is the code for the DynamicServiceMethod I have intentionally stripped it down to a simple span to just try to get something to display .. . .. . .. . And here is the panel I am using as the PopupControlID.. .", "A user of my web-applications is getting a web service 500 error when using the popup extender control .", "I m followed this tutorial http : www.ezzylearning.com tutorial display-gridview-row-details-using-asp-net-ajax-popup-control but I m getting runtime-error when mouseover : .. . .. . Sys.ArgumentUndefinedException : Value cannot be undefined .", "When you postback with popup panel the server-side control eg .", "The web service is actual built within a user control on the same page .", "Same as panel control just use the gridview control id instead of panel control id .", "The script will be invoked automatically after Postback .. . .. . Course there is possible to make it dynamic recalling the position of another control for example :", "I had actually created the webservice within a user control .ascx that the page was using .", "I have solve this issue by checking the error in the query and correct it. . After Correcting the Error in our query popup control will shown. .", "ezzylearning.com tutorial http : www.ezzylearning.com tutorial display-gridview-row-details-using-asp-net-ajax-popup-control for panel control take this article for example he builds html string for the tabular output in the popup window by GetDynamicContent Where can I put methods like gridview.datasource and gridview.databind to build the gridview", "Hi you can hide ajax control toolkit s http : www.ajaxcontroltoolkit.net modal popup extender http : www.ajaxcontroltoolkit.net ModalPopup ModalPopup.aspx from code-behind try this code :", "asp : GridView ID GridView1 ...onrowcreated GridView1 RowCreated .. . Columns .. . asp : BoundField HeaderText MachineNo DataField MachineNo .. . asp : TemplateField .. . ItemTemplate .. . asp : ImageButton ID ImageButton1 .. . .. . cc1 : PopupControlExtender ID PopupControlExtender1 runat server .. . PopupControlID GridView2 .. . TargetControlID ImageButtonl .. . DynamicContextKey Eval MachineNo .. . DynamicControlID GridView2 .. . DynamicServiceMethod GetDynamicContent", "I have used the below code inside RowCommand event : .. . .. . HTML of the TemplateField Action : .. . .. . Tried the below methods but no success : .. . .. . Suppress the panel s visibility using style display : .. . Called the Cancel method of the PopupControlExtender .. . .. . Note : The pop-up disappears if I don t bind the GridView inside the RowCommand event .", "However this is intermitent I cannot reproduce this issue when debugging locally .", "I cannot think of anything that would cause this .", "I am looking for any potential issues that may cause this .", "Any suggestion would help at this point .", "I am trying to use UpdatePanels PopupControlExtenders and a custom control to create a dropdown list of checkboxes .", "It works for the most part except for 1 odd glitch I cant seem to find a way around .", "I m trying to display a free floating help panel for an input form .", "Once the user presses the help button on the form the panel pops up and displays no problem however once I click back on the main form it dissappears again .", "I understand this good behaviour for most applications but I d like to get the popped up panel to stay on screen until explictly closed via a close button within the panel itself .", "Is this possible and if so how", "Might give the ModalPopupExtender a try .", "It locks the main page out until an event takes place on the popup .", "The problem is as follows whenever you cause partail postback the popup panels are created client-side outside the updatepanel .", "And you get more clientside controls with the same clientside ID .", "Texbox has Text clientsidecontrol1.text clientsidecontrol2.text clientsidecontrol.text3 .. . .. . Is there a way to prevent this .", "To make it easier to test i post the code of an example page I used for testing .", "To make myself clear here is an example : .. . .. . I click Popup .", "Type asdf in the textbox and click Submit .", "InputPanel displays asdf .. . .. . I click Popup again .", "Type qwerty in the textbox and click Submit .", "InputPanel now displays qwerty asdf .. . .. . When you check it the firebug you get this : .. . .. . InputTB and Panel1 where generated 3 time .", "I ended up using newer version of the AjaxControlToolkit .", "It solves the problem mentioned above and added couple others Anyways i still recomend it .", "I have a gridview with x dynamic columns .", "The problem is that when I do postback I have to redraw my dynamic columns and refill my lists .", "But when I refill the CheckBoxList the other columns DropDownBoxes are redrawn on the next line http : i948.photobucket.com albums ad328 TamarChaver messeduptable3.png .. . .. . If I click on the PopUpControlExtender s TextBox the DropDownLists from that line are redrawn but the rest are still messed up", "Fixed it accidentally .", "I set panel1.Style display none and the issue resolved itself .", "I have a text box with an associated popupcontrolextender.This opens a panel containing a checkboxlist .", "What i want to do is add the values selected in the checkbox list to the text box when the user clicks out of the panel .", "I started to use the OnselectedIndexChanged of the checkboxlist and update the text box after every checkbox has been checked unchecked .", "But the checkboxlist is quite long and when you click one of the checkboxes near the bottom because everything is in an update panel the checkboxlist scrolls to the top after the autopostback - not very user-friendly .", "Any ideas", "Thanks in advance .", "It sounds like you want to stop this behavior : .. . .. . But the checkboxlist is quite long and when you click one of the checkboxes near the bottom because everything is in an update panel the checkboxlist scrolls to the top after the autopostback .. . .. . Would that work better", "Here s an oldie but a goodie article : .. . .. . http : www.4guysfromrolla.com articles 111704-1.aspx", "I have looked around and haven t found a solution to my problem .", "I have a datagrid with an OnItemCreate property that works properly to assign a mouseouver and mouseout attribute to an image in a column .", "So with this setup I successfully get the mouseover mousout behavior but where I would expect to see a popup of the span I see a Web Service call failed : 500 message instead .", "Any ideas of what I might be missing", "EDIT : I have discovered that the problem is in how the web service is being called from the page .", "When I mouse over and the web service call is made I see the URL it is creating to try to access the webserver is http : mydomain default.aspx GetDynamicContent where it should be something more like http : mydomain default.aspx Usercontrols parentUserControl.ascx GetDynamicContent However I cannot figure out how to modify the URL it is calling .", "I tried changing the DynamicServiceMethod property value from GetDynamicContent to http : mydomain default.aspx UserControls parentUserControl.ascx GetDynamicContent but that just gave a jumbled mess .", "I m hoping this edit might give more insight to someone who could help me .", "I think I figured this one out on my own .", "Using the debugging console I was able to see that the mouseover was issuing a webservice call to the main page whose code I cannot manipulate and calling the web service method .", "This didn t appear to work .", "I ended up stripping the web service out completely and creating its own .asmx file then added the DynamicServicePath attribute to point to the standalone web service .", "I was hoping I would have to resort to a completely separate web service but in any case it works .", "If you declares the DynamicServiceMethod method on same the page the method should be static however if you have the method hosted on a DynamicServicePath .asmx then the method should NOT be declared static .", "This is not easy to debug and figure out. .", "Normally Web service call failed 500 will be shown when we have any error in our query. .", "I am new to asp.net .", "I have been fighting for a while now and can t get a simple popup to work .", "All I want to do is have a button display a small window with some text in it for the user to read .", "The css file contains visibility : hidden for Panel1 .", "I run the page and click the button and get nothing .", "I also tried in-line with visible false with a codebehind that on click changes to Visible true .", "Thanks for any reply .", "Try this one : .. . .. . and on Button1 Click event add", "Does not work unfortunately .", "I am genuinely stumped .", "This should not be this difficult .", "I have tried it so many different ways based on so many things .", "I have a button which redirects the page when clicked it also pass the selected Email from the grid value to the SendMessage.aspx page .", "Now without redirecting I made a panel and few labels and text box inside the panel as popup for the send button I want to pass the selected email value to a text box field inside the panel .", "How should i change my code so that the text box inside the pop-up panel gets the selected value .", "thanks", "What kind of grid are you using", "Make an OnClick event on your button .", "Place a label lblEmailAddress for eg in your Panel sendmsg .", "Then simply in your buttons OnClick event write : lblEmailAddress.Text address grab the address from the grid then call PopUCtrlExt SendMSg.Show ." ] }
{ "confidence": [ 38.33563232421875, 35.60988998413086, 35.57516098022461, 32.477989196777344, 32.08302307128906, 30.608585357666016, 30.32110023498535, 29.26371955871582, 28.179771423339844, 28.083457946777344, 28.083457946777344, 22.335357666015625, 19.308223724365234, 14.164883613586426, 12.471694946289062, 12.471694946289062, 11.190834999084473, 11.190834999084473 ], "content": [ "Question : Is it possible to implement a context menu which appears when users perform a right-click on an item of interest using the PopupControlExtender From investigations so far it seems like the PopupControlExtender only works with left-clicks or the other choices are to write your own control or implement the entire solution in jQuery . If it is possible to do a right-click with the PopupControlExtender may I get some code examples .. . Answer : Just have a hidden button on the form-for the PopupControlExtender then capture the right-click and call document.getElementById bla .click .. . .. . JS : .. . .. . Markup :", "Question : A GridView will list rows which have to be approved rejected . First column is named Action which when clicked will display the ajax popupcontrolextender panel with two links Approve Reject . After the link is clicked I need to update the status in the DB refresh the GridView . ObjectDataSource is used to Bind the GridView . I have used the below code inside RowCommand event : .. . .. . HTML of the TemplateField Action : .. . .. . Tried the below methods but no success : .. . .. . Suppress the panel s visibility using style display : .. . Called the Cancel method of the PopupControlExtender .. . .. . Note : The pop-up disappears if I don t bind the GridView inside the RowCommand event . But I need to refresh the results displayed after Approve Reject . .. . .. . Appreciate any help . Thanks Comment : Nice first post But could you clarify your question in the body of your post to help others understand exactly what your asking You can always update your question . Welcome to stack-overflow recommended reading : stackoverflow.com help how-to-ask http : stackoverflow.com help how-to-ask .. . Answer : Hi you can hide ajax control toolkit s http : www.ajaxcontroltoolkit.net modal popup extender http : www.ajaxcontroltoolkit.net ModalPopup ModalPopup.aspx from code-behind try this code :", "Question : null .. . Answer : The PopupControlExtender can popup many ASP.NET controls but only examples popup a panel can be found on Internet.. . How to popup other controls such as a gridview e.g . I am going to get a DataTable from database by MachineNo and set the DataTable as the datasource of GridView2 . Then I want to popup GridView2 that displaying the information of that Machine when mouse is over the imagebutton . How to write the code-behind asp : GridView ID GridView1 ...onrowcreated GridView1 RowCreated .. . Columns .. . asp : BoundField HeaderText MachineNo DataField MachineNo .. . asp : TemplateField .. . ItemTemplate .. . asp : ImageButton ID ImageButton1 .. . .. . cc1 : PopupControlExtender ID PopupControlExtender1 runat server .. . PopupControlID GridView2 .. . TargetControlID ImageButtonl .. . DynamicContextKey Eval MachineNo .. . DynamicControlID GridView2 .. . DynamicServiceMethod GetDynamicContent .. . cc1 : PopupControlExtender .. . ItemTemplate .. . asp : TemplateField .. . Columns .. . asp : GridView .. . .. . asp : GridView ID GridView2 .. . .. . Comment : Same as panel control just use the gridview control id instead of panel control id . First try and in case of issue ask here . Comment : ezzylearning.com tutorial http : www.ezzylearning.com tutorial display-gridview-row-details-using-asp-net-ajax-popup-control for panel control take this article for example he builds html string for the tabular output in the popup window by GetDynamicContent Where can I put methods like gridview.datasource and gridview.databind to build the gridview After that how can i popup it Comment : Instead of creating the content on that method GetDynamicContent you can just bind the datasource on that method to the your popup gridview . Comment : I followed your advice and encountered a new problem : as method GetDynamicContent is a static method it cannot access GridView2 . Therefore I cannot bind GridView2 to the data . Comment : Ok . try to bind that gidview to the datasource in your GridView1 RowCreated method", "Question : I have looked around and haven t found a solution to my problem . I have an PopupControlExtender that keeps giving a Web Service call failed : 500 error instead of showing the popup . I have a datagrid with an OnItemCreate property that works properly to assign a mouseouver and mouseout attribute to an image in a column . Below is the code for the colun that contains both the targetControl image as well as the AJAX control itself . Here is the code for the ajax control : .. . .. . Here is the code for the DynamicServiceMethod I have intentionally stripped it down to a simple span to just try to get something to display .. . .. . .. . And here is the panel I am using as the PopupControlID.. . So with this setup I successfully get the mouseover mousout behavior but where I would expect to see a popup of the span I see a Web Service call failed : 500 message instead . Any ideas of what I might be missing EDIT : I have discovered that the problem is in how the web service is being called from the page . The web service is actual built within a user control on the same page . When I mouse over and the web service call is made I see the URL it is creating to try to access the webserver is http : mydomain default.aspx GetDynamicContent where it should be something more like http : mydomain default.aspx Usercontrols parentUserControl.ascx GetDynamicContent However I cannot figure out how to modify the URL it is calling . I tried changing the DynamicServiceMethod property value from GetDynamicContent to http : mydomain default.aspx UserControls parentUserControl.ascx GetDynamicContent but that just gave a jumbled mess . I m hoping this edit might give more insight to someone who could help me . .. . Answer : Normally Web service call failed 500 will be shown when we have any error in our query. . I have solve this issue by checking the error in the query and correct it. . After Correcting the Error in our query popup control will shown. .", "Question : I have looked around and haven t found a solution to my problem . I have an PopupControlExtender that keeps giving a Web Service call failed : 500 error instead of showing the popup . I have a datagrid with an OnItemCreate property that works properly to assign a mouseouver and mouseout attribute to an image in a column . Below is the code for the colun that contains both the targetControl image as well as the AJAX control itself . Here is the code for the ajax control : .. . .. . Here is the code for the DynamicServiceMethod I have intentionally stripped it down to a simple span to just try to get something to display .. . .. . .. . And here is the panel I am using as the PopupControlID.. . So with this setup I successfully get the mouseover mousout behavior but where I would expect to see a popup of the span I see a Web Service call failed : 500 message instead . Any ideas of what I might be missing EDIT : I have discovered that the problem is in how the web service is being called from the page . The web service is actual built within a user control on the same page . When I mouse over and the web service call is made I see the URL it is creating to try to access the webserver is http : mydomain default.aspx GetDynamicContent where it should be something more like http : mydomain default.aspx Usercontrols parentUserControl.ascx GetDynamicContent However I cannot figure out how to modify the URL it is calling . I tried changing the DynamicServiceMethod property value from GetDynamicContent to http : mydomain default.aspx UserControls parentUserControl.ascx GetDynamicContent but that just gave a jumbled mess . I m hoping this edit might give more insight to someone who could help me . .. . Answer : If you declares the DynamicServiceMethod method on same the page the method should be static however if you have the method hosted on a DynamicServicePath .asmx then the method should NOT be declared static . This is not easy to debug and figure out. .", "Question : I m followed this tutorial http : www.ezzylearning.com tutorial display-gridview-row-details-using-asp-net-ajax-popup-control but I m getting runtime-error when mouseover : .. . .. . Sys.ArgumentUndefinedException : Value cannot be undefined . Parameter name : type .. . .. . The problem is in this lines-of-code : .. . .. . Any thoughts on this My goal is to get details of gridview row when mouseover a specific column like the demo on the referenced linked . .. . Answer : Solved by updating AJAX Control Toolkit to it s last version v15.1 from March 2015", "Question : I have looked around and haven t found a solution to my problem . I have an PopupControlExtender that keeps giving a Web Service call failed : 500 error instead of showing the popup . I have a datagrid with an OnItemCreate property that works properly to assign a mouseouver and mouseout attribute to an image in a column . Below is the code for the colun that contains both the targetControl image as well as the AJAX control itself . Here is the code for the ajax control : .. . .. . Here is the code for the DynamicServiceMethod I have intentionally stripped it down to a simple span to just try to get something to display .. . .. . .. . And here is the panel I am using as the PopupControlID.. . So with this setup I successfully get the mouseover mousout behavior but where I would expect to see a popup of the span I see a Web Service call failed : 500 message instead . Any ideas of what I might be missing EDIT : I have discovered that the problem is in how the web service is being called from the page . The web service is actual built within a user control on the same page . When I mouse over and the web service call is made I see the URL it is creating to try to access the webserver is http : mydomain default.aspx GetDynamicContent where it should be something more like http : mydomain default.aspx Usercontrols parentUserControl.ascx GetDynamicContent However I cannot figure out how to modify the URL it is calling . I tried changing the DynamicServiceMethod property value from GetDynamicContent to http : mydomain default.aspx UserControls parentUserControl.ascx GetDynamicContent but that just gave a jumbled mess . I m hoping this edit might give more insight to someone who could help me . .. . Answer : I think I figured this one out on my own . Using the debugging console I was able to see that the mouseover was issuing a webservice call to the main page whose code I cannot manipulate and calling the web service method . I had actually created the webservice within a user control .ascx that the page was using . This didn t appear to work . I ended up stripping the web service out completely and creating its own .asmx file then added the DynamicServicePath attribute to point to the standalone web service . I was hoping I would have to resort to a completely separate web service but in any case it works .", "Question : So I use PopupControlExtender to edit some of the fields inside ListViewControl which itself is embedded inside an UpdatePanel . The problem is as follows whenever you cause partail postback the popup panels are created client-side outside the updatepanel . And you get more clientside controls with the same clientside ID . When you postback with popup panel the server-side control eg . Texbox has Text clientsidecontrol1.text clientsidecontrol2.text clientsidecontrol.text3 .. . .. . Is there a way to prevent this . To make it easier to test i post the code of an example page I used for testing . To make myself clear here is an example : .. . .. . I click Popup . Type asdf in the textbox and click Submit . InputPanel displays asdf .. . .. . I click Popup again . Type qwerty in the textbox and click Submit . InputPanel now displays qwerty asdf .. . .. . When you check it the firebug you get this : .. . .. . InputTB and Panel1 where generated 3 time . .. . Answer : The script will be invoked automatically after Postback .. . .. . Course there is possible to make it dynamic recalling the position of another control for example :", "Question : So I use PopupControlExtender to edit some of the fields inside ListViewControl which itself is embedded inside an UpdatePanel . The problem is as follows whenever you cause partail postback the popup panels are created client-side outside the updatepanel . And you get more clientside controls with the same clientside ID . When you postback with popup panel the server-side control eg . Texbox has Text clientsidecontrol1.text clientsidecontrol2.text clientsidecontrol.text3 .. . .. . Is there a way to prevent this . To make it easier to test i post the code of an example page I used for testing . To make myself clear here is an example : .. . .. . I click Popup . Type asdf in the textbox and click Submit . InputPanel displays asdf .. . .. . I click Popup again . Type qwerty in the textbox and click Submit . InputPanel now displays qwerty asdf .. . .. . When you check it the firebug you get this : .. . .. . InputTB and Panel1 where generated 3 time . .. . Answer : I ended up using newer version of the AjaxControlToolkit . It solves the problem mentioned above and added couple others Anyways i still recomend it .", "Question : I m currently playing around with the PopupControlExtender in the ajaxToolkit and can t quite get the functionality I want . I m trying to display a free floating help panel for an input form . Once the user presses the help button on the form the panel pops up and displays no problem however once I click back on the main form it dissappears again . I understand this good behaviour for most applications but I d like to get the popped up panel to stay on screen until explictly closed via a close button within the panel itself . Is this possible and if so how .. . Answer : Might give the ModalPopupExtender a try . It locks the main page out until an event takes place on the popup .", "Question : I have a gridview with x dynamic columns . Each column contains either a DropDownList OR a TextBox a CheckBoxList and a PopUpControlExtender . The problem is that when I do postback I have to redraw my dynamic columns and refill my lists . But when I refill the CheckBoxList the other columns DropDownBoxes are redrawn on the next line http : i948.photobucket.com albums ad328 TamarChaver messeduptable3.png .. . .. . If I click on the PopUpControlExtender s TextBox the DropDownLists from that line are redrawn but the rest are still messed up .. . Answer : Fixed it accidentally . I set panel1.Style display none and the issue resolved itself .", "Question : I would like to call a popup of the popupcontrolextender programmatically . Is this possible Comment : What do you mean by calling the popup Comment : sorry I m not native english speaking person that s the best I could express it I meant I need to call the opening of the pop-up from server-side code-behind code do you know if that s possible .. . Answer : You can get a handle on the client object for the popup by specifying a BehaviorID and using the find function . Here is a small working IE7 code snippet of a popup that shows when the cursor hovers over a text box and disappears when the cursor moves off of the text box . Update : .. . .. . Displaying the popup from server-side script requires registering some JavaScript at an appropriate place in the JavaScript lifecycle . Client script blocks appear to be too early as the behavior may not have been initialized . The code snippet below registers a startup script that in turn registers a function to open the popup on the client-side load event . Comment : I need to call the opening of the pop-up from server-side code-behind code do you know if that s possible Comment : @Pablo - I added an example of some server-side script that can be used to display the popup . Please check it out .", "Question : null .. . Answer : A user of my web-applications is getting a web service 500 error when using the popup extender control . However this is intermitent I cannot reproduce this issue when debugging locally . I cannot think of anything that would cause this . I am looking for any potential issues that may cause this . Any suggestion would help at this point . Below is the call to the popup extender control declaration .", "Question : I am trying to use UpdatePanels PopupControlExtenders and a custom control to create a dropdown list of checkboxes . It works for the most part except for 1 odd glitch I cant seem to find a way around . EnhancedCheckboxList.cs http : pastebin.com GnUF8GE7 .. . .. . Default.aspx http : pastebin.com TikAx6C1 .. . .. . Default.aspx.cs http : pastebin.com NxdJZQmL .. . .. . In order to replicate the glitch you have to perform the following actions in the order below . 1 . Set A Dropdown to Role2 .. . 2 . Set B Dropdown to Role2 .. . 3 . Invert all A Authorities Uncheck checked items and check unchecked items .. . 4 . Set B Dropdown to Role1 .. . 5 . View A Authorities The items we unchecked in step 3 have become checked again .. . .. . For whatever reason unchecking the Authorities in step 3 has no effect but checking them does I looked into getting the correct values from Request.Params but it doesnt look like that is giving me what I want . The glitch will only happen if you perform the steps in that order if you switch steps 2 and 3 it works fine . Comment : Are you still seeing this behavior Are the checked unchecked Authorities being seen when you expand the Authorities EnhancedCheckboxList or in code-behind on posting from the button .. . Answer : Would you consider eliminating the UpdatePanels I was able to reproduce the glitch using your original code . Once I removed the UpdatePanels the glitch is no longer reproducible : Comment : That will probably have to be the solution . We just added the update panels into the page because there is a password field on the page and users didn t like that it would clear out a password they entered . Thanks for the help enjoy the bounty", "Question : I have a text box with an associated popupcontrolextender.This opens a panel containing a checkboxlist . What i want to do is add the values selected in the checkbox list to the text box when the user clicks out of the panel . I started to use the OnselectedIndexChanged of the checkboxlist and update the text box after every checkbox has been checked unchecked . But the checkboxlist is quite long and when you click one of the checkboxes near the bottom because everything is in an update panel the checkboxlist scrolls to the top after the autopostback - not very user-friendly . Any ideas Thanks in advance . .. . Answer : It sounds like you want to stop this behavior : .. . .. . But the checkboxlist is quite long and when you click one of the checkboxes near the bottom because everything is in an update panel the checkboxlist scrolls to the top after the autopostback .. . .. . Would that work better Here s an oldie but a goodie article : .. . .. . http : www.4guysfromrolla.com articles 111704-1.aspx", "Question : I am new to asp.net . I have been fighting for a while now and can t get a simple popup to work . All I want to do is have a button display a small window with some text in it for the user to read . The css file contains visibility : hidden for Panel1 . I run the page and click the button and get nothing . I also tried in-line with visible false with a codebehind that on click changes to Visible true . Thanks for any reply . .. . Answer : Try this one : .. . .. . and on Button1 Click event add Comment : Does not work unfortunately . I am genuinely stumped . This should not be this difficult . I have tried it so many different ways based on so many things .", "Question : I have a button which redirects the page when clicked it also pass the selected Email from the grid value to the SendMessage.aspx page . Now without redirecting I made a panel and few labels and text box inside the panel as popup for the send button I want to pass the selected email value to a text box field inside the panel . How should i change my code so that the text box inside the pop-up panel gets the selected value . thanks Comment : What kind of grid are you using .. . Answer : Make an OnClick event on your button . Place a label lblEmailAddress for eg in your Panel sendmsg . Then simply in your buttons OnClick event write : lblEmailAddress.Text address grab the address from the grid then call PopUCtrlExt SendMSg.Show . Thats it . :", "Question : null .. . Answer : I am trying to create a gridview with an icon that when hovered over shows some more details . I have managed to get it to the point of showing the panel but it keeps showing the html that is loaded as the page is loaded . Here is the html . and the relevant code : .. . .. . What happens is it shows everything on the page as it first loads into the panel . From what I can personally see the problem is that it never calls the second method GetDynamicContent . It runs through the first method fine though . I have read this may to be to do with a web-services file been called rather than the method which results in the page been reloaded I have no clue about this . I added this : .. . .. . When I do this the pop-up no longer shows but neither does the data . Nothing shows . When I use : .. . .. . I get an error message showing in the pop-up panel which states : Web Service Call Failed : 200 .. . .. . I am completely lost and hope someone can help Comment : GridView DataGridView Comment : Sorry did this late at night . Corrected . Comment : And now for the Tags. . Comment : Maybe you could suggest what is wrong because it is pretty unhelpful otherwise . Comment : No I can t I don t do ASP sorry But as you still have no set the right Tags you are still not getting the attention of those who do . I think this hint is rather helpful. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
asp.net
UNK_RELATION
web-applications@intranet@116
web-applications -- web-applications are applications that are accessed over the web which can be over internet or @placeholder i.e .
{ "confidence": [ 56.259639739990234, 54.749393463134766, 54.749393463134766, 54.617671966552734, 53.446006774902344, 52.30610656738281, 52.30610656738281, 51.991207122802734, 49.95695877075195, 49.635074615478516, 49.485103607177734, 49.02475357055664, 48.92146301269531, 48.490821838378906, 47.65855026245117, 47.65855026245117, 47.65855026245117, 47.65855026245117, 47.65855026245117, 46.429603576660156, 46.055931091308594, 46.0162239074707, 45.71987533569336, 45.71987533569336, 45.59128189086914, 45.00422668457031, 44.650020599365234, 44.57997512817383, 44.57997512817383, 44.57997512817383, 44.57997512817383, 44.57997512817383, 44.442527770996094, 44.30112838745117, 43.959388732910156, 43.959388732910156, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.21377182006836, 43.12647247314453, 42.59318542480469, 42.59318542480469, 42.59318542480469, 42.59318542480469, 42.51597595214844, 42.095794677734375, 41.61558151245117, 41.61115264892578, 41.61115264892578, 41.61115264892578, 41.61115264892578, 41.33454895019531, 40.64971923828125, 40.325286865234375, 40.29904556274414, 40.19464874267578, 40.19464874267578, 40.19464874267578, 40.11188507080078, 39.88341522216797, 39.88341522216797, 39.73278045654297, 39.73278045654297, 39.73278045654297, 39.28351593017578, 39.28351593017578, 39.26002502441406, 39.26002502441406, 39.064971923828125, 38.98047637939453, 38.82844543457031, 38.59288024902344, 38.59288024902344, 38.59288024902344, 38.59288024902344, 38.59288024902344, 38.59288024902344, 38.59288024902344, 38.59288024902344, 38.59288024902344, 38.59288024902344, 38.59288024902344, 38.38311004638672, 38.37617492675781, 38.37617492675781, 37.69488525390625, 37.6808967590332, 37.6808967590332, 37.24320983886719 ], "content": [ "In applications whether delivered over the web or not users expect context-based menus .", "A website is comprehended of web-applications .", "Web applications are dynamic-websites .", "I am interested in theory to scale web-applications in a distributed nature i.e .", "It is not a good idea for normal web-applications .", "My goal is to make web-applications", "I write web based applications .", "I am a long time Java web-applications developer and in my experience there are 2 major approaches for building web-applications .", "I ve created and manage over 20 Facebook applications for my current company which has multiple web sites .", "A web application or Rich Internet Applications is a web site that does more than displaying content it has a business logic .", "use web framework like Flask or Django and create it from scratch - web-applications work different then desktop applications .", "Web applications primarily allow the user to perform actions .", "There are many applications which are not web-browser based and which qualify as thin-client .", "The option Convert to web application does exist only for web-applications", "The problem is I develop MVC web-applications .", "But these are for applications using the Mojo framework and not exposed to web pages .", "These web-applications should fit into the navigation of the Portal seamlessly .", "A font rendering engine for desktop mobile applications or for the web", "Surely this is a fairly common requirement for similar web-applications .", "for development of interactive 3d web-applications which engine is recommended", "Ideas for both native as well as web-applications are welcomed .", "I say a website can be a web application but more often a website has multiple web-applications .", "2.Exploded web-applications not referenced by any Context Descriptor will then be deployed .", "Is there a best practices growth path for medium sized web-applications", "Sources : .. . .. . http : www.krisjordan.com 2008 09 18 joe-stump-scaling-digg-and-other-web-applications .. . http : highscalability.com scaling-digg-and-other-web-applications", "A web application is a software program which a user accesses over an internal network or via the internet through a web browser .", "You can build Comet-style Web applications using a web development framework called Lift .", "I have a general question about writing web-applications .", "In this sense http : cnn.com and http : php.net are websites not web-applications .", "In my point of view all modern websites are web-applications including CMS s .", "Now there are 3 WAR-files containing different web-applications .", "Is it possible to run these two web-applications on separate ports on same Websphere instance", "Compared to web sites i.e .", "Web sites can also contain web-applications which allow visitors to complete online tasks such as : Search View Buy Checkout and Pay .", "In most cases I ve seen with ASP.NET web-applications business logic is hosted in the web server s asp.net hosts processes .", "It is a web router and firewall that allows you to integrate web-applications with arbitrary back-end systems .", "Are there any tool you recommend for security-testing of web-applications", "Java web-applications support internationalization using the java standard tag library .", "I am trying to understand how web-applications used to work .", "I think this is a fairly common scenario of web-applications supporting offline mode.. .", "Arguing the benefits of a compiled language for web-applications is a bit silly really .", "You don t want to hardcode or guess the absolute path in Java web-applications .", "All the elements of the web-applications are created using jQuery var header div .", "Web Applications Projects in Visual Studio are still used but I prefer not to anymore .", "or simply my misunderstanding of contention static-methods web-applications etc", "Is it possible to do that across two web-applications deployed on the same container", "Question is : What s the proper use if any of 550 error in web based applications .", "Might be better asked at Web Applications http : webapps.stackexchange.com help on-topic .", "I m going to analyse web-applications by using dynamic-analysis .", "I m new to web-applications for Android. . .. . .. . How can you add a bookmark on the home screen from a web page using Javascript from the click of a button", "In the past I used Microsoft Web Application Stress Tool and Pylot to stress test web-applications .", "HTML - Web 2.0 was all about using native HTML + JavaScript to build rich applications in a web browser .", "Because the methods get called from number of applications stand-alone web service web .", "I am familiar with Java web containers where web-applications are deployed as war files .", "This in turn leads me to the question : is MVC implemented differently for web-applications vs . regular desktop applications", "My understanding is that responsive-design helps to make web-applications responsive when accessed through browsers not on mobile apps .", "This expectation does not exist for web-applications - indeed the expectation is that right-clicking in a web page will give you the standard web-page menu where you can print open links in new windows view-source etc .", "These applications have distinct databases desktop interbase and web MySQL .", "The same goes for some other web-applications such as Twitter and Orkut perhaps .", "TLDR : Our web-app wants to send commands to a client-side applications .", "I have tried basic web-applications on all the above three .", "As the Web is the platform to make newly produced applications easily visible and usable by numerous users I ll probably go for a Web application .", "Can anyone offer a factual explanation of why dBASE isn t a viable solution for modern web-applications", "Web applications have a completely different life cycle than Console applications do so they won t necessarily close as soon as you finish the calls .", "Can someone list with references evidences if possible why we don t see much AJAX in secure web-applications like internet banking", "I have a script to create web-applications in my farm but when I do I cant create publishing site collections within that web application .", "MyScript Web Components leverage Polymer project components and MyScriptJS an open-source library that speeds up the development of handwriting interfaces for web-applications .", "Tomcat also comes with some built-in web-applications eg host-manager for managing your deployments via a web interface but for a simple setup that might be overkill .", "A web site on the other hand is a collection of documents that are accessed via the internet through a web browser .", "Please look at the OSGi enRoute tutorials which demonstrate building web-applications with OSGi .", "The linked bug says .. . .. . It seems that web-applications which are using guava cache might face a memory leak .", "I ve dabbled with PHP in the past and have used it to construct spartan websites but never web-applications .", "Furthermore casual users are surprisingly not put off by new UI paradigms in web-applications whereas experimentation on the desktop is often anathema .", "Convert your desktop and client-server applications made in Delphi Lazarus to Web 2 .", "Can we be sure that it will be a good choice for web-applications in an enterprise context for up to 5-10 years", "using Google App Engine you can choose either Java Python or PHP to write and host your web-applications .", "For offline HTML5 applications with ASP.NET see this link http : www.infoq.com articles Offline-Web-Apps and this link http : www.jefclaes.be 2012 03 html5-offline-web-applications-as.html .", "Specifically I have followed the code example of the Front Controller Pattern as described in this question s answer : .. . .. . Design Patterns web based applications http : stackoverflow.com questions 3541077 design-patterns-web-based-applications .. . .. .", "I ve just taken over a web application .", "With the arrival of Web 2.0 and its web browsers with fast and reliable javascript html5 features such as canvas etc.the distinction between web-applications and thin-client may become blurred again .", "I am writing a new web application in Java that will run on the SAME server and the purpose of the application will basically be to list all the web-applications running on the same server .", "The Dreamcode as described here : http : nobackend.org dreamcode.html .. . .. . That developers don t have to worry about the backend when developing web-applications .", "For example a news site would be a website but a spreadsheet or a collaborative calendar would be web-applications .", "Google Analytics http : www.google.com analytics gmail http : gmail.com and jslint http : www.jslint.com are web-applications .", "Almost all web-applications have static content like this one - the FAQ is for all practical purposes static .", "I don t believe we are at the point where enterprises are willing to have their employees dependent on web-applications outside of their control .", "I m learning Koa JS for building the server-side part of a small web-applications .", "But I don t understand what the claim that Everything is middleware means in the context of web-applications and NodeJS and why this is relevant .", "Because this topic web-applications is so big and complicated I would like to ask what I should learn next .", "If you just want to create web-applications in Java check out the Play Framework http : www.playframework.org .", "I m writing a toy application to learn about Compojure and using it for database-backed web-applications .", "Here is the context : .. . .. . We have lots of applications web apps distributed on different servers and communicating with each other .", "It doesn t seem that browsers support animated cursors at this time which is a shame because I really think it would add some depth to certain web-applications .", "To quickly quote the first paragraph of the Caja description : .. . .. . Caja allows websites to safely embed DHTML web-applications from third parties and enables rich interaction between the embedding page and the embedded applications .", "In the web seems to be a lot of information about multi-tenant SaaS applications and how to host them in sites like Heroku Openshift etc.. . but no much is said about single-tenant applications .", "Even your internet router at home is a web application that uses the HTTP protocol to access the application i.e the one that interacts with you .", "Can you explain what kinf of application you talk about Web site mobile applications or computer", "Everything else works : I can deploy all my web-applications and run them .", "For instance you have an iPhone device compared to a website which may include different applications : playing music videos web browser etc ." ] }
{ "confidence": [ 53.51585388183594, 48.422637939453125, 48.17509460449219, 47.543190002441406, 46.44601821899414, 46.187156677246094, 44.91117858886719, 44.3089485168457, 44.26850509643555, 43.70560836791992, 43.38650131225586, 43.24099349975586, 43.06651306152344, 42.81938171386719, 42.706356048583984, 42.61375045776367, 42.169654846191406, 42.169654846191406, 42.110591888427734, 42.05190658569336 ], "content": [ "Question : I m stumped trying to come up to a difference between a web site and a web application for myself . As I see it a web site points to a specific page and a web application is more of some sort of portal to content and information . But where I m stuck is that a web application is still viewed through a browser is it not and a web site can still view content dynamically making the line between web site and application prety gray . For instance does a web site using ASP.NET or AJAX I assume ASP.NET is AJAX s proprietary sibling if not ignore ASP.NET AND concentrate on the AJAX becomes a web application because it can retrieve data dynamically and asynchronously or would a website using PHP and a CMS be more of a web application because it forms the pages on request based on the request of the client and its content in its databse Or maybe I m totally wrong here - what differenciates between a web application and a website Comment : A couple of thousand dollars . Comment : The same as difference between a cell phone and a smartphone . Comment : So basically a web application is a subset of the other Comment : I think it is more like a website is a subset of a web application . Comment : Have a look at stackoverflow.com questions 3698362 http : stackoverflow.com questions 3698362 difference-between-website-and-web-application-in-visual-studio 11607329 11607329 .. . Answer : A web application is a software program which a user accesses over an internal network or via the internet through a web browser . An example of one of the most widely used web-applications is Google Docs which facilitates most of the capabilities of Microsoft Word it s free and easy to use from any location . A web site on the other hand is a collection of documents that are accessed via the internet through a web browser . Web sites can also contain web-applications which allow visitors to complete online tasks such as : Search View Buy Checkout and Pay .", "Question : I have hosted an application on JBoss on my local machine and I can access by localhost or over my IP also . Now I want the same application to be accessed by other users over the internet by my IP . Could you let me know how to configure my JBoss to server these requests .. . Answer : http : showoff.io is the easiest way to access localhost over the web . It requires ruby and ruby gem showoff-io . Map the instance of your website to a localhost port i.e . localhost : 9090 . Then run : .. . .. . Or simply follow the instructions shown on showoff.io website . UPDATE : showoff.io is now known as forward https : forwardhq.com", "Question : I would like to hear other people s advice on when one should build a web application versus building a thick client . Over the last few years I have participated in several discussions about whether an application should be built or an old application upgraded with a web browser interface . Usually these were internal systems used within an organization not mass-market shrink-wrap products and they were not actually on the public Internet . I do not want to limit the discussion to these types of applications solely though . There are obvious cases where an application should be one or the other e.g . no web based video-editing software . On the other hand Javascript libraries are making more rich experiences in the browser less difficult to implement everyday . Have Javascript libraries and advanced server-side technologies made things such as right-click context menus drag-and-drop etc . doable on the client-side without a large effort At what point does the extra complexity of writing for the web override the benefits such as ease of deployment and cross-platform compatibility particularly if you are not trying to create the next Stack Overflow but instead just building an internal application Does the fact that an internal application has a limited and captive audience more or less override any concerns over improved usability that a thick client can provide Comment : google.com search q web+based+video+editing http : www.google.com search q web+based+video+editing Comment : Thanks for that link guess you have to be careful what you say though in my defense these are generally not the type of app I meant either . : .. . Answer : I believe we are still at the point where unless there is a reason for it to be a Web app it should be a local application thick . It is obvious when it should be a web app . A pet peeve of mine is the thought that it should be a web app unless it s obvious it should be local . I don t believe we are at the point where enterprises are willing to have their employees dependent on web-applications outside of their control . When it comes to apps internal to a company I believe movement of data security and deployment upgrades are the key factors in deciding . A couple of key reasons for an app to be on the web . 1 . The application and data need to follow you around no matter what computer you are on . 2 . The data needs to be centralized and the amount of data that needs to be transferred to the client is reasonable . A few reasons to use thick apps : .. . .. . 1 . Utilities that work on local resources . 2 . Apps that do lots of one time processing of data . 3 . Apps where data needs to be accessed when disconnected from the network .", "Question : I m currently working on a web application and the powers above have decided that overriding the browser s right-click menu with our own application-specific one is the way to go . I totally disagree . I feel that when someone is using a web browser they have certain expectations about what should happen when they use the right-click functionality of a pointing device and violating these expectations by purposefully supplanting this functionality is very disconcerting annoying to the user . What do you think Have you ever seen right-click done well in a web app I mean in a way that you actually thought Yes this right-click functionality was a great decision . .. . Answer : Shog9 s answer is the best direct answer to your question but another reason to avoid contextual menus in web-applications is that it is a golden opportunity to break away from the use of contextual menus . Most Windows and nix GUI applications rely heavily on contextual menus to implement a large part of their functionality . One reason that the Mac OS has traditionally been praised for high usability is that true menu options and toolbar elements have been favored over contextual menus which quickly become a ghetto of nested lists especially if other applications are allowed to embed functionality . Web applications are a breath of fresh air to UI designers precisely because the interface must be usable and powerful without the use of the right-click menus . Furthermore casual users are surprisingly not put off by new UI paradigms in web-applications whereas experimentation on the desktop is often anathema . The age of the in-browser application thus is a great opportunity for developers to rethink UI paradigms . Right click menus are a cop-out on the web . Comment : The question is about the use of right-click . Not necessarily right-click context menus .", "Question : I would like to hear other people s advice on when one should build a web application versus building a thick client . Over the last few years I have participated in several discussions about whether an application should be built or an old application upgraded with a web browser interface . Usually these were internal systems used within an organization not mass-market shrink-wrap products and they were not actually on the public Internet . I do not want to limit the discussion to these types of applications solely though . There are obvious cases where an application should be one or the other e.g . no web based video-editing software . On the other hand Javascript libraries are making more rich experiences in the browser less difficult to implement everyday . Have Javascript libraries and advanced server-side technologies made things such as right-click context menus drag-and-drop etc . doable on the client-side without a large effort At what point does the extra complexity of writing for the web override the benefits such as ease of deployment and cross-platform compatibility particularly if you are not trying to create the next Stack Overflow but instead just building an internal application Does the fact that an internal application has a limited and captive audience more or less override any concerns over improved usability that a thick client can provide Comment : google.com search q web+based+video+editing http : www.google.com search q web+based+video+editing Comment : Thanks for that link guess you have to be careful what you say though in my defense these are generally not the type of app I meant either . : .. . Answer : Things I remember from the bad old days of deploying internal applications that weren t web-based : There was always a minimum of one computer that was set up so differntly that the upgrade wouldn t work . Sometimes more and the problem was different for each machine that wouldn t work . There was always a user who refused to install the upgrade until forced to by management usually several weeks or months later . This ended up causing problems in the data at times becasue new businesss rules were not enforced .", "Question : null .. . Answer : I have learnt recently about basic of utilizing responsive-design . Throughout Google responsive-design is about making web-applications responsive per device screen browser . My understanding is that responsive-design helps to make web-applications responsive when accessed through browsers not on mobile apps . How we can make mobile apps responsive as well so that apps are accessible when installed on screens of different dimensions Is there any other technology to make mobile applications responsive like web application on browser", "Question : We have a system where our front end is either a Rich Client application or a web interface into the back end . We are working on adding context-sensitive help to our system but we need to use the same base configuration-files - i.e . the context-sensitive help files would need to be the same and preferably use the same system . I was looking into JavaHelp which seems to use xml xhtml files for its formatting . Does anyone know if it is usable in a web-based application or if you should only expect it to be usable in a rich client setting Thanks . .. . Answer : JavaHelp can be used in server based applications see here http : download.java.net javadesktop javahelp jhug.pdf - section 5.7 Server Based JavaHelp Helpsets page 112 Comment : Thanks for that . I am having our web guys look at it to see if it integrates in with their current application-design or if we can integrate it in in some fashion .", "Question : null .. . Answer : I am interested in theory to scale web-applications in a distributed nature i.e . when there is some platform stack can be extended by others applications running on different servers etc . I am researching this field and feels the lack of the right keywords : .. . .. . Interesting concepts found so far : .. . .. . opensocial http : www.opensocial.org .. . through API aka web-services http : oreilly.com catalog 9780596527969 like shopify http : wiki.shopify.com Developing apps does shopify it s a hosted ecommerce solution .. . semantic-web http : en.wikipedia.org wiki Semantic Web not quite sure about this one .. . .. . Am I on the right way or am I lost anything : .. . .. . Thanks . Comment : add Cassandra cassandra.apache.org http : cassandra.apache.org Comment : cassandra it s about scaling the data i.e . one of those core systems to organize non-relational distributed horizontal scalable databases nosql-database.org http : nosql-database.org In the practice every application I am talking about according concepts I found so far might utilize relational or non-relation database and hide that fact from each other .", "Question : This question already has an answer here : .. . .. . Is it possible to share the web.config across multiple-projects in a solution ASP.NET questions 4007572 is-it-possible-to-share-the-web-config-across-multiple-projects-in-a-solutiona 3 answers .. . .. . Is it possible to have single web.config file for multiple asp.net web-applications One solution is to read web.config as text file from all applications and get the required key after parsing but it doesn t look very neat . Plus it may not work in case web.config entries are encrypted using aspnet regiis . Or may be the other way is to add entries in machine.config connection strings app settings from where all applications can read .. . Answer : Solution as per following post is very simple and i.e . put web.config on root of wwwroot folder and every application deployed in this folder will be able to read it . Is it possible to share the web.config across multiple-projects in a solution ASP.NET http : stackoverflow.com questions 4007572 is-it-possible-to-share-the-web-config-across-multiple-projects-in-a-solutiona", "Question : Spring MVC has become a very popular framework for building enterprise web-applications . Any complex web application has certain flows that need to be coded including some conditional flows i.e . show order processed if the credit-card information was correct or validation errors if something was not entered correctly . When does it make sense to use Spring WebFlow on top of Spring MVC What should be the decision making process regarding using Spring WebFlow .. . Answer : I have used MVC and SWF . Personally I prefer SWF over MVC due to the following two solid reasons : .. . .. . 1 . Spring MVC has no built-in mechanism for session control across multiple tabs in same browser . 2 . Handling browser go backs is easier in SWF than MVC .", "Question : I d like to better understand the reasons for .NET s application server model compared to that used by most Java application servers . In most cases I ve seen with ASP.NET web-applications business logic is hosted in the web server s asp.net hosts processes . Another common approach is to have a physically or logically different tier which hosts your business-objects and then are exposed as web-services or accessed via mechanisms like WCF . The latter approach typically but not always seems to be used when higher scale is required . In the days of COM objects I ve seen Microsoft Transaction Server MTS and later COM+ hosting used to host COM objects containing business logic with MTS theoretically managing object-lifetime transactions concurrency yada yada . This model largely seems to have disappeared in ASP.NET land . In the Java world you might have Apache with Tomcat as the servlet container and your business-objects hosted in Tomcat . In this case Tomcat provides similar functionality to what MTS provided in the .NET world . Several questions : .. . .. . 1 . Why the fundamental difference in the Microsoft vs . Java approaches to application servers This must have been an architecture design choice when these frameworks were created . 2 . What are the pros and cons of each approach 3 . Why did Microsoft move away from the MTS-hosting model which is similar to the Tomcast servlet hosting model to the more common current approach which is just to have business-objects as part of the web server s ASP.NET process 4 . If you wanted to implement the MTS type approach or the Tomcat type approach in ASP.NET applications today I assume a common pattern would be to host business-objects in some IIS process possibly on some different physical or logical tier and access via WCF or standard asmx web-services whatever . Is this a correct assumption .. . Answer : To my way of thinking the primary difference is in the open approach vs . the integrated stack approach . Microsoft likes to provide everything as an integrated stack that all shares a common flavor and approach . Java is more friendly to the bring your own x model where you may want to plug in your favorite application server transaction manager etc . Both technology stacks allow in-process invocation as well as remote invocation with varying levels of transaction support . Really WCF is not a new technology stack but a reorganization and rebranding of existing elements of the .NET stack . Specifically WCF took on the functions of .NET Remoting Web Services and distributed transactions . You reference the more common current approach which is just to have business-objects as part of the web server s ASP.NET process . That is only common for non-distributed apps . It is a simple model that works well when all of your objects will reside on the same server . This follows Microsoft s Scale Out deployment model . Rather than segregating object tiers across servers put everything but the database together on the web servers and then incrementally add identical redundant servers to scale out the web-server layer . Microsoft has been pushing hard lately on Service Oriented Architecture which relies more heavily on WCF and remote invocation . This is seen as a key to the cloud strategy that would have people moving parts or all of their applications to flexible resources in the cloud which MS would like to host with Azure and the like . Comment : I m to split my answer into 3 comments due to the length . I totally understand your point about the open bring your own x approach vs . the integrated stack approach but what I m asking is why not because of their differences in philosophical approach but rather from a technical and architectural level . I don t understand why Microsoft s model satisfies the need for Microsoft applications and why the Java application server model does the same for Java applications . Comment : Part 2 - Architecturally from a general application requirements perspective the same concerns issues ought to be present in both cases . Regarding WCF I was simply using it as an example of how a .net web app might talk to some other logical or physically different process . It could be a can-and-string . That isn t core to my question . Comment : Part 3 - Obviously hosting objects inside the web server s asp.net process works if you don t need a distributed architecture . I m just saying that in Microsoft land this approach is more common . You d want a distributed-system if you wanted to distribute processing load for example . What I m wondering is if Microsoft s original approach with MTS gave you this ability why did they then essentially take focus off MTS and focus more on an all-local approach Comment : I don t know that Microsoft is more focussed on the all-local approach as much as developers who use Microsoft tools gravitate toward the all-local approach . If you read Microsoft s development literature over the past few years MSDN Magazine MSDN.com blogs etc . Microsoft is very much pushing SOA architecture based on WCF . As a developer who s deployed large online solutions based on .NET I generally lean to the local approach because the distributed approach ends up costing me performance at runtime and most of my projects don t involve sharing services across multiple applications .", "Question : I m stumped trying to come up to a difference between a web site and a web application for myself . As I see it a web site points to a specific page and a web application is more of some sort of portal to content and information . But where I m stuck is that a web application is still viewed through a browser is it not and a web site can still view content dynamically making the line between web site and application prety gray . For instance does a web site using ASP.NET or AJAX I assume ASP.NET is AJAX s proprietary sibling if not ignore ASP.NET AND concentrate on the AJAX becomes a web application because it can retrieve data dynamically and asynchronously or would a website using PHP and a CMS be more of a web application because it forms the pages on request based on the request of the client and its content in its databse Or maybe I m totally wrong here - what differenciates between a web application and a website Comment : A couple of thousand dollars . Comment : The same as difference between a cell phone and a smartphone . Comment : So basically a web application is a subset of the other Comment : I think it is more like a website is a subset of a web application . Comment : Have a look at stackoverflow.com questions 3698362 http : stackoverflow.com questions 3698362 difference-between-website-and-web-application-in-visual-studio 11607329 11607329 .. . Answer : It s like whisky and scotch all web apps are web site but not all web sites are web app . A web application or Rich Internet Applications is a web site that does more than displaying content it has a business logic . It s intended for user interactions performing actual business functions . Compared to web sites i.e . blogs and news sites web apps provide a richer user-experience . The use-case of an application is always to DO something with it .. . .. . -- Christian Heilmann Principal Developer Evangelist at Mozilla Corporation", "Question : null .. . Answer : We re going to be implementing ADFS authentication at my workplace soon and we need to add support for it to our various in-house developed web apps . Currently we have very nice looking login pages for our various web apps that go nicely with the rest of the applications . The ADFS login page on the other hand stands out like a sore thumb . Since ADFS support falls under another department we don t really have much control over its look-and-feel . Is it possible to use login pages that are part of our applications and post the login details to the ADFS servers to get authenticated If it is what would this kind of setup be called so I can find info on it . If this isn t possible is it possible to setup multiple login pages on the ADFS servers so we can play around with customizing them while others are actively being used", "Question : Are there any tool you recommend for security-testing of web-applications I have used WebScarab from OWASP but find it a bit difficult and unwieldy to use . Is there anything else better you would suggest using .. . Answer : I use Nikto http : www.cirt.net nikto2 . Nikto is an Open Source GPL web server scanner which performs comprehensive tests against web servers for multiple items including over 3500 potentially dangerous files CGIs versions on over 900 servers and version specific problems on over 250 servers . Scan items and plugins are frequently updated and can be automatically updated if desired . Nikto is not designed as an overly stealthy tool . It will test a web server in the shortest timespan possible and it s fairly obvious in log files . However there is support for LibWhisker s anti-IDS methods in case you want to give it a try or test your IDS system . This list could also help : Top 10 Web Vulnerability Scanners http : sectools.org web-scanners.html", "Question : I m stumped trying to come up to a difference between a web site and a web application for myself . As I see it a web site points to a specific page and a web application is more of some sort of portal to content and information . But where I m stuck is that a web application is still viewed through a browser is it not and a web site can still view content dynamically making the line between web site and application prety gray . For instance does a web site using ASP.NET or AJAX I assume ASP.NET is AJAX s proprietary sibling if not ignore ASP.NET AND concentrate on the AJAX becomes a web application because it can retrieve data dynamically and asynchronously or would a website using PHP and a CMS be more of a web application because it forms the pages on request based on the request of the client and its content in its databse Or maybe I m totally wrong here - what differenciates between a web application and a website Comment : A couple of thousand dollars . Comment : The same as difference between a cell phone and a smartphone . Comment : So basically a web application is a subset of the other Comment : I think it is more like a website is a subset of a web application . Comment : Have a look at stackoverflow.com questions 3698362 http : stackoverflow.com questions 3698362 difference-between-website-and-web-application-in-visual-studio 11607329 11607329 .. . Answer : Websites are primarily informational . In this sense http : cnn.com and http : php.net are websites not web-applications . Web applications primarily allow the user to perform actions . Google Analytics http : www.google.com analytics gmail http : gmail.com and jslint http : www.jslint.com are web-applications . They are not entirely exclusive . A university website likely gives information such as location tuition rates programs available etc it will likely have web-applications that allow teachers to manage grades and course materials applications for students to register for and withdraw from courses etc . Comment : A website can even host a web-application . But I like the application analogy in the web you do here : Comment : is Google a web app Comment : I think google is a webapp . it provides information as user interact . by this scene we can say google an web app . Comment : : Succinct and to-the-point Answer . Comment : Nice one . According to my understanding from your answer stack-overflow is an we application . It allows users to add edit delete upvote down vote questions . Please let me know whether i am correct", "Question : I m currently working on a web application and the powers above have decided that overriding the browser s right-click menu with our own application-specific one is the way to go . I totally disagree . I feel that when someone is using a web browser they have certain expectations about what should happen when they use the right-click functionality of a pointing device and violating these expectations by purposefully supplanting this functionality is very disconcerting annoying to the user . What do you think Have you ever seen right-click done well in a web app I mean in a way that you actually thought Yes this right-click functionality was a great decision . .. . Answer : It s generally not a good idea : .. . .. . Expectations .. . .. . Users especially power users expect to be able to right-click on elements in desktop applications in order to get a menu of element-specific actions . This expectation does not exist for web-applications - indeed the expectation is that right-clicking in a web page will give you the standard web-page menu where you can print open links in new windows view-source etc . Reliability .. . .. . Because the ability to override built-in menus has been so abused in the past mostly by naive programmers attempting to disable saving images many browsers prohibit it or make it difficult for client code to override in a reliable fashion . The Exception .. . .. . If you are creating a web app that closely simulates the behavior of an existing and well-known desktop app it may be appropriate to put the effort in required to implement sensible right-click menus . However you should then also follow the usual recommendation for these menus in desktop apps : use them to provide quick access to context-specific operations but also provide another means of accessing the same features . Comment : You will see more and more web-applications embrace right-clicking because - of all possible options - it is the best way to provide selection-centric actions without introducing modes . More recent web apps such as Google Docs and Yahoo Mail make extensive use of right-click . In applications whether delivered over the web or not users expect context-based menus . As browsers have gotten more consistent it is easier to implement reliably . Comment : Google Docs definitely fits the description of closely simulates the behavior of an existing and well-known desktop app . Not convinced Y Mail does though it certainly doesn t look act like a web app either . Gotta confess.. . I didn t know Y Mail used right-click until just now wonder what I ve been missing Comment : IMO right-clicking is very discoverable since it is a widely established convention and is often the first thing a user will do with a selection . I am often frustrated by web apps that force me to jump through hoops to accomplish an action a simple right-click would have resolved . If it acts like a desktop actions I would expect the right-click to be imminently discoverable . Comment : @Michael : jumping through hoops is bad UX in general regardless of what form that hoop takes . That s why I emphasized the last line of this answer.. . Keep in mind more and more folks are using devices where clicking on a web page element takes the form of touching the screen - even a seasoned MS-Office-jockey isn t necessarily going to think right-click in that context . Comment : Right click long press on touch devices . Notice Google maps also now offers right-click . I think your post was right on in 2009 . Just now as we are cresting on 2012 it s time to reconsider .", "Question : For our company I m creating a big Extranet website which will feature a set of sub-applications . I m a bit puzzled by what should be the right setup of the solution and projects . I have one web application that we call the Portal . It contains the authentication authorization classes masterpages navigation url routing classes and theme definitions . It will also contain some basic overviews for our customers to get a quick idea of their project status . In the coming year we are going to develop and integrate more applications with the portal . Think of it as detailed overviews and tools called Feature A B and C . Over the years we will improve these applications and release new versions . These web-applications should fit into the navigation of the Portal seamlessly . I d like them to reuse the masterpages and themes . What is the proper way to setup this solution How can I tie the applications together re-use the master-pages and keep it maintainable How can I share certain webcontrols ASCX in a proper way We are using TFS perhaps any branching merging ideas Edit : .. . I d like to create it in ASP.Net WebForms we have the most experience in that area . But basically we can use anything we ve got the webserver under our own control as long as it is Microsoft oriented not switching to php or something like that : Comment : Any specific framework you want to use Webforms asp.net-mvc anything else Comment : Updated the starting post .. . Answer : Use MVC Concepts from now . they give more extendability and flexibility for a robust applications .", "Question : For our company I m creating a big Extranet website which will feature a set of sub-applications . I m a bit puzzled by what should be the right setup of the solution and projects . I have one web application that we call the Portal . It contains the authentication authorization classes masterpages navigation url routing classes and theme definitions . It will also contain some basic overviews for our customers to get a quick idea of their project status . In the coming year we are going to develop and integrate more applications with the portal . Think of it as detailed overviews and tools called Feature A B and C . Over the years we will improve these applications and release new versions . These web-applications should fit into the navigation of the Portal seamlessly . I d like them to reuse the masterpages and themes . What is the proper way to setup this solution How can I tie the applications together re-use the master-pages and keep it maintainable How can I share certain webcontrols ASCX in a proper way We are using TFS perhaps any branching merging ideas Edit : .. . I d like to create it in ASP.Net WebForms we have the most experience in that area . But basically we can use anything we ve got the webserver under our own control as long as it is Microsoft oriented not switching to php or something like that : Comment : Any specific framework you want to use Webforms asp.net-mvc anything else Comment : Updated the starting post .. . Answer : I wouldn t think of the applications as seperate but as modules of the overall portal . I would recommend you look into MEF as this would seem to be a perfect fit . http : blogs.msdn.com hammett archive 2009 04 23 mef-and-asp-net-mvc-sample.aspx", "Question : I am a long time Java web-applications developer and in my experience there are 2 major approaches for building web-applications . The first approach is to use technologies which go back and forth from the client to server like Struts SpringMVC JSF and so on . The second is to use technologies which run mostly on the client like Flex Swing web start JavaFX and so on . I know these two approaches are going to stay here for a long time and I know each has it s advantages and disadvantages . I would really like to know when do you prefer to use each of them What should I consider when choosing the one over the other Say whatever comes to your mind in terms of Security application type Stateless Statefull DB calls or anything else . It would be interesting to see what are the different aspects . .. . Answer : My advice would be to avoid plugins in all cases . Don t use the java flash or silverlight plugins for web apps . You re setting yourself up for a world of hurt down the road . If you want to build a rich client use something that generates javascript . If you like Java use GWT . If Java is not your cup of tea look at the javascript toolkits like ExtJS Dojo Sproutcore . The way I see the trade-offs : .. . .. . Thin client regular HTML : .. . .. . Upside : easier adapted to a variety of browsers and devices .. . Upside : Better for low-bandwidth devices .. . Downside : less richness in UI controls .. . Downside : roundtrip times will kill flow . If users are expected to work for long durations in your app this approach won t work well . Rich client GWT or JS toolkit : .. . .. . Upside : server-side can implement just a clean API .. . Upside : UI design is easier to implement richer .. . Upside : you can plan your design around slow roundtrip times with offline being an extreme case of slow roundtrip times .. . Downside : need a separate front-end for mobile-devices and low-powered browsers .. . Downside : low bandwidth will make loading so slow users just walk away .. . .. . For my apps I fall squarely into the rich client camp . But then I don t make apps for the public internet .", "Question : null .. . Answer : Application clients seem like second rate citizens in Java EE and I would like input on why Eg : .. . .. . the Java EE examples have numerous web-applications explaining every use-case but not a single example of an application-client . There is very little information or tutorials on google . Java EE offers a lot of advantages for application clients as well . Benefits of application clients : .. . .. . No browser that adds a consistent delay to every load I have clients simply say no to web based applications here . More control Eg . handle internet network outages .. . Webstart should make it almost as smooth to deploy to users . Benefits to web-applications : .. . .. . Runs in the browser so end users have zero installation . Known technologies and patterns etc whith CSS and HTML for developers and familiar browser for users . So what are the limitations and pro s con s of each Comment : In the end it was easier to use spring so I dropped Java EE altogether ." ] }
[]
intranet
UNK_RELATION
tooltipster@tooltipster@176
tooltipster -- a lightweight flexible jquery plugin by caleb jacob enabling you to easily create semantic modern tooltips enhanced with the power of css.http : calebjacob.com @placeholder .
{ "confidence": [ 58.924560546875, 48.82194519042969, 47.18793487548828, 46.49733352661133, 43.33412170410156, 40.22474670410156, 40.211551666259766, 37.326446533203125, 36.97589874267578, 36.7550163269043, 36.112335205078125, 34.8258171081543, 34.26184844970703, 33.570377349853516, 32.68250274658203, 32.389991760253906, 31.925987243652344, 31.778392791748047, 31.767505645751953, 31.596881866455078, 30.950359344482422, 30.795955657958984, 30.751827239990234, 30.626121520996094, 30.177459716796875, 29.96646499633789, 29.765583038330078, 29.548301696777344, 29.548301696777344, 29.512351989746094, 29.47116470336914, 29.057044982910156, 28.353025436401367, 28.174108505249023, 28.05561065673828, 28.05561065673828, 28.05561065673828, 27.958656311035156, 27.369342803955078, 27.369342803955078, 27.369342803955078, 27.369342803955078, 27.310619354248047, 27.27362060546875, 27.215492248535156, 27.215492248535156, 27.215492248535156, 27.203962326049805, 27.11919403076172, 27.07073974609375, 26.944072723388672, 26.779586791992188, 26.779586791992188, 26.5050048828125, 26.499263763427734, 26.47966194152832, 26.226497650146484, 26.124189376831055, 26.091386795043945, 25.949920654296875, 25.713764190673828, 25.616172790527344, 25.44135284423828, 25.376293182373047, 25.360769271850586, 25.35555648803711, 25.284812927246094, 25.284812927246094, 25.284812927246094, 25.247230529785156, 25.221473693847656, 25.18484878540039, 25.18484878540039, 24.984708786010742, 24.87126350402832, 24.825817108154297, 24.744117736816406, 24.656042098999023, 24.593351364135742, 24.593351364135742, 24.593351364135742, 24.571775436401367, 24.55637550354004, 24.385440826416016, 24.329795837402344, 24.31724739074707, 24.25218963623047, 24.160709381103516, 24.160709381103516, 24.11825180053711, 24.00828742980957, 23.84661865234375, 23.837141036987305, 23.666322708129883, 23.666322708129883, 23.666322708129883, 23.666322708129883, 23.666322708129883, 23.666322708129883, 23.666322708129883 ], "content": [ "The tooltip plugin is called tooltipster developed by Caleb Jacob .", "I am trying to get the text within a span to be the content of a tooltip using the Tooltipster jQuery plugin http : calebjacob.com tooltipster .", "I am using tooltipster plugin to create tooltips .", "I d like to use the Tooltipster plugin http : calebjacob.com tooltipster to display form errors generated by the jQuery Validate plugin http : docs.jquery.com Plugins Validation .", "I am using a jquery plugin called Tooltipster http : calebjacob.com tooltipster and I am insterting some HTML into the tip which contains an href .", "I m using the Tooltipster plugin http : calebjacob.com tooltipster which is great but I have dynamically generated content that s being inserted into the DOM .", "I am using jQuery plugin Tooltipster .", "I m using the jquery tooltipster plugin https : iamceege.github.io tooltipster and I m having a problem with the positioning .", "jQuery for Validate plugin : .. . .. . jQuery for Tooltipster plugin : .. . .. . HTML : .. . .. . How would I integrate the usage of these two jQuery plugins so that validation errors appear inside the tooltips", "First initialize the Tooltipster plugin with any options http : calebjacob.com tooltipster options on all specific form elements that will display errors : .. . .. . Second use Tooltipster s advanced options http : calebjacob.com tooltipster advanced along with the success : and errorPlacement : callback functions built into the Validate plugin http : docs.jquery.com Plugins Validation validate toptions to automatically show and hide the tooltips as follows : .. . .. . Working Demo : http : jsfiddle.net 2DUX2 http : jsfiddle.net 2DUX2 .. . .. . EDIT : Updated code to take advantage of the new Tooltipster API features released in version 2.1 on 2 12 13 .. . .. . .. . .. . UPDATE for Tooltipster 3.0 .. . .. . Tooltipster 3.0 is out and as such doesn t work the same as illustrated above .", "I have to tooltipster jquery and tooltipster css .", "I m using jquery-validate with the tooltipster to show the error messages as tooltips instead of default .", "I am using the tooltipster jquery plugin to show title in a nicer way .", "I m using the Tooltipster plugin on my Boostrap site .", "will it be okay if you do it without the tooltipster plugin", "I m using the Jquery Validation Plugin http : jqueryvalidation.org and Tooltipster Plugin http : iamceege.github.io tooltipster based in the example found in this post http : stackoverflow.com questions 14741688 how-to-display-messages-from-jquery-validate-plugin-inside-of-tooltipster-toolti .", "I am using a jQuery plug-in called Tooltipster .", "A description of the available parameters for the content option can be seen here : .. . .. . http : calebjacob.com tooltipster options .. . .. . JQuery .. . .. . HTML .. . .. . jsFiddle .. . .. . http : jsfiddle.net rwone y9uGh 1 .. . .. . Solution .. . .. . Based on the answer below this was the implementation I went with .", "Removing multiple : true helps but my MAC gets overloaded and browser crashes saying : .. . .. . Tooltipster : one or more tooltips are already attached to this element : ignoring .", "I use tooltipster library .", "I m trying to use tooltipster jQuery plugin but it doesn t work for or tag : .. . .. . I ve just tried this simple code : .. . .. . -- div works fine .. . .. . -- select doesn t work .. . .. . -- span doesn t work .. . .. . Could you please help me", "I ve been banging my head against the computer for the past couple hours as to how to customize tooltips using tooltipster http : iamceege.github.io tooltipster getting-started .", "I m using this plugin http : iamceege.github.io tooltipster .", "I am using the Tooltipster plugin to display form errors generated by the jQuery Validate plugin however i cant get it to display error s for select inputs", "https : github.com iamceege tooltipster issues 335 .. . .. . https : github.com iamceege tooltipster issues 342", "I m using tooltipster to generate tooltips but I want to set the tooltip based on a data attribute from the element it s attached to .", "Have you read iamceege.github.io tooltipster delegation http : iamceege.github.io tooltipster delegation", "I have to use bind html inside tooltip using tooltipster jquery .", "How to implement scrollbar inside tooltip using tooltipster jquery", "I only need one tooltipster shown at the time .", "github.com iamceege tooltipster https : github.com iamceege tooltipster", "Just read carefully manual for tooltipster - http : iamceege.github.io tooltipster .. . .. . All you need it s just use right settings .", "div and script is : document .ready function my-tooltip .tooltipster content : span strong This text is in bold case strong span position : bottom So if you try to minimize the browser window in a such way that the tooltipster would not be entirely visible than the tooltipster will have the position top when it should be on bottom", "I m using tooltipster with custom styling .", "I am using tooltipster http : iamceege.github.io tooltipster to generate tool tips .", "In .tooltip .tooltipster .tooltip .tooltipster is undefined .. . .. . The function is define this way in the html .", "Calling a tooltipster method shall be done via .. . .tooltipster methodName arg1 arg2 .. . .", "I m using the Anything Slider in conjunction with Tooltipster to create face tags on images .", "in your answer that uses tooltipster", "At that time Tooltipster will render the content .", "But somewhere in the bakend it is made by tooltipster .", "Both need tooltipster .", "The JSFiddle example is great exactly what we need.. . except that doesn t work because you haven t included the tooltipster or jquery libraries .", "I ve been dabbling with jQuery plugins for a site I m building that requires tooltips .", "I just understand that you want not to use tooltipster .", "The issue is you don t have tooltipster included .", "Make sure you are using the files of Tooltipster v4 .", "I ve done my research online and there aren t any posts related to Tooltips for elements in an SVG object using the-Tooltipster plugin and solutions for other peoples queries ain t working for my case .", "Now : TypeError : .tooltip .tooltipster is not a function http : stackoverflow.com questions 37890737 tooltipster-worked-now-typeerror-tooltip-tooltipster-is-not-a-function but I can t seem to get with it .", "However Tooltipster v4 does let you force a position .", "Use the multiple option to attach more tooltips .", "document .ready function .. . .tooltip-custom .tooltipster .. . theme : tooltipster-noir .. . .. . .. . .. . .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css tooltipster.css rel stylesheet .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css themes tooltipster-noir.css rel stylesheet .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 js jquery.tooltipster.js script .. . .. . a href class tooltip-custom title This is my very long run on tooltip that just doesnt seem to want to end or split lines .", "In your case add maxWith .. . .. . .. . document .ready function .. . .tooltip-custom .tooltipster .. . theme : tooltipster-noir .. . maxWidth : 500 .. . .. . .. . .. . .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css tooltipster.css rel stylesheet .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css themes tooltipster-noir.css rel stylesheet .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 js jquery.tooltipster.js script .. . .. . a href class tooltip-custom title This is my very long run on tooltip that just doesnt seem to want to end or split lines .", "I m using the tooltipster plugin to show fields s hints and also another tooltip at bottom to show errors from jquery-validate plugin but for some reason all the messages updates are happening on the first error tooltip .", "The plugin documentation http : iamceege.github.io tooltipster options suggests you should do this in the functionReady option : .. . .. . Disclaimer : I ve never used this plugin .", "Error : .. . .. . TypeError : .tooltip .tooltipster is not a function .", "snippet http : imgur.com 50gBFOX.jpg .. . .. . I styled the arrows by overriding the .tooltipster-arrow-left right span with : .. . .. . Is there a way to tell tooltipster what the size of the arrow will be", "I ve recently tried using a new plugin for tooltips because I like the functionality .", "You forgot to initialize Tooltipster on the type radio inputs .", "The most probable reason is .. . .. . contentAsHTML animation delay content etc are options that tooltipster http : iamceege.github.io tooltipster accepts .", "In your tooltipster setup you ll want to have the following selector and options enabled : .. . .. . I hope this helps", "You don t need the script window.jQuery document.write script src . . . . js jquery.min.js script script and the last reference to jQuery in the bottom right before tooltipster .", "I inserted : script body .on mouseenter .tooltip : not .tooltipstered function this .tooltipster theme : tooltipster-custom contentAsHTML : true position : bottom .tooltipster show script right after the body tag and this indeed worked .", "As Stephan mentioned you want to use the config option to get the tooltipster functionality .", "I tried adding a margin to the .tooltipster-base but this doesn t work well .", "Tooltipster has API methods that allow this .", "Tooltipster seems to be continually caching the data incorrectly .", "I have written a directive to work with awesome Tooltipster .", "@user1896653 yes tooltipster removes the title from a tag .", "Here s the JSFiddle : .. . .. . https : jsfiddle.net 68umt5b3 .. . .. . As you notice tooltips are getting changed but they overlay on one another .", "I want to use the jQuery datepicker within these inputs to select the date-range however the datepicker doesnt show inside tooltipster .", "NOTE : I ve put the tooltipster plugin into my external js file being - scripts.js .. . .. . Nothing I do is working", "This is the form that i m trying validate .. . .. . And this is the script that make the validation .. . .. . Is weird because without using the Tooltipster plugin this validation works perfectly .", "Here s the official doc of it : getbootstrap.com javascript tooltips http : getbootstrap.com javascript tooltips", "You need to add tooltipster-noir.css - cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css themes https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css themes tooltipster-noir.min.css see your code working - jsfiddle.net pj93eswz http : jsfiddle.net pj93eswz", "Please notice the comment above your Tooltipster code : initialize tooltipster on text input elements", "have you created a static inject tooltipster for this classs", "So on my html page I have the object : .. . .. . A simple SVG mockup for the sake of this question my svgs are huge : .. . .. . How Tooltipster works : .. . .. . For those of you who aren t familiar with tooltipster all you have to do is assign a class or id to the tooltipster plugin like so : .. . .. . and Tooltipster will use the title attribute of an element for the tooltip as shown above OR you can use javascript to generate the tooltip message : .. . .. . Dead simple", "Tooltipster v3 does not let you force the position to bottom if there is not not enough space at the bottom it will indeed switch to the opposite direction .", "Use Tooltipster v4 experimental on the v4 branch of the project and you will be able to change the size of the arrow .", "You should try the experimental Tooltipster v4 on the v4 branch of the project it has this feature using the triggerOpen option .", "Look at the sample code in the answer of the duplicate I flagged http : stackoverflow.com questions 14741688 how-to-display-messages-from-jquery-validate-plugin-inside-of-tooltipster-toolti .", "@starbucks sounds like you forgot to include the code for the jQuery Validate plugin .", "Using Chrome s console I get this error : .. . .. . I ve been trying to find a duplicate of jQuery as it was a solution provided in here : Tooltipster worked .", "After adding the code and saving I noticed tooltips and some of the jQuery elements weren t working anymore the xbbcode plugin also stopped working but bootstrap a color-picker and amplify still were working fine .", "element .tooltipster content newError replace message .. . element .tooltipster show show bubble .. . .. . .. . success : function label element .. . element .tooltipster hide hide bubble when error clears .. . .. . .. . .. . 2 .", "You can use the API : .. . .. . Check if the element already has tooltipster :", "It is possible know if a HTML already have the tooltipster initialized", "See options http : iamceege.github.io tooltipster options .", "I ve been using the Tooltipster http : iamceege.github.io tooltipster plugin for various elements on my website recommend this plugin btw and I ve decided that I d like to use it on elements within an SVG object file but this is turning out to be a lot more difficult than first thought .", "Tooltipster is fired when the document is ready .", "However what you can test is that the function you are passing to tooltipster does what you want .", "Don t forget that you still need to attach .tooltipster to your relevant input elements as illustrated above . .. . .. . DEMO using Tooltipster version 3.0 : jsfiddle.net 2DUX2 3 http : jsfiddle.net 2DUX2 3", "I have a working example of the tooltipster usage : working code .", "I don t know for what reason but in tooltipster html content won t display .", "The problem though is that tooltipster doesn t always show the new table data .", "First of all it doesn t make sense to test whether tooltipster calls that code or not .", "You re configuring initializing ToolTipster for all input elements at once.. .", "Instead configure initialize ToolTipster for each input element type .", "Adding the below to your javascript will sort that out : .. . .. . Regarding tooltipster .. . .. . 1 ." ] }
{ "confidence": [ 67.00712585449219, 54.1406135559082, 52.540748596191406, 51.619964599609375, 50.38224792480469, 50.07976150512695, 49.30417251586914, 47.519744873046875, 47.209686279296875, 46.91649627685547, 45.81071472167969, 44.987945556640625, 43.307647705078125, 42.55958557128906, 42.2359733581543, 41.92621612548828, 41.90620040893555, 41.11370849609375, 41.062259674072266, 40.881446838378906 ], "content": [ "Question : I d like to use the Tooltipster plugin http : calebjacob.com tooltipster to display form errors generated by the jQuery Validate plugin http : docs.jquery.com Plugins Validation . jQuery for Validate plugin : .. . .. . jQuery for Tooltipster plugin : .. . .. . HTML : .. . .. . How would I integrate the usage of these two jQuery plugins so that validation errors appear inside the tooltips .. . Answer : First initialize the Tooltipster plugin with any options http : calebjacob.com tooltipster options on all specific form elements that will display errors : .. . .. . Second use Tooltipster s advanced options http : calebjacob.com tooltipster advanced along with the success : and errorPlacement : callback functions built into the Validate plugin http : docs.jquery.com Plugins Validation validate toptions to automatically show and hide the tooltips as follows : .. . .. . Working Demo : http : jsfiddle.net 2DUX2 http : jsfiddle.net 2DUX2 .. . .. . EDIT : Updated code to take advantage of the new Tooltipster API features released in version 2.1 on 2 12 13 .. . .. . .. . .. . UPDATE for Tooltipster 3.0 .. . .. . Tooltipster 3.0 is out and as such doesn t work the same as illustrated above . The following code provides an updated example . This version has the added benefit of not calling Tooltipster on every keystroke when the message has not yet changed . Don t forget that you still need to attach .tooltipster to your relevant input elements as illustrated above . .. . .. . DEMO using Tooltipster version 3.0 : jsfiddle.net 2DUX2 3 http : jsfiddle.net 2DUX2 3 Comment : I am trying to use your JS but I get this error and not sure how to solve it as i am new to JS : TypeError : .. . .validate is not a function submitHandler : function form-for demo Comment : @starbucks sounds like you forgot to include the code for the jQuery Validate plugin . Comment : @starbucks Click this link http : stackoverflow.com search q user 3A594235+ 5Bjquery-validate 5D+is 3Aanswer+highlight and browse my other answers for something similar . Otherwise feel free to read the FAQ http : stackoverflow.com help and post a new question because the comments section is not the place for new issues questions . Comment : @Sparky Great question and even better answer : Unfortunately I can t get it to work with dynamically created controls : Comment : @eddy I m sorry you re having problems but hijacking comments on another question s answer is not the proper way to ask for help here . Please post a whole new question as I stated already .", "Question : I am trying to get the text within a span to be the content of a tooltip using the Tooltipster jQuery plugin http : calebjacob.com tooltipster . A description of the available parameters for the content option can be seen here : .. . .. . http : calebjacob.com tooltipster options .. . .. . JQuery .. . .. . HTML .. . .. . jsFiddle .. . .. . http : jsfiddle.net rwone y9uGh 1 .. . .. . Solution .. . .. . Based on the answer below this was the implementation I went with . The snippet below shows integration of the js solution with the plugins parameters : Comment : if you found the answer useful would you mind marking it as accepted .. . Answer : Try .. . .. . Demo : Fiddle http : jsfiddle.net arunpjohny X88u3 Comment : This solution adds the text within the p tags to the tooltip . I am trying to add the text within the span tags to the tooltip . Comment : @user1063287 you mean for the second tooltip you want to display UNIQUE like jsfiddle.net arunpjohny X88u3 2 http : jsfiddle.net arunpjohny X88u3 2 Comment : For any instance where there is a span which has an associated tooltip the text within the span tags should be what is displayed in the tooltip . So in the example above the first tooltip should be SOME MORE and the second tooltip should be UNIQUE . Comment : @user1063287 in the second example it is working then Comment : @user1063287 see the updated answer and fiddle", "Question : I m using the Tooltipster plugin http : calebjacob.com tooltipster which is great but I have dynamically generated content that s being inserted into the DOM . It doesn t seem like tooltipster is detecting those as it s being set to trigger on Document Ready . I know this is a bit of an esoteric plugin but any ideas on how to get the plugin to work for newly created elements in the DOM Thanks Comment : I have also the same issue.Did any one get a solution for that .. . Answer : Try this one .. . .. . document .on mouseover .ololo function event this .tooltipster multiple : true", "Question : I m using the Tooltipster plugin http : calebjacob.com tooltipster which is great but I have dynamically generated content that s being inserted into the DOM . It doesn t seem like tooltipster is detecting those as it s being set to trigger on Document Ready . I know this is a bit of an esoteric plugin but any ideas on how to get the plugin to work for newly created elements in the DOM Thanks Comment : I have also the same issue.Did any one get a solution for that .. . Answer : Just add the instantiation script in the ajax content too . Also set the option multiple : true .. . .. . Its worked for me Comment : Why multiple true", "Question : I am trying to add tooltips to a standalone SVG file but it is returning the following error : .. . .. . for the following jquery-2.0.0 function : .. . .. . If I present the svg file through HTML page it works fine . But I need it to work as a pure SVG and can t manage to do that . Here is the same page expressed in HTML http : jsfiddle.net Rupture 2gEUJ 1 works and SVG http : pastebin.com 41BceMqt does not . The tooltip plugin is called tooltipster developed by Caleb Jacob . edit : It seems that the question was stated incorrectly . Here s a relevant quote from keith-wood.name : .. . .. . The SVG DOM is different to the HTML DOM for which jQuery was designed . In particular any attributes that can be animated are stored as objects instead of plain strings . This includes the class attribute . Thus jQuery s functions that work with classes don t work on SVG nodes . Several modifications of original jQuery versions can be found on the internet that try to solve this problem but they in turn do not work with the most recent versions of jQuery plugins . I am not sure if this makes the question answered or not though . Comment : name in style would work only if style is a dictionary . You might want to do if style.indexOf name 0 instead Comment : It returns TypeError : style.indexOf is not a function when changed to if style.indexOf name 0 return name pastebin line 6037 http : pastebin.com ThQjxch0 . I tried playing with brackets and using .toString to fix it but couldn t . There was also a bug https : bugs.launchpad.net jquery +bug 364750 on qTip with type.indexOf is not a function but I am not sure if it has any relevance here . .. . Answer : I had this problem with IE10 and just solved when I downgrade jQuery to version 1.9.1 . http : code.jquery.com jquery-1.9.1.min.js", "Question : I m using the Tooltipster plugin http : calebjacob.com tooltipster which is great but I have dynamically generated content that s being inserted into the DOM . It doesn t seem like tooltipster is detecting those as it s being set to trigger on Document Ready . I know this is a bit of an esoteric plugin but any ideas on how to get the plugin to work for newly created elements in the DOM Thanks Comment : I have also the same issue.Did any one get a solution for that .. . Answer : I think it would be accomplished if you write you plugin load code after the DOM has finished loading . You may write inside : .. . .. . As this executes after all DOM has finished loading .", "Question : I ve recently tried using a new plugin for tooltips because I like the functionality . However I have come into an issue I do not know how to add new lines so my tooltips don t just run across the whole page . I tried some of the solutions I read on here such as escape characters but they don t work . document .ready function .. . .tooltip-custom .tooltipster .. . theme : tooltipster-noir .. . .. . .. . .. . .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css tooltipster.css rel stylesheet .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css themes tooltipster-noir.css rel stylesheet .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 js jquery.tooltipster.js script .. . .. . a href class tooltip-custom title This is my very long run on tooltip that just doesnt seem to want to end or split lines . Ok maybe I am overreacting but still . I want to be able to start a new line whenever I please h1 Hello h1 a .. . Answer : contentAsHTML : True If the content of the tooltip is provided as a string it is displayed as plain text by default . If this content should actually be interpreted as HTML set this option to true . Comment : Thanks it works", "Question : Here s the JSFiddle : .. . .. . https : jsfiddle.net 68umt5b3 .. . .. . As you notice tooltips are getting changed but they overlay on one another . Removing multiple : true helps but my MAC gets overloaded and browser crashes saying : .. . .. . Tooltipster : one or more tooltips are already attached to this element : ignoring . Use the multiple option to attach more tooltips . I only need one tooltipster shown at the time . How can I fix this enter image description here http : i.stack.imgur.com WGJPQ.png .. . Answer : Use the content method to update the content of the tooltip or destroy it and create a new one .", "Question : I ve recently tried using a new plugin for tooltips because I like the functionality . However I have come into an issue I do not know how to add new lines so my tooltips don t just run across the whole page . I tried some of the solutions I read on here such as escape characters but they don t work . document .ready function .. . .tooltip-custom .tooltipster .. . theme : tooltipster-noir .. . .. . .. . .. . .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css tooltipster.css rel stylesheet .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css themes tooltipster-noir.css rel stylesheet .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 js jquery.tooltipster.js script .. . .. . a href class tooltip-custom title This is my very long run on tooltip that just doesnt seem to want to end or split lines . Ok maybe I am overreacting but still . I want to be able to start a new line whenever I please h1 Hello h1 a .. . Answer : Just read carefully manual for tooltipster - http : iamceege.github.io tooltipster .. . .. . All you need it s just use right settings . In your case add maxWith .. . .. . .. . document .ready function .. . .tooltip-custom .tooltipster .. . theme : tooltipster-noir .. . maxWidth : 500 .. . .. . .. . .. . .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css tooltipster.css rel stylesheet .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css themes tooltipster-noir.css rel stylesheet .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 js jquery.tooltipster.js script .. . .. . a href class tooltip-custom title This is my very long run on tooltip that just doesnt seem to want to end or split lines . Ok maybe I am overreacting but still . I want to be able to start a new line whenever I please h1 Hello h1 a Comment : Is there a way to add a line break inline though Comment : This does not in any way answer the question .", "Question : I am using a jquery plugin called Tooltipster http : calebjacob.com tooltipster and I am insterting some HTML into the tip which contains an href . If I click the link the page is opened as I expect . However if I try to use that same href add a class name and then try to fire a jquery function it will not fire . I have been pulling my hair out for hours trying to figure this out . Any help would be appreciated . Here is some stripped down code to illustrate an example . I put together a Fiddle to illustrate the issue . http : jsfiddle.net bCqyL .. . Answer : When you set click handler for .udpate element jquery has not known about elements with this class yet . This is why handler does not set in you example . Instead please use an other approach that handles all clicks for the document and selects only addressed for .update elements . http : jsfiddle.net bCqyL 3 Comment : Thanks for the assistance . That worked .", "Question : I m using jquery-validate with the tooltipster to show the error messages as tooltips instead of default . The issue I m having is the error message placement for multiple checkboxes . I want to show on the main label which is Location in this case instead of showing on the first checkbox . Below is the sample code .. . .. . Form : .. . .. . JS : .. . Answer : The issue I m having is the error message placement for multiple checkboxes . You re configuring initializing ToolTipster for all input elements at once.. . Instead configure initialize ToolTipster for each input element type . Then you can set custom placement options for the checkbox tooltips . See the examples here http : stackoverflow.com a 21027100 594235 .", "Question : I ve been dabbling with jQuery plugins for a site I m building that requires tooltips . The tooltips use AJAX to supply data when hovered and it was all working fine and dandy until I added a tooltip section for items . After adding the code and saving I noticed tooltips and some of the jQuery elements weren t working anymore the xbbcode plugin also stopped working but bootstrap a color-picker and amplify still were working fine . I went back and removed the code to see if I had done something wrong there but the error still persists I didn t change anything else other than the additional tooltip so I don t understand why all of a sudden it won t work now . Here is the code used including the item tooltip I was trying to add at the bottom targeting .item . I don t see any visible errors here I had all my plugin scripts in one file and minified to minimize load-time but in trying to figure out why xbbcode and tooltipster suddenly don t work I went ahead and redownloaded the separate versions . Normally in this case I d suspect some sort of compatibility error between tooltipster and xbbcode but they had worked just fine before the item tooltip was added and when I temporarily removed xbbcode to see if the tooltips would start working again the result was the same . Comment : Can you make a jsfiddle Comment : Can you check that moment.js is still loading properly Everything that is not working seems to be under the call to moment . If that call is failing for some reason the rest of the JS below it will never execute . That s where I would start Comment : There are no errors present in your console Comment : Sorry for the delay responding There were no errors in my console that was the first thing I checked . I just commented out all calls to moment.js and there is no change . : I will throw up a jsfiddle in the next comment Comment : jsfiddle.net togetherjs 8QOlPmDwtK https : jsfiddle.net togetherjs 8QOlPmDwtK jsfiddle . Let me know if I set it up right I m not sure I did . : First time actually using jsFiddle . .. . Answer : You have a few issues . Regarding xbbcode .. . .. . You seem to have removed the Javascript call to actually initialize XBBCODE . Adding the below to your javascript will sort that out : .. . .. . Regarding tooltipster .. . .. . 1 . You need to include the CSS file which can be downloaded here http : iamceege.github.io tooltipster css tooltipster.css .. . 2 . Change your initialization code to this : .. . .. .", "Question : I m using the tooltipster plugin to show fields s hints and also another tooltip at bottom to show errors from jquery-validate plugin but for some reason all the messages updates are happening on the first error tooltip . What am I missing document .ready function .. . initialize tooltipster on text input elements .. . input .tooltipster .. . var tooltipsterErrorMsg .. . .. . initialize validate plugin on the form .. . myform .validate .. . showErrors : function errorMap errorList .. . Clean up any tooltips for valid elements .. . .each this.validElements function index element .. . if index tooltipsterErrorMsg.length .. . tooltipsterErrorMsg index .hide .. . .. . .. . .. . Create new tooltips for invalid elements .. . .each errorList function index error .. . if index tooltipsterErrorMsg.length .. . var tooltipObject error.element .tooltipster .. . trigger : custom .. . multiple : true .. . position : bottom .. . .. . .. . tooltipsterErrorMsg.push tooltipObject 0 .. . .. . tooltipsterErrorMsg index .content errorList index .message .show .. . .. . .. . rules : .. . field1 : .. . required : true .. . email : true .. . .. . field2 : .. . required : true .. . minlength : 5 .. . .. . .. . submitHandler : function form-for demo .. . alert valid form .. . return false .. . .. . .. . .. . .. . .. . .. . myform .. . margin : 100px .. . .. . input .. . margin : 20px .. . .. . a .. . display : block .. . position : absolute .. . bottom : 0 .. . .. . .. . .error .. . color : 900 .. . .. . .. . .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.3.0 css tooltipster.min.css rel stylesheet .. . script src https : ajax.googleapis.com ajax libs jquery 1.8.3 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.3.0 js jquery.tooltipster.min.js script .. . script src https : ajax.aspnetcdn.com ajax jquery.validate 1.11.1 jquery.validate.min.js script .. . form id myform .. . input type text name field1 title Tooltip teste 1 .. . input type text name field2 title Tooltip teste 2 .. . br .. . input type submit .. . form .. . .. . Here s the fiddle : http : jsfiddle.net macmessa m368ntxw Comment : Look at the sample code in the answer of the duplicate I flagged http : stackoverflow.com questions 14741688 how-to-display-messages-from-jquery-validate-plugin-inside-of-tooltipster-toolti . Basically your main mistake is trying to use the showErrors function.. . that is only intended for making a centralized list of errors and would have nothing to do with something like this . You simply need to properly employ the errorPlacement and success functions . Comment : I ve started using this sample that you ve linked but I do want to use the tooltip as a hint for the field and another one as a the error message . I can t see that in the sample code you said . Comment : The sample code fixes the jQuery Validation integration . As far as the hover hints simply integrate your own working code into the example . Comment : I re-opened the question and posted an answer below . .. . Answer : Well I achieved exactly what I needed using the errorPlacement and success as Sparky recommended I kind of mixed what I did with his example : .. . .. . .. . document .ready function .. . initialize tooltipster on text input elements .. . input .tooltipster position : top .. . var tooltipsterErrorMsg .. . .. . initialize validate plugin on the form .. . myform .validate .. . errorPlacement : function error element .. . if element .index tooltipsterErrorMsg.length .. . var tooltipObject element .tooltipster .. . trigger : custom .. . multiple : true .. . position : bottom .. . .. . .. . tooltipsterErrorMsg.push tooltipObject 0 .. . .. . tooltipsterErrorMsg element .index .content error .text .show .. . .. . success : function label element .. . tooltipsterErrorMsg element .index .hide .. . .. . submitHandler : function form-for demo .. . alert valid form .. . return false .. . .. . .. . .. . .. . .. . myform .. . margin : 100px .. . .. . input .. . margin : 20px .. . .. . a .. . display : block .. . position : absolute .. . bottom : 0 .. . .. . .. . .error .. . color : 900 .. . .. . .. . .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.3.0 css tooltipster.min.css rel stylesheet .. . script src https : ajax.googleapis.com ajax libs jquery 1.8.3 jquery.min.js script .. . script src https : ajax.aspnetcdn.com ajax jquery.validate 1.11.1 jquery.validate.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.3.0 js jquery.tooltipster.min.js script .. . .. . form id myform .. . input type text name field1 title Tooltip teste 1 data-rule-required true data-rule-email true .. . input type text name field2 title Tooltip teste 2 data-rule-required true data-rule-minlength 5 .. . br .. . input type submit .. . form Comment : Please notice how your ToolTipster bubble is re-rendering itself after every keyup event as opposed to mine where the bubble only re-renders itself IF when the message changes . Comment : You re still targeting all input elements with this selector input . As mentioned in my answer that also includes the input type submit element . You should be using a more specific selector such as input type text . Comment : I ll alter my code to use your new and last error msg . About the target elements it s just for tests I ll target only the needed elements . Thanks", "Question : I m using the tooltipster plugin to show fields s hints and also another tooltip at bottom to show errors from jquery-validate plugin but for some reason all the messages updates are happening on the first error tooltip . What am I missing document .ready function .. . initialize tooltipster on text input elements .. . input .tooltipster .. . var tooltipsterErrorMsg .. . .. . initialize validate plugin on the form .. . myform .validate .. . showErrors : function errorMap errorList .. . Clean up any tooltips for valid elements .. . .each this.validElements function index element .. . if index tooltipsterErrorMsg.length .. . tooltipsterErrorMsg index .hide .. . .. . .. . .. . Create new tooltips for invalid elements .. . .each errorList function index error .. . if index tooltipsterErrorMsg.length .. . var tooltipObject error.element .tooltipster .. . trigger : custom .. . multiple : true .. . position : bottom .. . .. . .. . tooltipsterErrorMsg.push tooltipObject 0 .. . .. . tooltipsterErrorMsg index .content errorList index .message .show .. . .. . .. . rules : .. . field1 : .. . required : true .. . email : true .. . .. . field2 : .. . required : true .. . minlength : 5 .. . .. . .. . submitHandler : function form-for demo .. . alert valid form .. . return false .. . .. . .. . .. . .. . .. . .. . myform .. . margin : 100px .. . .. . input .. . margin : 20px .. . .. . a .. . display : block .. . position : absolute .. . bottom : 0 .. . .. . .. . .error .. . color : 900 .. . .. . .. . .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.3.0 css tooltipster.min.css rel stylesheet .. . script src https : ajax.googleapis.com ajax libs jquery 1.8.3 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.3.0 js jquery.tooltipster.min.js script .. . script src https : ajax.aspnetcdn.com ajax jquery.validate 1.11.1 jquery.validate.min.js script .. . form id myform .. . input type text name field1 title Tooltip teste 1 .. . input type text name field2 title Tooltip teste 2 .. . br .. . input type submit .. . form .. . .. . Here s the fiddle : http : jsfiddle.net macmessa m368ntxw Comment : Look at the sample code in the answer of the duplicate I flagged http : stackoverflow.com questions 14741688 how-to-display-messages-from-jquery-validate-plugin-inside-of-tooltipster-toolti . Basically your main mistake is trying to use the showErrors function.. . that is only intended for making a centralized list of errors and would have nothing to do with something like this . You simply need to properly employ the errorPlacement and success functions . Comment : I ve started using this sample that you ve linked but I do want to use the tooltip as a hint for the field and another one as a the error message . I can t see that in the sample code you said . Comment : The sample code fixes the jQuery Validation integration . As far as the hover hints simply integrate your own working code into the example . Comment : I re-opened the question and posted an answer below . .. . Answer : Two issues.. . .. . .. . 1 . You re using the showErrors function improperly . It was only intended for constructing an error list not for individual error placement . Employ the errorPlacement and success functions for showing hiding the individual tooltip bubbles . errorPlacement : function error element .. . var lastError element .data lastError .. . newError error .text current error message .. . .. . element .data lastError newError keep track of the error .. . .. . if newError newError lastError new error element .tooltipster content newError replace message .. . element .tooltipster show show bubble .. . .. . .. . success : function label element .. . element .tooltipster hide hide bubble when error clears .. . .. . .. . .. . 2 . You re trying to initialize and re-initialize ToolTipster on the same element for showing two different bubbles on the same element at the same time . Although I m not clearly seeing the described issue in your demo I can see how it would lead to problems and confusion . Here s a workaround . Surround the input elements with a container element . BTW : you don t need the data-rule-required attribute when you ve already declared required within .validate . Then you can initialize ToolTipster on the input type text elements for validation error messages.. . .. . .. . And then separately initialize another ToolTipster instance on the parent container for the hints.. . .. . .. . I m being more specific with the target here . By targeting only input you would also match the type submit element . .. . .. . Proof-of-concept DEMO : http : jsfiddle.net 2xgcyg6w Comment : - I rewrote my code using the callbacks you ve suggested - The data-rule-required was something that I forgot to remove when I posted the code - I have to re-initialize but setting it to another object because the first initialization is for the hover event and the other one is triggered by the validation . Thanks I appreciate the time you spent helping me .", "Question : I m using tooltipster to generate tooltips but I want to set the tooltip based on a data attribute from the element it s attached to . How do I get the associated data so I can set the image url as shown below . This is what I ve been trying : .. . .. . My HTML is basically : .. . Answer : Your plugin may not work in this way . You are passing couple of lines-of-code instead of key-value pair of options in the plugin . If you want data-info value simple solution will be to bind the mouseover event and then get that attribute value . Example : .. . .. . Note : In case the plugin removes the data-attribute then you might need to use another attribute for getting the src of image . Comment : github.com iamceege tooltipster https : github.com iamceege tooltipster Comment : I have try your second solution but undefined value Comment : What does this refer to in your answer that uses tooltipster Comment : @jcuenod refer to the .test but someone has already answer a nice solution Comment : No it doesn t that s the problem with this solution . The scope is not .test which is why you get undefined .", "Question : I m having an issue where if I apply the class tooltip to an object it will disappear but this only happens when I m using bootstrap and I m wondering if anyone knows a workaround . I will provide examples of both . Here is without bootstrap : .. . .. . .. . document .ready function .. . .tooltip .tooltipster .. . .. . .. . .. . link href maxcdn.bootstrapcdn.com font-awesome 4.3.0 css font-awesome.min.css rel stylesheet .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css tooltipster.min.css rel stylesheet .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 js jquery.tooltipster.min.js script .. . .. . i class fa fa-facebook-square fa-2x tooltip title Working i .. . .. . Here is the snippet with bootstrap : .. . .. . .. . document .ready function .. . .tooltip .tooltipster .. . .. . .. . .. . link href https : maxcdn.bootstrapcdn.com bootstrap 3.3.4 css bootstrap.min.css rel stylesheet .. . link href maxcdn.bootstrapcdn.com font-awesome 4.3.0 css font-awesome.min.css rel stylesheet .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css tooltipster.min.css rel stylesheet .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : maxcdn.bootstrapcdn.com bootstrap 3.3.4 js bootstrap.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 js jquery.tooltipster.min.js script .. . .. . i class fa fa-facebook-square tooltip title Working i .. . .. . If you go to the second one where the icon is hidden and hover over the top left you can see the tooltip show up but it doesn t help me if my icon is hidden . Comment : Why don t you use the inbuild tooltip available with Bootstrap instead Here s the official doc of it : getbootstrap.com javascript tooltips http : getbootstrap.com javascript tooltips Comment : Thanks for the tip I missed that in the docs . Comment : For the record I agree with @AndrewLyndem bootstrap provides the tooltip functionality and theres no reason to use different JS that provides nearly the same thing . .. . Answer : As Matt mentioned above there is a conflict between the external tooltip and the default Bootstrap tooltip . And as I ve mentioned in the comments I would recommend you to use the inbuild tooltip available with Bootstrap instead . Here s the official doc for the Bootstrap Tooltip : http : getbootstrap.com javascript tooltips Comment : I agree with Andrew", "Question : I ve been dabbling with jQuery plugins for a site I m building that requires tooltips . The tooltips use AJAX to supply data when hovered and it was all working fine and dandy until I added a tooltip section for items . After adding the code and saving I noticed tooltips and some of the jQuery elements weren t working anymore the xbbcode plugin also stopped working but bootstrap a color-picker and amplify still were working fine . I went back and removed the code to see if I had done something wrong there but the error still persists I didn t change anything else other than the additional tooltip so I don t understand why all of a sudden it won t work now . Here is the code used including the item tooltip I was trying to add at the bottom targeting .item . I don t see any visible errors here I had all my plugin scripts in one file and minified to minimize load-time but in trying to figure out why xbbcode and tooltipster suddenly don t work I went ahead and redownloaded the separate versions . Normally in this case I d suspect some sort of compatibility error between tooltipster and xbbcode but they had worked just fine before the item tooltip was added and when I temporarily removed xbbcode to see if the tooltips would start working again the result was the same . Comment : Can you make a jsfiddle Comment : Can you check that moment.js is still loading properly Everything that is not working seems to be under the call to moment . If that call is failing for some reason the rest of the JS below it will never execute . That s where I would start Comment : There are no errors present in your console Comment : Sorry for the delay responding There were no errors in my console that was the first thing I checked . I just commented out all calls to moment.js and there is no change . : I will throw up a jsfiddle in the next comment Comment : jsfiddle.net togetherjs 8QOlPmDwtK https : jsfiddle.net togetherjs 8QOlPmDwtK jsfiddle . Let me know if I set it up right I m not sure I did . : First time actually using jsFiddle . .. . Answer : My uneducated is that the objects with the class item are not valid for tooltips . I would be able to make a better guess if I knew the HTML code .", "Question : I m having an issue where if I apply the class tooltip to an object it will disappear but this only happens when I m using bootstrap and I m wondering if anyone knows a workaround . I will provide examples of both . Here is without bootstrap : .. . .. . .. . document .ready function .. . .tooltip .tooltipster .. . .. . .. . .. . link href maxcdn.bootstrapcdn.com font-awesome 4.3.0 css font-awesome.min.css rel stylesheet .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css tooltipster.min.css rel stylesheet .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 js jquery.tooltipster.min.js script .. . .. . i class fa fa-facebook-square fa-2x tooltip title Working i .. . .. . Here is the snippet with bootstrap : .. . .. . .. . document .ready function .. . .tooltip .tooltipster .. . .. . .. . .. . link href https : maxcdn.bootstrapcdn.com bootstrap 3.3.4 css bootstrap.min.css rel stylesheet .. . link href maxcdn.bootstrapcdn.com font-awesome 4.3.0 css font-awesome.min.css rel stylesheet .. . link href https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 css tooltipster.min.css rel stylesheet .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : maxcdn.bootstrapcdn.com bootstrap 3.3.4 js bootstrap.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs tooltipster 3.0.5 js jquery.tooltipster.min.js script .. . .. . i class fa fa-facebook-square tooltip title Working i .. . .. . If you go to the second one where the icon is hidden and hover over the top left you can see the tooltip show up but it doesn t help me if my icon is hidden . Comment : Why don t you use the inbuild tooltip available with Bootstrap instead Here s the official doc of it : getbootstrap.com javascript tooltips http : getbootstrap.com javascript tooltips Comment : Thanks for the tip I missed that in the docs . Comment : For the record I agree with @AndrewLyndem bootstrap provides the tooltip functionality and theres no reason to use different JS that provides nearly the same thing . .. . Answer : The reason its not showing up is you are using a generic class name .tooltip and Bootstrap uses that same CSS name for its tooltip . If you look at the DOM you will see that Bootstraps tooltip code is setting the opacity : 0 and the position : absolute which is the reason why you dont see the Font Awesome icon anymore . If you change your class name and JQuery call the icon and tooltip shows up correctly . hope that helps .", "Question : I am using jQuery plugin Tooltipster . I want tooltip to be shown by both click and hover events . How can i do this .. . Answer : You should try the experimental Tooltipster v4 on the v4 branch of the project it has this feature using the triggerOpen option . All the necessary documentation is included .", "Question : I m using tooltipster to generate tooltips but I want to set the tooltip based on a data attribute from the element it s attached to . How do I get the associated data so I can set the image url as shown below . This is what I ve been trying : .. . .. . My HTML is basically : .. . Answer : Well a small trick you can try here Add a classname tooltipShow or anything on which you want to display tooltips . Use that class to capture hover on your element like below : Comment : doesn t work .. . Comment : Have a look at the plugin ." ] }
[ "yes-answer-long", "yes-answer-short" ]
tooltipster
UNK_RELATION
rootbeer@gpu@62
rootbeer -- rootbeer is a compiler that lets java run on the @placeholder .
{ "confidence": [ 38.81139373779297, 37.94560623168945, 20.384119033813477, 20.384119033813477, 16.01998519897461, 16.01998519897461, 16.01998519897461, 16.01998519897461 ], "content": [ "See here http : stackoverflow.com questions 13284881 rootbeer-cuda-example-code-quantified-throughput-gain for details on how to get good speedups .", "Does the Java CUDA tool rootbeer https : github.com pcpratts rootbeer1 work with Nvidia Optimus http : en.wikipedia.org wiki Nvidia Optimus on Linux when the laptop does not have a BIOS switch for the graphics system", "You can get it to run if you use bumblebee and optirun .", "Threads will run to completion and in my tests the computed results are the expected results .", "In other words does it work where the graphics system is always a hybrid .", "I did this from within Eclipse .", "Whether numberOfJobs elapsedTimePerJob elapsedTime 1.0 is a matter of experimentation and I found that often it is far less than 1.0 .", "Or email me at pcpratts@trifort.org" ] }
{ "confidence": [ 60.709068298339844 ], "content": [ "Question : Does the Java CUDA tool rootbeer https : github.com pcpratts rootbeer1 work with Nvidia Optimus http : en.wikipedia.org wiki Nvidia Optimus on Linux when the laptop does not have a BIOS switch for the graphics system In other words does it work where the graphics system is always a hybrid . .. . Answer : You can get it to run if you use bumblebee and optirun . I did this from within Eclipse . Threads will run to completion and in my tests the computed results are the expected results . Whether numberOfJobs elapsedTimePerJob elapsedTime 1.0 is a matter of experimentation and I found that often it is far less than 1.0 . Comment : See here http : stackoverflow.com questions 13284881 rootbeer-cuda-example-code-quantified-throughput-gain for details on how to get good speedups . Or email me at pcpratts@trifort.org" ] }
[ "yes-answer-long", "yes-answer-short" ]
gpu
UNK_RELATION
devcon@configure@106
devcon -- devcon is a command-line device manager for windows system used to list enable disable install @placeholder and remove devices .
{ "confidence": [ 60.13103103637695, 55.2208366394043, 54.455955505371094, 51.10421371459961, 51.00736618041992, 50.460235595703125, 50.009796142578125, 49.4905891418457, 49.02492904663086, 48.927734375, 45.12089157104492, 43.626556396484375, 43.538787841796875, 43.30533218383789, 42.96942138671875, 42.72257995605469, 41.33856964111328, 40.8541259765625, 40.53702926635742, 40.344947814941406, 39.54967498779297, 37.92723083496094, 37.87688446044922, 36.93838119506836, 36.58821105957031, 35.89171600341797, 33.83525466918945, 33.83525466918945, 33.483558654785156, 33.43524932861328, 32.5147705078125, 31.101287841796875, 31.034820556640625, 31.034820556640625, 30.330913543701172, 29.021392822265625, 28.672489166259766, 28.67176628112793, 27.59711456298828, 26.571224212646484, 26.218448638916016, 25.43400764465332, 25.12470245361328, 24.714580535888672, 24.637157440185547, 24.458023071289062, 24.315723419189453, 23.788131713867188, 23.76611328125, 23.219606399536133, 23.104433059692383, 22.797874450683594, 22.37714958190918, 22.37714958190918, 21.95362091064453, 21.70492935180664, 21.598201751708984, 21.49221420288086, 21.41360092163086, 21.32364273071289, 21.268756866455078, 20.528596878051758, 20.177059173583984, 20.105541229248047, 20.002840042114258, 19.79779052734375, 19.531322479248047, 19.531322479248047, 19.40652084350586, 19.046749114990234, 18.831989288330078, 18.831762313842773, 18.664714813232422, 18.661518096923828, 18.661518096923828, 18.38400650024414, 18.31720542907715, 18.256999969482422, 17.877731323242188, 17.61126136779785, 17.61126136779785, 17.61126136779785, 17.61126136779785, 17.61126136779785, 17.597562789916992, 17.591670989990234, 17.574527740478516, 17.45993423461914, 17.39872932434082, 17.39872932434082, 17.39872932434082, 17.39872932434082, 17.39872932434082, 17.39872932434082, 17.39872932434082, 17.39872932434082, 17.39872932434082, 17.39872932434082, 17.39872932434082, 17.39872932434082 ], "content": [ "devcon disable VEN 1113 .. . .. . Enable disable the device .. . .. . This allows me to enable disable my network card and therefore my internet-connection from the command-line .", "I m trying to write a batch-file that searches through devices using devcon and then runs devcon enable on these devices .", "You wrote : devcon disable DEV 8168", "Windows 7 devcon can t disable and enable the nic could you please help me", "I can find the correct device but devcon disable with the same parameters fails .", "I ve tried devcon find .. . .. . devcon resurces ports .. . .. . which shows all devices but I need only that one .", "I can disable everything else with devcon except touchpad .", "C : Users zhilu1234 devcon disable DEV 8168 PCI VEN 10EC DEV 8168 SUBSYS 368217AA REV 07 07000000684CE00000 : Disable failed No devices disabled .", "I am trying to use devcon in order to install remove a device using a .inf driver on windows-7 .", "So i m trying to disable the Rear Line in port under playback devices on my Dell Desktop via Devcon .", "I also used devcon to delete the driver .", "I ve installed the correct x64 bit version of devcon as noted here http : techlikes.com 2010 09 25 devcon-problem-in-windows-7-solved.html .", "devcon drivernodes .. . .. . But this is only working in local machine .", "is a confusing way for devcon to tell u to run the command elevated .", "User DevCon utility to list information about all of the drivers installed in the computer .", "You need to comment out the try using also only use the longer line .. . .. . C : Windows system32 devcon disable ACPI ETD0108 4 30E2CFCB 0", "I found tons of articles about devcon I downloaded it and I always get an error as I m trying to do it no matter which version of devcon I m using .", "The in front of the pipe is only needed when you parse the output of your devcon command-line by a for F loop you said you ran the devcon stuff directly with only no no for which failed so you could try also devcon find VENDER INFO findstr C : DEVICE INFO directly.. .", "How can I find device using devcon which is connected to e.g COM5", "can you show the output of devcon find VENDER INFO", "i found out what to do you had to shorten it to devcon disable PCI VEN 10DE DEV 05E3 SUBSYS 0F3919F1 REV A1", "Please note that I am aware of this similar question http : stackoverflow.com questions 25749913 devcon-disable-not-working-in-windows-8-1 but in addition to not having an accepted answer that question has a different error and is likely using the wrong version of devcon .", "I have tried using Devcon although the device was disabled power was still provided to the device .", "I am looking for solution I want to disable enable the particular device in windows system using devcon.exe in python script .", "I downloaded another devcon by following this http : answers.microsoft.com en-us windows forum windows 7-hardware i-downloaded-devcon-on-my-win-7-64-bit-computer 77d28162-2cf3-41cb-818e-5ac0d68303b6 which solved the problem", "To get the 64 bit version you will have to get it as noted here http : superuser.com questions 305685 devcon-exe-not-working-in-windows7-x64", "ok i guess you will have to use devcon and parse its output using regex which will take some doing .", "Download DevCon package from here https : support.microsoft.com en-us kb 311272 : .. . 2 .", "I guess it just cant be disabled because it is also impossible to disable from Device Manager .", "C : Users devcon find net DEV 8168 PCI VEN 10EC DEV 8168 SUBSYS 368217AA REV 07 07000000684CE00000 : Realtek PCIe GBE Family Controller 1 matching device s found .", "The following is from http : ccm.net faq 1886-enable-disable-a-device-from-the-command-line .. . .. . Display all the devices in the system .. . .. . In the command-prompt type .. . .. . To get the list in a file For example my network card Accton appears as : .. . .. . Choose a piece of the string that identifies the device and verify it is unique : .. . .. . Make sure that VEN 1113 means a single network card .", "Link to picture : http : s16.postimg.org 48aze6pud Untitled.png .. . .. . I tried to use Wmi-Object Powershell and DevCon tool but can get those files to be listed .", "I inserted the devcon calls into a batch-file and call the file from a c app .", "After some research all I can find is use of devcon tool to gather necessary information .", "0009 is not recognized as an internal or external command operable program or batch-file . .. . .. . I am afraid if I enter in devcon disable PCI VEN 10DE DEV 05E3 SUBSYS 0F3919F1 REV A1 4 FA060A 0 0009 .. . .. . it will turn off both my graphics cards at once .", "remove works almost always but the device will be back after you restart the system .", "I ve seen notes online that this will have limited functionality not always letting you disable enable things .", "I have no idea if the old driver made it impossible to disable for other devices or it is completely impossible .", "How can I remove the device class of the previously installed driver in windows", "This should work : .. . .. . If you already found the exact device you want to disable you can do it like this : .. . .. . In your case : .. . .. . If this also doesn t work you should use the remove command .", "You need the devcon.exe for windows-8.1 .. . Windows Device Console Devcon.exe https : msdn.microsoft.com de-de library windows hardware ff544707 v vs.85 .aspx which can be downloaded from Download the Windows ADK https : msdn.microsoft.com en-us windows hardware hh852365", "Here is what devcon lists : .. . .. . HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 SUBSYS 10280585 REV 1001 4 372B2508 0 0201 Name : Conexant HD Audio Hardware IDs : HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 SUBSYS 10280585 REV 1001 HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 SUBSYS 10280585 Compatible IDs : HDAUDIO FUNC 01 CTLR VEN 8086 CTLR DEV 1C20 VEN 14F1 DEV 50A1 REV 1001 HDAUDIO FUNC 01 CTLR VEN 8086 VEN 14F1 DEV 50A1 REV 1001 HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 REV 1001 HDAUDIO FUNC 01 CTLR VEN 8086 CTLR DEV 1C20 VEN 14F1 DEV 50A1 HDAUDIO FUNC 01 CTLR VEN 8086 VEN 14F1 DEV 50A1 HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 HDAUDIO FUNC 01 CTLR VEN 8086 CTLR DEV 1C20 VEN 14F1 HDAUDIO FUNC 01 CTLR VEN 8086 VEN 14F1 HDAUDIO FUNC 01 VEN 14F1 HDAUDIO FUNC 01 CTLR VEN 8086 CTLR DEV 1C20 HDAUDIO FUNC 01 CTLR VEN 8086 HDAUDIO FUNC 01 GF VEN 14F1 DEV 50A1 SUBSYS 10280585 REV 1001 HDAUDIO FUNC 01 .. . .. . Now whenever i do devcon disable hardware ID or devcon disable compatible ID it disables the entire thing rather than disabling just the Line in port .", "It obviously finds the right device but then reports No matching devices found .", "As a remnant of the shift to 64 bit computer there are two version of devcon located in the Tools folder one for x86 and one for x64 ensure that you are running the correct version for your computer and you should be able to perform your tasks without issue .", "No Matching Devices is the way that windows tells you that it cannot find or access the devices you are looking for .", "I m on Windows 8.1 trying to disable my clickpad programatically .", "Edit : I ve tried to disable my USB mouse with success .", "I m using Windows 8.1 .", "I am able to disable enable using devcon.exe windows cmd.exe separately but i am looking for this activity to done using python script to verify 10 iteration .", "The install process works fine but the device sends data using windows-xp format .", "Are you looking for how to call devcon.exe from a Python script or do you need some other means to disable the device", "If I try to run the same commands using a command-prompt the device works as expected using windows-7 data format .", "Original Asus keyboard and touchpad drivers had the hotkey to disable it but I replaced that topchpad driver with Elantech driver because the old one is crap .", "I even tried the DeviceManagement powershell Error calling SetupDiCallClassInstaller module to no luck getting Error calling SetupDiCallClassInstaller when trying to disable .", "After install all WDC locate yhe devcon.exe in your Kit folder and copy into system32 folder .", "I think previously installed security descriptor is not deleted even though I deleted the driver from device manager .", "I will point out that it seems like you might be using the 32-bit version on a 64 bit system .", "The problem is that using batch-file the rescan and install operations are performed immediately one after the other and Windows has no time to communicate to the device .", "The descriptor I used is D : P A GA WD A GA BU A GA S-1-1-0 I uninstalled the driver in Device Manager and reinstalled the modified .INF file .", "No matching devices found .", "Possible duplicate of Power off an USB device in software on Windows http : stackoverflow.com questions 404097 power-off-an-usb-device-in-software-on-windows", "The device is a touch screen that sends different data on windows-xp or 7 .", "Does it work if you add that to your command", "It shows up as device not found .", "I am trying to disable one my graphics cards but I am have some issues trying to only disable one .", "Does .. . .. . Computerlist.txt is a list of IP addresses or computernames .", "To get a result even if the cable is unplugged the following command does it .", "All the information i could find it using the below command .", "Windows Device Console DevCon.exe https : msdn.microsoft.com en-us library windows hardware ff544707 28v vs.85 29.aspx f 255 MSPPError -2147217396 for reference .", "I need to automate one test case which will has to verify the disabling enabling particular device in windows using devcon.exe for 10 iteration continuously and record log .", "The system cannot find the path specified .", "But it didn t delete the device class .", "The device that doesn t receive info on the current OS uses the default set Windows XP .", "I m using the Prolific PL2303 USB-Serial cable to test the following command .. . .. . If the cable is attached I got a result .", "Checked with MSDN and came to know that we cannot get the remote machine details with this command .", "For local computer .. . .. . See wmic for a partial list of what s available wmic sysdriver get and wmic format .", "Download the Windows Driver Kit WDK 7.1.0 from Microsoft : http : www.microsoft.com download en details.aspx id 11800 .. . Download http : 7-zip.org .. . Mount the WDK ISO .. . Double click WDK setuptools x64fre.cab .. . Copy devcon.exe 00000 to a temp folder .. . Rename devcon.exe 00000 to devcon.exe .. . Move devcon.exe to C : windows system32", "You are using the wrong spelling in your command .", "List all of the files related to the driver .. . 2 .", "Incorrect Permissions caused by not running the command-prompt BAT as an administrator .", "DEV 05E3 is not recognized as an internal or external command operable program or batch-file .", "SUBSYS 0F3919F1 is not recognized as an internal or external command operable program or batch-file .", "FA060A is not recognized as an internal or external command operable program or batch-file .", "0 is not recognized as an internal or external command operable program or batch-file .", "I am trying to compile a list of all of the drivers installed in the computer and mainly list all of the files related to the driver exe sys dll and etc .", "I changed this security descriptor to remove admin rights .", "If your device doesn t have the capability to fully power itself off on command you re going to be best off with some controllable hub or switch in between .", "The find command requires double quotes .", "I m trying to make a simple script that disables my touchpad fast .", "Has anyone faced the same problem or knows the solution", "Then why is it a problem only of my touchpad", "Thanks .. . .. . dobragab", "Did you figure this out", "I m having the same issue .", "Yes I found that thread I can assure you that I use the correct version .", "With new driver the hotkey isnt working .", "Anyway I gave up .", "Yeah. .", "I m on an HP Envy but same exact story .", "I can t get the right version working either though with a different error than yours ." ] }
{ "confidence": [ 85.30215454101562, 80.38629913330078, 79.13681030273438, 77.31918334960938, 75.45172119140625, 75.08409118652344, 66.99869537353516, 65.83906555175781, 63.36770248413086, 63.049278259277344, 61.15178680419922, 56.68464660644531, 54.215702056884766, 49.225242614746094, 47.73606491088867, 44.99099349975586, 42.69831085205078, 42.23204040527344, 36.6823616027832 ], "content": [ "Question : Windows 7 devcon can t disable and enable the nic could you please help me Comment : downloaded the original x64 file from microsoft.com downloads http : www.microsoft.com downloads details.aspx familyid 8A6EBFB5-833D-44E2-BF92-44648A8BB250 opened as zip - support.cab opened as zip - devcon.exe - still same problem .. . Answer : http : ccm.net has an example of how to do this . In that example they are using a . Does it work if you add that to your command The following is from http : ccm.net faq 1886-enable-disable-a-device-from-the-command-line .. . .. . Display all the devices in the system .. . .. . In the command-prompt type .. . .. . To get the list in a file For example my network card Accton appears as : .. . .. . Choose a piece of the string that identifies the device and verify it is unique : .. . .. . Make sure that VEN 1113 means a single network card . devcon disable VEN 1113 .. . .. . Enable disable the device .. . .. . This allows me to enable disable my network card and therefore my internet-connection from the command-line . Comment : I have tried your example but it is no use . C : Users devcon find net DEV 8168 PCI VEN 10EC DEV 8168 SUBSYS 368217AA REV 07 07000000684CE00000 : Realtek PCIe GBE Family Controller 1 matching device s found . C : Users zhilu1234 devcon disable DEV 8168 PCI VEN 10EC DEV 8168 SUBSYS 368217AA REV 07 07000000684CE00000 : Disable failed No devices disabled . Comment : Why the apostrophes and ending star You wrote : devcon disable DEV 8168", "Question : I m on Windows 8.1 trying to disable my clickpad programatically . I ve installed the correct x64 bit version of devcon as noted here http : techlikes.com 2010 09 25 devcon-problem-in-windows-7-solved.html . I can find the correct device but devcon disable with the same parameters fails . Which is rather confusing . It obviously finds the right device but then reports No matching devices found . What the heck Please note that I am aware of this similar question http : stackoverflow.com questions 25749913 devcon-disable-not-working-in-windows-8-1 but in addition to not having an accepted answer that question has a different error and is likely using the wrong version of devcon . .. . Answer : You are using the wrong spelling in your command . This should work : .. . .. . If you already found the exact device you want to disable you can do it like this : .. . .. . In your case : .. . .. . If this also doesn t work you should use the remove command . remove works almost always but the device will be back after you restart the system .", "Question : I m trying to make a simple script that disables my touchpad fast . I found tons of articles about devcon I downloaded it and I always get an error as I m trying to do it no matter which version of devcon I m using . I m using Windows 8.1 . Has anyone faced the same problem or knows the solution Edit : I ve tried to disable my USB mouse with success . Then why is it a problem only of my touchpad Thanks .. . .. . dobragab Comment : Did you figure this out I m having the same issue . Comment : I will point out that it seems like you might be using the 32-bit version on a 64 bit system . I ve seen notes online that this will have limited functionality not always letting you disable enable things . To get the 64 bit version you will have to get it as noted here http : superuser.com questions 305685 devcon-exe-not-working-in-windows7-x64 Comment : Yes I found that thread I can assure you that I use the correct version . I can disable everything else with devcon except touchpad . I guess it just cant be disabled because it is also impossible to disable from Device Manager . Original Asus keyboard and touchpad drivers had the hotkey to disable it but I replaced that topchpad driver with Elantech driver because the old one is crap . With new driver the hotkey isnt working . I have no idea if the old driver made it impossible to disable for other devices or it is completely impossible . Anyway I gave up . Comment : Yeah. . I m on an HP Envy but same exact story . I can t get the right version working either though with a different error than yours . I even tried the DeviceManagement powershell Error calling SetupDiCallClassInstaller module to no luck getting Error calling SetupDiCallClassInstaller when trying to disable . .. . Answer : You need to comment out the try using also only use the longer line .. . .. . C : Windows system32 devcon disable ACPI ETD0108 4 30E2CFCB 0", "Question : I m on Windows 8.1 trying to disable my clickpad programatically . I ve installed the correct x64 bit version of devcon as noted here http : techlikes.com 2010 09 25 devcon-problem-in-windows-7-solved.html . I can find the correct device but devcon disable with the same parameters fails . Which is rather confusing . It obviously finds the right device but then reports No matching devices found . What the heck Please note that I am aware of this similar question http : stackoverflow.com questions 25749913 devcon-disable-not-working-in-windows-8-1 but in addition to not having an accepted answer that question has a different error and is likely using the wrong version of devcon . .. . Answer : No matching devices found . is a confusing way for devcon to tell u to run the command elevated . this is without elevation .. . .. . this is with elevation Comment : Thanks but this is in an admin shell", "Question : I m trying to make a simple script that disables my touchpad fast . I found tons of articles about devcon I downloaded it and I always get an error as I m trying to do it no matter which version of devcon I m using . I m using Windows 8.1 . Has anyone faced the same problem or knows the solution Edit : I ve tried to disable my USB mouse with success . Then why is it a problem only of my touchpad Thanks .. . .. . dobragab Comment : Did you figure this out I m having the same issue . Comment : I will point out that it seems like you might be using the 32-bit version on a 64 bit system . I ve seen notes online that this will have limited functionality not always letting you disable enable things . To get the 64 bit version you will have to get it as noted here http : superuser.com questions 305685 devcon-exe-not-working-in-windows7-x64 Comment : Yes I found that thread I can assure you that I use the correct version . I can disable everything else with devcon except touchpad . I guess it just cant be disabled because it is also impossible to disable from Device Manager . Original Asus keyboard and touchpad drivers had the hotkey to disable it but I replaced that topchpad driver with Elantech driver because the old one is crap . With new driver the hotkey isnt working . I have no idea if the old driver made it impossible to disable for other devices or it is completely impossible . Anyway I gave up . Comment : Yeah. . I m on an HP Envy but same exact story . I can t get the right version working either though with a different error than yours . I even tried the DeviceManagement powershell Error calling SetupDiCallClassInstaller module to no luck getting Error calling SetupDiCallClassInstaller when trying to disable . .. . Answer : You need the devcon.exe for windows-8.1 .. . Windows Device Console Devcon.exe https : msdn.microsoft.com de-de library windows hardware ff544707 v vs.85 .aspx which can be downloaded from Download the Windows ADK https : msdn.microsoft.com en-us windows hardware hh852365 Comment : After install all WDC locate yhe devcon.exe in your Kit folder and copy into system32 folder . You uninstall all package and devco works perfectly .", "Question : I m on Windows 8.1 trying to disable my clickpad programatically . I ve installed the correct x64 bit version of devcon as noted here http : techlikes.com 2010 09 25 devcon-problem-in-windows-7-solved.html . I can find the correct device but devcon disable with the same parameters fails . Which is rather confusing . It obviously finds the right device but then reports No matching devices found . What the heck Please note that I am aware of this similar question http : stackoverflow.com questions 25749913 devcon-disable-not-working-in-windows-8-1 but in addition to not having an accepted answer that question has a different error and is likely using the wrong version of devcon . .. . Answer : No Matching Devices is the way that windows tells you that it cannot find or access the devices you are looking for . There can be a couple of causes for this : .. . .. . 1 . Incorrect Permissions caused by not running the command-prompt BAT as an administrator . Simply right-click the relevant access method and select Run as administrator .. . 2 . Incorrect Access caused by running the wrong version of devcon.exe . As a remnant of the shift to 64 bit computer there are two version of devcon located in the Tools folder one for x86 and one for x64 ensure that you are running the correct version for your computer and you should be able to perform your tasks without issue .", "Question : I m trying to write a batch-file that searches through devices using devcon and then runs devcon enable on these devices . My batch-file looks like this : .. . .. . You can ignore the VENDER INFO and DEVICEINFO as I simply redacted these to make the commands easier to read . When I run this.bat file It appears as though the .. . .. . command is only running the first part and failing to pipe the results through .. . .. . Can you see anything wrong with my .bat file Why is it ignoring the pipe and second part of the find command I tried removing the but this fails and says was unexpected . Comment : Windows Device Console DevCon.exe https : msdn.microsoft.com en-us library windows hardware ff544707 28v vs.85 29.aspx f 255 MSPPError -2147217396 for reference . Are there any special-characters in your VENDER INFO string Comment : can you show the output of devcon find VENDER INFO And what you trying to match Comment : What you are doing works fine for me on my machine . Have you tried running the command separately without being inside the for-loop and making sure it returns what you want Comment : The in front of the pipe is only needed when you parse the output of your devcon command-line by a for F loop you said you ran the devcon stuff directly with only no no for which failed so you could try also devcon find VENDER INFO findstr C : DEVICE INFO directly.. . .. . Answer : The find command requires double quotes . Read the help with this :", "Question : I ve been looking everywhere but cannot find that . How can I find device using devcon which is connected to e.g COM5 I ve tried devcon find .. . .. . devcon resurces ports .. . .. . which shows all devices but I need only that one . .. . Answer : I m using the Prolific PL2303 USB-Serial cable to test the following command .. . .. . If the cable is attached I got a result . If the cable is detached I got no result . To get a result even if the cable is unplugged the following command does it .", "Question : I am trying to use devcon in order to install remove a device using a .inf driver on windows-7 . The device is a touch screen that sends different data on windows-xp or 7 . I inserted the devcon calls into a batch-file and call the file from a c app . The install process works fine but the device sends data using windows-xp format . If I try to run the same commands using a command-prompt the device works as expected using windows-7 data format . I have just tried to use the batch outside the c app with admin privileges but the behaviour is the same . What can be differences between calling the batch-file and executing the commands via command-prompt Thanks in advance . Comment : is calling from c app launch the 64bits version of cmd.exe Comment : In c app I use this system function System.Diagnostics.Process.Start reinstallTS.bat to call the batch and the app is compiled 64bit .. . Answer : I solved the issue . The problem is that using batch-file the rescan and install operations are performed immediately one after the other and Windows has no time to communicate to the device . The device that doesn t receive info on the current OS uses the default set Windows XP .", "Question : Windows 7 devcon can t disable and enable the nic could you please help me Comment : downloaded the original x64 file from microsoft.com downloads http : www.microsoft.com downloads details.aspx familyid 8A6EBFB5-833D-44E2-BF92-44648A8BB250 opened as zip - support.cab opened as zip - devcon.exe - still same problem .. . Answer : I downloaded another devcon by following this http : answers.microsoft.com en-us windows forum windows 7-hardware i-downloaded-devcon-on-my-win-7-64-bit-computer 77d28162-2cf3-41cb-818e-5ac0d68303b6 which solved the problem Download the Windows Driver Kit WDK 7.1.0 from Microsoft : http : www.microsoft.com download en details.aspx id 11800 .. . Download http : 7-zip.org .. . Mount the WDK ISO .. . Double click WDK setuptools x64fre.cab .. . Copy devcon.exe 00000 to a temp folder .. . Rename devcon.exe 00000 to devcon.exe .. . Move devcon.exe to C : windows system32", "Question : null .. . Answer : So i m trying to disable the Rear Line in port under playback devices on my Dell Desktop via Devcon . The desktop has Conexant audio . Here is what devcon lists : .. . .. . HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 SUBSYS 10280585 REV 1001 4 372B2508 0 0201 Name : Conexant HD Audio Hardware IDs : HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 SUBSYS 10280585 REV 1001 HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 SUBSYS 10280585 Compatible IDs : HDAUDIO FUNC 01 CTLR VEN 8086 CTLR DEV 1C20 VEN 14F1 DEV 50A1 REV 1001 HDAUDIO FUNC 01 CTLR VEN 8086 VEN 14F1 DEV 50A1 REV 1001 HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 REV 1001 HDAUDIO FUNC 01 CTLR VEN 8086 CTLR DEV 1C20 VEN 14F1 DEV 50A1 HDAUDIO FUNC 01 CTLR VEN 8086 VEN 14F1 DEV 50A1 HDAUDIO FUNC 01 VEN 14F1 DEV 50A1 HDAUDIO FUNC 01 CTLR VEN 8086 CTLR DEV 1C20 VEN 14F1 HDAUDIO FUNC 01 CTLR VEN 8086 VEN 14F1 HDAUDIO FUNC 01 VEN 14F1 HDAUDIO FUNC 01 CTLR VEN 8086 CTLR DEV 1C20 HDAUDIO FUNC 01 CTLR VEN 8086 HDAUDIO FUNC 01 GF VEN 14F1 DEV 50A1 SUBSYS 10280585 REV 1001 HDAUDIO FUNC 01 .. . .. . Now whenever i do devcon disable hardware ID or devcon disable compatible ID it disables the entire thing rather than disabling just the Line in port . Am i disabling the wrong thing", "Question : I am trying to disable one my graphics cards but I am have some issues trying to only disable one . When I type . I get PCI VEN 10DE DEV 0FBC SUBSYS 31021462 REV A1 4 B7B0A11 0 0108 : High Definition Audio Controller PCI VEN 10DE DEV 05E3 SUBSYS 0F3919F1 REV A1 4 FA060A 0 0009 : NVIDIA GeForce GTX 285 PCI VEN 10DE DEV 1380 SUBSYS 31021462 REV A2 4 B7B0A11 0 0008 : NVIDIA GeForce GTX 750 Ti 3 matching device s found . DEV 05E3 is not recognized as an internal or external command operable program or batch-file . SUBSYS 0F3919F1 is not recognized as an internal or external command operable program or batch-file . The system cannot find the path specified . FA060A is not recognized as an internal or external command operable program or batch-file . 0 is not recognized as an internal or external command operable program or batch-file . 0009 is not recognized as an internal or external command operable program or batch-file . .. . .. . I am afraid if I enter in devcon disable PCI VEN 10DE DEV 05E3 SUBSYS 0F3919F1 REV A1 4 FA060A 0 0009 .. . .. . it will turn off both my graphics cards at once . .. . Answer : Use double quote : .. . .. . or .. . .. . Escape all the with : Comment : It shows up as device not found . Comment : Check my edit Comment : Nope still did not work . By the way I am using windows-10 pro 64 bit I don t know if that would make a difference . Comment : i found out what to do you had to shorten it to devcon disable PCI VEN 10DE DEV 05E3 SUBSYS 0F3919F1 REV A1", "Question : I have a .INF with a security descriptor HKR Security D : P A GA SY A GA BA . I changed this security descriptor to remove admin rights . So that any user can open the application . The descriptor I used is D : P A GA WD A GA BU A GA S-1-1-0 I uninstalled the driver in Device Manager and reinstalled the modified .INF file . However it doesn t work unless I change the device class and ClassGUID in the INF file . I think previously installed security descriptor is not deleted even though I deleted the driver from device manager . I also used devcon to delete the driver . But it didn t delete the device class . Only way I can make it work is to modify Class and ClassGUID of the existing .INF file . How can I remove the device class of the previously installed driver in windows I am using Windows 7 . .. . Answer : I was finally able to finally uninstall the device class using a small C++ program . In the following link at the end of the site there is a C++ code which you can delete driver completely including the ClassName Associated with the ClassGUID . https : www.osronline.com showthread.cfm link 168171 .. . .. . I have also copied the same code below as well . I made a small MFC application to perform the uninstallation .", "Question : Is there any way or tutorials where I can : .. . .. . 1 . List all of the files related to the driver .. . 2 . List File version of those file .exe .dll .sys and etc . I am trying to compile a list of all of the drivers installed in the computer and mainly list all of the files related to the driver exe sys dll and etc . along with file version . Please see attached picture . Link to picture : http : s16.postimg.org 48aze6pud Untitled.png .. . .. . I tried to use Wmi-Object Powershell and DevCon tool but can get those files to be listed . Using Powershell I am able to list the driver name but only file appears . .. . Answer : User DevCon utility to list information about all of the drivers installed in the computer . 1 . Download DevCon package from here https : support.microsoft.com en-us kb 311272 : .. . 2 . Unzip the package .. . 3 . Open CMD as Admin and change directory to unzipped folder .. . 4 . Run devcon.exe driverfiles .. . 5 . It will list all of the driver installed in the computer their hardware ids .inf file and all other file associated with that particular driver .", "Question : I have a task to gather information regarding the storage controller on which the disk drive is present for verification purpose . After some research all I can find is use of devcon tool to gather necessary information . I can get storage controller details using following commands .. . .. . These commands display information regarding the position of the controller . I can similarly gather information regarding the disk drives .. . .. . But I cannot find a mapping between these 2 . I have many drives and many controllers on servers and finding it hard to gather the mapping using either a command-line or programmable way . But I did find the mapping detail using gui Device Manager and select the particular disk drive and then scrolling to a property parent that shows the info of the controller gathered before . enter image description here http : i.stack.imgur.com CB3yR.jpg .. . .. . does anyone know how to get this parent property using command-line on windwos .. . Answer : Try in powershell . PS C : Windows system32 get-wmiobject -class Win32 SCSIControllerDevice", "Question : null .. . Answer : For testing purposes I need to power off a USB device from my computer programmatically . The microprocessor in the USB device is ARM Cortex M4 . I have tried using Devcon although the device was disabled power was still provided to the device . I have also tried to disable the USB root hubs that also didn t work . I have read some other posts indicating that a SSR could be used this option is not desired . I would rather choose the software solution if there is one of course . Some other answers have indicated that this is an OS issue and some others a chip-set architecture issue . So my question is what options are there available . And also is this purely something dependent on the computer side or do we need to implement something on the USB device side as well . Thank you in advance . Comment : This question suits better to superuser.com http : www.superuser.com in my opinion.. . Comment : You can use an Integration of external tool called RemoveDrive.exe http : www.uwe-sieber.de drivetools e.html in a batch to regenerate after and use it . you can take a look at this example : Copy2USB.bat http : pastebin.com HNZtQafz Comment : Possible duplicate of Power off an USB device in software on Windows http : stackoverflow.com questions 404097 power-off-an-usb-device-in-software-on-windows Comment : A USB port has to provide enumeration power per the USB standard - as all the answers to the many existing variants of this question say there is no generic way to physically disable that power as it s often not possible short of unplugging the whole machine at the wall . If your device doesn t have the capability to fully power itself off on command you re going to be best off with some controllable hub or switch in between .", "Question : Is there any way or tutorials where I can : .. . .. . 1 . List all of the files related to the driver .. . 2 . List File version of those file .exe .dll .sys and etc . I am trying to compile a list of all of the drivers installed in the computer and mainly list all of the files related to the driver exe sys dll and etc . along with file version . Please see attached picture . Link to picture : http : s16.postimg.org 48aze6pud Untitled.png .. . .. . I tried to use Wmi-Object Powershell and DevCon tool but can get those files to be listed . Using Powershell I am able to list the driver name but only file appears . .. . Answer : since the information you are looking for is buried under a nested property you cannot export the structure to a flat-file like a CSV well not without some customizations . anyway the better option would be to store the output in an xml file as shown above and retrieve the information when required . Comment : Thank you But I am trying to list ALL of the file associated with the driver . Comment : ok i guess you will have to use devcon and parse its output using regex which will take some doing . Or export all the drivers into a temp folder and then go into that folder and make a listing of each driver along with its files used Comment : How can I export backup all of the drivers installed to a folder along with their files Thank you", "Question : I was trying to get the below information related to the drivers . Name INFFile Vendor Version Description and Date . All the information i could find it using the below command . devcon drivernodes .. . .. . But this is only working in local machine . Checked with MSDN and came to know that we cannot get the remote machine details with this command . Do we have any other utility way to get the mentioned details from a remote computer I am capturing all the details using VBScript using .exec method and stdout.readline method .. . .. . Thanks in Advance .. . Answer : Does .. . .. . Computerlist.txt is a list of IP addresses or computernames . For local computer .. . .. . See wmic for a partial list of what s available wmic sysdriver get and wmic format . EDIT .. . .. . To get file versions if a file has one . Note backslashes have to be doubled . Filever.bat filename .. . .. . To start a program it will be invisible on remote computers Comment : Thank you very much I found this is very useful utility . But the only problem is I am not able to get the Driver version other than that all the details are available and that too in desired format :", "Question : null .. . Answer : I am looking for solution I want to disable enable the particular device in windows system using devcon.exe in python script . I am able to disable enable using devcon.exe windows cmd.exe separately but i am looking for this activity to done using python script to verify 10 iteration . I need to automate one test case which will has to verify the disabling enabling particular device in windows using devcon.exe for 10 iteration continuously and record log . Comment : Are you looking for how to call devcon.exe from a Python script or do you need some other means to disable the device The former should be easy with something like subprocess.call or a similar function . The latter may be much harder . Comment : HI I am able to use devcon.exe for disabling and enabling the same this loop has to be continues for 10 times . Can u help to here Comment : So what have you tried Stack Overflow is not a code writing service . You should try to solve the problem yourself then ask a specific question about any problems you run into . There s lots of documentation and tutorials about using Python to call subprocesses . Try one maybe you can even find one in your native language and then come back if you have more specific questions ." ] }
[ "yes-answer-long", "yes-answer-short" ]
configure
UNK_RELATION
shimmercat@web@37
shimmercat -- shimmercat is an edge @placeholder server thought specifically for modern web-applications .
{ "confidence": [ 53.40248489379883, 48.30445098876953, 48.02799606323242, 48.02799606323242, 47.60538864135742, 45.38353729248047, 42.929962158203125, 42.929962158203125, 37.79906463623047, 37.79906463623047, 37.79906463623047, 37.75600051879883, 37.75600051879883, 37.75600051879883, 36.239715576171875, 34.658843994140625, 31.141681671142578, 31.141681671142578, 23.374216079711914, 21.887258529663086, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 18.515941619873047, 16.515064239501953, 16.00222396850586, 16.00222396850586, 15.4454345703125, 14.869643211364746, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 13.417905807495117, 12.062335014343262, 12.062335014343262, 12.062335014343262, 12.062335014343262, 12.062335014343262, 12.062335014343262, 12.062335014343262, 12.062335014343262, 12.062335014343262, 12.062335014343262, 12.062335014343262 ], "content": [ "I was trying to install Shimmercat and got stuck on a point that in which prefix to install ShimmerCat", "It makes ShimmerCat to report the proxied headers to the log : .. . .. . Possible issue : there are two instances or more of ShimmerCat running .. . .. . ...and they are using different configurations .", "When I run command shimmercat devlove it gives following error : - .. . .. .", "It says : ...ShimmerCat probes the port to determine if the application is using HTTP 1.1 or FastCGI .", "I m trying to test Shimmercat but I can t find the solution to the problem.. . .. . .. . After installation running the .run script downloaded from their site I try to test if it s correctly running and I get this error when using shimmercat -- help : .. . .. . Referenced from : usr local lib shimmercat bin x64 . . libsecond transfer enable tls.dylib Expected in : usr lib libstdc++.6.dylib in usr local lib shimmercat bin x64 . . libsecond transfer enable tls.dylib usr local bin shimmercat : line 20 : 70178 Trace BPT trap : 5 INSTALL HOME bin x64 shimmercat @ ...exiting.. . .. . .. . Could anybody point me in the right direction please.. .", "I learn how to use Shimmercat for Linux .", "Is there a way I can use to serve the Django static files with ShimmerCat itself", "ShimmerCat uses port sharing among several processes to increase availability .", "Here it is the ShimmerCat config file : .. . .. . devlove.yaml : .. . .. . Could I use a subdomain e.g static.mysite.com to do that", "Troubleshooting : A way to diagnose things is invoking ShimmerCat using the --show-proxied-headers command-line option .", "A downside of this is that is perfectly possible to mistakenly start ShimmerCat forget about stopping it and start it again after changing some configuration bit .", "I have been testing a bit the HTTP2 server ShimmerCat https : www.shimmercat.com and I have set up a reverse proxy on it to use Django .", "If these headers are not set or are set to a domain other than the ones ShimmerCat is configured to listen the server will consider the situation so despicable that it will just close the connection .", "Troubleshooting : Shutdown all instances of ShimmerCat then double-check there are none running by using the corresponding form of the ps command and start the server with the configuration you want .", ".. . .. . Of course if you are not using an API domain you don t have a subkey port on your devlove.yaml config file I don t think that ShimmerCat has to do these probes but I can t see another explanation for these error logs .", "Possible issue : the host header is incorrect .. . .. . ShimmerCat uses the Host header in HTTP 1.1 requests and the : authority header in HTTP 2 requests to distinguish the domains .", "Troubleshooting : This is not a 404 error but a connection close if trying to connect un-proxied directly to the SSL port where ShimmerCat is listening or a Socks Connection Failed if trying to connect through ShimmerCat s built-in SOCKS5 proxy .", "I have tested ShimmerCat https : www.shimmercat.com and sc-tool https : pypi.python.org pypi sc-tool using this https : www.shimmercat.com en info articles getting-started .", "I have used ShimmerCat https : www.shimmercat.com with sc-tool https : pypi.python.org pypi sc-tool to connect to my development sites as described here https : www.shimmercat.com info articles getting-started and everything has worked always like a charm with it but I also wanted to follow the old way configuring my etc hosts .", "With web-servers you usually have your static files served by the webserver itself and the dynamic part of the application being proxied by the web server to your application .", "enter image description here http : i.stack.imgur.com OO6HK.png .. . .. . Please find devlove.yaml file : - https : www.dropbox.com s 6xhk3lq497zw8y2 devlove.yaml dl 0", "It looks like a bug .", "Do you have something running already at port 8000", "NO there is nothing running at port 8000", "Good question @Atul Rai .", "I m not completely sure but I think it could be related with what is written here https : www.shimmercat.com en info articles structuring-apps api-domains .", "The probing operation shows in ShimmerCat s logs and may also show in the error-log of the application .", "Perhaps it would be useful if you update your question with your devlove.yaml file", "Should I install it in : - usr local", "The recommendation is that you use usr local as the prefix .", "You can also choose another directory but then you have to be sure to have enough privileges there and that there is a bin subdirectory in your PATH .", "You shouldn t need to use root privileges for running the installer", "I think it is the right answer .", "Thanks in advance .", "Unfortunately that means that the server can t learn reliably about the assets on those pages and won t be able to use HTTP 2 PUSH to deliver the resources automatically .", "In the former case the server will print the message Rejected request to Just https : some-domain-or-ip some path in his log using the actual value for the domain or Rejected request to Nothing if no header was present .", "If you are accessing the server using curl like this : .. . .. . or like .. . .. . notice the --http2 parameter in the second form you will get a response : .. . .. . Extra-tip : There is a field for the network address in the browser s developer tools .", "So a starting setup for your project would be : .. . .. . Everything indented under static.test.com would be served as static resources therefore you need to modify your settings.py file to identify static.test.com as your static domain : .. . .. . In addition to that you would need to run your Django application in one of the usual ways simultaneously with the server .", "In this case I had a small problem the server ran ok and I could access to my development site let s say that I used https : www.example.com : 4043 but I m also using a reverse proxy as described on this article https : www.shimmercat.com info articles structuring-apps and on the config file reference https : www.shimmercat.com info devlove-reference .", "All this has worked like a charm so far but I have a doubt .", "Right now I m serving the Django static files using the approach that Django has to serve them in development which means that I have left the settings DEBUG True but as we all know it is not a good practice for production .", "Could the config below be a good solution", "devlove.yaml : .. . .. . Of course I would need to do some small changes on the Django settings but I know how to handle it .", "Any help or suggestion will be appreciated .", "Django Admin pages are generated dynamically .", "But electric domains https : www.shimmercat.com info articles structuring-apps electric work well as ordinary static domains .", "So your second option is correct in principle .", "However with HTTP 2 the cost of using cookies should be low enough HPACK compression should fold them that you don t need to use a www and static domain .", "You probably are better off by having just one of those domains say www : .. . .. . This is just your first example", "But you need to copy Django s static assets to the site folder .", "Thanks a lot for your quick answer @dsign : .", "It was very useful the details you gave me and it makes sense .", "I will test your suggestion but it should work for sure .", "Thanks again :", "it worked like a charm : .", "I m accepting your response .", "Thanks a lot mate", "It redirects to a Django app I m using .", "Let s say it is my devlove.yaml config file : .. . .. . The problem is that when I try to access to a URL that requests the API a 404 response is sent from the API .", "Let me try to explain it through an example .", "I try to access to https : www.example.com : 4043 country and on this page I do a request to the API : api country towns then the API endpoint is returning a 404 response so it is not finding this URL which does not happen when using Google Chrome with sc-tool .", "I had set both domains www.example.com and api.example.com on my etc hosts .", "I have been trying to solve it but without any luck is there something I m missing", "Any help will be welcome .", "Could you post the headers of the requests and response", "With a bit more of data we may be able to find the issue .", "In the meantime here is a list of troubleshooting tips : .. . .. . Possible issue : DNS is cached in browser etc hosts is not being used yet .. . .. . This can happen if somehow your browser has not done a DNS lookup since before you changed your etc hosts-file .", "Then the connection is going to a domain in the Internet that may not have the API endpoint that you are calling .", "Troubleshooting : Check ShimmerCat s log for the requests .", "If this is the issue closing and opening the browser may solve the issue .", "It always discards any port-number present in them .", "The second case is more complicated because the SOCKS5 proxy is before the HTTP routing algorithm .", "In any case the browser will put a red line in the network panel of the developer tools .", "Check it it may tell you something", "Possible issue : something gets messed up when passing the request to the api back-end .", "API backends are also sensitive to the host header and to additional things like authentication cookies and request parameters .", "The two instances will be running at the same time and any of them will pick connections made to the listening port .", "I am trying to deploy the application locally but a 404 error occurs .", "This is the structure of my project : .. . .. . And this is my devlove.yaml file : .. . .. . I haven t made any changes to settings.py .. . .. . Do you have any suggestions on how to solve the 404 error", "Thank you in advance .", "For example you could start by launching : .. . .. . and then in a new terminal invoke ShimmerCat s from the project s directory :", "Thank you", "It is working like charm .", "Using manual : https : www.youtube.com watch v 0VdzHEISbo And while I try to setup template after unzipping the archive - got the next issue : .. . .. . What can be the reason and how to fix it", "Thanx", "Hi", "You just want to do : mv startbootstrap-creative-1.0.5 sitefiles without the space .", "In the video the right border of the terminal cuts the two words but the purpose is stated in the caption : to shorten the original name and make it manegeable .", "Thank you .", "the reason was much more obvious - I used the template name as in video by my own was different", "mv startbootstrap-creative-1.0.5 site files means move the file startbootstrap-creative-1.0.5 and the file site into the directory files all files being in the current directory PWD .", "If files is not a directory this will fail .", "A directory is a special type of file http : unix.stackexchange.com a 37831 3645", "Please update the original question or create a new one ." ] }
{ "confidence": [ 66.81376647949219, 59.841060638427734, 57.978668212890625, 55.87941360473633, 51.37723159790039, 45.371315002441406, 37.569793701171875 ], "content": [ "Question : null .. . Answer : I m trying to test Shimmercat but I can t find the solution to the problem.. . .. . .. . After installation running the .run script downloaded from their site I try to test if it s correctly running and I get this error when using shimmercat -- help : .. . .. . Referenced from : usr local lib shimmercat bin x64 . . libsecond transfer enable tls.dylib Expected in : usr lib libstdc++.6.dylib in usr local lib shimmercat bin x64 . . libsecond transfer enable tls.dylib usr local bin shimmercat : line 20 : 70178 Trace BPT trap : 5 INSTALL HOME bin x64 shimmercat @ ...exiting.. . .. . .. . Could anybody point me in the right direction please.. . Thanks in advance .", "Question : I was trying to install Shimmercat and got stuck on a point that in which prefix to install ShimmerCat Should I install it in : - usr local .. . Answer : The recommendation is that you use usr local as the prefix . You can also choose another directory but then you have to be sure to have enough privileges there and that there is a bin subdirectory in your PATH . You shouldn t need to use root privileges for running the installer Comment : I think it is the right answer .", "Question : When I run command shimmercat devlove it gives following error : - .. . .. . enter image description here http : i.stack.imgur.com OO6HK.png .. . .. . Please find devlove.yaml file : - https : www.dropbox.com s 6xhk3lq497zw8y2 devlove.yaml dl 0 Comment : It looks like a bug . Do you have something running already at port 8000 Comment : NO there is nothing running at port 8000 .. . Answer : Good question @Atul Rai . I m not completely sure but I think it could be related with what is written here https : www.shimmercat.com en info articles structuring-apps api-domains . It says : ...ShimmerCat probes the port to determine if the application is using HTTP 1.1 or FastCGI . The probing operation shows in ShimmerCat s logs and may also show in the error-log of the application . .. . .. . Of course if you are not using an API domain you don t have a subkey port on your devlove.yaml config file I don t think that ShimmerCat has to do these probes but I can t see another explanation for these error logs . Perhaps it would be useful if you update your question with your devlove.yaml file", "Question : I have used ShimmerCat https : www.shimmercat.com with sc-tool https : pypi.python.org pypi sc-tool to connect to my development sites as described here https : www.shimmercat.com info articles getting-started and everything has worked always like a charm with it but I also wanted to follow the old way configuring my etc hosts . In this case I had a small problem the server ran ok and I could access to my development site let s say that I used https : www.example.com : 4043 but I m also using a reverse proxy as described on this article https : www.shimmercat.com info articles structuring-apps and on the config file reference https : www.shimmercat.com info devlove-reference . It redirects to a Django app I m using . Let s say it is my devlove.yaml config file : .. . .. . The problem is that when I try to access to a URL that requests the API a 404 response is sent from the API . Let me try to explain it through an example . I try to access to https : www.example.com : 4043 country and on this page I do a request to the API : api country towns then the API endpoint is returning a 404 response so it is not finding this URL which does not happen when using Google Chrome with sc-tool . I had set both domains www.example.com and api.example.com on my etc hosts . I have been trying to solve it but without any luck is there something I m missing Any help will be welcome . Thanks in advance . Comment : Could you post the headers of the requests and response .. . Answer : With a bit more of data we may be able to find the issue . In the meantime here is a list of troubleshooting tips : .. . .. . Possible issue : DNS is cached in browser etc hosts is not being used yet .. . .. . This can happen if somehow your browser has not done a DNS lookup since before you changed your etc hosts-file . Then the connection is going to a domain in the Internet that may not have the API endpoint that you are calling . Troubleshooting : Check ShimmerCat s log for the requests . If this is the issue closing and opening the browser may solve the issue . Possible issue : the host header is incorrect .. . .. . ShimmerCat uses the Host header in HTTP 1.1 requests and the : authority header in HTTP 2 requests to distinguish the domains . It always discards any port-number present in them . If these headers are not set or are set to a domain other than the ones ShimmerCat is configured to listen the server will consider the situation so despicable that it will just close the connection . Troubleshooting : This is not a 404 error but a connection close if trying to connect un-proxied directly to the SSL port where ShimmerCat is listening or a Socks Connection Failed if trying to connect through ShimmerCat s built-in SOCKS5 proxy . In the former case the server will print the message Rejected request to Just https : some-domain-or-ip some path in his log using the actual value for the domain or Rejected request to Nothing if no header was present . The second case is more complicated because the SOCKS5 proxy is before the HTTP routing algorithm . In any case the browser will put a red line in the network panel of the developer tools . If you are accessing the server using curl like this : .. . .. . or like .. . .. . notice the --http2 parameter in the second form you will get a response : .. . .. . Extra-tip : There is a field for the network address in the browser s developer tools . Check it it may tell you something Possible issue : something gets messed up when passing the request to the api back-end . API backends are also sensitive to the host header and to additional things like authentication cookies and request parameters . Troubleshooting : A way to diagnose things is invoking ShimmerCat using the --show-proxied-headers command-line option . It makes ShimmerCat to report the proxied headers to the log : .. . .. . Possible issue : there are two instances or more of ShimmerCat running .. . .. . ...and they are using different configurations . ShimmerCat uses port sharing among several processes to increase availability . A downside of this is that is perfectly possible to mistakenly start ShimmerCat forget about stopping it and start it again after changing some configuration bit . The two instances will be running at the same time and any of them will pick connections made to the listening port . Troubleshooting : Shutdown all instances of ShimmerCat then double-check there are none running by using the corresponding form of the ps command and start the server with the configuration you want .", "Question : I have been testing a bit the HTTP2 server ShimmerCat https : www.shimmercat.com and I have set up a reverse proxy on it to use Django . All this has worked like a charm so far but I have a doubt . Right now I m serving the Django static files using the approach that Django has to serve them in development which means that I have left the settings DEBUG True but as we all know it is not a good practice for production . Is there a way I can use to serve the Django static files with ShimmerCat itself Here it is the ShimmerCat config file : .. . .. . devlove.yaml : .. . .. . Could I use a subdomain e.g static.mysite.com to do that Could the config below be a good solution devlove.yaml : .. . .. . Of course I would need to do some small changes on the Django settings but I know how to handle it . Any help or suggestion will be appreciated . Thanks in advance . .. . Answer : Django Admin pages are generated dynamically . Unfortunately that means that the server can t learn reliably about the assets on those pages and won t be able to use HTTP 2 PUSH to deliver the resources automatically . But electric domains https : www.shimmercat.com info articles structuring-apps electric work well as ordinary static domains . So your second option is correct in principle . However with HTTP 2 the cost of using cookies should be low enough HPACK compression should fold them that you don t need to use a www and static domain . You probably are better off by having just one of those domains say www : .. . .. . This is just your first example But you need to copy Django s static assets to the site folder . Comment : Thanks a lot for your quick answer @dsign : . It was very useful the details you gave me and it makes sense . I will test your suggestion but it should work for sure . Thanks again : Comment : it worked like a charm : . I m accepting your response . Thanks a lot mate", "Question : I have tested ShimmerCat https : www.shimmercat.com and sc-tool https : pypi.python.org pypi sc-tool using this https : www.shimmercat.com en info articles getting-started . I am trying to deploy the application locally but a 404 error occurs . This is the structure of my project : .. . .. . And this is my devlove.yaml file : .. . .. . I haven t made any changes to settings.py .. . .. . Do you have any suggestions on how to solve the 404 error Thank you in advance . .. . Answer : With web-servers you usually have your static files served by the webserver itself and the dynamic part of the application being proxied by the web server to your application . So a starting setup for your project would be : .. . .. . Everything indented under static.test.com would be served as static resources therefore you need to modify your settings.py file to identify static.test.com as your static domain : .. . .. . In addition to that you would need to run your Django application in one of the usual ways simultaneously with the server . For example you could start by launching : .. . .. . and then in a new terminal invoke ShimmerCat s from the project s directory : Comment : Thank you It is working like charm .", "Question : I learn how to use Shimmercat for Linux . Using manual : https : www.youtube.com watch v 0VdzHEISbo And while I try to setup template after unzipping the archive - got the next issue : .. . .. . What can be the reason and how to fix it Thanx Comment : Hi You just want to do : mv startbootstrap-creative-1.0.5 sitefiles without the space . In the video the right border of the terminal cuts the two words but the purpose is stated in the caption : to shorten the original name and make it manegeable . Comment : Thank you . the reason was much more obvious - I used the template name as in video by my own was different .. . Answer : mv startbootstrap-creative-1.0.5 site files means move the file startbootstrap-creative-1.0.5 and the file site into the directory files all files being in the current directory PWD . If files is not a directory this will fail . A directory is a special type of file http : unix.stackexchange.com a 37831 3645 Comment : Please update the original question or create a new one ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
qlocalserver@server@70
qlocalserver -- the qlocalserver class provides a local socket based @placeholder .
{ "confidence": [ 46.465362548828125, 46.318450927734375, 40.69669723510742, 40.69669723510742, 40.583641052246094, 29.368980407714844, 20.172574996948242, 19.666587829589844, 19.666587829589844, 19.166213989257812, 18.392396926879883, 18.392396926879883, 18.392396926879883, 18.392396926879883, 18.00481605529785, 17.612565994262695, 16.739126205444336, 16.739126205444336, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 10.67589282989502, 10.67589282989502, 10.67589282989502, 10.67589282989502, 10.67589282989502, 10.67589282989502, 10.67589282989502, 10.67589282989502, 10.67589282989502, 10.67589282989502, 10.67589282989502 ], "content": [ "I m using QLocalServer to create a local socket so that other processes can connect to my Qt application .", "I m trying to start QLocalServer in my local OSX 10.11 .", "I m puzzled with a problem designing a simple QLocalServer-QLocalSocket IPC system .", "The QLocalServer waits for a new connection and connect the signals to the proper slots .", "Edit : on closer inspection the setSocketOptions QLocalServer : : UserAccessOption -- which sets permissions for the socket file -- is what is preventing me from specifying socket paths .", "I have client which tries connection to server in loop : .. . .. . When this code is running I try to start QLocalServer in another application : .. . .. . Why when readyRead was called bytes are not available", "If I use : .. . .. . then the socket is created in tmp but If I attempt to specify an absolute or relative-path instead then Qt doesn t seem to bother creating the socket at all .", "It seems that the only place where the socket options are important start at line 156 .", "If I am correct the problem is that you are not allowed to change permissions of the socket .", "My problem is that Qt seems hellbent on creating the socket file in tmp but I would prefer to follow XDG guidelines and use the XDG RUNTIME DIR environment variable to determine the correct user-specific socket location instead .", "I m mostly thinking of a scenario where first length of data is received from network socket or whatever and then length number of bytes .", "It seems as though Qt only blocks you from specifying the socket path if you use setSocketOptions to specify file-permissions .", "Because if you do the socket variable can point to a different object than the one that emits readyRead .", "If you are using Qt5 you can also use a lambda function and capture the socket object .", "The socket starts to listen but the incomingConnection method never seems to run .", "You might be getting multiple connections in which case the socket variable might be pointing to a different object from the one which emits the readyRead signal .", "I believe Qt uses QLocalServerPrivate : : listen QString http : code.qt.io cgit qt qtbase.git tree src network socket qlocalserver unix.cpp h 5.5 n75 internally .", "Without trying this I would guess that the problem is on line 168 http : code.qt.io cgit qt qtbase.git tree src network socket qlocalserver unix.cpp h 5.5 n168 .", "This readAll is done intentionally to check how i m getting two readyRead signals in sequence from the same slot pointer I verified that .", "The client operation is fairly straightforward : .. . .. . The socket- write data call triggers duplicate readyRead at server even when the server-side has read all data with ReadAll call .", "Any indication of where I should look", "The semantics of QIODevice are such that readyRead signal simply means that there is likely data to be available for reading .", "It doesn t mean that there s surely data available and it doesn t mean that a particular amount of data is guaranteed to be available .", "Implementations certainly do their best to avoid spurious signals but they are free to issue any number of spurious ones .", "It would be a much worse problem a bug in fact", "if a readyRead signal was missed .", "What you re supposed to do is to read whatever data is available when you get the signal .", "That s all .", "There are absolutely no guarantees that you will get the data in any particular chunking .", "For example if one end of a connection does a single 1kByte write the other end of the connection may get any number of readyRead signals .", "All that is guaranteed is that if you only read data when you get a readyRead signal you won t miss any data - thus you don t need to do reads from anywhere but a slot connected to a readyRead signal .", "So what you re seeing is perfectly OK . You need to handle any amount of data being available when a readyRead fires .", "Including zero bytes .", "What you re supposed to do is to read whatever data is available when you get the signal isn t that optional too .", "You ll get new signal when there s more data so you can just check bytesAvailable and return to wait for more without reading .", "Handy to avoid manual buffering .", "@hyde Well that s optional if the buffering is set up to be limitless .", "It s device-specific .", "@hyde If you don t read all of the data in readyRead -connected slot you must ensure yourself that you read it sometime later .", "You must set up a timer pretty much .", "You re not guaranteed to get another signal unless there will me more data .", "So it is practically an idiom to have to read all the data in readyRead .", "Ok .", "So in that case it s known that either that many bytes will come through or the connection will fail .", "But I suppose it s safer to do read and buffer in application code in case the expected amount of data is in some situation large some buffer in Qt lib or in OS fills and no new signal will be received .", "@hyde That s correct with the caveat that you re not even guaranteed that your number of bytes will arrive in one piece .", "Even then though the implementation of a timeout is upon yourself .", "Commenting out this line removes the restriction .", "But surely this isn t how Qt is expected to behave", "Weird .", "The Qt docs specifically mention that this is possible : Usually you would just pass in a name like foo but on Unix this could also be a path such as tmp foo and on Windows this could be a pipe path such as . pipe foo", "What is the return-value of socketServer.listen", "And can you show an example of how you use an absolute or relative-path", "I ve edited my question with more information .", "Can you try attaching a debugger or see if you can run this line manually", "I appreciate the detective work though I m afraid I can t recompile Qt with debugging symbols right now and setting permissions doesn t seem to be it .", "On the other hand lines 93-100 and later 120-131 of the source file you linked are very interesting : if any access options are set at all that if predicate on line 93 returns true and Qt produces the path string with completely different behaviour to what it uses if no access options were set .", "Did you check that you don t get multiple connections", "yes you are right .", "Write as answer .", "Either use QObject : : sender http : doc.qt.io qt-5 qobject.html sender to get the correct object in the slot or use the QSignalMapper http : doc.qt.io qt-5 qsignalmapper.html .", "I am creating a simple QSocketServer in Qt .", "Can someone explain what is wrong here", "main : .. . .. . pipeserver.h .. . .. . pipeserver.cpp .. . .. . I see the STARTED message but never see the NEW CONNECTION when I run : .. . .. . socat -v READLINE unix-connect : tmp test.sock .. . .. . Can anyone tell me why the incomingConnection is not firing", "-- UPDATE : Just for fun I hooked a method into the newConnection signal and that method DOES fire when I connect .", "So why isn t the incomingConnection method firing", "Can anyone tell me why the incomingConnection is not firing", "Michelle it seems you have made a typo .", "The signature of the aforementioned virtual protected method can be read in here http : qt-project.org doc qt-5 qlocalserver.html incomingConnection .", "There is a slight difference between the argument of that and your variant .", "The fix would be to modify the declaration and definition in your corresponding header and sources as follows : .. . .. . I would suggest to start using the Q DECL OVERRIDE macro as follows : .. . .. . This will make sure that you can get a compiler error when your Qt application is built with C++11 support and when it is not it will compile fine too but without giving an error .", "It is using the override context specifier introduced in C++11 ." ] }
{ "confidence": [ 59.44651794433594, 49.397674560546875, 37.51068115234375, 15.98006534576416 ], "content": [ "Question : I m trying to start QLocalServer in my local OSX 10.11 . I have client which tries connection to server in loop : .. . .. . When this code is running I try to start QLocalServer in another application : .. . .. . Why when readyRead was called bytes are not available Comment : Did you check that you don t get multiple connections Because if you do the socket variable can point to a different object than the one that emits readyRead . Comment : yes you are right . Write as answer . .. . Answer : You might be getting multiple connections in which case the socket variable might be pointing to a different object from the one which emits the readyRead signal . Either use QObject : : sender http : doc.qt.io qt-5 qobject.html sender to get the correct object in the slot or use the QSignalMapper http : doc.qt.io qt-5 qsignalmapper.html . If you are using Qt5 you can also use a lambda function and capture the socket object .", "Question : null .. . Answer : I m using QLocalServer to create a local socket so that other processes can connect to my Qt application . My problem is that Qt seems hellbent on creating the socket file in tmp but I would prefer to follow XDG guidelines and use the XDG RUNTIME DIR environment variable to determine the correct user-specific socket location instead . If I use : .. . .. . then the socket is created in tmp but If I attempt to specify an absolute or relative-path instead then Qt doesn t seem to bother creating the socket at all . Edit : on closer inspection the setSocketOptions QLocalServer : : UserAccessOption -- which sets permissions for the socket file -- is what is preventing me from specifying socket paths . Commenting out this line removes the restriction . But surely this isn t how Qt is expected to behave Comment : Weird . The Qt docs specifically mention that this is possible : Usually you would just pass in a name like foo but on Unix this could also be a path such as tmp foo and on Windows this could be a pipe path such as . pipe foo Comment : What is the return-value of socketServer.listen And can you show an example of how you use an absolute or relative-path Comment : I ve edited my question with more information . It seems as though Qt only blocks you from specifying the socket path if you use setSocketOptions to specify file-permissions . Comment : I believe Qt uses QLocalServerPrivate : : listen QString http : code.qt.io cgit qt qtbase.git tree src network socket qlocalserver unix.cpp h 5.5 n75 internally . It seems that the only place where the socket options are important start at line 156 . Without trying this I would guess that the problem is on line 168 http : code.qt.io cgit qt qtbase.git tree src network socket qlocalserver unix.cpp h 5.5 n168 . Can you try attaching a debugger or see if you can run this line manually If I am correct the problem is that you are not allowed to change permissions of the socket . Comment : I appreciate the detective work though I m afraid I can t recompile Qt with debugging symbols right now and setting permissions doesn t seem to be it . On the other hand lines 93-100 and later 120-131 of the source file you linked are very interesting : if any access options are set at all that if predicate on line 93 returns true and Qt produces the path string with completely different behaviour to what it uses if no access options were set .", "Question : I m puzzled with a problem designing a simple QLocalServer-QLocalSocket IPC system . The QLocalServer waits for a new connection and connect the signals to the proper slots . This readAll is done intentionally to check how i m getting two readyRead signals in sequence from the same slot pointer I verified that . The client operation is fairly straightforward : .. . .. . The socket- write data call triggers duplicate readyRead at server even when the server-side has read all data with ReadAll call . Any indication of where I should look .. . Answer : The semantics of QIODevice are such that readyRead signal simply means that there is likely data to be available for reading . It doesn t mean that there s surely data available and it doesn t mean that a particular amount of data is guaranteed to be available . Implementations certainly do their best to avoid spurious signals but they are free to issue any number of spurious ones . It would be a much worse problem a bug in fact if a readyRead signal was missed . What you re supposed to do is to read whatever data is available when you get the signal . That s all . There are absolutely no guarantees that you will get the data in any particular chunking . For example if one end of a connection does a single 1kByte write the other end of the connection may get any number of readyRead signals . All that is guaranteed is that if you only read data when you get a readyRead signal you won t miss any data - thus you don t need to do reads from anywhere but a slot connected to a readyRead signal . So what you re seeing is perfectly OK . You need to handle any amount of data being available when a readyRead fires . Including zero bytes . Comment : What you re supposed to do is to read whatever data is available when you get the signal isn t that optional too . You ll get new signal when there s more data so you can just check bytesAvailable and return to wait for more without reading . Handy to avoid manual buffering . Comment : @hyde Well that s optional if the buffering is set up to be limitless . It s device-specific . Comment : @hyde If you don t read all of the data in readyRead -connected slot you must ensure yourself that you read it sometime later . You must set up a timer pretty much . You re not guaranteed to get another signal unless there will me more data . So it is practically an idiom to have to read all the data in readyRead . Comment : Ok . I m mostly thinking of a scenario where first length of data is received from network socket or whatever and then length number of bytes . So in that case it s known that either that many bytes will come through or the connection will fail . But I suppose it s safer to do read and buffer in application code in case the expected amount of data is in some situation large some buffer in Qt lib or in OS fills and no new signal will be received . Comment : @hyde That s correct with the caveat that you re not even guaranteed that your number of bytes will arrive in one piece . Even then though the implementation of a timeout is upon yourself .", "Question : I am creating a simple QSocketServer in Qt . The socket starts to listen but the incomingConnection method never seems to run . Can someone explain what is wrong here main : .. . .. . pipeserver.h .. . .. . pipeserver.cpp .. . .. . I see the STARTED message but never see the NEW CONNECTION when I run : .. . .. . socat -v READLINE unix-connect : tmp test.sock .. . .. . Can anyone tell me why the incomingConnection is not firing -- UPDATE : Just for fun I hooked a method into the newConnection signal and that method DOES fire when I connect . So why isn t the incomingConnection method firing .. . Answer : Can anyone tell me why the incomingConnection is not firing Michelle it seems you have made a typo . The signature of the aforementioned virtual protected method can be read in here http : qt-project.org doc qt-5 qlocalserver.html incomingConnection . There is a slight difference between the argument of that and your variant . The fix would be to modify the declaration and definition in your corresponding header and sources as follows : .. . .. . I would suggest to start using the Q DECL OVERRIDE macro as follows : .. . .. . This will make sure that you can get a compiler error when your Qt application is built with C++11 support and when it is not it will compile fine too but without giving an error . It is using the override context specifier introduced in C++11 ." ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
header-only@header@176
header-only -- in c or c++ a library is called header-only if the full definitions of all macros functions and classes comprising the library are visible to the compiler in a @placeholder file form .
{ "confidence": [ 50.965572357177734, 50.37858963012695, 49.72727966308594, 49.18865966796875, 49.18865966796875, 47.85462951660156, 47.80351638793945, 47.70345687866211, 47.70345687866211, 47.490108489990234, 47.4787483215332, 47.40352249145508, 47.33333206176758, 47.17502212524414, 47.17502212524414, 46.17421340942383, 45.606075286865234, 45.53665542602539, 45.53665542602539, 45.53665542602539, 45.53665542602539, 45.53665542602539, 45.06891632080078, 44.989620208740234, 44.98646545410156, 44.43486785888672, 44.39432144165039, 43.879547119140625, 43.79473876953125, 43.79473876953125, 43.78012466430664, 43.59764862060547, 43.54185485839844, 43.16564178466797, 43.1514892578125, 43.03572463989258, 42.90999221801758, 42.16706848144531, 42.022003173828125, 42.022003173828125, 42.022003173828125, 41.866737365722656, 41.731998443603516, 41.707000732421875, 41.69204330444336, 41.56304168701172, 41.4107666015625, 41.234222412109375, 40.90631866455078, 40.807777404785156, 40.807777404785156, 40.617431640625, 40.617431640625, 40.617431640625, 40.617431640625, 40.617431640625, 40.617431640625, 40.617431640625, 40.458778381347656, 40.132659912109375, 40.132659912109375, 40.014591217041016, 39.856510162353516, 39.38585662841797, 39.25798797607422, 38.938873291015625, 38.875511169433594, 38.875511169433594, 38.857276916503906, 38.84181213378906, 38.84181213378906, 38.84181213378906, 38.84181213378906, 38.754608154296875, 38.671199798583984, 38.61955261230469, 38.6175422668457, 38.192344665527344, 38.105628967285156, 37.959842681884766, 37.7394905090332, 37.60675811767578, 37.60675811767578, 37.226749420166016, 37.184425354003906, 36.78777313232422, 36.78777313232422, 36.78777313232422, 36.77240753173828, 36.480064392089844, 36.37261962890625, 36.37261962890625, 36.37261962890625, 36.37261962890625, 36.37261962890625, 36.37261962890625, 36.37261962890625, 36.37261962890625, 36.37261962890625, 36.37261962890625 ], "content": [ "Note the part of the C++ Standard Library which makes use of templates such as vector string map etc is header-only library .", "As such the header-only library is neither static library or dynamic library .", "They simply provide the two versions of the libraries : header-only and header + library .", "Benefits of header-only library : .. . .. . Simplifies the build-process .", "Disadvantages of a header-only library : .. . .. . Bigger object-files .", "Another factor is that those header-files in a header-only library have to include headers needed by the inline definitions as well as the headers that would be needed had the library been built as a compiled library .", "A header-only library would be one that includes no binary file just a header you include in your source .", "Looking at this project http : www.savarese.com software libssrckdtree I found the definition C++ header-only template library .", "I am developing a fairly large C++ support library and have found myself moving towards a header-only approach .", "You get a lot more dependencies with a header-only library because of those extra include s needed with a header-only library .", "As the class-template A cannot be compiled into static or dynamic library to be linked to your programs so A can be shipped only as header-only library with full source code .", "By keeping my library header-only I can leave that choice to the user - all he needs to do is include the header of the binding library before mine .", "I d like to write a C++ library which is not-header-only by default but could be used as a header-only library defining a NOLIB macro .", "I m trying to write a header-only library of helper functions for myself .", "A header-only library cannot contain non-inline non-template functions .", "If he wants a header-only library then the function definitions probably shouldn t be in a code file like that though .", "Used as header-only library .. . 2 .", "Alexey : Show me one library of the STL that is not header-only .", "By the original definition of STL Standard Template Library the STL is always header-only .", "Then the standard-library does contain some other libraries that are not header-only .", "I would like to add the downsides of a header-only library to the scope of the question.. .", "I realize that there is no actual obligation for my library to be header-only .", "EDIT 2 : Here is the relevant part of my CMakeLists.txt file I only stripped the library dependencies - all header-only - from the end :", "Assuming that the library header is included in multiple translation units of a client project .. . .. . How does one modify a library to make it header-only", "You only have to download the library and use include macros to use the library .", "For a typical C++ header-only library located on e.g . github at : https : github.com username library name .. . .. . has a directory structure with an include library name folder like : .. . .. . include library name .. . .. . containing all the library sources .", "So in quantifiable terms what s different between using traditionally separated c++ header and implementation files versus header-only", "I d like to package a library I m working on as a header-only library to make it easier for clients to use .", "I am developing a library that will consist of header-files only .", "I ve ran into a confusion about how to properly use header-only library .", "I am writing a C++ library header-only and am using CMake to generate my Visual Studio project and solution files .", "To enable this optional-header-only functionality the library includes .cpp source files if compiled in header-only mode .", "What are the benefits of a header-only library and why would you write it that way oppose to putting the implementation into separate file", "There are situations when a header-only library is the only option for example when dealing with templates .", "I m creating an header-only C++11 14 library and I m not sure on how I should handle include directives between library files .", "I m wondering to code a C++ application with a header-only layout like the following : .. . .. . The only cpp file will be the main file .", "If the library is header-only I can t link it true .", "And an easy 50 slower for a full compile for header-only libraries .", "Pros for header-only .. . .. . 1 .", "Cons for header-only .. . .. . 1 .", "They started out as header-only .", "I have a library that can both be used as an header-only library and as a traditional library .", "It means that all of the code is in header-files there are no libraries associated with the library .", "Yes but if it s a library it s not a header-only solution in the first place .", "Have you considered it sarcasm At least with a single header file you can take control of the order of definitions and avoid the burden of defining macros on the people that include your library", "Having a header-only library also means you don t have to worry about different platforms where the library might be used : only if you don t have to maintain the library .", "Some libraries take the form of a binary file you must link with your project along with a header file that defines the available classes or functions .", "My problem occurs when I call target include directories on the target that represents my header-only library so that consumers of my library may find its header-files .", "Or is the message that I can t have helper classes that are header-only only helper functions", "Having a header-only library also means you don t have to worry about different platforms where the library might be used .", "In addition to the bloat problem mentioned above the compilation will take longer because the headers are inherently larger with a header-only library than a compiled library .", "I agree there s no point in trying to making a header-only library when the implementation is clearly unsuited to it .", "I cannot imagine a case where a non-template library really must be header-only .", "The headers in a header-only library are filled with implementation details that get in the way of understanding the interface .", "Since this is the first thing on google for header-only library waf I thought I should post the generic solution .", "This works perfectly with regular libraries static or shared but now I d like to make my library header-only .", "However there are still advantages to having a library be header-only - simplicity of use for one - so I m leaving my question open .", "I have header-only library which uses other libraries but they pollute the global namespace quite a bit .", "Templates are classes or functions that are customized to their particular use they re typically defined in a header file since the compiler must read their source to customize them .", "In addition languages like C are essentially header-only by design and the IDE takes care of obscuring details folding them down", "We have a header-only C++ code base VS 2010 Eclipse Makefile with about 450 files 3.6 MB .", "I am having problems with a circular dependency in a head-only library for C++ that would have not been a circular dependency problem when using source files instead of making everything header-only .", "Obviously template libraries need to be header-only but for non-templates when should you make things header-only", "There are a number of questions that list the various pros and cons of building a header-only library in c++ but I haven t been able to find one that does so in quantifiable terms .", "A container library is often a set of templates and these have to be header-only .", "There are header-only library which is where a set of tempplate code and other source code is in a header but it s not a true library in that case - it s called a library but the compile-time isolation is lost it may use namespaces instead but that s not going to guarantee that a file can be compiled on its own as such .", "I am trying to use a header-only library thread-pool http : threadpool.sourceforge.net as a sub project .", "So in root CMakeLists.txt I have .. . .. . inside thread-pool CMakeLists.txt .. . .. . As this is a header-only library with no source it gives error .", "If you did not understand the sarcasm tags let me tell you rethink your design not every library is meant to be header-only if you need to provide a compiled binary or sources for the user to compile Not every library in the standard is header-only not every library in boost is header-only and don t think you can outsmart the people that write the language or the people in boost .", "Header guards only work per-translation unit .", "Pros for header-only .. . .. . .. . .. . .. . 3 It may be a lot faster .", "Cons for header-only .. . .. . 1 It bloats the code .", "@Bathsheba : But they never converted any header-only parts .", "What I m looking for is a way to tell the IDE and CMake that all files both header and source belong to the project but that the source files should only be compiled if the library is being used in non-header only mode", "I have created several C++ libraries that currently are header-only .", "It s header-only because it contains no separate .cpp files only .h files and so you can just include all the library code into your code .", "So there won t be any runtime performance penalty if you use a statically linked library instead of a header-only library and enable compiler linker optimizations of course .", "Yes it won t be header-only .", "Executable object size : executable 0 object up to 50 bigger on header-only .. . .. . I would assume defined functions in a header file will be copied into every object .", "Some time ago I started a big header library in C++1x using XCode .", "And another advantage you might add is that the compiler will have a better opportunity to optimize things with header-only libraries .", "Also I think you ll need to avoid any use of global-variables or static-variables in your header-only-library code .", "When the library is entirely templates you don t have much choice but when you have the choice header-only is usually a poor engineering choice .", "It means that there are no modules in the library only headers .", "stackoverflow.com questions 12290639 http : stackoverflow.com questions 12290639 quantifiable-metrics-benchmarks-on-the-usage-of-header-only-c-libraries 13593041 13593041", "I m creating an header-only library and I would like to get warnings for it displayed during compilation .", "I copying and renaming one of structs that triggered the warning in the header-only library but it did not trigger a warning .", "@Dmitri What happens if the user starts playing with and comparing function-pointers of a library that is static inline header-only .", "What if headerless library A depends on DLL-only library B", "Why not just implement the template functions in the header file like is common practice", "Is there ever such a pattern of dependancies that it is impossible to keep everything in header-files only", "What if we enforced a rule of one class per header-only", "Don t quick-fire answer can I write header-only stuff", "This does not mean that you SHOULD always aim for header-only libraries .", "I think the default if not defined is to use the header-only version .", "Perhaps but the template parts of the template libraries must be header-only .", ".. . .. . For simplicity I m assuming that templates are not used because they require header-only .", "I just asked a similar question about the performance benefits of header-only .", "However the example header-only implementation ran 7 slower .", "If you truly need to hide the implementation you can t go header-only ." ] }
{ "confidence": [ 66.09971618652344, 63.47829818725586, 58.689353942871094, 58.3258056640625, 58.27342224121094, 56.75938034057617, 56.079017639160156, 55.89978790283203, 55.81919860839844, 55.15742874145508, 54.59602737426758, 54.20066452026367, 53.561683654785156, 52.72923278808594, 52.51320266723633, 52.48012161254883, 52.06112289428711, 51.830467224121094, 51.78942108154297, 51.37129211425781 ], "content": [ "Question : Looking at this project http : www.savarese.com software libssrckdtree I found the definition C++ header-only template library . At the moment I have basic C++ knowledge but would like to know what this exactly means and why this people use it on this project .. . Answer : Some libraries take the form of a binary file you must link with your project along with a header file that defines the available classes or functions . A header-only library would be one that includes no binary file just a header you include in your source . Templates are classes or functions that are customized to their particular use they re typically defined in a header file since the compiler must read their source to customize them . You can t compile a template to a binary file until you know exactly how it s going to be used so you include the source along with your own code and the compiler can then process them together .", "Question : Looking at this project http : www.savarese.com software libssrckdtree I found the definition C++ header-only template library . At the moment I have basic C++ knowledge but would like to know what this exactly means and why this people use it on this project .. . Answer : It means all the definitions of template function template or class-template are in the headers only . There is no .cpp file . There are only .h files or some other extensions such as .hpp or no extension at all like vector string etc .. . .. . C++ compilers require the definitions of templates to be present in the same file in which they re declared . As such the header-only library is neither static library or dynamic library . Its source-code library which means you can see the implementation in the headers . You ve include the header-files in your code which gets compiled along with the headers from the library . Note the part of the C++ Standard Library which makes use of templates such as vector string map etc is header-only library . Actually templates class templates and function-templates cannot be compiled into static or dynamic library to be linked to programs . A template is as the term itself says a template it s not normal code its only when you use it in your code passing template argument s which is either type or value the compiler generates a compilable function class out of the function class-template : .. . .. . Here A cannot be compiled into binary static library or dynamic library because the compiler doesn t know what T is . But B can be compiled into binary as the compiler has complete information about it . So you can read the phrase class-template A as : A is a template for a class . A itself is not a class . But B is a class its not a template . As the class-template A cannot be compiled into static or dynamic library to be linked to your programs so A can be shipped only as header-only library with full source code . Likewise Comment : or .hpp or .hxx or something else Comment : @VJo : Correct . : - Comment : and is it there any advantage for doing this in terms of execution speed code clarity organization etc Comment : @gpu drug : Read the last para . I added it for you . : -", "Question : I am developing a fairly large C++ support library and have found myself moving towards a header-only approach . In C++ this almost works because you can implement where you define in classes . For templated methods the implementation has to be in the same file anyway so I find that it is much easier to just keep the implementation with the definition . However there are several times where sources must be used . As just one example circular dependencies sometimes occur and the implementation has to be written outside the class definition . Here is how I am handling it : .. . .. . Then the project that uses libfoo would do the following in main.cpp : .. . .. . And in any other .cpp : .. . .. . The point is that the compile-inline section only gets compiled once in main.cpp . And finally my question : is there a name for this idiom or any other projects that work this way It just seems to be a natural outcome of the implementation and definition being blurred by templating and class methods . And : are there any reasons why this is a bad idea or why it would potentially not scale well Quick aside : I know that many coders with good reason prefer their headers to resemble interfaces and not implementations but IMHO documentation generators are better suited to describing interfaces because I like to hide private members all together : - Comment : Why not just put the definition in a Cpp file like anyone else instead of doing some error prone trick Comment : Does not seem very natural to me . If you want to write Java then use Java . Importing their style to C++ seems like you just want to keep doing it the way you learned your original language . There are many articles on SO about learning to write code in the style appropriate to the language . programmers.stackexchange.com q 112162 12917 http : programmers.stackexchange.com q 112162 12917 Comment : @LokiAstari - actually this kind of trick trying to get the implementation into the header goes back way before Java or heck even C++ was invented . I ve seen code declaring it s variables in it s headers using a similar trick but with a macro thrown on top for good measure . Comment : sarcasm If the need to provide template implementations in headers leads to this this probably leads to just a single header file . Have you considered it sarcasm At least with a single header file you can take control of the order of definitions and avoid the burden of defining macros on the people that include your library Comment : If you did not understand the sarcasm tags let me tell you rethink your design not every library is meant to be header-only if you need to provide a compiled binary or sources for the user to compile Not every library in the standard is header-only not every library in boost is header-only and don t think you can outsmart the people that write the language or the people in boost . .. . Answer : You should be able to use the inline keyword if the circular dependency problem is resolved by the time the definition of Bar : : CircularDependency would show up in the libfoo.h header : .. . .. . That would make your library easier to use the user wouldn t need to deal with the fact that LIBFOO COMPILE INLINE needed to be defined in exactly one place where the header is included . Comment : Wow I would have thought that would produce duplicate symbols but it doesn t--that s really neat . I m guessing the compiler still takes this as an indication to actually inline the method though Comment : One way to look at the inline keyword is that it s a way to tell the compiler that the one-definition-rule doesn t apply to this function . And yes the compiler will generally attempt to inline the function but it doesn t have to . Comment : I suppose the same effect could also be acheived without the inling characteristic through an abuse of templates i.e . create a private template class Dummy void Bar : : CircularDependency impl void and have CircularDependency call that . The templated method then skirts the ODR but can be implemented whenever it is convenient .", "Question : I am developing a fairly large C++ support library and have found myself moving towards a header-only approach . In C++ this almost works because you can implement where you define in classes . For templated methods the implementation has to be in the same file anyway so I find that it is much easier to just keep the implementation with the definition . However there are several times where sources must be used . As just one example circular dependencies sometimes occur and the implementation has to be written outside the class definition . Here is how I am handling it : .. . .. . Then the project that uses libfoo would do the following in main.cpp : .. . .. . And in any other .cpp : .. . .. . The point is that the compile-inline section only gets compiled once in main.cpp . And finally my question : is there a name for this idiom or any other projects that work this way It just seems to be a natural outcome of the implementation and definition being blurred by templating and class methods . And : are there any reasons why this is a bad idea or why it would potentially not scale well Quick aside : I know that many coders with good reason prefer their headers to resemble interfaces and not implementations but IMHO documentation generators are better suited to describing interfaces because I like to hide private members all together : - Comment : Why not just put the definition in a Cpp file like anyone else instead of doing some error prone trick Comment : Does not seem very natural to me . If you want to write Java then use Java . Importing their style to C++ seems like you just want to keep doing it the way you learned your original language . There are many articles on SO about learning to write code in the style appropriate to the language . programmers.stackexchange.com q 112162 12917 http : programmers.stackexchange.com q 112162 12917 Comment : @LokiAstari - actually this kind of trick trying to get the implementation into the header goes back way before Java or heck even C++ was invented . I ve seen code declaring it s variables in it s headers using a similar trick but with a macro thrown on top for good measure . Comment : sarcasm If the need to provide template implementations in headers leads to this this probably leads to just a single header file . Have you considered it sarcasm At least with a single header file you can take control of the order of definitions and avoid the burden of defining macros on the people that include your library Comment : If you did not understand the sarcasm tags let me tell you rethink your design not every library is meant to be header-only if you need to provide a compiled binary or sources for the user to compile Not every library in the standard is header-only not every library in boost is header-only and don t think you can outsmart the people that write the language or the people in boost . .. . Answer : My reasons for why this is a bad idea . Increase in compile-time .. . .. . Every individual compilation unit that includes the header should compile all the header-files in addition to the source in itself . This would probably increase the compile-time and might be frustrating while testing your code with small changes . One could argue the compiler might optimize it but IMO it could not optimize it beyond a point . Bigger code segment .. . .. . If all the functions are written inline it means that the compiler has to put all that code wherever the function is called . This is going to blow up the code segment and it would affect the load-time of the program and the program would take more memory . Creates dependency in client code with tight coupling .. . .. . Whenever you change your implementation every client should get updated by re compiling the code . But if the implementation has been put in an independent shared object .so or .dll the client should just link-to the new shared object . Also I am not sure why one would do this . If at all one has to do this s he could have simply put the implementation code in main.cpp itself . Anyway you could define LIBFOO COMPILE INLINE only in one compilation unit . Otherwise you will duplicate definitions . I am actually much interested in developing a idiom to write cohesive template code . Sometime in future C++ compiler should support writing cohesive templates . By this I mean the client need not have to recompile the code whenever template implementation in modified .", "Question : I have created several C++ libraries that currently are header-only . Both the interface and the implementation of my classes is written in the same .hpp file . I ve recently started thinking that this kind of design is not very good : .. . .. . 1 . If the user wants to compile the library and link it dynamically he she can t . 2 . Changing a single line of code requires full recompilation of existing projects that depend on the library . I really enjoy the aspects of header-only libraries though : all functions get potentially inlined and they re very very easy to include in your projects - no need to compile link anything just a simple include directive . Is it possible to get the best of both worlds I mean - allowing the user to choose how he wants to use the library . It would also speed up development as I d work on the library in dynamically-linking mode to avoid absurd compilation times and release my finished products in header-only mode to maximize performance . The first logical step dividing interface and implementation in .hpp and .inl files . I m not sure how to go forward though . I ve seen many libraries prepend LIBRARY API macros to their function class declarations - maybe something similar would be needed to allow the user to choose .. . .. . EDIT : All of my library functions are prefixed with the inline keyword to avoid multiple definition of.. . errors . I assume the keyword would be replaced by a LIBRARY INLINE macro in the .inl files The macro would resolve to inline for header-only mode and to nothing for the dynamically-linking mode . Comment : What kind of libraries are you talking about A container library is often a set of templates and these have to be header-only . An applicative library is different . Comment : @BasileStarynkevitch : As an example this https : github.com SuperV1234 SSVUtils is one of my header-only libraries . It is mostly template-based but there are also modules that do not rely on templates for example the CommandLine module . Changing a single line during development in one of the non-template modules requires full recompilation . Also the fact that interface and implementation are not separated bothers me . Do you think this kind of library is a candidate for my idea described in the question Comment : Your 1 point is kind of meaningless . If the library is header-only I can t link it true . Unless I write my own wrapper library around it . And if you make it a dynamic library I can t just include it . It cuts both ways . .. . Answer : This is to complement @Horstling s answer . .. . .. . You can either create a static or a dynamic library . When you create statically-linked libraries compiled code for all functions objects will be saved to a file with .lib extension in Windows . At main project the project using the library s link time these codes will be linked into your final executable together with the main project codes . So the final executable wouldn t have any runtime dependency . Dynamically linked libraries will be merged into the main project at run time and not link time . When you compile the library you get a .dll file which contains actual compiled code and a .lib file which contains enough data for the compiler runtime to find functions objects in the .dll file . At link time the executable will be configured to load the .dll and use compiled code from that .dll as needed . You will need to distribute the .dll file with your executable to be able to run it . There is no need to choose between static or dynamic linking or header-only when designing your library you create multiple project makefiles one to create a static .lib another to create a .lib .dll pair and distribute both versions for the user to choose between . You ll need to use preprocessor macros like the ones @Horstling suggested . .. . .. . You cannot put any templates in a pre-compiled library unless you use a technique called Explicit Instantiation which limits template parameters . Also note that modern compiler linkers usually do not respect the inline modifier . They may inline a function even if it s not designated as inline or may dynamically call another that has inline modifier as they see fit . Regardless I ll advise explicitly putting inline where applicable for maximum compatibility . So there won t be any runtime performance penalty if you use a statically linked library instead of a header-only library and enable compiler linker optimizations of course . As others have suggested for really small functions that are sure to benefit from being called inline it is best practice to put them in header-files so dynamically linked libraries will also not suffer any significant performance loss . In any case inlining functions will only affect performance for functions that are being called very often inside loops that are going to be called thousands millions of times . .. . .. . Instead of putting inline-functions in header-files with an include foo.cpp in your header you can change makefile project settings and add foo.cpp to the list of source files to be compiled . This way if you change any function implementation there will be no need to re-compile the whole project and only foo.cpp will be re-compiled . As I mentioned earlier your small functions will still be inlined by the optimizing compiler and you don t need to worry about that . .. . .. . If you use design a pre-compiled library you should consider the case where the library is compiled with a different version of compiler to the main project . Each different compiler version even different configurations like Debug or Release uses a different C runtime things like memcpy printf fopen .. . and C++ standard-library runtime things like std : : vector std : : string .. . . These different library implementations may complicate linking or even create runtime errors . As a general rule always avoid sharing compiler runtime objects data-structures that are not defined by standards like FILE across libraries because incompatible data-structures will lead to runtime errors . When linking your project C C++ runtime functions must be linked into your library .lib or .lib .dll or your executable .exe . C C++ runtime itself can be linked as static or dynamic library you can set this in makefile project settings . You will find that dynamically linking to C C++ runtime in both the library and the main project even when you compile the library itself as a static library avoids most linking problems with duplicate function implementations in multiple runtime versions . Of course you would need to distribute runtime DLLs for all used versions with your executable and library . There are scenarios that statically linking to C C++ runtime is needed and the best approach in these cases would be to compile the library with the same compiler setting as the main project to avoid linking problems . Comment : You can get more flexibility on the point of putting template bodies in a prebuild library . First you can explicitly instantiate to put ones you know are needed into a shared library and prevent them from being instantiated for those types but know to link-to them when code uses the template . Second you can put function bodies in a different .h file and only include that file if you need a type that s not pre-compiled . This is the old portable way to prevent instantiation . It can prevent dragging in more dependencies in the delcaration only header .", "Question : Looking at this project http : www.savarese.com software libssrckdtree I found the definition C++ header-only template library . At the moment I have basic C++ knowledge but would like to know what this exactly means and why this people use it on this project .. . Answer : The short answer is that templates are much like macros for the compiler to generate code . Each time you instantiate it for esample using a type like std : : list int the compiler has to have the original code to insert the correct type in this case int in the code of the template class . This is why template classes are included in .h files each time you have to use them in .cpp files .", "Question : I am developing a fairly large C++ support library and have found myself moving towards a header-only approach . In C++ this almost works because you can implement where you define in classes . For templated methods the implementation has to be in the same file anyway so I find that it is much easier to just keep the implementation with the definition . However there are several times where sources must be used . As just one example circular dependencies sometimes occur and the implementation has to be written outside the class definition . Here is how I am handling it : .. . .. . Then the project that uses libfoo would do the following in main.cpp : .. . .. . And in any other .cpp : .. . .. . The point is that the compile-inline section only gets compiled once in main.cpp . And finally my question : is there a name for this idiom or any other projects that work this way It just seems to be a natural outcome of the implementation and definition being blurred by templating and class methods . And : are there any reasons why this is a bad idea or why it would potentially not scale well Quick aside : I know that many coders with good reason prefer their headers to resemble interfaces and not implementations but IMHO documentation generators are better suited to describing interfaces because I like to hide private members all together : - Comment : Why not just put the definition in a Cpp file like anyone else instead of doing some error prone trick Comment : Does not seem very natural to me . If you want to write Java then use Java . Importing their style to C++ seems like you just want to keep doing it the way you learned your original language . There are many articles on SO about learning to write code in the style appropriate to the language . programmers.stackexchange.com q 112162 12917 http : programmers.stackexchange.com q 112162 12917 Comment : @LokiAstari - actually this kind of trick trying to get the implementation into the header goes back way before Java or heck even C++ was invented . I ve seen code declaring it s variables in it s headers using a similar trick but with a macro thrown on top for good measure . Comment : sarcasm If the need to provide template implementations in headers leads to this this probably leads to just a single header file . Have you considered it sarcasm At least with a single header file you can take control of the order of definitions and avoid the burden of defining macros on the people that include your library Comment : If you did not understand the sarcasm tags let me tell you rethink your design not every library is meant to be header-only if you need to provide a compiled binary or sources for the user to compile Not every library in the standard is header-only not every library in boost is header-only and don t think you can outsmart the people that write the language or the people in boost . .. . Answer : Circular dependencies are not really a problem as you can forward decalre that functions are inline . I wouldn t really suggest this though : while the source-less approach initially makes it easier to use a library coming from somewhere it causes longer compile times and tighter coupling between files . In a huge source base this is essentially killing the hOpe to get code build in reasonable times . Sure huge only starts at a couple millions lines-of-code but who cares about trivial programs.. . and yes the place I work at has several tens of millions lines-of-code being build into single executables", "Question : What are the benefits of a header-only library and why would you write it that way oppose to putting the implementation into separate file Comment : Mostly templates but it will also make it a bit easier to distribute and use . Comment : I would like to add the downsides of a header-only library to the scope of the question.. . Comment : What downsides are there that have not already been mentioned Comment : @moooeeeep : for the downsides you may want to read the paragraph Stop inlining code in C++ Dos and Don ts http : dev.chromium.org developers coding-style cpp-dos-and-donts Chromium Projects web page . .. . Answer : Benefits of header-only library : .. . .. . Simplifies the build-process . You don t need to build the library and you don t need to specify the compiled library during the link step of the build . If you do have a compiled library you will probably want to build multiple versions of it : One compiled with debugging enabled another with optimization enabled and possibly yet another stripped of symbols . And maybe even more for a multi-platform system . Disadvantages of a header-only library : .. . .. . Bigger object-files . Every inline method from the library that is used in some source file will also get a weak-symbol out-of-line definition in the compiled object file for that source file . This slows down the compiler and also slows down the linker . The compiler has to generate all that bloat and then linker has to filter it out . Longer compilation . In addition to the bloat problem mentioned above the compilation will take longer because the headers are inherently larger with a header-only library than a compiled library . Those big headers are going to need to be parsed for each source file that uses the library . Another factor is that those header-files in a header-only library have to include headers needed by the inline definitions as well as the headers that would be needed had the library been built as a compiled library . More tangled compilation . You get a lot more dependencies with a header-only library because of those extra include s needed with a header-only library . Change the implementation of some key function in the library and you might well need to recompile the entire project . Make that change in the source file for a compiled library and all you have to do is recompile that one library source file update the compiled library with that new .o file and relink the application . Harder for the human to read . Even with the best documentation users of a library oftentimes have to resort to reading the headers for the library . The headers in a header-only library are filled with implementation details that get in the way of understanding the interface . With a compiled library all you see is the interface and a brief commentary on what the implementation does and that s usually all you want . That s really all you should want . You shouldn t have to know implementation details to know how to use the library . Comment : Last point doesn t really make sense . Any reasonable documentation will include the function declaration parameters return values etc. . and all associated comments . If you have to refer to the header file the documentation has failed . Comment : I find that it actually reduces compilation time since there are much less objects to build . And another advantage you might add is that the compiler will have a better opportunity to optimize things with header-only libraries . Comment : @Thomas - Even with the very best of professional libraries I oftentimes find myself having to resort to reading the fine header . In fact if the so-called fine documentation is extracted from the code plus commentary I typically like reading the headers . The code plus the comments tells me more than does the auto-generated documentation . Comment : Last point is not valid . Headers are already filled with implementation details in the private members so it is not like the cpp file hides all the implementation details . In addition languages like C are essentially header-only by design and the IDE takes care of obscuring details folding them down Comment : @Tomas : Agree the last point is completely bogus . You can easily keep interface and implementation just as separate with header-only libraries you simply have the interface header include the implementation details . This is why Boost libraries typically include a subdirectory and namespace called detail .", "Question : I write small header-only and static - inline -only libraries in C . Would this be a bad idea when applied to big libraries Or is it likely that the running time will be faster with the header-only version Well without considering the obvious compilation time difference . Comment : Functions generally shouldn t be defined in headers . Comment : @2501 Using static inline-functions in headers in not uncommon . Comment : Even if that would be true it is still wrong . Comment : @2501 it s done to guarantee that the function definition appears before it s use to ensure that inlining happens . I wouldn t say it s wrong for static inline as there s no external linkage then . Comment : @Dmitri What happens if the user starts playing with and comparing function-pointers of a library that is static inline header-only . .. . Answer : Yes it is a bad idea -- especially when integrated with larger libraries . The problem of inline-functions complexity generally increases as these libraries are included and visible to more translations and more complex header inclusion graphs -- which is quite common with larger projects . It becomes much more time consuming to build as translation counts and dependencies increase . The increase is not typically linear complexity . There are reasons this flies in C++ but not in C . inline export semantics differ . In short you will end up producing tons of copies of functions in C as well as functions variables . C++ deduplicates them . C does not . Also inlining isn t a silver bullet for speed . The approach will often increase your code-size and executable size . Large functions can create slower code . Copies of programs functions can also make your program slower . Larger binaries take more time to link and initialize launch . Smaller is usually better . It s better to consider alternatives such as Link Time Optimizations Whole Program Optimizations Library design using C++ -- and to avoid C definitions in headers . Also keep in mind that the compiler can eliminate dead-code and the linker can eliminate unused functions .", "Question : I d like to package a library I m working on as a header-only library to make it easier for clients to use . It s small and there s really no reason to put it into a separate translation-unit However I cannot simply put my code in headers because this violates C++ s one-definition-rule . Assuming that the library header is included in multiple translation units of a client project .. . .. . How does one modify a library to make it header-only .. . Answer : You can use the inline keyword : .. . .. . inline allows the linker to simply pick one definition and discard the rest . As such if those definitions don t actually match you get a good dose of undefined behavior.. . .. . .. . As an aside member-functions defined within a class-type are implicitly marked inline : Comment : +1 from me . This is pretty much all inline means to modern compilers . Comment : Nitpick : It doesn t allow breaking of ODR it allows the function to be defined multiple times . The definitions still have to match . Comment : @BillyONeal : A good nitpick . Edited . Comment : Interesting -- I don t have to mark them as inline in the class definition only at the member-functions definition Comment : @BillyONeal : Yup . If the member function is defined within the class definition it s inline . Outside the rules of a regular function apply .", "Question : Looking at this project http : www.savarese.com software libssrckdtree I found the definition C++ header-only template library . At the moment I have basic C++ knowledge but would like to know what this exactly means and why this people use it on this project .. . Answer : It means that you do not have to link any external libraries during the linking phase of your development . You only have to download the library and use include macros to use the library . It simplifies deployment of your application down the road but sometimes at the expense of longer compiler times .", "Question : I have created several C++ libraries that currently are header-only . Both the interface and the implementation of my classes is written in the same .hpp file . I ve recently started thinking that this kind of design is not very good : .. . .. . 1 . If the user wants to compile the library and link it dynamically he she can t . 2 . Changing a single line of code requires full recompilation of existing projects that depend on the library . I really enjoy the aspects of header-only libraries though : all functions get potentially inlined and they re very very easy to include in your projects - no need to compile link anything just a simple include directive . Is it possible to get the best of both worlds I mean - allowing the user to choose how he wants to use the library . It would also speed up development as I d work on the library in dynamically-linking mode to avoid absurd compilation times and release my finished products in header-only mode to maximize performance . The first logical step dividing interface and implementation in .hpp and .inl files . I m not sure how to go forward though . I ve seen many libraries prepend LIBRARY API macros to their function class declarations - maybe something similar would be needed to allow the user to choose .. . .. . EDIT : All of my library functions are prefixed with the inline keyword to avoid multiple definition of.. . errors . I assume the keyword would be replaced by a LIBRARY INLINE macro in the .inl files The macro would resolve to inline for header-only mode and to nothing for the dynamically-linking mode . Comment : What kind of libraries are you talking about A container library is often a set of templates and these have to be header-only . An applicative library is different . Comment : @BasileStarynkevitch : As an example this https : github.com SuperV1234 SSVUtils is one of my header-only libraries . It is mostly template-based but there are also modules that do not rely on templates for example the CommandLine module . Changing a single line during development in one of the non-template modules requires full recompilation . Also the fact that interface and implementation are not separated bothers me . Do you think this kind of library is a candidate for my idea described in the question Comment : Your 1 point is kind of meaningless . If the library is header-only I can t link it true . Unless I write my own wrapper library around it . And if you make it a dynamic library I can t just include it . It cuts both ways . .. . Answer : Templated code will necessarily be header-only : for instantiating this code the type parameters must be known at compilation time . There is no way to embed template code in shared-libraries . Only .NET and Java support JIT instantiation from byte-code . Re : non-template code for short one-liners I suggest keeping it header-only . Inline functions give the compiler a lot more opportunities to optimize the final code . To avoid insane compilation time MS Visual C has precompiled-headers feature . I do not think GCC has similar feature . Long functions should not be inline in any case . I had one project which had header-only bits compiled library bits and some bits I could not decide where they belong . I ended up having .inc files conditionally included in either .hpp or .cxx depending on ifdef . Truth to be told the project was always compiled in max inline mode so after a while I got rid of the .inc files and simply moved the contents to .hpp files .", "Question : Is there ever such a pattern of dependancies that it is impossible to keep everything in header-files only What if we enforced a rule of one class per header-only For the purposes of this question let s ignore static things : Comment : What if headerless library A depends on DLL-only library B Or is that ruled out by the last sentence Of course you could always reimplement it as headers so maybe not impossible . Comment : do you have to talk to other languages Comment : @Skurmedel : C++ defines no DLL-like facility so anything there is going to be implementation specified . I doubt it makes any difference though . Comment : Please read the question carefully before you answer . Don t quick-fire answer can I write header-only stuff that s not the question . The question is is there any code that would require a translation-unit and therefore cannot be strictly header-only Comment : A problem are things that must be defined only once but cannot be inlined such as static data-members or global objects . I know a way around the static member problem put these into a class-template but haven never given thought to global data . Also I m not sure about explicit template instantiations . Are those subject to the ODR .. . Answer : It is possible I would say at the express condition of not using a number of language features : as you noticed a few uses of the static keyword . It may require a few trick but they can be reviewed . 1 . You ll need to keep the header source distinction whenever you need to break a dependency cycle even though the two files will be header-files in practice . 2 . Free-functions non-template have to be declared inline the compiler may not inline them but if they are declared so it won t complained that they have been redefined when the client builts its library executable . 3 . Globally shared data global-variables and class static attributes should be emulated using local static attribute in functions class methods . In practice it matters little as far as the caller is concerned just adds . Note that in C++0x this becomes the favored way because it s guaranteed to be thread-safe while still protecting from the initialization order fiasco until then.. . it s not thread-safe .. . .. . Respecting those 3 points I believe you would be able to write a fully-fledged header-only library anyone sees something else I missed A number of Boost Libraries have used similar tricks to be header-only even though their code was not completely template . For example Asio does very consciously and proposes the alternative using flags see release notes for Asio 1.4.6 http : www.boost.org doc libs 1 44 0 doc html boost-asio history.html : .. . .. . clients who only need a couple features need not worry about building linking they just grab what they need .. . clients who rely on it a bit more or want to cut down on compilation time are offered the ability to build their own Asio library with their own sets of flags and then include lightweight headers .. . .. . This way at the price of some more effort on the part of the library devs the clients get their cake and eat it too . It s a pretty nice solution I think . Note : I am wondering whether static functions could be inlined I prefer to use anonymous namespaces myself so never really looked into it.. . Comment : re 1 : Can you sketch a scenario where this would be necessary I tried to imagine one but couldn t come up with anything that can t be solved by moving inlined function definitions behind all the necessary definitions .", "Question : It seems like I had to inline quite a bit of code here . I m wondering if it s bad design practice to leave this entirely in a header file like this : Comment : If it s header-only I think your best bet is to split it into multiple-files . Like detail DirectoryIterator.hpp etc so at least it s not contained in one single file . This is what Boost does . By the way Boost has a filesystem library just in case you didn t know . Comment : @GMan : +1 . Yes boost has a filesystem library but it is designed for cross-platform compatibility which requires opening a whole can of worms I don t want it has it s own path processor for example . With this I think I can make client code clearer that doesn t care about cross-platform portability . Comment : Nice to see you re getting good use out of : stackoverflow.com questions 2531874 http : stackoverflow.com questions 2531874 how-might-i-wrap-the-findxfile-style-apis-to-the-stl-style-iterator-pattern-in-c Comment : @Michael Burr : Yep . Thank you again : Comment : @Billy : Hey no need to thank me - you re using Jerry Coffin s answer . I didn t do anything there but post a pointer to the Boost stuff and I didn t even remember that I had done that - I just remembered the question and Jerry Coffin s post . .. . Answer : As far as the length of the header goes you can have as much code as you d like in your header-files . The trade off is the amount of code that must be recompiled each time your program is built code placed in your CPP files can be compiled into object-files and linked in on each subsequent build . I would suggest that each of the method definitions for DirectoryIteratorImpl should be moved to a .cpp file . If you re not defining a method inline inside a class definition there s no reason for it to be included in the header file . An unrelated aside : Avoid writing inline DirectoryIteratorImpl - actually write your inline-functions inline or don t mark them inline . From the C++ FAQ Lite http : www.parashift.com c++-faq-lite inline-functions.html faq-9.1 : .. . .. . It s usually imperative that the function s definition the part between the .. . be placed in a header file . If you put the inline function s definition into a .cpp file and if it is called from some other .cpp file you ll get an unresolved external error from the linker . If your functions are too big to write in the header file they re too big to inline and the compiler will likely ignore your inline suggestion anyways . Comment : 1 . You didn t answer my question . I know the code gets put into every file that uses this code -- I was wondering if that would lead to too much code bloat . 2 . I can t make the functions be a literal part of the class because half of them depend on the full definition of class FileData being available . Why do you think I declared all FileData s members implicitly inline : Comment : @billy Perhaps the body of the question should have specified . Also my suggestion stands - nix the inline definition if you can t declare the function inline . Comment : @meagar : I think that s sort of implied . The implications of making a function inline should be inherently obvious . I was asking if that is a good idea . The only reason it d ever be a bad idea would be if it led to too much code bloat . Comment : @billy I don t think code bloat means what you think it means . You cannot solve code bloat by adding more characters to the file ie additional inline keywords . Comment : I don t understand what the problem is with marking a function inline and placing the definition later in the header . The FAQ entry pointed doesn t seem to indicate there s a problem with that .", "Question : I d like to package a library I m working on as a header-only library to make it easier for clients to use . It s small and there s really no reason to put it into a separate translation-unit However I cannot simply put my code in headers because this violates C++ s one-definition-rule . Assuming that the library header is included in multiple translation units of a client project .. . .. . How does one modify a library to make it header-only .. . Answer : Use header guards as Liz suggests and don t forget to put inline before your function methods . ie Comment : Nitpick : In C++ there is no such thing as a method . There are member-functions and nonmember functions .", "Question : Is there ever such a pattern of dependancies that it is impossible to keep everything in header-files only What if we enforced a rule of one class per header-only For the purposes of this question let s ignore static things : Comment : What if headerless library A depends on DLL-only library B Or is that ruled out by the last sentence Of course you could always reimplement it as headers so maybe not impossible . Comment : do you have to talk to other languages Comment : @Skurmedel : C++ defines no DLL-like facility so anything there is going to be implementation specified . I doubt it makes any difference though . Comment : Please read the question carefully before you answer . Don t quick-fire answer can I write header-only stuff that s not the question . The question is is there any code that would require a translation-unit and therefore cannot be strictly header-only Comment : A problem are things that must be defined only once but cannot be inlined such as static data-members or global objects . I know a way around the static member problem put these into a class-template but haven never given thought to global data . Also I m not sure about explicit template instantiations . Are those subject to the ODR .. . Answer : I am aware of no features in standard C++ excepting statics which you have already mentioned which require a library to define a full translation-unit instead of only headers . However it s not recommended to do that because when you do you force all your clients to recompile their entire codebase whenever your library changes . If you re using source files or a static library or a dynamic library form of distribution your library can be changed updated modified without forcing everyone to recompile . Comment : you force all your clients to recompile their entire codebase whenever your library changes - even worse in practice you force them to recompile your library whenever their codebase changes . Comment : Though it does make the library trivial to use and helps the compiler when it optimizes . Comment : @GMan : Depends on the compiler . IIRC both GCC and MSVC have link time code generation facilities now for release builds which removes most if not all potential performance differences .", "Question : I have created several C++ libraries that currently are header-only . Both the interface and the implementation of my classes is written in the same .hpp file . I ve recently started thinking that this kind of design is not very good : .. . .. . 1 . If the user wants to compile the library and link it dynamically he she can t . 2 . Changing a single line of code requires full recompilation of existing projects that depend on the library . I really enjoy the aspects of header-only libraries though : all functions get potentially inlined and they re very very easy to include in your projects - no need to compile link anything just a simple include directive . Is it possible to get the best of both worlds I mean - allowing the user to choose how he wants to use the library . It would also speed up development as I d work on the library in dynamically-linking mode to avoid absurd compilation times and release my finished products in header-only mode to maximize performance . The first logical step dividing interface and implementation in .hpp and .inl files . I m not sure how to go forward though . I ve seen many libraries prepend LIBRARY API macros to their function class declarations - maybe something similar would be needed to allow the user to choose .. . .. . EDIT : All of my library functions are prefixed with the inline keyword to avoid multiple definition of.. . errors . I assume the keyword would be replaced by a LIBRARY INLINE macro in the .inl files The macro would resolve to inline for header-only mode and to nothing for the dynamically-linking mode . Comment : What kind of libraries are you talking about A container library is often a set of templates and these have to be header-only . An applicative library is different . Comment : @BasileStarynkevitch : As an example this https : github.com SuperV1234 SSVUtils is one of my header-only libraries . It is mostly template-based but there are also modules that do not rely on templates for example the CommandLine module . Changing a single line during development in one of the non-template modules requires full recompilation . Also the fact that interface and implementation are not separated bothers me . Do you think this kind of library is a candidate for my idea described in the question Comment : Your 1 point is kind of meaningless . If the library is header-only I can t link it true . Unless I write my own wrapper library around it . And if you make it a dynamic library I can t just include it . It cuts both ways . .. . Answer : Rather than a dynamic library you could have a precompiled static library and thin header file . In an interactive quick build you get the benefit of not having to recompile the world if implementation details changes . But a fully optimized release build can do global optimization and still figure out it can inline-functions . Basically with Link Time Code Generation the toolset does the trick you were thinking about . I m familiar with Microsoft s compiler which I know for sure does this as of VS10 if not earlier .", "Question : I have created several C++ libraries that currently are header-only . Both the interface and the implementation of my classes is written in the same .hpp file . I ve recently started thinking that this kind of design is not very good : .. . .. . 1 . If the user wants to compile the library and link it dynamically he she can t . 2 . Changing a single line of code requires full recompilation of existing projects that depend on the library . I really enjoy the aspects of header-only libraries though : all functions get potentially inlined and they re very very easy to include in your projects - no need to compile link anything just a simple include directive . Is it possible to get the best of both worlds I mean - allowing the user to choose how he wants to use the library . It would also speed up development as I d work on the library in dynamically-linking mode to avoid absurd compilation times and release my finished products in header-only mode to maximize performance . The first logical step dividing interface and implementation in .hpp and .inl files . I m not sure how to go forward though . I ve seen many libraries prepend LIBRARY API macros to their function class declarations - maybe something similar would be needed to allow the user to choose .. . .. . EDIT : All of my library functions are prefixed with the inline keyword to avoid multiple definition of.. . errors . I assume the keyword would be replaced by a LIBRARY INLINE macro in the .inl files The macro would resolve to inline for header-only mode and to nothing for the dynamically-linking mode . Comment : What kind of libraries are you talking about A container library is often a set of templates and these have to be header-only . An applicative library is different . Comment : @BasileStarynkevitch : As an example this https : github.com SuperV1234 SSVUtils is one of my header-only libraries . It is mostly template-based but there are also modules that do not rely on templates for example the CommandLine module . Changing a single line during development in one of the non-template modules requires full recompilation . Also the fact that interface and implementation are not separated bothers me . Do you think this kind of library is a candidate for my idea described in the question Comment : Your 1 point is kind of meaningless . If the library is header-only I can t link it true . Unless I write my own wrapper library around it . And if you make it a dynamic library I can t just include it . It cuts both ways . .. . Answer : It is operating-system and compiler specific . On Linux with a very recent GCC http : gcc.gnu.org compiler version 4.9 you might produce a static library using interprocedural linktime optimization http : en.wikipedia.org wiki Interprocedural optimization . This means that you build your library with g++ -O2 -flto both at compile and at library link time and that you use your library with g++ -O2 -flto both at compile and link time of the invoking program .", "Question : I d like to write a C++ library which is not-header-only by default but could be used as a header-only library defining a NOLIB macro . I ve seen two approaches : .. . .. . inline definitions .. . .. . foo.h .. . .. . foo.cc .. . .. . .. . .. . Artificial template .. . .. . foo.h .. . .. . foo.cc .. . .. . What are the pros and cons of these approaches Are there better options Comment : If the functions are small enough to be inlined you could potentially ship the implementations in a static library or even ship the .cc files . .. . Answer : There is no real difference in each approach because both inline methods or templates could end up be inserted inline with your code depending on compiler optimizations . See this http : stackoverflow.com a 3694923 3571171 post discussing inline vs templates . Comment : I m not too worried of code bloat one reason being that header-only version would be for casual user . I was thinking of problems like circular dependency or other unforeseen issues that may emerge trying to convert a standard-library . Also the artificial template seems a stretch of C++ language . Comment : I think the main thing to watch for in either case is to avoid having a using namespace line in your code which could cause problems for the end user so you should implement everything within a namespace if you are suing them . You could have circular dependencies in either of the cases you mentioned .", "Question : I am developing a library that will consist of header-files only . So far it contains only classes which has been fine . However I have come to a point where I need to have some library-wide accessible unchanging data in the library that is not class instance data for the implementation of some functions . You obviously can t just put global data in header-files or else every compilation unit that include s the header will have a definition for the symbol and you ll get multiple definition errors at link-time . I seem to have found a workaround that lets me have static data in a class without having to add a compilation unit to the library by just making the data a static variable in a function and returning a pointer to that data : .. . .. . This appears to be working fine but I must admit that I don t know what happens to function- static data in inline-functions in header-files . I am wondering if this hack has any unintended repercussions such as every compilation unit that include s this header getting its own version of array . How and where does the compiler decide to put it Also it should be noted that I am not using this to implement the singleton antipattern or anything . I am just using it to store data that multiple functions will need to use which is why it can t be static in just a function that uses it but even if it did that would prompt the same question . .. . Answer : That s fine . It s guaranteed that there will only be one copy of array as long as the function has external linkage which this does . The C++ standard says : .. . .. . 7.1.2 4 A static local variable in an extern inline function always refers to the same object . Comment : Ah that s a relief . I assume this applies to C++03 as well as C++11 This answers my question for practical purposes but just for fun is there any implementation-independent information about how the compiler decides where to put the data function definition Comment : C++03 has exactly the same wording . I believe compilers set a flag on the symbols for inline-functions and their static locals or put them in special sections to tell the linker to include the first occurrence it finds and discard duplicates . But I don t know any details about that ." ] }
[ "yes-answer-long", "yes-answer-short" ]
header
UNK_RELATION
dds@middleware@70
dds -- the data-distribution-service dds is a type of communications @placeholder .
{ "confidence": [ 54.79673385620117, 50.39971923828125, 50.39971923828125, 48.41330337524414, 45.71228790283203, 41.614952087402344, 41.614952087402344, 40.77648162841797, 40.6800537109375, 40.1427001953125, 39.7293701171875, 39.19917297363281, 39.186279296875, 39.186279296875, 39.186279296875, 39.186279296875, 39.186279296875, 38.66701126098633, 38.66701126098633, 38.66701126098633, 38.396583557128906, 38.086265563964844, 38.040321350097656, 37.99055862426758, 37.99055862426758, 37.99055862426758, 37.90789031982422, 37.68803024291992, 37.68406677246094, 37.68406677246094, 37.554710388183594, 37.554710388183594, 37.554710388183594, 37.01157760620117, 37.01157760620117, 37.01157760620117, 37.01157760620117, 36.826683044433594, 36.68547058105469, 36.524169921875, 36.44042205810547, 36.44042205810547, 36.44042205810547, 36.44042205810547, 36.44042205810547, 36.04762268066406, 35.95256805419922, 35.8382453918457, 35.8382453918457, 35.834259033203125, 35.830291748046875, 35.517425537109375, 35.517425537109375, 35.517425537109375, 35.517425537109375, 35.517425537109375, 35.517425537109375, 35.517425537109375, 35.517425537109375, 35.517425537109375, 35.35099792480469, 35.35083770751953, 35.22034454345703, 35.22034454345703, 35.22034454345703, 34.97358703613281, 34.811946868896484, 34.631317138671875, 34.571434020996094, 34.53844451904297, 34.398990631103516, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.35857391357422, 34.288108825683594, 34.288108825683594, 34.288108825683594, 34.288108825683594, 33.37959289550781, 33.37959289550781, 33.37959289550781, 33.37959289550781, 33.37959289550781, 33.37959289550781, 33.37959289550781, 33.37959289550781, 33.37959289550781, 33.37959289550781, 33.3651123046875, 33.3651123046875, 33.3651123046875 ], "content": [ "I am new to Data Distribution Service DDS .", "In general a data producer creates several DDS entities to facilitate the ability to write data for example a DDS : : DomainParticipant a DDS : : Publisher a DDS : : Topic and a DDS : : DataWriter .", "Similarly a data consumer creates corresponding DDS entities that enable it to read data for example a DDS : : DomainParticipant a DDS : : Subscriber a DDS : : Topic and a DDS : : DataReader .", "The tag dds has been removed twice because that refers to Data Distribution Service not the dds file-format .", "Actually there s a standardization effort for secure DDS communications .", "I want to know the differences between OPC Open Platform Communication and DDS Data Distribution Service .", "I need for C winform app and for android native application to use DDS Data Distribution Service .", "The data is not removed from the DDS .", "The pragma you are looking at is the PrismTech method for defining a key-value within an OMG-DDS Data Distribution Service for Real-Time Systems Type structure .", "How much data can I put using the persistence of OpenSplice DDS or RTI s DDS", "These QoS settings give DDS a very rich set of configuration options that impact communications .", "This approach should apply regardless of the DDS implementation in use for example CoreDX DDS OpenSplice or RTI .", "I am using DDS more specifically RTI DDS for a java application .", "I am using RTI DDS Spy to debug a DDS application .", "do these frameworks provide such an options for DDS opensource dds based on TAO ACE", "Do you want a comparison of different DDS frameworks or DDS and HLA", "Define a set of DDS Types and DDS Profiles that covers all your needs .", "Security .. . .. . RTI Connext DDS Secure is the only answer if you have extensive requirements on security and data encryption using DDS .", "Short story : My DDS subscriber cannot see data from my DDS publisher .", "I ran DDS SPY on the broken QNX VM while it was playing back and I got DDS data .", "Here you can define routes and endpoints that allow your DDS-data to be routed to from over 80 non-DDS technologies including relational-database systems that would then allow to persist your DDS-information .", "DDS Data Distribution Service middleware supports exactly what you are trying to achieve and much more easily .", "The DDS API allows for synchronous and asynchronous communication patterns .", "With DDS this is not the case it is fully distributed .", "DDS requires a lot of bandwidth .", "The DDS format seems not to be supported .", "instead of DDS .", "Instead the data is sent as part of the information carried by other built-in topics DDS : : PublicationBuiltinTopicData and DDS : : SubscriptionBuiltinTopicData .", "publishing data or to extract samples from DDS i.e .", "DDS is a very poor wrapper for DXT or BTC data .", "Implementations like RTI DDS MilSOFT DDS and CoreDX DDS have decentralized architectures which are peer-to-peer and does not need any daemons .", "Since you have included the tag dds http : stackoverflow.com questions tagged dds are you interested in solutions using DDS as well", "The OMG specification Extensible and Dynamic Topic Types for DDS http : www.omg.org spec DDS-XTypes 1.1 or DDS-XTypes for short addresses your problem .", "There is no such thing as a global mutex in DDS .", "It is part of the OMG DDS specification .", "I am new to dds .", "This is permitted by the DDS Specification .", "I m using DDS to buffer data between modules in software I m working on .", "DDS promotes the data to a fully-qualified peer of the system : A publisher publishes data .", "I am trying to implement a simple chat message example using Data Distribution Service DDS protocol provided by Prismtech Community Edition .", "It is a PubSub approach but not exactly a reimplementation of DDS .", "This answer is not opensplice specific it is generic DDS .", "There are no messages this is in the DDS concept terminology space .", "Which DDS provider does this occur with", "What implementation of DDS are you using", "There has been discussions within the OPCUA working group of making DDS one of the Communications models for OPCUA Pub-Sub .", "The new DDS Extensible Type specification introduced support for stucture inheritance in IDL .", "When it is better to use DDS", "When it is better to use DDS", "Non-XTypes DDS .. . .. . It doesn t work that way .", "Each of the DDS entities acts as a factory for other entities and each can be configured with various Quality of Service QoS policy settings .", "The OPC Foundation s DDS OPC UA Part 14 describes how to run OPC UA services over DDS .", "The OMG s DDS OPC UA spec describes how to expose an OPC UA server via DDS .", "CoreDX DDS also supports the full DDS Security standard for full coverage of identification authentication integrity and confidentiality .", "Check out the DDS specification http : www.omg.org spec DDS 1.4 for more details .", "I d be willing to wager that any DDS support for TLS will involve forfeiting many of the benefits of DDS .", "My remarks apply to RTI Connext DDS and are not necessarily true for other DDS implementations .", "I have created a simple DDS publisher application and a simple DDS subscriber application .", "If you chose DDS then the different DDS vendors provide a lot of these building blocks already .", "I compared a dds file that works versus a dds file that is corrupt and the headers are identical .", "I am parsing DDS file to read its header data .", "I will address your question later in depth but for now want to suggest that you add the tag data-distribution-service instead of dds .", "I am new to DDS domain and need to have the below understanding .", "how to publish common topics between two vendors to achieve interoperability in DDS", "However there are some specific considerations when integrating DDS into a project .", "@SergeyA : What have in DDS is some kind of union type .", "The restful DDS webservice will pick up any data found on the DDS bus and expose it via HTTP no matter what language the originating process was written in .", "A quick search for dds image java gets me : .. . .. . http : code.google.com p java-dds .. . http : www.jmonkeyengine.com doc com jme image util DDSLoader.DDSReader.html .. . http : devblog.ctdp.net 2009 12 dds-utilities-released", "This guarantees that the generated code is kept up-to-date with the data types and with upgrades of the DDS implementation .", "I download restful-dds-1.0-src.tgz file from http : code.google.com p restful-dds downloads list website .", "In your use-case its the durability QoS on the data that would allow the DDS infrastructure to maintain historical data for each uniquely identified instance of a data-object called a topic in DDS terminology .", "QoS : QoS in DDS is a field unto itself .", "In the centralized dds server only 443 port will be opened .", "Can anyone share the experience with OpenSplice DDS", "What is the maximum for RTI Connext DDS 5.0.0", "Note : I am working with RTI Connext DDS", "I am completely new to the DDS world .", "@danics CORBA and DDS are two different OMG standards .", "if i m wrong in understanding dds please correct me", "It is easier to let DDS take care of all that .", "All these links are related to reading and converting DDS image .", "I can t get the DDS extension in GIMP to work .", "I m reading about loading DDS textures .", "Is there a clear purpose of using DDS and not ZMQ", "This code is not using the standard DDS APIs .", "The same can be said about DDS .", "Is there a clear purpose of using DDS and not ZMQ", "I can see now that the error is DDS : : RETCODE TIMEOUT .", "Updating of a single sample is always atomic with DDS .", "The PRESENTATION Qos is not specific RTI Connext DDS .", "Which version of OpenSplice DDS where you using", "I am using opensplice DDS v5.5", "Now the path to your key is missing OpenSplice DDS .", "I use RTI Connext 5.0 implementation of DDS .", "DDS DXT textures are not guaranteed to be smalled than PNG .", "does it work if your textures are not in dds-format", "What is the command for converting dds to png with alpha channel", "Disclosure : I am a long-time DDS specialist enthusiast and I work for one of the DDS vendors .", "DDS vs AMQP vs ZeroMQ http : stackoverflow.com questions 3202521 dds-vs-amqp-vs-zeromq .. . 2 .", "Has anyone thus figured out a way to simulate sending DDS messages to a reader as-if they came from a DDS writer" ] }
{ "confidence": [ 60.14271545410156, 56.02775573730469, 54.195655822753906, 54.0296745300293, 53.779815673828125, 53.157806396484375, 52.34990692138672, 51.556549072265625, 50.530799865722656, 49.75834274291992, 48.54846954345703, 48.54143524169922, 46.469871520996094, 46.40769958496094, 45.90031051635742, 45.85068893432617, 45.69573974609375, 44.81459045410156, 44.812469482421875, 44.70285415649414 ], "content": [ "Question : I have 2 exiting c++ project where I have Sender and Receiver . They are connected with UDP socket connection and build through CmakeFile.txt .. . .. . Now I want to change UDP with DDS context idl .. . .. . what should be my structure Comment : It is unclear to me what you are asking . What would be my structure what structure are you referring to Comment : I already referring my project structure and also the possible way to communication through DDS . .. . Answer : Project Structure source files : .. . .. . The project structure you present seems reasonable . In general I would recommend that the structure of your source code be informed more by the architecture and logical structure of the application and not so much by the choice of communication mechanism . However there are some specific considerations when integrating DDS into a project . In particular if you are using IDL or XML to define your DDS data types for the application then it often makes sense to locate those files in a common area . The DDS IDL compiler will generate code from those type definition files and this generated code can be compiled into a library or simply compiled into each application . Also if you are using a version-control system git-svn etc then I would recommend that the IDL file s be controlled but not the generated code . There are some arguments to control the generated code too but I think that it almost always causes more harm than good . So specifically for your project I would expect to find one or more IDL or XML files under DDSCom src DDSCom include or perhaps DDSCom idl as you prefer . A CMake rule can be created to generate type specific source code from the IDL as part of the build-process . This guarantees that the generated code is kept up-to-date with the data types and with upgrades of the DDS implementation . This approach should apply regardless of the DDS implementation in use for example CoreDX DDS OpenSplice or RTI . Source Code Structure : .. . .. . Regarding the internal code-structure not the directory structure there are many ways to architect an application that uses DDS for communication . The DDS API allows for synchronous and asynchronous communication patterns . In general a data producer creates several DDS entities to facilitate the ability to write data for example a DDS : : DomainParticipant a DDS : : Publisher a DDS : : Topic and a DDS : : DataWriter . The DataWriter entity supports the write call and the other entities provide various configuration points to affect the communication behavior and structure . Similarly a data consumer creates corresponding DDS entities that enable it to read data for example a DDS : : DomainParticipant a DDS : : Subscriber a DDS : : Topic and a DDS : : DataReader . The DataReader supports many different variants of the read operation to provide access to available data . Each of the DDS entities acts as a factory for other entities and each can be configured with various Quality of Service QoS policy settings . These QoS settings give DDS a very rich set of configuration options that impact communications . The Topic entity defines a logical grouping of data identified by name and further specifies the type of the data contained within the collection . In a small project you may find it easier to create the DDS entities in-place where needed in the application for example right in the main routine . Alternatively for larger systems it is often beneficial to encapsulate the DDS entities within a component that can be reused among different applications .", "Question : I m involved in a project which uses DDS as a protocol to communicate and C++ as language . As you know exchanged messages are called Topics . Well sometimes a team must change a topic definition as a consequence of this other software which depends on this topic stops working it is necessary to update the topic everywhere and recompile . So my question is do you know how not to break backwards compatiblity I have been searching and I have found google protocol buffer they say this : .. . .. . You can add new fields to your message formats without breaking backwards-compatibility old binaries simply ignore the new field when parsing . So if you have a communications protocol that uses protocol-buffers as its data format you can extend your protocol without having to worry about breaking existing code . Any other idea Thanks in advance . .. . Answer : The OMG specification Extensible and Dynamic Topic Types for DDS http : www.omg.org spec DDS-XTypes 1.1 or DDS-XTypes for short addresses your problem . Quoted from that specification : .. . .. . The Type System supports type evolution so that it is possible to evolve the type as described above and retain interoperability between components that use different versions of the type .. . .. . Not all DDS implementations currently support XTypes so you might have to resort to a different solution . For example you could include a version numbering scheme in your Topic name to avoid typing conflicts between different components . In order to make sure every component receives the right data it needs you can create a service that has the responsibility to forward between different versions of the Topics as needed . This service has to be aware of the different versions of the Topics and should take care of filling default values and or transform between their different types . Whether or not this is a viable solution depends among other things on your system requirements . The use of a different type system like Protocol Buffers inside DDS is not recommended if it is just for the purpose of solving the type evolution problem . You would essentially be transporting your PB messages as data opaque to the DDS middleware . This means that you would also lose some of the nice tooling features like dynamic discovery and display of types because the PB messages are not understood by the DDS middleware . Also your applications would become more complex because they would be responsible for invoking the right PB de serialization methods . It is easier to let DDS take care of all that . Whichever route you take it is recommended that you manage your data model evolution tightly . If you let just anybody add or remove some attributes to their liking the situation will become difficult to maintain quickly .", "Question : I like to configure the OpenSpliceDDS as following . I have to configure the centralized OpenSpliceDDS . It will send and receive all data from global . In the centralized dds server only 443 port will be opened . How to configure the OpenSpliceDDS with port 443 secure layer Client machines have the local OpenSpliceDDS . the local OpenSpliceDDS should be responsible sending local data to the centralized OpenSpliceDDS with secure layer 443 . How to configure with client-side Thanks Comment : What version of OpenSpliceDDS are you using Comment : version OpenSpliceDDS 6.1 Comment : OK so that is the commercial version not the Community Edition . As a heads up I think that PrismTech s support will be able to give the best answer -- and you should have access to that since the commercial versions are available with support only . Is that correct .. . Answer : I d be willing to wager that any DDS support for TLS will involve forfeiting many of the benefits of DDS . The goals of TLS or DTLS and DDS seem nearly diametrically opposed . TLS is designed to create a single communications channel which allows the peers to verify that the other is who they claim to be though it s typically only in one direction . DDS is designed such that the sender and receivers are completely decoupled and there s no notion of trust anywhere . If there were what would the semantic be If you re hoping you could create a QoS which decomposed TLS into its constituent features -- assert DDS ENCRYPTION ENCRYPTED but then use DDS AUTHENTICATION NONE ...well those concepts are unfortunately inseparable . It s meaningless to have a channel which is encrypted while the decryption endpoint is untrusted . Longwinded story short : specifying the port doesn t grant you security and DDS is suboptimal for securing traffic . Use TLS directly to secure the traffic that needs it and DDS for everything else . Comment : Actually there s a standardization effort for secure DDS communications . I don t believe that using TLS will forfeit any of the benefits of DDS . Of course this is if implemented by taking into account the publish-subscribe nature and global data space of DDS . I believe the specification will address all the issues . Comment : I m sure it will address all the issues -- but without using TLS .", "Question : null .. . Answer : What is the command for converting dds to png with alpha channel If I use this command : .. . .. . then the output pngs don t use the alpha channel . If I open TheCompressonator.exe select Edit-- create alpha channel and then select file to save original to png the png file contains alpha channel but I have a lot of dds files which need to be converted . Comment : Dr . Doofensmirtz would be proud . Comment : .. . : Comment : The tag dds has been removed twice because that refers to Data Distribution Service not the dds file-format . Please do not put it back in again .", "Question : I want to know the differences between OPC Open Platform Communication and DDS Data Distribution Service . My understanding of these two frameworks is : Communication middlewares over machines for simplifying complex network-programming . Both of two them are used for communication of programs over physically separate machines by message-passing . They adopt a client-server model to communicate as TCP IP socket but they can exchange data in a multi-2-multi way . Additionally DDS is often used in critical system as airplanes and military ships . If there any misunderstandings or you know some differences of them please let me know . .. . Answer : DDS typically uses but is not limited to UDP multicast for pub sub and OPC UA can use TCP for point-to-point interactions or UDP multicast for pub sub . Yes DDS got is start for military applications while OPC UA originated in process-control and manufacturing . The OPC Foundation s DDS OPC UA Part 14 describes how to run OPC UA services over DDS . The OMG s DDS OPC UA spec describes how to expose an OPC UA server via DDS . The difference between the two is that OPC UA exposes data in an address space and DDS exposes data using topics . An address space describes the types and instances and their relationship . A topic is more document oriented but also includes QoS . One way to think about this is that DDS effectively provides a select and from clause to access data and OPC UA provide a select from and where clause . To be precise DDS also has a where clause but it does not scale to large systems . Comment : A Topic is Instance and Sample oriented depends on whether they are keyed instances . Document implies a heavyweight thing an Instance is simply an Instance and carries no implication of how much or how little data is involved . Comment : I would turn the Select From comment on its head . DDS provides a Where clause for publisher-side filtering and scale depends on vendor s implementation . RTI had a cloud based PoC that shows 10 7 individual points-of-presence and sparse access.. . but the Select From comes in application code or by using keyed instances .", "Question : I want to know the differences between OPC Open Platform Communication and DDS Data Distribution Service . My understanding of these two frameworks is : Communication middlewares over machines for simplifying complex network-programming . Both of two them are used for communication of programs over physically separate machines by message-passing . They adopt a client-server model to communicate as TCP IP socket but they can exchange data in a multi-2-multi way . Additionally DDS is often used in critical system as airplanes and military ships . If there any misunderstandings or you know some differences of them please let me know . .. . Answer : edited after Basil s comments before initial post : .. . .. . I expect you mean OPC-UA as OPC is superseded by the unified architecture implementation . Little crossed over OPC is little more than Windows COM DCOM UA is a complete rework as an SOA . The DDS interoperability specification requires UDP IP and multicast for anonymous discovery not TCP IP . TCP can be used but there is no specification yet allowing the different vendors to implement it however they want . Assume that one vendor s TCP IP transport is not going to work with another vendor s TCP IP transport also applies to shared-memory transports etc . They are not interoperable . OPC-UA uses restful communications over the HTTP-like protocols . TCP is not deterministic so you can not guarantee real-time awareness of what is happening . UDP is best effort RTPS2 the protocol that DDS uses includes methods to provide reliable traffic over UDP i.e . reliability is provided at a higher protocol level but at least your applications know that the data has has not arrived in time and can react accordingly . OPC-UA is by default client-server but can be set up as peer-to-peer if you want the overhead of the server implementation on an embedded system . DDS is anonymous peer-to-peer but setting it up as client-server is as simple as only implementing one subscriber for a given Topic . OPC-UA is aimed at industrial control SCADA . DDS is suitable for just about any machine-to-machine connection where machine is defined as some bit of hardware running some sort of code that has access to a UDP IP stack and sufficient RAM to support the data volume variety velocity variability vendor v.. . requirements of the device . Both are fully disconnected from each other and are platform independent hardware os language etc but achieve this differently . DDS promotes the data to a fully-qualified peer of the system : A publisher publishes data . A subscriber subscribes to data . It is -not- a publisher talks to a subscriber . OPC-UA uses an internal protocol opc-tpc : or https : and RESTful . Difficult to screw that up . Both OPC foundation and OMG open standards body test for interoperability between implementations . QoS : QoS in DDS is a field unto itself . You will be impressed . You will be amazed . You will be appalled and confused and cry in frustration when two peers on the same Topic using the exact same Type definition on the same sub-net still won t talk to each other . Then you will say oh . duh change one setting in the QoS file and everything will be sweetness and light again . Because OPC-UA is aimed at a specific use-case there isn t the need for any QoS other than what that specific use-case requires . DDS is much more capable much more QoS aware because it isn t limited to a single use-case .", "Question : I m involved in a project which uses DDS as a protocol to communicate and C++ as language . As you know exchanged messages are called Topics . Well sometimes a team must change a topic definition as a consequence of this other software which depends on this topic stops working it is necessary to update the topic everywhere and recompile . So my question is do you know how not to break backwards compatiblity I have been searching and I have found google protocol buffer they say this : .. . .. . You can add new fields to your message formats without breaking backwards-compatibility old binaries simply ignore the new field when parsing . So if you have a communications protocol that uses protocol-buffers as its data format you can extend your protocol without having to worry about breaking existing code . Any other idea Thanks in advance . .. . Answer : You could try wrapping the DDS layer in your own communication layer . Define a set of DDS Types and DDS Profiles that covers all your needs . Then each topic will be define as one of those types associated to one of those profiles . For example you could have a type for strings and a binary type . If you use the same compiler for all your software you can even safely memcopy a C struct to the binary type .", "Question : I need for C winform app and for android native application to use DDS Data Distribution Service . Each one can be subscriber and writer . What is important for me : .. . - High performance . - Easy to use and documentation . - Support . - Low price . What is best recommended product to use - OpenSplice or CoreDX What the differences between them Thank .. . Answer : CoreDX DDS from Twin Oaks provides support for both C and Android . Android support includes the Java and C language APIs . Some customers have also developed CoreDX DDS based Android apps using a C or C++ API but that is a bit more involved . In any case CoreDX DDS runs natively on the Android platform . Full disclosure I am connected with Twin Oaks Computing and so I will refrain from commenting on the more subjective elements of your question . I will only say that I believe CoreDX DDS is an excellent choice on all four dimensions you mention . Comment : Thank . First- I didn t see much forum and discussion about it in the web . It seems that less people develop with it than with OpenSplice . Do you know forums of CoreDX Second - What about OpenSplice- cons and pros", "Question : I am new to Data Distribution Service DDS . I would like to know if we could subscribe to group of topics in DDS using wildcard . so that i can receive data from topics with similar name together . For eg i have 2 topics IN Temperature NEP Temperature is there a way to subscribe to all topics with name having temperature .. . Answer : 2 answers here . Non-XTypes DDS .. . .. . It doesn t work that way . When a topic is created it is bound to a specific Type . When a reader is instantiated it is bound to a specific Topic . Can t change that behavior . Allowing a wildcard topic name would mean that the middleware would need to on every on data available trigger swap in the correct reader . Certainly you can implement that on top of the DDS infrastructure at application level but I don t see the point . X-Types answer .. . .. . It still doesn t work that way : .. . .. . X-Types also depends on vendor support . YMMV . But with X-Types Extensible Types for DDS you can build a system whereby Type inheritance changes the one Type for one Topic requirement . Consider the following IDL note this is RTI flavor not PrismTech although if you are using an X-Types aware ddsgen compiler this shouldn t matter : .. . .. . Now you can create a Topic Temperature Readings and one subscriber can use an NEP T Type reader and another can use an IN T Type reader . Internally the middleware will send all Temperature Readings to both readers regardless it was an IN T Type writer or NEP T Type writer . When the NEP T reader receives the IN T data the nepProvider field will be zero . When the IN T reader receives the NEP T data the manuID and serialNo fields will be null and zero . But the remaining fields will be populated . You can extend this behavior to subscribing with an ATemperatureReading and any T Type temperature writer sample will be passed with just the float value and any additional data will be discarded by the middleware on receipt that is on the subscriber side -- pay attention to bandwidth usage . It is also possible to use mutable types but don t do that if it is greenfield development . I look upon mutable types with abject horror -- I know why they are there and I know that I will need to use them at some point but if you say to me hey let s build this new thing using mutable types without irony I shall judge you harshly . I have only included this paragraph for the reason of providing a complete answer .", "Question : I wonder if I can put big amount of data in my software or if I m obliged to use an external solution . How much data can I put using the persistence of OpenSplice DDS or RTI s DDS .. . Answer : This depends on your definition of putting persistent data . In OpenSplice-DDS there are multiple ways to save non-volatile data by persisting it on some non-volatile media . The first way is to publish data as PERSISTENT durability-QoS in combination with having one or more durability-services which are standard available in the OpenSplice core LGPL-v3 i.e . not an optional commercial feature . When starting up the system the durability-services typically of the first node that starts will inject the persisted data into the global data-space and with that its available to each application which can block for this information to be injected via the wait for historical data API . A typical limitation of the size of persistent data is the size of available memory to hold it once published or put in DDS terminology : the resource-limits as specified for the durability-service expressed in max samples max samples per instance and max instances for each persistent topic . Note that you could PERSISTENT data as a subset of TRANSIENT data and if you d have multiple durability-services configured these will align each other on startup and or adding a new node that also has a durability-service configured resulting in this PERSISTENT data to be instantly available when applications start and or join an already running system . The second way is to utilize an add-on that transparently replicates 2-way data between DDS and a DBMS ODBC 3.0 compliant system . OpenSplice DDS has a pluggable service for this called DBMSConnect which can be configured to forward data in both directions either event-based or state-based down-sampled as well as potentially filter on contents . The third way for OpenSplice is to use a generic gateway product called OpenSplice Gateway that makes use of Apache Camel and thus all of the connectors available for that infrastructure . Here you can define routes and endpoints that allow your DDS-data to be routed to from over 80 non-DDS technologies including relational-database systems that would then allow to persist your DDS-information . Hope this helps somewhat .. . .. . -Hans Comment : That was .. . a good answer . Even if I have some difficulties to fully understand its consequences . Thanks", "Question : I am trying to design an event based messaging system which works as follows : .. . .. . Let us say that there are multiple products in a store and their prices vary every day . Clients can login to the application and request to know via SMS the price of a particular product on a particular date say 1 month from the date of login . How to introduce the concept of events as described above when using zeromq Is OpenDDS better suited for such a scenario .. . Answer : Reading your use-case its maybe less about events than about having distributed access to the state in this case the potentially historical price of a modeled object in this case your products . DDS as an open-standard technology directly supports this by offering distributed access to shared data using a smart combination of pub sub messaging in combination with relational data-modeling . It also standardizes and supports a vast set of Quality of Service QoS policies that can be related to both producers consumers of data as well as the data itself . In your use-case its the durability QoS on the data that would allow the DDS infrastructure to maintain historical data for each uniquely identified instance of a data-object called a topic in DDS terminology . What is important in a DDS approach is to determine a proper data-model for a specific usecase and in your case it looks like it can be pretty straightforward i.e . a product having a unique product-code an ID that will be a key-attribute in DDS like in a RDBMS likely a description and then a price . Each time the price changes a new instance of that data-type will be published and as its QoS policy would be defined as PERSISTENT it would then be maintained by the middleware typically by one or more durability-services that are part of the DDS implementation .. . .. . Applications in DDS take a subscription to these topics and will be provided automatically with the historical data of the product topics . Some DDS implementations allow to specify a refinement for the delivery of historical data based on a combination of content time and or volume amount . In your use-case it would be a selection of the right product by ID or name and time . Finally assuming your system is web-enabled i.e . should work on an internet-scale perhaps supporting cloud-based permanent storage of your data for distributed access on PC s mobile-devices etc . then I d suggest to take a look at Vortex www.prismtech.com vortex . Note that there s also an opensource version of the Vortex OpenSplice product available www.prismtech.com dds-community . Good luck Comment : Sorry I forgot to mention one important detail . The application will not have access to a database . It will have to retrieve information from a web page . So let us say that the user wants to know the price of a product on the 1st of Jan then the application will have to access the website on that particular day itself . Also another detail is that the price of the product can be changed any time during the day .", "Question : I am new to DDS and IDL and i hope that somebody can provide some advice on how to model the following in IDL . This is based on a model from a OO perspective and it is just intended as a quick example : enter image description here http : i.stack.imgur.com qcqJd.png .. . .. . And this is my initial datamodel in IDL - is done correctly How do I model inheritance and dependencies in IDL a lot of the examples online are very simple - too simple the ones I have found.. . This is just a made up example of inheritance and properly not the best o .. . .. . Is this correct or is there a better way of modelling the same - can anyone provide a link-to a good HOWTO for working with IDL for DDS Note : I am working with RTI Connext DDS Comment : Good question -- I will answer if I understand a bit better the exact intention of the inheritance tree . In your model the purpose of the derived classes Toyota and Mazda is not clear . Why not move the model attribute into the Car class If you do so then Toyota and Mazda are no longer needed from a data-distribution perspective . Or did you not show the complete data-model and are there other attributes or classes Comment : The code above is just an made up example of inheritance and properly not the best - I have edited it a bit and hopefully it makes more sense now . Overall I am just trying to get a better understanding of IDL and how to take a OO model and translate that into IDL . I don t have a actual model right now - just trying to get a better understanding of DDS and IDL . .. . Answer : The new DDS Extensible Type specification introduced support for stucture inheritance in IDL . If you are working with RTI Connext DDS version 5.0.0 or later you can already take advantage of this feature . The syntax would be : .. . .. . And so forth.. . .. . .. . Gerardo", "Question : I need for C winform app and for android native application to use DDS Data Distribution Service . Each one can be subscriber and writer . What is important for me : .. . - High performance . - Easy to use and documentation . - Support . - Low price . What is best recommended product to use - OpenSplice or CoreDX What the differences between them Thank .. . Answer : Unfortunately I can t tell you much about CoreDX but I worked for quite a while with Vortex OpenSlice and RTI s Connext DDS . Here are my experiences : .. . .. . Some Differences .. . .. . OpenSlice implements a kind of federated model . Your application runs in a separate process the DCPS communication and configuration is handled in another daemon process . This allows a clear separation but also involves the danger of becoming a bottleneck at very high data rates or even a single-point-of-failure if case the process handling DCPS crashes . OpenSlice also supports a single-process architecture but that s not the default and it s also less optimized . Furthermore OpenSlice supports two protocols : its RTNetworking is the default and the RTPS standard is only used for interoperability with DDS implementations of other vendors . The architecture of RTI Connext DDS is completely self-contained and does not need a daemon process . This has the benefit that the single point of failure is eliminated and latency is reduced . But data batching optimization between multiple DDS applications on the same host is more difficult which results in reduction of scalability especially for smaller data sizes . CoreDX is a implementation specifically intended for the embedded domain and applies also the single-process architecture . It focused on a low memory-footprint and latency and can run even without a operating-system without major restrictions . High Performance .. . .. . I don t know your performance requirements but I think the unbiased analysis in Data Distribution Service DDS : A performance comparison of OpenSplice and RTI implementations http : ieeexplore.ieee.org xpl login.jsp tp arnumber 6754976 url http 3A 2F 2Fieeexplore.ieee.org 2Fxpls 2Fabs all.jsp 3Farnumber 3D6754976 will provide you the best indication . It was conducted with Connext 5.0.0 and OpenSlice V5.5.1 Community so it can still be regarded as relevant . This paper analysed the rate of samples per second throughput in Mbps round-trip-time memory and CPU usage . The general conclusion is that for data sizes ranging from 0 to 1kB OpenSlice outperforms Connext but for data sizes greater than 1kB Connext outperforms OpenSlice . I m sorry I can t tell you the exact numbers since this paper is fee-based I suggest therefore you take a look at it on your own and decide which suits your needs best based on the size of your data . Unfortunately I can t tell you anything about CoreDX s performance since I haven t found any independently verified indications . Easy to use and documentation .. . .. . In both cases you will find a clean and consistent API throughout all language bindings . There are many ready-to-execute examples and code-snippets free for download . The official user manuals are comprehensive and cover everything you need to start . I personally found the RTI manual much better because it is full of examples you can directly apply in your application . From my experience start really with the manuals and not with the accompanying code otherwise you will find yourself locked down in details you don t have a clue about . The communities of both RTI Connext and Vortex OpenSlice are large but one may find RTI s community responding faster and being more comprehensive . Whenever you post a questions in the forums FAEs will provide you in most cases an appropriate answer within hours . If you need specific and professional support there is unfortunately no way but to purchase support licences . By contrast the documentation of CoreDX is only the most need information on a few pages along with only very few examples - that s not what you want for an easy starting . Low price .. . .. . There is a community edition of Vortex OpenSlice but it only supports 32 64 bit x86 Linux and 32 64 bit x86 Windows which means for DDS applications on android you will need a commercial version of either Connext OpenSlice or CoreDX . The exact pricing always depends on your needs . I know the example of RTI because I contacted them . You can select only the software packages you really need and therefore you ll pay significantly less than the stated 8000 or so . You also have the possibility to apply for research and evaluation licences which don t cost you a single buck . Security .. . .. . RTI Connext DDS Secure is the only answer if you have extensive requirements on security and data encryption using DDS . Why Simply because it is currently the only producty fully implementing OMG s DDS Secure standard . Just in case you need it : it provides you valuable functionalities for encrypting your data and controlling the actions like reading writing to topics or joining domains applications may take in the global data space . On last thing about CoreDX CoreDX has been around since only a few years while OpenSlice and Connext are mature and sophisticated products which have proven their capabilities in many hundreds of projects . I would bet my money rather on a proven professional than on a maybe rising newbie . You may also want to take a look at other open-source DDS implementations like OpenDDS http : www.opendds.org but I personally don t think they will fit your needs . Comment : The documentation available for CoreDX DDS on the twinoakscomputing.com web site consists of Programmer s Guide Reference Manuals and Quick-Start Guides . It is significantly more than a few pages . Several examples are provided on-line and more are included in the freely available evaluation package . CoreDX DDS is also available with free IR D licensing . CoreDX DDS also supports the full DDS Security standard for full coverage of identification authentication integrity and confidentiality . CoreDX DDS has been commercially available since 2008 . Comment : I went through the documentation before writing my post . What I wanted to say is the documentations of OpenSlice and Connext are simply much more detailed than that of CoreDX . You said there are several examples I m sorry but I simply can t agree with that . There are 3 online http : www.twinoakscomputing.com coredx examples and a very few that come with the evaluation package . This list https : community.rti.com examples is something that one may call several examples . Maybe I missed it but I haven t seen the claim for supporting DDS Secure anywhere in CoreDX facts or on its web site . Comment : Thanks for the detailed answer .", "Question : I ve been trying to read up on the DDS standard and OpenSplice in particular and I m left wondering about the architecture . Does DDS require that a broker be running or any particular daemon to manage message exchange and coordination between different parties If I just launch a single process publishing data for a topic and launch another process subscribing for the same topic is this sufficient Is there any reason one might need another process running In the alternative does it use UDP multicasting to have some sort of automated discovery between publishers and subscribers In general I m trying to contrast this to traditional queue architectures such as MQ Series or EMS . I d really appreciate it if anybody could help shed some light on this . Thanks .. . .. . Faheem .. . Answer : DDS doesn t have a central broker it uses a multicast based discovery protocol . OpenSplice has a model with a service for each node but that is an implementation detail if you check for example RTI DDS they don t have that . Comment : Could you please tell me what is a central broker Comment : With a central broker I mean that there is one central process that administrates everything in the system if that process crashes than nobody can find each other . With DDS this is not the case it is fully distributed .", "Question : I wanted a feedback on whether my evaluations and concerns are correct . .. . .. . I have been reseaching the three Data Distribution Service AMQP and ZeroMQ for sometime now for building a data transport layer in a datacenter . All the three look promising yet i encountered some blocking issues in few . To give a context my requirements are : .. . .. . 1 . Scale upto 500+ physical nodes 1000+ publishers and subscribers . 2 . Support durable delivery of messages to take care of failing subscribers . 3 . The aggregated throughput should be north of 1 Million messages sec .. . .. . Problems with AMQP : .. . .. . 1 . The Broker architecture seems to be a bottleneck and central point of failure in the whole deployment setup . I can complicate my deployment by putting a federation and cluster to improve performance and availability of pending messages but they still do not seem to be failproof . 2 . The performance for durable queues seems to be very less . My sample application could only clock 6-7K messages core queue application . Problems with ZeroMQ : .. . .. . 1 . The Documentation seems to be a little wanting in depth . 2 . The behavior of the system for pending messages seems to invite trouble in PUB SUB model of communication . Please refer to : How zeromq handles slow consumers with PUB SUB mode http : www.mail-archive.com zeromq-dev@lists.zeromq.org msg00963.html .. . .. . OpenSplice DDS : I didnt find anything lacking in the DDS protocol except for adoption in the industry . Will like to know a first hand review on this product in terms of stability performance or limitations . Comment : I will address your question later in depth but for now want to suggest that you add the tag data-distribution-service instead of dds . The latter seems to have been hijacked by graphics programming . Comment : Thanks Holger have updated the tags . Comment : Just to make the linked ZeroMQ discussion more subtle : For PUB SUB there is indeed a pre-settable per-subscriber limit on message-queue size over which messages are dropped . But there is also the ZMQ SWAP option with which you can enable disk swapping of messages . Quoting 1 However there is a way out . MQ provides something called a swap which is a disk file that holds messages we can t store to the queue 1 zguide.zeromq.org chapter : all http : zguide.zeromq.org chapter : all Comment : @Kisalay Regarding the slow consumer handling in ZeroMQ : Recent versions allow you to configure ZMQ HWM : high water mark and ZMQ SWAP : disk offload size . Check api.zeromq.org master : zmq-getsockopt http : api.zeromq.org master : zmq-getsockopt for details . .. . Answer : I am surprised about your concerns on OpenSplice DDS adoption . OpenSplice DDS is today deployed on over several mission and business critical systems such as Naval Combat Management Systems Military Vehicles Air Traffic Control and Management Metro to High Frequency Auto-Trading . Just to give you another bit of info that should give you reassure you w.r.t . the adoption of the technology the OMG DDS standard the standard implemented by OpenSplice DDS has been recommended by EUROCAE to exchange flight data plans across centers pan-european . Let me know if you have any further questions either on the adoption or the technology . -AC Comment : Yea and i have been looking at the code of OpenSplice and it s horrible . Also the API is a big mess and it is way to complicated to setup . OpenSplice was written by people that dont understand anything about software-design principles . And it might be adopted by lots of companies because it works but it is sure not the way to go if you want to evolve into the future .", "Question : I read the followings : .. . .. . 1 . DDS vs AMQP vs ZeroMQ http : stackoverflow.com questions 3202521 dds-vs-amqp-vs-zeromq .. . 2 . http : mnb.ociweb.com mnb MiddlewareNewsBrief-201004.html .. . .. . And it seems that there is no benfit using DDS instead of zmq : .. . .. . 1 . the latency of zmq is better . 2 . It seem to me that the API of ZMQ is cleared and simple . 3 . I cant use ZMQ in order to transfer data between threads processes stations . So : .. . .. . 1 . When it is better to use DDS 2 . Are there any better performance of DDS over ZMQ 3 . Is there a clear purpose of using DDS and not ZMQ Thanks Comment : guess your item 3 shall read affirmative as I can use ZMQ .. . to transfer data between threads processes stations With full respect if you still insist on the published negative then it is definitely not due to the ZeroMQ PF2015 .. . Answer : In my admittedly biased experience as a DDS implementor vendor many applications find significant benefits of using DDS over middleware technologies including ZeroMQ . In fact I see many more critical applications using DDS than ZeroMQ.. . .. . .. . First a couple of clarifications : .. . .. . 1 DDS and the RTPS protocol it uses underneath are standards not specific products . There are many implementations of these standards . To my knowledge there are at least 9 different companies that have independent products and codebases that implement these standards . It does not make sense to talk about the performance of DDS vs ZeroMQ you can only talk about the performance of a specific implementation . I will address the issue of performance later but from that point of view alone your statement the latency of zmq is better is plainly wrong . The opposite statement would be just as wrong of course . 2 I did not find much objective information in first reference you provided . The main point there was that DDS seemed the best fit for that application and there was a concern about how broadly it was used which the reply from AC clarified . But the arguments seemed a bit subjective . There was a negative reply to AC s posting based on somebody s subjective examination of the codebase of a specific product . Even assuming the person that posted the negative comments had a valid point the comments would apply only to one specific DDS implementation product not to DDS in general . Personally I would not give much credence to that comment its tone seems too hostile to be based on just the stated facts . 3 Regarding the clarity simplicity of API s . Are your comments based on benchmark example you provide in the second reference This code is not using the standard DDS APIs . I am not sure why OCI the company that wrote that article did it like that--perhaps they adapted some other prior code . A good place to look at API examples that are conformant with the DDS specification are these : .. . .. . Modern C++ : http : blogs.rti.com 2014 08 01 create-a-p2p-distributed-application-in-under-35-lines-of-c11-code .. . Classic C++ : http : www.twinoakscomputing.com coredx examples hello cpp .. . .. . In any case as I mention later the layer of abstraction provided by DDS and ZeroMQ is quite different so the APIs are not directly comparable.. . .. . .. . In answer to you specific questions . .. . .. . 1 . When it is better to use DDS .. . .. . It is difficult to provide a short objective answer to a question as broad as this . I am sure ZeroMQ is a good product and many people are happy . The same can be said about DDS . I think the best thing to do is point at some of the differences and let people decide what is important to them . DDS and ZeroMQ are different in terms of the governance ecosystem capabilities and even layer of abstraction . Some important differences : .. . .. . 1.1 Governance Standards Ecosystem .. . .. . DDS and RTPS are open international standards from the Object Management Group OMG . ZeroMQ is a loose structure controlled by its contributors .. . .. . This means there is open governance and clear OMG processes that control the specification and its evolution as well as the IPR rules . ZeroMQ IPR is less clear IMO . From their web page http : zeromq.org docs : features they state ZeroMQ s libzmq core is owned by its contributors and The ZeroMQ organization is a loose confederation without a clear power structure that mostly lives on GitHub . The organization wiki page explains how anyone can join the Owners team simply by bringing in some interesting work . This loose structure may be more problematic to users that care about things like IPR pedigree Warranty and indemnification etc . Related to that . if I understood correctly there is only one core ZeroMQ implementation the one in github and only company that stands behind it iMatix . From there it seems just 4 committers are doing most of the development work in the core libzmq . If iMatix was to be acquired or decided to change its business model or the main committers lost interest the users would few recourse beyond supporting the codebase themselves . Of course there are many successful projects technologies based on common ownership of the code . On the other hand having an ecosystem of companies competing with independent products codebases and business models provides good assurance to the future of the technology.. . It all depends how big the communities and ecosystems are and how risk-averse the user is . 1.2 Features Layer of Abstraction .. . .. . Both DDS and ZeroMQ support patterns like publish-subscribe and Request-Reply this is a new addition to DDS the so-called DDS-RPC . But generally speaking the layer of abstraction of DDS is higher . meaning the middleware does more automatically for the application . Specifically . DDS provides for automatic discovery .. . .. . In DDS you just publish-subscribe to topic names . You never have to provide IP addresses computer names or ports . It is all handled by the builtin discovery . And it does it automatically without additional services . This means that applications can be re-deployed and integrated without recompilation or reconfiguration . ZeroMQ is lower level . You must specify ports IP addresses etc . DDS pub-sub is data-centric . .. . .. . An application can publish to a Topic but the associated data can represent updated to multiple data-objects each identified by key-attributes . For example when publishing airplane positions each update can identify the airplane ID and the middleware can provide history enforce QoS update rates etc . for each airplane separately . The middleware understands and communicates when new airplanes appear or disappear from the system . Related to the above DDS can keep a cache of relevant data for the application which it can query by key or content as it sees fit e.g . read the last 5 positions of an airplane . The application is notified of changes but it is not forced to consume them immediately . This also can help reduce the amount of code the application-developer needs to write . DDS provides more support for application QoS .. . .. . DDS supports over 22 message and data-delivery QoS policies such as Reliability Endpoint Liveliness Message Persistence and delivery to late-joiners Message expiration Failover monitoring of periodic updates time-based filtering ordering etc . This are all configured via simple QoS-policy settings . The application uses the same read-write API and all the extra work is done underneath . ZeroMQ approaches this problem by providing building blocks and patters . It is quite flexible but the application has to program assemble and orchestrate the different patterns to get the higher-level behavior . For example to get reliable pub-sub requires combining multiple patterns as described in http : zguide.zeromq.org page : all toc119 . DDS supports additional capabilities like content-filtering time-filtering partitions domains .. . .. . .. . These are not available in ZeroMQ . They would have to be built at the application layer . DDS provides a type system and supports type extensibility and mutability .. . .. . You have to combine ZeroMQ with other packages like google protocol-buffers to get similar functionality . Security .. . .. . There is a DDS-Security specification that provides fine-grained Topic-level security including authentication encryption signing key distribution secure multicast etc . 2 . Are there any better performance of DDS over ZMQ .. . .. . Note that the benchmarks you refer to are for Object Computing Inc s OpenDDS implementation . As far as I know this is not known to be one of the fastest DDS implementations . I would recommend you take a look at some of the other ones like RTI Connext DDS our implementation PrimsTech s OpenSplice DDS or TwinOaks CoreDX DDS . Of course results are highly dependable on the actual test network and computers used but typical latency performances for the faster DDS implementations using C++ are on the order of 50 microseconds not 180 microseconds . See https : www.rti.com products dds benchmarks.html CPPLATENCY .. . .. . Middleware layers like DDS or ZeroMQ run on top of a things like UDP or TCP so I would expect they are bound by what the underlying network can do and for simple cases they are likely not too different and they will of course be worse than the raw transport . Differences also come from what services they provide . So you should compare what you can get for the same level of service for example publishing reliably to scaling to many consumers prioritizing information sending multiple flows and large-data over UDP to avoid TCP s head-of-line blocking etc . Based on the OpenDDS study you reference and the relative performance of different DDS implementations http : www.dre.vanderbilt.edu DDS I would expect that in an apples-to-apples test the better-performing implementations of DDS would match or exceed ZeroMQ s . That said people rarely select the middleware that gives them the best performance . Otherwise no-one would use Web Services or HTTP . The selection is based on many factors performance just needs to be as good as required to meet the needs of the application . Robustness Scalability Support Risk maintainability fitness of the programming model to the domain total cost of ownership etc . are typically more important to the decision . 3 . Is there a clear purpose of using DDS and not ZMQ .. . .. . Well yes.. . in many applications it provides the best tradeoff in terms of performance scalability features application simplicity robustness risk-reduction and total cost of ownership . In the last few years thousands of projects came to that conclusion : .. . .. . Gerardo Comment : A nice piece of work Gerardo . Thanks both for sharing and for making a masterpiece of argumentation popularisation in an area where a few SLOC-s create an illusion of how to approach anything . THANKS", "Question : I am trying to design an event based messaging system which works as follows : .. . .. . Let us say that there are multiple products in a store and their prices vary every day . Clients can login to the application and request to know via SMS the price of a particular product on a particular date say 1 month from the date of login . How to introduce the concept of events as described above when using zeromq Is OpenDDS better suited for such a scenario .. . Answer : It seems the solution would need to combine three or four different technologies . 1 Some storage technology like a data-base to keep long-term information and support custom queries . Basically to hold data at rest . A classic RDBMS may be a good fit . 2 A messaging technology to update the state get notification of state changes signal and coordinate integrate between different applications and processes . Messaging middleware technologies such as DDS RTPS ZeroMQ JMS AMQP would seem the best for this . 3 Web client and server technologies . Something like Java Script for the client-side and Node.js or some other HTTP REST back end . 4 A protocol mediation and integration technology . Something that allows different protocols and technologies to be integrated . E.g . detect a change to a database remotely by getting a message Integrate between the HTTP REST service the messaging technologies and the database integrate between SMS and the back-end etc . The kinds of things Apache Camel and Enterprise Service busses provide . I and most familiar with building systems that are centered around DDS as a messaging platform . If you chose DDS then the different DDS vendors provide a lot of these building blocks already . For example searching on the web I found integrations with Apache Camel Integration and Node.js . Hans already mentioned Vortex from PrismTech . RTI has ready made integrations with relational databases https : www.rti.com products dds database-integration.html so any changes made on a data-base are reflected on the message bus and vice-versa as well as integration with Web HTTP REST http : www.slideshare.net GerardoPardo london-connext-dds-conference-web-enabled-dds and several other of the already mentioned Web Technologies . Another approach you could take is to develop your approach centered around some an ESB and use the adaptors it provides to the different technologies . This is probably one of the simplest approaches but it has the disadvantage that everything will be brokered by the ESB this may or many not matter to your application . You may want to look at this article I wrote where I describe some of these tradeoffs : http : soa.sys-con.com node 467488 .. . .. . Gerardo", "Question : I want to use OpenSplice DDS for Messaging and Database Transaction Processing functionalities . Can you please help to know if OpenSplice DDS open-source implementation supports - Database Transaction Processing or not Can anyone share the experience with OpenSplice DDS Comment : What do you mean by Database Transaction Processing in the context of DDS OpenSplice is not a database technology are you maybe looking to integrate it with an RDBMS Also to share the experience with OpenSplice DDS is a pretty open-ended task . Could you be more specific in your question please Maybe add some information about your use-case and how you are thinking of using DDS . Comment : I need to integrate OpenSplice with RDBMS . Does OpenSlice provide Interfaces APIs to work with RDBMS . Comment : I need to integrate OpenSplice with RDBMS . Does OpenSlice provide Interfaces APIs to work with RDBMS . .. . Answer : OpenSplice DDS Community Edition the open-source version does not feature any out-of-the-box integration with a DBMS . Its commercial version does provide an optional service called DBMSConnect that might do what you are looking for . You did not describe in detail what you are trying to achieve so it is hard to assess . As far as I know there is no on-line documentation available on DBMSConnect for you to check out whether it would do what you are looking for . However the DDS implementation from RTI has a similar feature also commercially available only called Real-Time Connect . Full documentation for that is available on-line via the Real-Time Connect User s Manual http : community.rti.com rti-doc 500 RTI Real-Time Connect 5.0.0 docs RTI RTC UsersManual.pdf . There are more links on Real-Time Connect on their Community Portal Documentation http : community.rti.com content page documentation page . That might help you in assessing whether it meets your needs .", "Question : I need for C winform app and for android native application to use DDS Data Distribution Service . Each one can be subscriber and writer . What is important for me : .. . - High performance . - Easy to use and documentation . - Support . - Low price . What is best recommended product to use - OpenSplice or CoreDX What the differences between them Thank .. . Answer : I would recommend to look at RTI Connext DDS http : www.rti.com we and our customers are using that for various projects including our AXCIOMA http : www.axcioma.com component framework . It has wide support for a lot of programming-languages and platforms and excellent support . Have a look at the RTI website and contact them to give their product a try . Comment : I prefer not use RTI because it s very expensive . I look for cheaper product . Comment : RTI pricing depends on what you need and also which kind of warranties you need for your project . There are various options including Open Community Source Academic and IR D types of agreements . I can really recommend you to contact RTI and discuss with them your exact needs .", "Question : I wanted a feedback on whether my evaluations and concerns are correct . .. . .. . I have been reseaching the three Data Distribution Service AMQP and ZeroMQ for sometime now for building a data transport layer in a datacenter . All the three look promising yet i encountered some blocking issues in few . To give a context my requirements are : .. . .. . 1 . Scale upto 500+ physical nodes 1000+ publishers and subscribers . 2 . Support durable delivery of messages to take care of failing subscribers . 3 . The aggregated throughput should be north of 1 Million messages sec .. . .. . Problems with AMQP : .. . .. . 1 . The Broker architecture seems to be a bottleneck and central point of failure in the whole deployment setup . I can complicate my deployment by putting a federation and cluster to improve performance and availability of pending messages but they still do not seem to be failproof . 2 . The performance for durable queues seems to be very less . My sample application could only clock 6-7K messages core queue application . Problems with ZeroMQ : .. . .. . 1 . The Documentation seems to be a little wanting in depth . 2 . The behavior of the system for pending messages seems to invite trouble in PUB SUB model of communication . Please refer to : How zeromq handles slow consumers with PUB SUB mode http : www.mail-archive.com zeromq-dev@lists.zeromq.org msg00963.html .. . .. . OpenSplice DDS : I didnt find anything lacking in the DDS protocol except for adoption in the industry . Will like to know a first hand review on this product in terms of stability performance or limitations . Comment : I will address your question later in depth but for now want to suggest that you add the tag data-distribution-service instead of dds . The latter seems to have been hijacked by graphics programming . Comment : Thanks Holger have updated the tags . Comment : Just to make the linked ZeroMQ discussion more subtle : For PUB SUB there is indeed a pre-settable per-subscriber limit on message-queue size over which messages are dropped . But there is also the ZMQ SWAP option with which you can enable disk swapping of messages . Quoting 1 However there is a way out . MQ provides something called a swap which is a disk file that holds messages we can t store to the queue 1 zguide.zeromq.org chapter : all http : zguide.zeromq.org chapter : all Comment : @Kisalay Regarding the slow consumer handling in ZeroMQ : Recent versions allow you to configure ZMQ HWM : high water mark and ZMQ SWAP : disk offload size . Check api.zeromq.org master : zmq-getsockopt http : api.zeromq.org master : zmq-getsockopt for details . .. . Answer : Take a look at this http : www.rti.com industries index.html page . Lot of industries and companies are using DDS today ." ] }
[ "yes-answer-long", "yes-answer-short" ]
middleware
UNK_RELATION
project-avatar@client-side@145
project-avatar -- project-avatar provides a javascript services layer zeroed in on supporting rest websockets and server-sent events and a rich @placeholder framework that assumes very minor javascript knowledge .
{ "confidence": [ 52.34638595581055, 50.20730209350586, 50.20730209350586, 48.933631896972656, 47.274314880371094, 45.651397705078125, 44.212886810302734, 42.72260284423828, 39.82801055908203, 38.20146179199219, 38.20146179199219, 38.20146179199219, 38.20146179199219, 38.033905029296875, 36.92383575439453, 34.40479278564453, 34.222564697265625, 34.222564697265625, 32.79369354248047, 32.79369354248047, 30.58397102355957, 30.58397102355957, 25.618175506591797, 22.514545440673828, 19.186283111572266, 18.85409927368164, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922, 13.293987274169922 ], "content": [ "grunt with Project Avatar", "Project Avatar seems to build on Avatar.js .", "Indeed there is Avatar.js included in Project Avatar .", "Therefore it is not that Project Avatar is built on Avatar.js but rather that Avatar.js is one component of Project Avatar .", "Project Avatar https : avatar.java.net does indeed layer on top of Avatar.js https : avatar-js.java.net the code is integrated into our build using Maven .", "Avatar.js https : avatar-js.java.net index.html and Project Avatar https : avatar.java.net index.html .. . .. . What is the relation of these projects", "This services layer provides a runtime tuned for easily creating REST WebSocket and Server-Sent Event endpoints .", "It would appear that Project Avatar currently includes a build of Avatar.js as avatar-js.jar as found in the current latest commit https : java.net projects avatar sources git show lib rev c41432b048554c579c24e879451309a6825f3641 though it is 4 months old .", "Project Avatar appears to be Oracle s answer to the NodeJS API offering an alternative platform which also provides compatibility with the NodeJS API and ecosystem via Avatar.js .", "So I think the answer is that yes the current build of Project Avatar will allow you to run Node-compatible modules .", "Therefore my question : If I get the distribution of Project Avatar do I get Avatar.js for free .", "By looking at the Maven POM files of Project Avatar I discovered that there is a binary distribution of Avatar.js available through the java.net Maven repository .", "@StijndeWitt Project Avatar has been stopped : blogs.oracle.com theaquarium entry project-avatar update https : blogs.oracle.com theaquarium entry project-avatar update", "Rename the native library to avatar-js.dylib and rename the jar to avatar-js.jar and put both in a directory called dist .", "Download avatar-js.jar from the java.net Maven Repo .", "For now we are focussing on fleshing out the server-side JavaScript framework .", "Download the native library avatar-js.dylib from the java.net Maven Repo .", "Run the command : java -Djava.library.path dist -jar dist avatar-js.jar app.js", "Avatar.js is the open-source version of what was informally called node.jar See this post https : java.net projects avatar-js lists users archive 2013-10 message 1 from the avatar-js mailing list .", "Current version is here : https : maven.java.net content repositories public com oracle avatar-js 0.10.25-SNAPSHOT Example file : avatar-js-0.10.25-20140313.063039-43.jar .. . 2 .", "again from this post https : java.net projects avatar-js lists users archive 2013-10 message 1 .", "The Avatar.js homepage https : avatar-js.java.net currently has a list of modules known to run including grunt .", "Nashorn is the JavaScript engine used to run both .", "Als it seems this project did not receive any updates for a long time.. .", "However the scope seems to be to provide an alternative Web-Framework for Java EE 7 .", "Avatar.js has very little documentation .", "In the context of Java 8 and Nashorn I see two projects being regularly mentioned .", "As far as I gathered it offers the possibility to execute node applications on the JVM .", "Is it also possible to execute node programs like i.e .", "In other words it is a NodeJS-compatible API running on Nashorn .", "As you ve pointed out both of these initiatives lack documentation and are in their infancy .", "Time and community engagement will show where they fit best .", "Thanks for these clarifications .", "Currently Avatar.js does not even have a binary distribution and the build-process looks quite intricate involving Python and C++ .", "Specifically : do I get a way to run plain node programs like grunt on the JVM", "@jbandi I ve updated the answer to better answer your second question which I had misread .", "Based on this discovery I wrote a blog post how to run simple Node.js apps with Avatar.js here : Running Node.js applications on the JVM with Nashorn and Java 8 http : blog.jonasbandi.net 2014 03 running-nodejs-applications-on-jvm-with.html .. . .. . Steps for OSX repeated here : .. . .. . 1 .", "Current version is here : https : maven.java.net content repositories public com oracle libavatar-js-macosx-x64 0.10.25-SNAPSHOT .. . Example file : libavatar-js-macosx-x64-0.10.25-20140312.062209-35.dylib .. . For Linux you would download the corresponding .so file from . . libavatar-js-linux-x64 0.10.25-SNAPSHOT .. . For Windows you would download the corresponding .dll file from . . libavatar-js-win-x64 0.10.25-SNAPSHOT .. . 3 .", "4 .", "Create a simple Node.js app in the a file called app.js .", "5 .", "Thanks .", "On Linux rename the .so to dist libavatar-js.so", "I don t get why they need native libraries to support this.. . Too bad kinda disqualifies it for me .", "@jbandi I suspected as much but your link clearly confirms it .", "Thanks for posting it", "The jar you found Johann was old because we no longer use it -- I just nuked it thanks .", "And yes we re aware that our docs need more work .", "So it seems that there IS actually a binary distribution of Avatar.js available from the java.net Maven repository.. . For instance for Windows you could find the a recent release in maven.java.net content repositories public com oracle https : maven.java.net content repositories public com oracle libavatar-js-win-x64 0.10.25-SNAPSHOT" ] }
{ "confidence": [ 78.39955139160156, 62.126869201660156, 54.14691925048828 ], "content": [ "Question : In the context of Java 8 and Nashorn I see two projects being regularly mentioned . Avatar.js https : avatar-js.java.net index.html and Project Avatar https : avatar.java.net index.html .. . .. . What is the relation of these projects Avatar.js has very little documentation . As far as I gathered it offers the possibility to execute node applications on the JVM . Project Avatar seems to build on Avatar.js . However the scope seems to be to provide an alternative Web-Framework for Java EE 7 . Is it also possible to execute node programs like i.e . grunt with Project Avatar .. . Answer : Project Avatar https : avatar.java.net does indeed layer on top of Avatar.js https : avatar-js.java.net the code is integrated into our build using Maven . The jar you found Johann was old because we no longer use it -- I just nuked it thanks . And yes we re aware that our docs need more work . For now we are focussing on fleshing out the server-side JavaScript framework . This services layer provides a runtime tuned for easily creating REST WebSocket and Server-Sent Event endpoints . Comment : So it seems that there IS actually a binary distribution of Avatar.js available from the java.net Maven repository.. . For instance for Windows you could find the a recent release in maven.java.net content repositories public com oracle https : maven.java.net content repositories public com oracle libavatar-js-win-x64 0.10.25-SNAPSHOT", "Question : In the context of Java 8 and Nashorn I see two projects being regularly mentioned . Avatar.js https : avatar-js.java.net index.html and Project Avatar https : avatar.java.net index.html .. . .. . What is the relation of these projects Avatar.js has very little documentation . As far as I gathered it offers the possibility to execute node applications on the JVM . Project Avatar seems to build on Avatar.js . However the scope seems to be to provide an alternative Web-Framework for Java EE 7 . Is it also possible to execute node programs like i.e . grunt with Project Avatar .. . Answer : Avatar.js is the open-source version of what was informally called node.jar See this post https : java.net projects avatar-js lists users archive 2013-10 message 1 from the avatar-js mailing list . In other words it is a NodeJS-compatible API running on Nashorn . Project Avatar appears to be Oracle s answer to the NodeJS API offering an alternative platform which also provides compatibility with the NodeJS API and ecosystem via Avatar.js . Therefore it is not that Project Avatar is built on Avatar.js but rather that Avatar.js is one component of Project Avatar . Nashorn is the JavaScript engine used to run both . again from this post https : java.net projects avatar-js lists users archive 2013-10 message 1 . The Avatar.js homepage https : avatar-js.java.net currently has a list of modules known to run including grunt . It would appear that Project Avatar currently includes a build of Avatar.js as avatar-js.jar as found in the current latest commit https : java.net projects avatar sources git show lib rev c41432b048554c579c24e879451309a6825f3641 though it is 4 months old . So I think the answer is that yes the current build of Project Avatar will allow you to run Node-compatible modules . As you ve pointed out both of these initiatives lack documentation and are in their infancy . Time and community engagement will show where they fit best . Comment : Thanks for these clarifications . Currently Avatar.js does not even have a binary distribution and the build-process looks quite intricate involving Python and C++ . Therefore my question : If I get the distribution of Project Avatar do I get Avatar.js for free . Specifically : do I get a way to run plain node programs like grunt on the JVM Comment : @jbandi I ve updated the answer to better answer your second question which I had misread .", "Question : In the context of Java 8 and Nashorn I see two projects being regularly mentioned . Avatar.js https : avatar-js.java.net index.html and Project Avatar https : avatar.java.net index.html .. . .. . What is the relation of these projects Avatar.js has very little documentation . As far as I gathered it offers the possibility to execute node applications on the JVM . Project Avatar seems to build on Avatar.js . However the scope seems to be to provide an alternative Web-Framework for Java EE 7 . Is it also possible to execute node programs like i.e . grunt with Project Avatar .. . Answer : Indeed there is Avatar.js included in Project Avatar . By looking at the Maven POM files of Project Avatar I discovered that there is a binary distribution of Avatar.js available through the java.net Maven repository . Based on this discovery I wrote a blog post how to run simple Node.js apps with Avatar.js here : Running Node.js applications on the JVM with Nashorn and Java 8 http : blog.jonasbandi.net 2014 03 running-nodejs-applications-on-jvm-with.html .. . .. . Steps for OSX repeated here : .. . .. . 1 . Download avatar-js.jar from the java.net Maven Repo . Current version is here : https : maven.java.net content repositories public com oracle avatar-js 0.10.25-SNAPSHOT Example file : avatar-js-0.10.25-20140313.063039-43.jar .. . 2 . Download the native library avatar-js.dylib from the java.net Maven Repo . Current version is here : https : maven.java.net content repositories public com oracle libavatar-js-macosx-x64 0.10.25-SNAPSHOT .. . Example file : libavatar-js-macosx-x64-0.10.25-20140312.062209-35.dylib .. . For Linux you would download the corresponding .so file from . . libavatar-js-linux-x64 0.10.25-SNAPSHOT .. . For Windows you would download the corresponding .dll file from . . libavatar-js-win-x64 0.10.25-SNAPSHOT .. . 3 . Rename the native library to avatar-js.dylib and rename the jar to avatar-js.jar and put both in a directory called dist . 4 . Create a simple Node.js app in the a file called app.js . 5 . Run the command : java -Djava.library.path dist -jar dist avatar-js.jar app.js Comment : Thanks . On Linux rename the .so to dist libavatar-js.so Comment : I don t get why they need native libraries to support this.. . Too bad kinda disqualifies it for me . Als it seems this project did not receive any updates for a long time.. . Comment : @StijndeWitt Project Avatar has been stopped : blogs.oracle.com theaquarium entry project-avatar update https : blogs.oracle.com theaquarium entry project-avatar update Comment : @jbandi I suspected as much but your link clearly confirms it . Thanks for posting it" ] }
[ "yes-answer-long", "yes-answer-short" ]
client-side
UNK_RELATION
copperlicht@webgl@126
copperlicht -- copperlicht is an open-source javascript library api for creating games and interactive 3d applications using @placeholder developed by ambiera .
{ "confidence": [ 36.21870422363281, 23.417369842529297, 22.40190315246582, 22.06584930419922, 21.387836456298828, 18.834489822387695, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 14.687257766723633, 13.203448295593262, 13.203448295593262, 13.203448295593262, 13.203448295593262, 13.203448295593262 ], "content": [ "Now I am working with THREE.js and found this : MOD3 As3dMod 3D Modifier Library port for Javascript and Three.js Pre3d and J3D and Copperlicht but the code is outmoded for any remotely current versions of THREE.js and also is written for canvas rendering NOT webGL .", "Coming from ActionScript + Papervision I am familiar with AS3DMod a library that modifies 3D meshes to bend twist etc .", "Does anyone know of any similar 3D libs that can bend twist bloat 3D meshes in webGL", "There is a FileSystem API in HTML5 html5rocks.com en tutorials file filesystem http : www.html5rocks.com en tutorials file filesystem for writing data from Javascript to an external file", "You can get FPS histogram data using stats.js library which is bundled with all Three.js examples .. . .. . https : github.com mrdoob stats.js .. . .. . Exporting the collected data to a file can be done using HTML5 File System API .", "The best way to find out is to read and study the source code : github.com mrdoob stats.js https : github.com mrdoob stats.js", "I m thinking to stick for a particular framework to work for my academic course but only based on results I should prove .", "I want to plot the graph for all the three frameworks where No.of Vertices is one axis and FPS threshold is 60 is on other axis .", "Will that be good enough to take single predefined model in formats like obj collada json etc and load it in three frameworks", "Then log the frame-rate and number of vertices to some external file and thereafter use the data for plotting a graph to report the best framework among three based on Performance parameter .", "But I m looking for some boilerplate codes for all these frameworks to load different models can be used for number of vertices dimension in my graph and log the frame rates for every second to external file .", "This is the approach I ve been thinking .", "But couldn t find much help on this on internet .", "I wish someone could help me", "Three.js examples come with a FPS history graph .", "You could take a look on that as an example .", "MikkoOhtamaa I want to access the Framerate of Histogram to external file Could you please suggest me how could I do that .", "MikkoOhtamaa Thanks for the reply .", "But my question intention was How to access the FPS from histogram", "Saving it is secondary task .", "I hope you got my point .", "http : www.html5rocks.com en tutorials file filesystem", "Thanks for your reply I used stats.js to get FPS data .", "I m looking forward for the article you mentioned .", "The creator has not been able to update .", "I am not sufficiently skilled to update this myself .", "Thanks for any suggestions .", "Not that I know of but depending on what modifiers you are utilize it may not be too difficult to write a modifier yourself .", "Typically you can reuse the logic in js for Canvas renderer and as for WebGLRenderer you can implement it in the Vertex shaders ." ] }
{ "confidence": [ 57.34355545043945, 24.69643783569336 ], "content": [ "Question : Coming from ActionScript + Papervision I am familiar with AS3DMod a library that modifies 3D meshes to bend twist etc . Now I am working with THREE.js and found this : MOD3 As3dMod 3D Modifier Library port for Javascript and Three.js Pre3d and J3D and Copperlicht but the code is outmoded for any remotely current versions of THREE.js and also is written for canvas rendering NOT webGL . The creator has not been able to update . Does anyone know of any similar 3D libs that can bend twist bloat 3D meshes in webGL I am not sufficiently skilled to update this myself . Thanks for any suggestions . .. . Answer : Not that I know of but depending on what modifiers you are utilize it may not be too difficult to write a modifier yourself . Typically you can reuse the logic in js for Canvas renderer and as for WebGLRenderer you can implement it in the Vertex shaders .", "Question : I m thinking to stick for a particular framework to work for my academic course but only based on results I should prove . I want to plot the graph for all the three frameworks where No.of Vertices is one axis and FPS threshold is 60 is on other axis . Will that be good enough to take single predefined model in formats like obj collada json etc and load it in three frameworks Then log the frame-rate and number of vertices to some external file and thereafter use the data for plotting a graph to report the best framework among three based on Performance parameter . But I m looking for some boilerplate codes for all these frameworks to load different models can be used for number of vertices dimension in my graph and log the frame rates for every second to external file . This is the approach I ve been thinking . But couldn t find much help on this on internet . I wish someone could help me Comment : Three.js examples come with a FPS history graph . You could take a look on that as an example . Comment : MikkoOhtamaa I want to access the Framerate of Histogram to external file Could you please suggest me how could I do that . Comment : There is a FileSystem API in HTML5 html5rocks.com en tutorials file filesystem http : www.html5rocks.com en tutorials file filesystem for writing data from Javascript to an external file Comment : MikkoOhtamaa Thanks for the reply . But my question intention was How to access the FPS from histogram Saving it is secondary task . I hope you got my point . Comment : The best way to find out is to read and study the source code : github.com mrdoob stats.js https : github.com mrdoob stats.js .. . Answer : You can get FPS histogram data using stats.js library which is bundled with all Three.js examples .. . .. . https : github.com mrdoob stats.js .. . .. . Exporting the collected data to a file can be done using HTML5 File System API . http : www.html5rocks.com en tutorials file filesystem Comment : Thanks for your reply I used stats.js to get FPS data . I m looking forward for the article you mentioned ." ] }
[ "yes-answer-long", "yes-answer-short" ]
webgl
UNK_RELATION
inputstream@data-stream@52
inputstream -- an abstract mechanism for reading a @placeholder in java .
{ "confidence": [ 31.48749542236328, 31.248458862304688, 30.23269271850586, 29.36282730102539, 29.336030960083008, 28.81999969482422, 27.590946197509766, 26.453414916992188, 26.113758087158203, 25.513843536376953, 24.787193298339844, 24.629810333251953, 24.431411743164062, 24.431411743164062, 24.431411743164062, 24.431411743164062, 24.27599334716797, 24.201332092285156, 24.201332092285156, 24.11282730102539, 24.11282730102539, 24.11282730102539, 23.704910278320312, 23.59412956237793, 23.56154441833496, 23.56154441833496, 23.56154441833496, 23.56154441833496, 23.56154441833496, 23.461589813232422, 23.319923400878906, 23.319923400878906, 23.31859588623047, 23.31859588623047, 23.242961883544922, 22.9094181060791, 22.569002151489258, 22.569002151489258, 22.518985748291016, 22.393693923950195, 22.376327514648438, 22.31869888305664, 21.892322540283203, 21.7789249420166, 21.598201751708984, 21.523826599121094, 21.523826599121094, 21.523826599121094, 21.523826599121094, 21.422590255737305, 21.417583465576172, 21.417583465576172, 21.417583465576172, 21.417583465576172, 21.36979103088379, 21.345684051513672, 21.33376693725586, 21.154834747314453, 21.154834747314453, 21.154834747314453, 21.154834747314453, 21.154834747314453, 20.928512573242188, 20.898929595947266, 20.87164306640625, 20.87164306640625, 20.87164306640625, 20.87164306640625, 20.87164306640625, 20.87164306640625, 20.87164306640625, 20.728336334228516, 20.7194881439209, 20.656574249267578, 20.60926055908203, 20.60926055908203, 20.547718048095703, 20.547718048095703, 20.5091552734375, 20.481266021728516, 20.481266021728516, 20.481266021728516, 20.467708587646484, 20.467708587646484, 20.284969329833984, 20.284969329833984, 20.200027465820312, 20.200027465820312, 20.200027465820312, 20.200027465820312, 20.200027465820312, 20.200027465820312, 20.111373901367188, 20.111373901367188, 20.09177017211914, 20.066211700439453, 20.058574676513672, 20.058574676513672 ], "content": [ "Ok I solved this myself. . interesting links : .. . .. . http : www.coderanch.com t 276168 java InputStream-multiple-Readers .. . .. . Multiple readers for InputStream in Java http : stackoverflow.com questions 5034311 multiple-readers-for-inputstream-in-java .. . .. . Basically.. . the InputStream can be connected to multiple objects reading from it and consuming it .", "Refer this answer : stackoverflow.com questions 11746978 java-inputstream-size http : stackoverflow.com questions 11746978 java-inputstream-size", "How can I convert the java Object into a InputStream", "An InputStream has no encoding in Java it deals with byte s .", "Take a look at this http : www.mkyong.com java how-to-convert-inputstream-to-string-in-java to identify the way of converting the InputStream to String .", "First Caveat : Concrete subclasses of InputStream are responsible for available .. . .. . InputStream is an abstract-class .", "InputStream is used for reading OutputStream for writing .", "You can find several solutions in this post Convert InputStream to byte array in Java http : stackoverflow.com questions 1264709 convert-inputstream-to-byte-array-in-java using 3rd party libs or not .", "Any ideas for reading form the InputStream as UTF-8", "FileInputStream extends InputStream : it is a specialized version of an InputStream designed for reading files .", "If someone created an InputStream from reading a web service or just converted a String into an InputStream there would be no way to link this to a file .", "as the Java doc says in InputStream read http : docs.oracle.com javase 7 docs api java-io InputStream.html read 28 29 The value byte is returned as an int in the range 0 to 255 .", "See the reverse here : stackoverflow.com questions 1264709 http : stackoverflow.com questions 1264709 convert-inputstream-to-byte-in-java", "This article has a nice breakdown of a few different approaches to this problem : .. . .. . http : blog.ostermiller.org convert-java-outputstream-inputstream", "I m trying to start a process externally with Java and can t read anything from its InputStream - dunno why", "In Java web application Suppose if I want to get the InputStream of an XML file which is placed in the CLASSPATH i.e .", "There are only few basic interfaces classes : .. . .. . DataInput ObjectInput - readig Java primitives and objects .. . DataOutput ObjectOutput - writing Java primitives and objects .. . InputStream - reading individual bytes .. . OutputStream - writing individial bytes .. . Reader - reading character data .. . Writer - writing character data .. . .. . There are other useful interfaces like Closeable but these are less significant .", "InputStream can be used for one-time reading of content .", "Now this always throw exception while reading inputStream", "For this I will introduce a class that gets an InputStream and starts a Thread for reading the incoming data .", "The trick is to use InputStream available before reading anything with the BufferedReader .", "I m not reading from a local file 3 The size of the inputstream is not known", "Why does InputStream read http : docs.oracle.com javase 6 docs api java-io InputStream.html read 28 29 return an int and not a byte", "InputStream is just an abstract-class unfortunately the implementation decides what happens .", "you only need to wrap InputStream inside GZIPInputStream http : developer.android.com reference java util zip GZIPInputStream.html .", "Please note according to Java docs the available method might not work with InputStream but always works with BufferedInputStream .", "A BufferedReader constructor takes a reader http : download.oracle.com javase 6 docs api java-io Reader.html as argument not an InputStream .", "There are similar answered questions : stackoverflow.com questions 804951 http : stackoverflow.com questions 804951 is-it-possible-to-read-from-a-java-inputstream-with-a-timeout", "See this question http : stackoverflow.com questions 9547843 do-i-need-to-close-an-inputstream-in-java .", "there are special Input Output streams for reading writing Java objects .", "You can get a new InputStream out of it if you use ByteArrayOutputStream http : docs.oracle.com javase 7 docs api java-io ByteArrayOutputStream.html to write gzipped content to a byte and ByteArrayInputStream http : docs.oracle.com javase 7 docs api java-io ByteArrayInputStream.html to turn a byte into an InputStream .", "I already visited this pages : Java : InputStream too slow to read huge files http : stackoverflow.com questions 10473873 java-inputstream-too-slow-to-read-huge-files .. . .. . Input stream reads large-files very slowly why", "Here is an extensive Java IO tutorial explaining everything you need to know about InputStream OutputStream Reader Writer and the many many other classes in the Java IO API .", "The GZIPInputStream http : docs.oracle.com javase 7 docs api java util zip GZIPInputStream.html is to be used to decompress an incoming InputStream http : docs.oracle.com javase 7 docs api java-io InputStream.html .", "my final attempt was reading the raw InputStream directly and still no output is visible .", "Have you considered reading the Javadoc https : docs.oracle.com javase 8 docs api java-io DataInput.html readFully-byte : A-", "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 of the opinion that Java s ZipInputStream breaks the Liskov Substitution Principle LSP with regards to the InputStream abstract-class .", "I m new in coding Java so I don t know a lot about Buffered Readers InputStream etc .", "To compress an incoming InputStream using GZIP you basically need to write it to a GZIPOutputStream http : docs.oracle.com javase 7 docs api java util zip GZIPOutputStream.html .", "This page : http : blog.ostermiller.org convert-java-outputstream-inputstream describes how to create an InputStream from OutputStream : .. . .. . Other alternatives are to use PipedStreams and new threads which is cumbersome .", "http : stackoverflow.com questions 19102989 java-is-there-a-way-to-run-a-system-command-and-print-the-output-during-executi .. . Why does reading from Process InputStream block altough data is available http : stackoverflow.com questions 18479152 why-does-reading-from-process-inputstream-block-altough-data-is-available .. . Java : can t get stdout data from Process unless its manually flushed http : stackoverflow.com questions 4230837 java-cant-get-stdout-data-from-process-unless-its-manually-flushed .. . .. . EDIT : I have just found another very easy solution for the stdout.flush problem with Python Scripts .", "InputStream is an abstract-class and all classes extend from it are representing an input stream of bytes.Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input .", "So it is a stream and it is treated like that in java .", "You may run into problems with executing python scripts because there are problems with reading Process InputStreams with Java if they are not flushed into system pipeline .", "When you need to read that file off the device just wrap the inputstream in a zipinputstream http : developer.android.com reference java util zip ZipInputStream.html", "questions 247161 how-do-i-turn-a-string-into-a-stream-in-java 5 answers .. . .. . Given a string : .. . .. . How do I convert it to an InputStream", "As you can read in the Java Docs of JRE : .. . .. . Returns a BufferedImage as the result-of decoding a supplied InputStream with an ImageReader chosen automatically from among those currently registered .", "I think that s a dup of this stackoverflow.com questions 804951 http : stackoverflow.com questions 804951 is-it-possible-to-read-from-a-java-inputstream-with-a-timeout", "The documentation http : download.oracle.com javase 6 docs api java-io InputStream.html available 28 29 says that one should not use available method to determine the size of an InputStream .", "I d like to turn that URL into an InputStream and continue reading from it as long as the connection is maintained and as long as I haven t sent a Thread.interrupt .", "Another idea I ve been playing with is reading chunks of data from the InputStream and writing them to the OutputStream of the DataHandler .", "The output is been buffered in the BufferedReader try just reading the contents from the InputStream directly to see if it makes a difference", "When reading the InputStream of an HttpURLConnection is there any reason to use one of the following over the other", "Plain old Java on plain old Java 7 and no other dependencies demonstrates the difference.. .", "Refer to this SE question on handling large-files for IO operations : .. . .. . Java OutOfMemoryError in reading a large text file http : stackoverflow.com questions 18508836 java-outofmemoryerror-in-reading-a-large-text-file 31724120 31724120", "CharsetDecoder writes to an OutputStream which you can pipe into an InputStream using java.io.PipedOutputStream http : download.oracle.com javase 6 docs api java-io PipedOutputStream.html effectively creating a filtered InputStream .", "They re not pure java code .", "+1 for using Java 7", "Java 101 isn t it", "Java 7 and later :", "sun.misc.IOUtils is not Java 7 .", "Are there Java classes out there that handle the abstract problem I need to solve here without me having to roll my own custom implementation .", "Instead of the Java built-in SuppressWarnings though you can try using some other suppression mechanism provided by the static-analysis tool that s generating the warning .", "I create an InputStream for the data .", "That library already exposes an InputStream .", "InputStream is byte filedata ByteStreams.toByteArray is", "How to convert inputStream to FileInputStream", "use bufferedinputstream instead of InputStream .", "The main problem is not with the BitmapFactory.Options but with the InputStream .", "How to clone an InputStream", "FileReader http : docs.oracle.com javase 1.4.2 docs api java-io FileReader.html .. . .. . FileReader is meant for reading streams of characters .", "If you are using an implementation of the InputStream http : docs.oracle.com javase 7 docs api java-io InputStream.html interface you can check the result-of InputStream markSupported http : docs.oracle.com javase 7 docs api java-io InputStream.html markSupported 28 29 that tell you whether or not you can use the method mark http : docs.oracle.com javase 7 docs api java-io InputStream.html mark 28int 29 reset http : docs.oracle.com javase 7 docs api java-io InputStream.html reset 28 29 .", "my question is they could have done it in straight way by just writing an abstract why they write protected FilterInputStream InputStream in this.in in", "So what is the point using InputStream but not ByteArray", "Is it forced to have a file as a backend to provide an InputStream", "Sometimes reading from inputstream on client-side stops working while the server is still sending new messages .", "If I can use Reader for reading characters why I will use inputstream I guess to read objects", "I know it s done with InputStream .. . .. . Actually you d be writing http : download.oracle.com javase 6 docs api java-io FileOutputStream.html write 28byte 5b 5d 29 to a file output http : download.oracle.com javase 6 docs api java-io FileOutputStream.html .. .", "I am pretty new to Java buffers and serial i o and think maybe there is some obvious syntax or understanding of how data is returned to the InputStream .", "Note also that you can use a PushbackInputStream http : docs.oracle.com javase 8 docs api java-io PushbackInputStream.html with Tika in-place of your original InputStream", "http : stackoverflow.com questions 3695372 what-does-inputstream-available-do-in-java .. . .. . I also tried NuProcess library with the following code : .. . .. . None of the methods work .", "http : tutorials.jenkov.com java-io index.html", "This line : .. . .. . needs to be : .. . .. . or since Java 7 :", "The method is already there in Java 8 .", "Is for Java 7 or higher .", "In your loop in variable would be a InputStream", "An InputStream inherently doesn t have a size .", "Can I share an InputStream or OutputStream", "- you can t write characters to an InputStream", "what s the difference between InputStream and ByteArrayInputStream", "InputStream is the common Interface for input streams .", "I have a blob column in my database-table for which I have to use byte in my Java program as a mapping and to use this data I have to convert it to InputStream or OutputStream .", "If your InputStream is backed by a Socket you can set a Socket timeout in milliseconds using setSoTimeout http : docs.oracle.com javase 7 docs api java net Socket.html setSoTimeout 28int 29 .", "Pure Java solution using Stream http : docs.oracle.com javase 8 docs api java util stream Stream.html s works since Java 8 .", "java.lang.OutOfMemoryError : Java heap space : .. . .. . Cause : The detail message Java heap space indicates object could not be allocated in the Java heap .", "somefile java myJavaApp or somecommand java myJavaApp then input data are usually handed over immediately .", "mkyong.com java apache-httpclient-examples http : www.mkyong.com java apache-httpclient-examples basic httpClient" ] }
{ "confidence": [ 34.74402618408203, 32.95637512207031, 31.003862380981445, 30.951505661010742, 30.468454360961914, 30.461780548095703, 29.733707427978516, 29.686691284179688, 29.646244049072266, 29.496177673339844, 29.414012908935547, 29.268993377685547, 29.168926239013672, 29.161455154418945, 28.990829467773438, 28.967063903808594, 28.94443130493164, 28.843400955200195, 28.772581100463867, 28.61186981201172 ], "content": [ "Question : This may be a silly one but I want to know the background operation difference . 1 . InputStream is new FileInputStream filepath .. . 2 . FileInputStream is new FileInputStream filepath .. . .. . What is the difference between the above two lines-of-code and in what scenarios are they used . Comment : FileInputStream is derived from InputStream - any FileInputStream instance is necessarily an InputStream . There s a broad preference for making declarations as abstract as possible . Comment : There is no difference as you are doing both in both cases . Comment : Possible duplicate of Java - declaring from Interface type instead of Class http : stackoverflow.com questions 3383726 java-declaring-from-interface-type-instead-of-class Comment : This is also related : What does it mean to program to a interface http : stackoverflow.com questions 1413543 what-does-it-mean-to-program-to-a-interface .. . Answer : FileInputStream extends InputStream : it is a specialized version of an InputStream designed for reading files . There are several implementations of an InputStream according to the use of it . It is usually good practice to use the highest type needed in your code . Therefore if your code needs to read data from an InputStream but not specifically from a FileInputStream you should use InputStream . Yet if you do need to keep the information of your object being a FileInputStream and not just an InputStream then you should keep the FileInputStream type .", "Question : The documentation http : download.oracle.com javase 6 docs api java-io InputStream.html available 28 29 says that one should not use available method to determine the size of an InputStream . How can I read the whole content of an InputStream into a byte array I could read multiple times into a buffer of a fixed size but then I will have to combine the data I read into a single byte array which is a problem for me . .. . Answer : If you are reading in from a file you can do something like this : .. . .. . .. . .. . UPDATE May 31 2014 : .. . .. . Java 7 adds some new features in the java.nio.file package that can be used to make this example a few lines shorter . See the readAllBytes http : docs.oracle.com javase 7 docs api java nio file Files.html readAllBytes 28java.nio.file.Path 29 method in the java.nio.file.Files http : docs.oracle.com javase 7 docs api java nio file Files.html class . Here is a short example : .. . .. . Note that as of the time of this writing the Android API doesn t support this or much of anything in Java 7 . Comment : unforuntately I am not reading from a file . I am reading from a ZipEntry . Is there anyway to get the file length similar to here", "Question : I m trying to start a process externally with Java and can t read anything from its InputStream - dunno why If I m starting a process with commands like ls ps or kill everything works fine . I can start the process and get information either on the InputStream or the ErrorStream of the Process . If I try to use a command like ftp or telnet which is essential both InputStream or ErrorStream are blocking my program when trying to read . No information is passed through these streams at any time : - . Do anyone know this issue Is it just not possible with these commands or is anything wrong in my mindset of how to use the Process class with Java pls help me I m getting mad on this stuff Comment : Did you get this issue resolved Can you post in the solution .. . Answer : After struggling for days and trying many options I found a solution . Working on Ubuntu 14.04 x64 with jdk 8 u 25 . This codereview post http : codereview.stackexchange.com questions 7631 handle-java-process-outputs-without-extra-threads gave me the hint . The trick is to use InputStream available before reading anything with the BufferedReader . I personally have two threads one for stdout and the other for stderr . Here is a simple running snippet I extrapolated from my program . If you don t want to read all just jump to readLine", "Question : The following code is extracted from the java-web-start chapter of the core java volume 1 . There are four objects created the stream is redirected three times . Is there any other methods to write data to a file by using jnlp api what s the difference between InputStream and ByteArrayInputStream Comment : Computers are very fast . Nothing is ever horrible unless you need to do it a very large number of times or its very performance-critical . Comment : You should change the title : it is data not date . Then it would be horrible to write a 8 byte date timestamp to a file . Comment : I mean it s too complex for a programmer not the computer.And I want to know is it necessary to code in this way . Comment : There are two questions there . The second is trivial and is answered by the Javadoc . Is the first question your real question If so you should amend your title . .. . Answer : InputStream is an abstract-class and all classes extend from it are representing an input stream of bytes.Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input . where as a ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream . An internal counter keeps track of the next byte to be supplied by the read method . Because of polymorphism concept you can assign a child to the parent just like .. . .. . then if we will call data.read that mean we are calling ByteArrayInputStream read method because ByteArrayInputStream is providing implementation of read where-in InputStream method read is abstract .", "Question : This may be a silly one but I want to know the background operation difference . 1 . InputStream is new FileInputStream filepath .. . 2 . FileInputStream is new FileInputStream filepath .. . .. . What is the difference between the above two lines-of-code and in what scenarios are they used . Comment : FileInputStream is derived from InputStream - any FileInputStream instance is necessarily an InputStream . There s a broad preference for making declarations as abstract as possible . Comment : There is no difference as you are doing both in both cases . Comment : Possible duplicate of Java - declaring from Interface type instead of Class http : stackoverflow.com questions 3383726 java-declaring-from-interface-type-instead-of-class Comment : This is also related : What does it mean to program to a interface http : stackoverflow.com questions 1413543 what-does-it-mean-to-program-to-a-interface .. . Answer : Like the other answer state there is no difference in behaviour . It still is the same object and the same methods will be executed . You can assign an object of any type that inherits InputStream to that variable . However what no one mentioned so far is : You can only call operations that are declared in InputStream on that variable . If FileInputStream would offer some additional operations the compiler would throw an error if you try to call it . In this case you would need to use FileInputStream as type of the variable .", "Question : Can I share an InputStream or OutputStream For example let s say I first have : .. . .. . .. . incoming being an object variable . Later on I temporarily do : .. . .. . I understand that the stream is concrete and reading from it will consume its input no matter from where it s done.. . But after doing the above can I still access both incoming and dataReader simultaneously or is the InputStream just connected to ONE object and therefore incoming loses its input once I declare dataReader I understand that if I close the dataReader then I will close the socket as well and I will refrain from this but I m wondering whether I need to reclaim the InputStream somehow to incoming after having transferred it to dataReader Do I have to do : .. . .. . again after this whole operation Comment : Clarification.. . I strictly use incoming throughout the program but in one method I need to transfer a large amount of text and I wish to use the BufferedReader for that.. . However after it s done I want to go back to normal flow and use my DataInputStream but now it seems to be gone or at least not be able to read anything . . .. . Answer : Ok I solved this myself. . interesting links : .. . .. . http : www.coderanch.com t 276168 java InputStream-multiple-Readers .. . .. . Multiple readers for InputStream in Java http : stackoverflow.com questions 5034311 multiple-readers-for-inputstream-in-java .. . .. . Basically.. . the InputStream can be connected to multiple objects reading from it and consuming it . However a BufferedReader reads ahead so when involving one of those it might be a good idea to implement some sort of signal when you re switching from for example a BufferedReader to a DataInputStream that is you want to use the DataInputStream to process the InputStream all of a sudden instead of the BufferedReader . Therefore I stop sending data to the InputStream once I know that all data has been sent that is for the BufferedReader to handle . After this I wait for the other part to process what it should with the BufferedReader . It then sends a signal to show that it s ready for new input . The sending part should be blocking until it receives the signal input and then it can start sending data again . If I don t use the BufferedReader after this point it won t have a chance to buffer up all the input and steal it from the DataInputStream and everything works very well : But be careful one read operation from the BufferedReader and you will be back in the same situation.. . Good to know", "Question : What is the difference between Reader and InputStream And when to use what If I can use Reader for reading characters why I will use inputstream I guess to read objects Comment : Regarding I guess to read objects there are special Input Output streams for reading writing Java objects . They are ObjectInputStream and ObjectOutputStream respectively and are part of the larger serialization framework . java.sun.com developer technicalArticles Programming http : java.sun.com developer technicalArticles Programming serialization But that s only one use of input output streams others could be sending data over a socket etc . .. . Answer : An InputStream is the raw method of getting information from a resource . It grabs the data byte by byte without performing any kind of translation . If you are reading image data or any binary file this is the stream to use . A Reader is designed for character streams . If the information you are reading is all text then the Reader will take care of the character decoding for you and give you unicode characters from the raw input stream . If you are reading any type of text this is the stream to use . You can wrap an InputStream and turn it into a Reader by using the InputStreamReader class .", "Question : What is the difference between Reader and InputStream And when to use what If I can use Reader for reading characters why I will use inputstream I guess to read objects Comment : Regarding I guess to read objects there are special Input Output streams for reading writing Java objects . They are ObjectInputStream and ObjectOutputStream respectively and are part of the larger serialization framework . java.sun.com developer technicalArticles Programming http : java.sun.com developer technicalArticles Programming serialization But that s only one use of input output streams others could be sending data over a socket etc . .. . Answer : One accepts bytes and the other accepts characters .", "Question : I have a blob column in my database-table for which I have to use byte in my Java program as a mapping and to use this data I have to convert it to InputStream or OutputStream . But I don t know what happens internally when I do so . Can anyone briefly explain me what s happening when I do this conversion Comment : Shouldn t the title be array of bytes .. . or byte array.. . or byte .. . instaed of byte of array.. . Comment : See the reverse here : stackoverflow.com questions 1264709 http : stackoverflow.com questions 1264709 convert-inputstream-to-byte-in-java .. . Answer : I m assuming you mean that use means read but what i ll explain for the read case can be basically reversed for the write case . so you end up with a byte . this could represent any kind of data which may need special types of conversions character encrypted etc . let s pretend you want to write this data as is to a file . firstly you could create a ByteArrayInputStream http : java.sun.com javase 6 docs api java-io ByteArrayInputStream.html which is basically a mechanism to supply the bytes to something in sequence . then you could create a FileOutputStream http : java.sun.com javase 6 docs api java-io FileOutputStream.html for the file you want to create . there are many types of InputStreams and OutputStreams for different data sources and destinations . lastly you would write the InputStream to the OutputStream . in this case the array of bytes would be sent in sequence to the FileOutputStream for writing . For this i recommend using IOUtils http : commons.apache.org io api-1.4 org apache-commons-io IOUtils.html .. . .. . and in reverse .. . .. . if you use the above code-snippets you ll need to handle exceptions and i recommend you do the closes in a finally block . Comment : didnt you mean - ByteArrayOutputStream out new ByteArrayOutputStream instead ByteArrayOutputStream out new ByteArrayInputStream Comment : yes oops...... . Comment : CloseQuietly should probably be in a finally clause . Comment : read the last line", "Question : I m trying to start a process externally with Java and can t read anything from its InputStream - dunno why If I m starting a process with commands like ls ps or kill everything works fine . I can start the process and get information either on the InputStream or the ErrorStream of the Process . If I try to use a command like ftp or telnet which is essential both InputStream or ErrorStream are blocking my program when trying to read . No information is passed through these streams at any time : - . Do anyone know this issue Is it just not possible with these commands or is anything wrong in my mindset of how to use the Process class with Java pls help me I m getting mad on this stuff Comment : Did you get this issue resolved Can you post in the solution .. . Answer : You need to do this work in a Thread . For example to log the standard output : .. . .. . Then you need a second thread for input handling . And you might want to deal with stderr just like stdout . Comment : Thank you for your answer . Actually I ve been testing it within a thread in all variations . I tried reading whole lines reading single chars and reading bytes . No effect . I can t get a single bit out of this InputStream and it should definitely response . It only works if the started process is terminating like ps ls . But I also need it to run with interactive processes like ftp and telnet there must be an issue I m not aware of . any futher ideas", "Question : How do I read an entire InputStream into a byte array Comment : See the reverse : byte to InputStream here : stackoverflow.com questions 2091454 http : stackoverflow.com questions 2091454 byte-to-inputstream-or-outputstream .. . Answer : Finally after twenty years a simple solution without the need for a 3rd party library is in sight thanks to the upcoming Java 9 http : download.java.net java jdk9 docs api java-io InputStream.html readAllBytes-- : .. . .. . Note also the convenience-methods readNBytes byte b int off int len http : download.java.net java jdk9 docs api java-io InputStream.html readNBytes-byte : A-int-int- and transferTo OutputStream http : download.java.net java jdk9 docs api java-io InputStream.html transferTo-java.io.OutputStream- addressing recurring needs .", "Question : Why does InputStream read http : docs.oracle.com javase 6 docs api java-io InputStream.html read 28 29 return an int and not a byte .. . Answer : as the Java doc says in InputStream read http : docs.oracle.com javase 7 docs api java-io InputStream.html read 28 29 The value byte is returned as an int in the range 0 to 255 . That is to say the byte value -128 127 has been changed to int value 0 255 so the return-value can be used to represent the end of the stream .", "Question : This may be a silly one but I want to know the background operation difference . 1 . InputStream is new FileInputStream filepath .. . 2 . FileInputStream is new FileInputStream filepath .. . .. . What is the difference between the above two lines-of-code and in what scenarios are they used . Comment : FileInputStream is derived from InputStream - any FileInputStream instance is necessarily an InputStream . There s a broad preference for making declarations as abstract as possible . Comment : There is no difference as you are doing both in both cases . Comment : Possible duplicate of Java - declaring from Interface type instead of Class http : stackoverflow.com questions 3383726 java-declaring-from-interface-type-instead-of-class Comment : This is also related : What does it mean to program to a interface http : stackoverflow.com questions 1413543 what-does-it-mean-to-program-to-a-interface .. . Answer : There is no difference . In each case you are creating a FileInputStream . The first is probably better programming style in that you should generally use a classes interface instead of the concrete class to allow for flexibility i.e you decide to use a BufferedInputStream .", "Question : I m working on a java web application in which files will be stored in a database . Originally we retrieved files already in the DB by simply calling getBytes on our result set : .. . .. . This byte array was then converted into a DataHandler using the obvious constructor : .. . .. . This worked great until we started trying to store and retrieve larger files . Dumping the entire file contents into a byte array and then building a DataHandler out of that simply requires too much memory . My immediate idea is to retrieve a stream of the data in the database with getBinaryStream and somehow convert that InputStream into a DataHandler in a memory-efficient way . Unfortunately it doesn t seem like there s a direct way to convert an InputStream into a DataHandler . Another idea I ve been playing with is reading chunks of data from the InputStream and writing them to the OutputStream of the DataHandler . But.. . I can t find a way to create an empty DataHandler that returns a non-null OutputStream when I call getOutputStream .. . .. . .. . Has anyone done this I d appreciate any help you can give me or leads in the right direction . .. . Answer : An implementation of answer from Kathy Van Stone : .. . .. . At first create helper class which create DataSource from InputStream : .. . .. . And then you can create DataHandler from InputStream : .. . .. . imports : Comment : getInputStream should return a new InputStream each time when called", "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 : Here is an extensive Java IO tutorial explaining everything you need to know about InputStream OutputStream Reader Writer and the many many other classes in the Java IO API . http : tutorials.jenkov.com java-io index.html 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 .", "Question : I have a method like .. . .. . I wan to convert the inputStream into zipInputStream what is the way to do that The above method is incorrect and throws Exception as Not a Zip Format .. . .. . converting Java Streams to me are really confusing and I do not make them right Comment : Why do you think that the provided InputStream returns GZIP content The exception message clearly tells it is not . What exactly is the concrete functional requirement Why exactly do you need to convert it this way Comment : I need to save the document on Amazon S3 in compressed format to save space and reduced billing which is why the inputstream is a document that I am trying to ZIP and send to S3 Comment : Ah that makes more sense . I ve posted an answer . In the future questions please don t forget to clearly state the concrete functional requirement . Try to ask how to solve a problem not how to achieve a solution of which you thought that it s the right solution to the concrete problem . Otherwise the question would likely never receive a valid answer and you keep stabbing in the dark . .. . Answer : The GZIPInputStream http : docs.oracle.com javase 7 docs api java util zip GZIPInputStream.html is to be used to decompress an incoming InputStream http : docs.oracle.com javase 7 docs api java-io InputStream.html . To compress an incoming InputStream using GZIP you basically need to write it to a GZIPOutputStream http : docs.oracle.com javase 7 docs api java util zip GZIPOutputStream.html . You can get a new InputStream out of it if you use ByteArrayOutputStream http : docs.oracle.com javase 7 docs api java-io ByteArrayOutputStream.html to write gzipped content to a byte and ByteArrayInputStream http : docs.oracle.com javase 7 docs api java-io ByteArrayInputStream.html to turn a byte into an InputStream . So basically : .. . .. . You can if necessary replace the ByteArrayOutputStream ByteArrayInputStream by a FileOuputStream FileInputStream on a temporary file as created by File createTempFile especially if those streams can contain large-data which might overflow machine s available memory when used concurrently .", "Question : I asked this once before and my post was deleted for not providing the code that uses the helper class . This time I have created a full test suite which shows the exact problem . I am of the opinion that Java s ZipInputStream breaks the Liskov Substitution Principle LSP with regards to the InputStream abstract-class . For ZipInputStream to be a subtype of InputStream then objects of type InputStream in a program may be replaced with objects of type ZipInputStream without altering any of the desirable properties of that program correctness task performed etc . . The way in which LSP is violated here is for the read methods . InputStream.read byte int int states that it returns : .. . .. . the total number of bytes read into the buffer or -1 if there is no more data because the end of the stream has been reached . The problem with ZipInputStream is that it has modified the meaning of a -1 return-value . It states : .. . .. . the actual number of bytes read or -1 if the end of the entry is reached .. . .. . there is actually a hint to a similar problem with the available method in the Android documentation http : developer.android.com reference java util zip ZipInputStream.html .. . .. . Now for the code that demonstrates the problem . This is a cut down version of what I was actually trying to do so please excuse any poor style multithreading problems or the fact that the stream is advanced etc . . Class that accepts any InputStream to generate a SHA1 of the stream : .. . .. . Unit tests : .. . .. . So back to the problem.. . LSP is violated since you can read to the end of the stream for an InputStream but not for a ZipInputStream and of course this will break the correctness property of any method that tries to use it in such a way . Is there any way that this can be achieved or is ZipInputStream fundamentally flawed .. . Answer : I see no LSP violation . The documentation for ZipInputStream.read byte int int https : docs.oracle.com javase 7 docs api java util zip ZipInputStream.html read byte 5B 5D 20int 20int says Reads from the current ZIP entry into an array of bytes . At any one time the ZipInputStream is really the input stream of the entry not the whole ZIP file . And it s hard to see what else ZipInputStream.read could possibly do at end of entry other than return -1 . this will break the correctness property of any method that tries to use it in such a way .. . .. . Hard to see how the method would ever know . Comment : This doesn t really answer the question . I was asking whether it is possible to write a method like this in which it can take an InputStream and generate a SHA1 from the entire stream regardless of what the actual implementation of the InputStream is . Comment : @Steiny And I ve answered it . If you don t want the ZIPInputStream to unzip entries don t use it . But that s what it does if you do use it . You seem to be expecting it to deliver the entire stream . It doesn t .", "Question : How do I read an entire InputStream into a byte array Comment : See the reverse : byte to InputStream here : stackoverflow.com questions 2091454 http : stackoverflow.com questions 2091454 byte-to-inputstream-or-outputstream .. . Answer : Java 7 and later : Comment : sun.misc.IOUtils is not Java 7 . It s a proprietary implementation specific class that may not be present in other JRE implementations and can disappear without any warning in one of the next releases .", "Question : I have a method which expects the one of the input variable to be of java.io.File type but what I get is only InputStream . I cannot change the signature of the method . How can I convert the InputStream into File type with out actually writing the file on to the filesystem . Comment : Is this a built-in function or is it a custom function Comment : @Richard : I cannot change the signature of the method . Comment : Why exactly do you need a File object instead of the InputStream Comment : I cannot use InputStream because the API I am using mandates File .. . Answer : You can t . The input stream is just a generic stream of data and there is no guarantee that it actually originates from a File . If someone created an InputStream from reading a web service or just converted a String into an InputStream there would be no way to link this to a file . So the only thing you can do is actually write data from the stream to a temporary file e.g . using the File.createTempFile method and feed this file into your method . Comment : Indeed the File createTempFile http : download.oracle.com javase 6 docs api java-io File.html createTempFile 28java.lang.String 20java.lang.String 29 is really your best bet . Comment : Also see File deleteOnExit http : download.oracle.com javase 6 docs api java-io File.html deleteOnExit 28 29 which causes the JVM to attempt to delete the file automatically when the JVM exits . Of course it s best to delete the temp file manually and immediately once you know the file is no longer needed and no longer in use . But in an imperfect world sometimes imperfect solutions are necessary .", "Question : How do you read the same inputstream twice Is it possible to copy it somehow I need to get a image from web save it locally and then return the saved image . I just tought it would be faster to use the same stream instead of starting a new stream to the downloaded content and then read it again . Comment : Maybe use mark and reset .. . Answer : If you are using an implementation of the InputStream http : docs.oracle.com javase 7 docs api java-io InputStream.html interface you can check the result-of InputStream markSupported http : docs.oracle.com javase 7 docs api java-io InputStream.html markSupported 28 29 that tell you whether or not you can use the method mark http : docs.oracle.com javase 7 docs api java-io InputStream.html mark 28int 29 reset http : docs.oracle.com javase 7 docs api java-io InputStream.html reset 28 29 . If you can mark the stream when you read then call reset to go back to begin . If you can t you ll have to open a stream again . Another solution would be to convert InputStream to byte array then iterate over the array as many time as you need . You can find several solutions in this post Convert InputStream to byte array in Java http : stackoverflow.com questions 1264709 convert-inputstream-to-byte-array-in-java using 3rd party libs or not . Caution if the read content is too big you might experience some memory troubles . Finally if your need is to read image then use : .. . .. . Using ImageIO read java.net.URL http : docs.oracle.com javase 7 docs api javax imageio ImageIO.html read 28java.net.URL 29 also allows you to use cache ." ] }
[]
data-stream
UNK_RELATION
geocode@s@107
geocode -- geocoding is a method to assign spacial coordinates - like longitude and latitude on the earth @placeholder surface - to a data record or object which represents an address or other geographic data .
{ "confidence": [ 46.72881317138672, 40.092491149902344, 37.53257751464844, 35.4005012512207, 35.05469512939453, 34.612144470214844, 34.15608596801758, 33.3204345703125, 31.68427276611328, 30.140304565429688, 28.213058471679688, 28.082538604736328, 27.593955993652344, 27.166614532470703, 27.11921501159668, 26.841798782348633, 26.838987350463867, 26.838987350463867, 26.647994995117188, 26.00615882873535, 26.00615882873535, 25.66707992553711, 25.609281539916992, 25.592758178710938, 25.56200408935547, 25.441944122314453, 25.37419319152832, 25.37419319152832, 25.36912727355957, 25.358280181884766, 25.338550567626953, 25.182735443115234, 25.081634521484375, 24.20711898803711, 23.707565307617188, 23.659130096435547, 23.63395881652832, 23.630142211914062, 23.392507553100586, 23.35338592529297, 23.07849884033203, 23.070114135742188, 22.93146514892578, 22.877588272094727, 22.848590850830078, 22.75635528564453, 22.652591705322266, 22.61518096923828, 22.522682189941406, 22.372360229492188, 22.24895477294922, 22.152284622192383, 22.152284622192383, 22.146129608154297, 21.840898513793945, 21.737525939941406, 21.737525939941406, 21.737525939941406, 21.686582565307617, 21.306076049804688, 21.30019760131836, 21.109603881835938, 21.109024047851562, 21.109024047851562, 21.105422973632812, 21.07964324951172, 21.028202056884766, 21.02182960510254, 21.02172088623047, 20.871971130371094, 20.868183135986328, 20.336959838867188, 20.334884643554688, 19.98809814453125, 19.964996337890625, 19.936084747314453, 19.934276580810547, 19.875362396240234, 19.780330657958984, 19.716859817504883, 19.70557403564453, 19.70557403564453, 19.644519805908203, 19.609161376953125, 19.609161376953125, 19.348670959472656, 19.216991424560547, 19.216991424560547, 19.216991424560547, 19.201093673706055, 19.188419342041016, 19.09740447998047, 18.97292137145996, 18.933988571166992, 18.877613067626953, 18.859237670898438, 18.844741821289062, 18.67743682861328, 18.57477569580078, 18.327783584594727 ], "content": [ "Using the geocoder to convert an address to latitude-longitude coordinates .", "@harrism a little late but I decided to approach it like this stubbing latitude and longitude in addition to the main geocode method : Restaurant.any instance.stub : geocode .and return 1 1 Restaurant.any instance.stub : latitude .and return 1 Restaurant.any instance.stub : longitude .and return 1", "But when it s updated with a more precise address with street name then geocode should update the longitude and latitude .", "Loop it with something like lapply data location geocode service bing returntype coordinates .", "I have a list of latitude and longitude coordinates and wish to find out which country they all reside in .", "But when the user updates the address the latitude and longitude will not be geocoded anymore and thus still using the old latitude and longitude which is the first save .", "But the geocoder module actually updates the latitude and longitude of the object .", "This question is regarding the google Maps API geocoding I m able to geocode an address and show the location but this works when the address is valid .", "Basically getting the latitude and longitude works in the coding below .", "customerSaveButtonClick : function inSender .. . .. . alert got in here .. . try .. . .. . alert going into code .. . .. . var address this.addressEditor1.getDisplayValue + + this.cityEditor1.getDisplayValue + + this.zipcodeEditor1.getDisplayValue .. . .. . alert address .. . var longitude 0 .. . var latitude 0 .. . var geocoder new google.maps.Geocoder .. . .. . klong 0 .. . geocoder.geocode .. . address : address .. . function results status .. . .. . if status google.maps.GeocoderStatus.OK .. . .. . latitude results 0 .geometry.location.lat .. . longitude results 0 .geometry.location.lng .. . .. . alert LATITUDE IS + latitude + LONGITUDE IS + longitude .. . .. . loclatitudeEditor1.setDataValue latitude .. . loclatitudeEditor1.setDisplayValue latitude .. . loclongitudeEditor1.setDataValue longitude .. . loclongitudeEditor1.setDisplayValue longitude .. . .. . AREA ONE stalls : customerLiveForm1.saveData .. . .. . .. . .. . .. . OLDSETUPONCLICK - customerLiveForm1.saveDataIfValid .. . .. . AREA TWO saves 0 s for lat long : this.customerLiveForm1.saveData .. . catch e .. . console.error ERROR IN customerSaveButtonClick : + e .. . alert ERROR IN customerSaveButtonClick : + e .. . .. . .. . .. . end : 0", "Is there a way to find the range of latitude and longitude included within a set of certain cities", "I am using javascrip google-api to geocode the address .", "Here s an example of using google JavaScript library for geocoding address lookups .", "but geocode API not found anything .", "Now I want to get the city name or other information from LATITUDE and LONGITUDE but when I run the apps is show me service not available .", "This can be done for any of the Geocoding data that you need returned by the providers .", "I have 3 sets of latitude and longitude stored in FirebaseDatabase .", "I have both but i got null latitude and longitude", "I tried http : maps.google.com maps api geocode json address 382340 components country : in sensor false http : maps.google.com maps api geocode json address 382340 components country : in sensor false .. . .. . but this is giving multiple results with in significant data .", "Please let me know how can I show location address according to every set of latitude and longitude retrieved from the database", "I have this in my shop.rb : .. . .. . And in my shops controller.rb : .. . .. . Now when the user first creates the entry the address is geocoded with latitude and longitude saved to the database .", "I have a data base of 1.5 lac USA locations and for each location I have to find latitude lat and longitude long .", "Here s my code : .. . .. . Here s GeocodeAddressIntentService.java file s code : .. . .. . What s going wrong is that the name of location is not getting shown according to every sets of latitude and longitude but according to the last latest saved set of latitude and longitude .", "Is the following what you are asking Google Maps API - Get Coordinates of address http : stackoverflow.com questions 3652951 google-maps-api-get-coordinates-of-address", "For the partioning I want to use a geocode instead of lat lng coordinates .", "Alternately check out ggmap : : geocode which can take a vector e.g .", "There is now also an open geocoding service by MapQuest http : open.mapquestapi.com geocoding .", "See polices of geocoding api https : developers.google.com maps documentation geocoding policies", "I would like to use the Bing API to batch geocode .", "I am trying to reverse geocode coordinates and retrieve corresponding country codes using geopy .", "According to Google Map s Geocode API documentation : .. . .. . https : developers.google.com maps documentation geocoding index GeocodingRequests .. . .. . you can simply make a call to the geocode request address like this : .. . .. . http : maps.googleapis.com maps api geocode json address 1600+Amphitheatre+Parkway +Mountain+View +CA sensor false http : maps.googleapis.com maps api geocode json address 1600+Amphitheatre+Parkway +Mountain+View +CA sensor false .. . .. . However according to this section https : developers.google.com maps documentation geocoding index Limits there is a usage limit of 2500 requests per day .", "In wavemaker I set the values on the form using this .. . .. . .. . loclatitudeEditor1.setDataValue latitude .. . loclatitudeEditor1.setDisplayValue latitude .. . loclongitudeEditor1.setDataValue longitude .. . loclongitudeEditor1.setDisplayValue longitude .. . .. . and then try to save the values to the database using this .. . .. . .. . customerLiveForm1.saveData .. . .. . The problem is that when using the customerLiveForm1.saveData code it stalls out .", "I ve written a simple function to take an input - country name - and return the latitude and longitude .", "When I try to geocode one of the adress using google geocode api google-api returning incorrect location .", "I m trying to use Apple s CLGeocoder to search for a place based on a string and get the latitude-longitude of it .", "I m geocoding a dataframe with geopy .", "The request for Estonia works as expected : .. . .. . https : maps.googleapis.com maps api geocode json address estonia key YOUR API KEY https : maps.googleapis.com maps api geocode json address estonia key YOUR API KEY .. . .. . If you believe that Republic of Estonia must be in the list of the names please Send a feedback bottom right corner to Google from this page .. . .. . https : www.google.com maps place Estonia @58.7223142 23.1414399 7z data 4m5 3m4 1s0x4692949c82a04bfd : 0x40ea9fba4fb425c3 8m2 3d58.595272 4d25.013607 hl en", "ggmap : : geocode c dc nyc la", "http : maps.googleapis.com maps api geocode json address republic 20of 20estonia .. . .. . I tried same addres in maps.google.com and it takes me to correct location .", "I modified an answer from this question about lat-long to US states http : stackoverflow.com questions 8751497 latitude-longitude-coordinates-to-state-code-in-r and have a working function but I run into the problem that the worldHires map from the mapdata package is hideously out of date and contains a lot of obsolete countries such as Yugoslavia and the USSR .", "Geocoding .. . .. . Cloudmade s Web Maps API includes a geocoder .", "But now I am working on another project where I have a full address and needs to geocode that but I don t need to show it on a map since I just need the latitude and longitude to calculate a QRA locator it is a system of map grids used by HAM operators all over the world .. . .. . I think I could speed up the process by not using a map since it takes time to load every time .", "Without having used the package in question it looks like the geocode function isn t vectorised .", "http : maps.googleapis.com maps api geocode xml address holly 20hall sensor false http : maps.googleapis.com maps api geocode xml address holly 20hall sensor false .. . .. . So if this url doesnt give you any results then its probably safe to assume that address doesn t exist .", "are you using geocode in your app like user User.first and then user.geocode", "Geocoding is supported by another external program in the case of GraphHopper Maps https : graphhopper.com maps it is the GraphHopper Geocoding API https : github.com graphhopper directions-api blob master docs-geocoding.md .", "Let s say initially a shop s address is saved with info on city and country the geocode will be based on that city and country .", "I am using this code to get current location latitude and longitude but i am not getting current location latitude and longitude.anyone know the ans update here .. . .. . thanks .. . .. . i am using manifest code here", "So my question boils down to this : can I use the geocode function from the ggmaps library in R to ping the Google Maps Geocoding API", "I m trying to use the geocode function from the ggmaps library in R to get coordinates for specific locations .", "But Google geocoding api does allow for partial address searches and returns matches sorted by best fit .", "Ultimately by the way I m looking for an actual street-address rather than coordinates .", "I believe the Google API allows you to get coordinates for a given address .", "They will happily geocode the intersection but not the distance away .", "The other 5 only a fraction of the data is return .", "When using the geocoding functionality it returns the values in the form of a callback .", "I m confused by all the different ways to do geocoding i.e .", "But there is a limit 2 500 requests day for using Google Maps Geocoding API .", ": geocode .and return 1 1 end .. . .. . However when I run my tests it still appears to be calling out to geocode .", "This is because geocode is non-blocking .", "It turns out that ESRI wants the data to be sent as x-www-form-urlencoded as opposed to just a JSON object .", "Can anyone make a suggestion for how to geocode this", "+1 for technical correctness -1 for potentially violating Google s Geocoding service terms and conditions https : developers.google.com maps documentation geocoding .", "Note : the Geocoding API may only be used in conjunction with a Google map geocoding results without displaying them on a map is prohibited .", "For some other location the result is correct but for above address its incorrect .", "The goal is to geocode 166 unique countries then join it back to the 188K addresses in df addr .", "I am able to successfully process a batch geocoding request described here geocodeAddresses ArcGIS REST API : World Geocoding Service ArcGIS for Developers using a GET request .", "I have 245 000 coordinates .", "I m using the geocoder https : github.com alexreisner geocoder gem to add geocoding functionality to one of my Active Record model classes .", "here s what I ve tried : .. . .. . Split the address based on commas and geocode each substring and get the marker on the 1st match but this resulted in some huge errors .", "But I still don t understand why the address is not saved in the variable fmtAdd I thought it was a global variable and once the geocode give an value to it I can retrieve that value even out of the geocode function .", "http : maps.googleapis.com maps api geocode json latlng 44.4647452 7.3553838 sensor true http : maps.googleapis.com maps api geocode json latlng 44.4647452 7.3553838 sensor true .. . .. . I tried getting formatted address but it return undefined .", "Be careful with that because you can t use the geocode service without displaying results on a Google map", "Currently I am using geocode API http : code.google.com apis maps documentation geocoding index.html for getting lat long for these locations but there is a limitation that only 2500 locations are to be processed in a single day .", "When you execute the code List Address addresses getAddresses it retrieves a list of providers each supplying their own data .", "Is this something different than the Geocoding API", "Quote : The Geocoding API may only be used in conjunction with a Google map geocoding results without displaying them on a Google map is prohibited .", "Lat lng coordinates", "I want to translate these coordinates to city name .", "http : www.myjoom.com products geocode-factory-3 103-sobipro-map-search .. . .. . Please note that this is a paid plugin so you should be able to get support from myJoom on this which most probably will be way better that generic support here .", "This works if you only care about the return-value of : geocode .", "i want to get the value of the status element from geocode url .", "I am using two permission in my manifest uses-permission android : name android.permission.ACCESS FINE LOCATION uses-permission android : name android.permission.ACCESS CORSE LOCATION I am getting current location latitude 0.0 and longitude 0.0", "I installed joomla 2.5 and Geocode Factory 3 with Sobipro I set any parameters and installed madules and pluggings but i cant see map in search page", "I am using this geocoder in the shell under Ubuntu to geocode with Baidu api : .. . .. . http : geocoder.readthedocs.org en stable providers Baidu.html .. . .. . How can I write a macro to run this api on cells in Excel", "After downloading Tweepy and using it s basic function of searching keywords I wanted to expand and search for only geotagged tweets based on a certain geographic location .", "Instead of using Geocoder you can use Geocoding Api .", "Here s some code I have that uses a geocoding service .", "If you continue to exceed this limit your access to the Geocoding API may be blocked .", "You can get formatted address like this Ajax Success", "If you want to geocode a point on a map after you tap on it you need to do the following .", "I would like to obtain the formatted address from the json data returned from the following query-string by using javascript .", "QUESTION : how can one get this data to save to the DB", "finding lat long for an address .", "What I m thinking of doing now is : .. . .. . geocode the zip-code using yahoo maps API but the only problem is I don t think it will be close to what the user has entered as his address .", "I found two geocode algorithms which seems to be a good option : geohash and olc open location code .", ".. . .. . answering comment : .. . .. . I thought it was a global variable and once the geocode give an value to it I can retrieve that value even out of the geocode function .", "I wan t to reverse geocode and get the address in two languages arabic and english so I want to get it in one language then change the language of the API and get the address in the other language as I can t find a parameter to send to geocoder to determine the language .", "I use R regularly for statistical analysis but am slowly trying to move to GIS and Spatial visualization with R . .. . .. . I am trying replicate the geocoding code available at .. . .. . https : github.com smholloway data-mashups-in-r blob master mapping-foreclosures.r L14 .. . .. . Upon running the geocode function however I get the following error message .. . .. . Any suggestions on what should I be doing to make this piece of code work", "Write the new function : .. . .. . Test : getGeoData San Francisco .. . .. . This gives you a list with the same data that s almost but not quite in the same exact format as the list produced by geocode San Francisco ." ] }
{ "confidence": [ 59.74896240234375, 53.767578125, 51.7657470703125, 50.13679504394531, 48.028499603271484, 43.60211181640625, 42.33019256591797, 41.73973083496094, 40.853515625, 38.861412048339844, 38.74584197998047, 38.45718002319336, 38.345558166503906, 38.0445671081543, 36.23686599731445, 36.2307014465332, 35.53857421875, 34.81077575683594, 34.641883850097656, 34.568397521972656 ], "content": [ "Question : I m using the geocoder https : github.com alexreisner geocoder gem to add geocoding functionality to one of my Active Record model classes . This works great but I don t actually want the geocoding to fire during unit tests . I ve tried stubbing out the call to geocode by adding this to my RSpec test : .. . .. . before : each do .. . User.stub : geocode .and return 1 1 end .. . .. . However when I run my tests it still appears to be calling out to geocode . What am I doing wrong FYI this all works if I stub on the instance level e.g . some user.stub instead of User.stub . Comment : are you using geocode in your app like user User.first and then user.geocode Comment : Just fyi another asset to geocode and display google-maps : github.com apneadiving Google-Maps-for-Rails https : github.com apneadiving Google-Maps-for-Rails Comment : Check out my implementation : Gist : gist.github.com 1275502 https : gist.github.com 1275502 My notes : code-snippets.paveltyk.info snippets 80 http : code-snippets.paveltyk.info snippets 80 .. . Answer : If you want to use stubbing on the instance level you should use other mocking framework than RSpec s . It s mocha for example add the following to spec spec helper.rb : .. . .. . http : rspec.info documentation mocks other frameworks.html .. . .. . Now you can use any instance in your tests : Comment : Or use RSpec 2.6 which itself implements any instance .. . Comment : This works if you only care about the return-value of : geocode . But the geocoder module actually updates the latitude and longitude of the object . How would I stub that out Comment : In fact the code you gave works with RSpec 2.6 but not with Mocha . Comment : @harrism a little late but I decided to approach it like this stubbing latitude and longitude in addition to the main geocode method : Restaurant.any instance.stub : geocode .and return 1 1 Restaurant.any instance.stub : latitude .and return 1 Restaurant.any instance.stub : longitude .and return 1", "Question : null .. . Answer : Using the geocoder to convert an address to latitude-longitude coordinates . This is being done from javascript and using the Wavemaker design tool - 6.x . Basically getting the latitude and longitude works in the coding below . What I am trying to do is to take the LAT LONG converted and save it to the database . When using the geocoding functionality it returns the values in the form of a callback . Again I can get the values with no problem . The problem arises when trying to get these values to be stored into the database . In wavemaker I set the values on the form using this .. . .. . .. . loclatitudeEditor1.setDataValue latitude .. . loclatitudeEditor1.setDisplayValue latitude .. . loclongitudeEditor1.setDataValue longitude .. . loclongitudeEditor1.setDisplayValue longitude .. . .. . and then try to save the values to the database using this .. . .. . .. . customerLiveForm1.saveData .. . .. . The problem is that when using the customerLiveForm1.saveData code it stalls out . I have to hit Cancel to get anything going again . This part is seen below in AREA ONE .. . .. . I then try to place the code in AREA TWO but 0 s are inserted into the database for LAT LONG . QUESTION : how can one get this data to save to the DB customerSaveButtonClick : function inSender .. . .. . alert got in here .. . try .. . .. . alert going into code .. . .. . var address this.addressEditor1.getDisplayValue + + this.cityEditor1.getDisplayValue + + this.zipcodeEditor1.getDisplayValue .. . .. . alert address .. . var longitude 0 .. . var latitude 0 .. . var geocoder new google.maps.Geocoder .. . .. . klong 0 .. . geocoder.geocode .. . address : address .. . function results status .. . .. . if status google.maps.GeocoderStatus.OK .. . .. . latitude results 0 .geometry.location.lat .. . longitude results 0 .geometry.location.lng .. . .. . alert LATITUDE IS + latitude + LONGITUDE IS + longitude .. . .. . loclatitudeEditor1.setDataValue latitude .. . loclatitudeEditor1.setDisplayValue latitude .. . loclongitudeEditor1.setDataValue longitude .. . loclongitudeEditor1.setDisplayValue longitude .. . .. . AREA ONE stalls : customerLiveForm1.saveData .. . .. . .. . .. . .. . OLDSETUPONCLICK - customerLiveForm1.saveDataIfValid .. . .. . AREA TWO saves 0 s for lat long : this.customerLiveForm1.saveData .. . catch e .. . console.error ERROR IN customerSaveButtonClick : + e .. . alert ERROR IN customerSaveButtonClick : + e .. . .. . .. . .. . end : 0", "Question : null .. . Answer : I have been using the GMLib for Google Maps operations for some years now without any problems and have made some interesting things if I must say so . But now I am working on another project where I have a full address and needs to geocode that but I don t need to show it on a map since I just need the latitude and longitude to calculate a QRA locator it is a system of map grids used by HAM operators all over the world .. . .. . I think I could speed up the process by not using a map since it takes time to load every time . Are there any components or libraries that could help me or isn t it possible to do at all . Comment : Is the following what you are asking Google Maps API - Get Coordinates of address http : stackoverflow.com questions 3652951 google-maps-api-get-coordinates-of-address Comment : Also take a look at this http : wiki.openstreetmap.org wiki Nominatim . No Delphi examples as not in my previous comment so you would have to figure out how to use these services . Comment : Be careful with that because you can t use the geocode service without displaying results on a Google map See polices of geocoding api https : developers.google.com maps documentation geocoding policies Comment : OK - I don t want to be violating any policies so I will have ti stick with the way I do it for now . Maybe some day I will find another solution that could add a bit of speed .", "Question : I have this in my shop.rb : .. . .. . And in my shops controller.rb : .. . .. . Now when the user first creates the entry the address is geocoded with latitude and longitude saved to the database . But when the user updates the address the latitude and longitude will not be geocoded anymore and thus still using the old latitude and longitude which is the first save . How do I write to have Rails re-geocode everytime an entry is update I can t depend on just the address because there is a bug in geokit that when I try to show multiple maps based on address only the last one is shown . I m using geokit Gmaps Google Maps.. . Thanks . .. . Answer : If the user changes their address can t you essentially handle it the same way as a new address You basically have 2 new addresses you just need to link the newly created address with the user s account and everything should work . Comment : No it s not user s address . It s a shop s address . Let s say initially a shop s address is saved with info on city and country the geocode will be based on that city and country . But when it s updated with a more precise address with street name then geocode should update the longitude and latitude .", "Question : I have this in my shop.rb : .. . .. . And in my shops controller.rb : .. . .. . Now when the user first creates the entry the address is geocoded with latitude and longitude saved to the database . But when the user updates the address the latitude and longitude will not be geocoded anymore and thus still using the old latitude and longitude which is the first save . How do I write to have Rails re-geocode everytime an entry is update I can t depend on just the address because there is a bug in geokit that when I try to show multiple maps based on address only the last one is shown . I m using geokit Gmaps Google Maps.. . Thanks . .. . Answer : I put this in my model :", "Question : I have a range defined by an intersection and a number of feet away from the intersection . e.g . 100 ft north of Washington St . 5th St . to 300 ft south of Washington St . 6th St . .. . .. . I am looking to geocode this into a lat long pair . However I cannot see any way to get Google Maps API or Virtual Earth etc . to do this . They will happily geocode the intersection but not the distance away . I can t just add 100 ft because the road doesn t necessarily go exactly straight or exactly in a cardinal direction . I investigated getting the polyline that describes the road but am not having much luck with obtaining that either from Google VEarth . I looked at TIGER LINE from the US Census but their data is very inaccurate . Can anyone make a suggestion for how to geocode this This is for a public map so any of the free APIs from Google Microsoft etc . should be fine . Ultimately by the way I m looking for an actual street-address rather than coordinates . I want to know that the range in the example I gave above for instance would be 508 to 563 Washington St . .. . Answer : I ended up taking a different approach -- rather than geocoding to house numbers I use percentage up the street . I can therefore get away with calculating the length of the street and then determining how far up the street the geocoded coordinates are .", "Question : OK I m at half-wit s end . I m geocoding a dataframe with geopy . I ve written a simple function to take an input - country name - and return the latitude and longitude . I use apply to run the function and it returns a Pandas series object . I can t seem to convert it to a dataframe . I m sure I m missing something obvious but I m new to python and still RTFMing . BTW the geocoder function works great . I also tried .. . .. . I get a single dataframe with no index and a single colume with the series in it . I ve tried a number of other methods including applymap : .. . .. . which returned an error after a long time : .. . .. . ValueError : Columns must be same length as key .. . .. . I ve also tried manually converting the series to a dataframe using the df.from dict df geo in method without success . The goal is to geocode 166 unique countries then join it back to the 188K addresses in df addr . I m trying to be pandas-y in my code and not write loops if possible . But I haven t found the magic to convert series into dataframes and this is the first time I ve tried to use apply . Thanks in advance - ancient C programmer Comment : what does type df geo in say at different points is it a dataframe or a series in any event you might be wanting df geo in.fromdict df has no meaning unless you defined it. . You might need pd.DataFrame df geo in .. . Answer : I m assuming that df geo is a df with a single column so I believe the following should work : .. . .. . change : .. . .. . to .. . .. . then you should be able to assign like so : .. . .. . What you tried to do was assign the result-of applymap to 2 new columns which is incorrect here as applymap is designed to work on every element in a df so unless the lhs has the same expected shape this won t give the desired result . Your latter method is also incorrect because you drop the duplicate countries and then expect this to assign every country geolocation back but the shape is different . It is probably quicker for large df s to create the geolocation non-duplicated df s and then merge this back to your larger df like so : .. . .. . this will create a df with non duplicated countries with geo location addresses and then we perform a left merge back to the master df . Comment : Thank You That solved it Now I just need to better understand why . Comment : If my answer resolved your question you can accept it there will be an empty tick mark at top left of my answer", "Question : OK I m at half-wit s end . I m geocoding a dataframe with geopy . I ve written a simple function to take an input - country name - and return the latitude and longitude . I use apply to run the function and it returns a Pandas series object . I can t seem to convert it to a dataframe . I m sure I m missing something obvious but I m new to python and still RTFMing . BTW the geocoder function works great . I also tried .. . .. . I get a single dataframe with no index and a single colume with the series in it . I ve tried a number of other methods including applymap : .. . .. . which returned an error after a long time : .. . .. . ValueError : Columns must be same length as key .. . .. . I ve also tried manually converting the series to a dataframe using the df.from dict df geo in method without success . The goal is to geocode 166 unique countries then join it back to the 188K addresses in df addr . I m trying to be pandas-y in my code and not write loops if possible . But I haven t found the magic to convert series into dataframes and this is the first time I ve tried to use apply . Thanks in advance - ancient C programmer Comment : what does type df geo in say at different points is it a dataframe or a series in any event you might be wanting df geo in.fromdict df has no meaning unless you defined it. . You might need pd.DataFrame df geo in .. . Answer : Always easier to test with some sample-data but please try the following zip function to see if it works .", "Question : I have a data base of 1.5 lac USA locations and for each location I have to find latitude lat and longitude long . Currently I am using geocode API http : code.google.com apis maps documentation geocoding index.html for getting lat long for these locations but there is a limitation that only 2500 locations are to be processed in a single day . But it would be very time consuming to fetch the lat long for 1.5 lac locations with that as it would take around 45 days to complete this task . Is there any other API available for getting the lat long for these 1.5 lac USA locations in a single day . Thanks in Advance . Regards .. . .. . Arun Kumar Comment : I m still don t sure what LAC of the many LACs you mean : en.wikipedia.org wiki LAC disambiguation http : en.wikipedia.org wiki LAC disambiguation Comment : @Martin Thurau -- hi Martin . As you know 10 lacs 1 million . so number of locations that i am refereeing here are 0.15 million . Comment : I didn t know about the lac or Lakh . en.wikipedia.org wiki Lakh http : en.wikipedia.org wiki Lakh Learned something everyday.. . .. . Answer : try this .. . .. . http : www.gpsvisualizer.com geocoder .. . .. . http : www.batchgeo.com en .. . .. . then store the geopostions in a database", "Question : According to Google Map s Geocode API documentation : .. . .. . https : developers.google.com maps documentation geocoding index GeocodingRequests .. . .. . you can simply make a call to the geocode request address like this : .. . .. . http : maps.googleapis.com maps api geocode json address 1600+Amphitheatre+Parkway +Mountain+View +CA sensor false http : maps.googleapis.com maps api geocode json address 1600+Amphitheatre+Parkway +Mountain+View +CA sensor false .. . .. . However according to this section https : developers.google.com maps documentation geocoding index Limits there is a usage limit of 2500 requests per day . Because the request url doesn t contain any type of API key parameter how is Google tracking the query limit Is it simply by the client s IP address I have a Google Maps API v3 key which says that there is a Courtesy limit : 25 000 requests day . Is this something different than the Geocoding API Or can I somehow use my Google Maps API key with the Geocoding API so that I can potentially do more than 2500 requests per day Comment : Why in the world would a question about software API request limits be considered off topic .. . Answer : Yes it is by ip-address . 25 000 is for map loads per day .. . .. . 2 500 is for geocodes per day .. . .. . If you want more you need to get an account with them and last I checked it cost 10 000 to start . Comment : Okay if it s by IP address then 2500 is more than fine . Thanks", "Question : This question is regarding the google Maps API geocoding I m able to geocode an address and show the location but this works when the address is valid . When it s not valid there is an error right now I m showing a smart message which says there is an error retrieving the location but the requirement is to show the nearest possible location to the entered address . How do I get the marker on next best location here s what I ve tried : .. . .. . Split the address based on commas and geocode each substring and get the marker on the 1st match but this resulted in some huge errors . What I m thinking of doing now is : .. . .. . geocode the zip-code using yahoo maps API but the only problem is I don t think it will be close to what the user has entered as his address . Any solutions Comment : +1 Finding the nearest location of a location you can t find sounds hard : Giggle Comment : haha yes it s very funny what clients expect wish I could mail them your comment : .. . Answer : Tarun i am not sure which google-api you are using . But Google geocoding api does allow for partial address searches and returns matches sorted by best fit . So displaying best location should be really simple . Take a look at this link below . It returns xml but you can ask for json by replacing xml in url with json . All you have to do insert your partial address in this url . http : maps.googleapis.com maps api geocode xml address holly 20hall sensor false http : maps.googleapis.com maps api geocode xml address holly 20hall sensor false .. . .. . So if this url doesnt give you any results then its probably safe to assume that address doesn t exist . Hope that hepls Comment : just started working on it so probably missed it while a quick read through the API doc will give that a try and acknowledge : Comment : thanks a lot it s working when I tried it manually just need to implement it now Comment : great i am glad it worked for you Comment : cool thanks a lot", "Question : I m using the geocoder https : github.com alexreisner geocoder gem to add geocoding functionality to one of my Active Record model classes . This works great but I don t actually want the geocoding to fire during unit tests . I ve tried stubbing out the call to geocode by adding this to my RSpec test : .. . .. . before : each do .. . User.stub : geocode .and return 1 1 end .. . .. . However when I run my tests it still appears to be calling out to geocode . What am I doing wrong FYI this all works if I stub on the instance level e.g . some user.stub instead of User.stub . Comment : are you using geocode in your app like user User.first and then user.geocode Comment : Just fyi another asset to geocode and display google-maps : github.com apneadiving Google-Maps-for-Rails https : github.com apneadiving Google-Maps-for-Rails Comment : Check out my implementation : Gist : gist.github.com 1275502 https : gist.github.com 1275502 My notes : code-snippets.paveltyk.info snippets 80 http : code-snippets.paveltyk.info snippets 80 .. . Answer : it s .. . .. . with mocha .", "Question : I m trying to use the geocode function from the ggmaps library in R to get coordinates for specific locations . I m able to use the function fine so far . The issue I m running into is that I would like to increase my daily limit from 2 500 to 100 000 . The official Google documentation https : developers.google.com maps documentation geocoding usage-limits says that this is readily possible if you enable billing on the project which I m happy to do . When you proceed with this process the Google Developers Console gives you a personalized API key . However the geocode function doesn t have an option to put in this personalized API key . Instead it asks for the client client ID for business users and signature signature for business users which is how Google Maps API for Work https : developers.google.com maps documentation business customers can access the API . I get that this is also an option but that seems to be a very use-case since Google Maps API for Work seems to be designed for large enterprise accounts : .. . .. . Daily quota starting at 100 000 requests per 24 hours based on annual contractual purchase . So my question boils down to this : can I use the geocode function from the ggmaps library in R to ping the Google Maps Geocoding API .. . Answer : I didn t find a way to use the existing geocode function from the ggmap library to answer this question so I just created a new function to just do this myself using the existing getURL function from the RCurl library and the fromJSON function from the RJSONIO library . Write the new function : .. . .. . Test : getGeoData San Francisco .. . .. . This gives you a list with the same data that s almost but not quite in the same exact format as the list produced by geocode San Francisco .", "Question : I would like to use the Bing API to batch geocode . I found a package on github at https : github.com gsk3 taRifx.geo blob master R Contributed.R however I cannot seem to figure out how to use its function on a vector . When I try the following everything works just fine : .. . .. . But if I replaced the location with a vector of locations only a single coordinate pair is returned and the following warning is returned : .. . .. . Warning message : In if is.na x gsub x return c NA NA : the condition has length 1 and only the first element will be used .. . .. . I also tried the following alternative function but again only a single pair of coordinates is returned . With ggmap s geocode I m able to run this process on a vector but it s API is limited to 2500 queries day so I m stuck trying to use Bing Yahoo api is too difficult to obtain . Any help is much appreciated . Comment : Loop it with something like lapply data location geocode service bing returntype coordinates . Alternately check out ggmap : : geocode which can take a vector e.g . ggmap : : geocode c dc nyc la .. . Answer : Without having used the package in question it looks like the geocode function isn t vectorised . A quick fix is to make it vectorised : Comment : Thanks that seems to do it", "Question : I have a list of latitude and longitude coordinates and wish to find out which country they all reside in . I modified an answer from this question about lat-long to US states http : stackoverflow.com questions 8751497 latitude-longitude-coordinates-to-state-code-in-r and have a working function but I run into the problem that the worldHires map from the mapdata package is hideously out of date and contains a lot of obsolete countries such as Yugoslavia and the USSR . How would I modify this function to use a more modern package such as rworldmap I have only managed to frustrate myself so far.. . Comment : The maps package is now updated with new countries . No more USSR or Yugoslavia etc . .. . Answer : You can use my geonames package to lookup from the http : geonames.org service : .. . .. . Get it from r-forge because I m not sure I bothered to release it to CRAN : .. . .. . https : r-forge.r-project.org projects geonames .. . .. . Yes it depends on an external service but at least it knows what happened to communism.. . :", "Question : i have set up a graphhopper server it work perfectly . direction http api working well . but geocode API not found anything . i use a docker-container : https : hub.docker.com r sogorkis graphhopper initialized with an osm.pbf file . that s sounds like it missing a config step.. . .. . .. . could you help me .. . Answer : Geocoding is supported by another external program in the case of GraphHopper Maps https : graphhopper.com maps it is the GraphHopper Geocoding API https : github.com graphhopper directions-api blob master docs-geocoding.md . GraphHopper only does routing also the maps are not served from GraphHopper just external services .", "Question : I have a data base of 1.5 lac USA locations and for each location I have to find latitude lat and longitude long . Currently I am using geocode API http : code.google.com apis maps documentation geocoding index.html for getting lat long for these locations but there is a limitation that only 2500 locations are to be processed in a single day . But it would be very time consuming to fetch the lat long for 1.5 lac locations with that as it would take around 45 days to complete this task . Is there any other API available for getting the lat long for these 1.5 lac USA locations in a single day . Thanks in Advance . Regards .. . .. . Arun Kumar Comment : I m still don t sure what LAC of the many LACs you mean : en.wikipedia.org wiki LAC disambiguation http : en.wikipedia.org wiki LAC disambiguation Comment : @Martin Thurau -- hi Martin . As you know 10 lacs 1 million . so number of locations that i am refereeing here are 0.15 million . Comment : I didn t know about the lac or Lakh . en.wikipedia.org wiki Lakh http : en.wikipedia.org wiki Lakh Learned something everyday.. . .. . Answer : You could try Google Maps API for Business https : developers.google.com maps licensing which gives you 100K a day . Comment : Thanks for ur reply . But i have found Yahoo Maps Place Finder API that is free and process 50K locations in day . Here is the link for that developer.yahoo.com geo placefinder http : developer.yahoo.com geo placefinder", "Question : I m trying to use the geocode function from the ggmaps library in R to get coordinates for specific locations . I m able to use the function fine so far . The issue I m running into is that I would like to increase my daily limit from 2 500 to 100 000 . The official Google documentation https : developers.google.com maps documentation geocoding usage-limits says that this is readily possible if you enable billing on the project which I m happy to do . When you proceed with this process the Google Developers Console gives you a personalized API key . However the geocode function doesn t have an option to put in this personalized API key . Instead it asks for the client client ID for business users and signature signature for business users which is how Google Maps API for Work https : developers.google.com maps documentation business customers can access the API . I get that this is also an option but that seems to be a very use-case since Google Maps API for Work seems to be designed for large enterprise accounts : .. . .. . Daily quota starting at 100 000 requests per 24 hours based on annual contractual purchase . So my question boils down to this : can I use the geocode function from the ggmaps library in R to ping the Google Maps Geocoding API .. . Answer : Thanks for this It helped me along immensely . Your solution is pretty specific so I wanted to include the adaptations I made of your function . It threw bugs because raw data and geo data list are undefined . I m guessing these were specific to your local environment . For me inputting a location and returning the lat lon worked with this : .. . .. . You can modify the return statement to index into geo data to get different properties other than lat lon too . Hope this helps someone . R", "Question : When I try to geocode one of the adress using google geocode api google-api returning incorrect location . Search address : republic of estonia result from google-api : spain . I am using javascrip google-api to geocode the address . For some other location the result is correct but for above address its incorrect . If We enter below url in browser we get the jason back and it is showing result somewhere in spain rather than showing result in Estonia . http : maps.googleapis.com maps api geocode json address republic 20of 20estonia .. . .. . I tried same addres in maps.google.com and it takes me to correct location . Thanks for your help in advance . .. . Answer : Have a look at the Estonia country feature in Map Maker : .. . .. . https : www.google.com mapmaker iwloc 0 0 fmi 0 0 gw 39 fid 5085290329182063613 : 4677726785527621059 dtab overview ll 58.620408 24.93212 spn 3.101226 8.668213 z 7 lyt large map v3 htll 58.560236 25.449737 hyaw 278.7642140009582 https : www.google.com mapmaker iwloc 0 0 fmi 0 0 gw 39 fid 5085290329182063613 : 4677726785527621059 dtab overview ll 58.620408 24.93212 spn 3.101226 8.668213 z 7 lyt large map v3 htll 58.560236 25.449737 hyaw 278.7642140009582 .. . .. . If you check the list of names for this feature you will see that there is no Republic of Estonia in the list . The name is simply Estonia . The request for Estonia works as expected : .. . .. . https : maps.googleapis.com maps api geocode json address estonia key YOUR API KEY https : maps.googleapis.com maps api geocode json address estonia key YOUR API KEY .. . .. . If you believe that Republic of Estonia must be in the list of the names please Send a feedback bottom right corner to Google from this page .. . .. . https : www.google.com maps place Estonia @58.7223142 23.1414399 7z data 4m5 3m4 1s0x4692949c82a04bfd : 0x40ea9fba4fb425c3 8m2 3d58.595272 4d25.013607 hl en", "Question : null .. . Answer : I have 3 sets of latitude and longitude stored in FirebaseDatabase . What I am doing is I am retrieving these stored sets and showing location address using them . Here s my code : .. . .. . Here s GeocodeAddressIntentService.java file s code : .. . .. . What s going wrong is that the name of location is not getting shown according to every sets of latitude and longitude but according to the last latest saved set of latitude and longitude . Please let me know how can I show location address according to every set of latitude and longitude retrieved from the database Comment : Add Log statements to onChildAdded onHandleIntent deliverResultToReceiver and your ResultReceiver s onReceiveResult to show intermediate results and to give you some understanding of the execution flow . With those insights you can probably solve this problem yourself . If not post the logcat output . Comment : I think they are all getting sent but only the last one is being displayed because you are only storing setting the last value . Instead of using a ChildEventListener you could use ValueEventListener and then send all of the values at one time ." ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION
dynatrace@.net@100
dynatrace -- dynatrace is an application performance management apm tool which can instrument java @placeholder and php code .
{ "confidence": [ 60.581024169921875, 52.055015563964844, 50.44378662109375, 48.61851501464844, 47.59210205078125, 47.18670654296875, 46.86619186401367, 46.86619186401367, 46.86619186401367, 46.86619186401367, 46.26698303222656, 45.5590934753418, 45.40345764160156, 45.35063171386719, 45.073429107666016, 44.58258819580078, 43.86566925048828, 42.9993896484375, 42.615806579589844, 42.59242248535156, 42.59242248535156, 42.59242248535156, 42.323699951171875, 41.122711181640625, 40.99514389038086, 40.799659729003906, 40.799659729003906, 40.799659729003906, 39.685699462890625, 39.274139404296875, 39.274139404296875, 39.274139404296875, 39.274139404296875, 39.274139404296875, 39.274139404296875, 39.274139404296875, 38.066993713378906, 37.518890380859375, 37.48450469970703, 37.48137664794922, 37.48137664794922, 37.48137664794922, 36.861270904541016, 36.861270904541016, 36.292049407958984, 36.07522201538086, 35.71197509765625, 35.238494873046875, 34.866607666015625, 34.83778762817383, 34.80443572998047, 34.80443572998047, 34.80443572998047, 34.80443572998047, 34.80443572998047, 34.80443572998047, 34.80443572998047, 34.80443572998047, 34.68492889404297, 34.21112823486328, 34.0450553894043, 33.879180908203125, 33.860801696777344, 33.67228698730469, 33.339359283447266, 33.01167297363281, 33.01167297363281, 33.01167297363281, 32.58146286010742, 32.068878173828125, 31.822341918945312, 30.396900177001953, 30.396900177001953, 30.396900177001953, 30.396900177001953, 30.27611541748047, 30.223031997680664, 28.724788665771484, 26.528724670410156, 26.430561065673828, 25.758445739746094, 25.05876922607422, 24.597421646118164, 24.47254180908203, 23.877506256103516, 23.744525909423828, 23.619441986083984, 22.696372985839844, 22.68716049194336, 22.22671890258789, 22.183378219604492, 22.08474349975586, 21.91693115234375, 21.596921920776367, 21.284931182861328, 19.888851165771484, 19.837444305419922, 19.622432708740234, 19.60964584350586, 19.574308395385742 ], "content": [ "It is produced by DynaTrace APM .", "I myself do not know of DynaTrace APM but I would argue that this whole question pertains to it specifically in that these figures are peculiar to the way DynaTrace APM calculates the figures .", "I am looking for the performance metrics that can be monitored using Dynatrace Application Monitoring tool .", "Dynatrace has published a tool which supposed to do it automatically .", "In simple words DynaTrace is able to instrument Java code creating trace with some statistical information .", "The question is on which Dynatrace version you are on", "Dynatrace has a concept of Measures .", "without installing Dynatrace", "Is it possible using dynatrace or not", "I m not registered user on dynatrace .", "This is problem with dynatrace not supporting java-8 bytecode properly .", "I have a Weblogic server which has Memory Utilization MU taken from DynaTrace APM as shown in below table .", "Is there another place in DynaTrace that I can get this information", "Just heard and verifying about APM Dynatrace tool i would like to know much more and many details on this .", "I m spending sometime with DynaTrace .", "Problem .. . .. . We use Dynatrace to monitor our application .", "I experimented executing the script with dynatrace headers and without dynatrace headers .", "Also I d recommend editing the question to reflect that the figures come from DynaTrace APM since that s the only context in which the question can be meaningfully answered .", "You can either .. . .. . disable dynatrace .. . try to configure dynatrace to not process java.lang classes .. . ignore the messages .. . contact dynatrace about possible upgrade or configuration option to address this", "But I m not able to find critical information in DynaTrace .", "Dynatrace allows you to capture POST Headers .", "Also no logs exist the Dynatrace Agent log directory .", "The latest version of Dynatrace does support Java 8 Bytecode .", "Basically I m using session attributes from an application session not a Dynatrace stored session .", "My trouble there is the customer sees high Suspension Time in their Dynatrace tool .", "Dynatrace actually doesnt rely on information from beans .", "the agent is installed in your program files dynatrace directory .", "But need to solve this issue without disabling the dynatrace .", "With Dynatrace DC RUM you may choose one of two approaches of monitoring EBS performance .", "The problem is I have no clue on how to push data from dynatrace to a server .", "My company is starting to use DynaTrace to monitor some of our apps .", "I m not administering the DynaTrace server so I only have access to the client .", "Currently I have installed the DynaTrace agent server and collector .", "Dynatrace server is running locally at port 9998 and the agent library exists in the agentpath .", "I m trying to convert my JMeter script into dynatrace aware one .", "Could you post this question on our Dynatrace Discussion Form", "I am trying to use dynatrace as a source for flume and hadoop as sink where dynatrace and flume is on same server and hadoop is on another server .", "You just sign up for the free trial - dynatrace.com en products dynatrace-personal-license.html http : www.dynatrace.com en products dynatrace-personal-license.html - and you automatically get an account .", "I ve been experimenting with custom measures and business transactions in DynaTrace 6.1 to retrieve information from a session .", "Here are some things to check a Does the dynatrace agent connect for that 4th machine", "I know my username and password is correct have logged into the Dynatrace Portal .", "UPDATE : .. . .. . Issue fixed when we disabled dynatrace in the server .", "But is there any single place where I can find the comprehensive list of metrics in Dynatrace", "make sure your play server can connect to ubuntu on port 9998 - assuming that this is the machine where the dynatrace server is installed .", "We use dynatrace for monitoring and it generates a lot of monitoring data .", "We have dynatrace installed in our 4 servers but out of 4 server 1 server is behaving weird after installing Dynatrace the asp.net application is not working it is not loading any JS file css file ..but same application is just working fine on other servers I can t see any difference in servers .", "If you have tool specific questions on Dynatrace APM I suggest you post them on our APM Open Q A Discussion forum https : answers.dynatrace.com spaces 148 index.html : .. . .. . I also have a YouTube Tutorial on Memory Analysis with Dynatrace https : www.youtube.com watch v SWy83EW xhk list PLqt2rd0eew1bmDn54E2 M2uvbhm WxY 6 index 34 in case thats of interest .", "I m starting my Play application like this : .. . .. . I also tried adding the same to the JAVA OPTS : .. . .. . In both cases the Dynatrace server did not recognize any agents .", "I have added 150 tagged web requests dynatrace headers .", "My recipe installs the dynatrace module and enables it : .. . .. . include recipe dynatrace : : wsagent package .. . .. . apache2 module dtagent module do module name dtagent module filepath node dynatrace apache wsagent linux agent path action : enable end .. . .. . My spec file contains the following : .. . .. . it creates opt dynatrace agent lib64 libdtagent.so file do expect chef run .to render file opt dynatrace agent lib64 libdtagent.so end .. . .. . When I run Rspec it fails with the following error : .. . .. . rspec -f d . spec unit recipes apache spec.rb 1 : 4 .. . .. . Run options : include : ids . spec unit recipes apache spec.rb 1 : 4 .. . .. . dynatrace : : apache creates opt dynatrace agent lib64 libdtagent.so file FAILED - 1 .. . .. . Failures : .. . .. . 1 dynatrace : : apache creates opt dynatrace agent lib64 libdtagent.so file Failure Error : expect chef run .to render file opt dynatrace agent lib64 libdtagent.so expected Chef run to render opt dynatrace agent lib64 libdtagent.so . spec unit recipes apache spec.rb : 35 : in block 2 levels in .. . .. . Finished in 1.13 seconds files took 8.93 seconds to load 1 example 1 failure .. . .. . Failed examples : .. . .. . rspec . spec unit recipes apache spec.rb : 34 dynatrace : : apache creates opt dynatrace agent lib64 libdtagent.so file .. . .. . ChefSpec Coverage report generated.. . .. . .. . Total Resources : 1 Touched Resources : 0 Touch Coverage : 0.0 .. . .. . Untouched Resources : .. . .. . apache2 module dtagent module dynatrace recipes apache.rb : 12 .. . .. . ChefSpec Coverage report generated.. . .. . .. . Total Resources : 1 Touched Resources : 0 Touch Coverage : 0.0 .. . .. . Untouched Resources : .. . .. . apache2 module dtagent module dynatrace recipes apache.rb : 12 .. . .. . Need some help in identifying the issue causing my spec failure .", "A lot of these questions are already answered there : https : community.compuwareapm.com community display DTFORUM dynaTrace+Forums+Home", "I d like to be able to get some data from dynatrace and put the data in the webserver through some cronjob .", "You have to inform dynaTrace about the specific parameter s you want to collect .", "Also - take advantage of our online community portal and our discussion forums for dynatrace releated questions : community.dynatrace.com http : community.dynatrace.com", "I want to monitor oracle ebs 11i oracle db 11g simultaneously during load test through dynatrace .", "Did you see the doc page on Dynatrace Load Runner Integration https : community.dynatrace.com community display DOCDT62 LoadRunner+Integration", "I needed to add the addDynatraceHeader function in the Globals.H file ussually this is automatically done by Dynatrace on the Patch LoadRunner script utility .", "After running above in terminal i end up with new script looking exactly the same - dynatrace headers are not being applied .", "In My organization we are using a performance tracking tool named Dynatrace Which says there are some errors when we open BIRT reports i am not getting any idea from where this tool is hunting down this below issue .", "I m looking to make the following code work somehow it seems if i do not test the files folders first I end up with the error : .. . .. . Error : Failed to apply catalog : Parameter path failed on File opt dynatrace-6.2 : File paths must be fully qualified not opt dynatrace-6.2 opt dynatrace-5.6.0 opt rh httpd24 root etc httpd conf.d dtload.conf opt rh httpd24 root etc httpd conf.d 01 dtagent.conf at newrelic.pp : 35 .. . .. . The pertinent parts", "You can get the current installers from here https : community.compuwareapm.com community display EVAL Step+1+-+Download+and+install+dynaTrace .. . .. . Please also check out our community portal where we have a dedicated discussion forum for dynatrace related questions : https : community.compuwareapm.com community display DTFORUM dynaTrace+Forums+Home .. . .. . Andi", "Both storage systems can be accessed via the Web Interface or via the Dynatrace Rich Client .", "I know we can monitor oracle db using dynatrace but did not find how to Identify what areas or modules e.g .", "Dynatrace provides a REST Reporting interface where you can pull out any data from dynatrace that you can put on a dashboard and get it in something consumable such as CSV XML JSON .. . - here is the link-to the public doc page on the reporting interface : https : community.compuwareapm.com community display DOCDT61 Server-+and+Clientside+XML+Reporting .. . .. . So - what you need to do is the following .. . .. . 1 : Create a dashboard and put your charts on it that show the measures you are interested in e.g : Apache Thread Count CPU Throughput .. . .. . .. . 2 : Save that dashboard on your dynatrace server .. . .. . 3 : Use the REST interface to query that data and put it into your external system .. . .. . if you have more questions on this feel free to also post them on our own Dynatrace community forum : https : community.compuwareapm.com community display DTFORUM dynaTrace+Forums+Home .. . .. . Andi", "Dynatrace stores all this data in its own Session Storage file system as well as in the so called Performance Warehouse SQL Storage .", "There is a feature really interesting : when a call to an external JVM is execute DynaTrace is able to link this new trace to the caller one i.e .", "If Dynatrace shows a red exclamation mark as warning for GC suspension time what is the meaning", "Dynatrace will usually flag your GC in red if you spend more than 15 of the execution-time on garbage collections .", "dynaTrace also monitors your infrastructure and with that allows you to figure out whether your application performance problems are related to infrastructure virtual or physical app server web server app-code database .. .", "also make sure that the collector runs on that machine .. . .. . Any console output in your play app that would show any dynatrace agent output", "I used the Dynatrace auto-instrumentor command on my Android apk file .. . .. . and then signed it with my keystore .", "dynaTrace is a product that helps developers testers and operations to ensure their applications work fast and reliable .", "I am just curious to know dynatrace headers will add up or impact the response in the results .", "Dynatrace showed that the higher response times are associated with a larger amount of time spent in suspension .", "But I see these pretty reasonable times in the GC logs I don t have Dynatrace .", "d check your windows event-viewer for any problems .. . .. . Also - feel free to post your questions on our dynatrace community forum .", "Here are some links for you to check out PureLytics Stream : https : community.dynatrace.com community display DOCDT63 PureLytics+Stream Real Time Data Feed : https : community.dynatrace.com community display PUB Real+Time+Business+Transaction+Feed+for+BigData+Analytics Real Time Data Feed Github Project : https : github.com Dynatrace Dynatrace-Real-Time-Data-Feed-Listener .. . .. . If you have more questions I also suggest to ask them in our Dynatrace disucssion forum : http : answers.dynatrace.com .. . .. . Andi", "But if I try to upgrade an earlier build to this Dynatrace enabled version it always gives me a message", "The core technology of dynaTrace is its PurePath Technology find a video on YouTube which allows it to trace every single transaction web request user interaction batch job .. . from end-to-end browser to database .", "Second question : These statistics are from a APM .", "You can do this via Dashboard - Properties .. . .. . Also - check out my video tutorials on Dashboarding Basics https : www.youtube.com watch v xHmha3MtNYk list PLqt2rd0eew1bmDn54E2 M2uvbhm WxY 6 index 8 and Advanced Dashboarding https : www.youtube.com watch v wRL5JrJB7KI list PLqt2rd0eew1bmDn54E2 M2uvbhm WxY 6 index 19 .. . .. . If you have further questions also make sure you use our Dynatrace Discussion platform on http : answers.dynatrace.com", "You can get to these log files from the agent overview dashlet via the context menu of that agent entry c make sure all 4 IIS AppPools run under the same user account that has privileges to load the dynatrace agent .", "User Action Report From Android App http : i.stack.imgur.com NbDHt.png .. . .. . I couldn t find any way to report Streaming Media as the first image in Android App in Dynatrace docs .", "Otherwise it s still possible to get the performance visibility with our java agent with Application Monitoring solution - but it will work for html UI only not for Oracle Forms .", "DC RUM is intended to constant systematic application performance monitoring .", "APM does more calculation for getting true memory foot print", "You can find a lot of material on our APM Blog - http : apmblog.compuware.com .", "Instead of copying what they posted on our dynatrace community forum feel free to check out their posting here : https : community.compuwareapm.com community display DL Big+Data+Business+Transaction+Bridge focusedCommentId 192087283 comment-192087283 .. . .. . Andi", "You can specify which Session ATtribute to capture .", "So that i can go ahead and advise my management towards to own this tool .", "The author of that conversion tool will then see your comment and can reply .", "How to anlayze the performance of an application based on GC caused suspension time .", "If you put these measures on a chart you can select for which application agent or agent group you want to show them .", "It doesnt break anything in case you only instrument one side either .", "We have a script conversion tool which will also add that method to your header-files .", "We instrument key methods of certain frameworks e.g : Servlet Axis JMS JDBC .. .", "For Java it is the Servlet Sensor .", "In your System Profile you can configure for your Web Server but also Java Tier to capture thes paramters .", "Can you please provide me some references so that I ll be able to see how concurrent manager servers performance metrics are monitored", "For an exact answer I would need to know which JVM Sun IBM . . you are running and also which Java version" ] }
{ "confidence": [ 73.98130798339844, 65.24072265625, 59.19469451904297, 59.010215759277344, 58.75403594970703, 58.314998626708984, 58.124671936035156, 55.99950408935547, 55.767173767089844, 53.018882751464844, 52.83864212036133, 52.0595588684082, 52.00474166870117, 50.267242431640625, 50.036521911621094, 49.93354034423828, 49.74394226074219, 49.18171691894531, 47.36731719970703, 46.76812744140625 ], "content": [ "Question : Just heard and verifying about APM Dynatrace tool i would like to know much more and many details on this . So that i can go ahead and advise my management towards to own this tool . can any one please let me know Thanks . .. . Answer : You can find a lot of material on our APM Blog - http : apmblog.compuware.com . dynaTrace is a product that helps developers testers and operations to ensure their applications work fast and reliable . The core technology of dynaTrace is its PurePath Technology find a video on YouTube which allows it to trace every single transaction web request user interaction batch job .. . from end-to-end browser to database . dynaTrace also monitors your infrastructure and with that allows you to figure out whether your application performance problems are related to infrastructure virtual or physical app server web server app-code database .. . If you are considering continuous-delivery - you may also want to check out the following blog post : http : apmblog.compuware.com 2014 03 13 software-quality-metrics-for-your-continuous-delivery-pipeline-part-i", "Question : I have a Weblogic server which has Memory Utilization MU taken from DynaTrace APM as shown in below table . My understanding of memory utilization is that it is amount of memory used by program . Now it certainly cannot be maximum and minimum because it will not truly represent utilized right so I am going to average out below and I am getting 52 . So does it mean that memory-footprint is 52 Second question : These statistics are from a APM . Now I also I have maximum memory and memory used . If I do simple calculation to calculate memory utilization MU manually by memory-utilized maximum-memory then I do not get exact same figure as given by APM for same time in MU chart . Does it mean that I cannot calculate memory-footprint simply as memory-utilized maximum-memory APM does more calculation for getting true memory foot print So how can I calculate memory foot print on my own Date MU .. . 2016-01-26T15 : 15 : 00 42.47219781 .. . 2016-01-26T15 : 30 : 00 46.03047265 .. . 2016-01-26T15 : 45 : 00 46.54384698 .. . 2016-01-26T16 : 00 : 00 47.25852017 .. . 2016-01-26T16 : 15 : 00 48.60865614 .. . 2016-01-26T16 : 30 : 00 50.23378059 .. . 2016-01-26T16 : 45 : 00 51.82248162 .. . 2016-01-26T17 : 00 : 00 51.95340814 .. . 2016-01-26T17 : 15 : 00 52.77441474 .. . 2016-01-26T17 : 30 : 00 52.83012288 .. . 2016-01-26T17 : 45 : 00 52.85740628 .. . 2016-01-26T18 : 00 : 00 54.01675551 .. . 2016-01-26T18 : 15 : 00 54.40046963 .. . 2016-01-26T18 : 30 : 00 54.79707947 .. . 2016-01-26T18 : 45 : 00 54.9685574 .. . 2016-01-26T19 : 00 : 00 56.83530307 .. . 2016-01-26T19 : 15 : 00 55.7976905 .. . 2016-01-26T19 : 30 : 00 57.44057855 .. . 2016-01-26T19 : 45 : 00 57.22555271 .. . 2016-01-26T20 : 00 : 00 57.19549255 .. . 2016-01-26T20 : 15 : 00 56.95526801 .. . 2016-01-26T20 : 30 : 00 57.41918165 .. . 2016-01-26T20 : 45 : 00 57.93780653 .. . 2016-01-26T21 : 00 : 00 57.42303196 Comment : In a system with virtual-memory there are many ways to try and measure memory utilization . What operating-system is this and what program is it that produces these figures Comment : @Dolda2000 Is a Linux box and stats are for JVM . It is a Weblogic server . Comment : Still where do these figures come from What program is it that produces them There are many ways to calculate memory utilization figures for Java as well . Comment : It is produced by DynaTrace APM . Comment : I myself do not know of DynaTrace APM but I would argue that this whole question pertains to it specifically in that these figures are peculiar to the way DynaTrace APM calculates the figures . Unless there s someone around who knows how it works in detail I d recommend checking its documentation for your answer . Also I d recommend editing the question to reflect that the figures come from DynaTrace APM since that s the only context in which the question can be meaningfully answered . .. . Answer : If you have tool specific questions on Dynatrace APM I suggest you post them on our APM Open Q A Discussion forum https : answers.dynatrace.com spaces 148 index.html : .. . .. . I also have a YouTube Tutorial on Memory Analysis with Dynatrace https : www.youtube.com watch v SWy83EW xhk list PLqt2rd0eew1bmDn54E2 M2uvbhm WxY 6 index 34 in case thats of interest . Comment : Thanks for the comment .", "Question : When trying to deploy an application to a WildFly 8.2 . I am getting the following error and my application is not starting at all . The JDK version is 1.8.0 51 . 016-02-06 09 .. . .. . How can we solve this issue Any help would be greatly appreciated . UPDATE : .. . .. . Issue fixed when we disabled dynatrace in the server . But need to solve this issue without disabling the dynatrace . Comment : Seems to be a known bug but red hat won t let us see the solution . access.redhat.com solutions 1420783 https : access.redhat.com solutions 1420783 Comment : Generally if you wish to use software that parses bytecode with Java 8 you need an up to-date version that can handle Java 8 s bytecode . So the solution obviously has something to do with updating either the entire product or the component responsible for bytecode processing . .. . Answer : This is problem with dynatrace not supporting java-8 bytecode properly . You can either .. . .. . disable dynatrace .. . try to configure dynatrace to not process java.lang classes .. . ignore the messages .. . contact dynatrace about possible upgrade or configuration option to address this Comment : Just want to clarify . The latest version of Dynatrace does support Java 8 Bytecode . The question is on which Dynatrace version you are on", "Question : I am looking for the performance metrics that can be monitored using Dynatrace Application Monitoring tool . If they are categorized for different tiers Web Server Application Server Database Server that would be nice to have . Any help is highly appreciated . Thanks in advance . .. . Answer : Dynatrace has a concept of Measures . Depending on the type of measure e.g : of SQL Calls we tell you which server caused these calls App SErver 1 App Server 2 .. . . For basic monitoring metrics such as CPU Memory Throughput .. . we also capture this for each individual tier . If you put these measures on a chart you can select for which application agent or agent group you want to show them . There is a drop down box in the Measure Selection Dialog . Let me know if you want to know more . Also - feel free to use our own discussion forum on our community . A lot of these questions are already answered there : https : community.compuwareapm.com community display DTFORUM dynaTrace+Forums+Home Comment : I was looking here : community.compuwareapm.com community display DOCDT60 https : community.compuwareapm.com community display DOCDT60 Application+Details ApplicationDetails-Markers It gives some of the metrics . But is there any single place where I can find the comprehensive list of metrics in Dynatrace without installing Dynatrace Comment : Hi . We capture a lot of metrics measures . There is no page that lists of all of them . We cover app metrics such as SQL Exceptions Method Executions Times Web Request Times but also Sys Metrics such as CPU Memory Garbage Collection .. . We discuss lot of these metrics in our blogs as well - here is a good starting point : apmblog.dynatrace.com 2015 01 28 http : apmblog.dynatrace.com 2015 01 28 key-performance-metrics-load-tests-beyond-response-time-part-ii If you need more info let me know . Happy to send you more info", "Question : Currently I have installed the DynaTrace agent server and collector . I m starting my Play application like this : .. . .. . I also tried adding the same to the JAVA OPTS : .. . .. . In both cases the Dynatrace server did not recognize any agents . Am I doing something wrong I m running Ubuntu Linux with Oracle Java 8 . Dynatrace server is running locally at port 9998 and the agent library exists in the agentpath . Also no logs exist the Dynatrace Agent log directory . .. . Answer : make sure your play server can connect to ubuntu on port 9998 - assuming that this is the machine where the dynatrace server is installed . make sure there is no firewall . also make sure that the collector runs on that machine .. . .. . Any console output in your play app that would show any dynatrace agent output Comment : Also - take advantage of our online community portal and our discussion forums for dynatrace releated questions : community.dynatrace.com http : community.dynatrace.com", "Question : I m spending sometime with DynaTrace . I m impressed by its feature related to cross jvm instrumentation . In simple words DynaTrace is able to instrument Java code creating trace with some statistical information . This is nothing new . There is a feature really interesting : when a call to an external JVM is execute DynaTrace is able to link this new trace to the caller one i.e . remote session-bean web-services remote RMI and so on . How could it be possible I m not able to immagine how to implement this feature Any ideas Thank you .. . Answer : This information is normally extracted using MXBeans . Such beans provide a standard API for accessing standard runtime information . Similarly such applications often scan the class loaders for specific classes and extract relevant information by hard-coded access . This is why less popular solutions are often not supported by monitoring tools .", "Question : I m trying to convert my JMeter script into dynatrace aware one . Dynatrace has published a tool which supposed to do it automatically . Link to the source : https : community.dynatrace.com community display DL JMeter+Integration .. . .. . I m wondering if there is anyone there who has tried to do it . After running above in terminal i end up with new script looking exactly the same - dynatrace headers are not being applied . I would be grateful to find someone who has attempted it before . .. . Answer : Could you post this question on our Dynatrace Discussion Form http : answers.dynatrace.com . Or post this as a comment on the download page . The author of that conversion tool will then see your comment and can reply . Andi Comment : I m not registered user on dynatrace . Registration takes apparently 2 working days . Additionally this product is listed as not supported . I hope registration process won t take much longer . Comment : You just sign up for the free trial - dynatrace.com en products dynatrace-personal-license.html http : www.dynatrace.com en products dynatrace-personal-license.html - and you automatically get an account . if you are a customer and you use your corporate email you will also automatically get an account - key here is that you use your corporate email so that we can verify it with our backend system Comment : Thank you for your comments", "Question : I want to monitor oracle ebs 11i oracle db 11g simultaneously during load test through dynatrace . Oracle EBS architecture http : i.stack.imgur.com Y1oam.png .. . .. . 1 . I know we can monitor oracle db using dynatrace but did not find how to Identify what areas or modules e.g . Order Management Sales Finance Shipping a particular work flow user request touches during the load test 2 . I found that using DC RUM we can capture the metrics for Form Server . Apart from this I also want to monitor Concurrent processing server . Is it possible using dynatrace or not .. . Answer : With Dynatrace DC RUM you may choose one of two approaches of monitoring EBS performance . First - DC RUM using agentless technology captures network traffic between all servers and clients and as result provides you with information on performance usage and availability details . Additionally for most popular network-protocols including the ones used during communication with Oracle database Oracle Forms servers and web servers it s possible to use analyzers that provides deeper performance insights . For example with Oracle Forms analyzer applied for EBS monitoring DC RUM is decoding all interactions between user and oracle forms reporting user names form names control names and identifying EBS module name . For Oracle Database traffic it reports performance down to single query execution including SQL database-schema and user name . Answering your question it allows monitoring of Oracle EBS and Oracle DB simultaneously . Second one Enterprise Synthetic allows you to create synthetic tests for key transactions in EBS . This way for example you may track the performance of whole creating sales order transaction . DC RUM is intended to constant systematic application performance monitoring . However if you have it in your company it s also perfect tool to evaluate the results of the load tests performed on EBS . Comment : Thanku for your key inputs . But here I am again sticking on my second point - Can we monitor Concurrent processing server using DCRUM as in EBS there are many background jobs running during any transaction which are actually handled by concurrent manager servers . Hence these servers can also have some bottlenecks which we would like to keep a track of . Comment : If concurrent processing server is deployed on separate host you are able to monitor it with DC RUM - and you will get network performance metrics - information on network performance connectivity usage in bytes . Otherwise it s still possible to get the performance visibility with our java agent with Application Monitoring solution - but it will work for html UI only not for Oracle Forms . Comment : Thanku for further information . Can you please provide me some references so that I ll be able to see how concurrent manager servers performance metrics are monitored As I found the oracle forms server monitoring in DCRUM documentation but didn t find any information about concurrent manager serves . ref- community.dynatrace.com community display DCRUM122 https : community.dynatrace.com community display DCRUM122 Oracle+Forms+Monitoring FYI We have different hosts for concurrent manager servers .", "Question : I have an Apache webserver with PHP module where I display some information . I d like to be able to get some data from dynatrace and put the data in the webserver through some cronjob . The problem is I have no clue on how to push data from dynatrace to a server . Is there any APIs for this or a different way of doing this Thanks in advance . .. . Answer : Dynatrace provides a REST Reporting interface where you can pull out any data from dynatrace that you can put on a dashboard and get it in something consumable such as CSV XML JSON .. . - here is the link-to the public doc page on the reporting interface : https : community.compuwareapm.com community display DOCDT61 Server-+and+Clientside+XML+Reporting .. . .. . So - what you need to do is the following .. . .. . 1 : Create a dashboard and put your charts on it that show the measures you are interested in e.g : Apache Thread Count CPU Throughput .. . .. . .. . 2 : Save that dashboard on your dynatrace server .. . .. . 3 : Use the REST interface to query that data and put it into your external system .. . .. . if you have more questions on this feel free to also post them on our own Dynatrace community forum : https : community.compuwareapm.com community display DTFORUM dynaTrace+Forums+Home .. . .. . Andi Comment : Thanks Andreas I will be giving this a try and will let you know if this succeeds Comment : It worked Thank you very much :", "Question : I m spending sometime with DynaTrace . I m impressed by its feature related to cross jvm instrumentation . In simple words DynaTrace is able to instrument Java code creating trace with some statistical information . This is nothing new . There is a feature really interesting : when a call to an external JVM is execute DynaTrace is able to link this new trace to the caller one i.e . remote session-bean web-services remote RMI and so on . How could it be possible I m not able to immagine how to implement this feature Any ideas Thank you .. . Answer : Dynatrace actually doesnt rely on information from beans . As you correctly said in your questions - we are using Byte Code Instrumentation such as other tools in the market as well . We instrument key methods of certain frameworks e.g : Servlet Axis JMS JDBC .. . In the scenario where you make a call from one JVM to another using e.g : HTTP-based communication we instrument both the sending side of the HTTP Request as well as the receiving side on the other JVM . On the sending side we attach an additional HTTP Header with the ID of the current PurePath . PurePath is our patent technology . So - every PurePath every single transaction gets a unique ID . This ID travels with the request e.g : we put it on the HTTP Request as an HTTP HEader . ON the receiving side - your second JVM - we inspect that HTTP HEader and therefore know that all the data we collect belongs-to that PurePath . This allows us to do real end-to-end tracing without relying on things like Beans or without correlating this data based on e.g : timestamps .. . .. . Makes sense If you have more questions let me know . I also recorded some videos and put on YouTube to explain the technology and the product itself : http : bit.ly dttutorials Comment : Hi Andreas thank you for your answer . You use HTTP request as example but I suppose inter-JVM mechanism works also for RMI Web ServIces and any other remote invocation technologies . I think you ll not alter mothid signature in case of RMI EJB call so how you transfer your ID to remote JVM Comment : Correct . We are not altering any method signatures . We figured out other ways to pass that PurePath ID from the caller to the callee . Thats true for RMI JMS Thread Pooling .. . I can t share all technical details how we implement it for the different protocols - but - simply give it a try and you will see it works without doing any modifications . It doesnt break anything in case you only instrument one side either . All tested well and running in large scale systems of our users . Give it a try . I run the 30 day free trial program : bit.ly dttrial http : bit.ly dttrial Comment : Hi Andreas thank you again for your answer . I can understand you cannot share technical implementation of a commercial product . But that is information I m looking for even if as a generic description . Comment : Just as with HTTP we found ways to add our PurePath ID to the protocol without breaking any of the components involved in that communication . With HTTP we use an HTTP Header . For RMI the approach is a bit different . unfortunatley I cant tell you the exact details as much as I would love to . For JMS or MSMQ we use Message Properties . Same is true for WCF . Comment : @AndreasGrabner - I understand that PurePath is patented as it is with all implementation details but what about the idea of code instrumentation to match HTTP communication via additional HTTP header Should it also be seen as patented I would like to make such tool with similar approach and not sure where your patent ends .. .", "Question : How to anlayze the performance of an application based on GC caused suspension time . If Dynatrace shows a red exclamation mark as warning for GC suspension time what is the meaning .. . Answer : Dynatrace will usually flag your GC in red if you spend more than 15 of the execution-time on garbage collections . This is what must have happened to you .", "Question : We use dynatrace for monitoring and it generates a lot of monitoring data . I did not find an explicit way to have this imported to local data stores . Has anyone had experience in this .. . Answer : Dynatrace stores all this data in its own Session Storage file system as well as in the so called Performance Warehouse SQL Storage . Both storage systems can be accessed via the Web Interface or via the Dynatrace Rich Client . You can also extract this data through REST or use the Live Data Feed option to push data out to e.g : external data source such as Splunk Elastic Search or any other place . Here are some links for you to check out PureLytics Stream : https : community.dynatrace.com community display DOCDT63 PureLytics+Stream Real Time Data Feed : https : community.dynatrace.com community display PUB Real+Time+Business+Transaction+Feed+for+BigData+Analytics Real Time Data Feed Github Project : https : github.com Dynatrace Dynatrace-Real-Time-Data-Feed-Listener .. . .. . If you have more questions I also suggest to ask them in our Dynatrace disucssion forum : http : answers.dynatrace.com .. . .. . Andi", "Question : null .. . Answer : My recipe installs the dynatrace module and enables it : .. . .. . include recipe dynatrace : : wsagent package .. . .. . apache2 module dtagent module do module name dtagent module filepath node dynatrace apache wsagent linux agent path action : enable end .. . .. . My spec file contains the following : .. . .. . it creates opt dynatrace agent lib64 libdtagent.so file do expect chef run .to render file opt dynatrace agent lib64 libdtagent.so end .. . .. . When I run Rspec it fails with the following error : .. . .. . rspec -f d . spec unit recipes apache spec.rb 1 : 4 .. . .. . Run options : include : ids . spec unit recipes apache spec.rb 1 : 4 .. . .. . dynatrace : : apache creates opt dynatrace agent lib64 libdtagent.so file FAILED - 1 .. . .. . Failures : .. . .. . 1 dynatrace : : apache creates opt dynatrace agent lib64 libdtagent.so file Failure Error : expect chef run .to render file opt dynatrace agent lib64 libdtagent.so expected Chef run to render opt dynatrace agent lib64 libdtagent.so . spec unit recipes apache spec.rb : 35 : in block 2 levels in .. . .. . Finished in 1.13 seconds files took 8.93 seconds to load 1 example 1 failure .. . .. . Failed examples : .. . .. . rspec . spec unit recipes apache spec.rb : 34 dynatrace : : apache creates opt dynatrace agent lib64 libdtagent.so file .. . .. . ChefSpec Coverage report generated.. . .. . .. . Total Resources : 1 Touched Resources : 0 Touch Coverage : 0.0 .. . .. . Untouched Resources : .. . .. . apache2 module dtagent module dynatrace recipes apache.rb : 12 .. . .. . ChefSpec Coverage report generated.. . .. . .. . Total Resources : 1 Touched Resources : 0 Touch Coverage : 0.0 .. . .. . Untouched Resources : .. . .. . apache2 module dtagent module dynatrace recipes apache.rb : 12 .. . .. . Need some help in identifying the issue causing my spec failure .", "Question : I m looking to make the following code work somehow it seems if i do not test the files folders first I end up with the error : .. . .. . Error : Failed to apply catalog : Parameter path failed on File opt dynatrace-6.2 : File paths must be fully qualified not opt dynatrace-6.2 opt dynatrace-5.6.0 opt rh httpd24 root etc httpd conf.d dtload.conf opt rh httpd24 root etc httpd conf.d 01 dtagent.conf at newrelic.pp : 35 .. . .. . The pertinent parts .. . Answer : Your code looks basically correct but you went overboard with your file resources : .. . .. . This does create all the file resources from your array since you use an array for the resource title but each single one of them will then try to use the same array as the path value which does not make sense . TL DR remove the path parameter and it should Just Work . Comment : Accepted and plus 1", "Question : My company is starting to use DynaTrace to monitor some of our apps . I ve been charged with trying to interpret some of the results and come up with suggestions for improvement . But I m not able to find critical information in DynaTrace . I m hoping a user here can point me in the right direction . We use GWT for our front-end applications . I m trying to identify which RPC calls are running slow and need optimizing . But I m not able to see the actual Request Message Body so I don t know which RPC method is being called . They all look the same . I ve managed to find this information identifying information removed : .. . .. . There is alot of detail here which is good . But it s useless to me without the POST message body . The Argument line is always the same because all the requests are passed though the same RPC servlet . It s the content of the message body that identifies what action is being taken . Without that I have no idea what this request was doing . Some requests take 4000 ms other take 40 . I d really like to see what the 4000 ms requests are asking for so we can figure out what s causing the bottleneck . I m getting this information from the web request in the PurePath Tree . Is there another place in DynaTrace that I can get this information I m not administering the DynaTrace server so I only have access to the client . .. . Answer : Dynatrace allows you to capture POST Headers . In your System Profile you can configure for your Web Server but also Java Tier to capture thes paramters . For the Web Server you need to open the Properties for the Web Server Sensor . For Java it is the Servlet Sensor . The bottom table in that dialog allows you to specify which parameters you want to capture . if you leave the name field blank ALL paramters will be captured . They will then show up in the details dialog in the PurePath . How to get to these properties Edit your System Profile - Expand the Tier Name - click on Sensor Configuration - click on Properties next to the Web Server or Servlet Sensor Also - if you want somebody to look at your data . I have a program called Share Your PurePath - http : bit.ly sharepurepath . Feel free to export some of your PurePaths and I give you feedback on how to analyze it .. . .. . Andi", "Question : We have dynatrace installed in our 4 servers but out of 4 server 1 server is behaving weird after installing Dynatrace the asp.net application is not working it is not loading any JS file css file ..but same application is just working fine on other servers I can t see any difference in servers . Comment : Unlike forum sites we don t use Thanks or Any help appreciated or signatures on Stack Overflow http : stackoverflow.com . See Should Hi thanks taglines and salutations be removed from posts http : meta.stackexchange.com questions 2950 should-hi-thanks-taglines-and-salutations-be-removed-from-posts . BTW it s Thanks in advance not Thanks in advanced . .. . Answer : Here are some things to check a Does the dynatrace agent connect for that 4th machine - you can see that in the Agent Overview dashlet b if it does - check the agent log files for that agent and check if there is anything indicating a problem . You can get to these log files from the agent overview dashlet via the context menu of that agent entry c make sure all 4 IIS AppPools run under the same user account that has privileges to load the dynatrace agent . the agent is installed in your program files dynatrace directory . could it be that the one IIS uses a different windows user account for that apppool d check your windows event-viewer for any problems .. . .. . Also - feel free to post your questions on our dynatrace community forum . this is where we typically handle these questions : https : community.compuwareapm.com community display PUB Community+Home .. . .. . Andi", "Question : In My organization we are using a performance tracking tool named Dynatrace Which says there are some errors when we open BIRT reports i am not getting any idea from where this tool is hunting down this below issue . It looks like it is looking for some url http : localhost : 631 on calling SLE BIRT frameset and source of error is shown as org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl . Method is getUpdatedObjects . Is BIRT is trying to access some kind of Web Service from its library . .. . Answer : BIRT usually uses Apache Tomcat http : tomcat.apache.org as the web server when creating reports that run as HTML . If you do not have Apache or another application correctly configured you will get errors when trying to open BIRT reports with a URL .", "Question : My company is starting to use DynaTrace to monitor some of our apps . I ve been charged with trying to interpret some of the results and come up with suggestions for improvement . But I m not able to find critical information in DynaTrace . I m hoping a user here can point me in the right direction . We use GWT for our front-end applications . I m trying to identify which RPC calls are running slow and need optimizing . But I m not able to see the actual Request Message Body so I don t know which RPC method is being called . They all look the same . I ve managed to find this information identifying information removed : .. . .. . There is alot of detail here which is good . But it s useless to me without the POST message body . The Argument line is always the same because all the requests are passed though the same RPC servlet . It s the content of the message body that identifies what action is being taken . Without that I have no idea what this request was doing . Some requests take 4000 ms other take 40 . I d really like to see what the 4000 ms requests are asking for so we can figure out what s causing the bottleneck . I m getting this information from the web request in the PurePath Tree . Is there another place in DynaTrace that I can get this information I m not administering the DynaTrace server so I only have access to the client . .. . Answer : You have to inform dynaTrace about the specific parameter s you want to collect . Go to the tier containing the Web server where the dtwsagent is running and in the Sensor Configuration click on Properties of the Web Server sensor pack . Hope it helps I created a screenshot of such settings but unfortunately although I use this site I just registered and I cannot post images yes since I don t have 10 reputation .", "Question : I m looking to make the following code work somehow it seems if i do not test the files folders first I end up with the error : .. . .. . Error : Failed to apply catalog : Parameter path failed on File opt dynatrace-6.2 : File paths must be fully qualified not opt dynatrace-6.2 opt dynatrace-5.6.0 opt rh httpd24 root etc httpd conf.d dtload.conf opt rh httpd24 root etc httpd conf.d 01 dtagent.conf at newrelic.pp : 35 .. . .. . The pertinent parts .. . Answer : You can actually simplify this down a lot . Puppet only runs the file removal if the files don t exist so the check presence exec is not required . You can t give a path an array but you can pass the title as an array and then the paths get automatically made . However running the stop dt agent exec is a bit fragile . You could probably refactor this into a service resource instead : Comment : The reason for this is that there was a competing service . Plus 1 for the dt portion", "Question : Folks I patched my script by adding the AddDynatraceHeader to each web call but when I try to run it says its not recognized maybe a missing library Im running LR 11.5 .. . .. . thanks .. . Answer : Did you see the doc page on Dynatrace Load Runner Integration https : community.dynatrace.com community display DOCDT62 LoadRunner+Integration We have a script conversion tool which will also add that method to your header-files ." ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
assimp@assimp@50
assimp -- open asset import library short name : @placeholder is a portable open-source library to import various well-known 3d model formats in a uniform manner .
{ "confidence": [ 52.373573303222656, 44.68557357788086, 42.343711853027344, 40.586490631103516, 39.59429931640625, 38.730979919433594, 38.00308609008789, 37.228981018066406, 37.076568603515625, 34.57732391357422, 32.566585540771484, 32.273223876953125, 32.273223876953125, 30.852298736572266, 30.79152488708496, 30.20545196533203, 30.20545196533203, 29.65005874633789, 29.644620895385742, 29.460556030273438, 28.817352294921875, 28.551042556762695, 28.216602325439453, 28.135452270507812, 27.817081451416016, 27.766944885253906, 27.550342559814453, 27.51092529296875, 27.469757080078125, 27.418787002563477, 27.236839294433594, 27.14383316040039, 26.993614196777344, 26.94634246826172, 26.9322452545166, 26.584312438964844, 26.496978759765625, 26.451766967773438, 26.344112396240234, 26.334800720214844, 26.272987365722656, 26.272987365722656, 26.190113067626953, 26.13290786743164, 25.489423751831055, 25.489423751831055, 25.489423751831055, 25.339204788208008, 25.17544174194336, 25.17544174194336, 24.890933990478516, 24.763599395751953, 24.763599395751953, 24.75897216796875, 24.75897216796875, 24.75897216796875, 24.75897216796875, 24.75897216796875, 24.68970489501953, 24.68970489501953, 24.68970489501953, 24.64022445678711, 24.64022445678711, 24.241661071777344, 23.968631744384766, 23.72148323059082, 23.592159271240234, 23.592159271240234, 23.3643856048584, 23.30339241027832, 23.109189987182617, 23.109189987182617, 23.109189987182617, 23.109189987182617, 23.109189987182617, 23.07644271850586, 22.8570613861084, 22.8570613861084, 22.8570613861084, 22.838346481323242, 22.816333770751953, 22.812942504882812, 22.770797729492188, 22.634654998779297, 22.634654998779297, 22.634654998779297, 22.623939514160156, 22.618614196777344, 22.549421310424805, 22.425975799560547, 22.425477981567383, 22.276723861694336, 22.276723861694336, 22.011646270751953, 22.011646270751953, 22.011646270751953, 21.682313919067383, 21.562271118164062, 21.495853424072266, 21.495853424072266 ], "content": [ "I m trying to work out skeletal animation using Assimp Open Asset Import Library .", "I am working on a project where I import a 3D mesh of an avatar using ASSIMP library update it and export the updated scene again using the same ASSIMP library .", "I m using the assimp library to import some FBX model but I can t find a way to correctly retrieve the camera coordinates", "But my concern is : is the assimp library not tested It is not exporting the scene imported by its own import method .", "I m using the Assimp .NET https : www.openhub.net p assimp-net library to import collada files .dae from Blender in my C application .", "Could that be problem with assimp library itself", "I m having my first try with assimp loading a 3D model .", "Here is the complete list of imported and exported 3D file formats : https : github.com assimp assimp", "One of the libraries used is the assimp library .", "I need to be able to import OBJ file to SLT using Assimp .", "I m using VC++10 + OpenGL + the Assimp Library to consume and then render some 3D models .", "I use Assimp library to load my OBJ mesh resource files .", "How to keep vertex order from OBJ file using Assimp library", "I m trying to load a model using assimp .", "I installed the assimp library using these commands : .. . .. . I downloaded the c++ source code from the assimp website but it shows errors that I am not able to resolve .. . .. . What should I do to remove this error", "I am llinking a built library I have not attached the assimp code to my project .", "there might be bug in assimp library or may be it is trying to access any of the field in the scene which is null .", "I m trying to use assimp to load meshes in order to detect Non-Manifold and open boundary edges .", "http : stackoverflow.com questions 32788756 how-to-keep-vertex-order-from-obj-file-using-assimp-library .. . .. . Assimp and D3D model loading : Mesh not being displayed in D3D http : stackoverflow.com questions 15820973 assimp-and-d3d-model-loading-mesh-not-being-displayed-in-d3d .. . .. . Assimp not properly loading indices http : stackoverflow.com questions 17785943 assimp-not-properly-loading-indices .. . .. . Please let me know if you need more info .", "I m currently implementing Skeletal Animation into my 3D OpenGL Game Engine using the ASSIMP library unfortunately it isn t going all that great .", "I want to use assimp on iOS platform .", "I m having a weird problem when I m trying to load a texture using assimp library .", "Please check github.com assimp assimp issues 807 https : github.com assimp assimp issues 807", "When exporting meshes with assimp https : github.com assimp assimp through code as shown below I receive very limited precision output .", "How To Build .. . .. . I buiid the primary shared object libassimp.so : issue these commands in AssImp assimp-3.2 a . cmake CMakeLists.txt -G Unix Makefiles b . make c . results in AssImp assimp-3.2 lib .. . .. . II build the native library by issuing this command in jassimp-native src : a .", "I am downloading assimp from here https : github.com assimp assimp releases tag v3.2 .", "Appareantly the issue was not in the name section of ASSIMP or the file itself .", "Is there a way in assimp to increase export precision", "I ve been trying to load a Wavefront obj model with ASSIMP .", "I ve successfully compiled libassimp.so added it to my project and then tried to import an .fbx file but I m getting the following exception : .. . .. . I m using the latest versions of Assimp and assimp.net .", "I am trying to load collada .dae mesh using Assimp .", "Pass the aiProcess Triangulate flag to assimp when loading the model to make sure all faces are triangulated .", "so i can t debug the assimp code but I am sure the error is from the assimp export code .", "I used following command to convert the 3d models with the assimp Assimp http : assimp.sourceforge.net and it is working fine on Windows : .. . .. . I need to know how can I run this command from the PHP", "The example is given here from lighthouse3d link http : www.lighthouse3d.com cg-topics code-samples importing-3d-models-with-assimp .. . .. . It compiles without errors .", "Blender ships with a collection for a large number of 3D file formats .", "i m trying to apply FindSceneCenter https : github.com assimp assimp blob master code ProcessHelper.cpp function from ASSIMP lib to aiScene http : assimp.sourceforge.net lib html structai scene.html object which was imported from file .", "I was wondering why when I use the Assimp library to import a Wavefront Object file .obj it doubles certain vertices and I found the following answer in the Assimp SourceForge discussion http : sourceforge.net p assimp discussion 817654 thread 026e9640 limit 25 ba6c : .. . .. . .. . Imagine the following : You upload a range of vertices to the graphics card .", "Can I do this using Assimp command-line", "Error .. . .. . Wavefront obj materials aren t in the right vertices : .. . .. . Original Model Rendered with ASSIMP model Viewer :", "I am currently building a cross-platform framework and i need your help because i have troubles deploying the Assimp library on OSX .", "I tried to load Blender file using Assimp library on C++ using the following code but it fails since it doesn t have any meshes at all .", "I am working on a project where I take an unrigged closed mesh import it using ASSIMP auto-rig it using the algorithm provided by Ilya Baran and Jovan Popovic http : www.mit.edu ibaran autorig pinocchio.html and again export it using ASSIMP .", "When building from github dot com assimp assimp2json the error usr bin ld : cannot open output file assimp2json : Is a directory is produced .", "Edit : I should add that I was trying to skin a collada model using assimp and glm .", "I m trying to load a model from an obj file using Assimp but it gives incorrect data .", "The model appears fine with identity matrices but is terribly garbled when using the transforms I generate from Assimp .", "@gartenriese Could you please check you build on github.com snikulov assimp https : github.com snikulov assimp branch gtest upd", "Seeing this in the project properties of the project where I have linked the binary library of ASSIMP I have set heap reserved size to 1000 000 000 1GB .", "So I have started wandering whether the heap requirement has to be set during the time of building the library itself ASSIMP in my case .", "@user914425 you can download Windows binaries from here sourceforge.net projects assimp files assimp-3.1 http : sourceforge.net projects assimp files assimp-3.1 But if you wanted to use assimp on Linux you have to build it for Linux .", "to be clear - I was looking for a solution without changing code in assimp but this may not be realistic", "I am trying to integrate the Assimp loader to my framework .", "And that s what Assimp is doing for you .", "I ve decided to give AssImp a shot .", "Try assimp export darkwader.obj drakwader.slt", "Which folder is assimp applications located", "With ASSIMP INCLUDE DIR being . . contrib assimp include .", "I am trying to integrate the Assimp skeletal animation .", "Offset is directly extracted from assimp bone bone.OffsetMatrix .", "I can t build assimp 3.2 anymore .", "No OBJ STL PLY are all text based formats - you can use much higher precision that 6 digits - it s an implementation error in assimp that I am fixing now .", "Technically you may be able to instantiate the actual export class and update the stringstream manually since it s a public member variable but this makes the export a lot more complicated and the point of using assimp was to easily export to different formats .", "EDIT2 : .. . .. . I reduced my CMake file to this : .. . .. . The header-files are in contrib assimp include and the libassmip.a is in contrib assimp lib .", "gcc jassimp.cpp -I usr lib jvm java-7-openjdk-amd64 include -I usr lib jvm java-7-openjdk-amd64 include linux -I HOME AssImp assimp-3.2 include -L HOME AssImp assimp-3.2 lib libassimp.so -shared -fPIC -o libjassimp.so .. . .. . III Java binding The java library is built using ant .", "i have built assimp library and create .lib file now I am using that into sample application but when i try to build sample app i get errors :", "This is clearly because of the pre-compiled libraries inside the Assimp .", "I am importing the avatar mesh using ASSIMP .", "I found almost the same topic : Assimp and D3D model loading : Mesh not being displayed in D3D http : stackoverflow.com questions 15820973 assimp-and-d3d-model-loading-mesh-not-being-displayed-in-d3d but I don t found the answer .", "When I try to load a model I made myself the model itself loads with no problem with a correct mtl file and existing jpg the assimp loader goes immidiately into the No texture image being imported and no texture loads .", "For instance to access to normals : .. . .. . About assimp I have no idea .", "Is the question : Why does assimp only have one index instead of three", "Assimp passes the obj format and creates unique vertices as required by OpenGL DirectX .", "As far as I know it is not possible to access the original indices using Assimp .", "This is with the triangulation flag on so I don t know if this is a bug in assimp or with my code .", "If it s relevant I m using assimp to load my model and here s how I do it .", "It is already there use the utImporter.cpp https : github.com assimp assimp blob master test unit utImporter.cpp L202-L230 last test modify it based on your needs .", "git-clone https : github.com assimp assimp.git cd assimp cmake CMakeLists.txt -G Unix Makefiles make Binary file will be located in the bin folder .", "Also tried cmake CMakeLists.txt -G Unix Makefiles as stated in github dot com assimp assimp blob master INSTALL to no avail .", "is it possible to run assimp commandline tool with the php http : stackoverflow.com questions 24930225 is-it-possible-to-run-assimp-commandline-tool-with-the-php .. . .. . I need able to do the same like this : .. . .. . So I can print in my 3d printer .", "You can use this library to import Blender models : java-gaming.org topics http : www.java-gaming.org topics java-blend-blender-dna-fully-implemented-in-java-with-r-w-file-access-beta 36939 view.html", "I am doing a port of Assimp to Java here https : github.com elect86 jAssimp .. . .. . I am dealing now with materials. . Assimp have a quite complicate structure imho and they themselves also say it : it s an ugly macro for historical reasons don t ask .. . .. . These are the relevant C classes : .. . .. . MaterialSystem.cpp https : github.com assimp assimp blob master code MaterialSystem.cpp .. . .. . MaterialSystem.h https : github.com assimp assimp blob master code MaterialSystem.h .. . .. . material.inl https : github.com assimp assimp blob master include assimp material.inl .. . .. . material.h https : github.com assimp assimp blob master include assimp material.h .. . .. . In the docs http : assimp.sourceforge.net lib html materials.html you can have a overview about the possible different properties. . .. . .. . Properties range for example from different AiColor3D Colors to several int ShadingModels or several AiString Texture types. . and so on .. . .. . So basically with the AiMaterialProperty name we refer to a very different range of material properties. . .. . .. . And like this wasn t enough each property may be an array of values controlled by the const unsigned int pNumValues argument .", "Because project assimp used incorrect link-to gtest repository .. . .. . Currently cmake-modules AddGTest.cmake https : github.com assimp assimp blob master cmake-modules AddGTest.cmake used link https : chromium.googlesource.com external googletest to chromium repository which is deprecated and all code removed from it .", "I m trying to integrate Assimp into my Unity3D app using assimp.net wrapper now trying to get it working on android .", "no I did not try that but could I just do that in my code that statically links with assimp", "real question stackoverflow.com questions 25063274 http : stackoverflow.com questions 25063274 assimp-skeletal-animation-bones-associated-with-a-vertex 5D", "Obviously I ve missed linking to some library but I m not sure what else to link-to Assimp only provided me one and I m not sure what else I need .", "I open Eclipse open the project and build it everything fine .", "I m trying to make this project work Link to Lighthouse http : www.lighthouse3d.com cg-topics code-samples importing-3d-models-with-assimp .. . .. . .. . .. . .. . .. . .. . First a bunch of info : .. . .. . .. . I m using : Windows 7 Pro 64-bit and Visual Studio 2013 Ultimate .. . Project on default settings which I believe is 32-bit .. . .. . About libraries : .. . DevIL : I downloaded and installed this one DevIL 1.7.8 SDK for 32-bit Windows http : downloads.sourceforge.net openil DevIL-SDK-x86-1.7.8.zip .. . Assimp : assimp--3.0.1270-sdk .. . .. . Project settings : .. . Platform : Active Win32 .. . Configuration : All Configurations .. . .. . Library Directories : .. . C : assimp--3.0.1270-sdk lib assimp release-dll win32 C : DevIL lib .. . .. . Include Directories : .. . C : assimp--3.0.1270-sdk include C : DevIL include .. . .. . Library Directories : .. . C : assimp--3.0.1270-sdk lib assimp release-dll win32 C : DevIL lib .. . .. . C C++ - General - Additional Include Directories : .. . C : assimp--3.0.1270-sdk include C : DevIL include .. . .. . Linker - Input - Additional Dependencies : .. . AdditionalDependencies .. . .. . .. . .. . .. . .. . .. . OK now when I compile my project I receive error : .. . .. . .. . .. . .. . By commenting out lines-of-code cant debug I ve found out where the error occurs : .. . .. . Anyone knows what s happening here", "The following is a snippet from the code that checks for all the bone names in ASSIMP with the node Name .", "LearnOpenGL uses the Assimp library to handle model loading but I don t seem to be able to get it to build properly precompiled libraries don t work either for me - it produces errors within Display.cpp : .. . .. . With the line 179 error appearing to be the main cause of failure .", "First i tried assimp : : expoerter class .", "i complied assimp libary with export settings on .", "Here is a example pulled from the assimp sample code on accessing the mesh indices .", "I use Visual Studio 2013-64 and assimp-3.1.1 .", "I don t think that ASSIMP uses more than 1GB of heap space .", "Btw did you try to debug library code by putting breakpoint", "To achieve this as the first step I have written a code to import a scene and without making any changes I am passing the reference to the export function .", "Please refer the code snippet in my other question stackoverflow.com questions 24599637 http : stackoverflow.com questions 24599637 visual-artifacts-when-loading-obj-model-with-assimp 5D .", "The last tutorial that i used is here : LearnOpenGL http : www.learnopengl.com So the code than i ll show is from there Model Loading part i use Assimp to load the object ." ] }
{ "confidence": [ 54.93110656738281, 50.298458099365234, 49.579994201660156, 48.547279357910156, 46.488521575927734, 45.51308059692383, 41.74272155761719, 41.48505401611328, 40.73040008544922, 39.898399353027344, 39.687522888183594, 39.412452697753906, 39.188560485839844, 38.10365676879883, 38.07851791381836, 37.79939270019531, 37.502685546875, 37.37873458862305, 37.21651077270508, 36.817222595214844 ], "content": [ "Question : null .. . Answer : I am working on a project where I import a 3D mesh of an avatar using ASSIMP library update it and export the updated scene again using the same ASSIMP library . To achieve this as the first step I have written a code to import a scene and without making any changes I am passing the reference to the export function . But the export function throws me an error . The main function is as follows you can verify that I am not making any changes to the imported scene : .. . .. . The error is in the Export function ans says : .. . .. . If anyone has used assimp to export scenes please help me . Comment : Looks like it is trying to access null-pointer somewhere in export . Btw did you try to debug library code by putting breakpoint Comment : I am llinking a built library I have not attached the assimp code to my project . so i can t debug the assimp code but I am sure the error is from the assimp export code . Comment : there might be bug in assimp library or may be it is trying to access any of the field in the scene which is null . I dont think there is any other way than debugging . Its not much pain to debug it . I have done it . Comment : Probably with a little bit of effort I can make it work for myself . But my concern is : is the assimp library not tested It is not exporting the scene imported by its own import method . Comment : Sounds like a not well tested feature from us . Sorry for that . We will take care", "Question : null .. . Answer : I m using the assimp library to import some FBX model but I can t find a way to correctly retrieve the camera coordinates Does someone has experience with this Here is my code : Comment : Please check github.com assimp assimp issues 807 https : github.com assimp assimp issues 807 Comment : What kind of issue do you see For me the code look correct . But when using fbx the dimensions of the model are sometime scaled by 0.01 .", "Question : So I m trying to get into LWJGL and part of this is loading 3D models and I thought I d use JAssimp for this . The readme specifies two steps building a native component and a .jar component . The jar was just an ant build and so it happened without incident . The part that s difficult is the native library . I ve been trying to link it without success . I ve included the assimp include directories included Java s headers and linked to JAssimp s assimp.lib . However I still get these errors : .. . .. . Googling around leads to mostly the same question but with no answers and one guy on facepunch that apparently found a solution but pulled an https : xkcd.com 979 and never mentioned how . Obviously I ve missed linking to some library but I m not sure what else to link-to Assimp only provided me one and I m not sure what else I need . Am I installing it wrong Comment : There is a very incomplete pure port of Assimp called jAssimp too available on Github and there are numerous more maintained Java libraries to load models but they use a full blown 3D engine which is logical as you need some math tools to implement this kind of feature . Comment : I ve looked at that library but it only supports one rather old format . Comment : The pure Java equivalent of jAssimp only supports MD2 as far as I know but there are numerous 3D engines JMonkeyEngine JogAmp s Ardor3D Continuation Xith3D 3DzzD Unlicense-lib .. . and frameworks LibGDX .. . including several importers and exporters for the following formats : WaveFront OBJ PLY STL ASE 3DS DAE Collada WRL VRML X3D Blender FBX LWO Maya X MS3D BVH .. . Comment : You can use this library to import Blender models : java-gaming.org topics http : www.java-gaming.org topics java-blend-blender-dna-fully-implemented-in-java-with-r-w-file-access-beta 36939 view.html Comment : Looks interesting but I ve realized that making the import part of my main engine is probably a bad idea and I ve moved to a little C app that just uses Assimp.net to read in the data and just dumps the vertex data and indexes to a binary file . .. . Answer : For anyone else who stumbles across this with the same problem the answer is to do it the old-fashioned way and compile the C++ Assimp yourself . This will give you among other things a new assimp.lib . Link with this instead of the one provided and the error will go away .", "Question : So I m trying to get into LWJGL and part of this is loading 3D models and I thought I d use JAssimp for this . The readme specifies two steps building a native component and a .jar component . The jar was just an ant build and so it happened without incident . The part that s difficult is the native library . I ve been trying to link it without success . I ve included the assimp include directories included Java s headers and linked to JAssimp s assimp.lib . However I still get these errors : .. . .. . Googling around leads to mostly the same question but with no answers and one guy on facepunch that apparently found a solution but pulled an https : xkcd.com 979 and never mentioned how . Obviously I ve missed linking to some library but I m not sure what else to link-to Assimp only provided me one and I m not sure what else I need . Am I installing it wrong Comment : There is a very incomplete pure port of Assimp called jAssimp too available on Github and there are numerous more maintained Java libraries to load models but they use a full blown 3D engine which is logical as you need some math tools to implement this kind of feature . Comment : I ve looked at that library but it only supports one rather old format . Comment : The pure Java equivalent of jAssimp only supports MD2 as far as I know but there are numerous 3D engines JMonkeyEngine JogAmp s Ardor3D Continuation Xith3D 3DzzD Unlicense-lib .. . and frameworks LibGDX .. . including several importers and exporters for the following formats : WaveFront OBJ PLY STL ASE 3DS DAE Collada WRL VRML X3D Blender FBX LWO Maya X MS3D BVH .. . Comment : You can use this library to import Blender models : java-gaming.org topics http : www.java-gaming.org topics java-blend-blender-dna-fully-implemented-in-java-with-r-w-file-access-beta 36939 view.html Comment : Looks interesting but I ve realized that making the import part of my main engine is probably a bad idea and I ve moved to a little C app that just uses Assimp.net to read in the data and just dumps the vertex data and indexes to a binary file . .. . Answer : How To Build .. . .. . I buiid the primary shared object libassimp.so : issue these commands in AssImp assimp-3.2 a . cmake CMakeLists.txt -G Unix Makefiles b . make c . results in AssImp assimp-3.2 lib .. . .. . II build the native library by issuing this command in jassimp-native src : a . gcc jassimp.cpp -I usr lib jvm java-7-openjdk-amd64 include -I usr lib jvm java-7-openjdk-amd64 include linux -I HOME AssImp assimp-3.2 include -L HOME AssImp assimp-3.2 lib libassimp.so -shared -fPIC -o libjassimp.so .. . .. . III Java binding The java library is built using ant . Executing ant in the port jassimp directory should be sufficient to build the library including the docs . The java build is configured to create java 1.6 classes .. . .. . All of the above is the good news I successfully built my code . The bad news is that upon execution I received the following error : java : symbol lookup error : usr lib jvm java-7-openjdk-amd64 jre lib amd64 libjassimp.so : undefined symbol : aiImportFile Comment : I m a little confused here . Are you asking for help or are you quoting someone Comment : My apologies I didn t mean to add to the confusion . The original question was how to compile the JassImp library . I provided an approach that worked in my Ubuntu 14.04 environment . Within my code I called the method Jassimp.importFile cube.ply . This method in turn called the aiImportFile function . Unfortunately the library could not find aiImportFile . So at this point I don t know if I made a mistake or if the library has an error . Right now I m looking for alternatives for Jassimp . Comment : I ended up using Assimp for C and just pouring all the data I needed in binary to a file-format I made up and just parsing that in Java . Comment : Yeah I did the same thing except I stuck with java and used an ascii file not binary . This prohibits me from using defined formats but I can get on with writing my code .", "Question : I need to be able to import OBJ file to SLT using Assimp . I found this where someone was able to export OBJ file to JSON . is it possible to run assimp commandline tool with the php http : stackoverflow.com questions 24930225 is-it-possible-to-run-assimp-commandline-tool-with-the-php .. . .. . I need able to do the same like this : .. . .. . So I can print in my 3d printer . Here is the complete list of imported and exported 3D file formats : https : github.com assimp assimp .. . Answer : Try assimp export darkwader.obj drakwader.slt 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 . - From Review review low-quality-posts 10145257 Comment : @Dima Stebaev how do compile this code Which folder is assimp applications located Comment : @user914425 do you use Linux or Windows Comment : @Dima Stebaev I have both a mac OSX 10.11 and Windows 7 machines . I am trying to get it compiled . After that I would like to get it working on Linux Centos . Comment : @user914425 you can download Windows binaries from here sourceforge.net projects assimp files assimp-3.1 http : sourceforge.net projects assimp files assimp-3.1 But if you wanted to use assimp on Linux you have to build it for Linux . git-clone https : github.com assimp assimp.git cd assimp cmake CMakeLists.txt -G Unix Makefiles make Binary file will be located in the bin folder .", "Question : I tried to load Blender file using Assimp library on C++ using the following code but it fails since it doesn t have any meshes at all . The blender file I am using is the default cube saved using Blender itself . What am I doing wrong here do I need to include special flag in order to load blender object Or do I need to export the Blender object in certain way .. . Answer : Blender files are difficult to read and interpret by anything that s not Blender . The reason for this is that Blender files are in fact structured memory dumps of the Blender process . Unless you plan to embed a whole Blender instance into your program you ll hardly be able to parse it . Instead you should export your model using Blender into someting easy to process a well documented file-format . Blender ships with a collection for a large number of 3D file formats .", "Question : I tried to load Blender file using Assimp library on C++ using the following code but it fails since it doesn t have any meshes at all . The blender file I am using is the default cube saved using Blender itself . What am I doing wrong here do I need to include special flag in order to load blender object Or do I need to export the Blender object in certain way .. . Answer : You need to open your file .blend and export it to .3ds .obj etc. . I ve tried using .blend files and could no read any meshes what so ever otherwise works well with any of the other formats that I ve tried .3ds .obj .", "Question : I m trying to work out skeletal animation using Assimp Open Asset Import Library . Right now I can successfully load a .dae model and render it with animation but in the process of doing so the model gets messed up . http : i.imgur.com O7YzK8o.png .. . .. . The left model is not rigged and loaded properly . The model to the right is rigged and takes the correct pose from the animation but gets distorted weirdly flat stick-figure . My take on it is that I probably do something wrong through the bone matrix multiplications . the final matrices let s call them M are calculated as follows : .. . .. . where offset matrix i is the combined offset matrix from the concatenation of aiBone- mOffsetMatrix and transform matrix i is the combined transform matrix from the concatenation of matrices from aiNodeAnim TRS . Respective concatenations are done from the bottom and up to the root . loadRelativeOffset node scene will loop through scene- mMeshes 0 - mNumBones and return the matrix of matched aiBone . If no bone is found the identity matrix will be returned . As such the end result will be a concatenation of all the bone matrices ignoring Armature and the root node . Loading the transform matrix is done in a similar fashion but with aiNodeAnim in mNumChannels instead of aiBones in mNumBones . I imagine the end result looks something like this : .. . .. . I don t know why the RootNode matrix is there but if it is not there everything looks like nonsense . Any idea what causes this or what I can do .. . Answer : I solved it . The problem was very simple - the bone offset matrices in aiBone are already global combined so there was no reason to concatenate .", "Question : I was wondering why when I use the Assimp library to import a Wavefront Object file .obj it doubles certain vertices and I found the following answer in the Assimp SourceForge discussion http : sourceforge.net p assimp discussion 817654 thread 026e9640 limit 25 ba6c : .. . .. . .. . Imagine the following : You upload a range of vertices to the graphics card . You then tell the GPU via an index-buffer that you want the first triangle to be formed by vertex 3 6 and 7 . The second triangle is then 1 2 and 6 . What would happen The GPU would draw you a cube but each corner of the cube would share the same UV data normal vectors vertex colours or whatever else your mesh needs . Now how do we get a cube corner but get different UV mappings on all sides touching that corner We can t tell the GPU to use vertex 3 but instead of the UV coords of that vertex please use UV coords instead . The GPU can t do this . That s why it s necessary to duplicate the vertex at that corner . Now you have two vertices for the same position but with different UV coords . And that s what Assimp is doing for you . If you do specify JoinIdenticalVertices you ll get a cube with 24 vertices . Why A cube has 8 corners but there are 3 cube sides touching at each corner and each of that cube sides has a different UV coords set for that corner so you end up with 3 versions of each corner . If you do not specify JoinIdenticalVertices you get a plain array of vertices without any reuse . And that means that you need 2 triangles with 3 vertices each for every cube side ending up at 36 vertices . An alternative would be to use 3D uv coords and a cube map to texture that cube . This is a special case that only works for a cube but there it would work . The GPU does the mapping to 6 textures internally then . The description above is the general case it works like this for each and every mesh that you might encounter . It does make sense . Premising that I don t know how MeshLab handles the .obj import operation how comes that if the answer I found is right when I import such an object the vertices counter doesn t increase Is it only a matter of how they do the counts or is there a way to import .obj files without having to split vertices when they have normals tangents UV .. . Answer : This is not implementation-specific for instance they have several vectors - one for each variable but the logic is the same . Meshlab generates one vertex per 3D coordinate with several possible values for variables such as normal and texture besides the common position . These vertices are stored in a vertex vector . These multiple values are stored in a separate vertex data vector which I will call VDV . A triangular face will point to 3 entries in the VDV but a vertex may point to any number of them . On rendering the VDV will be used for indexing purposes but the actual vertices are used when calculating stuff and when counting the number of vertices . They have separate combined values on stuff like normal that considers all of their adjoining faces . Comment : Got it thank you Sir", "Question : I wrote a custom OBJ file importer which worked fairly well however was not robust enough to support everything . I ve decided to give AssImp a shot . I followed some tutorials and have set up my code to read in the vertices tex coords normals and indices of an OBJ cube model that I have had success loading with my custom importer . The cube model s faces do not render properly instead only rendering a few tri s of the cube . The way AssImp handles the data is obviously a bit different than my solution because the normals positions vertices tex coords and indices do not match my custom solution . I would very much appreciate some insight into why I m having issues as all of the tutorials I ve found have matched my approach . If a picture of the faulty rendered cube would be helpful I can work on getting a screenshot up . Thank you . My Asset importing class : .. . .. . The rest of my code is at Mesh Class is in source graphics : https : github.com BennetLeff PhySim .. . Answer : I don t know D so I will only comment on your assimp usage . How about using more preprocessing options : .. . .. . This may be not as useful with .obj files but will become later if you want to read other formats . Also for a simple .obj file this may be sufficient : .. . .. . But sometimes it picks wrong mesh so you should iterate recursively using an aiNode starting from scene.mRootNode and to scene.mNumChildren . I am 100 sure that mesh.mNumFaces is not the size of the vertex array . You can look at my C++ code I am sure you will understand the logic . QVector s here are flat arrays of float so it s a bit incomplitable with your code when you use vec3 and vec2 .", "Question : When exporting meshes with assimp https : github.com assimp assimp through code as shown below I receive very limited precision output . Is there a way in assimp to increase export precision Nothing hints at this in the documentation . .. . .. . Output in the .obj file will contain no more than 6 digits per value : .. . .. . When looking at the actual exporter class ObjExporter.cpp all data is written through a public stringstream : .. . .. . Is there a way I could increase the stringstream precision http : www.cplusplus.com reference ios ios base precision without having to change the assimp source Comment : 6 is the default precision for streams did you try using std : : setprecision en.cppreference.com w cpp io manip setprecision http : en.cppreference.com w cpp io manip setprecision Comment : no I did not try that but could I just do that in my code that statically links with assimp to be clear - I was looking for a solution without changing code in assimp but this may not be realistic Comment : Maybe the format doesn t allow more precision Comment : No OBJ STL PLY are all text based formats - you can use much higher precision that 6 digits - it s an implementation error in assimp that I am fixing now . .. . Answer : When looking at the different exporter classes in detail it becomes apparent that some of them indeed have set a higher precision for the stringstream internally but there is no way to globally define this or externally pass a request in for a higher precision export . Technically you may be able to instantiate the actual export class and update the stringstream manually since it s a public member variable but this makes the export a lot more complicated and the point of using assimp was to easily export to different formats . I thus have updated assimp to export higher precision floating-point values as for example discussed here : How do I print a double value with full precision using cout http : stackoverflow.com questions 554063 how-do-i-print-a-double-value-with-full-precision-using-cout", "Question : null .. . Answer : I m trying to integrate Assimp into my Unity3D app using assimp.net wrapper now trying to get it working on android . I ve successfully compiled libassimp.so added it to my project and then tried to import an .fbx file but I m getting the following exception : .. . .. . I m using the latest versions of Assimp and assimp.net . Any help is appreciated .", "Question : I m trying to load simple 3d model cube.3ds but next error occurs : when I read indices to my vector vector contains : 0 1 2 3 .. . . It s not properly . I found almost the same topic : Assimp and D3D model loading : Mesh not being displayed in D3D http : stackoverflow.com questions 15820973 assimp-and-d3d-model-loading-mesh-not-being-displayed-in-d3d but I don t found the answer . Can anyone describe in detail properly algorithm for loading indices from meshes . Thank s a lot .. . Answer : Here is a example pulled from the assimp sample code on accessing the mesh indices . Comment : Thank you for this code . But my mistake was in other place . When I read scene via assimp I v just passed only aiProcess Triangulate flags but for properly loading indices also need to pass aiProcess JoinIdenticalVertices .", "Question : I m using the Assimp .NET https : www.openhub.net p assimp-net library to import collada files .dae from Blender in my C application . The problem is that a few vertices are imported multiple times . Here is the code that uses a filepath to my collada-file and imports the Assimp mesh : .. . .. . As you can cee I exclude most of the components except the position coordinates . Then I use PostProcessSteps.RemoveComponent and PostProcessSteps.JoinIdenticalVertices respectively to join identical vertices . The ProcessNode - loads each mesh recursively : .. . .. . ProcessMesh does nothing more than put all vertices and indices in a separate list : .. . .. . Nevertheless this works for most meshes but not for all . For example I have the following cone : .. . .. . enter image description here http : i.stack.imgur.com Y5aSs.png .. . .. . and the selected vertex i.e . X : 0.84 Y : -0.55557 Z : -1.0 is stored three times in the vertex list . I checked the collada file and this vertex definitely exists only once . Comment : This vertex must be referenced multiple times in the file maybe i could be worth trying to find out if it is the case and which property is duplicated . Also have you tried exporting to different extensions to see if it s always the same like using obj and 3ds for example .. . Answer : If you have some vertices which have different texture coordinates if you have texture atlases etc those vertices are duplicated . Maybe you are facing this particular case Comment : Well I thought with importer.SetConfig new RemoveComponentConfig ExcludeComponent.TexCoords this shouldn t matter Comment : I don t know for the .net version but for the C++ version the components you want to remove must be set in another place define AI CONFIG PP RVC FLAGS YourBitField . Still according to the documentation this should allow assimp to correctly merge duplicate vertices since they now have only the position in common . Comment : Thank s I ll give it a try .", "Question : null .. . Answer : I am working on a project where I take an unrigged closed mesh import it using ASSIMP auto-rig it using the algorithm provided by Ilya Baran and Jovan Popovic http : www.mit.edu ibaran autorig pinocchio.html and again export it using ASSIMP . I have the following code that updates the aiScene structure created by assimp inserting the new skeleton data into it . I does not seem to be working it throws weird exceptions . Can anyone check whether I am updating the data correctly.. . .. . .. . Update Code :", "Question : I m having my first try with assimp loading a 3D model . The example is given here from lighthouse3d link http : www.lighthouse3d.com cg-topics code-samples importing-3d-models-with-assimp .. . .. . It compiles without errors . However I get a similar error to the error Jeffrey had discussed with the comments below the post . and probably the example was fixed so this error seems not to reappear . But it shows another one my case : .. . .. . if possible I m trying not to get deeper in computer graphics just simply load the model .. . .. . Any suggestion Edit01 : I think this would be the shader code : link http : pastebin.com HkhRXj0x .. . .. . Edit02 : I ve looked it up in a separate text file dirlightdiffambpix.frag and there is the var output in it link http : pastebin.com QcKEwGFu .. . .. . And I think I ve fixed it already since the error is simply output is a reserved keyword and the corresponding var s name should be changed to .. . output1 for example Comment : Can you post your shader code That is what those errors are referencing . Basically your shader is written against a language version that is different from your context . Comment : PS : I ve tried with the author but his google group seems not to work anymore Comment : That pastebin code is not shader code that is C . I want the GLSL you are using . Honestly you are not going to get anywhere if you don t take the time to understand how the code you are using works . Comment : @Heuvel : I ll update it soon . Thank you Comment : Then add an answer with clear steps as to how you fixed your problem and accept it . .. . Answer : I ve looked it up in a separate text file dirlightdiffambpix.frag and there is the var output in it link http : pastebin.com QcKEwGFu .. . .. . I ve fixed it already since the error is simply output is a reserved keyword and the corresponding var s name should be changed to .. . output1 for example and it simply works by then", "Question : i am using assimp libary to load models to my ios app . but for some large model files loading times are too long for an mobil app . considering the convert process time . i decided to convert my models by a tool before run time . my main goal is writing this scene to file . i have very basic c++ experience . First i tried assimp : : expoerter class . i complied assimp libary with export settings on . But when i try to use export method i am getting this error message . error capture http : i.stack.imgur.com otXQu.png .. . .. . method is there but i can t use it . then by reading Assimp : : Exporter Class Reference http : assimp.sourceforge.net lib html class assimp 1 1 exporter.html ab8edf249172567a78ca302278a415e35 gives me the idea of using aiExportDataBlob http : assimp.sourceforge.net lib html structai export data blob.html to create file . ExportToBlob which returns a linked-list of memory buffers blob each referring to one output file in most cases there will be only one output file of course but this extra complexity is needed since Assimp aims at supporting a wide range of file formats . .. . ExportToBlob is especially useful if you intend to work with the data in-memory . But i have no idea to write this blob http : assimp.sourceforge.net lib html structai export data blob.html to a file . Any advice or help appreciated . .. . Answer : You re passing NSString where the function expects const char . I m not familiar with Objective-C but I think you want pPath UTF8String http : developer.apple.com library mac documentation Cocoa Reference Foundation Classes NSString Class Reference NSString.html to get pointer to a C-style character array from the NSString . Also you re leaking the Exporter : C++ doesn t have garbage-collection . I m sure you don t want to create it with new but if you do need to for some reason remember to delete it when you re done . Comment : any advice for blob to file Comment : @Amourreux : As I said in your other question I don t use that library I m just reading the documentation . But the blob structure http : assimp.sourceforge.net lib html structai export data blob.html gives you a pointer to where it s written in memory so fwrite blob- data 1 blob- size file should work iterating through the next pointer until you reach the end of the chain . I ve no idea why you d want to do that rather than exporting directly to the file though . Comment : actually i am just trying to create a binary file of a struct aiScene . in this case scene struct . by this way i am hopping for short loading times . Maybe this is my misunderstanding of structs . I do not want use export class because exporter works like a converter . thank you very much for advices .", "Question : null .. . Answer : I m having a weird problem when I m trying to load a texture using assimp library . Example : I have this piece of code which loads the corresponding texture image .. . .. . where mat is a const aiMaterial type . Now when I m trying to load an name .obj file with a corresponding name .mtl file where the mtl file is .. . .. . everything works as it should provided I have a asteroid.jpg in the folder . It works even when I change the image name to a different image I have in the folder . However I did not make this model myself . When I try to load a model I made myself the model itself loads with no problem with a correct mtl file and existing jpg the assimp loader goes immidiately into the No texture image being imported and no texture loads . And that s the part I don t understand . I made the model in Blender put a material and a texture image on it and the mtl should be fine too : .. . .. . The image tree1.jpg is in the same folder . I can t seem the figure out where the problem is . Does anyone have an idea Thanks a lot SOLVED : The obj file was not exported correctly and the obj file was not linked with the mtl file same name is not enough the mtl name has to be defined in obj source code : https : en.wikipedia.org wiki Wavefront .obj file Comment : I don t think it would be possible to tell without seeing minimal example . Can you add full mtl file and minimal obj e.g . single plane Does other things like material colour are getting correctly loaded Comment : I managed to find the error the obj was not linked with the mtl correctly but thanks for help anyways -", "Question : I m trying to make this project work Link to Lighthouse http : www.lighthouse3d.com cg-topics code-samples importing-3d-models-with-assimp .. . .. . .. . .. . .. . .. . .. . First a bunch of info : .. . .. . .. . I m using : Windows 7 Pro 64-bit and Visual Studio 2013 Ultimate .. . Project on default settings which I believe is 32-bit .. . .. . About libraries : .. . DevIL : I downloaded and installed this one DevIL 1.7.8 SDK for 32-bit Windows http : downloads.sourceforge.net openil DevIL-SDK-x86-1.7.8.zip .. . Assimp : assimp--3.0.1270-sdk .. . .. . Project settings : .. . Platform : Active Win32 .. . Configuration : All Configurations .. . .. . Library Directories : .. . C : assimp--3.0.1270-sdk lib assimp release-dll win32 C : DevIL lib .. . .. . Include Directories : .. . C : assimp--3.0.1270-sdk include C : DevIL include .. . .. . Library Directories : .. . C : assimp--3.0.1270-sdk lib assimp release-dll win32 C : DevIL lib .. . .. . C C++ - General - Additional Include Directories : .. . C : assimp--3.0.1270-sdk include C : DevIL include .. . .. . Linker - Input - Additional Dependencies : .. . AdditionalDependencies .. . .. . .. . .. . .. . .. . .. . OK now when I compile my project I receive error : .. . .. . .. . .. . .. . By commenting out lines-of-code cant debug I ve found out where the error occurs : .. . .. . Anyone knows what s happening here How can I solve this I want to use parts of this code to render 3D .OBJ models in my OpenGL 3.3 project . .. . .. . If it s needed here s my debug log : .. . Answer : First the error is not a compiler or linker-error . That error is a runtime-error . You are running a 32-bit application but the SysWOW64 directory indicates you re attempting to load 64-bit components for the 32-bit program . This of course will not work . There could be several reasons for the error but the first one you should inspect are your project settings . Maybe somewhere x64 is being used causing a dependency on the 64-bit DLL s to be encountered . If all else fails please use a program such as Dependency Walker http : www.dependencywalker.com .. . .. . and inspect your EXE file to ensure it is a 32-bit executable and also to view the dependent DLL s . Comment : Oh my god . I just found out that that i actually placed the 64-bit Devil.dll into my Release folder where exe is placed . I ve replaced it with 32-bit from DevilSDK and now it works puu.sh d8We1 7b65007aa7.png http : puu.sh d8We1 7b65007aa7.png I m so happy Thank you so much Paul Have a wonderful life and I wish you to be the happiest person on earth Thank you", "Question : null .. . Answer : I m writting to you this email because i ve got some trouble to create a script in unity 3d version 5.3.4f1 . First i tried with assimpNet 3.0 because i veread that it works better but when i try to get the tree structure of my ifc file it doesn t really work the script give another tree structure for exemple i get fiew nodes and then one node with 7 mesh but in the ifc file i have 2 nodes the first one with 6 meshes and the second one with 1mesh and then my meshes ind are not good so it doesn t work i can get the good meshes with other PostProcessSteps but i ve just one game object because of optimizeGraph . So i tried with the assimpNet 3.3.1 with the source code i did the dll able to work with unity . But now i get another problem when i tried to import my file with : .. . .. . I get this error : .. . .. . Assimp.AssimpContext.ImportFile System.String file PostProcessSteps postProcessFlags ImportIFC.Start at Assets Tests ImportIFC ImportIFC.cs : 51 .. . .. . So the script find the file but can not read it .. . .. . I give you my source code and if you have any question i ll be really happy to answer to you : My class to get the information : .. . .. . using System.Collections using Assimp .. . .. . public class MainNodeIFC .. . .. . .. . .. . My main code : .. . .. . .. . .. . .. . .. . sorry for my english i m a frensh student working also . Thanks for your attention Comment : Currently having the same problem do you by any chance came any closer in solving the problem Comment : No finaly i think this wrapper not really work with ifc file...so i m trying to do my own library but IFC file are really complicated.. . let me know if you find something" ] }
[ "yes-answer-long", "yes-answer-short" ]
assimp
UNK_RELATION
gulp-ruby-sass@sass@75
gulp-ruby-sass -- a gulp plugin for compilation of sass to css using ruby @placeholder gem .
{ "confidence": [ 81.29156494140625, 78.81354522705078, 76.99526977539062, 74.57682037353516, 74.51052856445312, 74.27300262451172, 73.56244659423828, 73.48930358886719, 73.00756072998047, 72.96868896484375, 72.5731430053711, 72.22422790527344, 72.22422790527344, 72.22422790527344, 71.1983413696289, 70.62562561035156, 70.40016174316406, 69.65193176269531, 69.65193176269531, 69.5043716430664, 69.47986602783203, 69.28617095947266, 68.4759292602539, 68.41080474853516, 67.98335266113281, 67.86962127685547, 67.68030548095703, 67.4654769897461, 66.93206787109375, 66.36445617675781, 64.56809997558594, 64.51648712158203, 64.33456420898438, 64.33456420898438, 63.60686111450195, 63.392425537109375, 61.86626052856445, 61.27484130859375, 61.27484130859375, 61.15154266357422, 60.78644561767578, 60.72190856933594, 60.22389221191406, 60.08137512207031, 59.78363800048828, 59.303314208984375, 59.21410369873047, 58.86186218261719, 58.50029754638672, 58.355934143066406, 58.2957763671875, 58.135398864746094, 58.08789825439453, 57.759788513183594, 57.279541015625, 56.74353790283203, 56.61913299560547, 56.483062744140625, 55.9886360168457, 55.91773223876953, 55.654212951660156, 55.60472106933594, 54.96091079711914, 54.96091079711914, 54.96091079711914, 54.0538330078125, 54.01181411743164, 53.701393127441406, 53.616722106933594, 53.51282501220703, 53.34069061279297, 52.99602127075195, 52.24105453491211, 52.24105453491211, 51.838165283203125, 51.0273323059082, 50.27616500854492, 50.02399444580078, 49.80064392089844, 49.54441452026367, 49.48223114013672, 48.274147033691406, 47.66265106201172, 47.314231872558594, 47.30413818359375, 46.92803955078125, 46.90747833251953, 46.479522705078125, 45.80583953857422, 45.05656814575195, 44.89960479736328, 43.916683197021484, 43.65214538574219, 43.65214538574219, 43.05094909667969, 43.04886245727539, 42.78107833862305, 42.49750518798828, 42.12422561645508, 41.86638641357422 ], "content": [ "now i use Gulp-Ruby-Sass for Gulp.js .. . .. . But the plugin gulp-ruby-sass slower than gulp-sass .", "I m using gulp-ruby-sass and gulp-sourcemaps .", "Edit : Using gulp-sass not gulp-ruby-sass since gulp-ruby-sass does only support single files as mentioned in the docs https : www.npmjs.com package gulp-ruby-sass important : .. . .. . gulp-ruby-sass doesn t support globs yet only single files or directories .", "I m currently using gulp-ruby-sass to generate CSS .", "From the gulp-ruby-sass README https : github.com sindresorhus gulp-ruby-sass important : .. . .. . gulp-ruby-sass doesn t support globs yet only single files or directories .", "I use gulp-ruby-sass", "The gulp plugin gulp-ruby-sass doesn t work gulp-ruby-sass : 2.0.4 for the compiler at the same time it does work with its own old version gulp-ruby-sass : 0.7.1 .. . .. .", "gulp-ruby-sass uses by default the gem sass to compile your scss files .", "Which version of gulp-ruby-sass are you using", "You have to use gulp-sass instead of gulp-ruby-sass .", "I m using gulp-ruby-sass to compile my js and sass .", "github.com sindresorhus gulp-ruby-sass issues 196 https : github.com sindresorhus gulp-ruby-sass issues 196", "If you can t downgrade your ruby version you could use gulp-sass instead of gulp-ruby-sass .", "github.com sindresorhus gulp-ruby-sass verbose https : github.com sindresorhus gulp-ruby-sass verbose", "I m also using gulp-ruby-sass http : stackoverflow.com tags gulp-ruby-sass info .. . .. . Just replace compressed with expanded above .", "Since gulp-ruby-sass is just a wrapper for Ruby sass you just need to pass the correct params into the gulp-sass function namely : bundleExec : true compass : true and require sass-globbing .", "Read the docs https : github.com sindresorhus gulp-ruby-sass usage : .. . .. . Use gulp-ruby-sass instead of gulp.src to compile Sass files .", "You cannot use gulp-ruby-sass in a .pipe .", "I m trying to run gulp-ruby-sass on Windows .", "The official gulp-ruby-sass documentation https : github.com sindresorhus gulp-ruby-sass says it should be done like this :", "https : www.npmjs.com package gulp-ruby-sass .. . .. . Here is my Gulp Task", "I have issue with importing .css files via gulp-ruby-sass .", "I a using a gulp task to compile my scss to css with gulp-ruby-sass run Autoprefixer and create sourcemaps .", "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 .", "I m trying to compile sass using gulp-ruby-sass but I m getting TypeError : glob pattern string required .", "I ve tried to compile using vanilla Sass gulp-sass and gulp-ruby-sass and I get the exact same error on all of them .", "From the docs https : github.com sindresorhus gulp-ruby-sass sasssource-options : .. . .. . Use gulp-ruby-sass instead of gulp.src to compile Sass files .", "The issue I have is that neither gulp-sass nor gulp-ruby-sass will work", "You can t use gulp-ruby-sass in a pipe .", "Looks like you re using generator-gulp-angular and selected ruby-sass .", "Trying to convert bootstrap-sass to css using gulp .", "Gulp plugin gulp-ruby-sass https : github.com sindresorhus gulp-ruby-sass giving not compiling the error message in terminal coming like this .. . .. . Error : must provide pattern .. . .. . Here is the gulpfile.js details", ".map before doing pipe filter .. . .. . 2 - If you read the doc of gulp-ruby-sass here there is no sourcemapPath option : https : github.com sindresorhus gulp-ruby-sass", "Looking at the docs https : github.com sindresorhus gulp-ruby-sass it doesn t seem like you re supposed to pipe into gulp-ruby-sass but rather call it directly like that :", "I am creating sourcemaps with Gulp using gulp-ruby-sass post-csss and autoprefixer .", "With gulp-ruby-sass I get the arguments to path.join must be strings error .", "Try removing this : .. . .. . I assume you re using the 1.0.0-alpha.x version of gulp-ruby-sass : .. . .. . https : github.com sindresorhus gulp-ruby-sass tree rw 1.0 sourcemap", "The problem is all the examples do not integrate Sass as the first step I use gulp-ruby-sass .", "Then at the top of your gulpfile add const sass require gulp-ruby-sass and see if this does the trick for you", "This is on Mac 10.11.4 with Chrome dev 51 and Safari 9.1 gulp-ruby-sass 2.0.6 gulp-autoprefixer 3.1.0 .", "The sass gem works just fine on Ruby 2.2 on Ubuntu and OS X .", "Using gulp-watch I get error for sass compiler module as following : .. . .. . I did loaded gulp-ruby-sass https : github.com sindresorhus gulp-ruby-sass in gulpfile.js and added watch task as : .. . .. . Any help with issue is much appreciated :", "And with gulp-sass sends me an error .", "Sourcemap usage in docs looks different than in your example : github.com sindresorhus gulp-ruby-sass tree rw 1.0 sourcemap https : github.com sindresorhus gulp-ruby-sass tree rw 1.0 sourcemap", "The gulp plugin gulp-ruby-sass doesn t work when compiling sass files .", "So like many people new to Gulp I m struggling getting gulp-sass or gulp-ruby-sass working properly on my development-machine win7 xampp drupal .", "I m trying to get a notification when my gulp-ruby-sass compiler has an error .", "I m using gulp-ruby-sass and here s the code in gulpfile.js .. . .. . When I run gulp styles I get the error .. . .. . Sass is at version 3.4.14 compass at 1.0.3 gem at 2.0.14 .. . .. . I have referred to several posts and none of them were able to solve this issue .", "My goal is to use one scss file with n number of asset partials to create n number of css stylesheets while using gulp-ruby-sass .", "Seems like gulp-sass doesn t handle sourcemaps by itself gulp-sourcemaps https : github.com dlmanning gulp-sass source-maps is needed", "Everything almost works but there is this issue 05 : 50 : 46 gulp-ruby-sass stderr : Errno : : EINVAL : Invalid argument @ rb sysopen - .css Use --trace for backtrace .", "This was solved by with using gulp-ruby-sass with the correct src syntax and making sure that the params bundleExec : true compass : true require : sass-globbing", "I have checked the documentation of the repository gulp-ruby-sass https : www.npmjs.com package gulp-ruby-sass and other topics in stackoverflow and the one solution that i have found is import all sass code into one file and compile it .", "Are there ways to typeset through gulp-sass + .sass files", "But is simple with gulp-ruby-sass i can not compile directory because is not possible according the naeramatrth7 post .", "If I compile the scss with gulp-ruby-sass gulp-autoprefixer works but if a compile de scss with gulp-compass autoprefixer doen t work .", "I m using Ruby sass with PostCSS .", "I have tried different paths : . sass sass sass even the last syntax with gulp.src path .sass with gulp-sass repository as well .", "var gulp require gulp .. . sass require gulp-ruby-sass .. . minifycss require gulp-minify-css .. . uglify require gulp-uglify .. . rename require gulp-rename .. . concat require gulp-concat .. . notify require gulp-notify .. . autoprefixer require gulp-autoprefixer .. . del require del .. . .. . gulp.task styles function .. . return sass public sass .. . .pipe autoprefixer last 2 version safari 5 ie 8 ie 9 opera 12.1 ios 6 android 4 .. . .pipe minifycss .. . .pipe gulp.dest public css .. . .pipe notify message : Styles complete", "I use sass triggered by a gulp task to generate my css files .", "I know the syntax between versions of gulp-ruby-sass changed but none of the new syntax changes worked for me and gulp-sass shouldn t have issues with file globbing .", "I need gulp to use gulp-ruby-sass or some other plugin to do exactly what line 1 on style.scss is doing or something like on to it and get the same results .", "In the docs for gulp-ruby-sass I found the option for noCache however I m not sure where to set it or what the syntax is .", "Gulp sass doesn t require ruby at all as it uses a wrapper made in node for a C C++ library - libsass .", "Unfortunately the API of gulp-ruby-sass has changed in September with their 2.0.0 release and the generator wasn t updated since .", "In the gitHub page of the repo https : github.com sindresorhus gulp-ruby-sass says what you could use to log the errors : .. . .. . Try that and tell me if it works .", "I ran into this error first TypeError : Arguments to path.join must be strings .. . .. . Found this answer http : stackoverflow.com questions 28140012 gulp-typeerror-arguments-to-path-join-must-be-strings and it was because I was using sourcemaps with gulp-sass and the answer recommended using gulp-ruby-sass instead .", "npmjs.com package gulp-json-sass https : www.npmjs.com package gulp-json-sass", "Gulp-sass was not working that is why I decided to use ruby sass stackoverflow.com questions 37324519 http : stackoverflow.com questions 37324519 node-sass-does-not-yet-support-your-current-environment-linux-64-bit-with-false", "That means your sass option for gulp-json-sass is wrong .", "Possible duplicate of Gem install error sass compass http : stackoverflow.com questions 26141589 gem-install-error-sass-compass", "I m not using compass or codekit just Gulp to compile my SASS files .", "The gulp-ruby-sass syntax has been changed : .. . .. . Please check it out and mark your problem as solved .", "The code was for old version of gulp-ruby-sass new version 2.0.4 required another way for coding", "I found a way how do it with gulp-sass", "From the docs https : www.npmjs.com package gulp-json-sass sass : .. . .. . If truthy output valid sass variables .", "I m using gulp-sourcemaps in my project to process my SASS and JavaScript .", "How do you compile SASS in multiple directories with gulp", "You could also edit your post and include your gulp-ruby-sass version or your package.json and also your nodejs version .", "Line 15 : .pipe filter filter is actually gulp-filter I got this from here http : stefanimhoff.de 2014 gulp-tutorial-4-css-generation-sass", "There have been breaking changes with gulp-ruby-sass 1.0 and it has a rather weird behaviour now although the definitely have some reason for that .. . just don t know which one - .. . .. . But it seems that you not only have to tell Sass that you re using sourcemaps but also have to use Gulps sourcemap plugin to achieve this .", "Thanks a lot I watched the video tutorial where gulp-ruby-sass was used the way I used it so I didn t even look at the official docs .", "I am trying to run the sass task in my config with gulp-ruby-sass this is the error that I get the error will be followed by my config and code : .. . .. . My config for the sass task looks like this : .. . .. . The sass task is here : .. . .. . This is my scsslint task : .. . .. . I execute them for browser-sync and in the watch task : .. . .. . .. . .. . gulp.task watch serve function gulp.watch config.jshint jshint gulp.watch config.sass scsslint sass", "Already answered here : stackoverflow.com questions 24397679 http : stackoverflow.com questions 24397679 indented-sass-syntax-not-working-with-node-sass-and-gulp-sass 25211459 25211459", "I have these 2 related gulp tasks : .. . .. . It runs sass then the autoprefixer task .", "Next I tried to compile all my SASS files using this syntax : .. . .. . Which produced this error : gulp-ruby-sass stderr : Errno : : ENOENT : No such file or directory - public sources sass .scss .. . .. . I then noticed in the answer I found the author wrote that globes aren t supported yet : .. . .. . Also keep in mind as of this writing when using gulp-ruby-sass 1.0.0-alpha globs are not supported yet . .. . .. . I did more digging and found a way to use an Array to specify the paths to my SASS files so then I tried the following : .. . .. . But still I m getting Errno : : ENOENT : No such file or directory and it lists all the dirs I put into that array .", "My recommendation is to use node-sass instead - if you have no absolute need for ruby-sass of course .", "Note there are 2 SCSS files in the sass folder : .. . .. . If I run gulp styles this works without error and creates the CSS files AND the map files in . app css .", "I was having trouble using .scss too .. . .. . In the git documentation https : github.com sindresorhus gulp-ruby-sass they use this sintax : .. . .. . I tested it and it works it compiles all the files within the folder .", "This is my gulp css task .", "Install Sass Using the Command Prompt .. . .. . CMD + R type cmd hit ENTER .. . .. . Type gem install sass .. . .. . If you get an error message then it s likely you will need to use the sudo command to install the Sass gem .", "Do you have something like gulp-sass installed also inside your gulpfile you need initialize it .", "I m experiencing strange behaviour using this Gulp configuration to minify my SASS files generating sourcemaps .", "The first time I run this script using gulp it ll generate a correct full.min.css and it waits for changes in the SASS directory .", "I m used to grunt sass packages generating CSS sourcemaps that I can use to debug my sass .", "I made some tests and I noticed that sass doesn t seem to work on Windows while using Ruby 2.2.2 .", "I was asking about json-sass options about delim npmjs.com package gulp-json-sass jsonsassoptions https : www.npmjs.com package gulp-json-sass jsonsassoptions Is it big issue just leave it : I will add it as another question", "Anyhow here s an article I wrote on that topic : http : fettblog.eu blog 2014 04 10 gulp-sass-autoprefixer-sourcemaps .. . .. . And here s the Gist :", "Just like Sass .", "The error happens at the second line of this function : .. . .. . With gulp-sass I get an error file to import not found or unreadable : variables .. . .. . This error also occurs at the the src return sass line ." ] }
{ "confidence": [ 97.35702514648438, 94.60723114013672, 92.20773315429688, 89.637451171875, 88.92071533203125, 88.83499908447266, 87.78492736816406, 86.17140197753906, 86.15819549560547, 85.25184631347656, 85.13763427734375, 85.0012435913086, 84.83287048339844, 83.82476043701172, 83.6856689453125, 83.0357666015625, 82.920654296875, 82.77967071533203, 82.2940444946289, 81.58624267578125 ], "content": [ "Question : I use sass triggered by a gulp task to generate my css files . I recently formatted my computed and this task stopped working . This task used to work fine before I reinstalled my OS Windows 8.1 . Now after I run this task there is no visible errors but no css files are created . So the question is : .. . .. . Why did my gulp task stopped generating my css files .. . Answer : Your gulp task is fine . gulp-ruby-sass uses by default the gem sass to compile your scss files . Since you recently formatted your computer I bet you installed the last version of Ruby Installer for Windows . I made some tests and I noticed that sass doesn t seem to work on Windows while using Ruby 2.2.2 . The sass gem works just fine on Ruby 2.2 on Ubuntu and OS X . If that s an option I suggest that you downgrade from Ruby 2.2.x to Ruby 2.1.6 and that should fix your problem . .. . .. . In case it doesn t you could use gulp-debug to check your stream and start from there . If you can t downgrade your ruby version you could use gulp-sass instead of gulp-ruby-sass . Gulp sass doesn t require ruby at all as it uses a wrapper made in node for a C C++ library - libsass . You could also edit your post and include your gulp-ruby-sass version or your package.json and also your nodejs version . Comment : Thanks a lot Downgrading from Ruby 2.2 to Ruby fixed my problem I still don t have reputation to upvote you though .", "Question : Using gulp-watch I get error for sass compiler module as following : .. . .. . I did loaded gulp-ruby-sass https : github.com sindresorhus gulp-ruby-sass in gulpfile.js and added watch task as : .. . .. . Any help with issue is much appreciated : Comment : You havent mentioned any code . Please mention the relevant past of your code in the question . Comment : @RahulDesai sorry for that I just attached my code . Comment : Possible duplicate of Gem install error sass compass http : stackoverflow.com questions 26141589 gem-install-error-sass-compass Comment : Check if you have Ruby installed . Comment : @RahulDesai installed ok . .. . Answer : Do you have something like gulp-sass installed also inside your gulpfile you need initialize it . Then put in your task Comment : Also depending on what you are using you might need to install sass globally npm i sass -g Comment : I use gulp-ruby-sass Comment : Then at the top of your gulpfile add const sass require gulp-ruby-sass and see if this does the trick for you Comment : I already did . check attached code .", "Question : I am relatively new to gulp . I have one issue when I try to compile one directory with subfolders with their sass files . Folder structure : .. . .. . My simple gulp task to try the compilation .. . .. . This task above doesn t work with a folder but if I specify the file like in gulp task below it works correctly . I have checked the documentation of the repository gulp-ruby-sass https : www.npmjs.com package gulp-ruby-sass and other topics in stackoverflow and the one solution that i have found is import all sass code into one file and compile it . I have tried different paths : . sass sass sass even the last syntax with gulp.src path .sass with gulp-sass repository as well . Can you help me Thanks in advance Comment : Im using webstorm with gulpfile.js Comment : The solutions you ve found are correct . Create a main sass file and import all the files you want to use . Comment : So if i want to separate my final css in two for differents parts of my application i need two gulp tasks I think that it is not the way . Comment : ohh so you want the output to be file1.css file2.css etc Comment : Yes . I want diferent css . Now is a simple example but in my application i will need different final css . Maybe two or three . .. . Answer : Edit : Using gulp-sass not gulp-ruby-sass since gulp-ruby-sass does only support single files as mentioned in the docs https : www.npmjs.com package gulp-ruby-sass important : .. . .. . gulp-ruby-sass doesn t support globs yet only single files or directories . Just like Sass . You should create a stream with valid glob arguments gulp.src instead of just calling sass directly and call it in a pipe : .. . .. . If the files you just want to import are named correctly starting with an underscore this should work as well : .. . .. . Edit : Fixed some code errors - SO needs a linter Comment : Hi i dont know what is the meaning of globs but few words later it puts or directories . I understood bad then . So i have tried with the procedure that you explain me with a common error Arguments to path.join must be strings . And this is the end for me im still searching but i dont know what to do with this error . Comment : Can you share your updated code that is not working Comment : I will try after work other time and i tell you . But is simple with gulp-ruby-sass i can not compile directory because is not possible according the naeramatrth7 post . And with gulp-sass sends me an error .", "Question : I m trying to run gulp-ruby-sass on Windows . I ve already installed Ruby and Sass like that : gem install sass .. . .. . My gulp.task looks like this : .. . .. . When I cd into the root directory of my project and run gulp styles I get this : .. . .. . I ve been searching for a solution to this problem for about two hours now and still haven t found one that would help me . .. . Answer : INSTALL RUBY http : i.stack.imgur.com CYr9g.png .. . .. . Use the Ruby installer and reinstall it . Then check the path checkbox . It should be resolved then . 2 . Install Sass Using the Command Prompt .. . .. . CMD + R type cmd hit ENTER .. . .. . Type gem install sass .. . .. . If you get an error message then it s likely you will need to use the sudo command to install the Sass gem . It would look like : .. . .. . sudo gem install sass .. . .. . 4 Reboot the NODE command-line . In fact you might want to reboot the system most users do not do enough of that .", "Question : I am trying to run the sass task in my config with gulp-ruby-sass this is the error that I get the error will be followed by my config and code : .. . .. . My config for the sass task looks like this : .. . .. . The sass task is here : .. . .. . This is my scsslint task : .. . .. . I execute them for browser-sync and in the watch task : .. . .. . .. . .. . gulp.task watch serve function gulp.watch config.jshint jshint gulp.watch config.sass scsslint sass Comment : What is line 15 in your sass.js Comment : Also what is the value of app in sourcemapPath : app+ css Comment : @LimH . Line 15 : .pipe filter filter is actually gulp-filter I got this from here http : stefanimhoff.de 2014 gulp-tutorial-4-css-generation-sass Comment : @LimH . This is the variable app in my config var app app .. . Answer : You are using a glob for your sources . From the gulp-ruby-sass README https : github.com sindresorhus gulp-ruby-sass important : .. . .. . gulp-ruby-sass doesn t support globs yet only single files or directories . Just like Sass . To fix change your config to : .. . .. . src : app + scss", "Question : I ve started experimenting with gulp.js . I m used to grunt sass packages generating CSS sourcemaps that I can use to debug my sass . I m currently using gulp-ruby-sass to generate CSS . At the end of the process no source-maps are being generated and there is no sourcemap reference in the CSS file . My gulpfile looks like this : Comment : Seems like gulp-sass doesn t handle sourcemaps by itself gulp-sourcemaps https : github.com dlmanning gulp-sass source-maps is needed .. . Answer : There have been breaking changes with gulp-ruby-sass 1.0 and it has a rather weird behaviour now although the definitely have some reason for that .. . just don t know which one - .. . .. . But it seems that you not only have to tell Sass that you re using sourcemaps but also have to use Gulps sourcemap plugin to achieve this . I guess the change has been made to someday integrate better with Gulp 4 . Anyhow here s an article I wrote on that topic : http : fettblog.eu blog 2014 04 10 gulp-sass-autoprefixer-sourcemaps .. . .. . And here s the Gist :", "Question : I m using Ruby sass with PostCSS . This is my gulp css task . Error I m getting .. . Answer : You cannot use gulp-ruby-sass in a .pipe . Read the docs https : github.com sindresorhus gulp-ruby-sass usage : .. . .. . Use gulp-ruby-sass instead of gulp.src to compile Sass files . You ll have to use sass before your postcss : Comment : Gulp-sass was not working that is why I decided to use ruby sass stackoverflow.com questions 37324519 http : stackoverflow.com questions 37324519 node-sass-does-not-yet-support-your-current-environment-linux-64-bit-with-false Comment : Just change the execution order then . See my edit .", "Question : I m trying to run gulp-ruby-sass on Windows . I ve already installed Ruby and Sass like that : gem install sass .. . .. . My gulp.task looks like this : .. . .. . When I cd into the root directory of my project and run gulp styles I get this : .. . .. . I ve been searching for a solution to this problem for about two hours now and still haven t found one that would help me . .. . Answer : I had the same error only in my situation sass package wasn t installed in RubyGem . You need to execute following command :", "Question : I m using gulp-ruby-sass to compile my js and sass . I ran into this error first TypeError : Arguments to path.join must be strings .. . .. . Found this answer http : stackoverflow.com questions 28140012 gulp-typeerror-arguments-to-path-join-must-be-strings and it was because I was using sourcemaps with gulp-sass and the answer recommended using gulp-ruby-sass instead . Next I tried to compile all my SASS files using this syntax : .. . .. . Which produced this error : gulp-ruby-sass stderr : Errno : : ENOENT : No such file or directory - public sources sass .scss .. . .. . I then noticed in the answer I found the author wrote that globes aren t supported yet : .. . .. . Also keep in mind as of this writing when using gulp-ruby-sass 1.0.0-alpha globs are not supported yet . .. . .. . I did more digging and found a way to use an Array to specify the paths to my SASS files so then I tried the following : .. . .. . But still I m getting Errno : : ENOENT : No such file or directory and it lists all the dirs I put into that array . How do you compile SASS in multiple directories with gulp .. . .. . SASS source folder structure : Comment : Use gulp.src as first and then pipe it with sass plugin . Gulp src handles globes with Comment : Not correct read the question Comment : Sourcemap usage in docs looks different than in your example : github.com sindresorhus gulp-ruby-sass tree rw 1.0 sourcemap https : github.com sindresorhus gulp-ruby-sass tree rw 1.0 sourcemap Comment : I don t understand why its not correct Heikki . He can take older version of plugin which has support for multiple-files and probably works fine and eventually change it in the future when autor will add functionality to in globes Comment : I agree with that addition it s correct : .. . Answer : I was having trouble using .scss too .. . .. . In the git documentation https : github.com sindresorhus gulp-ruby-sass they use this sintax : .. . .. . I tested it and it works it compiles all the files within the folder . Just in case someone has the same problem", "Question : null .. . Answer : I m using gulp-ruby-sass and here s the code in gulpfile.js .. . .. . When I run gulp styles I get the error .. . .. . Sass is at version 3.4.14 compass at 1.0.3 gem at 2.0.14 .. . .. . I have referred to several posts and none of them were able to solve this issue . Comment : Could you share your sass code It seems to be a problem with the path of your vendor file . Comment : In app.scss I changed the path of the file to be relative and it worked i.e . the vendor directory is located in parallel with styles directory . Making the path relative worked . However the same code was working fine earlier .", "Question : I am trying to run the sass task in my config with gulp-ruby-sass this is the error that I get the error will be followed by my config and code : .. . .. . My config for the sass task looks like this : .. . .. . The sass task is here : .. . .. . This is my scsslint task : .. . .. . I execute them for browser-sync and in the watch task : .. . .. . .. . .. . gulp.task watch serve function gulp.watch config.jshint jshint gulp.watch config.sass scsslint sass Comment : What is line 15 in your sass.js Comment : Also what is the value of app in sourcemapPath : app+ css Comment : @LimH . Line 15 : .pipe filter filter is actually gulp-filter I got this from here http : stefanimhoff.de 2014 gulp-tutorial-4-css-generation-sass Comment : @LimH . This is the variable app in my config var app app .. . Answer : There are 2 problems I can see from the stack-trace : .. . .. . 1 - I think you forgot this var filter gulpFilter .css .map before doing pipe filter .. . .. . 2 - If you read the doc of gulp-ruby-sass here there is no sourcemapPath option : https : github.com sindresorhus gulp-ruby-sass Comment : Everything almost works but there is this issue 05 : 50 : 46 gulp-ruby-sass stderr : Errno : : EINVAL : Invalid argument @ rb sysopen - .css Use --trace for backtrace . Comment : can you change .css inside gulpFilter into .scss Comment : I have changed the line to var filter gulpFilter .scss .map but the error seems to persist.I have also tried without the exclamation as well .scss", "Question : So like many people new to Gulp I m struggling getting gulp-sass or gulp-ruby-sass working properly on my development-machine win7 xampp drupal . My question is pretty simple : how can I get sass compilation with livereload to my browser I can confirm that my SASS compiles correctly using compass-watch or bundle exec guard but the regular livereload set up with Omega4 on drupal is painfully slow . It was suggested that I look into gulp grunt so I did and chose gulp due to it s reported ease of configuration .. . .. . I have also correctly installed gulp at the root of my webserver and I can call the few functions in my gulp file via the command-line individually or as the whole file via gulp . The issue I have is that neither gulp-sass nor gulp-ruby-sass will work With gulp-ruby-sass I get the arguments to path.join must be strings error . The error happens at the second line of this function : .. . .. . With gulp-sass I get an error file to import not found or unreadable : variables .. . .. . This error also occurs at the the src return sass line . I know the syntax between versions of gulp-ruby-sass changed but none of the new syntax changes worked for me and gulp-sass shouldn t have issues with file globbing . I m at a loss as to which combination of dependencies or syntax I need to get this going . For reference here is my gulpfile and dependencies for reference . Thanks in advance . .. . Answer : This was solved by with using gulp-ruby-sass with the correct src syntax and making sure that the params bundleExec : true compass : true require : sass-globbing", "Question : I m trying to get the sourcemaps to work with Gulp . I m using gulp-ruby-sass and gulp-sourcemaps . The inline sourcemap gets inserted in the CSS file but it still doesn t work in Chrome even though I ve enabled sourcemaps . I can still only see the references to the CSS file and not the sass files . This is the sass task in my gulpfile : .. . .. . The inline sourcemap in my CSS file looks like this : .. . .. . I decoded the base64 into this : .. . .. . Does this look right I m not sure how it s meant to look but I would have thought the scss filename references should be in there Just can t get it to work .. . Answer : Try removing this : .. . .. . I assume you re using the 1.0.0-alpha.x version of gulp-ruby-sass : .. . .. . https : github.com sindresorhus gulp-ruby-sass tree rw 1.0 sourcemap Comment : Thank you It s all working now .", "Question : now i use Gulp-Ruby-Sass for Gulp.js .. . .. . But the plugin gulp-ruby-sass slower than gulp-sass . I am very comfortable to typeset through .sass files . Are there ways to typeset through gulp-sass + .sass files P.S . Sorry for my English . Comment : Already answered here : stackoverflow.com questions 24397679 http : stackoverflow.com questions 24397679 indented-sass-syntax-not-working-with-node-sass-and-gulp-sass 25211459 25211459 .. . Answer : I found a way how do it with gulp-sass", "Question : I m trying to compile sass using gulp-ruby-sass but I m getting TypeError : glob pattern string required . This is what my gulpfile.js looks like : .. . .. . Here is my folder structure : .. . .. . I m fresh new to Gulp and I haven t used Grunt either so excuse me if I made a trivial mistake . .. . Answer : Looking at the docs https : github.com sindresorhus gulp-ruby-sass it doesn t seem like you re supposed to pipe into gulp-ruby-sass but rather call it directly like that : Comment : Thanks a lot I watched the video tutorial where gulp-ruby-sass was used the way I used it so I didn t even look at the official docs .", "Question : The gulp plugin gulp-ruby-sass doesn t work gulp-ruby-sass : 2.0.4 for the compiler at the same time it does work with its own old version gulp-ruby-sass : 0.7.1 .. . .. . enter image description here http : i.stack.imgur.com TjGuU.png .. . Answer : The code was for old version of gulp-ruby-sass new version 2.0.4 required another way for coding", "Question : I m using gulp-ruby-sass to compile my js and sass . I ran into this error first TypeError : Arguments to path.join must be strings .. . .. . Found this answer http : stackoverflow.com questions 28140012 gulp-typeerror-arguments-to-path-join-must-be-strings and it was because I was using sourcemaps with gulp-sass and the answer recommended using gulp-ruby-sass instead . Next I tried to compile all my SASS files using this syntax : .. . .. . Which produced this error : gulp-ruby-sass stderr : Errno : : ENOENT : No such file or directory - public sources sass .scss .. . .. . I then noticed in the answer I found the author wrote that globes aren t supported yet : .. . .. . Also keep in mind as of this writing when using gulp-ruby-sass 1.0.0-alpha globs are not supported yet . .. . .. . I did more digging and found a way to use an Array to specify the paths to my SASS files so then I tried the following : .. . .. . But still I m getting Errno : : ENOENT : No such file or directory and it lists all the dirs I put into that array . How do you compile SASS in multiple directories with gulp .. . .. . SASS source folder structure : Comment : Use gulp.src as first and then pipe it with sass plugin . Gulp src handles globes with Comment : Not correct read the question Comment : Sourcemap usage in docs looks different than in your example : github.com sindresorhus gulp-ruby-sass tree rw 1.0 sourcemap https : github.com sindresorhus gulp-ruby-sass tree rw 1.0 sourcemap Comment : I don t understand why its not correct Heikki . He can take older version of plugin which has support for multiple-files and probably works fine and eventually change it in the future when autor will add functionality to in globes Comment : I agree with that addition it s correct : .. . Answer : Figured it out Well not 100 still not sure why the multiple path array didn t work . Anyways so I forgot that in my main web.scss file I already had multiple import statements setup : .. . .. . So I didn t actually need to try use Gulp the way I was trying I just needed to target that 1 .scss file directly . So I did that here : .. . .. . Now it works because it sees a specific file to target and compile Comment : Nice interesting how often the simple solutions are the answers .", "Question : Gulp plugin gulp-ruby-sass https : github.com sindresorhus gulp-ruby-sass giving not compiling the error message in terminal coming like this .. . .. . Error : must provide pattern .. . .. . Here is the gulpfile.js details .. . Answer : The gulp-ruby-sass syntax has been changed : .. . .. . Please check it out and mark your problem as solved . Comment : ok what if I want to run sass after some other plugin so it is not the first method used in pipeline", "Question : Pretty simple here I understand the basics of the statement but how do I work around this I use lots of file globbing in my sass . Please advise . .. . Answer : So this is basically because of how gulp treats individual files within a stream . Since gulp-ruby-sass is just a wrapper for Ruby sass you just need to pass the correct params into the gulp-sass function namely : bundleExec : true compass : true and require sass-globbing . after that they all play nice .", "Question : Is it possible to have a scss file converted to an expanded and compressed css file What I d like to have is a bootstrap.scss file saved as boostrap.css and bootstrap.min.css .. . .. . I currently have the following code that will covert the scss file to a compressed css file that has the same name . .. . Answer : I m also using gulp-ruby-sass http : stackoverflow.com tags gulp-ruby-sass info .. . .. . Just replace compressed with expanded above ." ] }
[ "yes-answer-long", "yes-answer-short" ]
sass
UNK_RELATION
boost-python@python@77
boost-python -- library for intuitive and tight integration between c++ and @placeholder .
{ "confidence": [ 31.466064453125, 28.672740936279297, 28.52014923095703, 28.163162231445312, 27.156658172607422, 26.884044647216797, 26.884044647216797, 26.884044647216797, 26.666881561279297, 25.943992614746094, 25.437911987304688, 25.162017822265625, 25.162017822265625, 25.05645751953125, 25.031627655029297, 24.82038116455078, 24.759925842285156, 24.48775863647461, 24.48775863647461, 24.48775863647461, 24.344417572021484, 24.231525421142578, 24.231525421142578, 24.208864212036133, 24.08367347717285, 23.9749755859375, 23.9749755859375, 23.9749755859375, 23.9749755859375, 23.930683135986328, 23.592159271240234, 23.507787704467773, 23.507787704467773, 23.445884704589844, 23.36902618408203, 23.36902618408203, 23.284820556640625, 23.284820556640625, 23.284820556640625, 23.284820556640625, 23.19363021850586, 23.063907623291016, 23.042064666748047, 23.042064666748047, 23.042064666748047, 23.042064666748047, 23.003520965576172, 23.003520965576172, 22.976642608642578, 22.90170669555664, 22.881481170654297, 22.881481170654297, 22.797142028808594, 22.595422744750977, 22.595422744750977, 22.48189926147461, 22.48189926147461, 22.393529891967773, 22.372455596923828, 22.372455596923828, 22.372455596923828, 22.372455596923828, 22.32506561279297, 22.281265258789062, 22.21610450744629, 22.14006233215332, 22.138423919677734, 22.091156005859375, 22.091156005859375, 22.091156005859375, 22.091156005859375, 21.98249053955078, 21.970413208007812, 21.970413208007812, 21.758079528808594, 21.70278549194336, 21.65536880493164, 21.65536880493164, 21.65536880493164, 21.65536880493164, 21.65536880493164, 21.65536880493164, 21.65536880493164, 21.65536880493164, 21.65536880493164, 21.65536880493164, 21.63680648803711, 21.59463119506836, 21.570735931396484, 21.570735931396484, 21.504539489746094, 21.501928329467773, 21.501928329467773, 21.501928329467773, 21.501928329467773, 21.50069236755371, 21.450023651123047, 21.44086456298828, 21.344329833984375 ], "content": [ "I am integrating a legacy C++ library with Python using boost-python .", "I am writing a python wrapper for a C++ library and I am using boost-python .", "I m using boost-python to create a binding to a c++ library .", "Take a look at Boost Python that is the most versatile and powerful tool to bridge between C++ and Python .", "In defence of boost : : python given Alexander s answer on ctypes : .. . .. . Boost python provides a very c++ interface between c++ and python code - even doing things like allowed python subclasses of c++ classes to override virtual methods is relatively straightforward .", "I m relatively new to python and its C++ wrappers like boost-python .", "I am embedding python in my C++ application using boost-python .", "I m adding a python-module in a c++ code using boost : : python .", "I ended up giving up on the boost-python library and learned the python C API .", "Is there any way to tell Boost Python to not take ownership of C++ objects it creates", "C++ library header is something like : .. . .. . In stuck with the Boost : : Python code.. . .. . .. . How do I wrap these raw buffers to expose them as raw strings in Python", "Uninstall boost-python if already installed : brew uninstall boost-python .", "Make sure you have boost-python brew boost-python .", "Boost.Python uses registered converters when going between C++ and Python types .", "I cannot find a way to do that by C python libraries boost or SWIG .", "I have installed boost and boost-python with homebrew .", "Install boost-python with python3 support but without python-2.7 support : brew install boost-python --with-python3 --without-python .", "Boost python doesn t help you there .", "Both are not part of the tutorial for boost-python .", "I am new to boost-python .", "I want to wrap an existing C++ library which involves a blocking message loop and calling handler functions for Python using boost : : python .", "what is the boost-python library name do you have in your system", "I am using the boost : : python library in this tiny mwe .", "I m not sure if this is possible just with c++ as boost-python already set the metaclass of exposed types to Boost : : Python : : class .", "boost is a c++ module .", "I have a python project to which I would like to interface with some C++ libraries using Boost : : Python .", "I m trying to access returned string values from a Python function in C++ using Boost Python .", "I am currently passing a C++ pointer to a python callback function with the boost : : python : : call function .", "If this helps I already exported the C++ type dd real to python using boost : : python maybe this can be reused somehow .", "One python class handles all the queries in a pythonic manner by calling a python extension module written in c++ with boost-python .", "I executed brew install boost-python --with-python3 --without-python cmake can t locate the boost it works with brew install boost-python + cmake . . ...ominited content.. . -- Could NOT find Boost", "Boost python is used to call cplusplus functions from a python source .", "Pass the object pointer via boost : : python : : ptr to python .", "I tried to install Dionysus on OS X 10.11 having previously installed boost boost-python using homebrew .", "I have seen one post http : boost.2283326.n4.nabble.com boost-python-call-python-function-with-kwargs-from-c-td2703011.html suggesting to use the options syntax how cool is this", "Basically given the type list boost : : python : : bases A B C I want to convert this to a boost : : python : : tuple of instances that I can pass into something like PyErr NewExceptionWithDoc .", "Long answer : .. . .. . is boost : : python : : object i.e .", "Boost python is really very neat sometimes .", "boost : : signals2 : : signal interacting with python objects .", "The other problem is the strong coupling of boost and python versions .", "I decided to experiment with embedding Python code in C++ using the Boost.Python library .", "-use-project boost .. . - : . . . . . . . . .. . - .. . Set up the project-wide requirements that everything uses the .. . - boost-python library from the project whose global ID is .. . - boost-python .", "I have a method exported to Python using boost-python that takes a boost : : function as an argument .", "So what is the syntax I need to use for boost : : python to accept my python functions as a boost : : function", "This code here will convert a python callable to a boost : : python bool object it can be easily modified to convert to other boost functions .", "For the setter the easiest way is to assign the array elements manually from a boost : : python : : object using a boost : : python : : stl input iterator double .", "Here is a complete example of return optional a ResultConverter model that takes a C++ boost : : optional T object and converts it to the appropriate Python object .", "PyCXX Cython and boost : : python are three other choices people mentioned is there any consensus which one is more suitable for C++", "To extend Python without introducing a module an intermediate library could be created that provided a C API that wraps the C++ library .", "Environment : Boost 1.61.0 compiled with Python 3.5 .. . .. . The following C++ code outputs 12 : .. . .. . However if I replace boost : : ref with std : : ref a boost : : python : : error already set instance is thrown .", "I d really like to know if there is a possibility to pass a reference of a python list to a boost : : python c++ dll .", "If the function accepts the list as a boost : : python : : list object then C++ now has a reference to the Python object .", "We have an extensive c++ library which we made available to python through use of a python wrapper class which calls an interface that we defined in boost-python .", "So the questions is how to build boost-python against python-3.4", "Unlike Boost-Python Python has very good docs .", "I have boost - python installed .", "You neglected to install boost : : python .", "Python-strings are immutable and by default with your configuration boost-python will convert the std : : string into a new python string str .", "I am using python 3.4.3 and boost 1.59 .", "The problem is due to Python version mismatch inside Boost .", "Instances of this functor will be wrapped in a callable boost : : python : : object .", "I m not quite sure how to deal in Boost : : Python with it .", "However the mechanism does not seem to work reliably when boost : : python returns a boost : : shared-ptr to a value that was produced in Python and is recorded on a C++ static variable .", "It s only as powerful as the Python C API but it s definitively a great library .", "I built boost using BJAM with Boost 1.54.0 and Python 2.7.5 .", "I would like to know how others go about organising their python boost : : python C++ code within the same project .", "Nice article about handling python exceptions in C++ https : misspent.wordpress.com 2009 10 11 boost-python-and-handling-python-exceptions .", "So basically having a C++ exception hierarchy is out since there s really no way to express that in Python via Boost", "I have a series of C++ structures I am trying to wrap using boost-python .", "I think you are supposed to use boost : : python : : list from within the exported module not from a C++ program directly .", "Here is a short C++11 example using boost : : python and Eigen : .. . .. . The example describes a getter for the property .", ".. . .. . I think it s almost like in the first answer of : boost : : python : : ptr or PyInstance New usage http : stackoverflow.com questions 5055443 boost-python-how-to-pass-a-c-class-instance-to-a-python-class .. . .. . I guess this means I should use boost.Python to wrap my library", "I get an undefined symbol error when trying to import an extension compiled with boost-python and the symbol is one that should be included in the boost library .", "I ve built boost using : .. . .. . I then compiled the following trivial Boost Python library : .. . .. . using the command : .. . .. . which succeeds without error .", "In order to use boost-python with python 3 you need to change this in your CMakeLists.txt : .. . .. . to this : .. . .. . That way you can recompile boost with python 2 support and still use python 3 .", "I tried to get the OpenMesh C++ Library python bindings working with python 3 .", "I m creating bindings for a subset of wxWidgets using Boost Python .", "Yea i checked with removing this using namespace boost : : python .", "I am using OpenGL for rendering and Boost : : Python for scripting .", "Could it happen if the application links against release 3rd parties boost-python", "I was wondering if there is a observer or publisher subscriber functionality implemented in boost-python .", "Apparently I should use boost : : python : : return self instead .", "Using boost-python I need create nested namespace .", "Invoking a Python objected connected through boost : : signals2 : : signal .", "The following is my code changed from the boost-python demo .", "boost : : python already includes functionality for wrapping vectors and maps .", "Cache folder : Library Caches Otherwise cmake will fail to locate to boost library .", "project .. . - : requirements library boost-python boost-python .. . + : requirements library usr lib libboost python-py27.so .. . .. . .. . The library path and name may need to be changed based on where the libboost-python1.54-dev packaged installed the Boost.Python library .", "Edit Makefile and pythonmagick src Makefile to include the boost library .", "I m using Boost library - great tool .", "First I ve got a generic header file called conv pif.hpp which has Boost headers and C++ Std Library headers and such .", "So how can I link boost-python against Anaconda Python", "Strange that boost-python 1.45.0 seemed to work without the python dev package .", "Boost : : Python will take care of the rest in converting the PyObject to a corresponding python form .", "abc.hpp : .. . .. . abc.cpp : .. . .. . The code to use Boost Python to create the python-module .", "if you havent done already it could be worth asking on boost.2283326.n4.nabble.com Python-c-sig-f2696818.html http : boost.2283326.n4.nabble.com Python-c-sig-f2696818.html", "To extend Python with C++ with neither a module nor an intermediate library it would require dynamically loading a library then importing the functions .", ".. . .. . Python and C++ threads .", "In Boost : : Python a wrapper could look like this : .. . .. . The Python code looks similar to this : .. . .. . This code somehow works - but it behaves strangely ." ] }
{ "confidence": [ 36.646114349365234, 34.06674575805664, 28.758541107177734, 28.38930892944336, 28.01353645324707, 27.862836837768555, 27.77764892578125, 27.663467407226562, 27.458866119384766, 27.1422061920166, 27.08866310119629, 27.053009033203125, 26.97442626953125, 26.958751678466797, 26.838409423828125, 26.797643661499023, 26.76418685913086, 26.72077178955078, 26.679027557373047, 26.679027557373047 ], "content": [ "Question : null .. . Answer : I am writing a python wrapper for a C++ library and I am using boost-python . I was wondering if there is a observer or publisher subscriber functionality implemented in boost-python . Consider the following class .. . .. . which is exposed to python using .. . .. . Now I am looking for a functionality that notifies my class if data is modified . For example .. . .. . One way to address this problem is adding a new function to my wrapper class that should be called each time after modifying data .. . .. . but this is not intuitive . Is there any other way", "Question : I read through the following two threads on wrapping C library http : stackoverflow.com questions 1942298 wrapping-a-c-library-in-python-c-cython-or-ctypes and C++ library http : stackoverflow.com questions 3100554 wrapping-c-dynamic-array-with-pythonctypes-segfault I am not sure I get it yet . The C++ library I am working with does use class and template but not in any over-sophisticated way . What are issues or caveats of wrapping it with ctypes besides the point that you can do so in pure python etc PyCXX Cython and boost : : python are three other choices people mentioned is there any consensus which one is more suitable for C++ Thanks .. . .. . Oliver .. . Answer : In defence of boost : : python given Alexander s answer on ctypes : .. . .. . Boost python provides a very c++ interface between c++ and python code - even doing things like allowed python subclasses of c++ classes to override virtual methods is relatively straightforward . Here s a potted list of good features : .. . .. . Allow virtual methods of C++ classes to be overridden by python subclasses . Bridge between std : : vector std : : map instances and python lists and dictionaries using vector indexing suite and map indexing suite .. . Automatic sharing of reference counts in smart-pointers boost : : shared-ptr etc with python reference counts and you can extend this to any smart pointer . Fine grained control of ownership when passing arguments and returning values from functions . Basically if you have a design where you want to expose a c++ interface in a way faithful to the language then boost : : python is probably the best way to do it . The only downsides are increased compile-time boost : : python makes extensive use of templates and sometimes opaque error messages if you don t get things quite right . Comment : The other problem is the strong coupling of boost and python versions . For example if you upgrade your python version you will have to rebuild the version of boost", "Question : I have a class interface written in C++ . I have a few classes that implement this interface also written in C++ . These are called in the context of a larger C++ program which essentially implements main . I want to be able to write implementations of this interface in Python and allow them to be used in the context of the larger C++ program as-if they had been just written in C++ . There s been a lot written about interfacing python and C++ but I cannot quite figure out how to do what I want . The closest I can find is here : http : www.cs.brown.edu jwicks boost libs python doc tutorial doc html python exposing.html python.class virtual-functions but this isn t quite right . To be more concrete suppose I have an existing C++ interface defined something like : .. . .. . What I want to be able to do is something like : .. . .. . Then back in my C++ code I want to be able to say something like : .. . .. . I hope this is sufficiently clear Comment : I hope this is sufficiently clear .. . C++ wrapped in python then wrapped again in C++ Comment : What exactly are you hoping to accomplish by building this infrastructure Comment : @AJG85 not wrapped in . He asks to be able to inherit a C++ class in Python and then use that in C++ . huh Comment : This sounds like what SIP riverbankcomputing.co.uk software sip intro http : www.riverbankcomputing.co.uk software sip intro is supposed to do a lot of working with PyQT involves subclassing Qt s C++ classes . That said I have no idea how usable it is as a standalone tool . .. . Answer : Take a look at Boost Python that is the most versatile and powerful tool to bridge between C++ and Python . http : www.boost.org doc libs 1 48 0 libs python doc Comment : It s only as powerful as the Python C API but it s definitively a great library . One thing that I m looking for http : stackoverflow.com q 9050985 627005 and you apparently can t do with Boost is to define Python metaclasses in C++ you can do that with the C API though .", "Question : I want to embed python in my C++ application . I m using Boost library - great tool . But i have one problem . If python function throws an exception i want to catch it and print error in my application or get some detailed information like line number in python script that caused error . How can i do it I can t find any functions to get detailed exception information in Python API or Boost . PyErr Print just prints error text to stderr and clears error so it can t be solution .. . Answer : I didn t want to use boost as I m in a C only app . Just call py err after an error to print .", "Question : I want to know if there is any way to expose a C++ class to Python but without building an intermediate shared library . Here is my desirable scenario . For example I have following C++ class : .. . .. . I would like to convert somehow this class or its intance to a PyObject in order to send it as paremter args to for example PyObject CallObject : .. . .. . In the other hand in my python side I ll have a wrapperFunction which gets the pointer on my C++ class or its instance as parameter and it calls its methods or uses its properties : .. . .. . As you can see I don t really need want to have a separate shared library or build a module by boost-python . All that I need is to find a way to convert a C++ code to PyObject and send it to python . I cannot find a way to do that by C python libraries boost or SWIG . Do you have any idea Thanks for your help . Comment : I m not sure I understand exactly what you want . Boost.Python has boost : : python : : object : : ptr which returns a PyObject -- is this what you were looking for Comment : I believe it s possible to access C C++ via ctypes but it might be a difficult task to expose a C++ class . Comment : @PaulManta : Thanks for the answer . What I want consists in 3 steps : Step1 : encapsulate a C++ class in PyObject pointer.Step2 send this-pointer to a python function . Step3 . using this C++ pointer in python i.e . calling its methods . So could you please be more pragmatic tell be by an example how can I encapsulate C++ code to object : : ptr Comment : Do you want to use the Python interpreter from your C++ code Have you had a look at this question : stackoverflow.com q 8225934 1025391 http : stackoverflow.com q 8225934 1025391 Comment : Thank you @moooeeeep yes you are right actually this answer is pretty similar to what I m trying to do . I updated the answer . In addition we can get rid of boost : : shared pointer . .. . Answer : I found my answer . Actually what I was searching was pretty similar to this answer thanks moooeeeep for his comment : .. . .. . Exposing a C++ class instance to a python embedded interpreter http : stackoverflow.com questions 8225934 exposing-a-c-class-instance-to-a-python-embedded-interpreter .. . .. . Following C++ class Attention default constructor is mandatory : .. . .. . could be exposed by boost by following macro : .. . .. . In the other hand I have a python function defined in python script.py which takes an instance of this class and do something . For example : .. . .. . Then in C++ side I can call this function by sending at the same time the instance of my class like this : .. . .. . Advantages : .. . .. . I don t need build any shared library or binary .. . As I m using Boost I don t need to be worry about memory-management reference counting .. . I don t use shared boost pointer boost : : shared-ptr to point to the instance of my class", "Question : I want to know if there is any way to expose a C++ class to Python but without building an intermediate shared library . Here is my desirable scenario . For example I have following C++ class : .. . .. . I would like to convert somehow this class or its intance to a PyObject in order to send it as paremter args to for example PyObject CallObject : .. . .. . In the other hand in my python side I ll have a wrapperFunction which gets the pointer on my C++ class or its instance as parameter and it calls its methods or uses its properties : .. . .. . As you can see I don t really need want to have a separate shared library or build a module by boost-python . All that I need is to find a way to convert a C++ code to PyObject and send it to python . I cannot find a way to do that by C python libraries boost or SWIG . Do you have any idea Thanks for your help . Comment : I m not sure I understand exactly what you want . Boost.Python has boost : : python : : object : : ptr which returns a PyObject -- is this what you were looking for Comment : I believe it s possible to access C C++ via ctypes but it might be a difficult task to expose a C++ class . Comment : @PaulManta : Thanks for the answer . What I want consists in 3 steps : Step1 : encapsulate a C++ class in PyObject pointer.Step2 send this-pointer to a python function . Step3 . using this C++ pointer in python i.e . calling its methods . So could you please be more pragmatic tell be by an example how can I encapsulate C++ code to object : : ptr Comment : Do you want to use the Python interpreter from your C++ code Have you had a look at this question : stackoverflow.com q 8225934 1025391 http : stackoverflow.com q 8225934 1025391 Comment : Thank you @moooeeeep yes you are right actually this answer is pretty similar to what I m trying to do . I updated the answer . In addition we can get rid of boost : : shared pointer . .. . Answer : As far as I know there is no easy way to accomplish this . To extend Python with C++ with neither a module nor an intermediate library it would require dynamically loading a library then importing the functions . This approach is used by the ctypes http : docs.python.org 2 library ctypes.html module-ctypes module . To accomplish the same with C++ one would need to write a ctypes -like library that understood the C++ ABI for the target compiler s . To extend Python without introducing a module an intermediate library could be created that provided a C API that wraps the C++ library . This intermediate library could then be used in Python through ctypes . While it does not provide the exact calling syntax and does introduce an intermediate library it would likely be less effort than building a ctypes -like library that could interface directly with C++ . However if an intermediate library is going to be introduced it may be worthwhile to use Boost.Python SWIG or some other C++ Python language binding tool . While many of these tools will introduce the extension via a module they often provide cleaner calling conventions better error checking in the binding process and may be easier to maintain . Comment : Very nice answer . Covers everything I wanted to say and more so I m not even going to answer", "Question : I would like to return some data from c++ code as a numpy.array object . I had a look at boost : : python : : numeric but its documentation is very terse . Can I get an example of e.g . returning a not very large vector double to python I don t mind doing copies of data . Comment : I agree its documentation is dreadful . They just copy the commentless header into their documentation page and don t show you the basics i.e . getting data from STL collection into this object . Comment : The boost people are very clever too clever for their own good . I go to their Wrapper concepts page and see nothing that makes sense . Comment : I found what I think is the best solution I ve come across yet and posted it below . .. . Answer : Another interface between Boost.Python and NumPy can be found here : .. . .. . https : github.com ndarray Boost.NumPy .. . .. . It s a moderately complete wrapper of the NumPy C-API into a Boost.Python interface with the intention of eventually submitting it to Boost . I m not sure the documentation is any better overall than boost : : python : : numeric at this point but there are a lot of code examples and at least it s under active development . It s pretty low-level and mostly focused on how to address the more difficult problem of how to pass C++ data to and from NumPy without copying but here s how you d do a copied std : : vector return with that : Comment : May be very nice if I could actually get to the code but github seems to be blocked here or something else is wrong because I m getting a broken link . Surely there must be a way to populate a boost : : python : : numeric : : array with data from a simple std : : vector without having to get some 3rd party library . It would help if boost s documentation actually gave you documentation on the member-functions rather than reproducing the uncommented header . Comment : I can t make an edit because it s too minor but it should be bn : : zeros not bp : : zeros .", "Question : Here s my problem : .. . .. . I have two classes like these : .. . .. . I would like to expose MyClass : : on event so that I can call my class instance.on event.connect .. . from Python . This is how I ve wrapped those classes : .. . .. . This compiles but when I try to call connect from Python I get : AttributeError : can t set attribute . This is explained here : http : www.boost.org doc libs 1 53 0 libs python doc tutorial doc html python exposing.html so I changed to .def readwrite for on event . But now I get a compile-time error instead . Its an almost impossible to read C++ template error message but as far as I understand it its because boost : : signals2 : : signal is noncopyable . Since .def readwrite makes the member assignable it must not be noncopyable . But for my usage I don t want to assign the member I just wan t to call one method . I thought about making the connect method of Signal const even though it alters the object but then I couldn t call sig.connect from that method so that was a no go as well. . .. . .. . Any ideas Comment : Its an almost impossible to read C++ template error message .. . shouldn t this make you wonder How much time are you fighting the language and the library and how much time instead are you fighting the actual problem you need to solve Comment : of course . why do you think i m embedding python .. . .. . Answer : I am having issues reproducing your results but here is some information that may help in resolving the problem . With simple classes : .. . .. . And basic bindings : .. . .. . The code fails to compile . When exposing a class Boost.Python s default behavior to register converters . These converters require copy constructors as a means to copy C++ class object into storage that can be managed by a Python object . This behavior can be disabled for a class by providing boost : : noncopyable as an argument to the class type . In this instance MyClass binding does not suppress copy constructors . Boost.Python will attempt to use copy constructors within the bindings and fail with a compiler error because the member variable on event is not copyable . Signal is not copyable because its contains a member variable with a type of boost : : signal2 : : signal that inherits from boost : : noncopyable . Adding boost : : : noncopyable as a argument type to MyClass s bindings allows for the code to compile . Usage : .. . .. . While this setup allows for the desired bindings and calling syntax it looks as though it is the first step in the final goal . .. . .. . My apologies if this is too presumptuous . However based on other recent questions I would like to take the time to expand upon the initial example to cover what appears to be the final goal : being able to connect Python callbacks to a signal2 : : signal . I will cover two different approaches as the mechanics and level of complexity differ but they may provide insight into details that should be considered for the final solution . Only Python threads . For this first scenario lets assume that only Python threads are interacting with the library . One technique that keeps it relatively simple is to use inheritance . Start by defining a helper Slot class that can connect to Signal . The Slot class inherits from boost : : python : : wrapper http : www.boost.org doc libs 1 53 0 libs python doc v2 wrapper.html a class that unintrusively provides hooks to allow Python classes to override functions in the base-class . When a callable type connects to boost : : signals2 : : signal the signal may copy the argument into its internal list . Thus it is important for the functor to be able to extend the life of the Slot instance for as long as it remains connected to signal . The easiest way to accomplish this is by managing Slot via a boost : : shared-ptr . The resulting Signal class looks like : .. . .. . And a helper function helps keep Signal : : connect generic in case other C++ types need to connect to it . This results in the following bindings : .. . .. . And its usage is as follows : .. . .. . While successful it has an unfortunate characteristic of not being pythonic . For example : .. . .. . It would be ideal if any callable object could be connected to the signal . One easy way to this it to monkey patch the bindings in Python . To be transparent to the end user : .. . .. . Change the C++ binding module name from example to example . Make sure to also change the library name . Create example.py that will patch Signal.connect to wrap the argument into a type that inherits from Slot . example.py could look something like this : .. . .. . The patching is seamless to the end user . With this patch any callable type can connect to Signal without having to explicitly inherit from Slot . As such it becomes much more pythonic than the initial solution . Never underestimate the benefit in keeping the bindings simple and non-pythonic but patch them to be pythonic in python . .. . .. . Python and C++ threads . In the next scenario lets consider the case where C++ threads are interacting with Python . For example a C++ thread can be set to invoke the signal after a period of time . This example can become fairly involved so lets start with the basics : Python s Global Interpreter Lock http : wiki.python.org moin GlobalInterpreterLock GIL . In short the GIL is a mutex around the interpreter . If a thread is doing anything that affects reference counting of python managed object then it needs to have acquired the GIL . In the previous example as there were no C++ threads all actions occurred while the GIL had been acquired . While this fairly straightforward it can become complex rather quickly . First the module needs to have Python initialize the GIL for threading . For convenience lets create a simple class to help manage the GIL : .. . .. . The thread will be invoking MyClass s signal . Thus it needs to extend the lifetime of MyClass while the thread is alive . A good candidate to accomplish this is by managing MyClass with a shared-ptr . Lets identify when the C++ thread will need the GIL : .. . .. . MyClass being deleted by shared-ptr . boost : : signals2 : : signal can make additional copies of connected objects as is done when the signal is concurrently http : www.boost.org doc libs 1 53 0 doc html signals2 thread-safety.html invoked . Invoking a Python objected connected through boost : : signals2 : : signal . The callback will certainly affect python objects . For example the self argument provided to the call method will increase and decrease an object s reference count . Supporting MyClass being deleted from a C++ thread . To guarantee the GIL is held when MyClass is deleted by shared-ptr from within a C++ thread a custom deleter http : www.boost.org doc libs 1 53 0 libs smart ptr shared ptr.htm deleter constructor is required . This also requires the bindings to suppress the default constructor and use a custom constructor instead . The thread itself . The thread s functionality is fairly basic : it sleeps then invokes the signal . However it is important to understand the context of the GIL . And the MyClass bindings are updated . boost : : signals2 : : signal interacting with python objects . boost : : signals2 : : signal may make copies when it is invoked . Additionally there may be C++ slots connected to the signal so it would be ideal to not have the GIL locked while the signal is invoked . However signal does not provide hooks to allow us to acquire the GIL before creating copies of slots or invoking the slot . To add to the complexity when the bindings expose a C++ function that accepts a C++ class with a HeldType that is not a smart pointer then Boost.Python will extract the non-reference counted C++ object from the reference-counted python object . It can safely do this because the calling thread in Python has the GIL . To maintain a reference count to slots trying to connect from Python as well as allow for any callable type to connect we can use the opaque type of boost : : python : : object . In order to avoid having signal create copies of the provided boost : : python : : object one can create a copy of boost : : python : : object so that reference counts remain accurate and manage the copy via shared-ptr . This allows signal to freely create copies of shared-ptr instead of creating boost : : python : : object without the GIL . This GIL safety slot can be encapsulated in a helper class . A helper function will be exposed to Python to help adapt the types . And the updated binding expose the helper function : .. . .. . The final solution looks like this : .. . .. . And a testing script test.py : .. . .. . Results in the following : .. . .. . .. . .. . In conclusion when an object is passed through the Boost.Python layer take time to consider how to manage its lifespan and the context in which it will be used . This often requires understanding how other libraries being used will handle the object . It is not an easy problem and providing a pythonic solution can be a challenge .", "Question : null .. . Answer : I want to wrap an existing C++ library which involves a blocking message loop and calling handler functions for Python using boost : : python . E.g . : .. . .. . Calling a Python function from C++ is no problem but the message loop needs to release the GIL since otherwise it would block the whole Python interpreter see here http : stackoverflow.com questions 31456483 here http : stackoverflow.com questions 22138190 and a related boost ticket https : svn.boost.org trac boost ticket 7836 .. . .. . As stated here http : stackoverflow.com a 8011153 1668622 it s important to lock the GIL again before calling a Python function . In principle this sounds comprehensible to me but I wonder if there are any elegant solutions out there which show how this can be done . E.g . it would be very nice if I had to modify the boost : : python wrapper only instead of altering the library I want to wrap .. . .. . Do you know any working example which involves boost : : python callbacks using an object oriented approach and maybe blocking functions which release the GIL where I can copy some best practices from Comment : This answer http : stackoverflow.com a 20828366 1053968 demonstrates how to safely wrap a Python callback in a handler and covers some subtle details such as GIL management during copy-construction and destruction .", "Question : I want to embed python in my C++ application . I m using Boost library - great tool . But i have one problem . If python function throws an exception i want to catch it and print error in my application or get some detailed information like line number in python script that caused error . How can i do it I can t find any functions to get detailed exception information in Python API or Boost . PyErr Print just prints error text to stderr and clears error so it can t be solution .. . Answer : In the Python C API PyObject Str http : docs.python.org c-api object.html PyObject 5FStr returns a new reference to a Python string object with the string form of the Python object you re passing as the argument -- just like str o in Python code . Note that the exception object does not have information like line number -- that s in the traceback object you can use PyErr Fetch http : docs.python.org c-api exceptions.html PyErr 5FFetch to get both the exception object and the traceback object . Don t know what if anything Boost provides to make these specific C API functions easier to use but worst case you could always resort to these functions as they are offered in the C API itself . Comment : thanks a lot Alex . I was looking a way to make it without direct calling of PyAPI - i thougth Boost can deal with exceptions but Boost can t : Comment : @Anton glad I helped so what about upvoting and accepting this answer - Use the checkmark icon under the number of upvotes for this answer currently 0 - .", "Question : I would like to return some data from c++ code as a numpy.array object . I had a look at boost : : python : : numeric but its documentation is very terse . Can I get an example of e.g . returning a not very large vector double to python I don t mind doing copies of data . Comment : I agree its documentation is dreadful . They just copy the commentless header into their documentation page and don t show you the basics i.e . getting data from STL collection into this object . Comment : The boost people are very clever too clever for their own good . I go to their Wrapper concepts page and see nothing that makes sense . Comment : I found what I think is the best solution I ve come across yet and posted it below . .. . Answer : Doing it using the numpy api directly is not necessarily difficult but I use boost : : multiarray regularly for my projects and find it convenient to transfer the shapes of the array between the C++ Python boundary automatically . So here is my recipe . Use http : code.google.com p numpy-boost or better yet this http : dl.dropbox.com u 5363697 numpy boost.hpp version of the numpy boost.hpp header which is a better fit for multi-file boost : : python projects although it uses some C++11 . Then from your boost : : python code use something like this : Comment : What would be the correct way to return a py : : object py boost : : python I have PyObject result numpy boost double 2 numpy from boost array .. . .py ptr and return py : : object py : : handle py : : borrowed o but that crashes . Hint Comment : PS . the crash is at line 229 of the dropbox version line a PyArrayObject PyArray SimpleNew NDims shape detail : : numpy type map T : : typenum . Strange . Comment : @eudoxos You might have a problem with the PY ARRAY UNIQUE SYMBOL and NO IMPORT ARRAY macros as well as import array as your crash is exactly when the array is created which needs a call I think through certain pointer table that numpy needs initialized with import array .", "Question : How does boost.python handle std : : string member variables Specifically if I have a class and its boost.python wrapper .. . .. . how is the correspondence between std : : string object and PyObject it string representing is handled : is boost : : python : : object i.e . PyObject created which stores pointer to the string thus this object servers as a proxy Thus each time I want to retrieve string member s value PyString object is created Can interning mechanism be applied to such string objects .. . Answer : Short answer : your suspicions and insight about the behaviour is mostly correct boost-python will interpret your configuration to produce a simple and inefficient behaviour however it provides support mechanisms to override and extend this . This may be a lot of work . Long answer : .. . .. . is boost : : python : : object i.e . PyObject created which stores pointer to the string thus this object servers as a proxy No . Python-strings are immutable and by default with your configuration boost-python will convert the std : : string into a new python string str . So there is no proxying going on . Thus each time I want to retrieve string member s value PyString object is created Yes . The following assertion will fail where I attempt to verify that the python references to the strings have the same python object id . Can interning mechanism be applied to such string objects For example if you can enable caching of the created python string-object for a given c++ string to then return a previously created python string-object when available The answer is also yes it is possible . The boost-python concepts are call policies http : www.boost.org doc libs 1 61 0 libs python doc html tutorial tutorial functions.html tutorial.functions.call policies.call policies or custom converters http : www.boost.org doc libs 1 61 0 libs python doc html reference to from python-type conversion.html . Both are not part of the tutorial for boost-python . You would either extend every def readwrite call with an appropriate call policy or overwrite the general built-in converter for std : : string to from PyString to introduce this theoretical cache . Keep in mind python strings are immutable and std : : string is mutable . So you will have issues when the member is changed from the C++ side . Additionally such hooks will also cost performance at runtime when the code handles every single get and set operation .", "Question : I am trying to compile a Python library http : cegui.org.uk wiki Main Page CEGUI can build Python modules its editor relies on that that needs to link against boost-python . So I built boost with --with-python and it built just fine . However as soon as the .pyd is linked I get undefined references : .. . .. . My first assumption was that it does not link against boost-python but the link.txt inside the CMake folders shows this : .. . .. . C : Coding CMake 2.8 bin cmake.exe -E remove -f CMakeFiles PyCEGUI.dir objects.a C : MinGW bin ar.exe cr CMakeFiles PyCEGUI.dir objects.a @CMakeFiles PyCEGUI.dir objects1.rsp C : MinGW bin g++.exe -shared -o ......... . bin PyCEGUI.pyd -Wl --major-image-version 0 --minor-image-version 0 -Wl --whole-archive CMakeFiles PyCEGUI.dir objects.a -Wl --no-whole-archive ......... . lib libCEGUIBase-0.dll.a C : Coding boost 1 53 0 lib libboost python-mgw48-mt-1 53.a C : Python27 libs python27.lib C : Coding CEGUI cegui dependencies lib dynamic libfreetype.dll.a C : Coding CEGUI cegui dependencies lib dynamic libpcre.dll.a -lwinmm -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 .. . .. . So boost-python is linked against . I am unsure what could be the problem here . Boost CEGUI MinGW .. . Comment : Can you link against boost-python dynamically instead of statically Comment : Interesting question . I will try that . How did you get the idea Are there known problems when linking boost-python statically Comment : Let s see if it works it s just a hunch . Also are you sure about the --whole-archive which get immediately turned off What generated this particular arrangement of switches Possible the static python library should still fall under the auspice of --whole-archive I ve never seen such particular arrangement . Comment : This is the CMake project of CEGUI . So I m not actually sure about anything in there Comment : Hmmm I just noticed that I do not have a shared version of boost-python . It throws lots of undefined references when trying to build the shared version . .. . Answer : Turns out the problem was that I was using the 64bit version of Python . I downloaded it months ago and just forgot about that little fact . Now MinGW can only compile and use 32-bit libraries not mix in 64 bit . This is what led to boost-python not compiling correctly it s a wonder it did compile at all and thus having undefined references when linked against . Downloading the 32bit version of Python and recompiling boost solved the problems .", "Question : I m trying to write a python wrapper for some C++ code that make use of OpenCV but I m having difficulties returning the result which is a OpenCV C++ Mat object to the python interpreter . I ve looked at OpenCV s source and found the file cv2.cpp which has conversions functions to perform conversions to and fro between PyObject and OpenCV s Mat . I made use of those conversions functions but got a segmentation-fault when I tried to use them . I basically need some suggestions sample code online references on how to interface python and C++ code that make use of OpenCV specifically with the ability to return OpenCV s C++ Mat to the python interpreter or perhaps suggestions on how where to start investigating the cause of the segmentation-fault . Currently I m using Boost Python to wrap the code . Thanks in advance to any replies . The relevant code : .. . .. . The conversion functions taken from OpenCV s source follows . The conversion code gives segmentation-fault at the commented line with if PyArray Check o .. . . My python test program : .. . Answer : I solved the problem so I thought I ll share it here with others who may have the same problem . Basically to get rid of the segmentation-fault I need to call numpy s import array function . The high level view for running C++ code from python is this : .. . .. . Suppose you have a function foo arg in python that is a binding for some C++ function . When you call foo myObj there must be some code to convert the python object myObj to a form your C++ code can act on . This code is generally semi-automatically created using tools such as SWIG or Boost : : Python . I use Boost : : Python in the examples below . Now foo arg is a python binding for some C++ function . This C++ function will receive a generic PyObject pointer as an argument . You will need to have C++ code to convert this PyObject pointer to an equivalent C++ object . In my case my python code passes a OpenCV numpy array for a OpenCV image as an argument to the function . The equivalent form in C++ is a OpenCV C++ Mat object . OpenCV provides some code in cv2.cpp reproduced below to convert the PyObject pointer representing the numpy array to a C++ Mat . Simpler data types such as int and string do not need the user to write these conversion functions as they are automatically converted by Boost : : Python . After the PyObject pointer is converted to a suitable C++ form C++ code can act on it . When data has to be returned from C++ to python an analogous situation arises where C++ code is needed to convert the C++ representation of the data to some form of PyObject . Boost : : Python will take care of the rest in converting the PyObject to a corresponding python form . When foo arg returns the result in python it is in a form usable by python . That s it . The code below shows how to wrap a C++ class ABC and expose its method doSomething that takes in a numpy array for an image from python convert it to OpenCV s C++ Mat do some processing convert the result to PyObject and return it to the python interpreter . You can expose as many functions method you wish see comments in the code below . abc.hpp : .. . .. . abc.cpp : .. . .. . The code to use Boost Python to create the python-module . I took this and the following Makefile from http : jayrambhia.wordpress.com tag boost : .. . .. . pysomemodule.cpp : .. . .. . And finally the Makefile successfully compiled on Ubuntu but should work elsewhere possibly with minimal adjustments . After you have successfully compiled the library you should have a file pysomemodule.so in the directory . Put this lib file in a place accessible by your python interpreter . You can then import this module and create an instance of the class ABC above as follows : .. . .. . Now given an OpenCV numpy array image we can call the C++ function using : .. . .. . Note that you will need Boost Python Numpy dev as well as Python dev library to create the bindings . The NumPy docs in the following two links are particularly useful in helping one understand the methods that were used in the conversion code and why import array must be called . In particular the official numpy doc is helpful in making sense of OpenCV s python binding code . http : dsnra.jpl.nasa.gov software Python numpydoc numpy-13.html http : docs.scipy.org doc numpy user c-info.how-to-extend.html .. . .. . Hope this helps . Comment : Hi lightalchemist thanks for posting your solution . I ve arrived at a similar solution to the same probem with OpenCV 2.4.3 taking the pyopencv to and pyopencv from functions from cv2.cpp and exposing one function . The module loads okay in ipython the function is visible there it parses the arguments okay but crashes as soon as it reaches PyEnsureGIL . I ve tried your solution and the older pyopencv to function worked it executes but crashes on trying output . I m going to post a separate question and put a link here for you in a sec in case you think you can see what the problem is . Comment : Here s the link-to my question : stackoverflow.com questions 13745265 http : stackoverflow.com questions 13745265 exposing-opencv-based-c-function-with-mat-numpy-conversion-to-python", "Question : I can t figure out why this program is failing . I used Boost.Python to create libui which exposes the class QPoint . I aso included PyQt4 which has a sip-exposed QPoint . I m trying to accomplish a mapping between the two types . I checked that p is a new-style class so why isn t getattr being called for p.x Comment : I would suggest trying subclassing with multiple-inheritance first . Comment : If I subclass won t there be two copies of the underlying C++ QPoint object So setting member variables in Python would be invisible to C++ and vice versa Comment : Can t you just use one or the other Or use a mixin class Just asking I m not familiar with Qt nor Boost . Comment : @Keith : I m trying to write some code in C++ and some in Python . Boost.Python is a library that lets me export C++ classes to Python . sip does the same thing and was used by PyQt to export Qt to Python . It s hard to have some code in Python and some in C++ in a Qt application where you don t end up wanting to pass Qt objects back and forth . .. . Answer : I suggest that you not attempt to expose QPoint in boost-python . You should be able to register converters to from python with boost that will use the SIP api functions to convert QPoint from to python as the sip objects . I ve done it but not recently enough to give more details . Comment : That sounds like exactly what I want . I ll upvote . Please let me know if you ever stumble into your old solution . Thanks . Comment : @Neil G my old solution is in a previous employer s svn . I m probably not going to stumble onto it . Comment : lol okay no problem . I ve found this so far : gitorious.org avogadro avogadro blobs http : gitorious.org avogadro avogadro blobs e297c37550a093deaf515229a4c4c040a882d5b0 libavogadro src python sip.cpp Will look into it more . Comment : @Neil G that s very similar to what I had .", "Question : I am trying to build a really trivial example with Boost.Python . I have installed boost and boost-python with homebrew . I am using python 3.4.3 and boost 1.59 . My OS is El Capitan . Boost.Python was installed with python3 like this : .. . .. . I have 3 files : .. . .. . My CMakeLists.txt file looks like this : .. . .. . When I run CMake it finds all the correct python libraries because I specified them manually as you can see in the file above . During build I get the following link error : .. . .. . Anyone have any idea why this is happening EDIT .. . .. . If I link against Python 2.7 it works which means boost-python was built against python-2.7 instead of 3.4 even though I specified the --with-python3 options. . So the questions is how to build boost-python against python-3.4 Comment : You can check the library name should be boost-python 3 and boost-python 2.7 or something like that . But I don t know whether FindBoost will help you there . Do you mind removing your edits and make a proper answer Then you can accept your answer as your actual problem was solved and might help others . Comment : Can you add the cmake output I have the suspicion that CMake picks up the old python version . The meaning of BOOST PYTHON MODULE is different for python 2 and 3 . It seems during compilation the python 2 variety is built . .. . Answer : The solution I am currently using is to reinstall boost-python without python-2.7 support . The steps I took were : .. . .. . 1 . Uninstall boost-python if already installed : brew uninstall boost-python . 2 . Install boost-python with python3 support but without python-2.7 support : brew install boost-python --with-python3 --without-python . Comment : I executed brew install boost-python --with-python3 --without-python cmake can t locate the boost it works with brew install boost-python + cmake . . ...ominited content.. . -- Could NOT find Boost Comment : Clear cache folder restart MAC if you have installed boost-python before . Cache folder : Library Caches Otherwise cmake will fail to locate to boost library .", "Question : I ve got third party C++ library in which some class methods use raw byte buffers . I m not quite sure how to deal in Boost : : Python with it . C++ library header is something like : .. . .. . In stuck with the Boost : : Python code.. . .. . .. . How do I wrap these raw buffers to expose them as raw strings in Python .. . Answer : You have to write yourself functions on your bindings that will return a Py buffer http : docs.python.org 2 c-api buffer.html highlight buffer buffers-and-memoryview-objects object from that data allowing your to either read-only use PyBuffer FromMemory or read-write use PyBuffer FromReadWriteMemory your pre-allocated C C++ memory from Python . This is how it is going to look like feedback most welcome : .. . .. . Later on when you bind CSomeClass use the static functions above instead of the methods load and save : .. . .. . This would look pythonic enough to me . Comment : py buffer is of type PyObject and you are invoking .buf on it Comment : I think you re right there should be a cast somewhere before to PyBufferObject . This code is now getting outdated . New-style buffers are there and one probably should consider using them .", "Question : I am looking for a simple way to expose a C++ class instance to a python embedded interpreter . I have a C++ library . This library is wrapped using swig for the moment and I am able to use it from the python interpreter .. . I have a C++ main program which instanciates a Foo class from my library and embeds a python interpreter .. . .. . I would like to expose my C++ world instance of Foo to the python world and seen as a Foo class . Is this possible if so how .. . .. . I think it s almost like in the first answer of : boost : : python : : ptr or PyInstance New usage http : stackoverflow.com questions 5055443 boost-python-how-to-pass-a-c-class-instance-to-a-python-class .. . .. . I guess this means I should use boost.Python to wrap my library .. . .. . My only goal is to manipulate my C++ instance of Foo in the embedded python interpreter not sure that it can be done with the previous method . Hope I am clear thanks for your help . update .. . .. . Thanks for your answers . In fact I already have exposed my Foo class to python with swig . What I have : .. . .. . my Foo class : .. . .. . my wrapped library including the Foo class exposed to python : so I can start the python interpreter and do something like this : .. . .. . What I want : .. . .. . Having a C++ main program which embeds a python interpreter and manipulates C++ world variables . Clearer now : .. . Answer : Boost python http : www.boost.org doc libs release libs python doc Allows you to expose c++ classes to python in a very tightly integrated way - you can even wrap them so that you can derive python classes from your c++ ones and have virtual methods resolved to the python overrides . The boost-python tutorial http : www.boost.org doc libs release libs python doc tutorial doc html index.html is a good place to start . .. . .. . edit : .. . .. . You can create a c++ object and pass a reference to it to an internal python interpreter like this : Comment : Thanks for your answer I will consider boost.Python too . I was already aware about the boost.Python capabilities to expose C++ classes but I have a lot of legacy code to wrap . So swig looks like a better solution to me faster more simple and more language targets .. . : I have found one of your old answer here http : stackoverflow.com q 3378195 1044695 . It s still obscure : but I feel it s what I m looking for not just for one instance but the global idea is here I was hoping to do that with swig and python api : Comment : I ve added an example trying to answer your exact question with boost : : python - afraid I can t help with swig . Comment : Thanks a lot This is exactly what I want except it s boost.python . I have mentionned your answer as useful very useful actually : . I will wait a bit for other responses especially concerning swig and take a deeper look on your solution .", "Question : In some places in exposing C++ code to python I need to use a PyObject . If I have an instance of a boost : : python : : class object I can invoke ptr on it . But what if I just have the type Basically given the type list boost : : python : : bases A B C I want to convert this to a boost : : python : : tuple of instances that I can pass into something like PyErr NewExceptionWithDoc . Is this possible Comment : In retrospect even if this were possible it s apparently impossible to create a python-type that inherits from both a Python exception type and a Boost.Python class . So I guess this is more curiosity than practicality . .. . Answer : Given a C++ type T one can create a boost : : python : : type id http : www.boost.org doc libs 1 61 0 libs python doc html reference utility and infrastructure boost-python type id hpp.html utility and infrastructure.boost python-type id hpp.class template type info object and then query into the Boost.Python registry for registration information . If an entry is found in the registry then one can use it to obtain a handle to the Python class created for type T : .. . .. . .. . .. . Here is a complete example demonstrating http : coliru.stacked-crooked.com a 76fd7becde170616 locating a Python class object in the Boost.Python registry : .. . .. . Output : .. . .. . For more type related functionality such as accepting type objects is and issubclass see this http : stackoverflow.com a 23436270 1053968 answer .", "Question : I am totally new to boost.python . I reviewed a lot of recommending of using boost.python to apply with python however still not easy to understand and find a solution for me . What I want is to import a function or class that directly from a python SourceFile .. . .. . Example File : Main.cpp MyPythonClass.py .. . .. . Let s says if there is a Dog class in MyPythonClass.py with bark function how do I get callback and send argument in cpp I have no idea what I should do Please help me .. . Answer : Boost python is used to call cplusplus functions from a python source . Pretty much like the Perl xs module . If you have a function say bark in main.cpp you can use boost-python to convert this main.cpp into a python callable module . Then from python script assuming link output file is main.so : Comment : Sorry I think maybe there is some misunderstanding.I have to work in C++ environment so I want my C++ program directly use Dog.bark from python... . not in python Comment : Boost python doesn t help you there . boost is a c++ module . try this docs.python.org 3 extending embedding.html https : docs.python.org 3 extending embedding.html" ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
afnetworking@afnetworking@164
afnetworking -- afnetworking is a networking library for ios and mac os x.cocoa pod link : https : cocoapods.org pods afnetworkinggithub link : https : github.com @placeholder afnetworking .
{ "confidence": [ 89.78054809570312, 88.04621887207031, 85.36141204833984, 83.64054870605469, 83.64054870605469, 82.76420593261719, 81.26459503173828, 80.73444366455078, 80.71437072753906, 80.71437072753906, 80.67947387695312, 80.42127227783203, 80.42127227783203, 80.07247924804688, 79.8843994140625, 79.80661010742188, 79.4105224609375, 79.4105224609375, 79.4105224609375, 79.40827178955078, 79.37227630615234, 79.04107666015625, 78.8226318359375, 78.56494903564453, 78.03032684326172, 77.55419921875, 77.09815979003906, 77.09815979003906, 76.29557800292969, 75.63545227050781, 75.43635559082031, 75.43635559082031, 75.43635559082031, 75.3304443359375, 74.36425018310547, 74.36425018310547, 74.20449829101562, 73.59538269042969, 73.59538269042969, 73.59538269042969, 73.52092742919922, 73.52092742919922, 73.52092742919922, 73.52092742919922, 73.07969665527344, 72.78419494628906, 72.51017761230469, 72.51017761230469, 72.51017761230469, 72.35042572021484, 72.09791564941406, 70.54537200927734, 70.5289535522461, 69.84959411621094, 69.8388671875, 69.8388671875, 69.36077117919922, 69.33061218261719, 69.33061218261719, 69.10379791259766, 68.90499877929688, 68.70590209960938, 67.92344665527344, 67.52168273925781, 67.52168273925781, 67.50708770751953, 67.38951873779297, 67.1220703125, 66.98263549804688, 66.9564208984375, 66.9126968383789, 66.79047393798828, 66.69493865966797, 66.45183563232422, 66.4495849609375, 66.4495849609375, 66.4495849609375, 66.4495849609375, 66.4495849609375, 66.4495849609375, 65.94567108154297, 65.8102798461914, 65.75525665283203, 65.72705078125, 65.60626220703125, 65.60626220703125, 65.08338928222656, 64.96971130371094, 64.91110229492188, 64.8946533203125, 64.59551239013672, 64.59551239013672, 64.37091064453125, 64.05305480957031, 63.878074645996094, 63.83899688720703, 63.70900344848633, 63.289608001708984, 63.267486572265625 ], "content": [ "Refer this for serialization : github.com AFNetworking AFNetworking https : github.com AFNetworking AFNetworking", "From AFNetworking https : github.com AFNetworking AFNetworking docs .", "Link to bug report on GitHub https : github.com AFNetworking AFNetworking issues 1782", "I ve created an issue https : github.com AFNetworking AFNetworking issues 1775 on AFNetworking .", "https : github.com AFNetworking AFNetworking blob 1272e3e32dbd447d18d75bc35e7a2f0f04f33d61 AFNetworking AFHTTPSessionManager.m L115", "yeah you can check here github.com AFNetworking AFNetworking blob master AFNetworking https : github.com AFNetworking AFNetworking blob master AFNetworking AFURLSessionManager.h", "I ve asked this question here : github.com AFNetworking AFNetworking pull https : github.com AFNetworking AFNetworking pull 3174 issuecomment-217256726", "What version of AFNetworking you are using - .. . .. . AFNetworking 3.0 is the latest major release of AFNetworking a delightful networking library for iOS Mac OS X .", "I am using AFNetworking https : github.com AFNetworking AFNetworking to achieve the communication .", "The SDK uses AFNetworking 2.6 https : github.com AFNetworking AFNetworking internally .", "In AFNetworking 2 AFHTTPRequestOperationManager https : github.com AFNetworking AFNetworking blob 3e12404b2d1693f7bdea3ff435f2e419d5c7a531 AFNetworking AFHTTPRequestOperationManager.h L160-L167 has a completionQueue property .", "You might be interested in this bug then : github.com AFNetworking AFNetworking issues 953 https : github.com AFNetworking AFNetworking issues 953", "Check this how to install it with github.com AFNetworking AFNetworking installation-with-carthage https : github.com AFNetworking AFNetworking installation-with-carthage", ".. . .. . https : github.com AFNetworking AFNetworking .. . .. . https : github.com RestKit RestKit", "github.com AFNetworking AFNetworking blob experimental-1.0RC1 https : github.com AFNetworking AFNetworking blob experimental-1.0RC1 AFNetworking UIImageView 2BAFNetworking.m L70", "Can I do it with AFNetworking https : github.com AFNetworking", "I used the manual download at github.com AFNetworking AFNetworking https : github.com AFNetworking AFNetworking by clicking download zip", "Please check out this issue : github.com AFNetworking AFNetworking issues 2131 https : github.com AFNetworking AFNetworking issues 2131 .", "Also there are many issues eg like this : github.com AFNetworking AFNetworking issues 2784 https : github.com AFNetworking AFNetworking issues 2784 .", "EDIT : As of AFNetworking 1.0RC1 https : github.com AFNetworking AFNetworking wiki AFNetworking-FAQ this is an explicit feature .", "Correct me if I m wrong but AFNetworking also uses NSURLCache and by default doesn t cache to disk : github.com AFNetworking AFNetworking wiki AFNetworking-FAQ https : github.com AFNetworking AFNetworking wiki AFNetworking-FAQ", "See a similar problem in AFNetworking 1.x github.com AFNetworking AFNetworking issues 661 https : github.com AFNetworking AFNetworking issues 661", "README.md https : github.com AFNetworking AFNetworking tree 2.0 tells it requires either iOS 7.0 and above while AFNetworking 2.0 Migration Guide https : github.com AFNetworking AFNetworking wiki AFNetworking-2.0-Migration-Guide tells it requires either iOS 6.0 and above .", "AFNetworking doesn t seem to support this https : github.com AFNetworking AFNetworking wiki AFNetworking-FAQ though the work around is simple enough .", "there s a longstanding AFNetworking issue about this but no progress : github.com AFNetworking AFNetworking issues 2866 https : github.com AFNetworking AFNetworking issues 2866", "AFHTTPRequestOperation class is removed from AFNetworking 3.0 https : github.com AFNetworking AFNetworking wiki AFNetworking-3.0-Migration-Guide", "still belive its a bad design issue github.com AFNetworking AFNetworking issues 1793 https : github.com AFNetworking AFNetworking issues 1793", "By the way I also gave them a pullrequest some days ago github.com AFNetworking AFNetworking pull 3306 https : github.com AFNetworking AFNetworking pull 3306 .", "AFNetworking Library https : github.com AFNetworking AFNetworking .. . .. . You can do this by simply using following example : -", "AFHTTPClient is splitted into AFHTTPRequestOperationManager AFHTTPSessionManager https : github.com AFNetworking AFNetworking wiki AFNetworking-2.0-Migration-Guide afhttpclient--afhttprequestoperationmanager--afhttpsessionmanager .", "I am trying to setup Reachability using the new 2.0 AFNetworking https : github.com AFNetworking AFNetworking network-reachability-manager .", "You can check the official migration guide here https : github.com AFNetworking AFNetworking wiki AFNetworking-3.0-Migration-Guide", "I ve checked the migration guide https : github.com AFNetworking AFNetworking wiki AFNetworking-3.0-Migration-Guide .", "Does anyone have a nice working solution for getting the download progress when using the UIImageView+AFNetworking https : github.com AFNetworking AFNetworking blob master UIKit 2BAFNetworking UIImageView 2BAFNetworking.h category and AFNetworking 3.0 https : github.com AFNetworking AFNetworking wiki AFNetworking-3.0-Migration-Guide .", "This is a bug in the latest version of AFNetworking discussed in issue 2563 https : github.com AFNetworking AFNetworking issues 2563 .", "I m using AFNetworking https : github.com AFNetworking AFNetworking in my app I m checking for internet connectivity by their inbuilt class .", "Self Signed certificate SSL Issue 189 AFNetworking AFNetworking https : github.com AFNetworking AFNetworking issues 189 .. . .. . Please help me.. .", "https : github.com AFNetworking AFNetworking .. . .. . How do I dial down the timeout", "I ve filed an issue https : github.com AFNetworking AFNetworking issues 1418 for that .", "https : github.com AFNetworking AFNetworking .. . .. . If you re using Xcode 6 give it a try .", "I have integrated AFNetworking from here https : github.com AFNetworking AFNetworking in my project .", "https : github.com AFNetworking AFNetworking issues 393 .. . .. . Basically AFNetworking doesn t support this functionality .", "There was a thread in AFNetworking github : https : github.com AFNetworking AFNetworking issues 378 But seemed the issue is not addressed at all .", "There is a discussion thread in AFNetworking exactly for this problem : https : github.com AFNetworking AFNetworking issues 566 .. . .. . Thanks for guykogus tips and experiments on this issue .", "Here are few issues that your problem mentioned please check them out .. . .. . https : github.com AFNetworking AFNetworking issues 2895 .. . .. . https : github.com AFNetworking AFNetworking issues 2312", "Here is the git link-to the branch https : github.com AFNetworking AFNetworking tree 1.x Example .", "And the example project is in the AFNetworking repository https : github.com AFNetworking AFNetworking tree master Example .", "There was a discussion about this on the AFNetworking github page : https : github.com AFNetworking AFNetworking issues 2191 .. . .. . Domains and ip addresses are checked differently .", "https : github.com AFNetworking AFNetworking wiki AFNetworking-3.0-Migration-Guide .. . .. . I hope this will help .", "The best fix appears to be to update to the latest AFNetworking https : github.com AFNetworking AFNetworking blob master AFNetworking AFHTTPRequestOperation.h which passes the operation into the block as an argument .", "ok thanks for answer I will ask as well Matt to help here also I ve created question here : github.com AFNetworking AFNetworking issues 3491 https : github.com AFNetworking AFNetworking issues 3491", "Thanks Sendoa for the link-to the GitHub issue where Mattt explains https : github.com AFNetworking AFNetworking issues 1504 why this functionality is not working anymore .", "You ll need to add the certificate s or public-key s to your app s Bundle and enable the feature by setting either the defaultSSLPinningMode https : github.com AFNetworking AFNetworking blob 776c879c9d3cd20b9a3c15490666e8ab6d1f2bf1 AFNetworking AFHTTPClient.h L144 property on AFHttpClient or the SSLPinningMode https : github.com AFNetworking AFNetworking blob 776c879c9d3cd20b9a3c15490666e8ab6d1f2bf1 AFNetworking AFURLConnectionOperation.h L178 property on AFURLConnectionOperation .", "Using AFNetworking as outlined here - AFNetworking .", "Check out + AFURLConnectionOperation batchOfRequestOperations : progressBlock : completionBlock : .. . .. . Although it s not documented implementation https : github.com AFNetworking AFNetworking blob master AFNetworking AFURLConnectionOperation.m L525 is self-explanatory .", "https : github.com AFNetworking AFNetworking .. . .. . But I am curious about why the official AFNetworking method does not works for its installation in my project", "github.com AFNetworking AFNetworking blob https : github.com AFNetworking AFNetworking blob 32cf30a2451917c25d853fccb9e112b64415595e UIKit 2BAFNetworking AFAutoPurgingImageCache.m L110 You can see this function which actually caches the thing .", "See the answer from Mattt Thompson here https : github.com AFNetworking AFNetworking issues 1504 regarding this issue .", "See this pull request on its github https : github.com AFNetworking AFNetworking pull 1412 and other ones related .", "https : github.com AFNetworking AFNetworking commit d184833fa015a783742b573cf48a3080b863a900 .. . .. . Looking at the changelog. . .. . .. . https : cocoapods.org pods AFNetworking changelog .. . .. . Version 2.6.0 supports watchOS.. . .. . .. . This release now supports watchOS 2.0 which relys on target conditionals that are only present in Xcode 7 and iOS 9 watchOS 2.0 OS X 10.10 .", "In AFNetworking 3 the completionQueue property has been moved to AFURLSessionManager https : github.com AFNetworking AFNetworking blob 326ccb170d2ea2202e324e562196a82e8618f94a AFNetworking AFURLSessionManager.h L156-L159 which AFHTTPSessionManager extends .", "for more details please visit AFNetworking 3.0 https : github.com AFNetworking AFNetworking or my old answear with AFNetworking 2.0 http : stackoverflow.com questions 33767908 volunteermatch-api-objective-c 33886449 33886449 .", "With work having recently stopped on ASIHTTPRequest http : allseeing-i.com 5Brequest release 5D it seems like attention is shifting to AFNetworking https : github.com AFNetworking AFNetworking .", "https : github.com rushisangani AFNetworking .. . .. . Please replace following files with original AFNetworking files .", "I ve found solution at GitHub https : github.com AFNetworking AFNetworking issues 2410 : .. . .. . And then assign it to your manager :", "AFNetworking .. . .. . You re right the AFNetworking category implementation UIImageView+AFNetworking is bare-bones .", "AFNetworking 2.0 is supported in iOS 6 .", "If you link against Pods and AFNetworking you ll get dup symbols .", "I recommend using a networking library such as AFNetworking .", "Linking to all articles related to this answer : one http : stackoverflow.com questions 14002422 afnetworking-afhttpclient-offline-mode-not-working-with-nsurlrequestreturncach two https : github.com AFNetworking AFNetworking issues 378 three https : github.com AFNetworking AFNetworking issues 566", "Try to integrate AFNetworking latest version 2.0 as guided here https : github.com AFNetworking AFNetworking don t forget to add AFSecurityPolicy.h AFSecurityPolicy.m file .", "And you could look here https : github.com AFNetworking AFNetworking wiki AFNetworking-3.0-Migration-Guide to know AFNetworking-3.0-Migration-Guide the differences between versions .", "you can use the library AFNetworking AFNetworkActivityLogger .. . .. . https : github.com AFNetworking AFNetworkActivityLogger .. . .. . from the doc : .. . .. . AFNetworkActivityLogger is an extension for AFNetworking 2.0 that logs network requests as they are sent and received .", ": github.com AFNetworking AFOAuth2Client pull 55 https : github.com AFNetworking AFOAuth2Client pull 55", "Documentation page https : github.com AFNetworking AFNetworking has example with section Creating a Download Task : .. . .. . NB", "If that s the case then use the solution referred to by the accepted answer : https : github.com AFNetworking AFNetworking issues 1397 .", "I created a Swift version of UIImageView+AFNetworking here : Github https : github.com namanhams Swift-UIImageView-AFNetworking .", "On January 24th an attempt to resolve some other issue https : github.com AFNetworking AFNetworking issues 2523 this bug was introduced .", ".. . .. . Note : This was fixed 26 March 2015 in commit 7d8e286 https : github.com AFNetworking AFNetworking commit 7d8e2867e026c303c12b82896b734fb39ed60d9e .", "It seem s to be related to this issue : .. . .. . https : github.com AFNetworking AFNetworking issues 2314 .. . .. . I m performing a http-get using nsurlsession in this example .", "However during AFNetworking development there were some troubles https : github.com AFNetworking AFNetworking issues 1268 with this automatic removal behaviour so finally manual cache clearing https : github.com AFNetworking AFNetworking blob master UIKit 2BAFNetworking UIImageView 2BAFNetworking.m L75 was added when receiving UIApplicationDidReceiveMemoryWarningNotification .", "try NSSet setWithObject : @ application rss+xml and manager.responseSerializer AFXMLResponseSerializer new reference link https : github.com AFNetworking AFNetworking issues 1381", "For networking in my project I m using AFNetworking 3.0 .", "for more details please visit AFNetworking https : github.com AFNetworking AFNetworking or here http : stackoverflow.com questions 33767908 volunteermatch-api-objective-c 33886449 33886449 .", "To more information take a look to the 3.x requirements https : github.com AFNetworking AFNetworking blob master README.md requirements .", "There s an example of setting the pinning mode https : github.com AFNetworking AFNetworking blob master Example Classes AFAppDotNetAPIClient.m in the AppDotNet example .", "As you can read in the AFNetworking read me page https : github.com AFNetworking AFNetworking network-reachability-manager .. . .. . Here s also a link-to the official documentation http : cocoadocs.org docsets AFNetworking 2.0.0 Classes AFNetworkReachabilityManager.html api name setReachabilityStatusChangeBlock 3a .", "Unable to satisfy the following requirements : .. . .. . AFNetworking 3.1.0 required by Podfile .. . AFNetworking 3.1.0 required by Podfile.lock .. . AFNetworking 1.2.1 required by AFRaptureXMLRequestOperation 1.0.2 .. . .. . Here is my complete pod file .. . .. . Is there any way to use AFRaptureXMLRequestOperation with AFNetworking 3.0", "With AFNetworking 3 :", "I m upgrading from AFNetworking 1.0 to AFNetworking 2.0 .", "https : github.com AFNetworking AFNetworking issues 1397 .. . .. . gfiumara is the dev who came up with this .", "I would suggest you to refer to the example in git by them https : github.com AFNetworking AFNetworking tree master Example .", "I am able to use an NSMutableURLRequest with an NSURLConnection to connect to a SOAP web service as follows : .. . .. . How could I do the same using AFNetworking https : github.com AFNetworking AFNetworking or STHTTPRequest https : github.com nst STHTTPRequest", "The pod spec to that would be .. . .. . pod AFNetworking 1.3.3 .. . .. . In 2.0 AFNetworking you can create a singleton client like this .", "Well In AFNetworking 3.0 You can do like this way for uploading multiform part data Check this https : github.com AFNetworking AFNetworking .. . .. . AFNetworking 3.0 is the latest major release of AFNetworking 3.0 removes all support for the now deprecated NSURLConnection based APIs .", "AFNetworking 3.0", "which AFNetworking you are using AFNetworking 2.0 or 3.0", "Aelam https : github.com aelam provided the following method in this Github issue https : github.com AFNetworking AFNetworking issues 2119 issuecomment-92345504 : .. . .. . Add this to your podfile .", "See the source code for reference : UIImageView+AFNetworking.m https : github.com AFNetworking AFNetworking blob master UIKit 2BAFNetworking UIImageView 2BAFNetworking.m L93 ." ] }
{ "confidence": [ 99.94950103759766, 98.6634521484375, 95.46925354003906, 92.59104919433594, 91.28292846679688, 91.27440643310547, 86.87332153320312, 86.83445739746094, 86.4618148803711, 86.04522705078125, 85.22456359863281, 84.8103256225586, 84.480712890625, 83.68861389160156, 83.5650863647461, 83.33638000488281, 83.22441101074219, 83.0733642578125, 83.05955505371094, 81.98204040527344 ], "content": [ "Question : I ve been trying to modify my project to support WatchOS2 architecture . Currently I have a networking framework that is based on AFNetworking . I ve been using it with my watch app so far . Now I m trying to build the framework for watchos watchsimulator platforms . What I m getting is SystemConfiguration SystemConfiguration.h file-not-found error for some AFNetworking classes . I know that system configuration is not one of the available system frameworks for watchOS2 . And for networking apple says https : developer.apple.com library prerelease watchos documentation General Conceptual AppleWatch2TransitionGuide LeverageSystemTechnologies.html apple ref doc uid TP40015234-CH8-SW1 : .. . .. . Networking .. . .. . Support for network-based operations includes the following technologies : .. . .. . WatchKit extensions can access the network directly using an NSURLSession object . WatchKit extensions have full access to the NSURLSession capabilities including the ability to download files in the background . For information on how to use this class see URL Loading System Programming Guide . The Watch Connectivity framework supports bidirectional communication between your Watch app and iOS app . Use this framework to coordinate activities between the two apps . For more information see Communicating with Your Companion iOS App . .. . .. . I want to support both iOS and watchos for my networking sdk . Is there a way to make this project built for watchOS platform Or is that mean I am only allowed to use NSURLConnection inside my watch app .. . Answer : Here is a recent commit on github for AFNetworking to support watchOS . https : github.com AFNetworking AFNetworking commit d184833fa015a783742b573cf48a3080b863a900 .. . .. . Looking at the changelog. . .. . .. . https : cocoapods.org pods AFNetworking changelog .. . .. . Version 2.6.0 supports watchOS.. . .. . .. . This release now supports watchOS 2.0 which relys on target conditionals that are only present in Xcode 7 and iOS 9 watchOS 2.0 OS X 10.10 . If you install the library using CocoaPods AFNetworking will define these target conditionals for on older platforms allowing your code to complile . If you do not use Cocoapods you will need to add the following code your to PCH file .", "Question : AFNetworking 2.0 was announced last week . But I find different requirements for AFNetworking 2.0 . README.md https : github.com AFNetworking AFNetworking tree 2.0 tells it requires either iOS 7.0 and above while AFNetworking 2.0 Migration Guide https : github.com AFNetworking AFNetworking wiki AFNetworking-2.0-Migration-Guide tells it requires either iOS 6.0 and above . Dose AFNetworking 2.0 support iOS 6.0 Comment : One way or the other you should file a bug report about this . Comment : +1 to cancel out the down vote . This is confusing as the docs and other places disagree with each other . .. . Answer : AFNetworking 2.0 is supported in iOS 6 . My problem was that I had previously installed it with the platform set to iOS 7 . I fixed it by doing this : .. . .. . 1 . Deleted everything from my Podfile .. . 2 . Ran pod install which deleted all my pods . 3 . Added everything back to my Podfile with platform : ios 6.0 .. . .. . And I was able to still use my existing AFNetworking code with no problems .", "Question : First of all let me tell you that i am using xcode 4.6.3 and iOS 6.1 . i have been trying to build connection using AFNetworking or CocoaPods . it throws errors due to backward compatibility issues . Current error is xctest xctest.h Is there any way out to this problem I am highly confused on this . Any help would be appreciated . .. . Answer : What version of AFNetworking you are using - .. . .. . AFNetworking 3.0 is the latest major release of AFNetworking a delightful networking library for iOS Mac OS X . To keep this library maintainable moving forward 3.0 removes all support for the now deprecated NSURLConnection based APIs . https : github.com AFNetworking AFNetworking wiki AFNetworking-3.0-Migration-Guide .. . .. . I hope this will help .", "Question : AFNetworking 2.0 was announced last week . But I find different requirements for AFNetworking 2.0 . README.md https : github.com AFNetworking AFNetworking tree 2.0 tells it requires either iOS 7.0 and above while AFNetworking 2.0 Migration Guide https : github.com AFNetworking AFNetworking wiki AFNetworking-2.0-Migration-Guide tells it requires either iOS 6.0 and above . Dose AFNetworking 2.0 support iOS 6.0 Comment : One way or the other you should file a bug report about this . Comment : +1 to cancel out the down vote . This is confusing as the docs and other places disagree with each other . .. . Answer : I didn t use pod at all . Instead I downloaded it and dragged the files to the project and then encountered this problem as well . To fix it I simply deleted the AFURLSessionManager and AFHTTPSessionManager files from the project . Then it worked .", "Question : AFNetworking 2.0 was announced last week . But I find different requirements for AFNetworking 2.0 . README.md https : github.com AFNetworking AFNetworking tree 2.0 tells it requires either iOS 7.0 and above while AFNetworking 2.0 Migration Guide https : github.com AFNetworking AFNetworking wiki AFNetworking-2.0-Migration-Guide tells it requires either iOS 6.0 and above . Dose AFNetworking 2.0 support iOS 6.0 Comment : One way or the other you should file a bug report about this . Comment : +1 to cancel out the down vote . This is confusing as the docs and other places disagree with each other . .. . Answer : You can use AFNetworking 2.0 .Just have to ensure that the deployment-target is set to 6.0 while installing using cocoa pods.I had initially installed AFNetworking when my deployment-target was 7.0 .So had to remove it from cocoa pods set deployment-target to 6.0 and then do install again .", "Question : NB : This is related to this question http : stackoverflow.com q 28086512 89035 on project structure but I have decided to a vastly the use-case to better abstract the problem . .. . .. . Problem .. . .. . How do I include afnetworking questions tagged afnetworking in my iOS App and an accompanying iOS Extension ios8-extention questions tagged ios8-extention ios8-today-widget questions tagged ios8-today-widget or ios8-share-extension questions tagged ios8-share-extension via CocoaPods Issues .. . .. . For use in Extensions AFNetworking needs to be build with define AF APP EXTENSIONS does this mean I need 2 versions AFNetworking One for the Extension and one for the App How do I set up the Podfile so frameworks are built and copied to the correct places Documentation on use frameworks is a bit thin . Comment : For people coming across this in the future : as of time of writing AFNetworking seems to have fixed this in their latest versions so try updating the pod before attempting the solutions below . .. . Answer : Update : .. . .. . As Rhythmic Fistman mentioned the original answer s method gets overwritten when doing a new pod install . Aelam https : github.com aelam provided the following method in this Github issue https : github.com AFNetworking AFNetworking issues 2119 issuecomment-92345504 : .. . .. . Add this to your podfile . remember to replace the target name .. . .. . Obsolete answer : .. . .. . 1 Be sure that pod AFNetworking is included for both targets your container app and extension in your podfile . Example in my case : .. . .. . 2 In XCode click on Pods on the hierarchy view to bring its build options . Then on the build options select the target for which you are looking at the build options in the dropdown . There select Pods- Extension Target Name -AFNetworking it should have been created automatically by pod install . Then select Build Settings . Then under Apple LLVM 6.0 - Language verify that Prefix header has a filename . That filename on my case was Target Support Files Pods- Extension Target Name -AFNetworking Pods- Extension Target Name -AFNetworking-prefix.pch . If it doesn t have such a filename or similar then add it . 3 Go to that prefix header file that was named there or you added there . It ll be almost empty then add the following line at the end : .. . .. . That should allow your container app to point to a version of AFNetworking built normally and your extension app to another built with the flag set . So only one version of the library but built-in two different ways each on one of the targets . Comment : That pch file is regenerated every time you do a pod install which wipes out your modification . Comment : You re my god damn hero . Comment : I received this issue while installing cocoapods Unable to find a specification for SDKThatInternallyUsesAFNetworking am I supposed to replace SDKThatInternallyUsesAFNetworking with something else Comment : @Geet SDKThatInternallyUsesAFNetworking is just an example name for a pod which internally uses AFNetworking . There is no pos by that name Comment : Its still giving error in my today s extension while importing AFNetworking . import AFNetworking AFNetworking.h", "Question : Can anybody help me with this its driving me crazy . I looked at every post I could find with a similar issue and none of it worked . I installed AFNetworking 3.0 in my project with Cocoapods it installed I see the AFNetworking pod in my project.Set built Architure only : YES Whenever I try to build I get the following error : .. . Answer : add below lines to your podfile and reinstall it and add your project name to target . .. . .. . hope your problem will be solved . Comment : My pod file source github.com CocoaPods Specs.git https : github.com CocoaPods Specs.git platform : ios 8.0 target EasyFood do pod AFNetworking 3.1.0 end pod MBProgressHUD 0.9.2 Comment : source github.com CocoaPods Specs.git https : github.com CocoaPods Specs.git platform : ios 8.0 target EasyFood do pod AFNetworking 3.1.0 end pod MBProgressHUD 0.9.2 Comment : add MBProgressHUD 0.9.2 this line after AFNetworking . Comment : Any Other Solution to Solve this error . This All solution are not working . Comment : Listen me just make new project and try to make podfile as i above describe.just try it .", "Question : With work having recently stopped on ASIHTTPRequest http : allseeing-i.com 5Brequest release 5D it seems like attention is shifting to AFNetworking https : github.com AFNetworking AFNetworking . However I ve not yet found a good comparison of the features of the two libraries so I don t know what I might lose if when I switch over . Major differences I ve spotted so far are : .. . .. . 1 . AFNetworking has a much smaller code-size which is good .. . 2 . AFNetworking is being rapidly improved so it may not yet be mature may not have a stable API yet 3 . Both seem to have caching though I ve seen hints that because AFNetworking uses NSURLConnection it won t cache objects over 50K http : stackoverflow.com questions 7166422 nsurlconnection-on-ios-doesnt-try-to-cache-objects-larger-than-50kb .. . 4 . ASIHTTPRequest has very good support for manual automatic PAC http proxies I can t find any information on what level of support AFNetworking has for proxies .. . 5 . AFNetworking requires iOS 4+ whereas ASIHTTPRequest works right back to iOS 2 not really an issue for me but it is an issue for some people .. . 6 . AFNetworking doesn t yet have a built-in persistent cache but there s a persistent cache which has a pending pull request : https : github.com gowalla AFNetworking pull 25 .. . .. . Has anyone seen any good comparisons of the two libraries or any documented experiences of switching from one to the other Comment : AFNetworking lacks of very detailed documentation and examples so I can t say much about it . The major reason I use ASIHTTPRequest because it supports iOS 3.0 and ASIFallbackToCacheIfLoadFailsCachePolicy is very good . And I think AFNetworking has no persistent cache support . This is a no-go for me . Comment : Just notice that you are the first one who tags question with afnetworking . Comment : There is a cache that s waiting to be pulled into AFNetworking I ve added a link into my question . Comment : @iwat AFNetworking fully supports NSURLCache . If you re looking for disk cache I d heartily suggest Peter Steinberger s SDURLCache fork https : github.com steipete SDURLCache . Comment : Have you tried my networking framework MKNetworkKit blog.mugunthkumar.com products http : blog.mugunthkumar.com products ios-framework-introducing-mknetworkkit Basic Digest and NTLM Authentication auto-caching built-in image caching super easy file-upload support excellent documentation are some of the pluses . .. . Answer : I ve been using ASI for a while now and I absolutely love the fileupload approach of ASI and though I am excited to jump to AFNetworking fileupload support in AfNetworking is not as easy to use compared to ASI .", "Question : With work having recently stopped on ASIHTTPRequest http : allseeing-i.com 5Brequest release 5D it seems like attention is shifting to AFNetworking https : github.com AFNetworking AFNetworking . However I ve not yet found a good comparison of the features of the two libraries so I don t know what I might lose if when I switch over . Major differences I ve spotted so far are : .. . .. . 1 . AFNetworking has a much smaller code-size which is good .. . 2 . AFNetworking is being rapidly improved so it may not yet be mature may not have a stable API yet 3 . Both seem to have caching though I ve seen hints that because AFNetworking uses NSURLConnection it won t cache objects over 50K http : stackoverflow.com questions 7166422 nsurlconnection-on-ios-doesnt-try-to-cache-objects-larger-than-50kb .. . 4 . ASIHTTPRequest has very good support for manual automatic PAC http proxies I can t find any information on what level of support AFNetworking has for proxies .. . 5 . AFNetworking requires iOS 4+ whereas ASIHTTPRequest works right back to iOS 2 not really an issue for me but it is an issue for some people .. . 6 . AFNetworking doesn t yet have a built-in persistent cache but there s a persistent cache which has a pending pull request : https : github.com gowalla AFNetworking pull 25 .. . .. . Has anyone seen any good comparisons of the two libraries or any documented experiences of switching from one to the other Comment : AFNetworking lacks of very detailed documentation and examples so I can t say much about it . The major reason I use ASIHTTPRequest because it supports iOS 3.0 and ASIFallbackToCacheIfLoadFailsCachePolicy is very good . And I think AFNetworking has no persistent cache support . This is a no-go for me . Comment : Just notice that you are the first one who tags question with afnetworking . Comment : There is a cache that s waiting to be pulled into AFNetworking I ve added a link into my question . Comment : @iwat AFNetworking fully supports NSURLCache . If you re looking for disk cache I d heartily suggest Peter Steinberger s SDURLCache fork https : github.com steipete SDURLCache . Comment : Have you tried my networking framework MKNetworkKit blog.mugunthkumar.com products http : blog.mugunthkumar.com products ios-framework-introducing-mknetworkkit Basic Digest and NTLM Authentication auto-caching built-in image caching super easy file-upload support excellent documentation are some of the pluses . .. . Answer : AFNetworking doesn t support clientCertificateIdentity and clientCertificates for TLS client authentication . We can do that with the - void connection : NSURLConnection connection didReceiveAuthenticationChallenge : NSURLAuthenticationChallenge challenge method in a subclass of AFURLConnectionOperation but it s not as easy . Comment : You can now do setAuthenticationChallengeBlock : on AFURLConnectionOperation and its subclass and pass in the logic to handle any authentication challenges as you need without having to subclass .", "Question : With work having recently stopped on ASIHTTPRequest http : allseeing-i.com 5Brequest release 5D it seems like attention is shifting to AFNetworking https : github.com AFNetworking AFNetworking . However I ve not yet found a good comparison of the features of the two libraries so I don t know what I might lose if when I switch over . Major differences I ve spotted so far are : .. . .. . 1 . AFNetworking has a much smaller code-size which is good .. . 2 . AFNetworking is being rapidly improved so it may not yet be mature may not have a stable API yet 3 . Both seem to have caching though I ve seen hints that because AFNetworking uses NSURLConnection it won t cache objects over 50K http : stackoverflow.com questions 7166422 nsurlconnection-on-ios-doesnt-try-to-cache-objects-larger-than-50kb .. . 4 . ASIHTTPRequest has very good support for manual automatic PAC http proxies I can t find any information on what level of support AFNetworking has for proxies .. . 5 . AFNetworking requires iOS 4+ whereas ASIHTTPRequest works right back to iOS 2 not really an issue for me but it is an issue for some people .. . 6 . AFNetworking doesn t yet have a built-in persistent cache but there s a persistent cache which has a pending pull request : https : github.com gowalla AFNetworking pull 25 .. . .. . Has anyone seen any good comparisons of the two libraries or any documented experiences of switching from one to the other Comment : AFNetworking lacks of very detailed documentation and examples so I can t say much about it . The major reason I use ASIHTTPRequest because it supports iOS 3.0 and ASIFallbackToCacheIfLoadFailsCachePolicy is very good . And I think AFNetworking has no persistent cache support . This is a no-go for me . Comment : Just notice that you are the first one who tags question with afnetworking . Comment : There is a cache that s waiting to be pulled into AFNetworking I ve added a link into my question . Comment : @iwat AFNetworking fully supports NSURLCache . If you re looking for disk cache I d heartily suggest Peter Steinberger s SDURLCache fork https : github.com steipete SDURLCache . Comment : Have you tried my networking framework MKNetworkKit blog.mugunthkumar.com products http : blog.mugunthkumar.com products ios-framework-introducing-mknetworkkit Basic Digest and NTLM Authentication auto-caching built-in image caching super easy file-upload support excellent documentation are some of the pluses . .. . Answer : AFNetwork lacks the ability to upload large-files . It assumes file content is in RAM . ASI was smart enough to simply stream file content from disk .", "Question : AFNetworking 2.0 was announced last week . But I find different requirements for AFNetworking 2.0 . README.md https : github.com AFNetworking AFNetworking tree 2.0 tells it requires either iOS 7.0 and above while AFNetworking 2.0 Migration Guide https : github.com AFNetworking AFNetworking wiki AFNetworking-2.0-Migration-Guide tells it requires either iOS 6.0 and above . Dose AFNetworking 2.0 support iOS 6.0 Comment : One way or the other you should file a bug report about this . Comment : +1 to cancel out the down vote . This is confusing as the docs and other places disagree with each other . .. . Answer : Yes it does support iOS6 except for the NSURLSessionTask parts which are iOS7 only . I was confused as well but it looks during the transition from 1.x - 2.0 not all the docs had yet been updated . They have been now and it works just fine in my project that supports iOS6 .", "Question : AFOAuth2Client https : github.com AFNetworking AFOAuth2Client example-usage has a podspec file which leads me to think it supports Cocoapods . How do I include it in a project There s normally a how to install with Cocoapods section but I don t see one . Comment : The process of adding a dependency through cocoapods is straight forward . Create a podfile with pods and then then install cocoapods dependency manager as mentioned here http : beta.cocoapods.org q through terminal . Comment : I know that . I m wondering what line I add to my pod file . Comment : The quickest way would be to find through the terminal pod search AFOAuth2Client would get you the podname . Comment : But what if it s not listed in the official Cocoapods directory Such as a pull request with a new podspec e.g . : github.com AFNetworking AFOAuth2Client pull 55 https : github.com AFNetworking AFOAuth2Client pull 55 .. . Answer : The pod spec contains all the information you need to include it in a project . Just open the pod spec you can do it in github and check the name and version section . s.name AFOAuth2Client .. . .. . s.version 0.1.2 .. . .. . Every pod spec has these information inside . So now to include this in your project you simply do this : .. . .. . so in this case Comment : But what if it s not listed in the official Cocoapods directory Such as a pull request with a new podspec e.g . : github.com AFNetworking AFOAuth2Client pull 55", "Question : Does anyone have a nice working solution for getting the download progress when using the UIImageView+AFNetworking https : github.com AFNetworking AFNetworking blob master UIKit 2BAFNetworking UIImageView 2BAFNetworking.h category and AFNetworking 3.0 https : github.com AFNetworking AFNetworking wiki AFNetworking-3.0-Migration-Guide . This category https : gist.github.com martinpilch 5269512 which I did use for versions up till 3.0 has stopped working now . Here is my own experimental version https : gist.github.com knutigro 85d3463f06f660d7a67d which sadly for the moment crashes randomly . Comment : Did you check this one - github.com xmartlabs XLRemoteImageView https : github.com xmartlabs XLRemoteImageView Comment : please refer my answer below . I ve made a pull request to AFNetworking unfortunately it s rejected . Till then you can use this if you don t want to change upgrade your AFNetworking version . Comment : Thats a good effort @iOSEnthusiatic . By the way I also gave them a pullrequest some days ago github.com AFNetworking AFNetworking pull 3306 https : github.com AFNetworking AFNetworking pull 3306 . .. . Answer : Here is the modified version of AFNetworking 3.0 in which you can show a progress while loading image from server using UIImageView+AFNetworking category . https : github.com rushisangani AFNetworking .. . .. . Please replace following files with original AFNetworking files . NOTE : If you update your pod then this will be removed .", "Question : Recently I ve installed cocoapods v 1.0.0 in my mac successfully I am trying to install AFNetworking 3.0 dependency in my pod file of my project directory . which I ve created successfully by putting following code in my pod file .. . .. . but when I write pod install in terminal it giving me following error .. . .. . could anyone suggest me why I am getting this error how to resolve this issue .. . Answer : After submitting this question I further explored its solution come to know at https : guides.cocoapods.org using the-podfile.html that I should write simply this code in my podefile .. . .. . instead of above which I found at github AFNetworking official dependency installation guide . https : github.com AFNetworking AFNetworking .. . .. . But I am curious about why the official AFNetworking method does not works for its installation in my project could anyone answer it please anyway Thanks to cocoapods official website .", "Question : With work having recently stopped on ASIHTTPRequest http : allseeing-i.com 5Brequest release 5D it seems like attention is shifting to AFNetworking https : github.com AFNetworking AFNetworking . However I ve not yet found a good comparison of the features of the two libraries so I don t know what I might lose if when I switch over . Major differences I ve spotted so far are : .. . .. . 1 . AFNetworking has a much smaller code-size which is good .. . 2 . AFNetworking is being rapidly improved so it may not yet be mature may not have a stable API yet 3 . Both seem to have caching though I ve seen hints that because AFNetworking uses NSURLConnection it won t cache objects over 50K http : stackoverflow.com questions 7166422 nsurlconnection-on-ios-doesnt-try-to-cache-objects-larger-than-50kb .. . 4 . ASIHTTPRequest has very good support for manual automatic PAC http proxies I can t find any information on what level of support AFNetworking has for proxies .. . 5 . AFNetworking requires iOS 4+ whereas ASIHTTPRequest works right back to iOS 2 not really an issue for me but it is an issue for some people .. . 6 . AFNetworking doesn t yet have a built-in persistent cache but there s a persistent cache which has a pending pull request : https : github.com gowalla AFNetworking pull 25 .. . .. . Has anyone seen any good comparisons of the two libraries or any documented experiences of switching from one to the other Comment : AFNetworking lacks of very detailed documentation and examples so I can t say much about it . The major reason I use ASIHTTPRequest because it supports iOS 3.0 and ASIFallbackToCacheIfLoadFailsCachePolicy is very good . And I think AFNetworking has no persistent cache support . This is a no-go for me . Comment : Just notice that you are the first one who tags question with afnetworking . Comment : There is a cache that s waiting to be pulled into AFNetworking I ve added a link into my question . Comment : @iwat AFNetworking fully supports NSURLCache . If you re looking for disk cache I d heartily suggest Peter Steinberger s SDURLCache fork https : github.com steipete SDURLCache . Comment : Have you tried my networking framework MKNetworkKit blog.mugunthkumar.com products http : blog.mugunthkumar.com products ios-framework-introducing-mknetworkkit Basic Digest and NTLM Authentication auto-caching built-in image caching super easy file-upload support excellent documentation are some of the pluses . .. . Answer : s Until now s I couldn t figure out how to set a timeout with AFNetworking when doing a synchronous POST request . UPDATE : I finally figured out : http : stackoverflow.com a 8774125 601466 .. . Now switching to AFNetworking : .. . .. . .. . .. . .. . Apple overrides the timeout for a POST setting it to 240 seconds http : stackoverflow.com a 1765557 601466 in case it was set shorter then the 240 seconds and you can t change it . With ASIHTTP you just set a timeout and it works . A code example with a synchronous POST request : .. . .. . I tried to set a timeout here but nothing worked . This issue keeps me from migrating to AFNetworking . See also here : How to set a timeout with AFNetworking http : stackoverflow.com questions 8304560 how-to-set-a-timeout-with-afnetworking Comment : Your point about timeouts is good thanks for sharing I don t understand how this relates to making requests syncronously though can you expand on that Comment : @JosephH You are right . Of course sometimes you also need to set a timeout when doing asynchronous requests . I have updated my answere : Comment : @JosephH Once again updated my answere with a code sample . Comment : Apple fixed the issue with timeoutInterval not being able to be less than 240 seconds however this is still an issue as even if you set the timeoutInterval the request does not respect it somehow .", "Question : I ve been trying to modify my project to support WatchOS2 architecture . Currently I have a networking framework that is based on AFNetworking . I ve been using it with my watch app so far . Now I m trying to build the framework for watchos watchsimulator platforms . What I m getting is SystemConfiguration SystemConfiguration.h file-not-found error for some AFNetworking classes . I know that system configuration is not one of the available system frameworks for watchOS2 . And for networking apple says https : developer.apple.com library prerelease watchos documentation General Conceptual AppleWatch2TransitionGuide LeverageSystemTechnologies.html apple ref doc uid TP40015234-CH8-SW1 : .. . .. . Networking .. . .. . Support for network-based operations includes the following technologies : .. . .. . WatchKit extensions can access the network directly using an NSURLSession object . WatchKit extensions have full access to the NSURLSession capabilities including the ability to download files in the background . For information on how to use this class see URL Loading System Programming Guide . The Watch Connectivity framework supports bidirectional communication between your Watch app and iOS app . Use this framework to coordinate activities between the two apps . For more information see Communicating with Your Companion iOS App . .. . .. . I want to support both iOS and watchos for my networking sdk . Is there a way to make this project built for watchOS platform Or is that mean I am only allowed to use NSURLConnection inside my watch app .. . Answer : According to the AFNetworking documentation https : developer.apple.com library mac documentation Cocoa Conceptual URLLoadingSystem URLLoadingSystem.html : .. . .. . URL Loading The most commonly used classes in the URL loading system allow your app to retrieve the content of a URL from the source . You can retrieve that content in many ways depending on your app s requirements . The API you choose depends on the version of OS X or iOS your app targets and whether you wish to obtain the data as a file or an in-memory block of data : .. . .. . In iOS 7 and later or OS X v10.9 and later NSURLSession is the preferred API for new code that performs URL requests . If you take a look at the diagrams on that page it indicates that AFNetworking actually uses NSURLSession in some cases . However since the SystemConfiguration framework is not available in watchkit you would need to remove that dependency in order to include AFNetworking in both your iOS and watchkit apps . I m not sure what AFNetworking uses this framework for it is probably very important but if there are certain files that wouldn t need these settings in the watch app you could modify the AFNetworking source code to not include those items on the watch app :", "Question : With work having recently stopped on ASIHTTPRequest http : allseeing-i.com 5Brequest release 5D it seems like attention is shifting to AFNetworking https : github.com AFNetworking AFNetworking . However I ve not yet found a good comparison of the features of the two libraries so I don t know what I might lose if when I switch over . Major differences I ve spotted so far are : .. . .. . 1 . AFNetworking has a much smaller code-size which is good .. . 2 . AFNetworking is being rapidly improved so it may not yet be mature may not have a stable API yet 3 . Both seem to have caching though I ve seen hints that because AFNetworking uses NSURLConnection it won t cache objects over 50K http : stackoverflow.com questions 7166422 nsurlconnection-on-ios-doesnt-try-to-cache-objects-larger-than-50kb .. . 4 . ASIHTTPRequest has very good support for manual automatic PAC http proxies I can t find any information on what level of support AFNetworking has for proxies .. . 5 . AFNetworking requires iOS 4+ whereas ASIHTTPRequest works right back to iOS 2 not really an issue for me but it is an issue for some people .. . 6 . AFNetworking doesn t yet have a built-in persistent cache but there s a persistent cache which has a pending pull request : https : github.com gowalla AFNetworking pull 25 .. . .. . Has anyone seen any good comparisons of the two libraries or any documented experiences of switching from one to the other Comment : AFNetworking lacks of very detailed documentation and examples so I can t say much about it . The major reason I use ASIHTTPRequest because it supports iOS 3.0 and ASIFallbackToCacheIfLoadFailsCachePolicy is very good . And I think AFNetworking has no persistent cache support . This is a no-go for me . Comment : Just notice that you are the first one who tags question with afnetworking . Comment : There is a cache that s waiting to be pulled into AFNetworking I ve added a link into my question . Comment : @iwat AFNetworking fully supports NSURLCache . If you re looking for disk cache I d heartily suggest Peter Steinberger s SDURLCache fork https : github.com steipete SDURLCache . Comment : Have you tried my networking framework MKNetworkKit blog.mugunthkumar.com products http : blog.mugunthkumar.com products ios-framework-introducing-mknetworkkit Basic Digest and NTLM Authentication auto-caching built-in image caching super easy file-upload support excellent documentation are some of the pluses . .. . Answer : Just finishing up a project where I m using AFNetworking instead of ASI . Have used ASI on previous projects it s been a great help in the past . Here s what AFNetworking is missing as of today that you should know about : .. . .. . Nothing .. . .. . ASI is going away http : allseeing-i.com 5Brequest release 5D . Use AF now . It s small it works and it s going to continue to be supported . It s also organized more logically especially for API clients . It has a number of great classes for oft-used special cases like asynchronous loading of images in table views . Comment : As @iwat mentioned in the commants on the question AFNetworking is missing robust caching . That s interesting and relevant to the question so nothing is the wrong answer . Other than that I agree completely with your sentiment tho . Comment : @KennyWinker Please see my reply in that comment thread . I m happy to say that AFNetworking doesn t build in a cache by design . Rather one is free to swap in their favorite NSURLCache -based solution . Comment : on Nothing part - how i can use proxies in the requests Comment : @AlexVolovoy you re probably best to ask that as a new question Comment : I wouldn t say nothing . Please see my answer below .", "Question : null .. . Answer : I am using cocoapods to import AFNetworking I get the following error after I try pod install .. . .. . Unable to satisfy the following requirements : .. . .. . AFNetworking 3.0 required by Podfile .. . .. . Specs satisfying the AFNetworking 3.0 dependency were found but they required a higher minimum deployment-target . I am using pod version 0.39.0 and the project Deployment Target is 8.0 .. . .. . Here is my Podfile content : .. . .. . Which is same as the requested by AFNetworking from https : github.com AFNetworking AFNetworking .. . .. . May I have any idea about the error Comment : is that your entire Podfile Comment : No There are a quiet long Podfile so i only write the part of it . Comment : The rest of them just the others library which the app required Comment : I found out the error is due to i also pod AFNetwortActivityLogger Comment : But how to due with it My project also required AFNetwortActivityLogger", "Question : I am using AFNetworking in the project which is using cocoapods to import .. . .. . And the project required me to turn on the BitCode .. . .. . So I switch the AFNetworking to 3.0 version .. . .. . And AFNetworkActivityLogger also require to use 3.0.0 version Therefore I add the below code into the Podfile .. . .. . pod AFNetworkActivityLogger : git https : github.com AFNetworking AFNetworkActivityLogger.git : branch 3 0 0 .. . .. . pod install is completed with no error found .. . .. . But the project is build failed with below error : .. . .. . AFNetworkActivityConsoleLogger.o was built without full bitcode . All object-files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64 .. . .. . Can t find any related post May i have some helps on this issue . .. . Answer : Refer this : - https : github.com AFNetworking AFNetworking issues 2986 .. . .. . The 3.0.0 branch has Carthage Support that does enable bitcode and to my knowledge there is nothing specific a library maintainer needs to do in order to support bitcode for Cocoapods . Comment : Thanks But I have already using the 3.0.0 branch with the above Podfile It still states that AFNetworkActivityConsoleLogger is not support bitcode Comment : Your pod will not work you have install it using Carthage Check this how to install it with github.com AFNetworking AFNetworking installation-with-carthage https : github.com AFNetworking AFNetworking installation-with-carthage Comment : I see Thanks for your answer I think I require another huge processes to work with Carthage . Comment : Hi Vizllx when i am adding the AFNetworkActivityLogger by Carthage i find the branch is not exist anymore it display the error like github.com Carthage Carthage issues 1167 https : github.com Carthage Carthage issues 1167", "Question : With work having recently stopped on ASIHTTPRequest http : allseeing-i.com 5Brequest release 5D it seems like attention is shifting to AFNetworking https : github.com AFNetworking AFNetworking . However I ve not yet found a good comparison of the features of the two libraries so I don t know what I might lose if when I switch over . Major differences I ve spotted so far are : .. . .. . 1 . AFNetworking has a much smaller code-size which is good .. . 2 . AFNetworking is being rapidly improved so it may not yet be mature may not have a stable API yet 3 . Both seem to have caching though I ve seen hints that because AFNetworking uses NSURLConnection it won t cache objects over 50K http : stackoverflow.com questions 7166422 nsurlconnection-on-ios-doesnt-try-to-cache-objects-larger-than-50kb .. . 4 . ASIHTTPRequest has very good support for manual automatic PAC http proxies I can t find any information on what level of support AFNetworking has for proxies .. . 5 . AFNetworking requires iOS 4+ whereas ASIHTTPRequest works right back to iOS 2 not really an issue for me but it is an issue for some people .. . 6 . AFNetworking doesn t yet have a built-in persistent cache but there s a persistent cache which has a pending pull request : https : github.com gowalla AFNetworking pull 25 .. . .. . Has anyone seen any good comparisons of the two libraries or any documented experiences of switching from one to the other Comment : AFNetworking lacks of very detailed documentation and examples so I can t say much about it . The major reason I use ASIHTTPRequest because it supports iOS 3.0 and ASIFallbackToCacheIfLoadFailsCachePolicy is very good . And I think AFNetworking has no persistent cache support . This is a no-go for me . Comment : Just notice that you are the first one who tags question with afnetworking . Comment : There is a cache that s waiting to be pulled into AFNetworking I ve added a link into my question . Comment : @iwat AFNetworking fully supports NSURLCache . If you re looking for disk cache I d heartily suggest Peter Steinberger s SDURLCache fork https : github.com steipete SDURLCache . Comment : Have you tried my networking framework MKNetworkKit blog.mugunthkumar.com products http : blog.mugunthkumar.com products ios-framework-introducing-mknetworkkit Basic Digest and NTLM Authentication auto-caching built-in image caching super easy file-upload support excellent documentation are some of the pluses . .. . Answer : AFNetworking works with blocks which is more natural for me than working with delegates like ASIHTTPRequest does . Working with blocks it s like working with Anonymous Function in javascript . Comment : ASIHTTPRequest accepts blocks too Comment : True but in my opinion it isn t the main approach to develop with ASIHTTPRequest Comment : That is only because blocks came along after ASIHTTP was written I always use blocks with ASI never a delegate ." ] }
[ "yes-answer-long", "yes-answer-short" ]
afnetworking
UNK_RELATION
ahah@javascript@82
ahah -- ahah is a very simple technique for dynamically updating web pages using @placeholder .
{ "confidence": [ 48.60279846191406, 46.84547424316406, 44.68217086791992, 42.91040802001953, 42.51520538330078, 42.51520538330078, 42.16124725341797, 41.919586181640625, 41.919586181640625, 41.919586181640625, 41.311180114746094, 40.87113952636719, 40.36385726928711, 40.19656753540039, 39.92546844482422, 39.554779052734375, 39.554779052734375, 39.554779052734375, 39.554779052734375, 39.49765396118164, 39.357845306396484, 39.32353973388672, 39.32353973388672, 38.60633850097656, 38.38957214355469, 38.38957214355469, 38.10791778564453, 38.10791778564453, 38.10791778564453, 38.064937591552734, 36.35151290893555, 36.35151290893555, 36.35151290893555, 35.186302185058594, 35.186302185058594, 35.186302185058594, 35.186302185058594, 34.49205017089844, 34.49205017089844, 34.49205017089844, 34.38479232788086, 33.79313659667969, 33.789772033691406, 33.49189376831055, 32.352725982666016, 32.095359802246094, 32.0367317199707, 32.0367317199707, 32.0367317199707, 32.0367317199707, 32.0367317199707, 32.0367317199707, 32.0367317199707, 32.0367317199707, 32.0367317199707, 32.0367317199707, 30.871522903442383, 30.871522903442383, 30.871522903442383, 30.871522903442383, 30.871522903442383, 30.871522903442383, 30.871522903442383, 30.36986541748047, 29.979015350341797, 29.474990844726562, 29.474990844726562, 29.395992279052734, 29.395992279052734, 29.395992279052734, 29.395992279052734, 29.395992279052734, 29.395992279052734, 28.230785369873047, 28.230785369873047, 28.230785369873047, 28.22315216064453, 28.22315216064453, 26.834251403808594, 26.723310470581055, 26.438270568847656, 26.438270568847656, 25.27306365966797, 25.27306365966797, 25.27306365966797, 24.627410888671875, 24.627410888671875, 23.876529693603516, 23.462203979492188, 21.01396942138672, 19.79949378967285, 19.115163803100586, 18.229124069213867, 18.10323715209961, 17.740665435791016, 17.55771255493164, 17.415943145751953, 17.238147735595703, 17.13972282409668, 16.75896644592285 ], "content": [ "randyfay.com ahah http : randyfay.com ahah", "Is there some kind of inherent flaw in using AHAH AHAH Helper for keeping the form state", "i am very confuse what is happening with ahah .", "I m using Drupal s AHAH functionality in forms .", "This includes AHAH-enabled forms .", "And relying on AHAH is No- No for the required functionality .", "Using AHAH and the AHAH Helper module I have created read : programmed this form to be multipage .", "It helped me understand the ahah process .", "AHAH is quite complicated in Drupal 6 .", "If AHAH is not popular can I skip that", "I tried the simplest examples of ahah and it doesn t work .", "You will need custom submit and AHAH callback functions as well as adding the AHAH element to the form .", "Some of them using AHAH and some of the using AJAX for dynamic page loading .", "I have dynamically created textboxes using Drupal AHAH which changes on selecting the number of textboxes in a dropdown .", "I heard we can use AHAH to add fields dynamically since I used a webform module to build my form can I still be able to use AHAH to add the feature of dynamically addition of fields", "when you can add another field with ahah .", "It is a good guide to learn AHAH with Drupal s form API .", "How to stop validation after ahah call", "Shall I learn AHAH or Ajax or both", "When the dropdown fires a change event two textfields are loaded dynamically below the dropdown through drupal AHAH .", "I have forms with Ahah helper .", "I m trying to add a row of form elements to my form using AHAH .", "I have using Drupal 6 and AHAH to customize my node form .", "This is all controlled by AHAH and I keep track of the pages using a hidden form element with a default-value current page .", "In that respect AHAH is really just a subset of AJAX .", "Is it not possible to use ahah and events on form types of markup", "For some reason the ahah functionality stopped working after a theme upgrade .", "I also downloaded ahah-helper module and even the example there doesn t work .", "what does a working ahah javascript code should look like", "Rendering a form with ahah causes a call to drupal add js to add the ahah javascript but while the output of the block is cached the javascript that gets added to the page doesn t .", "In ahah form use the form is loaded from the cache form get cache .", "On AHAH post the default form submission handler is also invoked .", "As this handler contains a redirection logic so AHAH request is collapsed .", "AHAH Helper keeps the previous values entered in the form saved in the storage of the form state .", "That s precisely the idea AHAH that you can update just part of a form .", "may be you can read this great article about ahah .", "I have a webpage that may make AHAH loads via jQuery.load .", "mindyourcode.com php http : www.mindyourcode.com php adding-dynamic-form-elements-using-ahah-in-apply-for-for-role-module", "I ended up using the ahah helper module which was a little messy as well but brought me all the way in the end .", "Take a look at Adding dynamic form elements using AHAH http : drupal.org node 331941 .", "I can t wrap my head around using AHAH but it seems like that s what I m supposed to be using .", "I ve read reports of people getting v1.4 and even v1.5 to work but at the cost of some core functionality like AHAH", "AHAH replaces the contents of the named wrapper with the data value in the returned JSON response .", "If you look at the Form API http : api.drupal.org api drupal developer--topics--forms api reference.html 6 ahah under Special Elements you can see that the ahah attribute is not supported for the markup form type .", "I copied exactly every code that s in this link : http : drupalsn.com learn-drupal drupal-tutorials getting-going-ahah-and-drupal-6 .. . .. . when I submit a ahah form - the page loads again without any other affects the form doesn t really gets submitted form-submit not invoked .", "I am following a jQuery tutorial AHAH http : www.lynda.com Ajax-tutorials AHAH-simpler-case 150163 155368-4.html but the description doesn t show up in the show more section when I click on the flowers .", "I m trying to get an AJAX-submitted AHAH form working to display in a block on the sidebar .", "Since the AHAH method seems to work in a page context though i was hoping to get around that and use the same code in a block .", ".. . .. . What do I need to do to make the new returned element AHAH ready", "The situation you re describing is precisely what AHAH was built for and it will save you the trouble of mucking around in Javascript to manage Drupal logic .", "My main question is : .. . .. . Does the theme hook function gets called whenever the form gets rebuilt via ahah ahah helper", "I have this by now : .. . .. . In my little and innocent world it should work if theme hook is called on every ahah event change .", "Ahah callback I do not wrote I think you would not have problem with it .", "I have tried various ways of setting AHAH but still unable to achieve the expected behavior the page reloads .", "For ahah I use this code : .. . .. . New form elements are rendered fine but I get status messages : .. . .. . Title field is required .", "AHAH is just something someone not so clever dreamed up about ten years ago .", "I can get as far as getting the AHAH response but the callback doesn t fire to load into the wrapper", "This is all you need to do to get AHAH kick-started into a custom bit of JS .", "Currently I have my form with the submit button implementing ahah and the path is set to a path defined in my menu hook .", "From what I ve seen I should use AHAH and maybe make a module .", "This tutorial will teach you about the Form API which is what you will eventually use to create the AHAH form you need .", "However this did not seem to work correctly with the AHAH forms for users that were not registered .", "I m not sure if it s possible to achieve what I want with AHAH which is fine but I d like to stick with it if possible .", "When it s submitted using AHAH some logic takes place in PHP and then the result is passed to JQuery which will update the elements in the block .", "I m using AHAH to submit the specific product form and have the form working great including updating the old form with the new values and a message to say the jobs been done .", "Can we specify a Javascript function to be called after the AJAX request from a Drupal AHAH form is completed", "This is the .module code : .. . .. . And this is the form on function page new init : .. . .. . And this is the other function page initedit : .. . .. . On page new init there is no error at all Ahah helper works fine .", "I can t find a definitive answer for why this happens though a found something tangentially related that suggests that maybe AHAH doesn t work within blocks .", "Based on your comment above I d recommend looking into Drupal s AHAH components which are described in detail at http : drupal.org node 348475 .", "Made it work found some nice examples here : .. . .. . http : www.kristen.org content drupal-ahah-form-examples .. . .. . And the code looks like this :", "EDIT : For an example install the Examples for Developers module http : drupal.org project examples it has an AHAH example you can use to help you learn .", "Another option I am trying is to detect the AHAH button click and return from the validation hook without processing if it s not my real submit button .", "Have a read of https : www.drupal.org node 331941 and http : katbailey.net blog ahah-drupal-may-it-one-day-live-its-acronym quicktabs 9 1 .", "As I said in my comment the AHAH JavaScript has no error callback so put some breakpoints in ahah.js if things don t seem to be working as expected .", "Now some of the users seem to be experiencing the following problem upon registering : While they are filling in their information and some AHAH call is triggered in the form e.g .", "Make sure to set the wrapper attribute of the ahah attribute to the ID as in : the HTML attribute of the DOM element that you want Drupal s JS functionality to update asynchronously .", "That said if you re not willing to go back and re-do your application using AHAH the drupal json http : api.drupal.org api function drupal json 6 function should address the problem you described in your comment .", "Here is an example how to solve this with Ajax in Drupal 7 If anyone want I can convert it also to Drupal 6 using AHAH name before it became Ajax .", "How to I get the AHAH system to update two containers - one for the form which was submitted and one for the message which will be a common container for all forms .", "Simple web pages will have an option to add php scripts directly .", "But I did figure a workaround which in my case involves toggling between two different values of the submit element object on the client-side so that it s AHAH behavior are not lost .", "The problem is when I click add another everything works fine but if I wait 5 minutes or so and I click again all the ahah fields disapear .", "I ve got as far as pulling out the AHAH settings and can re-initialize : .. . .. . I can also re-initialize : .. . .. . I ve even ensured that ahah.js is always loaded into the main page .", ": Pressing the next button Checking the email-address for validity checking birthdate for 17 after the AHAH call is finished the values within the form elements that had already been filled in have been replaced by completely different values .", "I ve circumvented the problem this time by loading from another browser but I wanted to know if there is any developer-friendly mode that causes updates in AHAH jQuery.load ed data to show up .", "Form .. . .. . And following is the AHAH callback processing .. . .. . Default form-submit handler .. . .. . When I finally submit the form in normal post way a validation error is reported as An illegal choice has been detected . Am I properly using form set cache", "I have a custom form call from menu hook as below : .. . .. . items testform array title testform page callback drupal get form page arguments test form access arguments array access content .. . .. . Now in this form built with Drupal 6 Form API I want to add Add More field using AHAH .", "You could put all the items next to each other in one big wrapper and then in your AHAH callback call drupal-render for each form element as they should be shown concatenating the outputs .", "I ve been using the ahah attribute which works fine with the event property set to keyup however I lose focus on the textfield element because the moment the keyup event is fired the whole form is rebuilt due to ahah s behaviour .", "In fact it s a very simple version of jQuery s load function .", "I found an alternative solution Simply used php files in building web pages and got the required functionality .", "It s still asynchronous and consists of some simple wrappers arund XMLHttpRequest it s not enough to call it a framework and certainly not enough to call a technique it s just basic common sense and code that everyone uses .", "For example see this Simple Example http : daniel.lorch.cc docs ajax simple on Section 4 .", "The important part of the above explanation is that the data of all the different parts persists through the different pages by using the form state variable .", "There is actually very similar problem to this in the example module using checkboxes I seem to recall .", "If you re just updating a paragraph of text just send html through .", "Thank you very much", "Problem is I need to pass the result dynamically to the following object in-place of ID and SELECTOR below .", "I m using drupal-6 .", "You have a previous next button to navigate between the different pages of the form ." ] }
{ "confidence": [ 63.54650115966797, 57.42378234863281, 48.63063049316406, 47.8503532409668, 47.61432647705078, 47.511573791503906, 46.65961456298828, 46.5211181640625, 46.34857940673828, 45.49821853637695, 44.90892028808594, 44.160587310791016, 43.572471618652344, 43.526092529296875, 43.39790344238281, 42.43699645996094, 41.547149658203125, 40.57037353515625, 39.88172912597656, 39.39231491088867 ], "content": [ "Question : I intend to add dynamically fields like text boxes radio buttons checkboxes select boxes on a click of button like ADD More . I heard we can use AHAH to add fields dynamically since I used a webform module to build my form can I still be able to use AHAH to add the feature of dynamically addition of fields .. . Answer : I found an alternative solution Simply used php files in building web pages and got the required functionality . Simple web pages will have an option to add php scripts directly . And relying on AHAH is No- No for the required functionality .", "Question : null .. . Answer : I am a newbie to javascript and jquery . I am interested to learn further techniques in javascript . I searched some tutorials . Some of them using AHAH and some of the using AJAX for dynamic page loading . Shall I learn AHAH or Ajax or both If AHAH is not popular can I skip that Comment : AHAH is just something someone not so clever dreamed up about ten years ago . It s still asynchronous and consists of some simple wrappers arund XMLHttpRequest it s not enough to call it a framework and certainly not enough to call a technique it s just basic common sense and code that everyone uses . In fact it s a very simple version of jQuery s load function .", "Question : Form .. . .. . And following is the AHAH callback processing .. . .. . Default form-submit handler .. . .. . When I finally submit the form in normal post way a validation error is reported as An illegal choice has been detected . Am I properly using form set cache On AHAH post the default form submission handler is also invoked . As this handler contains a redirection logic so AHAH request is collapsed . How to bypass it even-though I am doing click button validation Comment : I am not very much sure but I think that this article would help you a lot . mindyourcode.com php http : www.mindyourcode.com php adding-dynamic-form-elements-using-ahah-in-apply-for-for-role-module .. . Answer : i think for your last question use need to set form state ahah submission TRUE .", "Question : For some reason the ahah functionality stopped working after a theme upgrade . I tried the simplest examples of ahah and it doesn t work . I also downloaded ahah-helper module and even the example there doesn t work . I copied exactly every code that s in this link : http : drupalsn.com learn-drupal drupal-tutorials getting-going-ahah-and-drupal-6 .. . .. . when I submit a ahah form - the page loads again without any other affects the form doesn t really gets submitted form-submit not invoked . i have no idea where to start looking for a solution... . I m using drupal-6 . Comment : If the functionality stopped after a theme upgrade you should check the changes done with that upgrade . Main candidates to look at would be changes in the themes JavaScript files code . Comment : what does a working ahah javascript code should look like meaning what should i look for in the js files Comment : @MosheShaham Is this a contrib theme If so which one and which version Comment : no custom theme . Comment : @MosheShaham : Does your custom theme load a separate version of jQuery to the one included with Drupal core .. . Answer : This is happening because you have a second version of jquery loaded by your theme . This is either causing a conflict between jquery versions or introducing a jquery library that is incompatible with Drupal s core js . As far as I m aware the latest version of jquery that works with Drupal 6 is 1.3.2 which you can install using the jQuery update module http : drupal.org project jquery update . I ve read reports of people getting v1.4 and even v1.5 to work but at the cost of some core functionality like AHAH", "Question : I have using Drupal 6 and AHAH to customize my node form . For ahah I use this code : .. . .. . New form elements are rendered fine but I get status messages : .. . .. . Title field is required . Description field is required . How to stop validation after ahah call .. . Answer : Another option I am trying is to detect the AHAH button click and return from the validation hook without processing if it s not my real submit button . I was using the form state op value but just learned that only seems to work on Chrome . Just another idea .", "Question : I have a custom form call from menu hook as below : .. . .. . items testform array title testform page callback drupal get form page arguments test form access arguments array access content .. . .. . Now in this form built with Drupal 6 Form API I want to add Add More field using AHAH . Can anyone give me ideas how do I .. . Answer : AHAH is quite complicated in Drupal 6 . You will need custom submit and AHAH callback functions as well as adding the AHAH element to the form . Have a read of https : www.drupal.org node 331941 and http : katbailey.net blog ahah-drupal-may-it-one-day-live-its-acronym quicktabs 9 1 .", "Question : I have using Drupal 6 and AHAH to customize my node form . For ahah I use this code : .. . .. . New form elements are rendered fine but I get status messages : .. . .. . Title field is required . Description field is required . How to stop validation after ahah call .. . Answer : Solution from d.o . : http : drupal.org node 831900 comment-3124386 .. . .. . Add this function : .. . .. . and call it before drupal process form form id form form state", "Question : I want to have a add more button on clicking which i can add dynamically textboxes in a drupal form api. . can someone help on this Thanks in advance .. . Answer : Take a look at Adding dynamic form elements using AHAH http : drupal.org node 331941 . It is a good guide to learn AHAH with Drupal s form API . EDIT : For an example install the Examples for Developers module http : drupal.org project examples it has an AHAH example you can use to help you learn . Comment : can u explain me with an example i m struck somewhere in between Comment : @rad see my edit Comment : thanks . That was really helpful . But the main issue i am facing now is that the values are not getting saved and gets refreshed everytime . Comment : Without code there is no way for anyone to help you Comment : Hi I have the same issues as you had . Can you please give more details about the solution you ve used to resolve this .", "Question : I m creating a summary view of products and prices along with the ability to update the prices for each product each product has 5 prices for various user-roles . I m using AHAH to submit the specific product form and have the form working great including updating the old form with the new values and a message to say the jobs been done . However so far I can only update the one container that which contained the submitted form - this will mean that the view could end up with multiple success messages all over the place . How to I get the AHAH system to update two containers - one for the form which was submitted and one for the message which will be a common container for all forms . .. . Answer : AHAH replaces the contents of the named wrapper with the data value in the returned JSON response . You could put all the items next to each other in one big wrapper and then in your AHAH callback call drupal-render for each form element as they should be shown concatenating the outputs . e.g . :", "Question : I m having a very difficult problem atm one that I can not explain.. . at all . I really hope someone here may be able to shed some light on this predicament . On my website I have a self-developed module that displays some kind of registration form . The registration form consists of different parts : .. . .. . 1 . Personal information .. . 2 . Educational Information .. . 3 . Linguistic Skills .. . 4 . Local Exchange Specific information .. . 5 . Some optional additional remarks . Using AHAH and the AHAH Helper module I have created read : programmed this form to be multipage . It has the header on top describing what part of the total registration you are currently in and which parts you have yet to complete . You have a previous next button to navigate between the different pages of the form . This is all controlled by AHAH and I keep track of the pages using a hidden form element with a default-value current page . Anyway that is kind of besides the point . The important part of the above explanation is that the data of all the different parts persists through the different pages by using the form state variable . AHAH Helper keeps the previous values entered in the form saved in the storage of the form state . Now some of the users seem to be experiencing the following problem upon registering : While they are filling in their information and some AHAH call is triggered in the form e.g . : Pressing the next button Checking the email-address for validity checking birthdate for 17 after the AHAH call is finished the values within the form elements that had already been filled in have been replaced by completely different values . A name of a different person his age his email-address etc . Even though this person I assume that this is what is happening is filling out the form on a different private computer in obviously a different session . My users do not have to login on the website in order to register using this page I m not sure if that is causing an issue Anyway as far as I can tell I can only recreate the problem when I try filling out the form with different data from different browsers on my computer concurrently . In that case I can manage to corrupt the form state data . But as the users are on different private computers which presumable use different sessions cookies what-not how is it ever possible for form state data to be changed to form state data of another computer who is also filling out the form I don t get this Is there some kind of inherent flaw in using AHAH AHAH Helper for keeping the form state If there is is there some kind of work around Am I just making a huge newby mistake somewhere in my module code that prevents the form from working correctly Is there please anybody that can shed even a little bit of light at all on this problem I am absolutely and completely clue-less and I can not begin to imagine what is going wrong and how and even IF I can fix it at all . Please help me : S .. . .. . Thanks in advance Best Regards .. . .. . Tom .. . .. . Edit : This problem describes a problem in drupal 6.x Comment : Are you able to post the code that builds your form Comment : Sorry for the late reply . I actually thought I would get an email notication of this . I ll check my settings later . Sharing the code here would be a bit difficult but I can link you to my github : It starts here at link github.com tompauwaert Buddylinker blob master https : github.com tompauwaert Buddylinker blob master buddylinker v2.module on line 304 . Then goes to this file : link github.com tompauwaert Buddylinker blob master managers https : github.com tompauwaert Buddylinker blob master managers registration manager.php . I ve just started wondering could the problem be that I m using static-methods .. . Answer : I m answering my own question after having found the solution quite a while back but I forgot about this question . The problem is that the form state for the different computers is kept apart using session information from drupal . However this did not seem to work correctly with the AHAH forms for users that were not registered . Having users register before being able to fill in these forms solved all the concurrency issues .", "Question : I have a drupal website with a multi cck field or how is it called when you can add another field with ahah . The problem is when I click add another everything works fine but if I wait 5 minutes or so and I click again all the ahah fields disapear . My post is done correctly but my data response which should contain the html of the fields is empty . Does anyone have an idea about this .. . Answer : Ok I found the answer . In ahah form use the form is loaded from the cache form get cache . Every 3 minutes a cron jub runs and clears the cache that s why the from can t be retrieved and is empty .", "Question : I ve written some modal box functionality that loads HTML into the DOM as snippets . This includes AHAH-enabled forms . I ve got as far as pulling out the AHAH settings and can re-initialize : .. . .. . I can also re-initialize : .. . .. . I ve even ensured that ahah.js is always loaded into the main page . All this doesn t seem to be enough to get it working . Does anyone know what else I need to do Comment : also ensuring that jquery.form.js is loaded . I can get as far as getting the AHAH response but the callback doesn t fire to load into the wrapper Comment : I think I ve sorted it . The ahah.js ajax call has no error callback . it was failing silently but the fault was in my response json . Comment : You should post your own solution as an answer and eventually accept it . .. . Answer : The steps in my initial question are actually fine . This is all you need to do to get AHAH kick-started into a custom bit of JS . As I said in my comment the AHAH JavaScript has no error callback so put some breakpoints in ahah.js if things don t seem to be working as expected . Comment : +1 for follow up with own findings", "Question : I m building a custom module in Drupal 6 which display a block with a form and some other elements like text and images . When it s submitted using AHAH some logic takes place in PHP and then the result is passed to JQuery which will update the elements in the block . Mainly a few images and some text . I can t wrap my head around using AHAH but it seems like that s what I m supposed to be using . Currently I have my form with the submit button implementing ahah and the path is set to a path defined in my menu hook . The menu hook passes it to the callback function which performs the logic then I m at a dead end . How do I get the results to jQuery Any ideas Howie .. . Answer : Figured out a solution using : http : drupal.org project examples .", "Question : I m trying to get an AJAX-submitted AHAH form working to display in a block on the sidebar . For testing purposes I m using an example module called Poof from the Pro Drupal Development book : http : books.google.com books id VmZrdGuBZCMC lpg PA269 ots cnHiYG6kXn dq pro 20drupal 20development 20poof pg PA269 v onepage q pro 20drupal 20development 20poof f false http : books.google.com books id VmZrdGuBZCMC lpg PA269 ots cnHiYG6kXn dq pro 20drupal 20development 20poof pg PA269 v onepage q pro 20drupal 20development 20poof f false .. . .. . The only thing I ve added to the example so far is an implementation of hook block which looks like this : .. . .. . The AJAX module works fine when displaying on its own page mydrupalsite.com poof but when I call the form with module invoke poof block .. . in a template file the form submits as normal sans AJAX and refreshes the page . I can t find a definitive answer for why this happens though a found something tangentially related that suggests that maybe AHAH doesn t work within blocks . If that s so why Or better yet what s a work-around . Do I have to put the on its own blank page and bring it in with an iframe That sounds unnecessarily messy . UPDATED : Here s more code for reference again it s from the Pro Drupal book Comment : I use AJAX module enabled forms within blocks and they work just fine - so there is probably something wrong with AJAX modules attach to form detection logic in your case . How do you configure AJAX module to attach to your form Comment : Thanks for your reply Henrik . I m not using the AJAX module directly here . I m using Drupal s AHAH functionality in forms . I m adding another snippet to my original post for clarity . Maybe the answer is that I have to write Ajax directly with jQuery . Since the AHAH method seems to work in a page context though i was hoping to get around that and use the same code in a block . Comment : Does the misc ahah.js get included when you get the form in the block . Comment : Yes ahah.js is there . .. . Answer : Try adding .. . .. . blocks 0 cache BLOCK NO CACHE .. . .. . to your hook block implementation . Rendering a form with ahah causes a call to drupal add js to add the ahah javascript but while the output of the block is cached the javascript that gets added to the page doesn t .", "Question : I want to have a add more button on clicking which i can add dynamically textboxes in a drupal form api. . can someone help on this Thanks in advance .. . Answer : Here is an example how to solve this with Ajax in Drupal 7 If anyone want I can convert it also to Drupal 6 using AHAH name before it became Ajax .", "Question : Why won t the above work Is it not possible to use ahah and events on form types of markup Do I have to use my own custom javascript You can stop reading here I would like to end my sentences and question here but stackoverflow is forcing me to input a minimum amount of characters . Apologies in advance .. . Answer : If you look at the Form API http : api.drupal.org api drupal developer--topics--forms api reference.html 6 ahah under Special Elements you can see that the ahah attribute is not supported for the markup form type . So I m afraid you will have to roll your own JS in this case or convert the markup element into a normal form element which it doesn t look like will work for your purposes . Comment : Bummerz Thanks for finding the source for this .", "Question : I have dynamically created textboxes using Drupal AHAH which changes on selecting the number of textboxes in a dropdown . When I am initially having 6 textboxes with values in it and then changing the textbox count to 4 it changes with the remaining two textbox values not changing to blank . Instead the value entered gets stored in the textbox 5 and 6 . Can someone help me in how to clear the data when u r minimizing the no of textboxes Thanks in advance Vivek .. . Answer : There is actually very similar problem to this in the example module using checkboxes I seem to recall . Rather than me explain it why not have a look directly yourself Comment : I checked the example and that too seems to have the same problem . I need a solution for this rather than checking if similar problems exist", "Question : I have a form with a textfield element which when a user starts typing into I want to pre-populate a different element . I ve been using the ahah attribute which works fine with the event property set to keyup however I lose focus on the textfield element because the moment the keyup event is fired the whole form is rebuilt due to ahah s behaviour . I tried setting the event property to change and that works nicely however in order for the change event to fire I need to click away from the textfield - so from UI point of view I cannot expect users to click away from field just to get the results to display . I m not sure if it s possible to achieve what I want with AHAH which is fine but I d like to stick with it if possible . Happy to provide code if required and sorry if it s not clear quite difficult to explain . Thanks Steve .. . Answer : The whole form shouldn t be re-rendered by the browser . That s precisely the idea AHAH that you can update just part of a form . Make sure to set the wrapper attribute of the ahah attribute to the ID as in : the HTML attribute of the DOM element that you want Drupal s JS functionality to update asynchronously . For example : .. . .. . Your field which will trigger ahah behavior DOM element in the browser shouldn t lose focus or be re-rendered in any way unless there s something else causing some bug . Comment : It seems so obvious now don t know how I could ve missed that . I ve applied your advice to my form and works a charm . Thanks .", "Question : Firstly I am sorry i just can t seem to phrase my question well . Setup : I am using Drupal to build this location-based application . i have a form which allows the user to select his her location . the form has 3 dependent select elements e.g . country city state . they are dependent in such a way that selecting a particular state in the state select will filter the choices which get displayed in city select and so on . I am trying to do this using Jquery but i can t seem to make it work . I know that my issue is very trivial for you out there expert in this kind of thing but I m not therefore I am asking for your assistance . Thank you very much Comment : What have you tried so far give more details . There are many ways of killing a dog let s do what you have started . Comment : hmmm i am using query to change the contents of a select element but what happened in my impl now is the div container of my select displays everything returned from the get call to.. . i m getting a whole drupal page as output.. . Comment : hmm i guess i m not really deserving of any help from you ok thanks anyway : Comment : Not sure if you re aware but it s the middle of the night in the western hemisphere here . I must have slept through my someone on the internet needs help with something alarm . .. . Answer : Based on your comment above I d recommend looking into Drupal s AHAH components which are described in detail at http : drupal.org node 348475 . The situation you re describing is precisely what AHAH was built for and it will save you the trouble of mucking around in Javascript to manage Drupal logic . That said if you re not willing to go back and re-do your application using AHAH the drupal json http : api.drupal.org api function drupal json 6 function should address the problem you described in your comment . drupal json basically says return a json object instead of a drupal page . Comment : thank you very much.. . the problem was fixed already.. . i appreciate your help.. . : Comment : thanks the problem was solved already . :", "Question : I have forms with Ahah helper . When I tried to fill the form it always getting this error : .. . .. . A name of function but that function is exist xxx location of drupal .. . .. . Line 378 is : .. . .. . At page new init there is no error at all . But at page initedit there s always error . This is the .module code : .. . .. . And this is the form on function page new init : .. . .. . And this is the other function page initedit : .. . .. . On page new init there is no error at all Ahah helper works fine . But on page initedit the error comes up : .. . .. . What should I do .. . Answer : In .module file I have to load .inc file . That s what I forgot :" ] }
[ "yes-answer-long", "yes-answer-short" ]
javascript
UNK_RELATION
coffeekup@html@100
coffeekup -- coffeekup is a templating-engine for node.js and browsers that lets you to write your @placeholder templates in 100 pure coffeescript .
{ "confidence": [ 55.55286407470703, 52.65366744995117, 52.14020919799805, 51.86224365234375, 50.71063232421875, 48.112850189208984, 47.55603790283203, 47.52791976928711, 45.724205017089844, 44.62397766113281, 44.54228973388672, 42.67937469482422, 39.85317611694336, 39.447322845458984, 39.02604675292969, 37.815330505371094, 37.815330505371094, 37.494354248046875, 37.28497314453125, 37.28497314453125, 35.872291564941406, 35.872291564941406, 35.55131912231445, 34.583274841308594, 34.583274841308594, 34.583274841308594, 34.583274841308594, 33.730735778808594, 28.528339385986328, 27.884214401245117, 27.884214401245117, 24.733566284179688, 24.66250228881836, 24.652809143066406, 24.443424224853516, 24.020843505859375, 23.079410552978516, 23.06416130065918, 22.73345375061035, 22.73182487487793, 22.461551666259766, 22.052471160888672, 21.886871337890625, 21.864912033081055, 21.723854064941406, 21.444435119628906, 21.444435119628906, 20.999345779418945, 20.530874252319336, 19.907596588134766, 19.7103271484375, 19.495086669921875, 18.74932861328125, 18.74932861328125, 18.74932861328125, 18.55312728881836, 17.770769119262695, 17.259727478027344, 16.641223907470703, 16.632875442504883, 16.323963165283203, 15.694751739501953, 15.507884979248047, 15.418296813964844, 15.291393280029297, 15.128098487854004, 15.067684173583984, 14.845389366149902, 14.79768180847168, 14.780538558959961, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.702198028564453, 14.656964302062988, 14.18792724609375, 14.18792724609375, 14.171841621398926, 14.171841621398926, 14.065467834472656, 13.71541976928711, 13.685080528259277 ], "content": [ "I am writing an app with node.js and coffee-script and coffeekup as template-engine .", "I m trying to get started with AngularJS using coffeescript and coffeekup .", "I am using coffeekup templating and have the following default.html.coffee layout file .", "The gist of it is that you include coffeekup and coffeescript libraries and write your template in a js file or in a script-element .", "@AaronDufour coffeekup is markup language based on coffeescript so it s indirectly related .", "I am quite new to web development and have started programming with node.js express and using the coffeekup view engine .", "My problem is the following : .. . .. . If I use the CoffeeKup view engine can I somehow insert coffeeKup code as a parameter to the jquery-append method", "I m trying to get CoffeeKup to work with Mozilla s Rhino engine .", "whatever npm-install coffeekup installs .", "Maurice calls your specific flavour of client-side browser coffeekup creme https : github.com mauricemach coffeekup tree master examples browser creme .", "I also started working on a CoffeeKup reference https : github.com mauricemach coffeekup blob master docs reference.md if you re interested .", "Now CoffeeKup knows that any strings returned to it it should render for convenience .", "If you find something reasonable trivial try to file an issue https : github.com mauricemach coffeekup issues but CoffeeKup doesn t seem to have seen much activity for the last months .", "coffeekup was Changed to coffeecup .. . .. . follow this link : https : github.com gradus coffeecup", "If I go to their website I see CoffeeScripts everywhere.. . .. . .. . I would be happy if I also could use another templating-engine because CoffeeKup uses CoffeeScript as well and I change it into a more Razor-like engine https : github.com cstivers78 bliss wiki .", "When placed on the html element for example the HTML should be .. . .. . This output does not seem to be achievable using coffeekup .", "Currently I m defining an empty root module as a workaround but I still don t think that this is something coffeekup is not capable of .", "The usage or intention of the code you ve povided seems to imply a misunderstanding of the way either CoffeeKup or CoffeeScript works so let me evaluate what s going on and why sometimes it works and sometimes it doesn t .", "Thanks Marius yes coffeekup I ll redo along what you suggest and comment", "There s examples of what you are trying to achieve in the examples browser directory of the coffeekup source .", "I think it would be a cool addition to coffeekup but you re right I don t think there s a way to do it now .", "The following is from the creme index.html https : github.com mauricemach coffeekup blob master examples browser creme index.html file .", "Is there a way to pass variable values just for reading obviously from the app to the embedded coffeescript in a coffeekup view in zappa such as : .. . .. . It seems really slick if it would work.. . as an alternative to embedded-javascript .. . .. . Update : Here are a few attempts .", "I m becoming a huge fan of CoffeeKup but I m wondering how I can use literal HTML in such a template", "For example when I just want to copy-paste some existing non-CoffeeKup markup .", "https : github.com brandonbloom html2coffeekup .. . .. . It s linked from the main github page of coffeekup .", "I m trying to use coffeekup as my default template .. . .. . except app.register isn t a function it looks like .", "In the longer comment at the top of coffeekup.coffee https : github.com mauricemach coffeekup blob master src coffeekup.coffee it says that it will run on Node or on browsers so that s most likely the case .", "I found the following template engines with CoffeeScript .. . .. . https : github.com mauricemach coffeekup last commit 2 years ago .. . https : github.com sstephenson eco last commit 2 years ago .. . https : github.com ddopson jade-coffeescript last commit 4 month ago .. . .. . Now I just wonder whether there some other template engines around with CoffeeScript because the two first engines above were not updated since 2 years", "I know I can use Jade but if I stuck with CoffeeKup how could I for instance have this code : .. . .. . .. . generate this : .. . .. . ...instead of this : .. . .. . I guess I m nitpicking over the ol versus ul but I am just starting use Tower in evaluation to Railway and Derby .", "CoffeeKup provides the text function allowing us to do : .. . .. . Which when compiled looks like : .. . .. . Which is just what we want as the text call just like div and all the other element calls doesn t return a string and outputs the content directly .", "So for iterating over a data object you simply write Coffeescript code to do that calling the Coffeecup convenience method for generating the html text .", "Give CoffeeScript a try you won t regret it .", "Yes within the template all my variables work but the problem is within the coffeescript - piece of the code which is how you can embed coffeescript to be run on the browser .", "CoffeeScript is not Ruby you have to explicitely call @headerTemplate : @headerTemplate", "This does not appear to have anything to do with coffeescript .", "And doing simple template expansion inside the coffeescript construct would not work either as coffeescript would not know if you refer to a local variable on the client or a template variable on the server .", "Keep in mind that Coffeecup templates really are just Coffeescript code with lots of convenience functions named identically with the HTML tags and some conventions for rendering a subtree by passing a function that renders the subtree .", "It could be made to look like regular coffeescript of course e.g .", "Currently Tower development is done using coffeescript .", "You are running the test with node.js right and not from a browser", "Just to elaborate a bit The problem here is that we re executing coffeescript code in two contexts one on the server which generates the html to send to the client and the other on the client itself through in the context of the coffeescript - construct .", "How do I override how templates are rendered in TowerJS", "yes from node.js", "this is a zappa coffeescript newbie question I try to write a script that collects from mysql and renders results with div not tables works so far with just one row .", "Coffeescript is incredibly simple to get used to and Tower makes it easy .", "Is there an official CoffeeScript way to do this at run-time using .replace", "But I would not categorize this as a clean coffeescript way so I guess the question still stands", "I m just looking at the possibilities in Node.js web development .", "If it works on Node V8 + browsers but not Rhino you can be fairly certain it s something specific to Rhino not necessarily wrong though .", "Now that I read on the TowerJS page it seems that all the workflow is intended for Coffeescript even the use of cake for minimizing etc .", "I am writing a node.js app in coffee-script using the express framework .", "I ve written some quick javascript in a script - function since it s just a string I can interpolate the variables easily so I ve worked around it but the coffeescript way would be cleaner .", "The server-side knows about locals and similar so for the code that runs on the server it s simple to evaluate the coffeescript based template and replace template variables with values and similar .", "In theory there could be special sequences that signal expand template variable inside coffeescript code as well but then we re just - again - creating a new template language on top of coffeecup .", "Here s how to pass and use variables to a view function from http : zappajs.org docs crashcourse : .. . .. . As for iterating over the rows in your resultset you would have to do something like : .. . .. . The exact details depend on which template-engine you are using from what you ve written looks like Coffeecup .", "Let s take a look at the compiled javascript of your code there .", "I m used to coding in ASP.NET MVC 3 so TowerJS and Geddy looks friendly and familiar to me because of the MVC pattern .. . .. . However I don t really like CoffeeScript because of its strange syntax and the debugging issues so I would be happy if I could use Tower without using CoffeeScript - and if I could use simple JavaScript instead .", "I have an options object in my CS class and I d like to keep some templates in it : .. . .. . Then I d like to interpolate these strings later in the code.. .", "did you tried escaping html ng-app :", "So for example instead of writing body .append p I can write body .append p or body .append p or something similar .", "So all in all the solution is to prefix : .. . .. . With the text call so it becomes : .. . .. . If you ever want to escape the HTML entities so convert to lt then you ll want to add the h call as well like so h content to be escaped and combined with text will look like text h content to be escaped - however that is just something to note not something you need right now or here .", "You can customize that tag by setting : .. . .. . The configuration variables are here : .. . .. . https : github.com viatropos tower tree master packages tower-view shared view.coffee L16-92 https : github.com viatropos tower blob 399fff92ed6477c123fa11bfb5b07405436a87d7 packages tower-view shared view.coffee L16-92", "By calling this method from both your handler and showstock handler you should be able to handle the different use cases without duplicating the code or trying to pass huge data objects as HTTP data objects .", "Assuming your data sets can be large using a browser redirect like your code suggests is not the proper way to pass the data from one view to another .", "Have you tried using this tool too for converting your markup instead of just inlining in", "Are you sure that very same code you linked works in Node", "If you refactor the code in your showstock function to be a normal member function passing along any request response variables I see Zappa passes those implicitely but I do not know enough about Zappa to provide exact answers and a rows object just have that function return the rendered text .", "Don t be afraid of changes in your life", "Are you able to get Node to consume it if you simplify it or otherwise make any modifications", "Is this a CoffeKup question or Mint question", "Thanks", "I see now that I can change that and other settings in config application .", "I am having trouble pulling in end-of-page scripts or other content from my layout file after making the call for @content .", "The problem I m running in to is that @content correctly yields and renders page-specific content only if nothing follows it if the @getBlock scripts line above for example is removed or commented out .", "With the above code however the getBlock call for scripts succeeds but @content does not insert content .", "Any help appreciated Thanks .", "We can use the compiler on coffeescript.org to do this : .. . .. . Notice how this.content is just a non-actionable statement .", "Just as-if I did this : a b c d nothing would do anything .", "When we do div - blah it comiles to div function return blah which says pass div a function that when called will return the string blah .", "But as we can t return multiple things as the first return exists the block what are we to do", "Yes thanks so much for the quick response .", "Sweet", "If it solved the problem be sure to mark the answer as the accepted answer by clicking the checkmark next to it so people know the problem is solved .", "More info here : meta.stackexchange.com a 5235 149978 http : meta.stackexchange.com a 5235 149978", "Done thanks again loving Docpad .", "AngularJS is capable of auto-bootstrapping itself https : docs.angularjs.org api ng directive ngApp when it detects the ng-app attribute on any HTML element .", "According to the docs it should be placed on the html or body element .", "However it will try to load any attribute value if given as the application root module .", "I tried the following things : .. . .. . To clarify : What I do not want is the following : .. . .. . since this causes AngularJS to look for a non-existent root module called ng-app .", "Thanks but this leads to html ng-app - whereas the wanted output is html ng-app", "Perhaps taking the values individually : .. . .. . Or from a context object : .. . .. . .. . .. . Given your now-former comments you could use the 2nd example above like so :", "If it handles your old markup it would be a more elegant solution .", "Your solution looks a little cleaner than my String : : interp thing .", "I guess by script - function you mean something like : .. . .. . At least that s a hackish workaround .", "You have to either implement something like Ember Knockout or Serenade.js or roll it yourself .", "To really know what s going wrong you need a debugger where you can step through the code I don t know how to do that on Rhino possibly via Eclipse or maybe even jdb http : docs.oracle.com javase 1.3 docs tooldocs solaris jdb.html if you have all sources at hand and are very Java proficient .", "Would your way also perform better because it doesn t use regex or is that a non-issue", "You should be able too.. ." ] }
{ "confidence": [ 84.12942504882812, 66.84008026123047, 58.74052429199219, 58.4423713684082, 57.304779052734375, 54.53396987915039, 53.95542907714844, 53.924530029296875, 53.893463134765625, 53.81462097167969, 51.48567199707031, 50.16499328613281, 48.17549514770508, 46.74605941772461, 46.345542907714844, 40.51830291748047, 24.754589080810547, 23.98703956604004, 19.689062118530273 ], "content": [ "Question : I am quite new to web development and have started programming with node.js express and using the coffeekup view engine . My problem is the following : .. . .. . If I use the CoffeeKup view engine can I somehow insert coffeeKup code as a parameter to the jquery-append method So for example instead of writing body .append p I can write body .append p or body .append p or something similar . I want the compiler to somehow preprocess my coffee code.. . Comment : This does not appear to have anything to do with coffeescript . Please elaborate and retag if I m wrong . Comment : @AaronDufour coffeekup is markup language based on coffeescript so it s indirectly related . .. . Answer : There s examples of what you are trying to achieve in the examples browser directory of the coffeekup source . Maurice calls your specific flavour of client-side browser coffeekup creme https : github.com mauricemach coffeekup tree master examples browser creme . The gist of it is that you include coffeekup and coffeescript libraries and write your template in a js file or in a script-element . The following is from the creme index.html https : github.com mauricemach coffeekup blob master examples browser creme index.html file .", "Question : I m just looking at the possibilities in Node.js web development . I m used to coding in ASP.NET MVC 3 so TowerJS and Geddy looks friendly and familiar to me because of the MVC pattern .. . .. . However I don t really like CoffeeScript because of its strange syntax and the debugging issues so I would be happy if I could use Tower without using CoffeeScript - and if I could use simple JavaScript instead . Is it possible If I go to their website I see CoffeeScripts everywhere.. . .. . .. . I would be happy if I also could use another templating-engine because CoffeeKup uses CoffeeScript as well and I change it into a more Razor-like engine https : github.com cstivers78 bliss wiki . Comment : You should be able too.. . I ve never used TowerJS but have you tried using it with just JS Comment : Now that I read on the TowerJS page it seems that all the workflow is intended for Coffeescript even the use of cake for minimizing etc . Try railwayjs.com http : railwayjs.com it seems similar to TowerJS in philosophy . Comment : Give CoffeeScript a try you won t regret it . Don t be afraid of changes in your life .. . Answer : Perhaps you should give Geddy a try then . http : geddyjs.org", "Question : I am having trouble pulling in end-of-page scripts or other content from my layout file after making the call for @content . I am using coffeekup templating and have the following default.html.coffee layout file . The problem I m running in to is that @content correctly yields and renders page-specific content only if nothing follows it if the @getBlock scripts line above for example is removed or commented out . With the above code however the getBlock call for scripts succeeds but @content does not insert content . Any help appreciated Thanks . .. . Answer : Let s take a look at the compiled javascript of your code there . We can use the compiler on coffeescript.org to do this : .. . .. . Notice how this.content is just a non-actionable statement . Just as-if I did this : a b c d nothing would do anything . The usage or intention of the code you ve povided seems to imply a misunderstanding of the way either CoffeeKup or CoffeeScript works so let me evaluate what s going on and why sometimes it works and sometimes it doesn t . When we do div - blah it comiles to div function return blah which says pass div a function that when called will return the string blah . Now CoffeeKup knows that any strings returned to it it should render for convenience . But as we can t return multiple things as the first return exists the block what are we to do CoffeeKup provides the text function allowing us to do : .. . .. . Which when compiled looks like : .. . .. . Which is just what we want as the text call just like div and all the other element calls doesn t return a string and outputs the content directly . So all in all the solution is to prefix : .. . .. . With the text call so it becomes : .. . .. . If you ever want to escape the HTML entities so convert to lt then you ll want to add the h call as well like so h content to be escaped and combined with text will look like text h content to be escaped - however that is just something to note not something you need right now or here . Comment : Yes thanks so much for the quick response . Comment : Sweet If it solved the problem be sure to mark the answer as the accepted answer by clicking the checkmark next to it so people know the problem is solved . More info here : meta.stackexchange.com a 5235 149978 http : meta.stackexchange.com a 5235 149978 Comment : Done thanks again loving Docpad .", "Question : null .. . Answer : I m trying to get started with AngularJS using coffeescript and coffeekup . AngularJS is capable of auto-bootstrapping itself https : docs.angularjs.org api ng directive ngApp when it detects the ng-app attribute on any HTML element . According to the docs it should be placed on the html or body element . However it will try to load any attribute value if given as the application root module . When placed on the html element for example the HTML should be .. . .. . This output does not seem to be achievable using coffeekup . I tried the following things : .. . .. . To clarify : What I do not want is the following : .. . .. . since this causes AngularJS to look for a non-existent root module called ng-app . Currently I m defining an empty root module as a workaround but I still don t think that this is something coffeekup is not capable of . Comment : did you tried escaping html ng-app : Comment : Thanks but this leads to html ng-app - whereas the wanted output is html ng-app", "Question : I m trying to get CoffeeKup to work with Mozilla s Rhino engine . Not much luck so far . I m trying this simple template : .. . .. . Which I compile into Javascript http : pastie.org 3119021 and then try to render using .. . .. . But it fails with this : .. . .. . In the Javascript version of coffeekup.coffee line 304 is this one : .. . .. . And code http : pastie.org 3112201 line 230 last line is this : .. . .. . Does anything look out of the ordinary or is this perhaps a Rhino bug Comment : Are you sure that very same code you linked works in Node It gives me the .. . secondary prompt for me like it is waiting for more input and it throws a SyntyxError in Spidermonkey as well . Comment : I don t use Node so no . But even though it looks fine to my eyes doesn t mean there s not a subtle bug there . Are you able to get Node to consume it if you simplify it or otherwise make any modifications Comment : I created this HTML file http : pastie.org 3125229 and when viewing it in Firefox the alert has this content : DOCTYPE html html-head title Say Hello title head body h1 Hello World h1 body html so the code appears to be fine . .. . Answer : If it works on Node V8 + browsers but not Rhino you can be fairly certain it s something specific to Rhino not necessarily wrong though . In the longer comment at the top of coffeekup.coffee https : github.com mauricemach coffeekup blob master src coffeekup.coffee it says that it will run on Node or on browsers so that s most likely the case . To really know what s going wrong you need a debugger where you can step through the code I don t know how to do that on Rhino possibly via Eclipse or maybe even jdb http : docs.oracle.com javase 1.3 docs tooldocs solaris jdb.html if you have all sources at hand and are very Java proficient . If you find something reasonable trivial try to file an issue https : github.com mauricemach coffeekup issues but CoffeeKup doesn t seem to have seen much activity for the last months . If you re up for a challenge fork fix and pull request .", "Question : I m just looking at the possibilities in Node.js web development . I m used to coding in ASP.NET MVC 3 so TowerJS and Geddy looks friendly and familiar to me because of the MVC pattern .. . .. . However I don t really like CoffeeScript because of its strange syntax and the debugging issues so I would be happy if I could use Tower without using CoffeeScript - and if I could use simple JavaScript instead . Is it possible If I go to their website I see CoffeeScripts everywhere.. . .. . .. . I would be happy if I also could use another templating-engine because CoffeeKup uses CoffeeScript as well and I change it into a more Razor-like engine https : github.com cstivers78 bliss wiki . Comment : You should be able too.. . I ve never used TowerJS but have you tried using it with just JS Comment : Now that I read on the TowerJS page it seems that all the workflow is intended for Coffeescript even the use of cake for minimizing etc . Try railwayjs.com http : railwayjs.com it seems similar to TowerJS in philosophy . Comment : Give CoffeeScript a try you won t regret it . Don t be afraid of changes in your life .. . Answer : Currently Tower development is done using coffeescript . A javascript api is planned for the future though I don t know how far off that is . There are a few complications to work out before that will be possible . EDIT : Adding a Javascript API to Tower has become a priority for the framework so I expect this to come to fruition sooner than I had anticipated when I originally answered . Probably quite soon . Comment : Okay thanks I will probably use Geddy . Comment : Was the JavaScript support added Comment : @GuyKorland still in progress . You can keep see some of the most recent discussion around that here : github.com viatropos tower pull 299 issuecomment-10677833 https : github.com viatropos tower pull 299 issuecomment-10677833 because of the way in which Tower s api was originally designed around CoffeeScript s executable class bodies it s been quite a bit more work than I think anyone ever anticipated to untangle from . In the meantime Tower is an amazing framework and I d encourage you and anyone else to go ahead and try it . Coffeescript is incredibly simple to get used to and Tower makes it easy .", "Question : I m becoming a huge fan of CoffeeKup but I m wondering how I can use literal HTML in such a template For example when I just want to copy-paste some existing non-CoffeeKup markup . .. . Answer : Have you tried using this tool too for converting your markup instead of just inlining in https : github.com brandonbloom html2coffeekup .. . .. . It s linked from the main github page of coffeekup . If it handles your old markup it would be a more elegant solution .", "Question : this is a zappa coffeescript newbie question I try to write a script that collects from mysql and renders results with div not tables works so far with just one row . My question how do I pass on the whole result array for output with the template Code example below any criticism welcome thanks : .. . Answer : Here s how to pass and use variables to a view function from http : zappajs.org docs crashcourse : .. . .. . As for iterating over the rows in your resultset you would have to do something like : .. . .. . The exact details depend on which template-engine you are using from what you ve written looks like Coffeecup . Keep in mind that Coffeecup templates really are just Coffeescript code with lots of convenience functions named identically with the HTML tags and some conventions for rendering a subtree by passing a function that renders the subtree . So for iterating over a data object you simply write Coffeescript code to do that calling the Coffeecup convenience method for generating the html text . Assuming your data sets can be large using a browser redirect like your code suggests is not the proper way to pass the data from one view to another . If you refactor the code in your showstock function to be a normal member function passing along any request response variables I see Zappa passes those implicitely but I do not know enough about Zappa to provide exact answers and a rows object just have that function return the rendered text . By calling this method from both your handler and showstock handler you should be able to handle the different use cases without duplicating the code or trying to pass huge data objects as HTTP data objects . Comment : Thanks Marius yes coffeekup I ll redo along what you suggest and comment", "Question : I am writing an app with node.js and coffee-script and coffeekup as template-engine . I have a form where I d like to enable or disable a button depending on whether there are values in some input fields . I am wondering whether there is a straightforward mechanism like in Sproutcore or Ember where just a binding will do . How should I go about it .. . Answer : No there is no such binding out of the box . You have to either implement something like Ember Knockout or Serenade.js or roll it yourself . If it s just this one form I would just have a small script jQuery below : Comment : cool thanks . I ll go for the script then Comment : If my answer was satisfactory please accept it : -", "Question : I m becoming a huge fan of CoffeeKup but I m wondering how I can use literal HTML in such a template For example when I just want to copy-paste some existing non-CoffeeKup markup . .. . Answer : You can add arbitrary text with the text function : .. . .. . For multiline strings CoffeeScript s heredocs are a pleasure : .. . .. . Just make sure you have autoescape set to false the default-value . Comment : Hey awesome thanks : Comment : You re welcome I also started working on a CoffeeKup reference https : github.com mauricemach coffeekup blob master docs reference.md if you re interested .", "Question : Is there a way to pass variable values just for reading obviously from the app to the embedded coffeescript in a coffeekup view in zappa such as : .. . .. . It seems really slick if it would work.. . as an alternative to embedded-javascript .. . .. . Update : Here are a few attempts . I m just trying to use the string in my embedded script as an id . I ve written some quick javascript in a script - function since it s just a string I can interpolate the variables easily so I ve worked around it but the coffeescript way would be cleaner . It makes sense that the scope would be lost on the browser side--I was just trying to figure out how to do it . .. . Answer : I guess by script - function you mean something like : .. . .. . At least that s a hackish workaround . It could be done with objects as well typically using JSON or similar for serialization . But I would not categorize this as a clean coffeescript way so I guess the question still stands Just to elaborate a bit The problem here is that we re executing coffeescript code in two contexts one on the server which generates the html to send to the client and the other on the client itself through in the context of the coffeescript - construct . The server-side knows about locals and similar so for the code that runs on the server it s simple to evaluate the coffeescript based template and replace template variables with values and similar . Not so on the client . First of all the client knows nothing about locals template variables it only sees whatever those contained when the page got rendered server-side . And doing simple template expansion inside the coffeescript construct would not work either as coffeescript would not know if you refer to a local variable on the client or a template variable on the server . In theory there could be special sequences that signal expand template variable inside coffeescript code as well but then we re just - again - creating a new template language on top of coffeecup . It could be made to look like regular coffeescript of course e.g . serverLocal SOMEREF where SOMEREF would be replaced with the corresponding value . In theory Coffeecup could support a construct that shared all or a selection of locals also as variables to be accessed client-side using a hack similar to the script hack I showed above and it would probably be not too different except using JSON or similar for supporting more kinds of data than simple strings . Comment : Yes within the template all my variables work but the problem is within the coffeescript - piece of the code which is how you can embed coffeescript to be run on the browser . I ll add an update which illustrates what I ve tried . Comment : That s still better than what I have--thanks Comment : I think it would be a cool addition to coffeekup but you re right I don t think there s a way to do it now .", "Question : I found the following template engines with CoffeeScript .. . .. . https : github.com mauricemach coffeekup last commit 2 years ago .. . https : github.com sstephenson eco last commit 2 years ago .. . https : github.com ddopson jade-coffeescript last commit 4 month ago .. . .. . Now I just wonder whether there some other template engines around with CoffeeScript because the two first engines above were not updated since 2 years .. . Answer : If you re looking for something more up-to-date I d suggest ECT https : github.com baryshev ect . I haven t really used it before so I can t offer much advice but several of my friends strongly recommend it .", "Question : I m trying to use coffeekup as my default template .. . .. . except app.register isn t a function it looks like . whats the migration Comment : Did you ever figure this out Comment : I ended up creating my own loadDir function which loads a dir runs it through a compiler and either requires it or writes it to a new directory . In this case I run it through the coffeecup compiler and stick it into a template object Comment : use the npm module loaddir it is pretty awesome . .. . Answer : coffeekup was Changed to coffeecup .. . .. . follow this link : https : github.com gradus coffeecup", "Question : How do I override how templates are rendered in TowerJS I know I can use Jade but if I stuck with CoffeeKup how could I for instance have this code : .. . .. . .. . generate this : .. . .. . ...instead of this : .. . .. . I guess I m nitpicking over the ol versus ul but I am just starting use Tower in evaluation to Railway and Derby . Is this a CoffeKup question or Mint question .. . Answer : You can customize that tag by setting : .. . .. . The configuration variables are here : .. . .. . https : github.com viatropos tower tree master packages tower-view shared view.coffee L16-92 https : github.com viatropos tower blob 399fff92ed6477c123fa11bfb5b07405436a87d7 packages tower-view shared view.coffee L16-92 Comment : Thanks I see now that I can change that and other settings in config application .", "Question : I m trying to use coffeekup as my default template .. . .. . except app.register isn t a function it looks like . whats the migration Comment : Did you ever figure this out Comment : I ended up creating my own loadDir function which loads a dir runs it through a compiler and either requires it or writes it to a new directory . In this case I run it through the coffeecup compiler and stick it into a template object Comment : use the npm module loaddir it is pretty awesome . .. . Answer : You want app.engine instead of app.register -- the guide needs to be updated . Check out the unit tests for examples : https : github.com visionmedia express blob master test app.engine.js Comment : This leads to Error : callback function required because coffeekup.adapters.express is an object not a function . Comment : What code are you using Comment : whatever npm-install coffeekup installs .", "Question : I m trying to use coffeekup as my default template .. . .. . except app.register isn t a function it looks like . whats the migration Comment : Did you ever figure this out Comment : I ended up creating my own loadDir function which loads a dir runs it through a compiler and either requires it or writes it to a new directory . In this case I run it through the coffeecup compiler and stick it into a template object Comment : use the npm module loaddir it is pretty awesome . .. . Answer : coffeecup derivative teacup has an up to-date example http : goodeggs.github.com teacup getting-started express", "Question : I have an options object in my CS class and I d like to keep some templates in it : .. . .. . Then I d like to interpolate these strings later in the code.. . But of course these are compiled to ul class + foo + ul and foo is undefined . Is there an official CoffeeScript way to do this at run-time using .replace .. . .. . Edit : I ended up writing a little utility to help : .. . .. . So my options now look like : .. . .. . And then later in the code : .. . Answer : I d say if you need delayed evaluation then they should probably be defined as functions . Perhaps taking the values individually : .. . .. . Or from a context object : .. . .. . .. . .. . Given your now-former comments you could use the 2nd example above like so : Comment : Thanks for the suggestions . Comment : Thanks again for the update . Your solution looks a little cleaner than my String : : interp thing . Would your way also perform better because it doesn t use regex or is that a non-issue I may be doing this in very large loops . Comment : For anyone else who may find this useful Jonathan s method performs much better than mine : jsperf.com string-concat-vs-regex-replace http : jsperf.com string-concat-vs-regex-replace", "Question : this is not working for me : .. . .. . I call renderCustomerTransaction 5 and all I get back is .. . Answer : CoffeeScript is not Ruby you have to explicitely call @headerTemplate : @headerTemplate", "Question : I am writing a node.js app in coffee-script using the express framework . After exploring a couple of options I finally decided to use mocha and zombie.js . However I am having a hard testing the UI . For example to implement a successful user authentication I do the following : see the code pasted here my gist https : gist.github.com f1bd9ebda405274e2b28 .. . .. . What I really wanted to do is the following : .. . .. . call get sessions new which will call the SessionsController and display the authentication form .. . then I ll call the browser.visit method enter the values for the fields and submit the form which will generate a post method .. . if the username and password are correct I ll expect the SessionsController to react accordingly and redirect to the right page . Unfortunately whenever I run the tests it complains about Zombie : require is not defined ReferenceError : require is not defined . It turns out it doesn t like the two lines in my javascripts app.js .. . .. . require coffee-script .. . require . tfs.coffee .. . .. . .. . Even when I try to extract any information from the browser after the visit method I just get undefined values . Apparently none of my assertions is being tested . It just passes the test . Is there anything I am doing wrong Has anyone testing coffee-script written app in express using Zombie.js faced that problem what could be the fix Comment : You are running the test with node.js right and not from a browser Comment : yes from node.js .. . Answer : If javascripts app.js is being loaded from the browser you would want to make sure that RequireJS or some other browser framework that defines require is loaded first or load them in your HTML document : .. . .. . script src coffee-script.js type text javascript script .. . script src tfs.coffee type text coffee script .. . .. . You might need to wait until the page is fully loaded before extracting values ." ] }
[ "yes-answer-long", "yes-answer-short" ]
html
UNK_RELATION
expression-templates@templates@99
expression-templates -- expression-templates is a c++ template metaprogramming technique in which @placeholder are used to represent part of an expression as a compile-time structure representing a flattened abstract-syntax-tree of said expression .
{ "confidence": [ 64.13887023925781, 62.17488098144531, 61.10464859008789, 60.897674560546875, 59.82710647583008, 58.29633331298828, 58.233028411865234, 56.624183654785156, 56.595420837402344, 56.50067138671875, 56.05551528930664, 54.54314041137695, 54.524742126464844, 54.524742126464844, 53.64588165283203, 52.72908020019531, 52.22389221191406, 52.22389221191406, 50.97206115722656, 50.94668197631836, 50.94668197631836, 50.94668197631836, 50.803321838378906, 50.63421630859375, 50.41401290893555, 50.26485824584961, 50.24021530151367, 50.220672607421875, 49.603370666503906, 49.487937927246094, 49.449745178222656, 49.41590881347656, 49.41590881347656, 49.41590881347656, 49.41590881347656, 48.65634536743164, 48.088653564453125, 47.9571647644043, 47.932945251464844, 47.79821014404297, 47.727455139160156, 47.66130447387695, 47.62024688720703, 47.62024688720703, 47.559669494628906, 47.419681549072266, 47.33384704589844, 46.980613708496094, 46.91774368286133, 46.21748352050781, 46.21748352050781, 46.07734680175781, 46.02889633178711, 45.633384704589844, 45.5130729675293, 45.5130729675293, 45.342315673828125, 45.342315673828125, 45.25996398925781, 45.191070556640625, 45.17267990112305, 44.99022674560547, 44.99022674560547, 44.99022674560547, 44.99022674560547, 44.99022674560547, 44.83039093017578, 44.762962341308594, 44.28168487548828, 44.104957580566406, 44.06510543823242, 44.06510543823242, 44.06510543823242, 44.06510543823242, 44.06510543823242, 43.779319763183594, 43.73601150512695, 43.62843322753906, 43.62843322753906, 43.55973815917969, 43.43760299682617, 43.12104034423828, 42.98866271972656, 42.94012451171875, 42.582271575927734, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625, 42.534332275390625 ], "content": [ "Expression templates are often used as an optimization technique to avoid the creation of temporary objects .", "I m trying to explore expression-templates in C++ .", "Or just not use expression-templates .", "I recently stumbled across expression-templates in C++ .", "That s worse than expression-templates .", "Does that mean that expression-templates are not useful", "The expression-templates in that example all store the lhs and rhs arguments by reference in order to lazily compute the entire expression tree .", "I found Expression Templates Demystified http : shoddykid.blogspot.com 2008 07 expression-templates-demystified.html to be fairly well explained .", "Expression templates are often designed to presume the entire expression will occur on a single line and it will end with a sink type like a matrix that causes the expression template to be evaluated .", "The intended use-case is in expression-templates .", "Does your implementation preserve the efficiency of expression-templates", "I have an expression template which adds a variable with a constant in a given expression .", "how would auto be broken with expression-templates", "I m writing a library that uses expression-templates with CRTP .", "There are many other examples where expression-templates are used in Eigen .", "The issue is related to enclose expression-templates in static-libraries .", "I m using Expression Templates in a vector-like class for transformations such as moving averages .", "Note : I m not asking about any particular existing implementation of expression-templates .", "IMO the article is a good alternative to the expression template chapter in C++ Templates : The Complete Guide .", "This question seems to reduce to Can I implement iterators for my expression-templates", "I am working on a vector class that uses expression-templates .", "This related question here : .. . .. . How to integrate a library that uses expression-templates", "I am unrolling the loop in the matrix-multiplication and I find that the performance of native doubles is equal to that of the expression-templates until the depth of the expression gets too large and the expression template performance goes downhill .", "The expression is really a binary-tree .", "Or maybe it is just something wrong with the particular library I m using not the expression-templates technique in general", "I am writing a C++ library in which I use functions that take as parameters expression-templates in Eigen3 .", "Not what is the tree generated given a expression such as a b c .", "Edit : I tried to compile the code in the Expression Templates http : en.wikipedia.org wiki Expression templates 20Wikipedia page of Wikipedia .", "In your case you have a b expression template which is then used to construct an expression template return-value which you later evaluate .", "Especially forming the Hamiltonian with expression template .", "It works when the references outlive the expression template : .. . .. . The conversion and resolving of the expression template happens at the assignment .", "Eigen uses expression-templates to implement lazy-evaluation and to simplify loops and calculations .", "But adding the expression-templates overloads for the Eigen classes would break it in the same way .", "Also expression-templates don t work well in the presence of auto .", "boost : : lambda has a different purpose than expression-templates .", "There is a lot more to the expression template technique than mere avoidance of copying .", "I m trying to understand the concept of expression-templates in C++ as such I ve cobbled together pieces of example code etc to produce a simple vector and associated expression template infrastructure to support only binary operators + - .", "This is the simple general concept of template expression .", "They are all libraries using Expression Templates to get rid of temporaries for mixed matrix vector operations and some of them Blaze and Eigen go a step further and specialize templates for specific matrix vector operations smart Expression Templates .", "The expression template type really shouldn t matter though .", "I want to use expression-templates to create a tree of objects that persists across statement .", "That s a known issue with auto : it does the wrong thing when you are using expression-templates because it results in storing the expression tree which is likely to contain references that will become dangling right away .", "Or there is an alternative to expression-templates allowing the same efficiency without export problems", "I am constructing code with expression-templates for computational kernels .", "Suppose I have some array-based code that is enabled to be used by expression-templates .", "Is there any way or any tricks I can use to somehow reduce the compiling time but still to be able to use expression-templates", "@gha.st I mean the classic expression template similar to that on the book C++ Template .", "In your code you applied nicely the expression template technique salted with new C++11 techniques .", "Assuming that expression-templates know their size and have overloaded operator an iterator simply needs to hold a reference to the expression object and an offset into the range it represents : .. . .. . Now you simply have to arrange for Expression templates to have begin and end members that return iterator this 0 and iterator this size .", "You could look at C++ Template Metaprogramming for more modern techniques built from the expression-templates ideas but something simple is not going to be readily available until it IS simple .", "in C++ Template Metaprogramming : Concepts Tools and Techniques from Boost and Beyond .. . .. . .. . One drawback of expression-templates is that they tend to encourage writing large complicated expressions because evaluation is only delayed until the assignment-operator is invoked .", "I have developed an expression templates-based C++ matrix class of my own .", "It looks like one possible reason is expression-templates are used in the code shown previously .", "I ve started defining a new template class Matrix and I ve read that best efficiency may be achieved with expression-templates .", "@rubenvb : auto causes the same trouble for expression-templates as for any other transparent wrapper : It will deduce concat s type to be the same as the expression template wrapper and not a std : : string .", ".. . .. . The question .. . .. . The bottom line is : it seems that this way of implementing expression-templates by storing cheap references instead of copying values or using shared pointers gets broken as soon as one tries to store the expression template itself .", "I am constructing a library that makes use of expression-templates where I make heavily use of templated functions in classes .", "The problem with expression-templates is that the potential list of types is infinite how do I deal with overloading then", "What are good introductions to the creation of C++ expression template systems", "This happens in product xpr A : : operator where you call which if I read it right is an Eigen multiplication that uses expression-templates .", "For example in Armadillo the following operation : .. . .. . becomes something like this : .. . .. . without creating any temporaries due to their implementation of expression-templates http : stackoverflow.com questions 10725299 understanding-the-benefits-of-move-semantics-vs-template-metaprogramming .", "the type the expression template magic is generating for us .", "How expression template prevented the step forward", "@EJP It is valid when you have expression template .", "It will be faster than the expression template if you do it appropriately .", "OMG you mean THE classic expression template", "I ve tried creating an assignment-operator within the new expression template but that won t work with the code above as all the expression template members are const references and so the assignment-operator is deleted at compile-time .", "Somehow inspired by the expression template code in Expression templates and C++11 http : stackoverflow.com questions 11809052 expression-templates-and-c11 11812468 11812468 written by Paul Preney I decided to test the following : .. . .. . Then I used it to produce an instance of X const vector int and X vector int as follows : .. . .. . The output is : .. . .. . which shows that the life-time of the temporary vector int 5 6 7 8 is not being extended and the rvalue-reference member X : : t binds to something else .", "Context : I am playing around with writing expression-templates and C++11 features .", "To improve the expression template it has to be aware that it is being assigned to a pre exiting vector which means vector expression has have support to do inplace editing not just expression : : operator vector .", "I am trying to understand an aspect of expression-templates https : en.wikipedia.org wiki Expression templates .", "Such expression-templates allow for speed optimizations etc so I really need to use them .", "The only way to circumvent this would be to build a thin layer wrapper around their expression-templates as well .", "So that s the main reason for the base-class in just about all the examples I see on expression-templates", "And even then there might be a better alternative I ve never worked with expression-templates in any serious capacity .", "This question asks how to design a template expression system to avoid the issue .", "Edit : .. . .. . Basically using the ET technique the compiler builds a parse-tree that resembles the algebraic expression with it s type system .", "Is there any technique that could be used to detect that a complete template expression is not immediately resolved and must copy the data is thus far only held a reference to", "Is there any technique that could be used to detect that a complete template expression is not immediately resolved and must copy the data is thus far only held a reference to", "The lifetime of temporaries passed to in a b are going to be over by the time you reach the sink type matrix which violates what the expression-templates expect .", "Looks like the problem doesn t originate from the expression template technique in general array arithmetics with numbers works fine .", "This won t work if I want to use the expression template returned by Vec : : head since the assignment happens within the class that holds the data not the expression template .", "Given an expression template tree I want to create a new optimized tree before processing it .", "Quick Answer .. . .. . Move semantics are not a total panacea on their own --techniques such as expression-templates ETs are still needed in C++11 to eliminate overheads such as moving data around", "I was worried I had to compute the expression twice for both begin and end but a range-wrapper will just store the expression template and dispatch both iterators .", "Is there any way of designing expression-templates to prevent the compiler from compiling such code that may result in the use of expired temporaries at runtime", "Is there any way of designing expression-templates to prevent the compiler from compiling such code that may result in the use of expired temporaries at runtime", "I am writing a library that stores Eigen expression-templates as member variables to do the complicated calculations it needs to do .", "However it seems like I m not able to store or return these expression-templates unless they are directly converted in MatrixXd or alike .", "I was reading some articles and in many of them mentioned about expression-templates can avoid using temporary objects .", "Other way could be to make my own operators but let them return expression-templates .", "You need to read up on what expression-templates http : en.wikipedia.org wiki Expression templates are and how they influence this code .", "Your overloaded operators won t take advantage of expression-templates exactly as the OP has described .", "There might be a way to achieve what you want with expression-templates http : stackoverflow.com a 2598596 819272 .", "Also note that while efficient string-concatenation is something that would be proposed the exact form of that might not be expression-templates .", "I m developing an automatic-differentiation tool based on expression-templates and operator function-overloading .", "The point of expression-templates is that the evaluation of the subexpressions can lead to temporaries that would incur a cost and provide no benefit .", "I ve seen examples of what I want to achieve in expression-templates that don t use CRTP .", "Ideally expression-templates save the extra allocations required by temporary vectors in the naive case .", "expr.cpp : .. . .. . vala.cpp : .. . .. . Command line : .. . .. . With optimizations : .. . .. . Massive improvement with expression-templates because it avoids extra vector allocations ." ] }
{ "confidence": [ 75.87909698486328, 71.16682434082031, 69.34609985351562, 67.25291442871094, 67.21611785888672, 66.99796295166016, 65.95518493652344, 65.73532104492188, 65.6483383178711, 64.45170593261719, 63.74855422973633, 62.75525665283203, 61.66917419433594, 61.153343200683594, 60.370811462402344, 60.166358947753906, 60.11472702026367, 59.56945037841797, 59.44444274902344, 58.903839111328125 ], "content": [ "Question : Let s look at one particular benefit of expression-templates : ETs can be used to avoid vector-sized temporaries in memory which occur in overloaded operators like : .. . .. . In C++11 the return statement of this function applies move-semantics . No copy of the vector . That s a win . However if I look at a simple expression like .. . .. . I see that the above function gets called twice for both operator+ while the final assignment can be done with move-semantics . In total 2 loops are executed . Means that I put out a temporary and read it back in right after . For big vectors this falls out of cache . That s worse than expression-templates . They can do the whole thing in just 1 loop . ETs can execute the above code equivalent to : .. . .. . I was wondering whether lambdas together with move-semantics or any other new feature can do as good as ETs . Any thoughts Edit : .. . .. . Basically using the ET technique the compiler builds a parse-tree that resembles the algebraic expression with it s type system . This tree consists of inner nodes and leaf nodes . The inner nodes represent operations addition multiplication etc . and the leaf nodes represent references to the data objects . I tried to think of the whole computation process in the fashion of a stack machine : Take an operation from an operation stack and pull the next arguments from the argument stack and evaluate the operation . Put the result back on the stack waiting for the operation . To represent these two different objects operation stack and data leaf stack I bundled together a std : : tuple for the operations and a std : : tuple for the data leaves into a std : : pair . Initially I used a std : vector but that resulted in runtime overhead . The whole process goes in two phases : Stack machine initialisation where the operation and argument stack are initialised . And the evaluation phase which is triggered by assigning the paired containers to the vector . I created a class Vec which holds a private array int 5 the payload and which features an overloaded assignment-operator that takes the expression . The global operator is overloaded for all combinations of taking Vec and expression to enable the correct handling also in the case where we have more than just a b . Notice I switched for this educational example to the multiplication - basically to quickly spot the imull in the assembler . What is done first before the evaluation starts is extracting the values out of the involved Vec objects and initializing the argument stack . That was necessary to not have different kinds of objects lying around : Indexable vectors and non-indexable results . This is what the Extractor is for . Nice thing again : Variadic templates are used which in this case results in no run-time overhead all this is done at compile-time . The whole thing works . The expression is nicely evaluated I also added the addition but that is left out here to fit the code . Below you can see the assembler output . Just raw compuation exactly as you want it to be : En-par with ET technique . Upshot . The new language features of C++11 offer the variadic-templates which along with template meta-programming open up the area of compile-time computation . I showed here how the benefits of variadic-templates can be used to produce code as good as with the traditional ET technique . Assembler generated with g++-4.6 -O3 I had to put some runtime dependence into the vector initialization so that the compiler doesn t calculate the whole thing at compile-time and you actually see the imull instaructions . Comment : You should look up copy-elision and RVO http : en.wikipedia.org wiki Copy elision . Also passing one of the vectors by value instead of making your own tmp copy could help . Comment : Passing by value can t help a copy is still made . N RVO doesn t help eliminating the additional loop Comment : @Frank : are you sure This is a strong candidate for RVO . Comment : Closely related stackoverflow question and answers are here : stackoverflow.com questions 10725299 http : stackoverflow.com questions 10725299 c11-understanding-the-benefits-of-move-semantics-vs-template-metaprogramming Comment : @PaulPreney : Agreed . If I thought the linked question was a dupe I would have said so and voted to close this one . I was just trying to help spread some relevant information . .. . Answer : Here is the corrected version of Paul Preney s code . I have informed the author by email and in comments I have written an edit but it has been rejected by unqualified reviewers . The error in the original code is that BinaryOp template parameter of math vector expr : : operator+ is fixed .", "Question : Let s look at one particular benefit of expression-templates : ETs can be used to avoid vector-sized temporaries in memory which occur in overloaded operators like : .. . .. . In C++11 the return statement of this function applies move-semantics . No copy of the vector . That s a win . However if I look at a simple expression like .. . .. . I see that the above function gets called twice for both operator+ while the final assignment can be done with move-semantics . In total 2 loops are executed . Means that I put out a temporary and read it back in right after . For big vectors this falls out of cache . That s worse than expression-templates . They can do the whole thing in just 1 loop . ETs can execute the above code equivalent to : .. . .. . I was wondering whether lambdas together with move-semantics or any other new feature can do as good as ETs . Any thoughts Edit : .. . .. . Basically using the ET technique the compiler builds a parse-tree that resembles the algebraic expression with it s type system . This tree consists of inner nodes and leaf nodes . The inner nodes represent operations addition multiplication etc . and the leaf nodes represent references to the data objects . I tried to think of the whole computation process in the fashion of a stack machine : Take an operation from an operation stack and pull the next arguments from the argument stack and evaluate the operation . Put the result back on the stack waiting for the operation . To represent these two different objects operation stack and data leaf stack I bundled together a std : : tuple for the operations and a std : : tuple for the data leaves into a std : : pair . Initially I used a std : vector but that resulted in runtime overhead . The whole process goes in two phases : Stack machine initialisation where the operation and argument stack are initialised . And the evaluation phase which is triggered by assigning the paired containers to the vector . I created a class Vec which holds a private array int 5 the payload and which features an overloaded assignment-operator that takes the expression . The global operator is overloaded for all combinations of taking Vec and expression to enable the correct handling also in the case where we have more than just a b . Notice I switched for this educational example to the multiplication - basically to quickly spot the imull in the assembler . What is done first before the evaluation starts is extracting the values out of the involved Vec objects and initializing the argument stack . That was necessary to not have different kinds of objects lying around : Indexable vectors and non-indexable results . This is what the Extractor is for . Nice thing again : Variadic templates are used which in this case results in no run-time overhead all this is done at compile-time . The whole thing works . The expression is nicely evaluated I also added the addition but that is left out here to fit the code . Below you can see the assembler output . Just raw compuation exactly as you want it to be : En-par with ET technique . Upshot . The new language features of C++11 offer the variadic-templates which along with template meta-programming open up the area of compile-time computation . I showed here how the benefits of variadic-templates can be used to produce code as good as with the traditional ET technique . Assembler generated with g++-4.6 -O3 I had to put some runtime dependence into the vector initialization so that the compiler doesn t calculate the whole thing at compile-time and you actually see the imull instaructions . Comment : You should look up copy-elision and RVO http : en.wikipedia.org wiki Copy elision . Also passing one of the vectors by value instead of making your own tmp copy could help . Comment : Passing by value can t help a copy is still made . N RVO doesn t help eliminating the additional loop Comment : @Frank : are you sure This is a strong candidate for RVO . Comment : Closely related stackoverflow question and answers are here : stackoverflow.com questions 10725299 http : stackoverflow.com questions 10725299 c11-understanding-the-benefits-of-move-semantics-vs-template-metaprogramming Comment : @PaulPreney : Agreed . If I thought the linked question was a dupe I would have said so and voted to close this one . I was just trying to help spread some relevant information . .. . Answer : I was wondering whether lambdas together with move-semantics or any other new feature can do as good as ETs . Any thoughts Quick Answer .. . .. . Move semantics are not a total panacea on their own --techniques such as expression-templates ETs are still needed in C++11 to eliminate overheads such as moving data around So to answer your question quickly before diving into the rest of my answer move-semantics etc . doesn t completely replace ETs as my answer illustrates below . Detailed Answer .. . .. . ETs typically return proxy objects to defer evaluation until later so there is no immediate apparent benefit of C++11 language features until the code that triggers the computation . That said one would not want to write ET code however that triggers run-time code generation during the building of the expression tree with the proxies . Nicely C++11 s move-semantics and perfect-forwarding can help avoid such overheads should that otherwise occur . Such would not have been possible in C++03 . Essentially when writing ETs one wants to exploit the language features in a way to generate optimal code once the member function s of the involved proxy objects are invoked . In C++11 this will include using perfect-forwarding move-semantics over copying etc . if such is actually still needed over and above what the compiler can already do . The name of the game is to minimize the run-time code generated and or maximize the run-time speed and or minimize the run-time overhead . I wanted to actually try some ETs with C++11 features to see if I could elide ALL intermediate temporary instance types with a a b + c + d expression . As this was just a fun break from my normal activities so I did not compare it to or write ET code purely using C++03 . Also I did not worry about all aspects of code polishing that appears below . To start with I did not use lambdas --as I preferred to use explicit types and functions-- so I won t argue for against lambdas with respect to your question . My guess is that they would be similar to using functors and performing no better than the non-ET code below i.e . moves would be required --at least until compilers can automatically optimize lambdas using their own internal ETs for such . The code I wrote however exploits move-semantics and perfect-forwarding . Here s what I did starting with the results and then finally presenting the code . I created a math vector N class where N 3 and it defines an internal private instance of std : : array long double N . The members are a default constructor copy and move constructors and assignments an initializer-list constructor a destructor a swap member operator to access elements of the vector and operator + . Used without any expression-templates this code : .. . .. . outputs when compiled with clang++ 3.1 or g++ 4.8 with - std c++11 -O3 : .. . .. . i.e . the four explicit constructed instances using initializer lists i.e . the initlist items the result variable i.e . 0x7fff8d6eddd0 and also makes an additional three objects copying and moving . To only focus on temporaries and moving I created a second case that only creates result as a named variable --all others are rvalues : .. . .. . which outputs this again when ETs are NOT used : .. . .. . which is better : only extra move objects are created . But I wanted better : I wanted zero extra temporaries and to have the code as-if I hard-coded it with the one normal coding caveat : all explicitly instantiated types would still be created i.e . the four initlist constructors and result . To accomplish this I then added expression template code as follows : .. . .. . 1 . a proxy math vector expr LeftExpr BinaryOp RightExpr class was created to hold an expression not computed yet .. . 2 . a proxy plus op class was created to hold the addition operation .. . 3 . a constructor was added to math vector to accept a math vector expr object and .. . 4 . starter member-functions were added to trigger the creation of the expression template . The results using ETs are wonderful : no extra temporaries in either case The previous two cases above now output : .. . .. . i.e . exactly 5 constructor calls and 5 destructor calls in each case . In fact if you ask the compiler to generate the assembler code between the 4 initlist constructor calls and the outputting of result one gets this beautiful string of assembler code : .. . .. . with g++ and clang++ outputs similar even smaller code . No function-calls etc . --just a bunch of adds which is EXACTLY what one wants The C++11 code to achieve this follows . Simply define DONT USE EXPR TEMPL to not use ETs or don t define it at all to use ETs . Comment : Thanks Paul for your answer . In your code you applied nicely the expression template technique salted with new C++11 techniques . Great work . I like the overloaded operation classes . And yes I agree that lambdas would basically render to the same performance as having named structs . I tried to circumvent the ET technique if you fancy the question is extended by my code . Comment : You re welcome Your question is also very relevant . The new additions especially variadic-templates move-semantics and perfect-forwarding actually has us all taking steps back to readjust and do things in a simpler way again --more like when we started coding Perhaps for too long we ve all been optimizing to effectively bypass the compiler . With C++11 this is no longer needed as well-thought out simpler code yields better optimal performance just by letting the compiler do what it does . So with C++11 I try to remind myself to resist temptation to optimize but to rethink more simply . Comment : @Frank : I think this answer is ready to be accepted don t you Comment : your usage of std : : move e.g . static T apply T a T const b a + b return std : : move a doesn t seem correct to me . See : thbecker.net articles rvalue references section 06.html http : thbecker.net articles rvalue references section 06.html and stackoverflow.com a 11540204 469659 http : stackoverflow.com a 11540204 469659 section Moving out of functions . Comment : The linked to thbecker.net page is different than this . On the thbecker.net page X x is a declared locally within the function --one should simply do return x and if RVO does not apply if it can be moved the compiler will move it or it will copy it . With my function you ve quoted a is passed in as an rvalue-reference . When an rvalue-reference it is not an lvalue reference due to the other overload with T const is passed as an argument it acquires a name and becomes an lvalue --yet it still refers to an rvalue . Thus return std : : move a makes a an rvalue again to return it .", "Question : Somehow inspired by the expression template code in Expression templates and C++11 http : stackoverflow.com questions 11809052 expression-templates-and-c11 11812468 11812468 written by Paul Preney I decided to test the following : .. . .. . Then I used it to produce an instance of X const vector int and X vector int as follows : .. . .. . The output is : .. . .. . which shows that the life-time of the temporary vector int 5 6 7 8 is not being extended and the rvalue-reference member X : : t binds to something else . Okay from this answer What is the lifetime of the class data member which const reference to a rvalue http : stackoverflow.com questions 6715370 what-is-the-lifetime-of-the-class-data-member-which-const-reference-to-a-rvalue I know this is the expected behaviour . However the question here is : what is different in Paul Preney code in Expression templates and C++11 http : stackoverflow.com questions 11809052 expression-templates-and-c11 11812468 11812468 that permits the temporary vectors to exist as long as the rvalue-references members exist See his Case 2 where temporaries are created . Apparently the same construct there is used here but I am probably missing something . .. . .. . Edit : Based on the answer of R . Martinho Fernandes below I tried the following : .. . .. . and it turns out that this is a valid code that outputs : .. . .. . Therefore apparently references stored in the expression template is not dangling . What is going on here Comment : Nitpick : in the constructor of X std : : forward T is just a verbose way of saying std : : move . decltype std : : forward T t is also a very verbose way of saying T . .. . Answer : The problem - as R . Martinho Fernandes states in his answer - is that you capture references to rvalues in your expression tree which outlive their referents . The solution is to only store references to lvalues and to capture objects passed by rvalue-reference directly . In other words store their values in the expression tree instead of by reference Live code at Coliru http : coliru.stacked-crooked.com view id 5fe847bf3e5741c254b9dd5a36605fb1-c944ac6b0eed3bfc48b1f78a894f6965 : .. . .. . If the user passes you an lvalue reference it is her responsibility to ensure that the referent outlives the expression tree object .", "Question : What are good introductions to the creation of C++ expression template systems I would like to express arithmetic on user-defined-types while avoiding temporary values which may be large and to learn how to do this directly rather than applying an existing library . I have found Todd Veldhuizen s original paper http : eprints.kfupm.edu.sa 40035 1 40035.pdf and an example from the Josuttis C++ Templates book http : www.josuttis.com tmplbook exprtmpl exprmain.cpp.html and an article by Kreft Langer http : www.angelikalanger.com Articles Cuj ExpressionTemplates ExpressionTemplates.htm . It is mentioned in Lecture 6 of a course on Modern C++ http : www.cs.aau.dk nesotto modern cpp 2008.html referring back to Josuttis.The POOMA library background http : www.nongnu.org freepooma tutorial background.html introduces expression-templates nicely . I am looking for simple clear expositions . Comment : Boost lambda library seems to use this technique . From my experience it is very cumbersome to use and still has lots of limitations I wouldn t be surprised if there were no simple explanations of how this works too . Comment : boost : : lambda has a different purpose than expression-templates . .. . Answer : You ve got all the sources except for the scientific c++ book which is really just the original paper wrt to this topic anyway and is pretty out dated . You could look at C++ Template Metaprogramming for more modern techniques built from the expression-templates ideas but something simple is not going to be readily available until it IS simple .", "Question : in C++ Template Metaprogramming : Concepts Tools and Techniques from Boost and Beyond .. . .. . .. . One drawback of expression-templates is that they tend to encourage writing large complicated expressions because evaluation is only delayed until the assignment-operator is invoked . If a programmer wants to reuse some intermediate result without evaluating it early she may be forced to declare a complicated type like : .. . .. . or worse . Notice how this type not only exactly and redundantly reflects the structure of the computationand so would need to be maintained as the formula changes but also overwhelms it This is a long-standing problem for C++ DSELs . The usual workaround is to capture the expression using type-erasure but in that case one pays for dynamic dispatching . There has been much discussion recently spearheaded by Bjarne Stroustrup himself about reusing the vestigial auto keyword to get type deduction in variable declarations so that the above could be rewritten as : .. . .. . This feature would be a huge advantage to C++ DSEL authors and users alike.. . .. . .. . Is it possible to solve this problem with the current c++ std . non C++0X .. . .. . For Example i want to write a Expression like : .. . .. . Expr X Y .. . .. . Matrix A B C D .. . .. . X A+B+C .. . .. . Y X+C .. . .. . D : X+Y .. . .. . Where operator : evaluate the expression at the latest Time . Comment : I m not sure what you re asking . You describe a problem state that it can be solved in C++0x with auto and then ask if it can be solved in C++0x .. . Answer : I don t understand your question . auto is going to be reused in C++0x for automatic type-inference http : en.wikipedia.org wiki C 2B 2B0x Type 5Finference . I personally see this as a drawback for expression-templates since they often relay on having a smaller life span than the objects they are built upon which can turn out to be false if the expression template is captured as I explain here http : stackoverflow.com questions 1155389 c0x-concepts-are-gone-which-other-features-should-go-too 1157486 1157486 .", "Question : What are good introductions to the creation of C++ expression template systems I would like to express arithmetic on user-defined-types while avoiding temporary values which may be large and to learn how to do this directly rather than applying an existing library . I have found Todd Veldhuizen s original paper http : eprints.kfupm.edu.sa 40035 1 40035.pdf and an example from the Josuttis C++ Templates book http : www.josuttis.com tmplbook exprtmpl exprmain.cpp.html and an article by Kreft Langer http : www.angelikalanger.com Articles Cuj ExpressionTemplates ExpressionTemplates.htm . It is mentioned in Lecture 6 of a course on Modern C++ http : www.cs.aau.dk nesotto modern cpp 2008.html referring back to Josuttis.The POOMA library background http : www.nongnu.org freepooma tutorial background.html introduces expression-templates nicely . I am looking for simple clear expositions . Comment : Boost lambda library seems to use this technique . From my experience it is very cumbersome to use and still has lots of limitations I wouldn t be surprised if there were no simple explanations of how this works too . Comment : boost : : lambda has a different purpose than expression-templates . .. . Answer : I found Expression Templates Demystified http : shoddykid.blogspot.com 2008 07 expression-templates-demystified.html to be fairly well explained . It starts off by showing how to implement mathematical-expressions without templates and shows the basic building blocks and concepts . The second part of the article shows how to refactor the initial implementation to use templates instead for improved performance and reduced code . IMO the article is a good alternative to the expression template chapter in C++ Templates : The Complete Guide .", "Question : Somehow inspired by the expression template code in Expression templates and C++11 http : stackoverflow.com questions 11809052 expression-templates-and-c11 11812468 11812468 written by Paul Preney I decided to test the following : .. . .. . Then I used it to produce an instance of X const vector int and X vector int as follows : .. . .. . The output is : .. . .. . which shows that the life-time of the temporary vector int 5 6 7 8 is not being extended and the rvalue-reference member X : : t binds to something else . Okay from this answer What is the lifetime of the class data member which const reference to a rvalue http : stackoverflow.com questions 6715370 what-is-the-lifetime-of-the-class-data-member-which-const-reference-to-a-rvalue I know this is the expected behaviour . However the question here is : what is different in Paul Preney code in Expression templates and C++11 http : stackoverflow.com questions 11809052 expression-templates-and-c11 11812468 11812468 that permits the temporary vectors to exist as long as the rvalue-references members exist See his Case 2 where temporaries are created . Apparently the same construct there is used here but I am probably missing something . .. . .. . Edit : Based on the answer of R . Martinho Fernandes below I tried the following : .. . .. . and it turns out that this is a valid code that outputs : .. . .. . Therefore apparently references stored in the expression template is not dangling . What is going on here Comment : Nitpick : in the constructor of X std : : forward T is just a verbose way of saying std : : move . decltype std : : forward T t is also a very verbose way of saying T . .. . Answer : what is different in Paul Preney code in Expression templates and C++11 that permits the temporary vectors to exist as long as the rvalue-references members exist Nothing permits such a thing . The temporary vectors there exist until the end of the full expression as any other temporary that isn t bound to a local reference variable . That is enough in Paul s code because the code immediately materialises the expression tree into an actual math vector and the temporaries are not needed anymore after that . Paul s code does not store any expression template node math vector expr anywhere while your code stores one X as x2 . That s a known issue with auto : it does the wrong thing when you are using expression-templates because it results in storing the expression tree which is likely to contain references that will become dangling right away . In order to make it totally clear the following is fine . The following is not fine . Comment : @Martinho please have a look at my edit . It turns out that your second snippet is a valid code and I can even access the references in the expression template and print their contents . Comment : @Allan yes it is valid in the sense that it compiles . But it isn t guaranteed to work . That you can print the contents is an accident . Sometimes it can appear that you can still access dangling references but that s only because you were un lucky : the behaviour is undefined and it is likely to stop working with minor changes or different compiler-flags or versions . It happened that you could print those for reasons similar to those explained here : stackoverflow.com questions 6441218 http : stackoverflow.com questions 6441218 can-a-local-variables-memory-be-accessed-outside-its-scope 6445794 6445794 Comment : Thanks for the clarification .", "Question : I want to use expression-templates to create a tree of objects that persists across statement . Building the tree initially involves some computations with the Eigen linear-algebra library . The persistent expression template will have additional methods to compute other quantities by traversing the tree in different ways but I m not there yet . To avoid problems with temporaries going out of scope subexpression objects are managed through std : : unique-ptr . As the expression tree is built the pointers should be propagated upwards so that holding the pointer for the root object ensures all objects are kept alive . The situation is complicated by the fact that Eigen creates expression-templates holding references to temporaries that go out of scope at the end of the statement so all Eigen expressions must be evaluated while the tree is being constructed . Below is a scaled-down implementation that seems to work when the val type is an object holding an integer but with the Matrix type it crashes while constructing the output xpr object . The reason for the crash seems to be that Eigen s matrix product expression template Eigen : : GeneralProduct gets corrupted before it is used . However none of the destructors either of my own expression objects or of GeneralProduct seems to get called before the crash happens and valgrind doesn t detect any invalid memory accesses . Any help will be much appreciated I d also appreciate comments on my use of move constructors together with static inheritance maybe the problem is there somewhere . Comment : Why not derived ptr derived ptr A o default MSVC Comment : Lifetime issues with your . The Eigen expression-templates presume that they will be assigned to a sink type like matrix before any temporary object generated along the way goes out of scope . However return a b will end the scope of any temporary objects on the return and instead return a copy of it Some way to ensure that all temporary objects created persist until you reach the sink type is required . As utter insanity continuation passing style where you use auto tmp a b then pass that to a continuation Comment : Move constructor : Probably because I m not familiar enough with the new C++ features . But I m trying . : .. . Answer : Your problem appears to be that you are using someone else s-expression templates and storing the result in an auto . This happens in product xpr A : : operator where you call which if I read it right is an Eigen multiplication that uses expression-templates . Expression templates are often designed to presume the entire expression will occur on a single line and it will end with a sink type like a matrix that causes the expression template to be evaluated . In your case you have a b expression template which is then used to construct an expression template return-value which you later evaluate . The lifetime of temporaries passed to in a b are going to be over by the time you reach the sink type matrix which violates what the expression-templates expect . I am struggling to come up with a solution to ensure that all temporary objects have their lifetime extended . One thought I had was some kind of continuation passing style where instead of calling : .. . .. . you do .. . .. . replace .. . .. . with .. . .. . where the next step is passed to each sub-expression . This gets trickier with binary expressions in that you have to ensure that the evaluation of the first expression calls code that causes the second sub expression to be evaluated and then the two expressions are combined all in the same long recursive call stack . I am not proficient enough in continuation passing style to untangle this knot completely but it is somewhat popular in the functional-programming world . Another approach would be to flatten your tree into a tuple of optionals then construct each optional in the tree using a fancy operator and manually hook up the arguments that way . Basically do manual memory-management of the intermediate values . This will work if the Eigen expression-templates are either move-aware or do not have any self-pointers so that moving at the point of construction doesn t break things . Writing that would be challenging . Comment : Thanks for tracking down the root cause of the corruption and the excellent suggestions I m just reading up on continuation passing style will come back when I ve thought about it for a while . Comment : Continuation passing style works . See my answer for full code .", "Question : null .. . Answer : I am writing a C++ library in which I use functions that take as parameters expression-templates in Eigen3 . Basically the definitions of my functions are similar to .. . .. . The input parameter looks a bit strange at a first sight but what it really does is that it allows to use expression-templates . For example I can use the function like .. . .. . The type of the above argument is some very-very-long-to-spell-here template type an expression template and not a plain matrix . Such expression-templates allow for speed optimizations etc so I really need to use them . Now comes my question : .. . .. . I have quite a few of these functions and whenever I instantiate them with different expressions the compiler generates an instantiation at compile-time hence the compiling time becomes a bit larger . In my case it s still quite ok around 30 seconds on an i5 8GB RAM however I d very much like to reduce the compilation time . Is there any way or any tricks I can use to somehow reduce the compiling time but still to be able to use expression-templates Comment : Are you using pre-compiled headers with the Eigen headers in it Comment : @NeilKirk No I just use standard C++ library headers plus include Eigen Dense Comment : That would be the first thing to try . Put the most commonly used std headers in there and any global library headers used by your project . Comment : @NeilKirk thanks will try after I figure out how to do it Comment : Is 30 seconds per whole project or per file Roughly how many files using this Eigen stuff in your project", "Question : I m trying to profile the expression template similar to the one on the book C++ Template by David Vandevoorde . Below is my theoretical analysis which is probably wrong because the test shows unexpected results . Suppose the test is about : .. . .. . where A B C R are arrays allocated on the heap . The size of the array is 2 . So the following will be executed : .. . .. . with approximately 12 instructions 6 for each . Now if expression template is enabled shown at the very bottom after type deduction is done at compiler time the following will be processed at run time before the identical evaluation is performed as the above one : .. . .. . Therefore there s totaly 2+3 5 instructions before the evaluation which is about 5 5+12 30 of the total instructions . So I should be able to see this overhead especially when the vector size is small . But the result shows that the cost for the two are nearly the same . I iterate the test for 1E+09 times . The assembly codes for the two are the same of course . But I couldn t find the part for this construction part that costs any time or instructions . I don t have a good CS background so this question may be so stupid . But I ve been scratching my head for days on this . So any help is appreaciated --- My expression template --- .. . .. . where traits does nothing but to decide if the value of the reference of the object should be taken . For example the value is copied for an integer but the reference is taken for an array . Comment : I may be missing something but what is the expression template you are referring to It seems like you are assuming some library but unless we know which one any speculation is completely arbitrary . Nevertheless if you assign the expression template to an actual value R is supposed to be an array on the heap it must of course be resolved.. . Comment : @gha.st I mean the classic expression template similar to that on the book C++ Template . I ll update my question . Thanks BTW what do you mean by saying resolved Comment : The operations need to be actually performed . To get R 0 right you need to perform A 0 + B 0 + C 0 and if you only have 2-operand addition then two adds are the only reasonable way to do it And it quite frankly does not matter the least how those additions come to take place . Comment : Nevertheless if you want any sensible answer you need to give a complete example that other people can actually compile and look at themselves . Comment : OMG you mean THE classic expression template Never heard of it . .. . Answer : My home brewed test . Ideally expression-templates save the extra allocations required by temporary vectors in the naive case . expr.cpp : .. . .. . vala.cpp : .. . .. . Command line : .. . .. . With optimizations : .. . .. . Massive improvement with expression-templates because it avoids extra vector allocations .", "Question : Expression templates are often used as an optimization technique to avoid the creation of temporary objects . They defer constructing the complete object until the template is used in an assignment or initialization . This finds use in string builders linear-algebra packages etc . To avoid expensive copies the expression template class can capture the bigger arguments by reference . I ll use Qt s QStringBuilder as an example . It works when the references outlive the expression template : .. . .. . The conversion and resolving of the expression template happens at the assignment . The string temporaries outlive the assignment . Alas we run into trouble as soon as the expression template type is inferred instead of the target type : .. . .. . And also : .. . .. . One solution is for the builder to hold copies of objects . Since QString s here are implicitly shared their copying is cheap although still more expensive than holding a reference . Suppose though that the arguments were std : : string : you d definitely not want to copy them unless necessary . Is there any technique that could be used to detect that a complete template expression is not immediately resolved and must copy the data is thus far only held a reference to Note : I m not asking about any particular existing implementation of expression-templates . I only use QStringBuilder as a motivating example . This isn t a Qt question or an eigen question etc . The title is the question pretty much . Comment : Duplicate of stackoverflow.com questions 32476634 http : stackoverflow.com questions 32476634 how-to-prevent-qstringbuilder-from-outliving-the-scope-it-was-initialised-in Not flagged just asking Comment : @SimonKraemer Since my question didn t get much attention and this one is better phrased and may actually result in an answer I d leave it as is . Comment : @sjdowling I just wanted to make sure that this question covers the same issue or vice versa . Comment : This question asks how to design a template expression system to avoid the issue . The other question asks why the problem is there in the first place and whether it s supposed to be there . Those are different things . Comment : Maybe I can raise some hope.. . We can wrap the argument in an object which detects deletion . In your FAILS case the arguments are deleted after initializing foo . This could invoke the creation of a copy of the wrapped object and replace itself within the builder . For this the wrappers need to be made known with the builder when constructing the builder . I hope you understand my coarse idea.. . I m currently experimenting with it and will come back afterwards . .. . Answer : Is there any technique that could be used to detect that a complete template expression is not immediately resolved and must copy the data is thus far only held a reference to That happens mainly when you copy the Builder so you may manage that in your copy-constructor : .. . .. . but it still fails when you extend life of temporary using const reference Comment : Part of my motivation was that even copying isn t a sure bet . Due to RVO and NRVO no copies will be made within a lambda : return Expr hello + Expr world .. . Even if you do have a copy-constructor with serious side effects . Comment : Right point for custom implementation of copy-constructor but as deleted constructors avoid RVO so this part is still viable .", "Question : I m writing a library that uses expression-templates with CRTP . The source files can be found here : https : github.com mspraggs pyQCD tree master lib include base .. . .. . The expression-templates are based on the example given in the Wikipedia article on the subject . I list the code here in case the Wiki article changes in future : .. . .. . What I want to do is add another expression template that allows assignment to part of the original template object the Vec class in the code above and the LatticeBase class in the code I ve linked to . Possible usage : .. . .. . So I d create a new function Vec : : head that would a return an expression template for a portion of the Vec object . I don t know how this would fit into the framework I currently have . In particular I have the following questions comments : .. . .. . 1 . I ve seen examples of what I want to achieve in expression-templates that don t use CRTP . What do I gain by using CRTP in this case Is there any point Should I ditch it and follow the other examples I ve found 2 . In the current framework the assignment to the data member in the Vec class is handled by a copy-constructor in the Vec class . This won t work if I want to use the expression template returned by Vec : : head since the assignment happens within the class that holds the data not the expression template . 3 . I ve tried creating an assignment-operator within the new expression template but that won t work with the code above as all the expression template members are const references and so the assignment-operator is deleted at compile-time . Can I just switch the members to being values instead of references Will this impact on performance if additional storage is needed Will this even work if I change a stored copy of the expression rather than the expression itself Overall I m confused about how to go about adding an expression template that can be used as an lvalue in the code above . Any guidance on this would be greatly appreciated . .. . Answer : Try this : Comment : Thanks This works well in most cases but if I want to do something like vec1.head 2 vec2.head 2 then compilation fails with error : non-static reference member Vec VecHead : : e can t use default assignment-operator . Sorry I didn t make this use-case clear in the title . Comment : Hmm I just tried this on vc12 and it works . What compiler are you using I ve added the test case to the example . Does this cover your case If not can you post the code Comment : I m using gcc 4.8.2 . I think gcc is suggesting that because the VecHead class contains a reference member the default assignment-operator cannot be used since the default assignment-operator is deleted by gcc when you have reference members I think . Comment : VecHead defines an assignment-operator which should cover this case . Hmm.. . Comment : Ah I got it I needed to define a second assignment-operator specifically with VecHead as the argument . I ll add this to your solution and mark the question answered .", "Question : I want to use expression-templates to create a tree of objects that persists across statement . Building the tree initially involves some computations with the Eigen linear-algebra library . The persistent expression template will have additional methods to compute other quantities by traversing the tree in different ways but I m not there yet . To avoid problems with temporaries going out of scope subexpression objects are managed through std : : unique-ptr . As the expression tree is built the pointers should be propagated upwards so that holding the pointer for the root object ensures all objects are kept alive . The situation is complicated by the fact that Eigen creates expression-templates holding references to temporaries that go out of scope at the end of the statement so all Eigen expressions must be evaluated while the tree is being constructed . Below is a scaled-down implementation that seems to work when the val type is an object holding an integer but with the Matrix type it crashes while constructing the output xpr object . The reason for the crash seems to be that Eigen s matrix product expression template Eigen : : GeneralProduct gets corrupted before it is used . However none of the destructors either of my own expression objects or of GeneralProduct seems to get called before the crash happens and valgrind doesn t detect any invalid memory accesses . Any help will be much appreciated I d also appreciate comments on my use of move constructors together with static inheritance maybe the problem is there somewhere . Comment : Why not derived ptr derived ptr A o default MSVC Comment : Lifetime issues with your . The Eigen expression-templates presume that they will be assigned to a sink type like matrix before any temporary object generated along the way goes out of scope . However return a b will end the scope of any temporary objects on the return and instead return a copy of it Some way to ensure that all temporary objects created persist until you reach the sink type is required . As utter insanity continuation passing style where you use auto tmp a b then pass that to a continuation Comment : Move constructor : Probably because I m not familiar enough with the new C++ features . But I m trying . : .. . Answer : Continuation passing style suggested by Yakk http : stackoverflow.com a 29680090 2575705 solves the problem and isn t too insane not more insane than template metaprogramming in general anyhow . The double lambda evaluation for the arguments of binary expressions can be tucked away in a helper function see binary cont in the code below . For reference and since it s not entirely trivial I m posting the fixed code here . If somebody understands why I had to put a const qualifier on the F type in binary cont please let me know . Comment : Walking through what happens on a simple a b might give some confidence that lifttimes are properly guaranteed . I cannot track down all of the calls made on my phone not enough screen space . Comment : On your phone : Do you have any suggestion how I can find out when my objects disappear short of breaking on every destructor in the program I usually miss the problem even in the debugger before I see actual corrupted memory and then it s too late . I m struggling with a similar problem now again.. .", "Question : What are good introductions to the creation of C++ expression template systems I would like to express arithmetic on user-defined-types while avoiding temporary values which may be large and to learn how to do this directly rather than applying an existing library . I have found Todd Veldhuizen s original paper http : eprints.kfupm.edu.sa 40035 1 40035.pdf and an example from the Josuttis C++ Templates book http : www.josuttis.com tmplbook exprtmpl exprmain.cpp.html and an article by Kreft Langer http : www.angelikalanger.com Articles Cuj ExpressionTemplates ExpressionTemplates.htm . It is mentioned in Lecture 6 of a course on Modern C++ http : www.cs.aau.dk nesotto modern cpp 2008.html referring back to Josuttis.The POOMA library background http : www.nongnu.org freepooma tutorial background.html introduces expression-templates nicely . I am looking for simple clear expositions . Comment : Boost lambda library seems to use this technique . From my experience it is very cumbersome to use and still has lots of limitations I wouldn t be surprised if there were no simple explanations of how this works too . Comment : boost : : lambda has a different purpose than expression-templates . .. . Answer : I suggest reviewing the Boost Operators at Boost Operators - Arithmetic http : www.boost.org doc libs 1 42 0 libs utility operators.htm arithmetic . These are templated methods that extend fundamental arithmetic and comparison operations .", "Question : I have a project in C++ using marray https : github.com bjoern-andres marray library . For now it compiles and runs quite fine with MinGW g++ 4.7 and msvc2010 on Windows 7 x64 and also with g++ 4.7 on Linux Mint x64 . I decided to give a try to Intel C++ compiler v . 12.1.4 for Linux . It was able to compile the code but when it tries to execute any line bothering expression-templates like c a + b where all three terms are matrices it breaks down with segmentation-fault . This issue affects both debug and release versions of the app . I also tried to compile unit tests and tutorial code for marray library and again Intel C++ compiles the code but fails to run it if it has any expression-templates . Is Intel C++ really as bad with deep templates or am I missing something Do I need to set any special compiler-flags to make template expressions work Or maybe it is just something wrong with the particular library I m using not the expression-templates technique in general I also tried to set the -ftemplate-depth- n flag using a wide variety on n up to ridiculously large values of 10 10 and still had no luck in running neither my app nor marray unit tests tutorial without the segmentation-fault . Upd . : Here is the gdb log for tutorial-marray from the mentioned library compiled with icpc in debug mode . Looks like the problem doesn t originate from the expression template technique in general array arithmetics with numbers works fine . The problem arises when I m trying to add one array to another . Upd . 2 : Actually the whole thing looks quite like the problem mentioned here http : stackoverflow.com questions 9738975 crtp-compiler-dependent-issue-with-expression-template . The solution should be in rewriting operator E return static-cast this into something like E get ref return static-cast this and the same thing for const reference . And of course change the usage of these things within the code . Will try it as soon as I can and report the results . Comment : Could you provide sample code Comment : I provided a link-to marray https : github.com bjoern-andres marray it has a tutorial.cxx file which can serve as a sample code especially as long as it shares the same issue with Intel compiler as my own code . Comment : @Dmitry if tutorial.cxx segfaults can you show us where Comment : @Drew Added a gdb log Comment : Added a link http : stackoverflow.com questions 9738975 crtp-compiler-dependent-issue-with-expression-template to a problem which looks similar where a workaround was found . Will try this as soon as I can which is not too soon unfortunately and get back with the report . .. . Answer : The problem is similar to the one reported here http : stackoverflow.com questions 9738975 crtp-compiler-dependent-issue-with-expression-template . The actual reason of the issue is that the code generated by Intel C++ compiler handles expressions like this : .. . .. . as recursive calls of this operator . A simple workaround is to change the operator into method like .. . .. . The drawback is that you have to change every line of code which used that operator . Fortunately it wasn t too hard with the mentioned marray https : github.com bjoern-andres marray library so now both my app and the tutorials and unit tests of that library work like a charm with Intel C++ compiler . Comment : Very nice It would be great if you could contribute the compiler-specific code to Marray on github https : github.com bjoern-andres marray ideally using the pre-compiler to identify Intel s C++ compiler . Comment : It would be an honour to me as my first contribution to open-source project So ok I will do this in a couple of days . I also use some other modifications for your wonderful library a little bit of performance improvement and OpenMP support . Can contribute it as well if needed separately from Intel C++ fix . Comment : great I had the similar issue and been looking for the solution for a long time .", "Question : What are good introductions to the creation of C++ expression template systems I would like to express arithmetic on user-defined-types while avoiding temporary values which may be large and to learn how to do this directly rather than applying an existing library . I have found Todd Veldhuizen s original paper http : eprints.kfupm.edu.sa 40035 1 40035.pdf and an example from the Josuttis C++ Templates book http : www.josuttis.com tmplbook exprtmpl exprmain.cpp.html and an article by Kreft Langer http : www.angelikalanger.com Articles Cuj ExpressionTemplates ExpressionTemplates.htm . It is mentioned in Lecture 6 of a course on Modern C++ http : www.cs.aau.dk nesotto modern cpp 2008.html referring back to Josuttis.The POOMA library background http : www.nongnu.org freepooma tutorial background.html introduces expression-templates nicely . I am looking for simple clear expositions . Comment : Boost lambda library seems to use this technique . From my experience it is very cumbersome to use and still has lots of limitations I wouldn t be surprised if there were no simple explanations of how this works too . Comment : boost : : lambda has a different purpose than expression-templates . .. . Answer : You should get a copy of C++ Templates : The Complete Guide http : rads.stackoverflow.com amzn click 0201734842 . The code example to which you link doesn t have the accompanying text which is quite helpful the chapter on expression-templates is 22 pages long . Without the text all you have is code without any comments or explanation as to what it does and how and why it does it . Comment : Vandevoorde and Josuttis have the only really complete description . The topic is never going to be simple because it s a topic that s both complicated and difficult but they do the best job .", "Question : I ve always been under the impression that for any comparison statement i.e . X Y or X Y is the format and you chain statements together with or . Is there not some way to write X Y Z instead of X Y X Z Edit : Since it has been established that this is not possible to do cleanly how else could it be done Comment : You could probably have a variadic function taking the first argument as X and the rest as Y Z etc . Cancels out the operator syntax but still works : if areAllEqual X Y Z A B C Comment : Nice question I was wondering the same thing. . .. . Answer : There might be a way to achieve what you want with expression-templates http : stackoverflow.com a 2598596 819272 . Below a sketch of how to approach this does not compile lots of details missing caveat lector . First you setup a class-template to represent logical values and define some operators over them . Because function-templates can t be partially specialized you delegate your actual work to class templates . Obviously there is a lot of heavy template machinery involved to get natural C++ syntax for what you want . But with a lot of effort and reading up you might eventually get something nice . You d have to define Atomic OpAnd OpOr setup representations holding the first and second branches of subexpression etc . etc . However even if you would succeed you would get really weird semantics in your scheme . What you are proposing is require to be left-distributive over or . I.e . to parse .. . .. . as .. . .. . with @OP equal to or . I think it would be natural to require that remains symmetric . This would require you also to impose right-distributivity of over and . I.e . to parse .. . .. . as .. . .. . However if you combine the two with expression as A @OP1 B C @OP2 D you get logical inconsistencies . E.g . the result is depending on the order in which you apply left-distribution and right-distribution . Left-then-right : .. . .. . Right-then-left : .. . .. . In both cases the same 4 pairs of elements are being compared but the way they are being propagated up the expression tree is subtly different . If @OP1 and @OP2 are the same then you can flatten the entire tree and re-order the terms to get a unique result . it works out OK if you use the same operators on both sides of the because both and are associative as well as commutative . But for mixed operators the resulting expressions will in general be different . UPDATE : as mentioned in the comments to this and other answers you also loose certain properties of built-in types . First the short-circuit rules which are not obeyed by overloaded operators . For logical expressions not involving pointer dereferencing or other resource access if p p- value or if file file.open etc . this would not influence correctness but only efficiency . Otherwise be careful Second it was also mentioned that mixed evaluations of constants expressions would go wrong . This has a simple but verbose fix : simply use std : : integral constant or boost : : mpl : : int as a wrapper . Comment : +1 Very nice and thorough answer . Comment : One very big problem with overloading the logical operators is that you lose the very important property of short-circuiting which you don t mention at all . Comment : @Xeo I didn t mention that because it was a so obvious and b because I thought that the OP was willing to pay that price . Still in e.g . a expression template library for symbolic logic computations the chances of making pointers errors would be very small wouldn t you agree Comment : @Xeo Anyway I updated the answer with your comment . Thanks again .", "Question : I understand that doing something like the following : .. . .. . Will cause a silent runtime-error if the matrix operations use expression-templates such as boost : : ublas http : www.boost.org doc libs 1 49 0 libs numeric ublas doc index.htm . Is there any way of designing expression-templates to prevent the compiler from compiling such code that may result in the use of expired temporaries at runtime I ve attempted unsuccessfully to work around this issue the attempt is here http : ideone.com 7i3yT Comment : If you forbade such binding operator+ expression template const expression template const would not compile either . Comment : @R.MartinhoFernandes : Why must operator+ take its arguments by expression template const I could imagine that operator+ could takes its arguments through some sort of proxy which would still disallow const reference s being unsafely bound to expression-templates . I m not saying it is possible but it is at least not trivially impossible . Comment : @Mankarse You can t mix implicit conversions and template type deduction . Since you have to pick type deduction for operator+ to work the arguments to it have to be the type of the expression template . Unless I m misunderstand what you mean by some sort of proxy Comment : @R.MartinhoFernandes : Fair point . Comment : Please don t write tags in titles . .. . Answer : Is there any way of designing expression-templates to prevent the compiler from compiling such code that may result in the use of expired temporaries at runtime No . This was actually recognized before C++11 s final standardization but I don t know if it was ever brought to the committee s notice . Not that a fix would have been easy . I suppose the simplest thing would be a flag on types that would simply error if auto tries to deduce it but even that would be complex because decltype can also deduce it as well as template argument deduction . And all three of these are defined in the same way but you probably don t want the latter to fail . Just document your library appropriately and hope that nobody tries to capture them that way . Comment : Is there anyway of preventing static-cast T x from being valid if x is a T I ask because named temporaries seem to become T s when used later if they can be prevented from being std : : move d or otherwise converted to T the hole can be closed . Comment : Named temporaries are l-values so they should become l-value references . And if static-cast T wasn t valid for all T s then forwarding and moving would fail . So no there s no way to break forwarding and moving . Again you re going to have to rely on users to not break your code . Or just not use expression-templates .", "Question : Qt s QString s can be concatenated by operator which uses expression-templates to precalculate the resulting string s size and optimize several chained calls to operator+ . See this question of mine http : stackoverflow.com questions 12027977 strange-qt-code-with-strings for more info . Why hasn t std : : basic string adapted a similar construct Is this even allowed per C++11 I see only advantages and clearly ABI compatibility can be broken by library implementors when they want to and C++11 provided a good reason even for libstdc++ . Comment : +1 for interesting question . however i think the answer is trivial : you can implement that yourself . a typical stringbuilder has amortized linear time anyway for a sequence of concatenations . Comment : @Cheersandhth.-Alf that answer is besides the question . The Standard provides optimized algorithms for various types of containers and a stringstream isn t always practical in code where operator+ makes more sense . Comment : uhm i mostly use a thingy which delegates to + on a string and supports syntax like S A 6 7 . but that s mostly because i just feel that a stringstream would be too inefficient . i haven t even measured.. . Comment : Also note that while efficient string-concatenation is something that would be proposed the exact form of that might not be expression-templates . For example concat a b c d to me makes more sense than a b c d --in particular I dislike operator overloads when the domain does not have a clear meaning of what the operation is . What is the modulo of two strings The characters left after removing the second string from the first one as many times as possible Comment : @DavidRodr guez-dribeas +1 Perfect argument . I hate it when vector libraries redefine modulo to mean a cross product . .. . Answer : Because nobody proposed it for the standard unless someone proposes something it doesn t get in . Also because it could break existing code if they use operator+ that is . Also expression-templates don t work well in the presence of auto . Doing something as simple as auto concat str1 str2 can easily be broken . Hopefully this is an issue that C++17 will resolve via some means . Comment : how would auto be broken with expression-templates Comment : @rubenvb : auto causes the same trouble for expression-templates as for any other transparent wrapper : It will deduce concat s type to be the same as the expression template wrapper and not a std : : string . Comment : @rubenvb : What is the type of str1 str2", "Question : in C++ Template Metaprogramming : Concepts Tools and Techniques from Boost and Beyond .. . .. . .. . One drawback of expression-templates is that they tend to encourage writing large complicated expressions because evaluation is only delayed until the assignment-operator is invoked . If a programmer wants to reuse some intermediate result without evaluating it early she may be forced to declare a complicated type like : .. . .. . or worse . Notice how this type not only exactly and redundantly reflects the structure of the computationand so would need to be maintained as the formula changes but also overwhelms it This is a long-standing problem for C++ DSELs . The usual workaround is to capture the expression using type-erasure but in that case one pays for dynamic dispatching . There has been much discussion recently spearheaded by Bjarne Stroustrup himself about reusing the vestigial auto keyword to get type deduction in variable declarations so that the above could be rewritten as : .. . .. . This feature would be a huge advantage to C++ DSEL authors and users alike.. . .. . .. . Is it possible to solve this problem with the current c++ std . non C++0X .. . .. . For Example i want to write a Expression like : .. . .. . Expr X Y .. . .. . Matrix A B C D .. . .. . X A+B+C .. . .. . Y X+C .. . .. . D : X+Y .. . .. . Where operator : evaluate the expression at the latest Time . Comment : I m not sure what you re asking . You describe a problem state that it can be solved in C++0x with auto and then ask if it can be solved in C++0x .. . Answer : For now you can always use BOOST AUTO http : www.boost.org doc libs 1 5F40 5F0 doc html typeof refe.html typeof.auto in the place of C++0x s auto keyword to get intermediate results more easily . Comment : Ahh cool . I searched this in Boost but i didn t find it. . Thanx . Comment : Glad to help . Feel free to +1 or select as your answer :" ] }
[ "yes-answer-long", "yes-answer-short" ]
templates
UNK_RELATION
browser-link@ide@70
browser-link -- browser-link is a channel between your visual-studio @placeholder and any open browser allowing dynamic data exchange between your web application in visual-studio and the browser .
{ "confidence": [ 75.4912109375, 74.95073699951172, 70.00304412841797, 68.19166564941406, 68.19166564941406, 68.19166564941406, 67.78866577148438, 66.38514709472656, 66.06683349609375, 64.37516021728516, 64.26031494140625, 61.68193054199219, 61.03404235839844, 60.170589447021484, 58.908992767333984, 58.50825500488281, 57.960304260253906, 57.42345428466797, 57.39368438720703, 56.88820266723633, 56.700138092041016, 56.5992317199707, 56.580177307128906, 56.35071563720703, 56.35071563720703, 56.234371185302734, 56.234371185302734, 55.95839309692383, 55.80379867553711, 55.492393493652344, 54.15291213989258, 53.52482986450195, 53.291282653808594, 53.189449310302734, 53.06822204589844, 52.95198440551758, 52.85401916503906, 52.20563888549805, 51.987884521484375, 51.98190689086914, 51.832862854003906, 51.60791778564453, 51.556175231933594, 51.520198822021484, 51.456424713134766, 51.40961837768555, 51.37806701660156, 51.37806701660156, 51.043033599853516, 50.21669387817383, 49.12097930908203, 48.619483947753906, 48.50521469116211, 48.285194396972656, 48.285194396972656, 48.285194396972656, 48.285194396972656, 48.285194396972656, 48.285194396972656, 48.285194396972656, 48.14805221557617, 47.99184799194336, 47.82367706298828, 47.41844940185547, 47.41844940185547, 47.412899017333984, 46.759178161621094, 46.49464797973633, 46.49464797973633, 46.37474060058594, 46.37474060058594, 46.37382125854492, 46.336669921875, 46.16035842895508, 46.16035842895508, 46.16035842895508, 46.16035842895508, 46.16035842895508, 46.16035842895508, 46.04402160644531, 45.907108306884766, 45.907108306884766, 45.907108306884766, 45.41345977783203, 45.3046875, 45.220218658447266, 44.82970428466797, 44.80691909790039, 44.45645523071289, 44.41548538208008, 44.353641510009766, 44.230201721191406, 44.095726013183594, 44.095726013183594, 44.095726013183594, 44.095726013183594, 44.095726013183594, 44.095726013183594 ], "content": [ "Browser Link feature is part of visual Studio 2013 .", "However if I open Visual Studio and then open the solution from within Visual Studio Browser Link is enabled .", "A Browser Link connection can be used to execute code inside Visual Studio .", "But as it showed it s the Browser Link from Visual Studio that generates the load .", "I like the inspector feature of Visual Studio 2013 Browser Link .", "It looks like there is a bug in Visual Studio Browser Link functionality .", "Browser Link is connected to Visual Studio from Edge as can be seen in the Browser Link Dashboard in VS . That s all fine .", "Although my Visual Studio browser-link menu picks up that a browser is navigating to the site e.g .", "Visual Studio provides extensibility for Browser Link which Hanselman was sharing .", "Visual Studio has a browser-link feature that causes the web app to poll Visual Studio in case you have changed a file .", "Is there a way to somehow configure Visual Studio Browser Link to refresh the browser when file change happens inside App Data", "See the guide at http : www.asp.net visual-studio overview 2013 using-browser-link for more information .", "Also does Browser Link work in any other browser besides IE", "This forces Visual Studio to use a different port 44398 and from that point on Browser Link started working .", "Web Browser Design Mode for Browser Link is browser independent .", "even Browser Link not show in browser", "Whenever both Visual Studio and my web application are running simultaneously the browser memory usage starts to climb .", "Do you see the the browser-link scripts being rendered in your browser", "I want to disable visual studios browser-link .", "enter image description here http : i.stack.imgur.com x7AR9.png .. . .. . In order to try to enable this option I followed the steps described in the following article : .. . .. . Using Browser Link in Visual Studio 2013 http : www.asp.net visual-studio overview 2013 using-browser-link .. . .. . but they did not make a difference .", "I want to change the default keyboard shortcut Ctrl+Alt+Enter for the Browser Link feature in Visual Studio 2013 http : blogs.msdn.com b webdev archive 2013 06 28 browser-link-feature-in-visual-studio-preview-2013.aspx to another key but i can t find any options in the keyboard list .", "Browser Link one of the new features of Visual Studio 2013 http : weblogs.asp.net jongalloway top-things-web-developers-should-know-about-the-visual-studio-2013-release is replacing the original onbeforeunload event .", "Browser Link works in debugging not simply by running the application .", "I am using Visual Studio 2015 Update 3 and wanting to use the Browser Link feature with my ASP.NET Core v1.0 WebApp project.. . but I can t get Browser Link to work .", "Here s some more information about Browser Link and how to disable it : http : blogs.msdn.com b webdev archive 2013 06 28 browser-link-feature-in-visual-studio-preview-2013.aspx", "How do you enable CTRL key for the Visual Studio Browser Link integration", "I found this http : itq.nl short-visual-studio-2013-browser-link-tip post very useful .", "I updated my project from ASP.NET MVC 4 to 5 in visual-studio-2013 But now Web Essentials Browser Link not work why", "Adding the page inspectors runtime to to web.config might help : link http : stackoverflow.com questions 33579399 browser-link-visual-studio-2013-not-working 37699502 37699502", "Close the Browser Link tab .", "I m having a problem with Browser Link in Visual Studio 2013 - it is only available after unloading and reloading one of the projects within the solution .", "Is it possible to use VS Browser-Link together with a self-hosted web application", "Once I close down either the web application or Visual Studio the memory stops growing and indeed closing Visual Studio often allows the browser to run its garbage-collection and clean up the mess .", "Browser Link should then start working .", "This question http : stackoverflow.com questions 19982892 visual-studio-2013-browser-link-enable-ctrl-to-edit-in-browser resolved my problem - the latest web.config had the value of the vs : EnableBrowserLink key set to false .", "I m taking a look at Visual Studio 2013 Browser Link http : blogs.msdn.com b webdev archive 2013 06 28 browser-link-feature-in-visual-studio-preview-2013.aspx and it seems like there should be other options for the connected browsers like Design Mode and Inspect Mode .", "Browser Link simply tells each of your selected browsers to refresh .", "From what I ve seen it doesn t matter which solution I try whenever I open Visual Studio Browser Link is disabled until I reload a project - it doesn t even need to be a project with Browser Link enabled .", "The browser supports it and I think that the hidden browser-link iisexpress 8", "EDIT I believe now the problem lies in the fact that Visual Studio is not launching the server or whatever it is for the browser to call back to .", "http : blogs.msdn.com b webdev archive 2013 06 28 browser-link-feature-in-visual-studio-preview-2013.aspx .. . .. . This should explain how to turn off browser-link .", "I m looking into whether this actually works with Browser Link .", "Here s Browser Link Dashboard : .. . .. .", "Enable browser-link .. . 4 . run the application .. . .. . disable and enable browser-link http : i.stack.imgur.com BwKYx.png", "I m using visual-studio-2015 update 1 .. . .. . I ve tried running in admin mode and I ve turned firewall off but still no connections in browser-link in visual-studio when running in debug mode .", "I did read the following : .. . .. . http : stackoverflow.com questions 19547744 visual-studio-browser-link-is-grayed-out http : Visual 20Studio 20browser 20link 20is 20grayed 20out .. . .. . but none of the answers resolved my issue .", "But not really missing Browser Link for now .", "There is a bug in Browser Link that is causing this problem .", "When I create a new ASP.NET Core Web Application or load a saved ASP.NET Core Web Application the View in Browser functionality of Browser Link loads a wrong address in the Web Browser .", "To enable it for non-Debug mode http : www.asp.net visual-studio overview 2013 using-browser-link disabling you need to add the following appSettings .. .", "How can I add the Browser-Link feature to my web server", "I found it s possible through Browser Link + Web Essential pressing CTRL + ALT + I or CTRL + ALT + D . Visual Studio will select the corrisponding piece of ASP.NET code that generated the HTML code .", "I m trying to get browser-link working so I can use web-essentials toolbar in the browser .", "In my experience Browser Link does use WebSockets .", "Have you tried this click on browser-link dashboard", "click on browser-link dashboard http : i.stack.imgur.com xJV5n.png", "The only solution I found was to disable Browser Link .", "I know that the Browser-Link uses SignalR .", "Here is the picture of the available options in the Browser Link Menu.. .", "Is Browser Link supported for ASP.NET Core v1.0 projects", "I have enabled browser-link and I can see the Browser Link menu item but the option Refresh Linked Browsers is greyed out .", "If I type the correct address in the browser the Browser Link Dashboard is updated and the application is listed as Unknown .", "Is there a way to run Visual Studio 2013 debug mode with browser-link disabled and still have SignalR work as expected in Chrome or IE", "Is there a way to get Browser Link working with static files under ASP.NET 5", "Or there s always the nuclear option : Disable Browser Link for the entire site with", "I submitted a bug on Microsoft Connect : connect.microsoft.com VisualStudio feedback details 814830 https : connect.microsoft.com VisualStudio feedback details 814830 browser-link-is-disabled-when-the-solution-is-not-opened-from-within-visual-studio-2013", "Here is a link-to a msdn blog what browserlink can do : http : blogs.msdn.com b webdev archive 2013 06 28 browser-link-feature-in-visual-studio-preview-2013.aspx .. . .. . So it help you with the development .", "Browser Link Extensions via Web Essentials http : i.stack.imgur.com Bup3F.png .. . .. . When viewing the site you can use CTRL + ALT + D to enable Design Mode which updates the Visual Studio source .", "I m still lacking the web-essentials design and inspect tools due to browser-link not working but I hope this will-change in future updates to ASP.NET framework and or visual-studio .", "I uncheck option of Enable Browser Link and my application works perfectly .", "1 . simply Disable browser-link .. . 2 . run the application .. . 3 .", "An example message from fiddler : .. . .. . I ve verified the following : .. . .. . Same project works fine on other machines .. . The site itself works on a different port .. . vs : EnableBrowserLink is absent from web.config .. . Browser LInk is enabled .. . debug is set to true .. . The -- Visual Studio Browser Link -- portion is rendered in the page thus confirming even more so that the browser-link is enabled .", "enter image description here http : i.stack.imgur.com e1f5B.jpg .. . .. . But still not working to launch with Browser Link and see the connection in the Browser Link Dashboard .", "Browser Link CTRL Activation http : i.stack.imgur.com k8kvL.png", "I look into firebug and it shows Browser-Link .", "I what are the pros and cons of removing Browser-Link", "BROWSER LINK ISSUE http : i.stack.imgur.com MAxzf.png", "Browsers never appear in Browser Link dashboard .", "There was an issue addressed similar problem with Browser link .", "For an asp.net MVC application I am developing and testing in the latest firefox browser the transport method used by the browser-link connection is longPolling .", "So is it true that Browser link works only for non SSL urls", "The problem is that the URL to the browser-link javascript file is being actively rejected .", "Browser Link is currently restricted to local browsers because of security concerns .", "The content must be passing through the HttpResponse.Filter since that s the only place that Browser Link injects scripts in a WebForms application .", "It is not available in any browser .", "You can try looking at a network trace in Fiddler or your browser tools .", "When the debugger opens the browser open the F12 tools .", "When I run the app pressing F5 the browser-link dashboard doesn t detect any browser .", "Browser-Link is a tool that can speed up development or in your case slow it down and has no influence on the final application .", "I was unable to get Browser Link Web Essentials to work with SSL even with the mentioned remedies .", "thanks i tried to do this but nothing shows that the browser connect to the Browser Link please see the updated Post", "Assuming that we have a browser that supports web sockets and that browser is running on the localhost shouldn t SignalR default to using web sockets", "when you press CTRL+Q and type Browser Link", "Browser Link would rather use a unique ID or class if one exists .", "In my project.json i m importing the Browser Link dependancy .. . .. . My web.config .. . .. . 2 .", "Start Debugging or Start without Debugging both options work with browser-link .", "To be honest I ve never seen a disabled browser-link refresh button .", "This extension adds some features http : vswebessentials.com features browserlink for Browser Link ." ] }
{ "confidence": [ 73.62931823730469, 73.49503326416016, 72.186279296875, 71.98665618896484, 71.57617950439453, 71.39877319335938, 67.5875244140625, 67.33552551269531, 66.4765625, 65.32893371582031, 64.96488189697266, 64.93309783935547, 64.44776916503906, 63.0167121887207, 62.89690399169922, 62.806373596191406, 62.256614685058594, 62.24542236328125, 62.17906188964844, 62.06752014160156 ], "content": [ "Question : Create a web project in Visual Studio 2013 remove all scripts which could interfere and add this : .. . .. . The onbeforeunload event won t fire . However if you open this with Visual Studio 2012 it will work note that to open it with Visual Studio 2012 you shouldn t use ASP.NET MVC 5 . .. . Answer : Browser Link one of the new features of Visual Studio 2013 http : weblogs.asp.net jongalloway top-things-web-developers-should-know-about-the-visual-studio-2013-release is replacing the original onbeforeunload event . Here this is reported for Firefox http : connect.microsoft.com VisualStudio feedbackdetail view 817138 browser-link-script-breaks-onbeforeunload-event-in-firefox although this also happens in other browsers . If you want to work with onbeforeunload event you should disable Browser Link http : stackoverflow.com a 23140874 310276 .", "Question : I updated my project from ASP.NET MVC 4 to 5 in visual-studio-2013 But now Web Essentials Browser Link not work why even Browser Link not show in browser Comment : Browser Link feature is part of visual Studio 2013 . Can you try using browser-link by removing web-essentials from the machine Comment : Whats your error message when you press CTRL+Q and type Browser Link Comment : This question http : stackoverflow.com questions 19982892 visual-studio-2013-browser-link-enable-ctrl-to-edit-in-browser resolved my problem - the latest web.config had the value of the vs : EnableBrowserLink key set to false . Comment : Adding the page inspectors runtime to to web.config might help : link http : stackoverflow.com questions 33579399 browser-link-visual-studio-2013-not-working 37699502 37699502 .. . Answer : Have you tried this click on browser-link dashboard click on browser-link dashboard http : i.stack.imgur.com xJV5n.png", "Question : null .. . Answer : I m having a problem with Browser Link in Visual Studio 2013 - it is only available after unloading and reloading one of the projects within the solution . From what I ve seen it doesn t matter which solution I try whenever I open Visual Studio Browser Link is disabled until I reload a project - it doesn t even need to be a project with Browser Link enabled . I ve tried adding add key vs : EnableBrowserLink value true but that makes no difference . I ve come to the conclusion that it doesn t matter about the web.config settings it is either a bug in Visual Studio 2013 or one of the add-ons is causing the problem . I removed the obvious add-ons but some I don t want to remove just yet like xamarin and ReSharper I tried suspending this but I can try that next week if no other solution works . For the record once I have reloaded a project Browser Link appears to work as expected . Has anyone else had a similar experience Update .. . .. . I ve just discovered that the way I open Visual Studio makes a difference . If I load the solution from the jump-list which is about 95 of the time Browser Link is disabled . However if I open Visual Studio and then open the solution from within Visual Studio Browser Link is enabled . This could still be an add-on issue so to help identify the real problem I would be interested to know if anyone else has experienced a similar problem . Thanks Comment : I submitted a bug on Microsoft Connect : connect.microsoft.com VisualStudio feedback details 814830 https : connect.microsoft.com VisualStudio feedback details 814830 browser-link-is-disabled-when-the-solution-is-not-opened-from-within-visual-studio-2013", "Question : How do you enable CTRL key for the Visual Studio Browser Link integration Scott Hanselman discusses it here around 1 : 06 : 00 http : channel9.msdn.com Events Visual-Studio Launch-2013 Transforming-software-development-in-a-world-of-devices-and-services during the VS 2013 Launch Event http : channel9.msdn.com Events Visual-Studio Launch-2013 . I m not sure how to activate or enable the realtime HTML Edit feature so I can edit in the browser and have the changes pushed back to Visual Studio . Has anyone tried this out yet or can provide clues I have VS 2013 RTM - I can t seem to find any update for ASP.NET Web Tools that may have changed this behavior . Is this an IE only behavior or is it browser independent It sounds like it just injects additional HTML into the page . Browser Link CTRL Activation http : i.stack.imgur.com k8kvL.png Comment : Adding the page inspectors runtime to to web.config might help : link http : stackoverflow.com questions 33579399 browser-link-visual-studio-2013-not-working 37699502 37699502 .. . Answer : According to MSDN Blogs http : blogs.msdn.com b mvpawardprogram archive 2013 11 05 making-web-development-wonderful-again-with-web-essentials.aspx This appears to be a Web Essentials 2013 http : visualstudiogallery.msdn.microsoft.com 56633663-6799-41d7-9df7-0f2a504ca361 extension of Browser Link capability . Visual Studio provides extensibility for Browser Link which Hanselman was sharing . Browser Link Extensions via Web Essentials http : i.stack.imgur.com Bup3F.png .. . .. . When viewing the site you can use CTRL + ALT + D to enable Design Mode which updates the Visual Studio source . Web Browser Design Mode for Browser Link is browser independent . To enable it for non-Debug mode http : www.asp.net visual-studio overview 2013 using-browser-link disabling you need to add the following appSettings .. .", "Question : I m running a web application with models defined in C and views being in HTML5 client-side business logic is JavaScript jQuery . I ve noticed something odd recently . Whenever both Visual Studio and my web application are running simultaneously the browser memory usage starts to climb . It is worse in IE and Chrome but likewise substantial in Firefox all the latest versions of these browsers . Also the memory usage of Visual Studio starts to climb . The CPU usage for the browser hovers in the teens normally hovering around 0 otherwise . Once I close down either the web application or Visual Studio the memory stops growing and indeed closing Visual Studio often allows the browser to run its garbage-collection and clean up the mess . I suspect this has something to do with some sort of background debugging going on . I m surprised that googling this hasn t turned up a similar issue for somebody somewhere in the world and I suspect it s some kind of configuration setting in my IDE . Visual Studio 2013 Premium . I ve reset my settings Tools - Import and Export Settings - Reset all settings with no effect . Building in Release mode likewise seems to have no effect . I ll keep hunting this one down but has anyone here seen anything like this and resolved it edit : I have recently been debugging some dynamic code using the debugger https : developer.mozilla.org en-US docs Web JavaScript Reference Statements debugger keyword . I ve commented that out and am still seeing the same results . But I wonder if there isn t some lingering effect from using this in the first place edit : Updating Resharper from 8.2 to 9.2 didn t help either . edit : Apparently this issue has been seen before and reported http : stackoverflow.com questions 24579499 visual-studio-2013-update-2-maxes-out-core 27521171 27521171 if you just know what to google for . Comment : Visual Studio has a browser-link feature that causes the web app to poll Visual Studio in case you have changed a file . Could it be that In my VS there is a small refresh icon in the debug menu with a drop down . In there you can disable this feature . Comment : I ll take a look in a bit and let you know . Right now I ve just updated my Resharper version on a suggestion from a colleague . Ah the fun of chasing down memory leaks... . Comment : @NigelEllis Would you mind moving your comment to an answer That solved it . This must have accidentally gotten enabled . .. . Answer : Visual Studio has a browser-link feature that causes the web app to poll Visual Studio in case you have changed a file . In VS there is a small refresh icon in the debug menu with a drop down . In there you can disable this feature .", "Question : null .. . Answer : I have enabled browser-link and I can see the Browser Link menu item but the option Refresh Linked Browsers is greyed out . enter image description here http : i.stack.imgur.com x7AR9.png .. . .. . In order to try to enable this option I followed the steps described in the following article : .. . .. . Using Browser Link in Visual Studio 2013 http : www.asp.net visual-studio overview 2013 using-browser-link .. . .. . but they did not make a difference . To clarify based on the advise given in the article : .. . .. . To enable Browser Link set debug true in the compilation element in the project s Web.config file . We have debug true set in the web.config file . The application must be running on localhost . The app is running in IIS on my PC . The application must target .NET 4.0 or later . The target framework for the app is 4.5.2 . Are there other steps I need to take I did read the following : .. . .. . http : stackoverflow.com questions 19547744 visual-studio-browser-link-is-grayed-out http : Visual 20Studio 20browser 20link 20is 20grayed 20out .. . .. . but none of the answers resolved my issue . Comment : did you ever figure this out I re-installed vs and now opening a asp.net 5 project I cant get that to enable or the ctrl+alt+enter to save and refresh Comment : No I ve not figured out a way to enable that link . This is very annoying since browser-link + Web Essentials ability to inspect web page elements and take me to the cshtml file where that element lives is super handy . Comment : Yes its extremely annoying I have another machine that works just perfectly fine . I am going to completely remove visual-studio and try installing it again hopefully that fixes it . If not I am not even sure where to log this bug either with asp.net group or vs group Comment : It might be worth creating a bug report . You might get a reply which amount to workarounds that you can try which may not be document elsewhere .", "Question : My application was getting freeze for 15secs when it loads first time . I look into firebug and it shows Browser-Link . So I search and found this SO http : stackoverflow.com questions 20187554 javascript-error-in-browser-link post . I uncheck option of Enable Browser Link and my application works perfectly . I what are the pros and cons of removing Browser-Link If I uncheck it Would it stop application working as cross-browser application Pls help I m new in VS2013 . Note : My application must run on any device or browser.. . .. . .. . BROWSER LINK ISSUE http : i.stack.imgur.com MAxzf.png Comment : Browser-Link is a tool that can speed up development or in your case slow it down and has no influence on the final application . .. . Answer : Here is a link-to a msdn blog what browserlink can do : http : blogs.msdn.com b webdev archive 2013 06 28 browser-link-feature-in-visual-studio-preview-2013.aspx .. . .. . So it help you with the development . You can refresh all your browser tabs which have the application open at once . Also you get some live reload features when changing your css for example . If you install the Visual Studip WebEssentials plugin you get tons of nice browserlink features . See the list here : http : vswebessentials.com features browserlink .. . .. . You can inspect for example a dom element from your browser and web-essentials will open the right Razor View . So it is really just a development thingy and has nothing todo with cross-browser compatibility .", "Question : I am trying the Browserlink feature of ASP.NET MVC 5 and everything works great for non SSL pages . But if I navigate to a SSL page with https url I see 0 connections in the Browser link dashboard . So is it true that Browser link works only for non SSL urls Or am I am missing any settings which will allow me to get Browser Link connection for both SSL and Non SSL urls I am testing from IIS .. . Answer : I was unable to get Browser Link Web Essentials to work with SSL even with the mentioned remedies . I was able to find a way however to get it work for me . I am running my app through IIS not express and my app was nested under the default website . When debugging the site I saw that Chrome was dumping a connection error with a URL using port 44399 . Adding a binding for this port for https then allowed the connection to be successful . I also used a local development cert for the SSL Certificate . DISCLAIMER : Visual Studio tries to be your buddy and not use ports that you ve bound to in IIS so once you close and re-open Visual Studio it will likely not use the 44399 port anymore . It looks like it decrements until it finds the next available port . So assuming you re not using 44398 this will be your number . Once you unbind 44399 then close and re-open Visual Studio it will likely rebind to 44399 again . .. . .. . Hopefully this helps some of you out .", "Question : null .. . Answer : Background : .. . .. . Using Visual Studio 2015 ASP.NET Core 1.0 I have created Web Application project . When I run application and go to Chrome Console I have following error : .. . .. . Browser Link : Failed to invoke return-value callback : TypeError : Cannot read property files of null .. . .. . Question : .. . .. . How to fix above error and make Browser Link working Comment : Could you possibly include some code in your question please It is hard to help you if you haven t included some code Comment : Weeeeellll that all depends on the code that s throwing the error . Could you add the offending code to your question Comment : It is the default project I did not make any amends to it . Project did have a lot of files included it is hard for me to find out which is causing a problem . Comment : It looks like there is a bug in Visual Studio Browser Link functionality . Comment : The error in the console ought to tell you where the bug is coming from . Click on the file link-to the right of the error message .", "Question : I m running a web application with models defined in C and views being in HTML5 client-side business logic is JavaScript jQuery . I ve noticed something odd recently . Whenever both Visual Studio and my web application are running simultaneously the browser memory usage starts to climb . It is worse in IE and Chrome but likewise substantial in Firefox all the latest versions of these browsers . Also the memory usage of Visual Studio starts to climb . The CPU usage for the browser hovers in the teens normally hovering around 0 otherwise . Once I close down either the web application or Visual Studio the memory stops growing and indeed closing Visual Studio often allows the browser to run its garbage-collection and clean up the mess . I suspect this has something to do with some sort of background debugging going on . I m surprised that googling this hasn t turned up a similar issue for somebody somewhere in the world and I suspect it s some kind of configuration setting in my IDE . Visual Studio 2013 Premium . I ve reset my settings Tools - Import and Export Settings - Reset all settings with no effect . Building in Release mode likewise seems to have no effect . I ll keep hunting this one down but has anyone here seen anything like this and resolved it edit : I have recently been debugging some dynamic code using the debugger https : developer.mozilla.org en-US docs Web JavaScript Reference Statements debugger keyword . I ve commented that out and am still seeing the same results . But I wonder if there isn t some lingering effect from using this in the first place edit : Updating Resharper from 8.2 to 9.2 didn t help either . edit : Apparently this issue has been seen before and reported http : stackoverflow.com questions 24579499 visual-studio-2013-update-2-maxes-out-core 27521171 27521171 if you just know what to google for . Comment : Visual Studio has a browser-link feature that causes the web app to poll Visual Studio in case you have changed a file . Could it be that In my VS there is a small refresh icon in the debug menu with a drop down . In there you can disable this feature . Comment : I ll take a look in a bit and let you know . Right now I ve just updated my Resharper version on a suggestion from a colleague . Ah the fun of chasing down memory leaks... . Comment : @NigelEllis Would you mind moving your comment to an answer That solved it . This must have accidentally gotten enabled . .. . Answer : Did you trying running the application without debugging Ctrl+F5 .. . .. . To enable VS debug the browser more info is needed specifically things like scripts and eval code are needed even after use . So running the browser with debugging enabled will use more memory and cause memory to grow with time .", "Question : I have created an empty asp mvc 6 project and added a index.html and a styles.css file . If i make changes to the stylesheet the browser does not get the newly created style only if I reload the page does it work . If i press ctrl to get the browserlink options nothing happens there is no toolbar in the bottom left hand corner . I am using IIS Express with the browserlink option enabled use ctrl f5 run without debugging . .. . Answer : You still need to press the refresh button in Visual Studio to reload the page . Browser Link simply tells each of your selected browsers to refresh . It doesn t make it happen automatically while you make changes . Also you need to be debugging . Browser Link works in debugging not simply by running the application . See the guide at http : www.asp.net visual-studio overview 2013 using-browser-link for more information . Update .. . .. . Looks like you ll need to edit your app s config.json file takes the place of web.config in ASP 5 : .. . .. . Update 2 .. . .. . If you re using an appsettings.json file you don t need the AppSettings wrapper object : .. . .. . For more information see the official documentation for configuration in ASP 5 at http : docs.asp.net en latest fundamentals configuration.html Comment : I am not getting any current connections from browserlink even when i am running in debug mode . I never needed to run in debug mode with asp 4.5 . The thing is asp 5 mvc6 does not have a web.config file . Should i maybe just try to get browser-sync to work instead through gulp Comment : My mistake you ll need to add config.json in the place of web.config . I m looking into whether this actually works with Browser Link . Comment : I hope i can still use is . Its a was a lot easier to setup then browser-sync which is also not working even if i run it through a node server Comment : Updated - try this : Comment : Thank you May i ask how you came to the solution", "Question : null .. . Answer : We have a web application that uses SignalR to send messages to the client . While running the application in Visual Studio 2013 debug mode with browser-link disabled in Chrome and IE we find that the SignalR hub appears to connect but does not appear instantiate the information needed for a client to receive the servers sent messages . When we stop the server the Chrome client starts throwing console.log errors that SignalR cannot connect to the server . Firefox appears unaffected by this problem and works as expected with SignalR while debugging with browser-link disabled . Browser link uses SignalR to work its debug magic but it can be a little bit intrusive when trying to debug javascript so we have browser-link disabled . When running the application without Visual Studio debug the SignalR client works fine in Chrome . Is there a way to run Visual Studio 2013 debug mode with browser-link disabled and still have SignalR work as expected in Chrome or IE", "Question : I m trying to launch my web application asp.net MVC with debugging mode using Browser Link To Enable Edit Operations during Browser .. . .. . but actually when i try to do this Browser Link Not Working and it ask me to register the page-inspector in the Web.Config .. . .. . enter image description here http : i.stack.imgur.com Lf3DR.png .. . .. . .. . .. . Edit .. . .. . and when i add the following to web.config nothing Happens .. . .. . still i can t see that any browser connect through Browser Link .. . .. . with knowledge that I Have Enabled debug true in web.config .. . .. . and knowing that i have uninstall web-essentials Package .. . .. . enter image description here http : i.stack.imgur.com 6eNhX.png .. . Answer : I found this http : itq.nl short-visual-studio-2013-browser-link-tip post very useful . Take care in that the modules element might already exist .", "Question : I understand that browserlink uses SignalR to create an open connection to Visual Studio 2013 . For an asp.net MVC application I am developing and testing in the latest firefox browser the transport method used by the browser-link connection is longPolling . I am curious why the transport method is not promoted to a WebSocket connection . .. . Answer : For the the BrowserLink feature to support WebSockets you should be using Windows 8 or Windows Server 2012 . You can get more details about this from this http : stackoverflow.com a 21706524 413736 answer .", "Question : my issue is BrowserLink never connects to my Browser in Browser Link Dashboard .. . .. . i m using Visual Studio 2013 Prem Update 5 on a Win10 machine .. . project is a MVC 5 application .. . Browser is IE11.212.10586.0 .. . .. . BL is activated in the dropdown of the refreshbutton .. . .. . From here when i run my app on IISExpress the BL Dashboard says no connection but in the HTML i can find the script-Tags .. . .. . images i m not rated enaugh to implement in post http : i.stack.imgur.com u77mn.png .. . .. . at least i checked the web and found some web.config parts i should try but that not resolved my issue .. . .. . so i need to change save refresh my page all the time - someone tipps for me what could be wrong Many thanks .. . .. . UPDATE 2016-06-23 .. . .. . The TrafficFiddle by IE10 does not contain a GET Request with BL in URL .. . .. . He does : .. . .. . Get HTML File .. . Load scripts and stuff by bundle.cs .. . load image .. . .. . Additional : Some weired things happen with DOM Explorer . There is only html Head no body is listed or BL scripts when i use inspect element the full DOM do appear .. . .. . DOM displayed initial by browser - weired http : i.stack.imgur.com FrMjQ.png .. . .. . I would guess the browser would stop add stuff into DOM because of any script issue in head - but when i look with inspect at the real DOM there s just the body after the printed DOM - sry not enaugh rep to show a 3rd link : Comment : Is it possible there s a syntax-error somewhere else in the page If Browser Link s script-tag is there then the browser should at least try to fetch the script unless it s not interpreting the tag correctly . Comment : Also does Browser Link work in any other browser besides IE .. . Answer : You can try looking at a network trace in Fiddler or your browser tools . Since the script-tag has been inserted there should be two requests that have browserLink in the URL . The first one gets the Browser Link script and the second one establishes the SignalR connection . If either of those is failing or missing the failure could provide a hint why Browser Link is failing to connect . Comment : Updated original post - thanks for idea but doesent help", "Question : EDIT I believe now the problem lies in the fact that Visual Studio is not launching the server or whatever it is for the browser to call back to . I do not know if this is some service its dependencies or anything else about it Original When running a MVC project in VS 2013 my Browser Link is not working correctly . The problem is that the URL to the browser-link javascript file is being actively rejected . An example message from fiddler : .. . .. . I ve verified the following : .. . .. . Same project works fine on other machines .. . The site itself works on a different port .. . vs : EnableBrowserLink is absent from web.config .. . Browser LInk is enabled .. . debug is set to true .. . The -- Visual Studio Browser Link -- portion is rendered in the page thus confirming even more so that the browser-link is enabled . Read every article on how to use Browser Link - none detail what happens if the connection to the script is refused .. . Same exact problem on all browsers .. . Same exact problem on all web projects I ve tried several even fresh vanilla one .. . Restarting VS computer doesn t fix .. . Running VS as admin doesn t fix .. . Running in Safe Mode doesn t fix .. . Disabling all VS extensions doesn t work .. . Running repair on VS also does not work .. . The port that it s attempting to reach in my example 27244 does not show up at any of the IP addresses in netstat -aon .. . To me this means it fails to start .. . Firewall even the corp one is not blocking any of these ports .. . Procmon and Procexplorer reveal nothing I can understand to be as to why VS is not starting the SignalR process es . A brand-new project w SignalR from NuGet works fine - there must be something different on how VS uses it interally .. . .. . I don t understand how the port it uses is generated but it s different for every project . I understand that Browser Link uses SignalR on the insides but my research on that and connection-refused leads me just enable port 80 which obviously won t help . What else could it be Any ideas Where can I check Comment : Did you get anywhere with this problem I noticed that my BrowserLink also stopped working . I suspect it stopped working with WE 2013.5 update but that s just speculation . Comment : No I haven t . Still struggle with this -- very frustrating .. . Answer : Unfortunately I was unable to pinpoint the exact reason.. . however my problem has been solved . Uninstalling and reinstalling Visual Studio entirely didn t seem to help . What finally seemed to help was assigning port 44399 to a port on my local IIS . This forces Visual Studio to use a different port 44398 and from that point on Browser Link started working . I m left to assume that the SignalR server was unable to start due to that port being inaccessible although I am not sure why .", "Question : I m trying to get browser-link working so I can use web-essentials toolbar in the browser . I d expect to see some code injected at the bottom of the page source for browser-link like in ASP.NET 4 projects but this doesnt seem to be the case with ASP.NET 5 . enter image description here http : i.stack.imgur.com BT1IV.png .. . .. . Has anyone else managed to get this working Thanks in advanced for any help . I m using visual-studio-2015 update 1 .. . .. . I ve tried running in admin mode and I ve turned firewall off but still no connections in browser-link in visual-studio when running in debug mode . Edit .. . .. . This method is definitely being called .. . .. . This nuget-package is definitely refereced Microsoft.VisualStudio.Web.BrowserLink.Loader .. . .. . I ve tried re-installing asp.net 5 rc1 and visual-studio-2015 pro as well as using visual-studio community which doesnt work either . Ive tried reinstalling IIS Express 10 and 8 which also doesn t work . This is beginning to be a real pain . Using the F12 in the browser does the job but its really slow and tedious .. . .. . if anyone can provide a suggestion of something to try to get this working that would be great . I feel i ve exhausted all options . Here is my project.json : .. . .. . Here is my startup.cs .. . .. . Update .. . .. . I ve installed livereload plugin for chrome and configured livereload in gulp as suggested in comment below by vendettamit . Chrome browser is now updating when I modify my CSS Less files . I m still lacking the web-essentials design and inspect tools due to browser-link not working but I hope this will-change in future updates to ASP.NET framework and or visual-studio . my script for gulp-if anyone stumbles across this same issue : Comment : I m not sure if Live reload is shipped with RC version . There was an issue https : github.com aspnet Tooling issues 213 addressed similar problem with Browser link . Mean while you can try this https : github.com vohof gulp-livereload Comment : You can also try the given solution here http : stackoverflow.com questions 33034169 live-reload-with-asp-net-5 but looks like it s manual refresh . Comment : Thanks ill definitely try and get that set up . It would be a lot faster than using the F12 window . The reason i like using web-essentials is because of the design and inspect on the toolbar which requires a connection on browser-link . For some reason i can t get this to work Comment : @vendettamit if you post this as an answer i will mark it as correct . I think the browser-link is an issue with the asp.net 5 framework .. . Answer : I m not sure if Live reload is shipped with RC version . There was an issue addressed similar problem with Browser link . Mean while you can try this https : github.com vohof gulp-livereload chrome plugin for live reload . You can also try the given solution here http : stackoverflow.com questions 33034169 live-reload-with-asp-net-5 but looks like it s manual refresh .", "Question : null .. . Answer : I use VS 2013 with Browser Link to test a site that loads its content from text-files in App Data . The files are actually Markdown files and edited outside of Visual Studio for convenience - I have a grunt watch task that copies the Markdown files from external location to App Data whenever I change them . I d like to take this one step further - whenever there is a change to the Markdown file I also want the browser to reload the page which Browser Link can easily do . Is there a way to somehow configure Visual Studio Browser Link to refresh the browser when file change happens inside App Data Or maybe there s some external API that I could call from my Grunt script to force Browser Link refresh", "Question : Installed Web Essentials in my new computer but I cannot get Browser Link working with ASP.NET 5 MVC6 web Applications projects . Works Fine with ASP.NET 4.5 however . This is what I have tried so far . My project.json has following dependencies already when I create the project .. . .. . My Startup.cs class also already has configured BrowserLink I am running in DEV env .. . .. . I have enabled Browser Link form toolbar .. . .. . Enabled Browser Link from toolbar http : i.stack.imgur.com Hs5cn.png .. . .. . Non worked. . When I run the app pressing F5 the browser-link dashboard doesn t detect any browser . says 0 connections . enter image description here http : i.stack.imgur.com Lrejt.png .. . .. . I have also tried uninstalling Web Essentials and reinstalling . Also tried using Web Essential Nightly build . Re-intalling Visual Studio did not helped either . Anything else that I might be missing I am using VS2015 community on Windows 10 machine . I have another computer with similar setup works fine in that computer . I tried creating project in My other computer where browser-link was working and copied the project to this computer That did not help either . .. . Answer : Do you have the same version of ASP.NET and Web Tools installed on both of the computers You can check in Visual Studio by going to Help- About Microsoft Visual Studio and looking for something like ASP.NET and Web Tools 2015.1 in the Installed Products list . Over time there have been breaking changes in the ASP.NET 5 runtime and the Browser Link support in Web Tools needs to change to keep up . As a result if the Web Tools version doesn t match the version your project is targeting e.g . Beta8 vs . RC1 then Browser Link will fail to connect . That s the most likely reason why it would work on one computer but fail on another . Comment : Yes the version are same in both computers . I currently Have ASP.NET 5 RC1 with Update 1 and Web Essential Version 1.0.27 Comment : Realsed there is a new extension for browser reload on save here : visualstudiogallery.msdn.microsoft.com https : visualstudiogallery.msdn.microsoft.com 46eef4d9-045b-4596-bd7f-eee980bb5450 This extension is also not working for me in the laptop where BrowserLink is not working. . Comment : If you try catching all exceptions when you run your website do you see any with BrowserLink in the callstack", "Question : Just now I tried Browser Link with Firefox 27.0.1 while debugging a simple ASP.NET MVC app . I have Visual Studio Ultimate 2013 Update 1 . Here s Browser Link Dashboard : .. . .. . enter image description here http : i.stack.imgur.com uLKVL.png .. . .. . I tried changing something in a razor view pressed Ctrl+S and went to the browser to see if the page had changed accordingly but.. . .. . .. . this is what i see in Firebug : .. . .. . Then I saw this error : .. . .. . I m running Visual Studio as Administrator . What s the deal and how can I solve this .. . Answer : Turns out it was bug in Visual Studio 2013 Update 1 as Mads Kristensen told me here https : twitter.com mkristensen status 441989185272950784 . So the solution is to go grab Visual Studio 2013 Update 2 CTP 2 http : www.microsoft.com en-us download confirmation.aspx id 42023 ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ide
UNK_RELATION
invokelater@awt@111
invokelater -- a method provided by the swingutilities class in java that executes asynchronously code on the @placeholder event dispatching thread in order to correctly manipulate ui elements .
{ "confidence": [ 41.91075897216797, 39.832374572753906, 38.61079406738281, 36.66915512084961, 35.42634963989258, 33.631656646728516, 33.523651123046875, 32.715492248535156, 32.5228271484375, 32.36732482910156, 31.647876739501953, 31.62485122680664, 31.329635620117188, 30.4896297454834, 30.285280227661133, 30.285280227661133, 29.835918426513672, 29.819355010986328, 29.68437957763672, 29.339786529541016, 29.09375, 29.00171661376953, 28.809803009033203, 28.663192749023438, 28.569141387939453, 28.54867935180664, 28.54867935180664, 28.54867935180664, 28.54867935180664, 27.847450256347656, 27.759143829345703, 27.740203857421875, 27.740203857421875, 27.679973602294922, 27.517396926879883, 27.35050392150879, 27.342430114746094, 27.323978424072266, 27.037609100341797, 26.834251403808594, 26.635618209838867, 26.635618209838867, 26.540355682373047, 26.387718200683594, 26.235149383544922, 26.14569091796875, 26.051921844482422, 25.904701232910156, 25.660057067871094, 25.383928298950195, 25.30997657775879, 25.200151443481445, 24.89289665222168, 24.88566780090332, 24.874156951904297, 24.84880828857422, 24.6708984375, 24.6141357421875, 24.48386573791504, 24.481067657470703, 24.370731353759766, 24.336654663085938, 24.3216609954834, 24.31024169921875, 24.24148941040039, 24.140487670898438, 24.111730575561523, 24.111730575561523, 24.111730575561523, 24.077911376953125, 24.05184555053711, 23.896255493164062, 23.74028778076172, 23.704801559448242, 23.66798973083496, 23.533069610595703, 23.49763298034668, 23.36069679260254, 23.246135711669922, 23.197132110595703, 23.16083335876465, 23.150257110595703, 23.084964752197266, 23.06737518310547, 23.06737518310547, 23.066375732421875, 23.04291534423828, 23.033554077148438, 23.033554077148438, 23.008544921875, 23.008544921875, 23.008544921875, 23.008544921875, 23.008544921875, 23.001483917236328, 22.993358612060547, 22.993358612060547, 22.944509506225586, 22.944509506225586, 22.862852096557617 ], "content": [ "Is there any equivalent of Java s invokeLater method of SwingUtilities in Javascript", "possible duplicate of Java Event-Dispatching Thread explanation http : stackoverflow.com questions 7217013 java-event-dispatching-thread-explanation", "I used thread swingworker swingutilities invokelater .. . .. . but I can t solved .", "invokeLater means that this call will return immediately as the event is placed in Event Dispatcher Queue and run method will run asynchronously.. .", "SwingUtilities.invokeLater will execute the run method inside the event-dispatching thread .", "invokeLater executes the run method the Runnable on the EDT at some point in the future", "That is.. . .. . .. . If invokeLater is called from the event dispatching thread -- for example from a JButton s ActionListener -- the doRun.run will still be deferred until all pending events have been processed .", "This class contain also the main method and now I have 2 doubts : .. . .. . 1 Why in the main method is execute this code : .. . .. . It call the invokeLater method on the SwingUtilities class and pass to it a new Runnable oject .", "I put my update UI code in run method of invokeLater .", "http : stackoverflow.com questions 6567870 what-does-swingutilities-invokelater-do .. . SwingUtilities.invokeLater http : stackoverflow.com questions 7196889 swingutilities-invokelater .. . .. . I have seen this little piece of code hundreds of times : .. . .. . Now my question is : what does invokeLater do", "possible duplicate of Java - Difference between SwingWorker and SwingUtilities.invokeLater http : stackoverflow.com questions 2829364 java-difference-between-swingworker-and-swingutilities-invokelater", "I m not a swing programmer so I don t have a handy example but the solution is to call invokeLater .. . .. . This will post a new event to the event queue and when the event thread picks it off the queue it will execute the run method that you provided .", "It schedules a Runnable which will be executed on the EDT event dispatching thread .", "@Maxwell To ensure that all UI-related operations are performed on the EDT Event Dispatching Thread .", "Causes doRun.run to be executed synchronously on the AWT event dispatching thread .", "I m still trying to get my head around the event dispatching thread .", "In consideration of the fact that it might be ok to call SwingUtilities invokeAndWait inside of SwingWorker doInBackground I want to push it a step further and ask : might it also be ok to call SwingUtilities invokeLater inside the background-thread", "SwingUtilities.invokeLater ensures that the code executes on the Event Dispatch Thread EDT .", "You re blocking the Event Dispatching Thread which will prevent any thing you pass to invokeLater from been executed until AFTER what ever is blocking the EDT returns unblocks", "http : stackoverflow.com questions 22534356 java-awt-eventqueue-invokelater-explained .. . .. . I have a controller class Master that loads two UI windows in my application .", "Does this has to do with the method invokeLater", "Then your eventOccurred method invokes this method by using the invokeLater .", "invokeLater allows you to run your code on the Swing EDT while a SwingWroker provides a way for you to run code on a separate background-thread and then update the UI from the swingWroker s done method whenever the background-thread is finished .", "After the long running work is done the done method is invoked in the ui-thread Event Dispatch Thread .", "Sometimes the key point is to be aware of what does update the UI as it might be hidden in another method you invoke but the principle is clear do background things in the background-thread and update the UI afterwards using invokeLater .", "The Runnable s you pass to invokeLater are all executed on the single Event Dispatch Thread .", "2 All invokeLater does is to queue the Runnable on the Swing event thread and that action can t cause the problem that you describe .", "invokeLater runs the Runnable in the Event Dispatch Thread which also is used for updating the GUI .", "my understanding that the purpose of InvokeLater is so that the items run on the correct AWT event thread .. . .. . That is correct .", "SwingWorker is a good choice in most cases as it provides some simple mechanisms for re-syncing code to the event dispatching thread .", "Possible duplicate of stackoverflow.com questions 6567870 http : stackoverflow.com questions 6567870 what-does-swingutilities-invokelater-do", "The general advice is use invokeLater to create and display your UI .", "The general advice is use invokeLater to create and display your UI .", "For example if a TableModel is attached to a JTable the TableModel should only be modified on the event dispatching thread .", "You just need to staticly call the method invokeLater of the EventQueue class .", "What this means is until the method returns you are blocking the Event Dispatching Thread which is responsible for amongst other things process paint requests .", "The following code executes fine : .. . .. . I am curious why the following code will not compile : .. . .. . What is the differenc between javax.swing.SwingUtilities.invokeLater r and import javax.swing.SwingUtilities invokeLater r", "My question is why does invokeLater cause my JFrame not to display correctly", "Its my understanding that the purpose of invokeLater is so that the items run on the correct AWT event thread which would make me think that this window would get painted correctly .", "I commented out the invokeLater part in the code below and it runs correctly if you put it back it doesn t.. .", "Because every modification you do on the GUI should be done on the event dispatching thread http : en.wikipedia.org wiki Event dispatching thread .", "Nope all events are delivered within the context of the Event Dispatching Thread...that s the point .", "If all the code that you show us is being executed inside the event-dispatching thread if it is being executed inside an actionListener for example the thread is becoming frozen inside the infinite-loop .", "My example code worked without the InvokeLater call because that ran the intensive stuff in the init thread and allowed the EDT thread to still paint .", "...invokeLater.. .", "But the invokeLater method is not an alternative to running your own thread or using a thread pool either since all Runnables passed to it are executed in sequence not in parallel .", "That ordering within a thread does not change not even from other threads perspective as invokeLater is a thread-safe operation .", "And then post back any modifications you need to do to any of those objects or UI elements on the UI thread using SwingUtilities.invokeLater .", "javax.swing.SwingUtilities invokeLater Runnable doRun http : docs.oracle.com javase 7 docs api javax swing SwingUtilities.html invokeLater 28java.lang.Runnable 29 schedules a java.lang.Runnable http : docs.oracle.com javase 7 docs api java lang Runnable.html for execution on the event thread callable from any thread", "So using queue application has two threads by default main and event dispatching thread .", "Event Dispatcher Thread is the GUI thread .", "The invokeLater need this implementation of runnable to invoke the passed run method from the swing thread .", "Use invokeLater .", "I understand that it s because opening a pop-up window is an UI update thread I tried things like invokeLater and invokeAndWait to order the events the hot keys work .", "What does invokeLater do", "The main reason for launching your application in this way is that Swing components are not thread-safe so you need to guarantee which thread your GUI will start from : the one called the Event Dispatching Thread EDT .", "Note 1 that your threadStart method is already being called on the Swing event thread and so there is no reason for you to use SwingUtilities.invokeLater to queue the code on the event thread and 2 the SwingUtilities.invokeLater call has nothing to do with your problem .", "is answered in the SwingUtilities javadoc page as you might expect .", "Your sleep is blocking this Thread so the GUI also does not get serviced no updates can be done till you return from the invokeLater code .", "InvokeLater doesn t always do the appending.. . you ve likely got a bug somewhere in your code and likely doesn t involve invokeLater per se but is being unmasked by it .", "When I don t use SwingUtilities.invokeLater the image is correctly displayed but I need to use invokeLater .", "Actions triggered by the Swing Timer as well as runnables submitted to invokeLater are all executed sequentially on the Event Dispatch Thread and as long as you don t involve invokeAndWait no other thread is waiting for an action to complete .", "This because the redraw is executed on a single thread by using invokeLater you let that thread manage it without having potential issued by the lack of thread-safety of Swing .", "You do not need invokeLater from within any event callback which includes the one submitted to the Swing Timer because they are already guaranteed to be called on the Event Dispatch Thread .", "So the solution is to use a separate Thread for the long running task then in the Thread when you need to update the GUI you use the invokeLater .", "3 Yes code inside of an ActionListener is called on the Swing event thread .", "Will calling a repaint outside of an invokeLater make all subsequent calls fall into the main thread", "There may be other threads in their sleep call but the particular thread executing invokeLater surely has completed its sleep operation .", "What s even worse is that in your example you are making changes to the Swing controls from your thread but then using InvokeLater afterwards .", "Example : .. . .. . Why invokeLater is needed here", "another problem with this code is am not launching dialog on event thread as you said above : All dialogs should be run on the event thread", "If you try to execute that code from a non-UI thread it will fail : all UI operations must be performed in the UI thread aka the event-dispatch-thread .", "I understand that JFrames should be safely created on the Event Dispatch Thread EDT using invokeLater and I m attempting to make two of them within my main method .", "Does Java provide a way to create such an event-driven worker thread", "I have this code snippet .. . .. . what is the difference if i will not use SwingUtilities", "Then executeOnUI would run on the UI thread .", "Code also runs if call to swingInit is inside and doIt outside invokeLater .", "Inside the input parameter of invokeLater method it pass this stuff : .. . .. . What is it this stuff", "In the first example in some thread at position 1 data is changed and then invokeLater is called .", "Well if you have access to it you could always move that particular logic outside of the Swing thread and onto the thread that calls invokeLater .", "If you call invokeLater that code might run well after the simulation.Run method is called .", "So all this .. . .. . .. . Is constantly pausing the Event Dispatching Thread preventing it from actually doing any updates or at least spacing them randomly .. .", "Substance must be set on EDT then wrapped into invokeLater Window window new Window please to read official Oracle tutorial about Initial Thread and Event Dispatch Thread for more info to click to Substance tag", "possible duplicate of EventQueue.invokeLater vs Thread.start http : stackoverflow.com questions 23271351 eventqueue-invokelater-vs-thread-start", "the purpose of invokeLater is ONLY to initialize the GUI The purpose is to place non-thread safe Swing calls onto the EDT .", "The Event Dispatch Thread is should be the only Thread that reads this queue and process the events .", "I want to force anything extending this class to also put their eventOcurred work inside invokeLater and can t see how to do it .", "invokeLater is the way to ensure that this invariant holds .", "Use invokeLater and you re always safe .", "Should I officially put that in invokeLater once again", "invokeLater has always worked reliably for me .", "Will setTimeout with zero delay do exactly the same as invokeLater", "What I found is that invokeLater seems to be causing the problem .", "@Software Monkey : But it works if you don t use InvokeLater", "Should doIt only be initiated possibly from an event occurring on the EDT but certainly not inside invokeLater block", "For example : .. . .. . Where subView extends JFrame and has the following main method : .. . .. . Notice that SubView.main uses the invokeLater .", "everything in the InvokeLater method get submitted to the EDT as a chunk which holds up the paint which falls later in the queue .", "See SwingUtilities.invokeAndWait Runnable http : docs.oracle.com javase 8 docs api javax swing SwingUtilities.html invokeAndWait-java.lang.Runnable- which : .. . .. . Causes doRun.run to be executed synchronously on the AWT event dispatching thread .", "@mKorbel : Swing s threading policy : http : docs.oracle.com javase 7 docs api javax swing package-summary.html threading All Swing components and related classes unless otherwise documented must be accessed on the event dispatching thread .", "For example the original requirement for using invokeLater when starting your UI seems to have come from deadlocks on the Sun OS many years back ." ] }
{ "confidence": [ 64.15557861328125, 61.36595916748047, 57.48396301269531, 56.20176315307617, 55.024879455566406, 52.210479736328125, 52.1700439453125, 51.916175842285156, 51.776634216308594, 49.98810577392578, 48.6327018737793, 47.79620361328125, 47.680904388427734, 47.20063018798828, 46.22846984863281, 45.506866455078125, 45.04571533203125, 44.53948211669922, 44.38010025024414, 43.99112319946289 ], "content": [ "Question : Possible Duplicate : .. . What does SwingUtilities.invokeLater do http : stackoverflow.com questions 6567870 what-does-swingutilities-invokelater-do .. . SwingUtilities.invokeLater http : stackoverflow.com questions 7196889 swingutilities-invokelater .. . .. . I have seen this little piece of code hundreds of times : .. . .. . Now my question is : what does invokeLater do What kind of bad things will happen if I just create and show my GUI inside the main thread Comment : What does invokeLater do is answered in the SwingUtilities javadoc page as you might expect . Comment : Java Swing Concurrency Tutorial http : docs.oracle.com javase tutorial uiswing concurrency initial.html . .. . Answer : 1 . Event Dispatcher Thread is the GUI thread . 2 . If you are talking about the main method ...then its not long lived in Java Gui . main method after scheduling the construction of GUI in EDT quits now its EDT that handles the GUI . .. . .. . 3 . invokeLater means that this call will return immediately as the event is placed in Event Dispatcher Queue and run method will run asynchronously.. . Comment : hmm .. . please consider using technical vocabulary so we all can understand what you really mean not long lived or run simultaneously are not which implies being either wrong or ambigous -", "Question : Possible Duplicate : .. . What does SwingUtilities.invokeLater do http : stackoverflow.com questions 6567870 what-does-swingutilities-invokelater-do .. . SwingUtilities.invokeLater http : stackoverflow.com questions 7196889 swingutilities-invokelater .. . .. . I have seen this little piece of code hundreds of times : .. . .. . Now my question is : what does invokeLater do What kind of bad things will happen if I just create and show my GUI inside the main thread Comment : What does invokeLater do is answered in the SwingUtilities javadoc page as you might expect . Comment : Java Swing Concurrency Tutorial http : docs.oracle.com javase tutorial uiswing concurrency initial.html . .. . Answer : Nothing bad will happen if you re updating it from the EDT while following guidelines http : java.sun.com products jfc tsc articles threads threads1.html . That is.. . .. . .. . If invokeLater is called from the event dispatching thread -- for example from a JButton s ActionListener -- the doRun.run will still be deferred until all pending events have been processed . Source http : docs.oracle.com javase 6 docs api javax swing SwingUtilities.html invokeLater 28java.lang.Runnable 29 .. . .. . If that isn t the case invokeLater is required . It schedules a Runnable which will be executed on the EDT event dispatching thread . Comment : Most of the time you re doing everything from a thread . Do you mean not the main thread Comment : Yup sorry about that . Comment : -1 for the nothing bad unfortunately out off votes for today - Please edit your answer to properly explain what you really mean . Comment : So if I put my code in invokeLater that Runnable will be executed from the EDT and no weird behavior as stated by assylias will be created And what if I want to say update my JLabel s text Should I officially put that in invokeLater once again Comment : @11684 however even if you are in the EDT invokeLater will still work so you might as well use it .", "Question : Is there any equivalent of Java s invokeLater method of SwingUtilities in Javascript UPDATE 1 .. . .. . So will setTimeout with zero delay do exactly the same as invokeLater Comment : I think you missed the point of @Tomasz s answer : setTimeout will never do the same as invokeLater because it will block your UI thread while invoking the delayed function . Comment : @Tomasz said it will .. . Answer : 1 . If you want to run something asynchronously later try setTimeout https : developer.mozilla.org en DOM window.setTimeout .. . .. . 2 . JavaScript is single-threaded . If you want to run some time consuming CPU-intensive task outside of the event handler you can do this using the technique above however it will still consume event-handling thread cause your UI to freeze . It is generally a bad idea to run CPU-intensive tasks inside a browser web workers http : en.wikipedia.org wiki Web worker might change this since they share the same thread as event handlers making them wait . See also .. . .. . Are there any atomic javascript operations to deal with Ajax s asynchronous nature http : stackoverflow.com questions 7266918 Comment : Will setTimeout with zero delay do exactly the same as invokeLater Comment : @Dims yes it should have been part of my answer .", "Question : I am studying Java Swing and I have some doubt related to this simple code tutorial that I am reading : .. . .. . The logic is pretty simple : I have a SimpleExample class that inherits from JFrame Swing class . So a SimpleExample will be a toplevel container . This class contain also the main method and now I have 2 doubts : .. . .. . 1 Why in the main method is execute this code : .. . .. . It call the invokeLater method on the SwingUtilities class and pass to it a new Runnable oject . Reading the documentation I know that is a way to places the application on the Swing Event Queue . It is used to ensure that all UI updates are concurrency-safe . The thing that I have some problem to understand is how it is implemented . Inside the input parameter of invokeLater method it pass this stuff : .. . .. . What is it this stuff What represents and how it work Tnx .. . .. . Andrea Comment : It is an anonymous-class that implements Runnable interface . Comment : Perhaps you mean you have questions not doubts . .. . Answer : javax.swing.SwingUtilities invokeLater Runnable doRun http : docs.oracle.com javase 7 docs api javax swing SwingUtilities.html invokeLater 28java.lang.Runnable 29 schedules a java.lang.Runnable http : docs.oracle.com javase 7 docs api java lang Runnable.html for execution on the event thread callable from any thread", "Question : What is the difference between : .. . .. . And : .. . .. . Which method is better to use Comment : possible duplicate of Java - Difference between SwingWorker and SwingUtilities.invokeLater http : stackoverflow.com questions 2829364 java-difference-between-swingworker-and-swingutilities-invokelater .. . Answer : SwingUtilities.invokeLater takes a Runnable and invokoes it in the ui-thread later . Usually for short running ui related work . SwingWorker runs the main work in a non ui-thread - the worker thread . After the long running work is done the done method is invoked in the ui-thread Event Dispatch Thread . But the SwingWorker s doInBackground method can also publish intermediate results by invoking the publish method . The SwingWorker will than ensure that the results to publish are processed by the Event Dispatch Thread . You can hook in by implementing the process method . Comment : Yes indeed thanks :", "Question : I am studying Java Swing and I have some doubt related to this simple code tutorial that I am reading : .. . .. . The logic is pretty simple : I have a SimpleExample class that inherits from JFrame Swing class . So a SimpleExample will be a toplevel container . This class contain also the main method and now I have 2 doubts : .. . .. . 1 Why in the main method is execute this code : .. . .. . It call the invokeLater method on the SwingUtilities class and pass to it a new Runnable oject . Reading the documentation I know that is a way to places the application on the Swing Event Queue . It is used to ensure that all UI updates are concurrency-safe . The thing that I have some problem to understand is how it is implemented . Inside the input parameter of invokeLater method it pass this stuff : .. . .. . What is it this stuff What represents and how it work Tnx .. . .. . Andrea Comment : It is an anonymous-class that implements Runnable interface . Comment : Perhaps you mean you have questions not doubts . .. . Answer : Runnable is an interface that contain the method run . The invokeLater need this implementation of runnable to invoke the passed run method from the swing thread . See this link-to have better information http : en.wikibooks.org wiki Java Programming Threads and Runnables", "Question : Hi im new in Opp and Java . I have see something about thread implements Runnable start to call the call the run . But what does this do Or this full line that you can find in this post on the main method : JTextFields on top of active drawing on JPanel threading problems http : stackoverflow.com questions 3256269 jtextfields-on-top-of-active-drawing-on-jpanel-threading-problems .. . .. . and the Answer on this same on the main method : Java page flipping not supported on Mac OS http : stackoverflow.com questions 3119826 java-page-flipping-not-supported-on-mac-os .. . .. . That call the run method what is the difference between that and Comment : possible duplicate of EventQueue.invokeLater vs Thread.start http : stackoverflow.com questions 23271351 eventqueue-invokelater-vs-thread-start Comment : possible duplicate of Java Event-Dispatching Thread explanation http : stackoverflow.com questions 7217013 java-event-dispatching-thread-explanation .. . Answer : I have see something about thread implements Runnable .. . .. . Forget that you ever saw that . That was a bad idea that ought to be deprecated . If you want to create an explicit thread in a java program do it like this : .. . .. . I m not going to explain why in this space but just trust me . It s a good habit to get into now . what does this do ...invokeLater.. . The swing package creates a thread that responds to events mouse clicks key presses etc . and a lot of the code that you write for swing runs as handlers that are called by that thread . Sometimes your handler wants to do something that is not allowed does not make sense in the context in which it is called . I m not a swing programmer so I don t have a handy example but the solution is to call invokeLater .. . .. . This will post a new event to the event queue and when the event thread picks it off the queue it will execute the run method that you provided .", "Question : Possible Duplicate : .. . What does SwingUtilities.invokeLater do http : stackoverflow.com questions 6567870 what-does-swingutilities-invokelater-do .. . SwingUtilities.invokeLater http : stackoverflow.com questions 7196889 swingutilities-invokelater .. . .. . I have seen this little piece of code hundreds of times : .. . .. . Now my question is : what does invokeLater do What kind of bad things will happen if I just create and show my GUI inside the main thread Comment : What does invokeLater do is answered in the SwingUtilities javadoc page as you might expect . Comment : Java Swing Concurrency Tutorial http : docs.oracle.com javase tutorial uiswing concurrency initial.html . .. . Answer : Swing is not thread-safe and all changes to Swing objects must be performed within the Event Dispatch Thread . If you try to run your code outside it you ll get unspecified behavior which will probably become weird at some point . In contrast the SWT JFace GUI framework that Eclipse uses asserts the correct thread on each public entry-point . Comment : If you try to run your code outside it you ll just get an exception since the invoking thread is checked before any further actions Running UI stuff outside of the EDT might create weird behaviour but will not necessarily throw an exception . Comment : not only changes - each and every access including instantiation must be on the EDT Comment : That exception is only the case in JavaFX where they finally included that check . You can have similar behavior in Swing by using a custom repaint manager as explained here http : weblogs.java.net blog alexfromsun archive 2006 02 debugging swing.html Comment : @assylias and Robin thanks for the correction . I work both with Swing and with SWT JFace and I mixed them up .", "Question : I have an infinite while-loop waiting for an event in SwingUtilities.invokeLater with Runnable interface but the execution is not continuing .. . why Comment : Start with Concurrency in Swing http : docs.oracle.com javase tutorial uiswing concurrency . You re blocking the EDT . invokeLater executes the run method the Runnable on the EDT at some point in the future .. . Answer : SwingUtilities.invokeLater will execute the run method inside the event-dispatching thread . If all the code that you show us is being executed inside the event-dispatching thread if it is being executed inside an actionListener for example the thread is becoming frozen inside the infinite-loop . Comment : no its not in any handler im using netbeans form to design the gui but its generating all the gui code in one swingutilities.invokelater but im creating another method that include this code in this class which i will call using object created from this class Comment : Forum main fm new Forum main fm.setVisible true fm.getdata uid tid close Comment : ithe class invocation looks like this Comment : inside main java.awt.EventQueue.invokeLater new Runnable public void run new Forum main .setVisible true Comment : in getdata fuction System.out.println hello3 showMessage SwingUtilities.invokeLater new Runnable public void run while true jEditorPane1.setText s9 System.out.println hello2", "Question : Inside a createAndShowGUI method called by javax.swing.SwingUtilities.invokeLater like this.. . : .. . .. . ...I have the following piece of code which launches multiple threads with invokeLater where each threads increments the value of progBar when it is ran : .. . .. . How can I know where all the threads are finished If I use a counter inside invokeLater I think I will I run into race conditions. . So what is the right way to do it Should I use a mutex Are there some facilities provided by Swing to this purpose Thanks . I have implemented the code in this way according to http : www.java2s.com Code Java Threads InvokeExampleSwingandthread.htm Comment : @mKorbel kleopatra Thanks that is right correcting that part of the code . Comment : @mKorbel : why is it a bug if some rules you have invented do not work Modifying data models from different threads used by Swing from the EDT at the same time never was allowed . So if you found a jre version where it happens to work it s just working by accident but not a rule . Comment : @mKorbel : where is the official documentation to your claim Just because it happened to work does not imply that it is thread-safe . It may just imply that the optimizer did a lousy job in that version . Or that you just had a luck . Comment : @mKorbel : you are reversing the logic . You can catch a bug by luck but you can not prove the correctness of your code by luck . If the specification does not say it ought to work and in this case it explicitly states that it is wrong it is not a bug if it doesn t work . Comment : @mKorbel : And the JDK 6 Swing API is pretty clear at the end of the page http : docs.oracle.com javase 6 docs api javax swing package-summary.html : This restriction also applies to models attached to Swing components . For example if a TableModel is attached to a JTable the TableModel should only be modified on the event dispatching thread . If you modify the model on a separate thread you run the risk of exceptions and possible display corruption . Nothing more to say .. . Answer : The Runnable s you pass to invokeLater are all executed on the single Event Dispatch Thread . Due to the fact that they are all sent by different threads there is no particular order but they are executed one after another . So once you have fixed your code by moving the UI updates into the Runnable you are passing to invokeLater you can use Swings notification mechanism to get informed about the finishing of the jobs : Comment : please Apolo 13 you forgot for break Comment : This code does not care about the JProgressBar s range . It uses the same variable for starting times number of threads and for waiting to reach old progress value +times . Comment : @jj : Since the invokeLater is placed after the sleep it is executed after the sleep as intended . There may be other threads in their sleep call but the particular thread executing invokeLater surely has completed its sleep operation . That ordering within a thread does not change not even from other threads perspective as invokeLater is a thread-safe operation . Comment : That s right . Sometimes the key point is to be aware of what does update the UI as it might be hidden in another method you invoke but the principle is clear do background things in the background-thread and update the UI afterwards using invokeLater . Other tools like ExecutorService or SwingWorker are just tools to make it easier to implement such things but the logic stays the same . Comment : @jj : reading the component s state from a different thread while updates are ongoing in the EDT will cause problems as well . There are only a few exceptions i.e . reading a simple property not calculated from multiple properties represented by an immutable value-type e.g . String might work . Reading properties that are definitely not updated while you read them which are under your control would be ok too .", "Question : I am studying Java Swing and I have some doubt related to this simple code tutorial that I am reading : .. . .. . The logic is pretty simple : I have a SimpleExample class that inherits from JFrame Swing class . So a SimpleExample will be a toplevel container . This class contain also the main method and now I have 2 doubts : .. . .. . 1 Why in the main method is execute this code : .. . .. . It call the invokeLater method on the SwingUtilities class and pass to it a new Runnable oject . Reading the documentation I know that is a way to places the application on the Swing Event Queue . It is used to ensure that all UI updates are concurrency-safe . The thing that I have some problem to understand is how it is implemented . Inside the input parameter of invokeLater method it pass this stuff : .. . .. . What is it this stuff What represents and how it work Tnx .. . .. . Andrea Comment : It is an anonymous-class that implements Runnable interface . Comment : Perhaps you mean you have questions not doubts . .. . Answer : It is an anonymous-class http : docs.oracle.com javase tutorial java javaOO anonymousclasses.html that implements Runnable interface http : docs.oracle.com javase 7 docs api java lang Runnable.html . You can use it without anonymous-class like : .. . .. . But anonymous-class is more convenient .", "Question : When I start my GUI interfaces what can happen if I don t use invokeLater 1 . Does that mean all rest of the GUI paints updates etc . will be in the main thread 2 . Will calling a repaint outside of an invokeLater make all subsequent calls fall into the main thread Basically this : .. . .. . .. . .. . ------------- VS ------------- .. . .. . NOTE : In cases with small GUI I if I don t put the invokeLater it seems to work fine . And in fact the application doesn t terminate although the last line of the main is executed . I have read quite a few articles on why we should use it pertaining to the fact that Swing is not thread safe it is single-threaded and so on but I really didn t read the repercussions of not calling invokeLater partially because of my limited knowledge in Threads Comment : It doesn t happen always but you risk intermittent failure of your application . It s happened to me especially when using some Look and Feel . Comment : @Hovercraft Full Of Eels I am adding a bit more detail to the question . Comment : To be really honest unless you are doing some really dynamic setups until the a frame is made visible it should be okay not to do it within the context of the EDT . The problem comes down to the fact that different platforms are implemented differently . For example the original requirement for using invokeLater when starting your UI seems to have come from deadlocks on the Sun OS many years back . I ve also seen some issues with Java 7 . The general advice is use invokeLater to create and display your UI . Run all UI code within the context of the EDT Comment : repaint I believe queues a request on the EDT . Comment : It will only fail when you demo your program for the boss or for a customer . Otherwise it will work just fine . .. . Answer : The reality is nothing might happen or the world will end . It s next to near impossible to predicate this is the nature of multi-threaded environments.. . Unless you are doing some really dynamic setups until the a frame is made visible it should be okay not to do it within the context of the EDT . The problem comes down to the fact that different platforms are implemented differently at the native level . For example the original requirement for using invokeLater when starting your UI seems to have come from deadlocks on the Sun OS many years back . I ve also seen some issues with Java 7 but my predecessors idea of the thread was weird to say the least . The general advice is use invokeLater to create and display your UI . Run all UI code within the context of the EDT .. . .. . It will also reduce the risk of you having to spend weeks trying to replicate and track down those weird anomalies by running you all you UI code from within the EDT .. . .. . Updated based on comments from the OP .. . .. . repaint makes a request to the RepaintManager that makes decisions about what and when something should be paint . It will actually post a paint event directly on to the Event Queue which is then processed by the Event Dispatching Thread so repaint is actually on of the few thread safe methods.. . .. . .. . Take a look at .. . .. . Painting in AWT and Swing http : www.oracle.com technetwork java painting-140037.html .. . Initial Threads http : docs.oracle.com javase tutorial uiswing concurrency initial.html .. . Will the real Swing Single Threading Rule please stand up http : bitguru.wordpress.com 2007 03 21 will-the-real-swing-single-threading-rule-please-stand-up .. . Why is Swing threading model considered wrong and how should it be http : stackoverflow.com questions 13519704 why-is-swing-threading-model-considered-wrong-and-how-should-it-be .. . .. . The general advice would be you should use invokeLater because that s how the API has been designed doing anything else is inviting problems.. .", "Question : I recently found an example code : .. . .. . The createAndShowGUI method opens a user-interface window . Then I tried to trim the code as the following : .. . .. . Both versions work equally well . What is the difference Comment : It works equally well most of the time but occasionally your GUI thread and the thread updating the GUI will cause strange and unreproducible behaviour . This is the problem with testing multi-threaded code You can run it fine for days and change something minor and suddenly it shows up often . Comment : Possible duplicate of stackoverflow.com questions 6567870 http : stackoverflow.com questions 6567870 what-does-swingutilities-invokelater-do .. . Answer : SwingUtilities.invokeLater ensures that the code executes on the Event Dispatch Thread EDT . Swing is single-threaded all component instantiation and display should happen on the EDT . Things might seem to work otherwise but you ll possibly run into issues .", "Question : I found many answers about my question but I still don t understand why my application does not throw any exceptions . I created a new java form application in NetBeans 8 . My form is created and displayed in main method like this : .. . .. . So this new Runnable creates new MainForm and sets it visible . Then in my code I start new threads which updates some jButtons and jTextFields . Code below : .. . .. . And there are other threads started like this above and where I get different values which are updated in the above thread . My question is why my code does not throw any exception regarding UI elements which are updated from another thread I did NOT use SwingUtilities.invokeLater new Runnable code here And my code executes perfectly.. . Thank you Comment : Because they don t it s up to the developer to ensure that they are properly synchronizing the updates with EDT . It is likely that the decision was made not to partly due to the complexity of such a design and partly due to the expense it would be incurred with every method of a component that might change the state had to check that was in the correct thread Comment : OK so my code should use SwingUtilities.invokeLater new Runnable and my method UpdateUI should be called within the invokeLater new Runnable updateUI or my method should have inside my Thread the invokeLater like : private void updateUI updateUIThread new Thread - while true try SwingUtilities.invokeLater new Runnable code here Comment : When you want to update the UI you should be doing so from within the context of the EDT . A good way to do this would be to use a SwingWorker and either publish content to be processed in the EDT or trigger property change events.. . .. . Answer : Swing is not thread safe and is single-threaded . You should never update UI components from outside the Event Dispatching Thread equally you should never run long running processes or blocking code within the EDT as this will prevent it from processing new events within the event queue causing your app to look like it s hung...because it has.. . .. . .. . Take a look at Concurrency in Swing http : docs.oracle.com javase tutorial uiswing concurrency for more details . After scratching my head for a while I realised the simple solution would be to just use javax.swing.Timer .. . .. . You want to repeat the update at a regular interval 300 milliseconds and update the UI perfect the Swing Timer is capable of scheduling updates at regular intervals and executes it call back within the context of the EDT It also has the ability to consolidate repeated calls . This means if there is already a timer action in the event queue the timer will not generate a new one preventing from flooding the EDT and cause possible performance issues.. . .. . .. . See How to use Swing Timers http : docs.oracle.com javase tutorial uiswing misc timer.html for more details Comment : thank you for this @MadProgrammer . I read about Swing Timers but didn t use them . My kind of approach I used before in c I m new to java and I m finding that s a lot different from c . Comment : @serban.b Ain t that the truth : P", "Question : I found many answers about my question but I still don t understand why my application does not throw any exceptions . I created a new java form application in NetBeans 8 . My form is created and displayed in main method like this : .. . .. . So this new Runnable creates new MainForm and sets it visible . Then in my code I start new threads which updates some jButtons and jTextFields . Code below : .. . .. . And there are other threads started like this above and where I get different values which are updated in the above thread . My question is why my code does not throw any exception regarding UI elements which are updated from another thread I did NOT use SwingUtilities.invokeLater new Runnable code here And my code executes perfectly.. . Thank you Comment : Because they don t it s up to the developer to ensure that they are properly synchronizing the updates with EDT . It is likely that the decision was made not to partly due to the complexity of such a design and partly due to the expense it would be incurred with every method of a component that might change the state had to check that was in the correct thread Comment : OK so my code should use SwingUtilities.invokeLater new Runnable and my method UpdateUI should be called within the invokeLater new Runnable updateUI or my method should have inside my Thread the invokeLater like : private void updateUI updateUIThread new Thread - while true try SwingUtilities.invokeLater new Runnable code here Comment : When you want to update the UI you should be doing so from within the context of the EDT . A good way to do this would be to use a SwingWorker and either publish content to be processed in the EDT or trigger property change events.. . .. . Answer : Swing says you shouldn t update components from outside the Swing Event Dispatch Thread but it doesn t enforce that . It s just not at all practical to check to see which Thread every single call is coming from . Also because of the nature of the problems that tend to result from threading issues just generally you should not expect Exceptions to always be thrown when you have a bug in multi-threaded code . This is because threading issues frequently result in deadlock http : docs.oracle.com javase tutorial essential concurrency deadlock.html or memory consistency errors http : docs.oracle.com javase tutorial essential concurrency memconsist.html which are in most cases not recoverable usually the whole JVM just crashes . Comment : Thanks it s clear now . I read about SwingWorker what @MadProgrammer said and I find out that this is the correct implementation but I found that it s OK to do it with SwingUtilities.invokeLater new Runnable public void run updateUI which I think is a lot easier than SwingWorker but I don t really know if it s 100 safe or correct to use it . Comment : Yes it s always safe to use SwingUtilities.invokeLater Runnable . SwingWorkers are a little different though . invokeLater allows you to run your code on the Swing EDT while a SwingWroker provides a way for you to run code on a separate background-thread and then update the UI from the swingWroker s done method whenever the background-thread is finished . Comment : @serban.b SwingWorker becomes more useful when you need to change multiple states of different components as it provides simple to use methods to not only synchronise the updates back to the EDT via things like publish process but also to pass information between the worker and the EDT via the PropertyChangeListener support...try passing variables around with SwingUtilities .. .", "Question : Hi im new in Opp and Java . I have see something about thread implements Runnable start to call the call the run . But what does this do Or this full line that you can find in this post on the main method : JTextFields on top of active drawing on JPanel threading problems http : stackoverflow.com questions 3256269 jtextfields-on-top-of-active-drawing-on-jpanel-threading-problems .. . .. . and the Answer on this same on the main method : Java page flipping not supported on Mac OS http : stackoverflow.com questions 3119826 java-page-flipping-not-supported-on-mac-os .. . .. . That call the run method what is the difference between that and Comment : possible duplicate of EventQueue.invokeLater vs Thread.start http : stackoverflow.com questions 23271351 eventqueue-invokelater-vs-thread-start Comment : possible duplicate of Java Event-Dispatching Thread explanation http : stackoverflow.com questions 7217013 java-event-dispatching-thread-explanation .. . Answer : The Swing API is single-threaded : you are only allowed to invoke methods on Swing components from the swing thread . You can have multiple threads in your application but the moment that another thread needs to interact with the swing components it needs to do so using EventQueue.invokeLater . This ensures that the Runnable is run on the correct thread . Starting your own Thread does not have this effect of running on the Swing thread so it is not an alternative . If you do it it may result in data corruption incorrect screen updates etc . It may be temporary but it may also be irreparable . But the invokeLater method is not an alternative to running your own thread or using a thread pool either since all Runnables passed to it are executed in sequence not in parallel .", "Question : Ok I ve read an searched all over the web and I ve not found the solution to my problem yet perhaps I m missing something simple hence here I am.. . I ve got a rather large project that handles work orders for a repair business . It s all database connected many many pages of code and classes . But i just added a short bit of code to the front end that essentially checks for new messages in our notes area . Anyway I display a simple JFrame with two JLabel s while a separate thread queries the database . This all happens at the start of the program . The problem is my little please wait JFrame comes up with its frame but no guts no background and no JLabel s during the wait which is the rest of the program loading not the database thread afterwords it displays but by then its missing its point . I wrote the following example program . It displays a simple JFrame CheckingMessagesGUI : a JFrame with two JLabel s nothing more sleeps for 5 sec then displays the Example main program JFrame then instantly closes System.exit 0 in this example of course my real program goes on to do a lot more . What I found is that invokeLater seems to be causing the problem . Once the sleep timer runs out the window will display but the code to display it was given before the Thread.sleep command and should have been done in that order correct My question is why does invokeLater cause my JFrame not to display correctly Its my understanding that the purpose of invokeLater is so that the items run on the correct AWT event thread which would make me think that this window would get painted correctly . Anyway I m sure I m missing something obvious . I commented out the invokeLater part in the code below and it runs correctly if you put it back it doesn t.. . Many thanks in advance . UPDATE : To clarify I realize Thread.sleep will block everything but shouldn t my CheckingMessagesGUI already have been fully drawn before I call sleep That is the issue . Comment : This forum is used by programmers in a wide variety of languages . A question s tags must help identify the domain immediately for readers to be able to filter questions they may help with . Would java and awt be good tags for your question .. . Answer : invokeLater runs the Runnable in the Event Dispatch Thread which also is used for updating the GUI . Your sleep is blocking this Thread so the GUI also does not get serviced no updates can be done till you return from the invokeLater code . That s why you should not do any long time consuming computations in this Thread . They should be done in an different new Thread . The Event Dispatch Queue http : java.sun.com docs books tutorial uiswing concurrency dispatch.html states .. . .. . Tasks on the event-dispatch-thread must finish quickly if they don t unhandled events back up and the user-interface becomes unresponsive . Your code could be changed to not tested : .. . .. . EDIT : let s go a bit deeper and it s my view of the working of Swing AWT . I suppose the please wait see comments should be displayed in the CheckingMessagesGUI class but isn t . That s related to the way the GUI works . It does not directly change anything on the display if you call the corresponding Swing methods draw setText setLocation .. . it just queues an Event in the Event Queue . The Event Dispatch Thread is should be the only Thread that reads this queue and process the events . As long as it is being blocked - by the sleep in this case - no changes to the GUI will be displayed . The GUI is frozen . EDIT2 : .. . invokeLater the Runnable is appended to the end of the queue to be latter executed by the EDT after all pending events have been processed the next command after the invokeLater call will be executed . invokeAndWait same as above but the actual Thread blocks until the Runnable was executed after pending events by the EDT that is the command following the invokeAndWait will only get started after the submitted Runnable was executed . Comment : @Marc : No it won t paint because the painting is a separate event which was posted to the event queue but never processes . Painting does not happen inline with GUI construction since it needs to arise from a system request to paint to a specific graphics context . Comment : I think this might be the key no updates can be done till you return from the invokeLater code . . I realize that Thread.sleep blocks everything in my example but my point was that my please wait CheckingMessagesGUI should have already been drawn fully before i called sleep . Shouldn t this be true Comment : @Software Monkey : But it works if you don t use InvokeLater why Comment : Why did you accept the answer if you don t understand the solution I sure you ignored my answer since I didn t provide code and now you are confused . Try reading the link I provided which explains everything . That why I post the link-to the tutorial because it explains better than the code what happens . Comment : Ahh a few manipulations of my example program later and I ve tested and worked out my answer OF COURSE THANKS TO EVERYONE OUT HERE . everything in the InvokeLater method get submitted to the EDT as a chunk which holds up the paint which falls later in the queue . It does then return to the first line after the InvokeLater call and runs anything there so it doesn t block entirely as InvokeAndWait would do as a previous comment question of mine suggested .", "Question : The following code executes fine : .. . .. . I am curious why the following code will not compile : .. . .. . What is the differenc between javax.swing.SwingUtilities.invokeLater r and import javax.swing.SwingUtilities invokeLater r Comment : Try changing import javax.swing.SwingUtilities to import static javax.swing.SwingUtilities . and your last snippet should work .. . Answer : To reference a static member inside a class like that as a simple name you need a static import : .. . .. . and later you can use .. . .. . A normal import import javax.swing.SwingUtilities allows you to refer to the the class SwingUtilities by a simple name but not any of the members of that class . So with that you could do : .. . .. . and Comment : Thank you very much Could you elaborate a bit on a class like that", "Question : This simple issue confuses me . You can display a JAVA GUI application by setting the frames setVisible property true . But in almost all the examples I found on internet they use a separate thread to do the same thing . They do something like this .. . .. . I found no difference between the two methods . But there must be some special reason that s why everyone is doing this . Can someone explain it..thanks .. . Answer : Because every modification you do on the GUI should be done on the event dispatching thread http : en.wikipedia.org wiki Event dispatching thread . This is how AWT and SWING are meant to work . This because the redraw is executed on a single thread by using invokeLater you let that thread manage it without having potential issued by the lack of thread-safety of Swing . Using that syntax you delegate that instructions to be executed on the appopriate thread which is the one that manages the GUI elements .", "Question : I recently found an example code : .. . .. . The createAndShowGUI method opens a user-interface window . Then I tried to trim the code as the following : .. . .. . Both versions work equally well . What is the difference Comment : It works equally well most of the time but occasionally your GUI thread and the thread updating the GUI will cause strange and unreproducible behaviour . This is the problem with testing multi-threaded code You can run it fine for days and change something minor and suddenly it shows up often . Comment : Possible duplicate of stackoverflow.com questions 6567870 http : stackoverflow.com questions 6567870 what-does-swingutilities-invokelater-do .. . Answer : The main thread started by the JVM is not the Event Dispatch Thread . from The Event Dispatch Thread http : docs.oracle.com javase tutorial uiswing concurrency dispatch.html .. . .. . Some Swing component methods are labelled thread safe in the API specification these can be safely invoked from any thread . All other Swing component methods must be invoked from the event-dispatch-thread . Programs that ignore this rule may function correctly most of the time but are subject to unpredictable errors that are difficult to reproduce ." ] }
[ "yes-answer-long", "yes-answer-short" ]
awt
UNK_RELATION
imgur@hosting@44
imgur -- imgur is a free and popular image @placeholder service that does not require registration to use .
{ "confidence": [ 47.821372985839844, 43.89653396606445, 41.11144256591797, 40.55683517456055, 40.3767204284668, 40.09263610839844, 39.400672912597656, 39.18638610839844, 38.74842834472656, 38.74842834472656, 38.166316986083984, 38.166316986083984, 38.166316986083984, 38.05944061279297, 38.01133346557617, 38.01133346557617, 37.9493293762207, 37.75471115112305, 37.67253112792969, 37.090423583984375, 37.090423583984375, 36.702999114990234, 36.56161880493164, 36.56161880493164, 36.56161880493164, 36.56161880493164, 36.56161880493164, 36.56161880493164, 36.43766403198242, 36.43766403198242, 36.36581802368164, 36.150779724121094, 35.91340637207031, 35.80093002319336, 35.72708511352539, 35.72708511352539, 35.485721588134766, 35.413509368896484, 35.36176681518555, 35.31161117553711, 35.22123718261719, 35.22123718261719, 35.22123718261719, 35.22123718261719, 35.18391418457031, 35.18391418457031, 35.00410079956055, 35.00410079956055, 35.00410079956055, 34.651187896728516, 34.33989334106445, 34.30253219604492, 34.11438751220703, 34.10801696777344, 34.10801696777344, 34.0722770690918, 33.932090759277344, 33.599456787109375, 33.599456787109375, 33.599456787109375, 33.599456787109375, 33.599456787109375, 33.599456787109375, 33.599456787109375, 33.599456787109375, 33.599456787109375, 33.599456787109375, 33.575984954833984, 33.575984954833984, 33.38232421875, 33.38232421875, 33.38232421875, 33.38232421875, 33.38232421875, 33.38232421875, 33.122554779052734, 33.01365661621094, 32.991859436035156, 32.718116760253906, 32.5235595703125, 32.306427001953125, 32.306427001953125, 32.306427001953125, 32.076194763183594, 32.076194763183594, 31.23406982421875, 31.23406982421875, 31.23406982421875, 31.23406982421875, 31.23406982421875, 31.231224060058594, 31.231224060058594, 31.231224060058594, 31.231224060058594, 31.231224060058594, 31.231224060058594, 31.231224060058594, 31.231224060058594, 31.231224060058594 ], "content": [ "Link on method - https : market.mashape.com imgur imgur-9 image-upload", "Unfortunately the Node.js example code on Mashape https : market.mashape.com imgur imgur-9 image-upload is wrong you should use this :", "I m working on an application that uses imgur as hosting service and I ll be uploading images to imgur using javascript .", "Sources : .. . .. . https : market.mashape.com imgur imgur-9 .. . .. . http : api.imgur.com commercial", "Reported to imgur they have recognized it .", "I ve been trying to upload images to Imgur although the following code successfully uploads the image anonymously to Imgur it doesn t work for uploading to one s account .", "2 . in docs https : market.mashape.com imgur imgur-9 need paste Authorization HEADER AUTH .", "I m having trouble uploading an image to Imgur using the python-requests module and the Imgur API .", "Imgur has an API http : api.imgur.com .", "Im gonna contact imgur about this .", "Who i can resize image before post it on imgur", "Trying to make script which uploading image on imgur anonymously .", "I m trying to write a program to upload an image to imgur and return the url .", "I would like to use imgur http : imgur.com to upload images .", "That is how ImgUR designed it .", "Create an imgUR object : .. . .. . B .", "Does this explain what you re looking for : subinsb.com uploading-images-using-imgur-api-in-php http : subinsb.com uploading-images-using-imgur-api-in-php", "Check out my Imgur Bash script https : github.com RanyAlbegWein Imgur .", "Galcode.txt in this instance is html of a gallery on imgur .", "I am trying to upload am image to imgur with cordova .", "Then the image will be resized using the PIL module and the uploaded to Imgur using pyimgur .", "Here s the Imgur API page http : code.google.com p imgur-api wiki ImageUploading for reference .", "I actually found a bug in the imgur api .", "My script creates the auth url for IMGUR .. . 2 .", "Imgur uses OAuth 2.0 https : api.imgur.com oauth2 .", "On the click of the button upload it using the imgur API .", "The problem is that there is indeed ONLY ONE REQUEST to imgur .", "I recommend ShareX for automatic uploads to imgur .", "I am trying to use IMGUR API using Flask .", "I m trying to use Javascript to upload a png to imgur http : imgur.com .", "The authorization does work when using the regular imgur api url i.e .", "However when I use https : imgur-apiv3.p.mashape.com oauth2 authorization client id CLIENT ID response type token as the authorization URL it loads the official Imgur Zoinks", ".. . .. . We re using the Imgur image upload API endpoint https : api.imgur.com endpoints image image-upload .", "I m using this code to get data about an Imgur Image .", "I am trying to use this code to upload an image to imgur using php but I get this error : .. . .. . Upload failed .", "I tried to use jQuery Dropzone to upload an image to Imgur or any other domain but that s not working .", "Here s a screenshot of the JSON I receive from Imgur : .. . .. .", "stackoverflow.com questions 2073519 uploading-to-imgur-com http : stackoverflow.com questions 2073519 uploading-to-imgur-com", "We use nicedit in our CMS and it uploads images to imgur .", "I am using the commercial version of Imgur API v3 through Mashape : https : market.mashape.com imgur imgur-9 .. . .. . I am trying to figure out how to modify the authentication steps when using the Mashape endpoint url https : imgur-apiv3.p.mashape.com instead of the regular endpoint https : api.imgur.com .", "I have a question about upload big size file on imgur .", "Imgur might be blocking it people brought this up on imgurs uservoice .", "For whatever reason imgur is blocking the images from jsfiddle and jsbin .", "When trying to upload something to Imgur I have to put an Authorization in .", "I want to create a gallery for my website using the imgur api but how can i create a file uploader that uploads to the imgur servers", "Pass that data to imgur like here http : 29a.ch 2011 9 11 uploading-from-html5-canvas-to-imgur-data-uri", "I have a script which generates the authentication url for IMGUR and do some image uploading .", "I have the following HTML and Javascript code to upload image to Imgur using their API .", "What do I need to do to get image data from Imgur based on a search term", "I use this nugget to upload my image to imgur : http : imgurapi.readthedocs.io en latest And i work with Xamarin Forms in MVVM .", "Here are some examples of imgur links : .. . .. . The imgur API specifically asks for the ID https : api.imgur.com models image of the image s2Bqq 26xcQUF etc but offers no way from what I ve seen to get the ID of an image given a link .", "This is a json returned from an album using the imgur api you can transform this json into an array within PHP and then use array rand to select a random one : .. . .. . More information in the IMGUR API Documentation https : api.imgur.com models album .. . .. . Being json the string coming from imgur servers this code will gather a random link :", "I m trying to use the python-requests lib http : docs.python-requests.org en latest user quickstart post-a-multipart-encoded-file to upload an image to Imgur using the imgur api http : api.imgur.com resources anon upload .", "I registered on imgur and got my client id and client secret and I need help to update nicedit code which communicate with imgur API .", "I have tried different methods to upload and retrieve a link via imgur but none have been successfull despite looking at the imgur api .", "I need to use Imgur to upload images online using android eclipse .", "I dont want to save the image on disk instead manipulate the image in memory and then upload it from memory to Imgur .", "I m playing around in python trying to download some images from imgur .", "The code below downloads a picture from imgur and determines which file-type it is .", "Imgur also had changed many things since then I mean in their api .", "Logins to IMGUR manually and then the API redirects back to my script .. . 4 .", "Did you just post real Imgur tokens to Stack Overflow", "Why isn t imgur recognizing the key I m sending with the POST", "It s a shame that Imgur themselves don t have code examples anymore", "i have a question about the imgur http : imgur.com api .", "I am using the following snippet to upload images with the Imgur Mashape API .", "Imgur is over capacity why do you think it s you", "So I create the authentication URL which allows the script to use the IMGUR API which simply doesn t open .", "Sure but I ve noticed this with other JSfiddles that use imgur as well so it s not just mine .", "This code can upload image to imgur but I dont know how to upload it to my album .", "The question is mostly imgur specific but I wouldn t mind a solution for most image-hosting sites .", "If there is no way to retrieve the direct image link then the normal imgur link would also work .", "I have a working code for drag-and-drop an image from hard drive to Imgur as shown below .", "I m using http : hc.apache.org httpclient-3.x and want to upload an image to imgur using their v3 API .", "How should I proceed in order to be able to upload an image with the Mashape Imgur API in pure javascript", "I am planning to upload images to imgur anonymously using its api i registered my application in the anonymous upload category and got client id and client secret How to use php to upload image to imgur and retrieve direct url to the image", "github.com Adyg php-imgur-api-client https : github.com Adyg php-imgur-api-client looks promising and includes documentation how to upload an image using the library github.com Adyg php-imgur-api-client blob master doc Image.md https : github.com Adyg php-imgur-api-client blob master doc Image.md .", "Imgur has detailed API documentation http : api.imgur.com endpoints on all their endpoints including Image Upload http : api.imgur.com endpoints image image-upload .", "I m trying to upload an image to imgur I am getting a response from the site but it returns me with .. . .. . null : data : error : Malformed auth header request : 3 image parameters : image iVBORw0KGgoAAAANSUhEUgAAB4AAAASwCAIAAACVUsChAACAAElEQVR42uzdCXebyrI2YEuyY8fzPCbZOyfZd597v .. . method : POST success : false status : 403 .. . .. . A 403 error on the imgur documentation says .. . .. . Forbidden .", "Note : This is using the anonymous imgur uploader with my anonymous key .", "I can insert gif files from imgur in the insert image by url option .", "StackOverflow uses a separate imgur installation http : blog.stackoverflow.com 2010 08 new-image-upload-support that keep images indefinitely .", "The point is that i do not need to rehost on imgur but on my own image hosting site .", "It would work for the same reason that you can see the images in the fiddle after you visit the imgur url for the image because it is cached .", "From the imgur api page : .. . .. . For public read-only and anonymous resources such as getting image info looking up user comments creating an anonymous album etc .", "response from Imgur and I m not sure exactly what the problem is .", "The official imgur app is able to play them so there has to be a way .", "I now have to do the API side of this and authenticate with Imgur .", "Applies to imgur API v3 as of this date . .. . .. . There is nothing automated about getting a PIN .", "See imgur has no way to know that it is only you authorizing yourself .", "From then on the API endpoint is https : imgur-apiv3.p.mashape.com which must be used in replace of https : api.imgur.com .", "What I m trying to do is to upload a BufferedImage object to Imgur and then get the direct URL .", "After searching a bit I found out that it d be needed to authenticate to Imgur and then upload to it .", "Yes but the ImgUr process is the same and nearly all the methods used in the answer are NET methods with lots of comments to explain", "I was about to ask a question about a JSFiddle and I noticed that the images which I ve got on Imgur don t show up .", "Opened up Chrome s network panel and noticed that those urls were getting 403 - Forbidden from imgur .", "So I opened the imgur url in a new tab then went back to jsfiddle and hit run .", "So my question is how would I using PHP get the ID of any imgur link", "You also need parentheses for a method call : .. . .. . Note that this has nothing to do with imgur or WebRequest - it s just normal C ." ] }
{ "confidence": [ 49.216556549072266, 47.92156219482422, 47.790122985839844, 46.98875045776367, 46.82089614868164, 46.770301818847656, 46.3535041809082, 46.26543426513672, 45.826438903808594, 45.405433654785156, 45.17839813232422, 44.68687057495117, 44.65214920043945, 44.477291107177734, 44.46934127807617, 44.260433197021484, 43.99945068359375, 43.9185905456543, 43.307682037353516, 43.18169403076172 ], "content": [ "Question : I have a HTML formwith a file-upload button . I want the user to be able to select an image and submit the form then the server should upload the file to imgur using PHP and retrieve the direct link of that image meaning the URL should end with the .jpg or .png etc . I would really appreciate it if anyone can show me how to upload an image to imgur using PHP and then retrieve the direct link-to that image so that I can store the link-to a MySQL database . If there is no way to retrieve the direct image link then the normal imgur link would also work . Meaning something like this will also work : .. . .. . But the first priority is something like this : .. . .. . Edit : So I managed to upload the image and get a json reply using the api . After I decode the json that is returned back and var-dump it I get this : .. . .. . Now how do it extract the part saying http : i.imgur.com yPfV2Tq.png Comment : Does this explain what you re looking for : subinsb.com uploading-images-using-imgur-api-in-php http : subinsb.com uploading-images-using-imgur-api-in-php Comment : I looked into this one before but many things changed since this was posted so couldn t get it to work . Imgur also had changed many things since then I mean in their api . Comment : Understandable . Can you use composer to pull in libraries There look to be at least 2 libraries available for interacting with the Imgur API which would make your life easy if you can . github.com Adyg php-imgur-api-client https : github.com Adyg php-imgur-api-client looks promising and includes documentation how to upload an image using the library github.com Adyg php-imgur-api-client blob master doc Image.md https : github.com Adyg php-imgur-api-client blob master doc Image.md . Comment : Yeah on the authentication side you ll need to register your application with Imgur if you haven t yet to get a client ID and secret api.imgur.com registerapp https : api.imgur.com registerapp and then the library should handle most of the rest for you Comment : The URL would be in json- data- link .. . Answer : Ok so I have found the way how to do it Used help from here : using imgur api v3 to upload images anonymously using php http : stackoverflow.com questions 17269448 using-imgur-api-v3-to-upload-images-anonymously-using-php .. . .. . Used the code provided by h0tw1r3 http : stackoverflow.com users 280650 h0tw1r3 in his answer . And used help from drew010 http : stackoverflow.com users 892493 drew010 for extracting the link by using .. . .. . in addition to the code provided by h0tw1r3 http : stackoverflow.com users 280650 h0tw1r3 . Anyways thanks to xjstratedgebx http : stackoverflow.com users 4132627 xjstratedgebx for trying .", "Question : Here are some examples of imgur links : .. . .. . The imgur API specifically asks for the ID https : api.imgur.com models image of the image s2Bqq 26xcQUF etc but offers no way from what I ve seen to get the ID of an image given a link . So my question is how would I using PHP get the ID of any imgur link .. . Answer : Take the last component of the path and remove any extension on it . One approach :", "Question : Here are some examples of imgur links : .. . .. . The imgur API specifically asks for the ID https : api.imgur.com models image of the image s2Bqq 26xcQUF etc but offers no way from what I ve seen to get the ID of an image given a link . So my question is how would I using PHP get the ID of any imgur link .. . Answer : This could possibly be done using regular expressions .. . .. . A simple example would be .+ + . + which matches the last part of the url minus any extension present . To use it in PHP preg-match .+ + . + url matches and matches 1 will have the id .", "Question : Here are some examples of imgur links : .. . .. . The imgur API specifically asks for the ID https : api.imgur.com models image of the image s2Bqq 26xcQUF etc but offers no way from what I ve seen to get the ID of an image given a link . So my question is how would I using PHP get the ID of any imgur link .. . Answer : With parse-url you can obtain all your information : .. . .. . In this case just do : .. . .. . Live : http : ideone.com 0N6cmj Comment : The substr bit will work incorrectly for links that don t have an extension or which have extensions which aren t exactly three characters long .", "Question : null .. . Answer : I ve been trying to upload images to Imgur although the following code successfully uploads the image anonymously to Imgur it doesn t work for uploading to one s account . After searching a bit I found out that it d be needed to authenticate to Imgur and then upload to it . I stuck upon this question http : stackoverflow.com questions 21448005 how-do-i-upload-to-an-imgur-users-account and tried doing what the answers suggested . I changed the following .. . .. . line of the code to : .. . .. . With no success I searched a bit more and discovered I d need to use Oauth for getting the access token but I wasn t able to gather enough information to write the authentication part of the code so the question is : .. . .. . .. . .. . How to authenticate to Imgur programmatically using DotNetOpenAuth for OAuth and then upload the image like I was able to do before but in an user s account Comment : Accessing imgUr thru OAuth uploading to user account http : stackoverflow.com a 24270278 1070452 dies it manually rather than using DotNetOpenAuth but it shows the steps and code for uploading Comment : @Plutonix please note that I m using C Comment : Yes but the ImgUr process is the same and nearly all the methods used in the answer are NET methods with lots of comments to explain Comment : ...It also shows that you should use Client-ID for uploaded anonymously but Bearer + the token for uploading to the user account . See the DoImageUpLoad method Comment : Yes as I said in the question I ve tried that the problem though lies in how to request the token", "Question : null .. . Answer : I m trying to write an app using Node.js and Express.js I m working through the Free Code Camp curriculum if that s useful information that takes in a search term and sends and inquiry to the Imgur API and report back some data about images related to the search term . I ve registered my application and received the necessary Client-ID and have included a header per the documentation here and am getting a statusCode of 200 from Imgur but instead of any data I m getting a number of other properties in the returned object that are not useful . What do I need to do to get image data from Imgur based on a search term The URL I m sending the request to : https : api.imgur.com 3 gallery search search term per the documentation here : https : api.imgur.com endpoints gallery gallery-search . The response is not in the format described .. . .. . Search function : .. . .. . The output : .. . .. . Got response : 200 readableState readable domain events eventsCount maxListeners socket connection httpVersionMajor httpVersionMinor httpVersion complete headers rawHeaders trailers rawTrailers upgrade url method statusCode statusMessage client consuming dumped req .. . .. . Based on the documentation the image data should be in a data property is not returned with the above properties .", "Question : I m looking to create an Apache site using PHP so that each time a person directs to it it will grab a random image from a previously created Imgur album full of images and display the image onload without ever leaving the website . I am thinking I would need to use the Imgur API to make this sort of thing with php but I don t know where to start . Does anybody know how I may be able to do this I made this javascript alternative using arrays but this only fetches images listed in the javascript code I would like to make use of the Imgur API and automatically fetch all the images URLs from the Imgur album and randomly pick one to display every time the user loads the webpage . .. . Answer : This is a json returned from an album using the imgur api you can transform this json into an array within PHP and then use array rand to select a random one : .. . .. . More information in the IMGUR API Documentation https : api.imgur.com models album .. . .. . Being json the string coming from imgur servers this code will gather a random link : Comment : How would you parse that into PHP json decode perhaps Comment : Precisely json decode creates an array out of a json string . Comment : I m a little lost from then on . I understand that I have to get a certain value from inside the array but I m not that familiar with JSON myself . Comment : ok let me see what i can do Comment : Would something like this help jsonArr json decode str TRUE rand array-key array rand jsonArr echo jsonArr rand array-key id", "Question : null .. . Answer : I would like to use imgur http : imgur.com to upload images . Information about this I found on this page http : api.imgur.com endpoints image image-upload . To upload I use this code : .. . .. . But I get this error : .. . .. . string 105 data : error : Invalid URL request : 3 image method : POST success : false status : 400 .. . .. . Tell me please what url need .. . .. . UPD .. . .. . I also tried this link https : api.imgur.com 3 image : .. . .. . But I get an error again : .. . .. . string 103 data : error : Invalid URL request : 3 image method : POST success : false status : 400 .. . .. . More about link https : imgur-apiv3.p.mashape.com 3 image : .. . .. . http : api.imgur.com .. . .. . Commercial Usage .. . .. . Your application is commercial if you re making any money with it which includes in-app advertising if plan on making any money with it or if it belongs-to a commercial organization . To use Imgur s API commercially you must first register your application . Once that s done you must register with Mashape . Mashape allows you to choose a pricing plan that fits your needs . From then on the API endpoint is https : imgur-apiv3.p.mashape.com which must be used in replace of https : api.imgur.com . Additionally you must set a X-Mashape-Key request header with the key obtained from Mashape . The difference is that we use a different link and send key . Link on method - https : market.mashape.com imgur imgur-9 image-upload", "Question : I was about to ask a question about a JSFiddle and I noticed that the images which I ve got on Imgur don t show up . If I load the image directly in the browser and then reload the fiddle the picture shows up but if you haven t already loaded the pictures they won t display . Is there a way I can fix this Or do I just need to host the pictures on a different site Here s the link-to the fiddle : http : jsfiddle.net r4crr 3 .. . .. . And here s a bit of dumb code from the fiddle that it appears is actually irrelevant . Comment : link-to the jsfiddle Comment : Sure but I ve noticed this with other JSfiddles that use imgur as well so it s not just mine . Probably . .. . Answer : For whatever reason imgur is blocking the images from jsfiddle and jsbin . Perhaps there were abuses coming in I am not sure as to the why . The images are blocked based on the referrer . It would be possible to implement a bypass where the images were proloaded in an iframe which spoofed the referrer . That seems a little over the top though . It would work for the same reason that you can see the images in the fiddle after you visit the imgur url for the image because it is cached .", "Question : null .. . Answer : I have a script which generates the authentication url for IMGUR and do some image uploading . So I create the authentication URL which allows the script to use the IMGUR API which simply doesn t open . And if I use webbrowser.open url 0 it opens a new tab on the default browser . I need the script to open in the same page from which the script is invoked .", "Question : I m using MashApe API to upload images to Imgur using PHP as follows : .. . .. . but it always give me the following error : Image is corrupted or format is not supported . .. . Answer : If you downloaded a webm and changed the file-type to gif when you saved it the conversion is too corrupt for imgur . Try Cloudconvert https : cloudconvert.com webm-to-gif until one of us figures out how to do it offline . I recommend ShareX for automatic uploads to imgur .", "Question : I m using this code to get data about an Imgur Image . I assume this doesn t require Oauth2 excepts the client ID in the header . However I m receiving Permission Denied error . Does it require access token or something .. . Answer : Using requests.get instead of requests.post solved the issue . Fixed code .", "Question : I m trying to use Javascript to upload a png to imgur http : imgur.com . I ve used the code directly from the Imgur API example http : api.imgur.com examples but I don t think I am passing the png file properly as I get an error message saying file.type is undefined . I think the file is ok as I ve tried this with a few different pngs . My code is as follows : .. . .. . The png file test.png is stored in the same directory as my html file . .. . Answer : The example you are using expects that you use input element type file to upload some image . Try this example http : 29a.ch 2011 9 11 uploading-from-html5-canvas-to-imgur-data-uri . You can access image data using a Canvas like this http : stackoverflow.com questions 934012 get-image-data-in-javascript . To summarize you ll need to do this : .. . .. . 1 . Create new Image with your file needs to be on local domain .. . 2 . Draw the image to a Canvas at onload .. . 3 . Extract image data using this method http : stackoverflow.com questions 934012 get-image-data-in-javascript .. . 4 . Pass that data to imgur like here http : 29a.ch 2011 9 11 uploading-from-html5-canvas-to-imgur-data-uri Comment : Thanks for the suggestions . For adding an image to the canvas is that the image id I assume I can t refer to it using the filename based on @skimberk1 s comment . Comment : There s no way to refer to the image using filename . You ll need to load it to an img element and then load its contents to a canvas using drawImage . It is important to do this latter part at the img s onload handler . Otherwise it won t work . Comment : Thanks bebraw that helps me understand the flow . I m experimenting with html2canvas.hertzen.com http : html2canvas.hertzen.com at the moment it looks like it will do part of these steps . Comment : Awesome . Hopefully you ll get it to work . :", "Question : I was about to ask a question about a JSFiddle and I noticed that the images which I ve got on Imgur don t show up . If I load the image directly in the browser and then reload the fiddle the picture shows up but if you haven t already loaded the pictures they won t display . Is there a way I can fix this Or do I just need to host the pictures on a different site Here s the link-to the fiddle : http : jsfiddle.net r4crr 3 .. . .. . And here s a bit of dumb code from the fiddle that it appears is actually irrelevant . Comment : link-to the jsfiddle Comment : Sure but I ve noticed this with other JSfiddles that use imgur as well so it s not just mine . Probably . .. . Answer : Opened up Chrome s network panel and noticed that those urls were getting 403 - Forbidden from imgur . Not sure why . So I opened the imgur url in a new tab then went back to jsfiddle and hit run . Bingo the image showed up . Had to do this for all of the images which is not great . Looks like other people have run into this problem but there wasn t any solution to it . Comment : So yeah.. . that s basically exactly what I said the problem was . -1 Comment : Did you mention 403 - Forbidden No you didn t . Way to encourage people to help you . Comment : It s not so much a matter of encouraging people as trying to get a good answer . Mentioning the 403 in a comment.. . I d probably have +1ed that . It s helpful information sure . However your answer isn t actually an answer . Comment : Looks like other people have run into this problem but there wasn t any solution to it and those urls were getting 403 - Forbidden .. . in short I don t think you ll find an answer to this . Imgur might be blocking it people brought this up on imgurs uservoice . Comment : Doubt this will help but : imgur.userecho.com topic 120841-403-forbidden-on-jsfiddlenet http : imgur.userecho.com topic 120841-403-forbidden-on-jsfiddlenet", "Question : null .. . Answer : I am using the commercial version of Imgur API v3 through Mashape : https : market.mashape.com imgur imgur-9 .. . .. . I am trying to figure out how to modify the authentication steps when using the Mashape endpoint url https : imgur-apiv3.p.mashape.com instead of the regular endpoint https : api.imgur.com . However when I use https : imgur-apiv3.p.mashape.com oauth2 authorization client id CLIENT ID response type token as the authorization URL it loads the official Imgur Zoinks You ve taken a wrong turn page . I include X-Mashape-Key MASHAPE KEY as a request header if I don t include this I do get the missing Mashape key error . The authorization does work when using the regular imgur api url i.e . https : api.imgur.com oauth2 authorization client id CLIENT ID response type token . I have the same issue when making a POST request to https : imgur-apiv3.p.mashape.com oauth2 token to get a new access token from a refresh token . So my question is are you supposed to use the normal api.imgur.com endpoint for authorization and refreshing the access token It works for me but the POST request do that endpoint does decrease the number of POST credits for the app 1250 per hour . I don t see any credits decreasing when using the https : api.imgur.com oauth2 authorization to get the access token but I m not sure if this is unlimited with this url endpoint . Sources : .. . .. . https : market.mashape.com imgur imgur-9 .. . .. . http : api.imgur.com commercial", "Question : I m playing around in python trying to download some images from imgur . I ve been using the urrlib and urllib.retrieve but you need to specify the extension when saving the file . This isn t a problem for most posts since the link has for example .jpg in it but I m not sure what to do when the extension isn t there . My question is if there is any way to determine the image format of the file before downloading it . The question is mostly imgur specific but I wouldn t mind a solution for most image-hosting sites . Thanks in advance Comment : Imgur has an API http : api.imgur.com . You should look into that instead of scraping manually . Otherwise there is always the imghdr module https : docs.python.org 3 library imghdr.html . Comment : Ah thanks I ll look into it .. . Answer : Assuming the picture has no file extension there s no way to determine which type it is before you download it . All image-formats sets their initial bytes to a particular value . To inspect these magic initial bytes check out https : github.com ahupp python-magic - it matches the initial bytes against known image-formats . The code below downloads a picture from imgur and determines which file-type it is .", "Question : null .. . Answer : I have trying to create a simple upload ui for an image . On the click of the button upload it using the imgur API . And return the image url and display the image . I have tried to follow this : https : kodejava.org how-do-i-create-a-web-based-file-upload but this is for server upload. . .. . .. . Also tried to follow : Simple Java Imgur Upload http : stackoverflow.com questions 29716927 simple-java-imgur-upload .. . .. . It would be really helpful if someone could show a simple example . Comment : Please clarify your specific problem or add additional details to highlight exactly what you need . As it s currently written it s hard to tell exactly what you re asking . See the How to Ask page for help clarifying this question . Comment : @RomanC - Sorry had forgotten the last sentence .", "Question : Here s a challenge to all mathematica tag followers . Let s make it a lot more convenient to insert images into SO post from Mathematica by creating an imgur http : imgur.com uploader . How can we create a function imgur g that will rasterize its argument making sure that the final size is not wider than the width of StackOverflow posts convert it to PNG upload it to imgur and return a ready to be pasted MarkDown http : daringfireball.net projects markdown syntax img line such as Mathematica graphic http : i.imgur.com ZENa4.jpg Useful references : .. . .. . Imgur API http : api.imgur.com anonapi .. . Example of using POST request from Mathematica on WRI blog posting to Twitter http : blog.wolfram.com 2009 04 30 twittering-with-mathematica by ragfield http : stackoverflow.com users 236064 ragfield .. . Example of using POST requests from Mathematica on SO uploading to ifile.it http : stackoverflow.com questions 5853134 upload-to-ifile-it-through-mathematica .. . .. . I failed to adapt this latter method to uploading an image without exporting it to a file first . .. . .. . Warning use with care StackOverflow uses a separate imgur installation http : blog.stackoverflow.com 2010 08 new-image-upload-support that keep images indefinitely . If you use the main imgur the images will disappear after 6 months if no one views them http : imgur.com faq long . Unfortunately as of 2011 November there seems to be no official way http : stackapps.com questions 2664 is-there-an-api-to-upload-images-to-ses-imgur-installation to upload images to StackOverflow programmatically . .. . .. . Update : See below http : stackoverflow.com a 8343460 695132 a solution for uploading to StackOverflow directly . Comment : Please note that uploading to http : i.stack.imgur.com is more difficult you ll have to drive the SO interface Comment : @belisarius Oops I didn t realize that StackOverflow uses a separate imgur site .. . On the main imgur site the images might not be kept forever so perhaps it s not a good idea to use it for SO imgur.com faq long http : imgur.com faq long at least 1 view 6 months is needed for them to be kept Comment : Posting graphics manually isn t really that hard in V8 . Right mouse a graphic choose Save Image as.. . . Then the file dialog opens where it was last time which usually is my desktop where a file called output.png is already waiting to be overwritten by its next incarnation . Two clicks is all it takes two more clicks and its posted in my SO answer box . Takes 15 seconds at most . Getting the Markdown line and pasting that will take about the same time . Comment : @Sjoerd When posting in the tag image-processing tag tag I have to repeat that again and again .. . Comment : @belisarius But with the proposed solution you would have to type imgur g for every figure you want to include too plus copying and pasting the markdown text . There really doesn t seem to be much of a difference in terms of effort . .. . Answer : Note : This is using the anonymous imgur uploader with my anonymous key . The imgur site restricts uploads to 50 uploads hour which should be fine normally but this may cause a problem if a lot of people try this simultaneously . So please get your own anonymous key here : .. . .. . http : imgur.com register api anon .. . .. . And then replace the key in the code below with your own key thanks . The trickiest part to code was the conversion from a Mathematica expression to PNG image to Base64 encoding to URL encoding . There are about a 1 000 ways to do it wrong and I think I managed to try them all . The code breaks down into a few pieces : .. . .. . Construct the POST url .. . Make the HTTP connection .. . Send the POST url .. . Read back the result which is XML .. . Extract the imgur url from the XML .. . Format the imgur url as markdown or as a Mathematica Hyperlink function . Here is the code : .. . .. . Testing : .. . .. . And the actual image : .. . .. . Mathematica graphic http : i.imgur.com eGOlL.png Comment : Is there a way to do the encoding and the uploading within Mathematica itself without resorting to JLink +1 btw . Comment : I got errors : Java : : excptn : A Java exception occurred : java.io.IOException : Server returned HTTP response code : 400 for URL : http : api.imgur.com 2 upload at sun.net.www.protocol.http.HttpURLConnection.getInputStream HttpURLConnection.jav a : 1290 . XML Parser XMLGetString : : string : String expected at position 1 in XML Parser XMLGetString EndOfFile . Comment : @Mr.Wizard -- I see this with V7 too now . V7 is doing something different with Base64 encoding : ExportString ExportString 1 PNG Base64 . I m checking for a V7 solution . Comment : Also having to put together the query-string like that seems a bit clunky . I d probably replace it with queryString enc String q : String String . . : StringJoin@Riffle URLEncoder encode 1 enc URLEncoder encode 2 enc @@@ q . Comment : @Mr.Wizard -- In V7 replace the line that sets image with this : image Developer EncodeBase64 ExportString expr PNG Let me know if that solves the V7 issue it did for me .", "Question : Trying to upload users image but without success . HTML : .. . .. . Front-End JS : .. . .. . Node.js that we sending a request to : .. . .. . function req res var form new formidable.IncomingForm .. . .. . .. . .. . But I get just : .. . .. . But when tested auth with this curl it is working OK : .. . .. . PLEASE what would be the unirest.post Do I need provide more information .. . Answer : Unfortunately the Node.js example code on Mashape https : market.mashape.com imgur imgur-9 image-upload is wrong you should use this : Comment : All of the examples on Mashape are wrong.. . They should use yours .", "Question : Who i can resize image before post it on imgur I have already tested link like http : i.imgur.com XXXXXl.png but i need to resize before .. . .. . Thanks .. . Answer : CURL is not an image-processing library . You will have to process the image in some way for example using the GD functions : .. . .. . http : php.net manual en book.image.php .. . .. . There are also many free image-processing libraries you can search for on Google ." ] }
[ "yes-answer-long", "yes-answer-short" ]
hosting
UNK_RELATION
komodo@python@76
komodo -- komodo edit is a code editor for several languages including php @placeholder javascript xslt xml xhtml and html which provides syntax-highlighting autocomplete ftp sftp support etc .
{ "confidence": [ 54.85595703125, 51.169525146484375, 49.32770538330078, 46.30039978027344, 46.30039978027344, 45.941139221191406, 45.941139221191406, 45.295799255371094, 45.23830032348633, 45.10422897338867, 45.06676483154297, 45.01536178588867, 44.773956298828125, 44.57204055786133, 44.34015655517578, 43.87437438964844, 42.334651947021484, 42.26580810546875, 42.1671028137207, 42.141605377197266, 42.06680679321289, 41.70753860473633, 41.70753860473633, 41.70753860473633, 41.48100662231445, 41.48100662231445, 41.120819091796875, 41.120819091796875, 41.02873229980469, 40.843101501464844, 40.685508728027344, 40.64543914794922, 40.64543914794922, 40.64543914794922, 40.64543914794922, 40.64543914794922, 40.579708099365234, 40.579708099365234, 40.23512268066406, 39.8724365234375, 39.73175048828125, 39.62258529663086, 39.37248229980469, 39.35375213623047, 39.29048538208008, 39.08350372314453, 38.891475677490234, 38.81792449951172, 38.81792449951172, 38.81792449951172, 38.81792449951172, 38.81440734863281, 38.696929931640625, 38.696929931640625, 38.4158821105957, 38.36565017700195, 38.27145767211914, 38.27145767211914, 38.27145767211914, 38.14150619506836, 38.14150619506836, 38.14150619506836, 37.76780700683594, 37.712120056152344, 37.712120056152344, 37.712120056152344, 37.712120056152344, 37.712120056152344, 37.635353088378906, 37.54497146606445, 37.42217254638672, 37.33243179321289, 37.33243179321289, 37.33243179321289, 37.31367111206055, 37.31367111206055, 37.20935821533203, 37.20935821533203, 37.20935821533203, 37.20935821533203, 37.17921447753906, 36.89635467529297, 36.829734802246094, 36.66357421875, 36.48481750488281, 36.3941650390625, 36.36187744140625, 36.35110855102539, 36.31696701049805, 36.29877471923828, 36.25157165527344, 36.25157165527344, 36.25157165527344, 36.14047622680664, 36.12464904785156, 36.11113739013672, 36.11113739013672, 36.11113739013672, 36.11113739013672 ], "content": [ "Code formatters including HTML are included with the paid version of Komodo KomodoIDE but not in the free version Komodo Edit .", "Komodo php autocomplete didn t work for me too .", "I used Komodo Edit for writing PHP scripts and have update Komodo Edit to 9.3 version .", "No that is not possible in Komodo Edit .", "This is not supported by Komodo Edit 10 .", "So is there a way to do it in Komodo Edit", "I am new to KOMODO EDIT .", "I haven t updated to latest version of Komodo Edit yet but in Komodo Edit version 9 on Windows 10 autocomplete works just fine .", "I use Komodo edit .", "Posting in the Komodo support forum may get more attention community.activestate.com forums komodo http : community.activestate.com forums komodo", "You may have a better chance of getting a response at the official Komodo forum : community.activestate.com forums komodo-support http : community.activestate.com forums komodo-support", "Komodo Edit doesn t have a Perl debugger and Komodo IDE is not free", "possible duplicate of Komodo Edit Function and Require autocompletion http : stackoverflow.com questions 10857062 komodo-edit-function-and-require-autocompletion", "Is there any way to configure Komodo Edit to use Django modules for autocomplete as well", "Is there any analog function in Komodo Edit", "I m working with Komodo 8.5", "I m using Komodo IDE to debug PHP .", "You re running an older version of Komodo .", "If I have a xyz.vim file is there an easy way to have Komodo use that for syntax-highlighting or an easy way to import convert to a Komodo format so I don t have to reinvent the wheel", "Komodo has this functionality built-in Check Preferences Editor Smart Editing Variable highlighting .", "Apparently Komodo does not support node.js 12.. . yet .", "I m using Komodo Edit 9.0 to write codes .", "I m using Komodo Edit as an IDE for PERL .", "I am using Komodo Edit for website coding .", "Have you used Komodo", "Hi there Komodo dev here .", "yes Not within Komodo is outside Komodo is what I meant", "I m using Komodo IDE 9 Komodo 8.5 works just fine .", "From the guys at Komodo .. . .. . The problem is that Komodo doesn t know the context of the anonymous function-call - in other words Komodo is not smart enough to know that jQuery in this case .", "However Komodo doesn t let me step-through my PHP code instead it just runs through the code in a pane in the bottom-right of the Komodo window .", "I usually use Komodo Edit since it recognizes the file types of all my other languages .", "Komodo Edit http : www.activestate.com komodo edit is free .", "Try to mention your OS and version of Komodo Edit .", "I just downloaded and started using Komodo Edit .", "I use both Komodo Edit and Notepad++ .", "Komodo Edit 8.5.3 has a memory leak problem .", "I am using Komodo Edit 8 and its autocomplete feature is totally annoying .", "Komodo Edit 10 Autocomplete not show options list as notepad++ when I press ctrl+space .", "Goto Edit Preferences Languages then add the file paths under PHP http : docs.activestate.com komodo 4.4 prefs.html PHP or the relevant language .", "I am using arm komodo .", "I m trying to enable PerlCritic support in Komodo .", "The nsIFile interface provides this : .. . .. . The Komodo preferences service would also be an option : .. . .. . References .. . .. . How do I get the path of the project folder http : community.activestate.com node 6535 .. . Getting Special Files https : developer.mozilla.org en-US Add-ons Code snippets File I O Getting special files .. . Komodo JS Macro - insert a relative-path from the current editor file http : code.activestate.com recipes 577306 .. . mruDirectory https : github.com Komodo KomodoEdit blob master src prefs prefs.p.xml L106 .. . XPCOM API Reference http : www-archive.mozilla.org projects xpcom book cxc html appB.html .. . Komodo Profile Structure http : community.activestate.com faq komodo-profile-structure .. . Where does Komodo Store File Preferences http : community.activestate.com forum where-does-komodo-store-file-preferences .. . Getting Setting a Komodo Preference http : community.activestate.com faq getting-setting-komodo-preference", "There is an add-on for this that was included with Komodo Edit 5.x by default .", "You can use the Komodo interpolation feature : .. . .. . python F .. . .. . That tells Komodo to use the Python2 interpreter configured in your preferences and to run the currently active file in the editor .", "Is there any add-on which adds multirow tabs support to Komodo Edit environment something like the TooManyTabs add-on for Firefox", "Is there a keyboard shortcut or menu item I m not seeing somewhere to format my html in Komodo Edit", "You ll want to use the Komodo Editor SDK http : docs.komodoide.com SDK api commonjs editor .", "I work with Komodo .", "Komodo is truly cross-platform .", "Like Komodo better .", "Komodo Pros : Like it better .", "EDIT : I m using komodo edit version 10 and I m running on OSX", "When I open .php files my Komodo gives me this error .. . .. .", "I installed komodo IDE 8.5 to write and test php codes .", "I just work on the Komodo core code .", "This is the oldest one I can find for Komodo IDE 4.4 : docs.activestate.com komodo 4.4 debugperl.html http : docs.activestate.com komodo 4.4 debugperl.html", "I ve created a project with komodo IDE : .. . .. .", "and this is what the Komodo Error log shows : .. . .. .", "Thanks for the tip about Komodo 7 .", "I bet the developers of Komodo Edit don t use this feature .", "You don t need class attributes for Komodo Edit hinting .", "I use Komodo Edit 8.5 and I have problems with tabs .", "Is it possible to run a part of code in Komodo IDE 7 line by line", "looping a subtraction 10 times in assembly komodo .", "Komodo will scan them for information about your functions .", "Trying out komodo to build a jquery-ui widget. .", "Without it : .. . .. . Komodo knows both and jQuery as globals .", "This is currently not possible through native functionality in Komodo .", "Komodo has a macro API http : docs.activestate.com komodo 6.1 macroapi.html which can automate switching between the two patterns .", "I m using Komodo IDE .", "In 9.3 you can see this in View Tabs Sidebars Notifications and in Komodo X you can see this in the Go to Anything field at the top of the window it will tell you that Komodo is scanning your code .", "screenshots here : imgur.com a PylIB .. . .. . Komodo Edit version 8.5.4 build 14424 platform macosx .", "screenshots here : imgur.com a PylIB http : imgur.com a PylIB Komodo Edit version 8.5.4 build 14424 platform macosx .", "I am using Komodo Edit 9.3 to write some Ruby files for a project I am working on .", "The Komodo dev team monitors the Komodo forums if you want a quicker reply : http : forum.komodoide.com", "References .. . .. . ActiveState Komodo : Configuring Indentation http : docs.activestate.com komodo 8.5 prefs.html Indentation Features", "But I have no experience doing this in Komodo .", "Would it be possible to add and debug it in komodo", "I did also reinstall Komodo .", "I installed Komodo before php5 .", "Komodo used to show me tabs of open files but one day they disappeared .", "Update : .. . .. . I ve found a way to trick Komodo into doing this : .. . .. . This works at least on Komodo 5.2 and has no side effects but is sure to confuse whoever reads your code .", "Installing php wasn t good enough I had to also delete the config files in .komodo-edit or whatever folder it created .", "However rather than stepping through the code for that .php page and stopping at any breakpoints Komodo just runs through all of the code in the page in a pane towards the bottom-left of the Komodo window .", "I ve always liked Komodo but I m starting to get annoyed by something : .. . .. . The autocomplete is way too slow buggy .", "I use Git and Komodo 9 but I suggest for SVN and older version of Komodo this should works also for version six please look at How to integrate FileMerge with Komodo 6 IDE http : stackoverflow.com a 4288753 3364871 .", "I ve setup komodo IDE together with xdebug to do remote debugging PHP .", "Update you post with Error logs Help Troubleshooting View Log File version of Komodo Help About Komodo and OS type and version .", "Ive been using komodo edit recently to go through a few django tutorials and ive been impressed with the level of code-completion it provides for the framework .", "Komodo IDE calls this feature code intelligence http : docs.activestate.com komodo 8.5 prefs.html code intel and here are a few unrelated questions on controlling it : .. . .. . Komodo Edit disable autocomple http : stackoverflow.com questions 15666599 1113772 .. . .. . Calltips Docstring while viewing function list", "I am looking for a Windows Perl IDE with debugger like Komodo http : www.activestate.com komodo but free .", "There is stuff about that in the Komodo documentation but I don t know if it already works in Komodo 3 .", "Have you tried following the steps listed at : docs.activestate.com komodo 7.0 debugphp.html http : docs.activestate.com komodo 7.0 debugphp.html", "I haven t found a way to do it with Komodo though apparently it s possible http : community.activestate.com forum-topic getting-more-your-php-and-javascript-code when writing PHP or JavaScript .", "Does Komodo IDE have an extension or native support for Live preview", "If not you could conclude that Komodo is doing the job .", "There is a good chance that some Komodo-specific modules are loaded .", "Komodo could hardly influence something internal .", "I am very new to perl and Komodo ." ] }
{ "confidence": [ 71.55674743652344, 67.04389953613281, 61.6064453125, 60.26638412475586, 59.34934997558594, 56.65464401245117, 56.20619201660156, 56.1574821472168, 56.023807525634766, 54.837371826171875, 54.6318244934082, 54.63134002685547, 54.63127899169922, 54.29261016845703, 54.17267608642578, 54.0378303527832, 53.930458068847656, 53.912757873535156, 53.894657135009766, 53.63069152832031 ], "content": [ "Question : I write in a custom scripting-language a lot . I have a vim syntax file which is great for syntax-highlighting when editing in vim . I write in several languages throughout the day on an almost daily basis . I usually use Komodo Edit since it recognizes the file types of all my other languages . Unfortunately for my custom scripting-language Komodo just sets it as file-type Text . Is there a way I can tell Komodo that files with extension .xyz are of file-type XYZ If I have a xyz.vim file is there an easy way to have Komodo use that for syntax-highlighting or an easy way to import convert to a Komodo format so I don t have to reinvent the wheel Thanks .. . Answer : You can define a new language for Komodo using the wizard.. . .. . .. . Project New from template Create Komodo Language .. . .. . and just fill in the blanks like a list of your language s keywords and file name extension . The current code it generates to implement this is a little buggy though it still works ok . If you are using Komodo 9 may see a pop-up log warning box . In 8 the warning still occurs though you need to pull up the error-log yourself to see it Help Troubleshooting View log file . A fix is promised in the 9.2 version .", "Question : I ve been trying out Komodo IDE 6 for the last few days . I ve always liked Komodo but I m starting to get annoyed by something : .. . .. . The autocomplete is way too slow buggy . .. . .. . Certain variables just won t give any autocomplete tips . Sometimes you have to backspace the dot and try over and over again . It also has a hard time giving autocomplete info for an object that has been created using a class in a namespace . Has anyone else had any problems with these things Are there any better alternatives Comment : You may have a better chance of getting a response at the official Komodo forum : community.activestate.com forums komodo-support http : community.activestate.com forums komodo-support Comment : Same thing happens to me with eclipse . So annoying . .. . Answer : Use JSDoc http : community.activestate.com forum-topic getting-more-your-php-and-javascript-code to add custom autocomplete calltips . Comment : Adding JSDoc comments really helped . I even made a dummy file containing object layouts I could reference later on and Komodo would autocomplete them perfectly . A shame it doesn t do the same for node.js Comment : Cool . You can add it to the Komodo Edit wiki https : en.wikibooks.org wiki Komodo Edit for future reference .", "Question : I got a real problem with Komodo Edit v8.5.3 : I use XAMPP XAMPP v1.8.3 PHP : 5.5.6 to provide a local hosted server for Komodo . .. . .. . After restarting I tested this feature : But no autocomplet and calltips syntax checking did sometimes work .. . If I wrote some code it began to scan the php directory of XAMPP for completing but this search got freezed everytime somewhere in the PEAR directory . I don t really understand what s wrong with Komodo and XAMPP . I did also reinstall Komodo . Komodo is great but withoutd this the most importent feature is impossible . .. . Answer : Komodo php autocomplete didn t work for me too . My situation might be different but I m sharing for the next Googler to visit . I installed Komodo before php5 . Whoops . Installing php wasn t good enough I had to also delete the config files in .komodo-edit or whatever folder it created . That still wasn t enough I also had to delete the .komodoproject file I was working on as well . Then I was awed by Komodo s awesomeness .", "Question : I am using Komodo Edit 8 and its autocomplete feature is totally annoying . As soon as I type for i it autofills in this : .. . .. . Now i have to delete it manually to continue typing . I tried to turn off Enable automatic autocomplete and calltips triggering when you type from Edit Prefrence Code Intelligence but the problem persists . What s the real way to turn it off .. . Answer : Try this : .. . .. . Edit Preferences Smart Editing Auto-Abbreviation Uncheck Enable Auto-Abbreviation with Trigger Characters Comment : Works for JavaScript too Thanks Comment : OMG...thank you This was driving me nuts Comment : Thank you I spent too much time searching for this option the JavaScript auto complete was too annoying Comment : in 8.5 smart editing is under editor within your preferences . Comment : I bet the developers of Komodo Edit don t use this feature . It s literally disgusting .", "Question : Is there a way for komodo to highlight variables that start with a dollarsign An example would be variables like this : var btn .. . I want to use these variables on javascript . .. . Answer : Komodo has this functionality built-in Check Preferences Editor Smart Editing Variable highlighting .", "Question : Is there a keyboard shortcut or menu item I m not seeing somewhere to format my html in Komodo Edit I m mostly worried about indentation . I have about 1500 lines of jumbled mess from a client I need to clean up before I can start updating his page . .. . Answer : Code formatters including HTML are included with the paid version of Komodo KomodoIDE but not in the free version Komodo Edit .", "Question : I ve been using komodo edit 10 for a while before I buy komodo ide to see if I like it or not especially after I heard about all the features it offers . I use Django a lot for backend web development and one thing I noticed is code intelligence and auto completing doesn t seem to be working . I ve been using Django 1.9.7 on Python 3.5.2 . I m not sure what s happening but any advice on fixing this issue is appreciated . EDIT : I m using komodo edit version 10 and I m running on OSX Comment : I haven t updated to latest version of Komodo Edit yet but in Komodo Edit version 9 on Windows 10 autocomplete works just fine . Try to mention your OS and version of Komodo Edit . .. . Answer : It s not clear what you ve tried or whats not working ie . what did you type and what did you expect to happen so I ll just explain how Komodo does it s thing : .. . .. . When you open your Django project root in Komodo Places View Tabs Sidebars Places Komodo should start scanning your project to include that code in Komodo s code intel database . You may need to trigger a code intel event Ctrl + J in the editor to start the scan . You ll see in the notifications View Tabs Sidebars Notifications that Komodo is scanning your code . While this is scanning you can continue to use Komodo but there will be no Code Intel suggestions at all . When it has finished scanning you will get completions for the Python code Komodo found in your project . The above assumes you keep your Django code in your project root . If you don t you must open Preferences Languages Python Python 3 depending on whether you re using Python 2 or 3 scroll to Additional Python Import Dirs and add the location of your Django source trigger a Completions event same as above and wait for scan to complete . So that s pretty much it . If you re not getting ANY completions then you have to wait for Komodo to finish scanning . If you re only missing Django completions you have to make sure Komodo knows about your Django source and where it s located . Comment : I tried your first suggestion and this is the output from notifications : imgur.com a TxCHR http : imgur.com a TxCHR I also tried your last suggestion and I m not too sure which part of my django folder I need to go to . Is there a specific directory in my django project I need to direct komodo to Comment : re : image . The first notification says it s done scanning . Komodo is giving those warnings becuase there is no known symbol to complete on based on what you ve typed . Re : Django dirs . Sorry I have no idea . I don t do Django development . I just work on the Komodo core code . I watched this video from one of our previous developers https : www.youtube.com watch v TZP5T3ag118 and it looks like there should be bin include and lib dirs in your project . Those likely contains the Django specific code . If it s still not working please provided an example of exactly what you re typing .", "Question : I m using Komodo Edit for Python http : en.wikipedia.org wiki Python 5F 28programming 5Flanguage 29 development and I want to get the best out of the auto complete . If I do this : .. . .. . I can see a list of members of A . But if I do this : .. . .. . It does not work . I want to be able to do this : .. . .. . So how can I tell the auto complete that b is of type A .. . Answer : This doesn t really answer your question but with Wing IDE http : en.wikipedia.org wiki Wing 5FIDE you can give hints to the type analyzer with assert isinstance b A . See here http : www.wingware.com doc edit helping-wing-analyze-code . I haven t found a way to do it with Komodo though apparently it s possible http : community.activestate.com forum-topic getting-more-your-php-and-javascript-code when writing PHP or JavaScript . Update : .. . .. . I ve found a way to trick Komodo into doing this : .. . .. . This works at least on Komodo 5.2 and has no side effects but is sure to confuse whoever reads your code . Comment : What a horrible hack I m just jealous that you found it first : I d +1 if I hadn t already . Comment : I think I m going to change to Wing IDE . The assert isinstance b A syntax works nicely . Comment : I am happy to find that it also works with my Emacs 24 + Jedi setup .", "Question : I ve been using Komodo Edit for a small project in Django . The code-completion features seem to work pretty well for standard python modules however it doesn t know anything about Django modules . Is there any way to configure Komodo Edit to use Django modules for autocomplete as well .. . Answer : By sure Django is on your python path and Komodo should pick it up . Alternatively you can add the location of Django to where Komodo looks for its autocomplete . Comment : It was already on my python path could import django stuff via plain old python shell however komodo didn t know about it . Manually adding the dist-packages folder fixes it though . Comment : @TM - are you sure you have added the same Python which python in shell in Komodo s preferences as well Komodo internally uses that Python s sys.path which would obviously include dist-packages as well .", "Question : I m using Notepad++ for python development and few days ago I found out about free Komodo Edit . I need Pros and Cons for Python development between this two editors.. . Comment : They re both free so why not try them both and see which you prefer .. . Answer : I use both Komodo Edit and Notepad++ . Notepad++ is a lot quicker to launch and it s more lightweight so I often use it for quick one-off editing . I use Komodo Edit for major projects like my django and wxPython applications . KE is a full-featured IDE so it has a lot more features . Main advantages of Komodo Edit for programming Python : .. . .. . Manage groups of files as projects .. . Use custom commands to run files run nosetests pylint etc . Auto complete syntax checking .. . Mozilla extension system with several useful extensions available .. . Write macros in JavaScript or Python .. . Spell checking .. . .. . Some of the little things that Notepad++ is missing for Python development : .. . .. . Doesn t auto-indent after a colon .. . s You can t set tabs spaces on a file-type basis I like to use tabs for HTML s .. . s No code-completion or tooltips s .. . No on-the-fly syntax checking Comment : Notepad++ has a plugin menu from which you can add a spell checker and other tools . I use the NppExec plugin https : gist.github.com CTimmerman 3fc259d7867c38f6919e with scripts to process and run my Python files whose output is highlighted and linked in Notepad++. .", "Question : I am new to KOMODO EDIT . can anyone knows how to add intellisence to my own files . for example : myFirst.js that includes auto completion for objects or functions that were defined in mySecond.js Also how to add auto completion to my css file from my html file thanks . another example : in visual-studio i put this statment at the begining of file2.js : .. . .. . and then i had intellisence for file1.js inside file2.js Comment : Your question is kind of misleading . Your problem is that code intelligence is not working Comment : yes . what are the steps in order to gain intellisence with my own files Comment : Sorry if my question was unclear . Does code intelligence work at all With some other files that are not yours With builtin functions Do you get a combo if you type window . Comment : inside css file i have intelligence .inside html file i have intelligence for html but not for my css class that where referenced. . inside javascript file i have intelligence for javascript but not for jquery that was included in the html file . I need to know how to include intelligence of one file inside another file . Comment : possible duplicate of Komodo Edit Function and Require autocompletion http : stackoverflow.com questions 10857062 komodo-edit-function-and-require-autocompletion .. . Answer : Open Preferences- Languages- Javascript and specify directory with your source files . Komodo will scan them for information about your functions .", "Question : As some of you might know I am the lead developer of Padre the Perl IDE http : padre.perlide.org . In the first year of its development Padre became an acceptable text-editor with some extra features for Perl development . I d like to ask the Stack Overflow community for some help in driving the project further to turn it into an exceptional IDE for Perl development . So I d be glad to read what do you think what are the most important features of an IDE that are still missing from Padre . Especially I d be interested from people who currently use Eclipse+ EPIC http : www.epic-ide.org Komodo http : en.wikipedia.org wiki ActiveState Komodo Visual Studio or any of the text editors for programmers . Comment : I think you should also care about the opinion of those that use vim yes and also emacs there I said it . These will be the hardest users to win over . Comment : @Manni : as a Vim user I can say that it s overwhelmingly unlikely that I could be won over . My guess is that many most Vim and Emacs there I said it users would feel the same . We know the difference between our preferred editor and a more modern IDE . We prefer ours . Comment : I am a vim user myself - or used to be - and I agree with Telemachus that I don t think the vim or emacs users will switch in large numbers . At least not until we implement the emacs and vim keybindings . In the meantime we encourage them to steal from Padre : code-and-hacks.blogspot.com 2009 07 http : code-and-hacks.blogspot.com 2009 07 stealing-from-padre-for-vim-part-3.html Comment : I don t really buy that Artem . I currently seem to be moving in the opposite direction from Eclipse to g vim . Comment : @Artem Russakovskii what do you think are the features of those IDEs that make the vim emacs users so impressed Do they really switch or are they just impressed .. . Answer : I work with Komodo . I also use other editors but I come back to Komodo most of the time . A good IDE shoud have : .. . .. . 1 . A good Debugger . Breakpoints watch lists everything you need . 2 . Remote debugging . Threads debugging capability . 3 . Syntax highlighting including weighted fonts as well I was pretty disappointed by Oxygen for example a XSLT IDE where I can not use bold fonts to emphasise reserved terms .. . 4 . Syntax completion . 5 . Project management tools preferable extendable by plugins .", "Question : I got a real problem with Komodo Edit v8.5.3 : I use XAMPP XAMPP v1.8.3 PHP : 5.5.6 to provide a local hosted server for Komodo . .. . .. . After restarting I tested this feature : But no autocomplet and calltips syntax checking did sometimes work .. . If I wrote some code it began to scan the php directory of XAMPP for completing but this search got freezed everytime somewhere in the PEAR directory . I don t really understand what s wrong with Komodo and XAMPP . I did also reinstall Komodo . Komodo is great but withoutd this the most importent feature is impossible . .. . Answer : Komodo Edit 8.5.3 has a memory leak problem . To confirm this check your process list and you will see Komodo Edit main thread and Python child thread . Watch to see the memory-footprint of the Python thread as the scan progresses . If the memory is large for me is was over 1GB try upgrading to a later release . At time of writing this you can find version 8.5.4 here : .. . .. . http : downloads.activestate.com Komodo nightly komodoide latest", "Question : I am using Komodo Edit 8 and its autocomplete feature is totally annoying . As soon as I type for i it autofills in this : .. . .. . Now i have to delete it manually to continue typing . I tried to turn off Enable automatic autocomplete and calltips triggering when you type from Edit Prefrence Code Intelligence but the problem persists . What s the real way to turn it off .. . Answer : on mac it s under Preference - Editor - Smart Editing - Auto-Abbreviations", "Question : I have heard a lot about Komodo IDE . Does Komodo IDE have an extension or native support for Live preview Could Komodo IDE be extended to have some sort of live-preview when editing CSS and HTML I really want to try an IDE or editor with something like live-preview with good code hinting when editing CSS . I know Expresso has LivePreview but it is only for Mac and I am using Windows . Sublime Text with LiveReload is great but the code hinting is a little poor . Are there other editors IDE that offer this feature Comment : Live Preview of what exactly Comment : Live Preview of CSS and HTML So as I edit my CSS and HTML I get the see the preview on the browser . .. . Answer : There is a Komodo macro http : community.activestate.com forum shortcut-key-reload-browser-preview-tab which can be extended to auto reload all browser preview http : docs.activestate.com komodo 8.0 editor.html browser preview tabs using setInterval :", "Question : I m working on a KomodoIDE KomodoEdit extension that creates a new file and then opens it in a new editing tab using .. . .. . which works but I would also like it to set Komodo s default directory to the same directory where this file lives but I don t see a way to do that automatically . I found the doCommand.. . .. . .. . but this just launches a file dialog that asks the user to pick a directory . I d like to do something to set it programatically using something like.. . .. . .. . which I know doesn t work but is sort of the idea . .. . Answer : The nsIFile interface provides this : .. . .. . The Komodo preferences service would also be an option : .. . .. . References .. . .. . How do I get the path of the project folder http : community.activestate.com node 6535 .. . Getting Special Files https : developer.mozilla.org en-US Add-ons Code snippets File I O Getting special files .. . Komodo JS Macro - insert a relative-path from the current editor file http : code.activestate.com recipes 577306 .. . mruDirectory https : github.com Komodo KomodoEdit blob master src prefs prefs.p.xml L106 .. . XPCOM API Reference http : www-archive.mozilla.org projects xpcom book cxc html appB.html .. . Komodo Profile Structure http : community.activestate.com faq komodo-profile-structure .. . Where does Komodo Store File Preferences http : community.activestate.com forum where-does-komodo-store-file-preferences .. . Getting Setting a Komodo Preference http : community.activestate.com faq getting-setting-komodo-preference", "Question : I m using Notepad++ for python development and few days ago I found out about free Komodo Edit . I need Pros and Cons for Python development between this two editors.. . Comment : They re both free so why not try them both and see which you prefer .. . Answer : I just downloaded and started using Komodo Edit . I ve been using Notepad++ for awhile . Here is what I think about some of the features : .. . .. . Komodo Edit Pros : .. . .. . You can jump to a function definition even if it s in another file I love this .. . There is a plugin that displays the list of classes functions and such for the current file on the side . Notepad++ used to have a plugin like this but it no longer works with the current version and hasn t been updated in a while . Notepad++ Pros : .. . .. . If you select a word it will highlight all of those words in the current document makes it easier to find misspellings without having to hit Ctrl+F . When working with HTML when the cursor is on in a tag the starting and ending tags are both highlighted .. . .. . Anyone know if either of those last 2 things is possible in Komodo Edit Comment : I m not sure I understand your first point . In Komodo hit Ctrl+F on the current word to search for it . That process will hightlight all matches in the file . Hit Esc to undo the highlighting . Comment : selecting a word is more handy then ctrl + F and type the word right Comment : Np++ has that two Komodo pros : TagsJump https : sourceforge.net projects tagsjump plugin allows to jump to a definition even it is in another file . Function list http : sourceforge.net projects npp-plugins files can list definitions in the current file for many programing languages .", "Question : Komodo used to show me tabs of open files but one day they disappeared . I can t find an option to turn them back on . I use the side menu now but it s much less convenient . I tried in the View Tabs Sidebars menu but can t find an option to turn tabs on . There s also a tab icon button in the icon row at the top of the open file window but clicking it only opens the sidebar . Edit : someone answered that there should be an specific option for this but it doesn t appear my in my menus . screenshots here : imgur.com a PylIB .. . .. . Komodo Edit version 8.5.4 build 14424 platform macosx . Built on Wed Aug 13 23 : 56 : 46 2014 .. . Answer : You can toggle tabs from View Toolbars Show Editor Tabs . Or by right clicking your toolbar and clicking Show Editor Tabs . Comment : I don t have either of these options . screenshots here : imgur.com a PylIB http : imgur.com a PylIB Komodo Edit version 8.5.4 build 14424 platform macosx . Built on Wed Aug 13 23 : 56 : 46 2014 . Comment : You re running an older version of Komodo . You need the View Editor Tabs at the bottom of your first screenshot .", "Question : I am new to KOMODO EDIT . can anyone knows how to add intellisence to my own files . for example : myFirst.js that includes auto completion for objects or functions that were defined in mySecond.js Also how to add auto completion to my css file from my html file thanks . another example : in visual-studio i put this statment at the begining of file2.js : .. . .. . and then i had intellisence for file1.js inside file2.js Comment : Your question is kind of misleading . Your problem is that code intelligence is not working Comment : yes . what are the steps in order to gain intellisence with my own files Comment : Sorry if my question was unclear . Does code intelligence work at all With some other files that are not yours With builtin functions Do you get a combo if you type window . Comment : inside css file i have intelligence .inside html file i have intelligence for html but not for my css class that where referenced. . inside javascript file i have intelligence for javascript but not for jquery that was included in the html file . I need to know how to include intelligence of one file inside another file . Comment : possible duplicate of Komodo Edit Function and Require autocompletion http : stackoverflow.com questions 10857062 komodo-edit-function-and-require-autocompletion .. . Answer : As long as both files are under the same project Komodo should automatically pick up on them and provide code intelligence . But make sure you are using a Project and not just editing your files plainly as Komodo will not know how to associate your files . Note though that if you are abstracting your javascript code too much that code intelligence will not be able to keep track of what you are trying to do . But you d have to include some samples of your code for us to be able to comment further on that . Also note this open bug which may be related to your issue : http : bugs.activestate.com show bug.cgi id 101646", "Question : Komodo Edit 10 Autocomplete not show options list as notepad++ when I press ctrl+space . It just fills with the first option instead of list them to me choose the right one . It does such horrible thing . Is there a way to fix it and make him show the options when I press ctrl+space as on notepad++ instead of just fill with the first one .. . Answer : This is not supported by Komodo Edit 10 . However here there is this feature request ticket : https : github.com Komodo KomodoEdit issues 1896" ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
node-modules@module@35
node-modules -- node has a simple @placeholder loading system that reduces complexity of applications and promotes code reusability .
{ "confidence": [ 37.014854431152344, 36.19668960571289, 35.11273956298828, 34.67564392089844, 34.24971389770508, 33.77995300292969, 33.51499557495117, 32.831787109375, 32.33567428588867, 32.258907318115234, 32.258907318115234, 31.546600341796875, 31.435928344726562, 31.41341781616211, 30.896997451782227, 30.594118118286133, 30.524621963500977, 30.524621963500977, 30.435890197753906, 29.363895416259766, 29.003576278686523, 29.003576278686523, 29.003576278686523, 29.003576278686523, 29.003576278686523, 29.003576278686523, 28.912891387939453, 28.297409057617188, 27.83547592163086, 27.666122436523438, 27.666122436523438, 27.491147994995117, 27.39532470703125, 27.39532470703125, 27.1962833404541, 27.180561065673828, 27.180561065673828, 27.180561065673828, 27.180561065673828, 27.180561065673828, 27.032058715820312, 27.032058715820312, 27.032058715820312, 27.010150909423828, 27.010150909423828, 27.010150909423828, 26.919382095336914, 26.648048400878906, 26.348125457763672, 26.348125457763672, 26.225147247314453, 26.190208435058594, 25.843107223510742, 25.843107223510742, 25.8060359954834, 25.489105224609375, 25.489105224609375, 25.489105224609375, 25.489105224609375, 25.209041595458984, 25.209041595458984, 25.209041595458984, 25.201351165771484, 25.19866943359375, 24.931800842285156, 24.931800842285156, 24.931800842285156, 24.931800842285156, 24.931800842285156, 24.80760383605957, 24.77975845336914, 24.77975845336914, 24.77975845336914, 24.67293930053711, 24.573266983032227, 24.490819931030273, 24.284990310668945, 24.284990310668945, 23.878087997436523, 23.824817657470703, 23.750911712646484, 23.666088104248047, 23.666088104248047, 23.666088104248047, 23.666088104248047, 23.666088104248047, 23.666088104248047, 23.659809112548828, 23.659809112548828, 23.659809112548828, 23.659809112548828, 23.410755157470703, 23.410755157470703, 23.410755157470703, 23.410755157470703, 23.410755157470703, 23.410755157470703, 23.410755157470703, 23.410755157470703, 23.410755157470703 ], "content": [ "My node-modules is a simple module that have few dependencies and makes use mostly of built-in modules .", "How does the node-modules folder get created .", "i can see the modules in the node-modules directory .", "Are there any other node-modules for getting connected to hive", "I m developing node applications on a mac .", "I want to know if there is a way to import node-modules directly into Angular2", "Node adds a module to the module cache before it finishes loading it .", "I added the node module to angular-cli-build.js .. . .. . And registered the node module ins system-config.js with .. . .. . However this is only loading angular2-apollo .", "The following example illustrates node-sass@3.0.0 with node@0.12.2 : .. . .. . Install the bower dependency : .. . .. . The Sass file : .. . .. . The node renderer file : .. . .. . This one is simple and not recursive .", "Please anyone tell me how to setup node-modules in an eclipse environment .", "Couldn t be enough just use import to load stuff from node-modules", "node-test : node npm bin jasmine the node-test : node . node-modules jasmine bin jasmine worked.. .", "As part of some refactoring in Node I have a couple of Application Services in DDD-terminology which are technically implemented as Node modules .", "Sometimes other developers update node-modules version and I pull the new commit and forgot to install new modules .", "With moduleResolution set to node the compiler cannot find my local modules with all other options it does not see the modules in node-modules directory I m trying to import .", "I ve got a simple node app that has single dependency on another app on github .", "common.printfoo bar returns bar .. . .. . Typically what you re doing there isn t how modules in node works .", "When I run npm-install in the folder where my node service is it is installing modules which are not mentioned in my package.json .", "This is important for me now because node-modules are hoisted to the top when they are imported .", "The issue was i installed node using sudo to avoid errors when installing npm modules globally one MUST NEVER install node with sudo .", "Possible duplicate of Change node-modules location http : stackoverflow.com questions 18974436 change-node-modules-location", "I have created a GIT Repo and I am going to develop few node-modules there .", "@enRaiser other question is why do you need this common repository containing your node-modules as git-submodules", "I have installed node.js in eclipse but I don t know how to install node-modules such as expresss socket io etc .", "It could and you will typically have several instances of several different modules and version thereof in a node project .", "Use the npm bin command to get the node-modules bin directory of your project .. . .. . e.g .", "Are you check : github.com wdavidw node-thrift-hive https : github.com wdavidw node-thrift-hive and github.com forward node-hive https : github.com forward node-hive", "Is there a way to tell NPM to put the node-modules into another directory e.g .", "When I go into node and attempt to require libyaml I get : .. . .. . I m using node version 0.8.12 and libyaml version 0.2.1 .", "You can enable and disable it within your terminal by running node-mode and node-mode-off respectively .", "I have used node-hive and thrift for connecting my node js application to hive but none of them works .", "And it s quite convenient to have node thread as a simple normal service more useful for unix servers of course .", "What I have at the moment .. . .. . Right now I have in my node javascript file app.js the following code .", "I have a small web service developed in node and I d like to code some files in coffeescript to start playing with it .", "node : 6.2.2 .. . npm : 3.10.2", "Google App Engine java project uses node-modules for grunt tasks which is used to build the front end .", "We have following folder structure .. . .. . We do not want to deploy node-modules directory .", "related topic stackoverflow.com questions 24397379 http : stackoverflow.com questions 24397379 script-path-for-expressjs-in-node-modules .", "yeah the node-modules directory is kept in my Server directory on the same level as the server.js file .", "I ve been trying to use the node-modules markdown and dustjs-helpers in my angular 2.0 client-side .", "whether all node plugin must be repository only .", "Select Node-Express Project and select Next button .", "https : github.com sass node-sass importer--v200 .", "But now it appears because node makes use of a require cache i.e .", "I m requiring different files at the top of my main script in node .", "Yeah I think I need something like that but for node .", "I like to discover bleeding edge stuff while still working on legacy node applications .", "My email template is as follows : .. . .. . My Code in Node JS is as follows :", "node -v v0.10.20 .. . .. . npm ERR", "Is there a node module which can automate this", "I asked this http : stackoverflow.com questions 21461465 sharing-code-between-node-applications question about sharing code between Node apps yesterday with no answers so now I have a more specific question instead of long-rambling one .", "Or is this a node application", "On exit it logs this : .. . .. . Possibly relevant info : .. . .. . My npm came with node and I installed node using nvm .", "if you are running nvm you might want to run nvm use desired-node-version This keeps node consistent with npm", "So you could technically write a node project without using npm but you d have to hard code every path for every require .", "So I started with my first node module modA .", "Why I can make node module as folder in GIT", "Awesome I didn t know about custom importer functions in node-sass .", "I m trying to run the node module npm-lazy as a service in my localzone .", "The version is the stable version node : v6.2.0 npm : 3.9.5 .", "I have node application that is using webpack bundler .", "Node runs on a computer in its own runtime not in the browser .", "Got a pretty simple question to which I cant find an answer regarding exporting a object form a module in Node js more specifically accessing the objects properties .", "Great in theory but is there any way to achieve the same effect without being forced to build Node and install 4 additional modules just to have access to modules globally", "A Node module basically works like this : .. . .. . By default exports and module.exports both point to the same object .", "Here is easily explained : Read More https : www.sitepoint.com understanding-module-exports-exports-node-js", "Being serious my question is : is there a way to make a static-analysis of node packages installed via npm", "What you do need to handle is the possibly different current working directory where the node process is running .", "The parent is the module that caused the script to be interpreted and cached if any : .. . .. . What you re expecting is the caller which Node doesn t retain for you .", "that is the goal of modules : put the hard logic somewhere else to build better code .", "Put the following json in that bs-config.json file : .. . .. . server : baseDir : path to your base dir where you have the index.html of your app routes : node-modules : path to node-modules relatively to this file .. . .. . 3 .", "http : stackoverflow.com questions 30049111 how-to-blacklist-specific-node-modules-of-my-packages-dependencies-in-react-nat .. . .. . I created such a file in my project root directory .", "If you want to create your node-modules as git-submodules of your main repository then you need first to create separate repository for each module and then add them as submodules using their urls .", "I am trying to get my node environment set up on a new Ubuntu 12.04 instance with Node 0.8.14 already installed but I ran into problems when I try to run npm-install .", "yes but I intend to do a set of modules that I always use in various applications then it would be a good idea having installed globally .", "This question already has an answer here : .. . .. . NPM installs dependencies in a wrong place questions 32727336 npm-installs-dependencies-in-a-wrong-place 2 answers .. . .. . I am trying to spin up a node service on my mac .", "I tried to run some command on my machine using node-ssh module .. . .. . The code is .. . .. . But while executing this I m getting the following error", "How do i do that using nodejs solr-client update http : lbdremy.github.io solr-node-client code solr.js.html method", "It s also being addressed in this answer https : web.archive.org web 20150706052058 https : docs.npmjs.com misc faq node-modules-is-the-name-of-my-deity-s-arch-rival-and-a-forbidden-word-in-my-religion-can-i-configure-npm-to-use-a-different-folder which is part of their FAQ .", "Modules are self-contained to be reusable .", "Angular has a small part in the application as it acts as a simple wrapper container .", "The versions are node : 0.12.7 and npm : 2.11.3 on both : local and jenkins", "What can I do in node when the module imports are hoisted to the top", "If that is the case it s actually executing require over Node CommonJS style .", "Node might not be able to read the directory of the module due to permissions ownership .", "Is there any better way to achieve a complete independence for node npm node-modules", "Can I use a Node module in a front end-only app", "You might want to read this answer for a more in-depth explanation : .. . .. . What is the purpose of node js module exports and how do you use it", "function outer .. . let s pretend we re in a node environment .. . this required script will get hoisted to the very top and therefore lose access to the something variable", "You can provide a path to require that will be used before node walks the various node-modules locations....but npm still won t install anyplace but node-modules .", "However if you re not running node but actually running a browser app I would suggest using the fantastic hem https : github.com spine hem .", "I have a node module which is intended to be installed as a global module and meant to be executed in a command-line .", "Note : I am using Solr-4.3.0 and node module solr-client for adding data to Solr .", "well you could handle the packages from outside eclipse and still implement and run it from within eclipse with the node plugin .", "Did u find answer how to integrate express or any other node js module in eclipse like a jar or something .", "You can add another includePaths https : github.com sass node-sass includepaths to your render options .", "OP here I have learned a lot more about node since I first asked this question .", "Though Dmitry s answer was very helpful what ultimately did it for me is to install node with the correct permissions .", "It is optimized for in-browser use but it can be used in other JavaScript environments like Rhino and Node .", "I m using clim https : github.com epeli node-clim and I replace the console object with it ." ] }
{ "confidence": [ 36.35224914550781, 36.253814697265625, 36.11822509765625, 35.506046295166016, 35.506046295166016, 34.687400817871094, 34.22881317138672, 34.162269592285156, 34.01881408691406, 33.79094696044922, 33.437862396240234, 33.295372009277344, 33.289459228515625, 33.234378814697266, 33.139644622802734, 32.81591033935547, 32.13930130004883, 32.10811996459961, 32.0165901184082, 31.94858169555664 ], "content": [ "Question : This question already has an answer here : .. . .. . NPM installs dependencies in a wrong place questions 32727336 npm-installs-dependencies-in-a-wrong-place 2 answers .. . .. . I am trying to spin up a node service on my mac . When I run npm-install in the folder where my node service is it is installing modules which are not mentioned in my package.json . There are extra modules which I am not expecting and some modules that I expect are missing . What could be the reason How does the node-modules folder get created . Does it use any global set up I am a newbie to nodejs and any help will be appreciated . Comment : dependencies are often dependant on other packages - look up the modules you want on npmjs.com https : www.npmjs.com and you ll see what they require .. . Answer : Well it has been introduced with npm3 https : github.com npm npm blob master CHANGELOG.md v300-2015-06-25 : .. . .. . Flat flat flat .. . Your dependencies will now be installed maximally flat . Insofar as is possible all of your dependencies and their dependencies and THEIR dependencies will be installed in your project s node-modules folder with no nesting . You ll only see modules nested underneath one another when two or more modules have conflicting dependencies .", "Question : null .. . Answer : My node-modules is a simple module that have few dependencies and makes use mostly of built-in modules . Given that my module has a dependency of a module that declares those dependencies .. . .. . Running npm-install will end up in the following node submodules tree .. . .. . that is nothing less than .. . .. . 40Meg what At first look I was a bit surprised of that since the list of dependencies seems to be too much . I would expect something like that from the Makefile of low-level C library like Boost libcrypto libxml libssl or whatever C C++ library used by an OS but hey wait a moment this is just a simple application using built-in library and just one external dependency . So what s going on here Being serious my question is : is there a way to make a static-analysis of node packages installed via npm And then to prune unused dependencies For sure my module will not use at runtime most of the function declarations in the private scope of each of those modules defined in this tree .", "Question : In node project we import a module using require keyword can we import same module using import from in angular2 project provided that d.ts is not avaliable For example can I use this library in my angular2 project .. . .. . https : github.com basarat typescript-collections issues new Comment : You could but only if you are using a transpiler like babel as the import syntax is not officially supported yet in node.js without flags that is and node.js is using commonjs for its module system . Comment : So these are two different things module loading using commonjs requires require keyword and systemjs requires import syntax for module loading and the libraries written for commonjs can not be imported using systemjs import syntax .. . Answer : Yes you can . But you have to use only the ES6 syntax import export . For Node.js you can compile the code using modules format CommonJS or UMD . Here is a tutorial on how to use TypeScript with SystemJS http : david-barreto.com how-to-use-typescript-with-systemjs . SystemJS will load the TypeScript source code and not the compiled code . In order to use JavaScript modules that are installed by npm use the option packageConfigPaths : .. . .. . See also this thread on GitHub https : github.com systemjs systemjs issues 767 issuecomment-139515090 for other options of the SystemJS configuration .", "Question : This question already has an answer here : .. . .. . NPM installs dependencies in a wrong place questions 32727336 npm-installs-dependencies-in-a-wrong-place 2 answers .. . .. . I am trying to spin up a node service on my mac . When I run npm-install in the folder where my node service is it is installing modules which are not mentioned in my package.json . There are extra modules which I am not expecting and some modules that I expect are missing . What could be the reason How does the node-modules folder get created . Does it use any global set up I am a newbie to nodejs and any help will be appreciated . Comment : dependencies are often dependant on other packages - look up the modules you want on npmjs.com https : www.npmjs.com and you ll see what they require .. . Answer : I believe this is something new that happened in the newest version of npm . If I m not mistaken it s installing all the dependencies flat instead of nested inside of whichever module that needs it .", "Question : This question already has an answer here : .. . .. . NPM installs dependencies in a wrong place questions 32727336 npm-installs-dependencies-in-a-wrong-place 2 answers .. . .. . I am trying to spin up a node service on my mac . When I run npm-install in the folder where my node service is it is installing modules which are not mentioned in my package.json . There are extra modules which I am not expecting and some modules that I expect are missing . What could be the reason How does the node-modules folder get created . Does it use any global set up I am a newbie to nodejs and any help will be appreciated . Comment : dependencies are often dependant on other packages - look up the modules you want on npmjs.com https : www.npmjs.com and you ll see what they require .. . Answer : I guess that you don t have permissions to install all the packages try using this link if it helps https : docs.npmjs.com getting-started fixing-npm-permissions", "Question : I have created a GIT Repo and I am going to develop few node-modules there . So I started with my first node module modA . and created a folder submodule under it . I added a simple REAME there . Now In my local machine I went to a project node module and run this command . I get this error .. . .. . I tried git submodule add but that also failed . So my question is . whether all node plugin must be repository only . or am I not using the proper GIT command . .. . Answer : You just have created a folder inside your repository . It is not a submodule . So your repo url is git@github.com : enraiser node.git using SSH or https : github.com enraiser node.git using HTTPS . If you want to create your node-modules as git-submodules of your main repository then you need first to create separate repository for each module and then add them as submodules using their urls . Assuming you already created enMailer repo and you have enMailer-url : .. . .. . P.S . Here is screenshot for you where you can get correct repository url on github : Where to get correct repository url on github http : i.stack.imgur.com a7aAX.png Comment : thanks for explaining submodule . I guess at list I am able to move forward . Comment : Any comments from NPM perspective . Why I can make node module as folder in GIT Comment : @enRaiser not sure if i understand you correctly.. . whether you need to create git-submodules or not If you want your modules to be accessible separately for installation via npm then yes they shuold be each in own repository . Then you can install them this way : npm-install module-url Comment : I think subfolder is still better then submodule . but if there is any trick from NPM . Otherwise as you said I have to go for submodule . Comment : @enRaiser other question is why do you need this common repository containing your node-modules as git-submodules", "Question : null .. . Answer : I m developing node applications on a mac . I like to discover bleeding edge stuff while still working on legacy node applications . I wanted to have a system like chruby rubyinstall whch looks for a version file inside a folder if you cd into it and switches the ruby version . What I have so far : .. . .. . removed all node stuff from my system .. . ran : brew install nvm .. . followed the steps for setup on screen .. . installed a node version : nvm install v0.12.15 .. . and another version : nvm install v5.10.1 .. . .. . then added the following script to my .bash-profile .. . .. . Now whenever I open a new shell tab or cd into some directory it will look into .nodeversion and use this version via nvm . If there is no such file it will use nvm s default In my case v0.12.15 because it was installed first .. . .. . I tried avn before but that s a node module and I wanna have an independent node-modules folder for each node version . Is there any better way to achieve a complete independence for node npm node-modules", "Question : null .. . Answer : I ve begun using Node.js to make web-applications . It s really awesome . I ve come across a few modules that I want to incorporate into my build . I can work with the modules in Terminal after a global npm-install . When it comes time to add them to my application I have no idea how to go about placing them in my directory structure and I haven t found any good documentation on this . My typical node.js directory is : .. . .. . ROOT .. . .. . Server .. . .. . server.js .. . node-modules .. . Client .. . .. . index.html .. . css -main.css .. . javascript -main.js -jquery.js .. . .. . My process for installing the modules has been : .. . .. . I cd into my Server file and run npm-install Then I go to my package.json file and include the module in the dependencies .. . .. . After that I head over to the server.js file I add : .. . .. . When I run functions that are dependent on the modules on the Client side functions that work in Terminal I don t receive an error but the function won t run . Because I m not receiving errors I have no idea about how to debug . If anyone can recognize some fatal flaw in my structure or implementation and can offer some recommendations I offer my first born . Comment : Can you see the modules in the node-modules directory I like to keep a separate directory for my node-modules inside my project directory . Comment : yeah the node-modules directory is kept in my Server directory on the same level as the server.js file . i can see the modules in the node-modules directory . Comment : Then I don t think you need path to node-module lib .For example if you have installed express module require express is enough.There is no need to give the full path for it .", "Question : null .. . Answer : I have used node-hive and thrift for connecting my node js application to hive but none of them works . Are there any other node-modules for getting connected to hive Comment : Are you check : github.com wdavidw node-thrift-hive https : github.com wdavidw node-thrift-hive and github.com forward node-hive https : github.com forward node-hive", "Question : I am trying to develop a chat app with node.js and socket.io in an eclipse environment . I have installed node.js in eclipse but I don t know how to install node-modules such as expresss socket io etc . Please anyone tell me how to setup node-modules in an eclipse environment . .. . Answer : Navigate to your project folder via command-prompt . Once there run the npm-install module command . After the module installs refresh your project in eclipse . A javascript library should show up in your project containing the library of the module you just installed . Run your code and it should work and recognize the modules that your are trying to require . Hope this helps .", "Question : I am trying to develop a chat app with node.js and socket.io in an eclipse environment . I have installed node.js in eclipse but I don t know how to install node-modules such as expresss socket io etc . Please anyone tell me how to setup node-modules in an eclipse environment . .. . Answer : To install express modules in Nodeclipse go to .. . .. . Windows - Preferences- Nodeclipse - choose express path field .. . .. . and enter the location of the installed express on your localhost .", "Question : I am trying to develop a chat app with node.js and socket.io in an eclipse environment . I have installed node.js in eclipse but I don t know how to install node-modules such as expresss socket io etc . Please anyone tell me how to setup node-modules in an eclipse environment . .. . Answer : You mention installing express but you don t need to install that if you re using nodeclipse . to generate an express project : Select the File-New-Project menu . Select Node-Express Project and select Next button . Enter Project name and select Finish button .", "Question : How can I install npm modules locally for each project to vendor node-modules and make package.json file see them . I don t want to move package.json to vendor folder .. . .. . I have bower and in .bowerrc I specify the bower components path - that is super easy . How can I do that with npm I ve read-the-docs npmrc docs some questions here googled wasted more than an hour - still no luck . This is ridiculously hard for such an easy task . I don t care about minuses just tell me how to do that finally . .. . Answer : You cannot not using built-in npm functionality . .. . .. . This discussion https : github.com npm npm issues 3597 on the npm github repository covers the issue . It s also being addressed in this answer https : web.archive.org web 20150706052058 https : docs.npmjs.com misc faq node-modules-is-the-name-of-my-deity-s-arch-rival-and-a-forbidden-word-in-my-religion-can-i-configure-npm-to-use-a-different-folder which is part of their FAQ . You can still do the installs manually by copying modules into your vendor directory and then calling them using the require . vendor whatever syntax...but that means each require needs to use your new custom location . There are a few ways you could handle this but they all mean you are doing extra work in your source to accomodate the custom location . Comment : You cannot . npm uses node s algorithm for finding packages detailed here : nodejs.org api http : nodejs.org api modules.html modules loading from node-modules folders gt You would have to modify your node binary in order to support vendor node-modules Comment : That s true but npm won t install to a custom directory either . You can provide a path to require that will be used before node walks the various node-modules locations....but npm still won t install anyplace but node-modules . So you could technically write a node project without using npm but you d have to hard code every path for every require .", "Question : How do I use a local version of a module in node.js . For example in my app I installed coffee-script : .. . .. . This installs it in . node-modules and the coffee command is in . node-modules .bin coffee . Is there a way to run this command when I m in my project s main folder I guess I m looking for something similar to bundle exec in bundler . Basically I d like to specify a version of coffee-script that everyone involved with the project should use . I know I can add the -g flag to install it globally so coffee works fine anywhere but what if I wanted to have different versions of coffee per project .. . Answer : Use the npm bin command to get the node-modules bin directory of your project .. . .. . e.g . Comment : I like this simple and generic solution . Makes an alias seem unnecessary . Comment : It looks like to simplest solution . Comment : Seems to be the next best solution that is elegant and more secure than having to do export PATH . node-modules .bin : PATH Comment : does not work . node-test : node npm bin jasmine the node-test : node . node-modules jasmine bin jasmine worked.. . I assume this is windows dependent issue since it does not recognize the bin sh part in the file .", "Question : I have just reinstalled Ubuntu 12.04 LTS and before anything else i did these steps : .. . .. . 1 . Installed Node via package manager with the following script .. . .. . sudo apt-get update .. . .. . sudo apt-get install python-software-properties python g++ make .. . .. . sudo add-apt-repository ppa : chris-lea node.js .. . .. . sudo apt-get update .. . .. . sudo apt-get install nodejs .. . .. . .. . 2 . Tried to install yeoman express n yeoman s generators globally and all of them returned the same error .. . .. . npm ERR Error : EACCES symlink . . lib node-modules n bin n .. . .. . npm ERR Error : EACCES symlink . . lib node-modules n bin n errno : 3 code : EACCES path : . . lib node-modules n bin n .. . .. . npm ERR .. . npm ERR Please try running this command again as root Administrator . .. . npm ERR System Linux 3.8.0-29-generic .. . .. . npm ERR command usr bin node usr bin npm-install -g -d n .. . .. . npm ERR cwd home heberlz .. . .. . npm ERR node -v v0.10.20 .. . .. . npm ERR npm -v 1.3.11 .. . .. . npm ERR path . . lib node-modules n bin n .. . .. . npm ERR code EACCES .. . .. . npm ERR errno 3 .. . .. . npm ERR stack Error : EACCES symlink . . lib node-modules n bin n .. . .. . npm ERR .. . npm ERR Additional logging details can be found in : .. . .. . npm ERR home heberlz npm-debug.log .. . .. . npm ERR not ok code 0 .. . .. . 3 . Reclaimed ownership of the following folders recursively .npm usr lib node usr lib node-modules and of the following symlinks usr bin node usr bin nodejs with absolutely no success .. . .. . I need to install yeoman and its generators without sudo not to be in trouble later on : Comment : Thanks Phil now it looks much better Comment : If you want npm to install global packages in HOME rather than usr follow the guide github.com sindresorhus guides blob master https : github.com sindresorhus guides blob master npm-global-without-sudo.md Comment : this is what worked for me github.com nodejs node-v0.x-archive issues https : github.com nodejs node-v0.x-archive issues 3911 issuecomment-8956154 : ln -s usr bin nodejs usr bin node .. . Answer : The issue was i installed node using sudo to avoid errors when installing npm modules globally one MUST NEVER install node with sudo . My solution was to reinstall node it this way : .. . .. . Download latest stable node sources from nodejs.org in my case node-v0.10.20.tar.gz .. . .. . tar -zxf node-v0.10.20.tar.gz uncompress sources .. . .. . cd node-v0.10.20 enter uncompressed folder .. . .. . sudo chown -R USER usr local .. . .. . . configure --prefix usr local make make install .. . .. . One thing to note is that only taking ownership of the usr local folder wouldn t work in my case because node installation itself was made with sudo .. . .. . Last step to install yeoman : although at yeoman.io it says that doing npm-install -g yo already installs bower and grunt there are some submodules of grunt that fail so i fixed that by installing it by itself .. . .. . npm-install -g bower .. . .. . npm-install -g grunt .. . .. . npm-install -g yo .. . .. . npm-install -g generator-angular Comment : Great in theory but is there any way to achieve the same effect without being forced to build Node and install 4 additional modules just to have access to modules globally Comment : The selected answer works just as you need . This is what i did 2 years ago when there was no other public solution yet but now it is useless", "Question : I m requiring different files at the top of my main script in node . All my require statements are hoisted to the top . This creates a problem because when the methods within those imported scripts are invoked they do not have access to the function within which they are invoked Because they are inevitably defined outside those functions due to the hoisting issue . Therefore I must always pass variables in an options object . Has anyone experiences a similar issue Is there some sort of standard workaround that people use Thanks function outer .. . let s pretend we re in a node environment .. . this required script will get hoisted to the very top and therefore lose access to the something variable var common require . . globals common.js .. . var something something .. . .. . .. . common.printsomething will return something is not defined .. . .. . .. . .. . outer Comment : It s not hoisting it s a misunderstanding of how modules work . They don t have access to the scope of the caller . Comment : Supposing that common.printsomething was supposed to reach something then no there is no way to do that . But I have the feeling I don t understand what you are asking . Comment : @robertklep : I can t seem to find a good resource that explains how the modules work . Do you have a link perhaps Thanks Comment : Modules are like sealed little black boxes that you ship out to other functions . The code inside the box can t see outside of itself but the calling code can put stuff into the box and get stuff out . Does this make a little sense .. . Answer : Hm . I would assume that it d ultimately be better to pass something to the printsomething method like so . common.printfoo bar returns bar .. . .. . Typically what you re doing there isn t how modules in node works . Yes breaking up a large program into separate files is an excellent way to organize a project but I m afraid that I have to say you re doing it wrong here . In the context of outer you could do : Comment : Are you saying that I shouldn t be using require to break up my code into separate files Is that bad practice Comment : No no . It s definitely good practice to use different js files as an organizer . See my example for a good way to actually do that however . Comment : @orlandomarinella : You should make more clear the separation of the files it may help mags understand better . Comment : No problem hold on . Comment : Unfortunately you ll have to . It s the way JavaScript and most programming-languages for that matter work . What other languages are you fluent in", "Question : I am trying to develop a chat app with node.js and socket.io in an eclipse environment . I have installed node.js in eclipse but I don t know how to install node-modules such as expresss socket io etc . Please anyone tell me how to setup node-modules in an eclipse environment . .. . Answer : From https : groups.google.com forum topic nodeclipse FgUci2ZXpoQ .. . .. . 1 . Double-click package.json on the Package Explorer to open it . 2 . Add into dependencies section what you want to install and save it . 3 . Select package.json on the Package Explorer open context menu by right-clicking and select Run As - npm-install menu .", "Question : When I go into node and attempt to require libyaml I get : .. . .. . I m using node version 0.8.12 and libyaml version 0.2.1 . Curiously the error is server dependent but it doesn t seem to be based on the version numbers because it runs fine on one of boxes with the same versions . Comment : Guess the module is not installed for the correct machine architecture . Try npm-install libyaml on the server . Comment : nice that upgrades it and it works Comment : question -- what if i have multiple architectures though npm installs the modules into source control rather than installing from a list on deploy.. . so if the install was made for one architecture on dev how can you deploy to another on staging or production .. . Answer : One can also use npm rebuild module-name to recompile the C code on the deployment machine as part of preinstall script . Documentation https : www.npmjs.org doc cli npm-rebuild.html", "Question : I am trying to develop a chat app with node.js and socket.io in an eclipse environment . I have installed node.js in eclipse but I don t know how to install node-modules such as expresss socket io etc . Please anyone tell me how to setup node-modules in an eclipse environment . .. . Answer : I dont think that there is an eclipse integrated way to do this . My suggestion is that you download node.js+npm from http : nodejs.org download and then open up a terminal cmd and in your node.js project directory do npm-install myPackage Comment : Thanks for u response . But am implementing this project in eclispe IDE.So obviously i have to integrate nodejs with eclispe right. . Comment : well you could handle the packages from outside eclipse and still implement and run it from within eclipse with the node plugin . Comment : Did u find answer how to integrate express or any other node js module in eclipse like a jar or something . I installed express using npm command but my eclipse is not taking that .", "Question : I m requiring different files at the top of my main script in node . All my require statements are hoisted to the top . This creates a problem because when the methods within those imported scripts are invoked they do not have access to the function within which they are invoked Because they are inevitably defined outside those functions due to the hoisting issue . Therefore I must always pass variables in an options object . Has anyone experiences a similar issue Is there some sort of standard workaround that people use Thanks function outer .. . let s pretend we re in a node environment .. . this required script will get hoisted to the very top and therefore lose access to the something variable var common require . . globals common.js .. . var something something .. . .. . .. . common.printsomething will return something is not defined .. . .. . .. . .. . outer Comment : It s not hoisting it s a misunderstanding of how modules work . They don t have access to the scope of the caller . Comment : Supposing that common.printsomething was supposed to reach something then no there is no way to do that . But I have the feeling I don t understand what you are asking . Comment : @robertklep : I can t seem to find a good resource that explains how the modules work . Do you have a link perhaps Thanks Comment : Modules are like sealed little black boxes that you ship out to other functions . The code inside the box can t see outside of itself but the calling code can put stuff into the box and get stuff out . Does this make a little sense .. . Answer : module.js : .. . .. . main.js .. . .. . As you can see in main.js I do not need to know the content of module.js to wrk . that is the goal of modules : put the hard logic somewhere else to build better code . Modules like async https : github.com caolan async Documentation or fs https : nodejs.org dist latest-v6.x docs api fs.html fs file system are huge and complex but I just have to import them to work with it and don t need to know how it does it . While building your own module think of it as a new library of tools so that you can reuse it in another project without the need to set specific variables to use them . Imagine the chaos it would be if two module were able to get the content of your var something for unrelated goal Modules are self-contained to be reusable . A de hoisting of thoses would reduce their efficacity . EDIT : .. . .. . If you have a lot of environment variable you can try a pattern where you set them once inside the module but you have to make sure to provide a way to interact with them . module : .. . .. . main.js" ] }
[ "yes-answer-long", "yes-answer-short" ]
module
UNK_RELATION
qgridlayout@qt@50
qgridlayout -- a qgridlayout is a class from the @placeholder toolkit which lays out gui widgets in a grid .
{ "confidence": [ 49.22883605957031, 47.156734466552734, 43.9867057800293, 43.9867057800293, 43.843528747558594, 43.74663543701172, 43.32489013671875, 42.881011962890625, 42.720516204833984, 42.17683410644531, 41.555809020996094, 41.4128532409668, 41.09978485107422, 40.610374450683594, 40.28300476074219, 39.904541015625, 39.746158599853516, 39.746158599853516, 39.746158599853516, 39.746158599853516, 39.746158599853516, 39.746158599853516, 39.66950988769531, 39.66950988769531, 39.66950988769531, 38.95719528198242, 38.65027618408203, 38.640464782714844, 38.640464782714844, 37.884239196777344, 37.85150146484375, 37.46758270263672, 37.31526184082031, 37.31526184082031, 37.238609313964844, 37.109130859375, 36.52629852294922, 36.45367431640625, 35.497901916503906, 35.460205078125, 34.712066650390625, 34.45021438598633, 34.27845764160156, 32.346038818359375, 32.018714904785156, 32.018714904785156, 32.018714904785156, 32.018714904785156, 32.018714904785156, 32.018714904785156, 31.77596664428711, 31.618980407714844, 30.91301918029785, 30.91301918029785, 30.91301918029785, 30.91301918029785, 30.91301918029785, 30.91301918029785, 30.317062377929688, 29.587814331054688, 29.587814331054688, 29.304424285888672, 29.304424285888672, 29.304424285888672, 28.877321243286133, 27.931015014648438, 27.089929580688477, 26.926197052001953, 26.264320373535156, 26.264320373535156, 26.264320373535156, 26.023914337158203, 25.57727813720703, 25.158626556396484, 23.5924129486084, 22.963687896728516, 21.35027313232422, 21.180702209472656, 21.165159225463867, 20.800731658935547, 20.71768569946289, 20.71768569946289, 20.53976058959961, 20.427217483520508, 20.427217483520508, 20.427217483520508, 20.31452751159668, 20.21135711669922, 20.21135711669922, 20.133121490478516, 20.121801376342773, 20.121801376342773, 20.0161075592041, 19.64752197265625, 19.602001190185547, 19.345211029052734, 19.343196868896484, 19.343196868896484, 19.343196868896484, 19.343196868896484 ], "content": [ "Basically I ve got a QGridLayout with a few widgets in it .", "Yes there is no any problems inserting QGridLayout into another QGridLayout .", "Use QGridLayout with size 4x4 .", "It seems to be a bug in QGridLayout .", "How to arrange the QGridLayout like above", "I have a QMainWindow with a QGridLayout of various widgets that looks like the following : .. . .. .", "@edit .. . .. . this is a function that add PictureElement to QGridLayout .. . .. . What I want : connect every PictureElement SIGNAL clicked from QGridLayout with slot in Spells class .", "This line belongs-to QGridlayout .", "I have a QGridLayout which contains all the layout for my class .", "The QGridLayout itself is managing the QLayoutItem s .", "Obviously this is a policy of QGridLayout .", "Is it somehow mandatory for you to use QGridLayout for some reason", "However when I pass a widget to QGridLayout via QGridLayout : : addWidget the widget disappears from where it was before .", "I need to connect each of PElement in QGridLayout with slot in Spell class .", "http : stackoverflow.com questions 13184250 is-there-any-way-to-remove-a-qwidget-in-a-qgridlayout .. . .. . -- For some reason removing widgets from layouts is hard .", "I m trying to lay out a grid of square custom subclassed QWidgets inside a QGridLayout and QScrollArea .", "I m trying to layout a window all in code with a QGridLayout .", "Is there some way to obtain the coordinates of the qpushbutton clicked on the qgridlayout", "I have a QGridLayout containing mostly QLabels .", "I can t create a QGridLayout like this one .", "You can t do this by using just QGridLayout .", "Basically I have a QScrollArea having QGridLayout .", "Then at first I took a QScrollArea and then a QGridLayout which I set as the layout of scrollAreaWidgetContent .", "They are all positioned inside a QGridLayout which spans to the whole window area .", "I have a QWidget that contains a QGridLayout which in turn contains a handful of QPushButtons .", "I have a UIForm named Spell that contains inter alia QGridLayout with custom widgets named PElement .", "I am trying to create a simple QGridLayout of images in PyQt5 but have found myself stuck because QGridLayout only has functionality for adding widgets and layouts via .addWidget and .addLayout .", "The problem here is caused by an implementation detail of QGridLayout .", "Is it possible to have QGridLayouts within another QGridLayout", "I am in the process of putting Qlabels in a QGridLayout to arrange them nicely in a class derived from QWidget .", "EDIT : I already did what this answer http : stackoverflow.com a 18923122 2756980 suggested my custom widgets are in a layout QGridLayout .", "I try to remove widgets from a specified row in a QGridLayout like this : .. . .. . But when I call it the app crashes with SIGSEGV on delete item in the first iteration .", "I would like to fill a QGridLayout with QWidgets .", "But then you try to add that self.form layout to toplayout a QGridLayout .", "The specific widget which I want to show inside QGridLayout is to be specified dynamically .", "You can also check this question QGridLayout : Getting the list of QWidget added http : stackoverflow.com questions 4160526 qgridlayout-getting-the-list-of-qwidget-added .", "I have a four-panel QGridLayout and want to reserve one of the panels for a miniature view of other widgets like 3D views .", "I am using QGridLayout to add one QPushButton and one QTextEdit .", "I tried with cellRect from QGridLayout MapToParent inherited from QWidget forcing render area to show but no luck so far .", "PyQt5 simple chat GUI mockup http : i.stack.imgur.com 8e6kZ.png .. . .. . I used QGridLayout and this is what I got : .. . .. .", "You can always cast it to QGridLayout by dynamic-cast http : en.cppreference.com w cpp language dynamic-cast : .. . .. . If you re sure widget- layout points to your QGridLayout you don t have to check .", "Is there any way to reference a QGridLayout from a specific widget without having to know the layout by name", "For example : .. . .. . Again with the QHBoxLayout and QGridLayout might no longer need to use the grid you may have to play with the alignments to get the results you want .", "Then make each button use 2x2 grid-layout cells which you can use by using the right QGridLayout : : addWidget overload http : doc.qt.io qt-5 qgridlayout.html addWidget-2 .", "My problem is that i need the row and column of the qpushbutton that was clicked in qgridlayout but havent been able to find how to do it .", "In other words : How do I set content margins for a single column in a QGridLayout", "I suggest you to set QGridLayout margins to 0 and add for each column a QVertiacalLayout item .", "QGridLayout in LoupingWidget constructor add topGroupBox to the layout and set the layout as LoupingWidget s layout .", "So I fill QGridLayout by ui- spellLayout- addWidget .. . .. . .. . When PElement is clicked it emits signal .", "About QGridLayout rows and columns .. . .. . First note that rowCount and columnCount return the number of internally allocated rows and columns .", "If the widgets also become deleted they will disappear from the GUI .", "Look at the docs on QGridLayout : : AddWidget http : doc.qt.io qt-5 qgridlayout.html addWidget : .. . .. . The default alignment is 0 which means that the widget fills the entire cell .", "In particular having set the layout of a widget you can use QWidget : : layout to get QLayout and downcast it to QGridLayout or QVBoxLayout .", "It looks like you didn t call QGridLayout : : removeWidget for all cells in row that you would like to remove .", "EDIT : This doesn t solve the problem also I found the source of my knowledge : Is there any way to remove a QWidget in a QGridLayout", "application mockup http : i.stack.imgur.com 8b9qR.png .. . .. . I need to clearly define the ratio of the two columns of QGridLayout It is green in the image .", "All those buttons are placed inside a QGridLayout http : doc.qt.io qt-5 QGridLayout.html .", "The way I want it to work is choosing the number of QGridLayout columns and creating squares of the correct sizes .", "Whenever items are deleted from a QGridLayout the number of logical rows and columns will never decrease even though the number of visual rows or colums may do .", "The format of adding a widget or layout to your QGridLayout is as follows : .. . .. . You can put your rowspan and columnspan as required by you .", "Can I tell QGridLayout to retain a copy of a specific widget I am adding", "Although based upon the QGridLayout doc http : qt-project.org doc qt-4.8 qgridlayout.html details this may have the same result .", "Or you could always use the QHBoxLayout within the first row column of the QGridLayout it s ultimately up to your future use cases .", "I am trying to create a window with following layout .. . .. . -------------------------- .. . Button1 Button2 .. . ------------------------ .. . ------- Image-------- .. . ------------------------- .. . .. . .. . I am able to create this layout using QGridlayout .", "I want create a Table based on QGridLayout that consist my custom widgets with different amount of columns in each row for example : http : urls.by tbl .. . .. . How i can do it", "When you place it to your QGridLayout it becomes a parent for them so you can do something like this : .. . .. . Or you can use a widget that own s your layout - no matter .", "Unfortunately it looks like that as soon as you add a QAction to a QToolButton Qt automatically decides to shrink it down to the minimal size which is not what I want given my QGridLayout .", "What I essentially want to achieve is this http : i.stack.imgur.com cFI0C.png but with having 0 qwidgets in the qgridlayout and increasing them 1 by 1 sorting from bottom left to top left etc .", "I m having an issue where a custom widget I am making appears just fine when added to a QGridLayout without specifying an alignment but when I specify an Alignment it disappears .", "On pressing delete key i am removing QTextWidget : .. . .. . So i think i have to set the position of QGridLayout so that everytime after removing widget it should be in its proper position .", "If you re not happy with that I would try using a QHBoxLayout http : qt-project.org doc qt-5.0 qtwidgets qhboxlayout.html rather than the QGridLayout to layout the items horizontally .", "If I put delete inside the else clause the app doesn t crash but widgets are still visible although they deleted from the grid", "I populate the grid with my Widget class which extends the QWidget class .", "Because of this you should always work directly with the items in the QGridLayout using methods such as getItemPosition http : qt-project.org doc qt-4.8 qgridlayout.html getItemPosition and itemAtPosition http : qt-project.org doc qt-4.8 qgridlayout.html itemAtPosition .", "2 Only adjust the size policies of the widgets I found that adding stuff in the grid-layout starts making things confusing .", "When we maximize the window QGridLayout ends up with 12 columns when we do a restore even though every item is removed the layout still assumes 12 columns so in picture 3 it is displaying 6 images but thinks it needs to display 12 so it just overlaps the other ones .", "To make the grid-layout fill the main window right-click the main window and click Lay out Lay out vertically .", "When you remove widgets from the layout they will still remain visible .", "I can add widgets to the layout and they display in my window but I can t figure out how to resize them properly .", "ok i think that row count only goes up as per here http : www.qtcentre.org threads 31297-rowCount-does-not-update-after-removing-widgets-from-grid-layout", "Is there a way to pass the widgets to ui", "programa says that the widgets do not .", "Note that if you don t do that the widgets will simply keep visible at their current position which is almost certainly not what you want .", "Use widgets like you want to do .", "Perhaps setting the QSizePolicy of the added widgets may help .", "This appears to work for everything except for QScrollArea widgets .", "If you want to shrink your widget you have to change the sizePolicy of your widgets from Fixed to Preferred .", "Or I can make all widgets in layout members of MainWindow class and access them directly .", "In my opinion there s nothing wrong in making the widgets also members of the main class .", "Putting it all together - the code .. . .. . Use the removeRow and removeColumn functions from below to remove a row or column from a grid-layout .", "And the second to remove all the widgets in the QScrollArea .", "How to add and remove widgets dynamically", "However when I try to access the coordinates it always returns 0 0 .. . .. . Here is my code : .. . .. . These are to be shown as I said before in the following class derived from QWidget : .. . .. . The qDebug fillingBrick- parentWidget returns render area which is good but qDebug grid- getBrick 5 - pos returns QPoint 0 0 which is not .", "Bad GUI http : i.stack.imgur.com zSDlm.png", "As an example if you call addWidget widget 5 7 on a freshly constructed grid-layout the row count will be 6 and the column-count will be 8 and all cells of the grid-layout except the cell on row index 5 and column index 7 will be empty and thus invisible within the GUI .", "Thats why I m trying to delete them from the layout the grid that goes into the widget- layout and make a new grid for the next page", "In short you don t need to delete the widgets and recreate them .", "Well I found a solution to that Break the Layout arrange the widgets and then set the layout", "It should just be a matter of setting the proper size policy on your widgets .", "I have some code that displays a few widgets in the window ." ] }
{ "confidence": [ 59.98965835571289, 57.6153564453125, 52.39888381958008, 51.62939453125, 51.45459747314453, 51.0049934387207, 50.86723327636719, 49.85181427001953, 49.61345672607422, 49.601165771484375, 49.56397247314453, 48.15024948120117, 47.93690490722656, 47.623958587646484, 47.20172119140625, 46.26934051513672, 45.897300720214844, 45.78645324707031, 45.59356689453125, 45.01658630371094 ], "content": [ "Question : I have a UIForm named Spell that contains inter alia QGridLayout with custom widgets named PElement . The amount of PElement widgets depends on number of spells in my database . So I fill QGridLayout by ui- spellLayout- addWidget .. . .. . .. . When PElement is clicked it emits signal . I need to connect each of PElement in QGridLayout with slot in Spell class . I have no idea how to do it . Thanks for help @edit .. . .. . this is a function that add PictureElement to QGridLayout .. . .. . What I want : connect every PictureElement SIGNAL clicked from QGridLayout with slot in Spells class . Comment : I think you need to provide a bit more code . Not really sure what you are asking . Comment : I update my question .. . Answer : I am not quite sure where the issue ist . Assuming your class PictureElement inherits QObject contains the Q OBJECT macro and emits the signal your simply add a connect line in your foreach loop : .. . .. . You are already in the Spells class so theaccess shouldn t be an issue . Of course the slotname function needs to be defined as a slot in the header . To identify which PictureElement emitted the signal within the slot you can use the QObject : : sender method .", "Question : null .. . Answer : I have a four-panel QGridLayout and want to reserve one of the panels for a miniature view of other widgets like 3D views . The specific widget which I want to show inside QGridLayout is to be specified dynamically . However when I pass a widget to QGridLayout via QGridLayout : : addWidget the widget disappears from where it was before . Obviously this is a policy of QGridLayout . Is there a workaround to avoid this Can I tell QGridLayout to retain a copy of a specific widget I am adding Is there a way to pass a copy or an image of the widget I just don t have a clue at this point . Thanks in advance Comment : Take a look at Kaleb Peterson answer in this question stackoverflow.com questions 7042799 http : stackoverflow.com questions 7042799 showing-the-same-qpushbutton-on-multiple-widgets Comment : Thanks a lot for the link but I prefer the solution provided by blueskin himself . I wanted to avoid writing extra subclasses for that but I see now that this is the only possible way .", "Question : I try to remove widgets from a specified row in a QGridLayout like this : .. . .. . But when I call it the app crashes with SIGSEGV on delete item in the first iteration . Any ideas .. . Answer : Note : If you re just looking for a quick fix for this problem then simply use the code which is provided below . If you re interested in the backgrounds and difficulties of row and column handling in grid layouts then read on . About QGridLayout rows and columns .. . .. . First note that rowCount and columnCount return the number of internally allocated rows and columns . As an example if you call addWidget widget 5 7 on a freshly constructed grid-layout the row count will be 6 and the column-count will be 8 and all cells of the grid-layout except the cell on row index 5 and column index 7 will be empty and thus invisible within the GUI . Note that it s unfortunately impossible to remove such an internal row or column from the grid-layout . In other words the row and column-count of a grid-layout can thus always only grow but never shrink . What you can do is to remove the contents of the cells of a specific row or column which will effectively have the same effect as removing the row or column itself . Note however that this will neither change any row or column-count nor any row or column indices . Clearing a row or column .. . .. . So how can the contents of a row or column be cleared This unfortunately also isn t as easy as it might seems . First you need to think about if you only want to remove the widgets from the layout or if you also want them to become deleted . If you only remove the widgets from the layout you can put them back into a different layout afterwards or manually give them a reasonable geometry . Note that if you don t do that the widgets will simply keep visible at their current position which is almost certainly not what you want . If the widgets also become deleted they will disappear from the GUI . The code provided below uses a boolean parameter to control widget deletion . Next we have to consider that a layout cell can not just only contain a widget but also a nested layout which itself can contain nested layouts and so on . We further need to handle layout items which span over multiple rows and columns . And finally there are some row and column attributes like minimum widths and heights which don t depend on the cell contents but still have to be reset . Putting it all together - the code .. . .. . Use the removeRow and removeColumn functions from below to remove a row or column from a grid-layout . Comment : I think this line should use not . if r row r + rs - 1 row c column c + cs - 1 column . Otherwise every cells in the same row or column will be deleted . Comment : The remove function is just a helper for removeRow and removeColumn here so it is correct . But yes if you just want to remove a single cell from the layout then you can adapt the remove function from above like you said .", "Question : I m trying to lay out a grid of square custom subclassed QWidgets inside a QGridLayout and QScrollArea . The way I want it to work is choosing the number of QGridLayout columns and creating squares of the correct sizes . What I ve tried doing already is .. . .. . 1 . Manually laying out resizing the QWidgets but this was sloppy and slow .. . 2 . Setting QScrollArea : : widgetsResized to true which does resize the width correctly but not the height see screenshot http : i.imgur.com ak9IbgT.png . I ve tried setting QSizePolicy and overriding QWidget : : heightForWidth along with setting QScrollArea : : widgetsResized in my custom QWidget-derived class like so : .. . .. . But CustomWidget : : heightForWidth is never called . Any help would be appreciated . EDIT : I already did what this answer http : stackoverflow.com a 18923122 2756980 suggested my custom widgets are in a layout QGridLayout . Comment : possible duplicate of QWidget : : heightForWidth is not called http : stackoverflow.com questions 17708449 qwidgetheightforwidth-is-not-called Comment : Did you try calling setFixedSize on each widget Comment : @PavelStrakhov I don t want a fixed size I want the same height as every variable-width . I tried overriding sizeHints but it didn t work for this since I need to return both width and height in that method . Comment : @m.s . It s not a duplicate since I m doing what the accepted answer suggested . My custom QWidgets already are in a layout . Also you might want to actually read the question the next time you mark something as a duplicate . Thanks . .. . Answer : It seems that you re missing hasHeightForWidth implementation . The following snippet works fine :", "Question : I m trying to layout a window all in code with a QGridLayout . I can add widgets to the layout and they display in my window but I can t figure out how to resize them properly . Here s what I d like .. . .. . Those are the 3 panes of my window all three of them lists . The left and right ones should be of a static width and hug their respective sides and the center should expand to fill the width as the window grows or shrinks . Some code : .. . .. . As you might be able to tell this is going to eventually be a 9x9 grid but the point remains I m trying to get my middle row GridRowSecond to have the stretchy columns . The rows themselves expand just fine . The problem seems to be getting the widgets at each cell to expand to take up their containing space . How do I do this also vertically my list is expanding properly but not horizontally . .. . Answer : Look at the docs on QGridLayout : : AddWidget http : doc.qt.io qt-5 qgridlayout.html addWidget : .. . .. . The default alignment is 0 which means that the widget fills the entire cell . But you have the following : .. . .. . Thus you ve specifically told the grid-layout that you want your widget aligned to the left center right and left of their cells respectively . In your case you probably want to use the default alignment allowing the widgets to fill the cells and follow their own respective size policies . Comment : Dang . I missed that when reading the docs . That did it . Thank you", "Question : I have a QGridLayout containing mostly QLabels . It s a 3x10 grid and I want different margins on the content of each of the three columns . Eg . I want to be able to place my labels with a different amount of space to their grid border . If I set the property ContentMargins it just refers to everything in my grid . In other words : How do I set content margins for a single column in a QGridLayout ...and while we re at it can you do the same for individual rows Thank you in advance for your help Comment : You can set margins for each label individually.. . Comment : Yes thank you headsvk but I am interested in generalizing the property for every Label or other widget in my grid column . .. . Answer : I suggest you to set QGridLayout margins to 0 and add for each column a QVertiacalLayout item . and set margins in QVertiacal layout in stance Comment : Yes this is not exactly an answer to my question but it makes sense . In fact maybe i should just make a QHBoxLayout and add three QVBoxLayouts to it . That way I can handle the QVBoxLayouts individually like you say . Thank you .", "Question : I am trying to design a sudoku game with a grid-layout full of qpushbuttons At the momment of inserting a number in of the qpush button whihch is triggered when clicking on them I need to check if its a valid move depending on the other cells . My problem is that i need the row and column of the qpushbutton that was clicked in qgridlayout but havent been able to find how to do it . Is there some way to obtain the coordinates of the qpushbutton clicked on the qgridlayout .. . Answer : http : doc.qt.io qt-4.8 layout.html horizontal-vertical-grid-and-form-layouts .. . .. . http : doc.qt.io qt-4.8 qgridlayout.html getItemPosition .. . .. . http : doc.qt.io qt-4.8 qlayout.html indexOf .. . .. . Your code should look something like : .. . .. . Hope that helps .", "Question : I am using QGridLayout to add one QPushButton and one QTextEdit . but whenever i am hiding and removing QTextEdit widget then QPushButton is coming on the position of QTextEdit . Initially QPushButton is in position lets say 0 0 and QTextEdit is in position 100 0 . Then on removing QTextEdit QPushButton is coming on QTextEdit position ie at position 100 0 . On pressing delete key i am removing QTextWidget : .. . .. . So i think i have to set the position of QGridLayout so that everytime after removing widget it should be in its proper position . enter image description here http : i.stack.imgur.com Dnvch.png enter image description here http : i.stack.imgur.com QDnQm.png Comment : If it s possible to post a screenshot it could be helpful in seeing the issue more clearly . Comment : Added screenshots .. . Answer : Based upon your screenshot it looks like the column is completely removed when you remove the QTextWidget . You can try experimenting with setting the visibility of the QTextWidget to false rather than removing it . Although based upon the QGridLayout doc http : qt-project.org doc qt-4.8 qgridlayout.html details this may have the same result . Or when you remove the QTextEdit replace it with a QSpacerItem http : qt-project.org doc qt-5.0 qtwidgets qspaceritem.html so the column isn t completely remove . If that still doesn t work I would next try changing your align of the QPushButton to Qt : : AlignLeft . If you re not happy with that I would try using a QHBoxLayout http : qt-project.org doc qt-5.0 qtwidgets qhboxlayout.html rather than the QGridLayout to layout the items horizontally . Or you could always use the QHBoxLayout within the first row column of the QGridLayout it s ultimately up to your future use cases . For example : .. . .. . Again with the QHBoxLayout and QGridLayout might no longer need to use the grid you may have to play with the alignments to get the results you want . Something like this might work Comment : Added screenshots Comment : @Rupesh Updated my answer based upon your screenshot hopefully that helps point you in the right direction .", "Question : I need a QMainWindow layout to change depending on the number of cores . Therefore I set it manually not using the Design mode . My question is : After this layout was created how can I refer to the widgets it contains I can get the QLayoutItem out of this- centralWidget . Or I can make all widgets in layout members of MainWindow class and access them directly . However I feel that neither of these is the right way . Is there a way to pass the widgets to ui So that I could access them by calling ui- threadingTable Comment : In my opinion there s nothing wrong in making the widgets also members of the main class . Of course you don t usually need to access all of them and signals might be connected before adding them to the layout . .. . Answer : Both options are fine . It is possible to get pointer to threadingTable from the main class member or directly from the objects hierarchy : .. . .. . Of course null verification may be required . You can also check this question QGridLayout : Getting the list of QWidget added http : stackoverflow.com questions 4160526 qgridlayout-getting-the-list-of-qwidget-added . The class Ui : : MainWindow is automatically generated from the .ui xml form that can be generated in the Design mode : Using a Designer UI File in Your Application http : doc.qt.io qt-5 designer-using-a-ui-file.html .. . .. . Since the layout is constructed manually the .ui file and the ui instance is not needed at all . You can remove them from your project . On the other hand it is possible to use custom widgets even in the Design mode in .ui forms . So if you need some tricky object you can build the entire form in handy Design mode and then for example the standard QTableView may be promoted to your CustomTableView that is inherited from QTableView . That custom class may implement some special behavior .", "Question : I am trying to create a simple QGridLayout of images in PyQt5 but have found myself stuck because QGridLayout only has functionality for adding widgets and layouts via .addWidget and .addLayout . Below is my code that expects a QWidget but is having problems because I can t seem to find any QWidgets that can handle a png jpg file . The above is just the first of the images that I would like to add to my layout . The only problem is that because QIcon is not technically a QWidget I receive a compiler error . I looked at other QObjects that handle images including QImage and QPainter but because these classes are all of type QtGui I can t pass them into my grid . Any suggestions for how to produce a QWidget from an image or using a specific QWidget that handle s images .. . Answer : QLabel is the widget you need . It can display a QPixmap not only text . Comment : Small problem I was using these QIcon s to be placed into QListWidgetItem s . Is there a QWidget better than QListWidget for adding a list of images to a layout", "Question : I have a QWidget that contains a QGridLayout which in turn contains a handful of QPushButtons . These are all generated programmatically . Later in the code separate from where the layout is defined I need to be able to add more pushbuttons to specific row column positions in the layout . I tried using : widget- layout - addWidget button row col to reference the layout and add the buttons . However widget- layout only returns a generic QLayout item which does not allow me to specify row and column values . Is there any way to reference a QGridLayout from a specific widget without having to know the layout by name I m using Qt 4.8 if it makes a difference . .. . Answer : You can always cast it to QGridLayout by dynamic-cast http : en.cppreference.com w cpp language dynamic-cast : .. . .. . If you re sure widget- layout points to your QGridLayout you don t have to check . Otherwise check gridLayout against nullptr . Comment : Awesome that works Thanks for the help", "Question : I got the following arrangement original here https : dl.dropboxusercontent.com u 3306414 teste.png : .. . .. . test image http : i.stack.imgur.com bEIuC.png .. . .. . Five unconvencional unsual sized buttons w : 400 h : 300 and they are arranged int the following way : four square mode two on top and two at buttom closely tight together and a fifth button in the center overlaping the instersection of the other four buttons . I would like to know if is there any layout gridlayout form layout etc that I can use to keep this arrangement when I expand maximize and or minimize the window Thanks for any help . .. . Answer : Use QGridLayout with size 4x4 . Then make each button use 2x2 grid-layout cells which you can use by using the right QGridLayout : : addWidget overload http : doc.qt.io qt-5 qgridlayout.html addWidget-2 . There give columnSpan and rowSpan of 2 . Comment : I ll try that . Thanks", "Question : How to arrange the QGridLayout like above I tried : .. . .. . but failed . .. . Answer : Is it somehow mandatory for you to use QGridLayout for some reason For simple layouts like this I find it easier to use a combination of one QHBoxLayout and one QVBoxLayout .", "Question : I try to remove widgets from a specified row in a QGridLayout like this : .. . .. . But when I call it the app crashes with SIGSEGV on delete item in the first iteration . Any ideas .. . Answer : The QGridLayout itself is managing the QLayoutItem s . I believe the moment you call removeWidget the item will be deleted . Thus you have an invalid pointer at that point . Attempting to do anything with it not just delete will fail . Thus just don t delete it you ll be fine . Comment : Hm.. . actually docs say Removes the layout item item from the layout . It is the caller s responsibility to delete the item . Comment : I was a bit quick with my answer . removeWidget has no such note and presumable deletes the associated QLayoutItem as presumably you may not have a pointer to it . So either remove only by widget or put the delete inside the else clause . Comment : If I put delete inside the else clause the app doesn t crash but widgets are still visible although they deleted from the grid Comment : Yes you ve simply removed the item . The docs do state the widget is still there : you need to delete the widget . The API here isn t so clear . I wonder if you could just do delete item and skip the remove statements altogether that works in most other cases in Qt . Comment : I looked at the sources of qt 4.7.2 . removeWidget calls delete takeAt .. . where removeItem just calls takeAt .. . . I mark your answer as an accepted . Thanks .", "Question : I m trying to layout a window all in code with a QGridLayout . I can add widgets to the layout and they display in my window but I can t figure out how to resize them properly . Here s what I d like .. . .. . Those are the 3 panes of my window all three of them lists . The left and right ones should be of a static width and hug their respective sides and the center should expand to fill the width as the window grows or shrinks . Some code : .. . .. . As you might be able to tell this is going to eventually be a 9x9 grid but the point remains I m trying to get my middle row GridRowSecond to have the stretchy columns . The rows themselves expand just fine . The problem seems to be getting the widgets at each cell to expand to take up their containing space . How do I do this also vertically my list is expanding properly but not horizontally . .. . Answer : It should just be a matter of setting the proper size policy on your widgets . So the buttons on the left and right : .. . .. . and for the middle button .. . .. . where the first argument defines the horizontal size policy and the second one defines the vertical size policy . See the size policy documentation as well http : doc.qt.nokia.com 4.7 qsizepolicy.html Policy-enum", "Question : I built a ui in QT Designer and then used pyside-uic turned it into a python file and have then written some code to edit it programmatically . In otherwords I have a pushbutton Add Row that when clicked will rename itself to Remove1 and create another pusbutton name it Add Row and add it to the layout . Code when clicking Add Row changes the name and the signals-slots : .. . .. . Code when clicking Remove removes selected button : .. . .. . This works just fine until you add at least one and then remove it the next time round it messes up . Basically it misbehaves when I have two buttons and remove one and then try to add one . By misbehaves I mean that the new button ends up on top of the old sometimes it appears below instead of above . Also with the lines as they currently are it doesn t really reorganise things in the gridlayout if I use the .hide function it does . I m not quite sure which I should be using . Thanks Here is a sequence that produces undesirable results : .. . .. . Fresh start Image 1 http : i.stack.imgur.com FwMJu.png .. . .. . After Clicking Add After clicking Add http : i.stack.imgur.com sVHLn.png .. . .. . After clicking remove all fine so far then click Add no visible difference after remove 1 http : i.stack.imgur.com 59acJ.png .. . .. . After clicking Add a second time enter image description here http : i.stack.imgur.com xkXgr.png .. . .. . After clicking Remove2 Remove1 appears from under it enter image description here http : i.stack.imgur.com 02gCY.png .. . .. . Working example of code Comment : Could you define what you mean by misbehaves What is the error you are seeing I ve seen an issue in my own code where removing an item from a grid-layout and adding another one in its place results in both the old and the new item being drawn on top of each other . Is this what you see Comment : Yes This is exactly what I see It s driving me nuts Comment : Cool I ll post an answer to show you how I fixed it .. . Answer : The problem here is caused by an implementation detail of QGridLayout . Whenever items are deleted from a QGridLayout the number of logical rows and columns will never decrease even though the number of visual rows or colums may do . Because of this you should always work directly with the items in the QGridLayout using methods such as getItemPosition http : qt-project.org doc qt-4.8 qgridlayout.html getItemPosition and itemAtPosition http : qt-project.org doc qt-4.8 qgridlayout.html itemAtPosition . Below is a re-write of the DesignerMainWindow class from the example using this approach . Obviously it may need tweaking somewhat to work with your real application . Comment : firstly thanks Almost there so if i understand correctly there are still additional rows . Now am I correct to assume that your method doesn t actually get rid of these rows but just finds a way around this The reason I say this is because the number next to the Remove button always increases Comment : ok i think that row count only goes up as per here http : www.qtcentre.org threads 31297-rowCount-does-not-update-after-removing-widgets-from-grid-layout Comment : @evan54 . Yes it s an implementation detail as I said in my answer : added rows don t get deleted . I suppose you could re-use rows by deleting the widgets and leaving the layout-items in there . But that would make things a lot more complicated to manage .", "Question : I want create a Table based on QGridLayout that consist my custom widgets with different amount of columns in each row for example : http : urls.by tbl .. . .. . How i can do it When i change widgets width in first row another rows also change width . Comment : You can find your solution by this google query : google.com search q column+span+in+grid+layout+qt https : www.google.com search q column+span+in+grid+layout+qt Comment : Yes . I knew about span property . But when i spanning second cell in first row next cells don t shift to right . For example : u.to QHpDBA http : u.to QHpDBA How I can shift next cells Comment : please show some code that doesn t work as expected . .. . Answer : The format of adding a widget or layout to your QGridLayout is as follows : .. . .. . You can put your rowspan and columnspan as required by you . For example if you want the widget to span 4 columns you just need to put 4 in the required field . EDIT : Ofcourse there are other optional fields for alignment etc but I haven t mentioned those in the above format . EDIT 2 : So what I understand is that you want to be able to insert or magnify cells in any row and the rest of the cells should shift accordingly . In that case I think a QHBoxLayout for each row would be more suitable . You can then align these QHBoxLayouts in a single QVBoxLayout Comment : When i spanning second cell 01 in first row next cells 02 03 04 don t shift to right . Watch link : u.to QHpDBA How I can shift next cells", "Question : I ve subclassed QWidget and defined constructor this way : .. . .. . Next I am trying to add it in a QDialog : .. . .. . When this two lines are commented out two widgets are placed horizontally . And that s good but when I uncomment lines with another QGraphicsViews it fills entire window . What am I doing wrong .. . Answer : LoupingWidget doesn t have a layout so when it s added to another layout layout can t resize it according to its contents . You need to create another layout e.g . QGridLayout in LoupingWidget constructor add topGroupBox to the layout and set the layout as LoupingWidget s layout . Comment : Thank you that s great Such a silly bug of mine .", "Question : Is it possible to have QGridLayouts within another QGridLayout I have been trying to do this using the UI designer so that I can resize all QGridLayouts uniformly . This is for an Ultimate-Tic-Tac-Toe game I am creating for fun . Here I have nine QGridlayouts . I want to group them together . If I want to expand the boxes I have to go through each one and expand them . Or I have to copy-paste the first box and make sure they are all aligned again . enter image description here http : i.stack.imgur.com Ifnx0.png .. . .. . I tried selecting all of them and clicking Lay Out in a Grid but that messes up how they are displayed . Especially the lines that separate the layouts . Am I not doing this correctly This just looks weird : .. . .. . enter image description here http : i.stack.imgur.com xDrRq.png Comment : Layouts like this typically are best suited to doing with code vs . in the designer . Perhaps the spirit of my answer about this battleship game http : stackoverflow.com questions 8335025 qt-update-pixmap-grid-layout-with-2d-array-values would be helpful . .. . Answer : Yes there is no any problems inserting QGridLayout into another QGridLayout . Here is a demonstration how it can be done in the designer . Pay attention that there are no any lines when you open the widget in the Preview : they are visible only for design purposes . Buttons are added to the layouts just to see how they are places in the Preview . enter image description here http : i.stack.imgur.com BSe8K.gif", "Question : I m trying to layout a window all in code with a QGridLayout . I can add widgets to the layout and they display in my window but I can t figure out how to resize them properly . Here s what I d like .. . .. . Those are the 3 panes of my window all three of them lists . The left and right ones should be of a static width and hug their respective sides and the center should expand to fill the width as the window grows or shrinks . Some code : .. . .. . As you might be able to tell this is going to eventually be a 9x9 grid but the point remains I m trying to get my middle row GridRowSecond to have the stretchy columns . The rows themselves expand just fine . The problem seems to be getting the widgets at each cell to expand to take up their containing space . How do I do this also vertically my list is expanding properly but not horizontally . .. . Answer : You have a lot of variables going here different widgets different size policies on widgets and size policies working on the layout itself so it s a bit difficult to know where things are going wrong . A couple of suggestions : .. . .. . 1 First try to accomplish what you want with just one type of widget . For example all QLabels with all Expanding size policies . 2 Only adjust the size policies of the widgets I found that adding stuff in the grid-layout starts making things confusing . The stretch factor for the widget s size policy should work fine . 3 Don t be afraid to try different ratios for stretch factors . I ve found that this is one of the things where Qt Designer Creator is helpful for puzzling these things out . It s much faster to adjust things in Designer and resize then the run compile cycle . After you have solved the issue there you can take the properties you have found and put it in your code instead of a edit compile run ." ] }
[ "yes-answer-long", "yes-answer-short" ]
qt
UNK_RELATION
uima@video@208
uima -- uima unstructured information management architecture is an architecture for creating scalable applications that analyze and extract information from unstructured data sources such as text audio and @placeholder .
{ "confidence": [ 68.17607879638672, 53.21028137207031, 49.76146697998047, 49.659629821777344, 48.54084014892578, 48.54084014892578, 45.89555358886719, 45.8359375, 45.12161636352539, 44.938636779785156, 43.65494155883789, 43.65494155883789, 43.65494155883789, 42.59162139892578, 42.59162139892578, 42.59162139892578, 41.958290100097656, 41.26951217651367, 41.26951217651367, 41.25658416748047, 41.25658416748047, 41.25658416748047, 40.951072692871094, 40.89497375488281, 40.89497375488281, 40.832725524902344, 40.16728973388672, 39.74560546875, 39.58110046386719, 39.58110046386719, 39.58110046386719, 39.5599365234375, 39.1288948059082, 38.43436813354492, 38.43436813354492, 38.43436813354492, 38.42038345336914, 38.42038345336914, 38.04895782470703, 38.04895782470703, 38.00787353515625, 38.00787353515625, 38.00787353515625, 37.00241470336914, 36.92338943481445, 36.882354736328125, 36.77983474731445, 36.31122589111328, 36.31122589111328, 36.31122589111328, 36.31122589111328, 36.31122589111328, 36.31122589111328, 35.957313537597656, 35.1856575012207, 35.1856575012207, 35.1856575012207, 35.1856575012207, 35.1856575012207, 34.83174514770508, 34.366729736328125, 34.366729736328125, 33.83663558959961, 33.83663558959961, 33.83663558959961, 33.83663558959961, 33.63188171386719, 33.63188171386719, 33.63188171386719, 33.63188171386719, 33.63188171386719, 33.63188171386719, 33.63188171386719, 33.24116516113281, 32.40342712402344, 31.935230255126953, 31.935230255126953, 31.935230255126953, 31.935230255126953, 31.935230255126953, 31.935230255126953, 31.861135482788086, 31.3753604888916, 31.337905883789062, 31.06113052368164, 30.953678131103516, 30.953678131103516, 30.953678131103516, 30.809661865234375, 30.36945152282715, 29.46063995361328, 29.46063995361328, 29.46063995361328, 29.46063995361328, 29.46063995361328, 29.46063995361328, 29.386547088623047, 29.257028579711914 ], "content": [ "I am currently investigating the UIMA Unstructured Information Management Architecture http : domino.research.ibm.com comm research 5Fprojects.nsf pages uima.index.html framework .", "I used UIMA in a process for analyzing and extracting information since text .", "DUCC jobs are created from core UIMA components no knowledge of UIMA-AS required .", "UIMA-AS provides mechanisms for deploying a UIMA pipeline .", "Thus if the task of job cluster management is desired to be delegated to the framework UIMA-DUCC should be used else go for UIMA-AS .", "The question should probably be : what are the advantages of using DUCC on top of UIMA-AS because DUCC is a management layer on top of UIMA-AS .", "As the UIMA Duckbook http : 107.109.112.201 : 42133 doc duccbook.html x1-70001.1 quotes .. . .. . UIMA-AS provides a scale-out mechanism to distribute UIMA pipelines over a cluster of computing resources but does not provide job or cluster management of the resources .", "I am trying to design a distributed-scalable pipeline based on UIMA .", "How should I decide over using UIMA DUCC or UIMA on Hadoop", "If you just want to quickly deploy UIMA-AS pipelines you are good with the basic UIMA-AS infrastructure actually UIMA on top of Active MQ http : activemq.apache.org .", "I am a developer of UIMA Ruta", "There are several ways to express this in UIMA Ruta .", "Java Maven or UIMA Ruta Workbench", "I think that I need to use a scaleout tool like UIMA-Ducc and UIMA-AS but I don t see clearly which .", "Essentially UIMA-AS allows users to put a queue in front of a UIMA component so that it can run in a different thread or in a different process .", "The answer of your question in very easy language is DUCC is the answer of all bottleneck you may be faced in UIMA or UIMA AS .", "I am beginner in UIMA Ruta .", "I m new to Apache UIMA .", "UIMA is a very flexible framework .", "UIMA-AS handles threading and the interprocess transport of CASes .", "Of course you ll have to learn UIMA-AS as well .", "You also need to understand Uima-as first .", "Annotations in UIMA refer to the complete span from the begin offset to the end offset .", "@Peter I converted my project to UIMA Ruta by the option provided by convert project to UIMA Ruta .", "Operations on StringArrays or any other UIMA array are hardly supported in UIMA Ruta 2.2.1 current release .", "Anyone have any experience with UIMA", "In this scenario you would typically run a UIMA pipeline using a run configuration from within Eclipse or the included UIMA pipeline runner application .", "These could be removed with something like : .. . .. . In UIMA Ruta 2.2.1 next release you can also write something like : .. . .. . I am a developer of UIMA Ruta", "Other than some simple bash scripts UIMA-AS does not provide life-cycle management for user processes .", "DUCC is a cluster controller that among other things provides life-cycle management for UIMA-AS services .", "Around this job model DUCC provides cluster management services to automate the scale-out of UIMA pipelines over computing clusters .", "The observation with the prefix is caused by a limitation of the UIMA Ruta Workbench .", "I want to call the API of uima-text-segmenter https : code.google.com p uima-text-segmenter source browse trunk INSTALL r 22 to run an example .", "UIMA Ruta does not import the types of the analysis engine .", "UIMA Ruta 2.2.0 supports mixin projects .", "Create a new UIMA Ruta Project .. . 2 .", "Apache UIMA has a users mailing list and since Ruta and uimaFIT are subproject of UIMA they use the same one .", "Meanwhile I set up an issue for uimaFIT : UIMA-3808 https : issues.apache.org jira browse UIMA-3808", "DUCC builds on base UIMA capabilities providing many scale out options built-in performance metrics and debugging support all based on core UIMA components .", "For those with sufficient Hadoop expertise a relatively simple UIMA analytic can be easily integrated into an existing Hadoop shop without having to learn much about UIMA .", "I am a developer of UIMA Ruta and I am always looking for improvements .", "In UIMA Ruta 2.1.0 there were some problem with type coercion in the regexp rule .", "DUCC defines a formal job model that closely maps to a standard UIMA pipeline .", "Thank you for replying...so can we also say that porting an existing UIMA DUCC pipeline on Hadoop would require minimalistic effort but moving from Hadoop to UIMA DUCC might require design changes and obvioulsy UIMA learning", "Documentation JCas is in the UIMA Core SDK documentation - all the UIMA Core documentation is linked here : uima.apache.org documentation.html https : uima.apache.org documentation.html", "It allows them to work relatively fast with UIMA in a declarative way : all data-structures and analysis engines computing blocks within UIMA are declared in xml with a GUI on top of it after which the framework takes care of the rest .", "How to classify and relate different set of tokens that are obtained from an annotator in UIMA", "I executed it as UIMA ruta file and got the corresponding descriptor file TestAnnotator.xml .", "These local file paths are those with folders in previous UIMA project Example Project .", "Since UIMA Ruta 2.2.0 the absolute paths in the descriptor are optional .", "DISCLAIMER : I am a developer of UIMA Ruta and I will fix the bugs", "Another dimension is taking advantage of UIMA vs taking advantage of Hadoop .", "I m new to ClearTK http : cleartk.github.io cleartk and UIMA https : uima.apache.org .", "I am designing a text-mining pipeline in UIMA DUCC as follows : .. . .. . I intend to run Piepline A B and C in parallel .", "But this very model works when i use it w o UIMA pipeline .", "Here you go : .. . .. . Disclosure : I am working on the Apache UIMA project", "To me it looks like you could be using incompatible versions of ClearTK and UIMA .", "Can you try to separate the UIMA Ruta project and the Maven project .", "This described project can be created the following way with UIMA Ruta 2.2.0 : .. . .. . 1 .", "UIMA is most usually used for building text-mining pipelines which isn t quite what you re describing .", "Is there a way to make entire folders or the classpath in general to UIMA when using it from Java", "Long answer : .. . .. . The link describes how you would set up the application from within the Eclipse UIMA environment .", "I am a newbie in UIMA Currently I am stuck on below situation .", "There are various ways to solve this in UIMA Ruta dependent on the preconditions and requirements .", "Disclosure : I am a DKPro Core developer and an Apache UIMA developer .", "UIMA does not enforce that certain Types Annotations must be present .", "There are several ways to specify this in UIMA Ruta and they mainly depend on the offset the created TargetAnnotation should get .", "When I am asked if something is possible to specify in UIMA Ruta then my answer was almost every time yes .", "There is some functionality in UIMA Ruta to modify the document but the result needs to be stored in another CAS view or in an additional file .", "Which version of UIMA Ruta do you use and what is your development scenario", "I used UIMA ruta 2.2.0 in my example sorry that I did not mention that .", "Note however that the examples in the UIMA-AS documentation only show you how to implement parallelism when processing not when reading .", "The other advantage of DUCC over Uima-as is now CR can also be scaled using Job Driver .", "I am trying to call ClearTK s StanfordCoreNLPAnnotator from within UIMA RUTA but cannot get it to work .", "Error http : i.stack.imgur.com shFVA.png .. . .. . But if I type : .. . .. . IMPORT PACKAGE FROM org . .. . .. . ...and hit Ctrl + space I get a list of suggestions from Uima packages .", "I made this script using a different UIMA Ruta project Call it Example Project in the same eclipse workspace .", "I have used the WORDLIST functionality to great effect with the default UIMA Ruta project .", "I have made a few annotators in UIMA and now i want to check their efficiency.Is there a standardized way to gauge the performance of the Annotators", "UIMA itself does not provide immediate support for comparing annotators and evaluating them against a gold standard .", "However there are various tools implementations out there that provide such functionality on top of UIMA but typically within the confines of the particular tool e.g .", "What could I be missing out if I build it on UIMA DUCC rather than Hadoop or vice-versa", "Luckily UIMA allows you to do exactly the same from code but I would recommend using UIMAFit http : uima.apache.org d uimafit-current tools.uimafit.book.html d5e137 for this purpose instead of of UIMA as it bundles lots of useful things and coding shortcuts .", "I m new to Java and UIMA and I can t find a comprehensive sample to use the AggregatePlaintextUMLSProcessor from code and print results in a proper format .", "UIMA CAS Editor 2.5.0 has some problems resolving type system imports using the datapath which causes problems visualizing the created annotations if the type system descriptor needs additional information such as the datapath .", "I have a dictionary created from the DictionaryCreator from UIMA I would like to annotate a piece of text using the DictionaryAnnotator and the aforementioned dictionary I could not figure out how to get the annotated text .", "If you have already Sentence annotations you can assign the index with something like : .. . .. . Examples have been tested with UIMA Ruta 2.2.1-SNAPSHOT .", "In the UIMA Ruta Workbench one could define the find replace in separate script files and then use one launch configuration for each script file .", "DUCC also provides a mechanism for scaling out a UIMA pipeline with multiple threads and multiple processes and feeding work to the pipeline instances this is called a DUCC Job .", "There are several limitations to consider : .. . .. . UIMA Ruta 2.1.0 does not support mixin projects : maven dependencies need to be specified in another project .", "I haven t tried to run an analysis engine during maven build but that should be possible with something like mvn exec mojo.codehaus.org exec-maven-plugin examples http : mojo.codehaus.org exec-maven-plugin examples example-exec-for-java-programs.html and RutaLauncher svn.apache.org repos asf uima ruta trunk ruta-ep-ide-ui src https : svn.apache.org repos asf uima ruta trunk ruta-ep-ide-ui src main java org apache uima ruta ide launching RutaLauncher.java", "You maybe want to take a look at UIMA Ruta http : uima.apache.org ruta.html for a rule-based approach .", "See also this post http : markmail.org message w4fffq32rt57yh6p on the UIMA developer mailing list .", "In my UIMA application I have some annotators that must run after a certain annotator has run .", "In UIMA the primary way in which one assures that the annotations you need are present for your annotator is to aggregate annotators together .", "Disclosure : I am working on the Apache UIMA project but I didn t use the CapabilityLanguageFlowController so far", "I am using UIMA in combination with UIMAfit and dkpro and the StanfordParser to parse english sentences .", "the CapabilityLanguageFlowController https : svn.apache.org repos asf uima uimaj trunk uimaj-core src main java org apache uima flow impl CapabilityLanguageFlowController.java : .. . .. . You could configure your aggregate to use such a flow controller and then you can benefit from capabilities .", "For clarity and simplicity what I think I would like to do is to keep all my UIMA stuff under a single root folder ." ] }
{ "confidence": [ 70.44539642333984, 69.02081298828125, 65.1780014038086, 65.1454086303711, 63.72405242919922, 61.80838394165039, 59.03923797607422, 58.06415557861328, 52.61370086669922, 49.463279724121094, 49.04245376586914, 47.906925201416016, 47.81321716308594, 46.08872985839844, 45.1041259765625, 44.43289566040039, 43.740142822265625, 43.72811508178711, 43.5688362121582, 43.49195861816406 ], "content": [ "Question : I am starting a new open-source project to develop an application that will provide services to convert various documents into other formats E.g . doc - html pdf - html plain text - html etc . It will utilize many other open-source tools to facilitate the document conversion . I am looking for a framework that I can use for this purpose . The main requirements of the application are as follows : .. . .. . Provide both a library for direct use as well as a web service that exposes the underlying library . Provide plugin-oriented service . This means it should allow the tools for use to convert documents to be plugged-in and plugged-out by the clients . This allows tools to convert documents to be added and removed in the future . Provide fallback mechanism . This means it should be able to fall back to use other tools installed if the previous tool used failed to convert the documents . For example use tool A tool A failed use tool B tool B also failed use tool C tool C succeeded stop and return the results . It should be robust . If a tool collapses it should not take down the entire application . Failure recovery . Able to restart itself in a catastrophe event . Anyone have any recommendations on existing frameworks in Java that I can use to satisfy most if not all of the above requirements Thanks PS . I am currently investigating the UIMA Unstructured Information Management Architecture http : domino.research.ibm.com comm research 5Fprojects.nsf pages uima.index.html framework . I know that UIMA is normally used for natural language processing to retrieve entities of text documents but on the surface from reading the manuals - haven t tried anything further it seems quite good and possibly flexible enough to be tweaked to meet my requirements above . Anyone have any experience with UIMA Please kindly share your experience pros and cons whether it is feasible to be used as a framework of the application based on the requirements listed above . .. . Answer : Apache Coccoon sounds like the closest to what you re describing but I ve no idea of its failure characteristics . UIMA is most usually used for building text-mining pipelines which isn t quite what you re describing . I suspect you ll need to write something yourself . For the plugin aspect you would define an interface and a central abstraction and then use Spring Guice OSGI or similar to manage implementations . You might find a format identification framework like JHOVE http : hul.harvard.edu jhove useful .", "Question : I used UIMA in a process for analyzing and extracting information since text . The pipeline fails with 6 simultaneous processes . I think that I need to use a scaleout tool like UIMA-Ducc and UIMA-AS but I don t see clearly which . When to use each one Which are their differences .. . Answer : UIMA-AS provides mechanisms for deploying a UIMA pipeline . Essentially UIMA-AS allows users to put a queue in front of a UIMA component so that it can run in a different thread or in a different process . UIMA-AS handles threading and the interprocess transport of CASes . Other than some simple bash scripts UIMA-AS does not provide life-cycle management for user processes . DUCC is a cluster controller that among other things provides life-cycle management for UIMA-AS services . DUCC also provides a mechanism for scaling out a UIMA pipeline with multiple threads and multiple processes and feeding work to the pipeline instances this is called a DUCC Job . DUCC jobs are created from core UIMA components no knowledge of UIMA-AS required .", "Question : I used UIMA in a process for analyzing and extracting information since text . The pipeline fails with 6 simultaneous processes . I think that I need to use a scaleout tool like UIMA-Ducc and UIMA-AS but I don t see clearly which . When to use each one Which are their differences .. . Answer : The question should probably be : what are the advantages of using DUCC on top of UIMA-AS because DUCC is a management layer on top of UIMA-AS . If you just want to quickly deploy UIMA-AS pipelines you are good with the basic UIMA-AS infrastructure actually UIMA on top of Active MQ http : activemq.apache.org . Note however that the examples in the UIMA-AS documentation only show you how to implement parallelism when processing not when reading . This means that reading in data may become a bottleneck unless you fully implement storing your data on different nodes as well as reading from different nodes . This is actually one of the things that DUCC solves for you . If you follow DUCC best practices your data reads can be distributed using the WorkItem type which is put on top of a CAS . DUCC sort of forces you to do this which is good if you follow its CollectionReader which partitions the input data into blocks + CASMultiplier to do the actual distributed read approach you can get a huge performance increase . Additionally DUCC gives you a Hadoop-like web-based monitoring interface and some other nice features such as memory allocation per compute node . If you are planning to run lots of pipelines and are willing to dig into DUCC I d definitely recommend DUCC . Of course you ll have to learn UIMA-AS as well . Comment : very thanks for your response", "Question : I used UIMA in a process for analyzing and extracting information since text . The pipeline fails with 6 simultaneous processes . I think that I need to use a scaleout tool like UIMA-Ducc and UIMA-AS but I don t see clearly which . When to use each one Which are their differences .. . Answer : As the UIMA Duckbook http : 107.109.112.201 : 42133 doc duccbook.html x1-70001.1 quotes .. . .. . UIMA-AS provides a scale-out mechanism to distribute UIMA pipelines over a cluster of computing resources but does not provide job or cluster management of the resources . DUCC defines a formal job model that closely maps to a standard UIMA pipeline . Around this job model DUCC provides cluster management services to automate the scale-out of UIMA pipelines over computing clusters . Thus if the task of job cluster management is desired to be delegated to the framework UIMA-DUCC should be used else go for UIMA-AS . To answer .. . .. . Which are their differences the duckbook says .. . .. . DUCC provides other facilities in support of scale-out : .. . 1 . The ability to reserve all or part of a node in the cluster . 2 . Automated management of services required in support of jobs . 3 . The ability to schedule and execute arbitrary processes on nodes in the cluster . 4 . Debugging tools and support . 5 . A web server to display and manage work and cluster status . 6 . A CLI and a Java API to support the above . Comment : very thanks for your response it s clear", "Question : I am trying to design a distributed-scalable pipeline based on UIMA . How should I decide over using UIMA DUCC or UIMA on Hadoop What could I be missing out if I build it on UIMA DUCC rather than Hadoop or vice-versa .. . Answer : One dimension is application characteristics . Hadoop will have a big advantage for I O intensive applications . DUCC should have a big advantage for large memory applications that need to run multiple pipeline copies in different threads to achieve high CPU utilization . Another dimension is taking advantage of UIMA vs taking advantage of Hadoop . DUCC builds on base UIMA capabilities providing many scale out options built-in performance metrics and debugging support all based on core UIMA components . The more complex a UIMA pipeline the bigger advantage to DUCC for example complex processing flows can be implemented directly in DUCC but would likely have to be transformed for map-reduce . For those with sufficient Hadoop expertise a relatively simple UIMA analytic can be easily integrated into an existing Hadoop shop without having to learn much about UIMA . Comment : Thank you for replying...so can we also say that porting an existing UIMA DUCC pipeline on Hadoop would require minimalistic effort but moving from Hadoop to UIMA DUCC might require design changes and obvioulsy UIMA learning Comment : Given an existing UIMA pipeline running on Hadoop motivations for moving it to DUCC could be poor CPU utilization the overhead of moving data between HDFS and traditional filesystems or Hadoop instability .", "Question : I used UIMA in a process for analyzing and extracting information since text . The pipeline fails with 6 simultaneous processes . I think that I need to use a scaleout tool like UIMA-Ducc and UIMA-AS but I don t see clearly which . When to use each one Which are their differences .. . Answer : The answer of your question in very easy language is DUCC is the answer of all bottleneck you may be faced in UIMA or UIMA AS . In DUCC the monitoring can be possible with a ease as well as you can define the memory size of a process and the no of threads per process by just changing a job description file . The other advantage of DUCC over Uima-as is now CR can also be scaled using Job Driver . Comment : You also need to understand Uima-as first . Then you will be able to understand Ducc .", "Question : I am trying to design a distributed-scalable pipeline based on UIMA . How should I decide over using UIMA DUCC or UIMA on Hadoop What could I be missing out if I build it on UIMA DUCC rather than Hadoop or vice-versa .. . Answer : you can check this link .. . .. . https : uima.apache.org doc-uimaducc-whatitam.html .. . .. . at the bottom the page you will find out differences . Comment : Thanks for pointing it out.. .", "Question : I want to call the API of uima-text-segmenter https : code.google.com p uima-text-segmenter source browse trunk INSTALL r 22 to run an example . But I don t know how to call the API.. . the readme said .. . .. . Could anyone give me some code which could be run directly in main func for example Thanks a lot .. . Answer : Long answer : .. . .. . The link describes how you would set up the application from within the Eclipse UIMA environment . This sort of set-up is typically targeted at subject matter specialists with little or no coding experience . It allows them to work relatively fast with UIMA in a declarative way : all data-structures and analysis engines computing blocks within UIMA are declared in xml with a GUI on top of it after which the framework takes care of the rest . In this scenario you would typically run a UIMA pipeline using a run configuration from within Eclipse or the included UIMA pipeline runner application . Luckily UIMA allows you to do exactly the same from code but I would recommend using UIMAFit http : uima.apache.org d uimafit-current tools.uimafit.book.html d5e137 for this purpose instead of of UIMA as it bundles lots of useful things and coding shortcuts . Short answer : .. . .. . Using UIMAFit you can call Factory methods that create CollectionReader read input AnalysisEngine process input and Consumer objects write do other stuff from third-party provided XML files . Use these methods to construct your pipeline and the SimplePipeline class to run it . To extract the data you need you would manipulate the CAS object containing your data in a Consumer object possibly with a callback . You could also do this in a Analysis Engine object . I recommend using DKPro s FeaturePathFactory https : code.google.com p dkpro-core-asl source browse de.tudarmstadt.ukp.dkpro.core-asl trunk de.tudarmstadt.ukp.dkpro.core.api.featurepath-asl src main java de tudarmstadt ukp dkpro-core api featurepath FeaturePathFactory.java spec svn1811 r 1811 https : code.google.com p dkpro-core-asl source browse de.tudarmstadt.ukp.dkpro.core-asl trunk de.tudarmstadt.ukp.dkpro.core.api.featurepath-asl src main java de tudarmstadt ukp dkpro-core api featurepath FeaturePathFactory.java spec svn1811 r 1811 to quickly access the feature you are after . Code examples : .. . .. . http : uima.apache.org d uimafit-current tools.uimafit.book.html d5e137 contains examples but they all go in the opposite direction class objects are used in the factory methods instead of XML files - XML is generated from these classes . Take a look at the UIMAFit API to find the method you need AnalysisEngineDescription from XML for example : http : uima.apache.org d uimafit-current api org apache uima fit factory AnalysisEngineFactory.html createEngineDescriptionFromPath-java.lang.String-java.lang.Object...-", "Question : I have made a few annotators in UIMA and now i want to check their efficiency.Is there a standardized way to gauge the performance of the Annotators Comment : What kind of performance Throughput or quality Comment : quality of the extracted information . .. . Answer : UIMA itself does not provide immediate support for comparing annotators and evaluating them against a gold standard . However there are various tools implementations out there that provide such functionality on top of UIMA but typically within the confines of the particular tool e.g . : .. . .. . U-Compare http : u-compare.org supports running multiple annotators doing the same thing and comparing their results .. . .. . WebAnno http : webanno.github.io webanno is an interactive annotation tool that uses UIMA as its backend and that supports comparing annotations from multiple users to each other . There is a class called CasDiff2 in the code that generates differences and feeds them into DKPro Statistics https : dkpro.github.io dkpro-statistics in the background for the actual agreement calculation . Unfortunately CasDiff2 cannot be really used separately from WebAnno yet . Disclosure : I m on the WebAnno team and have implemented CasDiff2 in there . Comment : This may help Thank you", "Question : null .. . Answer : I am beginner in UIMA Ruta . I followed this https : github.com apatry ruta-with-maven to use Ruta with Maven . I understood this but I want to do few more things . Below is my simple test case to run this example .. . .. . This is my script mentioned below . .. . .. . As suggested in the tutorial . I made this script using a different UIMA Ruta project Call it Example Project in the same eclipse workspace . I executed it as UIMA ruta file and got the corresponding descriptor file TestAnnotator.xml . I pasted the same with just altering following to .. . .. . which was initially pointing to BasicTypeSystem.xml file.Currently I am able to build it and execute this script but the descriptor file generated TestAnnotator.xml uses local file path in the respective xml . These local file paths are those with folders in previous UIMA project Example Project . When I tried to configure run settings for script file at above mentioned path i.e . in my Maven project the configuration was not able to locate script at the given path . How should I add dynamic nature of Ruta script within a Maven Project Please help . Comment : Please describe your problem more accurate and in particular don t expect here to get working examples from others . Please describe what you ve already tried and what does not work with error message outputs etc . Comment : Since UIMA Ruta 2.2.0 the absolute paths in the descriptor are optional . The analysis engine tries now to locate them additionally in the classpath of the application . I assume that maybe a folder of the script project needs to be added to the classpath of your application . Example : the analysis engine descriptor in the example Ruta with Maven specifies no absolute paths . The configuration parameter for the main script points to the script file with the complete namespace in the resource folder . Comment : What is the exact error you get Comment : @Peter I converted my project to UIMA Ruta by the option provided by convert project to UIMA Ruta . It generated the folders you are talking about . I added my script to the folder but now it is giving Exception in thread main org.apache.uima.util.InvalidXMLException . I also want to does any maven-plugin provide support to execute script file while building Comment : Can you add the complete exception I haven t tried to run an analysis engine during maven build but that should be possible with something like mvn exec mojo.codehaus.org exec-maven-plugin examples http : mojo.codehaus.org exec-maven-plugin examples example-exec-for-java-programs.html and RutaLauncher svn.apache.org repos asf uima ruta trunk ruta-ep-ide-ui src https : svn.apache.org repos asf uima ruta trunk ruta-ep-ide-ui src main java org apache uima ruta ide launching RutaLauncher.java", "Question : RUTA newbie here . I m processing a document using RUTA and have a lot of normalization to do before I can start annotating . I m trying to find the best way to do a Find and Replace of sequence of characters using regular expressions and groups on the original document in RUTA . In essence I m trying to see how to do something similar to a String.replaceAll in RUTA . For example in Java .. . .. . But I can t figure out a simple way to achieve this in RUTA . Thanks .. . Answer : It s not simple in general because you cannot change the document text in a CAS . There is some functionality in UIMA Ruta to modify the document but the result needs to be stored in another CAS view or in an additional file . A few general comments : .. . .. . Simple regular expression can be applied for matching on patterns like in your question : http : uima.apache.org d ruta-current tools.ruta.book.html ugr.tools.ruta.language.regexprule .. . The action REPLACE enables to remember modifications . The Modifier analysis engine is able to perform modification and is able to store the changed document in an additional CAS view and in an additional HMTL file HMTL since the modifier can also add colored spans .. . the ViewWriter anaylsis engine is able to copy a view to another view if you want to work with initialView .. . If your document contains annotations and these annotations should also be valid after the replace then different functionality is needed . The HTMLConverter has some parameters for replacements but I do not know if it solves your problem in this use-case without more information or further testing . Here s the script for the example in your question : .. . .. . Just to mention : The Modfier has some small bug resulting in doubled whitespaces . A more generic way to model the replacements could be : .. . .. . The ToReplace annotations have now an additional string feature that stores the values that should replace the covered text of the annotations . The regexp expression has an additional capturing-group which is used to specify the string in the annotation assignment of the value using the number of the capturing-group . The rule with the REPLACE is now more generic since the actual value does not need to be given in the action but the value of the feature is applied . The last rule can therefore be used for any replacements specified by other rules . Consecutive replacements that operate on the changed text need to specified in pipeline with sofa mappings in general since later rule need to operate on different views . In the UIMA Ruta Workbench one could define the find replace in separate script files and then use one launch configuration for each script file . The launch configurations are able to specify the input and output folder . Combined with the ViewWriter the user is able to build a chain of scripts file that operate in the output folder of previous script files . Consecutive replacements can also be done in one script file but with some restrictions . The REPLACE action actually stores the new text in the replacement feature of each RutaBasic annotation . The first RutaBasic get the complete new string and the other RutaBasic are set to the empty string . When the new text is created by the Modifier the covered text of the Ruta basic annotations are replaced by the values of the feature thus the first token is replaced by the complete replacement string and the other token are deleted . Knowing this procedure rules can operate dependent of previous replacements and change the respective feature values . Overall consecutive replacements are possible but not straightforward . Comment : I understand the limitation with respect to modifying the document and the need to run the Modifier to create a new View . I m able to achieve what I want but seem to be too clunky with a lot of assignments etc . However my primary concern is around using the regexp groups and REPLACE calls in a more efficient manner . Comment : Can you give an example how it could be improved I am a developer of UIMA Ruta and I am always looking for improvements . As I already mentioned in the example the combination of regexp expressions and REPLACE can be modelled nicer and more generic but that depends on the actual use-case . I will add a more generic way to the answer . Comment : Thanks for the generic example this is similar to what I was looking for although a RegExp rule combined with the REPLACE capability in a single statement similar to Java s ReplaceAll would be a nicer enhancement . Unfortunately I m unable to get your example to work . I get an Annotator processing failed exception due to a NPE at org.apache.uima.ruta.rule.RegExpRule.getFeatureAssignmentMap RegExpRule.java : 120 . Comment : Which version of UIMA Ruta do you use and what is your development scenario Java Maven or UIMA Ruta Workbench In UIMA Ruta 2.1.0 there were some problem with type coercion in the regexp rule . I used UIMA ruta 2.2.0 in my example sorry that I did not mention that . Comment : I m using Maven and dependency set to Maven org.apache.uima ruta-core 2.1.0 . I tried to change it to 2.2.0 looks like its not out there . I see the GitHub project do I need to build from source BTW - Thanks for patiently answering all my questions .", "Question : I am a newbie in UIMA Currently I am stuck on below situation . How to classify and relate different set of tokens that are obtained from an annotator in UIMA Like for person entity token set names like John Smith and for assets entity set like car home . I want to write rules to classify like the following xml . Thanks for help in advance. . .. . Answer : You maybe want to take a look at UIMA Ruta http : uima.apache.org ruta.html for a rule-based approach . There are various ways to solve this in UIMA Ruta dependent on the preconditions and requirements . Here s a simple example that processes a document like john buys a car . Smith is home . I am a developer of UIMA Ruta", "Question : null .. . Answer : We are having trouble to retrieve a data from a XMI file . The following excerpt illustrates an example of what we are trying to do : .. . .. . We know how to obtain the information contained in the first line such as the id begin sofa and so on these are attributes which can be retrieved using the following code : .. . .. . However as we said we want to know how to obtain the lemma the string ser that is in a child tag in the previous example . Obviously we have tried cgToken REGEXP cgToken.lemma ser true - DO SOME ACTION which does not work because lemma is not an attribute of cgToken . Furthermore there may be more than one lemma inside a single cgToken . The TypeSystem defines this feature as follows : .. . .. . However Ruta documentation https : uima.apache.org d ruta-current tools.ruta.book.html does not explain how to access an array field . Comment : Operations on StringArrays or any other UIMA array are hardly supported in UIMA Ruta 2.2.1 current release . Until the langauge is extended in a future release this functionality can only be achieved by using an adapted extended type system language extensions e.g . a new condition or additional analysis engines .", "Question : In my UIMA application I have some annotators that must run after a certain annotator has run . At first I thought about aggregating these annotators together but I have other annotators that are also dependent on this and other annotator which makes aggregating hard and or unpractical . I read about Type Capabilities which if I understood correctly tell UIMA that certain Types Annotations must be present when used as Input Type . I was hoping that UIMA will give me something like a warning when running pipelines without Annotators that have some Output Types that are declared as Input Types of the used Annotator . Instead the annotators keep running processing as usual . Is there a way to achieve what I want or is this just unnecessary I am currently using the SimplePipeline if that matters . TL DR : My goal is that Annotators refuse to run if there are certain other Annotators are missing in the Pipeline scheduled after these Annotators .. . .. . Thanks in advance . .. . Answer : UIMA is a very flexible framework . By default capabilities are not used and if present are purely informational . However check out e.g . the CapabilityLanguageFlowController https : svn.apache.org repos asf uima uimaj trunk uimaj-core src main java org apache uima flow impl CapabilityLanguageFlowController.java : .. . .. . You could configure your aggregate to use such a flow controller and then you can benefit from capabilities . Disclosure : I am working on the Apache UIMA project but I didn t use the CapabilityLanguageFlowController so far Comment : Thank you for your answer . I already had a look at the flow controllers . I might be able to use them to enforce the presence of my annotators but so far this seems to be a bit overkill for my app : -", "Question : I am trying to make a POSTagger Part of speech in UIMA pipeline.I have download the stanford POSTagger jar and attached it to the project and copied the models for english but it throws some exception . My Code : .. . .. . exception : .. . Answer : You are trying to load a model POS-tagger model that is not compatible with the version of the POS tagger that you are using .. . .. . For that reason the POS tagger cannot deserialize the model . Make sure you are using a compatible model . Comment : But this very model works when i use it w o UIMA pipeline . Comment : Double check your classpath . Likely you are having multiple JARs with the same classes inside on the classpath and by chance when running under UIMA the compatible once take precedence over the incompatible ones . In any case I d strongly recommend using CoreNLP instead of the standalone POSTagger . CoreNLP includes most of the Stanford tools including the POSTagger .", "Question : In my UIMA application I have some annotators that must run after a certain annotator has run . At first I thought about aggregating these annotators together but I have other annotators that are also dependent on this and other annotator which makes aggregating hard and or unpractical . I read about Type Capabilities which if I understood correctly tell UIMA that certain Types Annotations must be present when used as Input Type . I was hoping that UIMA will give me something like a warning when running pipelines without Annotators that have some Output Types that are declared as Input Types of the used Annotator . Instead the annotators keep running processing as usual . Is there a way to achieve what I want or is this just unnecessary I am currently using the SimplePipeline if that matters . TL DR : My goal is that Annotators refuse to run if there are certain other Annotators are missing in the Pipeline scheduled after these Annotators .. . .. . Thanks in advance . .. . Answer : UIMA does not enforce that certain Types Annotations must be present . This is a feature that allows flexibility . You can however document your UIMAfit annotator with @TypeCapability annotation . A typical use of this annotation might look something like : .. . .. . Still this does not enforce type dependencies . What I did on one project https : github.com BlueBrain bluima was to implement my own checking system https : github.com BlueBrain bluima blob fa96a72640c567a69b5f970ad1fd4f983680261e modules bluima scripting src main java ch epfl bbp uima laucher Pipeline.java on top of UIMA . Comment : I am also using uimaFit but as war as I tested this doesn t enforce the presence either am I wrong", "Question : I m new to ClearTK http : cleartk.github.io cleartk and UIMA https : uima.apache.org . So far I couldn t find any examples on how to create a pipeline where no files are involved . I m trying to process a small text stored in a Java String variable using cleartk and UIMA and get an XML String back outcome of the ClearTK TimeML http : www.timeml.org site index.html annotators . I was able to provide a String as input see code excerpt but the code is far from elegant needed to execute set and empty URI to the CAS . Also the output is being saved to a file but I want to get a String back it does not make sense to have the output saved to a file and then read the file back into memory . What would be the recommended way to have the pipeline take a String as input and produce another String as the execution result .. . Answer : Run you engines with SimplePipeline like you did and then retrieve the annotations your are interested in from your sourceCas like this :", "Question : I ve got a RUTA script where all the sentences have been annotated with a Sentence annotation and various words and phrases have been annotated with their own specific annotations . That all works as expected . Each one of those annotations has a feature for the index of the sentence that contains it . So in a contrived example and given the text .. . .. . Jack and Jill went up the hill . Jack fell down . I have a down annotation that I want set the sentence index to 2 indicating that it is in the second sentence . I m thinking something like the following although I know that s not correct . where the index is the index of the the sentence . Is this possible with RUTA If so what s the appropriate script . I can do this in a separate analysis engine and have done so in the past but I m hoping to replace some of that with ruta scripts . thanks .. . .. . Nick .. . Answer : There are several ways to express this in UIMA Ruta . My first guess would be something like : .. . .. . The rule matches on all sentences that contain a Down annotation . Additionally CURRENTCOUNT counts the Sentence annotations upto the matched position and stores the values in the variable index . Then an inlined rule indicated by the first - matches on all Down annotations within the matched sentence and assigns the value of the variable to the feature of the matched Down annotation . Depending if you want to start with 0 or 1 you need to increment the assigned value : .. . .. . The condition CURRENTCOUNT can also accept an min and max value in order to act like a real condition . It is realy old so I don t know how it scales for large documents . Here s another example but this time without the CURRENTCOUNT condition and for storing the index in the Sentence annotation : .. . .. . Mind that the rule for creating Sentence annotations in the first example cannot be used since it uses only one rule match and its actions are applied on the matched fragments . The rule in the second example results in many rule matches and thus applies the actions before the next rule match is processed . The copying between feautre values of different matching scopes is not really nice but that will maybe be improved sometime . If you have already Sentence annotations you can assign the index with something like : .. . .. . Examples have been tested with UIMA Ruta 2.2.1-SNAPSHOT . I am a developer of UIMA Ruta Comment : Thanks this works well with one wrinkle . I m using the code that assumes existing Sentence annotations . My unit test has 3 docs . In the first doc the first sentence index is 1 . In the second doc the first sentence index is 0 . In the 3rd the first sentence index is 1 . Comment : Hmm that s strange . Do you use CURRENTCOUNT or do you assign the index using the sequential properties of the rule elements Can you give more information maybe a reproducible example My first guess would be that there are maybe overlapping Sentence annotations or that the beginning of a Sentence is not visible starts with whitespace .", "Question : I am trying to call ClearTK s StanfordCoreNLPAnnotator from within UIMA RUTA but cannot get it to work . I am using eclipse with a maven-enabled RUTA project in which I also have Java code for auxiliary tasks . I have imported cleartk-stanford-corenlp 0.8 using maven . I tried using this line in my script : .. . .. . .. . where utils MyStanfordEngine.xml is an XML descriptor file created using this java code : .. . .. . No errors appear but upon execution I get : .. . .. . I think I understand that the RUTA project does not find it in the Maven dependencies but I need to stick to Maven as my dependency tool because of collaboration purposes . Can someone help .. . .. . UPDATE : .. . .. . When I encountered the problem I was using RUTA 2.1.0 . I have updated to 2.2.0rc1 since then but the problem persisted . With Peter s suggestion below Thanks in the Java build path I referenced a blank Maven-enabled Java project that does nothing but imports cleartk-stanford-corenlp 0.8 . I can now run the following RUTA code : .. . .. . .. . successfully does what looks like all intended annotations for all documents in the input folder but eventually crashes with this Exception : .. . .. . Sorry for the whole stack-trace but I thought if a RUTA developer is reading this they may want the whole thing . Is there a way to solve this What am I doing wrong Comment : Can you try to separate the UIMA Ruta project and the Maven project . I assume that you are using UIMA Ruta 2.1.0 which does not yet resolve the maven dependencies of the main Ruta Project only of the dependent ones . This is just a guess without testing Comment : I see . I ran into this problem using RUTA 2.1.0 but upgraded to 2.2.0rc1 in hope that it would solve the problem which it did not . I will try separating the projects and write about it here . Comment : 2.2.0rc1 is unfortunately not enough because the solution should be integrated in 2.2.0rc3 which does not yet exist . The new problem indicates that a type used in the analysis engine is missing . UIMA Ruta does not import the types of the analysis engine . They need to be imported separately as you do . I will try to reproduce the exception in order to take a look what the actual problem is . Comment : I created a simple project that should reproduce the desired functionality and added a short howto as an answer . Your second problem is most likely caused by the type system import not able to resvole inner imports or missing some types . .. . Answer : There are several limitations to consider : .. . .. . UIMA Ruta 2.1.0 does not support mixin projects : maven dependencies need to be specified in another project . The Ruta project then has to depend on the additional java project . UIMA Ruta Workbench 2.1.0 has some problems validating imported type system that import again other type-systems by name . Here rather import by location should be used . UIMA CAS Editor 2.5.0 has some problems resolving type system imports using the datapath which causes problems visualizing the created annotations if the type system descriptor needs additional information such as the datapath . Here the creation of a type system descriptor of a script should include not only import all types of imported type-systems . This can be configured in the preferences I have not used that for a while . This problem can again be prevented by using import by location . UIMA Ruta 2.2.0 supports mixin projects . Here only the problem with the CAS Editor remains . This described project can be created the following way with UIMA Ruta 2.2.0 : .. . .. . 1 . Create a new UIMA Ruta Project .. . 2 . Make it a maven project : popup- Configure- Convert to Maven Project .. . 3 . Add a dependency to cleartk-stanford-corenlp in the pom .. . .. . dependency .. . groupId org.cleartk groupId .. . artifactId cleartk-stanford-corenlp artifactId .. . version 0.8.0 version .. . dependency .. . .. . .. . 4 . Provide the type-systems in the descriptor folder or in a dependent project e.g . copy the org folder of cleartk-type-system-1.2.0 to the descriptor folder . Mind that the CAS Editor will have problems resolving the imports if the descriptors are not adapted . 5 . Create a simple script that imports the type system imports the analysis engine and excutes the analysis engine . Here the uimaFIT component is directly imported instead of a descriptor . The EXEC action need to be extended with interesting types if later rules should be able to operate on the result-of the imported analysis engine . TYPESYSTEM org.cleartk.TypeSystem .. . UIMAFIT org.cleartk.stanford.StanfordCoreNLPAnnotator .. . Document - EXEC StanfordCoreNLPAnnotator .. . .. . .. . 6 . If there is a text file in the import folder then running this script should be able to annotate it . This example directly uses the StanfordCoreNLPAnnotator instead of an additional analysis engine but switching to another implementation or analysis engine should be straightforward . Comment : Since UIMA Ruta 2.2.0 is not yet available I built a snapshot update-site and put it there until the release is available : http : people.apache.org pkluegl temp eclipse-update-site . Eclipse is sometimes not able to update these due to the missing timestamps . You may have to deinstall the other one before install the snapshot update-site . Comment : sorry the actual update-site is of course http : people.apache.org pkluegl temp eclipse-update-site ruta Comment : Thanks Peter This is very helpful . I took the Cleartk type system jar from the project website and things import just fine . I still get the second exception although . And yes the cad editor has some issues with the imported type system . I will see that I resolve the imports or find a clever way around it . I will post here once I have things all working . Once I have 15 reputation I will vote your answer up Comment : The resolve imports option in the RUTA preferences seems to work but I get the impression it properly resolves only when the imported descriptor is in the same directory as the importing one . I solved the problem by using UIMAFIT s auto detect feature and saving a type system descriptor from there putting it in the descriptor directory and importing it from my main script . Now the CAS editor seems to work like a charm . Thanks a lot again", "Question : I m new to ClearTK http : cleartk.github.io cleartk and UIMA https : uima.apache.org . So far I couldn t find any examples on how to create a pipeline where no files are involved . I m trying to process a small text stored in a Java String variable using cleartk and UIMA and get an XML String back outcome of the ClearTK TimeML http : www.timeml.org site index.html annotators . I was able to provide a String as input see code excerpt but the code is far from elegant needed to execute set and empty URI to the CAS . Also the output is being saved to a file but I want to get a String back it does not make sense to have the output saved to a file and then read the file back into memory . What would be the recommended way to have the pipeline take a String as input and produce another String as the execution result .. . Answer : My favorite approach to this was to not use the pipeline but manually create an Analysis Engine via org.apache.uima.fit.factory.AggregateBuilder as recommended by Lee Becker on this post https : groups.google.com d msg cleartk-users 4in7CN4TKL0 eZuLqWUjcWwJ ." ] }
[ "yes-answer-long", "yes-answer-short" ]
video
UNK_RELATION
cclabelttf@subclass@42
cclabelttf -- cclabel is a cocos2d class @placeholder of cctexturenode that knows how to render text labels .
{ "confidence": [ 41.29896545410156, 39.65975570678711, 38.195838928222656, 34.47625732421875, 33.35966873168945, 32.772281646728516, 31.95561981201172, 31.523685455322266, 30.32794952392578, 29.78927230834961, 29.66313934326172, 29.39263916015625, 29.31056022644043, 28.153621673583984, 27.96041488647461, 27.793624877929688, 27.772733688354492, 27.74732208251953, 27.263320922851562, 26.759685516357422, 26.66944694519043, 26.66944694519043, 26.66944694519043, 26.66944694519043, 26.084575653076172, 25.99931526184082, 25.81145477294922, 25.794462203979492, 24.920761108398438, 24.647571563720703, 24.164505004882812, 24.143497467041016, 24.061420440673828, 23.926546096801758, 23.775012969970703, 23.771831512451172, 23.771831512451172, 23.771831512451172, 23.771831512451172, 23.749797821044922, 23.071834564208984, 22.668155670166016, 22.565288543701172, 22.565288543701172, 22.565288543701172, 22.565288543701172, 22.52818489074707, 22.52818489074707, 22.432884216308594, 22.39480972290039, 22.39480972290039, 22.39480972290039, 22.25830078125, 22.161325454711914, 22.161325454711914, 22.1177921295166, 22.101791381835938, 21.937496185302734, 21.92290496826172, 21.778959274291992, 21.519227981567383, 21.45962905883789, 21.45962905883789, 21.223846435546875, 21.01239776611328, 20.927989959716797, 20.927989959716797, 20.927989959716797, 20.927989959716797, 20.927989959716797, 20.57675552368164, 20.545883178710938, 20.545883178710938, 20.541521072387695, 20.438770294189453, 20.438770294189453, 20.301647186279297, 20.1422061920166, 20.039339065551758, 19.77906036376953, 19.77906036376953, 19.77906036376953, 19.6353759765625, 19.325841903686523, 19.27275848388672, 19.266693115234375, 19.266693115234375, 19.266693115234375, 19.266693115234375, 19.266693115234375, 19.266693115234375, 18.975955963134766, 18.67226219177246, 18.597740173339844, 18.40203857421875, 18.40203857421875, 18.40203857421875, 18.249942779541016, 18.139894485473633, 18.11776351928711 ], "content": [ "In Cocos2d V3 the cclabelTTF is changed .", "cocos2d-1.0.1-x-0.12.0 CCLabelTTF .", "I am trying to change the text of a CCLabelTTF in cocos2d xcode objective-c .", "I am trying to create a multiline label in cocos2d 1.0 using CCLabelTTF .", "Also replace CCLabelTTF scorelabel CCLabelTTF... . with scorelabel CCLabelTTF... .", "I have CCLabelTTF with NSString text .", "But when showing the text on a Cocos2D CCLabelTTF iPhone iPad the special-characters get messed up .", "Your font is now in your project and can be used by CClabelTTF labels .", "stackoverflow.com questions 20425758 http : stackoverflow.com questions 20425758 cocos2d-how-to-align-cclabelttf-vertically-with-different-font-size 20428199 20428199", "Is there a way to set automatically the font-size of a CCLabelTTF text in base of the length of the string", "instead of CCLabelTTF labelWithString : @ 0 .. . use CCLabelTTF labelWithString : @ 0 .", "Anyone know how to fix this in CCLabelTTF", "Hi i m facing problem in adjusting spacing between lines in cocos2d-x using cclabelttf .", "How to aligh two CCLabelTtf vertically with different font-size", "Yet CCLabelTTF uses this to create the label .", "but how can you init CCLabelTTF with an NSAttributedString", "Unless CCLabelTTF copies the string .", "You ll find an explanation as to why changing text as well as shadow outline properties are slow in the CCLabelTTF class reference http : www.cocos2d-swift.org docs api Classes CCLabelTTF.html for Cocos2D-Swift but the same applies to cocos2d-x and the Labels section in the dev guide https : www.makeschool.com docs source mgwu cocos2d 1.3 concepts cocos2d-nodes same here .", "Just write .. . .. . narrativeText @ This is text above CCLabelTTF narrativeTextLabel .. . line .", "When I use CCLabelTTF to show text if there are emojis in the text they are also colored to the color of the text and that s not what I want .", "Is there something to tween the font-size CCLabelTTF in a nice way", "There is no nice way of tweening CCLabelTTF as per the answer of LearnCocos2D .", "I had a project with CCLabelTTF looking sharp and good .", "Do not use a CCLabelTTF for strings that change often .", "I d take that string and use a CCLabel to place it on the screen .", "In the class where you are using the scorelabel increase its scope by declaring it here @implementation CCLabelTTF scorelabel .", "How can I create an attributed label in Cocos2d", "I m trying to create CCLabelTTF where the text changes as the story progresses but I m having trouble setting a simple piece of text to it .", "I m trying to create a score using a CCLabelTTF to show the score on the screen .", "I want to display a text on the screen using the framework Cocos2D .", "cclabelttf is very slow when the string changes slow enough to notice a stutter every time the string changes for frequently updating labels A cclabelbmfont or cclabelatlas are better choices", "please check some methode of CCLabelTTF is Deprecated.. .", "I am trying to make CCLabelTTF change its text every 10 seconds using an array of strings .", "I have been looking for the past couple of hours for a way to create a stroke around labels in cocos2d but so far all I have come up with is this : CCLabelTTF Font Stroke Demo http : www.supersuraccoon-cocos2d.com 2012 02 01 share-cclabelttf-font-stroke-demo this is just what I need but the stroke looks very blocky and I am needing something that looks smoother .", "Thanks .. . .. . This is how I am creating labels : .. . .. .", "The simplest way would be to create a CCLabelTTF node and add it to your scene .", "In my game I use cclabelttf to display the score the player made .", "CCLabelTTF works well on both of device and simulator in iOS 6 .", "I am trying to make a CCLabelTTF display a string and an integer together .", "cocos2d version 1.0.1", "what version of cocos2d are you using", "Try in a new project with this particular cocos2d-x version just to verify this is a cocos2d-x issue .", "Instead of setting the ivar use the accessor for the property : .. . .. . Also you should not modify CCLabelTTF .", "However I got this to work properly : .. . .. . strangely enough while going through the CCLabelTTF ctor it fails .", "ps : this also works .. . .. . Setting the string after setting the vertical-alignment to center unbreaks the CCLabelTTF ctor .", "initWithString.. . is not a static method so you need to allocate the CCLabelTTF first : .. . .. . Or you could use the static-methods :", "I m using a CCLabelTTF to show the score of the player on the screen .", "I have a CCLabelTTF on a CCNodeColor that will scroll across the screen .", "Hi I want to know the width of the text inside the CCTextFieldTTF but I can t find a way to do it I want this width so I can move a CCLabelTTF in that position so it can be like a cursor for the CCTextFieldTTF .. . .. . Thanks", "you use the CCLabelTTF method that is already Deprecated.see below screen shot .. . .. .", "This is not about cclabelttf since direct entry in xcode produces the expected outcome .", "The scaling of the images and CCLabelTTF changed on a physical device to significantly smaller .", "I ve just upgraded my project from cocos2d 1.0.1 to 2.0 and after a lot of tweaking and all I m unable to change the default color of a CCLabelTTF like I did before And this way I avoid one line of code for each label I create .", "If it is try verifying the issue in a newer cocos2d-x version .", "Note that this is out of date for the recent versions of cocos2d-x .", "I use Cocos2d v3.4 with Spritebuilder and I faced the following problem : when our gaming project becomes big enough with a lot of graphics sometimes my CCButtons labels start to display a wrong stretched text not the text from CCLabelTTF.string and sometimes just black rectangle instead of the textfield .", "Not certain about this but i think you can init CCLabelTTF with an NSAttributedString .. . that may have better chance of respecting the Emoji specifics for inner text snippets .", "I added new font in my cocos2d app But font is cutting off How can i solve this problem .", "Same question for me but for cocos2D v3 .", "I managed to get rid of all the compiler-warnings it runs fine and seems to load the director fine but then crashes as follows : .. . .. . The breakpoint stops in the CCLabelTTF function - BOOL updateTexture at .. . .. . There is only one CCLabelTTF in the code and I create it like so : .. . .. . Any help much appreciated .", "Do you mean Cocoa or code.google.com p cocos2d-iphone http : code.google.com p cocos2d-iphone", "I think CCLabel kind of classes cannot calculate doesnt work stable if there is n escape characters .", "If anyone who is more experienced with runAction and CCLabel could help me out it would be extremely helpful", "Tested on cocos2d 2.1", "I m using cocos2d-x 2.0.4 for my game .", "It will requires many changes if I migrate to cocos2d 2.x", "The available methods in CCLabelTTF.m are only : .. . .. . So your implementation is not correct in COCOS2d V3 .", "I am converting my project from using Cocos2D v2.1 to V3.0 .", "I ve searched Cocos2D forums and here and can t find anything similar to this issue .", "in cocos2d version 3.x you can .. . .. . .. . not tested just from memory .", "I read about ZAttributed string http : stackoverflow.com questions 4504858 how-to-use-attributed-strings-with-cocos2d however the Github page no longer exists .", "but this not fixes bug for cocos2d v2.1 stable .", "Or is there a way to make Cocos2D get that right", "This may or may not be related but according to this source http : www.cocos2d-iphone.org forums topic new-guy-having-trouble-with-cclabel-font-change you have to include the file extension of your font .", "I ve tried a few techniques but Cocos2D keeps reporting : .. . .. . Unable to load font XXX.ttf .. . .. . Why can t I get my custom font to work with with Cocos2D", "In order to fix the issue you ll need to either update the engine or merge this https : github.com cocos2d cocos2d-x pull 2873 pull request manually .", "Hi I want to create CCLabelTTF with a string that contains special-characters here is some example .. . .. . or .. . .. . Please show me how to display this characters in my app etc .. . .. . I m coding in visual-studio-2010", "A simpler solution to set the string at any given time from here https : github.com cocos2d cocos2d-x pull 1833 .", "However there is already lots of code I use CCLabelTTF changing to UITextView is just too hard .", "I need to use a custom font with my Cocos2D project .", "I ran into this same problem while using cocos2d-x 2.1.3 .", "I ve searched for cocos2d ccmenuitemlabel hover but didnt find what I was searching for .", "I am using cocos2d-iphone in objective-c .", "It cannot compile sources and writes : .. . .. . Undefined symbols for architecture i386 : .. . CTFontManagerRegisterFontsForURL referenced from : - CCLabelTTF getFontName : in CCLabelTTF.o ld : symbol s not found for architecture i386 clang : error : linker command failed with exit code 1 use -v to see invocation .. . .. . but when I replace all the code in the following function in CCLabelTTF with return nil : .. . .. . then I can compile my code but I cannot use labels .", "Or create all labels up-front and re-use them if their text doesn t change .", "Because if you ever wanted to update cocos2d you d have to redo all your custom modifications .", "Also searching the Cocos2d v2.1-beta2 codebase doesn t turn up anything for attributed string on iOS .", "This maybe isn t a real answer but I had the same problem with that font in an old cocos2d project I made .", "As per your question i get the same results with cocos2d 2.0 no word wrap .", "It s a UIKit project with Cocos2D added as a sub-project and the director loaded lazily in a couple of viewcontrollers .", "Since Cocos2d is a sub-project I had to include the -ObjC flag under Other Linker Flags for the target .", "However when i run this code the labels are not changed .", "I ve referred to this link : Using custom fonts in Cocos2d http : stackoverflow.com questions 4228644 using-custom-fonts-in-cocos2d .. . .. . and this link : http : captainjor.wordpress.com 2013 04 03 cocos2d-x-custom-ttf-font .. . .. . The first link works but I can only specify the family name of the font Name based on the top of the font window .", "This is the code I have : I have list which is the array of strings text which is CCLabelTTF which I want to manipulate .. . .. . Thank you", "Using Cocos2D-x I m having trouble finding a way to get this result .", "It needn t necessarily be because the font rendering in cocos2d-x might have changed .", "I am running a Cocos2d v3 game on xcode 6 .", "Since I am using cocos2d v1.0 I couldn t get the second suggestion to work because verticalAlignment does not appear to be implemented .", "To the text string .", "It just worked straight away with cocos2d 2.1 after renaming the font file to the postscript name+ .ttf ." ] }
{ "confidence": [ 51.33565139770508, 44.25495529174805, 42.497650146484375, 42.04825210571289, 41.786476135253906, 40.50907897949219, 40.39791488647461, 40.33369445800781, 40.2607536315918, 39.99816131591797, 39.83631134033203, 39.7845573425293, 38.848358154296875, 38.815521240234375, 38.61521530151367, 38.34054183959961, 37.266597747802734, 37.122352600097656, 37.03477096557617, 37.03477096557617 ], "content": [ "Question : We re developing iOS application and encountered a problem with labels outlines . It seems that creating outlines for 20-30 labels takes more time now than anything else . The creating lag is about 2-3 seconds what is too long . Can anyone say what solution we could use or why it is so Instruments screen : .. . .. . enter image description here http : i.stack.imgur.com dYLPj.jpg .. . .. . Thanks in advance .. . Answer : If the label s text needs to change at runtime consider using bitmap fonts with pre-rendered outlines . Or create all labels up-front and re-use them if their text doesn t change . You ll find an explanation as to why changing text as well as shadow outline properties are slow in the CCLabelTTF class reference http : www.cocos2d-swift.org docs api Classes CCLabelTTF.html for Cocos2D-Swift but the same applies to cocos2d-x and the Labels section in the dev guide https : www.makeschool.com docs source mgwu cocos2d 1.3 concepts cocos2d-nodes same here . Specifically consider that changing font-size or padding enlarges the label s texture and that alone can increase the time it takes to render shadow outline . So does changing the size of the shadow outline itself . It needn t necessarily be because the font rendering in cocos2d-x might have changed .", "Question : I am trying to make CCLabelTTF change its text every 10 seconds using an array of strings . This is the code I have so far but it is giving me this error If anyone who is more experienced with runAction and CCLabel could help me out it would be extremely helpful This is the code I have : I have list which is the array of strings text which is CCLabelTTF which I want to manipulate .. . .. . Thank you .. . Answer : LOL my bad it was a really simple error and some tweaking fixed it I am just going to leave this up here in case someone else is trying to do the same thing The correct code is :", "Question : How to aligh two CCLabelTtf vertically with different font-size Thanks .. . .. . This is how I am creating labels : .. . .. . screen shot http : i.stack.imgur.com DAq9w.png Comment : and what seems to be the problem Comment : label1 label2 and label3 are not aligned because of the different size font the biggest font-size is the higher label is a little bit higher Comment : @Yves I added a screen shot . Thanks Comment : what version of cocos2d are you using it matters Comment : cocos2d version 1.0.1 .. . Answer : With cocos2d 2.x use the following : .. . .. . i noticed that with one of the various 2.1 builds you may have to do this AFTER setting the vertical-alignment in order for it to work properly : Comment : It will requires many changes if I migrate to cocos2d 2.x Comment : well work in debug and all deprecated calls will be still functioning . Look in the ccDeprecated class for each deprecated API call it will show the appropriate replacement syntax . The one i find most annoying is the renaming of the .rect property to .activeArea .... . grrrrrrr . Did you look at CCTexture2D under 1.0.1 Comment : Frankly no I just started One month . I think I should migrate Comment : yes especially if you dont have a large code base to migrate . And if this is your first objC stint you may want to give ARC a try .", "Question : null .. . Answer : I am using cocos2d-iphone in objective-c . When I use CCLabelTTF to show text if there are emojis in the text they are also colored to the color of the text and that s not what I want . However when I use UITextView emojis are good . No matter what color I set it to by code like .. . .. . emojis are still what normal color it should look like not red in this case . However there is already lots of code I use CCLabelTTF changing to UITextView is just too hard . Anyone know how to fix this in CCLabelTTF Comment : C is not Objective-C is not C Comment : Not certain about this but i think you can init CCLabelTTF with an NSAttributedString .. . that may have better chance of respecting the Emoji specifics for inner text snippets . just a thought . Comment : Thx but how can you init CCLabelTTF with an NSAttributedString Comment : hmmm .. . straight from the .h file : + id labelWithAttributedString : NSAttributedString attrString", "Question : I m using cocos2d-x 2.0.4 for my game . CCLabelTTF works well on both of device and simulator in iOS 6 . But when i test it in iOS 7.0 it doesn t work . Here is my code . Score doesn t show now . But it shows in iOS 6 . One more strange problem . If i change above code like this it works . But if i change this code like below again it doesn t work . invisible .. . .. . Maybe it s case sensitive issue . Finally below code doesn t work too even if text is upper case . I only added number 10 . Any help will be appreciate . Thanks in advance . Comment : Possible cause : the str variable is created on the stack and becomes a dangling-pointer once the method returns . Unless CCLabelTTF copies the string . .. . Answer : I ran into this same problem while using cocos2d-x 2.1.3 . I found this http : www.cocos2d-x.org news 141 link stating that the issue is a bug that affects labels in iOS 7 . In order to fix the issue you ll need to either update the engine or merge this https : github.com cocos2d cocos2d-x pull 2873 pull request manually . Comment : I ve tried to update cocos2d-x engine but when i did it there were some errors . Could you please let me know how to update engine or merge the pull request manually", "Question : I have been looking for the past couple of hours for a way to create a stroke around labels in cocos2d but so far all I have come up with is this : CCLabelTTF Font Stroke Demo http : www.supersuraccoon-cocos2d.com 2012 02 01 share-cclabelttf-font-stroke-demo this is just what I need but the stroke looks very blocky and I am needing something that looks smoother . Is there any way to turn on some kind of antialiasing for the stroke or maybe there is some other way to create a stroke . Any help would be appreciated . .. . Answer : To create a stroke : .. . .. . Usage : .. . .. . And to increase smoothness modify the following function to fit your needs decrease the +60 increment to perhaps +30 . Just note that the more iterations the more more time spent rendering which will negatively affect performance :", "Question : I want to display a text on the screen using the framework Cocos2D . I m thinking off using the draw method . But I don t know the exact way of doing that . I would be glad if anyone could help me on this topic . Comment : Do you mean Cocoa or code.google.com p cocos2d-iphone http : code.google.com p cocos2d-iphone .. . Answer : The simplest way would be to create a CCLabelTTF node and add it to your scene .", "Question : Is there a way to set automatically the font-size of a CCLabelTTF text in base of the length of the string because I have a number that increment and if it gets too big collides with a close image.. . .. . Answer : in cocos2d version 3.x you can .. . .. . .. . not tested just from memory .", "Question : null .. . Answer : I am having some trouble with cocos2dx windows-ver . cocos2d-1.0.1-x-0.12.0 CCLabelTTF . Whichever label having string-with-spaces the label is moving upwards by few pixels . Here is the basic code I used to display two labels with and without spaces at the same position . This picture http : i.stack.imgur.com Ae65G.jpg shows how it is displayed . The project is working fine on Mac for iOS . I noticed the bug while trying to port it for windows . It is too late for me to update to a new cocos2dx SDK as it involves API changes . Comment : Have you tried this with different fonts Could be an issue with the font itself . Comment : Tried with 3 different fonts but same displacement with every font . Comment : Try in a new project with this particular cocos2d-x version just to verify this is a cocos2d-x issue . If it is try verifying the issue in a newer cocos2d-x version . If it s gone there you may want to upgrade or at least try to locate and cherrypick the corresponding fix . Comment : Thanks for the responses . I downloaded the latest cocos2dx sdk and was surprised to see that the issue is still there . Could this possibly be related to the simulator I don t have a device right now . Going to get a device soon and check in it . Comment : certainly always verify issues on a device", "Question : I am converting my project from using Cocos2D v2.1 to V3.0 . It s a UIKit project with Cocos2D added as a sub-project and the director loaded lazily in a couple of viewcontrollers . I managed to get rid of all the compiler-warnings it runs fine and seems to load the director fine but then crashes as follows : .. . .. . The breakpoint stops in the CCLabelTTF function - BOOL updateTexture at .. . .. . There is only one CCLabelTTF in the code and I create it like so : .. . .. . Any help much appreciated . I ve searched Cocos2D forums and here and can t find anything similar to this issue . .. . Answer : Ahh.. . just solved it . Since Cocos2d is a sub-project I had to include the -ObjC flag under Other Linker Flags for the target . This wasn t necessary with v2.1 but then that version didn t use the NSAttributedString+CCAdditions category .", "Question : I read this document http : www.cocos2d-iphone.org api-ref latest-stable interface c c label t t f.html and declare like that : .. . .. . but its show warning : no know class-method for selector.. . anybody can help me .. . Answer : In Cocos2d V3 the cclabelTTF is changed . The available methods in CCLabelTTF.m are only : .. . .. . So your implementation is not correct in COCOS2d V3 . That is valid for V2 version . I think still document needs to be updated . You should use any of the above four methods like : .. . .. . This will call the constructor internally as mentioned above .", "Question : I m using cocos2d-x 2.0.4 for my game . CCLabelTTF works well on both of device and simulator in iOS 6 . But when i test it in iOS 7.0 it doesn t work . Here is my code . Score doesn t show now . But it shows in iOS 6 . One more strange problem . If i change above code like this it works . But if i change this code like below again it doesn t work . invisible .. . .. . Maybe it s case sensitive issue . Finally below code doesn t work too even if text is upper case . I only added number 10 . Any help will be appreciate . Thanks in advance . Comment : Possible cause : the str variable is created on the stack and becomes a dangling-pointer once the method returns . Unless CCLabelTTF copies the string . .. . Answer : upgrade your cocos2d-x version it fixed in 3.0 and if you are using cocos2dx older version then change into CCimage.mm this statment", "Question : I am trying to create a multiline label in cocos2d 1.0 using CCLabelTTF . I have tried the examples that I have come across but none seem to work . Here is what I have .. . .. . I have tried a variety of dimensions . If I use CGSizeMake 0 0 then the label will display but no wrap which I think is expected . But any other value results in nothing being displayed . What am I doing wrong Comment : 200 0 ... . try making the bounding-box of an appropriate size . I overshoot and set the vertical-alignment to center . Comment : @YvesLeBorg I tried that also . Setting the vertical dimension to 0 is supposed to make it have no bounds . But I have tried non-zero values and that does not work either Comment : Cocos2D v2.x has a similar issue with iOS 9 devices - even when compiled using iOS SDK 9 . iOS 8 devices still line-breaks . Update : Line break on iOS9 devices didn t work with kCCVerticalTextAlignmentCenter for some reason when I changed to kCCVerticalTextAlignmentTop it magically started to work.. . .. . Answer : As per your question i get the same results with cocos2d 2.0 no word wrap . However I got this to work properly : .. . .. . strangely enough while going through the CCLabelTTF ctor it fails . Yet CCLabelTTF uses this to create the label . It is probably related to the vertical-alignment being mis-handled somewhere in the pipeline . ps : this also works .. . .. . Setting the string after setting the vertical-alignment to center unbreaks the CCLabelTTF ctor . Comment : Since I am using cocos2d v1.0 I couldn t get the second suggestion to work because verticalAlignment does not appear to be implemented . But I did get the first suggestion to work .", "Question : I ve just upgraded my project from cocos2d 1.0.1 to 2.0 and after a lot of tweaking and all I m unable to change the default color of a CCLabelTTF like I did before And this way I avoid one line of code for each label I create . Before I was doing like that : .. . .. . In CCLabelTTF.m : .. . .. . I was changing the color inside this method since every initWithString.. . methods are returning this one but even if I do so in cocos2D 2.0 it doesn t work . Here s my new CCLabelTTF.m : .. . .. . Is it because of the ShaderProgram thingy that wasn t there before 2.0 Please help I ve tried everything so far : .. . .. . I even searched in all my project if there was a file containing ccWHITE or 255 255 255 but there s none related to CCLabelTTF except for CCSprite but if I change it to ccBLACK all my sprites becomes black .. . Answer : Instead of setting the ivar use the accessor for the property : .. . .. . Also you should not modify CCLabelTTF . If you want to change behaviour make a subclass . Comment : Yeah I know I was sure someone would tell me that but is it really that awful not to create a subclass for just one parameter Sorry I m really new to coding And between thanks for your answer it solved it : D I now realize that is a really n00bish question.. . Comment : If you need a different set of defaults it s ok to modify the source code . But you re on the safer side with a subclass . Why Because if you ever wanted to update cocos2d you d have to redo all your custom modifications . And will you remember them at that time Probably not unless you re using source control which may or may not be able to merge your changes into the new version . Comment : Besides in Objective-C you should prefer to create a category on the class instead of subclassing unless you need to add extra ivars to the class . Comment : Alrighty Thank you really much for your support", "Question : null .. . Answer : I have a .xml file containing some text . The text also has some German charcters in it . The XML file is encoded as UTF-8 wich makes it appear fine in every text-editor and xcode . But when showing the text on a Cocos2D CCLabelTTF iPhone iPad the special-characters get messed up . They are replaced by one or two ugly characters I have never seen before - .. . .. . Should I use a different encoding Or is there a way to make Cocos2D get that right BTW : If I enter the same text directly into xcode without using the xml file the text shows up correctly on the label.. . Comment : show how you read the xml file please . This is not about cclabelttf since direct entry in xcode produces the expected outcome . Comment : I m using TBXML tbxml.co.uk TBXML TBXML Free.html http : www.tbxml.co.uk TBXML TBXML Free.html . Comment : look here see if it applies : stackoverflow.com questions 3070374 http : stackoverflow.com questions 3070374 utf8-from-web-content-xml-file-to-nsstring", "Question : Ive been trying to figure out how to update the score . I have an label with a string that the score goes on but it doesn t update .. . .. . This is the label with the score thats suppose to update .. . .. . Then this is where the score is added after a collision between two sprites .. . .. . And advise onto how i could update it because the scoreLabel refuses to update after a collision has been detected .. . .. . Thank you : D Comment : cclabelttf is very slow when the string changes slow enough to notice a stutter every time the string changes for frequently updating labels A cclabelbmfont or cclabelatlas are better choices .. . Answer : You need to update the scoreLabel where you update score . So after .. . .. . Include Comment : An error appears saying scorelabel is undeclared Comment : I guess the scope of scorelabel is restricted to the block where you declared it . In the class where you are using the scorelabel increase its scope by declaring it here @implementation CCLabelTTF scorelabel . Also replace CCLabelTTF scorelabel CCLabelTTF... . with scorelabel CCLabelTTF... . Comment : FINALLY : D thank you very much its not the with scorelable just scorelabel but thank you very much Comment : @Crazycriss you re welcome", "Question : So in Objective-C with Cocos2d I d use a NSMutableString with format to put a variable score into a string . I d take that string and use a CCLabel to place it on the screen . Using Cocos2D-x I m having trouble finding a way to get this result . A simple example would be great . Thanks .. . Answer : A simpler solution to set the string at any given time from here https : github.com cocos2d cocos2d-x pull 1833 . First define a macro somewhere in your code . Then you can change the string any time like this :", "Question : null .. . Answer : I added new font in my cocos2d app But font is cutting off How can i solve this problem . Please check below image and code enter image description here http : i.stack.imgur.com 1LliZ.png .. . .. . Code : .. . .. . Any one help me . Thanks.. . Comment : try to use CGSizeMake 1024 0 : not specified height should prevent cropping i think . Comment : Tried No results.. . Comment : if this is version 2.x look at my answer here .. . LabelTTF has its priceless moments in that version . stackoverflow.com questions 20425758 http : stackoverflow.com questions 20425758 cocos2d-how-to-align-cclabelttf-vertically-with-different-font-size 20428199 20428199", "Question : In my game I use cclabelttf to display the score the player made . It was working fine back in the end of July I ve changed nothing in my code but there was a : - IOS upgraded 6.1 to 7.0 - OSX updated - cocos2d-x .. . - Xcode update .. . .. . I m not using helvetica fonts . I have a floating text to show the score if I kill a terrorist a +10 string floats up and than disappears if I write +10 then it s visible otherwise it s not . I ve tried to change the text-alignment in ccimage.mm from UITextAlignmentLeft to the same with NS .. . .. . uncomment these lines : .. . .. . I ve read these modifications on the cococs2d-x forum there was a bug back than and these was the solution . No luck for me . Weird part is on my gameScene one of the labels is visible but only on iPhone simulator but starting from this I think it must be an alignment wrapping problem . Comment : perhaps this is related : stackoverflow.com questions 19438939 http : stackoverflow.com questions 19438939 ccmenu-misplaced-under-ios-7 Comment : thanks but I don t think so I ve tried these thing .. . Answer : Met the same issue found a solution works for me try this . Modify initWithString in CCImage.mm at line : .. . .. . change it to : .. . .. . Just three int casts .", "Question : In my game I use cclabelttf to display the score the player made . It was working fine back in the end of July I ve changed nothing in my code but there was a : - IOS upgraded 6.1 to 7.0 - OSX updated - cocos2d-x .. . - Xcode update .. . .. . I m not using helvetica fonts . I have a floating text to show the score if I kill a terrorist a +10 string floats up and than disappears if I write +10 then it s visible otherwise it s not . I ve tried to change the text-alignment in ccimage.mm from UITextAlignmentLeft to the same with NS .. . .. . uncomment these lines : .. . .. . I ve read these modifications on the cococs2d-x forum there was a bug back than and these was the solution . No luck for me . Weird part is on my gameScene one of the labels is visible but only on iPhone simulator but starting from this I think it must be an alignment wrapping problem . Comment : perhaps this is related : stackoverflow.com questions 19438939 http : stackoverflow.com questions 19438939 ccmenu-misplaced-under-ios-7 Comment : thanks but I don t think so I ve tried these thing .. . Answer : maybe you can try it like this : .. . .. . and use it like this" ] }
[ "yes-answer-long", "yes-answer-short" ]
subclass
UNK_RELATION
data-layer@persistent-storage@144
data-layer -- a data-access-layer dal in computer software is a layer of a computer program which provides simplified access to data stored in @placeholder of some kind such as an entity-relational database .
{ "confidence": [ 52.79199981689453, 50.377464294433594, 50.324951171875, 50.324951171875, 49.776119232177734, 49.75843048095703, 49.15373611450195, 48.9665412902832, 48.88706970214844, 48.30048370361328, 47.49090576171875, 44.85093688964844, 44.26441192626953, 44.26172637939453, 44.161949157714844, 43.41960906982422, 43.315242767333984, 43.11073684692383, 43.11073684692383, 43.11073684692383, 43.021400451660156, 42.42108154296875, 42.42108154296875, 42.22215270996094, 41.64514923095703, 41.635101318359375, 40.46405029296875, 40.11600112915039, 39.90410614013672, 38.11091995239258, 38.09168243408203, 37.52033996582031, 37.52033996582031, 37.52033996582031, 37.52033996582031, 37.52033996582031, 37.127784729003906, 36.4134521484375, 36.04470443725586, 36.04470443725586, 36.04470443725586, 36.04470443725586, 36.04470443725586, 36.04470443725586, 36.04470443725586, 35.35734939575195, 35.01301574707031, 34.46342468261719, 34.1784553527832, 34.098899841308594, 34.098899841308594, 34.05437088012695, 33.97084045410156, 33.11508560180664, 32.623260498046875, 32.37602233886719, 32.23984909057617, 32.20646667480469, 31.673526763916016, 31.481399536132812, 31.140962600708008, 30.847742080688477, 30.417007446289062, 30.26675796508789, 30.26675796508789, 30.26675796508789, 30.19788932800293, 29.596942901611328, 29.298559188842773, 29.013357162475586, 28.97271728515625, 28.791120529174805, 28.770858764648438, 28.550626754760742, 28.46689796447754, 28.46689796447754, 28.309720993041992, 27.521684646606445, 27.521684646606445, 27.036224365234375, 27.032989501953125, 26.839981079101562, 26.59593963623047, 26.396371841430664, 26.11412239074707, 26.024415969848633, 25.329322814941406, 24.958961486816406, 24.864948272705078, 24.864948272705078, 24.864948272705078, 24.864948272705078, 24.864948272705078, 24.864948272705078, 24.552900314331055, 24.315040588378906, 23.88382339477539, 23.66726303100586, 23.624147415161133 ], "content": [ "The general pattern for a multi-layer application like the one you re building is to have a data-layer that provides your services with access to a database or some other method of persisting data usually via a repository .", "I have two layers a data-layer which gets the results from the database and a UI layer which will show the data in label controls Here is the code of data-layer .. . .. . And it is the code of the UI layer .. . .. . And my question is how to show data on labels .. . .. . Thanks a lot in advance", "is your data-layer lmdb or leveldb", "yes My data-layer is lmdb", "This will definitely give you a better grip than Database first on your data-access-layer design .", "The data-layer webservice layer will get all the data and transform the data to our own entities say a class called DataLayerEntityClassA .", "The purpose of the data-layer is to do the data related interactions with the data repository .", "We can t modify the standard data-layer so we created a customer specific data-layer .", "and the User-Interface layer should act through the data-layer .", "And manage the database access in all Other projects in one Solution by the data-layer project .", "The facade itself doesn t have to be a part of the data-layer you don t then reference System.Web in a data-layer .", "Which important pros and cons should i consider by choosing the data-layer", "I currently grab the data using my Workflow layer and then AutoMap the Database Model to my UI Model to display the data .", "The approach above poses a problem though : I need to reference System.Web in my data-layer and business-layer in order to get a hold of the stored DbContext instance .", "I am trying to understand how to identify exceptions that should be caught and handled in a multi layered application one with a data-access-layer service-layer presentation layer etc .", "We are drafting a layered architecture and we have decided to have a data-layer Business layer and the front with viewmodels .", "I m pretty confused over whether the data-layer should simply provide methods that allow the business-layer to get raw data or whether it should be responsible for getting filtered data too", "I have been given the task of investigating and implementing the data-layer upgrade .", "I ve always thought that the data-layer is purely responsible for CRUD functions ie .", "In your case I would remove the filter at the data-layer i.e .", "To get passed with coupling IoC should be used where you can consider keeping the separation from your data-access-layer from your business-layer .", "You don t need to catch-exception in Data Access Layer let them throw naturally .", "Here I am implementing Firebird in my data-access-layer but I am unsure how to use it in my application .", "Implementing this can easily be done for small data using an identity matrix as input and simply using weights of the bottleneck layer but this is not really feasible for large-data because of memory consumption if we have n data points and p neurons in the bottleneck layer we need an nxn identity matrix and an nxp matrix in the bottleneck layer .", "In the business-layer we have a class BusinessLayerClassA which are taking this transformed data DataLayerEntityClassA and doing some logic say sorting .", "to do that i need to define a Web.config app.config file in data-layer .", "But I need an input layer that can update the data using the gradient or some workaround .", "What is the procedure to implement a Data Layer to capture transaction order data on the checkout success page", "I ve wanted to make an easy wearable app and connect through the data-layer .", "I was always taught to interface the data-layer and although the data provider must reference the data types only one reference to the data provider is required.. . isn t that enough separation", "You may also code generators to generate your data-access-layer like the way you want which will save hundreds of man hour plus you can get a better implementation of your module .", "Values pushed to the Data Layer with dots in the name will be interpreted as nesting values according to normal JavaScript rules .", "I m working on a project where I had to add a data-layer to my application .", "shouldn t really contain any logic but should simply retrieve data for the business-layer to manipulate .", "Should the data-layer simply return a list of ALL products and then the business logic do the filtering", "I was wondering is it possible to alter or do a drop and create in the customer specific data-layer for that view", "The purpose of having a data-layer or model is that if need be you can with relative ease swap out your persistence layer for something complete different and have everything just work .", "I have setup a Data Layer Variable type macro named orderTotal which is linked to a variable I am pushing through on the checkout page .", "My Class GenLedDet is present inside Payment namespace .. . .. . This is my code snippet in the Data Layer and this code is being used .", "What if I wanted to reference and use my data-layer and business layers from a non-web application", "I installed the galleria plugin and added a data-layer so you can see a description to the photo .", "OpenTag has it s own specification for a data-layer - they call it universal variable specs are here : https : github.com QubitProducts UniversalVariable .", "Often times tag managers allow full customisation over your Data layer variable .", "There s no common standard to use across tag managers but W3C is working on a draft proposal for a standard data-layer .", "I need to Extend my Data Layer by a class project that contains my Web.config file by itself .", "One way is to create my own Data Access Layer using System.Data.DataSet but I would like to know if there is any existing library or something I can use where I can fill objects from SP s and also update data using SP s .", "The class BusinessLayerEntityClassA is in the BL layer and contains some simple logic for searching querying the DataLayerEntityClassA entity .", "So yes you can use some kind of data-layer with other Tag Management Systems but it might be called differently and how it will be implemented depends on your platform of choice .", "I am very interested in using a Data Layer like the one described in this article .. . .. . https : developers.google.com tag-manager devguide .. . .. . However this tutorial only defines how to use a data-layer when using Google Tag Manager .", "At the moment I have a function in my data-layer that basically returns all products where price min threshold and price max threshold .", "We have a standard SQL Server Data Layer Project in Visual Studio that has a view and for a client we need to modify this view .", "Now in my mind as an OO developer I was planning to manually create new business-objects and populate them from the .edmx generated data objects returned from queries in the new data-layer .", "My problem is that I want the layer to be hidden by default display : none but there is a style in the div of the layer : .. . .. . This display : block is the problem .", "My dbset is in model layer not repository", "If I am using a different tag manager like BrightTag or OpenTag is there anyway to hook Google Analytics into a Data Layer using just JavaScript", "Each of my repos is build in this way : .. . .. . Where I override methods from general entity repository : .. . .. . Finally this is my UnitOfWork item : .. . .. . and context that I m using .. . .. . I know that it s a lot of code that I am showing but hope these are all of the building blocks for data-access-layer .", "Unless there s more to it IMHO it seems like a repository layer for the sake of a repository layer .", "Please keep in mind separating the data-access is not the solution to upgrade a legacy system .", "Surely developers managed to get layer separation before IoC", "I have simplified somewhat I actually have a controller layer but it needs references to the two class libraries above .", "In my model layer dbcontext i have this :", "GTM Preview Mode Data Layer Messages http : i.stack.imgur.com c1hWU.jpg .. . .. . Here is what my Google Tag Manager GTM Setup looks like to track the data : .. . .. .", "So to put it all down to a single question : Is there a DAL library that s optimised for stored procedure execution and data materialisation", "Every thought in my mind says no.. . don t create that coupling between the data-layer and the whole system but the boss says that he has seen articles online promoting this .", "If you want to get really pure you can separate your data-layer into two parts : the D ata A bstraction L ayer and the D ata I ndependence L ayer .", "That said I will usually include the functionality to filter the returned recordset as part of my model something like : .. . .. . The expression to filter the results would be generated in the business-layer controller but the actual execution of it would be handled by the data later model .", "My question is regarding the Business layer and where to put the logic .", "I installed this GTM Magento extension http : www.magentocommerce.com magento-connect google-tag-manager-6455.html which is useful to add the GTM snippet at the right place and the GTM connection does work but as you can see below transaction data is undefined - as no data-layer is declared before the GTM snippet : .. . .. . What I need now is to build and declare the GTM data-layer before the GTM snippet into the checkout onepage success page .", "The data that is stored is a several levels deep tree structure .", "We have the following code in our Service Layer where we add a new user to the database using EF .", "My issue is that my GetFile method will need to access my DataLayer class-library to pull data from the database which causes a circular dependency .", "And define a class Employee that would look like .. . .. . That way your UI layer can talk to actual objects entities instead of having to bother with magic numbers in DataSet s and for example rely on data-binding in your UI .", "My problem is that i don t know which data relation model should i choose relational or NoSQL .", "When using Entity Framework with Code-First what is the best practice when calling database data", "Business Layer Toolkit http : bltoolkit.net might be exactly what s needed here .", "Is it correct to scrap the view and instead move it to the application layer of my application", "You shouldn t inherit the BL entity from the DAL entity .", "My Presentation Layer calls methods in the DataLayer which returns objects from the DataObject class-library .", "Could you please explain this in detail which layer should i use this class", "One of the simplest solutions would be to wrap the access to the data context in a static property in a facade gateway class .", "Today all the data is stored in a binary file created with the help of binary-serialization .", "Your calling function will always know what and in which sequence the expected data will be .", "Simply create interface IContextHolder with method to get a context and inject the instance into your lower layer from the web application .", "I figured the data-layer s sole responsibility was interaction with the data store. .", "Really you should consider how the data will be accessed and your familiarity with relational or MongoDB .", "Which data model is better for performance to calculate these facts", "I am trying to implement the following type of autoencoder in one of the mayor frameworks : .. . .. . Using only the generative part backpropagation should update the bottleneck layer which also serves as input .", "The constructor works to add data to a datagridview .", "For instance if somehow context.SaveChanges throws an error how do we bubble the error details back to the Presentation layer", "In a n-tier application it s quite common to have trouble getting or creating business-rules exceptions from the service-layer .", "So all exceptions will catch on the top layer of application in order to log for trouble shooting .", "I have 4 layer in my application UI DomainClass Model DBCntext Repository .", "I would use an IoC container to inject the context into your repositories and your repositories into your presentation layer .", "Well sure but your repository layer still is merely wrapping simple operations already provided by the dbsets or the dbcontext itself .", "The idea is simply to drag all of the SQL database tables onto the .edmx designer and let it create its related data objects .", "The general idea is that you have EF providing access to your database .", "you might offer a choice of SQL Server or Oracle while the DAL sits over top of the DIL and calls the appropriate methods to get the data it needs for example it might specify the stored procedure to call or table view to query but the DIL is responsible for actually doing the call .", "access nested values .", "Your data-warehouse people refuse to designate primary keys" ] }
{ "confidence": [ 60.64495849609375, 59.220088958740234, 55.78792190551758, 53.904964447021484, 52.648338317871094, 50.82453918457031, 50.41947937011719, 49.61058807373047, 49.410736083984375, 49.318450927734375, 48.77488327026367, 48.024105072021484, 47.69137954711914, 46.6246452331543, 46.13936233520508, 45.90159225463867, 45.109378814697266, 44.51402282714844, 44.18727493286133, 43.78641128540039 ], "content": [ "Question : null .. . Answer : I have a question regarding Layered architecture . We are drafting a layered architecture and we have decided to have a data-layer Business layer and the front with viewmodels . My question is regarding the Business layer and where to put the logic . The data-layer webservice layer will get all the data and transform the data to our own entities say a class called DataLayerEntityClassA . In the business-layer we have a class BusinessLayerClassA which are taking this transformed data DataLayerEntityClassA and doing some logic say sorting . When we are finished with the logic we return BusinessLayerEntityClassA which inherits the class DataLayerEntityClassA . The class BusinessLayerEntityClassA is in the BL layer and contains some simple logic for searching querying the DataLayerEntityClassA entity . Is this good practice or should this simple logic be in class BusinessLayerClassA Are there any pitfalls in doing this way We are using c .net-3.5 if that matters . Comment : You shouldn t inherit the BL entity from the DAL entity . That is exactly what you are trying to avoid separate with the layered approach . Comment : So I need to create new entities in the BL and map those to the DL entites . When I have the new BL entites is it ok to put logic in them or should it be in the BL models", "Question : I work for a company that develops a very large scale data based application . The application was first created around ten years ago and as such is in desperate need of an upgrade . I have been given the task of investigating and implementing the data-layer upgrade . At present it uses a system with business-objects that are all based on extend DataRow objects that is - each object more or less relates to one row in a database . The application is NOT currently object oriented but this causes many problems and we want to move in the OO direction . So we are looking to start using the .NET Entity Framework and create an .edmx file . The idea is simply to drag all of the SQL database tables onto the .edmx designer and let it create its related data objects . Now in my mind as an OO developer I was planning to manually create new business-objects and populate them from the .edmx generated data objects returned from queries in the new data-layer . This would allow the simple separation of the various layers using an interface . The problem is that the boss says that there is not enough time to rewrite the hundred or so business object classes and he suggests using the .edmx generated data objects throughout the whole application . Every thought in my mind says no.. . don t create that coupling between the data-layer and the whole system but the boss says that he has seen articles online promoting this . So my questions for you guys are these : please provide valid reasons for your answers to 1 and 2 .. . .. . 1 . Is this a viable solution even short term 2 . Is there a better alternative solution to creating separate business-objects from the generated data objects 3 . Is there a better easier way to create separate business-objects from the generated data objects rather than manually copying and pasting I understand that these questions are somewhat subjective but I ve provided as much specific information as possible and I could really do with some advice on the subject . Comment : but the boss says that he has seen articles online promoting this . sounds like a red find a new job flag to me : Comment : @Ivo I know what you mean.. . I do have alarm bells ringing in my head but there is always a battle between what the developers want and what the business who pays for development want . Comment : Me too ...... . .. . Answer : This is one common issue happens to probably every legacy system people try to upgrade . I don t see any point that you create hundreds of business-objects and copy data from EF data objects to yours You are still coupling with a EF and your business-objects To get passed with coupling IoC should be used where you can consider keeping the separation from your data-access-layer from your business-layer . And definitely you can switch ORM with very little cost time . This is the beauty of separation of concern . In software industry if you want to cut down the cost now you probably have to pay more in the long run if you need to change or ORM once again . Try to negotiate with your boss in terms of quality which maybe a bit costly now but definitely be gaining in the long run . And in your case you may consider EF Code First . This will definitely give you a better grip than Database first on your data-access-layer design . You may also code generators to generate your data-access-layer like the way you want which will save hundreds of man hour plus you can get a better implementation of your module . I would suggest you to go for CodeSmith Generator . There s a bit of learning curve but it s worth it . Please keep in mind separating the data-access is not the solution to upgrade a legacy system . I have seen in many cases where upgrading and maintaining the core functionality becomes the hardest job in the world . And there s nothing much to do unless the business people decides for a real upgrade when they face loses . Try to identify the core components and DAL must be one of then to be upgraded . Comment : Thanks for your detailed answer . Code generation and the various Entity Framework development methodologies are definitely somethings that I ll look into . I have previously used Unity with its Inversion of Control system but wasn t impressed.. . it seemed to have a 12+ second startup time with even the simplest UI project . Surely developers managed to get layer separation before IoC I was always taught to interface the data-layer and although the data provider must reference the data types only one reference to the data provider is required.. . isn t that enough separation Comment : Yes definitely That s DI by hand : IoC containers are nothing but a Dictionary Type Type and finding key are fast too as it is hashed . Are you sure about 12+ startup time due to DI because I have been using IoC on a site that gets 200K+ hits per day . I agree that there s definitely performance hit but you have to sacrifice something to achieve something :", "Question : I m working on a project where I had to add a data-layer to my application . I ve always thought that the data-layer is purely responsible for CRUD functions ie . shouldn t really contain any logic but should simply retrieve data for the business-layer to manipulate . However I m a little confused with my project because I m not sure whether I ve structured my app correctly for this scenario . Basically I m trying to retrieve a list of products from the database that fall within a certain pricing threshold . At the moment I have a function in my data-layer that basically returns all products where price min threshold and price max threshold . But it got me thinking that maybe this is incorrect . Should the data-layer simply return a list of ALL products and then the business logic do the filtering I m pretty confused over whether the data-layer should simply provide methods that allow the business-layer to get raw data or whether it should be responsible for getting filtered data too If anyone has an article or something explaining this in detail it d be very helpful . Thanks .. . Answer : The purpose of the data-layer is to do the data related interactions with the data repository . If you want to get really pure you can separate your data-layer into two parts : the D ata A bstraction L ayer and the D ata I ndependence L ayer . The DIL is responsible for assembling the correct query for the data repository you are interfacing to e.g . you might offer a choice of SQL Server or Oracle while the DAL sits over top of the DIL and calls the appropriate methods to get the data it needs for example it might specify the stored procedure to call or table view to query but the DIL is responsible for actually doing the call . In your case I would remove the filter at the data-layer i.e . the caller should pass in the thresholds . In pseudo code your method-signature would look like this : .. . .. . I ve used an array for the return-type because pretty much all languages have that you didn t specify which language you re using this is also the reason for using the decimal type for thresholds . Comment : Thanks this is what I suspected . I figured the data-layer s sole responsibility was interaction with the data store. .", "Question : null .. . Answer : I need to Extend my Data Layer by a class project that contains my Web.config file by itself . And manage the database access in all Other projects in one Solution by the data-layer project . to do that i need to define a Web.config app.config file in data-layer . and the User-Interface layer should act through the data-layer . I know that MVC do that in Model-View-Controller parts but I want to separate the whole Model Part from current project . any suggestions is needed . thanks Comment : I have found my mistake in understanding the programming structure and it has done .", "Question : I ve been thinking of how I could use one instance of a DbContext per HttpRequest in a layered application . One of the solutions I came up with would be to create an HttpModule that would initialize an instance of the context in HttpContext.Current.Items in the BeginRequest event handler and then dispose it in the EndRequest event handler . The approach above poses a problem though : I need to reference System.Web in my data-layer and business-layer in order to get a hold of the stored DbContext instance . This is probably okay but I prefer to avoid going that route . What if I wanted to reference and use my data-layer and business layers from a non-web application Any ideas .. . Answer : One of the simplest solutions would be to wrap the access to the data context in a static property in a facade gateway class . This way in a web application the property could access the HttpContext.Current.Items and store the context there . On the other hand if the http context is missing you could implement any other lifetime management policy for a non-web application . The facade itself doesn t have to be a part of the data-layer you don t then reference System.Web in a data-layer .", "Question : I ve been thinking of how I could use one instance of a DbContext per HttpRequest in a layered application . One of the solutions I came up with would be to create an HttpModule that would initialize an instance of the context in HttpContext.Current.Items in the BeginRequest event handler and then dispose it in the EndRequest event handler . The approach above poses a problem though : I need to reference System.Web in my data-layer and business-layer in order to get a hold of the stored DbContext instance . This is probably okay but I prefer to avoid going that route . What if I wanted to reference and use my data-layer and business layers from a non-web application Any ideas .. . Answer : You can use dependency-injection . Simply create interface IContextHolder with method to get a context and inject the instance into your lower layer from the web application . The implementation of this interface will be different for different types of applications - it will wrap the access to the real storage for your context instance .", "Question : I have ben requested to create an application that uses an existing DB with stored-procedures insert update delete and they don t want to use Entity Framework . One way is to create my own Data Access Layer using System.Data.DataSet but I would like to know if there is any existing library or something I can use where I can fill objects from SP s and also update data using SP s . Any clue Comment : Check Dapper.NET https : github.com StackExchange dapper-dot-net stored-procedures Comment : Yes Entity Framework . You can use stored-procedures with EF . Usually though developers are given a task but not told they can t use specific tools that lend themselves nicely to the job . Why the requirement not to use EF Comment : Performance in EF is horrible with big datasets . Comment : Drapper sounds a good solution . .. . Answer : I usually recommend to use Dapper . it is very light-weight it s performance is on par with ADO.NET coding . Comment : Does Dapper can track of changes over the entity So I can know what property was changed etc . Comment : No it is just direct query and execute operations extending the connection object .", "Question : I have ben requested to create an application that uses an existing DB with stored-procedures insert update delete and they don t want to use Entity Framework . One way is to create my own Data Access Layer using System.Data.DataSet but I would like to know if there is any existing library or something I can use where I can fill objects from SP s and also update data using SP s . Any clue Comment : Check Dapper.NET https : github.com StackExchange dapper-dot-net stored-procedures Comment : Yes Entity Framework . You can use stored-procedures with EF . Usually though developers are given a task but not told they can t use specific tools that lend themselves nicely to the job . Why the requirement not to use EF Comment : Performance in EF is horrible with big datasets . Comment : Drapper sounds a good solution . .. . Answer : If you really want to go down this path you can use Automapper http : automapper.org .. . .. . Take a look at this post How do I use automapper to map a dataset with multiple tables http : stackoverflow.com questions 16788242 how-do-i-use-automapper-to-map-a-dataset-with-multiple-tables .. . .. . Still keep in mind that performance can actually be really bad . IMHO EF would be a better choice .", "Question : I have two layers a data-layer which gets the results from the database and a UI layer which will show the data in label controls Here is the code of data-layer .. . .. . And it is the code of the UI layer .. . .. . And my question is how to show data on labels .. . .. . Thanks a lot in advance .. . Answer : I would make GetEmployee return an actual Employee type . And define a class Employee that would look like .. . .. . That way your UI layer can talk to actual objects entities instead of having to bother with magic numbers in DataSet s and for example rely on data-binding in your UI .", "Question : I have two layers a data-layer which gets the results from the database and a UI layer which will show the data in label controls Here is the code of data-layer .. . .. . And it is the code of the UI layer .. . .. . And my question is how to show data on labels .. . .. . Thanks a lot in advance .. . Answer : Your requirement is not very clear . Just to give you an idea of how you can do is .. . .. . Note : This is neither the best not the appropriate way of doing things . There isn t any exception-handling etc .", "Question : We have the following code in our Service Layer where we add a new user to the database using EF . And this is called by the Service Layer via this method : .. . .. . We do certain client and server validations before we reach the AddUser however I am not sure about how to handle the unhandled-exception s . For instance if somehow context.SaveChanges throws an error how do we bubble the error details back to the Presentation layer I am thinking of putting try-catch within the AddUser like this : .. . .. . but the return-type of the AddUser is User and I m not sure what I should be returning when an exception happens . If I can return the exception details to the UserResponse method I can populate some fields within our response object which are there to hold error details but now sure what to return from within the catch section . I am trying to understand how to identify exceptions that should be caught and handled in a multi layered application one with a data-access-layer service-layer presentation layer etc . Mainly trying to figure out how to surface the exception details to the user for resolution . Thanks .. . Answer : You don t need to catch-exception in Data Access Layer let them throw naturally . The rule is you just catch-exception if you need to do business-process on it . If not let it be . So all exceptions will catch on the top layer of application in order to log for trouble shooting . If your application is web you can use some log library which supports log handler like Elmah http : code.google.com p elmah to intercept in request level .", "Question : I m working on a project where I had to add a data-layer to my application . I ve always thought that the data-layer is purely responsible for CRUD functions ie . shouldn t really contain any logic but should simply retrieve data for the business-layer to manipulate . However I m a little confused with my project because I m not sure whether I ve structured my app correctly for this scenario . Basically I m trying to retrieve a list of products from the database that fall within a certain pricing threshold . At the moment I have a function in my data-layer that basically returns all products where price min threshold and price max threshold . But it got me thinking that maybe this is incorrect . Should the data-layer simply return a list of ALL products and then the business logic do the filtering I m pretty confused over whether the data-layer should simply provide methods that allow the business-layer to get raw data or whether it should be responsible for getting filtered data too If anyone has an article or something explaining this in detail it d be very helpful . Thanks .. . Answer : There s no real right or wrong way here it usually comes down to whatever fits best for your implementation . The purpose of having a data-layer or model is that if need be you can with relative ease swap out your persistence layer for something complete different and have everything just work . That said I will usually include the functionality to filter the returned recordset as part of my model something like : .. . .. . The expression to filter the results would be generated in the business-layer controller but the actual execution of it would be handled by the data later model .", "Question : I am trying to build a multilayer application service in C . To be precise I am trying to build a REST webservice with ASP.NET Web Api which will be hosted on my own with Owin . Now I got so far that I have the following components every one of them is in a separate .dll : .. . .. . - RestHost which in my case is an console-application .. . - RestService here is my web service witch all the controllers .. . - InterfacesLayer .. . - ModelLayer here are the objects I use just with their get set methods .. . - DataLayer every single class inside of ModelLayer has its own class in Datalayer plus there is the Database connection class .. . - BusinessLayer here all the logic is done again every class from model has its own class and this layer communicates with the REST service and the datalayer . RestHost - as the name says it is the host of my service . Besides that I am also doing my dependency-injection here . Since it is not much code I will post it : .. . .. . Oh and what I forgot to mention but you can see it from the code in my host application I am also reading the App.Config where my connection-string is hosted . And here is my problem . I am not sure how to access the Database Connection from my service . Here I am implementing Firebird in my data-access-layer but I am unsure how to use it in my application . Of course the easiest way would be just to create an instance and pass it to my service but this is the last thing i want to do . I have also been thinking implementing Firebird as a static-class or as a singleton but then i cannot use my IPersistant interface and besides that i don t think that this is the right approach . So my question would be is there any best practice for this kind of stuff I somehow need to pass the connectionstring to the implementation of IPersistent Firebird but without actually creating an instance of Firebird in my RESTService . Thanks .. . Answer : The general pattern for a multi-layer application like the one you re building is to have a data-layer that provides your services with access to a database or some other method of persisting data usually via a repository . You can then configure your IoC container to inject your connection-string into your repository and then inject your repository into your service . This way your service stays agnostic as to how data is persisted and can focus on defining the business logic . I actually do a similar thing for a repository that instead of persisting data in a database stores it in a blob on Azure s CDN . The configuration withing my IoC StructureMap in my case looks like this : .. . .. . With my repository looking like this : Comment : in the end i have done that pretty simple . I just write my DB configuration inside my APP.config file of my service hosting application and then read the connecting string in my datalayer every time i need an connection . Maybe i could also store it somewhere so i dont need to read it every time but for now this is OK for me . Thanks for the answer Comment : Glad it helped . If you re happy with the answer then don t forget to mark the answer as correct", "Question : null .. . Answer : I am trying to implement the following type of autoencoder in one of the mayor frameworks : .. . .. . Using only the generative part backpropagation should update the bottleneck layer which also serves as input . The output of the network is then compared to my data and the bottleneck weights are a representation in reduced dimension . Now I am trying to implement this in one of the mayor frameworks because there I will be able to use goodies such as GPU out-of-memory data batches etc . But I need an input layer that can update the data using the gradient or some workaround . Implementing this can easily be done for small data using an identity matrix as input and simply using weights of the bottleneck layer but this is not really feasible for large-data because of memory consumption if we have n data points and p neurons in the bottleneck layer we need an nxn identity matrix and an nxp matrix in the bottleneck layer . There is also an R Package pcaMethods which implement this as non-linear PCA and works very well for small data but the implementation is in pure R and thus not really made for performance . Figure that illustrates the network Source : Scholz et . al . 2005 http : bioinformatics.oxfordjournals.org content 21 20 3887 F2.expansion.html .. . .. . Link to the original publication : Scholz et . al . 2005 http : bioinformatics.oxfordjournals.org content 21 20 3887.short", "Question : I have ben requested to create an application that uses an existing DB with stored-procedures insert update delete and they don t want to use Entity Framework . One way is to create my own Data Access Layer using System.Data.DataSet but I would like to know if there is any existing library or something I can use where I can fill objects from SP s and also update data using SP s . Any clue Comment : Check Dapper.NET https : github.com StackExchange dapper-dot-net stored-procedures Comment : Yes Entity Framework . You can use stored-procedures with EF . Usually though developers are given a task but not told they can t use specific tools that lend themselves nicely to the job . Why the requirement not to use EF Comment : Performance in EF is horrible with big datasets . Comment : Drapper sounds a good solution . .. . Answer : You can use a micro-orm like Dapper https : github.com StackExchange dapper-dot-net stored-procedures which is simple efficient and maps correctly to objects . Example of use : Comment : Does Dapper can track of changes over the entity So I can know what property was changed etc . Comment : @VAAA You can use Dapper.Contrib https : github.com StackExchange dapper-dot-net tree master Dapper.Contrib to do it . Comment : Amazing thats what Im looking", "Question : We have the following code in our Service Layer where we add a new user to the database using EF . And this is called by the Service Layer via this method : .. . .. . We do certain client and server validations before we reach the AddUser however I am not sure about how to handle the unhandled-exception s . For instance if somehow context.SaveChanges throws an error how do we bubble the error details back to the Presentation layer I am thinking of putting try-catch within the AddUser like this : .. . .. . but the return-type of the AddUser is User and I m not sure what I should be returning when an exception happens . If I can return the exception details to the UserResponse method I can populate some fields within our response object which are there to hold error details but now sure what to return from within the catch section . I am trying to understand how to identify exceptions that should be caught and handled in a multi layered application one with a data-access-layer service-layer presentation layer etc . Mainly trying to figure out how to surface the exception details to the user for resolution . Thanks .. . Answer : I think BusinessExceptions are the thing you are looking for . In a n-tier application it s quite common to have trouble getting or creating business-rules exceptions from the service-layer . I guess that you are trying to validate some business-rules with your example maybe that the username is valid or that it doesn t already exist in the DB . For this kind of issues I always work with FaultExceptions and custom objects to send a message understandable to the client-side . This way I can distinguis between system exceptions bug exceptions and business-rules exceptions the ones that the user want to know . This is how I usually do it . I have a BusinessFault object which contains the data of the business rule broken that will be procesed by the client and showed if necessary to the user : .. . .. . So whenever I need to check a rule I use it like this using your example : .. . .. . In my service contract I should specify my BusinessFault as a knowntype . This way this faults will get to the client-side : .. . .. . So in the client-side all I need is a try-catch specific for the BusinessFault : .. . .. . There s a very good article about this : http : www.c-sharpcorner.com UploadFile afenster wcf-error-handling-and-faultexceptions Comment : Thanks for the detailed explanation .", "Question : null .. . Answer : We have a standard SQL Server Data Layer Project in Visual Studio that has a view and for a client we need to modify this view . We can t modify the standard data-layer so we created a customer specific data-layer . I was wondering is it possible to alter or do a drop and create in the customer specific data-layer for that view If so how if not bummer . Example : Project A has View v summary .. . .. . Project B linked to Project A .. . .. . We want to have Project B override Project A s v summary", "Question : When using Entity Framework with Code-First what is the best practice when calling database data This is my first time using Entity Framework with MVC and noticed that it automatically builds Models in my DataLayer . I also have the basic Models within my MVC UI which allow me to manipulate and display the data within my Views . I currently grab the data using my Workflow layer and then AutoMap the Database Model to my UI Model to display the data . Is this the best practice Should I be using the Entity Framework Models instead of my UI Models Or this even possible to do cleanly Any information on the matter would be appreciated . .. . Answer : The POCOs created by EF are supposed to be used as your model . The general idea is that you have EF providing access to your database . You query EF using LINQ and or extension-methods and end up with an object or collection of objects that you display on your UI by binding them in WPF . That is of course if you re using WPF as opposed to the older WinForms . I can tell you from experience that it s a very streamlined process once you become familiar with the technologies . That s how a very basic setup would work . A more advanced way of going about it is adding architectures like Model-View-ViewModel MVVM and possibly the repository pattern into the mix at which point you get better separation of code and presentation at the cost of increased complexity . I don t know what flavor of MVC you re using and how it can be made to intermingle with the above but if you want to know more about how EF was envisioned to work you should look into the technologies I ve listed above . Comment : MVVM Sounds like it may be the best fit as I already have a repository pattern in-place which was used when using Linq-To-SQL . I ve modified my Generic Repository to work with Entities and will need to do a decent amount of data-manipulation on the UI side .", "Question : I am working on a project where I am integrating analytics into a website . I am very interested in using a Data Layer like the one described in this article .. . .. . https : developers.google.com tag-manager devguide .. . .. . However this tutorial only defines how to use a data-layer when using Google Tag Manager . If I am using a different tag manager like BrightTag or OpenTag is there anyway to hook Google Analytics into a Data Layer using just JavaScript Thanks DS .. . Answer : OpenTag has it s own specification for a data-layer - they call it universal variable specs are here : https : github.com QubitProducts UniversalVariable . Presumably BrightTag uses yet another format .. . .. . Updated to add : Brighttag is now Signal and they do not seem to use a standardized format they simply grab global-variables - but of course you still can declare an object to create a pseudo-namespace and minimize naming collisions and pick your values from that object .. . .. . There seems to be no commom specification which would be compatible with multiple all Tag Management Systems . So yes you can use some kind of data-layer with other Tag Management Systems but it might be called differently and how it will be implemented depends on your platform of choice . Updated to add : Also keep in mind that the GTM dataLayer does not just contain key-value pairs the GTM code also overwrites the native push method for the dataLayer array . That might be a concern if you plan to use multiple tools that manipulate the dataLayer variable at once .", "Question : I am having a problem with a circular dependency . Similar question have been asked and I have read a lot of answers . Most deal with a work-around but I would like to refactor so what I have it correct and I would like some input on where I have gone wrong . I can change what I am doing but not the entire project architecture . I am using VB.Net in Visual Studio 2012 . I have two class libraries : .. . .. . 1 . DataLayer for accessing the database . 2 . DataObject which contains classes that represents my business-objects . My Presentation Layer calls methods in the DataLayer which returns objects from the DataObject class-library . I have simplified somewhat I actually have a controller layer but it needs references to the two class libraries above . This is an existing architecture that is from before my time . .. . .. . In the DataObject class-library I have an abstract-class that represents a file . It has properties such as filename userID etc . It also has a method GetFile that I code in the derived classes because there are different ways of getting the file . A DataLayer method returns a collection of these file objects but I don t want to get the actual file until it s needed . So far I have a derived-class that calls a webService using properties from the baseClass and a derived-class that accesses the fileSystem . Both return a byte array representing the file . The calling class does not need to know how the file is retrieved . Now I have a new requirement to build the file on the fly using data from the database . I can get all the data I need using the properties in the base-class . My issue is that my GetFile method will need to access my DataLayer class-library to pull data from the database which causes a circular dependency . The DataLayer class-library has a reference to DataObject since that is what it returns . But now I need to call the DataLayer from a class in DataObjects . I could call the DataLayer from presentation and pass the result to my DataObject s GetFile method but then my presentation layer needs to do something special for this derived-class . My goal is that the derived-class handles GetFile without presentation knowing about the implementation . I could create a new class-library for this DataLayer code but I don t like a special case . I could access the DB directly in the DataObject class but that circumvents the layered architecture . I can t change our architecture but I can change my approach . Any opinions .. . Answer : I think I have the answer . In my concrete class when I am loading the data initially in the DataLayer I will get all the data I need to create the file . I ll store it in a new property in my concrete class which my GetFile method will use to build the file . This has a little more overhead - I make DB calls and put all this data in memory when it may not be needed . I ll give it a try and see how performance is . Any critiques of this approach" ] }
[ "yes-answer-long", "yes-answer-short" ]
persistent-storage
UNK_RELATION
ghostdriver@phantomjs@94
ghostdriver -- ghost driver is an implementation of the remote webdriver wire protocol using @placeholder as its back-end .
{ "confidence": [ 46.45159149169922, 46.29053497314453, 43.9890022277832, 42.846893310546875, 41.18836212158203, 39.188804626464844, 37.93154525756836, 36.77615737915039, 34.76546859741211, 33.54912567138672, 31.327857971191406, 30.339908599853516, 29.95523452758789, 29.205841064453125, 28.872539520263672, 28.848861694335938, 28.24333953857422, 27.818832397460938, 27.743412017822266, 27.640724182128906, 27.282005310058594, 27.166934967041016, 27.115299224853516, 27.089488983154297, 26.329830169677734, 26.213672637939453, 26.213672637939453, 26.038894653320312, 25.906803131103516, 25.705162048339844, 25.67681884765625, 25.449722290039062, 25.002779006958008, 25.002779006958008, 25.002779006958008, 25.002779006958008, 24.818174362182617, 24.600414276123047, 24.57979965209961, 24.411712646484375, 24.367752075195312, 23.926374435424805, 23.926374435424805, 23.874691009521484, 23.84716796875, 23.608501434326172, 23.608501434326172, 23.36255645751953, 23.36255645751953, 23.36255645751953, 23.36255645751953, 23.310314178466797, 23.310314178466797, 23.16350555419922, 22.97051239013672, 22.79491424560547, 22.53209686279297, 22.53209686279297, 22.53209686279297, 22.494937896728516, 22.494937896728516, 22.46166229248047, 22.451669692993164, 22.451669692993164, 22.286151885986328, 22.286151885986328, 22.286151885986328, 22.286151885986328, 22.245811462402344, 22.192764282226562, 21.894107818603516, 21.68138885498047, 21.642637252807617, 21.47863006591797, 21.418533325195312, 21.418533325195312, 21.24199676513672, 21.24199676513672, 21.24199676513672, 21.15318489074707, 21.15318489074707, 21.15318489074707, 21.15318489074707, 21.15318489074707, 21.15318489074707, 21.15318489074707, 21.018444061279297, 21.018444061279297, 21.018444061279297, 21.018444061279297, 20.996051788330078, 20.996051788330078, 20.996051788330078, 20.996051788330078, 20.996051788330078, 20.996051788330078, 20.863677978515625, 20.829299926757812, 20.820098876953125 ], "content": [ "Selenium WebDriver is made up of core Java API and it is also known as Selenium 2 .. . .. . Ghost Driver is a pure JavaScript implementation of the WebDriver Wire Protocol for PhantomJS .", "I am planing to try Ghostdriver https : github.com detro ghostdriver which is a Remote WebDriver that uses PhantomJS as back-end .", "WebDriver Implementation for PhantomJs is GhostDriver", "I am using the Ghost driver https : github.com detro ghostdriver with PhantomJS .", "I am using the GhostDriver as the WebDriver implementation in a Java-based project .", "Now there s a headless-browser that includes a WebDriver Wire Protocol implementation -- PhantomJS .", "It s a Remote WebDriver that uses PhantomJS as back-end .", "The latest version of PhantomJS is an easy to install stand-alone binary that doesn t require installing Node.js or any other dependencies and ships with its own Ghost Driver for implementing the WebDriver Wire Protocol .", "How to do that with the ghostDriver Phantomjs Driver", "Ghostdriver IS-A Webdriver : - Also the tag-wiki for ghostdriver http : stackoverflow.com tags ghostdriver info gives a simple explanation .", "I am using Python bindings for Selenium WebDriver and Ghostdriver Phantomjs in UI automation that I have developed .", "i don t care where : inside ghostdriver phantomjs or phantomjs-webdriver .", "I am running a selenium-webdriver script headless using Phantomjs Driver .", "The Selenium2 driver is well tested and implements a standard API -- the WebDriver Wire Protoco l -- across all of the browsers it has drivers for .", "For just PDF generation not GhostDriver or WebDriver you can use ghost.py need QT found wrappers with pyexecjs or subprocesses .", "I was using Selenium PhantomJSDriver Ghost driver to take screenshots .", "For this you need to use not compiled libs but source code of ghost driver .", "UPDATE : Ghostdriver itself is not hanging -- its default timeout is essentially infinite though .", "Actually using --ssl-protocol tlsv1 fixed the problem : DesiredCapabilities caps DesiredCapabilities.phantomjs caps.setCapability PhantomJSDriverService.PHANTOMJS CLI ARGS new String --ssl-protocol tlsv1 WebDriver driver new PhantomJSDriver caps", "I m using the same config file but it doesn t work the ghost driver still print all the INFO log on the screen .", "Hi I am using ghostdriver for selenium .", "So change that if you get this Could not start Ghost Driver error", "GhostDriver is still accepting requests .", "Thank you for this this helped me get started on understanding how to parse the WebElement structure back from NW wire protocol .", "We are in the middle of choosing our headless-browser driver solution that will be some implementation of Selenium WebDriver .", "I want to see if there is a bug in ghostdriver .", "The guy from Ghostdriver refers to JbrowserDriver .", "Tool : Selenium with PhantomJS GhostDriver .", "I wish WebDriver had a better Chrome driver in order to use it .", "Theoretically it may be possible to change the ghostdriver implementation with one that enables debugging without recompiling PhantomJS .", "Doing this disables the bulk of ghostdriver output : .. . .. . Seems that GhostDriver should be be updated to not log when .. . .. . is used .", "According to this pull https : github.com detro ghostdriver pull 438 on GitHub there is a command-line argument --webdriver-logfile and you can see this in the actual log .", "Ghostdriver is not finding some of our selectors i.e .", "I need a way to debug the ghostdriver source code .", "Ghostdriver is written in JavaScript and it runs directly in PhantomJS .", "Can be CasperJS script send through GhostDriver to PhantomJS .", "One tutorial http : blog.likewise.org 2013 04 webdriver-testing-with-python-and-ghostdriver .. . a second http : toddhayton.com 2015 02 03 scraping-with-python-selenium-and-phantomjs .. . .. . I made one last change to the phantomjs service.py file which I found here https : github.com detro ghostdriver issues 236 .", "Info : I am crossposting this also to the github issues of ghostdriver https : github.com detro ghostdriver issues 243 .", "Clone PhantomJS repository .. . Clone ghostdriver repository .. . copy ghostdriver src to phantomjs src ghostdriver recursively .. . build phantomjs .. . .. . Using newly build phantomjs I got following result : .. . .. . .. . .. . UPDATE .. . .. . Use PhantomJS 1.9.2+ .", "There is a special way to execute PhantomJS script from GhostDriver using the next command : .. . .. . It was included in GhostDriver v1.1.0 https : github.com detro ghostdriver pull 262 so it should work since PhantomJS v.1.9.6 http : phantomjs.org release-1.9.html .", "Im getting a long error message here is the end of it : raise WebDriverException Unable to start phantomjs with ghostdriver .", "e WebDriverException : Message : Unable to start phantomjs with ghostdriver .", "I m also getting Unable to start phantomjs with ghostdriver .", "try using webdriver to interface with phantomjs https : github.com brandicted scrapy-webdriver", "So selenium GhostDriver can Support it", "The Goal : .. . .. . I am trying to perform some scraping in Python using a headless-browser : Selenium with PhantomJs and GhostDriver .", "I need help : .. . .. . how to disable all logs in console-application what using Selenium and Phantomjs GhostDriver .. . .. . Regards", "Why would you want to step through the ghostdriver code", "https : github.com detro ghostdriver .. . .. . Not sure that this is possible from the python .", "I am trying to take screenshot of a page with phantomJS and ghostdriver .", "Selenium RemoteWebDriver has sent a request to PhantomJS GhostDriver and it is waiting on a response .", "github.com detro ghostdriver issues 407 https : github.com detro ghostdriver issues 407", "I want to use phantomJS for some web testing and I ve come across GhostDriver https : github.com detro ghostdriver .", "So i followed this advice https : github.com detro ghostdriver issues 202 issuecomment-19808784 and set up the cuttent github version of ghostdriver .", "I am writing python script which is using selenium WebDriver and PhantomJS .", "workaround d l source from phantomjs http : phantomjs.org build.html and edit hub register.js in the src ghostdriver comment out lines as shown below : .. . .. . var ghostdriver ghostdriver .. . .. . compile and everything works", "I am now having problem adding cookies when using Phantomjs + ghostdriver + selenium with python .", "I am running a headless script using PhantomJSDriver GhostDriver and trying to upload a file on gmail while composing an email .", "I would suggest try using headless PhantomJs GhostDriver which is a relatively new thing .", "I was wondering if there was a way that when I send a request to the Ghostdriver service I can somehow stop the execution of the ghostdriver code so that I could step through the code line by line like in a debugger .", "You could have a browse through the code : github.com detro ghostdriver blob master src https : github.com detro ghostdriver blob master src webelementlocator.js L235", "Architecture of GhostDriver http : i.stack.imgur.com CTDFA.png .. . .. . The Selenium2 driver actually loads and runs an active browser session manipulating the browser just as a human would .", "I start WebDriver with PhantomJS : .. . .. . where : .. . .. . When the url is http : mcand.co.uk our-people current-vacancies the XPath extraction returns nothing as it should since there are no hyperlinks containing the text manager yet I see the following in the ghostdriver log : .. . .. . Is this a PhantomJS ghostdriver issue", "First of all add the relevant dependency of phantomJsDriver GhostDriver to the POM file : .. . .. . You can find the full guide here https : github.com detro ghostdriver .. . .. . Then work with it like with ordinary WebDriver as described in Selenium manuals https : code.google.com p selenium wiki GettingStarted but instead of initialising HtmlUnitDriver : .. . .. . Initialize PhantomsJsDriver :", "Must I change the config.js of ghostdriver somehow to make this work", "I m trying to run Ghostdriver inside my Openshift server .", "Problem : The GhostDriver API does not yet support alert handling .", "See more reference here https : github.com detro ghostdriver issues 20 .", "When using the PhantomJS driver add the following parameter : .. . .. . Related code would be nice to have an option to turn off logging though seems thats not supported : .. . .. . selenium-webdriver phantomjs service.py", "i.e : .. . .. . phantomjs --webdriver 8089 --webdriver-selenium-grid-hub .. .", "I m having trouble using this workaround via the python webdriver bindings .", "First set a timeout for the webdriver .", "I have difficulties setting the capability PhantomJSDriverService.PHANTOMJS GHOSTDRIVER PATH PROPERTY in my Java program correctly in order to use the newest version of Ghostdriver from github https : github.com detro ghostdriver together with my installed phantomjs version 1.9.1 .. . .. . Here is what I do in my Java program .. . .. . The selenium driver starts correctly if i do not set the PhantomJSDriverService.PHANTOMJS GHOSTDRIVER PATH PROPERTY but I get some errors in my tests that are supposed to be fixed in the current developer branch of ghostdriver .", "I have the following problem .. . .. . I successfully launched Selenium Grid hub with : .. . .. . java -jar selenium-server-standalone-2.53.0.jar -role hub .. . .. . After that I tried to launch PhantomJS node with : .. . .. . phantomjs --webdriver 8090 --webdriver-selenium-grid-hub http : localhost : 4444 .. . .. . .. . .. . but got Error : .. . .. . INFO - 2016-03-25T13 : 56 : 28.397Z GhostDriver - Main - running on port 8090 INFO - 2016-03-25T13 : 56 : 28.397Z GhostDriver - Main - registering to Selenium HUB http : localhost : 4444 version : using 127.0.0.1 : 8090 with org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy .", "As explained in this article https : paolobernardi.wordpress.com 2015 02 25 phantomjs-with-ghostdriver-on-openshift PhantomJS GhostDriver binds on localhost only while on OpenShift you cannot bind anything on localhost you need to specify the machine IP address .", "In order to use PhantomJS + GhostDriver on OpenShift I recompiled it after applying the patch you can find it here : https : paolobernardi.wordpress.com 2015 02 25 phantomjs-with-ghostdriver-on-openshift", "Do you mean call the PhantomJS script like a process instead of using Ghostdriver", "Anybody have an idea how to automate browser s native login prompt using GhostDriver .", "I had VERY STRAGE situations where locating using ID haven t worked with GhostDriver .", "Here s how you create a Firefox profile : .. . .. . How do you do it with PhantomJS GhostDriver", "I thought it might correlate to the port that it used by ghostdriver which is displayed after each run in the ghostdriver.log and is different each time .", "The big problem is that I only know Java and it seems that GhostDriver isn t maintained anymore .", "However I see the way to set it here https : github.com detro ghostdriver issues 243 .", "Looking at the source files of org.openqa.selenium.phantomjs.PhanomJSDriverService while debugging I discovered that it s actually ignoring documented log levels for ghostdriver itself .", "I looking for ability render pdf with PhantomJS via GhostDriver not just render pdf .", "So my question how I can get access to PhantomJS webpage instance via GhostDriver and evaluate render method", "I think the option is --webdriver-logfile .", "Finally everything works with Firefox WebDriver .", "i prefer to stuck with the WebDriver but thanks .", "As this is the native Selenium Webdriver way of doing it .", "I want to know know difference between Selenium Webdiver and Selenium Ghostdriver .", "I am also confuse Why selenium Ghostdriver is used", "2 Spiders trying to log to phantomjs s ghostdriver log file at the same time .", "selenium.common.exceptions.WebDriverException : Message : Can not connect to GhostDriver executable race-condition", "If the port is blocked by a firewall you ll get WebDriverException Can not connect to GhostDriver .", "http : ivandemarino.me 2012 12 04 Finally-GhostDriver-1-0-0", "Using for 5 months the ghostdriver 1.1 instead FirefoxDriver i can say that i am really happy with his performance and stability .", "You can set the default page load timeout using the set page load timeout method of webdriver .", "I m using phantomJS driver to automate some tests ." ] }
{ "confidence": [ 81.60911560058594, 51.32101821899414, 50.74311828613281, 50.47062683105469, 46.594932556152344, 46.594932556152344, 45.844566345214844, 45.844566345214844, 45.65284729003906, 45.40635681152344, 42.831298828125, 42.59785842895508, 41.974098205566406, 41.65971374511719, 41.28455352783203, 38.892189025878906, 38.313690185546875, 38.216339111328125, 38.1212158203125, 37.89781188964844 ], "content": [ "Question : I want to know know difference between Selenium Webdiver and Selenium Ghostdriver . I am also confuse Why selenium Ghostdriver is used Please give me brief idea . Thanks in Advance . Comment : I do not need very broad answer . Just pron and cons with little difference is okay . Comment : Ghostdriver IS-A Webdriver : - Also the tag-wiki for ghostdriver http : stackoverflow.com tags ghostdriver info gives a simple explanation . Comment : Thanks @nfechner : .. . Answer : Selenium WebDriver is made up of core Java API and it is also known as Selenium 2 .. . .. . Ghost Driver is a pure JavaScript implementation of the WebDriver Wire Protocol for PhantomJS . It s a Remote WebDriver that uses PhantomJS as back-end . WebDriver Implementation for PhantomJs is GhostDriver Architecture of GhostDriver http : i.stack.imgur.com CTDFA.png .. . .. . The Selenium2 driver actually loads and runs an active browser session manipulating the browser just as a human would . ZombieJS is a headless-browser that provides all of the features of a regular browser but without a display interface . Without the extra time spent waiting for the display to actually render a headless-browser like ZombieJS can run far faster than a normal browser so you re tests will execute in as little as half the time . But ZombieJS requires installing Node.js and can be a little buggy plus it has its own API which has both pros and cons . The Selenium2 driver is well tested and implements a standard API -- the WebDriver Wire Protoco l -- across all of the browsers it has drivers for . Now there s a headless-browser that includes a WebDriver Wire Protocol implementation -- PhantomJS . The latest version of PhantomJS is an easy to install stand-alone binary that doesn t require installing Node.js or any other dependencies and ships with its own Ghost Driver for implementing the WebDriver Wire Protocol . Which means you can drive it using the Selenium2 driver in Codeception and anything that you can test in Chrome Firefox Safari or IE using Selenium2 you can now test in half the time using PhantomJS .. . .. . Even though it s not needed to run the most recent PhantomJS it s a good idea to have Selenium2 installed so you can test in other browsers . Comment : Can you please elaborate more Comment : I edited by answer can you able to understand @Sagar007 Comment : Oh thank you so much . As I understand selenium HTMLUnit is also headless-browser . But it is not support Java script . So selenium GhostDriver can Support it Comment : Please vote up my question . Because many people has this question in mind . But they fear to down vote .", "Question : null .. . Answer : I am using the Ghost driver https : github.com detro ghostdriver with PhantomJS . I need to get the http response code of the page thats loading the phantomjs . As its not straight forward to get that in the existing phantomjs implementation I decided to override the page.onResourceRecieved function and get that response code . But now I got struck that it can be done easily if I am starting phantomjs with javascript in cli but not able to do it while starting in webdriver mode . Is there a way to do that I tried following the things but both didn t work : .. . .. . 1 . I tried starting in webdriver mode with a javascript in cli with the following command : .. . .. . setup phantomjs-1.9.8-macosx phantomjs . . setup config.js --webdriver 18824 .. . .. . But in this approach it fails to start in webdriver mode . 2 . I tried to run the javascript to override the page.onResourceRecieved function but that is also not working . The below code doesn t throw any error or change anything : .. . .. . PhantomJSDriver driver new PhantomJSDriver caps .. . String script page.onResourceReceived function response console.log Response + response.id + stage + response.stage + : +response.url .. . Object result driver.executePhantomJS script .. . System.out.println result .. . .. . .. . Can anyone point me in the right direction to achieve this Comment : Have you found solution yet", "Question : I am using Python bindings for Selenium WebDriver and Ghostdriver Phantomjs in UI automation that I have developed . I was wondering if there was a way that when I send a request to the Ghostdriver service I can somehow stop the execution of the ghostdriver code so that I could step through the code line by line like in a debugger . Is there a method to do this The only thing I can think of is putting log statements into the ghostdriver source and compiling the phantomjs source but that seems like a very unwieldy approach . Not sure I could even do that . Comment : Why would you want to step through the ghostdriver code What are you hoping to find eventually Comment : Ghostdriver is not finding some of our selectors i.e . div or div.some class and we know the selectors are valid . I want to see if there is a bug in ghostdriver . I was thinking maybe it s a page load issue like the page doesn t load some of the elements on the page . Comment : I see . I haven t yet experienced problems with XPath expressions in PhantomJS but there is a : nth-child : nth-of-type bug in PhantomJS 1.x . Make sure that the element is actually there by taking a screenshot and printing the page source . Comment : We are using phantomjs 2.0.0 . I need a way to debug the ghostdriver source code . .. . Answer : For this you need to use not compiled libs but source code of ghost driver . https : github.com detro ghostdriver .. . .. . Not sure that this is possible from the python . as looks like its written on java but not sure Comment : Ghostdriver is written in JavaScript and it runs directly in PhantomJS . Theoretically it may be possible to change the ghostdriver implementation with one that enables debugging without recompiling PhantomJS . Comment : Any idea how I can do that", "Question : I am running several tests with WebDriver and Firefox . I m running into a problem with the following command : .. . .. . WebDriver.get www.google.com .. . .. . With this command WebDriver blocks till the onload event is fired . While this can normally takes seconds it can take hours on websites which never finish loading . What I d like to do is stop loading the page after a certain timeout somehow simulating Firefox s stop button . I first tried execute the following JS code every time that I tried loading a page : .. . .. . Unfortunately this doesn t work probably because : .. . .. . Because of the order in which scripts are loaded the stop method cannot stop the document in which it is contained from loading 1 https : github.com detro ghostdriver .. . .. . UPDATE 1 : I tried to use SquidProxy in order to add connect and request timeouts but the problem persisted . One weird thing that I found today is that one web site that never stopped loading on my machine FF3.6 - 4.0 and Mac Os 10.6.7 loaded normally on other browsers and or computers . UPDATE 2 : The problem apparently can be solved by telling Firefox not to load images . hopefully everything will work after that.. . I wish WebDriver had a better Chrome driver in order to use it . Firefox is disappointing me every day UPDATE 3 : Selenium 2.9 added a new feature to handle cases where the driver appears to hang . This can be used with FirefoxProfile as follows : .. . .. . I ll post whether this works after I try it . UPDATE 4 : at the end none of the above methods worked . I end up killing the threads that are taking to long to finish . I am planing to try Ghostdriver https : github.com detro ghostdriver which is a Remote WebDriver that uses PhantomJS as back-end . PhantomJS is a headless WebKit scriptable so i expect not to have the problems of a real browser such as firefox . For people that are not obligate to use firefox crawling purposes i will update with the results .. . .. . UPDATE 5 : Time for an update . Using for 5 months the ghostdriver 1.1 instead FirefoxDriver i can say that i am really happy with his performance and stability . I got some cases where we have not the appropriate behaviour but looks like in general ghostdriver is stable enough . So if you need like me a browser for crawling web-scraping purposes i recomend you use ghostdriver instead firefox and xvfb which will give you several headaches.. . Comment : Did it work for you Comment : Unfortunatelly not . I end up killing the threads that got a non stoped loading page. . .. . Answer : My solution is to use this class : WebDriverBackedSelenium Comment : i prefer to stuck with the WebDriver but thanks . Comment : Can you provide a ruby compatible solution for the same I got stuck this area .", "Question : I am running several tests with WebDriver and Firefox . I m running into a problem with the following command : .. . .. . WebDriver.get www.google.com .. . .. . With this command WebDriver blocks till the onload event is fired . While this can normally takes seconds it can take hours on websites which never finish loading . What I d like to do is stop loading the page after a certain timeout somehow simulating Firefox s stop button . I first tried execute the following JS code every time that I tried loading a page : .. . .. . Unfortunately this doesn t work probably because : .. . .. . Because of the order in which scripts are loaded the stop method cannot stop the document in which it is contained from loading 1 https : github.com detro ghostdriver .. . .. . UPDATE 1 : I tried to use SquidProxy in order to add connect and request timeouts but the problem persisted . One weird thing that I found today is that one web site that never stopped loading on my machine FF3.6 - 4.0 and Mac Os 10.6.7 loaded normally on other browsers and or computers . UPDATE 2 : The problem apparently can be solved by telling Firefox not to load images . hopefully everything will work after that.. . I wish WebDriver had a better Chrome driver in order to use it . Firefox is disappointing me every day UPDATE 3 : Selenium 2.9 added a new feature to handle cases where the driver appears to hang . This can be used with FirefoxProfile as follows : .. . .. . I ll post whether this works after I try it . UPDATE 4 : at the end none of the above methods worked . I end up killing the threads that are taking to long to finish . I am planing to try Ghostdriver https : github.com detro ghostdriver which is a Remote WebDriver that uses PhantomJS as back-end . PhantomJS is a headless WebKit scriptable so i expect not to have the problems of a real browser such as firefox . For people that are not obligate to use firefox crawling purposes i will update with the results .. . .. . UPDATE 5 : Time for an update . Using for 5 months the ghostdriver 1.1 instead FirefoxDriver i can say that i am really happy with his performance and stability . I got some cases where we have not the appropriate behaviour but looks like in general ghostdriver is stable enough . So if you need like me a browser for crawling web-scraping purposes i recomend you use ghostdriver instead firefox and xvfb which will give you several headaches.. . Comment : Did it work for you Comment : Unfortunatelly not . I end up killing the threads that got a non stoped loading page. . .. . Answer : I ve run into the same problem and there s no general solution it seems . There is however a bug about it in their bug tracking system which you could star to vote for it . http : code.google.com p selenium issues detail id 687 .. . .. . One of the comments on that bug has a workaround which may work for you - Basically it creates a separate thread which waits for the required time and then tries to simulate pressing escape in the browser but that requires the browser window to be frontmost which may be a problem . http : code.google.com p selenium issues detail id 687 c4 Comment : Yep..i already tried this also..no luck because of the paralelization of the tests...i am wondering if someone from WebDriver or Firefox will do something for that. .", "Question : I am running several tests with WebDriver and Firefox . I m running into a problem with the following command : .. . .. . WebDriver.get www.google.com .. . .. . With this command WebDriver blocks till the onload event is fired . While this can normally takes seconds it can take hours on websites which never finish loading . What I d like to do is stop loading the page after a certain timeout somehow simulating Firefox s stop button . I first tried execute the following JS code every time that I tried loading a page : .. . .. . Unfortunately this doesn t work probably because : .. . .. . Because of the order in which scripts are loaded the stop method cannot stop the document in which it is contained from loading 1 https : github.com detro ghostdriver .. . .. . UPDATE 1 : I tried to use SquidProxy in order to add connect and request timeouts but the problem persisted . One weird thing that I found today is that one web site that never stopped loading on my machine FF3.6 - 4.0 and Mac Os 10.6.7 loaded normally on other browsers and or computers . UPDATE 2 : The problem apparently can be solved by telling Firefox not to load images . hopefully everything will work after that.. . I wish WebDriver had a better Chrome driver in order to use it . Firefox is disappointing me every day UPDATE 3 : Selenium 2.9 added a new feature to handle cases where the driver appears to hang . This can be used with FirefoxProfile as follows : .. . .. . I ll post whether this works after I try it . UPDATE 4 : at the end none of the above methods worked . I end up killing the threads that are taking to long to finish . I am planing to try Ghostdriver https : github.com detro ghostdriver which is a Remote WebDriver that uses PhantomJS as back-end . PhantomJS is a headless WebKit scriptable so i expect not to have the problems of a real browser such as firefox . For people that are not obligate to use firefox crawling purposes i will update with the results .. . .. . UPDATE 5 : Time for an update . Using for 5 months the ghostdriver 1.1 instead FirefoxDriver i can say that i am really happy with his performance and stability . I got some cases where we have not the appropriate behaviour but looks like in general ghostdriver is stable enough . So if you need like me a browser for crawling web-scraping purposes i recomend you use ghostdriver instead firefox and xvfb which will give you several headaches.. . Comment : Did it work for you Comment : Unfortunatelly not . I end up killing the threads that got a non stoped loading page. . .. . Answer : I was able to get around this doing a few things . First set a timeout for the webdriver . E.g . .. . .. . Second when doing your get wrap it around a TimeoutException . I added a UnhandledAlertException catch there just for good measure . E.g . .. . .. . This basically tries to load the page but if it times out it forces the page to stop loading via javascript then tries to get the page again . It might not help in your case but it definitely helped in mine particularly when doing a webdriver s getCurrentUrl command which can also take too long have an alert and require the page to stop loading before you get the url . Comment : thanks for your answer . Looks legit . i am gonna try it out and let you know .", "Question : I am running several tests with WebDriver and Firefox . I m running into a problem with the following command : .. . .. . WebDriver.get www.google.com .. . .. . With this command WebDriver blocks till the onload event is fired . While this can normally takes seconds it can take hours on websites which never finish loading . What I d like to do is stop loading the page after a certain timeout somehow simulating Firefox s stop button . I first tried execute the following JS code every time that I tried loading a page : .. . .. . Unfortunately this doesn t work probably because : .. . .. . Because of the order in which scripts are loaded the stop method cannot stop the document in which it is contained from loading 1 https : github.com detro ghostdriver .. . .. . UPDATE 1 : I tried to use SquidProxy in order to add connect and request timeouts but the problem persisted . One weird thing that I found today is that one web site that never stopped loading on my machine FF3.6 - 4.0 and Mac Os 10.6.7 loaded normally on other browsers and or computers . UPDATE 2 : The problem apparently can be solved by telling Firefox not to load images . hopefully everything will work after that.. . I wish WebDriver had a better Chrome driver in order to use it . Firefox is disappointing me every day UPDATE 3 : Selenium 2.9 added a new feature to handle cases where the driver appears to hang . This can be used with FirefoxProfile as follows : .. . .. . I ll post whether this works after I try it . UPDATE 4 : at the end none of the above methods worked . I end up killing the threads that are taking to long to finish . I am planing to try Ghostdriver https : github.com detro ghostdriver which is a Remote WebDriver that uses PhantomJS as back-end . PhantomJS is a headless WebKit scriptable so i expect not to have the problems of a real browser such as firefox . For people that are not obligate to use firefox crawling purposes i will update with the results .. . .. . UPDATE 5 : Time for an update . Using for 5 months the ghostdriver 1.1 instead FirefoxDriver i can say that i am really happy with his performance and stability . I got some cases where we have not the appropriate behaviour but looks like in general ghostdriver is stable enough . So if you need like me a browser for crawling web-scraping purposes i recomend you use ghostdriver instead firefox and xvfb which will give you several headaches.. . Comment : Did it work for you Comment : Unfortunatelly not . I end up killing the threads that got a non stoped loading page. . .. . Answer : One weird thing that i found today is that one web site that never stop loading on my machine FF3.6 - 4.0 and Mac Os 10.6.7 is stop loading NORMALy in Chrome in my machine and also in another Mac Os and Windows machines of some colleague of mine I think the problem is closely related to Firefox bugs . See this blog post http : www.bennadel.com blog 1336-FireFox-Never-Stops-Loading-With-iFrame-Submission.htm for details . Maybe upgrade of FireFox to the latest version will solve your problem . Anyway I wish to see Selenium update that simulates the stop button.. .", "Question : I am running several tests with WebDriver and Firefox . I m running into a problem with the following command : .. . .. . WebDriver.get www.google.com .. . .. . With this command WebDriver blocks till the onload event is fired . While this can normally takes seconds it can take hours on websites which never finish loading . What I d like to do is stop loading the page after a certain timeout somehow simulating Firefox s stop button . I first tried execute the following JS code every time that I tried loading a page : .. . .. . Unfortunately this doesn t work probably because : .. . .. . Because of the order in which scripts are loaded the stop method cannot stop the document in which it is contained from loading 1 https : github.com detro ghostdriver .. . .. . UPDATE 1 : I tried to use SquidProxy in order to add connect and request timeouts but the problem persisted . One weird thing that I found today is that one web site that never stopped loading on my machine FF3.6 - 4.0 and Mac Os 10.6.7 loaded normally on other browsers and or computers . UPDATE 2 : The problem apparently can be solved by telling Firefox not to load images . hopefully everything will work after that.. . I wish WebDriver had a better Chrome driver in order to use it . Firefox is disappointing me every day UPDATE 3 : Selenium 2.9 added a new feature to handle cases where the driver appears to hang . This can be used with FirefoxProfile as follows : .. . .. . I ll post whether this works after I try it . UPDATE 4 : at the end none of the above methods worked . I end up killing the threads that are taking to long to finish . I am planing to try Ghostdriver https : github.com detro ghostdriver which is a Remote WebDriver that uses PhantomJS as back-end . PhantomJS is a headless WebKit scriptable so i expect not to have the problems of a real browser such as firefox . For people that are not obligate to use firefox crawling purposes i will update with the results .. . .. . UPDATE 5 : Time for an update . Using for 5 months the ghostdriver 1.1 instead FirefoxDriver i can say that i am really happy with his performance and stability . I got some cases where we have not the appropriate behaviour but looks like in general ghostdriver is stable enough . So if you need like me a browser for crawling web-scraping purposes i recomend you use ghostdriver instead firefox and xvfb which will give you several headaches.. . Comment : Did it work for you Comment : Unfortunatelly not . I end up killing the threads that got a non stoped loading page. . .. . Answer : Basically I set the browser timeout lower than my selenium hub and then catch the error . And then stop the browser from loading then continue the test . webdriver.manage .timeouts .pageLoadTimeout 55000 .. . .. . function handleError err .. . console.log err.stack .. . .. . .. . .. . return webdriver.get url .then null handleError .then function .. . return webdriver.executeScript return window.stop .. .", "Question : Can anyone suggest me good documentations or steps to start or configure phantomJs driver in java so that i can run my test cases in remote-server . .. . Answer : First of all add the relevant dependency of phantomJsDriver GhostDriver to the POM file : .. . .. . You can find the full guide here https : github.com detro ghostdriver .. . .. . Then work with it like with ordinary WebDriver as described in Selenium manuals https : code.google.com p selenium wiki GettingStarted but instead of initialising HtmlUnitDriver : .. . .. . Initialize PhantomsJsDriver :", "Question : Im developing small console app using selemium and I need to turn off all logs from it . Im trying phantomJSDriver.setLogLevel Level.OFF but in not works I need help : .. . .. . how to disable all logs in console-application what using Selenium and Phantomjs GhostDriver .. . .. . Regards Comment : Nobody knows : .. . Answer : This one works for me . Comment : I m using the same config file but it doesn t work the ghost driver still print all the INFO log on the screen . This is my config lines : phantomJSCaps.setCapability PhantomJSDriverService.PHANTOMJS GHOSTDRIVER CLI ARG S --webdriver-loglevel NONE phantomJSCaps.setCapability PhantomJSDriverService.PHANTOMJS EXECUTABLE PATH PRO PERTY usr lib phantomjs bin phantomjs Comment : I found this in the source code : NOTE : This is useful only when used together with PhantomJSDriverService PHANTOMJS GHOSTDRIVER PATH PROPERTY . So it is not supposed to be used like this . But is there way to set the PHANTOMJS GHOSTDRIVER PATH PROPERTY Comment : Somehow it works for me without setting that property . However I see the way to set it here https : github.com detro ghostdriver issues 243 . Maybe you can try it out . Comment : Excellent..this worked for me atleast and thanks alot Comment : @Hery - How do I do this in Ruby", "Question : I have difficulties setting the capability PhantomJSDriverService.PHANTOMJS GHOSTDRIVER PATH PROPERTY in my Java program correctly in order to use the newest version of Ghostdriver from github https : github.com detro ghostdriver together with my installed phantomjs version 1.9.1 .. . .. . Here is what I do in my Java program .. . .. . The selenium driver starts correctly if i do not set the PhantomJSDriverService.PHANTOMJS GHOSTDRIVER PATH PROPERTY but I get some errors in my tests that are supposed to be fixed in the current developer branch of ghostdriver . So i followed this advice https : github.com detro ghostdriver issues 202 issuecomment-19808784 and set up the cuttent github version of ghostdriver . However now I get the following error : .. . .. . My question is does anyone know how to fix this Must I change the config.js of ghostdriver somehow to make this work Info : I am crossposting this also to the github issues of ghostdriver https : github.com detro ghostdriver issues 243 . .. . Answer : So I had the same problem it was that the port I was attempting to use was already in use . Try a different port . i.e : .. . .. . phantomjs --webdriver 8089 --webdriver-selenium-grid-hub .. .", "Question : null .. . Answer : I was using Selenium PhantomJSDriver Ghost driver to take screenshots . this.driver.manage .window .setSize new Dimension 400 300 is not working as expected . No matter what I insert for dimension size I get screenshot of whole page . How could I make it work Comment : Apparently I m not the only one having the issue . github.com detro ghostdriver issues 407 https : github.com detro ghostdriver issues 407", "Question : I m trying to run Ghostdriver inside my Openshift server . As i run this command : .. . .. . . phantomjs --webdriver 15002 .. . .. . It says : .. . .. . Please help me out I m getting this error from 10 Days . I searched everything and googled everything . nothing is sorted me out : I m much upset : .. . .. . Help surely would be appreciated Comment : I have never used the driver option . Your problem might be a port issue . Here is a copy and paste answer about ports on openshift from Corey . The only ports that are publicly available are 80 443 8000 8443 and your application must bind to port 8080 on your OPENSHIFT IP to be able to be reached using your app-domain.rhcloud.com public url . You can check out this article to read more about how all of the binding and routing works : developers.openshift.com en managing-port-binding-routing.html https : developers.openshift.com en managing-port-binding-routing.html Comment : Not working : .. . Comment : I saw in the phantomjs bug reports that someone else reported the same problem . Maybe it s broken . Ask a question on phantomjs.org . .. . Answer : Check the Port Number while running the below command . Might be your port say 5555 is already in used . So change that if you get this Could not start Ghost Driver error", "Question : I am running a selenium-webdriver script headless using Phantomjs Driver . I am having issues uploading a file though since on a normal browser firefox or chrome it would pop-up the OS dialog box that would allow me to locate the file in my machine and upload it . How to do that with the ghostDriver Phantomjs Driver Thanks .. . Answer : This code helped me with uploading if multiple attribute was set :", "Question : I have the following problem .. . .. . I successfully launched Selenium Grid hub with : .. . .. . java -jar selenium-server-standalone-2.53.0.jar -role hub .. . .. . After that I tried to launch PhantomJS node with : .. . .. . phantomjs --webdriver 8090 --webdriver-selenium-grid-hub http : localhost : 4444 .. . .. . .. . .. . but got Error : .. . .. . INFO - 2016-03-25T13 : 56 : 28.397Z GhostDriver - Main - running on port 8090 INFO - 2016-03-25T13 : 56 : 28.397Z GhostDriver - Main - registering to Selenium HUB http : localhost : 4444 version : using 127.0.0.1 : 8090 with org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy . ERROR - 2016-03-25T13 : 56 : 28.400Z GhostDriver - main.fail - line : 97 sourceURL : phantomjs : platform hub register.js stack : register@phantomjs : platform hub register.js : 97 : 79 nglobal code@phantomjs : code main.js : 78 : 37 .. . .. . phantomjs : platform console++.js : 263 in error .. . .. . Standard node works ok but PhantomJS failes . What I m doing wrong .. . Answer : Try replacing localhost with local IP .. . .. . phantomjs --webdriver 8090 --webdriver-selenium-grid-hub http : localhost : 4444 .. . .. . with .. . .. . phantomjs --webdriver 8090 --webdriver-selenium-grid-hub http : 127.0.0.1 : 4444", "Question : I looking for ability render pdf with PhantomJS via GhostDriver not just render pdf . When I use next code then page normally loaded : .. . .. . When I use next script via command-line https : github.com ariya phantomjs blob master examples rasterize.js then pdf generated perfectly . Now I want execute script like rasterize.js page.render file.pdf but via webdriver . webdriver has execute script method but it look like PhantomJS code evaluation and do not have access to webpage instance context . Also webdriver has get screenshot as base64 method but it return only png . I use latest versions of selenium phantomjs nodejs . So my question how I can get access to PhantomJS webpage instance via GhostDriver and evaluate render method Comment : I m looking for this also.. . anyone Comment : For just PDF generation not GhostDriver or WebDriver you can use ghost.py need QT found wrappers with pyexecjs or subprocesses . Also exists python packages as pdfkit and wkhtmltopdf as wrappers for wkhtmltopdf - it should have same results because also webkit . weasyprint also good but not webkit . .. . Answer : There is a special way to execute PhantomJS script from GhostDriver using the next command : .. . .. . It was included in GhostDriver v1.1.0 https : github.com detro ghostdriver pull 262 so it should work since PhantomJS v.1.9.6 http : phantomjs.org release-1.9.html . Look at this example : .. . .. . Note that in OS X PhantomJS renders web page as images https : github.com ariya phantomjs issues 10373 with not selectable text due to limitations of Qt rendering engine in OS X at least with PhantomJS v.1.9.8 and earlier .", "Question : I m using Selenium and chrome webdriver but when I run scripts it opens a window . Is there any way that it can access the internet without the window popping up For example this goes to my school s grade site and puts in a username and password but I want to do this without the browser popping up if that s possible . Comment : If you install pyvirtualdisplay a wrapper for Xvfb then you can run Selenium in a headless virtual display . Corey Goldberg shows a nice example http : coreygoldberg.blogspot.com 2011 06 python-headless-selenium-webdriver.html of how to do this . Comment : That will work perfectly thank you Comment : i cant get it to work : .. . Answer : I would suggest try using headless PhantomJs GhostDriver which is a relatively new thing . As this is the native Selenium Webdriver way of doing it . Download PhantomJs executables from http : phantomjs.org download.html . Comment : Im getting a long error message here is the end of it : raise WebDriverException Unable to start phantomjs with ghostdriver . e WebDriverException : Message : Unable to start phantomjs with ghostdriver . Screenshot : available via screen Comment : @ChristianCareaga Can you please say how you figured out how to deal with that error That s what s coming up for me now . Thanks . Comment : i had to write the full directory to phantomjs i think but im not sure i wrote this awhile back and ended up doing something else Comment : I m also getting Unable to start phantomjs with ghostdriver . The dev mentioned in a comment hasn t updated the python-2.7 selenium bindings . They re broken or something . Comment : I was getting the same error but manually implementing the fix found here https : code.google.com p selenium source detail r 977c310569539f00c4090db244276e224d9884b3 did the trick . It will be included in 2.40 when that comes out .", "Question : I have the following problem .. . .. . I successfully launched Selenium Grid hub with : .. . .. . java -jar selenium-server-standalone-2.53.0.jar -role hub .. . .. . After that I tried to launch PhantomJS node with : .. . .. . phantomjs --webdriver 8090 --webdriver-selenium-grid-hub http : localhost : 4444 .. . .. . .. . .. . but got Error : .. . .. . INFO - 2016-03-25T13 : 56 : 28.397Z GhostDriver - Main - running on port 8090 INFO - 2016-03-25T13 : 56 : 28.397Z GhostDriver - Main - registering to Selenium HUB http : localhost : 4444 version : using 127.0.0.1 : 8090 with org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy . ERROR - 2016-03-25T13 : 56 : 28.400Z GhostDriver - main.fail - line : 97 sourceURL : phantomjs : platform hub register.js stack : register@phantomjs : platform hub register.js : 97 : 79 nglobal code@phantomjs : code main.js : 78 : 37 .. . .. . phantomjs : platform console++.js : 263 in error .. . .. . Standard node works ok but PhantomJS failes . What I m doing wrong .. . Answer : workaround d l source from phantomjs http : phantomjs.org build.html and edit hub register.js in the src ghostdriver comment out lines as shown below : .. . .. . var ghostdriver ghostdriver .. . .. . compile and everything works shortcut : https : github.com darwin10 phantomjs .. . .. . Original Source : https : github.com detro ghostdriver issues 394 Comment : Thank you very much Downloaded .zip from here : github.com darwin10 phantomjs https : github.com darwin10 phantomjs Launched build.sh Launched PhantomJS node Everything works fine for me One thing - I don t know if it is stable enough phantom version is 2.0.1-development but it s quite another question .", "Question : I am running a selenium-webdriver script headless using Phantomjs Driver . I am having issues uploading a file though since on a normal browser firefox or chrome it would pop-up the OS dialog box that would allow me to locate the file in my machine and upload it . How to do that with the ghostDriver Phantomjs Driver Thanks .. . Answer : I am having the same issue and have posted a question for the same . PhantomJS hangs up when using sendKeys method . They have an issue logged here - https : github.com ariya phantomjs issues 10993 .. . .. . One of the comments on the issue stated that the below statement worked - .. . .. . You may try the above solution but it may or may not work .", "Question : I am running a selenium-webdriver script headless using Phantomjs Driver . I am having issues uploading a file though since on a normal browser firefox or chrome it would pop-up the OS dialog box that would allow me to locate the file in my machine and upload it . How to do that with the ghostDriver Phantomjs Driver Thanks .. . Answer : Always identify interact with elements of type file when uploads are concerned . This would solve your issue of pop ups . Ex : In my application upload related elements have the below DOM - .. . .. . In this case you can use sendKeys method to multiFileInput which is of type file . This way it would work for all FF Chrome also headless browsers . Comment : Thank you very much for your response . However my application is written in extjs nested spans and divs . And there is no text area next to the upload button . Would appreciate other suggestions" ] }
[ "yes-answer-long", "yes-answer-short" ]
phantomjs
UNK_RELATION
red5@server@38
red5 -- red5 is an open-source media @placeholder written in java as an alternative to adobe s proprietary flash-media-server fms .
{ "confidence": [ 59.79020309448242, 58.887359619140625, 58.22433090209961, 51.19662094116211, 50.65327835083008, 50.498626708984375, 50.187721252441406, 49.52363204956055, 49.514495849609375, 48.9785270690918, 47.74696731567383, 47.681640625, 47.35954666137695, 47.35041046142578, 47.195953369140625, 47.02320861816406, 46.67561340332031, 46.48808288574219, 46.015506744384766, 45.97772216796875, 45.927879333496094, 45.40084457397461, 45.32940673828125, 44.559024810791016, 44.40708923339844, 44.14305877685547, 44.08849334716797, 44.03191375732422, 43.9602165222168, 43.925872802734375, 43.67961120605469, 43.654640197753906, 43.44803237915039, 43.398189544677734, 43.359474182128906, 42.893768310546875, 42.716678619384766, 42.68592834472656, 42.677276611328125, 42.655517578125, 42.568824768066406, 42.568824768066406, 41.813819885253906, 41.72487258911133, 41.684906005859375, 41.61336898803711, 41.5599250793457, 41.5599250793457, 41.4766845703125, 41.315673828125, 41.094478607177734, 41.088932037353516, 40.93169403076172, 40.69266128540039, 40.532806396484375, 40.47687911987305, 40.4041748046875, 40.392547607421875, 40.26177215576172, 40.165592193603516, 40.103912353515625, 40.05870056152344, 40.0330810546875, 40.0330810546875, 40.0330810546875, 39.91279220581055, 39.70265197753906, 39.64194869995117, 39.55809020996094, 39.251956939697266, 39.22249221801758, 39.19361114501953, 39.16551971435547, 39.130985260009766, 39.12308883666992, 39.02417755126953, 39.02417755126953, 39.02417755126953, 39.02417755126953, 39.02417755126953, 38.96876525878906, 38.88299560546875, 38.88299560546875, 38.82099151611328, 38.82099151611328, 38.6380615234375, 38.62117004394531, 38.62117004394531, 38.62117004394531, 38.56254196166992, 38.556915283203125, 38.437965393066406, 38.435546875, 38.310523986816406, 38.119056701660156, 38.08435821533203, 38.04114532470703, 38.03730010986328, 37.93279266357422, 37.88730239868164 ], "content": [ "Help configure red5-recoder media server on localhost .", "Isn t Red5 an open-source Flash Server osflash.org red5 http : osflash.org red5", "We use red5 media server .", "I am using the RED5 Media Server in order to create a teleconferencing application .", "I have installed red5 server following this guide : http : tecadmin.net installing-red5-media-server-on-centos-6 .. . .. . I am able to access red5-server on port 5080 .", "First i think about flash and red5 media server but found that flash does not support IPAD or iphone .", "You need download and install Red5 Media Server http : www.red5.org", "See my comment from May 27th github.com Red5 red5-server issues 180 https : github.com Red5 red5-server issues 180", "Can anyone please tell me how to install RED5 media server version 1.0.5 on windows7 i have already tried installing using executable file from https : github.com Red5 red5-server releases but jre file isnot there.Also red5 isn t appearing in Administrative tools services to start the server .", "This code just adds the video to the stage it does not stream it to the Red5 media server .", "I just wonder why Red5 is called an Open Source Flash Server when it can support so many formats.. . My issue is to stream some media files to iPhone where flash is not supported .", "The details are in this issue report https : github.com Red5 red5-server issues 180", "I reported this issue here github.com Red5 red5-server issues 79 https : github.com Red5 red5-server issues 79", "Following links were useful while setting it up - .. . .. . http : www.yourhowto.net install-red5-media-server-ubuntu-debian .. . .. . https : www.digitalocean.com community tutorials how-to-setup-red5-on-ubuntu-12-10 .. . .. . After the installation you can start red5-server by the command sudo service red5-server start .", "Then restart the red5-server using the command sudo service red5-server restart .", "Downgraded to Java 6 and Red5 0.9.1 .", "The issue was with Java incompatibility with Red5 1.0.5 .", "There is some up-to-date info on the main wiki start there if you use linux try this github.com Red5 red5-server wiki Installation-on-Linux https : github.com Red5 red5-server wiki Installation-on-Linux", "@Trilarion is not red5 server specific software", "Red5 server running proper .", "I ran . red5-debug.sh after shutting down the server with . red5-shutdown.sh .", "Trying to recover : Setting up red5-server 1.0 svn4374-3 .. . Starting Flash streaming server red5-server fail invoke-rc.d : initscript red5-server action start failed .", "are you using latest red5 for eclipse-plugin and able to start the server in red5 without getting Bean stack errors with red5 0.9.1 version", "I d like to use the Red5 Server project https : github.com Red5 red5-server as it is available via Maven and the Apache 2.0 license fits my needs .", "It s a Windows server so red5 is in c : program files x86 red5 .", "I downloaded red5-1.0.1 and red5-1.0.3 .", "Uninstall your previous Java and Red5 install .", "I just can not seem to find why connecting to a media server fails silently in the red5-recorder project .", "E : dev red5 java-server trunk ant ivyclear dist .. . .. . Red5 user mailing list may help you because this is not exactly problem with Red5 source .", "Red5 is supposed to be pretty equivalent to Flash Media Server.. . but I will say that you will be hard pressed to find a free solution that is suitable for production high-scale environment .", "Prices for Flash Media Server you will get on the adobe webpage .", "The best Red5 version for recording is a patched 1.0.2 version available in this blog post : Recording high quality HD video over slow connections with Red5 is now possible http : nusofthq.com blog recording-high-quality-hd-video-over-slow-connections-with-red5-is-now-possible .. . .. . The patch has also been applied to Red5 s source code on GitHub https : github.com Red5 red5-server commit 7e4253f577a88d50613900986a46e5a915859123 and it will be available in the next official build as well 1.0.3 .", "Red5 was already installed on the server .", "I m using the Red5 http : osflash.org red5 server for the video and audio-streaming .", "I have installed Red5 server in my mac and then take the oflaDemo war file and put it in webapps in Red5 folder and restarted .", "Red5 source file download is complete the programming is successful but the copy F : javaweb red5-server target red5-server-1.0.8-theSNAPSHOT.jar To red5 server directory replacing red5-server.Jar error error information is as follows : .. . .. . .. . .. . red5 F : javaweb red5-server target red5-server-1.0.8-SNAPSHOT.jar red5-server red5-server.jar .. . .. . enter image description here http : i.stack.imgur.com 4xRYD.png", "Here s the exact AS3 code for publishing video from Flash to a media server like Red5 Wowza or AMS : .. . .. . For just audio comment the ns.attachAudio line .", "Broadcast publish - http : red5.googlecode.com svn flash trunk simpleBroadcaster.fla .. . Playback - http : red5.googlecode.com svn flash trunk simpleSubscriber.fla .. . Flash examples : http : red5.googlecode.com svn flash trunk", "Is your red5 instance running", "RED5", "My red5 server is at 192.168.1.41 : 5080 .", "requests to the local red5 server on e.g .", "It doesn t clearly mention that if it can be used to stream live video through a media server like Red5 .", "dpkg : error processing package red5-server --configure : subprocess installed post-installation script returned error exit status 1 dpkg : dependency problems prevent configuration of kaltura-red5 : kaltura-red5 depends on red5-server however : Package red5-server is not configured yet .", "Try this now : .. . .. . Extract the red5-server-1.0.2-RC4.zip from the target folder to a custom folder I have it in c : red5-server-1.0.2-RC4 .. . .. . Copy red5.jar and bootstrap.jar in the place you extracted red5 .", "corporate ones and use Red5 for that : http : red5.org", "and I am using Red5 server .", "I am using red5 server .", "Download and install a fresh version of Red5 from the Red5 1.0 download page http : red5.org downloads red5 1 0 .. . 2 .", "I am developing an application with the red5 server .", "It seems this is a bug with the current version of Red5 .", "So use this link http : red5.5842.n7.nabble.com Proxy-related-issue-org-red5-server-service-Installer-Unable-to-connect-to-http-red5-googlecode-com--td4903.html to set proxy for Red5 in Red5.bat or red5.sh based on os", "Red5 efficiently works with Java 1.6 version for 64-bit machine .", "When I open localhost : 5080 the red5 page opens and the red5.flv plays for a second and then stops without playing fully .", "I need some alternative to red5 that allows an Mjpeg stream .", "I have problem of playing back the recorded media file from red5 published stream following is my code .", "Suppose you installed Red5 on yourmachine at path to red5 .", "I m working on an app that captures a webcam stream and records it via a Red5 server .", "I have a set of complete examples using SO s which I just wrote in the past couple of days : github.com Red5 red5-websocket-chat-as3 https : github.com Red5 red5-websocket-chat-as3 github.com Red5 red5-websocket-chat https : github.com Red5 red5-websocket-chat", "Executed red5.sh in the terminal .", "Uncomment the RTMPS section of the red5 dir conf red5-core.xml file .", "First of all java is installed : .. . .. . ANT is installed : .. . .. . Red5 server has been installed without probblems and it stats : .. . .. . But apparently it is not working : .. . .. . and as a confirm : .. . .. . in my red5 logs I don t see any error error file is empty", "I have a jnlp in my system in a red5 server .", "I am planning to use Red5 streaming server .", "It was required from red5 server working@MAGNUS java6", "I am working on code snippet where I want to create an RED5 rtmp stream using RED5 server application .", "Configuration : Red5 1.0.6 on Linux Server on AWS with Java JDK 1.8.0 91 .. . .. . Problem description : To test the configuration of our Red5 Server we tried to use the demos .", "im using trunk version of red5 and flex 4.0 with flash-builder .", "This is a side effect of the googlecode shutdown the fix is described here : https : github.com Red5 red5-server issues 180 .. . .. . Change your webapps installer WEB-INF red5-web.properties file .", "Anybody know how to install Red5 IDE Plugin for Adobe Flash Builder 4", "I have Red5 server i have install java-7-openjdk .", "Use the code for showing the video on the screen and simultaneously publishing it to red5 server .. . .. . Then embed the same flash to the web page div.You can see your web cam and also your stream is been published to the Red5 server .", "While starting red5 I receive following Exception : .. . .. . red5-web.xml : .. . .. . The Red5 is an fresh installation from https : github.com Red5 red5-server releases tag v1.0.6-RELEASE i choosed the red5-server-1.0.6-RELEASE-server.tar.gz and installed it into opt red5 server1.0.6 of my Ubuntu 15.10 . default JDK is oracle 8 .. . .. . I hope anybody can tell me what I heave not done yet .", "I have installed Red5 server 0.9.1 on the Linux server but I am having some problems to install any app on my Red5 server using the installer .", "Finally I created a stream video recorder flash application and its simple Red5 backend but of course Red5 jokes me again .", "I use flashdevelop for as3 and eclipse for the red5 server .", "Additional information : we are using Red5 on server-side .", "I am beginner of streaming and Red5 server .", "I installed red5 server is used for playback video .", "It mean we are able to desploy red5 in separately server .", "I did not use red5 eclipse-plugin .", "I am new to Red5 .", "Integration of red5 is actually simple .", "i am using red5 and flex .", "For that matter...ANY current documentation on Red5", "I am following Red5 Media Server - Workspace Setup Guide - r4737 https : docs.google.com document d 11ju06wbnEdC3ay0VuUxpKcXIoSx5NaHruNKuZQ4yOCk edit pli 1", "Install RED5 1.05 windows and install .. . 4 .", "Go to RED5 directory and run install service .. . 5 .", "I am running Red5 1.0.7 on Windows 8 .", "for red5 this is the page listing alternatives : alternativeto.net software red5 http : alternativeto.net software red5", "Please take a look at the red5 google site http : code.google.com p red5 from there you can learn that Red5 .. . .. . is able to stream not only over RTMP but also RTMPT RTMPS and RTMPE protocols and .. . can stream not only FLV but also F4V MP4 3GP MP3 F4A M4A and AAC media formats .", "Output of the red5.bat file : .. . .. . I was finally able to get Red5 started by changing the red5.bat file and messing with the quotes around some of the parameters .", "The second solution is described for example here sziebert.net posts server-side-stream-recording-with-red5 http : sziebert.net posts server-side-stream-recording-with-red5", "Leave the red5 dir conf red5.properties unchanged the RTMPS port is set to the default 8443 and the server SSL keystore is left as the one packaged with Red5 .. . .. . I then proceed to start up the Red5 server with the JVM argument -Djavax.net.debug ssl so that SSL debug-information will be displayed in the console .", "Hello I am having problem with red5 server starting .", "When trying tu run an rtmp stream encoded through flash media encoder the log in the publisher demo of RED5 gives the following messages and the video does not work .", "i do not looking for streaming video and so i do not need red5 or flash server .", "Based on Paul Gregoire s blog post http : gregoire.org 2009 11 12 native-rtmps-in-red5 about Red5 and RTMPS these are the steps that I took to set up a new Red5 RTMPS server : .. . .. . 1 .", "I would like to use the RED5 Flash development to upload video to a backend developed in Node.js or PHP .", "I am trying to make work Red5 media server with red5-hls-plugin to support HLS streaming but I am facing following problem : .. . .. . When I try to push remote rtmp stream to red5 using ffmpeg : .. . .. . the hlsapp starts to report following warning : .. . .. . I updated the hls-plugin to display slightly more information : .. . .. . I have tried to use different versions of Red5 and Xuggle with the same result ." ] }
{ "confidence": [ 79.67865753173828, 77.91234588623047, 69.18062591552734, 67.41844177246094, 66.74984741210938, 66.74896240234375, 66.69023132324219, 66.25247192382812, 65.56383514404297, 65.54088592529297, 65.47042846679688, 64.00861358642578, 63.584293365478516, 62.48698806762695, 62.19981384277344, 60.854801177978516, 60.83173370361328, 60.722015380859375, 60.43742370605469, 60.3787727355957 ], "content": [ "Question : null .. . Answer : I have installed Red5 server in my mac and then take the oflaDemo war file and put it in webapps in Red5 folder and restarted . now I opened up Adobe Flash Media Encoder in another system and then put rtmp : myip oflaDemo in FMS url and then I click on start however its showing the below error which I have taken a screenshot . Please help me out enter image description here http : i.stack.imgur.com JsswZ.png Comment : Questions about general software are kind of offtopic here . Better try at superuser.stackexchange Comment : @Trilarion is not red5 server specific software I am trying to configure it so that I could stream from my laptop using RTMP Comment : And what has it to do with programming Comment : Check your server logs and ensure that oflaDemo is loaded then check for connection attempts by FMLE . Comment : Thanx for the support @PaulGregoire..I already resolved the issue . The issue was with Java incompatibility with Red5 1.0.5 . I downgraded the version and now I am good .", "Question : I am planning to use Red5 streaming server . The documentation says it uses only RTMP - I am confused if I can stream media in formats other than flash . Is it possible to stream MP4 RM AVI files through RTMP - or rather Red5 Thanks .. . Answer : Please take a look at the red5 google site http : code.google.com p red5 from there you can learn that Red5 .. . .. . is able to stream not only over RTMP but also RTMPT RTMPS and RTMPE protocols and .. . can stream not only FLV but also F4V MP4 3GP MP3 F4A M4A and AAC media formats . For RM and AVI you must use a converter to create the appropriate streamable formats . The best way in my opinion to do so is using ffmpeg http : www.ffmpeg.org . If you need to convert media on the fly you can use ffmpeg from your java classes . It s easy and offers a large list of parameters guaranteeing that you ll get what you need . Comment : Thanks rekaszeru I am planning to use Xuggler for transcoding . I just wonder why Red5 is called an Open Source Flash Server when it can support so many formats.. . My issue is to stream some media files to iPhone where flash is not supported . I still wonder if Red5 is of some help", "Question : Help configure red5-recoder media server on localhost . I had installed red5 media server windows-installer https : builds.apache.org view M-R view OpenMeetings job red5-installer on windows-10 with jdk jdk installer http : download.oracle.com otn-pub java jdk 8u91-b15 jdk-8u91-windows-x64.exe AuthParam 1465916758 8dd6e19943ae151cfa852e4860af18e0 .Everything done with no error . After installation I had run install-service.bat from the installation folder . I also started the server manually from Control Panel All Control Panel Items Administrative Tools Services . localhost : 5080 is running but when I try to access http : localhost : 5080 installer the flash throws error .. . .. . Any help would appreciated . Thanks . .. . Answer : That issue should be resolved by updating the war location where the application wars are stored externally . The details are in this issue report https : github.com Red5 red5-server issues 180", "Question : The question can sound a little bit stupid but I can t figure it out I have a fla file http : red5.googlecode.com svn flash trunk simpleBroadcaster.fla and I follow a tutorial to edit this file http : blog.endpoint.com 2012 04 streaming-live-with-red5-media-server.html and I can t begin to step 2 because I can t find the file or folders . Please help . I downloaded the trials of both Flash builder and Flash Professional CS6 but still couldn t find it . This http : stackoverflow.com questions 1415477 include-as-file-inside-fla solution gives something empty . So I taught there should be some swc file this post http : stackoverflow.com questions 14272484 how-to-find-as-code-in-fla-file but I couldn t find it . edit : I found the as file it s not in the fla file but in a separate directory . I had to download the whole trunk . I found the file and can open and edit it in a texteditor . But I d like to get it in Flashbuilder to compile at the end . .. . Answer : RED5 You need download and install Red5 Media Server http : www.red5.org Comment : Ofcourse I installed red5 first . Red5 was working very well . My question wasn t about that . However I solved my issue using JWplayer instead of changing the demo . Now I can go fullscreen too : -", "Question : I want to record voice online and I guess I need to use FMS or Red5 and I don t know how to use Red5 with Asp.net actually this is my first attempt to handle such a thing and currently I am a .net developer . So someone please show me a way to handle it and show me how to use Red5 with Asp.net . Thanks in advance . Comment : Isn t Red5 an open-source Flash Server osflash.org red5 http : osflash.org red5 If so what role are you hoping the ASP.NET framework to help with Comment : I used Red 5 and worked with our asp.net guy to build a chant creator : And yeah it was completely free . .. . Answer : This is the nice page which has very good infromation abou red ands ASP http : www.aspnetajaxchat.com Deployment Guide.pdf .. . .. . http : www.freelancer-job.com blog 2008 08 13 flash-aspnet-coder-to-integrate-red5-based-audiovideo-chat-module-to-aspnet-website-by-zukinet .. . .. . Some more information avilable in http : stackoverflow.com questions 571978 are-there-any-asp-net-with-voice-recording-sample-codes", "Question : I want to record voice online and I guess I need to use FMS or Red5 and I don t know how to use Red5 with Asp.net actually this is my first attempt to handle such a thing and currently I am a .net developer . So someone please show me a way to handle it and show me how to use Red5 with Asp.net . Thanks in advance . Comment : Isn t Red5 an open-source Flash Server osflash.org red5 http : osflash.org red5 If so what role are you hoping the ASP.NET framework to help with Comment : I used Red 5 and worked with our asp.net guy to build a chant creator : And yeah it was completely free . .. . Answer : I have successfully written an asp.net application to stream multiple users P2P video using Red5 . Integration of red5 is actually simple . Once you ve got it working on your Server VM all you have to do is install the olfa Demo and you can write a player streamer in flash . You just have to set the netconnections . One for the incoming stream and another for the outgoing stream . Then you d have to add a mic camera capture to attach them to the outgoing stream . If you want to make your player Streamer more robust you can use a combination of Javascript and a webservice AJAX to control what streams to where . You weren t very detailed on what you wanted to do otherwise I could have probably assisted you further . For example code go to http : code.google.com p red5 source browse svn 2Fflash 2Ftrunk 253Fstate 253Dclosed", "Question : null .. . Answer : Since a couple of days I m trying to get the red5 authdemo to work in Eclipse Juno . see : http : blog.infrared5.com 2012 05 red5-authentication .. . demo-project source : http : dl.dropbox.com u 7316897 ir5 blog red5-auth.zip .. . .. . The red5 Server seems to work fine : .. . .. . But I ve got the following error exception when I try to connect rtmp : localhost authdemo via Flash Media Live Encoder 2.3 : .. . .. . .. . .. . lots of similar error-messages .. . .. . .. . .. . .. . .. . Has anyone encountered this problem before Any ideas that might solve my problem Thanks in advance", "Question : Me and my friend are going to make live shows and for that purpose I have set up a Red5 server on my old 2006 Intel Core Duo Mac mini running Mac OS X Snow Leopard Server 10.6.8 . I use Flash Media Live Encoder to broadcast to Red5 s oflaDemo application and the stream works great except for the fact that I want the stream to work with iOS . I am developing an app for it but I still need to convert my stream to Apple s HTTP Live Streaming protocol for it to work . Can anybody help me convert the RTMP stream to MPEG2-TS because that s the format that mediastreamsegmenter supports I already have Apple s HTTP Live Streaming Tools installed on the server so the segmenter s not a problem . FFmpeg doesn t work at least not with the code I found here http : www.ioncannon.net programming 452 iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter comment-page-3 . With it a always get an Operation not permitted error . Xuggler doesn t work not even with a Linux box . Can anybody please help me I d really really appreciate it . -Reynir Aron .. . Answer : If you d like to continue using Red5 for your streaming you could try my HLS plugin the source may be found here : https : github.com Red5 red5-hls-plugin", "Question : Can anyone please tell me how to install RED5 media server version 1.0.5 on windows7 i have already tried installing using executable file from https : github.com Red5 red5-server releases but jre file isnot there.Also red5 isn t appearing in Administrative tools services to start the server . .. . Answer : Make it in following steps : .. . .. . 1 . Uninstall your previous Java and Red5 install . Reboot . 2 . Download JDK 8u45 64 bit and install .. . .. . 3 . Install RED5 1.05 windows and install .. . 4 . Go to RED5 directory and run install service .. . 5 . Reboot .. . 6 . Go to services and make sure RED5 service is installed and start service . 7 . Set service to start in Automatic", "Question : I have a fairly high-end webcam snc-rz25n that I need to rebroadcast using the Flash Media Server . I can get the picture as MPEG-4 not h.264 . So I need to transcode to h.264 and publish at multiple bitrates to FMS . The only solution I have been able to come up with thus far is to transcode the stream using ffmpeg and then also use ffmpeg to downconvert the stream for the multiple bitrates and then publish all of these transcoded streams to FMS via custom Java code using Red5 . Surely there is a better way . Flash Live Media Encoder is not going to work . The camera is on the network not direct connected and I need a linux solution . Comment : H.264 is a part of the MPEG-4 standard H.264 AVC MPEG-4 Part 10 . What are you getting the picture as-if not H.264 en.wikipedia.org wiki H264 http : en.wikipedia.org wiki H264 Comment : Yes H.264 is part of the MPEG-4 standard but not all MPEG-4 is H.264 . I believe the input format is MPEG-4 part 2 . en.wikipedia.org wiki MPEG-4 http : en.wikipedia.org wiki MPEG-4 Comment : Surely there is a better way . What you have done looks sane to me . What exactly don t you like about it Comment : Hi Jonathan would you share code snippet of custom java code becoz I am also looking similar solution . I want stop using FlashMediEncoder instead use xuggler ffmpeg with Red5 java-api . Comment : old.nabble.com http : old.nabble.com RTMP-java-Client-for-video-publishing-td20939125.html .. . Answer : I believe you have found the best solution until FMS supports live transcoding . I know that Wowza FMS competitor is planning on a feature similar to this for Q4 20111 .", "Question : Quick Intro : We have a flash tetris game finished and we are looking to add multiplayer functionality to the game . After a few days of research on the capabilities of flash and sockets I ve gotten even more confused . A quick disclaimer I am new to sockets networking in general . From what I gathered online general flash tcp sockets cannot handle peer to peer connections due to the policy system in-place . In order for flash to do p2p one must use a RTMFP-capable server such as flash-media-server etc to deal with the initial handshakes and from there flash is able to pass data in a p2p fashion . Edit : See the first answer for a comprehensive update on the question . Comment : smartfoxserver.com http : smartfoxserver.com .. . Answer : 1 For socket policy take my Perl-script or the Apache module both work well : http : code.google.com p mod-socket-policy - it will serve clients connecting to the port 843 . But this is not enough because of corporate users behind firewalls proxies - who can t connect to port 843 so you need to add socket policy handling to your own server code too i.e . respond to incoming policy-file-request 0 requests . 2 For RTMFP - don t do it because : .. . .. . a Cirrus is not an option because it is beta and not for commercial use . Also it seems to be outdated by the FMS4 so how long before it s discontinued b Flash Media Server 4 option is very expensive . For the enterprise version required for RTMFP Adobe doesn t even list the price publicly . Your only option is FMS4 for AWS but it is expensive too : adobe media server 4 cost with amazon http : stackoverflow.com questions 5555924 adobe-media-server-4-cost-with-amazon 5816223 5816223 .. . .. . c There is an OSS project for RTMFP but it isn t ready yet : OpenRTMFP Cumulus .. . .. . d For some users RTMFP just doesn t work .. . .. . So my suggestion is to go with RTMP RTMPT which works for all users incl . corporate ones and use Red5 for that : http : red5.org Comment : Thanks for your answer . As I suspected Cirrus and Adobe s solutions were not ones that we d like to follow at this point RTMFP . Your perl script seems useful but we ve implemented basically the same thing using Node and it works however I have some other weird questions to ask on that one . Anyway RTMP RTMPT using something like red5 basically limits us to a client-server architecture correct Either we use a fat server with light clients.. . or use the server as a intermediary as communication between clients only Comment : I run a multiplayer game with 5000 active users myself and use Red5 for audio video chats only while having my own code non-forkable server poll -ing sockets handling the game . You could do the same : use RTMP T for gimmicks and handle the game by node.js or whatever you re comfortable with . Comment : Ya I think my planned implementation is to have a semi fat node.js server that handles game logic on an instance-by-instance manner and either use another node.js process to handle user groups chat or red5 . We don t plan on any elaborate communications beyond text chat in our game . Do you mind linking me to your multiplayer game Would love to see it . Comment : apps.facebook.com video-preferans http : apps.facebook.com video-preferans - it is a Russian card game 400-500 simultaneous users in european evening time . Do you have a link for your game already", "Question : Quick Intro : We have a flash tetris game finished and we are looking to add multiplayer functionality to the game . After a few days of research on the capabilities of flash and sockets I ve gotten even more confused . A quick disclaimer I am new to sockets networking in general . From what I gathered online general flash tcp sockets cannot handle peer to peer connections due to the policy system in-place . In order for flash to do p2p one must use a RTMFP-capable server such as flash-media-server etc to deal with the initial handshakes and from there flash is able to pass data in a p2p fashion . Edit : See the first answer for a comprehensive update on the question . Comment : smartfoxserver.com http : smartfoxserver.com .. . Answer : Red5 has no support for RTMFP . Prices for Flash Media Server you will get on the adobe webpage .", "Question : I m attempting to build a video chat application . I want to use rtmfp host with Adobe Media Server 5 Professional however its very expensive to purchase so I m in the process of looking for other options . I was considering using Cirrus which is free open-source but it has limited amount of connections and has other severe limitations that it wouldn t be feasible for me to opt for . Red 5 is another free open-source rtmfp server but I have no knowledge of Java which is a big put off . The only other alternative is using Adobe Amazon web-services . But I have no idea of the costs . I was wondering if anybody has used it what your experience was and the costs of running it By the way if you can think of any other servers I could I appreciate if you could tell me . Thanks in Advance .. . Answer : Red5 can anything but RTMFP the p2p stuff . Cirrus is deprecated by Adobe . If you need RTMFP you could use Influxis http : influxis.com streaming pricing service . Comment : Thanks for your suggestion Alexander I appreciate it . I do require RTMFP . Influxis I look into it .", "Question : I m attempting to build a video chat application . I want to use rtmfp host with Adobe Media Server 5 Professional however its very expensive to purchase so I m in the process of looking for other options . I was considering using Cirrus which is free open-source but it has limited amount of connections and has other severe limitations that it wouldn t be feasible for me to opt for . Red 5 is another free open-source rtmfp server but I have no knowledge of Java which is a big put off . The only other alternative is using Adobe Amazon web-services . But I have no idea of the costs . I was wondering if anybody has used it what your experience was and the costs of running it By the way if you can think of any other servers I could I appreciate if you could tell me . Thanks in Advance .. . Answer : I m currently evaluating and reading the rtmp-nginx-module https : github.com arut nginx-rtmp-module . It looks more stable and very well documented than the other peers I ve tried : .. . .. . RTMPLite : Works well with VideoIO.swf however it s not easily extensible . Red5 : Good luck getting it working correctly Copied from this question http : stackoverflow.com a 20596437 161278 .", "Question : Netstream.step method AS3 http : help.adobe.com en US FlashPlatform beta reference actionscript-3 flash net NetStream.html step 28 29 .. . .. . This supposedly gives use the ability of frame level control of the video when using a flash-media-server . Question : Can we implement something like this using the red5 server . Does it support the method Question : Does red5 have pseudo streaming capability i.e seek to beyond buffered video This directly from the method description on the adobe docs .. . .. . Steps forward or back the specified number of frames relative to the currently displayed frame . Specify a positive number to step forward and a negative-number to step in reverse . Call this method to create accurate fast-forward or rewind functionality . .. . This method is available only when data is streaming from Flash Media Server 3.5.3 or higher and when NetStream.inBufferSeek is true . Also the target frame must be in the buffer . For example if the currently displayed frame is frame number 120 and you specify a value of 1000 the method fails if frame number 1120 is not in the buffer . .. . This method is intended to be used with the pause or togglePause methods . If you step 10 frames forward or backward during playback without pausing you may not notice the steps or they ll look like a glitch . Also when you call pause or togglePause the audio is suppressed . .. . If the call to NetStream.step is successful a NetStatusEvent is sent with NetStream.Step.Notify as the value of the info object s code property . .. . Answer : Its not in Red5 right now but I ll add an enhancement request on the issue tracker . For now you could implement a pause + seek scheme . Comment : Enhancement request : code.google.com p red5 issues detail id 113 http : code.google.com p red5 issues detail id 113", "Question : null .. . Answer : What I want to achieve is that a user in the flash client calls a handler method defined in the red5 app which creates a server-side stream and then plays it so that other users with flash client can view the broadcasted stream . Here is my actionscript client-side code triggered by a button click : .. . .. . Here is my server-side java code defined in a registered handler : .. . .. . Here is the actionscript to play the broadcasted stream : .. . .. . However in flash client the stream plays for only one second and then stopped . If I click the button to call the handler method again there is error in the java log . Here is my java log for the error : .. . .. . java.lang.reflect.InvocationTargetException : null at sun.reflect.NativeMethodAccessorImpl.invoke0 Native Method na : 1.8.0 25 at sun.reflect.NativeMethodAccessorImpl.invoke NativeMethodAccessorImpl.java : 62 na : 1.8.0 25 at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 na : 1.8.0 25 at java.lang.reflect.Method.invoke Method.java : 483 na : 1.8.0 25 at org.red5.server.service.ServiceInvoker.invoke ServiceInvoker.java : 193 red5-server-common-1.0.6-RELEASE.jar : na at org.red5.server.service.ServiceInvoker.invoke ServiceInvoker.java : 115 red5-server-common-1.0.6-RELEASE.jar : na at org.red5.server.net.rtmp.RTMPHandler.invokeCall RTMPHandler.java : 186 red5-server-common-1.0.6-RELEASE.jar : 1.0.6-RELEASE at org.red5.server.net.rtmp.RTMPHandler.onCommand RTMPHandler.java : 293 red5-server-common-1.0.6-RELEASE.jar : 1.0.6-RELEASE at org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived BaseRTMPHandler.java : 105 red5-server-common-1.0.6-RELEASE.jar : 1.0.6-RELEASE at org.red5.server.net.rtmp.ReceivedMessageTask.call ReceivedMessageTask.java : 63 red5-server-common-1.0.6-RELEASE.jar : 1.0.6-RELEASE at org.red5.server.net.rtmp.ReceivedMessageTask.call ReceivedMessageTask.java : 14 red5-server-common-1.0.6-RELEASE.jar : 1.0.6-RELEASE at java.util.concurrent.FutureTask.run FutureTask.java : 266 na : 1.8.0 25 at java.util.concurrent.Executors RunnableAdapter.call Executors.java : 511 na : 1.8.0 25 at java.util.concurrent.FutureTask.run FutureTask.java : 266 na : 1.8.0 25 at java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java : 1142 na : 1.8.0 25 at java.util.concurrent.ThreadPoolExecutor Worker.run ThreadPoolExecutor.java : 617 na : 1.8.0 25 at java.lang.Thread.run Thread.java : 745 na : 1.8.0 25 Caused by : java.lang.IllegalStateException : State STOPPED not valid to start at org.red5.server.stream.ServerStream.start ServerStream.java : 428 red5-server.jar : 1.0.6-RELEASE at com.eeplace.red5.core.RemoteControlHandler.playLiveStream RemoteControlHandler.java : 144 classes : na .. . 17 common frames omitted .. . .. . Did anyone encounter the same error before Thank you for any suggestion .", "Question : I m looking for a flash script library to capture video and audio from a webcam and then somehow get a saved flv to my encoding server . I m not looking for something that will host the videos for me . I just need something simple to capture and then upload . I really want this to be open-source and free . I ve done a fair amount of searching and it seems that most of what i can find is either a full blown service with hosting or the red 5 suite . I ve been trying for a day to get something going on with Red5 but honestly I haven t done any flash or java development in over 6 years and this seems way too complicated when all i really want is a flash object i can stick on a webpage . I ve search google and github and am really surprised by the lack of simple options . Am I missing something obvious Thanks . Comment : When looking for alternatives you can try alternativeto.net http : alternativeto.net e.g . for red5 this is the page listing alternatives : alternativeto.net software red5 http : alternativeto.net software red5 .. . Answer : I ended up going with Red 5 server and red5recorder . It was tricky to get everything working properly but here s an overview of what I did : .. . .. . 1 . Check out red5 version 0.9.1 I couldn t get the latest version working with red5recorder . ant prepare ant clean dist . 2 . Download the latest source for red5recorder . 3 . Install Eclipse Ganymede Sr2 3.4.2 Enterprise Edition the latest version that works with both the red5 plugin and the flash-builder plugin . 4 . Install the red5 plugin according to http : wiki.red5.org wiki Red5Plugin .. . 5 . Install the Adobe Flash Builder 4 plugin into eclipse-install-dir flash-builder and built it against the eclipse in eclipse-install-dir .. . 6 . Create a New Dynamic Web Project . I named it Red5Server . Select a New Target Runtime - Infared Red5 Server . Target the dist directory in the red5 checkout . so for me : .. . .. . auto deploy dir : Users julia code red5-0.9.1.svn dist webapps .. . start script : Users julia code red5-0.9.1.svn dist red5-debug.sh .. . stop script : Users julia code red5-0.9.1.svn dist red5-shutdown.sh .. . 7 . Import Flash Builder Project - red5recorder .. . .. . 8 . Right click Red5Server Run as. . Run on Server . It should start up the server and show Directory listing for localhost : 5080 Red5Server .. . 9 . In red5recorder s Recorder class change server to be rtmp : 127.0.0.1 Red5Server .. . 10 . Right click on red5recorder.mxml and run it as an application . It should pop-up a browser and the recorder should successfully connect to your webcam . Now red5recorder is really broken out of the box . It required quite a bit of tweaking to get it to do what it says it will and once I was more comfortable I ended up refactoring it altogether to do what I wanted . Comment : Most of this stuff has been moved to github - github.com Red5 https : github.com Red5", "Question : Okay so I might be asking a silly question . I have setup Red5 on Windows and I am able to stream to live mystream using OBS . I am then able to view the live stream using the Red5 publisher page . However it I try to open this in VLC or any other media-player that supports RTMP it is unable to connect and on the server I get connection not found . Thus I am assuming the url is rtmp : myip live mystream . Could someone give some assistance Thanks P .. . Answer : Port 1935 is the default port to access the red5 rtmp stream . So please check if port 1935 is open in your firewall and or modem . You can test the port by using : .. . .. . telnet myip 1935 .. . .. . If you get a blank screen the port is accessible . Otherwise you get a connection failed message or something similar .", "Question : I have project about Video on Demand via Android TV Box . I have problem I can not find open-source of RTMP player . Had someone can help me or guide me about the rtmp player source code I use red5 to stream and buil for android-2.2-froyo . Comment : How can my android application connect to android player and how android player connect to streaming server Thank you so much . @droidhot Comment : you can use a webview enabled with javascript and flashplayer support to play using RTMP Comment : Thank you very much . I will try it tonight . @droidhot Comment : @R Hear shall u share your source code with us. . .. . Answer : using RTSP .. . .. . for RTMP refer this Streaming RTMP stream live from Android Camera to FMS or Wowza or Red5 - Convert video Input Stream to RTMP http : stackoverflow.com questions 10123498 streaming-rtmp-stream-live-from-android-camera-to-fms-or-wowza-or-red5-convert Comment : thank you . but it can not play video . I use red5 to stream I can straem only on rtmp . Comment : The is about using rtmp not rtsp Comment : @SudiptaforAndroid...Is that code working now cause I am getting a Couldn t load plug in", "Question : I am following Red5 Media Server - Workspace Setup Guide - r4737 https : docs.google.com document d 11ju06wbnEdC3ay0VuUxpKcXIoSx5NaHruNKuZQ4yOCk edit pli 1 I am able to build Red5 distribution and rename distribution jar files i.e completed upto step 6.But when I followed step 7 - Run inside of eclipse failed to debug it as java application - .. . .. . I couldn t find conf directory neither in home yuvraj Documents RED5 red5 java code all java-server trunk nor in Red5 server bin while setting classpath in java debug . .. . Answer : From the output you ve shown I d assume you re missing the lib directory and its contents . This wiki link should help : https : code.google.com p red5 wiki ServerWontStart Bootstrap exception" ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
codeigniter-a3m@oauth@118
codeigniter-a3m -- a codeigniter account authentication authorization package to accelerate development using openid @placeholder .
{ "confidence": [ 64.22300720214844, 59.40654754638672, 52.86888122558594, 51.71942138671875, 47.18939971923828, 43.22087097167969, 41.96988296508789, 39.387184143066406, 39.26537322998047, 38.198219299316406, 37.47013854980469, 37.424034118652344, 36.96636962890625, 35.75205612182617, 35.32746124267578, 35.3044548034668, 34.674903869628906, 34.5594367980957, 33.763729095458984, 33.74842834472656, 32.10662841796875, 31.761613845825195, 31.566303253173828, 31.521106719970703, 31.442779541015625, 30.693201065063477, 30.23769760131836, 30.23769760131836, 30.17306900024414, 30.071895599365234, 29.792871475219727, 29.25703239440918, 28.632343292236328, 27.720260620117188, 26.2268009185791, 25.809139251708984, 25.548542022705078, 25.459728240966797, 25.180665969848633, 24.791282653808594, 24.45386505126953, 24.262643814086914, 24.040502548217773, 23.77046775817871, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.342021942138672, 23.20477294921875, 22.87063217163086, 20.6428165435791, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 20.257152557373047, 18.726057052612305, 18.210634231567383, 18.210634231567383, 18.210634231567383, 18.210634231567383, 18.210634231567383, 18.210634231567383, 18.210634231567383, 18.210634231567383, 17.158157348632812, 15.75782585144043, 15.75782585144043, 15.75782585144043, 15.75782585144043, 15.75782585144043 ], "content": [ "I m using A3M in my Codeigniter app .", "I m currently running A3M for CodeIgniter which can be found here : https : github.com donjakobo A3M For those who don t know A3M is an account authentication system which utilises Facebook OpenID Twitter and Google .", "Hi I am trying to use CodeIgniter A3M https : github.com donjakobo A3M .", "I m using the dev version 2.0 of A3M for CodeIgniter https : github.com donjakobo A3M tree ci3-beta to add secure authentication to my app .", "I have short and simple one : is there any RoR plugin gem similar to a3m https : code.google.com p a3m module for CodeIgniter", "This seems to be a problem with your CodeIgniter setup .", "I install A3M Codeigniter library and there is and error when i try to sign in or sign up it returns me to the same page without posting posting when sign up with facebook for example it back to page Confirm your account information and still return to this page when i click a submit button called Complete .", "https : github.com pattle codeigniter-twitter-library", "What s the best codeigniter authentication library out there that supports social-networking integration such as facebook twitter linkedin google+ etc", "check out the updated a3m on github github.com donjakobo A3M https : github.com donjakobo A3M", "What A3M doesn t support though is the new Google+ API found here : https : developers.google.com + quickstart php .. . .. . Does anyone know of an existing solution fork to A3M which supports the Google+ API or how I could go about adjusting the current Google Account Authentication to use the Google+ authentication instead", "http : articlecon.com phpdemo sbid account sign in .. . .. . Iam little bit confused in A3M login process .", "I ve started developing a Codeigniter library for making oAuth requests to Twitter .", "You can read in the user guide http : ellislab.com codeigniter user-guide general urls.html on how to do that .", "There is an open issue on A3M for this on GitHub : https : github.com donjakobo A3M issues 37 Follow that for any official update .", "i need email verification of the user in a3m library which is not availble in v1.01 i found in github it is available in v2.0 .", "All the links in A3M are already assumes that you have taken steps to remove the index.php from the path using .htaccess .", "Finally solved my problem in twitter for a3m .", "can anybody please tell me how to upgrade this version to newer or is there any link where i can directly download A3m V2.0 .. . .. . thanks", "In general you should have this in your .htaccess file in the root : .. . .. . Also check that you have all other settings set correctly according to A3M https : github.com donjakobo A3M wiki Installation-Instructions .", "I ve just pulled A3M into a site I m working on .", "Copy : .. . .. . app-config account .. . app helpers .. . app libraries .. . app models account .. . app controllers account .. . app views account .. . app views sign .php .. . if using the A3M Views app language ie language english account .. . and general lang.php .. . .. . .. . 3 .", "After going to the a3m controller on my site I received : Message : Undefined property : CI : : session .. . .. . So I assume it s because of htaccess looking for a3m files in an a3m folder here s the a3m htaccess : .. . .. . And my already existing htaccess for mod-rewrite is as follows : .. . .. . As the commenting shows I used it from a site a while back so how can I combine the two I guess is what I m trying to ask as I m quite enthused about using a3m .", "I assume you know what 404 means probably setup CodeIgniter .htaccess incorrectly. . look at logs make sure your rewrite is working and update your question very little detail provided .", "So it s OK if you point me to several gems for authentication authorisation and OpenID OAuth .", "in my new project i am using codeigniter 2.2.0 and A3M 1.01 authorization library i have checked on my localhost it is working fine but when i uploaded it on remote-server home page is loaded but sign in is not working it shows following error www.redzoon.com .. . .. . Internal Server Error .. . .. . The server encountered an internal error or misconfiguration and was unable to complete your request .", "Now I have decided to move into A3M as it also provides social integration .", "Are you looking for what files are needed to just plug a3m into an existing site", "Currently I m learning a3m which is ok but I m having some troubles integrating it to twitter because they have updated their API .", "get help from authentication library like ion-auth etc .", "third party .. . autoload language array general .. . also suggest adding these if you check login status across your site : .. . autoload libraries array account authentication account authorization .. . autoload helper array language url account ssl .. . autoload model array account account model .. . 6 .", "its quite easy actually just look at what the default codeigniter gives you and grab stuff from libraries helpers controllers views languages .", "I m not looking for a Swiss-army-knife solution and I ve found a lot gems that cover only specific aspect of a3m s functionality .", "I am now stuck as no helper file is available for A3M integration to an existing site .", "However on a development site it seems to double encode the url so it becomes : .. . .. . http : dev.mysite.local : 8090 account sign in continue http 253A 252F 252Fdev.mysite.local 253A8090 252Faccount 252Faccount profile .. . .. . Forward slash is encoded to 3A and then further to 253 .. . .. . Any suggestions", "I was kinda looking for multiple site authentication library .", "Copy files from app libraries app helpers app languages .. . .. . Study files in app controllers and app views to see how to use the A3M system .. . The controllers can stay as is you need to customize the views : sign in sign up sign out and account .. . 2 .", "I am currently using tank auth in my project for authentication .", "For authentication : .. . .. . authlogic https : github.com binarylogic authlogic .. . devise https : github.com plataformatec devise .. . clearance https : github.com thoughtbot clearance .. . sorcery https : github.com NoamB sorcery .. . omniauth https : github.com intridea omniauth .. . .. . For authorization : .. . .. . cancan https : github.com ryanb cancan .. . cantango https : github.com kristianmandrup cantango", "For example : .. . .. . http : demo.a3m.local : 8090 account sign in continue http 3A 2F 2Fdemo.a3m.local 3A8090 2Faccount 2Faccount settings .. . .. . On this demo install it works perfectly .", "I downloaded a3m it comes packaged with CI 1.7.2 but I went ahead and removed all of the files it needed to run and put them in my pre-existing installation .", "this error can be viewed at redzoon.com account login http : www.redzoon.com account login", "I am trying to view the manage users and manage permission etc but keeps on saying error 404 I am the admin I have just created an account for my self .", "I found some other authentication library but they lack documentation which I m having a hard time learning .", "Database data is right .. . I give a cache folder a 777 permissions .. . .htaccess and config url is right .. . I add the facebook and twitter appID and secretAppID .. . .. . What is the reason of this problem .", "Thanks .", "I think the .htaccess file must be like this : .. . .. . RewriteEngine on RewriteCond REQUEST FILENAME -f RewriteCond REQUEST FILENAME -d RewriteRule .", "index.php 0 PT L", "it s help me thank you", "One of the things it does is determine what items appear in the main navigation menu depending on the logged in user s permissions .", "This works fine but I m a little concerned about the number of database calls required to generate the menu -- especially as it happens on each-and-every page .", "Does anyone have any ideas about how to avoid this", "Some type of caching perhaps .", "Thanks", "Turned out to be pretty simple so I m posting the solution here in case anyone else finds it useful .", "Without going into massive detail unless somebody asks the best approach seems to be to create a database query to extract an array of all the current user s permissions .", "This is pretty simple by joining the a3m account a3m rel account role a3m rel role permission and a3m acl permission tables .", "Once you have the result flatten it by adding each key name to a single-dimensional array called for example permissions .", "You can then check permissions by doing an in array permission to check permissions .. . .. . This allows you to perform loads of permission checks with a single database call .", "This has dramatically sped up up my application .", "You could even add the permissions array to the session data at login so permission checks through out the session don t require a database call but obviously changes won t take place immediately .", "it has the only version 1 add email verification manually .", "I ve tried changing my redirect uri in the Google Developer Console to both account connect end and account connect Google with identical results .", "Configure app-config account for your setup .. . .. . 4 .", "Add the following to the end of app-config constants.php .. . .. . .. . -------------------------------------------------------------------------- .. . A3M Extras .. . -------------------------------------------------------------------------- .. . .. . .. . Define root resources folder name for js css img files .. . .. . define RES DIR resource .. . .. . Detect AJAX Request for MY Session .. . .. . define IS AJAX isset SERVER HTTP X REQUESTED WITH .. . strtolower SERVER HTTP X REQUESTED WITH xmlhttprequest .. . .. . Portable PHP password hashing framework .. . http : www.openwall.com phpass .. . .. . define PHPASS HASH STRENGTH 8 .. . define PHPASS HASH PORTABLE FALSE", "I have installed this two three days before so newbie for it .", "Twitter and facebook logins are workng fine .", "I think that when user clicks on facebook it takes user to facebook-login .", "After successful login it takes back to the original website .", "After that I don t see any user information in session from facebook .", "Facebook table in database is empty .", "Can soem one guide me what Iam doing wrong and how it can be rectified .", "Thanks in advance", "If you find that you do everything correctly but you are not logged in or no info is populate it could be that the data being sent back to your server is not being saved in the cache folder .", "Make sure to chmod your cache folder for your nonce s to 777 or chown it to your apache browser user for read-write permissions .", "I have seen in the past that instances don t function well break when they nonce cannot be saved after a successful handshake so everything else after it fails like db updates .", "Have you checked the logs", "I think you must code .htacess file like this", "Its working for me .. . .. . My code .htacess", "I ve been battling with redirects after users log in .", "The redirect is encoded into the URL .", "Typical - struggle for days and as soon as you ask the question one works it out .", "It was my .htaccess file rewriting the URL .", "Used the No-Escape flag to fix it : http : httpd.apache.org docs 2.2 rewrite flags.html flag ne", "The auth process which uses HybridAuth 2.2.0-dev https : github.com hybridauth hybridauth tree 2.2.0 seems to go well since the logs show : .. . .. . But it redirects me to a page at this URL : .. . .. . with this content : .. . .. . And does not complete login or account linking .", "Nice and easy.. . thanks", "I found tank while googling around but I haven t tried it yet .", "Any help would be much appreciated .", "I just have to supply my callback url with the correct path .", "something like this .", "The source code can be found here .", "Thanks for sharing anyway .", ":", "I recently tried using the PHP League library but failed -- see my other question : stackoverflow.com questions 24807921 http : stackoverflow.com questions 24807921 google-oauth-2-0-returns-400-bad-request-even-from-playground", "Thanks guys .", "It doesn t look like you ve loaded the session library .", "Check in system application config autoload.php if you have the library loaded : 42 autoload libraries array database session .. . .. . You can do this from the controller : this- load- library session .. . .. . http : codeigniter.com user guide libraries sessions.html", "Please let me know if anyone is aware of the steps to be followed .", "I m one of A3M s developers fyi" ] }
{ "confidence": [ 80.2172622680664, 74.12226104736328, 67.55007934570312, 64.39048767089844, 64.39048767089844, 61.383819580078125, 61.37062072753906, 60.86822509765625, 56.547245025634766, 56.09848403930664, 48.91131591796875, 47.92292785644531, 46.07453918457031, 37.436004638671875, 35.49939727783203, 29.232383728027344 ], "content": [ "Question : I m currently running A3M for CodeIgniter which can be found here : https : github.com donjakobo A3M For those who don t know A3M is an account authentication system which utilises Facebook OpenID Twitter and Google . What A3M doesn t support though is the new Google+ API found here : https : developers.google.com + quickstart php .. . .. . Does anyone know of an existing solution fork to A3M which supports the Google+ API or how I could go about adjusting the current Google Account Authentication to use the Google+ authentication instead .. . Answer : There is an open issue on A3M for this on GitHub : https : github.com donjakobo A3M issues 37 Follow that for any official update .", "Question : I have short and simple one : is there any RoR plugin gem similar to a3m https : code.google.com p a3m module for CodeIgniter I m not looking for a Swiss-army-knife solution and I ve found a lot gems that cover only specific aspect of a3m s functionality . So it s OK if you point me to several gems for authentication authorisation and OpenID OAuth . .. . Answer : For authentication : .. . .. . authlogic https : github.com binarylogic authlogic .. . devise https : github.com plataformatec devise .. . clearance https : github.com thoughtbot clearance .. . sorcery https : github.com NoamB sorcery .. . omniauth https : github.com intridea omniauth .. . .. . For authorization : .. . .. . cancan https : github.com ryanb cancan .. . cantango https : github.com kristianmandrup cantango Comment : Nice and easy.. . thanks", "Question : Hi I am trying to use CodeIgniter A3M https : github.com donjakobo A3M . I am trying to view the manage users and manage permission etc but keeps on saying error 404 I am the admin I have just created an account for my self . Comment : Have you checked the logs I assume you know what 404 means probably setup CodeIgniter .htaccess incorrectly. . look at logs make sure your rewrite is working and update your question very little detail provided . .. . Answer : This seems to be a problem with your CodeIgniter setup . All the links in A3M are already assumes that you have taken steps to remove the index.php from the path using .htaccess . You can read in the user guide http : ellislab.com codeigniter user-guide general urls.html on how to do that . In general you should have this in your .htaccess file in the root : .. . .. . Also check that you have all other settings set correctly according to A3M https : github.com donjakobo A3M wiki Installation-Instructions .", "Question : Hi I am trying to use CodeIgniter A3M https : github.com donjakobo A3M . I am trying to view the manage users and manage permission etc but keeps on saying error 404 I am the admin I have just created an account for my self . Comment : Have you checked the logs I assume you know what 404 means probably setup CodeIgniter .htaccess incorrectly. . look at logs make sure your rewrite is working and update your question very little detail provided . .. . Answer : I think you must code .htacess file like this", "Question : Hi I am trying to use CodeIgniter A3M https : github.com donjakobo A3M . I am trying to view the manage users and manage permission etc but keeps on saying error 404 I am the admin I have just created an account for my self . Comment : Have you checked the logs I assume you know what 404 means probably setup CodeIgniter .htaccess incorrectly. . look at logs make sure your rewrite is working and update your question very little detail provided . .. . Answer : Its working for me .. . .. . My code .htacess", "Question : What s the best codeigniter authentication library out there that supports social-networking integration such as facebook twitter linkedin google+ etc Currently I m learning a3m which is ok but I m having some troubles integrating it to twitter because they have updated their API . I found tank while googling around but I haven t tried it yet . I found some other authentication library but they lack documentation which I m having a hard time learning . Any help would be much appreciated . .. . Answer : Finally solved my problem in twitter for a3m . I just have to supply my callback url with the correct path . something like this . Comment : check out the updated a3m on github github.com donjakobo A3M https : github.com donjakobo A3M", "Question : I am currently using tank auth in my project for authentication . Now I have decided to move into A3M as it also provides social integration . I am now stuck as no helper file is available for A3M integration to an existing site . Please let me know if anyone is aware of the steps to be followed . Comment : Are you looking for what files are needed to just plug a3m into an existing site I m one of A3M s developers fyi Comment : yes actually . Any help would be great . Comment : its quite easy actually just look at what the default codeigniter gives you and grab stuff from libraries helpers controllers views languages . Only problem is pre-existing conflicts with what you currently have ie same file names .. . Answer : I ve just pulled A3M into a site I m working on . It was pretty straight forward as @Jakub says . For anyone else who hits this page here are the steps I went through : .. . .. . 1 . Copy files from app libraries app helpers app languages .. . .. . Study files in app controllers and app views to see how to use the A3M system .. . The controllers can stay as is you need to customize the views : sign in sign up sign out and account .. . 2 . Copy : .. . .. . app-config account .. . app helpers .. . app libraries .. . app models account .. . app controllers account .. . app views account .. . app views sign .php .. . if using the A3M Views app language ie language english account .. . and general lang.php .. . .. . .. . 3 . Configure app-config account for your setup .. . .. . 4 . Check the Session Variables in app-config config.php .. . 5 . Add autoloads to app-config autoload.php .. . .. . autoload packages array APPPATH . third party .. . autoload language array general .. . also suggest adding these if you check login status across your site : .. . autoload libraries array account authentication account authorization .. . autoload helper array language url account ssl .. . autoload model array account account model .. . 6 . Add the following to the end of app-config constants.php .. . .. . .. . -------------------------------------------------------------------------- .. . A3M Extras .. . -------------------------------------------------------------------------- .. . .. . .. . Define root resources folder name for js css img files .. . .. . define RES DIR resource .. . .. . Detect AJAX Request for MY Session .. . .. . define IS AJAX isset SERVER HTTP X REQUESTED WITH .. . strtolower SERVER HTTP X REQUESTED WITH xmlhttprequest .. . .. . Portable PHP password hashing framework .. . http : www.openwall.com phpass .. . .. . define PHPASS HASH STRENGTH 8 .. . define PHPASS HASH PORTABLE FALSE", "Question : What s the best codeigniter authentication library out there that supports social-networking integration such as facebook twitter linkedin google+ etc Currently I m learning a3m which is ok but I m having some troubles integrating it to twitter because they have updated their API . I found tank while googling around but I haven t tried it yet . I found some other authentication library but they lack documentation which I m having a hard time learning . Any help would be much appreciated . .. . Answer : I ve started developing a Codeigniter library for making oAuth requests to Twitter . The source code can be found here . https : github.com pattle codeigniter-twitter-library Comment : I was kinda looking for multiple site authentication library . Thanks for sharing anyway . :", "Question : I m using the dev version 2.0 of A3M for CodeIgniter https : github.com donjakobo A3M tree ci3-beta to add secure authentication to my app . The auth process which uses HybridAuth 2.2.0-dev https : github.com hybridauth hybridauth tree 2.2.0 seems to go well since the logs show : .. . .. . But it redirects me to a page at this URL : .. . .. . with this content : .. . .. . And does not complete login or account linking . I ve tried changing my redirect uri in the Google Developer Console to both account connect end and account connect Google with identical results . How can I get it to connect Comment : I recently tried using the PHP League library but failed -- see my other question : stackoverflow.com questions 24807921 http : stackoverflow.com questions 24807921 google-oauth-2-0-returns-400-bad-request-even-from-playground .. . Answer : OK although it looks like a configuration file problem or a bug this is actually a problem with the URL handling in the web server . I added this rule to NGINX :", "Question : I install A3M Codeigniter library and there is and error when i try to sign in or sign up it returns me to the same page without posting posting when sign up with facebook for example it back to page Confirm your account information and still return to this page when i click a submit button called Complete . Database data is right .. . I give a cache folder a 777 permissions .. . .htaccess and config url is right .. . I add the facebook and twitter appID and secretAppID .. . .. . What is the reason of this problem . Thanks . .. . Answer : I think the .htaccess file must be like this : .. . .. . RewriteEngine on RewriteCond REQUEST FILENAME -f RewriteCond REQUEST FILENAME -d RewriteRule . index.php 0 PT L Comment : it s help me thank you", "Question : I m using A3M in my Codeigniter app . One of the things it does is determine what items appear in the main navigation menu depending on the logged in user s permissions . This works fine but I m a little concerned about the number of database calls required to generate the menu -- especially as it happens on each-and-every page . Does anyone have any ideas about how to avoid this Some type of caching perhaps . Thanks .. . Answer : Turned out to be pretty simple so I m posting the solution here in case anyone else finds it useful . Without going into massive detail unless somebody asks the best approach seems to be to create a database query to extract an array of all the current user s permissions . This is pretty simple by joining the a3m account a3m rel account role a3m rel role permission and a3m acl permission tables . Once you have the result flatten it by adding each key name to a single-dimensional array called for example permissions . You can then check permissions by doing an in array permission to check permissions .. . .. . This allows you to perform loads of permission checks with a single database call . This has dramatically sped up up my application . You could even add the permissions array to the session data at login so permission checks through out the session don t require a database call but obviously changes won t take place immediately .", "Question : i need email verification of the user in a3m library which is not availble in v1.01 i found in github it is available in v2.0 . can anybody please tell me how to upgrade this version to newer or is there any link where i can directly download A3m V2.0 .. . .. . thanks .. . Answer : it has the only version 1 add email verification manually . get help from authentication library like ion-auth etc .", "Question : in my new project i am using codeigniter 2.2.0 and A3M 1.01 authorization library i have checked on my localhost it is working fine but when i uploaded it on remote-server home page is loaded but sign in is not working it shows following error www.redzoon.com .. . .. . Internal Server Error .. . .. . The server encountered an internal error or misconfiguration and was unable to complete your request . .. . Please contact the server administrator cgiadmin@yourhostingaccount.com and inform them of the time the error occurred and anything you might have done that may have caused the error . .. . More information about this error may be available in the server error-log . .. . Additionally a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request . i contacted the server administrator he said there is some problem with application . so i thought there may be problem in .htaccess file . this is my .htaccess file code .. . .. . please help me where am i doing wrong is there anything i have missed Comment : this error can be viewed at redzoon.com account login http : www.redzoon.com account login .. . Answer : i have googled for about three days finally i got some clue by changing .htaccess . now i was not getting 500 internal server error instead i was getting no input file specifed then i searched again about this error and i found a link .htaccess problem : No input file specified http : stackoverflow.com questions 1557258 htaccess-problem-no-input-file-specified where i got solution to my problem this is the .htaccess code .. . .. . this worked for me .", "Question : I downloaded a3m it comes packaged with CI 1.7.2 but I went ahead and removed all of the files it needed to run and put them in my pre-existing installation . After going to the a3m controller on my site I received : Message : Undefined property : CI : : session .. . .. . So I assume it s because of htaccess looking for a3m files in an a3m folder here s the a3m htaccess : .. . .. . And my already existing htaccess for mod-rewrite is as follows : .. . .. . As the commenting shows I used it from a site a while back so how can I combine the two I guess is what I m trying to ask as I m quite enthused about using a3m . Thanks guys . .. . Answer : It doesn t look like you ve loaded the session library . Check in system application config autoload.php if you have the library loaded : 42 autoload libraries array database session .. . .. . You can do this from the controller : this- load- library session .. . .. . http : codeigniter.com user guide libraries sessions.html", "Question : I have installed this two three days before so newbie for it . Twitter and facebook logins are workng fine . http : articlecon.com phpdemo sbid account sign in .. . .. . Iam little bit confused in A3M login process . I think that when user clicks on facebook it takes user to facebook-login . After successful login it takes back to the original website . After that I don t see any user information in session from facebook . Facebook table in database is empty . Can soem one guide me what Iam doing wrong and how it can be rectified . Thanks in advance .. . Answer : If you find that you do everything correctly but you are not logged in or no info is populate it could be that the data being sent back to your server is not being saved in the cache folder . Make sure to chmod your cache folder for your nonce s to 777 or chown it to your apache browser user for read-write permissions . I have seen in the past that instances don t function well break when they nonce cannot be saved after a successful handshake so everything else after it fails like db updates .", "Question : I ve been battling with redirects after users log in . The redirect is encoded into the URL . For example : .. . .. . http : demo.a3m.local : 8090 account sign in continue http 3A 2F 2Fdemo.a3m.local 3A8090 2Faccount 2Faccount settings .. . .. . On this demo install it works perfectly . However on a development site it seems to double encode the url so it becomes : .. . .. . http : dev.mysite.local : 8090 account sign in continue http 253A 252F 252Fdev.mysite.local 253A8090 252Faccount 252Faccount profile .. . .. . Forward slash is encoded to 3A and then further to 253 .. . .. . Any suggestions Thanks . .. . Answer : Typical - struggle for days and as soon as you ask the question one works it out . It was my .htaccess file rewriting the URL . Used the No-Escape flag to fix it : http : httpd.apache.org docs 2.2 rewrite flags.html flag ne" ] }
[ "yes-answer-long", "yes-answer-short" ]
oauth
UNK_RELATION
openears@text-to-speech@96
openears -- openears is a shared-source framework for performing continuous speech-recognition @placeholder and language model generation in ios .
{ "confidence": [ 59.05677795410156, 56.627342224121094, 55.0748291015625, 54.350074768066406, 51.36309814453125, 51.19023132324219, 50.06779861450195, 49.768470764160156, 49.72869110107422, 49.64753723144531, 49.36845397949219, 48.47429656982422, 48.358768463134766, 47.442047119140625, 45.11998748779297, 44.85955810546875, 44.480472564697266, 44.23988342285156, 44.066429138183594, 43.80182647705078, 43.80182647705078, 43.36602783203125, 43.346923828125, 42.73611068725586, 42.638031005859375, 42.357784271240234, 42.13613510131836, 42.09295654296875, 42.06963348388672, 41.86540222167969, 41.024864196777344, 40.915794372558594, 40.79076385498047, 40.74404525756836, 40.42726516723633, 40.40149688720703, 40.08340835571289, 40.08197784423828, 39.97248077392578, 39.97248077392578, 39.97248077392578, 39.79793167114258, 39.706703186035156, 39.706703186035156, 39.706703186035156, 39.64390563964844, 39.322235107421875, 39.179290771484375, 38.859840393066406, 38.859840393066406, 38.859840393066406, 38.852325439453125, 38.486358642578125, 38.446258544921875, 38.35205078125, 38.30560302734375, 38.132240295410156, 38.132240295410156, 38.06377410888672, 37.997833251953125, 37.705078125, 37.201759338378906, 37.02721405029297, 36.980323791503906, 36.980323791503906, 36.917762756347656, 36.689186096191406, 36.689186096191406, 36.689186096191406, 36.689186096191406, 36.689186096191406, 36.633934020996094, 36.00347900390625, 36.00347900390625, 35.70391082763672, 35.70391082763672, 35.70280456542969, 35.70280456542969, 35.70280456542969 ], "content": [ "I m developing speech-recognition application for iOS using OpenEars .", "Speech recognition actually must be supported on iOS through openEars .", "The language model is the vocabulary that you want OpenEars to understand in a format that its speech-recognition engine can understand .", "I ve recently started studying OpenEars http : www.politepix.com openears speech-recognition and it s great", "Please use the OpenEars quickstart tutorial and the OpenEars documentation to learn how to use OpenEars for speech-recognition before integrating Rejecto : http : www.politepix.com openears tutorial There is also more documentation at http : www.politepix.com openears and within the downloaded OpenEars distribution .", "I am using the Openears model in order to attempt to recognize speech .", "I tried to implement OpenEars http : www.politepix.com openears OELanguageModelGenerator Class Reference Speech Recognizer .", "I m using OpenEars framework .", "I m using OpenEars in my app for performing the recognition of some words and sentences .", "Operears : The speech-recognition Speech to text framework for iPhone iOS Devices I have installed openears demo app on my iPhone device It works well but only for a list of words like GO CHANGE MODEL .", "Openears : http : www.politepix.com openears", "Are there any other open-source alternatives to OpenEars or a way to increase the accuracy of Openears", "But I haven t used any of Openears speech-recognition speech-synthesis features just the talk to speech feature .", "I am trying to use OpenEars speech-recognition kit but doesn t work on my iPhone 3GS .", "Docs here : politepix.com openears LanguageModelGenerator Class Reference http : www.politepix.com openears LanguageModelGenerator Class Reference", "I am designing a new iPhone iPad app and I would include some voice recognition features using OpenEars and I am new to OpenEars .", "So how can i use my sound model to improve the recognition of OpenEars .", "The documentation on the Rejecto page you linked to above is for integrating Rejecto into an already-working OpenEars-enabled app but doesn t attempt to cover how to do speech-recognition with OpenEars and doesn t contain a sample app .", "i am implementing speech to text by OpenEars feature in my app .", "OpenEars developer here .", "Is there a similar command in Openears", "Even though it is not needed for dynamic Language model generation i used the old OpenEars sample project from this OpenEars Xamarin git https : github.com oganix MonoTouch-OpenEars i dind t used the new DynamicLanguageModel generator but modified the example for latest changes .", "I have followed the basic tutorial for the offline speech-recognition http : www.politepix.com openears tutorial and executed a porting in Swift .", "I have been working on using OpenEars v2.03 iOS framework project in xamarin iOS Binding project .", "I have an iOS app that reads text using the OpenEars API .", "To use language model you can use the following OpenEars API call : .. . .. . See API reference http : www.politepix.com openears OEPocketsphinxController Class Reference for more details .", "OpenEars is based on pocketsphinx .", "Hi Ahmed OpenEars developer here .", "I am working in an iPhone application I have used to OpenEars Framework to develop speech to text conversion in iPhone .", "I m trying to use a french acoustic model with OpenEars .", "Perhaps openears http : www.politepix.com openears might solve this for me .", "I am trying to include the OpenEars Framework in my project .", "OpenEars won t handle the whole English dictionary and you can t get iOS voice recognition without the keyboard widget .", "I m using OpenEars framework for offline voice recognition and I d like to be able to keep it working while the app is in background .", "Hi Guntis OpenEars developer here .", "If you have to use OpenEars audio management feature for speech-recognition see Update 1 otherwise continue on for a different solution using Apples Siri s Speech Synthesizer on iOS 7 .", "I am developing an app for speech to text I am using openears for this .", "OpenEars supports two languages and it doesn t perform large vocabulary recognition .", "Now I need use an Text to speech functionality in my apps I found OpenEars platform for do that .", "I was search on Google but i can t found How to speech multiple statement by using OpenEars .", "Openears uses Flite for speech-synthesis so you need to change the voice in Flite .", "I am studying Openears and I have a problem on it .", "Can this be done with Openears", "The answer is still the same - openears .", "The OpenEars code is Obj-C .", "See the Details about LangaugeModelGenerator Openears Basic concepts here http : www.politepix.com openears LanguageModelGenerator Class Reference .. . .. . Note : .. . .. . Please post the queries regarding Openears only in their forum http : www.politepix.com forums forum openearsforum .. . .. . You can see more Speech-To-Text SDK s here http : stackoverflow.com questions 9202583 what-is-the-current-best-speech-recognition-api-for-ios-to-match-few-keywords", "Fix the code to work on newest OpenEars .", "the callback of openears is .. . .. . hypothesis is the text itself and score is self explained .", "OpenEars PocketsphinxController class the class that does speech-recognition has a property pocketsphinxInputLevel that you can read on a secondary thread to find out the input power .", "To use TTS only without any of the audio session management related to speech-recognition in OpenEars set FliteController s property noAudioSessionOverrides to TRUE .", "I m trying to include OpenEars in a theos project I m making a tweak for jailbroken iDevices as I need speech-recognition for my tweak .", "At the point that it s working well outside of OpenEars please feel free to come over to the OpenEars support forums and get assistance from me for bringing your known-working acoustic model language model and phonetic dictionary into OpenEars .", "I have made an app that uses Openears framework to readout some text .", "To detect fixed phrases using OpenEars use the new dynamic grammar generator method of LanguageModelGenerator to create a rules-based grammar dynamically rather than a statistical language model : http : www.politepix.com 2014 04 10 openears-1-7-introducing-dynamic-grammar-generation", "You can see more details about LanguageModelGenerator and post your issues in politepix.com openears http : www.politepix.com openears LanguageModelGenerator Class Reference .. . .. . However I m going to answer .", "I have downloaded Openears but the recognition accuracy is very poor just tapping on the table returns one of the 6 predefined words .", "Is there any kind of API which is similar to OpenEars for Android .", "I m not seeing the ARMv7s support in OpenEars v2.03 .", "I tried using the openEars framework which worked great for english language but doesn t support french .", "OpenEars is awesome tool and great work .", "You can use OpenEars with such vocabulary and corresponding language model to support free form text entry for your device .", "Or some other library that would convert user speech to a string of phonemes I can feed into Openears", "and check this site for openEars help politepix.com http : www.politepix.com", "Just follow the tutorial at politepix.com openears tutorial http : www.politepix.com openears tutorial in order to create your own app .", "The tutorial explains implementing OpenEarsEventsObserver : politepix.com openears tutorial http : www.politepix.com openears tutorial and there is an example of fliteDidFinishSpeaking in the sample app .", "I recommend either following the tutorial here : http : www.politepix.com openears tutorial or examining the sample app that ships with OpenEars to compare against known-working examples of the framework being successfully added to a project .", "I used the OpenEars for my app.just recognize a to z in the alphabet .", "And how can I use OpenEars to recognize some special sound .", "OpenEars from what I understand is best served as using words in the dictionary .", "It s in the OpenEars distribution you downloaded in the root level of the main directory .", "Would I be able to change the speaking voice of OpenEars to another", "p . s . Between I need a decent speech recognizer for iOS and OS X using objective-C not necessarily OpenEars so other suggestions are welcome .", "Limited vocabulary is supported out of box it s actually the main feature of openears you can learn about it by reading the documentation politepix.com openears LanguageModelGenerator Class Reference http : www.politepix.com openears LanguageModelGenerator Class Reference .", "No prob in case you haven t seen it yet OpenEars has its own forum at politepix.com forums openears http : www.politepix.com forums openears which is the best place to get assistance with things that need further troubleshooting .", "OpenEars Framework might understand what the user is talking but there is no way to open an App based on that .", "This gonna be a big questions so hold your breath .. . .. . 1 Build the OpenEars framework project in Xcode for Simulator .", "Also it is working very accurately than openEars .", "I knew about OpenEars before posting .", "I don t understand this for my same error in openEars ." ] }
{ "confidence": [ 87.33236694335938, 76.7762680053711, 74.93684387207031, 71.85584259033203, 70.77696990966797, 70.31707763671875, 69.07223510742188, 68.52212524414062, 67.5158462524414, 65.24473571777344, 65.2183837890625, 65.06128692626953, 64.91798400878906, 64.88919830322266, 64.58123016357422, 64.2066879272461, 63.9133186340332, 63.54498291015625 ], "content": [ "Question : Operears : The speech-recognition Speech to text framework for iPhone iOS Devices I have installed openears demo app on my iPhone device It works well but only for a list of words like GO CHANGE MODEL . Can we make speech-recognition more generic for a real-time speech-recognition that is not limited to few words . It should be generic . Openears : http : www.politepix.com openears Comment : Thanks Sumanth for the reply . I have tried using iSpeech as well but it needs internet-connection for speech-recognition and my I dont have internet-connection on my device . iSpeech uses cloud for recognizing speech . Please reply if I can use iSpeech without internet-connection . .. . Answer : You have to use new Language Model instead of their default one . The language model is the vocabulary that you want OpenEars to understand in a format that its speech-recognition engine can understand . The smaller and better-adapted to your users real usage cases the language model is the better the accuracy . An ideal language model for PocketsphinxController has fewer than 200 words . You can dynamically create new language model through the LanguageModelGenerator class . See the Details about LangaugeModelGenerator Openears Basic concepts here http : www.politepix.com openears LanguageModelGenerator Class Reference .. . .. . Note : .. . .. . Please post the queries regarding Openears only in their forum http : www.politepix.com forums forum openearsforum .. . .. . You can see more Speech-To-Text SDK s here http : stackoverflow.com questions 9202583 what-is-the-current-best-speech-recognition-api-for-ios-to-match-few-keywords", "Question : I m trying to develop an iOS app using speech-recognition for french language but have been unsuccessful until now . I tried using the openEars framework which worked great for english language but doesn t support french . I used some info from this link http : www.politepix.com forums topic other-languages . If anyone know a solution it would be awesome . Thanks Comment : solution to what exactly. . getting the framework to support french Comment : Speech recognition actually must be supported on iOS through openEars . The text-to-speech does not . The models and everything else is availble on CMUSphinx website you can just use them . Comment : @NikolayShmyrev I tried to use the CMUSphinkx langage model direclty link http : sourceforge.net projects cmusphinx files Acoustic 20and 20Language 20Models French 20Language 20Model but I think it is too big 62K words so it doesn t recognize anything Comment : Right you can prune language model and reduce it s vocabulary to make it smaller . English model is small too . .. . Answer : The alternative I found is Dragon Speech SDK for Mobile . You simply need to Register With Dragon Mobile http : dragonmobile.nuancemobiledeveloper.com public index.php task home and download SDK and Samples . It Supports English French German Speech Recognition . Also it is working very accurately than openEars . I have tested this for English and its working very well . Here is screen for that sample which supports Recognition in mentioned language .. . .. . enter image description here http : i.stack.imgur.com bPZHH.png .. . .. . Note .. . .. . The SDK is free to download and use for 90 days but.. . http : readwrite.com 2011 01 24 dragon-speech-sdk-arrives-for-android-ios Comment : I made a request earlier to try their sdk but in the end I think it s too expensive . Comment : Yes I know thats why I have mentioned that in Note", "Question : i am implementing speech to text by OpenEars feature in my app . i am also using Rejecto plugin to make the recognition better and RapidEars for faster results . the goal is to detect phrase and single words for example : .. . .. . most of the time the result is fine but sometime it makes a mix from separate strings objects . for example i pass the words array : @ @ ME AND YOU @ YOU @ ME and the output can be : YOU ME ME ME AND . i dont want it to recognize only part of a phrase . any ideas please .. . Answer : OpenEars developer here . To detect fixed phrases using OpenEars use the new dynamic grammar generator method of LanguageModelGenerator to create a rules-based grammar dynamically rather than a statistical language model : http : www.politepix.com 2014 04 10 openears-1-7-introducing-dynamic-grammar-generation", "Question : I m trying to develop an iOS app using speech-recognition for french language but have been unsuccessful until now . I tried using the openEars framework which worked great for english language but doesn t support french . I used some info from this link http : www.politepix.com forums topic other-languages . If anyone know a solution it would be awesome . Thanks Comment : solution to what exactly. . getting the framework to support french Comment : Speech recognition actually must be supported on iOS through openEars . The text-to-speech does not . The models and everything else is availble on CMUSphinx website you can just use them . Comment : @NikolayShmyrev I tried to use the CMUSphinkx langage model direclty link http : sourceforge.net projects cmusphinx files Acoustic 20and 20Language 20Models French 20Language 20Model but I think it is too big 62K words so it doesn t recognize anything Comment : Right you can prune language model and reduce it s vocabulary to make it smaller . English model is small too . .. . Answer : Openers is using English Acoustic and Language Models by default . So it works well with english but doesn t support french . You can download French Acoustic and Language Models from CMU Sphinx website http : sourceforge.net projects cmusphinx files Acoustic 20and 20Language 20Models .. . .. . Some good French Acoustic and Language Models are available here http : sourceforge.net projects cmusphinx files Acoustic 20and 20Language 20Models French 20Language 20Model french3g62K.lm.dmp.bz2 download .. . .. . Download Change your Openears Acoustic and Language Models with this one . To do this just replace Openears hub4wsj sc 8k folder with the downloaded one and replace the .dic and .languagemodel files with the downloaded ones . If you think the downloaded French Acoustic and Language Models are too big then create our own with few words using this documents http : cmusphinx.sourceforge.net wiki Comment : Thanks I didn t know that you had to replace the hub4wsj sc 8k folder with an other acoustic model . It works a little better finding some words but it s still too slow . I would have to create my own dictionary . Comment : okay. . creating your own will take too much time . For this better to use Linux system . between 3-4 French Acoustic and Language Models available in CMU Sphinx website . Download and try all of them . Also search Acoustic and Language Models in google . You may get from other websites . Dont forget to replace your .language model file and .dic files along with the hub4wsj sc 8k folder.or just make sure you are using French .language model and .dic files . finally Clean your project and run .", "Question : I am developing an app for speech to text I am using openears for this . I am aware of its language model and dic files . but is it a good idea to create language model of whole vocabulary Language model of english language is 125 MB in size .. . .. . How can I implement speech to text for many languages . Should I create language model for each language and what about my build size if I import 10 language model in my app Thanks in advance . .. . Answer : OpenEars developer here . OpenEars supports two languages and it doesn t perform large vocabulary recognition . This is described in its docs so check them out for the answers to these questions and more . Comment : can I have link of official doc Comment : The docs are in the OpenEars download look inside the folder called Documentation they are available in HTML docset epub and pdf format and are also all on politepix.com openears http : www.politepix.com openears along with some supplementary info . Comment : ok....thank you", "Question : I m trying to develop an iOS app using speech-recognition for french language but have been unsuccessful until now . I tried using the openEars framework which worked great for english language but doesn t support french . I used some info from this link http : www.politepix.com forums topic other-languages . If anyone know a solution it would be awesome . Thanks Comment : solution to what exactly. . getting the framework to support french Comment : Speech recognition actually must be supported on iOS through openEars . The text-to-speech does not . The models and everything else is availble on CMUSphinx website you can just use them . Comment : @NikolayShmyrev I tried to use the CMUSphinkx langage model direclty link http : sourceforge.net projects cmusphinx files Acoustic 20and 20Language 20Models French 20Language 20Model but I think it is too big 62K words so it doesn t recognize anything Comment : Right you can prune language model and reduce it s vocabulary to make it smaller . English model is small too . .. . Answer : I ended up using this library iPhone-Speech-To-Text https : github.com todoroo iPhone-Speech-To-Text for my project . It use the google-voice api sending a FLAC file of the speech and retrieving the appropriate text . To make it work for french language in SpeechToTextModule.m I juste changed the URL .. . .. . NSURL url NSURL URLWithString : @ https : www.google.com speech-api v1 recognize xjerr 1 client chromium lang en-US .. . .. . to .. . .. . NSURL url NSURL URLWithString : @ https : www.google.com speech-api v1 recognize xjerr 1 client chromium lang fr Comment : Google voice services are great but it is unfortunately not a public API .", "Question : I used the OpenEars for my app.just recognize a to z in the alphabet . But it had a bad recognition in recognize alphabet than word . So how can i use my sound model to improve the recognition of OpenEars . And how can I use OpenEars to recognize some special sound . for example . I give OpenEars a dog sound and I want it to give me back dog Comment : Unfortunately this is a task that all speech-recognition struggles with because the alphabet is mostly words with one or two phonemes and little context and a whole lot of alphabet letters sound extremely similar to each other c d e g p.. . . Comment : I m very sad to hear that . I try another way like this @ a always reconigze to k @ bee @ sea Comment : but still some word get a bad recognize I hope someone can fix it @ a reconigze to k @ ee reconigze t or bee @ o o r @ r i @ v ee @ z j or v Comment : I don t understand what your approach is this looks to me like it would cause more issues not fewer but if you want more assistance why not go to the OpenEars forums instead at politepix.com forums openears http : www.politepix.com forums openears since your question is about the kind of subjective ongoing troubleshooting that isn t a great fit for Stack Overflow . Comment : ok I will discuss my quetion in politepix.com forums openears.thank you .. . Answer : So this is a two part question which might be better to the community split up . OpenEars from what I understand is best served as using words in the dictionary . If you want it to recognize alphabet letters I would try and use the phonetic spelling of each letter instead of using just the letter . So instead of using f use ef . As for the second part of the question you might be able to recognize specific types of dogs which go ruff but smaller dogs with more of a yip would have to be added to the initial dictionary as well . I would get the demo app and really just experiment with these words . Comment : Thank you for your answer.its very helpFull . Can you tell me how can I add the initial dictionary to openEar . Comment : OpenEars developer here . Just wanted to clarify that you can t recognize dog utterances using speech-recognition with an English-language acoustic model by entering the English-language onomatopoeia for the sounds that dogs make . It might be possible to create an acoustic model with dog sound entries in the corpus that could indicate when a dog is barking but that is more like a research project than a how do I do it SO question . Comment : Also and I m sorry to be picky because I think it s a decent answer but I want to make sure this is a good resource for someone reading it later the built-in language model generator will make the correct phonetic dictionary entries for the letters of the alphabet so it isn t necessary to first transcribe them . A more effective approach might be to emulate people who need to spell words under difficult environmental factors and use words to indicate letters alpha bravo charlie etc . Comment : thank you for you answer.I think it s helpful . but I maybe try another way to work out my problem . Comment : @Halle thanks for the clarification and I apologize the dog answer portion was more tongue-in-cheek . I couldn t help myself . I agree it is more of a research question .", "Question : I used Openears which needs dictionary . It is usefull when we mention the word in dictionary . I wanted to convert all words we speak . So I used Nuance s speech to recognition dragaon SDK . But it communicates with webserver . I want to avoid server communication because of security concerns . Is it possible to convert speech to text for all words we speak as it is in windows-mobile without communicating server only in offline mode .. . Answer : Speech recognition with unlimited vocabulary requires very big computational and memory resources gigabytes of memory and thus it s very hard to do that in iPhone on other embedded device . iPhone is 9 times slower than desktop . iPad is easier since it has more powerful CPU . Google has put very big effort to make their engine work offline for dictation and still it prefers to send data to the server because it is significantly more accurate . Because of that most of the solutions running on small devices use limited vocabulary . Though this vocabulary can be large enough so you will not notice that . Usually 500-1000 words is enough to cover most practical situations . You can use OpenEars to recognize such vocabulary . To train a language model you need texts from your domain words and expressions . Language model training is described in CMUSphinx tutorial http : cmusphinx.sourceforge.net wiki tutoriallm . To use language model you can use the following OpenEars API call : .. . .. . See API reference http : www.politepix.com openears OEPocketsphinxController Class Reference for more details . You can use OpenEars with such vocabulary and corresponding language model to support free form text entry for your device . Comment : Also related stackoverflow.com questions 25949295 http : stackoverflow.com questions 25949295 cmusphinx-pocketsphinx-recognize-all-or-large-amount-of-english-words", "Question : Looking for a keyword spotting api I found the most promising is OpenEars + Rejecto plugin . I need to recognize a pretty simple dictionary such as Up Down Left Right . Followed the steps to run the sample project here.- .. . .. . http : www.politepix.com rejecto .. . .. . But no matter what I speak the app always recognize the same words in the same order . I m sure I m missing something obvious configuring the project but can t figure out what . Anyone succeeded running the sample Rejecto project or can point me in the direction of a better sdk for keyword spotting .. . Answer : OpenEars developer here . Please use the OpenEars quickstart tutorial and the OpenEars documentation to learn how to use OpenEars for speech-recognition before integrating Rejecto : http : www.politepix.com openears tutorial There is also more documentation at http : www.politepix.com openears and within the downloaded OpenEars distribution . The documentation on the Rejecto page you linked to above is for integrating Rejecto into an already-working OpenEars-enabled app but doesn t attempt to cover how to do speech-recognition with OpenEars and doesn t contain a sample app . Update : the confusion was mostly due to my shipping the last version of the sample app with a confusing setting which I just fixed sorry about that ssantos . Comment : Thanks @Halle . I actually followed Offline speech-recognition which ignores spoken words which aren t in the vocabulary tutorial Using LanguageModelGenerator+Rejecto section with no luck . Anyway tried OpenEars sample project and it always logs GO FORWARD GO BACKWARD GO LEFT GO RIGHT even if i keep silent . Comment : Hi ssantos what do you mean by with no luck An app made from the tutorial can t have ended up with the vocabulary GO FORWARD GO BACKWARD GO LEFT GO RIGHT since the tutorial doesn t use that vocabulary as its example vocabulary . Comment : I mean it doesn t seem to recognize any word I say and repeats always the same output log . The project I m running is not from the tutorial but from the OpenEarsDistribution downloaded from the OpenEars homepage . Comment : My question was what you meant here : I actually followed Offline speech-recognition which ignores spoken words which aren t in the vocabulary tutorial Using LanguageModelGenerator+Rejecto section with no luck . What happened when you used the tutorial Comment : I meant I followed the steps described in Using LanguageModelGenerator+Rejecto to integrate Rejecto plugin in the openears sample project . I understood the other sections were different alternative approaches . Should I follow any of the previous steps Am I wrong using the sample project included in the bundle and I d rather start with an empty project from zero", "Question : I have made an app that uses Openears framework to readout some text . But I haven t used any of Openears speech-recognition speech-synthesis features just the talk to speech feature . My app got rejected by apple telling that the app asks for permission to use microphone while the app doesn t have any features of that kind . The following is the rejection message from apple : .. . .. . I have searched the app for AVAudioSessionCategoryRecord or AVAudioSessionCategoryPlayAndRecord audio categories as mentioned in the message but couldn t find any . How can I disable the prompting for permission to use microphone .. . Answer : Your application got rejected because you don t need the microphone feature openears by default interface with the use of the microphone feature hence why the user-permissions came up . These user-permissions are not dismissible as apple increased the security features for users so that they can be in more control of what they want their applications to be able to do . If you have to use OpenEars audio management feature for speech-recognition see Update 1 otherwise continue on for a different solution using Apples Siri s Speech Synthesizer on iOS 7 . In your case if all you want to do is read out some text then you can use iOS7 Speech Synthesizer which is the same synthesizer used to create Siri s voice . It s SO easy to setup and I am currently using it for one of my projects to interact with the user via voice . Here s a quick tutorial on how to get it all setup : .. . .. . Speech synthesizer tutorial http : jonathanfield.me p 71 .. . .. . strike UPDATE 1 strike .. . .. . After @halle s comment I decided to update the post for those that have to use the OpenEars framework who will be using only the FliteController Text To Speech feature without any sort of OpenEars speech-recognition . You can set the FliteController property noAudioSessionOverrides to TRUE so that you ensure that OpenEars wont interface with the Audio recording stream and this will stop the Microphone permissions alert from popping up . UPDATE 2 Based on @Halle s comment you no longer need to do update 1 : .. . .. . Just an update that starting with today s update 1.65 FliteController won t ever make audio session calls on its own so there is no further rejection danger here and it isn t necessary to set noAudioSessionOverrides . Comment : Just a supplementary note that OpenEars does not require use of the mic when doing TTS only -- see my answer . Comment : @Halle Hey thanks Halle I ll update my answer to include your tip for everyone to see . Comment : Thank you That s super . Comment : Just an update that starting with today s update 1.65 FliteController won t ever make audio session calls on its own so there is no further rejection danger here and it isn t necessary to set noAudioSessionOverrides . Comment : @Halle thanks the answer has been updated .", "Question : I am using open ears sdk for speech-recognition and synthesis in iphone programming but it s dictionary and .gram file and it s language model file contain only 8 standard words and I need more words in my app . if I m adding new words in it s .gram and .language model and .dic file my app is crashing . Please suggest me how to add new words in openears because I need to add 20 words in these files . .. . Answer : OpenEars developer here . Please use the quickstart tutorial it only takes a few minutes and shows you how to use OpenEars LanguageModelGenerator class which will answer your question and give you a copy paste-able code snippet : http : www.politepix.com openears tutorial If you have follow-up questions the OpenEars forums are a good place to ask them : http : www.politepix.com forums openears Comment : Thank u sir but in that I didn t find solution of my problem and I have spent lot s of time on that Comment : politepix.com 2012 11 02 http : www.politepix.com 2012 11 02 openears-tips-1-create-a-language-model-before-runtime-from-a-text-file Comment : I have got solution by above link thank u for giving me your precious time . Comment : I m glad my blog post helped but it isn t the answer to the question you are asking above which is just about using the default functionality of LanguageModelGenerator and is covered in the docs and tutorial . Using the explanation in the blog post to generate a custom language model is much more effort than is necessary . If it works for you that s great but later readers of this question should really just spend 10 minutes on the tutorial since the single method call needed for creating custom language models is covered there . Comment : @Halle how to use if i want the speak language in Chinese .", "Question : I would like to implement keyword spotting for 6 words in my app . I have downloaded Openears but the recognition accuracy is very poor just tapping on the table returns one of the 6 predefined words . Are there any other open-source alternatives to OpenEars or a way to increase the accuracy of Openears The 6 words I am using are in english Comment : You need to use your own language model for adding new words . Also in my knowledge there are no open-source library available for doing this offline version .. . Answer : Openears is just fine you only need to know that for keyword spotting you can not use the default configuration you need to install Rejecto Plugin http : www.politepix.com rejecto specifically designed for keyword spotting task . Comment : Thanks I will give it a try . Comment : Also be sure to do any accuracy testing using a real device rather than the Simulator .", "Question : null .. . Answer : I have been working on using OpenEars v2.03 iOS framework project in xamarin iOS Binding project . Let me explain what i did so far .I m new to XCode Xamarin and all this Binding things . This gonna be a big questions so hold your breath .. . .. . 1 Build the OpenEars framework project in Xcode for Simulator . Copied the OpenEars file from Framework OpenEars.framework Versions Current and renamed to libOpenEars-i386.a .. . .. . Likewise build the same library for iPhone 4s Device by connecting the device to Mac and chosen the target to my iPhone . Finally copied the generated OpenEars and renamed it to libOpenEars-armv7.a .. . .. . 2 Using lipo command bundled the two file libOpenEars-i386.a libOpenEars-armv7.a to a single file libOpenEars.a using the below command . 3 Created a Binding project in Xamarin Studio and added the libOpenEars.a it generates a libOpenEars.linkwith.cs automatically . Below is the following code .. . .. . I tried changing the liker flags LinkerFlags -lstdc++ -lc++ -ObjC and SmartLink false . 4 My ApiDefinition file contain all interface for OpenEars i just added only one interface here . 5 Referenced the OpenEars.dll to my iOS sample project . 6 Add the language model and acoustic model in the Binding library itself . Even though it is not needed for dynamic Language model generation i used the old OpenEars sample project from this OpenEars Xamarin git https : github.com oganix MonoTouch-OpenEars i dind t used the new DynamicLanguageModel generator but modified the example for latest changes . View Controller : .. . .. . .. . OpenEarsEventsObserverDelegate : .. . .. . This works perfectly on iOS simulator but not running on real device . Simulator screen shot . http : i.stack.imgur.com F1wTA.png .. . .. . I got this Error message while running on device.I m getting the same message for all the interfaces . Am i missing anything related to Binding for devices i tried building the same .dll using make files also but got the same error message . For building OpenEars Framework : .. . .. . MAKE file for Genrating OpenEars.dll .. . .. . Check the complete mtouch error-log here https : paste.ee p CvPCe .. . .. . Check the nm -arch armv7 libOpenEars.a .. . .. . nm command output here http : paste.ee p 48eQu .. . .. . checked the OEEvent exist in simulator i386 .. . .. . OUTPUT .. . .. . checked the OEEvent exist in armv7 .. . .. . OUTPUT .. . .. . I m not sure what i am missing . Yup there is lot of grammar mistakes and i Thank you for your time spend on reading this . Comment : On what device are you building if you only have an armv7 slice and are trying a fat application on a 64bits device then it will fail for lack of a arm64 slice . Comment : Thanks @poupou and Halle for your valuable comments . Finally i build the fat binary using all the architectures including arm64 and x86-64 must . Used lipo to build all in one package.Now that works like charm .. . Also set the project properties- Advanced- SupportedArchi . - ARMv7 for running in device like ipad-2 and iPhone 4 . Still need to test in iPhone 6 and 6+ i hope that might also support since they are arm64 family . I m not sure about how this works on ARMv7s like iPhone 5 iPhone 5c iPad 4 . I m not seeing the ARMv7s support in OpenEars v2.03 . Comment : @Halle i have doubt what does this means IME supporting across platforms never works out and how to build a cocoa static library-project output as .a file as you mentioned in comment build your own compiled framework using Archive is it possible to build it without using lipo At the beginning itself i tried with no success in converting Framework project to static library got errors for missing lot of header-files .", "Question : I m using OpenEars in my app for performing the recognition of some words and sentences . I have followed the basic tutorial for the offline speech-recognition http : www.politepix.com openears tutorial and executed a porting in Swift . This is the setup procedure .. . .. . The recognition works well in a quiet room for both single words and whole sentences I would say it has a 90 hit rate . However when I tried in quiet pub with a light background noise the app had serious difficulties in recognising even just word . Is there any way to improve the speech-recognition when there is background noise .. . Answer : If the background noise is more or less uniform i.e . has a regular pattern you can try adaptation of the acoustic model http : cmusphinx.sourceforge.net wiki tutorialadapt otherwise it s an open problem sometimes referred to as the cocktail party effect https : en.wikipedia.org wiki Cocktail party effect which can be part solved https : www.technologyreview.com s 537101 deep-learning-machine-solves-the-cocktail-party-problem using DNNs .", "Question : I am designing a new iPhone iPad app and I would include some voice recognition features using OpenEars and I am new to OpenEars . The app should recognize some words commands from a custom dynamic dictionary I mean that depending from the user actions it should be able to recognize some new words and ignore others . Roughly speaking I need to add and remove words from the dictionary . Is the call .. . .. . languageModelGenerator generateLanguageModelFromArray : .. . .. . with a new array of words the right approach Since generateLanguageModelFromArray creates some files I think that it could impact the app performances any experience about that Comment : Docs here : politepix.com openears LanguageModelGenerator Class Reference http : www.politepix.com openears LanguageModelGenerator Class Reference .. . Answer : You can see more details about LanguageModelGenerator and post your issues in politepix.com openears http : www.politepix.com openears LanguageModelGenerator Class Reference .. . .. . However I m going to answer . Yes . You are right . From their website info In the method where you want to create your language model add the following method call .. . .. . It will generate new language model files in your document Directory it will overwrite the old files", "Question : I m a newbie to IOs development . Now I need use an Text to speech functionality in my apps I found OpenEars platform for do that . But in my code it can only speech one statement in one Class . I was search on Google but i can t found How to speech multiple statement by using OpenEars . Here Is my code : .. . .. . oEEO is OpenEarsEventsObserver .. . .. . How to teller say Hello World Again thank you for reading .. . Answer : OpenEars developer here . FliteController is asynchronous and any new utterance will override the previous one which means that if you start two utterances almost simultaneously as in your example you will only hear the second one . What you want to do is to wait for OpenEarsEventsObserver s fliteDidFinishSpeaking method to know that the first or the nth speech utterance is complete so you can begin the next one . Please bring further questions to the OpenEars forums if you d like to troubleshoot them with me .", "Question : I ve recently started studying OpenEars http : www.politepix.com openears speech-recognition and it s great But I also need to support speech-recognition and dictation in other languages such as Russian French and German.I ve found that here http : sourceforge.net projects cmusphinx files Acoustic 20and 20Language 20Models are available various acoustic and language models . But I cannot really understand - is that enough what I need to integrate extra language support in application Question is - what steps should I take in order to successfully integrate for example russian in Open Ears .. . .. . As far as I understood - all acoustic and language models for english language in Open Ears demo is located in folder hub4wsj sc 8k . Same files can be found in voxforge language archives http : sourceforge.net projects cmusphinx files Acoustic 20and 20Language 20Models . So I just replaced them in demo . One thing is different - in demo English language there also was a sendump 2MB large file which is not located in voxforge language archives.There are two other files used in Open Ears demo : .. . .. . OpenEars1.languagemodel .. . OpenEars1.dic .. . .. . These I replaced with : .. . .. . msu ru nsh.lm.dmp .. . msu ru nsh.dic .. . .. . as .dmp is similar to .languagemodel . But application is crashing without any error . What am I doing wrong Thank You . Comment : Hi Guntis OpenEars developer here . Glad you re finding the framework great Step 1 for issues like this is to turn on OpenEarsLogging and verbosePocketsphinx which will give you very fine-grained info on what is going wrong search your console output for the words error and warning to save time . Instructions on doing this can be found in the docs . Feel free to bring questions to the OpenEars forums since in-depth troubleshooting isn t a great fit for SO : politepix.com forums openears http : politepix.com forums openears You might also want to check out this thread : politepix.com forums topic other-languages http : politepix.com forums topic other-languages Comment : To follow up for later readers after turning on logging we got this working by using the mixture weights file as a substitute for sendump and by making sure that the phonetic dictionary used the phonemes that were present in the acoustic model rather than the English-language phonemes . Comment : @Halle Could you post this as an answer so the question will not remain open Comment : OK I ve added it as an answer with a link-to the offsite troubleshooting process . .. . Answer : From my comments reposted as an answer : .. . .. . ... . Step 1 for issues like this is to turn on OpenEarsLogging and verbosePocketsphinx which will give you very fine-grained info on what is going wrong search your console output for the words error and warning to save time . Instructions on doing this can be found in the docs . Feel free to bring questions to the OpenEars forums ... . : http : politepix.com forums openears You might also want to check out this thread : http : politepix.com forums topic other-languages .. . .. . The solution : .. . .. . To follow up for later readers after turning on logging we got this working by using the mixture weights file as a substitute for sendump and by making sure that the phonetic dictionary used the phonemes that were present in the acoustic model rather than the English-language phonemes . The full discussion in which we accomplished this troubleshooting can be read here : http : www.politepix.com forums topic using-russian-acoustic-model .. . .. . .. . .. . UPDATE : Since OpenEars 1.5 was released this week it is possible to pass the path to any acoustic model as an argument to the main listening method and there is a much more standardized method for packaging and referencing any acoustic model so you can have many acoustic models in the same app . The info in this forum post supersedes the info in the discussion I linked to in this answer : http : www.politepix.com forums topic creating-an-acoustic-model-bundle-for-openears-1-5-and-up I left the rest of the answer for historical reasons and because there may be details in that discussion that are still useful but it can be skipped in favor of the new link . Comment : Thank You I m sure this will help many as You helped me : Comment : You re welcome and thanks for the quality input during the troubleshooting process that made it easy to help .", "Question : I have been trying to create a game using OpenEars . I am using dynamic language model method . But the performance is not up to the mark . Recognition is very low . Is there any advantage in using static language model Any other method to improve speech-recognition .. . Answer : OpenEars developer here . There are a few things that can result in sub-par recognition . Here are the really big ones : .. . .. . Testing recognition using the Simulator rather than a real device .. . Having misspelled words in your language model this is a big one that accounts for a very large number of reported issues if the word is misspelled how will its correct pronunciation be found or derived and entered in the phonetic dictionary It can t be and then correct pronunciations get false negatives .. . Having extraneous punctuation in your language model . Check this out by taking a look at the .arpa file contents and the .dic file contents and seeing if the entries in each seem to match each other or not . Having a native-speaker accent which is very different from the US accents the acoustic model is trained with or having a non-native-speaker accent this isn t fair but it s reality .. . Having the language model largely consist of non-English words such as non-English last names non-English street names or intentionally-misspelled band startup names since all pronunciation ends up being estimated . But static language models versus dynamic language models have never been a big consideration for accuracy levels . If you d like to troubleshoot this with me further I d recommend that you visit the OpenEars support forums where I d be happy to help with that since Stack Overflow is not intended for ongoing back-and-forth troubleshooting processes and this is probably one of those . Comment : Thanks for your advice Comment : No problem Please feel free to come by and get more help working through this where I usually give support ." ] }
[ "yes-answer-long", "yes-answer-short" ]
text-to-speech
UNK_RELATION
datepart@int@71
datepart -- datepart is a t-sql function that converts a date type to @placeholder according to provided format .
{ "confidence": [ 50.8607063293457, 47.38970184326172, 46.89967727661133, 44.84226989746094, 42.76152038574219, 42.71369934082031, 42.14311599731445, 41.63853073120117, 41.279747009277344, 41.09654998779297, 41.01902389526367, 39.32014465332031, 39.08311462402344, 38.473731994628906, 38.323219299316406, 38.133140563964844, 38.133140563964844, 37.97641372680664, 37.79273223876953, 37.79273223876953, 37.70207977294922, 37.36761474609375, 36.9207878112793, 35.91791534423828, 35.86095428466797, 35.342552185058594, 35.02619171142578, 35.02619171142578, 35.02619171142578, 34.23585510253906, 32.59307861328125, 32.59307861328125, 31.199726104736328, 30.841142654418945, 30.841142654418945, 30.841142654418945, 30.272430419921875, 30.079219818115234, 29.73444175720215, 29.73444175720215, 28.443359375, 28.408031463623047, 28.408031463623047, 28.408031463623047, 28.279804229736328, 27.836000442504883, 27.17310333251953, 26.50959014892578, 25.656171798706055, 25.4323673248291, 24.863643646240234, 24.79212760925293, 24.512649536132812, 24.304309844970703, 24.289222717285156, 24.226917266845703, 24.082529067993164, 24.025026321411133, 23.964584350585938, 23.907691955566406, 23.22088623046875, 22.991247177124023, 22.70351791381836, 22.634048461914062, 22.60861587524414, 22.398195266723633, 22.065032958984375, 21.833105087280273, 21.51046371459961, 21.51046371459961, 21.421958923339844, 21.32782554626465, 21.17717742919922, 20.323577880859375, 20.314180374145508, 20.21361541748047, 20.044979095458984, 20.025604248046875, 19.720632553100586, 19.578685760498047, 19.36792755126953, 19.07543182373047, 18.893604278564453, 18.704654693603516, 18.45897674560547, 18.310466766357422, 18.185958862304688, 18.175395965576172, 18.15453338623047, 18.15453338623047, 18.071435928344727, 18.010982513427734, 17.98495864868164, 17.968730926513672, 17.90610122680664, 17.90610122680664, 17.88106918334961, 17.79607582092285, 17.758481979370117, 17.700817108154297 ], "content": [ "DATEPART is not ANSI SQL.. .", "Is there a PLSQL equivalent of the DATEPART function", "DATEPART returns an integer that represents the specified datepart of the specified date .", "However using SQL DATEPART wk would return this date is week 2 : .. . .. . Current outcome using DATEPART wk year etc : .. . .. . Example of expected outcome :", "for additional ways of using DATEPART kind of function in oracle .. . .. . DATEPART : -Weekday .. . .. . --This would give the day for the week for a reference start day", "Specifically the DatePart function is a bit tricky to me .", "Assuming SQL Server - perhaps you are looking for the datepart option ISO WEEK", "Turns out in MS Access queries there is a function called DATEPART that has two optional-parameters parameters that the corresponding T-SQL DATEPART function do not have : firstdayofweek and firstweekofyear .", "It seems like the cause was that I format the date twice before I used datepart function .", "I encountered an error that prompts : .. . .. . Variable Datepart has not been declared .. . .. . I understood that datepart is a function-call in SQL and shouldnt need to be declared .", "As DATEPART DAY od.OrderDate is day part of od.OrderDate the DATEPART DAY od.OrderDate is redundant", "But the tricky part is this : datepart ww now .", "There is no DATEPART http : msdn.microsoft.com en-us library ms174420.aspx function in MySQL .", "Is DATEDIFF ignoring the year in the date since I passed a day for the datepart parameter", "If this is SQL Server then January 1 of any year defines the starting number for the week datepart for example : DATEPART wk Jan 1 xxxx 1 where xxxx is any year . -msdn", "I encountered a Group by DATEPART clause Problem .", "The following table lists all valid datepart arguments .", "I tried : .. . .. . But how can I do SUM and DATEPART function in Linq", "Rather than passing in a start and end date I am passing in a single date and using Datepart to filter out the week .", "The MSDN information is pretty clear .. . .. . datepart Is the part of date a date or time value for which an integer will be returned .", "Select DatePart yy Date as Year Week DATEPART ISO WEEK DATEADD DAY -1 Date from TransactionDetail where Date between DATEADD WEEK -6 2015 01 01 and 2015 01 01 group-by DatePart yy Date DATEPART ISO WEEK DATEADD DAY -1 Date order by Year Week So this changes GetDate to a preset value .", "Firstly how can I use the DATEPART to break up the date and allow it to be identified by the year .", "I am currently trying to perform a SQL query in Microsoft Dynamics AX2012 to output a year from delivery date by using a DATEPART function .", ".. . .. . Alternative 1 : .. . .. . The resultant SQL uses the DATEPART function .. . .. . ...though I m not sure why there is a OR null case .. . .. . Alternative 2 : .. . .. . The resultant SQL uses operators and", "If you use the datepart function this will be called for every row in your database which can be costly .", "Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number", "Grouping except for DATEPART month or year to group for works fine .", "I currently have a report that uses DATEPART to return the week a car was returned .", "I ve implemented the DATEPART ISO week as this resolves the week issue thank you for this .", "Using functions including datepart in the field will prevent SQL Server from using indexes to search with it", "On the GROUP BY As you are GROUP BY both DATEPART DAY od.OrderDate and od.OrderDate .", "It is quite expensive to extract the datepart information and it will always lead to a scan .", "There is no build in function in tsql that allow you to convert month name straight to integer so a workaround is : .. . .. . SELECT DATEPART MM @month + 01 2000 .. . .. . 3 .", "When using Datepart to group-by week is it possible to easily have it display the dates the weeks span .", "Problem is at .. . .. . Datepart year holiday gives you an integer value but case-when returns an integer or a string .", "Simply concatenating DatePart YYYY and ISO WEEK will yield incorrect or at least unexpected results for days in week 1 and or 53 .", "datepart yy Date will cause you issues over the year boundary since the same week could have two different years you would need to use the ISOYear function I have put in the question .", "I had to slightly alter it but I m sure you knew that I would need to : NOTIFICATION MONTH DATE MONTH NOTIFIED as DATEPART MONTH NOTIFICATION MONTH", "Get rid of the DatePart functions and change DATEADD DD.. . to DATEADD hh.. . subtracting the number of hours instead .", "DATEPART allows me to extract only the hour or minutes which makes things more complicated .", "To clarify your question please list the following : 1 The Database you are using the datepart function SQL Server or MS Access 2 The specific query you are writing 3 The results or error you are seeing 4 The results you are expecting to see .", "Output : .. . .. . Expected Output : .. . .. . Since i want the month name as output i cant use - DATEPART month Pdate .", "Since the DatePart and DateName functions are similarly consistent this won t impact how the results are generated :", "Just figured out the last day of quarter version : Just add AND DatePart m m.rDate In 3 6 9 12 to the WHERE clause .", "Also double-check the documentation for datepart wk .. . to confirm it does what you re expecting especially for dates around the beginning and end of the year .", "I have made some additional tests with the dates like 2016-01-03 and 2016-01-04 and I have compared with SQL s DATEPART ISO WEEK DATE and it shows correct values .", "I did some research around DATEPART but didn t find anything helpful as to how to get it to calculate midnight at military time properly .", "This parameter can be one of the following values : .. . .. . The standard DATEPART WEEK @Date is the equivalent of vbFirstJan1 this will reset the week number at the first of Jan then thereafter increment by 1 at each passing of whatever is set as DATEFIRST .", "This is MS SQL t-sql query .", "I have a generic method to search the records of any entities my searchQuery is like 2014-03-15 and the records datetime-format is 2014-03-15 00 : 00 : 00.000 My sql query should convert the datetime sql records to-date format only and then compare it with my query The problem is this that the genereated date from records are not eqauls to my query I m using the datepart function then concating the string result but the result will be like 2014- 3- 15 and cause no matching if a way exist to cast the string to-date in sqlfunctions that would be great Here is my code .. . .. . the genereated sql is .. . .. . I need a way to cast this string to-date by sqlFunctions", "http : stackoverflow.com questions 15920046 difficulties-comprehending-iso-week-and-week-in-microsoft-sql-whats-happening .. . .. . Some people prefer to avoid the old datepart codes so here are the equivalents : .. . .. . You may find it better to group on a count of the number of weeks since a fixed reference point .", "Columns include name Date and Type I want to run a query that returns all the event names of a given date AND type .", "This is not T-SQL .", "hmm. . that s what I ve tried but I ve got message : Msg 155 Level 15 State 1 Line 1 iso week is not a recognized datepart option.. . any idea why", "date column type is : date", "In Sql server 2012 or later you can use the built-in function DATEFROMPARTS https : msdn.microsoft.com en-us library hh213228.aspx to do this : .. . .. . If you are working with an earlier version of sql-server you need to build a string that represents the date using iso format yyyy-mm-dd and then cast it to-date :", "But T-SQL has no WEEKDAY function so this is probably just plain VBA .", "Assuming you re using SQL Server and that your Date column is DATE or DATETIME data type you can do this : .. . .. . So your query to get all events in 2015 for example could look like this :", "In tSQL the DATEPART is returning the correct data based on US and Most of Europe as well as UK See here https : msdn.microsoft.com en-us library ms174420.aspx .. . .. . You can use SET DATEFIRST to adjust the start position however .", "It was tested in sql-server 12 and uses the GETDATE instead of the Date function .", "select from Events where Date 1 jan 2015 and Date 1 jan 2016 and type 1", "You should generate sql that converts both sides of the comparison into that type like this : .. . .. . Where @MyDate is already a parameter that you will include in the query that has an explicit Date type .", "In T-SQL I can retrieve ISO week number using dateprat function : .. . .. . Is there an equivalent in MDX", "The clostest equivalent to vbFirstFourDays is to use DATEPART ISO WEEK @Date the ISO Standard defines the first week of the year as the first week to contain 4 days this is not quite equivalent because this is not influenced by DATEFIRST the ISO standard defines the week as Monday to Sunday therefore ISO WEEK also does regardless of DATEFIRST or regional settings .", "Yes But the main problem is this that i should convert the date string to sql date type by sql functions and there is no any function to do this I m using reflection to build the query and this make the problem harder to solve", "There is no way to use a variable but you can work around it : .. . .. . The design of the SQL T-SQL language is lacking as you can see .", "Instead remember that as of Sql Server 2008 there is a Date type that only stores the date information with no time component .", "For example I have had to report on weeks running from Thursday to Wednesday for commission payments where the first week of the year was defined as the first full week so in access this would be DATEPART ww Date 4 5 with no equivalent function in MS SQL I added a new column to the calendar table PaperSalesCommissionWeekNumber then I could just join to my calendar table to get the week number :", "@Jeroen Wasn t aware of that t-sql quirck .", "How do I do this in T-SQL", "I use DATEPART to change the week logic in framework to set 1 2 2016 to be week 6 while my calendar table in database sets 1 2 2016 to be week 5 .", "How about this : stackoverflow.com questions 10304373 http : stackoverflow.com questions 10304373 how-convert-string-to-date-t-sql", "I ve updated the first example to use the date that SQL Server interprets as zero .", "The problem is that DATEPART WEEK is quite a simplistic function and will simply return the number of week boundaries passed since the first day of the year a better function would be ISO WEEK since this takes into account year boundaries nicely : .. . .. . Which gives : .. . .. . The problem is that this does not take into account that the week starts on Tuesday since the ISO week runs Monday to Sunday you could adapt your usage slightly to get the week number of the day before : .. . .. . Which would give : .. . .. . So Monday the 29th December is now recognized as the previous week .", "Getting quarter from a date is very easy with MS-SQL as follows : .. . .. . How can I do this with Firebird", "Thanks Theo .. . .. . Public Function Translate Date the date As Integer .. . .. . Dim Date As Integer Dim isoYear As Integer Dim isoWeek As Integer Dim theDate As Date .. . .. . End Function", "You can even format the date field in the report to only show the year .", "And I cannot figure out how to create the equivalent query in T-SQL .", "According to your question weeks start on Mondays .", "I m calculating the week for a specific date in SQL for example 2016-01-20 yyyy-mm-dd but SQL returns week : 4 and that is wrong because this year the first week started on 2016-01-04 the result must be week : 3 .", "Beware of the culture settings for date-format and do some testing before put this code into production .", "I guess you want to archive : .. . .. . Your scenario .. . .. . 1 . if @month is null -- search all value in year 2016 .. . 2 . if @month is not null -- search all value with month and year .. . .. . Your issue : .. . .. . 1 . when @month is not null your query will be : .. . .. . .. . and DATEPART Year Holiday convert varchar 2016 + - @Month which is comparing between integer and varchar .. . .. . 2 .", "So that would need to be DATEDIFF month @date dateadd day 1 @date", "I am in the process of converting some MS Access queries into T-SQL for use with SQL reporting-services and I ve run into a problem .", "This would involve a some function to return the last day of the month of any date .", "Encountered in SQL Server Management Studio SQL Server 2012 .", "I get .. . .. . error converting string to datetime .. . .. . T-SQLe : .. . .. . datetime-format in my location is 111", "Obtained these date we can use a BEETWEN function for the WHERE clause but is the CONVERT function reliable", "Or start date and duration number of days .", "This will return the date ranges you are looking for .", "What RDBMS are you using : SQL Server MySQL Oracle .. .", "The second solution is to use the DATEPART function like in the following code : .. . .. . I try to explain : if end year is equal to the initial year then month must be between the start and end months else if the final months is greater than the initial years if different from the initial and final year I take everything in between else if the final year the month must be less than or equal to the final month if the initial year month must be greater than or equal to the final month .. . .. . Can you help me do this in the best way", "Although you still have to store date as a DATE type you can use a computed column : .. . .. . Add PERSISTED will save it in the table .", "There are two issues here the first is that I suspect you are defining 8 weeks of data as having 8 different values for DATEPART WEEK in which case you can replicate the root cause of the issue by looking at what ISO would define as the first week of 2015 : .. . .. . Which gives : .. . .. . So although you only have 7 days you have 3 different week numbers .", "I need to select a max date from a MySQL table and have each part of the date and time be in a separate variable .", "My goal was to allow him to put in the current date or any date of a prior week and get the full week s numbers .", "I m new to SQL and I m trying to extract data from a certain date-range .", "For SQL Server 2012 or later the EOM https : msdn.microsoft.com en-us library hh213020.aspx function should be what you re looking for .", "I m trying to exlcude Thursdays from a date-range in SQL Server .. . .. . The following is what I came up with from other examples : .. . .. . This appears to be working but I wanted to see if there were any suggestions for improvement etc .", "I m not sure if Sybase CONVERT function works the same as SQL Server but if so the edit removes DateDiff ." ] }
{ "confidence": [ 60.923316955566406, 56.882301330566406, 55.4483757019043, 53.75135803222656, 52.59343719482422, 52.057151794433594, 49.823944091796875, 48.761878967285156, 48.177772521972656, 48.172149658203125, 47.776432037353516, 47.676326751708984, 46.52202224731445, 46.09098815917969, 44.49790573120117, 43.78828430175781, 42.699928283691406, 41.56714630126953, 41.13663101196289, 41.115936279296875 ], "content": [ "Question : My database has a table Events . Columns include name Date and Type I want to run a query that returns all the event names of a given date AND type . Firstly how can I use the DATEPART to break up the date and allow it to be identified by the year . Comment : Please tag dbms used . DATEPART is not ANSI SQL.. . .. . Answer : If you use the datepart function this will be called for every row in your database which can be costly . It s better to select the year by using a range then it can use indexes to search for the relevant rows in your database . select from Events where Date 1 jan 2015 and Date 1 jan 2016 and type 1", "Question : My database has a table Events . Columns include name Date and Type I want to run a query that returns all the event names of a given date AND type . Firstly how can I use the DATEPART to break up the date and allow it to be identified by the year . Comment : Please tag dbms used . DATEPART is not ANSI SQL.. . .. . Answer : Assuming you re using SQL Server and that your Date column is DATE or DATETIME data type you can do this : .. . .. . So your query to get all events in 2015 for example could look like this :", "Question : I m calculating the week for a specific date in SQL for example 2016-01-20 yyyy-mm-dd but SQL returns week : 4 and that is wrong because this year the first week started on 2016-01-04 the result must be week : 3 . I think the issue is generatad because 2015 was a year with 53 weeks any solution to that Thank you and I m sorry for my bad English Comment : To clarify your question please list the following : 1 The Database you are using the datepart function SQL Server or MS Access 2 The specific query you are writing 3 The results or error you are seeing 4 The results you are expecting to see . Comment : If this is SQL Server then January 1 of any year defines the starting number for the week datepart for example : DATEPART wk Jan 1 xxxx 1 where xxxx is any year . -msdn Comment : What RDBMS are you using : SQL Server MySQL Oracle .. . It makes a difference to the answer . Comment : Assuming SQL Server - perhaps you are looking for the datepart option ISO WEEK Here is some light reading http : dba.stackexchange.com questions 38680 iso-week-vs-sql-server-week Comment : According to your question weeks start on Mondays . If that s your business situation you may want to create a calendar table that includes this sort of thing . We have one in our data-warehouse and the field is called week beginning . .. . Answer : In tSQL the DATEPART is returning the correct data based on US and Most of Europe as well as UK See here https : msdn.microsoft.com en-us library ms174420.aspx .. . .. . You can use SET DATEFIRST to adjust the start position however . Comment : The OP needs to use ISO WEEK . And BOL are plain wrong ISO weeks are common across Europe not only Norway and Sweden and other parts of the world too", "Question : I m calculating the week for a specific date in SQL for example 2016-01-20 yyyy-mm-dd but SQL returns week : 4 and that is wrong because this year the first week started on 2016-01-04 the result must be week : 3 . I think the issue is generatad because 2015 was a year with 53 weeks any solution to that Thank you and I m sorry for my bad English Comment : To clarify your question please list the following : 1 The Database you are using the datepart function SQL Server or MS Access 2 The specific query you are writing 3 The results or error you are seeing 4 The results you are expecting to see . Comment : If this is SQL Server then January 1 of any year defines the starting number for the week datepart for example : DATEPART wk Jan 1 xxxx 1 where xxxx is any year . -msdn Comment : What RDBMS are you using : SQL Server MySQL Oracle .. . It makes a difference to the answer . Comment : Assuming SQL Server - perhaps you are looking for the datepart option ISO WEEK Here is some light reading http : dba.stackexchange.com questions 38680 iso-week-vs-sql-server-week Comment : According to your question weeks start on Mondays . If that s your business situation you may want to create a calendar table that includes this sort of thing . We have one in our data-warehouse and the field is called week beginning . .. . Answer : The ISO 8601 definition for week 01 is the week with the year s first Thursday in it . I am using Intersystems cache which apparently does not account for that either . So I have used this to address that", "Question : I am in the process of converting some MS Access queries into T-SQL for use with SQL reporting-services and I ve run into a problem . Turns out in MS Access queries there is a function called DATEPART that has two optional-parameters parameters that the corresponding T-SQL DATEPART function do not have : firstdayofweek and firstweekofyear . And I cannot figure out how to create the equivalent query in T-SQL . Below is the original MS Access query pared down to just the relevant data : .. . .. . Note : in this case 7 means to calculate with Saturday as the first day of the week and the 2 means to calculate the first week in the year as the first with 4 or more days . How do I do this in T-SQL Comment : did you try this - msdn.microsoft.com en-us library ms174420.aspx https : msdn.microsoft.com en-us library ms174420.aspx Comment : Yes that s where I started . Unfortunately that function doesn t take those two optional-parameters firstdayofweek and firstweekofyear and the results are different . To give you an idea I threw together a quick sample one in access one in SQL to see the results and if I put in date 4 1 2014 access gives me week 13 SQL gives me week 14 . But if I plug in date 4 1 2013 both give me 14 so it s not as simple as just subtracting one from the SQL result . Comment : Did you see this msdn.microsoft.com en-us library ms181598.aspx https : msdn.microsoft.com en-us library ms181598.aspx Comment : That gets me part-way there - that does cover the part where it need to consider Saturday the start of the week . Unfortunately it doesn t handle considering the first week to be the one with 4 or more days . .. . Answer : The arguments you refer to are : .. . .. . firstdayofweek .. . .. . is omitted Access assumes that Sunday is the first day of the week . This parameter can be one of the following values : .. . .. . The equivalent in SQL Server SET DATEFIRST https : msdn.microsoft.com en-us library ms181598.aspx note that this begins at Monday not sunday so the following would return 2 since today is Tuesday .. . .. . The next argument is : .. . .. . firstweekofyear .. . .. . Optional . It is a constant that specifies the first week of the year . If this parameter is omitted Access assumes that the week containing Jan 1st is the first week of the year . This parameter can be one of the following values : .. . .. . The standard DATEPART WEEK @Date is the equivalent of vbFirstJan1 this will reset the week number at the first of Jan then thereafter increment by 1 at each passing of whatever is set as DATEFIRST . The clostest equivalent to vbFirstFourDays is to use DATEPART ISO WEEK @Date the ISO Standard defines the first week of the year as the first week to contain 4 days this is not quite equivalent because this is not influenced by DATEFIRST the ISO standard defines the week as Monday to Sunday therefore ISO WEEK also does regardless of DATEFIRST or regional settings . There is no equivalent at all to vbFirstFullWeek . I have found it is usually business logic that dictactes any deviation from these standard definitions of week numbers or day numbers as such this is almost always best handled by building yourself a calendar table http : www.sqlservercentral.com blogs dwainsql 2014 03 30 calendar-tables-in-t-sql you can then add your new column to it and run a one off update . For example I have had to report on weeks running from Thursday to Wednesday for commission payments where the first week of the year was defined as the first full week so in access this would be DATEPART ww Date 4 5 with no equivalent function in MS SQL I added a new column to the calendar table PaperSalesCommissionWeekNumber then I could just join to my calendar table to get the week number :", "Question : I m working on a project and i have problem with filtering records by date . I have a generic method to search the records of any entities my searchQuery is like 2014-03-15 and the records datetime-format is 2014-03-15 00 : 00 : 00.000 My sql query should convert the datetime sql records to-date format only and then compare it with my query The problem is this that the genereated date from records are not eqauls to my query I m using the datepart function then concating the string result but the result will be like 2014- 3- 15 and cause no matching if a way exist to cast the string to-date in sqlfunctions that would be great Here is my code .. . .. . the genereated sql is .. . .. . I need a way to cast this string to-date by sqlFunctions Comment : How about this : stackoverflow.com questions 10304373 http : stackoverflow.com questions 10304373 how-convert-string-to-date-t-sql Comment : To clarify : you have a datetime in your db stored as a datetime and you wanna compare this with a string given as parameter not in db containing only the Date part Comment : Yes But the main problem is this that i should convert the date string to sql date type by sql functions and there is no any function to do this I m using reflection to build the query and this make the problem harder to solve .. . Answer : Don t use strings to compare dates . EVER . Instead remember that as of Sql Server 2008 there is a Date type that only stores the date information with no time component . You should generate sql that converts both sides of the comparison into that type like this : .. . .. . Where @MyDate is already a parameter that you will include in the query that has an explicit Date type . Never generate queries that have values substituted directly in the query . Comment : here are two problems 1 i don t want to use date to store records coz i need it in other queries 2 I know if i use cast as date the problem will solved but i m using sqlfunction and there is no option to use this function I need a way to cast the string to-date by sqlFunctions", "Question : I am currently trying to perform a SQL query in Microsoft Dynamics AX2012 to output a year from delivery date by using a DATEPART function . I have created a class CustRerportDemo in the AOT and while attempting to perform a query which is to query out only the year from the field deliverydate in the table SalesTable . I encountered an error that prompts : .. . .. . Variable Datepart has not been declared .. . .. . I understood that datepart is a function-call in SQL and shouldnt need to be declared . Hence I am wondering why and how to rectify this issue I am only just trying to show the year from the delivery date . Therefore if the date is 13 06 2016 the resultant query result will just be 2016 or 16 . I have attached the following code . Please help . Edited code : .. . .. . Result as shown : .. . .. . As Seen under the DATETIMESTAMP : REturn value of 0 http : i.stack.imgur.com G0oKh.png .. . Answer : X++ select statement is not SQL and thus you should not assume that any or all SQL functions is available in X++ they are not There are date functions the one you search is called year https : msdn.microsoft.com en-us library aa865589.aspx . It does not belong in the select though : Comment : Will I need to create a table by the variable of y to store the field for year Thanks for your help Comment : furthermore wouldn t firstonly mean that only the first data in the column be selected Comment : You will need a variable y or whatever to hold the value . You will need a table field only if you need to group on the value . You can even format the date field in the report to only show the year . The firstonly selects one record only you should do the select you need . Comment : Yes firstonly only selects one record however I understand it as it will only return one query record from the top stack . How about other records that is being matched with different i.ds Comment : Use a while select salesTable where .. . to select matched orders .", "Question : I currently have a report that uses DATEPART to return the week a car was returned . However the business I work for fiscal year starts first Sunday of the year this instance commencing 03 01 2016 would be week 1 . However using SQL DATEPART wk would return this date is week 2 : .. . .. . Current outcome using DATEPART wk year etc : .. . .. . Example of expected outcome : .. . Answer : I can calculate this with the following SQL : .. . .. . However this depends on your localization settings which are probably different from mine given how you express dates and if you use this code throughout your system and then the business decides to change it s method for calculating weeks then you could end up with a big refactorization headache . I prefer to use a Calendar table for this sort of thing : .. . .. . You can expand the table as needed for example if accounting uses a different definition for week of the year than another department then that s easy to accommodate by adding another column . This then makes your query a simple join to get the week number : .. . .. . You ll need to populate the table but that should be a one time effort populate it for 50 years in advance and it s still a pretty small table and you can use code similar to my first statement to generate the values - don t enter each date by hand After that you just need to maintain the table if the business logic changes which is easier than changing all of your queries that deal with dates or if you get a new requirement that needs a new column . Comment : thanks for the answer . I ve implemented the DATEPART ISO week as this resolves the week issue thank you for this . I ve also done some reading regarding a potential ISO Year function and implemented this as required . This has resolved the issue for weeks and years", "Question : When using Datepart to group-by week is it possible to easily have it display the dates the weeks span . Below is an example of my sql : .. . .. . Ideally I d like to have Week 2 - 25 12 2015 - 31 12 2015 .. . Answer : If you can assume that all your dates are covered within the data then you can use min and max otherwise you ll need to calculate them : .. . .. . I m assuming the your datefirst settings corresponds to the logical week you want to use as you re already relying on that . Also double-check the documentation for datepart wk .. . to confirm it does what you re expecting especially for dates around the beginning and end of the year . See the accepted answer at Difficulties comprehending ISO week and week in Microsoft SQL what s happening exactly http : stackoverflow.com questions 15920046 difficulties-comprehending-iso-week-and-week-in-microsoft-sql-whats-happening .. . .. . Some people prefer to avoid the old datepart codes so here are the equivalents : .. . .. . You may find it better to group on a count of the number of weeks since a fixed reference point . January 1 2012 happened to be a Sunday so I ll use it . All of the same logic above will still work and it doesn t really matter if any of your data falls before that date since the value of the expression will just be a negative-number :", "Question : I am having a problem with week numbers . The customers week starts on a Tuesday so ends on a Monday . So I have done : .. . .. . When I then use .. . .. . It occasionally gives me 8 weeks of information . I think it is because it goes over to the previous year but I am not sure how to fix it . If I do : .. . .. . Then it works better but obviously doesn t work going through to previous years as it just goes to minus figures . Edit : .. . .. . My currently SQL If it helps at all without any data Comment : What you are saying isn t possible . We need to see the entire SQL statement to figure this one out there s not enough information here . Comment : Not sure it ll help much but added .. . Answer : There are two issues here the first is that I suspect you are defining 8 weeks of data as having 8 different values for DATEPART WEEK in which case you can replicate the root cause of the issue by looking at what ISO would define as the first week of 2015 : .. . .. . Which gives : .. . .. . So although you only have 7 days you have 3 different week numbers . The problem is that DATEPART WEEK is quite a simplistic function and will simply return the number of week boundaries passed since the first day of the year a better function would be ISO WEEK since this takes into account year boundaries nicely : .. . .. . Which gives : .. . .. . The problem is that this does not take into account that the week starts on Tuesday since the ISO week runs Monday to Sunday you could adapt your usage slightly to get the week number of the day before : .. . .. . Which would give : .. . .. . So Monday the 29th December is now recognized as the previous week . The problem is that there is no ISO YEAR built-in function so you will need to define your own . This is a fairly trivial function even so I almost never create scalar functions because they perform terribly instead I use an inline table valued function so for this I would use : .. . .. . Which just requires a subquery to be used but the extra typing is worth it in terms of performance : .. . .. . Or you can use CROSS APPLY : .. . .. . Which gives : .. . .. . Even with this method by simply getting a date 6 weeks ago you sill still end up with 7 weeks if the date you are using is not a Tuesday because you will have 5 full weeks and a part week at the start and a part week at the end this is the second issue . So you need to make sure your start date is a Tuesday . The following will get you Tuesday of 7 weeks ago : .. . .. . The logic of this is explained better in this answer http : stackoverflow.com a 7169656 1048425 the following is the part that will get the start of the week based on your datefirst settings : .. . .. . Then all I have done is substitute the second GETDATE with DATEADD WEEK -6 GETDATE so that it is getting the start of the week 6 weeks ago then there is just a cast to-date to remove the time element from it . Comment : This is beautifully defined . But would it not be easier to filter out the part-weeks Comment : Yes it would this is what the second part addresses by ensuring that your start date is a Tuesday you know that there will be no part weeks . Comment : Ah of course - Monday morning Comment : In that case. . Would this work Select DatePart yy Date as Year Week DATEPART ISO WEEK DATEADD DAY -1 Date from TransactionDetail where Date between DATEADD WEEK -6 2015 01 01 and 2015 01 01 group-by DatePart yy Date DATEPART ISO WEEK DATEADD DAY -1 Date order by Year Week So this changes GetDate to a preset value . Seems to work provided there s information in each week Comment : datepart yy Date will cause you issues over the year boundary since the same week could have two different years you would need to use the ISOYear function I have put in the question .", "Question : I m creating a SQL server stored procedure that is doing a lot of filtering based on the current week . Rather than passing in a start and end date I am passing in a single date and using Datepart to filter out the week . Trying top be proactive I can see managers asking for this to be run Monthly or Quarterly as well as Weekly . I d rather not have a stored Proc for each version if I can help it . I want to pass in the frequency and the date but it doesn t seem to work . I tried : .. . .. . but I get an error on the @Freq not being recognized as an interval . Does anyone know a way I can get around that Comment : Do pass start and end dates . Or start date and duration number of days . Filtering in the way you do it is not able to use index it is slow on large tables . Comment : My Manager who is semi SQL literate is going to be running this so I want to make it as simple as possible . My goal was to allow him to put in the current date or any date of a prior week and get the full week s numbers . I don t want him to have to look up the first date of the week or when it expands beyond the week only figure out how many days in the month or quarter . Fortunately it will never be a large number of records . .. . Answer : The MSDN information is pretty clear .. . .. . datepart Is the part of date a date or time value for which an integer will be returned . The following table lists all valid datepart arguments . User-defined variable equivalents are not valid .. . .. . https : msdn.microsoft.com en-us library ms174420.aspx .. . .. . But to get around this you can create a dynamic SQL and fill in that part with a variable . Both of these statements will yield the same result . You can then put this in your stored procedure and pass in @DateType as parameter . Comment : Thanks but the date part is part of the where clause and I do NOT want to make each entire query a dynamic query . some of them are rather complex .", "Question : We need to get the HOUR out of a DATETIME column expecting values from 0 to 23 to be returned . Is there a PLSQL equivalent of the DATEPART function .. . Answer : for additional ways of using DATEPART kind of function in oracle .. . .. . DATEPART : -Weekday .. . .. . --This would give the day for the week for a reference start day", "Question : null .. . Answer : I have a table Measurements which has a Date column . This column is indexed is a non unique-index though .. . .. . Using EntityFramework I want to get all items from a certain month and year . Question : What alternative is better in terms of performance .. . .. . Alternative 1 : .. . .. . The resultant SQL uses the DATEPART function .. . .. . ...though I m not sure why there is a OR null case .. . .. . Alternative 2 : .. . .. . The resultant SQL uses operators and Comment : This may depend on whether the YEAR and MONTH functions are sargable which means their involvement still allows the use of an index but I have no idea if they are . Still it might give you something to search for . Hopefully someone else knows something more definite . Comment : Sargable thats something new for me.. . can I specify the column to be sargable within the OnModelCreating of my DbContext Comment : No whether a function is sargable or not is a property of the function being used not something you can opt into or force . Comment : Using functions including datepart in the field will prevent SQL Server from using indexes to search with it Comment : Yes definitely use the one with dates directly in the criteria", "Question : Here i m Trying to create stored procedure. . group-by detepart..is it correct or wrong . Comment : On the GROUP BY As you are GROUP BY both DATEPART DAY od.OrderDate and od.OrderDate . As DATEPART DAY od.OrderDate is day part of od.OrderDate the DATEPART DAY od.OrderDate is redundant Comment : On the query when you GROUP BY there might be more than one rows in the result . And only one of the row result will be assigning to variables . Comment : DATEPART returns an integer that represents the specified datepart of the specified date . Why is the datatype of @NewDate DATETIME It Should be integer .. . Answer : Perhaps this is how your stored-procedures should be . As you didn t explain your requirement i can really tell what you are trying to achieve Comment : I want new and old orders perday so in that query declared @NewCount here i m calucating registreddate Orderdate is New customer Comment : above mentioned query returns zero Values. . 0 row s affected", "Question : When using Datepart to group-by week is it possible to easily have it display the dates the weeks span . Below is an example of my sql : .. . .. . Ideally I d like to have Week 2 - 25 12 2015 - 31 12 2015 .. . Answer : This will return the date ranges you are looking for . Note that using Min and Max only works if there are reliably entries for every possible day . You take January 1 of the year in question then add the number of weeks minus 1 you ve calculated to that date to get the beginning of the week . Then add one more week minus one day to get the end of the week . Edit : noticed you are using DD MM rather than MM DD so edited my code to convert to the correct format .", "Question : but what we really need is data from 07 : 00 AM yesterday to 06 : 59 AM current day so I tried the following : .. . .. . but the system didn t like my SQL skills ...PLEASE HELP.. . Comment : What RDBMS are you using MS SqlServer Comment : Get rid of the DatePart functions and change DATEADD DD.. . to DATEADD hh.. . subtracting the number of hours instead . Comment : The solutions I received are great but I forgot to mention that I am querying from a linked Sybase Server how do I modify one of the given solution to work on Sybase Looks like sybase doesn t have datediff . Comment : According to this Sybase BOL article http : infocenter.sybase.com help index.jsp topic com.sybase.infocenter.dc38151.1510 html iqrefbb X315942.htm it does have a DATEDIFF . Perhaps the syntax is simply a bit off . Comment : I agree and it s definitely something in the code because it says it cannot convert 0 to-date . .. . Answer : UPDATE : I agree with Andy s solution . Similar approach but his solution is much more elegant and efficient . Try something like that : .. . .. . The idea is to take the year month and day from today or yesterday and form a new date by concatenate them . Beware of the culture settings for date-format and do some testing before put this code into production .", "Question : null .. . Answer : I am a newbie to R and build something in VBA that I would like to run in R . Can you help translate the function below to R Specifically the DatePart function is a bit tricky to me . I checked for solutions there is an option to run VBA from within R using shell . This is too complex and not possible in my environment . Thanks Theo .. . .. . Public Function Translate Date the date As Integer .. . .. . Dim Date As Integer Dim isoYear As Integer Dim isoWeek As Integer Dim theDate As Date .. . .. . End Function Comment : What s the input and expected output", "Question : Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number This will return 1-7 with Sunday being 1 . I would like Sunday instead of 1 . .. . Answer : If you want a localizable solution just join the result against a table with the names and numbers .", "Question : but what we really need is data from 07 : 00 AM yesterday to 06 : 59 AM current day so I tried the following : .. . .. . but the system didn t like my SQL skills ...PLEASE HELP.. . Comment : What RDBMS are you using MS SqlServer Comment : Get rid of the DatePart functions and change DATEADD DD.. . to DATEADD hh.. . subtracting the number of hours instead . Comment : The solutions I received are great but I forgot to mention that I am querying from a linked Sybase Server how do I modify one of the given solution to work on Sybase Looks like sybase doesn t have datediff . Comment : According to this Sybase BOL article http : infocenter.sybase.com help index.jsp topic com.sybase.infocenter.dc38151.1510 html iqrefbb X315942.htm it does have a DATEDIFF . Perhaps the syntax is simply a bit off . Comment : I agree and it s definitely something in the code because it says it cannot convert 0 to-date . .. . Answer : Assuming you are on SQL Server : Comment : I forgot to mention that I am querying from a linked Sybase Server . Comment : @Altimo I won t be much help then . But you say Sybase has no DATEDIFF . Does it have DATEADD And a difference between Date and DateTime Otherwise Henry Liang s solution will probably work it seems pretty system-agnostic .", "Question : Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number This will return 1-7 with Sunday being 1 . I would like Sunday instead of 1 . .. . Answer : It actually took me more searching than I thought it would to find this answer . It s funny how you can use a technology for ages and never know about simple functions like this . I m not sure how localization would work with this function . Getting the name client-side is probably the answer but it would be nice to do it on the database . Would Sql Server use the collation setting to determine the output for this" ] }
[ "yes-answer-long", "yes-answer-short" ]
int
UNK_RELATION
jboss-weld@ri@52
jboss-weld -- weld is the reference implementation @placeholder for jsr-299 : java contexts and dependency-injection for the java-ee platform cdi .
{ "confidence": [ 124.62019348144531, 68.82333374023438, 68.77755737304688, 67.24066162109375, 66.93853759765625, 63.359344482421875, 58.81686019897461, 58.211212158203125, 57.23389434814453, 56.73244094848633, 56.09143829345703, 56.08781433105469, 53.85218048095703, 53.76793670654297, 52.69904327392578, 52.69904327392578, 52.6292724609375, 51.85584259033203, 51.654754638671875, 51.19075012207031, 50.35130310058594, 49.75544738769531, 49.722900390625, 49.64914321899414, 49.53083801269531, 49.52352523803711, 48.604835510253906, 47.96846389770508, 47.68062973022461, 47.65507888793945, 47.569313049316406, 47.546844482421875, 47.18912124633789, 46.47980880737305, 46.375125885009766, 46.17457580566406, 45.8703498840332, 45.79932403564453, 45.79932403564453, 45.539859771728516, 45.42747497558594, 45.22809982299805, 45.22809982299805, 44.57119369506836, 44.086124420166016, 43.98767852783203, 43.56317901611328, 43.56317901611328, 43.56317901611328, 43.56317901611328, 43.56317901611328, 43.545860290527344, 43.40053939819336, 43.38520431518555, 43.334922790527344, 43.28746795654297, 43.05659484863281, 42.98406982421875, 42.96503829956055, 42.96503829956055, 42.780120849609375, 42.749183654785156, 42.749183654785156, 42.51713943481445, 42.47246170043945, 42.47246170043945, 42.43219757080078, 42.37284851074219, 42.34778594970703, 42.34778594970703, 42.1783447265625, 42.04304504394531, 41.8173828125, 41.775611877441406, 41.62260437011719, 41.58177947998047, 41.58177947998047, 41.530517578125, 41.530517578125, 41.335044860839844, 41.24443435668945, 41.24443435668945, 41.19902038574219, 40.920448303222656, 40.855491638183594, 40.81905746459961, 40.801631927490234, 40.605194091796875, 40.51846694946289, 40.43751525878906, 40.361732482910156, 40.361732482910156, 40.23938751220703, 40.22020721435547, 40.19005584716797, 40.145050048828125, 40.11302947998047, 39.957427978515625, 39.93570327758789, 39.920997619628906 ], "content": [ "Note that implementation of Seam 3 has halted possibly because of how Java EE has improved during the years . .. . .. . This is the information about Weld http : seamframework.org Weld from the Seam project page : .. . .. . Weld is the reference implementation RI for JSR-299 : Java Contexts and Dependency Injection for the Java EE platform CDI .", "JBoss Weld is an implementation the reference one of the CDI specification .", "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 .", "I ve looked at JBoss Weld Reference Implementation of JSR-299 Contexts and Dependency Injection and I wanted to know how others CDI implementations compare to each other .", "Typically the CDI implementation is provided by a Java EE application server JBoss Wildfly for example ships with Weld .", "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 .", "CDI is the Java standard for dependency-injection and contextual lifecycle management .. . .. . Also on the page there is this information : .. . .. . CDI is a JCP specification included in Java EE .. . Weld is the reference implementation of CDI .. . Seam 3 is a set of modules which extend CDI to provide functionality beyond that offered by Java EE 6 .. . .. . And finally this should make it clear to you : .. . .. . However Seam 3 is a superset of JSR-299 .", "Thank you : - .. . .. . .. . .. . UPDATE 15 March 2011 .. . .. . Found an interesting page http : stackoverflow.com questions 3055724 can-spring-understand-inject-replacing-weld-as-a-jsr-299-implementation that describes how to replace Jboss Weld with Spring as the JSR 299 CDI implementation .", "I ve chosen the Weld implementation of CDI .", "How would one use it in a Java EE 6 project .. . .. . Weld or another JSR-299 implementation is already supplied by the Java EE 6 container the application server .", "Weld is the reference implementation https : en.wikipedia.org wiki Reference implementation of CDI .", "Weld actually the reference implementation http : stackoverflow.com questions 2296678 where-can-i-find-a-list-of-all-the-reference-implementations-for-jee6 2300328 2300328 of JSR-299 Context and Dependency Injection http : jcp.org en jsr detail id 299 also known as Java EE 6 CDI was less or more invented to supplant Spring in Java EE 6 environments .", "What does Weld do give you .. . .. . Weld http : seamframework.org Weld is the reference implementation of the abstract JSR-299 API http : jcp.org en jsr detail id 299 which is better known as CDI Contexts and Dependency Injection an API which is provided through javax.enterprise.context http : docs.oracle.com javaee 6 api javax enterprise context package-summary.html and javax.enterprise.inject http : docs.oracle.com javaee 6 api javax enterprise inject package-summary.html packages .", "I am using Weld as CDI implementation .", "I am using .. . .. . Weld version 2.2.8.Final as CDI implementation .", "The server I use is glassfish 3.1.2 and CDI implementation is WELD .", "Hopefully replacing weld with spring as the jsr 299 implementation will still enable me to use @ConversationScoped .", "I was using JBoss 7 with JSF 2.0 Mojarra and Weld as CDI .", "Found test on : http : www.programcreek.com java-api-examples index.php source dir arquillian-container-weld-master weld-ee-embedded-1.1 src test java org jboss-arquillian container weld ee embedded 1 1 WeldEmbeddedIntegrationEARTestCase.java .. . .. . UPDATE 2 : I have found a workaround for this .", "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 .", "It is not tied to any given CDI implementation unlike Weld OSGi and currently supports Weld 2.2.x and OpenWebBeans 1.5.0 .", "Might be a bug in weld-ee-embedded then .", "I use weld+paxcdi on java se .", "Seam 3 heavily relies on CDI JSR-299 .", "Reattach weld contexts .", "Is Seam 3 and Weld CDI the same things", "The Weld Reference manual now recommends using Pax CDI in OSGi environments .", "I am using weld a RI of CDI as dependency-injection component in my JSF-EJB-JPA web app .", "What is the equivalent of ConversationContext proposed in the previous answer in Java EE if we don t use Weld", "The first is here https : gitorious.org arquillian arquillian source f2941efa2ac5dfafe39a4fd8919ee1a022351f5d 3acontainer-weld-embedded src main java org jboss-arquillian weld WeldSEContainer.java L31-47 and the second is here http : alvinalexander.com java jwarehouse glassfish web weld-integration src main java org glassfish weld WeldDeployer.java.shtml", "Weld is our implementation of this programming model .", "Check out the weld and cdi-jee6 branches .", "Is there an existing or upcoming book on CDI Weld that you can recommend", "If yours doesn t ship with Weld but with another JSR-299 implementation and you want to use Weld instead then you need to consult the documentation of the container in question how to replace it .", "thinking that problem is related only to Weld Implementation of CDI eh Groovy .. . .. . All works fine at first time .", "My environment is Tomcat 7 with JBoss Weld .", "How does it relate to Java EE 6 .. . .. . JSR-299 is part of Java EE 6 JSR-316 http : jcp.org en jsr detail id 316 .", "I am new to weld and consider what environment is useful for a web-application using CDI Weld .", "About Weld and CODI weld will be dealing with all cdi and CODI just adds some stuff to it is that right", "This is probably why you often see posts refering to CDI Weld Seam .", "Weld uses Simple Logging for Java sl4j .", "Just tested it also works with CDI Weld .", "BTW PersonHome is a @ConversationScoped CDI Weld-Bean @Named", "It is a rather good way but i know about weaknesses of singleton so i decided to replace my singleton with weld dependency-injection which is integrated in Jboss .", "Maybe I ve found - weld-wicket http : docs.jboss.org weld reference 1.0.0 en-US html viewlayers.html d0e5200", "That s a bug in Weld .", "Is is possible to use weld CDI without java.el or javax.servlet.jsp present", "I use CDI Weld container with JSF 2.2 flow .", "I got some problems understanding the Conversation scope of Weld or CDI .", "I am running a project using Hibernate and Weld CDI on tomcat 7 .", "Weld 2.0 implements CDI 1.1 yeah I know the numbering is weird .", "I m running into a issue with CDI Injection into a Weld container in JBoss 7.1.1 .. . .. . I ve got the following object-model : .. . .. . When trying to inject A or B in my stateless class injection loop and crash with a javax.enterprise.inject.CreationException .", "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 .", "integrating Weld into jetty or Tomcat if you DO NOT have a full Java EE server .", "I have created an interceptor following the JBoss documentation http : docs.jboss.org weld reference 1.0.0 en-US html interceptors.html .", "So by now my project is : .. . .. . JBoss 7 + JSF 2.0 + Primefaces + Weld .. . .. . However I was feeling that JSF ViewScope was missing on Weld and on CDI so I just added MyFaces CODI to my project .", "JBoss AS 6 is a Java EE 6 app server .", "and then. . .. . .. . for injection. . .. . .. . see also http : docs.jboss.org weld reference 1.1.0.Final en-US html single d0e1355", "I am trying to test with Arquillian + WELD EE in an ShrinkWrap EnterpriseArchive .", "I have 2 profiles in maven Weld-EE-Embedded and wildfly-managed .", "The problem is that first you depend on Weld implementation of CDI and don t use necessarily your Application Server implementation and secondly Container.instance .deploymentServices is private .", "Anyway the question isn t about container but rather the CDI spec first and the Weld implementation requirements second .", "Because of CDI and its implementation Weld every POJO in JEE6 can be annotated with @Named which makes the POJO accessible to the view .", "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 .", "Is this a Weld Groovy issue or simply not possible", "I ll bring this to the attention of the weld team .", "I am attempting to port a javaSE application to Weld SE to gain dependency-injection support .", "Hmm I starting with a jsf webapplication will be using CDI but am a bit confused between Weld Solder or is it that Solder use s Weld under the hood .", "JBoss Weld servlet 1.0.1-Final .. . 3 . empty beans.xml .. . 4 .", "I believe there are special builds of JBoss AS7 which include Weld 2.0 .", "Weld OSGi is a now obsolete extension of Weld for OSGi which requires a modified version of Weld 1.x .", "I had a look at the JSR-299 specification and it doesn t seem that you can do what you want to do easily and I do not have experience enough with Weld to provide code for this special case .", "As i Just read in the Weld Reference http : docs.jboss.org weld reference latest en-US pdf weld-reference.pdf p . 12 @ManagedBean is now superflous : .. . .. . You can explicitly declare a managed-bean by annotating the bean class @ManagedBean but in CDI you don t need to .", "It might have been from the weld documentation : docs.jboss.org weld reference latest en-US html https : docs.jboss.org weld reference latest en-US html", "The weld-osgi subproject is not supported anymore with Weld 2 .", "Conceptually Pax CDI is more or less a superset of both FighterFish CDI and Weld OSGi i.e .", "For anyone else reading here note that Weld 1.1 implements CDI 1.0 not CDI 1.1 .", "This will be fixed in Weld 2.3.5.Final https : issues.jboss.org browse WELD fixforversion 12330052 .", "See also WELD-2160 https : issues.jboss.org browse WELD-2160 .", "The default-scope is the dependent pseudo-scope @Dependent as stated in the weld documentation http : docs.jboss.org weld reference latest en-US html scopescontexts.html d0e1997 : .. . .. . CDI features the so-called dependent pseudo-scope .", "Don t you know glassfish uses weld-osgi or pax cdi and why", "Hibernate JPA 2.0 .. . Seam Weld CDI .. . Glassfish 3.1.2", "If you re curious to see how it happens you can find that here : https : github.com weld core blob master impl src main java org jboss-weld bean proxy ProxyFactory.java .. . .. . One note - the whole process relies non-final methods and classes .", "See here for more details : docs.jboss.org weld reference latest en-US html http : docs.jboss.org weld reference latest en-US html injection.html d0e1217", "enter image description here http : i.stack.imgur.com vwrrf.png .. . .. . So the answer to your question is no but Weld or any CDI implementation is extensively used by Seam .", "I m using JBoss EAP 6.4 and Weld 1.1.28 and trying to get rid of Seam 2 .", "I would suggest to use Java EE 6 CDI instead of Spring .", "Detach the weld contexts session and conversation from the current session .", "Packaging and deployment http : docs.jboss.org weld reference 1.0.0 en-US html single d0e4633 of the documentation : .. . .. . CDI doesn t define any special deployment archive .", "I m not very familiar with either Seam nor Weld .", "Never faced those with Weld .", "It seems a bug of Weld Se .", "I m going through some Weld http : docs.jboss.org weld reference 1.1.0.Final en-US html injection.html and Oracle https : blogs.oracle.com enterprisetechtips entry using cdi and dependency-injection Java EE 6 docs but don t at all mind being directed to a fine manual .", "CDI-Contexts .", "One of the beauties with Java EE 6 is the new dependency-injection framework - CDI with the Weld reference implementation - which has prompted us to start migrating internally to JSR-330 in an implementation agnostic manner with the explicit target of being able to have a core jar which is frozen and then being able to add extra jars providing new modules replacing functionality in the core jar .", "I don t know if it ll work with JBoss Weld on Tomcat the documentation describes only on JBoss 5 6 and 7 .", "A couple of days ago I found the article Starting a CDI webapp from Maven with Weld-Servlet and Jetty Plugin http : agorava.org news 2012 07 10 Starting-a-CDI-webapp-from-Maven-with-Weld-servlet-and-jetty-plugin and especially the section Last trick to allow injection in servlets .", "I m trying to use CDI dependency-injection in Scala .", ".. . .. . Adding MyFaces CODI also invalidate Weld or I m using CODI for the ViewScope and Weld for the others Request Application Session etc .. . .. . You re not changing Weld .", "You should exclude Weld artifacts from your dependencies especially weld-servlet ." ] }
{ "confidence": [ 183.6938934326172, 125.37854766845703, 124.50150299072266, 120.30620574951172, 116.2203598022461, 115.02433013916016, 106.88919067382812, 93.63348388671875, 90.40621185302734, 83.36054992675781, 81.634765625, 78.32162475585938, 77.53868103027344, 76.18352508544922, 75.37247467041016, 74.07958984375, 73.9762954711914, 73.70832824707031, 73.44941711425781, 73.37554931640625 ], "content": [ "Question : Maybe this seems like a foolish question but I am really confused . Is Seam 3 and Weld CDI the same things I am reading some posts which refers to CDI Weld Seam 3 should I consider them as the same thing .. . Answer : Seam 3 heavily relies on CDI JSR-299 . Weld is the reference implementation https : en.wikipedia.org wiki Reference implementation of CDI . Seam http : seamframework.org on the other hand is a full framework for developing web-applications with plenty of functionality see list of modules in the link . Typically the CDI implementation is provided by a Java EE application server JBoss Wildfly for example ships with Weld . However any full implementation of CDI should be suitable for being used with Seam . See this image : .. . .. . enter image description here http : i.stack.imgur.com vwrrf.png .. . .. . So the answer to your question is no but Weld or any CDI implementation is extensively used by Seam . This is probably why you often see posts refering to CDI Weld Seam . Note that implementation of Seam 3 has halted possibly because of how Java EE has improved during the years . .. . .. . This is the information about Weld http : seamframework.org Weld from the Seam project page : .. . .. . Weld is the reference implementation RI for JSR-299 : Java Contexts and Dependency Injection for the Java EE platform CDI . CDI is the Java standard for dependency-injection and contextual lifecycle management .. . .. . Also on the page there is this information : .. . .. . CDI is a JCP specification included in Java EE .. . Weld is the reference implementation of CDI .. . Seam 3 is a set of modules which extend CDI to provide functionality beyond that offered by Java EE 6 .. . .. . And finally this should make it clear to you : .. . .. . However Seam 3 is a superset of JSR-299 . Think of JSR-299 as the core of Seam 3 - it s the basic programming model for your application components and for the built-in components that make up the Seam framework . Weld is our implementation of this programming model .", "Question : I ve looked at JBoss Weld Reference Implementation of JSR-299 Contexts and Dependency Injection and I wanted to know how others CDI implementations compare to each other . Specifically I know about Weld Resin CanDI by Caucho and Apache OpenWebBeans . .. . Answer : As long as the CDI specification is concerned I hope there will not be any functional difference among RIs . Check this article : Understanding Java EE 6 and CDI http : puspendu.wordpress.com 2010 05 23 javaee-6-context-and-depedency-injection", "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 : see openwebbeans.apache.org", "Question : I ve looked at JBoss Weld Reference Implementation of JSR-299 Contexts and Dependency Injection and I wanted to know how others CDI implementations compare to each other . Specifically I know about Weld Resin CanDI by Caucho and Apache OpenWebBeans . .. . Answer : I would have said the opposite But both projects are excellent tools and come provided with different application servers . The key is that both follow the Java EE specification and provide incredible power in programming flexibility and reuse .", "Question : I ve found lots of tutorials showing Weld code samples but not an introductory overview . Could you please suggest an introductory article or answer the following : .. . .. . What does Weld do give you How does it relate to Java EE 6 How would one use it in a Java EE 6 project If one uses it in a Java EE 6 project what is it supplanting if anything .. . Answer : What does Weld do give you .. . .. . Weld http : seamframework.org Weld is the reference implementation of the abstract JSR-299 API http : jcp.org en jsr detail id 299 which is better known as CDI Contexts and Dependency Injection an API which is provided through javax.enterprise.context http : docs.oracle.com javaee 6 api javax enterprise context package-summary.html and javax.enterprise.inject http : docs.oracle.com javaee 6 api javax enterprise inject package-summary.html packages . How does it relate to Java EE 6 .. . .. . JSR-299 is part of Java EE 6 JSR-316 http : jcp.org en jsr detail id 316 . How would one use it in a Java EE 6 project .. . .. . Weld or another JSR-299 implementation is already supplied by the Java EE 6 container the application server . If yours doesn t ship with Weld but with another JSR-299 implementation and you want to use Weld instead then you need to consult the documentation of the container in question how to replace it . If one uses it in a Java EE 6 project what is it supplanting if anything .. . .. . Spring as it was during the dark J2EE ages . See also : .. . .. . List of all reference implementations of JEE6 http : stackoverflow.com questions 2296678 where-can-i-find-a-list-of-all-the-reference-implementations-for-jee6 2300328 2300328 .. . Introduction to Weld http : docs.jboss.org weld reference latest en-US html", "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 ve looked at JBoss Weld Reference Implementation of JSR-299 Contexts and Dependency Injection and I wanted to know how others CDI implementations compare to each other . Specifically I know about Weld Resin CanDI by Caucho and Apache OpenWebBeans . .. . Answer : Currently they don t compare . I doubt any of them has been used in production they re too fresh . Weld is supposed to be the reference implementation because it is being developed with close collaboration with the spec lead - Gavin King from JBoss .. . personally I like OpenWebBeans more by virtue of having a bit cleaner code but that s not important when using it .", "Question : I ve looked at JBoss Weld Reference Implementation of JSR-299 Contexts and Dependency Injection and I wanted to know how others CDI implementations compare to each other . Specifically I know about Weld Resin CanDI by Caucho and Apache OpenWebBeans . .. . Answer : Quick overview of the protagonists : .. . .. . Weld is the RI there is only one RI version 1.0 is out it is built into GlassFish v3 and the upcoming JBoss AS EE 6 but can also be used with other containers http : docs.jboss.org weld reference 1.0.0 en-US html environments.html d0e4910 with some limitations . OpenWebBeans is still under development version 1.0.0 is planned for end of April 2010 . Caucho CanDI seems to be tied to Resin I may be wrong here but I couldn t find any clear proof of the contrary on their website which is bad anyway . So if I had to pick one implementation at the time of writing this I would pick the RI i.e . Weld because it s ready and can be used standalone ready doesn t mean it has been widely used . If you re looking for some performance comparison what else would you like to compare I don t think you will find such a benchmark for now . In any case if you want to use CDI just do it . Comment : What are your thought now on OWB vs WELD now that both are a bit mature . I heard that OWB is faster What do i think Comment : Yes OWB is faster . There are some benchmarks out there . It s also more extensible", "Question : I ve looked at JBoss Weld Reference Implementation of JSR-299 Contexts and Dependency Injection and I wanted to know how others CDI implementations compare to each other . Specifically I know about Weld Resin CanDI by Caucho and Apache OpenWebBeans . .. . Answer : Actually I use OpenWebBeans in a really productional Government project already together with a full blown EE6 Web Profile environment . But I won t tell you where so it cannot get slashdotted Btw be prepared that most of the EE-6 parts like e.g . EL-2.2 integration currently needs a lot of small patches and tweaks to get up running - but it really looks promising In fact the Weld and OpenWebBeans communities are communicating with each other pretty often so whenever we hit something not clearly lined out in the spec we both try to discuss things out . And since the involved Caucho guys Ferg and Reza are both simply said java gods I bet their implementation is really good as well .. . .. . As for OpenWebBeans : we are currently preparing a Milestone4 release which should get released next week . The openwebbeans-impl aka owb-core has almost no dependencies at all All heavier dependencies are handled by drop-in plugins which get automatically picked up from the classpath if available . They cover certain parts of the spec when it comes to interacting with other EE parts . There is e.g plugins like openwebbeans-jsf openwebbeans-jms openwebbeans-resource handling EE resources + JPA etc .. . .. . Btw : don t miss the wonderful easy way to write your own portable CDI extensions . To get a first idea you might look at Seam3 : anonsvn.jboss.org repos seam modules and of course Apache MyFaces CODI : github.com struberg myfaces-ext-cdi will get move to Apache MyFaces SVN soon .. . .. . LieGrue strub Comment : What are your thought now on OWB vs WELD now that both are a bit mature . I heard that OWB is faster What do i think Comment : a minor update . Apache MyFaces CODI did hit 1.0.0 in the meantime . More info can be found on the official site : myfaces.apache.org extensions cdi index.html http : myfaces.apache.org extensions cdi index.html", "Question : I would like to achieve this idealism : .. . .. . 1 . To have only 1 implementation for the JSF Bean container like to use only Spring or Weld but not both . Currently i am using Spring for my backend so i prefer Spring . 2 . To have only 1 annotation to choose between @ManagedBean @Named @Model .. . 3 . To be able to use all supported scopes like @RequestScoped @SessionScoped @ViewScoped @FlashScoped maybe also @ConversationScoped .. . 4 . The JSF Beans could be injected with spring-managed-services The backend services perhaps using @Inject or @Autowired .. . .. . So far i ve been finding no best combination to achieve these because as far as i know please correct me if i am wrong : .. . .. . 1 . @ManagedBean can not be injected with spring services 2 . @Named can be injected with spring services using @Inject but @Named is using Weld . Can i just use spring to managed the @Named instead of Weld 3 . @Named doesnt support @ViewScoped and FlashScope Please share your thoughts and experiences . Thank you : - .. . .. . .. . .. . UPDATE 15 March 2011 .. . .. . Found an interesting page http : stackoverflow.com questions 3055724 can-spring-understand-inject-replacing-weld-as-a-jsr-299-implementation that describes how to replace Jboss Weld with Spring as the JSR 299 CDI implementation . So basically the question number 2 is answered . Number 1 is also answered indirectly since i can now inject spring services . But still the number 3 question remains . I would find very helpful if i can use the @ViewScoped and Flash Scope in the @Named something like this article http : cagataycivici.wordpress.com 2010 02 17 port-jsf-2-0s-viewscope-to-spring-3-0 . Flash scope implementation has yet to be seen but the closest one i can get so far is this page http : blog.smartkey.co.uk 2011 01 implementing-flash-scope-in-java-web-applications . Hopefully replacing weld with spring as the jsr 299 implementation will still enable me to use @ConversationScoped . Gotta test things now wish me luck : - .. . .. . .. . .. . UPDATE 18 MARCH 2011 .. . .. . Successfully make use of Spring 3 instead of weld to do the @Named @Inject . The important thing is to set the el-resolver in the faces-config.xml . AFAIK Spring 3 currently doesnt support CDI yet so bye2 @ConversationScoped . For the scoping i must still use @Scope request or @Scope session but if i prefer the @RequestScoped javax.enterprise.context.RequestScoped and @SessionScoped i can make use of the bridge provided from this article http : matthiaswessendorf.wordpress.com 2010 05 06 using-cdi-scopes-with-spring-3 . The Scope view for spring from this article http : cagataycivici.wordpress.com 2010 02 17 port-jsf-2-0s-viewscope-to-spring-3-0 works like magic : - .. . .. . One problem remain though how to pass objects between Scope view -beans . . Wish me luck .. . .. . update .. . .. . Ahhh . . finally done . . Passing the variables using Flash provided by JSF2 really works like magic . I dont need an 3rd party implementation for that . So basically i can do without weld but with spring with the common scopes available including the view-scope dan can pass between beans using the flash object . One thing missing is the conversation scope which isnt a major problem to me yet . Hopefully the future spring can support this conversation scope . Cheers : - .. . Answer : Weld actually the reference implementation http : stackoverflow.com questions 2296678 where-can-i-find-a-list-of-all-the-reference-implementations-for-jee6 2300328 2300328 of JSR-299 Context and Dependency Injection http : jcp.org en jsr detail id 299 also known as Java EE 6 CDI was less or more invented to supplant Spring in Java EE 6 environments . I would suggest to use Java EE 6 CDI instead of Spring . Why would you use a 3rd party framework when Java EE 6 provides the same functionality out the box If the Spring backend really cannot be changed then I d suggest to stick to it and not to intermix with Java EE 6 CDI annotations to save yourself from confusions and maintenance headache . Comment : @BalusC : If i were to stick with Spring in the service-layer what annotation should i use in the JSF Bean @ManagedBean vs @Named In my experience using @ManagedBean works with the @ViewScope but @Named does not . With @ManagedBean i cannot inject my spring service using @Autowired or @Inject but using @Named i can inject the spring services using @Inject . Do you have any suggestions on this . . Thank you BalusC Comment : I don t do Spring so I can t go in detail but I think this link is useful : cagataycivici.wordpress.com 2007 12 19 http : cagataycivici.wordpress.com 2007 12 19 annotate-jsf-beans-with-spring-25 Comment : @BalusC : Thank you the article shows me something i didnt know before quite nice . But still outside of spring if i were to do @Named instead of @ManagedBean i ll still have the problem of not being able to use @ViewScope . . and perhaps the flash-scope also this i havent tried out Have you encountered such cases Thank you . Comment : CDI offers @ConversationScoped http : download.oracle.com javaee 6 api javax enterprise context ConversationScoped.html for this . Comment : @BalusC : So basically i can use the @ConversationScoped to replace @ViewScope . And to get the same behaviour as @ViewScope im thinking something like : at @PostConstruct i do the conversation.begin and any methods that can change to another view i do the conversation.end right But if this is the case what will happen if the user dont click on the button that will end the current conversation and click on another program in a different menu The previous bean s conversation wouldnt be closed by then .", "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 would like to achieve this idealism : .. . .. . 1 . To have only 1 implementation for the JSF Bean container like to use only Spring or Weld but not both . Currently i am using Spring for my backend so i prefer Spring . 2 . To have only 1 annotation to choose between @ManagedBean @Named @Model .. . 3 . To be able to use all supported scopes like @RequestScoped @SessionScoped @ViewScoped @FlashScoped maybe also @ConversationScoped .. . 4 . The JSF Beans could be injected with spring-managed-services The backend services perhaps using @Inject or @Autowired .. . .. . So far i ve been finding no best combination to achieve these because as far as i know please correct me if i am wrong : .. . .. . 1 . @ManagedBean can not be injected with spring services 2 . @Named can be injected with spring services using @Inject but @Named is using Weld . Can i just use spring to managed the @Named instead of Weld 3 . @Named doesnt support @ViewScoped and FlashScope Please share your thoughts and experiences . Thank you : - .. . .. . .. . .. . UPDATE 15 March 2011 .. . .. . Found an interesting page http : stackoverflow.com questions 3055724 can-spring-understand-inject-replacing-weld-as-a-jsr-299-implementation that describes how to replace Jboss Weld with Spring as the JSR 299 CDI implementation . So basically the question number 2 is answered . Number 1 is also answered indirectly since i can now inject spring services . But still the number 3 question remains . I would find very helpful if i can use the @ViewScoped and Flash Scope in the @Named something like this article http : cagataycivici.wordpress.com 2010 02 17 port-jsf-2-0s-viewscope-to-spring-3-0 . Flash scope implementation has yet to be seen but the closest one i can get so far is this page http : blog.smartkey.co.uk 2011 01 implementing-flash-scope-in-java-web-applications . Hopefully replacing weld with spring as the jsr 299 implementation will still enable me to use @ConversationScoped . Gotta test things now wish me luck : - .. . .. . .. . .. . UPDATE 18 MARCH 2011 .. . .. . Successfully make use of Spring 3 instead of weld to do the @Named @Inject . The important thing is to set the el-resolver in the faces-config.xml . AFAIK Spring 3 currently doesnt support CDI yet so bye2 @ConversationScoped . For the scoping i must still use @Scope request or @Scope session but if i prefer the @RequestScoped javax.enterprise.context.RequestScoped and @SessionScoped i can make use of the bridge provided from this article http : matthiaswessendorf.wordpress.com 2010 05 06 using-cdi-scopes-with-spring-3 . The Scope view for spring from this article http : cagataycivici.wordpress.com 2010 02 17 port-jsf-2-0s-viewscope-to-spring-3-0 works like magic : - .. . .. . One problem remain though how to pass objects between Scope view -beans . . Wish me luck .. . .. . update .. . .. . Ahhh . . finally done . . Passing the variables using Flash provided by JSF2 really works like magic . I dont need an 3rd party implementation for that . So basically i can do without weld but with spring with the common scopes available including the view-scope dan can pass between beans using the flash object . One thing missing is the conversation scope which isnt a major problem to me yet . Hopefully the future spring can support this conversation scope . Cheers : - .. . Answer : I can successfully Inject Spring bean using ManagedProperty annotation like below . This is on JSF Managed Bean . Spring bean is for backend and I prefer spring for backend . value is the most important thing here . It s actually the bean name of spring . I hope this helps . Comment : This did not work for me .", "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 : Because of CDI and its implementation Weld every POJO in JEE6 can be annotated with @Named which makes the POJO accessible to the view . Does that mean that ManagedBeans are completely obsolete now Or did I miss something where @ManagedBean still makes sense .. . Answer : In short @ManagedBean makes sense for applications that use JSF but do not use JSR 299 whatever the reason is . Below a longer explanation from Gavin King : .. . .. . Re : Comparisons to @ManagedBean annotations in JSF2 http : www.theserverside.com news thread.tss thread id 58251 327387 : .. . .. . While looking through the Weld examples and the older WebBeans documentation it looks like a competitor to the new @ManagedBean JSF 2.0 annotations . Is there any information on when we d want to use one over the other .. . It s a good question and I m not really in full agreement with the answers that have been posted so far . .. . The new EE Managed Beans specification defines a base component model for Java EE together with a very basic set of container services @Resource @PostConstruct @PreDestroy . .. . The idea is that other specifications beginning with EJB CDI JSF and the new Java Interceptors spec build upon this base component model and layer additional services for example transaction management typesafe dependency-injection interceptors . So at this level the managed beans CDI interceptors and EJB specifications all work hand-in-hand and are highly complementary . .. . Now the Managed Beans specification is quite open-ended with respect to identifying exactly which classes are managed beans . It does provide the @ManagedBean annotation as one mechanism but it also allows other specifications to define different mechanisms . So for example : .. . .. . The EJB specification says that a class obeying certain programming restrictions with a @Stateless or @Stateful annotation deployed in an EJB jar is a managed-bean . .. . The CDI specification says that any class with an appropriate constructor deployed in a bean deployment archive is a managed-bean . .. . Given that EJB and CDI provide arguably more convenient ways to identify a managed-bean you might wonder precisely what @ManagedBean is needed for . The answer as alluded to by Dan is that if you have CDI available in your environment for example if you are using EE6 then @ManagedBean is just not really needed . @ManagedBean is really there for use by people who are using JSF2 without CDI . .. . OTOH if you do annotate a bean @ManagedBean and you do have CDI in your environment you can still use CDI to inject stuff into your bean . It s just that the @ManagedBean annotation is not required in this case . .. . To summarize if you do have CDI available to you it provides a far superior programming model to the @ManagedBean @ManagedProperty model that JSF2 inherits from JSF1 . So superior in fact that the EE 6 web profile does not require support for @ManagedProperty etc . The idea being that you should just use CDI instead . Comment : While not stated in the question I read it to assume JSR 299 .", "Question : One of the beauties with Java EE 6 is the new dependency-injection framework - CDI with the Weld reference implementation - which has prompted us to start migrating internally to JSR-330 in an implementation agnostic manner with the explicit target of being able to have a core jar which is frozen and then being able to add extra jars providing new modules replacing functionality in the core jar . I am now in the process of making the above work with Weld and to be frank there is simply too much magic going on behind the covers . Either it works or it doesn t and it doesn t provide very much help by default on what happens so you can investigate what is wrong and fix it . I would expect that there are switches to switch which can easily enable things like : .. . .. . What classpath entries are scanned and where What was the result What beans are available for injection for which class What caused a given bean not to be considered for later A given jar In other words I need to see the decision process in much more detail . For some reason this is not as needed with Guice perhaps because there is much less magic and perhaps because the error messages are very good . What do you do to debug your Weld applications and how much does it help .. . Answer : Weld uses Simple Logging for Java sl4j . If you are using Tomcat I suggest you add sl4j-jdk14-x.x.x.jar to application class path and append following lines to apache-tomcat-7.0.x conf logging.properties : .. . .. . This will generate lots of debug in console so you d better select something specific and comment out other lines . Other logging libraries like log4j can be configured using their respective config files and adding similar levels .", "Question : One of the beauties with Java EE 6 is the new dependency-injection framework - CDI with the Weld reference implementation - which has prompted us to start migrating internally to JSR-330 in an implementation agnostic manner with the explicit target of being able to have a core jar which is frozen and then being able to add extra jars providing new modules replacing functionality in the core jar . I am now in the process of making the above work with Weld and to be frank there is simply too much magic going on behind the covers . Either it works or it doesn t and it doesn t provide very much help by default on what happens so you can investigate what is wrong and fix it . I would expect that there are switches to switch which can easily enable things like : .. . .. . What classpath entries are scanned and where What was the result What beans are available for injection for which class What caused a given bean not to be considered for later A given jar In other words I need to see the decision process in much more detail . For some reason this is not as needed with Guice perhaps because there is much less magic and perhaps because the error messages are very good . What do you do to debug your Weld applications and how much does it help .. . Answer : There s a new emerging project CDI Inspector . http : cdiinspector.blogspot.cz .. . .. . It s a master thesis project . Go and show some support : Comment : Is it useful now Very preliminary version... .", "Question : I have Jboss AS 6.1 and war and sar applications on it . I use cassandra . So i need managers to access database and cache database objects for fast access . So i did it in such a way : .. . .. . Also i have abstract cache class where my objects are cached and sorted by operator . So in this way i can access my class from war and from sar from any place and cache will be the same . There will be only one object of this cache . The manager class itself is in the sar . It is a rather good way but i know about weaknesses of singleton so i decided to replace my singleton with weld dependency-injection which is integrated in Jboss . I did it in such way : remove private constructor and getInstance method and added a @ApplicationScope annotation . And in my web classes i just annotate @Inject . Like this : .. . .. . But when i am trying to start all this war application does not start and i have exceptions like this : org.jboss.weld.exceptions.DeploymentException : WELD-001408 Unsatisfied dependencies for type AsaBlackSubsManager with qualifiers @Default at injection point field @Inject .. . .. . I was searching for answers a couple of days but i still can figure out : What am i doing wrong .. . Answer : JBoss AS 6 is a Java EE 6 app server . According to the CDI 1.0 spec http : docs.jboss.org cdi spec 1.0 html packagingdeployment.html beanarchive which is part of Java EE 6 you have to put a beans.xml file in your archive : in the WEB-INF directory for a war in the META-INF directory for an jar . Comment : I have put beans.xml in war and in sar and in jar in a sar . It does not help .", "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 : Weld Reference Documentation Section 2.1.2 http : docs.jboss.org weld reference 1.1.0.Final en-US html beanscdi.html d0e634 .. . .. . Keep in mind that once a bean is bound to a context it remains in that context until the context is destroyed . There is no way to manually remove a bean from a context . If you don t want the bean to sit in the session indefinitely consider using another scope with a shorted lifespan such as the request or conversation scope . Custom scope example Porting the veiwscoped jsf annonation to cdi http : www.verborgh.be articles 2010 01 06 porting-the-viewscoped-jsf-annotation-to-cdi .. . .. . If you really don t want to take the path of the Custom scope type. . You can use a non-portable method by using BeanManager.getContext http : download.oracle.com javaee 6 api javax enterprise inject spi BeanManager.html getContext 28java.lang.Class 29 method and cast this context in a weld AbstractSharedContext http : grepcode.com file repository.jboss.org nexus content repositories releases org.jboss.weld.servlet weld-servlet 1.1.0.CR2 org jboss-weld context AbstractSharedContext.java av h to have access to the beanstore or the cleanUp method of the context . Check this thread on how to get a BeanManager http : seamframework.org Community UsingWeldGetBeanManagerFromGoogleAppEngineServlet instance for your environment Comment : @Matt Ball Sorry didn t see you did not really want to go in the Custom scope type so i edit the answer to add another possible solution i can see . Comment : Thanks for the information I will definitely try out this non-portable method when I have a chance .", "Question : One of the beauties with Java EE 6 is the new dependency-injection framework - CDI with the Weld reference implementation - which has prompted us to start migrating internally to JSR-330 in an implementation agnostic manner with the explicit target of being able to have a core jar which is frozen and then being able to add extra jars providing new modules replacing functionality in the core jar . I am now in the process of making the above work with Weld and to be frank there is simply too much magic going on behind the covers . Either it works or it doesn t and it doesn t provide very much help by default on what happens so you can investigate what is wrong and fix it . I would expect that there are switches to switch which can easily enable things like : .. . .. . What classpath entries are scanned and where What was the result What beans are available for injection for which class What caused a given bean not to be considered for later A given jar In other words I need to see the decision process in much more detail . For some reason this is not as needed with Guice perhaps because there is much less magic and perhaps because the error messages are very good . What do you do to debug your Weld applications and how much does it help .. . Answer : I can suggest a few options : .. . .. . lower the logging threshold . I don t know what logging framework is used by Weld but you can see that and configure say DEBUG or INFO .. . .. . get the source code and put breakpoints in the BeanManager http : download.oracle.com javaee 6 api javax enterprise inject spi BeanManager.html implementation BeanManagerImpl perhaps . It is the main class in CDI and handles almost everything . Try putting a different implementation if not tied by the application server - for example OpenWebBeans . Its exception messages might be better .. . .. . Open the specification and read about the particular case . It is often the case the you have missed a given precondition - for example an annotation has to have a specific @Target otherwise it is not handled by CDI . I can confirm that the exception messages of Weld are rather disappointing . I haven t used Guice but in Spring they are very very informative . With Weld I had to refer to the 4th point above opened the spec and verify all preconditions . This was my suspicion initially - that even though the spec looks very good the implementations will not be as shiny at first at least . But I guess one gets used to this . Comment : I m not tied right now by the application server . It is the blueprints of how to do the frozen core jar + extra functionality jar in each JSR-330 provider that I am doing for CDI now . Does OpenWebBeans have better error reporting Have you had a look at the CanDI implementation in Resin My logging configuration may cut off DEBUG logs I ll have a look . Comment : I haven t had any experience with OWB or CanDI . Only Weld and not too much actually . Comment : OpenWebBeans e.g . logs the scanned JAr files . If you miss something create a JIRA issue . They are very innovative and I guess they will implement such features .", "Question : As far as I know CDI uses dynamic-proxy for non-dependent bean injection . If there is a class that implements some interface there is no problem example : .. . .. . proxy can be created based on Message interface but what if the class implements no interface : .. . .. . The injection into Servlet still works : .. . .. . so the question is how it is handled for example by Weld Comment : It just extends the class . Comment : According to the docs https : docs.oracle.com javase 7 docs api java lang reflect Proxy.html there are two statements : A proxy class extends java.lang.reflect.Proxy and A proxy class implements exactly the interfaces specified at its creation so it is possible to create proxy without interface According to this http : stackoverflow.com questions 3291637 alternatives-to-java-lang-reflect-proxy-for-creating-proxies-of-abstract-classes topic it is only possible with CGLIB for example . Comment : hk2 also uses javassist as cglib seems as though it is not being actively maintained at this time .. . Answer : Not every proxy is an instance of java.lang.reflect.Proxy Weld has its own proxying framework at this point which can subclass any non-final class . Weld also does not use javassist to do proxying older versions did but the 2.x are internal . If you re curious to see how it happens you can find that here : https : github.com weld core blob master impl src main java org jboss-weld bean proxy ProxyFactory.java .. . .. . One note - the whole process relies non-final methods and classes . You ll notice that even the CDI spec makes a reference to non-final ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ri
UNK_RELATION
vps@server@39
vps -- vps stands for virtual private @placeholder and usually refers to a single instance of a virtual-machine leased for private running on a shared physical machine .
{ "confidence": [ 59.751800537109375, 53.886966705322266, 45.83574295043945, 43.0718879699707, 42.81279373168945, 41.949337005615234, 41.40877151489258, 37.953983306884766, 37.90570068359375, 37.56966018676758, 37.56966018676758, 37.216949462890625, 36.92155838012695, 36.23280715942383, 36.046363830566406, 35.75034713745117, 35.742034912109375, 35.742034912109375, 35.673221588134766, 35.673221588134766, 35.425540924072266, 35.425540924072266, 35.188297271728516, 35.04664993286133, 35.044395446777344, 34.68907928466797, 34.686065673828125, 34.25281524658203, 34.25281524658203, 34.25281524658203, 34.25281524658203, 34.25281524658203, 34.25281524658203, 34.24602127075195, 33.864871978759766, 33.864871978759766, 33.82866668701172, 33.82866668701172, 33.67817687988281, 33.67817687988281, 33.46238708496094, 33.46238708496094, 33.40706253051758, 33.40706253051758, 33.268672943115234, 33.268672943115234, 33.268672943115234, 33.15570068359375, 33.114402770996094, 32.7879638671875, 32.6367301940918, 32.595115661621094, 32.522403717041016, 32.42292022705078, 32.42292022705078, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.34519577026367, 32.10422134399414, 32.089149475097656, 31.803821563720703, 31.361053466796875, 31.361053466796875, 31.361053466796875, 31.361053466796875, 31.361053466796875, 31.361053466796875, 31.361053466796875, 31.361053466796875, 31.361053466796875, 31.361053466796875, 31.24468994140625, 31.24468994140625, 31.24468994140625, 31.24340057373047, 31.143386840820312, 30.789051055908203, 30.349239349365234, 30.181533813476562, 30.043794631958008, 29.981781005859375, 29.981781005859375, 29.981781005859375, 29.87786102294922, 29.761219024658203, 29.761219024658203, 29.761219024658203 ], "content": [ "The market is flooded with VPS virtual private server hosting options .", "It s a VPS Virtual Private Server so I have root access .", "How can I deploy a Rails app to a VPS virtual private server or a dedicated-server", "I have two virtual private servers VPS : one SMTP server on Windows Server 2008 R2 and the other is my website on CentOS .", "I have a private VPS that I want to update with git .", "A virtual-machine is basically just an image that represents that machine .", "I have a vps with a shared IP .", "Selecting a VPS supplier can be tricky .", "The VPS is running on CentOS 5.8 and it has PHP 5.4.3 .", "another vps then", "VPS config", "But you say they are VPS so the sites should be not related at all living in different virtual servers .", "But after deploying it on VPS I m running through this issue .", "Sometimes I would need to run a virtual windows-8.1 in my Slackware VPS hosted by Linode .", "Check about their remote capabilities to manage your VPS .", "I don t know much about virtual hosting or xen or anything else but my understanding is that erlang would live in a virtual-machine instance alongside many other ones and I m guessing there would not be scheduling across multiple cores.. . unless the virtual-machine instance had multiple cores .", "I have a VPS running Centos and a Cpanel installation .", "For example I own www.auraquotes.com and that is running in this VPS server .", "Program runs on vps server .", "I use vps cloudatcost .", "can I install the cpan on shared or vps server or it have to be dedicated", "If I can what should I do to install it on the shared or vps server", "I have got a virtual private server with nginx Virtual Hosts setup Server Blocks .", "I have some sites hosted on my Virtual Private Server .", "Using scp to copy backups files every day from vps to your machine .", "VPS OS : Cent OS .", "Currently I have a VPS server running CentOS with DirectAdmin panel on it .", "VPS just had centOS 7 on it .", "This is my first time using vps .", "I use a VPS for my website .", "Point both domains to the ip of the VPS .", "These are applicable to most VPS with slight alterations .", "for all the websites hosted in VPS with ZPanel", "I d think sqlite could handle that.. . .. . .. . 3 I m on a shared VPS .", "project one on my local machine and I just bought and setup my first VPS .", "how will I setup DNS server in my new VPS machine and adjust the nameserver settings appropriately", "i bought VPS and i installed 3 websites .", "All my cloud VPS servers are Debian 5.0 .", "It is mainly used for editing and archiving in the backend with no frontend traffic and it is hosted on a Ubuntu VPS with 8GB memory and 4 virtual CPUs and SSD disk .", "My VPS supplier suggested another option : Virtual Appliance + rsync + SQL dump restore Any comment on that vs the CVS way.. .", "Test out their VPS for 30 days or so and give their support a test", "Check out the abilities to move servers or add more memory to your VPS .", "for VPS they are saying I will have to setup my own dns on vps and setup domain-name servers .", "My Pi opens a tunnel to the VPS on boot so I can ssh from my VPS to my Pi .", "Will Tomcat affect the other websites on the VPS", "i am having a centos vps .", "The VPN servers are installed on my VPS .", "Go with shared-hosting if and when it outgrows the shared-hosting then deal with the popularity by going with VPS Dedicated server .", "I thought about installing Xen within my virtual Slackware VPS which then would provide the layer for installing Virtualbox from where i could run the virtual win81 image .", "Just a guess but have you considered if other VPS on the same physical server may be using up the available RAM", "I know in a VPS world things are sandboxed a lot more than shared hosts but it s still nice to know they can handle loads .", "The first idea is to connect to my local computer from my VPS doing a git-pull but then the VPS would know my ip and I don t want that I m connecting to the VPS with a proxy .", "Currently I own a new VPS server and running my websites .", "In my VPS host I added a A record for that domain-name to the IP address of my VPS .", "I have several domains hosted on the VPS but I don t use the VPS as mailserver all domains are using hosted services .", "Any documentation or tutorial on setting up dns on vps", "I ve just setup xcache on a vps server .", "What is best practice for dockerizing your VPS", "Thanks Joe the CentOS is my old VPS .", "I bought a VPS server for some of my projects .", "AS I m totally inexperienced working with vps hosting and WHM .", "I have LAMP stack installed on VPS .", "I m using Apache and Django and VPS hosting .", "So yes a VPS is probably your best bet .", "The two front runners in the VPS market are Slicehost and Linode .", "I have a hostgator VPS hosting account .", "I have a VPS from godaddy and 3 sites on it .", "You need to run the HSQLDB server on the VPS .", "Now i want to run it on linux VPS .", "I have a Cent OS VPS with SSH access .", "I m setting up a brand new VPS on Bluehost .", "In vps hosting or simple vps they give you the interface where you can monitor your vps and have some options like reboot shutdown install windows.To it depends on the company where you buy .You have almost root access to your vps just open putty and connect to the vps by giving ip-address of vps and ready to go", "I forgot : my server is a VPS .", "In the beginning you will actually find that scaling a VPS solution is far far easier and more flexible than scaling on physical boxes .", "My VPS is a Debian Jessie if this information is relevant .", "Purchase a separate and independent VPS from a different vendor .", "Just to say I m new to VPS and Apache .", "I am now struck with a VPS and nothing in mind .", "I have successfully run the server on Ubuntu VPS .", "I connect to this vps via ssh and run it there on the terminal .", "I m planning them to be hosted on a VPS hosting .", "Now I m hesitating about the VPS hosting .", "I have a vps on which cPanel WHM is installed .", "I would highly recommend going with a VPS account .", "You might want to consider to NOT install Jekyll on your VPS .", "This folder can be easily transmitted through FTP to your VPS after an update .", "CloudCannon will automatically push the static site to your VPS on update .", "ii Point your domain to VPS .. . .. . 4 Now you can host your domain on VPS .", "A VPS is a much better choice for you as you get root and -- if a company does its VPS service right -- scaling is ridiculous easy .", "I migrated my wordpress blog from shared webhosting to centOS based VPS .", "I m not sure what type of system my VPS is running but it doesn t have the apt-get command .", "4 The VPS only has 512+512MB of memory .", "I have bought a virtual private server of 40 GB 2GB RAM Running on windows-server-2012 R2 from godaddy.com .", "To list VPS plans and suppliers that at least provide this basic information try CompareVPS.com http : www.comparevps.com .", "I originally grabbed a VPS from LiquidWeb after hearing some good things on forums but was terribly disappointed .", "One that i have as a development and staging server is in the A small orange http : www.asmallorange.com services vps .", "Another way to let your VPS host your Jekyll site and NOT install Jekyll is to let the guys from CloudCannon do the Jekyll part and let them connect to your VPS through FTP .", "If I go to VPS plan everything will be ok or the real problem is my table", "The 1 core CPU VPS starts sitting at 25 forever .", "I am trying navicosoft.com vps for the first time for webhosting ." ] }
{ "confidence": [ 61.066043853759766, 58.67552947998047, 58.331485748291016, 57.181053161621094, 57.088069915771484, 57.073612213134766, 57.032535552978516, 54.899662017822266, 54.83077621459961, 54.45647048950195, 53.93482208251953, 53.178157806396484, 52.14017105102539, 52.015647888183594, 52.00741958618164, 50.46320724487305, 50.46320724487305, 50.46320724487305, 50.079490661621094, 48.895729064941406 ], "content": [ "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : I also should add that this made me pretty confident that I was dealing with a good company they stood up for their competitor when they could have easily done the opposite . http : blog.servint.net 2009 07 08 why-servint-stands-beside-rackspace-and-you-should-too", "Question : I m working on a web-application and need to figure out the best way to host it . I m looking to minimize Total Cost of Ownership but it s more important to keep hosting costs low than labor costs in my case . Potentially some day it will grow quite large in terms of user-base with heavy traffic but of course it will start out pretty small . So does it make sense to start out with a low-end virtual private server hosting plan grow the server slice until it stops being cheaper than running my own servers and then buy servers and set them up at a colocation provider with all the pain of migrating everything .. . .. . -OR- .. . .. . Buy my own server set it up at a colo provider and waste most of the server capacity to start but reduce the pain in scaling from small to large significantly Has anybody tried both of these options Are there pros and cons beyond the ones I m considering Thanks . Addendum : Thanks for the suggestion but a shared-hosting account probably wouldn t cut it since I need to run persistent processes and access things like sendmail configuration-files . I m looking at either a VPS or my own server s . .. . Answer : I would highly recommend going with a VPS account . I ve had clients who have spent many thousands of dollars and countless hours trying to get a perfect dedicated hosting environment setup and then never came close to needing it s capacity . With VPS as long as you use the virtualization technology that you want to stick with it should be very easy to migrate replicate the whole server to a new dedicated box when needed . If you need SQL Server I d recommend starting with a Shared SQL Server rather than purchasing a full SQL Server license or using SQL Express . Comment : That s a good point- I hadn t thought of just moving the virtual-machine when upgrading to a dedicated solution . There would be a performance hit but it might be worth it because it makes it a lot easier to migrate . And virtualization might come in handy for development and testing anyway .", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : Check credibility on forums like http : www.webhostingtalk.com .. . .. . I am about to purchase a VPS and after some research I selected http : www.servint.com .. . .. . Many years in the market .. . Seem credible on webhostingtalk .. . Managed servers : http : www.servint.net vps faq.php 14", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : Most virtual hosting platforms will have a trial period in which you can test out their reliability . They will also give you a list of their high profile sites on their systems . Most keep track of the traffic hogs as it s a great way for them to attest their own stability . I would recommend Slicehost http : www.slicehost.com as I have been with them for over a year and love the control . They have an amazing panel in which you can console in rebuild slices and restart slices in an instance . They also allow a VERY fast and painless memory upgrade bandwidth pooling taking all of your accounts bandwidth into one large pool and they allow lots of different Linux kernel OSes . So to answer your question without sounding like a complete advertisement : .. . .. . 1 . Check about their remote capabilities to manage your VPS . 2 . Check out their largest clients and some big sites on their systems . 3 . Test out their VPS for 30 days or so and give their support a test 4 . Check out forums where people talk about services like this thread mentioning Slicehost 3 times already . 5 . Check out places and make sure people aren t complaining of overselling or crowding out servers . I know in a VPS world things are sandboxed a lot more than shared hosts but it s still nice to know they can handle loads . 6 . Check out the abilities to move servers or add more memory to your VPS . Those are things that I look for . Comment : Linode is much better and digital-ocean is much greater .", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : I ve tried quite a few of them . The only one that I can recommend wholeheartedly is Slicehost http : www.slicehost.com . They are incredibly good at what they do . I have many clients running on their systems .", "Question : null .. . Answer : I have two virtual private servers VPS : one SMTP server on Windows Server 2008 R2 and the other is my website on CentOS . The problem is that when I try to send emails not all are sent : maybe two of eight sometimes three . But when I host my website on my local machine and use fsockopen it works perfectly . Here s a sample : .. . .. . Page 1 : .. . .. . SMTPconfig.php : .. . .. . SMTPClass.php .. . .. . Please help I ve spent the past two days trying to find the problem but I can t find anything . Thank You", "Question : Is it typically possible for Erlang to use schedule across multiple cores SMP in a typical VPS-hosted situation I don t know much about virtual hosting or xen or anything else but my understanding is that erlang would live in a virtual-machine instance alongside many other ones and I m guessing there would not be scheduling across multiple cores.. . unless the virtual-machine instance had multiple cores . But if so those would probably be VIRTUAL multiple cores right So unless they map to real cores... . .. . .. . How does this work with erlang or indeed does it work with erlang in a VPS-hosted environment .. . Answer : It does not matter what kind of solution is below your OS . BEAM knows only how many cores are exposed by OS . You can chose to use all of them default when SMP or some of them or just one . Comment : Not helpful at all and does not answer the question . I know the erlang VM can use whatever cores are exposed . I want to know whether erlang works well under a typical vms cloud-type of environment .", "Question : I ve got rather poor knowledge of nix virtualization capabilities and trying to clarify one thing . If one has root on host machine does it always mean that he has root on all VMs of that host If yes then could there be a bogus setup where this is not true I m asking cause I heard two different answers to that question from two different admins . One said that he has root to everything another claimed that he don t and he needs my password . Please share your experience with VPS hosting providers do they have roots to your environment .. . Answer : You seem a little confused about how virtualization works . Consider if your question was the following : .. . .. . If I let someone sit down at my computer do they have root access A virtual-machine is basically just an image that represents that machine . It s conceptually no different than if you had your own physical machine controlled by the hosting provider . One exception could be dependent on the provider s setup process . Do they ask you for an initial root password to set up your VPS with If so they could record that but once you log into your environment for the first time if you change it they should no longer have any knowledge of it .", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : The best way to find good or bad references about a hosting service is always googling and foruns . I always look for a good support and how flexible it s service provider is . One that i have as a development and staging server is in the A small orange http : www.asmallorange.com services vps . They have even a developer package that is what i use . But i started there getting a simple cheaper hosting plan 25 dollars year and I checked their support their uptime and when i felt confident in their service i ve got a VPS . I recommend it .", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : You should try JoinVPS . It s cheap and enough reliable . Comment : you cant be serious 5 month for 64MB RAM is NOT cheap .", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : Availability is nice but even cheap solutions are usually sufficient . Thing I ve wanted most since I started having sites hosted : Shell access . It is a PAIN to do everything through FTP and web interfaces . Oh and if your app has PHP MySQL Apache IIS .Net JSP etc version requirements you ll want to check those first .", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : I ve been with ServInt for only a month but so far the experience has been great . I originally grabbed a VPS from LiquidWeb after hearing some good things on forums but was terribly disappointed . The loadtimes I was getting were awful . Though I will say that their customer service was pretty sharp . Anyways I think you d be making a good move by going with ServInt . So far the performance has been wonderful haven t really had to deal with their CS yet though . As far as unmanaged goes I ve heard Slicehost and Linode are winning that race . My 2 cents .", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : Selecting a VPS supplier can be tricky . Some warning signs : .. . .. . Suppliers that don t list the amount of guaranteed RAM you get with a VPS plan .. . Suppliers that don t list their contact information or office address a lot of the small reseller outfits just list their plans and how they want your money . Suppliers that don t mention if they own their own hardware or resell capacity from someone else . Out of a performance perspective there are a number of other things to consider : .. . .. . Being able to have your VPS located close to the majority of your customers at least in the same country .. . Cost amount of guaranteed RAM . To list VPS plans and suppliers that at least provide this basic information try CompareVPS.com http : www.comparevps.com . Comment : Very good tip on warning signs Had seen those cellar resellers many times.. .", "Question : null .. . Answer : Sometimes I would need to run a virtual windows-8.1 in my Slackware VPS hosted by Linode . Now running Virtualbox within that Slackware VPS is a nono because of Xen s paravirtualization mode that comes with Linode VPSs . I thought about installing Xen within my virtual Slackware VPS which then would provide the layer for installing Virtualbox from where i could run the virtual win81 image . Would this chain of virtual layers work in your opinion Comment : I actually just switched my Slackware VPS on Linode from Xen to KVM mode . Compiling kernel modules for VB seems to work now just loading them is impossible currently.. . any advice here", "Question : What is the right way to handle a production and development website on the same server the development code shouldn t be available until it s used for production . I m using Apache and Django and VPS hosting . What should I configure Apache- so it will have a special prefix for development stuff Django- and have some URL mangling in the urlconf or just get another VPS for development Comment : Production and development on the same server is ALWAYS wrong . The more you can separate them the better . Comment : another vps then .. . Answer : Find an old computer and stick it in your basement . you really don t need tons of horsepower for a dev machine should be able to do it for a couple hundred bucks . The problem with developing on a production machine is that you could crash processes apache with some not quite debugged yet code and affect live services even if you have configured separate subdomains or virtual-hosts . never never never develop live . -sean .. . .. . PS another VPS is a workable solution if spare hardware is not available . However you could have availability issues . Comment : thanks for explaining why it s a bad idea . Comment : in a shared-hosting enviroment where there are hundreds of users how come no one crashes the apache server Comment : generally speaking an experienced shared host will be on top of that sort of thing but yes it does happen - I have seen it . most recently with a c compiled cgi for a shopping cart - through testing we found tht if some one tries to checkout with a basket over 1 000 000.00 the cgi would hog 100 cpu and hang subsequent requests would do the same resulting in dozens of CGIs trying to hog 100 cpu forcing the whole server to a crawl all services DB mail DNS etc the processes had to be killed manually . Java is good for that sort of thing too.. . Comment : thank you very much for the insightful example . To mitigate this sort of problem would you use many little VPS-es with a load balancer if one crashes and burnes the other can continue working . You would lose only the processes on that instance not every process . Although I think it s really complicated to implement Comment : well no you would use load-balancing if you expect heavy loads the issue will turn up on all servers in the cluster eventually . the correct solution is to fix the problem in my case at least", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : I ve had good luck with Linode http : linode.com . I run Utility Mill http : utilitymill.com through them . They run great reasonable rates and there are always people able to help you in their IRC room . Back when I was researching Slicehost http : www.slicehost.com also looked very promising but they had a waiting list at that time . Comment : Slice host is not cheapest", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : I think one way is to look for ones that reputable sites use . For example I learnt about Slicehost http : www.slicehost.com through Refactor my Code http : refactormycode.com using it and I love it . : - Comment : slicehost look slick on the surface i can see why you love them Comment : It s not just on the surface I have two VPSs with them and I m very satisfied .", "Question : The market is flooded with VPS virtual private server hosting options . It seems everyone and their mother has a overloaded server in his her closet . Enterprise options always seem priced insanely high which make the ones that are cheap and claim enterprise level seem shaky . What do you look for in a quality VPS provider language support 24 hr tech etc and how if at all do you check their credibility Comment : Belongs on ServerFault . Comment : i agree i don t think it existed when originally posted . Comment : Linode.com or digitalocean.com both are great with their services and price . .. . Answer : I use rackforce . I havnt had a problem with mine but then i dont have anything large scale on it . One thing about them that is good is they are on a borderline of two powergrids and backbones . so i have heard .. . .. . Just stay away from Webserve.ca . They are HORRIBLE horrible support they mess things up slow to resolve problems . and i heard they are a reseller . I tried them a while back when i just needed something quick and didnt do any searching . Bad bad bad .", "Question : I m working on a web-application and need to figure out the best way to host it . I m looking to minimize Total Cost of Ownership but it s more important to keep hosting costs low than labor costs in my case . Potentially some day it will grow quite large in terms of user-base with heavy traffic but of course it will start out pretty small . So does it make sense to start out with a low-end virtual private server hosting plan grow the server slice until it stops being cheaper than running my own servers and then buy servers and set them up at a colocation provider with all the pain of migrating everything .. . .. . -OR- .. . .. . Buy my own server set it up at a colo provider and waste most of the server capacity to start but reduce the pain in scaling from small to large significantly Has anybody tried both of these options Are there pros and cons beyond the ones I m considering Thanks . Addendum : Thanks for the suggestion but a shared-hosting account probably wouldn t cut it since I need to run persistent processes and access things like sendmail configuration-files . I m looking at either a VPS or my own server s . .. . Answer : In the beginning you will actually find that scaling a VPS solution is far far easier and more flexible than scaling on physical boxes . Personally I use and would highly recommend Slicehost http : www.slicehost.com . You can create and destroy new slices on the fly to test out new ideas or prototype something and you re only billed for what you use . You can also instantly scale a slice by upgrading to the next level up within minutes your box is up with the new CPU and memory allocations and the cost is prorated . I recommend Slicehost because they are developer-centric and are really a great bunch of guys . Once you grow large enough to outgrow your VPS farm which will take a while trust me these VPS s can be pretty beefy these days you ll have enough cash to worry about moving to a physical platform . Comment : Do you know anything about Linode It looks like they re less expensive for performance-related metrics journal.dedasys.com 2008 11 24 slicehost-vs-linode http : journal.dedasys.com 2008 11 24 slicehost-vs-linode but quality support and responsiveness to problems is something I value too . Comment : I haven t had a need to use the customer support on Slicehost yet but they re all very active on their forums twitter their podcast their blog etc . and I ve heard great things about it . As far as Linode goes I ve heard of them but I have no idea what their support is like .", "Question : Currently I own a new VPS server and running my websites . For example I own www.auraquotes.com and that is running in this VPS server . Currently I have issues with my hosting provider and I have switched to ovh unmanaged service provider . As the name unmanaged service provider they will just help me in giving physical machines and that is all they will help . how will I setup DNS server in my new VPS machine and adjust the nameserver settings appropriately Venkat . .. . Answer : DNS is a complicated service to set up and run it is far easier to use an online DNS service who will give you a nice web front end to configure things with . The process is largely similar though you need to configure your domain registrar with the name of your DNS server or your DNS provider . From there you configure the records you need and everything should work" ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
sdwebimage@ios@56
sdwebimage -- sdwebimage is a simple image library for @placeholder which provides caching and an easy way to load remote images asynchronously into uiimageviews .
{ "confidence": [ 50.17316436767578, 50.00137710571289, 48.52940368652344, 47.07252883911133, 45.99897384643555, 45.02058410644531, 44.98588562011719, 44.1021728515625, 44.07402038574219, 43.56293487548828, 43.410186767578125, 43.3026237487793, 43.30056381225586, 43.262393951416016, 43.234153747558594, 42.83507537841797, 42.83507537841797, 42.811363220214844, 42.71427917480469, 42.58518981933594, 42.38157653808594, 42.38157653808594, 42.33207702636719, 42.25800323486328, 42.25165557861328, 41.95136260986328, 41.95136260986328, 41.916221618652344, 41.685001373291016, 41.685001373291016, 41.309661865234375, 41.305564880371094, 41.276771545410156, 41.13602066040039, 41.09392547607422, 40.953311920166016, 40.87040710449219, 40.74557113647461, 40.723045349121094, 40.41902542114258, 39.87678146362305, 39.79954147338867, 39.734832763671875, 39.515281677246094, 39.4993782043457, 39.4993782043457, 39.4993782043457, 39.4993782043457, 39.4993782043457, 39.43424606323242, 39.408287048339844, 39.045135498046875, 38.94051742553711, 38.94051742553711, 38.86551284790039, 38.86551284790039, 38.68037414550781, 38.68037414550781, 38.68037414550781, 38.68037414550781, 38.5234375, 38.44541931152344, 38.44541931152344, 37.89338684082031, 37.88381576538086, 37.669639587402344, 37.59453201293945, 37.34195327758789, 37.34195327758789, 37.34195327758789, 37.34195327758789, 37.277244567871094, 37.277244567871094, 37.23765563964844, 37.23765563964844, 37.11456298828125, 36.99909210205078, 36.99333190917969, 36.92185974121094, 36.92185974121094, 36.92185974121094, 36.873077392578125, 36.722572326660156, 36.37454605102539, 36.11650848388672, 35.990928649902344, 35.91112518310547, 35.91112518310547, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.66168212890625 ], "content": [ "To do that I use SDWebImage to asynchronously download the images .", "I have used sdwebimage for caching images .", "I am using MWPhotoBrowser which uses SDWebImage for downloading caching of images .", "One of my programs is to load webp image with SDWebImage .", "It uses Realm https : realm.io docs swift latest for the database and also SDWebImage https : github.com rs SDWebImage for image caching .", "SDWebImage does aggressive caching by default .", "SDWebImage has proven to be a really solid implementation of async image fetching and caching .", "I am trying to use SDWebImage framework for asynchronous loading and caching images .", "SDWebImage : https : github.com rs SDWebImage", "@Robert hi set the same image in uiimageview but in uibutton its not set i am using this methods github.com rs SDWebImage blob master SDWebImage https : github.com rs SDWebImage blob master SDWebImage UIButton 2BWebCache.h", "Last solution .. . .. . You can download UIActivityIndicator-for-SDWebImage https : github.com JJSaccolo UIActivityIndicator-for-SDWebImage which is easiest way to add a UIActivityView to your SDWebImage https : github.com rs SDWebImage view .", "github.com rs SDWebImage blob master SDWebImage https : github.com rs SDWebImage blob master SDWebImage SDImageCache.m L65", "-You will find the SDWebImage folder .", "I am using the SDWebImage library in order to download and cache images .", "There are method for this in SDWebImage : SDWebImage SDWebImage UIButton+WebCache.h https : github.com rs SDWebImage blob master SDWebImage UIButton+WebCache.h .. . .. . Import this file in your class : .. . .. . Use any of this method :", "I tried .. . .. . Is it possible to load an image progressively using SDWebImage .", "Solution updated for Swift 2.0 for using SDWebImage to load image URL", "So as per the above statement then answer to your question is YES SDWebImage provides feature of caching implementing it is very simple all things are provided in the mentioned link of SDWebImage .", "I am using SDWebImage library to load remote images into a table view which uses a custom cell class i have created .", "I am using SDWebImage library in order to download and cache images and from a web service asynchronously .", "One is thumbnail images already cached by SDWebImage .", "I am Using SDWebImage for Download Images .", "From SDWebImage Github https : github.com rs SDWebImage .. . .. . SDWebImage provide a UIImageView category adding web image and cache management to the Cocoa Touch framework .", "I am using SDWebImage https : github.com rs SDWebImage library for handling image cache .", "I am using SDWebImage library to download images from server .", "So I am using SDWebImage to load images into the cells .", "Use SDWebImage callbacks to load your images in queue not all at the same time .", "And so first load thumbnail using SDWebImage .", "https : github.com rs SDWebImage .. . .. . 1 .", "So nice of the SDWebImage readme to say this :", "https : github.com rs SDWebImage .. . .. . SDWebImage not able update the cached image when image updated on server with the same url .", "I m using SDWebImage https : github.com rs SDWebImage for image caching at UICollectionView https : developer.apple.com library ios documentation UIKit Reference UICollectionView class Reference Reference.html in my iOS app .", "I am using SdWebImage https : github.com rs SDWebImage for displaying images in ImageView If I use image URL directly like http : 52.74.11.56 photos 2015 07 1438154558488.jpg SDWebImage is working perfect .", "Look at the createCache method : github.com rs SDWebImage blob master SDWebImage https : github.com rs SDWebImage blob master SDWebImage SDWebImageManager.m", "Notice the SDWebImage UIImageView+WebCache.h and SDWebImage UIButton+WebCache.h .", "Yea I am aware that SDWebImage is able to cache web images however instead of providing URL of the image which I am using now I wanted to provide the asset image to SDWebImage .", "SDWebImage is very convenient especially with the progressive image download .", "SDWebImage docs https : github.com rs SDWebImage says it caches automatically .", "For more Info - SDWebImage Doc http : hackemist.com SDWebImage doc Classes SDImageCache.html overview .. . .. . Keep Enjoy Coding .", "According to the Docs http : cocoadocs.org docsets SDWebImage 3.7.5 it does the caching management .", "@ryantxr the sd setImageWithURL is a function from the library sdwebimage", "Last compiled framework is 3.6.0 and you can find it in : https : github.com rs SDWebImage releases .. . .. . For easier access the direct link-to the framework is below : https : github.com rs SDWebImage releases download 3.6 SDWebImage-3.6.framework.zip", "I also use SDWebImage https : github.com rs SDWebImage .", "Go to SDWebImage frame work download Site .", "diskCachePath is the cache of SDWebImage .", "I am using SDWebImage .", "It should be a bug in SDWebImage .", "Now switching to SDWebImage .", "The trick is integrating it with SDWebImage .", "It is not the problem of SDWebImage .", "How can I force SDWebImage to not to use disk caching", "Unable to satisfy the following requirements : .. . .. . SDWebImage 3.7 required by Podfile .. . SDWebImage 3.7.3 required by Podfile.lock .. . SDWebImage 3.7 required by DZNPhotoPickerController Core 1.6.0", "Download this Gif image by SDWebImage and use FLAnimatedImageView to show this image .", "SDWebImage does prefetch 1 previous image and next image .", "I want to set the UIButton background-image using SDWebImage .", "You can directly set image to UIButton using SDWebImage .. . .. . Or using block", "I checked the NSBundle but couldn t find the cache where the images are saved by SDWebImage .", "But now I have a problem SDWebImage return a images but the FLAnimatedImageView want a NSData .", "I used SDWEBIMAGE to display images in a UICollectionView from an API .", "It turns out that we use the MWPhotoBrowser to display the images and it uses SDWebImage .", "SDWebImage .. . .. . Similarly you re only looking at the very basic implementation of SDWebImage .", "@Robert and use this link github.com rs SDWebImage issues 117 https : github.com rs SDWebImage issues 117", "For SDWebImage 2.7.3 I did this by setting the following in Other Linker Flags in the Build Settings : -load all SRCROOT SDWebImage.framework SDWebImage .", "SDWebImage does some caching by default so it would be better to use a new URL if the image changes .", "I am using UICollectionView with SDWebImage .", "So SDWebImage can t know that images was changed on the server-side .", "@pawan is correct that would be simplest way to implement SDWebImage .", "The question is I want to put thumbnail image as a placeholder with SDWebImage .", "I am using SDWebImage to get image from url .", "You can directly use gif image by using SDwebimage lib", "But I don t know how to use SDWebImage to read a webp image in sandbox .", "I used SDWebImage only .", "It ignores the use of SDWebImage .", "Using SDWebImage 3 in an iOS 5.1 project iPad .", "Following @sergio s advise I modified SDWebImage .", "What I would wish to have is a way to tell SDWebImage to not use the placeholder if the image is in local-storage .", "My issue is similar to this one : How to get filesystem path to image cached with SDWebImage iOS http : stackoverflow.com questions 12768264 how-to-get-filesystem-path-to-image-cached-with-sdwebimage-ios .", "Instead do this : .. . .. . Alternatively you can use this https : github.com kevinrenskers SDWebImage-ProgressView library or this one https : github.com JJSaccolo UIActivityIndicator-for-SDWebImage which is referred to http : cocoadocs.org docsets SDWebImage 3.7.3 user-content-add-a-progress-indicator in the SDWebImage docs .", "AFNetworking : .. . .. . and SDWebImage .. . .. . In Xcode when I command-click the SDWebImage method it redirects me to the AFNetworking method and vice-versa .", "stackoverflow.com questions 24948480 sdwebimage-crash-in-swift http : stackoverflow.com questions 24948480 sdwebimage-crash-in-swift", "I am trying to use the classes of SDWebImage https : github.com rs SDWebImage in my project .", "I use SDWebImage in my app .", "I had a similar problem see : SDWebImage showing placeholder for images in cache http : stackoverflow.com questions 15034283 sdwebimage-showing-placeholder-for-images-in-cache 15098982 15098982 .. . .. . Basically I forked the project to resolve this .", "i am changing profile image using SDWebimage library some time it uploading .", "How can I get the sessionId when I use SDWebImage load an image", "SDWebImage is based out of NSUrlConnection which is deprecated starting iOS 9 .", "target MYAPPNAME do pod AFNetworking 2.5 pod SDWebImage 3.8 end ----------------------------------------- This is after adding pod for SDWebImage", "SDWebImage developer Olivier Poitrey answered this question for me here https : github.com rs SDWebImage issues 330 issuecomment-14854936 .", "We have used SDWebImage Lib on Our App .", "I am using SDWebImage for my iOS project .", "I m having an issue with MBProgressHUD I m using it with SDWebImage .", "Give this a try.. . .. . .. . https : github.com rs SDWebImage", "The best option will be to drag-and-drop SDWebImage folder to project .", "So my question should be targeted at SDWebImage .", "And we use SDWebImage to download and show them .", "I believe with the latest version of sdwebimage this is a better method .", "Other PODS file of SDWebImage are accessible not this one.Any one", "@Durgaprasad there is no SDWebImage related code in cellForRowAtIndexPath ." ] }
{ "confidence": [ 64.54486083984375, 58.99775314331055, 58.78537368774414, 58.71162033081055, 58.5246696472168, 58.33307647705078, 57.54949188232422, 57.40347671508789, 57.10714340209961, 56.26143264770508, 56.09043884277344, 55.80714797973633, 55.547916412353516, 55.44231414794922, 55.40044403076172, 55.30613708496094, 54.92003631591797, 54.65007019042969, 54.61528015136719, 54.5208625793457 ], "content": [ "Question : I wanted to use sdwebimage to cache image from my local album in my app written in Objective-c . Does anyone knows whether the feature has been implemented in sdwebimage and also whether someone used this in their app .. . Answer : From SDWebImage Github https : github.com rs SDWebImage .. . .. . SDWebImage provide a UIImageView category adding web image and cache management to the Cocoa Touch framework . So as per the above statement then answer to your question is YES SDWebImage provides feature of caching implementing it is very simple all things are provided in the mentioned link of SDWebImage . Comment : Yea I am aware that SDWebImage is able to cache web images however instead of providing URL of the image which I am using now I wanted to provide the asset image to SDWebImage . Comment : @Calvin provide asset image to SDWebImage sounds like providing image Name store locally or you have image in NSData format please clarify Comment : I wanted to provide an image name stored locally on the disk in an album .", "Question : I m already using AFNetworking for async image download . I was wondering if there s a way for storing on disk or Core Data should I investigate SDWebImage for that Or you would suggest to have a custom solution . Basically I would like to have a very transparent way to get images from a url so first look for them in a NSCache if not found look on disk or Core Data l if not found again download async . Thanks for any idea Comment : Not exactly a duplicate question but same answers here : stackoverflow.com questions 1130089 http : stackoverflow.com questions 1130089 lazy-load-images-in-uitableview Comment : SDWebImage is very convenient especially with the progressive image download . But it s based out of NSUrlConnection even in the latest version 3.7.5 and we know that that is deprecated starting iOS 9 . NSUrlSession has been around for 3+ years now and I think the future winner would be the one that implements NSUrlSession . AFNetworking 3.0 is completely based on NSURLSession . So I think Afnetworking would a better choice than SDWebImage . .. . Answer : SDWebImage has proven to be a really solid implementation of async image fetching and caching . If you re using your web images for buttons or imageviews you can even call the - void setImageWithURL : NSURL url methods that will check the cache get the image for you and if it s not there it will async download it and store it in the cache before setting it . If you need the images for some other stuff you can still benefit from this library by calling : .. . .. . and retrieving the image later on the delegate method : .. . .. . Note that .. . .. . does check the cache before attempting to download so it is safe to call this every time you need an image . Comment : SDWebImage is based out of NSUrlConnection which is deprecated starting iOS 9 . AFNetworking 3.0 uses NSURLSession . I think now the current choice would be AFNetworking", "Question : I am using SDWebImage for my iOS project . SDWebImage has great features to cache the picture in the memory as well as in the disk when extracting pictures based on URL . However could we also make the pictures cached by SDWebImage available in the picture galley This allows the user to view the picture they downloaded using the photo galley and also allows other apps to use the pictures as well . .. . Answer : You can get the image after SDWebImage loads it into your UIImageView like this : .. . .. . I use this library to save photos to a custom photo album : .. . .. . https : github.com Kjuly ALAssetsLibrary-CustomPhotoAlbum .. . .. . Here is sample code using this library : .. . .. . Update : You can use the ALAssetsLibrary to load images from the album as well . Here is an example : Comment : Thanks Mark . After storing the photo to a custom photo album using ALAssetsLibrary do you update the access to SDWebImage to point to your custom photo album instead Since the photo is now available locally . I believe SDWebImage has an expiration date for caching in the disk I might be wrong . Comment : Depends on your use-case really . If you are going to delete the image at the URL then this might make sense but if other people still need to access it I wouldn t bother . Comment : Might over complicate your code for not a lot of benefit . Comment : Yea I do understand . In my case I wanted to do this for several reasons . First is to prevent using double the disk usage when the image has been cached in the disk and also locally stored in the album . Apart from that the disk cache has an expiration time handled by SDWebImage therefore after the expiration SDWebImage would re-fetch the image although it has been locally stored on the phone . This would not be optimized for the user after the user has already stored a lot of images locally . The app network usages would increase in time as the user has more images downloaded . Comment : Makes sense . I ve mostly used this for social network type apps where users see a feed of photos and they have the ability to save photos to their device . After a couple of days they no longer see those same photos in their feed because they see newer images . So in my case loading from the device would be overkill . If users are viewing the same photos over and over again it would make more sense to do what you are proposing . You will need to check if it exists in the library first and if it doesn t load from the URL .", "Question : I am working on an iPhone app . In this app I have used many images and I need to store those images in cache memory . For this I have found SDWebImage is the right framework but I can not include this framework in my iPhone project . Can anyone please suggest how to include this framework in my project and how to save and retrieve images using this framework .. . Answer : Go to SDWebImage frame work download Site . https : github.com rs SDWebImage .. . .. . 1 . -Click on Zip tag and download the archive . 2 . -Unarchive the file . 3 . -You will find the SDWebImage folder . 4 . -see that path and add this folder in your project . don t forget to take copy of folder in your project instead of jusk linking . So far GOOD . Goto your view controller and add .. . .. . and use imageview method like below . You can view image even after you close and reopen the application because of caching . Even you can delete cache when you wish by .. . .. . And you can trace each image by tracing NSdictionary in sourcecode Check if you interested . And best thing is you can easily add progressbar on image view while image is under downloading . For more Info - SDWebImage Doc http : hackemist.com SDWebImage doc Classes SDImageCache.html overview .. . .. . Keep Enjoy Coding . By the way great question Even useful for beginners And thanks for rs for great framework . Comment : Keep Enjoy Coding -- amen to that . Comment : So nice of the SDWebImage readme to say this : Comment : Thank you so much . It helped me .", "Question : I m using SDWebImage https : github.com rs SDWebImage for image caching at UICollectionView https : developer.apple.com library ios documentation UIKit Reference UICollectionView class Reference Reference.html in my iOS app . Everything is fine however when user scrolls fast over the collection view there is always little pause before placeholder is replaced with cached image . I believe this is due to cache checks . For better user-experience I would like cells to show proper image instead of placeholder once image is actually cached . This would be easy if I could get local device filesystem s path of the cached image and store it at the Show instance and use it if exists instead of my placeholder . There is possibility to pass success block to the setImageWithURL method http : hackemist.com SDWebImage doc Categories UIImageView+WebCache.html api name setImageWithURL 3aplaceholderImage 3aoptions 3asuccess 3afailure 3a however the only argument it gets is UIImage http : developer.apple.com library ios documentation uikit reference UIImage Class Reference Reference.html instance actually in master branch there is also BOOL variable called cached being passed too . So - is there a possibility to get image s filesystem path straight from the UIImage instance Or should I modify SDWebImage so it pass that information along with cached instance Or is there any better way achieve goal I described earlier My Show class has imageURL and here is how show cell use SDWebImage : .. . Answer : I had a similar problem see : SDWebImage showing placeholder for images in cache http : stackoverflow.com questions 15034283 sdwebimage-showing-placeholder-for-images-in-cache 15098982 15098982 .. . .. . Basically I forked the project to resolve this . Update : .. . .. . You can just do this to avoid the flickering this works with the master branch of the project :", "Question : I am using SDWebImage library to load remote images into a table view which uses a custom cell class i have created . I simply use .. . .. . in cellForRowAtIndexPath : Now the problem is it loads images in the visible cells only and not for cells that are offscreen for which i have to scroll up and down to make them load . Is there any way i can load all images without having to scroll the table view . Thanks in advance Comment : Are you sure those cells are creating which are offscreen Do you know about the behavior of UITableView Comment : The cells are being reused Comment : Yes then which cells are offscreen then the instance method will be called for those cells It is not the problem of SDWebImage . Comment : So is this a normal behaviour that images load for only those cells that are visible onscreen Comment : Yes it is . iOS is designed in this manner to reduce use of memory . .. . Answer : I met the same problem I found UIImageView+WebCache cancel last download when a new download come . I not sure whether this is the intention of the author . So I write a new category of UIImageView base on SDWebImage . Easy to use : .. . .. . To view more : ImageDownloadGroup https : github.com maquannene MQImageDownloadGroup .. . .. . Advanced usage :", "Question : I am using SDWebImage library in order to download and cache images and from a web service asynchronously . Following is the method i use to download the images : .. . .. . It is successfully downloading the images from the web service and showing them in the tableview . However its not persisting the images between application runs . Is there anything else i need to do in order to cache the images UPDATE : KINDLY DO NOT suggest to use the following : .. . .. . Because the structure of my program is different . Secondly if you read description of the SDWebImage library HERE https : github.com rs SDWebImage you will get to know that it can be used the way i am using it using SDWebImageManager . Comment : Give cellForRow method code Comment : @Durgaprasad there is no SDWebImage related code in cellForRowAtIndexPath . Just doing this cell.thumbContainer.image item thumbnail Comment : give that method code Comment : @Durgaprasad have you checked the update with the code you asked for Comment : yes . I cant understand where cell is allocated . Also how self setThumbnail : image reflects on item thumbnail . Have you stored images in array or in cache . .. . Answer : I think you are on wrong path . If you want to use SDWebImage for UITableView Than Do Following . 1.import UIImageView+WebCache.h by following statement where u have UITableView .. . .. . import SDWebImage UIImageView+WebCache.h .. . .. . 2.Write following line in cellForRowAtIndexPath method Of UITableView .. . .. . cell.Logo setImageWithURL : finalUrl placeholderImage : UIImage imageNamed : @ imagename.png options : SDWebImageRefreshCached .. . .. . Replace LOGO with name of your image view in UITableViewCell .. . imagename.png is name of image in project which will display till image not load from internet . Comment here if u face any problem . All the best Comment : Kindly check the UPDATE in my question . Thanks Comment : OK . How you find that image is not Cacheing Comment : If i close and run the app again . The images won t show that means they are not persisted to disk Comment : OK will you tell me what value you are getting for cacheType and finished Comment : @CRDave your solution works for me..options : SDWebImageRefreshCached. . i am facing one problem that everytime i load app download images from internet . he is not using cached image so i added options : SDWebImageRefreshCached and it works", "Question : I have used sdwebimage for caching images . Now imagesArr is array of images i want to display first for all cells . I am downloading the image in background and then saving into disk so when i want those images in offline mode i can have from the disk . But in some cases when i scroll the collectionView the images are set incorrect and then again scrolling the images appear to be correct . This is the below code which i have implemented in cellForItemAtIndexPath . I have tried to debug but seems the data is coming correct and the image name is also correct . Also the collectionView is laggy in scroll . Please help me to find the issue . Comment : incorrect wrong position or just noImageThumb instead of actual image Comment : incorrect means some wrong position random image . .. . Answer : I think there are a few ways you could improve this . It seems like you re duplicating a lot of the work that SDWebImage will do for you . That library will cache images and fetch them on demand . You should look at having that library prefetch your files into cache rather then yourself attempting to prefetch and write them out to disk . Ultimately by the time you are in -cellForRowAtIndexPath you only need two cases : One for setting an image when the device is offline and then another that will either fetch or set the image from cache which SDWebImage provides for you : .. . .. . That s it . All the caching and switching you re doing isn t necessary . The other thing to be sure of is in your cell subclass method -prepareForReuse you are nilling out the image . Comment : So when there is no internet it will automatically take the image from cache image from absoluteString from the url Right Comment : Yes assuming the image is in cache .", "Question : I m already using AFNetworking for async image download . I was wondering if there s a way for storing on disk or Core Data should I investigate SDWebImage for that Or you would suggest to have a custom solution . Basically I would like to have a very transparent way to get images from a url so first look for them in a NSCache if not found look on disk or Core Data l if not found again download async . Thanks for any idea Comment : Not exactly a duplicate question but same answers here : stackoverflow.com questions 1130089 http : stackoverflow.com questions 1130089 lazy-load-images-in-uitableview Comment : SDWebImage is very convenient especially with the progressive image download . But it s based out of NSUrlConnection even in the latest version 3.7.5 and we know that that is deprecated starting iOS 9 . NSUrlSession has been around for 3+ years now and I think the future winner would be the one that implements NSUrlSession . AFNetworking 3.0 is completely based on NSURLSession . So I think Afnetworking would a better choice than SDWebImage . .. . Answer : You could have a look to EGOImage https : github.com enormego EGOImageLoading which basically makes asynchronous calls and caching of images on the file system .", "Question : I am using SDWebImage library to download images from server . https : github.com rs SDWebImage .. . .. . SDWebImage not able update the cached image when image updated on server with the same url . .. . Answer : If URL is not changed there is now way for SDWebImage to know that image has been changed on the server . Comment : Thanks for reply . The url is same when image updated on server . Problem is there When i update the image on the server and move back to previous screen then image is still same there after reloading table view . Comment : Yes image is the same because it is already cached and url is not changed . So SDWebImage can t know that images was changed on the server-side . Try Edgar http : stackoverflow.com a 28586476 4525866 solution . Comment : Yes thats the problem . But when i reload the tableview it should update the image . Comment : When you reload TableView cached images are displayed because SDWebImage cached your images internally . I mean each time you reload table view SDWebImage checks if it has cached image for particular URL and if so display it . So as long as URL is not changed image will not changed as well . Comment : If you don t have access to the server and can t change URL when image is changed the only solution I see for now is to clear SDWebImage cache for example before reloading table view .", "Question : Using SDWebImage 3 in an iOS 5.1 project iPad . We show fairly large images 700x500 and we have lots of them +1000 . We are prefetching the images and caching to disk and then allows the user browse through them . It works fine . Except that while you browse through the images you always see for an slight moment that the placeholder is displayed creating a very annoying effect . In my use-case it would be much more preferable to wait the small time to check the disk cache and process than displaying a placeholder for less than half a second it basically just blinks . My issue is similar to this one : How to get filesystem path to image cached with SDWebImage iOS http : stackoverflow.com questions 12768264 how-to-get-filesystem-path-to-image-cached-with-sdwebimage-ios . Note : the approach of trying to fine out the filesystem path of the cache is wrong in my opinion . I am just referencing it because it also explains my use-case . What I would wish to have is a way to tell SDWebImage to not use the placeholder if the image is in local-storage . If I can t do that I might need to look for other libraries I welcome advise . Note : we are also using RestKit 0.20 + AFNetworking . Comment : why don t you modify SDWebImage so that it does what you need First check if the file is cached then possibly show the placeholder.. . Comment : How about using a placeholder that is a transparent PNG - invisible placeholder . Comment : @sergio : thanks did what you suggested . .. . Answer : Following @sergio s advise I modified SDWebImage . For anybody interested there is a forked version of the project : https : github.com josea SDWebImage .. . .. . The usage is : imageView setImageWithURL : url placeholderImage : UIImage imageNamed : @ placeholder.png syncDiskLoad : YES .. . .. . I will put a pull request to the owner to see if my changes are incorporated to the master branch . Update : .. . .. . You can just do this to avoid the flickering this works with the master branch of the project :", "Question : I am using SDWebImage library to download images from server . https : github.com rs SDWebImage .. . .. . SDWebImage not able update the cached image when image updated on server with the same url . .. . Answer : Update : I ve actually written an entire guide about cache including cache validation http : outscope.net blog image-caching .. . .. . SDWebImage uses NSURLCache when you set SDWebImageRefreshCached option . Apple s URL loading system implements HTTP cache including cached responses validation . HTTP cache is quite complex however there are many beginners guides on HTTP caching : .. . .. . How To Optimize Your Site With HTTP Caching http : betterexplained.com articles how-to-optimize-your-site-with-http-caching .. . HTTP caching https : developers.google.com web fundamentals performance optimizing-content-efficiency http-caching hl en .. . .. . Basically the server needs to include some of HTTP cache-control headers in each response . There are many different strategies that can be used to implement revalidation . You may use either Last-Modified or ETag . This way each time the client sends a request it will automatically include in your request either Last-Modified or ETag value from previously cached response . If the image hasn t change the server will respond with status code 302 not modified and NSURLConnection NSURLSession will transparently give you a cached response from NSURLCache . You don t have to download the data again buy you still need to check with the server each time you make a request . You can also specify an expiration date using HTTP cache-control . If the expiration mechanism is used NSURLConnection NSURLSession will not revalidate cached response until it is not expired . For more info about HTTP cache-control see the links above . HTTP cache is a universal cache mechanism that should be used whenever possible . I would recommend to use Nuke https : github.com kean Nuke DFImageManager https : github.com kean DFImageManager framework for image loading disclaimer : writted by me . It uses NSURLCache by default while still having a memory cache that holds decompressed images .", "Question : I checked the NSBundle but couldn t find the cache where the images are saved by SDWebImage . Is the cache even enabled see code below According to the Docs http : cocoadocs.org docsets SDWebImage 3.7.5 it does the caching management . As given in docs : .. . .. . Just import the UIImageView+WebCache.h header and call the sd setImageWithURL : placeholderImage : method from the tableView : cellForRowAtIndexPath : UITableViewDataSource method . Everything will be handled for you from async downloads to caching management . .. . Answer : In your sandbox s Library folder .. . .. . Your Application ID Library Caches com.hackemist.SDWebImageCache.default", "Question : I am using the SDWebImage library to cache web images in my app : .. . .. . https : github.com rs SDWebImage blob master README.md .. . .. . Current Usage : .. . .. . My question is what happens once the image has been cached and then a couple of days later that image file on the server has been updated with a new image At the moment my application is still displaying the cached image . I can t see in any of the documentation on setting a cache timeout or something that recognises that the file size has changed . If anyone has experience using this particular library then any help would be greatly appreciated . Thanks in advance . .. . Answer : SDWebImage does aggressive caching by default . But now they give the option to respect your HTTP caching control headers and get the latest image . For this they have a new method where-in options you can pass SDWebImageRefreshCached .. . .. . You can find the complete method details and explanation here https : github.com rs SDWebImage handle-image-refresh .", "Question : I am using SDWebImage library to load remote images into a table view which uses a custom cell class i have created . I simply use .. . .. . in cellForRowAtIndexPath : Now the problem is it loads images in the visible cells only and not for cells that are offscreen for which i have to scroll up and down to make them load . Is there any way i can load all images without having to scroll the table view . Thanks in advance Comment : Are you sure those cells are creating which are offscreen Do you know about the behavior of UITableView Comment : The cells are being reused Comment : Yes then which cells are offscreen then the instance method will be called for those cells It is not the problem of SDWebImage . Comment : So is this a normal behaviour that images load for only those cells that are visible onscreen Comment : Yes it is . iOS is designed in this manner to reduce use of memory . .. . Answer : This is an example and you need to implement this for your purpose . your UITableView delegate : .. . .. . your custom UITableViewCell .h file : .. . .. . your custom UITableViewCell .m file : .. . .. . currentLoadingIndexPath needed to detect if we reuse this cell for another image instead of image which was downloaded while user scrolls the table view .", "Question : I am using SDWebImage library in order to download and cache images and from a web service asynchronously . Following is the method i use to download the images : .. . .. . It is successfully downloading the images from the web service and showing them in the tableview . However its not persisting the images between application runs . Is there anything else i need to do in order to cache the images UPDATE : KINDLY DO NOT suggest to use the following : .. . .. . Because the structure of my program is different . Secondly if you read description of the SDWebImage library HERE https : github.com rs SDWebImage you will get to know that it can be used the way i am using it using SDWebImageManager . Comment : Give cellForRow method code Comment : @Durgaprasad there is no SDWebImage related code in cellForRowAtIndexPath . Just doing this cell.thumbContainer.image item thumbnail Comment : give that method code Comment : @Durgaprasad have you checked the update with the code you asked for Comment : yes . I cant understand where cell is allocated . Also how self setThumbnail : image reflects on item thumbnail . Have you stored images in array or in cache . .. . Answer : i prefer the following method for asynchronous image downloading in tableview . Actually you don t need to handle SDWebImageManager yourself . Make sure you imported the UIImageView+WebCache.h in your implementation . The same above asynchronous image loading is also available for UIButton+WebCache.h category and MKAnnotationView+WebCache.m category . The new version of SDWebImage also supports the GIF animation using UIImage+GIF.h category .. . https : github.com rs SDWebImage Comment : Kindly check the UPDATE in my question . Of course i have imported the header and rest of your answer about gif animation is unrelated to my question . Thanks", "Question : I am using the SDWebImage library in order to download and cache images . In my application each user has an avatar which can be displayed in different shapes and sizes circle square .. . . Right now i am downloading the image and when i get it i resize it according to the image view size . But i think this approach is inefficient and specially when scrolling in a table view . Is there a different approach concerning SDWebImage that allows me to get the image in the desired size without having to resize it my self Thanks . .. . Answer : You can resize image once and store it in a cache SDImageCache . Then load it from this cache . There is no way to get the image in the desired size without having to resize it yourself unless such image of desired size exists on the server . Comment : Is it a best practice to save the same image for different sizes Comment : @rokridi If you want fast scrolling it is the only practice . Comment : according to your each time i want to show an avatar in a different size i have to download it first if not found locally and resize it before caching it.You mean that i can have the same image in cache but in different sizes . Am i correct Comment : @rokridi Yes you first download the max size image then store it in the cache f.e . with name someimage original.png then resize it and cache it with the name someimage thumb.png .", "Question : I m using SDWebView image and i want to show an Activity Indicator as placeholder while fetching the image from remote . I tried Malek s answer here How to show an activity indicator in SDWebImage http : stackoverflow.com questions 9388372 how-to-show-an-activity-indicator-in-sdwebimage but it seems that .. . .. . is deprecated . Is there anyone using this library that could tell me how can i insert an Activity Indicator while loading the image EDIT .. . .. . Following the indications of Michael Frederick i ended up with this code and everything s working fine . Comment : use AsyncImageView : Comment : Did you get it working with the placeholder image Comment : I opted to have only a spinner instead of the image and yes it worked .. . Answer : Solution updated for Swift 2.0 for using SDWebImage to load image URL", "Question : I m using SDWebView image and i want to show an Activity Indicator as placeholder while fetching the image from remote . I tried Malek s answer here How to show an activity indicator in SDWebImage http : stackoverflow.com questions 9388372 how-to-show-an-activity-indicator-in-sdwebimage but it seems that .. . .. . is deprecated . Is there anyone using this library that could tell me how can i insert an Activity Indicator while loading the image EDIT .. . .. . Following the indications of Michael Frederick i ended up with this code and everything s working fine . Comment : use AsyncImageView : Comment : Did you get it working with the placeholder image Comment : I opted to have only a spinner instead of the image and yes it worked .. . Answer : Last solution .. . .. . You can download UIActivityIndicator-for-SDWebImage https : github.com JJSaccolo UIActivityIndicator-for-SDWebImage which is easiest way to add a UIActivityView to your SDWebImage https : github.com rs SDWebImage view . Using CocoaPods just add this line to your podfile : .. . .. . You can use one of these lines depending on your preferences : .. . .. . Example of Use .. . .. . Just import .. . .. . and use this code Comment : Indeed Back in the day there wasn t this solution . But +1 for newer solution Comment : just tried it works perfectly .", "Question : I checked the NSBundle but couldn t find the cache where the images are saved by SDWebImage . Is the cache even enabled see code below According to the Docs http : cocoadocs.org docsets SDWebImage 3.7.5 it does the caching management . As given in docs : .. . .. . Just import the UIImageView+WebCache.h header and call the sd setImageWithURL : placeholderImage : method from the tableView : cellForRowAtIndexPath : UITableViewDataSource method . Everything will be handled for you from async downloads to caching management . .. . Answer : Search below line of code in your project . diskCachePath is the cache of SDWebImage ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
swiperefreshlayout@android@110
swiperefreshlayout -- swiperefreslayout is a standard way to implement the common pull-to-refresh pattern in @placeholder .
{ "confidence": [ 42.00239181518555, 33.40605163574219, 33.40605163574219, 31.880714416503906, 30.805984497070312, 30.659679412841797, 29.108848571777344, 29.096580505371094, 28.339195251464844, 28.287967681884766, 28.105243682861328, 27.964767456054688, 27.61651611328125, 27.05736541748047, 27.05736541748047, 26.501129150390625, 26.23507308959961, 26.223148345947266, 26.223148345947266, 26.223148345947266, 26.083972930908203, 26.053415298461914, 26.053415298461914, 26.053415298461914, 25.847049713134766, 25.805208206176758, 25.494266510009766, 25.494266510009766, 25.494266510009766, 25.102787017822266, 25.102787017822266, 25.102787017822266, 25.102787017822266, 25.029382705688477, 25.01644515991211, 25.01644515991211, 25.013587951660156, 24.85940170288086, 24.677959442138672, 24.671972274780273, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.660049438476562, 24.604846954345703, 24.581668853759766, 24.542861938476562, 24.491039276123047, 24.457298278808594, 24.457298278808594, 24.457298278808594, 24.457298278808594, 24.457298278808594, 24.396955490112305, 24.222742080688477, 24.163331985473633, 24.163331985473633, 24.163331985473633, 24.163331985473633, 24.163331985473633, 24.163331985473633, 24.019821166992188, 24.019821166992188, 24.019821166992188, 23.8035831451416, 23.773611068725586, 23.74387550354004, 23.730182647705078, 23.730182647705078, 23.623079299926758, 23.623079299926758, 23.623079299926758, 23.58519744873047, 23.58519744873047, 23.58519744873047, 23.539688110351562, 23.539688110351562, 23.539688110351562, 23.539688110351562, 23.539688110351562, 23.539688110351562, 23.539688110351562, 23.539688110351562, 23.539688110351562, 23.539688110351562, 23.539688110351562, 23.52540397644043, 23.214462280273438, 23.19094467163086 ], "content": [ "I m trying to implement pull down to refresh and I am using SwipeRefreshLayout .", "When SwipeRefreshLayout shows this SwipeProgressBar the refresh mode enabled .", "It is possible with SwipeRefreshLayout to replace the Refresh icon with text", "How do I add a hint on the top of a listView like Pull down to refresh which is contained in a swipeRefreshLayout from android.support.v4 .", "A little swipe down will trigger the SwipeRefreshLayout refresh too .", "If you want to be able to pull refresh the empty view you ll have to put the FrameLayout that includes the ListView and the EmptyView inside the SwipeRefreshLayout .", "Is there any way to trigger the SwipeRefreshLayout programmatically", "Why those CardViews will flash one second when pull down to refresh data which is using SwipeRefreshLayout can I stop this effect", "SwipeRefreshLayout let me scroll down but on scroll up it triggers the refresh progress .", "I am trying to implement a SwipeRefreshLayout in one of my application s fragments but for unknown reasons I cannot seem to get my fragment to call the OnRefresh method when I pull-to-refresh .", "I am using a SwipeRefreshLayout to refresh the content .", "I am trying to implement pull-to-refresh and endless scroll on recyclerview .", "But if user scrolls up layout and after scrolls down then SwipeRefreshLayout enables a refresh mode although layout was not scrolled at the top .", "I working with SwipeRefreshLayout .", "Use PullRefreshLayout instead SwipeRefreshLayout .", "And layout should look like this : .. . .. . Move ProgressWheel out of your SwipeRefreshLayout to fix your problem that SwipeRefreshLayout can t refresh .", "WHen I use AndroidSwipeLayout + pull-to-refresh there is some bag .", "You currently have it in your SwipeRefreshLayout", "this is just a simple SwipeRefreshLayout with the default Icon .", "extend the SwipeRefreshLayout and put the above code", "I have used SwipeRefreshLayout with recyclerview Its working fine in all android version but in Kitkat when i pull down then SwipeRefreshLayout loader not going up and also doesn t refresh recyclerview data but working in lollipop .. . .. . I am using com.android.support : support-v4 : 22.2.1 .. . .. . Edit 1 .. . .. . Layout Code", "If the ListView is the 1st direct child of the SwipeRefreshLayout refresh won t be triggered before scrolling back to the top of the ListView .", "you said it yourself you are using SwipeRefreshLayout. . it is used in order to swipe to refresh it s not designed capable to achieve your goal .", "The search fragment contains a listview to display the results and that listview is inside a SwipeRefreshLayout so that the user can refresh the search results .", "I m using SwipeRefreshLayout to refresh some information and refreshing working perfect.but i have one question.is it a possible to moving layout which is a inside SwipeRefreshLayout .", "I ve got Android s SwipeRefreshLayout working and am trying to customize the colors across all the pull to refreshes throughout the app .", "I m having an issue with the SwipeRefreshLayout .", "Here is the XML to that fragment with the SwipeRefreshLayout :", "The problem is the place of SwipeRefreshLayout .", "I used SwipeRefreshLayout on Wrong XML file .", "To solve this problem I have to wrap the ListView into SwiperefreshLayout .", "Running my app with SwipeRefreshLayout is causing the app to crash .", "This is actually a known issue with SwipeRefreshLayout in appcompat 21.0.0 .", "If you put a View that doesn t implement ScrollingView or isn t an AbsListView into SwipeRefreshLayout SwipeRefreshLayout canChildScrollUp always returns false .", "It triggers the swipeRefreshLayout OnRefreshListener .. . .. . I am also experiencing odd visual behavior when I do try and do a refresh .", "Whenever I swipe down to refresh I get a NullPointerException but it s not in my code rather in the startRefresh method from SwipeRefreshLayout .", "I check SwipeRefreshLayout setRefreshing not showing indicator initially http : stackoverflow.com questions 26858692 swiperefreshlayout-setrefreshing-not-showing-indicator-initially and Android ProgressBar styled like progress view in SwipeRefreshLayout http : stackoverflow.com questions 35295115 android-progressbar-styled-like-progress-view-in-swiperefreshlayout but none of this answers worked for me .", "I want to implement scroll to refresh functionality with a listView .", "Yes i am. . when i pull down again to refresh then it stuck on screen i can pull it up by dragging.. .", "I can see that first pull-to-refresh and then swipeToDismiss does not work .", "A fragment contain SwipeRefreshLayout and a RecycleView inside .", "In fragment OnCreatedView call the activity swipeRefreshLayout .", "Try making the SwipeRefreshLayout the root element .", "I use a ListView inside SwipeRefreshLayout .", "Why is there a RelativeLayout between the RecyclerView and the SwipeRefreshLayout", "Shouldn t the SwipeRefreshLayout be the direct parent of the RecyclerView", "I have SwipeRefreshLayout inside a RelativeLayout .", "No hacks needed everything is in the SwipeRefreshLayout as it should be .", "And the code of the Fragment containing the Recycler and the SwipeRefreshLayout .", "I m trying to use SwipeRefreshLayout with WebView .", "What if the SwipeRefreshLayout is not directly inside the CoordinatorLayout", "I ve a ViewPager with fragments in it using the SwipeRefreshLayout", "remove swipeRefreshlayout recycleview show normally", "I am using swiperefreshlayout for pulltorefresh .", "Same solution just a bit easier to read here at end of post : yassirh.com 2014 05 how-to-use-swiperefreshlayout-the-right-way https : yassirh.com 2014 05 how-to-use-swiperefreshlayout-the-right-way", "I m trying to implement SwipeActionAdapter in a listview but I have a problems when ScrollUp the Listview with SwipeRefreshLayout .", "Make your own implementation of SwipeRefreshLayout and override the canChildScrollUp in this way : .. . .. . just replace with any subclass of ScrollView .", "i want to implement pull-to-refresh for full page right now i mange to do in .", "It appears to be a bug in SwipeRefreshLayout .", "It is because there is a bug in SwipeRefreshLayout", "I m using SwipeRefreshLayout .", "There is a SwipeRefreshLayout where the ListView is contained .", "Without SwipeRefreshLayout is working fine : .. . .. .", "Please post the full xml for this layout and the other layout as I don t see your SwipeRefreshLayout .. . for reference SwipeRefreshLayout can only have 1 child view .", "Since the ListView becomes a child of the SwipeRefreshLayout the padding should be set to the SwipeRefreshLayout instead of the ListView like I had been before I switched to using SwipeRefreshLayout .", "But whenever I put the swipeRefreshLayout RecycleView does not appear it function normally without SwipeRefreshLayout .", "I want to disable the SwipeRefreshLayout in the landscape mode when screen rotates the SwipeRefreshLayout must disable automatically .", "Android - SwipeRefreshLayout with empty textview http : stackoverflow.com questions 22964934 android-swiperefreshlayout-with-empty-textview 23025336 23025336", "In order for SwipeRefreshLayout to work it needs to be the direct parent of your ListView and the ListView should be the first active child view of the SwipeRefreshLayout .", "You can solve this by extending SwipeRefreshLayout with a custom SwipeRefreshLayout that takes in the WebView and use the WebView to check the scrollY position .", "When swipe begin i disable the SwipeRefreshLayout and when swipe finish i enble the swipeRefreshLayout .", "At some point the user can refresh the layout so I decided to use the SwipeRefreshLayout class since its both more practical and more elegant .", "as a Title said .. . .. . swipe down to refresh Layout but stick the Layout not move it down along swipe gusture .. . .. . Thank you - I m using SwipeRefreshLayout", "When scrolling to the right or left the SwipeRefreshLayout view caches the touch prevents the HorizontalScrollView from receiving it and starts scrolling vertically to perform the refresh .", "When I pull down the SwipeRefreshLayout pulls down as it should but as soon as I remove my hand it jumps back to the top of the first item in the RecyclerView .", "So I use SwipeRefreshLayout but now also I am not able to refresh my RecyclerView .", "I have used the SwipeRefreshLayout of v4 support library according to the following way : .. . .. . In this strategy if I pull down the screen when first list item is visible then onRefresh method is called .", "After using Pull To Refresh when I swipe some another row previous row doesnt closing automatically .", "Only its showing that refresh circular arrow But i want to pull down that whole Red color layout .", "Customize the SwipeRefreshLayout would solve the problem .", "Set the scroll behavior to the SwipeRefreshLayout not the RecyclerView .", "I implemented SwipeRefreshLayout in my app .", "I removed the background definition from the SwipeRefreshLayout and added it into the LinearLayout . it worked for me .", "Too bad this solution involves copying the whole code of the SwipeRefreshLayout class .", "Instead of setting paddingTop on the SwipeRefreshLayout setting the layout marginTop will make the progress-bar visible :", "ListView inside SwipeRefreshLayout inside FrameLayout does not work", "Wrapping the SwipeRefreshLayout inside a FrameLayout solved this for me .", "I have a ListView that has a SwipeRefreshLayout implemented on it .", "The bigger issue however is that it seems to intercept the touches for the SwipeRefreshLayout .", "Source - http : nlopez.io swiperefreshlayout-with-listview-done-right", "SwipeRefreshLayout must contain a child to work properly .", "Using SwipeRefreshLayout with RecyclerView will not scroll down the list .", "if you are using the new swipeRefreshLayout intoduced in 5.0", "Then include a public function in the Fragment to enable disable the SwipeRefreshLayout .", "Could not fixed it having an include layout inside of the SwipeRefreshLayout", "I solved it by extending SwipeRefreshLayout and overriding its onInterceptTouchEvent .", "When I scroll down the list and pull up those cardViews I just want to disable swipeRefreshLayout .", "Instead SwipeRefreshLayout is getting call .", "and .. . .. . use this you was implement swipe to refresh on whole fragment including listView ." ] }
{ "confidence": [ 40.54739761352539, 40.27808380126953, 39.76426315307617, 39.61064910888672, 39.25645065307617, 39.1241455078125, 38.424041748046875, 38.05046844482422, 37.71910858154297, 37.680938720703125, 37.62105178833008, 37.229671478271484, 36.386104583740234, 36.05059814453125, 35.93647766113281, 35.70553970336914, 35.61662673950195, 34.92354202270508, 34.775665283203125, 34.58926773071289 ], "content": [ "Question : I working with SwipeRefreshLayout . Here what my need is.. . Im using one Linearlayout inside SwipeRefreshLayout which is in RED COLOR . when im trying to pull down that layout that layout is not moving . Only its showing that refresh circular arrow But i want to pull down that whole Red color layout . How to achieve this Please find my sources for reference . Suggestion please... . .. . .. . mylayout.xml .. . .. . MyClass.java .. . Answer : Use PullRefreshLayout instead SwipeRefreshLayout . Visit this sample https : github.com baoyongzhang android-PullRefreshLayout .. . .. . Im little bit happy that i ve found solution for my own issue . LOL", "Question : I have used SwipeRefreshLayout with recyclerview Its working fine in all android version but in Kitkat when i pull down then SwipeRefreshLayout loader not going up and also doesn t refresh recyclerview data but working in lollipop .. . .. . I am using com.android.support : support-v4 : 22.2.1 .. . .. . Edit 1 .. . .. . Layout Code Comment : Do you call swipeRefreshLayout.setRefreshing false when loading data is finished Comment : Yes i am. . when i pull down again to refresh then it stuck on screen i can pull it up by dragging.. . Comment : Could you attach the code Comment : The code seems to be ok . Do you call setRefreshing false even if the request fails Comment : yup.. . i call it .. . Answer : As per swipeRefreshDocumentation SwipeRefreshLayout does not play well with layout that are not scrollable if added inside it : you have 2 solution for this : .. . .. . 1 change your layout to make swipeRefreshLayout to have direct child as recyclerView . something like this : .. . .. . 2 Extend SwipeRefreshLayout with listener to be able to add various conditions from the classes that display this layout . Something like the following : RefreshSwipeRefreshLayout.java .. . .. . and Then do this in class that displays SwipeRefreshLayout containing recyclerView layout you can do something like this : .. . .. . .. . .. . Also dont forget to change it in xml", "Question : I have used SwipeRefreshLayout with recyclerview Its working fine in all android version but in Kitkat when i pull down then SwipeRefreshLayout loader not going up and also doesn t refresh recyclerview data but working in lollipop .. . .. . I am using com.android.support : support-v4 : 22.2.1 .. . .. . Edit 1 .. . .. . Layout Code Comment : Do you call swipeRefreshLayout.setRefreshing false when loading data is finished Comment : Yes i am. . when i pull down again to refresh then it stuck on screen i can pull it up by dragging.. . Comment : Could you attach the code Comment : The code seems to be ok . Do you call setRefreshing false even if the request fails Comment : yup.. . i call it .. . Answer : I have had the same issue before . It seems to happen when you don t have your RecyclerView as a direct child of your SwipeRefreshLayout . We fixed this issue by using a custom SwipeRefreshLayout like this one : .. . .. . Then instead of using android.support.v4.widget.SwipeRefreshLayout use your own com.example.app.FixedSwipeRefreshLayout like this : .. . .. . And finally when you get a handle of your SwipeRefreshLayout use your custom one and set your RecyclerView : .. . .. . Hope this helps .", "Question : I have used SwipeRefreshLayout with recyclerview Its working fine in all android version but in Kitkat when i pull down then SwipeRefreshLayout loader not going up and also doesn t refresh recyclerview data but working in lollipop .. . .. . I am using com.android.support : support-v4 : 22.2.1 .. . .. . Edit 1 .. . .. . Layout Code Comment : Do you call swipeRefreshLayout.setRefreshing false when loading data is finished Comment : Yes i am. . when i pull down again to refresh then it stuck on screen i can pull it up by dragging.. . Comment : Could you attach the code Comment : The code seems to be ok . Do you call setRefreshing false even if the request fails Comment : yup.. . i call it .. . Answer : You try this way", "Question : I working with SwipeRefreshLayout . Here what my need is.. . Im using one Linearlayout inside SwipeRefreshLayout which is in RED COLOR . when im trying to pull down that layout that layout is not moving . Only its showing that refresh circular arrow But i want to pull down that whole Red color layout . How to achieve this Please find my sources for reference . Suggestion please... . .. . .. . mylayout.xml .. . .. . MyClass.java .. . Answer : Instead for using a ScrollView as child of SwipeRefreshLayout try using a Relativelayout LinearLayout and make the ScrollView a child of it . something like this : .. . .. . Also apply the red color to your LinearLayout . You currently have it in your SwipeRefreshLayout Comment : but still that red color whole layout is not moving : Comment : any other solutions or ideas Comment : Please note that i ve edited my answer . I removed the background definition from the SwipeRefreshLayout and added it into the LinearLayout . it worked for me . Please also check this answer - stackoverflow.com questions 25294395 http : stackoverflow.com questions 25294395 swiperefreshlayout-with-scrollview-and-layout-above rq 1 I belive your ScrollView might be the problem", "Question : I working with SwipeRefreshLayout . Here what my need is.. . Im using one Linearlayout inside SwipeRefreshLayout which is in RED COLOR . when im trying to pull down that layout that layout is not moving . Only its showing that refresh circular arrow But i want to pull down that whole Red color layout . How to achieve this Please find my sources for reference . Suggestion please... . .. . .. . mylayout.xml .. . .. . MyClass.java .. . Answer : Your ScrollView should not wrap content on its height but match parent Comment : i ve followed your suggestion..but still can t able to move that layout . any other solutions or ideas", "Question : I have used the SwipeRefreshLayout of v4 support library according to the following way : .. . .. . In this strategy if I pull down the screen when first list item is visible then onRefresh method is called . enter image description here http : i.stack.imgur.com 2OX86.png .. . .. . This is called pull down to refresh . But I want the reverse effect . That is if I pull up the screen when last list item is visible then a method should be called or it should be notified anyway . Is it possible If possible please provide me the way . Comment : Can I ask you why do you want to accomplish that behaviour Comment : I want these because if number of data is huge and these data are loaded from server then I will load some data first time and more data will be loaded on pull up behaviour Comment : Then you should look for Endless Scroll Listener there are some libraries out there or you can write your own onScroll implementation of OnScrollListener to accomplish that . Comment : @KanchanChowdhury see my answer below otherwise Grender is right you have to used Endless Scroll Listener . Comment : Thanks Grender Harshad . I will check it . .. . Answer : you said it yourself you are using SwipeRefreshLayout. . it is used in order to swipe to refresh it s not designed capable to achieve your goal . the way I see it you ll have to write your own custom view .", "Question : I am using the following code in this fragment : .. . .. . And I have the following layout : .. . .. . The first time it starts it make it correctly I see the progress rolling until it finishes the proccess . But then everytime I swipe down it starts updating but I don t see the progress-bar . I check SwipeRefreshLayout setRefreshing not showing indicator initially http : stackoverflow.com questions 26858692 swiperefreshlayout-setrefreshing-not-showing-indicator-initially and Android ProgressBar styled like progress view in SwipeRefreshLayout http : stackoverflow.com questions 35295115 android-progressbar-styled-like-progress-view-in-swiperefreshlayout but none of this answers worked for me . .. . Answer : If you want to be able to pull refresh the empty view you ll have to put the FrameLayout that includes the ListView and the EmptyView inside the SwipeRefreshLayout . Also set android : clickable true in the FrameLayout .. . .. . try this code : .. . .. . credit to antoinem http : stackoverflow.com users 2631260 antoinem .. . .. . EDIT .. . .. . In case you have problem in scrolling up your list . That everytime you scroll up in that view SwipeRefreshLayout fires and updates making your app unable to scroll up in a list . Add this code in your Activity or fragment : .. . .. . credit to this post by Nacho Lopez http : nlopez.io swiperefreshlayout-with-listview-done-right", "Question : I m trying to implement pull down to refresh and I am using SwipeRefreshLayout . But it s malfunctioning . When I pull down the SwipeRefreshLayout pulls down as it should but as soon as I remove my hand it jumps back to the top of the first item in the RecyclerView . Halve of the loader hides behind the toolbar and the other half is visible on top the first item in recyclerview . If I pull down again it doesn t work . enter image description here http : i.stack.imgur.com tEWIL.png .. . .. . My Layouts .. . .. . activity main.xml .. . .. . app bar main.xml .. . .. . nav header main.xml .. . .. . content main.xml .. . .. . MainActivity .. . .. . AndroidManifest.xml .. . .. . Styles.xml .. . .. . Styles-21 .. . .. . Please what s the problem and how do I correct it Comment : can you post a screen shot Comment : What version of the Support Library are you using Have you tried it with the latest 23.3.0 Comment : @ianhanniballake no it s 23.2.1 Comment : So what happens if you use 23.3.0 Comment : @ianhanniballake Haven t tried it . .. . Answer : Can you try this on the onCreated method of your MainActivity.java . Basically I just placed the referencing of the Toolbar after setContentView . Also your content main.xml can you try enclosing it with a FrameLayout . I m out of ideas after this . Unless you are willing to try and use Fragments which is what I usually use and it works fine so far . Comment : It s showing now . I applied topMargin of 60dp to SwipeRefreshLayout and it s showing now . But there is another problem : After the data has been successfully fetched and parsed the SwipeRefreshLayout remains on the screen it doesn r go away . Comment : Try mSwipeRefreshLayout.post new Runnable @Override public void run mSwipe.setRefreshing false when you want to hide the swiperefreshlayout . Comment : Thanks it worked", "Question : I am using a SwipeRefreshLayout and an EnhancedListView to combine them like GMAIL-App . When I start to swipe horizontal I am still be able to swipe vertical . In this case the animation from EnhancedListView stuck and do not reset or swipe till the end if I do not complete the vertical SwipeRefreshLayout swipe . I can see that first pull-to-refresh and then swipeToDismiss does not work . Only first swipe and then refresh . So i guess it is about beeing a parent element . Possible Solution i thought about : Check for horizontal scrolling and disable SwipeRefreshLayout with swipeL.setEnabled false When finished swipeL.setEnabled true But I can not find where to disable and enable it . My Layout : .. . .. . My Code : .. . Answer : Nowsaday I know the answer of my own question . It is not a problem with my code it is a problem with SwipeRefreshView . There is a similar question with the same Problem I found here : SO-Answer http : stackoverflow.com a 23989911 3275149", "Question : I started converting the old ProgressDialog in my Asynctask to SwipeRefreshLayout . the ProgressDialog insured that the UI freezes till the Asynctask is fully done . how to freeze the UI when using SwipeRefreshLayout if there is any need to freeze it Comment : Not getting the problem exactly what you want make it clear than only can help . Comment : please check my edited question Comment : ok so please post your asynctask too so make question completely understandable and to find where you doing wrong and don t think so you need to use async for swipe to refresh Comment : @AjayPandya I think what she wants is that just as when the progress dialog is in view so the screen is dimmed and the views behind the progress dialog cannot be clicked . In other words dialog is not cancel able . Comment : not a problem in the code but if i try to trigger any AsyncTask from swipeRefresh the UI must freeze i have no idea how to implement this idea .. . Answer : You can use a work around . When you pull-to-refresh show a dialog and change the visibility of the views to invisible so you will get the screen dimmed and you can close the dialog once the refresh is done .", "Question : SwipeRefresh is not working after setting an empty view for listview which is the only child of a SwipeRefresh layout . How to solve this issue Comment : I have found the solution . We need to set android : clickable true for an empty view then it works fine . Comment : Can you post the XML of your layout I m facing the same problem and can t seem to have it work with your solution . Comment : I have added empty view But I cannot swipe down this empty view to refresh . Can I get the solution for this. . Thanks in advance . Comment : @Dinesh you should post your solution as an answer and accept it - that s a common SO practice . Ideally with xml example . .. . Answer : I had this issue too and solved it without any additional code in the activity by using the layout below . If you are using a ListActivity or ListFragment it handles showing hiding the empty view for you and refreshing works with an empty list as well with this layout structure . No hacks needed everything is in the SwipeRefreshLayout as it should be . Hope this helps you . If so don t forget to accept the answer . Note : this is a duplicate of my answer to this question http : stackoverflow.com questions 30818097 android-swiperefreshlayout-with-empty-textview-not-working-properly 31448926 31448926 but that question is pretty much a duplicate of this question.. . : .. . .. . UPDATE .. . If the SwipeRefreshLayout is activated too early you can implement ListView.OnScroll with : .. . .. . This disables the refresher until you scrolled to the top . This is only needed when using a ListView the new RecyclerView works as expected . Comment : for me it s causing problems with scrolling Comment : What problems exactly Have you implemented the viewholder pattern Comment : Yes I did . The problem was that when scrolling list down the swipe-refresh was being activated too early . CustomSwipeRefreshLayout described below works properly .", "Question : I m having an issue with the SwipeRefreshLayout . I have a list view within the layout and every time I scroll upward in the list view the swipe to refresh layout is tiggered and you can never scroll back to the top of the layout . Anyone have any ideas .. . Answer : I found an answer to my question . I am manually enabling the swipeRefreshLayout when the first child in the listview is at the top of the list . Comment : Thanks Emerging Android Developer the above snippet solved the problem Comment : Thanks I have the same Problem with Api 10 .. . its not in newer Apis . Seems to be a bug Comment : Same solution just a bit easier to read here at end of post : yassirh.com 2014 05 how-to-use-swiperefreshlayout-the-right-way https : yassirh.com 2014 05 how-to-use-swiperefreshlayout-the-right-way Comment : This works fine if the ListView is the only child of the SwipeLayout but if there are other views in addition to the ListView and you want to enable the SwipeLayout if there is a touch and pull in any other location besides the ListView then this solution will not work . Comment : What is expandableListView", "Question : I want to implement scroll to refresh functionality with a listView . Also there are other view elements in the same layout file which are displayed if the list is empty . Here is my layout file . The problem is that when I scroll down and then try to scroll up instead of scrolling all the way to the top and then refreshing it just refreshes there and scroll up is not working . This is my onScroll method . .. . Answer : In order for SwipeRefreshLayout to work it needs to be the direct parent of your ListView and the ListView should be the first active child view of the SwipeRefreshLayout . The documentation for SwipeRefreshLayout says that the ListView should be the only child but it is okay if it has more than one child as long as the ListView is first . This means for instance that SwipeRefreshLayout will work fine if you are using an adapter with a view for empty . For example : .. . .. . If you can manage this sort of layout then SwipeRefreshLayout will work fine and you won t need any of the workarounds listed in other answers . My own problem was that that I was loading my ListView as a Fragment so I actually had : .. . .. . So the SwipeRefreshLayout was choosing the FrameLayout as it s target and its default canChildScrollUp implementation was always returning false . Once I moved the SwipeRefreshLayout inside the Fragment everything started working correctly .", "Question : null .. . Answer : I am using ViewPager with FragmentStatePagerAdapter . Some of the fragments added are having SwipeRefreshLayout v4 library . As soon as the swipe to refresh started we are displaying a ProgressDialog which is not cancellable . Between the pull-to-refresh and displaying dialog It has little time to allow the user to swipe left right where user can navigate to other tabs . In this case As soon as the service response received trying to bind the values for detached fragment and crashing . I can stop that data-binding and crash . But I want to know if there is a way to avoid user navigation between pull-to-refresh and displaying ProgressDialog . So that i can use this as a generic solution .", "Question : How do I add a hint on the top of a listView like Pull down to refresh which is contained in a swipeRefreshLayout from android.support.v4 . The pull down to refresh works but I want to add a text whenever the user pulls the listview slightly down . Comment : I want the same thing like this... . Comment : Any Update on this Q .. . Answer : .. . .. . EDIT 10 21 2014 .. . .. . If you update the support-v4 to the latest version at least 21.0.0 you can use the built-in loading indicator .. . .. . I just came up with a simple yet effective solution . The idea is to add a custom ViewGroup that grows its height when the SwipeRefreshLayout child gets pulled down . In this ViewGroup you will put everything you need for your hint TextViews ImageViews .. . . I chose to extend a RelativeLayout because it makes easier to position your hint elements . 1 Create a custom widget as follows : .. . .. . 2 In your Fragment or Activity layout use this custom widget . 3 Then in your Activity onCreate or in your Fragment onCreateView put those lines : .. . .. . Done Comment : There is one minor issue though . The layout does not wait for the user to release the listview after pulling down before starting to refresh itself . Only if you could correct that . Comment : Also it would be great if the text could be shown in the action bar instead of below it just like the stock e-mail app in Kitkat . Comment : Hi Paul For the first question : The automatic starting of the refresh is hardcoded in the library . If you want to customize it you have to extend SwipeRefreshLayout and override onTouchEvent . For the second question : What you ask is a bit tricky . The ActionBar hasn t helper method to allow such animations . Using a solution similar to the one i proposed you can lay a view over the ActionBar and proportionally animate its showing behavior . See link stackoverflow.com questions 15279647 http : stackoverflow.com questions 15279647 display-view-on-top-of-action-bar Comment : Pure genius The only thing that I changed is that SwipeRefreshHintLayout extends LinearLayout because relative layout didn t work for me . Thanks Comment : Thank you @Rotem", "Question : I have two fragments in my activity I navigate between them using fragment transaction : .. . .. . 1 . list of subjects .. . 2 . subject detail - list of grades .. . .. . Subject Fragment layout : .. . .. . The listener for the swipeRefreshLayout is the activity . It triggers an AsyncTask which downloads new data notifies fragments that the data has changed and hides the swipeRefreshLayout . The problematic part of the onPostExecute method : .. . .. . It normally works but not in this case : .. . .. . I pull-to-refresh data .. . I navigate to the subject detail using fragment transaction .. . The setRefreshing method is called during the fragment transaction .. . .. . In this case the subject fragments just hangs there and both fragments are in the activity . Code of SubjectFragment : .. . .. . How can I setRefreshing false on a refreshLayout and avoid getting the subjects fragment twice Comment : could you post ur onCreate of the first fragment Comment : @PhanDinhThai I updated the question . .. . Answer : I found a similar question on SO : .. . .. . When switch fragment with SwipeRefreshLayout during refreshing fragment freezes but actually still work http : stackoverflow.com questions 27057449 when-switch-fragment-with-swiperefreshlayout-during-refreshing-fragment-freezes .. . .. . I use appcompat-v7 : 23.3.0 . This answer worked for me : .. . .. . This issue seems to still be occurring in appcompat 22.1.1 . Wrapping the SwipeRefreshLayout inside a FrameLayout solved this for me . So my subject fragment layout looks like this :", "Question : I m using the new RecyclerView-Layout in a SwipeRefreshLayout and experienced a strange behaviour . When scrolling the list back to the top sometimes the view on the top gets cut in . List scrolled to the top http : i.stack.imgur.com z8guv.png .. . .. . If i try to scroll to the top now - the Pull-To-Refresh triggers . cutted row http : i.stack.imgur.com ZKz34.png .. . .. . If i try and remove the Swipe-Refresh-Layout around the Recycler-View the Problem is gone . And its reproducable on any Phone not only L-Preview devices . That s my layout - the rows are built dynamically by the RecyclerViewAdapter 2 Viewtypes in this List . Here s the Adapter . And the code of the Fragment containing the Recycler and the SwipeRefreshLayout . If anyone else has experienced this behaviour and solved it or at least found the reason for it Comment : I had the exactly same problem . Further I noticed that RecyclerView always returns 0 from getScrollY . Maybe this is logical as various LayoutManagers can be swapped in not necesserily scrolling ones . I m not shure because I didn t research further . I m happy to find a solution but will upvote the answer when I can test it after my vacation in two weeks . Comment : Lukas Olsen that textured looks incredible . .. . Answer : Here s one way to handle this which also handles ListView GridView .", "Question : I m currently implementing swipeRefreshLayout the problem was it s still not showing up . I tried to implement some of the answer in this link http : stackoverflow.com questions 31739182 recycler-view-not-scrolling-properly-after-implementing-swipe-to-refresh-layout and this link http : stackoverflow.com questions 35101158 swiperefreshlayout-loader-not-going-up-when-pull-down-android and this link http : stackoverflow.com questions 26858692 swiperefreshlayout-setrefreshing-not-showing-indicator-initially . my gradle module : compile com.android.support : appcompat-v7 : 23.1.1 .. . .. . Here s my sample xml : recycler view .. . .. . Java Code : .. . .. . Whenever I swipe down nothing happens swipe refresh doesn t show up either . I test this on an actual device running API 19 Kitkat and API 23 Marshmallow in emulator . .. . Answer : You re returning your RecyclerView in onCreateView not the entire view so your fragment is only displaying your RecyclerView . You shouldn t need to get your root layout at all just create the view and use it to find the subviews . And make sure you return the root view : .. . .. . And if you really need the root RelativeLayout you can just call : Comment : Thank you for reminding me . I miss that one . But maybe it will work if I return mRelativeLayoutRoot I forgot that it always return recyclerView Comment : How do I dismiss this thing if it already loaded my data in JSON Comment : @RoCk Yes it should work if you return mRelativeLayoutRoot as well . To dismiss the SwipeRefreshLayout you should have some sort of callback when you load your JSON data in that callback you can call mSwipeRefreshLayout.setRefreshing false . Comment : Thanks bryan working on it . It always shows up due to that runnable code . Comment : @RoCk Oh right I forgot to mention that . You should not need the Runnable at all mSwipeRefreshLayout.setRefreshing true can run on the main thread . I would also suggest putting setRefreshing true at the top of your parseJSONData method this way it will start refreshing every time your reload your data . And then you can dismiss it in your callback like I stated before .", "Question : null .. . Answer : I use SwipeRefershLayout with AppBarLayout that can collapse . But if user scrolls up layout and after scrolls down then SwipeRefreshLayout enables a refresh mode although layout was not scrolled at the top . I fix this bug so : .. . .. . And it works perfect But I noticed now that user can hide SwipeProgressBar when he makes a swipe up . When SwipeRefreshLayout shows this SwipeProgressBar the refresh mode enabled . How to fix it My xml :" ] }
[ "yes-answer-long", "yes-answer-short" ]
android
UNK_RELATION
sqoop@rdbms@196
sqoop -- sqoop is an open-source software product of cloudera inc.sqoop is an open-source connectivity framework that facilitates transfer between multiple relational-database management systems @placeholder and hdfs .
{ "confidence": [ 54.911495208740234, 54.489601135253906, 53.87579345703125, 53.02294921875, 52.26875305175781, 52.26875305175781, 52.02325439453125, 51.79128646850586, 51.080535888671875, 50.62471008300781, 50.54222106933594, 49.83147430419922, 49.83147430419922, 49.83147430419922, 49.83147430419922, 49.83147430419922, 49.451751708984375, 49.32786560058594, 48.84894561767578, 48.47029495239258, 48.1759033203125, 47.671363830566406, 47.671363830566406, 47.671363830566406, 47.00712585449219, 46.291603088378906, 45.944915771484375, 45.601165771484375, 45.56348419189453, 45.45633316040039, 44.932220458984375, 44.33974838256836, 44.33974838256836, 44.33974838256836, 44.10778045654297, 44.10778045654297, 44.10778045654297, 44.08566665649414, 43.9018440246582, 43.67523956298828, 43.51404571533203, 43.13542938232422, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.85871887207031, 42.56062316894531, 41.87762451171875, 41.876190185546875, 41.876190185546875, 41.876190185546875, 41.876190185546875, 41.855674743652344, 41.541873931884766, 41.35010528564453, 41.302818298339844, 41.04081344604492, 40.97798538208008, 40.6986083984375, 40.6986083984375, 40.584716796875, 40.15039825439453, 40.12152099609375, 39.84030532836914, 39.77099609375, 39.6909294128418, 39.535789489746094, 39.509376525878906, 39.440345764160156, 39.38935089111328, 39.3172492980957, 39.19194030761719, 38.984596252441406, 38.93602752685547, 38.93602752685547, 38.93330383300781, 38.86553955078125, 38.86553955078125, 38.86553955078125, 38.799530029296875, 38.78308868408203, 38.78308868408203, 38.59751510620117, 38.59751510620117, 38.59123992919922, 38.59123992919922, 38.59123992919922, 38.59008026123047, 38.59008026123047, 38.59008026123047, 38.17075729370117, 38.09927749633789 ], "content": [ "You can solve this by adding all jars in usr local sqoop lib into HDFS : .. . .. . First create a directory in HDFS : .. . .. . Then put all libraires into HDFS .. . .. . Then check That the jars exists in HDFS : .. . .. . Finnaly import data using sqoop :", "If it is possible I can do that and then transfer the local files using ftp and then use sqoop again to transfer them to HDFS .", "This is how sqoop imports job works : .. . .. . sqoop creates imports data in tmp dir HDFS which is user s home dir in your case it is user cloudera .", "I m using Cloudera hadoop and Sqoop .", "Is there a way to import couchbase data into local files instead of HDFS using sqoop .", "Hi I loaded a data from mysql to hdfs via sqoop connector .", "No problem with the installation there is no need to copy all the files from sqoop directory just copy the sqoop library files into hdfs .", "Is there any way to remove special control-characters in HDFS block data using Sqoop export or any parameters using Sqoop", "I am trying to import data from MySql to HDFS using Sqoop .", "You would be executing Sqoop Eval from a node that has connectivity to the Source .", "Why is there MapReduce process in Sqoop to load data from HDFS to MySQL .. . .. . This is because Sqoop is based on MapReduce .", "I am trying to export the data from RDMS into HDFS using sqoop .", "These .gz file is stored in Oracle DB as blob and imported into HDFS using Sqoop .", "Sqoop can take data from HDFS and export them to MySQL .", "I was trying to import a 1 TB table in MySQL to HDFS using sqoop .", "sqoop is essentially a tool to ingest data in HDFS from RDBMS .", "I am using hive action to load data into HDFS and Sqoop action to load data from HDFS to MySQL", "There is a Teradata Sqoop connector for Cloudera : Clicky", "SQOOP Import function tries to import the data from RDBMS and load it into HDFS .", "I am trying to sqoop the records from table A to HDFS at say 2 : 00 PM CT source table A has 5M records and the sqoop ends at 4 : 00 PM CT table A has 5.5M records .", "How to import the data from multiple source thru Sqoop .", "Load SQL server tables onto HDFS using Sqoop .. . 2 .", "I am trying to import data from sybase to HDFS using Sqoop .", "sqoop import is used to import data from RDBMS to HDFS .", "I was importing random tables from Huge SQL Server database into HDFS using Sqoop .", "1 . copy sqoop from local to HDFS : .. . .. . hadoop fs -mkdir -p usr lib sqoop .. . .. . hadoop fs -copyFromLocal usr lib sqoop .jar usr lib sqoop lib .. . .. . 2 . copy jar class from tmp to HDFS .. . .. . cp tmp sqoop-hduser compile usr lib sqoop bin .. . .. . hadoop fs -put tmp sqoop-hduser compile user hduser", "We are open to explore option at hive or sqoop end .", "So in short Importing to Hive will use hdfs as the staging place and sqoop deletes staging dir user cloudera categories after copying sucessfully to actual hdfs location - it is last stage of sqoop job to clean up staging tmp files - so if you try to list the tmp staging dir you won t find it .", "If we using 6 mapper in sqoop to importing the data from Oracle then how many connection will be establish between sqoop and source .", "The below syntax can be used to import data from Oracle Database to HDFS using Sqoop .. . .. . usr bin sqoop import --connect jdbc : oracle : thin : system system@ : 1521 : xe --username -P--table .", "When I try to connect to cloudera mysql database through sqoop .", "I want to know certain things from this : - .. . .. . Before coping my sqoop to hdfs is my installation right", "Is it necessary to copy sqoop directory from ext file system to hdfs file system .", "I need to have Sqoop to write the column names as headers into the import files files that end up in HDFS .", "Without these options the Sqoop import will only copy the data to HDFS and a Hive table will NOT be created .", "Sqoop stores at one location and based on the Replication Factor of the cluster HDFS replicates the data", "My scenario : I will get daily 100 records in hdfs through sqoop at particular time .", "I am using cloudera CDH for practising sqoop .", "I see that sqoop component is also present in Cassandra to import data so was wondering if we can use the SQOOP provided by Cloudera to import data into Cassandra .", "http : stackoverflow.com questions 19521655 whats-the-difference-between-flume-and-sqoop both Flume and Sqoop can pull data from source and push to Hadoop .", "For Sqoop Import to work all the Nodes of your Cluster need to have connectivity to the Source .", "I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar .", "How cqan I Load the data form these tables into hdfs one at a time using Sqoop", "And also hdfs doesn t allows modifying files but allows appending - so sqoop won t be able to do modifications .", "I am trying to export data to mysq l from hdfs through sqoop .", "Adding the mysql-connector-java- .jar once to share lib sqoop directory in HDFS is better .", "try adding all hadoop jars sqoop jars and hive jars to hdfs path.Also check for version compatibility", "Is there any option in sqoop to import data from RDMS and store it as ORC file-format in HDFS", "In current version of sqoop available it is not possible to import data from RDBS to HDFS in ORC format in a single shoot command .", "Sqoop : On the other hand is designed for performing bulk imports of data into HDFS from structured-data stores .", "We have used sqoop to get data into HDFS and have loaded into hive table partitioned by year month .", "The error message is : .. . .. . When I check the HDFS the file-exists : .. . .. . How can I execute Sqoop in my Java program", "Find below a sample code for using sqoop in Java Program for importing data from MySQL to HDFS HBase .", "I am trying to export some data from hdfs to mysql using sqoop .", "issues.apache.org jira browse SQOOP https : issues.apache.org jira browse SQOOP .", "I am using Sqoop job to do incremental imports from RDBMS into HDFS as shown below .. . .. . sqoop job exec JOB1 .. . .. . The above 2 sqoop commands are working perfectly fine when run from command-prompt .", "So what I need to do if I want to export different file-format from HDFS to Oracle using Sqoop", "I am trying to pull data from oracle and want to push it into HDFS using sqoop 1.4.6 .", "I have done sqoop importer java class for importing oracle data to my HDFS .", "How can I import in HDFS the dumps as Parquet file using Sqoop or any other tool", "Transfer backup files to HDFS reachable network host .", "Here is directory structure for my installations my local ubuntu machine instead and any vm Each my installation is on separate directory : - .. . .. . usr local hadoop .. . usr local sqoop .. . usr local hive .. . .. . By looking at error i tried to resolve it and so i copied sqoop local machine usr local sqoop folder to hdfs directory hdfs : localhost : 54310 usr local sqoop .", "Both Sqoop and Flume pull the data from the source and push it to the sink .", "I am using sqoop-metastore HSQLDB to store the sqoop jobs .", "Propertiesfile : .. . .. . sqoop import command", "Use Sqoop .", "I am successfully able import to hdfs using Apache Sqoop for Oracle 11g .", "As per the error message usr lib sqoop lib parquet-format-2.0.0.jar file is missing in the HDFS .", "Sqoop works with any kind of RDBMS system that supports JDBC connectivity .", "sqoop", "I am new to sqoop", "But yesterday i got only 50 records for that particular time today i need to get 50+100 records in hdfs through sqoop for that particular time .", "So Sqoop server database and hadoop cluster can be behind the firewall and only Sqoop server ports shall be opened to only Sqoop2 client .", "The sqoop create job is working in OOZIE and i am able to see the sqoop job being listed in the sqoop-metastore after oozie job completes .", "I know HDFS source can be specified for data pull using SSIS", "Sqoop is used for simpler SQL queries .", "When you initially imported data to hdfs using sqoop sqoop must have created java files for each imported table usually in same dir from where you ran sqoop import command for departments table or if --outdir used than classes should be in that location .", "As per Apache Sqoop Cookbook by using query imports Sqoop can t use the database catalog to fetch the metadata .", "You have to implement TDE zone for HDFS file location before you start sqoop import .", "Sqoop import to Hive works in 3 steps : .. . .. . Put data to HDFS .. . Create Hive table if not exists .. . Load data into Hive Table .. . .. . You have not mentioned --target-dir or --warehouse-dir so it will put data in HDFS Home Directory which I believe user cloudera in your case .", "hadoop fs -rmr user cloudera categories .. . .. . OR .. . .. . hadoop fs -mv user cloudera categories user cloudera categories 1 .. . .. . and re-run sqoop command", "This is coming from official sqoop docs : By default Sqoop will specify the timezone GMT to Oracle .", "Note : In above command opt hadoop sqoop-1.4.6 is my system sqoop installation location", "There s an incremental mode in Sqoop .", "I tried to set up sqoop sqoop-1.4.3.bin hadoop-1.0.0 on Ubuntu .", "I have tried with the earlier versions of sqoop like Sqoop 1.4.3 and 1.4.4 .", "Sqoop Import uses Map-reduce whereas Sqoop Eval doesn t .", "Here is a detailed article about SQL To HDFS file Sqoop KM written by the ODI A-Team : http : www.ateam-oracle.com importing-data-from-sql-databases-into-hadoop-with-sqoop-and-oracle-data-integrator-odi", "Created the following object in the database as Sqoop was failing at it .", "If Sqoop connects directly to the database - all right .", "Now when we execute Sqoop commands they look like below : .. . .. . sqoop import --connect .. . --username .. . --table .. .", "We are using sqoop-1.4.4 in our environment and we want to use the sqoop java API to run our imports and exports .", "Then I created a Hive table with STORED AS SEQUENCEFILE clause and LOCATION clause that points to the HDFS location where the Sqoop imported sequence files are present .", "We are planing to create Oozie job which run Sqoop command to import data from SQL server to HDFS on hourly basis .", "Mongo DB - Process data using Mongo DB hadoop connector Pig - Store it to hive table HDFS - Export data to mysql using sqoop .", "Is there a way to make sqoop work for ORC", "Sqoop is a better choice and widely used .", "Using SQOOP we will import that data .", "Sqoop helps to move data between hadoop and other databases and it can transfer data in parallel-for performance .", "I m trying to import data from the existing relational tables to hadoop environment using Sqoop 1.4.6 ." ] }
{ "confidence": [ 81.09012603759766, 79.10726165771484, 78.44761657714844, 76.15511322021484, 75.35252380371094, 75.35252380371094, 75.07810974121094, 75.01412963867188, 74.00476837158203, 73.69625854492188, 73.2845458984375, 72.3795166015625, 71.68203735351562, 71.67132568359375, 71.47744750976562, 71.01634216308594, 70.97490692138672, 70.81415557861328, 70.26447296142578, 69.47642517089844 ], "content": [ "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : Please execute below commands which will resolve your problem . It will copy your files in HDFS system . Similarly copy any file which is not able to get by HDFS system . Note : In above command opt hadoop sqoop-1.4.6 is my system sqoop installation location", "Question : I am trying to copy the retail db database tables into hive database which I already created . When I execute the following code .. . .. . My Map-reduce job stops with the following error : .. . .. . ERROR tool.ImportAllTablesTool : Encountered IOException running import job : org.apache.hadoop.mapred.FileAlreadyExistsException : Output directory hdfs : quickstart.cloudera : 8020 user cloudera categories already exists .. . .. . I am trying to copy the tables to hive database Then why an existing file in cloudera caused the problem . Is there a way to ignore this error or overwrite the existing file . .. . Answer : This is how sqoop imports job works : .. . .. . sqoop creates imports data in tmp dir HDFS which is user s home dir in your case it is user cloudera . Then copy data to its actual hive location i.e . user hive wearhouse . This categories dir should have exist before you ran import statements . so delete that dir or rename it if its important . hadoop fs -rmr user cloudera categories .. . .. . OR .. . .. . hadoop fs -mv user cloudera categories user cloudera categories 1 .. . .. . and re-run sqoop command So in short Importing to Hive will use hdfs as the staging place and sqoop deletes staging dir user cloudera categories after copying sucessfully to actual hdfs location - it is last stage of sqoop job to clean up staging tmp files - so if you try to list the tmp staging dir you won t find it . After successful import : hadoop fs -ls user cloudera categories - dir will not be there .", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : It is common for Hadoop services to look for jars in HDFS because all nodes in the cluster can access files in HDFS . This is important if the MapReduce job being kicked off by the Hadoop service in this case Sqoop has a dependence on those jars . Remember the Mappers are running on a DataNode not the NameNode even though you are probably running the Sqoop command from the NameNode . Putting the jars on HDFS is not the only possible solution to this problem but it is a sensible one . Now we can deal with the actual error . At least one but probably all of your Mappers are unable to find a jar they need . That means that either the jar does not exist or the user trying to access them does not have the required permissions . First check if the file-exists by running hadoop fs -ls home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar by a user with superuser privileges on the cluster . If it does not exist put it there with hadoop fs -put jarLocationOn NameNode fileSystem sqoop-1.4.3-cdh4.4.0.jar home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I haven t worked with Cloudera specifically so you will have to track down the jar location on the NameNode yourself . If Cloudera is anything like Hortonworks there will be occasional issues like this where cluster deployment scripts documentation misses a couple of required steps to get everything up and running . Now that we know the file-exists we can check to see if the user SqoopUser has permissions to the file . Again run hadoop fs -ls home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar and look at the file-permissions . Also check the permissions of the directories containing the jar . Explaining POSIX file-permissions is outside the scope of this answer so if you are not familiar you might need to read up on those . One important note is that HDFS does not have its own concept of groups it bases that on the groups of the underlying OS . Just make sure the jar is readable by SqoopUser and all of the parent directories are executable by SqoopUser . Indiscriminate user of chmod 777 will take of this ie hadoop fs -chmod 777 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . But of course be more discerning about the permissions you grant if your environment requires it . If you find file-permissions are tripping you up more often than you would like the nuclear option is to set dfs.permissions to false in hdfs-site.xml . This will let all users access all files on HDFS . This can be very useful for rapid development but it is safer to leave dfs.permisssions on .", "Question : I m looking to extract some data from an Oracle database and transferring it to a remote HDFS file system . There appears to be a couple of possible ways of achieving this : .. . .. . 1 . Use Sqoop . This tool will extract the data copy it across the network and store it directly into HDFS .. . 2 . Use SQL to read the data and store in on the local file system . When this has been completed copy ftp the data to the Hadoop system . My question will the first method which is less work for me cause Oracle to lock tables for longer than required My worry is that that Sqoop might take out a lock on the database when it starts to query the data and this lock isn t going to be released until all of the data has been copied across to HDFS . Since I ll be extracting large amounts of data and copying it to a remote location so there will be significant network latency the lock will remain longer than would otherwise be required . .. . Answer : Sqoop issues usual select queries on the Oracle batabase so it does the same locks as the select query would . No extra additional locking is performed by Sqoop . Data will be transferred in several concurrent tasks mappers . Any expensive function-call will put a significant performance burden on your database server . Advanced functions could lock certain tables preventing Sqoop from transferring data in parallel . This will adversely affect transfer performance . For efficient advanced filtering run the filtering query on your database prior to import save its output to a temporary table and run Sqoop to import the temporary table into Hadoop without the where parameter . Sqoop import has nothing to do with copy of data accross the network . Sqoop stores at one location and based on the Replication Factor of the cluster HDFS replicates the data Comment : Thanks for the information it s really helpful . I get that once the query has been completed the lock s will be released but do you know if this is before or after the the data is transferred to HDFS This is important as the transfer time could be significant and I don t want the locks held longer than they need to be .", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : In addition to Daniel Koverman answer do this also . This will help you . export HADOOP MAPRED HOME usr lib hadoop-0.20-mapreduce export HADOOP HOME usr lib hadoop-0.20-mapreduce .. . .. . add these two lines in .. . .. . etc default hadoop and etc default hiveserver", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : first we have to grant all permission to the file like grant all privileges on filename . to @ localhost grant all privileges on filename . to @ localhost give this to command and excute", "Question : Both Flume and Sqoop are meant for data movement then what is the difference between them Under what condition should I use Flume or Sqoop .. . Answer : Sqoop and Flume both are meant to fulfill data ingestion needs but they serve different purposes . Apache Flume works well for streaming data sources that are generated continuously in hadoop environment such as log files from multiple servers whereas whereas Apache Sqoop works well with any RDBMS has JDBC connectivity . Sqoop is actually meant for bulk data transfers between hadoop and any other structured-data stores . Flume collects log data from many sources aggregating it and writing it to HDFS . I came across this interesting infographic that explains the differences between the two apache projects Sqoop and Flume https : www.dezyre.com article sqoop-vs-flume-battle-of-the-hadoop-etl-tools- 176 - .. . .. . Difference between Sqoop and Flume http : i.stack.imgur.com xaxoB.png", "Question : I am trying to copy the retail db database tables into hive database which I already created . When I execute the following code .. . .. . My Map-reduce job stops with the following error : .. . .. . ERROR tool.ImportAllTablesTool : Encountered IOException running import job : org.apache.hadoop.mapred.FileAlreadyExistsException : Output directory hdfs : quickstart.cloudera : 8020 user cloudera categories already exists .. . .. . I am trying to copy the tables to hive database Then why an existing file in cloudera caused the problem . Is there a way to ignore this error or overwrite the existing file . .. . Answer : Sqoop import to Hive works in 3 steps : .. . .. . Put data to HDFS .. . Create Hive table if not exists .. . Load data into Hive Table .. . .. . You have not mentioned --target-dir or --warehouse-dir so it will put data in HDFS Home Directory which I believe user cloudera in your case . Now for a MySQL table categories you might have imported it earlier . So user cloudera categories directory exists and you are getting this exception . Add any non-existing directory in --taget-dir like --taget-dir user cloudera mysqldata . Then sqoop will put all the Mysql Tables imported by above command in this location .", "Question : I need to migrate the couchbase data into HDFS but the db and Hadoop clusters are not accessible to each other . So I cannot use sqoop in the recommended way . Is there a way to import couchbase data into local files instead of HDFS using sqoop . If it is possible I can do that and then transfer the local files using ftp and then use sqoop again to transfer them to HDFS . If that s a bad solution then is there any other way I can transfer all the cb data in local files . Creating views on this cb cluster is a difficult task and I would like to avoid using it . .. . Answer : Alternative solution perhaps not as elegant but it works : .. . .. . 1 . Use Couchbase backup utility : cbbackup and save locally all data . 2 . Transfer backup files to HDFS reachable network host . 3 . Install Couchbase in the network segment where HDFS is reachable and use Couchbase restore from backup procedure to populate that instance . 4 . Use Scoop in recommended way against that Couchbase instance that has access to HDFS .", "Question : I need to migrate the couchbase data into HDFS but the db and Hadoop clusters are not accessible to each other . So I cannot use sqoop in the recommended way . Is there a way to import couchbase data into local files instead of HDFS using sqoop . If it is possible I can do that and then transfer the local files using ftp and then use sqoop again to transfer them to HDFS . If that s a bad solution then is there any other way I can transfer all the cb data in local files . Creating views on this cb cluster is a difficult task and I would like to avoid using it . .. . Answer : You can use couchbase kafka adapter to stream data from couchbase to kafka and from kafka you can store in any file system you like . CouchbaseKafka adapter uses TAP protocol to push data to kafka . https : github.com paypal couchbasekafka", "Question : I am new to Big data . From some of the answers to What s the difference between Flume and Sqoop http : stackoverflow.com questions 19521655 whats-the-difference-between-flume-and-sqoop both Flume and Sqoop can pull data from source and push to Hadoop . Can anyone please specify exaclty where flume is used and where sqoop is Can both be used for the same tasks .. . Answer : Flume http : flume.apache.org and Sqoop http : sqoop.apache.org are both designed to work with different kind of data sources . Sqoop works with any kind of RDBMS system that supports JDBC connectivity . Flume on the other hand works well with streaming data sources like log data which is being generated continuously in your environment . Specifically .. . .. . Sqoop could be used to import export data to from RDBMS systems like Oracle MS SQL Server MySQL PostgreSQL Netezza Teradata and some others which supports JDBC connectivity . Flume could be used to ingest high throughput data from sources like below and insert into destinations sinks below . Commonly used flume sources : .. . Spooling directory - directory in which lot of files are being created used mostly for collecting and aggregating log data .. . JMS - collect metrics from JMS based systems .. . And lots more https : flume.apache.org FlumeUserGuide.html flume-sources .. . Commonly used flume sinks : .. . HDFS .. . HBase .. . Solr .. . ElasticSearch .. . And lots more https : flume.apache.org FlumeUserGuide.html flume-sinks .. . .. . No both tools cannot be used to achieve the same task like for example flume cannot be used with databases and sqoop cannot be used with streaming data sources or flat files . If you are interested flume also has an alternate which does the same thing called as chukwa https : chukwa.apache.org . Comment : Thank you very much @Ashrith", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : I have also faced such problem . I just check my hadoop services using .. . .. . jps 10869 JobHistoryServer 10610 NameNode 10669 DataNode 15215 Jps 10738 ResourceManager 3978 Main .. . .. . NodeManager not running . Changed some settings in yarn-site.xml and now sqoop find my jars in my local file system . Comment : Changed some settings in yarn-site.xml what changes", "Question : null .. . Answer : I was importing random tables from Huge SQL Server database into HDFS using Sqoop . Current sqoop thread is one of the threads running with 5 other sqoop threads in parallel . All SQL tables are non relational tables targeted to hive external tables in cluster . Anyone know about this issue Error Description :", "Question : I am trying to export some data from hdfs to mysql using sqoop . The problem is when I try to export a uncompressed file it exports properly but if I try to export the same file compressed with lzo compression the sqoop job fails . I am trying it in standard cloudera CDH4 VM environment . The columns in file are separated by tab and null is represented as N . The file content : .. . .. . Description of mysql table : .. . .. . File in hdfs : .. . .. . sqoop command : .. . .. . Error : .. . .. . This works perfectly if the file is not compressed and I am directly working with dipayan-test.txt file . Need help in resolving this issue and also want to know if I am missing something when working with lzo files . .. . Answer : Chances are that your table doesn t have the correct columns . You can always go into the .java file sqoop creates for you and debug from there : sqooptest.java : 225", "Question : I am a begineer in Hadoop trying to import a table from my local database mysql to hdfs of hadoop 2.4.1 using sqoop 1.4.5 . .. . .. . i try sqoop-list-databases it give correct answer but then on giving following cmd : .. . .. . and i get : Comment : You need to add all corresponding lib files to the path shown in the error Comment : can u memtion which corresponding lib file.as i already add mysql driver to lib folder and jackson-mapper-asl-1.9.13.jar is already there in location Comment : try adding all hadoop jars sqoop jars and hive jars to hdfs path.Also check for version compatibility Comment : You haven t specify a target directory yet Add --target-dir path to destination first . .. . Answer : Please remove the temp file in HDFS if some error like user hduser is already exists . 1 . copy sqoop from local to HDFS : .. . .. . hadoop fs -mkdir -p usr lib sqoop .. . .. . hadoop fs -copyFromLocal usr lib sqoop .jar usr lib sqoop lib .. . .. . 2 . copy jar class from tmp to HDFS .. . .. . cp tmp sqoop-hduser compile usr lib sqoop bin .. . .. . hadoop fs -put tmp sqoop-hduser compile user hduser", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : First the answer : .. . .. . You need to refresh the client config files . In CDH 5 this can be done from the front page of the Manager s UI by clicking on the circle-arrow symbol next to the service . I think the config that is causing your problem is the YARN service but you might as well bring all your config files up to-date . Second the background : .. . .. . I just solved this issue for myself . I am using CDH 5.0 . Here is the command I ran and the error encountered :", "Question : I am using cloudera CDH for practising sqoop . When I try to connect to cloudera mysql database through sqoop . I am getting error - .. . .. . use --table or --query for import .. . .. . I followed instruction exactly as described in the sqoop documentation . http : sqoop.apache.org docs 1.4.6 SqoopUserGuide.html connecting to a database server .. . .. . Is there anyway to connect to mysql server from sqoop other than using the import statement . .. . Answer : sqoop import is used to import data from RDBMS to HDFS . To import data you need to tell name of table or SQL query . That s why you are getting this error : .. . .. . use --table or --query for import .. . .. . You want to check if connection is successful with Sqoop and don t want to import data . You can try some other Sqoop features like .. . .. . List databases .. . .. . sqoop list-databases --connect jdbc : mysql : database.example.com -username user --password pass .. . .. . .. . List tables in a database .. . .. . sqoop list-tables --connect jdbc : mysql : database.example.com testdb --username user --password pass", "Question : I am trying to import data from MySql to HDFS using Sqoop . But I am getting the following error . How to solve this command : .. . .. . error : .. . .. . Hadoop version : 2.6.0 .. . .. . Sqoop version : 1.4.6 .. . Answer : You can solve this by adding all jars in usr local sqoop lib into HDFS : .. . .. . First create a directory in HDFS : .. . .. . Then put all libraires into HDFS .. . .. . Then check That the jars exists in HDFS : .. . .. . Finnaly import data using sqoop :", "Question : I want to store the password into a file later use the same in sqoop command . According to sqoop documentation --password-file option allow us for storing password . so i am storing it in pwd file with password abc text only . hits the below command . assuming pwd file is stored over HDFS .. . .. . as a result i am getting following error : .. . .. . When I perform the same operation using -p option it works fine for me . .. . Answer : The Password file is stored in HDFS not in local system . This password file should have 400 read+write -Only for owner permission so that it is not exposed to other users . So here are the steps to create a pwd file : .. . .. . 1 . vi sqoop.pwd Enter the password and save it .. . .. . 2 . Transfer the sqoop.pwd file to HDFS by the command .. . .. . hadoop fs put sqoop.pwd sqoop.pwd .. . .. . .. . 3 . Change the ownership of sqoop.pwd file for more security . hadoop fs chown 400 sqoop.pwd .. . .. . .. . 4 . Remove the sqoop.pwd in current directory non-hdfs .. . .. . Then final command will be Comment : Hi aman thanks for reply . at point 3 you have specified ownership command which i guess should be chmod instead of chown . Though i tried the above steps in sequence somehow same result . I fired the below command : sqoop import --connect jdbc : mysql : localhost : 3306 db name--username bhavesh --password-file pwd --table ROLES --target-dir erp test Comment : seems like the username has not correct privileges . try this : : GRANT ALL PRIVILEGES ON . TO bhavesh @ localhost IDENTIFIED BY bhavesh WITH GRANT OPTION please restart your mysql server after modifying the permissions and then try running that sqoop command . Comment : I fired the same above command with --password that works fine but not with --password-file . . I have checked with database it has correct privileges . Comment : okay no issue try with this command : sqoop import --connect jdbc : mysql : localhost : 3306 db --username bhavesh --password-file file : sqoop.pwd --table t1 --target-dir erp test Also make sure that you don t append new line characters in the password file .", "Question : I am very new to big data and i have little confusion regarding Sqoop and Flume .. . .. . So i get that difference between the Sqoop and Flume .. . .. . Sqoop is for transferring bulk data from RDBMS .. . Flume is for streaming of data such as log files .. . .. . My confusion is because big data architecture i am looking at which i have no virtual copy of grouped structured-data and its transferred by Sqoop and Unstructured streamed by Flume . My question regard that is does that mean Flume is only for streaming What about high frequency data and does Flume support transfer of unstructured data that are non-log files i.e . audio video or would Sqoop be able to handle that Final question is can Sqoop work with federated data sources if yes with both real and virtual Thanks .. . Answer : sqoop is essentially a tool to ingest data in HDFS from RDBMS . Under the hood it generates simple Java code which submit a query to a RDBMS and writes the result to HDFS . This means that you can import with sqoop everything which can be accessed via JDBC connection and which has a Java driver available . For this reason you can t use it for files like logs or things like that . Then sqoop can t handle video or audio files . Flume instead is used to monitor and ingesting in real-time informations . You can ingest everything for which there is a Flume source available https : flume.apache.org FlumeUserGuide.html flume-sources ." ] }
[ "yes-answer-long", "yes-answer-short" ]
rdbms
UNK_RELATION
qquickview@user-interface@100
qquickview -- in the qt framework the qquickview class provides a window for displaying a qt-quick @placeholder .
{ "confidence": [ 51.19648742675781, 49.36865997314453, 42.068763732910156, 39.798458099365234, 39.798458099365234, 39.798458099365234, 39.798458099365234, 39.798458099365234, 38.479103088378906, 38.01418685913086, 35.045074462890625, 35.045074462890625, 35.045074462890625, 35.045074462890625, 34.69969940185547, 33.7864990234375, 32.38373565673828, 31.948522567749023, 31.948522567749023, 31.158397674560547, 30.877328872680664, 30.877328872680664, 30.13408088684082, 30.11530113220215, 29.142908096313477, 28.877527236938477, 28.265596389770508, 27.81900405883789, 27.61895179748535, 27.61895179748535, 27.49983787536621, 26.89499282836914, 26.89499282836914, 26.618221282958984, 25.73534393310547, 24.650737762451172, 23.921810150146484, 23.921810150146484, 23.12640380859375, 23.12640380859375, 23.11418914794922, 22.288482666015625, 20.422992706298828, 20.076011657714844, 19.869640350341797, 18.217029571533203, 18.001609802246094, 17.356069564819336, 17.21574592590332, 17.21574592590332, 17.151023864746094, 16.958454132080078, 16.958454132080078, 16.61451530456543, 16.61451530456543, 16.565250396728516, 15.957170486450195, 15.957170486450195, 15.957170486450195, 15.891840934753418, 15.34436321258545, 15.34436321258545, 15.251411437988281, 14.657997131347656, 14.400768280029297, 13.912810325622559, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086, 12.457815170288086 ], "content": [ "but QQuickWidget don t work as QQuickView QQuickView work perfect .", "Without ugly fix not to delete qquickview .. . .. . I have a singleton with a pointer to QQuickView .", "Using QQuickView this strange behaviour does not occur .", "In the destructor of QWidget I have deleted the QQuickView instance and there are no other big objects .", "Also I am pretty sure that the QQuickView doesn t release memory properly .", "How can I free entire memory allocated by QQuickView", "How can I get HGLRC from QQuickView in qml 5.3 application", "I have set the title of the app using QQuickView setTitle function .", "To load the ContentFrame component I used a class derived from QQuickView ViewManager that has a method called setView .", "I found that the QWebview class isn t available for mobile system so I had to change my HTML window to QQuickView with QML files or is there a better way .", "When I need to close my application I do a call of QGuiApplication : : quit and try to release QQuickView in destructor of singlenot .", "When deleting a QWidget that contains a QQuickView embedded the allocated memory won t be freed entirely .", "I have a program on openGL in windows which I want render to my QQuickView .", "So first I want create QQuickView and then get the HGLRC from it and set it to openGl prog by wglMakeCurrent .. . function .", "Qt project - Qt Widgets Application .", "I need QQuickWidget not QQuickView so how can I use MultiPointTouchArea with QQuickWidget and have the correct expected behaviour", "without the above C++ and in a separate project configured as a Qt Quick UI .", "Build on Qt Creator 3.2.1 opensource based on Qt 5.3.2 .", "I have a Qt application created using Qt 5.6 .", "It is a Qt bug most likely .", "I d like to use an ApplicationWindow as a main file and be able to switch to other QML files from C++ with QQuickView : : setSource const QUrl url .", "main.qml .. . .. . I am wondering if the Loader here is really necessary here .. . .. . However QQuickView only supports loading of root objects that derive from QQuickItem .", "I founded a deadlock in Qt 5.3 .", "I m thinking about using QQmlApplicationEngine instead of QQuickView but the usage seems different this class being only equipped with QQmlApplicationEngine : : load const QUrl url .. . .. . What would be the best course of action for my purpose", "In the first picture the QML window Qt canvas is shown over my program UI .", "Instead load the same component using the same QQuickView over and over again I created a component in QML as content container and I load the required component as child of it .", "Create a new resource file via file - new File or Project.. . - Qt - Qt Resource File .. . 2 .", "Currently I am developing a Qt class that needs to be integrated in a C++ Visual Studio project .", "I try to read the source code to understand what the happen when I touch screen but I fond QQuickWidget : : event send touch-event TouchBegin.. . to QQuickWindow and QQuickView : : event QQuickWindow didn t reimplement .", "sorry : I want to make MultiPointTouchArea work in QQuickWidget like QQuickView like I said as my problem the first finger s move is invalidity when my second finger remove from screen .", "The RC example has code no desktop : QT + widgets .", "We are developing an application with Qt Qml Qml is embedded in the QWidget .", "Using Visual Studio 2013 Professional the Qt Addin installed .", "I like your approach I think what Qt calls MVC is more a MVC framework for controls rather than a general framework for building large applications .", "You can use Screen http : doc.qt.io qt-5 qml-qtquick-window-screen.html item to adjust size and position in QML", "Update : from doc.qt.io qt-5 qtqml-cppintegration-interactqmlfromcpp.html http : doc.qt.io qt-5 qtqml-cppintegration-interactqmlfromcpp.html it seems that it is recommended to use setProperty to set the X and Y . I shall adopt this method .", "You can create a proper application via the Qt Quick Application add your app.qml as a resource to that project and call such a file instead of the default main.qml provided by the project template .", "Right click the newly created .qrc file and click add existing file to add your app.qml file .. . .. . Finally rewrite your main like this : .. . .. . However going for the Qt Quick Application project would be the wiser choice .", "From the .pro file of the gallery example we have : android : ios : blackberry : qtHaveModule widgets : QT + widgets .", "The layout in my code was QVBoxLayout but i have tested with both QHBoxLayout and QVBoxLayout and Qt : : AlignRight but it has not changed at all .", "I ve written a quick test to determine if there is an actual leak in the creation and deletion of a QQUickWidget : .. . .. . It has a timer that creates destroys a QQuickWidget with a loaded QML file inside and although the results initially ramp up the memory usage stabilizes in time indicating it is not likely there was a memory leak in the Qt code and that if you indeed leak memory the fault does not lie in Qt but in your own code .", "Note the QObject cast - this was not present in the docs http : qt-project.org doc qt-5 qtqml-cppintegration-interactqmlfromcpp.html but without it : .. . .. . main.cpp : 11 : error : cannot initialize a variable of type QObject with an rvalue of type QQuickItem .. . .. . How should this be done", "Consider the following example qml file MultiPointTouchTest.qml : .. . .. . In the main.cpp file here I use QQuickWidget or QQuickView like this : .. . .. . or .. . .. . The MultiPointTouchArea s print is different info for follow sequence operation : .. . .. . 1 . put my first finger to touch screen .. . 2 . put my second finger to touch screen the first finger touch becomes invalid unimportant for now .", "Just don t hold your breath for a quick resolution :", "This was what I remembered : stackoverflow.com questions 21770426 http : stackoverflow.com questions 21770426 in-qt-qml-controls-applicationwindow-lacks-the-native-looking-theme-when-run Not sure if this still applies .", "I was able to run the QML from code but it launches on a different window .", "That can be done easier for example : .. . .. . main.qml .. . .. . And so you can access these windows from C++ code : .. . .. . main.cpp .. . .. . To catch a closing event you should use QQuickWindow : : closing http : doc.qt.io qt-5 qquickwindow.html closing event", "HTML window on iOS http : i.stack.imgur.com FeT9L.png There is a blank white rectangle behind the container and the container is also not in the HTML window on the right side where it should be .", "I don t want to use QmlLoader because it doesnt resize the window and It needs to many signals", "QML on a separate window http : i.stack.imgur.com 9gKo4.png .. . .. . I need to integrate the QML into my program UI .", "Here is a class to visualize a QML code in Qt5.6 .", "I cant seem to be able to detect the signal when one of the window is closed .", "I m having a problem trying to insert a QML view into a native OSX window .", "To manage controllers I have Gui director class with the following implementation :", "Well I have so-called GUI director class .", "I am implementing a simple program with QT5.5 which contains a HTML window QWebview like the following screenshot : .. . .. . HTML window on the right side http : i.stack.imgur.com 7iPGH.png .. . .. . Now I want the program also installed for iOS e.g .", "I found out that using QWidget : : createWindowContainer I m able to display multiple Window s for a single project .", "What signal do I need look out for to catch the window close event", "It s odd because the html window is actually there on the right where it should be but its content not .", "Make sure to declare your base classes destructor to be virtual if your program has base-derived class .", "I receive this error title below whenever I try to run the following code : .. . .. . Cannot create window : no screens available .. . .. . The program has unexpectedly finished .", "I have a requirement for my project to display two QML Window s each on one of the screen one sender one receiver .", ".. . .. . If you want to quick fix your current project just check that the .pro file is set to import GUI libraries : .. . .. . Set your qml file as a resource : .. . .. . 1 .", "The problem is that I get it to point where it does indeed renderer the qml inside the view but it creates an extra transparent window to the side and it doesn t seem to redraw the QML view properly .", "I was trying also this variant : .. . .. . but it didn t work qml window stopped working.. . -classic windows error however no error was written in pycharm console .. . .. . My code looks like this : .. . .. . As you might see my structure is kind of chaotic because I do this switching behaviour for the first time so I dont really know how it should be done right.. . Every advice welcomed", "it seems like we can only have 1 engine at anytime. . As for shifting the 2nd window to 2nd screen I obtained the availableGeometry from qApplication : : desktop and set the window2 s x y using wnd2- setX . . wnd2- setY . . to get the desired position .", "I have a QStackedLayout with two QWidget objects added to it .", "Second QWidget is created like this : .. . .. . Now I want to be able to show and hide the second top widget .", "I do this by calling m qmlWidget- setVisible false or m qmlWidget- setVisible true but whenever I do this the widget is being painted whole blank white color and shortly after it changes background to transparent color .", "This is a problem to me because first widget will be mostly black .", "I think the reason of the problem is that QML file is being loaded and it blocks repaint event .", "Two solutions that come to my mind are : .. . .. . load QML file asynchronously .. . do not unload the second widget when it is not visible .. . .. . I am afraid that both of those options are impossible to do .", "How can I solve the problem with flickering white background", "The flicker happens when I change visible of the second QWidget to true or false .", "I do not understand why the flicker happens on hiding the top widget .", ".. . .. . Here https : github.com fhazubski QQuickViewFlickerProblem you can find a working example project .", "Maybe the QOpenGLWidget object is the problem here .", "Creating two widgets did not seem to produce the problem .", "Paste more code to be more illustrative .", "@CoolGuyCG It would be too much files to paste so I have created example project and added it to the question .", "How to fix in correctly", "Result - application freezes .", "Sample : .. . .. . test.qml .. . .. . main.cpp .. . .. . P.S .", "C++0x is used for simplifying code .", "Same result on C++03 compilers .", "What if you put delete w after a.exec", "Seems that it is known issue : bugreports.qt-project.org browse QTBUG-36115 https : bugreports.qt-project.org browse QTBUG-36115", "If I put delete w after a.exec then all works fine .", "But seems that it is feature of MS CRT to kill application on exiting from main .", "By adding a QWidget to application about 30MB of memory will be allocated but when the widget deletes only about 20MB of memory will be freed .", "NOTE : The code is really big 160000 Lines therefore I can t put sample code .", "Thanks in advance.. .", "How did you measure that while adding QWidget 30MB gets allocated and while freeing only 20MB .", "This ensures the proper free of resources by all classes related to that particular object .", "@MantoshKumar By checking it in Windows Task Manager .", "That is not so reliable and importantly does not directly maps from program heap-memory .", "Its basically tells about total usage of private bytes which gets increased and decreased depends on many factor .", "I would suggest to read this link-to get the complete idea about this : stackoverflow.com questions 1984186 http : stackoverflow.com questions 1984186 what-is-private-bytes-virtual-bytes-working-set", "@Mosi - create and destroy the widget 10 times and see if you have 100 mb leaked .", "Also it is worth mentioning that the task manager actually showed the process using less memory than GetProcessMemoryInfo and I think the latter is the more accurate measure of the two ." ] }
{ "confidence": [ 62.26054382324219, 61.50374984741211, 58.32639694213867, 52.10820770263672, 50.22359848022461, 45.94603729248047, 45.04098892211914, 44.22006607055664, 42.96733856201172, 36.12504577636719, 33.06679153442383, 17.053604125976562, 16.703479766845703, 12.592921257019043, 12.592921257019043, 7.953751564025879 ], "content": [ "Question : We are developing an application with Qt Qml Qml is embedded in the QWidget . When deleting a QWidget that contains a QQuickView embedded the allocated memory won t be freed entirely . By adding a QWidget to application about 30MB of memory will be allocated but when the widget deletes only about 20MB of memory will be freed . In the destructor of QWidget I have deleted the QQuickView instance and there are no other big objects . Also I am pretty sure that the QQuickView doesn t release memory properly . How can I free entire memory allocated by QQuickView NOTE : The code is really big 160000 Lines therefore I can t put sample code . Thanks in advance.. . Comment : How did you measure that while adding QWidget 30MB gets allocated and while freeing only 20MB . Comment : Make sure to declare your base classes destructor to be virtual if your program has base-derived class . This ensures the proper free of resources by all classes related to that particular object . Comment : @MantoshKumar By checking it in Windows Task Manager . Comment : That is not so reliable and importantly does not directly maps from program heap-memory . Its basically tells about total usage of private bytes which gets increased and decreased depends on many factor . I would suggest to read this link-to get the complete idea about this : stackoverflow.com questions 1984186 http : stackoverflow.com questions 1984186 what-is-private-bytes-virtual-bytes-working-set Comment : @Mosi - create and destroy the widget 10 times and see if you have 100 mb leaked . .. . Answer : I ve written a quick test to determine if there is an actual leak in the creation and deletion of a QQUickWidget : .. . .. . It has a timer that creates destroys a QQuickWidget with a loaded QML file inside and although the results initially ramp up the memory usage stabilizes in time indicating it is not likely there was a memory leak in the Qt code and that if you indeed leak memory the fault does not lie in Qt but in your own code . Also it is worth mentioning that the task manager actually showed the process using less memory than GetProcessMemoryInfo and I think the latter is the more accurate measure of the two . The task manager reading also didn t indicate any memory leaking although its value fluctuated more . Here is the output :", "Question : null .. . Answer : I founded a deadlock in Qt 5.3 . How to fix in correctly Without ugly fix not to delete qquickview .. . .. . I have a singleton with a pointer to QQuickView . When I need to close my application I do a call of QGuiApplication : : quit and try to release QQuickView in destructor of singlenot . Result - application freezes . Sample : .. . .. . test.qml .. . .. . main.cpp .. . .. . P.S . C++0x is used for simplifying code . Same result on C++03 compilers . Comment : What if you put delete w after a.exec Comment : Seems that it is known issue : bugreports.qt-project.org browse QTBUG-36115 https : bugreports.qt-project.org browse QTBUG-36115 Comment : If I put delete w after a.exec then all works fine . But seems that it is feature of MS CRT to kill application on exiting from main .", "Question : null .. . Answer : I have a Qt application created using Qt 5.6 . I have set the title of the app using QQuickView setTitle function . The title is set correctly but when I use JAWS screen reader on application-start the title is read three times . What can I do to solve this Here s how I set the title for app Comment : It is a Qt bug most likely . Comment : hello @ Kuba is there a way i can verify if this is a known bug Comment : bugreports.qt.io secure Dashboard.jspa https : bugreports.qt.io secure Dashboard.jspa", "Question : null .. . Answer : How can I get HGLRC from QQuickView in qml 5.3 application I have a program on openGL in windows which I want render to my QQuickView . The problem is that I don t want to touch render process in openGL rendering process . So first I want create QQuickView and then get the HGLRC from it and set it to openGl prog by wglMakeCurrent .. . function .", "Question : I m trying to get the MultiPointTouchArea to work correctly inside a QQuickWidget . Consider the following example qml file MultiPointTouchTest.qml : .. . .. . In the main.cpp file here I use QQuickWidget or QQuickView like this : .. . .. . or .. . .. . The MultiPointTouchArea s print is different info for follow sequence operation : .. . .. . 1 . put my first finger to touch screen .. . 2 . put my second finger to touch screen the first finger touch becomes invalid unimportant for now . 3 . remove my second finger the console prints ---onCanceled---.. . first finger touch is still invalid and touch1.pressed is false . Using QQuickView this strange behaviour does not occur . The Qt s document said for canceled signal This signal is emitted when new touch-events have been canceled because another item stole the touch-event handling . I don t know document s mean after searched . I try to read the source code to understand what the happen when I touch screen but I fond QQuickWidget : : event send touch-event TouchBegin.. . to QQuickWindow and QQuickView : : event QQuickWindow didn t reimplement . So what is real mean for the Qt s document I need QQuickWidget not QQuickView so how can I use MultiPointTouchArea with QQuickWidget and have the correct expected behaviour Comment : What is your question Comment : sorry : I want to make MultiPointTouchArea work in QQuickWidget like QQuickView like I said as my problem the first finger s move is invalidity when my second finger remove from screen . but QQuickWidget don t work as QQuickView QQuickView work perfect . .. . Answer : I had a similar issue and found that setting .. . .. . resolved it .", "Question : I am implementing a simple program with QT5.5 which contains a HTML window QWebview like the following screenshot : .. . .. . HTML window on the right side http : i.stack.imgur.com 7iPGH.png .. . .. . Now I want the program also installed for iOS e.g . for iPad . I found that the QWebview class isn t available for mobile system so I had to change my HTML window to QQuickView with QML files or is there a better way . I found the following code online : .. . .. . Then i added the container to the mainWindow . The webview.qml : .. . .. . But somehow I can t get the layout right . HTML window on iOS http : i.stack.imgur.com FeT9L.png There is a blank white rectangle behind the container and the container is also not in the HTML window on the right side where it should be . When I change the width and the height of the rectangle in the qml file it only changes the size of the webview not the white background . Can anyone tell me how can I get this right I have also used container- setParent but the view is always on the left . .. . Answer : The visibility of the author s code is maybe not enough but overall it is easier to set the widget in layout with certain alignment . This way you command the widget to be on certain side and make the placement not to depend on coordinates host widget size etc . The layout variable is assumed to be horizontal box layout or QHBoxLayout . Mind that the rest of horizontal layout should be filled like that with respecting relative positions in it . Comment : Sorry for the late feedback because it s Christmas and New year time : . The layout in my code was QVBoxLayout but i have tested with both QHBoxLayout and QVBoxLayout and Qt : : AlignRight but it has not changed at all . It s odd because the html window is actually there on the right where it should be but its content not . It seems like the container doesn t have the right parent but when I output container- parent it it correct . Do you know where can I be doing wrong", "Question : I am working on game which is written in qml and pyqt but should be divided into two windows Launcher + the Game . What is the proper way to switch between these two qml files I don t want to use QmlLoader because it doesnt resize the window and It needs to many signals I was trying also this variant : .. . .. . but it didn t work qml window stopped working.. . -classic windows error however no error was written in pycharm console .. . .. . My code looks like this : .. . .. . As you might see my structure is kind of chaotic because I do this switching behaviour for the first time so I dont really know how it should be done right.. . Every advice welcomed : .. . Answer : I had to face same problem same time ago . Instead load the same component using the same QQuickView over and over again I created a component in QML as content container and I load the required component as child of it . Every time a new component is set we destroy the current one and set the new one as child again . Before anything forgive me but functional code is written in C++ but I think that the concept can be undertood . I made a shorten version of the process and I hope it can be ported to python . To load the ContentFrame component I used a class derived from QQuickView ViewManager that has a method called setView . This method loads a component Launcher or Game in your case set it as child of contentContainer and set its anchor.fill to fill the whole parent . There are more code but the heart of the ViewManager is this method . I don t call QQmlEngine : : clearComponentCache here because I load the same components more than once but in your case it could be a good idea . Comment : Thanks you It helped me a lot .", "Question : I d like to use an ApplicationWindow as a main file and be able to switch to other QML files from C++ with QQuickView : : setSource const QUrl url . Basically it would do this : .. . .. . start-up loads main.qml ApplicationWindow click on help button C++ loads help.qml file etc . main.qml .. . .. . I am wondering if the Loader here is really necessary here .. . .. . However QQuickView only supports loading of root objects that derive from QQuickItem . Therefore it doesn t work with ApplicationWindow . I m thinking about using QQmlApplicationEngine instead of QQuickView but the usage seems different this class being only equipped with QQmlApplicationEngine : : load const QUrl url .. . .. . What would be the best course of action for my purpose Do I really need an ApplicationWindow in my main.qml file Comment : The usual course of events is : action in QML context - computation in c++ - update in the QML context according to the computation result . There are several ways to pass data between C++ and QML and you can use a StackView to switch between different views . So why bother loading a different QML from C++ Comment : The whole idea of the QML is to use the C++ not the other way around . .. . Answer : Use QQmlApplicationEngine as you suggest and with the main.qml as you say but set a context property from C++ with the content page URL e.g . help.qml - then bind to this context property in the Loader s source property . This is the normal way of controlling QML from C++ - expose context properties or singleton objects with properties drive them from C++ and have QML bindings respond to changes .", "Question : Currently I am developing a Qt class that needs to be integrated in a C++ Visual Studio project . Qt project - Qt Widgets Application . Build on Qt Creator 3.2.1 opensource based on Qt 5.3.2 . Using Visual Studio 2013 Professional the Qt Addin installed . I tried the solutions from all over the Internet or from other Stack posts but without success . I don t see my post as a duplicate since the other posts didn t solve my problem . I was able to run the QML from code but it launches on a different window . In the first picture the QML window Qt canvas is shown over my program UI . QML on a separate window http : i.stack.imgur.com 9gKo4.png .. . .. . I need to integrate the QML into my program UI . I can use a QGraphicsView if it helps . ProgramUi http : i.stack.imgur.com o68lY.png .. . .. . Simple QML example . canvas.qml Comment : How are you loading that QML file Are you using QQuickWidget Comment : Yes . I am using QQuickWidget . .. . Answer : Please have a look at a part of MVC implementation in my project . Here is a class to visualize a QML code in Qt5.6 . Hope it helps . To manage controllers I have Gui director class with the following implementation : Comment : I like your approach I think what Qt calls MVC is more a MVC framework for controls rather than a general framework for building large applications . How do you handle switching between views Comment : Well I have so-called GUI director class . I ll put it to my answer .", "Question : I receive this error title below whenever I try to run the following code : .. . .. . Cannot create window : no screens available .. . .. . The program has unexpectedly finished . All I can find online for that error are bug reports arising from specific conditions significantly more involved than the above . app.qml is a file that runs fine alone i.e . without the above C++ and in a separate project configured as a Qt Quick UI . Giving it s qrc : path or deliberately specifying a file which does not exist has no effect . Note the QObject cast - this was not present in the docs http : qt-project.org doc qt-5 qtqml-cppintegration-interactqmlfromcpp.html but without it : .. . .. . main.cpp : 11 : error : cannot initialize a variable of type QObject with an rvalue of type QQuickItem .. . .. . How should this be done .. . Answer : The QCoreApplication can be used with console-application not with GUI ones i.e . you have to use a QGuiApplication object . It seems to me that you created a console-application instead of a graphical one . You can create a proper application via the Qt Quick Application add your app.qml as a resource to that project and call such a file instead of the default main.qml provided by the project template . .. . .. . If you want to quick fix your current project just check that the .pro file is set to import GUI libraries : .. . .. . Set your qml file as a resource : .. . .. . 1 . Create a new resource file via file - new File or Project.. . - Qt - Qt Resource File .. . 2 . Right click the newly created .qrc file and click add existing file to add your app.qml file .. . .. . Finally rewrite your main like this : .. . .. . However going for the Qt Quick Application project would be the wiser choice . Comment : Note : For having the native style of the host operating-system use QApplication instead of QGuiApplication . Comment : Good point . However for QML applications not using QWidget -derived classes QGuiApplication should be preferred since it has no dependencies on QtWidgets library . Comment : Ok allright . This was what I remembered : stackoverflow.com questions 21770426 http : stackoverflow.com questions 21770426 in-qt-qml-controls-applicationwindow-lacks-the-native-looking-theme-when-run Not sure if this still applies . Comment : I see and by the way I ve trusted your words before From the .pro file of the gallery example we have : android : ios : blackberry : qtHaveModule widgets : QT + widgets . Now the question is : that platforms are removed because no default style is provided or the styles are will be added to the QtQuickControls Probably the first one . You know what I m going to try that example on Android with 5.4.0 RC ASAP . : Comment : The RC example has code no desktop : QT + widgets . Removing the line results in a default L F on my Windows machine whereas my 4.4 device has a nice Android feel differently from 5.3 . Pretty must settle down : following the example use the row above in .pro file and then use QT WIDGETS LIB to import use QGuiApplication or QApplication accordingly . Probably the desktop themes will remain bound to the widget library don t know about that . However having such a dependency on a desktop environment is not that awful .", "Question : I have a requirement for my project to display two QML Window s each on one of the screen one sender one receiver . Both of the .qml requires me to include some Cpp models inside hence I m using QQmlApplicationEngine to register the Cpp models . I found out that using QWidget : : createWindowContainer I m able to display multiple Window s for a single project . This works perfectly fine for the first QML file . The code-snippets looks like this : .. . .. . I decided to create a 2nd application engine for my receive.qml with a similar method . I soon realized that the receive.qml would never open even with container2- show . Now it is showing an empty page . My questions are : .. . .. . 1 . Is my approach correct or is there a better solution for this 2 . What signal do I need look out for to catch the window close event I cant seem to be able to detect the signal when one of the window is closed . as I wanted to close the both when one has been detected . .. . Answer : That can be done easier for example : .. . .. . main.qml .. . .. . And so you can access these windows from C++ code : .. . .. . main.cpp .. . .. . To catch a closing event you should use QQuickWindow : : closing http : doc.qt.io qt-5 qquickwindow.html closing event Comment : nice the solution works like a charm . it seems like we can only have 1 engine at anytime. . As for shifting the 2nd window to 2nd screen I obtained the availableGeometry from qApplication : : desktop and set the window2 s x y using wnd2- setX . . wnd2- setY . . to get the desired position . Is it ok to set x y directly via the QQuickWindow Or do I have to use QObject : : setProperty Comment : Update : from doc.qt.io qt-5 qtqml-cppintegration-interactqmlfromcpp.html http : doc.qt.io qt-5 qtqml-cppintegration-interactqmlfromcpp.html it seems that it is recommended to use setProperty to set the X and Y . I shall adopt this method . Comment : You can use Screen http : doc.qt.io qt-5 qml-qtquick-window-screen.html item to adjust size and position in QML", "Question : main.cpp .. . .. . qmlfile : .. . .. . The transparent background flickers https : youtu.be 6fg-KJq9caU but only with an animation . The example is pretty basic so whats the problem Comment : Well it ain t the QML code maybe a problem with platform support Does it flicker if you don t set those extra view flags Comment : Nope . Without FramelessWindowHint everthing is fine . Comment : Well it looks like a bug you should post a bug report . Just don t hold your breath for a quick resolution : .. . Answer : Short answer : Set the environment variable to QSG RENDER LOOP basic .. . .. . Long answer : I dont know the exact internals . The Qmlscene is rendered by multiple threads when QSG RENDER LOOP threaded is set . But some drivers fail in rendering smooth animations . Hence for untested systems x11 mesa initially QSG RENDER LOOP was set to basic . Since 5.5 threaded is the default .", "Question : null .. . Answer : I m having a problem trying to insert a QML view into a native OSX window . I know it s possible but I don t know what I m doing wrong . Basically my goal is given a native NSView to then embed a QML based widget . The problem is that I get it to point where it does indeed renderer the qml inside the view but it creates an extra transparent window to the side and it doesn t seem to redraw the QML view properly . Here s the code that I m using please disregard all the memory-leaks : .. . .. . And here s the simple qml :", "Question : null .. . Answer : I have a QStackedLayout with two QWidget objects added to it . Second QWidget is created like this : .. . .. . Now I want to be able to show and hide the second top widget . I do this by calling m qmlWidget- setVisible false or m qmlWidget- setVisible true but whenever I do this the widget is being painted whole blank white color and shortly after it changes background to transparent color . This is a problem to me because first widget will be mostly black . I think the reason of the problem is that QML file is being loaded and it blocks repaint event . Two solutions that come to my mind are : .. . .. . load QML file asynchronously .. . do not unload the second widget when it is not visible .. . .. . I am afraid that both of those options are impossible to do . How can I solve the problem with flickering white background The flicker happens when I change visible of the second QWidget to true or false . I do not understand why the flicker happens on hiding the top widget . .. . .. . Here https : github.com fhazubski QQuickViewFlickerProblem you can find a working example project . Maybe the QOpenGLWidget object is the problem here . Creating two widgets did not seem to produce the problem . Comment : Paste more code to be more illustrative . Comment : @CoolGuyCG It would be too much files to paste so I have created example project and added it to the question .", "Question : I use the listview like this : .. . .. . .. . I want get the part of the model which belong to currentItem in onCurrentItemChanged . For example : .. . the model is .. . .. . So there should be 3 item . If I click the second one I can get the ListElement which uuid is bbbb . Is there any way Comment : Why do you want to get the currentItem within onCurrentItemChanged handler Comment : the solution is datas.get currentIndex like that you can get the currentItem I ll update my solution Comment : @sk2212 I want to pass the item to c++ object . Comment : @behtgod but why within this handler Why did you need the item at this point Please tell me the user story behind . Comment : @sk2212 I want this : If I click the item of list I can get the model which belong to the item and pass the model to c++ and use the model s properties to query DB or do other things in c++ . My actual model is c++ object inherits QAbstractItemModel . So I can t find the item by index only if that I declare a function . I just want to know whether there is some other solutions . In fact I don t think use index to find item is a good way I worry about it s wrong if the list is sorted . .. . Answer : You can do : .. . .. . then the code will be .. . .. . or you can try this approach when button clicked emit a signal with parameters the current element and the index or only the element . example :", "Question : null .. . Answer : So I ve been using QTCreator recently and I m in love ATM . Unfortunately I would like to use it with Python but I ve been running into problems . The biggest problem I have is finding children of my application context returning None . main.py .. . .. . loadingscreen.qml .. . .. . white background isn t the only one I ve tested they all don t work . I cannot understand what the problem is . As a side note the signal I have in-place doesn t send either . I ve wanted to try to connect manually but I can t because findChild doesn t work ." ] }
[ "yes-answer-long", "yes-answer-short" ]
user-interface
UNK_RELATION
vcproj@visual-studio@47
vcproj -- vcproj is an xml based file used by @placeholder and contains compilation information .
{ "confidence": [ 48.77458953857422, 43.746978759765625, 42.51407241821289, 42.51407241821289, 42.51407241821289, 42.466529846191406, 41.04237747192383, 40.7879638671875, 40.14509582519531, 40.07060241699219, 40.07060241699219, 40.02306365966797, 39.64228820800781, 38.86953353881836, 38.86953353881836, 38.86953353881836, 38.688621520996094, 38.46977996826172, 38.46977996826172, 38.46977996826172, 38.46049880981445, 38.3444938659668, 37.758121490478516, 37.009315490722656, 36.95979309082031, 36.07529067993164, 35.69970703125, 35.329673767089844, 35.329673767089844, 35.329673767089844, 35.329673767089844, 35.329673767089844, 35.329673767089844, 35.28447723388672, 35.28447723388672, 34.863502502441406, 34.68183135986328, 34.56584930419922, 34.21826171875, 34.173065185546875, 34.173065185546875, 34.02439880371094, 33.66867446899414, 32.886207580566406, 32.886207580566406, 32.84101104736328, 32.77528381347656, 32.77528381347656, 32.73438262939453, 32.29554748535156, 32.29554748535156, 31.580928802490234, 31.580928802490234, 31.580928802490234, 31.32364273071289, 31.32364273071289, 31.32364273071289, 31.099971771240234, 31.099971771240234, 31.099971771240234, 31.099971771240234, 31.099971771240234, 31.099971771240234, 31.099971771240234, 31.099971771240234, 31.05906867980957, 31.05906867980957, 28.91007423400879, 28.656503677368164, 28.656503677368164, 28.656503677368164, 28.511301040649414, 28.511301040649414, 28.511301040649414, 27.798662185668945, 27.287208557128906, 27.09393882751465, 27.053035736083984, 26.067832946777344, 26.067832946777344, 25.611896514892578, 25.294328689575195, 25.072317123413086, 24.904041290283203, 24.505268096923828, 24.392751693725586, 23.16843032836914, 19.35040283203125, 19.050945281982422, 18.31416893005371, 17.340673446655273, 17.26165008544922, 17.170536041259766, 16.855859756469727, 16.76524543762207, 16.454631805419922, 16.37593650817871, 16.308712005615234, 16.216304779052734, 16.067087173461914 ], "content": [ "no vcproj file for VS2010", "I am trying to write an MSBuild wrapper script that builds a vcproj well a solution containing vcproj files and then copies the output of a particular vcproj file into a special package directory that is in turn published out to a file share .", "But this is a .vcproj from vs2008 .", "only but not the VisualStudioProject .vcproj", "I have pangoft2.vcproj .", "how to write a batch-file to delete VisualStudioUserFile .vcproj .", "Basically .vcproj is used by the old VCBuild system and .vcxproj is used by the new XML based MSBuild system .", "@sbi : AFAIK it generates the .vcproj files .", "You are aware that .vcproj no longer exist on VS2010", "I need .vcproj", "How to generate .sln .vcproj", "The vcproj format file is not the same as the C and VB one .", "What works with a .vcproj file will not work with a .vcxproj file .", "But what I really want is an explanation for each of the elements in the vcproj file a reference .", "I also think that for VS2010 the .vcproj file changes to the .csproj format .", "Well you found out that looking at the .vcproj file isn t enough .", "I found an XML Schema for the .vcproj file http : msdn.microsoft.com en-us library y4sy8216.aspx which is nice .", "All the elements in the .vcproj are documented sort of i.e .", "Is there a .sln or .vcproj hack that I could use", "i use python to modify .vcproj and then build it .", "The .vcproj and .vcxproj file formats are really completely different .", "If that why not generate a vcproj for the generated files", "In VC++ this might or might not be the location of a .vcproj file depending on many factors .", "I want to rebuild the same project with different building macro --- setting PreprocessorDefinitions in .vcproj .. . .. . another question : is there a simple way to replace the value of PreprocessorDefinitions in the .vcproj", "So do they substitute it with another file or take out the vcproj file all togeether", "We create the vcproj file with the makefileproj keyword so we can use our own build in VS . My question is using C how do you read the C++ from the following vcproj file : .. . .. . I used XmlNode and got upto the second Platform : .. . .. . This will print Name but I need C++ .", "Does anyone know a way that I can read the value of the OutputDirectory property form a vcproj file", "So I d like a reference that allows me to edit the .vcproj directly .", "I know msbuild can build .vbproj and .csproj but can it build .vcproj", "With Visual Studio 2010 .vcproj files are MSBuild files so this requirement is lifted .", "Your build directory is disposable you should never share .vcproj files .", "So you should definitively all use the same .vcproj files .", "@sbi : you are completely ignoring the fact that those .vcproj files are generated with FireBreath .", "If I don t have Visual Studio installed will MSBuild be able to build a .sln file that references a .vcproj file", "Visual Studio will always create a .sln file when it loads a .vcproj file and cannot find a matching .sln .", "What is the difference between a .vcproj and a .vcxproj Visual Studio project file", "The projects folder contains all our source the build folder containing the .vcproj s just contains project and solution files that relate the project source with FireBreath .", "For this purpose I have 2 VC projects. . A 08 project called XYZ 2008.vcproj and a 05 project called XYZ 2005.vcproj and the corresponding 2 slns as well .", "I have a solution .sln containing more than 100 Projects .vcproj .", "Within this tutorial it states that the image file to display MUST be in the same folder as the .vcproj file .", "@IInspectable Quoted : Visual Studio users will need to put the bitmap file in the same directory as your vcproj file .", "The various .vcproj files that make up the solution all contain hard-coded references to my local file system .", "When I got you correctly your problem is that FireBreath generates those .vcproj files with absolute paths in it and you want to use this .vcproj files on a different developer machine .", "qmake -tp vc Test.pro -o Test.vcproj generated test.vcproj but this is not vcproj .", "Next I open XYZ 2008.sln containing XYZ 2008.vcproj and build not rebuild it .", "Before I modified the vcproj file the RelativePath attribute contained the absolute path to the file .", "Unfortunately I cannot import vcproj for VS 2008 files into an MSBuild script as they are not MSBuild-compatible so that approach does not work .", "I m trying to sort Microsoft Visual Studio s vcproj so that a diff would show something meaningful after e.g .", "Ideally I would like to be able to read the OutputDirectory from the vcproj file for a particular Configuration Platform so that I can then copy its contents .", "Can anyone please show me a sample of a vcproj file with a project reference not assembly reference or could at least show me the format how is it written in the file .", "Well you know the values ProjectDir is the directory where you found the .vcproj file SolutionDir is the directory where you found the .sln file .", "I have a script that generates a .sln file and a few .vcproj files for visual-studio-2005 .", "How does one specify Configuration Properties- Debugging- Working Directory from the .sln or .vcproj file", "Most simple one qmake -project qmake -t vcapp .. . .. . and you get the .vcproj file", "Is the .vcproj format only available in versions of Visual Studio prior to 2010", "Here is your answer : it has been changed from .vcproj to .vcxproj", "was the last version to us vcproj all later versions use vcxproj", "I moved over to cmake and now I don t have to mess with vcproj files they are generated for me .", "You can build .vcproj files with MSBuild 2.0 3.5 without VS installed .", "@all : Yes FireBreath generates the .vcproj files dynamically and it turns out that these do not need to be kept under source control .", "Use SCM on the project not on Firebreath .. . then run the CMake commands on each machine to rebuild the .vcproj s with references to the local system .", "Ask the authors of FireBreath to change their .vcproj generator to allow relative paths use of environment-variables etc .", "If 1 or 2 does not work write a program or script for changing the absolute path to relatives in those .vcproj files .", "turned out to be the best solution : generating those .vcproj files for each developer individually .", "Now in a new .sln where I have a pango.vcproj I add this pangoft2.vcproj .", "The project file looks like this when created : .. . .. . And after editing any property : .. . .. . The project files are vcproj notsure if this happens in other formats too .", "So what I would like to do is find our at CMake time what GUIDs are planned for these projects and to edit the vcproj file accordingly .", "My scenario is I need to read a vcproj file as a text file and get its properties like the outputdirectory etc. . problem is some properties contain environment-variables like SolutionDir and the like .", "I have a single un-managed C++ console-app solution .sln with two projects .vcproj both are built as .exe .", "Is there a way to set a vcproj Project folder in order to automatically include all .cpp or .h files depending on the path of the project", "My trouble is trying to get the project vcproj files to similarly behave when reference files from that other code area .", "I don t know what you need this for so this may or may not be relevant but Visual Studio 2010 is going to ditch the .vcproj format .", "To build managed projects you don t need Visual Studio but to build .vcproj files you will have to have Visual Studio installed .", "The references in the .vcproj concern only managed projects so if you want to reference native projects there are other ways to do it : .. . .. . reference project in libs added .", "There s a bug in the formatting of the version field in the vcproj file which means that it s constantly being changed from comma to dot and back again depending on who edited the file last .", "You can extract OutputPath for each Configuration in separate property files like Debug.Properties Release.Properties etc and then import appropriate one using directive in both vcproj and msbuild script files .", "You may not be able to do this but using a solution that generates the vcproj like CMake for example would let you do this .", "Build System Changes http : msdn.microsoft.com en-us library ee862524.aspx .. . .. . Project files no longer use the .vcproj file name extension .", "Assuming that I am starting from a clean state I first open XYZ 2005.sln containing XYZ 2005.vcproj in VS2005 and build it successfully .", "I just want to be able to use several IDE and have all the source files automatically taken into account into my vcproj Project .", "What you should not do due to the FireBreath FAQ http : www.firebreath.org display documentation Frequently+Asked+Questions : don t change the .vcproj manually those changes will be lost next time the project is regenerated .", "I found the vcproj file definition http : msdn.microsoft.com en-us library 2208a1f2 28VS.80 29.aspx at msdn but it seems that this option cant be set from there .", "I am working with Visual Studio 2012 build definitions with TFS2012 and one definition is set to build a solution that contains both .csproj and .vcproj c and c++ respectively .", "I ask because I am reading an MSDN tutorial dated 10 12 which says to insert text into a certain area of the .vcproj file that doesn t exist in the .vcxproj file .", "Store in our version-control system some Visual Studio 2008 native C++ VCPROJ project files for the developers in our team that use this IDE .", "Within the vcproj file I ve tried : .. . .. . File RelativePath blah .. . .. . .. . and .. . .. . File RelativePath blah .. . .. . .. . Neither work - I receive an error when I try to open the file : .. . .. . u : path to vcprojfile blah .. . myfile.c Cannot open file .", "On other words when adding files to the folder of my project using Windows explorer is it possible to have these new files automatically added to a vcproj Project inside Visual Studio", "Those spaces are always insignificant in XML and I believe that there is no option to control this behavior in a general way for any XML XSLT library .", "XSLT works on a tree representation of the input XML .", "But it s XML it s readable .", "I would say that not even an XML parser do care about attributes order or space between as per the specs .", "deleting a file from a project .", "One solution that sorta works is to use conditional-compilation macros : .. . .. . But in this case the debugger and IntelliSense don t work for SomeTestLib .", ".. . .. . They re switching to .vcxproj which is based on MSBuild .", "Take 10 minutes to read how to create them and in no time you ll have all the scripts you need to create PRO VCPROJ and build in one command.. . .. . .. . http : www.dprog.net joomla index.php option com content view article id 39 : qt-integration-scripts catid 32 : qt-integration-scripts Itemid 47 http : www.dprog.net joomla index.php option com content view article id 39 : qt-integration-scripts catid 32 : qt-integration-scripts Itemid 47", "The file extension for a project file is .csproj", "All the company uses the R : drive to deploy compilation results and symbols so it s easy for each one to modify and test an installed application .", "Apparently there was another project that referenced this project and used a header file from it which included some boost files .", "The input looks like .. . .. . space File .. . .. . spacespace RelativePath filename .. . .. . spacespace .. . .. . .. .", "Many of the irrelevant detail of the original XML has been abstracted away in this tree - for example the order of attributes insignificant whitespace between attributes or the distinction between and as an attribute delimiter ." ] }
{ "confidence": [ 53.94844055175781, 51.64930725097656, 49.919525146484375, 49.28070831298828, 48.03590774536133, 46.942176818847656, 46.67509078979492, 45.96198272705078, 45.73843765258789, 45.695098876953125, 45.03566360473633, 44.17762756347656, 44.032623291015625, 43.75923156738281, 43.02162170410156, 42.957801818847656, 42.931175231933594, 42.680755615234375, 42.177555084228516, 42.0242919921875 ], "content": [ "Question : What is the difference between a .vcproj and a .vcxproj Visual Studio project file Is the .vcproj format only available in versions of Visual Studio prior to 2010 I ask because I am reading an MSDN tutorial dated 10 12 which says to insert text into a certain area of the .vcproj file that doesn t exist in the .vcxproj file . Trying to put the text in a similar area breaks the project . Comment : Out of curiosity what tutorial are you watching that asks you to modify the vc x proj by hand Comment : The .vcproj and .vcxproj file formats are really completely different . That s why they changed the names . What works with a .vcproj file will not work with a .vcxproj file . .. . Answer : Build System Changes http : msdn.microsoft.com en-us library ee862524.aspx .. . .. . Project files no longer use the .vcproj file name extension . Visual Studio automatically converts project files that were created by an earlier release of Visual C++ to the format that is used by the current system . For more information about how to manually upgrade a project see Upgrade devenv.exe http : msdn.microsoft.com en-us library w15a82ay.aspx . .. . The MSBuild system is used to build Visual C++ projects . However in Visual Studio 2008 and earlier releases the VCBuild system was used . Certain file types and concepts that depended on VCBuild either do not exist or are represented differently in the current system . .. . In the current release the file name extension for a project file is .vcxproj . Here is your answer : it has been changed from .vcproj to .vcxproj Comment : Hmm . I guess the tutorial is outdated even though it has a build date of 10 12 . : Comment : Basically .vcproj is used by the old VCBuild system and .vcxproj is used by the new XML based MSBuild system . Comment : No longer .. . Current system ...Can you please be clear at what point the change occurred ...Eg . VS2010 was the last version to us vcproj all later versions use vcxproj Comment : @BlueChip The MSBuild system is used to build Visual C++ projects . However in Visual Studio 2008 and earlier releases the VCBuild system was used .", "Question : We create the vcproj file with the makefileproj keyword so we can use our own build in VS . My question is using C how do you read the C++ from the following vcproj file : .. . .. . I used XmlNode and got upto the second Platform : .. . .. . This will print Name but I need C++ . How do I read that Thank you very much in advance Comment : why don t you simple debug it place a breakpoint on the console.WriteLine line and mousehover the name variable .. . you will see all properties that you can have and it s easy to find one with the output as C++ .. . Comment : You are aware that .vcproj no longer exist on VS2010 Comment : really no vcproj file for VS2010 So do they substitute it with another file or take out the vcproj file all togeether .. . Answer : Use name.Value . Comment : yes that works too . thank you", "Question : We create the vcproj file with the makefileproj keyword so we can use our own build in VS . My question is using C how do you read the C++ from the following vcproj file : .. . .. . I used XmlNode and got upto the second Platform : .. . .. . This will print Name but I need C++ . How do I read that Thank you very much in advance Comment : why don t you simple debug it place a breakpoint on the console.WriteLine line and mousehover the name variable .. . you will see all properties that you can have and it s easy to find one with the output as C++ .. . Comment : You are aware that .vcproj no longer exist on VS2010 Comment : really no vcproj file for VS2010 So do they substitute it with another file or take out the vcproj file all togeether .. . Answer : You can access the value of the attribute with the Value property : .. . .. . Or even better get it by name instead of indexing which is shorter and more reliable : .. . .. . The GetAttribute method directly returns the value as a string . Comment : when I try to do that it gives the following error : Error1 System.Xml.XmlNode does not contain a definition for GetAttribute But I did find the following code works : Console.WriteLine name.InnerText Comment : @Dulantha : Hum . It seems the Attributes collection is available but GetAttribute isn t . That s odd . I revised my code to add the necessary cast .", "Question : I looked on MSDN couldn t find it . I found an XML Schema for the .vcproj file http : msdn.microsoft.com en-us library y4sy8216.aspx which is nice . But what I really want is an explanation for each of the elements in the vcproj file a reference . The immediate question in front of me is what is the significance of the UniqueIdentifier attribute in the element VisualStudioProject Files Filter Is the UUID for source files the same across projects Or is it unique globally But after I answer that one question I am sure I will have 10000 more . So I d like a reference that allows me to edit the .vcproj directly . Can anyone suggest EDIT : Even if MS does not document it each element does have a meaning . Does anyone know of a list or a summary Comment : This will get better in visual-studio-2010 if you read their team blog you ll find pointers to the changes . I would ask this in the MS forums if you don t get an answer here . .. . Answer : All the elements in the .vcproj are documented sort of i.e . the DevStudio documentation for the VS Automation interfaces describe the project objects properties and the project objects properties directly map to the xml elements attributes . Comment : This is worth a look thanks .", "Question : I am trying to write an MSBuild wrapper script that builds a vcproj well a solution containing vcproj files and then copies the output of a particular vcproj file into a special package directory that is in turn published out to a file share . I need to do this for several Configurations and Platforms Debug Release Win32 x64 . Ideally I would like to be able to read the OutputDirectory from the vcproj file for a particular Configuration Platform so that I can then copy its contents . With csproj files this is simple as I can import the csproj file into my MSBuild wrapper script and then read the OutputPath property . Unfortunately I cannot import vcproj for VS 2008 files into an MSBuild script as they are not MSBuild-compatible so that approach does not work . Does anyone know a way that I can read the value of the OutputDirectory property form a vcproj file Please note that I do not want to use XPath and roll this myself as the raw OutputDirectory property looks something like ProjectDir bin ConfigurationName PlatformName . I want all those macros expanded for me just as would be done when running vcbuild . .. . Answer : You can extract OutputPath for each Configuration in separate property files like Debug.Properties Release.Properties etc and then import appropriate one using directive in both vcproj and msbuild script files . Or Dynamically depends on Configuration : .. . .. . Set value of the property ConfigurationBasedPropertiesFile considering current Configuration", "Question : I looked on MSDN couldn t find it . I found an XML Schema for the .vcproj file http : msdn.microsoft.com en-us library y4sy8216.aspx which is nice . But what I really want is an explanation for each of the elements in the vcproj file a reference . The immediate question in front of me is what is the significance of the UniqueIdentifier attribute in the element VisualStudioProject Files Filter Is the UUID for source files the same across projects Or is it unique globally But after I answer that one question I am sure I will have 10000 more . So I d like a reference that allows me to edit the .vcproj directly . Can anyone suggest EDIT : Even if MS does not document it each element does have a meaning . Does anyone know of a list or a summary Comment : This will get better in visual-studio-2010 if you read their team blog you ll find pointers to the changes . I would ask this in the MS forums if you don t get an answer here . .. . Answer : I don t know what you need this for so this may or may not be relevant but Visual Studio 2010 is going to ditch the .vcproj format . .. . .. . They re switching to .vcxproj which is based on MSBuild . And as such is also going to be fully documented .. . .. . So it may be easier to target that at least in the long run . As for the GUID s I believe each of them just have to be unique . I don t think there s any relationship between them two elements should never have the same GUID . Microsoft just likes to give everything its own GUID . You never know when you re gonna need it Comment : I know the project file will-change but. . I don t have the budget for VS2010 . After looking at it further Source Files the collection has a GUID Header Files has a GUID and Resource Files has a GUID and these appear to be the same GUIDs across projects .", "Question : I looked on MSDN couldn t find it . I found an XML Schema for the .vcproj file http : msdn.microsoft.com en-us library y4sy8216.aspx which is nice . But what I really want is an explanation for each of the elements in the vcproj file a reference . The immediate question in front of me is what is the significance of the UniqueIdentifier attribute in the element VisualStudioProject Files Filter Is the UUID for source files the same across projects Or is it unique globally But after I answer that one question I am sure I will have 10000 more . So I d like a reference that allows me to edit the .vcproj directly . Can anyone suggest EDIT : Even if MS does not document it each element does have a meaning . Does anyone know of a list or a summary Comment : This will get better in visual-studio-2010 if you read their team blog you ll find pointers to the changes . I would ask this in the MS forums if you don t get an answer here . .. . Answer : I think I remember an issue with a really old version of CMake http : cmake.org to do with UniqueIdentifier that they weren t properly unique . If I am correct the issue was fixed and uniqueIdentifier should be a GUID . Sorry I cannot be more help . I moved over to cmake and now I don t have to mess with vcproj files they are generated for me . You can probably find more information on the the CMake http : cmake.org site as they have a generator for the vc project files they must have done all the reverse-engineering already . Comment : Also QT has a generator qmake for vc project files from .pro files which are defined by QT .", "Question : I m working on a project with two other developers that s built on FireBreath http : www.firebreath.org display documentation FireBreath+Home . So far I ve been able to get things working perfectly on my machine but we need to coordinate our development via Mercurial . So I pushed my files to the repository and thought all was well . Unfortunately that doesn t work . The various .vcproj files that make up the solution all contain hard-coded references to my local file system . This works fine for me because I m not moving the project around . But when you try to build the solution on another machine with a different file structure different drive letter different folder location etc . everything breaks . I used FireBreath s standard project generation script Python and then the Visual Studio CMake script prep2008.cmd to generate the solution files . What can I do to tweak things so that other developers can use the same code base .. . Answer : EDIT : I rewrote my anyswer to make it clearer . When I got you correctly your problem is that FireBreath generates those .vcproj files with absolute paths in it and you want to use this .vcproj files on a different developer machine . I see 3 options : .. . .. . 1 . Live with it . That means make sure every team member has the same file structure view to the file system tools installed in the same place . 2 . Ask the authors of FireBreath to change their .vcproj generator to allow relative paths use of environment-variables etc . 3 . If 1 or 2 does not work write a program or script for changing the absolute path to relatives in those .vcproj files . Run this script whenever you have to regenerate your FireBreath project . What you should not do due to the FireBreath FAQ http : www.firebreath.org display documentation Frequently+Asked+Questions : don t change the .vcproj manually those changes will be lost next time the project is regenerated . EDIT : seems that option 4 . turned out to be the best solution : generating those .vcproj files for each developer individually . Hope my suggestions were helpful either . Comment : And then what do you do when you need to switch one developer to another project Re-install his whole machine Comment : Well I have never been a situation where file structures of different projects were completely incompatible . If my suggestion is applicable depends a lot in what kind of organization you are working .", "Question : how to write a batch-file to delete VisualStudioUserFile .vcproj . only but not the VisualStudioProject .vcproj .. . Answer : This can be run interactively in cmd : .. . .. . if you want a batch-file then you need .. . .. . This won t delete files like blah.vcproj.vcproj though . I don t know how likely those are in your case .", "Question : I m working on a project with two other developers that s built on FireBreath http : www.firebreath.org display documentation FireBreath+Home . So far I ve been able to get things working perfectly on my machine but we need to coordinate our development via Mercurial . So I pushed my files to the repository and thought all was well . Unfortunately that doesn t work . The various .vcproj files that make up the solution all contain hard-coded references to my local file system . This works fine for me because I m not moving the project around . But when you try to build the solution on another machine with a different file structure different drive letter different folder location etc . everything breaks . I used FireBreath s standard project generation script Python and then the Visual Studio CMake script prep2008.cmd to generate the solution files . What can I do to tweak things so that other developers can use the same code base .. . Answer : If your developers are not using the same build make project files this could quickly become a maintenance nightmare . So you should definitively all use the same .vcproj files . An exception to this would be if the project files were generated from some other files . In that case treat those other files in the way described above . there s two ways to deal with the problem of differing setups on different machines . One is to make all paths relative to the project s path . The other is to use environment-variables to refer to files tools libraries whatever . IME it s best to use relative paths for everything that can be checked out with the project and use environment-variables for the rest . Add a script that checks for the existence of all necessary environment variable pointing out the meaning of any missing ones and run this as a build prerequisite so whoever tries to get a new build machine up and running gets hints at what to do . Comment : I like the idea of the self-documenting build . Comment : @sbi : you are completely ignoring the fact that those .vcproj files are generated with FireBreath . Comment : @Doc : Oh . I don t know FireBreath . What does it do Comment : @sbi : AFAIK it generates the .vcproj files . So changing them directly or manually may be not the best way to solve the problem . Look into the FireBreath FAQ as I wrote in my post . Comment : @all : Yes FireBreath generates the .vcproj files dynamically and it turns out that these do not need to be kept under source control . The projects folder contains all our source the build folder containing the .vcproj s just contains project and solution files that relate the project source with FireBreath . Use SCM on the project not on Firebreath .. . then run the CMake commands on each machine to rebuild the .vcproj s with references to the local system . Works beautifully", "Question : I know msbuild will be installed if I install Visual Studio 2005 or 2008 . I know msbuild is also installed if I install the .NET Framework SDK . As of .NET 3.0 I think there is no longer a separate .NET Framework SDK . Instead if I want the free SDK stuff - all the .NET command-line tools all the base-class libraries - then I can download the Windows SDK and install the .NET portion of it . I will also get the msbuild tool if I do this . Right Now to my questions : .. . .. . 1 . Will I get msbuild if I install one or more parts of the Windows SDK that does not include the .NET SDK 2 . Will I get nmake too 3 . If I don t have Visual Studio installed will MSBuild be able to build a .sln file that references a .vcproj file I know msbuild can build .vbproj and .csproj but can it build .vcproj I also think that for VS2010 the .vcproj file changes to the .csproj format . But this is a .vcproj from vs2008 . .. . .. . I am distributing some source code and I want to describe what is required to build the source . I know the source can be built with VS 2008 . I want to also describe how it can be built without VS2008 . Thanks . .. . Answer : As Jon stated MSBuld is installed with the .NET framework . To build managed projects you don t need Visual Studio but to build .vcproj files you will have to have Visual Studio installed . With Visual Studio 2010 .vcproj files are MSBuild files so this requirement is lifted . Comment : This seems to be in direct contrast to what dan moseley said . Care to reconcile those two statements Comment : Sorry wasn t thinking about the SDK . Hey Dan is the man", "Question : all There are many vc projects in my solution . i can call devenv.exe xxx.sln to build rebuild all these projects together . Also i can right-click some specific project and rebuild it . My question : how to do the same thing of right-click and rebuild when i use devenv.exe I want to rebuild the same project with different building macro --- setting PreprocessorDefinitions in .vcproj .. . .. . another question : is there a simple way to replace the value of PreprocessorDefinitions in the .vcproj im now using the python to do this . .. . Answer : devenv has the command-line option command to run a command on start up : could this be used Devenv Command Line Switches http : msdn.microsoft.com en-us library xee0c8y7.aspx Comment : i use python to modify .vcproj and then build it .", "Question : I looked on MSDN couldn t find it . I found an XML Schema for the .vcproj file http : msdn.microsoft.com en-us library y4sy8216.aspx which is nice . But what I really want is an explanation for each of the elements in the vcproj file a reference . The immediate question in front of me is what is the significance of the UniqueIdentifier attribute in the element VisualStudioProject Files Filter Is the UUID for source files the same across projects Or is it unique globally But after I answer that one question I am sure I will have 10000 more . So I d like a reference that allows me to edit the .vcproj directly . Can anyone suggest EDIT : Even if MS does not document it each element does have a meaning . Does anyone know of a list or a summary Comment : This will get better in visual-studio-2010 if you read their team blog you ll find pointers to the changes . I would ask this in the MS forums if you don t get an answer here . .. . Answer : I suspect Microsoft is not intending to make the format a documented one . Microsoft has stated in the past that documented features and formats require in some cases an order of magnitude more work . If the format is not documented it s because Microsoft wants it that way . Any documentation will be through analysis and reverse-engineering . Comment : I can believe that MS did not document the format . But it s XML it s readable . Has anyone anywhere done the analysis and reverse-engineering Comment : The XML node names pretty much correspond to options in the config manager properties pages for your project . It shouldn t be rocket surgery to figure it out .", "Question : I know msbuild will be installed if I install Visual Studio 2005 or 2008 . I know msbuild is also installed if I install the .NET Framework SDK . As of .NET 3.0 I think there is no longer a separate .NET Framework SDK . Instead if I want the free SDK stuff - all the .NET command-line tools all the base-class libraries - then I can download the Windows SDK and install the .NET portion of it . I will also get the msbuild tool if I do this . Right Now to my questions : .. . .. . 1 . Will I get msbuild if I install one or more parts of the Windows SDK that does not include the .NET SDK 2 . Will I get nmake too 3 . If I don t have Visual Studio installed will MSBuild be able to build a .sln file that references a .vcproj file I know msbuild can build .vbproj and .csproj but can it build .vcproj I also think that for VS2010 the .vcproj file changes to the .csproj format . But this is a .vcproj from vs2008 . .. . .. . I am distributing some source code and I want to describe what is required to build the source . I know the source can be built with VS 2008 . I want to also describe how it can be built without VS2008 . Thanks . .. . Answer : You can build .vcproj files with MSBuild 2.0 3.5 without VS installed . If you don t have VS you need the appropriate Windows SDK installed . Either will work . Comment : This seems to be in direct contrast to what Sayed said . Care to reconcile those two statements Comment : VS installs a subset of the SDK so it s correct to say that either VS including native-code components during setup and or the Windows SDK are required . In 4.0 one or the other are actually still required . Although we don t need vcbuild.exe anymore as VC projects are MSbuild format you ll still in practice need the tools headers and libs which come from the SDK . Dan MSBuild team", "Question : Here I am again asking for help . Can anyone please show me a sample of a vcproj file with a project reference not assembly reference or could at least show me the format how is it written in the file . I have searched in the internet for samples but cant find one with project reference only assembly refs like these .. . .. . so can anyone please give me a sample as i need to handle these references by reading them as an XML . Thanks you very muchh Comment : Why not create such a reference and open the solution file in a text-editor to see how it was added Comment : Ok now I have got the format thanks . My next question is is there a way to get the MinFrameworkVersion 131072 programatically Because I need to convert these projectref to an assemblyref and i do this just by modifying the proj file as a txt . Or is it safe to not include the MinFrameworkVersion 131072 in the file . .. . Answer : The references in the .vcproj concern only managed projects so if you want to reference native projects there are other ways to do it : .. . .. . reference project in libs added . in the .sln file reference that P1 is dependant to P2 . in the source code use pragma comment lib . .", "Question : I have main.cpp in c : test folder and do the following : .. . .. . The answer is : .. . .. . But I don t need make files . I need .vcproj Environment : Windows XP Pro SP3 MSVC 7.1 and 8.0 . Qt is installed in C : Qt 2010.02 LGPL version . Commands are run from Qt Command Prompt . What s wrong with it How to generate .sln .vcproj May I generate them for MSVC 7.1 and 8.0 .. . Answer : Most simple one qmake -project qmake -t vcapp .. . .. . and you get the .vcproj file", "Question : Ive been recently interested in creating C++ applications utilizing SDL however I have been stopped many times with compilation errors etc . Recently I have tried again using Visual Studio as my IDE . I have linked the libraries correctly or so I think and have come to the conclusion of my problem with the second SDL tutorial by LazyFoo http : lazyfoo.net SDL tutorials which shows an image . Within this tutorial it states that the image file to display MUST be in the same folder as the .vcproj file . Although for me their is none am I merely overlooking it Or is this tutorial outdated EDIT : I have attempted pasting the file in every directory project to no avail . Comment : Which part of the tutorial are you referring to I didn t find any reference to vcproj in the setup lesson . You should also specify the version of Visual Studio you are using . And the errors you get . Comment : @IInspectable Quoted : Visual Studio users will need to put the bitmap file in the same directory as your vcproj file . Comment : Depends on the version of Visual Studio you re using . 2010 or newer uses a .vcxproj file . You can change the working directory the program will use while running in the IDE under the debugger options . Comment : @RetiredNinja Thanks for you response however I followed suit and copied the image into the folder containing vcxproj and yet I remained unsuccessful . .. . Answer : The root cause is that the tutorial specifies the filename bu not the file directory . That means the current working directory is assumed . In VC++ this might or might not be the location of a .vcproj file depending on many factors . Instead go to the property pages of your project check Configuration Properties Debugging Working Directory . In general this will be a macro e.g . ProjectDir . If you choose Edit and then Macros you can view the current macro value . This is a poorly design UI though . There really should be a way to just view the current value as well as a way to check macro dependencies", "Question : Is it possible to get the value of ProjectDir or SolutionDir programatically outside Visual Studio My scenario is I need to read a vcproj file as a text file and get its properties like the outputdirectory etc. . problem is some properties contain environment-variables like SolutionDir and the like . .. . Answer : Well you found out that looking at the .vcproj file isn t enough . You need to know the .sln file as well . You re kinda stuck until you resolve this . Visual Studio will always create a .sln file when it loads a .vcproj file and cannot find a matching .sln . Maybe you want to do that too . Comment : I dont have a problem with the solution file I can read the .sln format fine . I just need to get the value of the variable ProjectDir SolutionDir .e.g taken from a vc proj file OutputDirectory ProjectDir ConfigurationName Comment : Well you know the values ProjectDir is the directory where you found the .vcproj file SolutionDir is the directory where you found the .sln file . Comment : I see how about ConfigurationName what does it mean also I have got one project where OutputDirectory ProjectDir Bin does it mean e.g C : MYprojectDir Bin Comment : That s a selection made when you build . Debug or Release by default . And yes . Comment : Thank You very much", "Question : I would like to have different Project Dependencies depending on which Project Configuration I m currently building . For example I don t want to build and link SomeTestLib.vcproj in Release configuration but I d like to build and link-to it in Debug . One solution that sorta works is to use conditional-compilation macros : .. . .. . But in this case the debugger and IntelliSense don t work for SomeTestLib . Is there a .sln or .vcproj hack that I could use Thanks . .. . Answer : Set the configuration type to Utility instead of application library in the project properties - General. .", "Question : I know msbuild will be installed if I install Visual Studio 2005 or 2008 . I know msbuild is also installed if I install the .NET Framework SDK . As of .NET 3.0 I think there is no longer a separate .NET Framework SDK . Instead if I want the free SDK stuff - all the .NET command-line tools all the base-class libraries - then I can download the Windows SDK and install the .NET portion of it . I will also get the msbuild tool if I do this . Right Now to my questions : .. . .. . 1 . Will I get msbuild if I install one or more parts of the Windows SDK that does not include the .NET SDK 2 . Will I get nmake too 3 . If I don t have Visual Studio installed will MSBuild be able to build a .sln file that references a .vcproj file I know msbuild can build .vbproj and .csproj but can it build .vcproj I also think that for VS2010 the .vcproj file changes to the .csproj format . But this is a .vcproj from vs2008 . .. . .. . I am distributing some source code and I want to describe what is required to build the source . I know the source can be built with VS 2008 . I want to also describe how it can be built without VS2008 . Thanks . .. . Answer : 1 . msbuild is installed with the framework itself not just the SDK . So you don t need to download any SDKs . 2 . No you won t get nmake at the same time . 3 . Yes you ll be able to build solution and project files without Visual Studio being installed . Admittedly I ve never tried any of these things as I always have VS installed but my understanding is that the above is correct . Comment : Note that MSBuild is not included with .NET Framework 4 Client Profile ." ] }
[ "yes-answer-long", "yes-answer-short" ]
visual-studio
UNK_RELATION
google-chartwrapper@api@84
google-chartwrapper -- chartwrapper is a class exposed by the google-visualization @placeholder .
{ "confidence": [ 44.705631256103516, 44.2838249206543, 43.04029846191406, 39.01029586791992, 37.99876022338867, 37.48625946044922, 37.396541595458984, 36.68892288208008, 35.659664154052734, 35.659664154052734, 35.616825103759766, 33.80628967285156, 31.923372268676758, 30.953472137451172, 29.867849349975586, 29.268592834472656, 27.48914337158203, 27.448360443115234, 27.448360443115234, 27.448360443115234, 27.206363677978516, 27.206363677978516, 26.79104232788086, 26.505104064941406, 26.42985725402832, 26.428688049316406, 26.428688049316406, 26.061016082763672, 26.035079956054688, 26.035079956054688, 26.035079956054688, 26.035079956054688, 25.924325942993164, 25.924325942993164, 25.924325942993164, 25.924325942993164, 25.91796112060547, 25.801664352416992, 25.801664352416992, 25.732492446899414, 25.141082763671875, 24.517187118530273, 24.511043548583984, 24.511043548583984, 24.131397247314453, 24.131397247314453, 24.131397247314453, 24.131397247314453, 24.131397247314453, 24.131397247314453, 24.097728729248047, 24.097728729248047, 24.097728729248047, 23.975067138671875, 23.975067138671875, 23.49588966369629, 22.966304779052734, 22.966304779052734, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.6844482421875, 22.607362747192383, 22.607362747192383, 22.607362747192383, 22.607362747192383, 22.607362747192383, 22.607362747192383, 22.072107315063477, 21.95504379272461, 21.95504379272461, 21.95504379272461, 21.95504379272461, 21.936874389648438, 21.669872283935547, 21.661357879638672, 21.661357879638672, 21.661357879638672, 21.441162109375, 21.13886070251465, 20.780765533447266, 20.780765533447266, 20.780765533447266, 20.780765533447266, 20.780765533447266, 20.780765533447266, 20.780765533447266, 20.780765533447266, 20.780765533447266 ], "content": [ "You may also want to take a look at the example here http : justquick.github.com google-chartwrapper-demos guide granularity 20.html", "I m using the awesome Google Chart Wrapper http : code.google.com p google-chartwrapper to create charts as part of my Django project .", "if you have a ChartWrapper object you can use the getOptions method as described in the official doc ChartWrapper Class https : developers.google.com chart interactive docs reference methods 4 .", "instead of using the original dataTable .. . .. . use the one from the ChartWrapper .. . .. . this will return the filtered data table", "I m using the Google Visualization Library for python https : github.com google google-visualization-python gviz to generate chart objects .", "ChartWrapper is probably the easiest way to keep your options chart type and data together .", "You can change all the single attribute of the wrapper you can find the methods in the first guide I linked about the chartWrapper class .", "google-visualization-errors : container is null .", "The resolution was to place my ChartWrapper DIV container here heartrate container outside of the ControlWrapper filter DIV container .", "Placing the ChartWrapper DIV outside the filter div as shown in the example below would solve the issue .", "I m trying to make an XYLine http : code.google.com apis chart docs gallery line charts.html chart types with the Google Chart API http : code.google.com apis chart via the not-so-well-documented GChartWrapper http : code.google.com p google-chartwrapper libraries .", "I created a google-visualization dashboard using the Google HTML Service .", "google.charts.load current packages : controls corechart .. . .. . Set a callback to run when the Google Visualization API is loaded .", "If you can always use th ChartWrapper caus e ig gives you lot s of helpers that you can use to manipulate your chart data and options .", "I m having trouble with developing a Google Charts Dashboard using a Google Sheet .", "Is it possible with google charts", "I have the following javascript for a LineChart that checks out using JSHint but refuses to display : .. . .. . .. . Load the LineChart charting package .. . google.load visualization 1 .. . packages : corechart line LineChart .. . .. . Set a callback to run when the Google Visualization API is loaded .", "Why do you need Google Charts", "I have created a graph using Google charts .", "I was wondering if there is a way to dispose of a control in Google Charts", "Here https : developers.google.com chart interactive docs drawing charts chartwrapper is the official doc .. . .. . hope this helps .. . .. . UPDATE .. . .. . little sample from the doc actually I figured out that you probably need something else and that the toJSON method is better .. . .. . as you can see I added a console.log that calls the method .", "From what I understand from the official documentation developers.google.com chart interactive docs reference example https : developers.google.com chart interactive docs reference example chartWrapper and chartEditor are 2 different classes and in my case I think I should use the setChartWrapper function but Cannot figure out how to use it .", "From Google Chart docs : .. . .. . The most common way to use Google Charts is with simple JavaScript that you embed in your web page .", "I have an angularjs app and I plot google charts on this using the ng-google-chart directive .", "The dashboard needs to know about the modified dataTable so I added one line in your solution 1 .. . .. . Solution 2 does not work because getDataTable is a method of the ChartWrapper class it is not a method of the Dashboard https : developers.google.com chart interactive docs gallery controls dashboard class hence your is not a function error message .", "Trying to work with Google charts and ended up with a range slider thru few code-snippets provided by developer docs .", "I am using Google Charts in my project where I get data from the controller as in Model Attribute .", "I have an angular app and I am using Google charts https : github.com angular-google-chart angular-google-chart to show some data with the help of chart .", "@4ae1e1 google charts as I will be embedding this graph to a website later on .", "Then later in the web page you create a with that id to display the Google Chart .", "I m trying to use formatters on a TableChart of Google Charts .", "I m building a Google charts dashboard but I m having difficulty making it responsive .", "i am not really familiar with google. . sorry", "The problem was that google chart package was loading incorrectly .", "I am have not good experience with google chart .", "I am using chartkick.js with Google Charts .", "It is working fine in Google Chrome .", "More complex one - use callback function to fix when chart will be ready : .. . .. . This API issue is discussing here https : code.google.com p google-visualization-api-issues issues detail id 598 .", "link-to Google Code Playground : http : code.google.com apis ajax playground type visualization full dashboard .. . .. . Code I m trying : .. . .. . The only thing I ve changed from the original example is adding to the view section of the Pie Chart .", "i need to change google-pie-chart lagend style circle to square .. . .. . i have bind google-pie-chart in asp.net code-behind so any one know which google-pie-chart property i will use for that .", "I am new to google chart .", "see following working example.. . .. . .. . .. . Load the Visualization API and the controls package .", "Attempting to perform an action when the user attempts to change the page in a google table .", "I have a Google Gauge chart in my meteor app .", "I have datum in a CSV file that I would like to be graphed by the use of Google Charts .", "Q1 : Is there any other known alternatives of converting contents of a CSV file to a Google Charts .. . .. . Q2 : Can this be done with BASH", "There are examples https : developers.google.com chart interactive docs gallery columnchart examples on google charts page .", "Is anyone able to show me how to achieve the below using data from a Google Sheet", "I am pretty familiar with Google Charts but was never bale to find one thing .", "I was trying to use multiple google charts on tables cells but I get that only once instance can be used .", "By default Google ChartEditor opens up on the Start tab .", "Is there need to change in data or options given to Google chart", "your question shows It is working fine in Google Chrome .", "I hope that I can -in google-visualization timeline- show time date of mouse cursor in Java Script .. . .. . Say like : console.log googlechart.timedate mouse.x is there any way to get the time date of my mouse x", "not possible using standard google-visualization techniques -- for the Other category the chart does not display any tooltip custom https : developers.google.com chart interactive docs customizing tooltip content customizing-html-content or otherwise .", "also i need to set hyperlink tag dynamically on every slice of google-pie-chart means i want to open www.google.com www.yahoo.com etc....... . link on click of google-pie-chart slice so any one suggest me for that .", "I ve done some research http : visual.yantrajaal.com 2013 12 google-charts-from-public-csv-datasets.html and concluded the best way of doing it would be : .. . .. . 1 .", "I ve tried using the function added to normal Google charts as opposed to Dashboards which works great but it s not having the same impact .", "I want to draw like that image with google or jqplot javascript .", "but what does the deprecation policy mean on google chart term mean", "is it wise to use it for long term or Google could just wipe the API anytime", "so it is possible that google took it down anytime after 20th", "i haven t found anything like google chart and commercially free .", "I am generating a Column Chart using google chart .", "I want to use a Google Chart on my marketing project .", "I want to display a Google Donut Chart with AJAX pagination .", "I want to integrate google chart in my laravel5.0 application .", "Is your bar data in the correct format for the Google Charts package to interpret", "The answer is correct but also exposes some inflexibility with Google Charts that I was hoping was not there .", "I m trying to do something like this in my google BubbleChart :", "It seemed Google Chart API was unable to find the respective element .", "Bellow is my javascript for google-chart .. . .. . this Is my Html Page... .", "http : jsfiddle.net ajMEn For more google chart related queries take a look at this .", "I have some Google Charts reading a CSV on an Apache Tomcat 5 server .", "I am having a hard time to figure out how to do this since i am not that familiar with google chart .", "I am using Google Charts Line Charts I am having some trouble binding it to a Chart Range Filter .", "Added a screen shot of the line-graph as it generated without the Chart Controller and the source data for the graph as a Google Charts Table .", "I ve mocked up the example that Google has in the Code Playground to try to get this to work .", "The problem was here : .. . .. . The Google API allows you to define a different scale per each series .", "However the problem i found was with the google chart class i was using to create a chart object .", "I want to have a responsive google-pie-chart .", "It s not clear in the google charts API how to achieve this .", "I have a Google chart : bubble chart .", "Does google chart support this type of graph", "Using this workaround http : stackoverflow.com questions 32247941 trigger-google-timeline-tooltip-with-selection I was able to mimic showing tooltip upon selection for a google timeline chart .", "Update- .. . .. . I have tried- .. . .. . Google line chart not reloading when I reload the div http : stackoverflow.com questions 6067015 google-line-chart-not-reloading-when-i-reload-the-div 6068531 6068531 .. . .. . And .. . .. . Redraw Google Chart after every Ajax call http : stackoverflow.com questions 18840178 redraw-google-chart-after-every-ajax-call 18898308 18898308 .. . .. . But not getting it solved .", "You load some Google Chart libraries list the data to be charted select options to customize your chart and finally create a chart object with an id that you choose .", "vAxis : gridlines : color : none .. . .. . eidt Works in the fiddle linked from this google-docs developer wiki : https : developers.google.com chart interactive docs datesandtimes formatting-axis-gridline-and-tick-labels", "This question might be the silliest of all however im trying to just make the code run which is directly from google chart guide website and surprisingly its not working .", "Enable tooltip and set markers in line charts using google charts http : stackoverflow.com questions 37324156 enable-tooltip-and-set-markers-in-line-charts-using-google-charts 37326457 37326457 .. . .. . this is my link.Here i have not added the slider though but i want one so that as i change the value through slider the graph changes and not get plotted again and again .", "enter image description here http : i.stack.imgur.com FKobF.png .. . .. . Also you can play with the API and easily create your own pie charts here : http : www.jonwinstanley.com charts .. . .. . Supporting this kind of concentric Pie chart in the new Google Charts API is still an open issue https : github.com google google-visualization-issues issues 786", "I need your help for draw stock chart use javascript with google or jqplot .", "using google would need to use a combo chart looks like a column series on the bottom .", "Can anyone suggest me wth the code to achieve drill down feature in google chat dashboard .", "Basically it means you should find another alternative as google will not guarantee it will be around after the 20th .", "I am new to javascript and i am using google chart api for creating charts .", "This works great for generating JSON that can be read by the Google Charts using the DataTable.ToJSon method .", "What I m trying to do now however is add multiple Google Chart data tables to one JSON dictionary .", "The problem is when I go to the next page the Google Chart wont show display load .", "I m trying to use Google dashboard in my web app but I am getting the following error ." ] }
{ "confidence": [ 54.42279815673828, 49.202884674072266, 47.18198013305664, 46.76493835449219, 44.260955810546875, 42.15233612060547, 37.422569274902344, 34.44314193725586, 31.19873046875, 29.982690811157227, 29.48439598083496, 28.60337257385254, 28.294879913330078, 28.271038055419922, 26.651750564575195, 26.226016998291016, 26.017459869384766, 25.841907501220703, 25.82792091369629, 25.543458938598633 ], "content": [ "Question : How can I get all of a google chart s options chart type colors legend title...etc.. . into a js variable so that I can use the same options to build another chart The original chart is already build in a wrapper in a div . .. . Answer : if you have a ChartWrapper object you can use the getOptions method as described in the official doc ChartWrapper Class https : developers.google.com chart interactive docs reference methods 4 . If you can always use th ChartWrapper caus e ig gives you lot s of helpers that you can use to manipulate your chart data and options . Here https : developers.google.com chart interactive docs drawing charts chartwrapper is the official doc .. . .. . hope this helps .. . .. . UPDATE .. . .. . little sample from the doc actually I figured out that you probably need something else and that the toJSON method is better .. . .. . as you can see I added a console.log that calls the method . You can play arround in this fiddle http : jsfiddle.net rixlabs vjyagqrm 2 if you need to do more experiments .. . .. . UPDATE 2 I m little slow understanding the problem : .. . .. . so if you need to have a second chart with the option of the frst the best idea is to clone there is a clone method for wrapper the first wrapper and than change the attributes that you need to change .. . .. . from the previous code let s take the drawVisualization method and update it for cloning : .. . .. . as you can see we clone the wrapper in a new object wrapperCLone and than we set the new container ID and dataTable . You can change all the single attribute of the wrapper you can find the methods in the first guide I linked about the chartWrapper class . I also updated the fiddle http : jsfiddle.net vjyagqrm 3 so you can see the 1th chart and below you can find the cloned one with different data table but same options . Hope this is what you re looking for . good luck : Comment : ChartWrapper is probably the easiest way to keep your options chart type and data together . Charts without a wrapper don t really have options so much as they are given them every time you draw . ChartWrappers don t need to have the options passed to them every draw they always hold onto them for later . I think what the question is really asking is about the scoping of javascript variables . Comment : @nbering we met again here : Comment : @rick Thank you . I knew I saw that somewhere but couldn t remember what and where . I m still a beginner... . could you please use the getOptions method in an example .. . just one line just a variable getOptions .. . so that I can see the syntax.. . Comment : updated the answere I figured out getOptions is not the right method try toJSON on wrapper as described in the UPDATED answere . hope this helps Comment : @rick Thanks a million . .. . however I am still unclear on how to utilize the toJSON method to build a 2nd chart . what I need is to build a 2nd chart using the 1st one s options . Rick I know very well I am being a dumbass but if you could help me out that would just make this moth for me a whole lot easier :", "Question : I m using the awesome Google Chart Wrapper http : code.google.com p google-chartwrapper to create charts as part of my Django project . Right now I m creating the chart instance using Python in my views and then adding the instance to the template context and displaying the charts in my templates successfully . What I m having trouble doing is displaying a dynamic set of X-Axis labels . Here is the relevant code from Google Chart Wrapper : .. . .. . and how I m currently creating the chart in my view : .. . .. . I have a list of date strings that I d like to display as the x-axis labels does anyone know how I would go about doing that .. . Answer : In order to understand how to properly pass the labels it s important to know what args means . args which is an asterisk + an arbitrary argument name in a function or method as in this case definition means any number including 0 of anonymous arguments . See this answer http : stackoverflow.com a 13058423 680238 for a more thorough explanation . This means that the method in question accepts one obligatory argument index which is the index of the axis to be labelled and any number of anonymous arguments actual labels . Knowing this it should already be clear that the proper way to call label is as follows : .. . .. . where 0 is the index of the X-axis and all the other arguments are respective labels . The reason why this is implemented in this manner is that the number of lables is unknown - it depends on the chart so accepting any number of labels seems like a good idea . You may also want to take a look at the example here http : justquick.github.com google-chartwrapper-demos guide granularity 20.html Comment : +1 . Very clear answer . Comment : @abarnert thank you :", "Question : I m a little bit lost with Google Charts s DateRangeFilter https : developers.google.com chart interactive docs gallery controls daterangefilter . Upon drawing the dashboard I m getting the error message One or more participants failed to draw . I m not quite sure why this is happening but my hunch says it is due to the Date object . The jsonHRData date rows looks like Date Sat Feb 15 2014 15 : 17 : 33 GMT+0100 CET . Initially my JSON returned ISO formatted dates which I converted to the JavaScript date-format using this approach http : erraticdev.blogspot.be 2010 12 converting-dates-in-json-strings-using.html . Note that the slicer itself is drawn but not the ColumnChart itself . Every time I slice the error message repeats itself . My JSON looks as follows : .. . .. . Many thanks .. . Answer : The resolution was to place my ChartWrapper DIV container here heartrate container outside of the ControlWrapper filter DIV container . It seemed Google Chart API was unable to find the respective element . Placing the ChartWrapper DIV outside the filter div as shown in the example below would solve the issue . Hence the below would not work : Comment : The reason for this is because the API overwrites the contents of the container divs specified for each control or chart so when the API drew the control in filter div the heartrate container div was removed from the DOM . Comment : Thanks asgallant . This makes sense", "Question : I m trying to make an XYLine http : code.google.com apis chart docs gallery line charts.html chart types with the Google Chart API http : code.google.com apis chart via the not-so-well-documented GChartWrapper http : code.google.com p google-chartwrapper libraries . Here s a portion of the code that is supposed to generate the graph : .. . .. . However this is what I get : .. . .. . link text http : chart.apis.google.com chart chco 008000 FF0000 chd t : 1286116241.0 1286118544.0 1286119431.0 1286121011.0 7C6711.0 6716.3 6641.9 6644.9 7C1286116241.0 1286118545.0 1286119431.0 1286121012.0 7C38323.9 38326.6 38327.7 38329.6 chdl gaming.stackexchange.com 7Cserverfault.com chds 1286115741.0 1286121512.0 0 42588.4555556 chs 600x400 cht lxy chxr 0 1286115741.0 1286121512.0 7C1 0 42588.4555556 chxt x y .. . .. . Question : What happened to the red series .. . .. . .. . .. . For your convenience here is data after some pretty print love : .. . .. . Here is the list of parameters generated by the wrapper also after some pretty print love : .. . Answer : The problem was here : .. . .. . The Google API allows you to define a different scale per each series . Thus you need to specify the scaling for each series whereas the above only affected the first series . Changing that line to : .. . .. . ...forces all series to the same scaling .", "Question : I created a google-visualization dashboard using the Google HTML Service . The underlying datatable jjdt is joined from several data tables like jadt2 fa . And then I created a chart wrapper finalTable to show the table in the dashboard . These code worked OK . .. . .. . Now what I want to do is to allow a click of button to set certain cells in the underlying table jjdt to new values and get it reflected on the dashboard . But that is not as simple as I thought it would be . I tried 2 things : .. . .. . 1 Using javascript to update the jjdt table for the corresponding cell x y and call the finalTable.draw .. . .. . But this has no effect and no error message . 2 I think maybe the chart wrapper created a copy of datatable . So I try to get that datatable back : .. . .. . I thought this is correct way described in the documentation https : developers.google.com chart interactive docs reference methods 4 .. . .. . documentation http : i.stack.imgur.com GVYS2.png .. . .. . However I got an error message saying setCell is not a function of mydt even though I can call mydt.getValue . Seems like my datatable is somehow read-only But it is a DataTable not a DataView. . Why is that enter image description here http : i.stack.imgur.com 324XK.png .. . Answer : The dashboard needs to know about the modified dataTable so I added one line in your solution 1 .. . .. . Solution 2 does not work because getDataTable is a method of the ChartWrapper class it is not a method of the Dashboard https : developers.google.com chart interactive docs gallery controls dashboard class hence your is not a function error message .", "Question : I have a chart wrapper table and a select event-listener bound to it for retrieving row data as follows : .. . .. . Now this works fine when I m on the first page of the table or when the full table is displayed . However as soon as some sorting filtering pagination is done the retrieved row data is false due to the fact that the hidden rows are not counted . Example : I have a table with 10 rows . In each one there is a string - row1 row2 row3 .. . row10 . I then use a control wrapper to filter the table so only rows 5-10 remain visible . When I click on row 5 now it counts it as row 1 and I don t get the correct data anymore . Any ideas how I could fix this problem Thanks .. . Answer : instead of using the original dataTable .. . .. . use the one from the ChartWrapper .. . .. . this will return the filtered data table Comment : That did the trick Thanks a lot .", "Question : I have a chart in a wrapper : .. . .. . I can run a function to update colors of that chart using this function : .. . .. . and this works just fine . I can also use other functions on that chartin that wrapper to update some other options . BUT when I use the ChartEditor on this chart .. . .. . the setcolor9 function stops working . It kinda looks like the ChartEditor created a 2nd chart and put it on top of the first one and the setcolor9 function keeps referring to the first one . ...oh and not sure if this is connected but the chart created by the loadEditor9 and redrawChart9 functions seems to ignore the height and width options set by other functions in the wrapper9 var and goes outside of the div container . Comment : From what I understand from the official documentation developers.google.com chart interactive docs reference example https : developers.google.com chart interactive docs reference example chartWrapper and chartEditor are 2 different classes and in my case I think I should use the setChartWrapper function but Cannot figure out how to use it . @PaulH sorry to bother you but could you in a spare minute take a look at this : .. . Answer : So the answer is of course very simple . I just needed to change the redrawChart9 function to the below and now I can do whatever I want with that chart .", "Question : Using this workaround http : stackoverflow.com questions 32247941 trigger-google-timeline-tooltip-with-selection I was able to mimic showing tooltip upon selection for a google timeline chart . This issue is that I plan on having a mail to link in the tooltip for the user to click on . However in my function creatToolTip the tooltip is created but I m unable to click on the contact link . What is the correct way to do this EDIT : I also tried Google s tooltip actions https : developers.google.com chart interactive docs customizing tooltip content tooltip actions but it is not supported in timeline charts . google.setOnLoadCallback drawVisualization .. . .. . function drawVisualization .. . var container document.getElementById timeline .. . var chart new google.visualization.Timeline container .. . var dataTable new google.visualization.DataTable .. . .. . dataTable.addColumn .. . type : string .. . id : President .. . .. . dataTable.addColumn type : string id : Name .. . dataTable.addColumn type : string role : tooltip p : html : true .. . dataTable.addColumn .. . type : date .. . id : Start .. . .. . dataTable.addColumn .. . type : date .. . id : End .. . .. . dataTable.addRows .. . Washington test createToolTip new Date 1789 3 30 new Date 1797 2 4 .. . Adams test createToolTip new Date 1797 2 4 new Date 1801 2 4 .. . Jefferson test createToolTip new Date 1801 2 4 new Date 1809 2 4 .. . .. . select-handler .. . google.visualization.events.addListener chart select-function e .. . the built-in tooltip .. . var tooltip document.querySelector .google-visualization-tooltip : not clone .. . remove previous clone when there is any .. . if chart.ttclone .. . chart.ttclone.parentNode.removeChild chart.ttclone .. . .. . create a clone of the built-in tooltip .. . chart.ttclone tooltip.cloneNode true .. . create a custom attribute to be able to distinguish .. . built-in tooltip and clone .. . chart.ttclone.setAttribute clone true .. . inject clone into document .. . tooltip.parentNode.insertBefore chart.ttclone chart.tooltip .. . .. . .. . chart.draw dataTable tooltip : isHtml : true .. . .. . .. . function createToolTip .. . var mainDiv div .. . var list .. . ul class google-visualization-tooltip-action-list + .. . li class google-visualization-tooltip-action + .. . span style font-family : Arial font-size : 12px color : rgb 0 0 0 margin : 0px text-decoration : none font-weight : bold + .. . a href mailto : test@test.com Subject test Contact a + .. . span + .. . li + .. . ul .. . var endMainDiv div .. . var tooltip mainDiv + list + endMainDiv .. . return tooltip .. . .. . .. . .. . .google-visualization-tooltip .. . opacity : 0 important .. . max-width : 200px important .. . .. . .google-visualization-tooltip clone .. . opacity : 1 important .. . .. . html .. . body .. . timeline .. . width : 100 .. . height : 100 .. . margin : 0 .. . padding : 0 .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script type text javascript src https : www.google.com jsapi autoload modules : name : visualization version : 1.1 packages : timeline script .. . div id timeline style height : 90 div .. . Answer : looks like pointer-events https : developer.mozilla.org en-US docs Web CSS pointer-events are set to none by default .. . .. . change to auto before injecting the clone back into the dom .. . .. . see following working snippet.. . .. . .. . .. . google.charts.load current .. . callback : function .. . var container document.getElementById timeline .. . var chart new google.visualization.Timeline container .. . var dataTable new google.visualization.DataTable .. . .. . dataTable.addColumn .. . type : string .. . id : President .. . .. . dataTable.addColumn type : string id : Name .. . dataTable.addColumn type : string role : tooltip p : html : true .. . dataTable.addColumn .. . type : date .. . id : Start .. . .. . dataTable.addColumn .. . type : date .. . id : End .. . .. . dataTable.addRows .. . Washington test createToolTip new Date 1789 3 30 new Date 1797 2 4 .. . Adams test createToolTip new Date 1797 2 4 new Date 1801 2 4 .. . Jefferson test createToolTip new Date 1801 2 4 new Date 1809 2 4 .. . .. . select-handler .. . google.visualization.events.addListener chart select-function e .. . the built-in tooltip .. . var tooltip document.querySelector .google-visualization-tooltip : not clone .. . remove previous clone when there is any .. . if chart.ttclone .. . chart.ttclone.parentNode.removeChild chart.ttclone .. . .. . create a clone of the built-in tooltip .. . chart.ttclone tooltip.cloneNode true .. . create a custom attribute to be able to distinguish .. . built-in tooltip and clone .. . chart.ttclone.setAttribute clone true .. . inject clone into document .. . chart.ttclone.style.pointerEvents auto .. . tooltip.parentNode.insertBefore chart.ttclone chart.tooltip .. . .. . .. . function createToolTip .. . var mainDiv div style z-index : 1000 .. . var list .. . ul class google-visualization-tooltip-action-list + .. . li class google-visualization-tooltip-action + .. . span style font-family : Arial font-size : 12px color : rgb 0 0 0 margin : 0px text-decoration : none font-weight : bold + .. . a href mailto : test@test.com Subject test Contact a + .. . span + .. . li + .. . ul .. . var endMainDiv div .. . var tooltip mainDiv + list + endMainDiv .. . return tooltip .. . .. . .. . chart.draw dataTable tooltip : isHtml : true .. . .. . packages : timeline .. . .. . .. . .. . .google-visualization-tooltip .. . opacity : 0 important .. . max-width : 200px important .. . .. . .google-visualization-tooltip clone .. . opacity : 1 important .. . .. . html .. . body .. . timeline .. . width : 100 .. . height : 100 .. . margin : 0 .. . padding : 0 .. . .. . .. . .. . script src https : www.gstatic.com charts loader.js script .. . div id timeline style height : 90 div Comment : hope this helps.. . Comment : This is perfect Thanks for your help .", "Question : I m using the Google Visualization Library for python https : github.com google google-visualization-python gviz to generate chart objects . This works great for generating JSON that can be read by the Google Charts using the DataTable.ToJSon method . What I m trying to do now however is add multiple Google Chart data tables to one JSON dictionary . In other words what I m making now is this : .. . .. . and what I want to make is this : .. . .. . Where Chart Data is converted into a JSON string in both cases . I m pretty sure I can do this by converting the JSON string from gviz back into a python dictionary compile the strings in a container dictionary as necessary and then convert that container dictionary back into JSON but that doesn t seem like a very elegant way to do it . Is there a better way What I m picturing is a .ToPythonObject method equivalent to .ToJSon but there doesn t appear to be one in the library . Thanks a lot Alex .. . Answer : I ended up doing my original inelegant solution to the problem with this function : .. . .. . Thanks guys Alex", "Question : I m putting together a dashboard and trying to do something that should be straight-forward . There will be Control Filters to operate at the dashboard level but I also need to specify some additional filters static not through a control to just a single table . The method for getFilteredRows seems to be the answer but it is not working . I ve mocked up the example that Google has in the Code Playground to try to get this to work . In this case I m trying to have the Pie chart only show those that are 20 years or older . link-to Google Code Playground : http : code.google.com apis ajax playground type visualization full dashboard .. . .. . Code I m trying : .. . .. . The only thing I ve changed from the original example is adding to the view section of the Pie Chart . Anyone have any thoughts .. . Answer : Couple of small changes : No need for calc as it is used for creating new calculated-columns . the format of the function requires array even for a single value .", "Question : I have an angularjs app and I plot google charts on this using the ng-google-chart directive . The issue here is this : Legend not showing gradient http : i.stack.imgur.com 8Eqik.png .. . .. . I am using the following code function drawRegionsMap .. . .. . This works perfectly fine when I try in fiddle but not my app . I know this is a vague issue and might be particular to my app . But still if anyone gets anything from the top of their minds or have experienced this before it would be of great help if you can share something . Thanks in advance . .. . Answer : The problem is base tag in head section . Simpliest solution is removing it . More complex one - use callback function to fix when chart will be ready : .. . .. . This API issue is discussing here https : code.google.com p google-visualization-api-issues issues detail id 598 . Be sure to put event-listener before calling chart.draw Comment : This solution callback works for the first render but it doesn t seem to work when you hover your regions . Any idea on how to fix it Comment : Unfortunately no ideas", "Question : This question might be the silliest of all however im trying to just make the code run which is directly from google chart guide website and surprisingly its not working . I have copy pasted the code from the below URL and tried to run it in firefox browser . It gave me below error and i couldn t find any error in the log as well . Not sure what went wrong . Code source : https : developers.google.com chart interactive docs gallery controls using-controls--and-dashboards .. . .. . Code .. . .. . Error : enter image description here http : i.stack.imgur.com 5kVSH.jpg .. . Answer : the documentation and examples are quite stale at this point . with recent releases of loader.js the corechart package needs to be included for the charts to work . see following working example.. . .. . .. . .. . Load the Visualization API and the controls package . google.charts.load current packages : controls corechart .. . .. . Set a callback to run when the Google Visualization API is loaded . google.charts.setOnLoadCallback drawDashboard .. . .. . Callback that creates and populates a data table .. . instantiates a dashboard a range slider and a pie-chart .. . passes in the data and draws it . function drawDashboard .. . .. . Create our data table . var data google.visualization.arrayToDataTable .. . Name Donuts eaten .. . Michael 5 .. . Elisa 7 .. . Robert 3 .. . John 2 .. . Jessica 6 .. . Aaron 1 .. . Margareth 8 .. . .. . .. . Create a dashboard . var dashboard new google.visualization.Dashboard .. . document.getElementById dashboard div .. . .. . Create a range slider passing some options .. . var donutRangeSlider new google.visualization.ControlWrapper .. . controlType : NumberRangeFilter .. . containerId : filter div .. . options : .. . filterColumnLabel : Donuts eaten .. . .. . .. . .. . Create a pie-chart passing some options .. . var pieChart new google.visualization.ChartWrapper .. . chartType : PieChart .. . containerId : chart div .. . options : .. . width : 300 .. . height : 300 .. . pieSliceText : value .. . legend : right .. . .. . .. . .. . Establish dependencies declaring that filter drives pieChart .. . so that the pie-chart will only display entries that are let through .. . given the chosen slider range . dashboard.bind donutRangeSlider pieChart .. . .. . Draw the dashboard . dashboard.draw data .. . .. . .. . .. . script type text javascript src https : www.gstatic.com charts loader.js script .. . --Div that will hold the dashboard-- .. . div id dashboard div .. . --Divs that will hold each control and chart-- .. . div id filter div div .. . div id chart div div .. . div Comment : The code works like a charm . Thank you for your time and effort . I guess as i have used one of the chart type of corechart bar column line area stepped area bubble pie donut combo candlestick histogram scatter i should load the package as dependency . I need Controls package as i have used i have NumberRangeFilter .", "Question : null .. . Answer : shows clubs all categories in pie chats below 5 under other . Is there a way to see the merged categories on hover over other . Comment : not possible using standard google-visualization techniques -- for the Other category the chart does not display any tooltip custom https : developers.google.com chart interactive docs customizing tooltip content customizing-html-content or otherwise . it also does not fire onmouseover or select events . you would have to provide your own mouseover event based on the coordinates of the Other slice", "Question : I m trying to use Google dashboard in my web app but I am getting the following error . google-visualization-errors : container is null . message : One or more participants failed to draw .. . .. . My code is similar to what Google Documentation https : developers.google.com chart interactive docs gallery controls code suggests but I m still facing the error . My JS generated via C - .. . .. . HTML .. . .. . P.S - I have tried calling the JS code before and after my HTML DIVs but nothing helps . .. . Answer : looks like a typo .. . need to set the id attribute instead of class .. . on both dashboard div and filter div .. . .. . instead of.. . .. . .. . change to.. . .. . .. . see following working snippet.. . .. . .. . .. . google.charts.load current .. . callback : function .. . var data google.visualization.arrayToDataTable .. . Status Count .. . Closed 671 .. . Resolved 5 .. . Test 3 .. . .. . var dashboard new google.visualization.Dashboard document.getElementById dashboard div .. . var slider new google.visualization.ControlWrapper .. . controlType : NumberRangeFilter .. . containerId : filter div .. . options : .. . filterColumnLabel : Count .. . .. . .. . var pieChart new google.visualization.ChartWrapper .. . chartType : PieChart .. . containerId : divIncidentStatus .. . options : .. . width : 300 .. . height : 300 .. . pieSliceText : value .. . legend : right .. . .. . .. . dashboard.bind slider pieChart .. . dashboard.draw data .. . .. . packages : corechart controls .. . .. . .. . .. . script src https : www.gstatic.com charts loader.js script .. . div class panel panel-default .. . div class panel-body .. . div id dashboard div .. . div id filter div div .. . div id divIncidentStatus div .. . div .. . div .. . div Comment : the good ol basics problem Thanks a ton . I think I need to sleep now before coding more . Comment : cheers sometimes it just takes another pair of eyes.. .", "Question : I am creating a multilevel donut chart with google charts . I am successful to creating a single level chart . But now I have to create another chart in that chart . Please help me . And also is that possible to write text on chart slice in circular form here is my code for single donut chat . HTML .. . .. . JS .. . .. . and here is code link in JsFiddle http : jsfiddle.net sagar43 vkmen02j IT should be look like enter image description here http : i.stack.imgur.com KygGb.png .. . Answer : This was possible with the Google Image Charts API https : developers.google.com chart image docs gallery pie charts csw 1 which has been deprecated in 2012 . It seems to still be up and running it s just not maintained anymore . With that API it was and still is possible to create concentric pie charts such as the one below .. . .. . which yields the following pie-chart .. . .. . enter image description here http : i.stack.imgur.com FKobF.png .. . .. . Also you can play with the API and easily create your own pie charts here : http : www.jonwinstanley.com charts .. . .. . Supporting this kind of concentric Pie chart in the new Google Charts API is still an open issue https : github.com google google-visualization-issues issues 786 Comment : Thankx @val for the help . Comment : Thanks no problem glad I could help", "Question : I have the following javascript for a LineChart that checks out using JSHint but refuses to display : .. . .. . .. . Load the LineChart charting package .. . google.load visualization 1 .. . packages : corechart line LineChart .. . .. . Set a callback to run when the Google Visualization API is loaded . google.setOnLoadCallback drawChart .. . .. . Callback that creates and populates a data table .. . instantiates the line chart passes in the data and .. . draws it . function drawChart .. . var data google.visualization.DataTable .. . data.addColumn date Date .. . data.addColumn number Sales .. . data.addrows .. . new Date 2015 2 30 419.5 .. . new Date 2015 2 31 497.51 .. . new Date 2015 3 1 1465.85 .. . new Date 2015 3 2 2594.71 .. . new Date 2015 3 4 2620.7 .. . new Date 2015 3 5 3189.86 .. . new Date 2015 3 6 4172.96 .. . new Date 2015 3 7 4332.96 .. . new Date 2015 3 8 4653.03 .. . new Date 2015 3 9 4678.98 .. . new Date 2015 3 12 5626.48 .. . new Date 2015 3 13 9779.28 .. . new Date 2015 3 14 10428.3 .. . new Date 2015 3 15 10647.18 .. . new Date 2015 3 17 10815.58 .. . new Date 2015 3 20 11471.58 .. . new Date 2015 3 21 11875.57 .. . new Date 2015 3 22 12052.07 .. . new Date 2015 3 23 13461.14 .. . new Date 2015 3 24 14072.78 .. . new Date 2015 3 25 14199.78 .. . new Date 2015 3 27 14320.28 .. . new Date 2015 4 27 100000 .. . .. . var options .. . Instantiate and draw our chart passing in some options . var chart new google.visualization.LineChart document.getElementById chart div .. . chart.draw data options .. . .. . .. . .. . script type text javascript src https : www.google.com jsapi autoload modules : name : visualization version : 1.1 packages : corechart timeline LineChart .. . script .. . div id chart div div .. . .. . So what am I doing wrong I have attempted several date construction methods including : Comment : Have you looked at the console for errors When I tried to run it it said you need to use the new keyword . When I added that it said it was trying to call an undefined function because you call getrows instead of getRows . Comment : Oops make that addrows vs addRows . Now I get an error that says You called the draw method with the wrong type of data rather than a DataTable or DataView . Not sure why yet though Comment : @redbmk Thanks you for both of your comments Correcting both of the problems you so aptly pointed out solved the issue . I am new to this forum and don t know how to mark this question as Answered but it has been . Comment : I added an answer so that you can accept it . How did you fix the other error though about the wrong type of data Or did you not get that when you tried on your machine .. . Answer : Looks like you re missing the new keyword before instantiating DataTable which can be seen as an error message in the console . Also there s a typo when adding rows . It should be addRows instead of addrows . Try changing .. . .. . to", "Question : I was trying to use Google Chart pie and show many Pies in the same page . So I need to create dynamic div . Btw I use ASP.NET .. . .. . Here is my javascript .. . .. . Html .. . .. . However it show an error : .. . .. . Uncaught Error : Container is not defined .. . .. . It looks like I didn t create a container where google pie appended value . How to fix it Comment : There s no reference to a variable named Container in your code . Can you provide more information .. . Answer : Here you are referring to your new dynamic div using an ID of visualization : .. . .. . But you are setting the ID to width : 600px here : .. . .. . Perhaps think about those attributes and what you really want them to be set to . Comment : yes that is my fault..Thanks a lot", "Question : null .. . Answer : i need to change google-pie-chart lagend style circle to square .. . .. . i have bind google-pie-chart in asp.net code-behind so any one know which google-pie-chart property i will use for that . also i need to set hyperlink tag dynamically on every slice of google-pie-chart means i want to open www.google.com www.yahoo.com etc....... . link on click of google-pie-chart slice so any one suggest me for that . thanks . Comment : there isn t a configuration option https : developers.google.com chart interactive docs gallery piechart configuration-options for legend shape . you can use the click or select events https : developers.google.com chart interactive docs gallery piechart events to open hyperlink", "Question : I have datum in a CSV file that I would like to be graphed by the use of Google Charts . I ve done some research http : visual.yantrajaal.com 2013 12 google-charts-from-public-csv-datasets.html and concluded the best way of doing it would be : .. . .. . 1 . Upload the CSV file online from the server to Quandl .. . 2 . Download contents of the CSV file in to a HTML template .. . .. . This will all be done with a Crontab so the graphs will be updated in intervals - ie automatically . Q1 : Is there any other known alternatives of converting contents of a CSV file to a Google Charts .. . .. . Q2 : Can this be done with BASH Or is there a more appropriate easier languages for such a project ie Python JS . This generated graph will be embedded into a website and thus be online . Comment : Why do you need Google Charts There are many ways to make charts programmatically e.g . gnuplot matplotlib just to name two . Comment : By the way the choice of the scripting-language here is largely irrelevant . You just need appropriate tooling . Comment : @4ae1e1 google charts as I will be embedding this graph to a website later on . As for what language to use - I am fairly new to coding never done an automated graph such as this perhaps a language would be more advantageous then another . .. . Answer : From Google Chart docs : .. . .. . The most common way to use Google Charts is with simple JavaScript that you embed in your web page . You load some Google Chart libraries list the data to be charted select options to customize your chart and finally create a chart object with an id that you choose . Then later in the web page you create a with that id to display the Google Chart . Then the most common language is javascript why are you trying something different", "Question : I m having trouble with developing a Google Charts Dashboard using a Google Sheet . The only examples I m able to find are ones like the below where you have to manually create the data . Is anyone able to show me how to achieve the below using data from a Google Sheet Thanks in advance Comment : this answer http : stackoverflow.com a 37115872 5090771 should get you close.. . .. . Answer : Thanks WhiteHat .. . .. . I found a solution :" ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
biojava@java@71
biojava -- biojava is an open-source project dedicated to providing a @placeholder framework for processing biological data .
{ "confidence": [ 47.30476379394531, 45.07558822631836, 43.456634521484375, 43.456634521484375, 43.456634521484375, 42.64901351928711, 42.64901351928711, 42.48524475097656, 42.48524475097656, 42.48524475097656, 42.48524475097656, 42.48524475097656, 42.48524475097656, 40.77217483520508, 40.77217483520508, 40.77217483520508, 40.77217483520508, 40.77217483520508, 40.77217483520508, 38.976478576660156, 38.976478576660156, 38.976478576660156, 38.976478576660156, 38.976478576660156, 38.976478576660156, 38.976478576660156, 37.78520202636719, 37.270164489746094, 36.357421875, 36.0458869934082, 36.0458869934082, 36.0458869934082, 36.0458869934082, 35.83775329589844, 34.468101501464844, 34.354766845703125, 34.250186920166016, 34.250186920166016, 33.153297424316406, 33.153297424316406, 33.05891036987305, 33.05891036987305, 31.631134033203125, 31.631134033203125, 31.631134033203125, 31.631134033203125, 31.631134033203125, 31.631134033203125, 31.631134033203125, 31.35759735107422, 31.35759735107422, 31.35759735107422, 29.913490295410156, 28.738544464111328, 28.11779022216797, 28.11779022216797, 28.11779022216797, 26.926513671875, 24.600341796875, 24.313888549804688, 20.089801788330078, 17.396108627319336, 17.241527557373047, 16.271821975708008, 16.271821975708008, 16.271821975708008, 16.271821975708008, 16.271821975708008, 16.271821975708008, 16.271821975708008, 16.271821975708008, 16.271821975708008, 16.14373016357422, 15.938896179199219, 15.6040678024292, 15.498714447021484, 14.941251754760742, 14.941251754760742, 14.935295104980469, 14.806476593017578, 14.806476593017578, 14.747620582580566, 14.71998405456543, 14.081243515014648, 14.081243515014648, 13.751629829406738, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027, 13.587363243103027 ], "content": [ "In biojava 5 not released yet but you can use the SNAPSHOT builds or directly grab the master branch from github : https : github.com biojava biojava the polymer and non-polymer entities are dealt with in a much better way .", "I m using biojava to create a chromatogram .", "A sample of 2a65.pdb : .. . .. . A snippet of my biojava code : .. . .. . And what it generates :", "It seems like this is hard to answer but I m not into biojava so maybe I m wrong .", "In biojava 4 this is handled through seqres groups and atom groups .", "possible duplicate of biojava Exception in thread main java.lang.ArrayIndexOutOfBoundsException : http : stackoverflow.com questions 24428773 biojava-exception-in-thread-main-java-lang-arrayindexoutofboundsexception", "However there is secondary structure assignment given the structure based on the DSSP algorithm see https : github.com biojava biojava-tutorial blob master structure secstruc.md", "If you are on the latest BioJava the default is already to use mmcif .", "Which version of biojava have you downloaded", "Please check your classpath settings and biojava version .", "I just ensured by the -cp that the biojava jar is in classpath .", "I recommend posting this to the biojava mailing list .", "Could you try the latest release of biojava 4.2.1", "The example you are looking at is part of the legacy biojava release 1.8.X .", "You have to install BioJava first .. . .. . .. . http : www.biojava.org wiki BioJava : Download 3.0.6", "are you using your own copy of forrester or the one that comes with biojava", "Is there any method to use in biojava to predict secondary structure from a given sequence", "I don t think there is secondary structure prediction from sequence in biojava .", "I am trying to do a structural alignment using BioJava libraries .", "I have searched for the utilities in BIojava and have not found any .", "Can anyone tell me how to perform the search either in BioJava or BioPython .", "I search a method in BioJava to get the Atom sequence from a PDB file .", "I watched the BioJava API but for the getAtomSequence it catches the amino acids .", "I tried with several other method in BioJava but nothing worked as I want .", "I have downloaded biojava jar files and kept in my classpath .", "I took the example from the webpage in combination with version 3.0.7 of biojava .", "link http : biojava.org pipermail biojava-l 2003-June 003896.html", "I haven t used it but The BioJava Project http : biojava.org wiki Main Page includes code to read a GenBank http : biojava.org wiki BioJava 3aCookbook 3aSeqIO 3aReadGES file that may contain more than one sequence .", "Biojava requires slf4j which does have osgi headers .", "It s probably also better to get the jar from the Biojava maven repository to ensure the correct versions are used .", "I would like to ask if there is possible using biojava add sequence to exiting profile alignement", "I use biojava to make aligment to be more accurate MSA using getMultipleSequenceAlignment method .", "Please refer to this http : www.biojava.org docs api org biojava bio structure class-use Structure.html documentation .", "In the PDB file as well as cif files this LEU.601 residue is tagged as HET unfortunately being of name LEU it seems Biojava tags it automatically as ATOM .", "I think it is not available in BioJava but what you can do is to do a BLAST search by using BioJava libraries http : biojava.org wiki BioJava : CookBook3 : NCBIQBlastService or RCSB web page and from your BLAST search you can find a protein with 3D structure .", "If this is the case you should be familiar to include this in your own pom.xml not the downloaded one : .. . .. . If you don t use Maven which neither me nor the biojava-people recommend you can download the required jar files here : http : www.biojava.org download maven org biojava But beware : You have to download and add all transitive dependencies .jar files used by biojava by yourself .", "I ve tried to run a very simple sample BioJava copy pase from wikipedia .", "I don t know anything about RONN but the biojava code might be parsing the output RONN file incorrectly .", "I have two sequences as follow and I m trying to align them using biojava methods and I get error like this .", "According to the Maven pom file Biojava 3.08 depends on forester 1.005 while the latest version of forester on it s google-code page is 1.028 .", "I m working with the 1.8.1 release of biojava on Netbeans and using the ChromatogramGraphic Class to try to create an image of a chromatogram .", "Apparently this : .. . .. . http : biojava.org pipermail biojava-l 2003-June 003896.html .. . .. . code can accomplish what I want .", "For display see How Do I Print A Sequence in Fasta Format http : biojava.org wiki BioJava 3aCookbook 3aSeqIO 3aWriteInFasta .", "I have a problem getting BioJava to work in a Netbeans RCP application built using Maven .", "Then from another module I set the wrapper as a dependency and use some of the basic examples from the BioJava cookbook for testing .", "I m sorry I can t help you I don t know a lot about maven netbeans or biojava.. .", "It could be that the biojava jars contain osgi headers and then you are not wrapping the jars in module but declare a dependency on osgi plugin .", "I ve done a lot of searching and found that the actual culprit is slf4j that s used throughout BioJava .", "Here s the POM : .. . .. . The wrapper should then be used in the BioJava dependent modules but it should work for other modules depending on slf4j as well .", "does anyone have an idea how to automatically search and parse gbk files from FTP ncbi using either BIopython or BioJAVA .", "I know that for download a PDB structure using BioJava I should use .. . .. . What I should do to use mmCIF file instead", "I would have used Biojava but the current version I am already using does not offer that functionality or I haven t found it yet.. . .", "I am trying to use the example here : http : www.biojava.org wiki BioJava 3aCookbook 3aSeqIO 3aReadGESBiojavax .. . .. . However it isn t able to find the org.biojava imports I used .", "Whenever I try to instantiate some object of a class from BioJava the application freezes and I have to kill it using the Windows task manager .", "Here is a typical input .txt file also called as fasta file : .. . .. . Code to read the sequence may be found here http : www.biojava.org wiki BioJava 3aCookbook 3aSeqIO 3aReadGESBiojavax .", "Hi everyone I m fairly new to biojava and trying to implement this piece of code : .. . .. . after executing these lines im getting the following error message : .. . .. . Exception in thread main java.lang.NoSuchFieldError : lineSplit at org.biojava.bio.structure.align.util.UserConfiguration .", "@LuxxMiner I can t post a full runnable example because I use 9 other jar files from biojava and the program needs to read from an ABIF chromatogram .", "http : www.biojava.org docs api1.8 .. . .. . I ve made a file chooser to access chromatograms and I use the ChromatogramFactory from biojava Class to create a Chromatogram Object from the file .", "Here is what I have done .. . .. . Download the biojava.jar .. . .. . wget http : biojava.org download maven org biojava biojava3-core 3.0.7 biojava3-core-3.0.7.jar .. . .. . .. . Create a Java file FastaOpen.java containing the code taken from your link .. . Compile .. . .. . javac -cp .", "You need to download the biojava.jar and include it in your classpath you can maually download it from here http : biojava.org wiki BioJava 3aDownload 1.7.1 -- note the .jar file might have some other required .jars that it needs .. . .. . If you have a pom.xml you can set up your project to be maven compatible and then run maven -- it will download all the required .jars and set up the classpath correctly if the pom file is configured right", "any source code", "I tried downloading and editting the POM.xml and adding it to the project but it didn t have any effect .", "I have a project in my Bioinformatics course at the university and one of the things in my project is gene prediction .", "Reading pdb structure 2a65 I am facing the case of an aminoacid residue that should be considered a ligand of the protein rather than a part of the protein .", "Does anybody know a way to discriminate between protein chain A and the ligand LEU.601", "Do you have more info", "Thanks for the suggestion though I can t really see what I could add.. . : Maybe a few code-snippets and examples.. .", "I ll add that in the initial message then .", "Groups that are part of the ligand will not be in seqres at all .", "This is a snippet that demonstrates how to loop through them : .. . .. . The output of that will show how the seqres groups contain the LEU 601 you refer to whilst the atom groups don t contain it .", "Basically every ligand molecule is assigned to its own chain so that it is easy to separate what s polymer protein or nucleic acid from what s ligand .", "If you keep using 4 do use the latest 4.2.1 or wait a few days until 4.2.2 is released .", "If it s adding data to the JTable I d consider creating a DefaultTableModel object constructing it with the correct column header Strings in an array with 0 rows of data and then adding rows of data as you read through your files .", "All of the source code is above though and a picture of what the program looks like too .", "This challenges bots such as yours in the search process for the right data set .", "However if you are going to do further analysis with this data and you do not need to be very up-to-date with the latest version of the sequences nor to have dynamic fetching of different types of data maybe it is better that you just download the data you need from the ftp and locally process filter it .", "One approach is to extend AbstractTableModel as discussed in Creating a Table Model http : download.oracle.com javase tutorial uiswing components table.html data .", "If you do not wish to do a big if else block the fastest solution would be to build a Tree data structure .", "I ll open a new question about it because I can t find a related question .", "You can either hard code fill in the code of your app or fill it during the startup of your app from some outside source a file database etc . .", "Here is a picture of the GUI and what the program looks like : .. . .. . https : drive.google.com file d 0B5nGPfKaY21KVFVsaE9XSHJmWG8 view usp sharing .. . .. . Here is the source code : .. . .. . When the getChrom button is pressed the method renderTrace is executed rendering the trace .", "I ll also post a picture of my JFrame and relevant source code It s difficult to add siginficant amounts of code in comments", "Have you tried accessing URL ftp.wwpdb.org pub pdb data-structures divided pdb yy ftp : ftp.wwpdb.org pub pdb data-structures divided pdb yy pdb1yyo.ent.gz using something else than your program", "http : www.ncbi.nlm.nih.gov books NBK25499 chapter4 ESearch .. . .. . The Entrez E-Utilities are very flexible although it is true that you will need to filter the results to only obtain the data you need .", "Addendum : Because data-retrieval may be prtotracted SwingWorker http : download.oracle.com javase 6 docs api javax swing SwingWorker.html offers a safe way to mutate the TableModel .", "if you post your JFrame code to your question I can probably answer it - but the scrollable thing is a bit more trouble - it cant be done in this question - just open up a new question once we have this done", "Any suggestions", "Try with looking at the examples from the 3.X series.. . http : www.biojava.org wiki BioJava : CookBook", "Are you using Maven", "I strongly recommend you give Maven a try in this case", "1 .", "I am new to programming and would like to use a class from Biojava3 .", "Specifically the getDNACodingSequences method from GeneIDXMLReader class .", "When I include the import statement below it does not compile .", "I also try to use the lookup function in eclipse and it does not see it as well .", "import org.biojava3.genome.parsers.geneid.GeneIDXMLReader .. . .. . Thanks in advance for the help .", "I know this is basic stuff but I am a rookie .", "I have problem with multiple sequence alignement .", "I have no idea what is wrong .", "I know that sequences are not the same length but it should not matter ." ] }
{ "confidence": [ 57.17692565917969, 55.4030876159668, 55.33171081542969, 55.23031997680664, 53.10810089111328, 53.01518249511719, 52.6339225769043, 51.3446044921875, 50.25682830810547, 49.54494094848633, 48.81067657470703, 48.757015228271484, 48.23334503173828, 47.267189025878906, 46.720359802246094, 45.70709991455078, 44.51479721069336, 44.26408767700195, 43.72749328613281, 43.10151672363281 ], "content": [ "Question : Is there any method to use in biojava to predict secondary structure from a given sequence Or if not does any anyone how can i implement it any source code Any exe to recommend .. . Answer : I don t think there is secondary structure prediction from sequence in biojava . However there is secondary structure assignment given the structure based on the DSSP algorithm see https : github.com biojava biojava-tutorial blob master structure secstruc.md Comment : Please note that link-only or primarily link-only answers are discouraged on Stack Overflow . If you are able to include the relevant code in your answer it will be received much more favorably .", "Question : I am trying to use the example here : http : www.biojava.org wiki BioJava 3aCookbook 3aSeqIO 3aReadGESBiojavax .. . .. . However it isn t able to find the org.biojava imports I used . I tried downloading and editting the POM.xml and adding it to the project but it didn t have any effect . Any suggestions .. . Answer : Are you using Maven If this is the case you should be familiar to include this in your own pom.xml not the downloaded one : .. . .. . If you don t use Maven which neither me nor the biojava-people recommend you can download the required jar files here : http : www.biojava.org download maven org biojava But beware : You have to download and add all transitive dependencies .jar files used by biojava by yourself . I strongly recommend you give Maven a try in this case", "Question : Reading pdb structure 2a65 I am facing the case of an aminoacid residue that should be considered a ligand of the protein rather than a part of the protein . In the PDB file as well as cif files this LEU.601 residue is tagged as HET unfortunately being of name LEU it seems Biojava tags it automatically as ATOM . Does anybody know a way to discriminate between protein chain A and the ligand LEU.601 A sample of 2a65.pdb : .. . .. . A snippet of my biojava code : .. . .. . And what it generates : Comment : Do you have more info It seems like this is hard to answer but I m not into biojava so maybe I m wrong . Comment : Thanks for the suggestion though I can t really see what I could add.. . : Maybe a few code-snippets and examples.. . I ll add that in the initial message then . .. . Answer : In biojava 4 this is handled through seqres groups and atom groups . Groups that are part of the ligand will not be in seqres at all . This is a snippet that demonstrates how to loop through them : .. . .. . The output of that will show how the seqres groups contain the LEU 601 you refer to whilst the atom groups don t contain it . In biojava 5 not released yet but you can use the SNAPSHOT builds or directly grab the master branch from github : https : github.com biojava biojava the polymer and non-polymer entities are dealt with in a much better way . Basically every ligand molecule is assigned to its own chain so that it is easy to separate what s polymer protein or nucleic acid from what s ligand . If you keep using 4 do use the latest 4.2.1 or wait a few days until 4.2.2 is released .", "Question : Is there any method to use in biojava to predict secondary structure from a given sequence Or if not does any anyone how can i implement it any source code Any exe to recommend .. . Answer : I think it is not available in BioJava but what you can do is to do a BLAST search by using BioJava libraries http : biojava.org wiki BioJava : CookBook3 : NCBIQBlastService or RCSB web page and from your BLAST search you can find a protein with 3D structure . Afterwards you can use suggestDomains Structure s method of LocalProteinDomainParser class in org.biojava.bio.structure.domain package . Domains might give you some ideas about secondary structures .", "Question : I ve tried to run a very simple sample BioJava copy pase from wikipedia . However when I run it I get the following exception : .. . .. . Version : Comment : I recommend posting this to the biojava mailing list . It could be a bug in their wrapper parser . I don t know anything about RONN but the biojava code might be parsing the output RONN file incorrectly . .. . Answer : That looks like an issue with java-8 that was solved in 4.2 . Could you try the latest release of biojava 4.2.1", "Question : I am trying to use the example here : http : www.biojava.org wiki BioJava 3aCookbook 3aSeqIO 3aReadGESBiojavax .. . .. . However it isn t able to find the org.biojava imports I used . I tried downloading and editting the POM.xml and adding it to the project but it didn t have any effect . Any suggestions .. . Answer : The example you are looking at is part of the legacy biojava release 1.8.X . Try with looking at the examples from the 3.X series.. . http : www.biojava.org wiki BioJava : CookBook", "Question : What is wrong in code .. . .. . GSKTGTKITFYEDKNFQGRRYDCDCDCADFHTYLSRCNSIKVEGGTWAVYERPNFAGYMYILPQGEYPEYQRWMGLNDRLSSCRAVHLPSGGQYKIQIFEKGDFSGQMYETTEDCPSIMEQFHMREIHSCKVLEGVWIFYELPNYRGRQYLLDKKEYRKPIDWGAASPAVQSFRRIVE SMSAGPWKMVVWDEDGFQGRRHEFTAECPSVLELGFETVRSLKVLSGAWVGFEHAGFQGQQYILERGEYPSWDAWGGNTAYPAERLTSFRPAACANHRDSRLTIFEQENFLGKKGELSDDYPSLQAMGWEGNEVGSFHVHSGAWVCSQFPGYRGFQYVLECDHHSGDYKHFREWGSHAPTFQVQSIRRIQQ Exception in thread main java.lang.NoSuchMethodError : org.forester.phylogeny.PhylogenyNode.addAsChild Lorg forester phylogeny PhylogenyNode V at org.forester.evoinference.distance.NeighborJoining.execute NeighborJoining.java : 127 at org.biojava3.alignment.GuideTree . GuideTree.java : 88 at org.biojava3.alignment.Alignments.getMultipleSequenceAlignment Alignments.java : 183 at Fasta.main Fasta.java : 42 Comment : possible duplicate of biojava Exception in thread main java.lang.ArrayIndexOutOfBoundsException : http : stackoverflow.com questions 24428773 biojava-exception-in-thread-main-java-lang-arrayindexoutofboundsexception Comment : are you using your own copy of forrester or the one that comes with biojava Comment : I couldnt find forester.jar . Im using the one from : code.google.com p forester downloads http : code.google.com p forester downloads list can 2 q forester colspec Filename+Summary+Uploaded+ReleaseDate+Size .. . Answer : The problem is you are using the wrong version of forester . According to the Maven pom file Biojava 3.08 depends on forester 1.005 while the latest version of forester on it s google-code page is 1.028 . It s probably also better to get the jar from the Biojava maven repository to ensure the correct versions are used . download the jar from this URL : .. . .. . http : biojava.org download maven org forester 1.005 Comment : thats right thank you so much", "Question : I search a method in BioJava to get the Atom sequence from a PDB file . I watched the BioJava API but for the getAtomSequence it catches the amino acids . I tried with several other method in BioJava but nothing worked as I want . Can anybody help me here Thanks .. . Answer : I resolved it .. . Solution for the interested : Comment : +1 for self-learning", "Question : I am trying to use the example here : http : www.biojava.org wiki BioJava 3aCookbook 3aSeqIO 3aReadGESBiojavax .. . .. . However it isn t able to find the org.biojava imports I used . I tried downloading and editting the POM.xml and adding it to the project but it didn t have any effect . Any suggestions .. . Answer : You need to download the biojava.jar and include it in your classpath you can maually download it from here http : biojava.org wiki BioJava 3aDownload 1.7.1 -- note the .jar file might have some other required .jars that it needs .. . .. . If you have a pom.xml you can set up your project to be maven compatible and then run maven -- it will download all the required .jars and set up the classpath correctly if the pom file is configured right", "Question : I have downloaded biojava jar files and kept in my classpath . I am trying example to test from : http : www.biojava.org wiki BioJava : CookBook : Core : FastaReadWrite .. . .. . but it gives me error : .. . .. . I have 24 errors of the example file shown in site . I have kept jar files in class path . then why this gave me error Did i miss any step Comment : Which version of biojava have you downloaded There are plenty of them.. . Comment : i have downloaded 3.07 from biojava.org wiki BioJava : Download Manual Download http : biojava.org wiki BioJava : Download Manual Download .. . Answer : Please check your classpath settings and biojava version . I took the example from the webpage in combination with version 3.0.7 of biojava . Here is what I have done .. . .. . Download the biojava.jar .. . .. . wget http : biojava.org download maven org biojava biojava3-core 3.0.7 biojava3-core-3.0.7.jar .. . .. . .. . Create a Java file FastaOpen.java containing the code taken from your link .. . Compile .. . .. . javac -cp . : biojava3-core-3.0.7.jar FastaOpen.java .. . .. . .. . Execute .. . .. . java -cp . : biojava3-core-3.0.7.jar FastaOpen .. . Exception in thread main java.lang.ArrayIndexOutOfBoundsException : 0 .. . at FastaOpen.main FastaOpen.java : 20 .. . .. . .. . The exception is OK as I did not specify a filename . So for me the example is working . And if I do not specify the classpath at compile-time I get the same errors as you do e.g . : .. . .. . The description above works on Linux . On MS Windows you should try something similar to follwing commands issued in Powershell .. . .. . Compilation .. . .. . PS C : Program Files Java jdk1.7.0 45 bin javac.exe -cp C : Users stefan Downloads biojava3-core-3.0.7.jar . FastaOpen.java .. . .. . .. . Execution .. . .. . PS C : Program Files Java jdk1.7.0 45 bin java.exe -cp C : Users stefan Downloads biojava3-core-3.0.7.jar C : Users stefan Downloads FastaOpen .. . .. . .. . Both files java source class and jar reside in the Downloads directory . Comment : can you tell me what steps u did after downloading . i did the same but im still in the error tank . Comment : Nothing special . I just ensured by the -cp that the biojava jar is in classpath . Do you compile on the command-line Comment : yes i am trying to compile on command-line Comment : What does your classpath look like Comment : i kept all jars in C : Program Files x86 Java jre7 bin and then i added that path in environment-variables . is that so", "Question : I have a problem getting BioJava to work in a Netbeans RCP application built using Maven . I ve created a Maven module as a wrapper including org.biojava . and org.forester . packages as public in the POM . Then from another module I set the wrapper as a dependency and use some of the basic examples from the BioJava cookbook for testing . Whenever I try to instantiate some object of a class from BioJava the application freezes and I have to kill it using the Windows task manager . Here s the wrapper s pom file : .. . .. . Here s some code I try to get to work . This is just a very coarse example called from a button in a TopComponent . Input and output are just text fields . Here s the reader class : .. . .. . In the Netbeans IDE the classes are found and used in autocompletion and the project builds successfully in each case indicating that principally the dependencies are set up correctly . Comment : Hi Henk you should post some of the code your using try to get a minimal example which has the bug . This way people can help if they happen to have experience . Comment : That s a great idea Jaap you re right . Sorry for my lazyness . Comment : I m sorry I can t help you I don t know a lot about maven netbeans or biojava.. . Comment : thank you anyway Comment : I ve done a lot of tracing and found the program freezes when running the constructor or as I went through reflection to debug it inside the ConstructorAccessor when the Constructor .getInstance is called . I m still very confused about this.. . .. . Answer : I ve done a lot of searching and found that the actual culprit is slf4j that s used throughout BioJava . I don t know why it freezes the platform application but I m able to cause my module to not install by creating a slf4j logger in it . I ve seen a solution online for a wrapper module and it turns out it s enough to create a wrapper for org.slf4j : slf4j-api : x.y.z together with org.slf4j : slf4j-jdk14 : x.y.z . Add org.slf4j . to the public packages . Here s the POM : .. . .. . The wrapper should then be used in the BioJava dependent modules but it should work for other modules depending on slf4j as well .", "Question : null .. . Answer : I would like to ask if there is possible using biojava add sequence to exiting profile alignement I mean I would like to keep my existing profile stable . If i add new sequence to align if there appear a gap in profile it will be through whole column - that what I want to get . Comment : you should ask biostars.org https : www.biostars.org Comment : which profile format are you referring to I know of several Comment : what do you mean profile format I use biojava to make aligment to be more accurate MSA using getMultipleSequenceAlignment method . I receive profile and now I want to align profile with sequence .", "Question : I have a small problem.. . I know that for download a PDB structure using BioJava I should use .. . .. . What I should do to use mmCIF file instead .. . Answer : If you are on the latest BioJava the default is already to use mmcif . You can configure this in the AtomCache class and set a custom cache in StructureIO Comment : Thank you very much I will try", "Question : I m working with the 1.8.1 release of biojava on Netbeans and using the ChromatogramGraphic Class to try to create an image of a chromatogram . http : www.biojava.org docs api1.8 .. . .. . I ve made a file chooser to access chromatograms and I use the ChromatogramFactory from biojava Class to create a Chromatogram Object from the file . Apparently this : .. . .. . http : biojava.org pipermail biojava-l 2003-June 003896.html .. . .. . code can accomplish what I want . I don t understand what it does and I don t think I can use similar syntax to draw the image on my JFrame . Any help would be greatly appreciated . What I have so far . I don t know what most of it does . Comment : link http : biojava.org pipermail biojava-l 2003-June 003896.html .. . Answer : If this works then you can draw the image using the paint method of JFrame . First you need to make sure that this .. . .. . works from the gfx side . Try to save the image into a file and see if its there .. . .. . with import javax.imageio . in your import statements . If that works and you can see the image then at the JFrame you need to have something like Comment : I added the following try ImageIO.write bi png new File gfx-image.png catch IOException ex ex.printStackTrace but I dont know what it does . How do I know if the picture was created Comment : it should save the image to the file gfx-image.png at your current directory check to see if an image with that name has been created - after you run the program Comment : It worked link https : drive.google.com file d 0B5nGPfKaY21KeWtaRTdySXlYQmM view usp sharing I have the photo . I m sorry to bother you so much but I m very new to this . How can I draw this on my JFrame Also the picture is very long 2018 nucleotides long so how can I make it scrollable side to side @gpasch nvm EDIT the question has been answered . I ll look up the answer to this second part elsewhere thank you Comment : if you post your JFrame code to your question I can probably answer it - but the scrollable thing is a bit more trouble - it cant be done in this question - just open up a new question once we have this done Comment : I ll open a new question about it because I can t find a related question . I ll also post a picture of my JFrame and relevant source code It s difficult to add siginficant amounts of code in comments", "Question : I have a problem getting BioJava to work in a Netbeans RCP application built using Maven . I ve created a Maven module as a wrapper including org.biojava . and org.forester . packages as public in the POM . Then from another module I set the wrapper as a dependency and use some of the basic examples from the BioJava cookbook for testing . Whenever I try to instantiate some object of a class from BioJava the application freezes and I have to kill it using the Windows task manager . Here s the wrapper s pom file : .. . .. . Here s some code I try to get to work . This is just a very coarse example called from a button in a TopComponent . Input and output are just text fields . Here s the reader class : .. . .. . In the Netbeans IDE the classes are found and used in autocompletion and the project builds successfully in each case indicating that principally the dependencies are set up correctly . Comment : Hi Henk you should post some of the code your using try to get a minimal example which has the bug . This way people can help if they happen to have experience . Comment : That s a great idea Jaap you re right . Sorry for my lazyness . Comment : I m sorry I can t help you I don t know a lot about maven netbeans or biojava.. . Comment : thank you anyway Comment : I ve done a lot of tracing and found the program freezes when running the constructor or as I went through reflection to debug it inside the ConstructorAccessor when the Constructor .getInstance is called . I m still very confused about this.. . .. . Answer : First of all check the wrapper module s manifest to see if all entries are correctly generated especially since you define useOSGiDependencies true . It could be that the biojava jars contain osgi headers and then you are not wrapping the jars in module but declare a dependency on osgi plugin . However locking of the app is weird if there was something wrong with the runtime dependencies I would have expected an early unsatisfied dependencies error . You might want to create a thread-dump and check what s going on . Maybe you have a deadlock . Or since your action jButton1ActionPerformed is called from AWT maybe the whole reading thing just takes time and your UI thread is locked . Comment : Thanks for responding I ll have a look . Biojava requires slf4j which does have osgi headers . Unfortunately I m not completely clear on when to use a module as osgi or just as a jar . I ve tried switching the osgidependencies off but this does not seem to make a difference other than that the wrapper won t compile . Setting to on makes the module compile once more . Slowness : I ve tried to perform the same code in a regular swing app and it works indeed locking the gui but in a regular time frame . When debugging it seems everything locks up when I try to instantiate an object .", "Question : does anyone have an idea how to automatically search and parse gbk files from FTP ncbi using either BIopython or BioJAVA . I have searched for the utilities in BIojava and have not found any . I have also tried BioPython and here is my Code : .. . .. . However there are only 3 mycobacterium avium species whole genome sequences and fully annotated the result I am getting is 59897 . Can anyone tell me how to perform the search either in BioJava or BioPython . Otherwise I will have to automate this process form scratch . Thank you . Comment : cross posted on biostats : biostars.org p 95289 http : www.biostars.org p 95289 .. . Answer : If you want to dynamically search the NCBI for this information in an automated way you can do searches by name in the same way as with EFetch using the ESearch interface . This way you can get accesion IDs and then use this list to fetch the nucleotide information or any information you need with EFetch . http : www.ncbi.nlm.nih.gov books NBK25499 chapter4 ESearch .. . .. . The Entrez E-Utilities are very flexible although it is true that you will need to filter the results to only obtain the data you need . However if you are going to do further analysis with this data and you do not need to be very up-to-date with the latest version of the sequences nor to have dynamic fetching of different types of data maybe it is better that you just download the data you need from the ftp and locally process filter it . That might be faster than performing queries against Entrez which is in my opinion a little slow when queried in batch . Comment : Thanks . What I have done is I automate the search on the ftp service using a program that I have written . I enter my genus and specie the program looks for it on the ftp directory in the Bacteria folder and downloads the gbk file for me . Entrez returns too many queries so it does not suit my purpose . THanks again Comment : You re welcome . You got to a better solution yourself anyway :", "Question : does anyone have an idea how to automatically search and parse gbk files from FTP ncbi using either BIopython or BioJAVA . I have searched for the utilities in BIojava and have not found any . I have also tried BioPython and here is my Code : .. . .. . However there are only 3 mycobacterium avium species whole genome sequences and fully annotated the result I am getting is 59897 . Can anyone tell me how to perform the search either in BioJava or BioPython . Otherwise I will have to automate this process form scratch . Thank you . Comment : cross posted on biostats : biostars.org p 95289 http : www.biostars.org p 95289 .. . Answer : The way we do it is by specifying the id specifically using the efetch interface : .. . .. . Using a search term such as the one you used returns too many matches all of which you are downloading . See 48 different bioprojects with your search term here : .. . .. . http : www.ncbi.nlm.nih.gov bioproject term Mycobacterium+avium .. . .. . From experience the most accurate way to get what you want is to use the ACCESSION ID . Comment : The thing is I only have the genus and species of the bacteria . I do not have the accession id hence the search by name . Comment : Then you have to deal with the myriad experiments that people have done over time and submitted to NCBI over the years . The shape of things at Genbank change continuously and what is correct is relative for a lot of people . There is no systematic curation process that puts one dataset above another . This challenges bots such as yours in the search process for the right data set . Comment : Thanks . I think I will have to automate the process using the ftp service provided by NCBI .", "Question : I am trying to do a structural alignment using BioJava libraries . I want to pick some chains from one structure object one by one and add them to another structure object so I can do structural alignment with them but I couldn t yet figure out how . The code I wrote so far is below but it gives null-pointer exception probably because new structure is set to null . What else can I try .. . Answer : you can use : .. . .. . to get an identical copy of the structure.Then you will be having all chains of first structure in the new structure too . probably you should do that after : .. . .. . to have a non null value . Please refer to this http : www.biojava.org docs api org biojava bio structure class-use Structure.html documentation . You can also try : Comment : But I don t want to have all the chains that s the problem . I want to have some of the chains . Comment : try using StructureImpl see my edited answer Comment : Yes that s what i was looking for thank you", "Question : I am quite new to Java and want to build a program that can convert a GenBank text file to FASTA format . Basically there will be two texboxes : one where I will upload the GenBank format file and a second to show the converted FASTA format file . This is a GenBank format file : .. . .. . and its corresponding FASTA format file is : .. . .. . Can anybody help me with advice on how-to or code to trim the GenBank file and display it in the second textbox through a clicked button . I am using Netbeans 6.9 . Comment : Have you tried anything For example google how to implement a gui in Java . Comment : the implementation of gui is alright but cant figure out how to trim the data and extract the one i need and reaarange in the right order Comment : Google says http : www.google.com search q convert+genbank+to+fasta+java choose a converter http : molbiol-tools.ca Convert.htm . .. . Answer : I haven t used it but The BioJava Project http : biojava.org wiki Main Page includes code to read a GenBank http : biojava.org wiki BioJava 3aCookbook 3aSeqIO 3aReadGES file that may contain more than one sequence . For display see How Do I Print A Sequence in Fasta Format http : biojava.org wiki BioJava 3aCookbook 3aSeqIO 3aWriteInFasta . Comment : wow .. . there seems to be nothing you don t know : - Kudos and +1 Comment : I m only now beginning to understand how little I know . : -", "Question : 1 . I am new to programming and would like to use a class from Biojava3 . Specifically the getDNACodingSequences method from GeneIDXMLReader class . When I include the import statement below it does not compile . I also try to use the lookup function in eclipse and it does not see it as well . import org.biojava3.genome.parsers.geneid.GeneIDXMLReader .. . .. . Thanks in advance for the help . I know this is basic stuff but I am a rookie . .. . Answer : You have to install BioJava first .. . .. . .. . http : www.biojava.org wiki BioJava : Download 3.0.6" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
c++98@c++@35
c++ 98 -- the 1998 revision of the @placeholder standard iso iec 14882 : 1998 .
{ "confidence": [ 75.756591796875, 60.104129791259766, 47.204341888427734, 44.97703170776367, 43.123592376708984, 43.123592376708984, 35.011688232421875, 34.875244140625, 33.69651794433594, 33.57775115966797, 32.069210052490234, 31.899646759033203, 30.860231399536133, 29.737071990966797, 29.474458694458008, 29.455087661743164, 29.35993194580078, 28.874279022216797, 28.558513641357422, 28.461986541748047, 28.461986541748047, 28.461986541748047, 28.350631713867188, 28.350631713867188, 28.167316436767578, 28.167316436767578, 27.513439178466797, 27.305198669433594, 27.08668327331543, 27.030221939086914, 27.030221939086914, 27.030221939086914, 26.78087615966797, 26.724273681640625, 26.4968318939209, 26.373058319091797, 26.27619743347168, 26.159408569335938, 26.12259292602539, 25.981918334960938, 25.958873748779297, 25.918758392333984, 25.918758392333984, 25.918758392333984, 25.873435974121094, 25.873435974121094, 25.873435974121094, 25.873435974121094, 25.873435974121094, 25.593568801879883, 25.593568801879883, 25.42351531982422, 25.249183654785156, 25.249183654785156, 25.154518127441406, 25.154518127441406, 24.870473861694336, 24.838581085205078, 24.792613983154297, 24.486995697021484, 24.486995697021484, 24.486995697021484, 24.486995697021484, 24.486995697021484, 24.486995697021484, 24.486995697021484, 24.486995697021484, 24.486995697021484, 24.376754760742188, 24.376754760742188, 24.292400360107422, 24.207128524780273, 24.207128524780273, 24.207128524780273, 24.207128524780273, 24.207128524780273, 24.207128524780273, 24.207128524780273, 24.207128524780273, 24.207128524780273, 24.207128524780273, 24.207128524780273, 24.092397689819336, 24.067462921142578, 23.841724395751953, 23.76471710205078, 23.612178802490234, 23.592540740966797, 23.40048599243164, 23.219968795776367, 23.219968795776367, 23.219968795776367, 23.219968795776367, 23.219968795776367, 23.15029525756836, 22.90421485900879, 22.884742736816406, 22.884742736816406, 22.884742736816406, 22.86063575744629 ], "content": [ "GCC .. . .. . Their standards https : gcc.gnu.org onlinedocs gcc-4.9.2 gcc Standards.html Standards page : .. . .. . The original ISO C++ standard was published as the ISO standard ISO IEC 14882 : 1998 and amended by a Technical Corrigenda published in 2003 ISO IEC 14882 : 2003 .", "I ve had someone tell me that C++98 was written under ANSI before being formally standardised as ISO IEC 14882 : 1998 .", "And group c++98 and c++03 together : .. . .. . The 1998 ISO C++ standard plus the 2003 technical corrigendum and some additional defect reports .", "The current standard however is actually INCITS ISO IEC 14882-2003 http : webstore.ansi.org RecordDetail.aspx sku INCITS ISO IEC 2014882-2003 .", ".. . and I always thought it was BS ISO IEC 14882 : 2003 - .", "There s small difference : it s BS ISO IEC 14882-2003 .", "The current 2003 standard therefore shows up as an INCITS ISO IEC standard and I believe the upcoming 2011 standard will also .", "Clang implements C++03 minus export just like GCC : .. . .. . Clang implements all of the ISO C++ 1998 standard including the defects addressed in the ISO C++ 2003 standard except for export which was removed in C++11 .", "In C++1998 there are 2 types of initialization : zero and default .. . 2 .", "C++98 was developed by an international committee part of the International Organization for Standardization ISO .", "The C++ standard was ISO from the start however .", "I would call it Standard C++ or C++98 or just C++ if it s clear that I m talking about the current standard .", "Please answer according to c++ 98 standard .. . 4 .", "NB : C++98 standard only the code is a very old one .", "C++98", "In C++11 : .. . .. . In C++98 :", "Quoting the ISO IEC 14882 : 1998 standard document http : sites.cs.queensu.ca gradresources stuff cpp98.pdf that was withdrawn from ISO : .. . .. . To default-initialize an object of type T means : .. . .. . if T is a non-POD class type clause 9 the default constructor for T is called and the initialization is ill-formed if T has no accessible default constructor .. . if T is an array type each element is default-initialized .. . otherwise the storage for the object is zero-initialized .", "It also uses fully ANSI ISO C++98 I believe compliant C++ and runs natively on the Command Prompt on Windows 7 I m not sure of the bits .", "The ISO working party creates the standard .", "The C++03 code is valid with C++98 compiler .", "Is ANSI C++ a good description for C++98", "Is ANSI C++ a good description for C++98", "I just mean the C++98 standard not the compilers of the era .", "The question asker followed it up with Is value-initialization part of the C++98 standard", "Is there a workaround for this in c++98", "Is there a workaround for this in c++98", "Is -std c++98 a hard requirement or could you use any higher standard", "it is c++11 OP asked for c++98", "I m having trouble here with this code : .. . .. . that gives me this error with c++ 98 .. . .. . It works on C++11 but I need this on C++98 .", "What is the best practice in such cases C++98", "What is the best practice in such cases C++98", "I don t recall if std : : recursive-mutex is in C++98 .", "@CoryKramer : It is reproducible in c++98 .", "As there are no threads in standard c++98 that depends - on the OS and the threading library you are using .", "To select this standard in GCC use one of the options -ansi -std c++98 or -std c++03 .. .", "This gotw page http : www.gotw.ca iso describes the relationship of ANSI and ISO as far as C++ is concerned briefly : .. . .. . The official names of the ISO and U.S . committees are : .. . .. . ISO IEC JTC1 SC22 WG21 - C++ ISO C++ committee .. . .. . INCITS PL22.16 - C++ the U.S . C++ committee often called the ANSI C++ committee -- although more accurately INCITS is a separate organization that is not a part of ANSI but is accredited by ANSI to develop U.S . standards previously called X3J16 and J16 .. . .. . These two groups together are often referred to in the singular as the C++ committee because they meet and do their work together .", "I have a copy of the 03 standard but not the 98 standard .", "C++98 had a lot of work done on standardisation in America because that s where C++ was created and where its creators lived before the standardisation was taken under the auspices of the ISO committee who were the same people .", "In most countries an ISO standard automatically becomes a national standard or a standard of the national body depending on how things are organized in the country .", "I ve always referred to Standard C++ as Standard C++ .", "Conventionally when it is an ISO standard we call it ISO rather than changing the name according to the country we re in .", "C++11 is an improved version of C++98 .", ".. . .. . perhaps it was forbidden in C++98 and authorized in C++11", "These standards are referred to as C++98 and C++03 respectively .", "I am looking for a c++98 implementation", "With regards to C++98 using Visual Studio 2010 .", "What is the C++98 equivalent of for auto it : vec or is it not possible", "In C++98 one should use only cmath then", "I want something that will work in C++98 .", "@Luv2code : I invert C++11 C++98 in my previous comment : .", "And to have code that works both in C++98 and C++11 would be possible", "The final ISO Standard was then adopted by ANSI and other national standards authorities .", "Unfortunately we re using an old compiler that barely supports C++98 .", "Edit : I just noticed that you re using -std c++98 .", "And note the C++98 constraint .", "I m using C++98 .", "While this might be fine in practice claiming that the standard text in C++98 and C++03 supports this is misleading at best .", "Adopted by ISO in 1990 it became with different paragraph numbers but otherwise the same ISO C 1990 .", "Thus ISO C++ is also ANSI C++ BSI C++ DIN C++ etc .", "I m using c++98 and Allegro 4 .", "But in fact all of this was already possible in C++98 .", "Do you have to use C++98", "Solving this for C++98 indicates an older compiler version .", "g++ 4.9 with -std c++98 is fine .", "AND IT HAS TO BE OLD C++ 98 03 not the newer one .", "Is there a way to make GCC only conform to C++98", "Is there a way to make GCC only conform to C++98", "But it also prints 0 as output on C++98 compiler .", "Turbo C++ is not C++98 compliant and it was not developed since 2003 so there s no chance of ever getting a version .", "C++03 was just a technical corrigendum of C++98 called TC1 at the time it was the first and only .", "And what about C++98 C++03", "I can t find that quote in either C++98 or C++03 .", "In fact in C++98 as well as in C++03 references to references do not collapse .", "You can think of C++98 and C++11 as separate but related languages .", "This makes it dangerous to link C++98 objects with C++11 objects .", "The compiler used on this code is c++98 or c++03 but not more recent .", "Does Clang conform to C++98 or do they actually conform to C++03", "C++03 fixes lots of important defects in C++98 .", ".. . .. . Does Clang conform to C++98 or do they actually conform to C++03", "Most compilers make no distinction between C++03 and C++98 .", "Without noticing I was linking a C++98 lib with a C++11 application .", "It will in a future version in both C++98 and C++11 modes .", "You can use C++98 03 method for now .", "The C++ standards are developed by ISO and adopted by ANSI and other bodies .", "Enforcing the C++98 standard in gcc https : stackoverflow.com questions 12606713 enforcing-the-c98-standard-in-gcc simply links to the same documentation I did without any further consideration on whether it really is conforming against C++98 .", "Using the LSP and plain C++98 : .. . .. . Since public inheritance in C++ satisfies the IS-A rule anInstanceOfA both IS-A C 1 object and IS AN A object .", "getch - like conio.h is not standard C++ .", "You should be able to use -std c++98 -pedantic flags and thus to force C++98 mode .", "IMO ANSI C++ is just a leftover name the language is ISO C++ even though ANSI is indirectly involved in the standardization .", "I m using C++98 and sadly can t use C++11 extensions if it could help .", "The things are a bit different for std : : vector and std : : deque as well as they are different for C++98 and C++11 .", "Note that your first snippet will print strings in C++11 and char in C++98.. .", "@ChristianRau So basically in C++98 this did not exist and one could have it only by borrowing it from C", "@Antonio This whole problem doesn t have anything to do with C++98 vs C++11 .", "this was written before your comment Looking at Christian Rau comment link above : isnan of cmath shouldn t even be there in C++98.. . And the only isnan for C++98 would be in the deprecated math.h which must be called without std : : .", "I remember that std : : auto-ptr is deprecated from C++11 so use it only if you can t use C++11 or a newer standard .. . .. . The following example should be C++98 compliant I ve removed the const too", "Is ANSI C++ a good description for subsequent versions of the C++ standard", "Is ANSI C++ a good description for subsequent versions of the C++ standard", "Or vice versa : the original C standard was ANSI C 1989 .", "Is the above code well defined in C++98" ] }
{ "confidence": [ 79.4502944946289, 74.71854400634766, 73.87323760986328, 70.56329345703125, 70.3296127319336, 69.87572479248047, 69.579833984375, 42.73766326904297, 30.33971405029297, 30.02389144897461, 29.627796173095703, 29.363445281982422, 28.120708465576172, 28.10171890258789, 28.007671356201172, 28.007671356201172, 26.875179290771484, 26.642337799072266, 26.239521026611328, 26.191638946533203 ], "content": [ "Question : I ve had someone tell me that C++98 was written under ANSI before being formally standardised as ISO IEC 14882 : 1998 . I know that ANSI was involved with C but I can t seem to find much in the way of proof that the phrase ANSI C++ is terribly accurate . Is ANSI C++ a good description for C++98 Is ANSI C++ a good description for subsequent versions of the C++ standard Comment : Hard to pick an answer to this question . Glad to see that it s attracted all the n0k-ers . : Comment : Thanks for all your answers . I think I m satisfied . : .. . Answer : Sort of but not really . There isn t and never has been a separate ANSI standard for C++ . The current standard however is actually INCITS ISO IEC 14882-2003 http : webstore.ansi.org RecordDetail.aspx sku INCITS ISO IEC 2014882-2003 . As of 2003 INCITS became a separate ANSI-accredited organization . The name INCITS wasn t new but previously it had been part of ANSI . In 2003 it was spun off http : www.ansi.org news publications news story.aspx menuid 7 articleid 331 as a separate but still ANSI-accredited organization . The current 2003 standard therefore shows up as an INCITS ISO IEC standard and I believe the upcoming 2011 standard will also . Comment : .. . and I always thought it was BS ISO IEC 14882 : 2003 - . Comment : @Charles : Close but not quite . There s small difference : it s BS ISO IEC 14882-2003 . I m not entirely sure how much the space vs . slash means though . My point wasn t so much to give INCITS credit or anything like that though but to point out that ANSI isn t mentioned at all and INCITS is now a separate organization from ANSI . shop.bsigroup.com en ProductDetail pid 000000000030116778 http : shop.bsigroup.com en ProductDetail pid 000000000030116778", "Question : I ve had someone tell me that C++98 was written under ANSI before being formally standardised as ISO IEC 14882 : 1998 . I know that ANSI was involved with C but I can t seem to find much in the way of proof that the phrase ANSI C++ is terribly accurate . Is ANSI C++ a good description for C++98 Is ANSI C++ a good description for subsequent versions of the C++ standard Comment : Hard to pick an answer to this question . Glad to see that it s attracted all the n0k-ers . : Comment : Thanks for all your answers . I think I m satisfied . : .. . Answer : The ISO working party creates the standard . C++98 had a lot of work done on standardisation in America because that s where C++ was created and where its creators lived before the standardisation was taken under the auspices of the ISO committee who were the same people . The final ISO Standard was then adopted by ANSI and other national standards authorities . I ve always referred to Standard C++ as Standard C++ . Comment : Bjarne is Danish British and C++ was created for his PhD thesis which he wrote in England . He didn t move to the States until later .", "Question : I ve had someone tell me that C++98 was written under ANSI before being formally standardised as ISO IEC 14882 : 1998 . I know that ANSI was involved with C but I can t seem to find much in the way of proof that the phrase ANSI C++ is terribly accurate . Is ANSI C++ a good description for C++98 Is ANSI C++ a good description for subsequent versions of the C++ standard Comment : Hard to pick an answer to this question . Glad to see that it s attracted all the n0k-ers . : Comment : Thanks for all your answers . I think I m satisfied . : .. . Answer : AFAIK when they say ANSI C++ they really mean no compiler-specific extensions . Comment : Right but that says nothing about how accurate it is .", "Question : I ve had someone tell me that C++98 was written under ANSI before being formally standardised as ISO IEC 14882 : 1998 . I know that ANSI was involved with C but I can t seem to find much in the way of proof that the phrase ANSI C++ is terribly accurate . Is ANSI C++ a good description for C++98 Is ANSI C++ a good description for subsequent versions of the C++ standard Comment : Hard to pick an answer to this question . Glad to see that it s attracted all the n0k-ers . : Comment : Thanks for all your answers . I think I m satisfied . : .. . Answer : Initially in 89 the standardization of C++ was handled by ANSI X3J16 . Starting in 91 ISO WG21 joined in . You may want to read BS s A History of C++ : 1979-1991 http : www2.research.att.com bs hopl2.pdf . IMO ANSI C++ is just a leftover name the language is ISO C++ even though ANSI is indirectly involved in the standardization .", "Question : I ve had someone tell me that C++98 was written under ANSI before being formally standardised as ISO IEC 14882 : 1998 . I know that ANSI was involved with C but I can t seem to find much in the way of proof that the phrase ANSI C++ is terribly accurate . Is ANSI C++ a good description for C++98 Is ANSI C++ a good description for subsequent versions of the C++ standard Comment : Hard to pick an answer to this question . Glad to see that it s attracted all the n0k-ers . : Comment : Thanks for all your answers . I think I m satisfied . : .. . Answer : This gotw page http : www.gotw.ca iso describes the relationship of ANSI and ISO as far as C++ is concerned briefly : .. . .. . The official names of the ISO and U.S . committees are : .. . .. . ISO IEC JTC1 SC22 WG21 - C++ ISO C++ committee .. . .. . INCITS PL22.16 - C++ the U.S . C++ committee often called the ANSI C++ committee -- although more accurately INCITS is a separate organization that is not a part of ANSI but is accredited by ANSI to develop U.S . standards previously called X3J16 and J16 .. . .. . These two groups together are often referred to in the singular as the C++ committee because they meet and do their work together . The meetings are always in the same room at the same time .. . .. . It sounds like the ISO standard developed by this committee automatically becomes the U.S . standard although I am sure people who actually work in those committees can explain better . Comment : In most countries an ISO standard automatically becomes a national standard or a standard of the national body depending on how things are organized in the country . Thus ISO C++ is also ANSI C++ BSI C++ DIN C++ etc . Conventionally when it is an ISO standard we call it ISO rather than changing the name according to the country we re in .", "Question : The meta question https : meta.stackoverflow.com questions 278684 make-c98-and-c03-tags-synonyms proposes that the c++98 questions tagged c 2b 2b98 and c++03 questions tagged c 2b 2b03 tags should be made synonyms . The question asker followed it up with Is value-initialization part of the C++98 standard If not why was it added in the C++03 standard https : stackoverflow.com questions 27349679 is-value-initialization-part-of-the-c98-standard-if-not-why-was-it-added-in an excellent question which sheds light on the addition of value-initialization to C++03 . Consider this question to be a follow-up to the latter . The OP asserts that modern compilers do not bother distinguishing between C++98 and C++03 . This was surprising to me as it turns out to be the case for three modern compilers . Although this question could boil down to RTFM my searches have not found anything conclusive . GCC .. . .. . Their standards https : gcc.gnu.org onlinedocs gcc-4.9.2 gcc Standards.html Standards page : .. . .. . The original ISO C++ standard was published as the ISO standard ISO IEC 14882 : 1998 and amended by a Technical Corrigenda published in 2003 ISO IEC 14882 : 2003 . These standards are referred to as C++98 and C++03 respectively . GCC implements the majority of C++98 export is a notable exception and most of the changes in C++03 . To select this standard in GCC use one of the options -ansi -std c++98 or -std c++03 .. . Furthermore their dialect options https : gcc.gnu.org onlinedocs gcc-4.9.2 gcc C-Dialect-Options.html C-Dialect-Options page says : .. . .. . In C++ mode ansi is equivalent to -std c++98 . And group c++98 and c++03 together : .. . .. . The 1998 ISO C++ standard plus the 2003 technical corrigendum and some additional defect reports . Same as -ansi for C++ code . This seems to imply there is no way to turn on only C++98 mode . Clang .. . .. . The only thing I found find for Clang was on their manual http : clang.llvm.org docs UsersManual.html it says under C++ Language Features http : clang.llvm.org docs UsersManual.html cxx : .. . .. . clang fully implements all of standard C++98 except for exported templates which were removed in C++11 .. . .. . .. . With no mention of C++03 . It also states : .. . .. . clang supports the -std option which changes what language mode clang uses . The supported modes for C are c89 gnu89 c94 c99 gnu99 c11 gnu11 and various aliases for those modes . If no -std option is specified clang defaults to gnu11 mode . Many C99 and C11 features are supported in earlier modes as a conforming extension with a warning . This is of course for their C compiler I was not able to find any documentation on the C++ compiler such as which options are valid to pass to -std . I simply assume that Clang mirrors GCC s dialect options for example C++03 is valid on Clang although without proof I cannot state so conclusively . MSVC .. . .. . As far as I know MSVC doesn t allow you to change language standards like the two above do . A search for C++98 on MSDN https : social.msdn.microsoft.com Search en-US query C 2B 2B98 emptyWatermark true ac 4 refinementChanges 117 108 pageNumber 2 showMore false doesn t turn up anything . It appears that they implement C++98 C++11 for example as stated by Herb Sutter http : herbsutter.com 2012 05 03 reader-qa-what-about-vc-and-c99 . Questions .. . .. . Although these questions sound obvious the meta question has made me realize that it is not so obvious . Is there a way to make GCC only conform to C++98 Enforcing the C++98 standard in gcc https : stackoverflow.com questions 12606713 enforcing-the-c98-standard-in-gcc simply links to the same documentation I did without any further consideration on whether it really is conforming against C++98 . Does Clang conform to C++98 or do they actually conform to C++03 Where can I find the relevant documentation for this Same for MSVC . Is there a way to change language standards in MSVC to conform only against C++98 Comment : Adding a -std c++98 would be completely useless for real code only fools and people writing compiler verification suites would use it . C++03 fixes lots of important defects in C++98 . It would make compiler writers lives harder as it would increase the number of configurations and modes that need to be tested probably introducing bugs and generally causing problems for the compiler devs and users none of whom would actually care about or use the -std c++98 option Comment : I was thinking of asking this same thing .. . Answer : Is there a way to make GCC only conform to C++98 No . You already thoroughly covered the available flags in your question and none of them can do this . .. . .. . Does Clang conform to C++98 or do they actually conform to C++03 Where can I find the relevant documentation for this Clang implements C++03 minus export just like GCC : .. . .. . Clang implements all of the ISO C++ 1998 standard including the defects addressed in the ISO C++ 2003 standard except for export which was removed in C++11 . http : clang.llvm.org cxx status.html .. . .. . .. . .. . Same for MSVC . Is there a way to change language standards in MSVC to conform only against C++98 No . As you say you cannot specify the C++ version in MSVC . There is a list of compiler-flags and that is not the function of any of them . http : msdn.microsoft.com en-us library fwkeyyhe.aspx .. . .. . .. . .. . The whole point of C++03 was to make corrections to C++98 and thus to effectively replace it outright rather than to follow it as a new unit . It does not make sense to want to revert those fixes . That would be like asking Windows 7 SP2 to boot into Windows 7 SP1 mode . It just isn t a model that anyone would want to support . Fictional http : serverfault.com q 573208 72833 .", "Question : I ve had someone tell me that C++98 was written under ANSI before being formally standardised as ISO IEC 14882 : 1998 . I know that ANSI was involved with C but I can t seem to find much in the way of proof that the phrase ANSI C++ is terribly accurate . Is ANSI C++ a good description for C++98 Is ANSI C++ a good description for subsequent versions of the C++ standard Comment : Hard to pick an answer to this question . Glad to see that it s attracted all the n0k-ers . : Comment : Thanks for all your answers . I think I m satisfied . : .. . Answer : C++98 was developed by an international committee part of the International Organization for Standardization ISO . ANSI and other national standards bodies are members of this committee . The international standard has been adopted by ANSI as the US national standard and likewise by many other national standards bodies . Earlier versions were developed commercially in the US by AT T I m not sure whether or not ANSI was involved in intermediate versions EDIT : but Erik s answer suggests that it was briefly . Is ANSI C++ a good description for C++98 I would call it Standard C++ or C++98 or just C++ if it s clear that I m talking about the current standard . While technically accurate ANSI C++ might confuse people who don t realise that it means the same thing particularly people from other countries who might not know what ANSI is . I would probably get odd looks if I called it British Standard C++ an equally accurate description . Is ANSI C++ a good description for subsequent versions of the C++ standard Same answer . The C++ standards are developed by ISO and adopted by ANSI and other bodies . Comment : Or vice versa : the original C standard was ANSI C 1989 . Adopted by ISO in 1990 it became with different paragraph numbers but otherwise the same ISO C 1990 . The C++ standard was ISO from the start however . Comment : @James : indeed C s standardisation followed a different route . When I said the standards in the last sentence I meant the C++ standards not international standards in general .", "Question : Cheers and hth . - Alf made a comment in this answer http : stackoverflow.com a 8287020 1128289 that value-initialization is arguably a new feature of C++03 compared to C++98 . I wonder what he meant . Is value-initialization http : en.cppreference.com w cpp language value-initialization part of C++98 Is it present in concept but not in name Why was it added to the C++03 standard I have a copy of the 03 standard but not the 98 standard . Here s the definition of default initialization and value-initialization . To default-initialize an object of type T means : .. . .. . if T is a non-POD class type clause 9 the default constructor for T is called and the initialization is ill-formed if T has no accessible default constructor .. . .. . if T is an array type each element is default-initialized .. . .. . otherwise the object is zero-initialized . .. . To value-initialize an object of type T means : .. . .. . if T is a class type clause 9 with a user-declared constructor 12.1 then the default constructor for T is called and the initialization is ill-formed if T has no accessible default constructor .. . .. . if T is a non-union class type without a user-declared constructor then every non-static data member and base-class component of T is value-initialized .. . .. . if T is an array type then each element is value-initialized .. . .. . otherwise the object is zero-initialized .. . .. . My guess is that 98 had default initialization but not value-initialization and that there s some key difference between the two . To be honest I m having trouble parsing the standardese here and I don t understand the difference between the definitions . .. . Answer : Quoting the ISO IEC 14882 : 1998 standard document http : sites.cs.queensu.ca gradresources stuff cpp98.pdf that was withdrawn from ISO : .. . .. . To default-initialize an object of type T means : .. . .. . if T is a non-POD class type clause 9 the default constructor for T is called and the initialization is ill-formed if T has no accessible default constructor .. . if T is an array type each element is default-initialized .. . otherwise the storage for the object is zero-initialized . And in paragraph 7 : .. . .. . An object whose initializer is an empty set of parentheses i.e . shall be default-initialized . Details on the rationale behind the change can be found in the defect report http : www.open-std.org jtc1 sc22 wg21 docs papers 1999 n1191.pdf that made it happen : .. . .. . This definition is appropriate for local-variables but not for objects that are initialized as a result-of executing expressions of the form T because the objects yielded by such expressions will be copied immediately and should therefore have values that are assured of being copyable . To this end I propose adding the following new text to 8.5 paragraph 5 : .. . .. . To value-initialize an object of type T means : .. . .. . if T is a class type clause 9 class with a user-declared constructor 12.1 then the default constructor for T is called and the initialization is ill-formed if T has no accessible default constructor .. . if T is a class type without a user-declared constructor then every non-static data member and base-class component of T is value-initialized .. . if T is an array type then each element is value-initialized .. . otherwise the storage for the object is zero-initialized . .. . In addition I propose to change default-initialization to value-initialization in 5.2.3 paragraph 2 . And following that a historical explanation : .. . .. . Ancient history .. . .. . Once upon a time an AT T compiler developer named Laura Eaves asked me : What should be the value of int My first thought was that it should be the same value as x has after saying .. . .. . .. . int x .. . .. . .. . but I soon realized that that definition would not do . The reason is that x has an indeterminate value assuming that it is a local variable but we don t mind that x is indeterminate because we are presumably going to assign a value to x before we use it . In contrast int had better not have an indeterminate value because copying such a value has an undefined effect . It would be silly to forbid a compiler from flagging int during compilation only to allow it to flag it during execution Comment : You ve got it . I propose bringing some of the rationale from the DR into your answer to make it self-contained . Let me know when you ve done this so that I can upvote you . : Comment : The annoying thing about the C++98 version is that if you have a class containing a std : : string and some int variables there is no way to have it zero-initialize the ints other than to explicitly list them all in the constructor initializer-list . Comment : @MattMcNabb I didn t follow . List them all in the initializer-list as opposed to doing what If you don t list them in the initializer-list in C++03 are they zero-initialized Comment : @Praxeolitic in C++98 T doesn t zero-initialize the ints if T also contains strings this shows up in many idioms e.g . T t T or T t t T . For another annoying spot see here http : stackoverflow.com questions 22975262 constructor-to-specify-zero-initialization-of-all-builtin-members", "Question : Consider following program : .. . .. . My compiler gcc 4.8.1 gives following warnings : .. . .. . I know that C++ does not support empty preprocessor function macros arguments . But C99 allows preprocessor function macros to be specified with empty missing arguments . This feature is likely to be provided as an extension by many C++ compilers like g++ in above case . Is the behaviour of program indeed undefined as per C89 C++ standard Comment : Look it up in the actual standard or a draft . .. . Answer : The C89 C90 and the C++98 standards simply did not define how empty macro arguments should be handled . As a result the behaviour was undefined by omission and a preprocessing-time warning or error message is a reasonable result-of that . C99 as you noted was the first C standard to allow it but worth mentioning too is that C++11 adopted the C99 wording . So no it s no longer undefined behaviour in C++ to have empty macro arguments . Comment : A document superficially resembling the ISO C90 standard can be found here http : port70.net nsz c c89 c89-draft.html . I cannot vouch for its validity . Look at 3.8.3 the last paragraph before 3.8.3.1 .", "Question : In my Computer Science Textbook Britannica Live Wire Class 8 to be specific the C++ IDE used is labeled and called under various instances as Turbo C++ or Turbo C++ IDE . It also uses fully ANSI ISO C++98 I believe compliant C++ and runs natively on the Command Prompt on Windows 7 I m not sure of the bits . What s weird is that I researched for months on end but in vain . Does anyone know of such a version of Turbo C++ My school uses the run-of-the-mill Turbo C++ 3.0 in DOSBox and teaches us the old standard the CBSE India syllabus still uses C++ from 1983 . Can anyone please tell me if such a version exists and please provide a download purchase link if so Any help in this regard will be appreciated . Also look at these screenshots according to textbook . http : i.stack.imgur.com SFEep.jpg .. . .. . I have never seen any Output window in TC++ . Also note the header on the screenshots : include iostream.h . In the program examples given in the textbook we always have include iostream note the lack of a .h extension . Now the program as printed . http : i.stack.imgur.com 31FM5.jpg I included the image to prove I didn t copy it wrong .. . .. . When put into text it is .. . .. . Note that in two particular programs include iostream.h is used in the examples too along with using namespace std . This is either .. . .. . Entirely Possible A top Secret Project at Borland Highly Unlikely .. . Faked Screenshots and typo-ridden programs Highly likely but weird for a textbook .. . .. . Can someone please enlighten me on this matter Thanks Akash .. . Answer : No there is not . Turbo C++ is not C++98 compliant and it was not developed since 2003 so there s no chance of ever getting a version . C++11 and C++14 are of course also not existing . I really don t get why Turbo C++ is used as a standard in India it teaches an obsolete and cryptic style . It might not help you with your syllabus but I d try gcc or clang if you really want to learn C++ - both are open-source . You can refer to this thread for mor information why Turbo C++ is a bad idea : Why not to use Turbo C++ http : stackoverflow.com questions 1961828 why-not-to-use-turbo-c Comment : Thanks a lot However my book still claims otherwise . Also CBSE has a weird liking for old software : VB6 TC++ Office 2003 Windows XP and the list goes on I always use VS Community 15 or g++ for my learning at home but convert it into TC++ in VMware before showing then to my teachers . I know it but this won t change soon . Many Indians literally relearn everything at work . Unfortunately this is the way it is .", "Question : I would like to get a compiler error in case I pass a float number to my class that expect an int in the code below . The code below runs with gcc 4.9.3 .. . .. . How should I change the code that it will return compile error in case of different in types between the class instance type and the methods input argument type Comment : Is -std c++98 a hard requirement or could you use any higher standard Some sort of typename std : : enable-if -magic should do the trick but I m not sure if it s available in C++98 . Comment : @Kent i could use until C++03 standard . Unfortunately my embedded compiler does not support more then that . .. . Answer : For c++98 : .. . .. . One way to achieve what you want of requiring an exact match is to have a template method which accepts any type but always fails due to SFINAE : .. . .. . For c++11 : .. . .. . You can use a deleted method to achieve the same effect more cleanly :", "Question : I would like to get a compiler error in case I pass a float number to my class that expect an int in the code below . The code below runs with gcc 4.9.3 .. . .. . How should I change the code that it will return compile error in case of different in types between the class instance type and the methods input argument type Comment : Is -std c++98 a hard requirement or could you use any higher standard Some sort of typename std : : enable-if -magic should do the trick but I m not sure if it s available in C++98 . Comment : @Kent i could use until C++03 standard . Unfortunately my embedded compiler does not support more then that . .. . Answer : This effect is better achieved if you just leave common template class just declared but not defined and specialize template class definition for float . I would try to play around something like type lists.. .", "Question : This code compiles Visual Studio 2013 . Note that I pass in Set not Set T as a parameter to operator in the function body which is outside the class definition . But I can t return Set or have it be a member of Set it must return Set T and be a member of Set T . Where is it legitimate to leave out the template parameters Inside the class definition http : stackoverflow.com questions 16938480 is-it-necessary-to-use-template-parameters-to-refer-to-same-class-inside-definit and where else Is this a change in the standard I m trying to maintain compatibility with all existing versions including 98 . Comment : AFAIK only classes do this since they have an injected-class-name Comment : and here : template typename T auto Set T : : operator const Set - const Set Comment : void main is invalid and would have prevented many most readers from trying out your code . I fixed that . Please don t post code with void main unless the question is specifically about that because it misleads newbie readers and makes it impossible to just copy and paste your code to try it unless one happens to be using one of the few compilers that accept it . .. . Answer : The class name is made available in the class scope . And in a separate member definition once you ve passed the C++03 return-type specification and the function name you re in class scope . Thus this is OK in C++03 : .. . .. . And this is OK in C++11 : .. . .. . .. . .. . This doesn t really have anything to do with templates but it has to do with accessing a name that s available in class scope . For example in C++03 you d have to write .. . .. . while with C++11 and later you can write .. . .. . which is one good reason among many others to adopt the trailing return-type syntax as a single syntax convention . .. . .. . This http : stackoverflow.com questions 36653459 in-template-class-member-function-body-outside-class-definition-when-are-templa 36655831 comment60904860 36653459 is not OK in either C or C++ regardless of which year s standard : Comment : Do you know if what you have here is also valid in C++98 Comment : The C++03 code is valid with C++98 compiler . The only new feature introduced in C++03 was value-initialization . C++03 was just a technical corrigendum of C++98 called TC1 at the time it was the first and only .", "Question : I would like to get a compiler error in case I pass a float number to my class that expect an int in the code below . The code below runs with gcc 4.9.3 .. . .. . How should I change the code that it will return compile error in case of different in types between the class instance type and the methods input argument type Comment : Is -std c++98 a hard requirement or could you use any higher standard Some sort of typename std : : enable-if -magic should do the trick but I m not sure if it s available in C++98 . Comment : @Kent i could use until C++03 standard . Unfortunately my embedded compiler does not support more then that . .. . Answer : It sounds like you want to use std : : is integral http : en.cppreference.com w cpp types is integral in combination with static-assert http : en.cppreference.com w c error static-assert . In whatever function or class-template you want to restrict to integers you can call : .. . .. . You might also be interested in std : : enable-if http : en.cppreference.com w cpp types enable-if or the convenience typedef enable-if t : .. . .. . You can use call static-assert with any integer constant-expression to generate a compile-time error if the expression is false . You can use enable-if to restrict the types with which a template can be instantiated also causing a compiler error if you use an invalid type . Edit : I just noticed that you re using -std c++98 . If you need to use that standard I can delete this answer . But if you can use C++11 this will be better than what you can do in earlier standards . Comment : my code should run on an embedded system that is why i would like to avoid any type of asserts Comment : Why would static asserts be a problem on an embedded system They have absolutely no run-time cost and would catch the error at compile-time . Seems like exactly what you would want for an embedded system.. . Comment : Please don t delete your answer . It is probably not useful for the original asker unless it persuades him to move into this millennium but it will probably be useful for people who search SO with a similar question . Comment : @CodyGray sorry . I thought of static-assert as an assert which stop your program on run-time . From searching a bit in the net it seems that static-assert is only from c++11 and my embedded compiler support only until c++03 standard . Comment : You can certainly simulate static assertions if C++11 is not available . Do it just like the C folks do it by conditionally declaring an array with a negative size . Of course then you ll need to emulate std : : is integral which is not just difficult just busy work .", "Question : I would like to get a compiler error in case I pass a float number to my class that expect an int in the code below . The code below runs with gcc 4.9.3 .. . .. . How should I change the code that it will return compile error in case of different in types between the class instance type and the methods input argument type Comment : Is -std c++98 a hard requirement or could you use any higher standard Some sort of typename std : : enable-if -magic should do the trick but I m not sure if it s available in C++98 . Comment : @Kent i could use until C++03 standard . Unfortunately my embedded compiler does not support more then that . .. . Answer : You can use template-specialization : .. . .. . The variable is still passed as parameter without a name because you don t need it internally . It is also still used because isFoo decltype var is better than isFoo var . .. . .. . std : : is same", "Question : I would like to get a compiler error in case I pass a float number to my class that expect an int in the code below . The code below runs with gcc 4.9.3 .. . .. . How should I change the code that it will return compile error in case of different in types between the class instance type and the methods input argument type Comment : Is -std c++98 a hard requirement or could you use any higher standard Some sort of typename std : : enable-if -magic should do the trick but I m not sure if it s available in C++98 . Comment : @Kent i could use until C++03 standard . Unfortunately my embedded compiler does not support more then that . .. . Answer : Make the member function a template member function . It opens up a few possibilities for dealing with different types . .. . .. . Use static-assert and std : : is floating-point to make sure that the function is not called using floating-point types . .. . .. . To make sure that U and T are the same type you can use std : : is same : .. . .. . .. . .. . To be able to deal with U being a derived type of T you can use : Comment : @CodyGray I noticed the error right after I posted the answer . It s fixed now .", "Question : In a template class with two instantiation types T and PT I currently have the following line for using a const-iterator for the class : .. . .. . This works in a C++11 14 environment however when compiling in a C++98 environment which may unfortunately be required for various reasons I get the error shown in the title expected nested name specifier before typedef . Is there any way I can resolve this issue for old compilers EDIT : Here is the basic structure of my class Comment : How does your template class look like Comment : Show a minimal complete example . Comment : Your example compiles cleanly in several compiler versions here besides missing after const-iterator . Comment : Are you including vector and utility before the class definition Comment : Yes there is no guarantee that utility required for std : : pair is included in any of the other standard headers . So the compiler you use for the C++98 build could require it to compile correctly . .. . Answer : Are you including vector and utility before the class definition You need to include what you use http : stackoverflow.com q 26611481 3747990 to avoid cross compilation issues . There is no guarantee that utility required for std : : pair or vector are included in any of the other standard headers . As noted in the comments . .. . .. . So the compiler you use for the C++98 build could require it to compile correctly .", "Question : I m in front of this and will have to deal with C++98 possibly C++03 and C++11 : .. . .. . I tried this : .. . .. . And of course it works but I m not sure wether this creates or not a memory leak . What does this code exacty do in the computer memory If I can t do this do I have any other solutions than to overload my function Comment : Take const ref if you can that d allow you to take a temporary . If you can t take a global variable as default param . If you can t take an optional ref as input . Comment : Make an overload don t allocate anything . See this http : stackoverflow.com questions 1059630 default-value-to-a-parameter-while-passing-by-reference-in-c . Of course it s leaking . Comment : More on const references here http : stackoverflow.com q 2784262 1460794 Comment : Yes . It leaks memory . Comment : Maybe rvalue-reference would suit your needs type1 myfunc type2 var type2 .. . .. . Answer : The question is tagged C++11 so I suppose you can use std : : unique-ptr to solve this problem . A little example .. . .. . Hoping this helps . --- added C++98 C++03 solution --- .. . .. . Isn t clear what language the OP want to use . In case of C++98 C++03 it s possible to use std : : auto-ptr instead of the C++11 std : : unique-ptr . I remember that std : : auto-ptr is deprecated from C++11 so use it only if you can t use C++11 or a newer standard .. . .. . The following example should be C++98 compliant I ve removed the const too Comment : @BenjaminLindley - are you sure Comment : @BenjaminLindley : No it doesn t see e.g . cpp.sh 3helx http : cpp.sh 3helx Comment : @NicolBolas : You sure According to my example this also works with non-const reference not saying it is a particular good solution Comment : @max66 : No my mistake . I forgot that the initialization expression happens within the context of the calling function . Comment : If this could be proven to be a reliable solution without const then it would be very interesting . I m curious to learn what the standard says about the lifetime of objects declared this way .", "Question : With Mingw 4.7.2 I have a library that doesn t compile because of a call to isnan . The compiler says everything will be fine if I use std : : isnan and indeed I manage to compile my file . But if I check here http : www.cplusplus.com reference cmath isnan Edit : but maybe I should have checked also here http : en.cppreference.com w cpp numeric math isnan : - the std : : doesn t seem to be necessary . If I add it will the file be portable More in general for each case is there a general way to understand when putting std : : is necessary for portability optional or to be avoided Edit .. . .. . Indeed among the origins of the problem is that there are multiple header inclusions and some of the included headers include cmath while this cpp file tries to include math.h when cmath has already been included . Comment : Don t check there check here http : en.cppreference.com w cpp numeric math isnan . Comment : @ChristianRau So basically in C++98 this did not exist and one could have it only by borrowing it from C That s interesting Comment : No it has always been the way it is . That link merely should show you that there is a big std : : in front of the function name . By coincidence that particular function isnan is only supported with C++11 and didn t exist in C++98 at all not even in the C header which was the C89 90 header and not the C99 header that C++11 uses . So in one way you could borrow it from C but not from the C included with C++ but from an actual C99 though that s ought to be a strange mix then . .. . Answer : It depends on which header you include . If you include the C header math.h which is part of C++ albeit marked as deprecated then you can use the unqualified C functions like isnan . If you on the other hand include the C++ header cmath you are only guaranteed that it brings all the functions from math.h into the std namespace and thus you have to properly qualify them like std : : isnan or use some kind of using directive . Unfortunately an implementation is allowed but not required to bring those functions into the global namespace too when including cmath and thus it is one of the many works on my machine -incidences of C++ and the reason why many people write code like you just tried to compile unsuccessfully . So to sum up : Either include math.h and use isnan or include cmath and use std : : isnan everything else is non-portable . Of course all this applies to any other C header and its respective C++ version too . EDIT : It should be noted though that this particular function isnan is only supported since C++11 and wasn t available in C++98 at all which may be part of your confusion . But this doesn t change anything in this situation because in C++98 neither cmath nor math.h which was the actual C89 C90 header back then and not the C99 header that C++11 includes had this function since they re always in-sync . So what this library from your question maybe tried was to use C++98 while taking the isnan function from a different C99 implementation which isn t a particularly good idea as it might conflict with the C89 C90 parts of the C++ implementation never even tried this though . Comment : So math.h is deprecated In C++98 one should use only cmath then And to have code that works both in C++98 and C++11 would be possible Comment : @Antonio This whole problem doesn t have anything to do with C++98 vs C++11 . It has always been like described in my answer no matter what C++ standard . And yeah the C headers are called deprecated but in practice that doesn t really mean much and it is rather a matter of taste which one you use I for myself being quite an anti-C snob and a big fan of spamming std : : all over the place prefer the C++ headers though . But you should stay consistent of course otherwise you happen to experience such stangeties like you actually did . Comment : this was written before your comment Looking at Christian Rau comment link above : isnan of cmath shouldn t even be there in C++98.. . And the only isnan for C++98 would be in the deprecated math.h which must be called without std : : . So to be portable is.. . impossible : unless putting some cumbersome conditional compiling . Comment : Regarding your comment : so is cmath what you call a C or C++ header Comment : @Antonio Like written in the answer cmath is the C++ header while math.h is the C header included with the C++ library .", "Question : I want to make a template function that takes a function and a vector and uses the function to map that vector to another vector that will be returned by the function template . If the function taken as an argument is a free function it may have one of two signatures . It may also be a function object in which operator would behave like the free functions . Use of the function template for any of the 4 possibilities should be transparent . I asked how to do this for C++11 and got a great answer from 0x499602D2 . Overload function template based on function object operator signature http : stackoverflow.com questions 27321959 overload-function-template-based-on-function-object-operator-signature .. . .. . 0x499602D2 s answer makes use of the fact that these are two distinct template signatures in C++11 : .. . .. . I would also like to know how to solve this in C++98 . Here is my effort so far . I have a SFINAE struct that can determine if a function objects takes two args . I don t know how to get this working for both function objects and free functions . Either I need to change the SFINAE struct to work on both function objects and free functions or I need to use overloading to route function objects and free functions separately . http : coliru.stacked-crooked.com a 1471088cbc3b8544 Comment : Solving this for C++98 indicates an older compiler version . The problem is that older compiler versions often merely support expression SFINAE - partly because name-mangling wasn t supporting that stuff a couple of years ago . Try to put the expression into a partial specialization template argument list to avoid at least that . Comment : I just mean the C++98 standard not the compilers of the era . g++ 4.9 with -std c++98 is fine . Comment : So what exactly is the point of putting g++ 4.9 in that mode I.e . what s the practical relevance of creating a solution that only works for compiler versions which support a newer standard with which we could compose a better solution Comment : You can think of C++98 and C++11 as separate but related languages . The job may call for one or the other but you almost always want the implementation to be up to-date and as correct as possible . Comment : Nonsense . C++11 is an improved version of C++98 . If you can use it do so . .. . Answer : Here s my approach : .. . .. . It works with the same Demo that 0x499602D2 used http : coliru.stacked-crooked.com a d578d4dc54e4c8be with both GCC and Clang in C++98 mode . Comment : Could you briefly explain the declval part Comment : I think I get declval F but why is it used on T and std : : vector too Comment : @Praxeolitic Because we don t want to a Unnecessarily require a default constructor for T b Don t want to restrict our set of accepted F s to ones that can accept a temporary vector as the second argument . Comment : Are you sure about b If I change declval const std : : vector T to std : : vector T all seems well . I tried with functions that take as value const value and const ref and they all compiled . Comment : @Praxeolitic Convoluted counterexample for C++98 http : coliru.stacked-crooked.com a 991e6b79b14731e5 . Or for C++11 in case the code might be ported : A parameter of a class type that has two non- explicit constructors : One that has a parameter of type const lvalue reference to vector and one that is deleted and has a parameter of type rvalue-reference to vector . Second demo http : coliru.stacked-crooked.com a 47018959a91b36ae ." ] }
[ "yes-answer-long", "yes-answer-short" ]
c++
UNK_RELATION
ruby-1.9.2@ruby@52
ruby-1 .9.2 -- for issues relating to developing in @placeholder version 1.9.2 .
{ "confidence": [ 61.14888000488281, 50.48951721191406, 37.11636734008789, 36.337158203125, 36.25040054321289, 34.329551696777344, 33.39864730834961, 32.99981689453125, 32.433197021484375, 31.94449806213379, 31.94449806213379, 31.554073333740234, 31.247270584106445, 31.226076126098633, 31.226076126098633, 31.226076126098633, 30.491580963134766, 30.368803024291992, 30.222476959228516, 30.20166015625, 30.20166015625, 30.20166015625, 30.07686424255371, 30.066669464111328, 29.761131286621094, 29.2248592376709, 29.2248592376709, 29.2248592376709, 28.955318450927734, 28.867895126342773, 28.715087890625, 28.715087890625, 28.500009536743164, 28.299633026123047, 28.299633026123047, 28.157230377197266, 28.029088973999023, 28.029088973999023, 28.029088973999023, 28.029088973999023, 27.9061336517334, 27.874540328979492, 27.538692474365234, 27.32269287109375, 26.975181579589844, 26.85638427734375, 26.845483779907227, 26.845483779907227, 26.845483779907227, 26.823467254638672, 26.71613311767578, 26.508586883544922, 26.508586883544922, 26.40913200378418, 26.349063873291016, 25.851694107055664, 25.851694107055664, 25.646411895751953, 25.303022384643555, 25.26198387145996, 25.102645874023438, 25.102645874023438, 25.102645874023438, 25.102645874023438, 25.088619232177734, 25.0544376373291, 24.702795028686523, 24.61310577392578, 24.541858673095703, 24.50255012512207, 24.397544860839844, 24.370262145996094, 24.341705322265625, 24.18136978149414, 24.12748146057129, 23.9886474609375, 23.745559692382812, 23.745559692382812, 23.68497085571289, 23.621692657470703, 23.621692657470703, 23.61452865600586, 23.53162956237793, 23.331262588500977, 23.311599731445312, 23.311599731445312, 23.311599731445312, 23.311599731445312, 23.058216094970703, 23.058216094970703, 23.058216094970703, 23.04840087890625, 23.03960418701172, 22.96503257751465, 22.923608779907227, 22.916292190551758, 22.77751922607422, 22.77751922607422, 22.718017578125 ], "content": [ "Ruby version 1.9.2", "Is anyone using COuchrest 1.0.1 with ruby version 1.9.2 or similar .", "Ruby 1.9.2 .. . .. . Ruby 1.9.3 .. . .. . And the diff is : .. . .. .", "Ruby 1.9.2", "I am facing issues when making a call to Db using the CouchRest Db when on ruby-1.9.2 . the same calls work with ruby version 1.8.7 .", "As it is mandatory for me to run the application on Ruby 1.9.2 MRI version .", "I m running Ruby 1.9.2 if that makes any difference .", "Using ruby 1.9.2-p290 .", "Also you tagged Ruby 1.9.2 and Ruby 1.8.7 .", "What zip libraries work well with Ruby 1.9.2", "I am using ruby 1.9.2-p290 and RubyMine .", "I tried to install oj ruby gem .. . .. . Here s the output log C : Ruby192 bin ruby.exe extconf.rb .. . .. . Creating Makefile for ruby version 1.9.2 creating Makefile .. . .. . I am running windows-7 x64 ruby 1.92 rails 3.1 .", "C encryption .. . .. . Ruby decryption .. . .. . I am currently using Ruby 1.9.2 but can use whatever version necessary .", "i m interested in updating code which is written in ruby v 1.8.6 to 1.9.2 .", "Here is code I know works against Ruby 1.9.2 with Rails 3.0.1", "I want to port a rails app from Ruby 1.8.7 to 1.9.2 .", "There is a parse line method of csv but that doesn t work in ruby-1.9.2 . .. . .. . Please suggest some solution .", "I want to install ruby-1.8.7 and uninstall ruby-1.9.2 from main .", "Given a file test with the contents hello : .. . .. . Ruby 1.9.3p484 : .. . .. . Ruby 1.9.2p320 .. . .. . It seems like Ruby 1.9.2 and 1.9.3 differ in their way of handling optional args to File.read .", "I have 1.9.2 Ruby installed in RVM .", "I m on ruby 1.9.2-p0 rvm ubuntu10.10 64bit .", "Downgrading to ruby 1.9.2-p290 fixed it for me .", "According to the docs http : www.ruby-doc.org core-1.9.2 IO.html method-c-read I believe the example below with Ruby 1.9.2 should work in the same way as Ruby 1.9.3 but it doesn t .", "Tried to solve the problem particularly with rubycas-server which is based on sinatara .. . .. . Getting this error when running rubycas-server .. . .. . rubycas-server usr local rvm rubies ruby-1.9.2-p290 lib ruby-1.9.1 psych.rb : 148 : in parse : couldn t parse YAML at line 167 column 2 Psych : : SyntaxError from usr local rvm rubies ruby-1.9.2-p290 lib ruby-1.9.1 psych.rb : 148 : in parse stream from usr local rvm rubies ruby-1.9.2-p290 lib ruby-1.9.1 psych.rb : 119 : in parse from usr local rvm rubies ruby-1.9.2-p290 lib ruby-1.9.1 psych.rb : 106 : in load from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 134 : in load config file from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 279 : in block in from usr local rvm gems ruby-1.9.2-p290 gems sinatra-1.3.2 lib sinatra base.rb : 1273 : in configure from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 278 : in from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 12 : in module : CASServer from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 11 : in from usr local rvm rubies ruby-1.9.2-p290 lib ruby site ruby-1.9.1 rubygems custom require.rb : 36 : in require from usr local rvm rubies ruby-1.9.2-p290 lib ruby site ruby-1.9.1 rubygems custom require.rb : 36 : in require from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver.rb : 10 : in top required from usr local rvm rubies ruby-1.9.2-p290 lib ruby site ruby-1.9.1 rubygems custom require.rb : 36 : in require from usr local rvm rubies ruby-1.9.2-p290 lib ruby site ruby-1.9.1 rubygems custom require.rb : 36 : in require from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 bin rubycas-server : 30 : in from usr local rvm gems ruby-1.9.2-p290 bin rubycas-server : 19 : in load from usr local rvm gems ruby-1.9.2-p290 bin rubycas-server : 19 : in .. . .. . I found this solution : .. . .. . YAML : : ENGINE.yamler syck .. . .. . But this also dosent work if someone already tried this thing and found the solution please let me know .. . .. . Thanks", "But the prompt says ruby-1.9.2-p180", "I used the rubyzip gem in Ruby 1.8.7 before but I heard rubyzip doesn t work well with ruby-1.9.2 .", "In Settingslogic fork https : github.com siliconsalad settingslogic allowing array as source in ruby-1.8.7 everything is working but in ruby-1.9.2 there is an error .", "I just don t get why .. . @section in this code was ok in ruby-1.8 and it s not working in ruby 1.9.2.. .", "Apparently that depends on the ruby version .", "I ve decided to get rid of rvm and I m having trouble compiling a gem with my new version of ruby-1.9.2 .", "Just run rvm use 1.9.2 when you want to switch back to Ruby 1.9.2 .", "I have setup Rails 3.0.3 and installed Ruby 1.9.2 with rvm and set rvm to use 1.9.2 by default .", "Is it a bug in 1.9.2", "Checking out the documentation http : ruby-doc.org core-1.9.2 Kernel.html method-i-require relative I found require relative .", "So I recently upgraded to 1.9.2 Ruby having used 1.8.7 for forever I wanted to try out Rails 3 .", "file BigDecimal.rb : .. . .. . Then in file test.rb : .. . .. . Ruby 1.9.2", "There is a weird issue with Ruby 1.9.2 s new hash syntax .", "I currently have a Rails 3.0 project with Ruby 1.9.2 and Resque .", "FYI The taps gem does not work for me with ruby 1.9.2-p290 .", "Do .rvm bin ruby-1.9.2-p320 usr bin heroku db : push", "You did correctly set the default ruby version : rvm --default use 1.9.2 .. . .. . However you need to update your Gemfile to the target ruby because RVM references that file to select the working ruby version when you open terminal that s why it reverted to the previous ruby version .", "I had a similar issue and traced back the issue and solved it as follows : .. . .. . The root of the issue is that in the gem installer.rb file the passed required ruby version from linecache19 is 1.9.2 while the Gem.ruby version is something like 1.9.2.dev.30909 and 1.9.2 1.9.2.dev.30909 is false .", "Works in both 1.9.2 and 2.1.2 .", "I guess oniguruma is default library in ruby-1.9.2 so we dont have to use require oniguruma in the environment file but it gives me an error on my oniguruma syntax so can some help to let me know the procedure to use oniguruma in ruby-1.9.2", "The Heroku settings for 1.9.2 and 1.9.3 seem to be the same GEM PATH : vendor bundle ruby-1.9.1 PATH : bin : vendor bundle ruby-1.9.1 bin : usr local bin : usr bin : bin Check devcenter.heroku.com articles changing-ruby-version-breaks-path https : devcenter.heroku.com articles changing-ruby-version-breaks-path", "I do the following : .. . .. . rvm --default use 1.9.2 and I get : .. . .. . Using home md .rvm gems ruby-1.9.2-p180 so that is good .", "It is A fork of ruby-debug 19 that works on 1.9.2 and 1.9.3 and installs easily for rvm rbenv rubies .", "That command will walk through each 1.9.2 ruby returned from the ls . . command and apply your rvm command to each of them .", "Can anyone please let me know that how to run the application using Ruby 1.9.2 .", "It still appears to be using 1.9.2 according to the console prompt and bundle exec ruby version .", "I have used Oniguruma in Ruby 1.8.7 to parse my regular expressions but now i am moving to Ruby 1.9.2 and can someone please tell me what are the changes that needs to be done .", "It seems like Ruby 1.9.2 also expects the offset if you specify the length in related news I can also reproduce this on 1.9.2p320 but not on 1.9.3p484 .", "The documentation http : ruby-doc.org core-1.9.2 Kernel.html method-i-require indicates that require is not intended to search relative paths at all and neither is load .", "If you rvm use 1.9.2 you don t need to do anything special to have commands execute in the context of Ruby 1.9.2--RVM sets up the environment when you run use .", "Thanks for such fast reply And few other things i also need to ask i have nt mentioned require oniguruma in my environment file because its an inbuilt library in ruby-1.9.2 and i mentioned in ruby-1.8.7 and is there any specific change that i need to make the code written in ruby-1.8.7 and i am now i am moving to ruby-1.9.2", "Verify that all the gems you depend on are 1.9.2 compatible .", "@FrankSchmitt it have to be reproduced on 1.9.2 I believe", "I m new to Ruby and starting out with Ruby on Rails 3 Tutorial so I downloaded RVM and then ran the command rvm install 1.9.2 .", "1.9.2 hash : .. . .. . but", "I am having a problem with installing linecache19 dependency of ruby-debug19 for ruby-1.9.2 .. . .. . Here is my term output .. . .. . The last command hangs forever until interrupted with C .", "@Meltemi it will be under specifications directory this is my specifications directory path - home sayuj .rvm gems ruby-1.9.2-p180 specifications", "Rvm exists for this very reason - you don t need to remove ruby-1.9.2 to add 1.8.7 .", "Apparently this used to work on ruby-1.8.7 but unfortunately not on 1.9.2 .. . .. . It returns .. . .. . Any idea on how to get this working", "What does the file Users richardberger .rvm log ruby-1.9.2-p290 configure.log content", "Do you have another version installed other than 1.9.2 including the system default", "seems right is there any more info in Users mark .rvm log ruby-1.9.2-p290 .log as to what file could not be writtten", "With a clean install of xcode 4.2 you may install ruby-1.9.2 via rvm though it is unsupported and may cause issues with some native gems by using this command : .. . .. . This was noted on rvm issues list here : .. . .. . https : github.com wayneeseguin rvm issues 610", "so first become sure that ruby version is 1.9.2 : .. . .. . then manually use --force to bypass version check : .. . .. . if you faced with another error starting with following lines : .. . .. . You have to explicitly set the source path to vm core.h .. . .. . In my case : .. . .. . so to install linecache19 : .. . .. . ruby-debug19 has a similar issue : .. . .. . That s all", "But since @slapthelownote stated he was using 1.9.2 you stand correct .", "But when I try to install Ruby 1.9.2 it s giving me following error : .. . .. . Following is the content of make.log file : .. . .. . Can anyone tell me what I am doing wrong .", "Have you actually tried using rubyzip with 1.9.2", "I found zip http : rubygems.org gems zip it says it s compatible with 1.9.1 I don t think it would have any issues in 1.9.2", "rvm use 1.9.2 .", "For Ruby 1.9.x you need to use version 0.9.5 or higher .", "I have found this post http : stackoverflow.com questions 21574 what-is-the-difference-between-ruby-1-8-and-ruby-1-9 incredibly helpful .", "After upgrading my rails app from Ruby 1.9.2 to 1.9.3 I m getting an CSV : : MalformedCSVError : Missing or stray quote in line 1 error .", "You might want to try backporting the patch http : www.rubyinside.com get-edge-ruby-faster-loading-ruby-1-9-2-now-4973.html to your 1.9.2 install and see if that helps .", "This has been fixed in 1.9.3 so try upgrading to that or backporting the load patch to 1.9.2 http : www.rubyinside.com get-edge-ruby-faster-loading-ruby-1-9-2-now-4973.html .", "This is awkward Ruby .", "Locally I am using 1.9.2 .", "However I m on Heroku and they use 1.9.2 .", "This might be related to the ruby-1.9.3 issues spoken about at the above link not sure .", "The solution I found using hints from https : github.com ricardochimal taps issues 92 is detailed here : https : github.com ricardochimal taps issues 92 issuecomment-6486535 .. . .. . The short of it is that ruby 1.9.2-p320 seems to have been the problem as far as I can tell .", "https : rubygems.org gems soap4r-ruby1.9 .. . .. . gem install soap4r-ruby1.9 .. . .. . This gem solved most of my soap related issues with ruby-1.9", "I use Ubuntu 11.10 and ruby-1.9.2 .. . .. . I can not install thrift gem on my machine .. . .. . What went wrong and how to fix", "However when I create a new rails app and check the environmental variables it still reflects ruby-1.8.7 how do I update this to 1.9.2", "I ve had a look at both ParseTree and ruby parser but they both seem to have sketchy support from what I ve read for Ruby 1.9.2 .", "It spits out a warning about ruby-1.9.2 so i built and installed 1.9.3 using I am on 10.7.2 with Xcode 4.2 .. . .. . Worked fine .", "Ruby 1.9.2 had severe regressions in load-time which I believe grew exponentially with the number of files loaded .", "I m using ruby-1.9.2 .. . .. . Now I have to find anyword .. . .. . How many times it will come and the name with curly-braces .", "I am using Ruby 1.9.2 Rails 3.0.4 3.0.5 and Phusion Passenger 3.0.3 3.0.4 .", "i upgraded from Ruby 1.8.7 to 1.9.2 and Rails 3.2.2 and have the problem that Net : : FTP gettextfile is throwing an Encoding : : UndefinedConversionError .. . .. . I m trying to download a xml file which is encoded as utf-8 .", "Links like this one https : support.cloud.engineyard.com entries 21016488-migrate-to-ruby-1-9-2 are mostly not helpful .", "Ad 1 I know the documentation says that is a public instance method reality in 1.9.2 does not seem to match that : .. . .. . I see two ways around this .", "EDIT : The BOM breaks the Ruby 1.8.7 parser giving a syntax-error unexpected kEND expecting end SyntaxError for the file .. . .. . I tried forcing the external encoding with ruby -Eutf-8 : utf-8 but this seems to be ignored when calling rake I tried : home malte .rvm gems ruby-1.9.2-p180 bin rake test .", "Have you checked ruby --version", "It is not clear to me from the documentation and the C code why this would be required on 1.9.2 but it shouldn t be too big a problem here .", "You can just use pass the offset as nil and it will work fine on 1.9.3 and 1.9.2 .", "gem ruby-debug19 : require ruby-debug ." ] }
{ "confidence": [ 52.96302032470703, 47.16679000854492, 43.554588317871094, 42.974815368652344, 36.760379791259766, 36.32038879394531, 36.177162170410156, 36.08699417114258, 35.68609619140625, 35.24143981933594, 35.188514709472656, 34.63259506225586, 34.61042785644531, 34.50587463378906, 33.87612533569336, 33.770545959472656, 33.4637565612793, 33.31901168823242, 32.91697692871094, 32.802024841308594 ], "content": [ "Question : I am facing issues when making a call to Db using the CouchRest Db when on ruby-1.9.2 . the same calls work with ruby version 1.8.7 . Is anyone using COuchrest 1.0.1 with ruby version 1.9.2 or similar . The error I am getting is - .. . .. . Thanks . .. . Answer : Finally got this working . There is no compatibility issue the issue was related to not being able to send database name in query . Comment : I m having a similar problem . Can you be more specific gist.github.com 2862111 https : gist.github.com 2862111", "Question : loadee.rb .. . .. . loaddemo.rb .. . .. . When I run ruby loaddemo.rb This works fine . Both files are in the same directory and that s the directory I run from . But if I change the load to a require and with or without the extension I get : .. . .. . My question is of course why isn t require working in this case It should right Do load and require use different paths Ruby version 1.9.2 .. . Answer : Providing a path with the filename seemed not to work for me and I didn t want to cram a bunch of paths into my LOAD PATH . Checking out the documentation http : ruby-doc.org core-1.9.2 Kernel.html method-i-require relative I found require relative . Works in both 1.9.2 and 2.1.2 . The documentation http : ruby-doc.org core-1.9.2 Kernel.html method-i-require indicates that require is not intended to search relative paths at all and neither is load .", "Question : loadee.rb .. . .. . loaddemo.rb .. . .. . When I run ruby loaddemo.rb This works fine . Both files are in the same directory and that s the directory I run from . But if I change the load to a require and with or without the extension I get : .. . .. . My question is of course why isn t require working in this case It should right Do load and require use different paths Ruby version 1.9.2 .. . Answer : If you provide just a filename to require it will only look in the predefined LOAD PATH directories . However if you provide a path with your filename it should work : .. . .. . You could also add your project s folder to the load path instead : .. . .. . And last you could just use require relative instead : Comment : So why does load work without the path Does it use a different path variable Comment : This is actually listed as a bug for ruby right now . 1.9 removed the current directory from the load path when using require but not for load . redmine.ruby-lang.org issues 2710 http : redmine.ruby-lang.org issues 2710 Comment : Also keep in mind that every time you use load it evaluates the entire file whereas using require only evaluates the file the first time you require it .", "Question : I tried to install oj ruby gem .. . .. . Here s the output log C : Ruby192 bin ruby.exe extconf.rb .. . .. . Creating Makefile for ruby version 1.9.2 creating Makefile .. . .. . I am running windows-7 x64 ruby 1.92 rails 3.1 . Any idea how can I install the oj gem Thanks .. . Answer : New release from OJ fixed the windows problems . I installed OJ 1.4.3", "Question : I used the rubyzip gem in Ruby 1.8.7 before but I heard rubyzip doesn t work well with ruby-1.9.2 . What zip libraries work well with Ruby 1.9.2 .. . Answer : I found zip http : rubygems.org gems zip it says it s compatible with 1.9.1 I don t think it would have any issues in 1.9.2", "Question : I have gotten the following errors using ruby 1.9.2-p320 with Heroku s Taps-using db commands such as : .. . .. . Which produces errors like : .. . .. . -or- .. . .. . And yes btw I have all the correct gems including both postgres--running fine locally--and sqlite3 as well as having uninstalled re-installed and updated the taps heroku gems and including them as well as not including them in my Gemfile . I m running Rails 3.2.6 .. . .. . Although there is a known bug that results in a time zone displacement error : heroku db : push not working using taps gem http : stackoverflow.com questions 10472728 heroku-dbpush-not-working-using-taps-gem rq 1 I have not seen any SO posts that directly address this issue . .. . Answer : The solution I found using hints from https : github.com ricardochimal taps issues 92 is detailed here : https : github.com ricardochimal taps issues 92 issuecomment-6486535 .. . .. . The short of it is that ruby 1.9.2-p320 seems to have been the problem as far as I can tell . Downgrading to ruby 1.9.2-p290 fixed it for me . This might be related to the ruby-1.9.3 issues spoken about at the above link not sure . If you are still hanging in there with Taps please see this comment at GH https : github.com ricardochimal taps issues 92 issuecomment-11996909 as the poster doshea seems to have looked into it even more thoroughly than I or jfeust have . I ll also reiterate here that if you don t need Taps then heroku-pgtransfer is your friend . See Ryan s answer to my question here http : stackoverflow.com a 11145211 492404 and his excellent blog post http : www.ryandaigle.com a pgtransfer-is-the-new-taps on using the newer tool . Comment : FYI The taps gem does not work for me with ruby 1.9.2-p290 . I get the error Taps Load Error : no such file to load -- taps operation . Comment : Taps began working for me by using the same Ruby versions on both Heroku and locally . See my GH comment https : github.com ricardochimal taps issues 92 issuecomment-6486535 : I would suggest you try : heroku run ruby -v and see what version Heroku is running and then update your local one to match . No guarantees but that seems to be what did it for me again guessing perhaps at fault is Ruby s argument marshalling http : stackoverflow.com questions 8151571 error-when-pushing-data-to-heroku-time-zone-displacement-out-of-range . Also see jfeust s comment at GH on Heroku toolbelt . Comment : Do .rvm bin ruby-1.9.2-p320 usr bin heroku db : push", "Question : I am having a problem with installing linecache19 dependency of ruby-debug19 for ruby-1.9.2 .. . .. . Here is my term output .. . .. . The last command hangs forever until interrupted with C . Any ideas how to fix that .. . Answer : rvm exec attempts to run the given command over every version of Ruby installed http : beginrescueend.com set exec . Do you have another version installed other than 1.9.2 including the system default If so it s likely this version that s failing . If you rvm use 1.9.2 you don t need to do anything special to have commands execute in the context of Ruby 1.9.2--RVM sets up the environment when you run use . Just do a gem install linecache19 --backtrace .", "Question : If I run the following code the first two lines return what I expect . The third however returns a binary representation of 2 . I know that passing in 2 when calling to s will convert my output to binary but why is to s ignoring the in the third case I m running Ruby 1.9.2 if that makes any difference . Comment : My guess would be that Ruby interprets the as a splat operator . Comment : This is awkward Ruby . .. . Answer : In the third line you re calling the to s method with the splat of 2 which evaluates to 2 in a method call and hence returns the number in a different base http : www.ruby-doc.org core-1.9.2 Fixnum.html method-i-to s . Comment : Umm splat of 2 is actually 2 see my recent edit . Comment : Apparently that depends on the ruby version . The result-of a 2 is different from ruby-1.8.7 to 1.9 . But since @slapthelownote stated he was using 1.9.2 you stand correct .", "Question : Tried to solve the problem particularly with rubycas-server which is based on sinatara .. . .. . Getting this error when running rubycas-server .. . .. . rubycas-server usr local rvm rubies ruby-1.9.2-p290 lib ruby-1.9.1 psych.rb : 148 : in parse : couldn t parse YAML at line 167 column 2 Psych : : SyntaxError from usr local rvm rubies ruby-1.9.2-p290 lib ruby-1.9.1 psych.rb : 148 : in parse stream from usr local rvm rubies ruby-1.9.2-p290 lib ruby-1.9.1 psych.rb : 119 : in parse from usr local rvm rubies ruby-1.9.2-p290 lib ruby-1.9.1 psych.rb : 106 : in load from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 134 : in load config file from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 279 : in block in from usr local rvm gems ruby-1.9.2-p290 gems sinatra-1.3.2 lib sinatra base.rb : 1273 : in configure from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 278 : in from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 12 : in module : CASServer from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver server.rb : 11 : in from usr local rvm rubies ruby-1.9.2-p290 lib ruby site ruby-1.9.1 rubygems custom require.rb : 36 : in require from usr local rvm rubies ruby-1.9.2-p290 lib ruby site ruby-1.9.1 rubygems custom require.rb : 36 : in require from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 lib casserver.rb : 10 : in top required from usr local rvm rubies ruby-1.9.2-p290 lib ruby site ruby-1.9.1 rubygems custom require.rb : 36 : in require from usr local rvm rubies ruby-1.9.2-p290 lib ruby site ruby-1.9.1 rubygems custom require.rb : 36 : in require from usr local rvm gems ruby-1.9.2-p290 gems rubycas-server-1.0.1 bin rubycas-server : 30 : in from usr local rvm gems ruby-1.9.2-p290 bin rubycas-server : 19 : in load from usr local rvm gems ruby-1.9.2-p290 bin rubycas-server : 19 : in .. . .. . I found this solution : .. . .. . YAML : : ENGINE.yamler syck .. . .. . But this also dosent work if someone already tried this thing and found the solution please let me know .. . .. . Thanks .. . Answer : I solved the problem my etc rubycas-server config.yml had no spaces between some hashes one i did that and validated my yaml all works.. .", "Question : I ve decided to get rid of rvm and I m having trouble compiling a gem with my new version of ruby-1.9.2 . The gem requires 1.9.2 I have it yet says it can t install without so the error messages makes no sense . How can I explicitly tell the gem to compile with said version of ruby .. . Answer : I had a similar issue and traced back the issue and solved it as follows : .. . .. . The root of the issue is that in the gem installer.rb file the passed required ruby version from linecache19 is 1.9.2 while the Gem.ruby version is something like 1.9.2.dev.30909 and 1.9.2 1.9.2.dev.30909 is false . so first become sure that ruby version is 1.9.2 : .. . .. . then manually use --force to bypass version check : .. . .. . if you faced with another error starting with following lines : .. . .. . You have to explicitly set the source path to vm core.h .. . .. . In my case : .. . .. . so to install linecache19 : .. . .. . ruby-debug19 has a similar issue : .. . .. . That s all Comment : Worked for me Thanks", "Question : I used the rubyzip gem in Ruby 1.8.7 before but I heard rubyzip doesn t work well with ruby-1.9.2 . What zip libraries work well with Ruby 1.9.2 .. . Answer : I used rubyzip gem in Ruby 1.8.7 also . For Ruby 1.9.x you need to use version 0.9.5 or higher . Works without any problems .", "Question : According to the docs http : www.ruby-doc.org core-1.9.2 IO.html method-c-read I believe the example below with Ruby 1.9.2 should work in the same way as Ruby 1.9.3 but it doesn t . Given a file test with the contents hello : .. . .. . Ruby 1.9.3p484 : .. . .. . Ruby 1.9.2p320 .. . .. . It seems like Ruby 1.9.2 and 1.9.3 differ in their way of handling optional args to File.read . Why I cannot figure out where it s stated that this change was made . Comment : FWIW I cannot reproduce this Ruby 1.9.3p286 i386-cygwin Ruby 1.9.3p125 i386-mingw32 Comment : @FrankSchmitt it have to be reproduced on 1.9.2 I believe Comment : @ You re right of course . Apparently I was somewhat confused : - Comment : I don t have 1.9.2 installed anywhere to confirm but I suspect you ll see the problem go away if you use parenthesis around your parameters . While parenthesis are optional they re very important especially when dealing with multiple params and even more so with blocks . I recommend always using them to remove any ambiguity but YMMV . Comment : @theTinMan It s not a syntax or ambiguity issue . I can reproduce this too when removing any ambiguity with parenthesis . Merely it seems to be an issue of properly parsing the options hash from the arguments list . .. . Answer : It seems like Ruby 1.9.2 also expects the offset if you specify the length in related news I can also reproduce this on 1.9.2p320 but not on 1.9.3p484 . It is not clear to me from the documentation and the C code why this would be required on 1.9.2 but it shouldn t be too big a problem here . You can just use pass the offset as nil and it will work fine on 1.9.3 and 1.9.2 . Comment : The method-signature read name-length offset open args has no default values so in order to pass in the open args the previous values have to precede them . 0 would probably be acceptable for the offset since the OP wants to read from the start of the file . Comment : Passing in nil or 0 would probably work but I was more interested in why this is a problem in the first place and why it apparently isn t in 1.9.3 . Is it a bug in 1.9.2", "Question : I m getting the following error when trying to install 1.9.2 with rvm .. . .. . And here is the yaml configure.log .. . .. . I m on OSX lion 10.7.2 with XCode 4.2 . I ve tried adding export CC usr bin gcc-4.2 to my bash profile but it didn t help . Has anyone else run into this I m about to go completely bald pulling my hair out for this . EDIT : Silly me I didn t have the gcc standalone installed Either way I m now getting the new errors above . Comment : This works with me on ruby-1.9.3 mac lion 10.7.2 xcode 4.2 stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues 5D 5B1 5D 1 : stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues Comment : This works with me on ruby-1.9.3 mac lion 10.7.2 xcode 4.2 stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues 5D 5B1 5D 1 : stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues .. . Answer : I just went to install rvm for the first time which worked . It spits out a warning about ruby-1.9.2 so i built and installed 1.9.3 using I am on 10.7.2 with Xcode 4.2 .. . .. . Worked fine . But heroku does not have support in cedar for 1.9.3 yet or at least they don t claim it so i really wanted to run 1.9.2 . So i tried : .. . .. . And it also worked.. . So I am not sure what happened right here . I have Xcode 4.2 installed in the default location but I also have Xcode 4.1 installed in Developer4.1 . I installed 4.2 after I renamed my 4.1 install . Hope this helps someone .", "Question : null .. . Answer : I have used Oniguruma in Ruby 1.8.7 to parse my regular expressions but now i am moving to Ruby 1.9.2 and can someone please tell me what are the changes that needs to be done . I guess oniguruma is default library in ruby-1.9.2 so we dont have to use require oniguruma in the environment file but it gives me an error on my oniguruma syntax so can some help to let me know the procedure to use oniguruma in ruby-1.9.2 Comment : No i am getting NameError Exception : uninitialized constant Document : : Oniguruma on Oniguruma : : ORegexp.new and it havent checked syntax yet Comment : Thanks for such fast reply And few other things i also need to ask i have nt mentioned require oniguruma in my environment file because its an inbuilt library in ruby-1.9.2 and i mentioned in ruby-1.8.7 and is there any specific change that i need to make the code written in ruby-1.8.7 and i am now i am moving to ruby-1.9.2 Comment : Okay there is need to change the few regular expressions as well right because its is giving me errors like Error : undefined method gsub for : . div i : Regexp etc", "Question : According to the docs http : www.ruby-doc.org core-1.9.2 IO.html method-c-read I believe the example below with Ruby 1.9.2 should work in the same way as Ruby 1.9.3 but it doesn t . Given a file test with the contents hello : .. . .. . Ruby 1.9.3p484 : .. . .. . Ruby 1.9.2p320 .. . .. . It seems like Ruby 1.9.2 and 1.9.3 differ in their way of handling optional args to File.read . Why I cannot figure out where it s stated that this change was made . Comment : FWIW I cannot reproduce this Ruby 1.9.3p286 i386-cygwin Ruby 1.9.3p125 i386-mingw32 Comment : @FrankSchmitt it have to be reproduced on 1.9.2 I believe Comment : @ You re right of course . Apparently I was somewhat confused : - Comment : I don t have 1.9.2 installed anywhere to confirm but I suspect you ll see the problem go away if you use parenthesis around your parameters . While parenthesis are optional they re very important especially when dealing with multiple params and even more so with blocks . I recommend always using them to remove any ambiguity but YMMV . Comment : @theTinMan It s not a syntax or ambiguity issue . I can reproduce this too when removing any ambiguity with parenthesis . Merely it seems to be an issue of properly parsing the options hash from the arguments list . .. . Answer : Complementing Holger Just s answer . The source code actually seems to be different . Ruby 1.9.2 .. . .. . Ruby 1.9.3 .. . .. . And the diff is : .. . .. . diff http : i.stack.imgur.com aSYQy.png .. . .. . So they are actually different .", "Question : I m getting the following error when trying to install 1.9.2 with rvm .. . .. . And here is the yaml configure.log .. . .. . I m on OSX lion 10.7.2 with XCode 4.2 . I ve tried adding export CC usr bin gcc-4.2 to my bash profile but it didn t help . Has anyone else run into this I m about to go completely bald pulling my hair out for this . EDIT : Silly me I didn t have the gcc standalone installed Either way I m now getting the new errors above . Comment : This works with me on ruby-1.9.3 mac lion 10.7.2 xcode 4.2 stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues 5D 5B1 5D 1 : stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues Comment : This works with me on ruby-1.9.3 mac lion 10.7.2 xcode 4.2 stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues 5D 5B1 5D 1 : stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues .. . Answer : With a clean install of xcode 4.2 you may install ruby-1.9.2 via rvm though it is unsupported and may cause issues with some native gems by using this command : .. . .. . This was noted on rvm issues list here : .. . .. . https : github.com wayneeseguin rvm issues 610", "Question : I used the rubyzip gem in Ruby 1.8.7 before but I heard rubyzip doesn t work well with ruby-1.9.2 . What zip libraries work well with Ruby 1.9.2 .. . Answer : Have you actually tried using rubyzip with 1.9.2 Seems to work fine for me :", "Question : My heroku deployment is crashing with following errors . The Heroku documentation for this error is to set PATH and GEM variables as described in https : devcenter.heroku.com articles changing-ruby-version-breaks-path I tried that however that too is not helping . Next I tried setting Ruby version in my Heroku app . This increased the slugsize . But app was still not up . .. . .. . Gemfile .. . .. . Pushed to Heroku .. . .. . heroku run ruby -v .. . .. . Can someone please advice .. . Answer : The error is because your path is incorrect . 1 . If you re trying to use Ruby 1.9.3 you don t need to do anything it s the default Ruby so you can remove those config vars . 2 . If you re using 1.8.7 or 1.9.2 then upgrade to 1.9.3 as it s current . 3 . If you re looking at using Ruby 2.0.0.p3 - you re on your own Comment : Thank you Neil for the response . Locally I am using 1.9.2 . The Heroku settings for 1.9.2 and 1.9.3 seem to be the same GEM PATH : vendor bundle ruby-1.9.1 PATH : bin : vendor bundle ruby-1.9.1 bin : usr local bin : usr bin : bin Check devcenter.heroku.com articles changing-ruby-version-breaks-path https : devcenter.heroku.com articles changing-ruby-version-breaks-path Comment : remove the PATH and GEM PATH config vars and try that you shouldn t need them Comment : I had vendor bundle in my slugignore for some reason . That caused the problem . Comment : Sorry to bash in on an old question but has anyone found a solution for projects running ruby 2.0.0 or higher and get the same problem", "Question : I m getting the following error when trying to install 1.9.2 with rvm .. . .. . And here is the yaml configure.log .. . .. . I m on OSX lion 10.7.2 with XCode 4.2 . I ve tried adding export CC usr bin gcc-4.2 to my bash profile but it didn t help . Has anyone else run into this I m about to go completely bald pulling my hair out for this . EDIT : Silly me I didn t have the gcc standalone installed Either way I m now getting the new errors above . Comment : This works with me on ruby-1.9.3 mac lion 10.7.2 xcode 4.2 stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues 5D 5B1 5D 1 : stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues Comment : This works with me on ruby-1.9.3 mac lion 10.7.2 xcode 4.2 stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues 5D 5B1 5D 1 : stackoverflow.com questions 8032824 http : stackoverflow.com questions 8032824 cant-install-ruby-under-lion-with-rvm-gcc-issues .. . Answer : This error has been fixed in 1.9.2-head .. . so just .. . .. . I m finding 1.9.3 isn t compatible with a lot of the libraries I use yet . This works with Xcode 4.2 .", "Question : I am having a problem with installing linecache19 dependency of ruby-debug19 for ruby-1.9.2 .. . .. . Here is my term output .. . .. . The last command hangs forever until interrupted with C . Any ideas how to fix that .. . Answer : You can even do something along the lines of .. . .. . You can then do something like this to apply the install against all your 1.9.2 rubies . That command will walk through each 1.9.2 ruby returned from the ls . . command and apply your rvm command to each of them ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ruby
UNK_RELATION
nsdocument@interface@64
nsdocument -- nsdocument is an abstract-class that defines the @placeholder for documents objects that can internally represent data displayed in windows and that can read data from and write data to files .
{ "confidence": [ 55.15005874633789, 51.453468322753906, 48.376583099365234, 46.48188018798828, 44.394676208496094, 44.24720001220703, 42.52728271484375, 42.22137451171875, 41.99634552001953, 40.700523376464844, 40.599388122558594, 40.00956344604492, 39.849609375, 39.17357635498047, 39.17357635498047, 39.12141036987305, 38.81196594238281, 38.78550720214844, 38.63552474975586, 38.432159423828125, 38.432159423828125, 38.27516174316406, 38.019691467285156, 37.89926528930664, 37.68659973144531, 37.64221954345703, 36.982818603515625, 36.94650650024414, 36.94650650024414, 36.94650650024414, 36.91547393798828, 36.91547393798828, 36.91547393798828, 36.90521240234375, 36.90521240234375, 36.90521240234375, 36.775787353515625, 36.58489227294922, 35.89223098754883, 35.89223098754883, 35.76280212402344, 35.71288299560547, 35.512508392333984, 35.512508392333984, 35.512508392333984, 34.9459114074707, 34.67814254760742, 34.67814254760742, 34.67814254760742, 34.5487174987793, 34.54632568359375, 34.49952697753906, 34.46315002441406, 34.379547119140625, 34.348365783691406, 34.20002365112305, 33.83258819580078, 33.83258819580078, 33.83258819580078, 33.83258819580078, 33.83258819580078, 33.83258819580078, 33.83258819580078, 33.80744934082031, 33.80744934082031, 33.418968200683594, 33.418968200683594, 33.418968200683594, 33.332237243652344, 33.285438537597656, 33.285438537597656, 33.285438537597656, 33.187042236328125, 33.1278076171875, 32.96186828613281, 32.829341888427734, 32.829341888427734, 32.819602966308594, 32.819602966308594, 32.819602966308594, 32.819602966308594, 32.79446792602539, 32.67574691772461, 32.20728302001953, 31.60551643371582, 31.60551643371582, 31.60551643371582, 31.60551643371582, 31.60551643371582, 31.60551643371582, 31.580379486083984, 31.580379486083984, 31.577627182006836, 31.220722198486328, 31.192378997802734, 30.711009979248047, 29.898208618164062, 29.898208618164062, 29.69377899169922, 29.69377899169922 ], "content": [ "I ve a NSDocument and it saves and read some data .", "I can not transfer the data from the viewController to NSDocument to read-write and print the simple-form and viceversa .", "By default AppKit sets NSDocumentController as the restoration class of windows controlled by NSDocument objects .", "It s not in the NSDocument dox that I read .", "I have written different parsers and different NSDocument subclasses for files with different extensions to visualize the data .", "I have a Mac Shoebox app that internally uses NSDocument objects but does not expose the concept of individual documents to the user .", "How can I force-call a NSDocument saveDocumentAs", "My NSDocument subclass using a bundle document type which uses fileWrapperOfType : error : to write data to disk .", "It gets the path to these files based on - NSDocument fileURL .", "I am using NSDocument architecture .", "Workaround .. . .. . Use a xib containing a empty NSWindow and add the view controllers from the storyboard in - NSDocument windowControllerDidLoadNib : or - NSDocument addWindowController : to the window .", "Is there some sort of read-only mode to open an NSDocument", "I m working on an NSDocument subclass .", "and your NSDocument return yes for autosavesInPlace", "Setting it in - NSDocument addWindowController : didn t work .", "In other words the object-diagram is NSDocument -- contains one -- NSMutableArray -- contains multiple -- NSObject so how do I get to NSDocument from NSObject", "How can I use NSDocument to store the images in Swift iOS programmatically", "Did Apple write Xcode which works this way using the NSDocument architecture", "See save in-place in NSDocument .", "I m writing a NSDocument-based application in Swift .", "NSDocument has a method isLocked but it available only on 10.8 .", "I m new to the NSDocument architecture and am looking to set up multiple windows and hence multiple NSWindowController objects for a single document .", "NSDocument is responsible for encoding its restorable state in -encodeRestorableStateWithCoder : and NSDocumentController is responsible for decoding documents restorable state and reopening the documents in +restoreWindowWithIdentifier : state : completionHandler : .", "If yes how can pass the selected document type and the additional save options to the NSDocument write methods", "Does your NSDocument subclass implement modern non-deprecated read-write methods or are you doing something old or funky", "I m playing about with the most recent NSDocument in a Swift document-based-app .", "Refer to Bringing Asynchronous Core Data documents to OS X http : cutecoder.org programming asynchronous-core-data-document for information on how to do this and sample NSDocument subclass code how to do it .", "An instance of MyDocument NSDocument subclass is created .", "NSDocument subclass is mandatory and NSViewController is sufficient .", "Why don t you use NSDocument", "I have an NSDocument based application that uses filewrappers to save and load its data .", "Its extensive long code but the main thing is there is a property dataArray in the NSDocument subclass data gets loaded into it with readFromData and saves with dataOfType .", "I m building an OS X app that uses core-data NSDocument storyboards and Cocoa bindings .", "I have an application based on NSDocument with an NSDocumentController subclass .", "I have a typical NSDocument based cocoa app .", "fig 1.10 the NSDocument should be in the responder chain .", "It appears from MikeTrent s answer that using NSDocument is a very viable way to go .", "You can find my NSDocument subclass in this gist : https : gist.github.com 3652120", "Did NSFileWrapper or NSDocument mess up the permissions or something", "How do you know if a NSDocument is new", "Is this ok to load NSWindowController from NSDocument and keep reference to NSArrayController", "Accessing NSDocument from NSViewController .. . .. . The document can be accessed from the view controller via this property Document is a subclass of NSDocument : .. . .. . This property will return nil in the viewDidLoad method but will return the document in the viewDidAppear method .", "After leaving open server-based documents and quitting the app no NSDocument methods appear to be called on restart .", "To fix the problem override the encoding of NSDocument instances which use the custom scheme and likewise the decoding of those documents .", "For documents NSDocumentController implements that method and recreates the NSDocument object based on the state encoded in the NSCoder instance passed into the method .", "I am not sure how to map files identified by file extensions to its NSdocument object .", "As I m using an NSDocument setup I was supporting versioning .", "It loads everything into one NSDocument object or what", "If you see benefit to go to NSDocument-based go for it .", "Hmm interesting - can t we get to the URL in a similar way from NSDocument", "I am trying to load an NSDocument window from another class when a NSButton is pushed .", "I have a NSDocument -based app and I d like my window positions to be saved and restored when re-opening documents .", "It s implemented using NSDocument and overrides the following NSDocument methods : .. . .. . This is all lovely except when I save a document that s under version-control .", "NSDocument -readFromData : ofType : error : is called automatically when the file changes so I just update the UI with the new data when it s called .", "In my application the method .. . .. . defined in my document file that of course extends NSDocument is never called even when opening new documents from file- Open .", "That only works if you define your Model objects in the same file as NSDocument I am afraid", "Consider a Cocoa NSDocument that supports two document-types e.g .", "However NSDocument s docs make no promises that it ll respect that annoyingly .", "When NSDocument encodes the URL it appears to use the bookmark methods of NSURL .", "So far I have a model which is managed by the NSDocument subclass .", "I m making an NSDocument-based application in which I have an inspector window .", "Should I avoid the NSDocument architecture the Cocoa Document-based Application template", "At this level of complexity would it still be worth hacking the NSDocument architecture", "This should work for simple applications but it can quickly lead to a bloated NSDocument subclass that deals with more than it should .", "It returns an NSDocument object which you can then get the window for via its window controller .", "I m working on an NSDocument-based application whose document type is a package bundle that contains a bunch of files .", "I have an NSDocument which also has associated images as well as audio files .", "For example it seems that the NSDocument should always be the file s owner for any window s NIB files .", "Suppose there s an doc based app class Document subclass from NSDocument and has a property of type NSArray .", "Another example use would be changing how opened documents map to NSDocument subclasses within your application .", "I want to create a new untitled NSDocument when the app starts up in the case that no documents were automatically restored .", "I have a sandboxed NSDocument based app with a Spotlight plugin to index my custom documents .", "The NSDocument subclass contains a single engine object a single caboose object and 0 or more car objects .", "In the document-based architecture an NSDocument class is a mediator between the model that represents the document and the corresponding views and controllers .", "How to Sync an nsdocument questions tagged nsdocument from ipad questions tagged ipad iphone questions tagged iphone to Mac osx with icloud questions tagged icloud .. . .. . I managed to get it working", "From what I understand NSDocument was really created to work with a single window and it seems that the ability to have multiple windows was shoehorned in later .", "From what I understand NSDocument was really created to work with a single window and it seems that the ability to have multiple windows was shoehorned in later .", "And NSDocument -readFromData : ofType : error : overwrite the last opened date one of the file metadata of the file .", "It uses NSDocument unfortunately the vendor won t help with the format - or allow export .", "So what are the first steps in reverse-engineering this format based on NSDocument", "I added a canCloseDocumentWithDelegate : shouldCloseSelector : contextInfo : override in my NSDocument subclass and called super within it .", "It would be nice if NSDocument had some sort of didRegainFocus type method where such logic can be added .", "I would like the default Document class to be called something that is not Document in this case Notebook though of course it would still subclass NSDocument or NSPersistentDocument if I use Core Data .", "For example in the NSDocument subclass I am currently using the code : .. . .. . But the NIB file MyWindow s file owner is set to the NSWindowController subclass WindowControllerType1 NOT my NSDocument subclass .", "I would like to implement asynchronous saving in my NSDocument .", "I rely on NSDocument to make syncing via iCloud easier .", "This is the built-in behavior of NSDocument when it discovers there are unresolved version conflicts .", "the NSDocument subclass has multiple NSMutableArray which are storing the content of the document .", "In your NSDocument subclass implement the following methods for reading and writing .", "Code for the NSDocument implementation and Spotlight plugin are here : https : gist.github.com anonymous c4929586dfa11a473673", "I have application based on NSDocument NSPersistentDocument in application I can create as usually more than one document .", "NSDocument subclass can handle open e save file on local-storage and iCloud .", "I am creating a NSDocument package that contains potentially hundreds of large-files so I don t want to read it all in when opening the document .", "I ve solved this issue : when you define notification for some object as a nsdocument these are not released after close calls .", "UIDocument only provides an asynchronous way of accessing file data : .. . .. . performAsynchronousFileAccessUsingBlock .. . .. . NSDocument provides an async AND synchronous version : .. . .. . performAsynchronousFileAccessUsingBlock .. . performSynchronousFileAccessUsingBlock .. . .. . In my iOS app I now happen to need a synchronous version for my UIDocument .", "How do I change the title of non-main-windows which have a sub-classed window controller in an NSDocument based application", "What is the correct way to access the NSDocument subclass from its associated NSViewController subclass and vice versa", "After that the defined NSDocument makeWindowControllers method is executed which creates the window controllers from the WindowNibName s .", "In NSDocument subclass have this function : .. . .. . MyPage is for this test an NSView subclass that just draws an oval .", "I am subclassing NSPersistentDocument but the question might interest people sublassing NSDocument and I want to deactivate the window restoration ." ] }
{ "confidence": [ 60.597103118896484, 58.5553092956543, 58.06099319458008, 57.663475036621094, 57.57276916503906, 57.21881103515625, 55.311729431152344, 54.670684814453125, 54.30022430419922, 53.85197830200195, 53.83696746826172, 53.56941604614258, 53.392845153808594, 51.74991989135742, 50.91344451904297, 50.68083572387695, 48.99679183959961, 48.9930305480957, 48.492252349853516, 47.337955474853516 ], "content": [ "Question : I want to write an application which may have multiple documents in a single window via a tabbed interface . Should I avoid the NSDocument architecture the Cocoa Document-based Application template As far as I can tell it supports only one or more window per document but not vice versa . I have been wrestling with this question for a while and have already built much of my application on the NSDocument architecture but I cannot figure out a good way to associate multiple documents with a single window . EDIT : I want to have project document windows in addition to basic document windows . At this level of complexity would it still be worth hacking the NSDocument architecture Did Apple write Xcode which works this way using the NSDocument architecture Comment : it appears that xcode does indeed use NSDocument but the window that has the multiple tabs in the project is just one document the projects Comment : also a really fun tool to poke around in cocoa apps to see how they do it is F-Script fscript.org http : www.fscript.org Comment : @cobbal : Interesting . Does that imply that text-files are not represented as NSDocuments .. . Answer : I tried shoehorning an NSDocument app into a single window tabbed interface a few years ago and ended up so frustrated after a few months I went back and refactored out the document architecture pieces . It s not impossible but you end up working around so many problems that the final result barely resembles a proper NSDocument app . It s better to just rewrite the bits you do need than end up with a lot of code just to subvert the Cocoa frameworks . Comment : It s not really much code as you can read from my guide here http : cutecoder.org programming window-multiple-documents .", "Question : I want to write an application which may have multiple documents in a single window via a tabbed interface . Should I avoid the NSDocument architecture the Cocoa Document-based Application template As far as I can tell it supports only one or more window per document but not vice versa . I have been wrestling with this question for a while and have already built much of my application on the NSDocument architecture but I cannot figure out a good way to associate multiple documents with a single window . EDIT : I want to have project document windows in addition to basic document windows . At this level of complexity would it still be worth hacking the NSDocument architecture Did Apple write Xcode which works this way using the NSDocument architecture Comment : it appears that xcode does indeed use NSDocument but the window that has the multiple tabs in the project is just one document the projects Comment : also a really fun tool to poke around in cocoa apps to see how they do it is F-Script fscript.org http : www.fscript.org Comment : @cobbal : Interesting . Does that imply that text-files are not represented as NSDocuments .. . Answer : I have the same kind of project different independent documents that I want to present in a single window with a sidebar that allows switching between documents so I have done a little bit of searching myself . I just found an interesting lead by reading Cocoadev s Document Based App With One Window For All Documents http : cocoadev.com DocumentBasedAppWithOneWindowForAllDocuments reference . It appears from MikeTrent s answer that using NSDocument is a very viable way to go . You just need subclassing NSDocumentController . I also like Abhi s idea http : stackoverflow.com a 9151933 364446 to use a borderless child window . Comment : The first link is broken Comment : Fixed the link .", "Question : I have an application based on NSDocument with an NSDocumentController subclass . My NSDocument works with both file URLs and URLs with a custom scheme which use a web service . I handle much of the loading and saving using custom code including -saveToURL : ofType : forSaveOperation : completionHandler : . +autosavesInPlace returns YES . The problem I m having : documents with the custom URL scheme aren t restored on startup . Documents with the file URL scheme are both regular documents saved to files and untitled documents which are autosaved . After leaving open server-based documents and quitting the app no NSDocument methods appear to be called on restart . In particular none of the four initializers is called : .. . .. . init .. . initWithContentsOfURL : ofType : error : .. . initForURL : withContentsOfURL : ofType : error : .. . initWithType : error : .. . .. . The NSDocumentController method -reopenDocumentForURL : withContentsOfURL : display : completionHandler : is not called either . How and when are documents restorable state encoded How and when are they decoded .. . Answer : Window state encoding is enabled by two methods on NSWindow . Calling setRestorable : on the window marks it as one that can be saved and restored on relaunch and then calling setRestorationClass : lets you specify a class that will handle recreating that saved window . By default AppKit sets NSDocumentController as the restoration class of windows controlled by NSDocument objects . The actual restoration is done by calling the method +restoreWindowWithIdentifier : state : completionHandler : defined by the NSWindowRestoration protocol . For documents NSDocumentController implements that method and recreates the NSDocument object based on the state encoded in the NSCoder instance passed into the method . So theoretically if you were to subclass NSDocumentController and override that method that would give you an opportunity to restore documents saved by the state-restoration mechanism . However as far as I know the keys used by NSDocumentController to store state are not documented anywhere so I don t think there would be a reliable way to restore directly from the state that NSDocumentController stores itself . To support this you would probably need to encode the entire state for the document yourself by implementing -encodeRestorableStateWithCoder : on the NSWindow being encoded and or implement the window : willEncodeRestorableState : delegate method for the window . Both of those methods pass you an NSCoder instance you can use to encode your state . That s where you would encode your custom-schemed URL along with any other associated data you need to save restore your state . You would then decode that state in the restoreWindowWithIdentifier : state : completionHandler : method . Since you ll have some documents with regular file URLs and some with your custom URLs I would approach that by creating a separate class responsible for decoding the document state and set that as the restoration class only for your documents with custom URLs leaving NSDocumentController to handle the documents withe file URLs for you . Comment : This was a big help getting started . It turns out the story is more complicated : it s actually NSDocument not NSWindow which is responsible for encoding the document state numbered ID url has recent changes type in its own implementation of -encodeRestorableStateWithCoder : . NSDocumentController uses that state information to restore the document then invokes -makeWindowControllers and NSApplication or NSApplication s completion handler restores the window . Also when using a custom subclass of NSDocumentController AppKit sets that class as the restorationClass .", "Question : I have a Mac Shoebox app that internally uses NSDocument objects but does not expose the concept of individual documents to the user . I rely on NSDocument to make syncing via iCloud easier . My problem is that when a version conflict arises my app shows the default NSDocument conflict resolution alert see below letting the user pick one or two winners . In the concept of my app this doesn t make sense . Is there a way to intercept prevent that alert and handle the conflict programmatically I know that I can detect version conflicts with the code below . However I still need to prevent the alert sheet . Example conflict resolution alert : .. . .. . Example conflict resolution alert http : i.stack.imgur.com sNhnX.png .. . Answer : This is the built-in behavior of NSDocument when it discovers there are unresolved version conflicts . If you do not wish to use it you ll have to drop support for NSDocument and use a lower level abstraction like NSFileManager + NSFileVersion .", "Question : I want to write an application which may have multiple documents in a single window via a tabbed interface . Should I avoid the NSDocument architecture the Cocoa Document-based Application template As far as I can tell it supports only one or more window per document but not vice versa . I have been wrestling with this question for a while and have already built much of my application on the NSDocument architecture but I cannot figure out a good way to associate multiple documents with a single window . EDIT : I want to have project document windows in addition to basic document windows . At this level of complexity would it still be worth hacking the NSDocument architecture Did Apple write Xcode which works this way using the NSDocument architecture Comment : it appears that xcode does indeed use NSDocument but the window that has the multiple tabs in the project is just one document the projects Comment : also a really fun tool to poke around in cocoa apps to see how they do it is F-Script fscript.org http : www.fscript.org Comment : @cobbal : Interesting . Does that imply that text-files are not represented as NSDocuments .. . Answer : Using an NSDocument-based architecture isn t necessarily a bad idea in this case but it might require quite a bit of haquery . It is quite likely that you will have to not only subclass NSDocument but also it s more rarely subclassed sibling NSDocumentController . Once this is done it should be a simple matter to hijack and avoid calls to -makeWindowControllers and other window-related methods allowing you to wrap the document windows in whatever fashion you please but still retain the benefits of the document-based application .", "Question : I have a sandboxed NSDocument based app with a Spotlight plugin to index my custom documents . During testing I noticed a lot of errors being logged to the console by the Spotlight plugin as it indexes a document : .. . .. . It appears as-if the plugin attempts to write to the file it indexes although it has only read-only access . In my Spotlight plugin implementation I don t do anything in particular to write to the document . All I do is initialize my NSDocument subclass to read from the document : .. . .. . Here s the stack-trace : .. . .. . Looks like the autosaving check is somehow attempting to write to the document . Is there anything I can do about this Is there some sort of read-only mode to open an NSDocument Update : .. . .. . To reproduce : .. . .. . 1 . Create a new Xcode project : Cocoa document based app .. . 2 . Add a Spotlight plugin .. . 3 . Code for the NSDocument implementation and Spotlight plugin are here : https : gist.github.com anonymous c4929586dfa11a473673 .. . Answer : Okay so where s the code for - TTCustomDocument initWithContentsOfURL : ofType : error : or any other custom initialization code as well as your -readFromURL : ofType : error and related code It s likely you re triggering something from one of these init.. . and or read.. . methods that causes the document to be flagged as dirty having unsaved changes which results in the autosave system being triggered . This is improper behavior in your TTCustomDocument class . My guess is you re triggering something that registered a change with the document s undo manager . Easy to do if it s a Core Data document and you re setting up some initial data also easy to do if you set up initial data in a way that calls one of your own undo-aware funnel methods . The easiest work-around recommended by the documentation is to call self.undoManager disableUndoRegistration before the changes and self.undoManager enableUndoRegistration after the changes and before returning self . Comment : Thanks for looking into this . I did not override initWithContentsOfURL : ofType : error : . In init I set up some internal objects . I do use self.undoManager disableUndoRegistration when reading the contents . Looking at the stack-trace I think it s checking right away if the document can be autosaved . I overrode + BOOL autosavesInPlace to return YES . Comment : I reproduced this with a sample app based on the Xcode document app template . The problem only occurs if autosavesInPlace returns YES . I m going to file a bug report to see what they say at Apple about this . Comment : What internal objects How do you set them up These are critical details . Comment : I added a gist with the relevant code to the question .", "Question : I want to write an application which may have multiple documents in a single window via a tabbed interface . Should I avoid the NSDocument architecture the Cocoa Document-based Application template As far as I can tell it supports only one or more window per document but not vice versa . I have been wrestling with this question for a while and have already built much of my application on the NSDocument architecture but I cannot figure out a good way to associate multiple documents with a single window . EDIT : I want to have project document windows in addition to basic document windows . At this level of complexity would it still be worth hacking the NSDocument architecture Did Apple write Xcode which works this way using the NSDocument architecture Comment : it appears that xcode does indeed use NSDocument but the window that has the multiple tabs in the project is just one document the projects Comment : also a really fun tool to poke around in cocoa apps to see how they do it is F-Script fscript.org http : www.fscript.org Comment : @cobbal : Interesting . Does that imply that text-files are not represented as NSDocuments .. . Answer : Another technique which I haven t tried yet but plan to is to have a borderless window for each document . This way one document has one window which may or may not be visible . Then have a wrapper window containing the actual window border and any controls to switch between which borderless document window windows are visible . The document window is a child window of the wrapper which ensures both will be linked when a window is moved minimised closed etc . For each borderless document window the wrapper window has a placeholder view that when resized will resize the document window and also inject the document window s view into the responder chain any event sent to the placeholder view will be sent to the document window s view before being passed on to the placeholder s parent view . There are still some minor details to work out but I think this approach will work well . Comment : Very interesting suggestion .", "Question : I m new to the NSDocument architecture and am looking to set up multiple windows and hence multiple NSWindowController objects for a single document . From what I understand NSDocument was really created to work with a single window and it seems that the ability to have multiple windows was shoehorned in later . For example it seems that the NSDocument should always be the file s owner for any window s NIB files . But what if I wanted to separate the window controllers from the document For example in the NSDocument subclass I am currently using the code : .. . .. . But the NIB file MyWindow s file owner is set to the NSWindowController subclass WindowControllerType1 NOT my NSDocument subclass . In this case whenever I look to get the document by using NSDocumentController sharedDocumentController currentDocument this ALWAYS returns nil . I figure this can be rectified if I set the NIB file s owner to the NSDocument subclass but then all of my outlet links break and I m not sure how to link-to the NSWindowController subclass WindowControllerType1 as the typical course of action as far as I can tell is to make the NSDocument a window controller delegate as well which I would like to avoid Any suggestions EDIT : .. . .. . Let me clarify and add some new information . I am aware of Apple s position on using the WindowController s document property . However as I plan of having a larger number of nested NSViews in each window I want to avoid passing the document through a large chain of views in order to accomplish this . The issue is not necessarily this chain . It is mostly that when the NSDocumentController sharedDocumentController currentDocument is ALWAYS nil none of the for free features of NSDocument seem to work such as undo-redo . This is the major issue that I need to resolve . .. . Answer : Use document property of NSWindowController instead of currentDocument . Comment : Thanks I know of that solution but it isn t the for me I don t think as I d like to avoid having to create a large variable chain through the large number of view layers I am planning on using . Comment : I don t understand what you said can you explain you question Comment : Can you have multiple documents Comment : Apple s discussion of currentDocument : The value of this property is nil if it is called when the app is not active . This can occur during processing of a drag-and-drop operation for example in an implementation of readSelectionFromPasteboard : . In such a case send the following message instead from an NSView subclass associated with the document : self window windowController document Comment : @Willeke I really only want one document open at a time .", "Question : I have written different parsers and different NSDocument subclasses for files with different extensions to visualize the data . I would like to intergrate them together into one application . I am using NSDocument architecture . I am not sure how to map files identified by file extensions to its NSdocument object . I have tried to add document-types in the Xcode info session with class and extensions . However it seems that it always execute the same parser regardless of the file s extension . enter image description here http : i.stack.imgur.com sgzPs.png .. . Answer : 1 Subclass NSDocumentController .. . .. . a in your XIB with mainmenu put a new object and give it a class of your new NSDocumentController subclass .. . .. . or .. . .. . b create a new instance before appDidFinishLaunching initialize load.. . .. . .. . 2 override methods as you see on picture those which determine type and return document instances to provide new document instances as per type .. . .. . Document http : i.stack.imgur.com TiMXT.png .. . .. . Read more here https : developer.apple.com library mac documentation DataManagement Conceptual DocBasedAppProgrammingGuideForOSX AdvancedTopics AdvancedTopics.html .. . .. . Also scan with your eyes NSDocumentController.h CMD+SHIFT+O and type NSDoc.. .", "Question : I ll need to implement asynchronous saving in a Core Data document-based application . My NSDocument subclass is patterned just like iOS UIManagedDocument with a pair of NSManagedObjectContext instances one for the main thread with a parent context for background saving . The problem is that whenever I the document the app always displays a prompt : .. . .. . The document .. . could not be saved . The file has been changed by another application . I wonder what is missing from my implementation How can I make the dialog above go away whenever I save You can find my NSDocument subclass in this gist : https : gist.github.com 3652120 Comment : just checking you know about NSPersistentDocument Comment : @hooleyhoop Yes I know about NSPersistentDocument . It doesn t support async saving and file packages . .. . Answer : Apparently cloning the functionality of UIManagedDocument isn t too hard . One caveat is to make sure that the NSDocument s notion of the file s date is updated whenever the main thread s context is saved . The second caveat is to use the main thread managed object context s undo manager . Refer to Bringing Asynchronous Core Data documents to OS X http : cutecoder.org programming asynchronous-core-data-document for information on how to do this and sample NSDocument subclass code how to do it .", "Question : I have an application based on NSDocument with an NSDocumentController subclass . My NSDocument works with both file URLs and URLs with a custom scheme which use a web service . I handle much of the loading and saving using custom code including -saveToURL : ofType : forSaveOperation : completionHandler : . +autosavesInPlace returns YES . The problem I m having : documents with the custom URL scheme aren t restored on startup . Documents with the file URL scheme are both regular documents saved to files and untitled documents which are autosaved . After leaving open server-based documents and quitting the app no NSDocument methods appear to be called on restart . In particular none of the four initializers is called : .. . .. . init .. . initWithContentsOfURL : ofType : error : .. . initForURL : withContentsOfURL : ofType : error : .. . initWithType : error : .. . .. . The NSDocumentController method -reopenDocumentForURL : withContentsOfURL : display : completionHandler : is not called either . How and when are documents restorable state encoded How and when are they decoded .. . Answer : NSDocument is responsible for encoding its restorable state in -encodeRestorableStateWithCoder : and NSDocumentController is responsible for decoding documents restorable state and reopening the documents in +restoreWindowWithIdentifier : state : completionHandler : . Refer to the helpful comments in NSDocumentRestoration.h . When NSDocument encodes the URL it appears to use the bookmark methods of NSURL . The problem is that these methods only work with file-system URLs . It s possible non-file URLs will encode but they will not properly decode . To fix the problem override the encoding of NSDocument instances which use the custom scheme and likewise the decoding of those documents . NSDocument subclass : .. . .. . NSDocumentController subclass : .. . .. . The behavior or the completion handler follows from Apple s method comment in NSDocumentRestoration.h and should be roughly the same as super s .", "Question : I m new to the NSDocument architecture and am looking to set up multiple windows and hence multiple NSWindowController objects for a single document . From what I understand NSDocument was really created to work with a single window and it seems that the ability to have multiple windows was shoehorned in later . For example it seems that the NSDocument should always be the file s owner for any window s NIB files . But what if I wanted to separate the window controllers from the document For example in the NSDocument subclass I am currently using the code : .. . .. . But the NIB file MyWindow s file owner is set to the NSWindowController subclass WindowControllerType1 NOT my NSDocument subclass . In this case whenever I look to get the document by using NSDocumentController sharedDocumentController currentDocument this ALWAYS returns nil . I figure this can be rectified if I set the NIB file s owner to the NSDocument subclass but then all of my outlet links break and I m not sure how to link-to the NSWindowController subclass WindowControllerType1 as the typical course of action as far as I can tell is to make the NSDocument a window controller delegate as well which I would like to avoid Any suggestions EDIT : .. . .. . Let me clarify and add some new information . I am aware of Apple s position on using the WindowController s document property . However as I plan of having a larger number of nested NSViews in each window I want to avoid passing the document through a large chain of views in order to accomplish this . The issue is not necessarily this chain . It is mostly that when the NSDocumentController sharedDocumentController currentDocument is ALWAYS nil none of the for free features of NSDocument seem to work such as undo-redo . This is the major issue that I need to resolve . .. . Answer : From what I understand NSDocument was really created to work with a single window and it seems that the ability to have multiple windows was shoehorned in later . No makeWindowControllers is available in OS X v10.0 and later . But what if I wanted to separate the window controllers from the document The window controller owns the NIB . Any suggestions Do self setMyWindowController1 : WindowControllerType1 alloc initWithWindowNibName : @ MyWindow . NSWindowController has a property document which is set by addWindowController : . Comment : Thanks Willeke . I know that the functionality for multiple windows has existed from the start but the fact that there are two methods for invoking viewcontrollers - void makeWindowControllers and - NSString windowNibName seems to suggest to me a lack of cohesion . I m not sure what you mean by saying that the window controller owns the nib . From Apple s documentation : When an NSWindowController object receives a request from its owning NSDocument object it loads the nib file containing a window displays the window and sets itself as the File s Owner of the nib file . Comment : The window controller is the NIB owner . In IB File s owner is a subclass of NSWindowController . Comment : - NSString windowNibName is kind of a convenience method for one simple window .", "Question : What is the correct way to access the NSDocument subclass from its associated NSViewController subclass and vice versa I have the following code that does the former but it doesn t work when the view has loaded or when it moved to a window : .. . Answer : I want to write read and print a simple-form that contains such an image and two NSTextField : how can I make it by using a project with Swift and the option Use Storyboard and Create document based-application . I can not transfer the data from the viewController to NSDocument to read-write and print the simple-form and viceversa . I did not understand where to place your code in the project created by Xcode 7.2.1 .", "Question : My NSDocument subclass using a bundle document type which uses fileWrapperOfType : error : to write data to disk . This works perfectly but eventually it will start to save files with garbled names like 2 @ info.plist instead of overwriting the proper file . I don t know what changes to cause the problem but I think it s permissions related because Finder is not letting my write inside the bundle even though stat returns drwxr-xr-x which is writeable by the owner . Did NSFileWrapper or NSDocument mess up the permissions or something I m new to this API but here is the code I m using below in Objective Pascal which is hopefully readable by all . .. . Answer : I found that retaining the file wrapper from initDirectoryWithFileWrappers across calls to fileWrapperOfType error was causing the problem . I now initialize a new instance of NSFileWrapper every time the document is saved using initWithURL options error or initDirectoryWithFileWrappers . However it s still a problem that I can t modify the documents bundle contents in the Finder even though I chmod d the directory 0777 . Maybe some Finder-specific restriction it places on these files .", "Question : I am writing an OS X document-based application using cocoa swift . So far I have a model which is managed by the NSDocument subclass . Custom views are managed by custom view controllers which update the views to keep them synchronised with the model . The model- controller- view flow of information is strightforward . I have the view controllers observing the document and when the document changes the view controllers do their job with the views . The issue is that in this process the model s objects are obviously exposed to the view controllers and therefore the view controllers could also modify the model if I wish or if I make a mistake . I d like the document to be the only one who has permission to modify the model objects . The view controllers should have read-only access to them . Is there a way to do this in Swift Thanks in advance . Comment : Note : With structs there is no problem since declaring them as private set within the document does the job . With classes though private set only prevents changing the reference from outside the document but not the content of the object . .. . Answer : In Swift the private variable modifier does not apply to classes which are defined in the same file so if you put your Model class definition in the same file as your NSDocument subclass then the NSDocument subclass can change the private Model variables as-if they were public but an NSViewController subclass defined in another file will not have access to the private Model variables . Then you can make private variables partially private by writing : .. . .. . ...which will allow the NSController subclass to read them but not set them . Swift synthesizes setters and getters for all your variables not just computed properties and that tells Swift to make the setter private . I tested private set with some observer code and the above scenario will allow the NSDocument subclass to change the Model but if the NSViewController subclass tries to change the Model Xcode immediately flags the assignment with the error : .. . .. . Cannot assign to the result-of this expression .. . .. . MyDocument.swift : .. . .. . MyViewController.swift : .. . .. . Some code to exercise the classes : .. . .. . Then if I uncomment the line : .. . .. . Xcode immediately flags that as an error . Comment : That only works if you define your Model objects in the same file as NSDocument I am afraid", "Question : null .. . Answer : My OS X app upon loading a document in -makeWindowControllers reads additional content large raw data files from the document package . It gets the path to these files based on - NSDocument fileURL . This does not work when the user clicks File Duplicate in the menu because upon opening the newly-created document - NSDocument fileURL returns nil . This is because the user has not specified a file location for it yet . The new document is as I understand it in an unspecified temporary file location . Is there any non-kludgey way to get my additional content in this situation or am I going about this wrong", "Question : I m building my first serious Cocoa app . It is a document based app using Core Data for persistent-storage . Using the Xcode New project template options my project started with a couple of default classes : .. . .. . MainMenu.xib the main menu of my app .. . EventDocument.xib the main window of my app .. . EventDocument.h and EventDocument.m the persistent document class .. . .. . I took the design from there and it all works rather nicely however through another question http : stackoverflow.com questions 7373446 how-do-i-use-a-subclass-of-nsdocumentcontroller-in-xcode-4 I came across a Cocoa class NSDocumentController which I was not aware of . This class apparently offers default logic for managing document classes in a document based application . My question is how does this class slot into my app - if at all - and do I need it At this moment I use the EventDocument class as a sort of top level controller . It picks up the user choices from the menu a tree view with options a la iTunes brings up the different views controllers that handle these options and passes around the Managed Object Context . If NSDocumentController is the way to go why does Apple not generate it as part of the project template Comment : Could you provide a link-to the other question and explain why you think you d need NSDocumentController Comment : It is not so much that I think I need it as the current design works great . I was just wondering whether I missed a design pattern common to Cocoa apps . Comment : I added the link-to the question.. . .. . Answer : I believe you re misunderstanding the goal of NSDocumentController probably because its name is similar to NSWindowController and NSViewController . In Cocoa MVC a controller mediates a view and a model . When dealing with windows it s common for the controller to be a subclass of NSWindowController and in the case of views a subclass of NSViewController . In the document-based architecture an NSDocument class is a mediator between the model that represents the document and the corresponding views and controllers . Essentially it is responsible for recreating the model based on an external representation and providing some way of attaching controller behaviour corresponding to the model and the view . Two designs are commonly used for that : .. . .. . The NSDocument subclass effectively acts as a window potentially view as well controller for example by implementing IBActions . This should work for simple applications but it can quickly lead to a bloated NSDocument subclass that deals with more than it should . The documentation http : developer.apple.com library mac documentation Cocoa Conceptual Documents Tasks FAQ.html says : .. . .. . The default Document-based Application project template does not subclass NSWindowController . You do not need to subclass NSWindowController if you are writing a simple application . However if you are writing an application with more advanced requirements you will almost certainly want to do so . The NSDocument subclass creates custom window controllers which in turn implement controller behaviour potentially using view controllers as well . In many most cases there is no need for an NSDocumentController subclass the controller part of your application would be inside window controllers view controllers or your NSDocument subclass . That said there are some situations where it might be necessary as explained in the documentation http : developer.apple.com library mac documentation Cocoa Conceptual Documents Tasks FAQ.html : .. . .. . Usually you should not need to subclass NSDocumentController . Almost anything that can be done by subclassing can be done just as easily by the application s delegate . However it is possible to subclass NSDocumentController if you need to . .. . For example if you need to customize the Open panel an NSDocumentController subclass is clearly needed . You can override the NSDocumentController method runModalOpenPanel : forTypes : to customize the panel or add an accessory view . The addDocument : and removeDocument : methods are provided for subclassers that want to know when documents are opened or closed . Comment : More to the point an NSDocument owns at least one window controller and maybe some view controllers whereas the NSDocumentController owns the documents . In the ownership hierarchy the document controller is the documents parent not among their children . See also : the fact that there is only one document controller whereas there can be any number of open documents .", "Question : null .. . Answer : I made my first document based Cocoa app which works fine until today I came across something I didnt expect . This is created with the Xcode document template . the NSDocument subclass has multiple NSMutableArray which are storing the content of the document . Those are display in a collectionview and are draggable . It all works fine until today I opened multiple documents and came across that when one document has only 1 entry in the array and is opened after one with many entries in the array when accessing the array in the one with multiple there is only 1 entry It loads everything into one NSDocument object or what I thought NSDocumentController is here doing the magic which I dont know where it is in this template and how to access it but it has to be there somewhere What am I doing wrong here I thought every document is working independently . How should I add an NSDocumentController - but there has but be one I dont get this part . Everyone in my search is talking about this controller but no where how it is implemented . And I d like to be able to only have one document open because it doesnt make sense to have multiple open and I have to do this with the DocumentController but where is this thing in the template working or initialized Thanks guys for some clearance on this . Comment : Can you post the document code Specially what is related to your arrays . Comment : Its extensive long code but the main thing is there is a property dataArray in the NSDocument subclass data gets loaded into it with readFromData and saves with dataOfType . just like : NSDictionary dict NSKeyedUnarchiver unarchiveObjectWithData : data NSLog @ @ dict self.dataArray dict objectForKey : @ dataArray The question is is this normal behavior that the self.dataArray of NSDocument is shared somehow when multiple documents are open Comment : I should add the arrays are initialized in the init method of the NSDocument subclass is this the wrong place Normally I would do it there . Comment : Document work independently as you said and each document has its own copy of its instance-variables unless you declared them as static . You must be doing something wrong but it s hard to tell without seeing any code .", "Question : In Document-Based Apps using XIB files when a new window is created its behaviour is : .. . .. . 1 . Be positioned and sized based on the position of the last active-window . 2 . If the last active-window is still visible then the new window should be cascaded so it doesn t directly overlap . However when using a storyboard this isn t done . See test project https : github.com jessegrosjean window.autosaveName . .. . Answer : Cascaded Windows Problem .. . .. . One of the problems is that storyboards unlike xibs can include the NSWindowController and Interface Builder doesn t serialize it right . -initWithWindow : -initWithWindowNibName : and friends set shouldCascadeWindows to YES . When a NSWindowController is loaded from a storyboard via -initWithCoder : shouldCascadeWindows is NO . OS X 10.11 .. . .. . Based on my tests this property needs to be set in the initializer . Setting it in - NSDocument addWindowController : didn t work . OS X 10.11 .. . .. . Window Position Problem .. . .. . Using - NSWindowController windowFrameAutosaveName or - NSWindow frameAutosaveName seems only to work sometimes . Randomly it uses the initial window position . Window Size Problem .. . .. . Even if the cascaded window position is set right it never set the size to the one saved for the frame . I verified the saved frame with defaults read window.autosavename.test1 . Also before each test I run defaults delete window.autosavename.test1 for a clean state . Workaround .. . .. . Use a xib containing a empty NSWindow and add the view controllers from the storyboard in - NSDocument windowControllerDidLoadNib : or - NSDocument addWindowController : to the window .", "Question : Based on the Apple Docs https : developer.apple.com library mac documentation DataManagement Conceptual DocBasedAppProgrammingGuideForOSX AdvancedTopics AdvancedTopics.html apple ref doc uid TP40011179-CH7-SW10 the recommended practice for using file packages with NSDocument seems to be to keep a reference to the root NSFileWrapper in the custom NSDocument implementation . My question : doesn t this mean that I ll end up with twice the memory-footprint for my document Imagine a simple document with a single NSString instance variable text . Let s say the text can be quite large . In readFromFileWrapper : I read the NSString from the file wrapper data and store it in text . However since the file wrapper is an instance variable it s raw NSData is still around although all I need is the NSString version . Is there anything that speaks against discarding the NSFileWrapper as soon as I m done reading Edit : This is even more interesting when thinking about iOS and UIDocument . I have a document with potentially hundreds of images . .. . Answer : This is a good question but I m going to answer it bluntly . First don t optimize prematurely . If all you have is relatively small files you shouldn t worry about this yet . You should get your app working . If once your app works you discover your files tend to be really large like hundreds of megabytes you might think about optimizing this . Remember machines today very often have 8GB or more of RAM . It takes a LOT of data to fill that . Also with virtual-memory the NSFileWrapper will map in the data files which means they ll inhabit memory for at least as long as they re read but after that they can be paged out with zero cost they don t need to be written back to disk because they re already ON disk . Memory that is occupied but can be freed without a disk access is essentially free memory . So again don t try to optimize when you don t have a real test case that s actually performing poorly because the system is already incredibly optimized and if you optimize yourself without being able to test you ll as likely make things worse ." ] }
[ "yes-answer-long", "yes-answer-short" ]
interface
UNK_RELATION
cloudify@open-source@37
cloudify -- cloudify is a pure-play @placeholder cloud orchestration platform built-in python and a tosca-based yaml dsl that enables the plugging in of any cloud or toolset .
{ "confidence": [ 62.72761535644531, 59.81060028076172, 54.29831314086914, 51.33433532714844, 47.64557647705078, 47.600650787353516, 46.08477783203125, 45.85862731933594, 44.369136810302734, 42.676841735839844, 42.676841735839844, 42.676841735839844, 42.396018981933594, 40.444801330566406, 39.635868072509766, 37.427284240722656, 37.427284240722656, 35.7685661315918, 25.045520782470703, 21.088220596313477, 20.45752716064453, 20.45752716064453, 19.789806365966797, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 17.279308319091797, 17.279308319091797, 17.279308319091797, 17.279308319091797, 17.279308319091797, 17.279308319091797, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453 ], "content": [ "Cloudify JVM parameters are configured using the cloud driver configuration file .", "1 Create 2 Cloudify Managers in each of them set a persistencePath property in the cloud configuration file .. . .. . 2 Create 2 Cloudify Managers without setting a persistencePath property in the cloud configuration file .. . .. . 3 Create 1 Cloudify Manager with a persistencePath property in the cloud configuration file .. . .. . Could I execute by means of a bash script into the Cloudify Manager the Cloudify command that saves the state of the deployed applications I mean the command that corresponds to the shutdown-managers using a cron-task", "We are using Cloudify 3.1 .", "I am using Cloudify 2.7 with OpenStack Icehouse .", "I m using Cloudify 2.7 with OpenStack Icehouse for a production environment .", "BTW you may want to check out Cloudify 3 as Cloudify 2.X is nearing End of Life .", "Unfortunately I can t moving to Cloudify 3 .", "I m trying to create a Cloudify Manager into OpenStack with Keystone using HTTPS connection .", "Please consider that Cloudify 2.x has reached end of life - you should consider moving to Cloudify 3 : http : getcloudify.org guide 3.1 quickstart.html", "I would like know if it exists a documentation about the tuning of Cloudify JVM parameters .", "Option 1 is a bad one and not supported note that Cloudify 2.7 is not supported AT ALL - it has reached end of life .", "You have asked a lot of cloudify questions but have not closed them either accepting answers or stating the problem with the answers .", "I can t arrive to use an axternal script for startDetection in Cloudify 2.7.1 .", "Scenario .. . .. . Cloudify 2.7 application running a tomcat service instance .. . .. . Goal .. . .. . I would like to stop shut off and start the VM hosting tomcat using OpenStack APIs without Cloudify re-installs the tomcat recipe .", "I would like to have High Availability of Cloudify Manager so that the state of the deployed applications can be saved and restored in case of problems .", "That is the correct behavior of the default tomcat service provided with Cloudify 2.7 - after a restart the tomcat files are re-downloaded and deployed locally .", "Added some more notes to my answer - and again you should probably consider moving to Cloudify 3 .", "Have a look at the following files : .. . .. . https : github.com CloudifySource cloudify-recipes blob master services tomcat tomcat init.groovy https : github.com CloudifySource cloudify-recipes blob master services tomcat tomcat install.groovy .. . .. . These are probably the files you will need to edit to achieve what you are looking for .", "The snippet below is from Ref https : groups.google.com d msg cloudify-users mEAI9x9ivXQ 39Rg6KgKP4cJ .. . .. . They are indeed not exposed as environment-variables but are readily available as inputs by placing them in the top level inputs instead of the nested env.process and then doing something like .. . .. . from cloudify.state import ctx parameters as inputs .. . .. . afterward you can access these like this .. . .. . inputs in this case is just a sugared dict that allows top level key attribute-like access to the operation inputs you could just as well do inputs LOAD BALANCER IP ctx.logger.info inputs.LOAD BALANCER IP .. . .. . Wish this was explicitly stated in the docs . .", "I am trying to pass blueprints inputs as environment-variables to a python script executed by script plugin during one of the lifecycle operations of a node .", "My blueprint looks like below trimmed it to show the required sections : .. . .. . and in my python script installer.py I am trying to access SQL USERNAME using os.environ.get SQL USERNAME DEFAULT .", "After spending almost 24 hours found out that if the script is a python script and eval script is not set to false in the Process configuration options the environment-variables are not injected atleast for v 3.1 .", "When I execute the command : .. . .. . cfy bootstrap --install-plugins -p path to manager blueprint file -i path to inputs yaml file .. . .. . I receive the following error : .. . .. . raise exceptions.SslCertificateValidationError reason e SslCertificateValidationError : SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed 2016-01-29 09 : 50 : 58 CFY external network 5bbde.creation Task failed neutron plugin.network.creation validation - SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed attempt 1 6 .. . .. . What should I do to solve the problem", "For example how should I configure correctly the gs.properties file into the config directory", "Does it exist other files I should configure", "Thanks", "There are advanced settings to tweak both memory and port settings .", "These are available here : http : getcloudify.org guide 2.7 bootstrapping advanced cloud driver usage.html .. . .. . For instance :", "Which of the following solutions is the correct", "Both 2 and 3 are good options .", "2 gives you High-Availability 3 gives you manager recovery .", "There is no command that saves the state of the manager - state is saved every time there is a change and persisted to the persistencePath directory", "But I am always getting the default-value even when I pass a custom value via inputs during deploy .. . .. . What should I change to be able to access the input parameters as environment vairables from the inputs section of the blueprint in the script", "Thanks to Dan Kilman .", "It seems that you have a problem with the keystone SSL certificate .", "You should either import the certificate to your CLI machine .", "Or you could try before bootstrap to run :", "I solved inserting into the dsl definition of the OpenStack blueprint : .. . .. . the following statement : .. . .. . so that the final result was :", "What I tried to do .. . .. . I tried to use the Maintenance Mode following this http : getcloudify.org guide 2.7 developing maintenance mode.html guide : .. . .. . Setting a service instance to maintenance mode will disable host machine failure detection for that specific service instance .", "This means that during the specified time period a failure or a restart of a service instance host machine will NOT result in a provisioning of a new machine and service instance .", "So I have executed the following commands : .. . .. . After that what I saw in the Cloudify s Orchestraotor logs was the re-installation process of the tomcat service .", "In other words the tomcat VM now hosts tow tomcat Processing Units .", "Can someone suggest to me what should I do in order to reach my goal", "If you want a different behavior you may want to tweak the tomcat recipe to save the tomcat files in a different location the default installation saves all files in a per instance work directory which will be replaced after a reboot .", "You can change the recipe to look for an existing installation and use it if it exists .", "Note how catalina base is set as a context property and that AntBuilder is used to download the tomcat installation and save it to a shared location .", "These are the files you will need to change .", "Thank you Barak .", "How can I change the recipe to look for an existing installation and use it if it exists", "Should I verify if the root gigaspaces work processing-units is not empty", "I try : .. . .. . and the result is : .. . .. . before the real end of the start script .", "And I try : .. . .. . and the result before the end of the start script is : .. . .. . and the result after the end of the start script is : .. . .. . In both case it doesn t work .", "I can only use the startDetection in closure like that : .. . .. . like the stopDetection .", "Someone know why", "The log entries you copied above seem ok . With start detection if you use an external lifecycle script all you can do is pass a process return code which indicates pass fail .", "A zero return code indicates the test passed - start detection completed successfully .", "A non-zero value means the test did not pass .", "In your question when the start script completed successfully you get this : Process liveness test passed .. . .. . So the script finished correctly start detection passed .", "What is it exactly that doesn t work", "Thank you for your quick answer Barak .", "I thought the logs showed an error due to : SEVERE Event lifecycle external process exited with abnormal status code : 255 SEVERE Event lifecycle external process failed : .. .", "SEVERE Failed to execute entry : startDetection.groovy Caused by : org.cloudifysource.usm.USMException : Event lifecycle external process exited with abnormal status code : 255 .. . unexpected operator startDetection.groovy .. .", "Yeah the log severity is misleading here .", "But the operation seems to work correctly ." ] }
{ "confidence": [ 80.42171478271484, 74.84310913085938, 55.43010711669922, 52.20097732543945, 52.20097732543945, 49.83798599243164, 47.009220123291016 ], "content": [ "Question : I m using Cloudify 2.7 with OpenStack Icehouse for a production environment . I would like to have High Availability of Cloudify Manager so that the state of the deployed applications can be saved and restored in case of problems . Which of the following solutions is the correct 1 Create 2 Cloudify Managers in each of them set a persistencePath property in the cloud configuration file .. . .. . 2 Create 2 Cloudify Managers without setting a persistencePath property in the cloud configuration file .. . .. . 3 Create 1 Cloudify Manager with a persistencePath property in the cloud configuration file .. . .. . Could I execute by means of a bash script into the Cloudify Manager the Cloudify command that saves the state of the deployed applications I mean the command that corresponds to the shutdown-managers using a cron-task Thanks .. . Answer : Option 1 is a bad one and not supported note that Cloudify 2.7 is not supported AT ALL - it has reached end of life . Both 2 and 3 are good options . 2 gives you High-Availability 3 gives you manager recovery . There is no command that saves the state of the manager - state is saved every time there is a change and persisted to the persistencePath directory Comment : You have asked a lot of cloudify questions but have not closed them either accepting answers or stating the problem with the answers .", "Question : I am using Cloudify 2.7 with OpenStack Icehouse . I would like know if it exists a documentation about the tuning of Cloudify JVM parameters . For example how should I configure correctly the gs.properties file into the config directory Does it exist other files I should configure Thanks .. . Answer : Cloudify JVM parameters are configured using the cloud driver configuration file . There are advanced settings to tweak both memory and port settings . These are available here : http : getcloudify.org guide 2.7 bootstrapping advanced cloud driver usage.html .. . .. . For instance :", "Question : Scenario .. . .. . Cloudify 2.7 application running a tomcat service instance .. . .. . Goal .. . .. . I would like to stop shut off and start the VM hosting tomcat using OpenStack APIs without Cloudify re-installs the tomcat recipe . What I tried to do .. . .. . I tried to use the Maintenance Mode following this http : getcloudify.org guide 2.7 developing maintenance mode.html guide : .. . .. . Setting a service instance to maintenance mode will disable host machine failure detection for that specific service instance . This means that during the specified time period a failure or a restart of a service instance host machine will NOT result in a provisioning of a new machine and service instance . So I have executed the following commands : .. . .. . After that what I saw in the Cloudify s Orchestraotor logs was the re-installation process of the tomcat service . In other words the tomcat VM now hosts tow tomcat Processing Units . Can someone suggest to me what should I do in order to reach my goal .. . Answer : That is the correct behavior of the default tomcat service provided with Cloudify 2.7 - after a restart the tomcat files are re-downloaded and deployed locally . If you want a different behavior you may want to tweak the tomcat recipe to save the tomcat files in a different location the default installation saves all files in a per instance work directory which will be replaced after a reboot . You can change the recipe to look for an existing installation and use it if it exists . Have a look at the following files : .. . .. . https : github.com CloudifySource cloudify-recipes blob master services tomcat tomcat init.groovy https : github.com CloudifySource cloudify-recipes blob master services tomcat tomcat install.groovy .. . .. . These are probably the files you will need to edit to achieve what you are looking for . Note how catalina base is set as a context property and that AntBuilder is used to download the tomcat installation and save it to a shared location . These are the files you will need to change . Please consider that Cloudify 2.x has reached end of life - you should consider moving to Cloudify 3 : http : getcloudify.org guide 3.1 quickstart.html Comment : Thank you Barak . How can I change the recipe to look for an existing installation and use it if it exists Should I verify if the root gigaspaces work processing-units is not empty Comment : Added some more notes to my answer - and again you should probably consider moving to Cloudify 3 . Comment : Thank you Barak . Unfortunately I can t moving to Cloudify 3 .", "Question : I m trying to create a Cloudify Manager into OpenStack with Keystone using HTTPS connection . When I execute the command : .. . .. . cfy bootstrap --install-plugins -p path to manager blueprint file -i path to inputs yaml file .. . .. . I receive the following error : .. . .. . raise exceptions.SslCertificateValidationError reason e SslCertificateValidationError : SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed 2016-01-29 09 : 50 : 58 CFY external network 5bbde.creation Task failed neutron plugin.network.creation validation - SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed attempt 1 6 .. . .. . What should I do to solve the problem .. . Answer : It seems that you have a problem with the keystone SSL certificate . You should either import the certificate to your CLI machine . Or you could try before bootstrap to run :", "Question : I m trying to create a Cloudify Manager into OpenStack with Keystone using HTTPS connection . When I execute the command : .. . .. . cfy bootstrap --install-plugins -p path to manager blueprint file -i path to inputs yaml file .. . .. . I receive the following error : .. . .. . raise exceptions.SslCertificateValidationError reason e SslCertificateValidationError : SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed 2016-01-29 09 : 50 : 58 CFY external network 5bbde.creation Task failed neutron plugin.network.creation validation - SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed attempt 1 6 .. . .. . What should I do to solve the problem .. . Answer : I solved inserting into the dsl definition of the OpenStack blueprint : .. . .. . the following statement : .. . .. . so that the final result was :", "Question : I am trying to pass blueprints inputs as environment-variables to a python script executed by script plugin during one of the lifecycle operations of a node . We are using Cloudify 3.1 . My blueprint looks like below trimmed it to show the required sections : .. . .. . and in my python script installer.py I am trying to access SQL USERNAME using os.environ.get SQL USERNAME DEFAULT . But I am always getting the default-value even when I pass a custom value via inputs during deploy .. . .. . What should I change to be able to access the input parameters as environment vairables from the inputs section of the blueprint in the script .. . Answer : After spending almost 24 hours found out that if the script is a python script and eval script is not set to false in the Process configuration options the environment-variables are not injected atleast for v 3.1 . Thanks to Dan Kilman . The snippet below is from Ref https : groups.google.com d msg cloudify-users mEAI9x9ivXQ 39Rg6KgKP4cJ .. . .. . They are indeed not exposed as environment-variables but are readily available as inputs by placing them in the top level inputs instead of the nested env.process and then doing something like .. . .. . from cloudify.state import ctx parameters as inputs .. . .. . afterward you can access these like this .. . .. . inputs in this case is just a sugared dict that allows top level key attribute-like access to the operation inputs you could just as well do inputs LOAD BALANCER IP ctx.logger.info inputs.LOAD BALANCER IP .. . .. . Wish this was explicitly stated in the docs . .", "Question : I can t arrive to use an axternal script for startDetection in Cloudify 2.7.1 . I try : .. . .. . and the result is : .. . .. . before the real end of the start script . And I try : .. . .. . and the result before the end of the start script is : .. . .. . and the result after the end of the start script is : .. . .. . In both case it doesn t work . I can only use the startDetection in closure like that : .. . .. . like the stopDetection . Someone know why .. . Answer : The log entries you copied above seem ok . With start detection if you use an external lifecycle script all you can do is pass a process return code which indicates pass fail . A zero return code indicates the test passed - start detection completed successfully . A non-zero value means the test did not pass . In your question when the start script completed successfully you get this : Process liveness test passed .. . .. . So the script finished correctly start detection passed . What is it exactly that doesn t work Comment : Thank you for your quick answer Barak . I thought the logs showed an error due to : SEVERE Event lifecycle external process exited with abnormal status code : 255 SEVERE Event lifecycle external process failed : .. . SEVERE Failed to execute entry : startDetection.groovy Caused by : org.cloudifysource.usm.USMException : Event lifecycle external process exited with abnormal status code : 255 .. . unexpected operator startDetection.groovy .. . Comment : Yeah the log severity is misleading here . But the operation seems to work correctly . BTW you may want to check out Cloudify 3 as Cloudify 2.X is nearing End of Life ." ] }
[ "yes-answer-long", "yes-answer-short" ]
open-source
UNK_RELATION
blat@command-line@25
blat -- blat is a win32 @placeholder utility that sends email using smtp or post to usenet using nntp .
{ "confidence": [ 58.0430908203125, 51.76880645751953, 50.83220672607422, 48.593971252441406, 47.889122009277344, 47.400421142578125, 47.0113525390625, 46.627349853515625, 45.1017951965332, 44.136024475097656, 43.6918830871582, 43.456016540527344, 43.456016540527344, 43.32901382446289, 42.75891876220703, 42.27725601196289, 42.27725601196289, 42.15024948120117, 41.098331451416016, 40.86447525024414, 40.360801696777344, 39.945404052734375, 39.8045654296875, 39.8045654296875, 39.80331802368164, 39.80331802368164, 39.40782928466797, 39.40782928466797, 39.40782928466797, 39.40782928466797, 38.96486282348633, 38.41838073730469, 38.39053726196289, 38.37045669555664, 37.63098907470703, 37.63098907470703, 37.63098907470703, 37.63098907470703, 37.3535270690918, 37.345428466796875, 37.230003356933594, 36.848960876464844, 36.74982452392578, 36.60124969482422, 36.45222854614258, 36.45222854614258, 36.4105110168457, 35.48646545410156, 35.48646545410156, 35.436180114746094, 35.20104217529297, 35.03944778442383, 34.972984313964844, 34.972984313964844, 34.89392852783203, 34.89392852783203, 34.89392852783203, 33.79422378540039, 33.45491027832031, 33.45388412475586, 33.117088317871094, 33.117088317871094, 33.117088317871094, 33.117088317871094, 32.89086151123047, 32.38144302368164, 32.36960220336914, 32.04110336303711, 31.93832778930664, 31.93832778930664, 31.93832778930664, 31.610210418701172, 30.52554702758789, 30.52554702758789, 30.52554702758789, 30.52554702758789, 30.52554702758789, 30.52554702758789, 30.52554702758789, 30.354488372802734, 30.354488372802734, 30.354488372802734, 30.057331085205078, 29.72501564025879, 29.175724029541016, 29.175724029541016, 28.514995574951172, 27.260272979736328, 27.260272979736328, 27.10013198852539, 26.701553344726562, 26.15192413330078, 25.677730560302734, 25.67136001586914, 25.293590545654297, 25.066303253173828, 24.66872787475586, 23.80029296875, 23.656574249267578, 22.72212791442871 ], "content": [ "But blat does not send the email .", "I am using the blat to send an email in a batch-file .", "I use the same smtp server address when installing blat .", "Does Blat utility not take CSS in to consideration", "I ve used blat for sometime to do this .", "You send an email using the profile ex : blat -p gmailsmtp .. . And thats it", "First I got blat mail http : blat.net public domain smtp mailer and dropped it into d : blat directory .", "I have a java application that does generates a report and then calls blat utility to send out the report as email attachment .", "Using Blat with gmaill you have to use stunnel .", "I simply moved blat from the windows directory to c : blat blat.exe and it works fine .", "Take a look here : .. . .. . Error in sending an email with BLAT http : stackoverflow.com questions 24364876 error-in-sending-an-email-with-blat 24365039 24365039", "Blat doesn t seem to support TLS .", "I need to work with blat tool .", "Now I want to echo the failure of the ping to another file and send it using email via blat .", "The quotation marks are causing blat to exit with error .", "With Blat http : www.blat.net on my server :", ".. . .. . I know how to use Blat .", "I trying to send the following HTML page as an email using the command-line tool blat .", "i trying to use Blat to send mail in local mail-server but the error message keep return saying that the smtp server does not like the sender name .", "We are shifting from Postie to BLAT .", "BLAT doesn t support SSL or TLS and thus will not work with Office 365 s SMTP server smtp.office365.com .", "Gmail requires an SSL connection to be accessed over SMTP which blat doesn t as of 06 02 2013 support .. . .. . See here : http : www.jeffkastner.com 2010 01 blat-stunnel-and-gmail for a slightly messy workaround .", "One of our report is using blat command to mail the report to the given mail ID .", "Is there a way I can get the position number of the mismatch from the following BLAT result using Python", "Blat do not support SSL TLS mail servers .", "HOWEVER Blat currently doesnot support SSL .", "I try to send a mail with an attachment with blat with the Shell command of Access VBA .", "That s very confusing.. . What command did you use to install blat with", "Mismatches are indicated by a space so we look for that in the middle line of the blat output .", "Make sure that you are defining the document as HTML in blat as well .", "Trying to sort out how to attach one or more files to an e-mail using a batch-file to be sent using blat .", "Here is powershell script .. . .. . send report.bat uses blat to send email .. . .. . How do I insert a into send report.bat", "I have to send a mail via BLAT .", "Is there a utility like Blat http : www.blat.net that can be used to receive mail perhaps via POP", "I used UCSC blat to search for a horse genomic sequence .", "You can put the body in a text file and have blat send that :", "Trying to execute blat http : www.blat.net from a shell script .", "I know that comma will be used to separate files and other stuff with Blat mailer .", "You have to use the post-commit script in your repositories hook directory : .. . .. . just place a post-commit.bat file there and put in your blat command .", "I d like to add something between the Robocopy line and the Blat line that will read the logfile and IF it detects a value greater than zero in the FAILED column THEN proceed to Blat the logfile to my email-address otherwise exit the batch without running Blat .", "It looks like the email in Thunderbird is being sent using Extended SMTP .", "I am using Blat http : www.blat.net that is command-line tool for sending the mail from command .", "So the java application first generates a report extracts info from .ini file and then calls blat with the give info to send out an email .", "But why would the smtp server accept that email and not an email with simply SMTP .", "Realize this is old but for any googlers : .. . .. . Blat will NOT work with gmail .", "to run blat is by creating a .bat file with the executions it needs to make .", "But when I add the 4th recipient in the list I can see the report being generated and also being dumped on command-line but from here on the program seems to be sitting there seems like its waiting for blat .. . but never executes blat send out email .", "enter image description here http : i.stack.imgur.com a2wSX.jpg .. . .. . EDIT 2 .. . .. . I tried on our server with our smtp and it works with Blat .", "Your 10060 timeout error is most likely being caused by your mail-server not listening to the Blat default SMTP port 25 .", "I will put my current method in an answer below using a program called blat to send me the result .", "We are looking for some way to notify users of email outage when gmail goes down so i found a program Blat which does this though our SMTP server .", "Here are the install commands for blat I tried : Which one should be working", "first time I ve used blat and it appears to work fine however its sending two emails for every email I intend to send .", "I have this code : .. . .. . It uses blat to send a email but it gives the error : .. . .. . Not enough arguments supplied .. . .. . Does any one know what I m doing wrong", "The second step uses the blat services to send the PDF to given mail ID.But this step is not working correctly .", "Some other reports which uses the blat services on the same server are working fine", "The number of quotes and double quotes was confusing me but this has worked and blat did not error .", "I m not real familiar with Blat per se but one thing you should know is that you shouldn t use classes in your HTML for email .", "Blat command used : blat D : reports mail send 2.html -t example@domain.com -s email subject -embed D : reports image1.png -embed D : reports image2.png -embed D : reports image3.png -html .. . .. . Could some one help me out here .", "The html file I am using is simply : .. . .. . There isn t much on Blat around and the few examples I have seen aren t working for me .", "The blat folks are saying the stunnel is the best bet for tls support but i ve found that gmail doesn t require tls to send mail .", "I am able to send body of text with blat and also schedule task with nncron to send at specified time .", "I downloaded the tool from the link below : http : genome.ucsc.edu FAQ FAQblat.html a blat file + blatSrc.zip file .", "I set the environmental PATH variable and i can call blat from any location with the command-prompt .", "The file-type by itself shouldn t matter with BLAT but your email provider might be balking at the size of PDF you re trying to send or may restrict sending PDF files altogether .", "My Exchange server allows me to email without id password and just assumes that I am the person in the from field of the blat command .", "Basically when I have 3 recipients in the list I can see the report being generated and also being dumped on command-line for verification purposes and a quick open close of command-line utility to send out email through blat .", "I don t want blat installed to system32 because I have a batch-file I m using it with in C : Users Nicholas Desktop Games .", "As @kfouwels http : stackoverflow.com users 2045964 kfouwels mentioned blat does not support SSL .", "Use Mail Alert Simple Mailer instead of Blat : https : sourceforge.net projects mail-alert", "CSS wasn t working when I tried to use classes on Blat had to mention the style tag for each element .", "The basic command is : blat database query output.psl .. . .. . For example if you want to search for a specific sequence in the human genome your command might be : blat hg19.fa query sequence.fa output.psl .. . .. . See more details here : http : genome.ucsc.edu goldenPath help blatSpec.html", "I went to http : www.jeffkastner.com 2010 01 blat-stunnel-and-gmail and followed it step by step .", "Stunnel installed installed service and started service successfully but blat still does not work after setting it up .", "Online I try to find syntax for the blat -install but none of them work or at least I dont understand how it works .", "I am willing to find an alternative to blat but if you give an alternative please give a tutorial not a suggestion .", "With blat -to mail@example.com -server smtp.gmail.com -f mail@example.com -subject subject -body body it returns -to does not exist .", "But adding Note.txt following blat returns this and I do not know why.. . Sending stdin.txt why not note.txt", "I use a batch-file triggering Robocopy and then Blat to send logfiles of a daily file copy task to a target address .", "blat is used to compare two datasets and output a .pslx file with these contigs which worked : .. . .. . Then this script is supposed to remove identical contigs such as the top two m.1", "The simplified script .. . .. . I get : .. . .. . I also tried by specifying the absolute path C : Windows System32 blat but that didn t work either .", "If you will only run blat from Bash you can just put it in usr local bin AKA C : cygwin64 usr local bin .", "I can send an email using Thunderbird .", "If you really want to stick with BLAT see Microsoft s How to set up a multifunction device or application to send email using Office 365 https : technet.microsoft.com en-us library dn554323 v exchg.150 .aspx for alternate options .", "The latter is Blat : http : www.blat.net .. . .. . The line in my batch : .. . .. . cmd.exe loads without success and finally I get a Windows crash : .. . .. . on Windows 7 .. . .. .", "Won t help you solve your current issue but if you give up on blat which is an interesting word in Russian.. . give it a try .", "stunnel -install -quiet stunnel -start -quiet rem 7z a archive.7z @listfile.txt blat -body .. . -server localhost : 587 -f thisisayndctest@gmail.com -to thisisayndctest@gmail.com -u thisisayndctest@gmail.com -pw genius -attach listfile.txt .. . .. . stunnel -stop -quiet stunnel -uninstall -quiet .. . .. . i keep getting the error Blat v2.6.2 w GSS encryption build : Feb 25 2007 12 : 06 : 19 .. . .. . Error : Server refused connection .", "I can use Blat to mail the contents of a .csv file which are printed in the mail body itself .. . .. . but if I add the attach or attachi switch the program just hangs .. . .. . How to fix this", "meanwhile some answer my question in an other forum and it works : Change ATTACH line to this : set ATTACH c : 517-BS24430-210416-NULL-0 750.pdf The tells Blat to take the text verbatim between the two .", "This switch means using SMTP port 465 .", "I am trying to configure mail sending using BLAT I use office 365 but due to some configuration issue I am having the problem of the following error .. . .. . The following commands I tried : .. . .. . Do I need to change the parameters that I am supplying", "Thanks RM Primary -to abcd@xyz.com -from mno@xyz.com -subject Test Mail .. . Blat v2.2.2 build : Feb 26 2004 10 : 37 : 13 .. . .. . Blat saw and processed these options and was confused by the last one.. . .. . .. . Do not understand argument : Hello test mail to prevent failure during delivery while sending automated mails Thanks mno .. . .. . I tried using breakline as well but even that is failing .", "I don t know blat personally so I m not sure if the output always comes in triplet lines but assuming it does the following function will return a list of positions mismatching each position represented as a tuple of the mismatching position in the top sequence and the same in the bottom sequence .", "Can you post the command-line you re using", "There are other command-line utilities you can use instead - see 7 Command Line Utilities to Easily Send Email Using SMTP https : www.raymond.cc blog sending-email-using-command-line-useful-for-downtime-alert-notification .", "If the process is not running the script starts the process correctly but sends and email saying the process is not running when in fact it is running .", "I have a folder on my desktop C : Users Nicholas Desktop Games which is where the contents of blat is placed and C : Users Nicholas Desktop Games stunnel is where stunnel files are installed .", "what are you using", "Can you share your stunnel config and the command you re using to send the email I m assuming is the top-command", "You will either have to : .. . .. . 1 . ask your ISP mailserver to open non-SSL communication or .. . 2 . get an SSL wrapper for Blat like Stunnel or .. . 3 . find another command-line mailer program that does support SSL ." ] }
{ "confidence": [ 68.4675521850586, 63.175376892089844, 61.10144805908203, 60.92716979980469, 60.673973083496094, 59.80119323730469, 59.77589416503906, 59.02491760253906, 58.69824981689453, 58.48456954956055, 57.802223205566406, 57.802223205566406, 57.580528259277344, 57.006649017333984, 55.51216125488281, 55.05028533935547, 54.699825286865234, 54.65851974487305, 54.49885940551758, 54.35247039794922 ], "content": [ "Question : I can send an email using Thunderbird . I use the same smtp server address when installing blat . But blat does not send the email . I get the following error : .. . .. . Any ideas on how to fix this Comment : This happens within cygwin on a Windows 7 machine . Comment : did this get resolved .. . Answer : Sounds like you may trying to use a regular connect rather than an http s connection . Or you may be useing the regular 80 port rather than the SSL port 443 or something like that . Comment : It looks like the email in Thunderbird is being sent using Extended SMTP . But why would the smtp server accept that email and not an email with simply SMTP . Is there a major difference between the two Comment : Yes if you are not using the correct ports for encrypted non-encrypted .", "Question : I am trying to configure mail sending using BLAT I use office 365 but due to some configuration issue I am having the problem of the following error .. . .. . The following commands I tried : .. . .. . Do I need to change the parameters that I am supplying .. . Answer : BLAT doesn t support SSL or TLS and thus will not work with Office 365 s SMTP server smtp.office365.com . There are other command-line utilities you can use instead - see 7 Command Line Utilities to Easily Send Email Using SMTP https : www.raymond.cc blog sending-email-using-command-line-useful-for-downtime-alert-notification . If you really want to stick with BLAT see Microsoft s How to set up a multifunction device or application to send email using Office 365 https : technet.microsoft.com en-us library dn554323 v exchg.150 .aspx for alternate options . You will not be able to do SMTP client submission but the others can work - depending on your setup .", "Question : I have a java application that does generates a report and then calls blat utility to send out the report as email attachment . The email info such as from to subject message etc are written in an .ini file . So the java application first generates a report extracts info from .ini file and then calls blat with the give info to send out an email . Everything seems in terms of generating report sending an email and so on is working perfectly fine until I add more than 3 recipients to the email list . Basically when I have 3 recipients in the list I can see the report being generated and also being dumped on command-line for verification purposes and a quick open close of command-line utility to send out email through blat . But when I add the 4th recipient in the list I can see the report being generated and also being dumped on command-line but from here on the program seems to be sitting there seems like its waiting for blat .. . but never executes blat send out email . I have tried adding all 4 recipients to -to flag and also to split recipients among -to and -cc flag . But the outcome stays same . Any help or thoughts are greatly appreciated .. . Answer : It sounds like your email server is doing something to it . Can you send the same attachment with the same id from your desk also how big is the report some servers multiply the attachment size by the number of mailboxes involved including the To address to come up with the message size limit .", "Question : After How to retrieve an error of 7-zip when running a batch-file http : stackoverflow.com questions 7752121 i need send an email since my batch-file . So I did some research online I tried many solutions without success . The latter is Blat : http : www.blat.net .. . .. . The line in my batch : .. . .. . cmd.exe loads without success and finally I get a Windows crash : .. . .. . on Windows 7 .. . .. . enter image description here http : i.stack.imgur.com 55Cf4.jpg .. . .. . EDIT .. . .. . By server and port at the end of the command I get an error instead of crash : .. . .. . enter image description here http : i.stack.imgur.com a2wSX.jpg .. . .. . EDIT 2 .. . .. . I tried on our server with our smtp and it works with Blat . Comment : In reality are you passing the arguments in a single line Comment : Yes I indented to avoid the scroll Comment : FWIW I ve been using XmlSendMail http : www.daveswebsite.com software sendmail for a few years and never had any problems with it . Won t help you solve your current issue but if you give up on blat which is an interesting word in Russian.. . give it a try . .. . Answer : Blat do not support SSL TLS mail servers . This is why you can t send an email . Use Mail Alert Simple Mailer instead of Blat : https : sourceforge.net projects mail-alert", "Question : i trying to use Blat to send mail in local mail-server but the error message keep return saying that the smtp server does not like the sender name . i have keep trying different sender name but still cannot anybody know how to fix it Pls help. . .. . Answer : I ve used blat for sometime to do this . here s the key . what are you using", "Question : I trying to send the following HTML page as an email using the command-line tool blat . Email is sent as expected but the images are not loaded in the email message.The email content looks like : .. . .. . enter image description here http : i.stack.imgur.com WRkeW.png .. . .. . I have tried using cid before the source path but in that case web page itself does not load the images as the path is resolved incorrectly . Blat command used : blat D : reports mail send 2.html -t example@domain.com -s email subject -embed D : reports image1.png -embed D : reports image2.png -embed D : reports image3.png -html .. . .. . Could some one help me out here . Thanks Comment : Have you viewed the source of the email to see if your cid matches Comment : @DavidP Thanks for your reply . I am seeing the images now . But the email format is not the same as html page . Does Blat utility not take CSS in to consideration Comment : I m not real familiar with Blat per se but one thing you should know is that you shouldn t use classes in your HTML for email . Not all email clients recognize it . Instead you should mark each HTML element with a style tag and explicitly set CSS attributes . Kind of a pain but.. . Comment : @DavidP . Thank you for the information . Yes . CSS wasn t working when I tried to use classes on Blat had to mention the style tag for each element . Comment : I m glad it works . I posted my previous comments as answer that you can accept . .. . Answer : Have you viewed the source of the email to see if your cid matches In addition one thing you should know is that you shouldn t use classes in your HTML for email . Not all email clients recognize it . Instead you should mark each HTML element with a style tag and explicitly set CSS attributes . Kind of a pain but.. .", "Question : I trying to send the following HTML page as an email using the command-line tool blat . Email is sent as expected but the images are not loaded in the email message.The email content looks like : .. . .. . enter image description here http : i.stack.imgur.com WRkeW.png .. . .. . I have tried using cid before the source path but in that case web page itself does not load the images as the path is resolved incorrectly . Blat command used : blat D : reports mail send 2.html -t example@domain.com -s email subject -embed D : reports image1.png -embed D : reports image2.png -embed D : reports image3.png -html .. . .. . Could some one help me out here . Thanks Comment : Have you viewed the source of the email to see if your cid matches Comment : @DavidP Thanks for your reply . I am seeing the images now . But the email format is not the same as html page . Does Blat utility not take CSS in to consideration Comment : I m not real familiar with Blat per se but one thing you should know is that you shouldn t use classes in your HTML for email . Not all email clients recognize it . Instead you should mark each HTML element with a style tag and explicitly set CSS attributes . Kind of a pain but.. . Comment : @DavidP . Thank you for the information . Yes . CSS wasn t working when I tried to use classes on Blat had to mention the style tag for each element . Comment : I m glad it works . I posted my previous comments as answer that you can accept . .. . Answer : Placed the images in the same folder as the Html page and then using cid and embed together worked as expected .", "Question : would you know what is the IP address of the SMTP GMAIL It allows you to send mail from a batch windows .. . .. . thank you in advance Comment : Why use the ip-address when you can use the domain-name Comment : I tried it but I still have a problem here is the error : 2014.07.21 11 : 15 : 16 Mon : The SMTP server does not like the sender name . Have you set your mail address correctly Comment : And why do you think it would be different if you used an IP-address The server would still complain . .. . Answer : Using Blat with gmaill you have to use stunnel . Take a look here : .. . .. . Error in sending an email with BLAT http : stackoverflow.com questions 24364876 error-in-sending-an-email-with-blat 24365039 24365039 Comment : thank you but i still have a problem here is the error : The SMTP server did not accept Auth PLAIN value . Are your login userid and password correct", "Question : I have a problem with stopping a service and starting it again and want to be notified when the process runs and let me know what the result is . Here s the scenario I have a text file output of an sc command . I want to send that file but not as an attachment . Also I want to see the initial status quickly in the subject of the email . Here s the servstop.txt file contents : .. . .. . SC StartService FAILED 1058 : .. . .. . The service cannot be started either because it is disabled or because it has no enabled devices associated with it . I want the subject of the email to be Alert Service Start : SC StartService FAILED 1058 and the body to contain the entire error message above . I will put my current method in an answer below using a program called blat to send me the result . .. . Answer : Here s how I m doing this . First I got blat mail http : blat.net public domain smtp mailer and dropped it into d : blat directory . My Exchange server allows me to email without id password and just assumes that I am the person in the from field of the blat command .", "Question : After How to retrieve an error of 7-zip when running a batch-file http : stackoverflow.com questions 7752121 i need send an email since my batch-file . So I did some research online I tried many solutions without success . The latter is Blat : http : www.blat.net .. . .. . The line in my batch : .. . .. . cmd.exe loads without success and finally I get a Windows crash : .. . .. . on Windows 7 .. . .. . enter image description here http : i.stack.imgur.com 55Cf4.jpg .. . .. . EDIT .. . .. . By server and port at the end of the command I get an error instead of crash : .. . .. . enter image description here http : i.stack.imgur.com a2wSX.jpg .. . .. . EDIT 2 .. . .. . I tried on our server with our smtp and it works with Blat . Comment : In reality are you passing the arguments in a single line Comment : Yes I indented to avoid the scroll Comment : FWIW I ve been using XmlSendMail http : www.daveswebsite.com software sendmail for a few years and never had any problems with it . Won t help you solve your current issue but if you give up on blat which is an interesting word in Russian.. . give it a try . .. . Answer : Realize this is old but for any googlers : .. . .. . Blat will NOT work with gmail . Gmail requires an SSL connection to be accessed over SMTP which blat doesn t as of 06 02 2013 support .. . .. . See here : http : www.jeffkastner.com 2010 01 blat-stunnel-and-gmail for a slightly messy workaround .", "Question : After How to retrieve an error of 7-zip when running a batch-file http : stackoverflow.com questions 7752121 i need send an email since my batch-file . So I did some research online I tried many solutions without success . The latter is Blat : http : www.blat.net .. . .. . The line in my batch : .. . .. . cmd.exe loads without success and finally I get a Windows crash : .. . .. . on Windows 7 .. . .. . enter image description here http : i.stack.imgur.com 55Cf4.jpg .. . .. . EDIT .. . .. . By server and port at the end of the command I get an error instead of crash : .. . .. . enter image description here http : i.stack.imgur.com a2wSX.jpg .. . .. . EDIT 2 .. . .. . I tried on our server with our smtp and it works with Blat . Comment : In reality are you passing the arguments in a single line Comment : Yes I indented to avoid the scroll Comment : FWIW I ve been using XmlSendMail http : www.daveswebsite.com software sendmail for a few years and never had any problems with it . Won t help you solve your current issue but if you give up on blat which is an interesting word in Russian.. . give it a try . .. . Answer : You can use mailsend https : github.com muquit mailsend instead . As @kfouwels http : stackoverflow.com users 2045964 kfouwels mentioned blat does not support SSL .", "Question : After How to retrieve an error of 7-zip when running a batch-file http : stackoverflow.com questions 7752121 i need send an email since my batch-file . So I did some research online I tried many solutions without success . The latter is Blat : http : www.blat.net .. . .. . The line in my batch : .. . .. . cmd.exe loads without success and finally I get a Windows crash : .. . .. . on Windows 7 .. . .. . enter image description here http : i.stack.imgur.com 55Cf4.jpg .. . .. . EDIT .. . .. . By server and port at the end of the command I get an error instead of crash : .. . .. . enter image description here http : i.stack.imgur.com a2wSX.jpg .. . .. . EDIT 2 .. . .. . I tried on our server with our smtp and it works with Blat . Comment : In reality are you passing the arguments in a single line Comment : Yes I indented to avoid the scroll Comment : FWIW I ve been using XmlSendMail http : www.daveswebsite.com software sendmail for a few years and never had any problems with it . Won t help you solve your current issue but if you give up on blat which is an interesting word in Russian.. . give it a try . .. . Answer : With Blat http : www.blat.net on my server :", "Question : I am using Blat http : www.blat.net that is command-line tool for sending the mail from command . First I run the install command to store the mail-server which create the entry in registry like that........ . enter image description here http : i.stack.imgur.com 80YvF.png .. . .. . First I was set the SMTP server to smtp.mail.yahoo.com but the error was same . After that I execute .. . .. . After that this error I got...... . .. . Answer : Your 10060 timeout error is most likely being caused by your mail-server not listening to the Blat default SMTP port 25 . Many ISP mail servers have switched to SSL encryption for authenication . This switch means using SMTP port 465 . HOWEVER Blat currently doesnot support SSL . You will either have to : .. . .. . 1 . ask your ISP mailserver to open non-SSL communication or .. . 2 . get an SSL wrapper for Blat like Stunnel or .. . 3 . find another command-line mailer program that does support SSL .", "Question : I am sending an email once the svn commit is successful . Now I want to send the committed revision number output of svn status -u also in the email . I am using the blat to send an email in a batch-file . Please do let me know how can I send an committed revision number in an email . .. . Answer : You have to use the post-commit script in your repositories hook directory : .. . .. . just place a post-commit.bat file there and put in your blat command . Note : You have to use full pathnames to all execuables as your PATH environment is empty . Subversion will call your script after each commit and passes 2 arguments : .. . .. . The path to your repository as 1 .. . The commited revision number as 2", "Question : So.. . here s my issue . Forgive me I am pretty inexperienced in coding but im trying to get something to work for my company . We are looking for some way to notify users of email outage when gmail goes down so i found a program Blat which does this though our SMTP server . I have looked through their support documents and google but cant seem to find a how to on this . The best way That i know of to run blat is by creating a .bat file with the executions it needs to make . For the -to function The to : section in the email i want to have it call an excel or csv document with the phone numbers in it . Is there any way to do this .. . Answer : I suggest not sending out individual emails but but a slew of the addresses in the BCC field . you can just load in the addresses with a as the delimiter and send .", "Question : I m using Get-EventLog to set a variable and then setting another variable with the event ID description . I then use blat.exe to email this information to a group . The description contains quotation marks . The quotation marks are causing blat to exit with error . Is there a way to remove the quotes from the event.Message and replace them with a space or something .. . Answer : I actually just got it . The number of quotes and double quotes was confusing me but this has worked and blat did not error . Those quotes are : single double single comma double double .", "Question : One of our report is using blat command to mail the report to the given mail ID . The first step produces the PDF file and saves it in the server this step is working fine . The second step uses the blat services to send the PDF to given mail ID.But this step is not working correctly . Some other reports which uses the blat services on the same server are working fine .. . Answer : Can you post the command-line you re using It may be that you have spaces in your file name and don t have it properly quoted .", "Question : null .. . Answer : stunnel -install -quiet stunnel -start -quiet rem 7z a archive.7z @listfile.txt blat -body .. . -server localhost : 587 -f thisisayndctest@gmail.com -to thisisayndctest@gmail.com -u thisisayndctest@gmail.com -pw genius -attach listfile.txt .. . .. . stunnel -stop -quiet stunnel -uninstall -quiet .. . .. . i keep getting the error Blat v2.6.2 w GSS encryption build : Feb 25 2007 12 : 06 : 19 .. . .. . Error : Server refused connection . can you help me to figure out how to fix this problem . Thanks Comment : Can you share your stunnel config and the command you re using to send the email I m assuming is the top-command That s very confusing.. . What command did you use to install blat with", "Question : I ve been looking everywhere for this answer and have had no luck I went to http : www.jeffkastner.com 2010 01 blat-stunnel-and-gmail and followed it step by step . Stunnel installed installed service and started service successfully but blat still does not work after setting it up . I have a folder on my desktop C : Users Nicholas Desktop Games which is where the contents of blat is placed and C : Users Nicholas Desktop Games stunnel is where stunnel files are installed . And I also tried this when stunnel was installed to program files and it still did not work . I don t want blat installed to system32 because I have a batch-file I m using it with in C : Users Nicholas Desktop Games . Online I try to find syntax for the blat -install but none of them work or at least I dont understand how it works . This is what I believe : .. . .. . 1 . You need to install your profile .. . 2 . You send an email using the profile ex : blat -p gmailsmtp .. . And thats it It doesn t work for me . I am willing to find an alternative to blat but if you give an alternative please give a tutorial not a suggestion . Here are the install commands for blat I tried : Which one should be working Here are email commands I tried : .. . .. . and a lot more commands that I can t remember . Anyway anyone find where I tripped here Comment : No error messages were given in your attempts Here s another similar question stackoverflow.com questions 709635 sending-mail-from-batch-file http : stackoverflow.com questions 709635 sending-mail-from-batch-file Comment : Yes excuse me is SMTP server set to smtp.gmail.com on port 127.0.0.1 : 1099 with user retry 1 time s an error message With blat -to mail@example.com -server smtp.gmail.com -f mail@example.com -subject subject -body body it returns -to does not exist . But adding Note.txt following blat returns this and I do not know why.. . Sending stdin.txt why not note.txt to myemail@example.com . Login name is myemail@example.com . Error : Can t resolve service.Error : Not a socket . Comment : A quick search resulted in blog.frogslayer.com http : blog.frogslayer.com sending-an-email-through-google-smtp-via-windows-command-line which might have more information . Also the comments there may be useful . Comment : Thank you @user4317867 but sadly no luck . I think my computer is trying to connect to port 25 and I know it is blocked I heard it needs to run through port 465 but how If all fails does anyone have a vbscript that can send a simple email Trust me I ll make any alternative for a batch script as long as it doesn t bring up a browser window . .. . Answer : Yes I found a vbscript script that finally worked On this thread Email sending not working http : community.qlik.com thread 25067 Miguel posted the following script .. . .. . Sub SendGMail .. . .. . Object creation .. . Set objMsg CreateObject CDO.Message Set msgConf CreateObject CDO.Configuration .. . .. . Server Configuration .. . msgConf.Fields.Item http : schemas.microsoft.com cdo configuration sendusing 2 msgConf.Fields.Item http : schemas.microsoft.com cdo configuration smtpserver smtp.gmail.com .. . msgConf.Fields.Item http : schemas.microsoft.com cdo configuration smtpserverport 465 .. . msgConf.Fields.Item http : schemas.microsoft.com cdo configuration smtpauthenticate 1 msgConf.Fields.Item http : schemas.microsoft.com cdo configuration sendusername user@gmail.com msgConf.Fields.Item http : schemas.microsoft.com cdo configuration sendpassword password .. . msgConf.Fields.Item http : schemas.microsoft.com cdo configuration smtpusessl 1 msgConf.Fields.Update .. . .. . Email .. . objMsg.To user@gmail.com objMsg.From fromuser@domain.com objMsg.Subject Test send with Gmail account objMsg.HTMLBody HTML Plain text message . objMsg.Sender Mr . Name .. . .. . Set objMsg.Configuration msgConf .. . .. . Send .. . objMsg.Send .. . .. . Clear .. . Set objMsg nothing .. . Set msgConf nothing .. . .. . End Sub .. . .. . This script is working but a lot of people still had problems looking closer into the script I realized I didn t even recall the SendGMail To make this work I simply typed SendGMail on the next line and BAM I got an email Thank you @user4317867 for helping me find my answer . Comment : Happy to help you can execute a script on the command-line using CSCRIPT.EXE more help here technet.microsoft.com en-us library bb490816.aspx https : technet.microsoft.com en-us library bb490816.aspx Comment : Sweet man thanks .", "Question : I have a windows-server which sends emails to me through a BASIC program . If the message body contains carriage returns line feeds then the email never finishes . Only the first line is sent to me . I tried replacing them with n but that didn t help as the email came to me with the n in it . Any ideas Here is the command I m using : .. . Answer : You can put the body in a text file and have blat send that :" ] }
[ "yes-answer-long", "yes-answer-short" ]
command-line
UNK_RELATION
gevent@libevent@134
gevent -- gevent is a coroutine-based python networking library that uses greenlet to provide a high-level synchronous api on top of @placeholder libev after 1.0 event-loop .
{ "confidence": [ 63.97372817993164, 54.14378356933594, 54.03666305541992, 54.00862121582031, 51.11738967895508, 47.73588180541992, 47.276084899902344, 46.67958450317383, 46.6107177734375, 46.49055480957031, 45.94304656982422, 45.279869079589844, 44.536197662353516, 43.657657623291016, 43.657657623291016, 43.657657623291016, 43.3785285949707, 43.173439025878906, 43.05364990234375, 42.89400100708008, 42.74681091308594, 42.616233825683594, 42.43180847167969, 42.02379608154297, 41.61479568481445, 41.61479568481445, 41.5391845703125, 41.5391845703125, 41.5009765625, 41.47563552856445, 41.26393127441406, 41.245849609375, 40.757362365722656, 40.184452056884766, 40.1821174621582, 40.16230773925781, 40.16230773925781, 40.16230773925781, 40.16193389892578, 40.08567428588867, 39.97922134399414, 39.953330993652344, 39.8843994140625, 39.67340087890625, 39.67340087890625, 39.390968322753906, 39.268836975097656, 39.01115036010742, 38.94195556640625, 38.84618377685547, 38.79283905029297, 38.68177032470703, 38.5886344909668, 38.0438346862793, 37.89664840698242, 37.88644027709961, 37.81635284423828, 37.81635284423828, 37.81635284423828, 37.7524299621582, 37.725677490234375, 37.71989440917969, 37.71989440917969, 37.62202453613281, 37.47904968261719, 37.47904968261719, 36.85276412963867, 36.79761505126953, 36.755340576171875, 36.66145324707031, 36.657325744628906, 36.57011413574219, 36.26741027832031, 36.26741027832031, 36.26741027832031, 36.26741027832031, 36.26741027832031, 36.26741027832031, 36.168487548828125, 35.97269821166992, 35.95138168334961, 35.95138168334961, 35.850006103515625, 35.818328857421875, 35.697879791259766, 35.697879791259766, 35.697879791259766, 35.6978645324707, 35.54766845703125, 35.4981575012207, 35.34512710571289, 35.3038215637207, 35.3038215637207, 35.3038215637207, 35.3038215637207, 35.25568389892578, 35.15932083129883, 35.069435119628906, 34.98779296875, 34.66124725341797 ], "content": [ "gevent is only a coroutine library using an event-loop .", "The event-loop in Gevent is libev libevent which is written in C and the event-loop in Twisted is the reactor which is written in python .", "This is on Python 2.7.2 gevent 1.0.1 and greenlet 0.4.5 .", "python -c import gevent print gevent . version python -c import greenlet print greenlet . version", "From the gevent website http : gevent.org : .. . .. . Fast event-loop based on libev epoll on Linux kqueue on FreeBSD .", "Note that the new alpha version 1.0a3 of gevent http : code.google.com p gevent downloads list uses libev http : blog.gevent.org 2011 04 28 libev-and-libevent and does not include a WSGI server based on libevent-http .", "The gevent monkey patcher will patch the standard-library to be Greenlet friendly .", "If the code is dealing with a single connections from a single greenlet the coroutine mechanism of gevent will not help .", "Regarding the rest of your question : Twisted is an event-based networking library it could be considered an alternative to Gevent in this application .", "I guess the process you present looks following : .. . .. . Tornado IOLoop waits for event for http server .. . HTTP request is handled .. . Handlers run get method which runs gevent event-loop gevent starts the event-loop implicitly in a dedicated greenlet .. . gevent s event-loop blocks the Tornado greenlet parent of the greenlet where gevent s event-loop lives .. . request s greenlet waits for finish .. . request s greenlet is finished gevent s event-loop is closed end Tornado IOLoop is released .", "Which gevent and greenlet version do you use", "I have complex python program that uses gevent .", "The gevent documentation discourages usage of the raw greenlet methods : .. . .. . Being a greenlet subclass Greenlet also has switch and throw methods .", "I ran into a peculiar issue with gevent and greenlet that I can t troubleshoot .", "For gevent pool we could use the paramter -c to specify the greenlet number .", "Celery could specify the max greenlet number when it worked with gevent .", "I have understood that problem in windows build of gevent and I have succesful try to rebuild gevent and greenlet libraries but it not helped .", "If you have any problem with heartbeats you have a server-side gevent greenlet issue and you should gevent monkey patch it i.e .", "You can use a threadpool starting with gevent 1.0 http : code.google.com p gevent downloads list :", "Without gevent the inner loop generates : .. . .. . With gevent you will have occurences of : .. . .. . When the recvfrom call is blocking EAGAIN gevent goes back to the event-loop so additional calls are done to wait for file descriptors events epoll wait .", "Running python 2.7.11 and gevent 1.0.2 .", "I have an application based on gevent .", "github.com surfly gevent blob master gevent pool.py https : github.com surfly gevent blob master gevent pool.py", "From the Gevent introduction http : sdiehl.github.io gevent-tutorial : .. . .. . Only one greenlet is ever running at any given time .", "Of course with python language and work together with gevent .", "I m using gevent 1.0.0 on python-2.7 on raspbian", "Both eventlet and gevent could be made to run on Stackless rather than on greenlet .", "But I m curious of the possibility of linking external greenlet with gevent and internal one in PyPy .", "Updated link-to psycopg2 gevent example : github.com gevent gevent blob master examples psycopg2 pool.py https : github.com gevent gevent blob master examples psycopg2 pool.py", "https : github.com gevent gevent issues 702 .. . .. . Thanks", "If this is a gevent bug related to libevent there is a good chance that it is fixed in 1.0bx since it uses libev .", "But why does gevent not transfer control back to the first greenlet after the other one blocks on socket", "I assume you know gevent-psycopg2 https : github.com zacharyvoase gevent-psycopg2 module which makes psycopg greenlet-friendly .", "I m quite new to Gevent Greenlet and have gone through the tutorials .", "The key difference between Gevent and Twisted is that Gevent uses greenlets and monkey patching the standard-library for an implicit behavior and a synchronous programming model whereas Twisted requires specific libraries and callbacks for an explicit behavior .", "I am writing a Gevent Flask server in Python .", "gevent 1.1.2 .. . celery 3.1.23 .. . python 2.7.11", "What OS Python Gevent are you using", "Does monkey patching with gevent not magically turn synchronous code into asynchronous code", "I m using Python 2.7.5 on Centos 7 and using python-gevent 1.0-2.el7 .", "Its core is greenlet 0.4.0 which is available in python 3 but not the full libraries gevent evenlet or concurrence .", "I m new to python and I m trying to test gevent-socketio examples with no luck .", "Gevent or Eventlet .", "What I confuse is corecffi build.py https : github.com gevent gevent tree v1.1.1 gevent .", "gevent has integration with zeromq as well : gevent-zeromq https : github.com traviscline gevent-zeromq", "pypi.python.org packages source g gevent gevent-0.13.6.tar.gz http : pypi.python.org packages source g gevent gevent-0.13.6.tar.gz download it here .", "I am newbie to Gevent .", "The solution was to server the WSGI app with either the gevent or gunicorn server with the gevent worker .", "With gevent 1.0 readline and read still block process and wait for process to finish .", "Matplotlib is not threadsafe but gevent monkey patching should make everything single-threaded turning the matplotlib event queue into another coroutine .", "You definitely don t want greenlet for this purpose because it s a low-level library on top of which you can create light thread libraries like Eventlet and Gevent .", "Install eventlet or gevent and gevent-websocket for improved performance . .. . .. . The third option using gevent as the async mode does not work for me as well as gevent does not have support for python 3 yet .", "As Gevent is based on libev http : software.schmorp.de pkg libev.html it is most likely compiling binaries when being installed via pip .", "Gevent isn t pure Python and it strictly depends on CPython .", "I ve been having a bit of trouble getting Nginx to play nicely with the Python Flask-socketio library which is based on gevent .", "I m using Python Flask Gevent if that s any help for anyone .", "This only applies to gevent 1.1", "Why you use gevent", "Gevent solution is similar to the eventlet .", "here is my error when I try to install gevent-socketio .. . .. . Installing collected packages : gevent greenlet Running setup.py install for gevent building gevent.core extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DLIBEV EMBED 1 -DEV COMMON -DEV CHECK ENABLE 0 -DEV CLEANUP ENABLE 0 -DEV EMBED ENABLE 0 -DEV PERIODIC ENABLE 0 -Ibuild temp.linux-x86 64-2.7 libev -Ilibev -I usr include python2.7 -c gevent gevent.core.c -o build temp.linux-x86 64-2.7 gevent gevent.core.o gevent gevent.core.c : 17 : 20 : fatal-error : Python.h : No such file or directory compilation terminated .", "I am using gevent greenlet so I am very constrained by everything related to CPU computation .", "from gevent import monkey monkey.patch all .", "But my question is not focus on gevent usage .", "I am trying to replicate the example simple chat in the gevent-socketio module gevent-socketio https : gevent-socketio.readthedocs.org en latest simple chat example https : github.com abourget gevent-socketio tree master examples simple chat .", "To do this change the line for gevent-socketio in requirements.txt to", "Is there any way in gevent to enable wildcard namespace", "There are gevent and tornado handlers for it .", "FYI Denis has now fixed issue 150 in HEAD of gevent soon to be released as gevent-1.0b4 .", "Consumers are pre-forked processes that uses gevent to spawn multiple tasks .", "How do I use sh python-module with gevent", "After having read Greenlet Vs . Threads http : stackoverflow.com questions 15556718 greenlet-vs-threads I looked into gevent but I fail to get it reliably to run .", "gevent .. . gevent-socketio .. . gunicorn .. . .. . run.py .. . .. . Command Used - .. . .. . The Connections seems to be getting Dropped and Reconnected Often Logs -", "I thought of using gevent for this purpose .", "Uninstall Gevent .. . .. . Install the magic version", "I see you marked this as gevent .", "Unfortunately Gevent does not allow for parallelism .", "I am playing with gevent and websockets .", "I use gevent-socketio in project .", "I have a gevent-socketio server program similar to the simple-chat-example https : github.com abourget gevent-socketio tree master examples simple chat running .", "when urlopen is called and if theres more than one connection or new event occured gevent switches to other coroutine when content arrives on socket it switches back to urlopen coroutine and returns result .", "gevent will take care of preemption when some library in db or web blocks .", "This is where gevent replaces the stdlib socket library with its own .", "After using ThreadPoolExecutor with gevent in my high-concurrent app I can confirm that this works fine .", "I m using gevent to handle API I O on a Django-based web system .", "What about Eventlet or gevent", "Is gevent a hard requirement", "There are another way to install gevent", "I use bottle gevent for my python 2.7.6 application .", "I have a small HTTP server written using gevent that accepts incoming connections and sends back data using a per-connection greenlet .", "We re using gevent with Django and uwsgi in our environment and I m aware that child-process creation via multiprocessing in the context of gevent yields an undesired event-loop state in the child .", "@Xar suggestion is correct you must use the gearbox gevent server if you want to serve with GEVENT .", "Are Gevent and Eventlet in the same category as Twisted", "I don t even need gevent for that .", "pip install gevent-socketio 0.3.6", "I m using gevent-socketio 0.3.6 .", "However whenever it initializes it begins to import the grequests library but fails because of it s dependency on gevent : .. . .. . Gevent is required for grequests . .. . .. . It seems it is successfully finding the grequests library since it knows it needs gevent but fails .", "The point is I was wondering how to integrate gevent into flask and how do people who use gevent deal with situations where it s borderline impossible to make a synchronous task green .", "If this is the case then uninstall gevent and then download the 64-bit version here http : www.lfd.uci.edu gohlke pythonlibs gevent .", "I found that the gevent-socketio library would probably be best for my purposes .", "gevent-socketio version 0.3.5-rc2 was uploaded to Pypi in July 2012 ." ] }
{ "confidence": [ 86.6926498413086, 80.17513275146484, 72.18719482421875, 68.99761962890625, 66.36924743652344, 64.60348510742188, 64.52706909179688, 63.410430908203125, 62.628684997558594, 62.348052978515625, 61.368621826171875, 60.15057373046875, 59.957252502441406, 59.34344482421875, 59.18634796142578, 58.89311218261719, 57.84134292602539, 57.69379425048828, 57.54502868652344, 57.40427780151367 ], "content": [ "Question : null .. . Answer : I m trying to figure out how Gevent works with respect to other asynchronous frameworks in python like Twisted . The key difference between Gevent and Twisted is that Gevent uses greenlets and monkey patching the standard-library for an implicit behavior and a synchronous programming model whereas Twisted requires specific libraries and callbacks for an explicit behavior . The event-loop in Gevent is libev libevent which is written in C and the event-loop in Twisted is the reactor which is written in python . Is there anything special about libev libevent that allows for this implicit behavior Why not use an event-loop written in Python Conversely why isn t Twisted using libev libevent Is there any particular reason Maybe it was simply a design choice and could have gone either way.. . .. . .. . Theoretically can Gevent s libev be replaced with another event-loop written in python like Twisted s reactor And can Twisted s reactor be replaced with libev", "Question : I am playing with gevent and websockets . This is a simple echo-server : .. . .. . and the client : .. . .. . Because of gevent I was expecting to have several greenlets serving the data asynchronously that is if I pushed some data to the websocket several times quickly clicking on the Push button I was expecting to have it all back simultaneously after 5 seconds of waiting . However no matter how fast I click the Push button this is what I get in the console : .. . .. . why does it receive my data synchronously pausing every 5 seconds How do I turn it into an asynchronous server .. . Answer : The behavior is synchronous because your own code is synchronous . gevent is only a coroutine library using an event-loop . It does not magically turn synchronous code into asynchronous code . Please have a look at the documentation at : http : www.gevent.org servers.html .. . .. . It is said that the servers spawn one greenlet per connection not per request . The execution of multiple requests for the same connection is therefore serialized . If you want to concurrently handle multiple requests for the same connection you need to spawn new greenlets or delegate the processing to a pool of greenlets . Here is an example spawning a greenlet at each request : .. . .. . Note the presence of the semaphore . Because the processing is concurrent it is needed to prevent two concurrent greenlets to write at the same time on the socket resulting in corrupted messages . Last point with this implementation there is no guarantee that the replies will be sent in the order of the requests . Comment : Does monkey patching with gevent not magically turn synchronous code into asynchronous code Comment : Only if you have multiple greenlets and connections . If the code is dealing with a single connections from a single greenlet the coroutine mechanism of gevent will not help . In other words magic only happens when you believe in it and structure your code accordingly -", "Question : I think requests.get should be block so there should be no difference between run and run2 . but result is : .. . .. . so are there all kind read-write could be speed up by gevent PS : I run it on mac python3 requests 2.10.0 gevent 1.1.2 Comment : I m not too familiar with gevent but I d imagine it s due to I O . When you make a web request there s the overhead of establishing a connection with the server making the handshake etc . A lot of this ends up idle time during which the client is waiting for a response . While it s idle gevent most likely sends out other requests . The Python-only implementation though will wait for each request to complete before sending out another . Comment : that make sense so r equests.get not block all the time part of his job are replace by gevent which can do something else if block . the point is how much gevent can change requests for example he can change almost all urllib .so that is much faster than requests . .. . Answer : From the gevent website http : gevent.org : .. . .. . Fast event-loop based on libev epoll on Linux kqueue on FreeBSD . .. . Lightweight execution units based on greenlet . .. . API that re-uses concepts from the Python standard-library for example there are gevent.event.Events and gevent.queue.Queues . .. . Cooperative sockets with SSL support .. . .. . DNS queries performed through threadpool or c-ares . .. . Monkey patching utility to get 3rd party modules to become cooperative .. . .. . Basically just for looping a bunch of requests.get calls is slow due to the fact that you re well for looping through a bunch of requests.get calls . Gevent ing a bunch of requests.get calls isn t slow due to the fact that you re throwing those calls into a threaded Queue instead which then uses gevent s powerful API to run through those calls incredibly efficiently . Comment : en i know what your meaning.but you re throwing those calls into a threaded Queue instead that not change anything if job is block one time do one job and the job is sleep to wait nobody move untill he s work done . Comment : In your example blocking doesn t actually affect anything . You re only requests.get ing . Really . So the Thread Queue fires off as many of those jobs as gevent your processor will allow . Now if you were having that modify a variable say a string value based on page text blocking would definitely come into play there due to the GIL .", "Question : Is it possible to use python s standard libs xmlrpclib with gevent Currently i m tried to use monkey.patch all but without success . urllib2.urlopen is blocking server . It looks to me that monkey.patch all did not patched socket that s why it blocks . .. . Answer : The socket is patched fine but there are other problems with your code . First this .. . .. . is the same as .. . .. . You re spawning a new greenlet here but then blocking the current one until that new one is done . It does not make things concurrent . It s exactly the same as just running urlopen and waiting for it to finish . Second in order to take advantage of gevent http : www.gevent.org there got to be more than one lightweight thread greenlet running at the same time . SimpleXMLRPCServer however is defined as .. . .. . which means it serves one connection at a time . If you make your own SimpleXMLRPCServer class but use ThreadingTCPServer instead of TCPServer you should be able to benefit from using gevent here . monkey.patch all http : gevent.org gevent.monkey.html patches threading to become greenlet-based so such server will spawn a new greenlet for each new connection . Comment : Thank You Threaded version is working as expected But how to return result asyncrhonously from urllib2.urlopen Comment : I m not sure I understand what you mean by return result asynchronously . What are you trying to achieve Comment : Correct me if i im wrong . Each new connection is spawned in new greenlet so i dont need to spawn urlopen in new greenlet . when urlopen is called and if theres more than one connection or new event occured gevent switches to other coroutine when content arrives on socket it switches back to urlopen coroutine and returns result . Comment : that s right if server spawns a new greenlet for each connection urlopen will only block the current greenlet and will let the others run . Comment : ok thanks for clarification and thanks for open sourcing such great lib .", "Question : I am trying to use gevent as wsgi server and use tornado WSGIApplication to process requests . Here s the code .. . .. . And I use apache benchmark to test the performance . Test command is .. . .. . ab -n 1000 -c 100 http : 127.0.0.1 : 9010 .. . .. . This resulting 100req per second it is too slow . In the above code I just put a http-request to other side I think in this situation gevent will switch to other greenlet when block and it should has little influence on the performance but gevent s performance decrease from 1600req per second to 100 req per second I can t figure out why . Could anyone explain this Comment : Use ab -n 10000 -c 1000 127.0.0.1 : 9010 http : 127.0.0.1 : 9010 and you will get much better result because tornado is async . Why you use gevent Comment : @nikolayFominyh I want to use requests to send asynchronous request to other website tornado s http client does not fit my need so I want to combine gevent and requests in tornado Comment : @MartinLuo Check my answer it should fir your needs . It s a bit long but I wanted it to be clear . Don t forget to upvote and aprove : .. . Answer : Try to test requests package only with gevent sample application to chceck if it is truly asynchronous . Maybe the reason is that gevent doesn t patch correctly everything required by requests .. . .. . But I think that your solution is not asynchronous from gevent site : you are trying to run 2 event loops . I guess the process you present looks following : .. . .. . Tornado IOLoop waits for event for http server .. . HTTP request is handled .. . Handlers run get method which runs gevent event-loop gevent starts the event-loop implicitly in a dedicated greenlet .. . gevent s event-loop blocks the Tornado greenlet parent of the greenlet where gevent s event-loop lives .. . request s greenlet waits for finish .. . request s greenlet is finished gevent s event-loop is closed end Tornado IOLoop is released . Look also at some success combination of Tornado and greenlets : tornalet https : github.com Gawen tornalet Motor http : emptysquare.net motor .", "Question : here is my error when I try to install gevent-socketio .. . .. . Installing collected packages : gevent greenlet Running setup.py install for gevent building gevent.core extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DLIBEV EMBED 1 -DEV COMMON -DEV CHECK ENABLE 0 -DEV CLEANUP ENABLE 0 -DEV EMBED ENABLE 0 -DEV PERIODIC ENABLE 0 -Ibuild temp.linux-x86 64-2.7 libev -Ilibev -I usr include python2.7 -c gevent gevent.core.c -o build temp.linux-x86 64-2.7 gevent gevent.core.o gevent gevent.core.c : 17 : 20 : fatal-error : Python.h : No such file or directory compilation terminated . error : command gcc failed with exit status 1 Complete output from command usr bin python -c import setuptools file var www bleu build gevent setup.py exec compile open file .read .replace r n n file exec install --single-version-externally-managed --record tmp pip- kv6Fy-record install-record.txt : running install .. . .. . running build .. . .. . running build py .. . .. . running build ext .. . .. . building gevent.core extension .. . .. . gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DLIBEV EMBED 1 -DEV COMMON -DEV CHECK ENABLE 0 -DEV CLEANUP ENABLE 0 -DEV EMBED ENABLE 0 -DEV PERIODIC ENABLE 0 -Ibuild temp.linux-x86 64-2.7 libev -Ilibev -I usr include python2.7 -c gevent gevent.core.c -o build temp.linux-x86 64-2.7 gevent gevent.core.o .. . .. . gevent gevent.core.c : 17 : 20 : fatal-error : Python.h : No such file or directory .. . .. . compilation terminated . .. . error : command gcc failed with exit status 1 .. . .. . Have you an idea how i can fix this .. . Answer : Install the Development Package s : .. . .. . CentOS RHEL : : .. . .. . Debian Ubuntu : Comment : thanks problem solved", "Question : I m trying to create a GUI framework that will have an event-loop . some threads to handle the UI and some for event-handling . I ve searched a little bit and found these three libraries and I m wondering which one is better to use what are the pros and cons I could use one of these three library or even create create something for myself by using python threads or concurrent library . I would appreciate sharing any kind of experience benchmark and comparison . Comment : reading this blog post very carefully might help blog.gevent.org 2010 02 27 why-gevent https : blog.gevent.org 2010 02 27 why-gevent .. . Answer : You definitely don t want greenlet for this purpose because it s a low-level library on top of which you can create light thread libraries like Eventlet and Gevent . Eventlet Gevent and more similar libraries provide excellent toolset for IO-bound tasks waiting for read-write on file network . Likely most of your GUI code will wait for other threads at this point green light OS thread is irrelevant to finish which is a perfect target for above mentioned libraries . All green thread libraries are mostly the same . Try all and decide which one suits your project best . But also it s possible that you ll need to extract some things into a separate OS thread due to requirements of OS level GUI layer . Considering that and better implementation of thread lock in Python3 you may want to just stick with native threading module if your application doesn t need hundreds or more threads .", "Question : I want to try playing around with gevent as a web server and application framework . I don t see any way to restart the server or update the application code without killing and starting the whole python application again . Is this just how it s done Maybe it s just a matter of me understanding a different paradigm to the apache way . Also as a semi-related question is it even a good idea to run a web server AND the site service itself through gevent . I ve seen other implementations using gunicorn for the server and gevent for the application but from the benchmarks I ve seen gevent far outperforms gunicorn as a server when it comes to scaling . Comment : One solution if you want to run gevent directly but keep your server available even during upgrades is to put a load-balancer in front of two gevent instances . Nginx can act as a load-balancer simply by having two servers in the upstream definition . By restarting one gevent wsgi server at a time you get no downtime . However the small advantage in memory-footprint compared to running gunicorn is not worth it in the long run because of the added complexity imho . Comment : @DanielEriksson Good suggestion . .. . Answer : Gunicorn has 3 gevent workers : .. . .. . -k gevent using gunicorn s HTTP parser .. . -k gevent pywsgi using gevent.pywsgi module .. . -k gevent wsgi using gevent.wsgi module .. . .. . gevent.wsgi is a fast HTTP server based on libevent . gevent.pywsgi is WSGI server implemented in Python . The reason for existence of gevent.pywsgi is libevent-http having a few limitations http : gevent.org servers.html such as not supporting keep-alive streaming ssl and websockets . Note that the new alpha version 1.0a3 of gevent http : code.google.com p gevent downloads list uses libev http : blog.gevent.org 2011 04 28 libev-and-libevent and does not include a WSGI server based on libevent-http . Currently gevent.wsgi here is an alias for gevent.pywsgi . The server classes in gevent don t have any features related to process-management restart reload and so on . Those features are necessary for deployment though . Gunicorn provides that for gevent s WSGI servers . Use it .", "Question : I have the following code from a complex project : .. . .. . The engine is InnoDB and the output is : .. . .. . Then the program hangs . I know the reason is mysql locks the row after the first greenlet executes the update statement so the update in the other greenlet will block . But why does gevent not transfer control back to the first greenlet after the other one blocks on socket And I wonder is there any graceful solution besides using a lock or committing before gevent.sleep p.s . The original situation is in a website project . I mixed pymongo and SQLAlchemy operations and used gunicorn to serve the site . But I found that parallel requests may block forever . After a long time of debug I finally figured out this was due to pymongo used some socket operations which caused gevent to switch to another greenlet resulting a deadlock as the above code demonstrates . Thanks Comment : Looks like oursql is implemented using Cython C and uses libmysqlclient so it won t be compatible with gevent and monkey patching which patches Python libraries not external C C++ libraries . This seems to confirm my suspicion http : code.google.com p gevent wiki Compatibility . Comment : @robertklep yeah you are right : I ve seen that page before and see oursql in the replacement column thought it should be compatible . But I ve found just now that oursql is in fact oursql.so .. . Comment : The page is rather confusing but there s a comment towards the end of it stating that oursql is incompatible with gevent . .. . Answer : Thanks to @robertklep one possible solution is to replace oursql with some pure-python drivers such as pymysql . In fact oursql is written in C and thus incompatible with gevent .", "Question : I have a function like this .. . .. . pool.free count outputs value 10 . I used pdb to trace . Program works fine until pool.spawn loop . But its waiting forever at pool.join line . Can someone tell me whats wrong .. . Answer : But its waiting forever at pool.join line . .. . Can someone tell me whats wrong .. . .. . Nothing Though I first wrote what s below the line the join function in gevent is still behaving pretty much the same way as in subprocess threading . It s blocking until all the greenlets are done . If you want to only test whether all the greenlets in the pool are over or not you might want to check for the ready https : github.com surfly gevent blob master gevent greenlet.py L117 on each greenlet of the pool : .. . .. . Basically .join is not waiting forever it s waiting until your threads are over . If one of your threads is never ending then join will block forever . So make sure every greenlet thread terminate and join will get back to execution once all the jobs are done . .. . .. . edit : The following applies only to subprocess or threading modules standard API . The GEvent s greenlet pools is not matching the standard API . The join https : docs.python.org 3.4 library multiprocessing.html multiprocessing.Process.join method on a Thread Process has for purpose to make the main process thread wait forever until the children processes threads are over . You can use the timeout parameter to make it get back to execution after some time or you can use the is alive method to check if it s running or not without blocking . In the context of a process thread pool the join https : docs.python.org 3.4 library multiprocessing.html multiprocessing.pool.Pool.join also needs to be triggered after a call to either close or terminate so you may want to : Comment : I m not seeing is alive method here . github.com surfly gevent blob master gevent pool.py https : github.com surfly gevent blob master gevent pool.py Comment : oh I missed your gevent tag o my bad I m talking about standard process or thread pools . Comment : anyway the is alive method equivalent would be on each greenlet process not on the pool itself . Comment : Also I m getting this error AttributeError : Pool object has no attribute close Comment : I still don t get your answer . Do I have to use is over instead of pool.join", "Question : In my code https : github.com chembl chembl webresource client blob master chembl webresource client web resource.py L98 .. . .. . I m calling grequests.map : .. . .. . with rs as list of URLs . If the size of that list is larger than some value i my case 300 I m getting : .. . .. . regardless of size parameter i tried different values between 10 and 50 as well as ignoring this argument completely . This happens only on macOS . In Ubuntu any size of URLs list works . I ll appreciate any help as this is a showstopper for my small library . Comment : Which gevent and greenlet version do you use python -c import gevent print gevent . version python -c import greenlet print greenlet . version Comment : @reclosedev 1.0 0.4.2 but please note that is what you get install by default after typing pip install grequests . .. . Answer : perhaps you re hitting this bug : https : github.com gevent gevent issues 423 .. . .. . will be fixed in 1.0.1 . .. . .. . can you try master branch Comment : It turned out that each request was executed in separate session . This was clearly not what I wanted so after solving this and sharing one session between all requests the code is faster and doesn t give deadlocks anymore . On the other hand executing each requests in separate session should cause any problems appart from being extremely inefficient so thank you for the info . Comment : @mnowotka do you have a code example as maybe that could help clear things up", "Question : I use bottle gevent for my python 2.7.6 application . And I want to test it with mongomock https : github.com vmalloc mongomock . My test fails . It is work if I use self.insert event without spawn . I tried to use patch.object with-statement but without success.. . Comment : I think that there is mock object duplicate inside greenlet . .. . Answer : I found solution . I need to mock gevent.spawn method . Because I get HTTP response before the coroutine ends . This my solution :", "Question : I have complex python program that uses gevent . I ve been having this horrible issue where its timing out on a socket read for several minutes . I retry multiple times during these episodes and only after several minutes does it succeed . I m very sure that the guy listening on the socket is still working prefectly because during one of these episodes because I can read off of that socket from another process that s not evented . It s possible that this is a bug that has been fixed in gevent 1.0 http : code.google.com p gevent issues detail id 97 but upgrading is non-trivial and before spending a week or two upgrading I d like to be more confident that gevent s sockets are indeed my problem . It would also be non-trivial to change my program to be non-evented . How can I test my hypothesis that it s a problem in gevent s socket Comment : This is pretty specific stuff . If you don t get answers here you might try a gevent mailing list . .. . Answer : If this is a gevent bug related to libevent there is a good chance that it is fixed in 1.0bx since it uses libev . Give a try at gevent-1.0b3 http : code.google.com p gevent downloads list and figure out . Comment : Yeah I started down that track but it s not trivial to upgrade . I decided to put it on hold after a couple hours of attempting the upgrade . I d like to test the hypothesis that it s a gevent problem before putting in the time to replacing it .", "Question : In Gevent 1.1 there are two backends cython and cffi . What I confuse is corecffi build.py https : github.com gevent gevent tree v1.1.1 gevent . In line 331 https : github.com gevent gevent blob v1.1.1 gevent corecffi build.py L331 .. . .. . I do not know why ffi.set source does not specify sources to include related c files . And source only contains some declarations . How the c source files are included .. . Answer : The c source files are included in a libev-specific way . In the source string we define LIBEV EMBED before we include libev.h . Setting that macro causes libev.h itself to include ev.c which is all the source libev needs . Comment : Why use such way rather than specifying sources parameter Comment : Because that s just the way libev works . We have no control over that .", "Question : We re using gevent in a long-lived Python process and over time we spawn thousands upon thousands of Greenlets . We re not joining any of these Greenlets we just spawn-and-forget . The Greenlet tasks themselves are short-lived and do exit . Is that all right Are we leaking any resources by not joining the Greenlets .. . Answer : I haven t worked with gevent so take this with a grain of salt . With threading in general all a call to join does is block until the thread finishes or dies and that is all that is mentioned in the gevent docs http : www.gevent.org gevent.html greenlet-objects . It is usually used solely to synchronize threads not for cleanup so you should be fine .", "Question : I have a process that needs to perform a bunch of actions later after 10-60 seconds usually . The problem is that those later actions can be a lot 1000s so using a Thread per task is not viable . I know for the existence of tools like gevent http : www.gevent.org and eventlet http : eventlet.net but one of the problem is that the process uses zeromq http : www.zeromq.org bindings 3apython for communication so I would need some integration eventlet already has it . What I m wondering is What are my options So suggestions are welcome in the lines of libraries if you ve used any of the mentioned please share your experiences techniques Python s coroutine support http : www.python.org dev peps pep-0342 use one thread that sleeps for a while and checks a queue how to make use of zeromq s poll or eventloop to do the job or something else . Comment : gevent has integration with zeromq as well : gevent-zeromq https : github.com traviscline gevent-zeromq Comment : I d first check if non-threaded soultion would work for me and utilize a part of a larger image : hook up to an event-loop of Twisted GTK+ QT or Tkinter . Comment : @janislaw Emil could even use the event-loop of PyGObject without any Gtk+ code . However PyGObject can be a heavyweight dependence to maintain in a server.. . .. . Answer : Presuming your process has a run loop which can receive signals and the length of time of each action is within bounds of sequential operation use signals and posix alarm .. . .. . This depends on what you mean by those later actions can be a lot and if your process already uses signals . Due to phrasing of the question it s unclear why an external python package would be needed .", "Question : I would essentially like gevent.sleep to behave like time.sleep in that it returns execution after exactly not at least some number of seconds but allow other Greenlets to run in the meantime . An example : .. . .. . Is there a better way to get the desired behaviour .. . Answer : Your code is perfectly fine . I ran it on my linux machine and had this output : .. . .. . B A A A A A B A A A A A B A A A A A B A A A A A B A A A A A B A A A A A .. . .. . So it works very reliably on my end running gevent 1.0.1 and python2.7 . If it does not work on your end you might want to try and update python or gevent . Comment : Running python 2.7.11 and gevent 1.0.2 . Interesting after restarting python I get the correct output the first time but the problem I described after subsequent calls . Comment : Ahh it had to do with forgetting to kill the Greenlet running a upon KeyboardInterrupt", "Question : I have a process that needs to perform a bunch of actions later after 10-60 seconds usually . The problem is that those later actions can be a lot 1000s so using a Thread per task is not viable . I know for the existence of tools like gevent http : www.gevent.org and eventlet http : eventlet.net but one of the problem is that the process uses zeromq http : www.zeromq.org bindings 3apython for communication so I would need some integration eventlet already has it . What I m wondering is What are my options So suggestions are welcome in the lines of libraries if you ve used any of the mentioned please share your experiences techniques Python s coroutine support http : www.python.org dev peps pep-0342 use one thread that sleeps for a while and checks a queue how to make use of zeromq s poll or eventloop to do the job or something else . Comment : gevent has integration with zeromq as well : gevent-zeromq https : github.com traviscline gevent-zeromq Comment : I d first check if non-threaded soultion would work for me and utilize a part of a larger image : hook up to an event-loop of Twisted GTK+ QT or Tkinter . Comment : @janislaw Emil could even use the event-loop of PyGObject without any Gtk+ code . However PyGObject can be a heavyweight dependence to maintain in a server.. . .. . Answer : Pyzmq http : www.zeromq.org bindings 3apython has an ioloop implementation with a similar api to that of the tornado ioloop . It implements a DelayedCallback http : zeromq.github.com pyzmq api generated zmq.eventloop.ioloop.html zmq.eventloop.ioloop.DelayedCallback which may help you .", "Question : In gevent monkey patch I didn t see anything about default file object s operate . How can I use async file read-write in gevent based programs .. . Answer : You can use a threadpool starting with gevent 1.0 http : code.google.com p gevent downloads list : Comment : yes I can use threadpool . But my question is not focus on gevent usage . I want to found a way to do async file-io in both windows and linux boxes . Of course with python language and work together with gevent .", "Question : I have a process that needs to perform a bunch of actions later after 10-60 seconds usually . The problem is that those later actions can be a lot 1000s so using a Thread per task is not viable . I know for the existence of tools like gevent http : www.gevent.org and eventlet http : eventlet.net but one of the problem is that the process uses zeromq http : www.zeromq.org bindings 3apython for communication so I would need some integration eventlet already has it . What I m wondering is What are my options So suggestions are welcome in the lines of libraries if you ve used any of the mentioned please share your experiences techniques Python s coroutine support http : www.python.org dev peps pep-0342 use one thread that sleeps for a while and checks a queue how to make use of zeromq s poll or eventloop to do the job or something else . Comment : gevent has integration with zeromq as well : gevent-zeromq https : github.com traviscline gevent-zeromq Comment : I d first check if non-threaded soultion would work for me and utilize a part of a larger image : hook up to an event-loop of Twisted GTK+ QT or Tkinter . Comment : @janislaw Emil could even use the event-loop of PyGObject without any Gtk+ code . However PyGObject can be a heavyweight dependence to maintain in a server.. . .. . Answer : Another option is to use the Phyton GLib bindings http : developer.gnome.org pygobject stable glib-functions.html in particular its timeout functions . It s a good choice as long as you don t want to make use of multiple cores and as long as the dependency on GLib is no problem . It handles all events in the same thread which prevents synchronization issues . Additionally its event framework can also be used to watch and handle IO-based i.e . sockets events . UPDATE : .. . .. . Here s a live session using GLib :" ] }
[ "yes-answer-long", "yes-answer-short" ]
libevent
UNK_RELATION
stencils@prototyping@95
stencils -- stencils are vector shapes of common user interfaces that can be reused for rapid @placeholder .
{ "confidence": [ 44.74238586425781, 41.451847076416016, 38.008323669433594, 33.36991882324219, 33.36991882324219, 33.36991882324219, 33.36991882324219, 33.36991882324219, 30.853626251220703, 29.386577606201172, 24.83525848388672, 23.899505615234375, 21.564388275146484, 21.383214950561523, 20.53308868408203, 20.329648971557617, 19.962940216064453, 19.6884822845459, 19.0747013092041, 19.0747013092041, 18.78265380859375, 18.673601150512695, 18.673601150512695, 18.299705505371094, 17.727638244628906, 17.727638244628906, 17.52906608581543, 17.52906608581543, 17.52906608581543, 17.52906608581543, 17.52906608581543, 17.018798828125, 16.844263076782227, 16.69088363647461, 16.51276397705078, 15.815165519714355, 15.699728012084961, 15.699728012084961, 15.654966354370117, 15.133735656738281, 15.111080169677734, 14.902864456176758, 14.826318740844727, 14.457181930541992, 14.442562103271484, 14.442562103271484, 14.373281478881836, 14.373281478881836, 14.373281478881836, 14.373281478881836, 14.140036582946777, 14.023645401000977, 13.953662872314453, 13.507253646850586, 13.409378051757812, 13.385838508605957, 13.385838508605957, 13.385838508605957, 13.232734680175781, 13.183713912963867, 13.12092399597168, 13.12092399597168, 13.12092399597168, 13.12092399597168, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871, 13.054244041442871 ], "content": [ "Design stencils and wireframes are cool", "For example : I have two rectangular stencils like this : .. . .. .", "No what I was looking for was a tutorial of a guide to change the Forms UI according to the stencils .", "It s a great tool with a huge selection of free stencils - including ones targetted to iPhone iPad screen design .", "There s a good set over available over here : .. . .. . http : developer.yahoo.com ypatterns about stencils", "Does such set of stencils exist or does everything look like it s from ages ago", "I want to set up multiple stencils in OpenGL and then draw into multiple combinations of them .", "Any help or resources on modifying these stencils so the text area is where I want it to be would be much appreciated .", "I strike restored strike removed one of the default stencils from the Collection Pane just clicked on the close icon .", "Design Stencils has a wide variety of designs and formats http : developer.yahoo.com ypatterns wireframes .. . .. . iPhone GUI PSD http : www.teehanlax.com blog p 447", "The rest of my app-code is all good if I remove the fbo creation and binding everything works perfectly fine except that I don t have the stencils working which I need for my app .", "What I need is stencils with icons for : .. . .. . website .. . database .. . webservice .. . workflow .. . wcf service not necessarily different from the webservice stencil .. . windows service .. . Active directory .. . .. . I would like the webservice to have a gearbox theme in it something like http : www.coretechnologies.com images alwaysup web service logo.gif .", "Furthermore can add more Member and Separator Master Shapes in it .", "I wrote a simple image bilinear resampling algorithm with repa and since I need to use partitioned arrays to make it correct I thought I would go whole hog and use stencils too and hopefully get faster loops .", "How can I eliminate the suggested vector dependence", "multiple regions http : i.stack.imgur.com uShpM.png .. . .. . Then I want to draw into : .. . .. . 1 . anywhere .. . 2 . left rectangle blue+purple .. . 3 . right rectangle purple+red .. . 4 . middle rectangle purple .. . 5 . whole colored area blue+purple+red .. . .. . I have found that it is possible to declare multiple stencils in different bits of stencil buffer but I don t know how .", "Use the User.msvSDListRequiredCategories and User.msvSDListExcludedCategories cells to restrict what shapes can become list members . Because lists are also containers it is possible for shapes to become container members of the list .", "New Created Master Shapes with used Master Shape http : i.stack.imgur.com BG2kE.jpg .. . .. . Figure 1 - New Created Master Shapes with used Master Shape .. . .. . 1 .", "ShapeSheet container properties .. . .. . User.msvSDContainerMargin .. . .. . .. . The distance between the container boundary and member shapes .", "Other shapes with at least one matching name are disallowed as container members .", "Stensils is a set of tools that helps you to quickly create interfaces in OmniGraffle .", "Will this pretty much destroy the whole idea until im has the functionality to crop odd shapes", "I have a complex stencil with many small shapes sheet.6 to 43 grouped in a group sheet.44 .", "Comparing an instance of the Object Master Shape that accepts instance s of All Master Shapes with an instance of the Class Master Shape of the UML Stencil that only accepts the instance s of the Member and Separator Master Shapes of the UML Stencil http : i.stack.imgur.com 7REA3.png .. . .. . Figure 11 - Comparing an instance of the Object Master Shape that accepts instance s of All Master Shapes with an instance of the Class Master Shape of the UML Stencil that only accepts the instance s of the Member and Separator Master Shapes of the UML Stencil .. . .. . I ve set USE Property for the User.msvSDListItemMaster in the User-defined cells section of the ShapeSheet window However I think that it doesn t work .", "On a simple shape I would set : Geometry1.NoShow sheet.44 user.isHidden Miscellaneous.HideText sheet.44 user.isHidden .. . .. . But how to make it inherited in all sub shapes", "Your VBA code would have to loop through all the sub shapes and set that formula up any time the group gets a new shape .", ".. . .. . Descriptions : .. . .. . I ve created some new Master Shapes in a Visio Stencil .vssx file as follows : .. . .. .", "Other shapes must have at least one matching name to be allowed as container members .", "Other shapes must have at least one matching name to be allowed as list members .", ".. . It is also possible to automatically populate the list with some member shapes when the list is first dropped on the page .", ".. . .. . User.msvSDContainerNoHighlight .. . .. . .. . A Boolean value that suppresses the container highlighting when member shapes are selected or added to the container .", "Now my question is that how can I create a new Master Shape with the ability to accept some other Master Shapes without any VBA codes like Class Shape in the UML Class Stencil that is created by Microsoft", "It s not a nice solution because they are not vector-graphics but at least I could make the schemes I wanted.. .", "Then use the coordinates for imagemagick it appears that although IM doesn t really crop odd shapes it can however use mask to convert the bg of the photo by combining the stencil where we draw the lines using our coordinates fill the bg with 000000 color and the original photo .", "An idea popped up to maybe allow the user to draw some lines in their photo for cropping then maybe the site converts the lines to a vector and fills a color around the lines the colors are then converted by im to transparent.. . but then I have no idea how to start this one. . probably not possible at the moment .", "Means you can just draw a plain rectangle for example and then convert it into a List by adding these two user properties .", "I thought it best to break it down further to identify the statements that actually are responsible for the vector dependence .", "The compiler says that the line can t be vectorize because you can t vectorize a vector function .", "I want to hide this group using shapesheet formulas to use a user propertie .", "Class Shape with two additional options in the Context Menu and related rows in the ShapeSheet http : i.stack.imgur.com 0Srrq.jpg .. . .. . Figure 5 - Class Shape with two additional options in the Context Menu and related rows in the ShapeSheet .. . .. . When I do RMB click on the Member and Separator Shapes in added Class Shape can see Insert Member Separator before after however when I add Member and Separator Master Shapes on the page directly not in the Class Shape when I do RMB click on them can t see extra options in the Context Menu . .. . .. .", "I can update label default-value and position of existing options but not able to add new option .", "You should be able to take those vectors and use them in-place of having the user draw lines .", "It s better that we use both User.msvSDListRequiredCategories and User.msvSDContainerRequiredCategories rows to get best efficiency . .. . .. . .. . .. . Answer of 5th Question : .. . .. . This problem will solve if the problem of the 1st question be solved . .. . .. . .. . .. . Answer of 6th Final Question : .. . .. . The answer is here https : msdn.microsoft.com en-us library office ff959245 AddingDiagrams BuildingCustomShapes and here http : blogs.msdn.com b visio archive 2010 01 12 custom-containers-lists-and-callouts-in-visio-2010.aspx : .. . .. . Custom Lists .. . .. . Any shape that has a value of List for the User.msvStructureType cell is treated by Visio as a list . A list orders and arranges its member shapes automatically . Note that lists are also considered to be containers and they have similar capabilities such as automatically moving copying or deleting member shapes . All of the previously mentioned container cells apply to list shapes .", "Comparing an instance of the Object Master Shape with an instance of the Class Master Shape of the UML Stencil for displaying the Bar to insert related Members http : i.stack.imgur.com AKANy.png .. . .. . Figure 10 - Comparing an instance of the Object Master Shape with an instance of the Class Master Shape of the UML Stencil for displaying the Bar to insert related Members .. . .. . 4th Question : .. . .. . Why do es instance s of the Object Master Shape accept instance s of All Master Shapes except than only instance s of the Property Master Shape instead of the instance s of the Class Master Shape of the UML Stencil that only accept s the instance s of the Member and Separator Master Shapes of the UML Stencil Figure 11", "Is it possible to hide a master shape in your stencil so that a user cannot drag-and-drop it on their diagram while still allowing me to use that object in the diagram programmatically", "what I would like is to be able to align text from the object itself to the right side like below where Example user name is the ideal output .", "I want to create a new Master Shape in the Microsoft Visio 2013 x64 like the Class Master Shape in the UML Class Stencil . .. . .. . When add the Class Master Shape to a page it appends two Member and one Separator Master Shapes in itself automatically .", "I was thinking that it adds other Master Shapes in itself by some written VBA codes however when I checked the file of the UML Class Metric Stencil in the following full path I got that it uses no VBA codes not at all .", "In other words I want to add my Created Master Shape to my Custom List Master Shape like attaching the Member and Separator Master Shapes to the Class Master Shape of the UML Stencil . .. . .. . So I ve faced with some problems in achieving to my Goal that I ve described them in the next parts .", "5th Question : .. . .. . Why isn t aren t displayed options for inserting Members on the added instance s of the Property Master Shape to the instance s of the Object Master Shape like attached instance s of the Member and Separator Master Shapes of the UML Stencil to the instance s of the Class Master Shape of the UML Stencil Figure 12", "Or can I should I use glScissor for that", "D : Program Files Microsoft Office Office15 Visio Content 1033 USTRME M.VSSX .. . .. . The file extension is Visio Stencil .vssx instead of Visio Macro-Enabled Stencil .vssm so it can t have VBA codes . .. . .. . I know that I can do something by adding some new Rows in the Actions Section of the ShapeSheet however it doesn t exist any action Rows to add fresh Member and Separator Master Shapes for Class Shape . .. . .. .", "@Mitch Wheat : I am using common subexpression elimination taking k dx dy and j dx into consideration in my original code .", "Cells in the User-defined cells and Events sections of the ShapeSheet window after changing their contents http : i.stack.imgur.com fCE08.jpg .. . .. . Figure 6 - Cells in the User-defined cells and Events sections of the ShapeSheet window after changing their contents .. . .. . instead of : .. . .. .", "How can this be accomplished", "Imagemagick graphicsmagick as I know can only crop a rectangular or square shaped object please correct me if I m wrong .", "As you can see at .. . .. . http : foundation.zurb.com docs upgrading.html upgrading-the-sass .. . .. . have both been removed from the foundation framework .", "However you can modify its size position rotation and the horizontal and vertical-text alignment", "How can I work around that", "Comparing Shape Master Name with Shape Category http : i.stack.imgur.com x9ZDt.png .. . .. . Figure 1 - Comparing Shape Master Name with Shape Category .. . .. . .. . .. . Answer of 2nd Question : .. . .. . For solving this problem we must be attended to two things : .. . .. . First We must add the shapes that we want to be added them automatically after instantiate the master shape . So we must add the row s for each shape that we want to be added with name User.msvSDListItemMaster Index The name or UniqueID of the master shape to create an instance of for Insert commands .", "You can do this by setting the Master s Hidden Property http : msdn.microsoft.com en-us library bb435878 28v office.11 29.aspx .", "You can convert screenshots or any set to Visio stencil using this utility http : dmitry-ivanov.tumblr.com post 9287357067 png2vss-3-0 .", "So the first 3 steps or actually 2 and 3 can be done by just setting the rectangle s region with glScissor and enabling the scissor test glEnable GL SCISSOR TEST .", "For more than two rectangles it can get more complicated and you need to play around a bit to find the most optimal way .", "I have a problem with a 4-point stencil OpenCL code .", "The code runs fine but I don t get symetrics final 2D values which are expected .", "I suspect it is a problem of updates values in the kernel code .", "Here s the kernel code : .. . .. . cell s cell n cell e cell w represents the 4 values for the 2D stencil .", "I compute the new value and update it after a barrier CLK GLOBAL MEM FENCE .", "However it seems there are conflicts between differents work-items .", "How could I fix this", "The barrier GLOBAL MEM FENCE you use will not synchronize all work-items as intended .", "It does only synchronize access with one single workgroup .", "Usually all workgroups won t be executed at the same time because they are scheduled on only a small number of physical cores and global synchronization is not possible within a kernel .", "The solution is to write the output to a different buffer .", "I want to add new color type to set body background-color which will be displayed on store front theme editor .", "Sorry but i am not more aware of stencil framework for designing bigcommerce store front .", "But i tried many things to get this but no success .", "I know its concern with two files config.json and schema.json but don t know if I am overlooking anything .", "please any help will really appreciated .", "After uploaded without error bigcommerce stencil theme bundle but default theme.css file not loading .", "After click source css theme.css link got below error : .. . .. . Note : working my custom .css file online and locally but default theme.css file not loading in online but locally ok .", "Need your assistance Please .. . .. . Regards", "Someone please help I have done project my localy but after upload bundle then got this issue .", "please help", "After Create any stencil theme bundle then missing CSS any idea please", "i have also check with stencil default theme just change name from config.json but same issue .", "Need your assistance Please", "I had the same issue when trying to run stencil bundle on windows-10 and upload it to Big Commerce .", "The only thing that worked for me since I didn t have a mac was : .. . .. . 1 .", "Install Ubuntu 16.04 LTS via Oracle VM Virtual box .", "2 .", "Run Ubuntu and install nvm .", "3 .", "Install node 4.1.2 via nvm not as sudo .", "4 .", "Install stencil framework and theme not as sudo .. . .. . 5 .", "Run stencil bundle and upload the zip to test .", "If the css is loading correctly then you are good to go ." ] }
{ "confidence": [ 47.81812286376953, 41.99259948730469, 41.4290657043457, 41.10434341430664, 40.2395133972168, 38.49741744995117, 38.49741744995117, 37.100547790527344, 35.618587493896484, 35.48613739013672, 35.14601135253906, 34.78065872192383, 33.10832595825195, 32.8967170715332, 26.672649383544922, 24.40277862548828, 24.254955291748047, 22.016847610473633, 21.435657501220703, 16.673479080200195 ], "content": [ "Question : I know there are questions related to mine but they do not solve my problem and I cannot find anything on the Internet . I want to create a diagram of the system we created . What I need is stencils with icons for : .. . .. . website .. . database .. . webservice .. . workflow .. . wcf service not necessarily different from the webservice stencil .. . windows service .. . Active directory .. . .. . I would like the webservice to have a gearbox theme in it something like http : www.coretechnologies.com images alwaysup web service logo.gif . Does such set of stencils exist or does everything look like it s from ages ago that is what I have found on the net until now .. . Answer : I ended up creating my own from PNGs found on the internet . It s not a nice solution because they are not vector-graphics but at least I could make the schemes I wanted.. .", "Question : Design stencils and wireframes are cool It would be terribly time consuming to mockup applications without them . Which are your favorites and where can they be viewed downloaded Comment : +1 . My first thought was not programming related but then I looked at the answers and this is great stuff Comment : if you want browser based check mockuptiger.com a 123wireframe.php http : www.mockuptiger.com a 123wireframe.php .. . Answer : Yahoo Design Stencils has a wide variety of designs and formats http : developer.yahoo.com ypatterns wireframes .. . .. . iPhone GUI PSD http : www.teehanlax.com blog p 447 alt text http : www.teehanlax.com blog wp-content uploads iphone gui.jpg .. . .. . Yahoo provides a nice Curve device . Screen is white and some GUI elements would be nice if anyone knows where to find .", "Question : I want to set up multiple stencils in OpenGL and then draw into multiple combinations of them . For example : I have two rectangular stencils like this : .. . .. . multiple regions http : i.stack.imgur.com uShpM.png .. . .. . Then I want to draw into : .. . .. . 1 . anywhere .. . 2 . left rectangle blue+purple .. . 3 . right rectangle purple+red .. . 4 . middle rectangle purple .. . 5 . whole colored area blue+purple+red .. . .. . I have found that it is possible to declare multiple stencils in different bits of stencil buffer but I don t know how . How do I setup glStencilOp and glStencilFunc for this to work Or can I should I use glScissor for that Comment : If they re always rectangles glScissor is a good idea but it will certainly not work for 5 . .. . Answer : I don t currently know if it s possible to configure the stencil buffer for being able to do all the above 5 steps without making any changes to the stencil buffer between them . It would be easy if glStencilOp provided bitwise OR but it doesn t and with just using increment or decrement you would have to draw the rectangles multiple times . But if the regions are always rectangles why not just use the scissor test So the first 3 steps or actually 2 and 3 can be done by just setting the rectangle s region with glScissor and enabling the scissor test glEnable GL SCISSOR TEST . For the middle one step 4 you either compute the purple intersection rectangle yourself and use the scissor test again or you use the stencil test : .. . .. . So we first draw both rectangles and increase the stencil value everywhere they are drawn . Then we draw our things everywhere the stencil value is 2 meaning both rectangles were drawn . For the 5th step you use the same stencil buffer but with .. . .. . for the second pass . This way you draw something everywhere the stencil buffer is at least 1 meaning at least one rectangle was drawn . For more than two rectangles it can get more complicated and you need to play around a bit to find the most optimal way .", "Question : I have used Foundation 4 with Custom Forms before and they work great . With Foundation 5 however I am unable to understand how to use them . Need help Going to the URL : http : foundation.zurb.com stencils.html it gives strange guide on using it which I am not able to understand . enter image description here http : i.stack.imgur.com YJoCX.png .. . Answer : Stensils is a set of tools that helps you to quickly create interfaces in OmniGraffle . More inforamation about OmniGraffle here : http : www.omnigroup.com omnigraffle .. . .. . If you need to create some custom forms for web better to look here : http : foundation.zurb.com docs components forms.html Comment : No what I was looking for was a tutorial of a guide to change the Forms UI according to the stencils . Foundation 4 simply required using CSS classes and the radio checkbox and dropdown would change .", "Question : Has anyone created a Visio template or just a stencil for creating iOS design comps I know there are tools that allow you to do design comps but I m really after a Visio stencil or stencil template combination for my particular needs . http : www.teehanlax.com blog iphone-gui-psd-v4 is a very popular design template for Photoshop but I m not a Photoshop guy . Thanks . Comment : If you are not tied to Visio I would HIGHLY recommend OmniGraffle omnigroup.com products omnigraffle http : www.omnigroup.com products omnigraffle instead . It s a great tool with a huge selection of free stencils - including ones targetted to iPhone iPad screen design . Comment : Perception thanks for that advice . I have used OmniGraffle and it s a beautifully designed application but Visio is the one remaining piece of software I haven t found a replacement for . It s near and dear to my heart . .. . Answer : There s a good set over available over here : .. . .. . http : developer.yahoo.com ypatterns about stencils Comment : Hey thanks John I ll check them out .", "Question : Design stencils and wireframes are cool It would be terribly time consuming to mockup applications without them . Which are your favorites and where can they be viewed downloaded Comment : +1 . My first thought was not programming related but then I looked at the answers and this is great stuff Comment : if you want browser based check mockuptiger.com a 123wireframe.php http : www.mockuptiger.com a 123wireframe.php .. . Answer : Balsamiq Mockups http : www.balsamiq.com products mockups", "Question : Design stencils and wireframes are cool It would be terribly time consuming to mockup applications without them . Which are your favorites and where can they be viewed downloaded Comment : +1 . My first thought was not programming related but then I looked at the answers and this is great stuff Comment : if you want browser based check mockuptiger.com a 123wireframe.php http : www.mockuptiger.com a 123wireframe.php .. . Answer : There is another tool completely free and very promising built on the Gecko engine read : Mozilla : Pencil http : www.evolus.vn Pencil .", "Question : Design stencils and wireframes are cool It would be terribly time consuming to mockup applications without them . Which are your favorites and where can they be viewed downloaded Comment : +1 . My first thought was not programming related but then I looked at the answers and this is great stuff Comment : if you want browser based check mockuptiger.com a 123wireframe.php http : www.mockuptiger.com a 123wireframe.php .. . Answer : MockupTiger http : www.mockuptiger.com is a web based application that you can host it on your own server . It has widgets to build web-applications and Dashboard Wireframes https : www.wireframes.com . NOTE : works only with latest browsers . You can also download and use on your desktop . PS : I am the developer of this software", "Question : I strike restored strike removed one of the default stencils from the Collection Pane just clicked on the close icon . Is it deleted from the computer now or just invisible I could download it from the Evolus Pencil Project download page http : code.google.com p evoluspencil downloads list q label 3aStencil . But can I also restore it without downloading .. . Answer : The collections are not deleted when they are removed by clicking on the close button . They just become invisible and can be enalbed again : right mouseclick on the free space in the collections area - show hidden collections.. . - click on the collection name . Evolus Pencil : show hidden collections http : i.stack.imgur.com e1YTz.png", "Question : I strike restored strike removed one of the default stencils from the Collection Pane just clicked on the close icon . Is it deleted from the computer now or just invisible I could download it from the Evolus Pencil Project download page http : code.google.com p evoluspencil downloads list q label 3aStencil . But can I also restore it without downloading .. . Answer : If you delete the .pencil directory and restart pencil you will start with a fresh profile and your deleted collection will show again . Backup the dir before trying just in case", "Question : I m in the proccess of creating an automated visio diagram script in powershell adding elements with text like so . most of the functionality in terms of layout works at the moment but i m having serious troubles with the aspects that actually make diagrams look good . I think this image explains it best : when you Edit Text on an object it appears to be aligned to the object in some way either below or on top of it . what I would like is to be able to align text from the object itself to the right side like below where Example user name is the ideal output . enter image description here http : i.stack.imgur.com IQz1j.png .. . .. . I m assuming this involves shapesheets etc . which I have almost no experience with . Any help or resources on modifying these stencils so the text area is where I want it to be would be much appreciated . .. . Answer : You should check out this page : https : msdn.microsoft.com en-us library aa200988 v office.10 .aspx The Text Block of a shape is by default the same size as the enclosing rectangle of the shape . However you can modify its size position rotation and the horizontal and vertical-text alignment", "Question : Design stencils and wireframes are cool It would be terribly time consuming to mockup applications without them . Which are your favorites and where can they be viewed downloaded Comment : +1 . My first thought was not programming related but then I looked at the answers and this is great stuff Comment : if you want browser based check mockuptiger.com a 123wireframe.php http : www.mockuptiger.com a 123wireframe.php .. . Answer : I prefer real paper over digital mockups . http : www.designcommission.com shop dc-website-stencil-kit .. . http : www.concept7.nl henk a3-sketching-paper-for-all-of-you concept7 .. . http : www.paranaiv.no portfolio 2008 webdesign-sketchbook .. . .. . Somewhat related download : digital browser templates . http : www.webdesignerstoolkit.com index.php .. . .. . Related question or duplicate even : .. . .. . http : stackoverflow.com questions 295589 what-program-should-i-use-to-mock-up-guis", "Question : Has anyone created a Visio template or just a stencil for creating iOS design comps I know there are tools that allow you to do design comps but I m really after a Visio stencil or stencil template combination for my particular needs . http : www.teehanlax.com blog iphone-gui-psd-v4 is a very popular design template for Photoshop but I m not a Photoshop guy . Thanks . Comment : If you are not tied to Visio I would HIGHLY recommend OmniGraffle omnigroup.com products omnigraffle http : www.omnigroup.com products omnigraffle instead . It s a great tool with a huge selection of free stencils - including ones targetted to iPhone iPad screen design . Comment : Perception thanks for that advice . I have used OmniGraffle and it s a beautifully designed application but Visio is the one remaining piece of software I haven t found a replacement for . It s near and dear to my heart . .. . Answer : You can convert screenshots or any set to Visio stencil using this utility http : dmitry-ivanov.tumblr.com post 9287357067 png2vss-3-0 . Comment : Please disclose your involvement with this product Comment : I m developer of this utility . It s freeware I ve moved it : wp.me P1OeH8-4 http : wp.me P1OeH8-4 .", "Question : null .. . Answer : I wrote a simple image bilinear resampling algorithm with repa and since I need to use partitioned arrays to make it correct I thought I would go whole hog and use stencils too and hopefully get faster loops . From my naive understanding of the way mapStencil works I don t think it is sufficient for my task . I need something like transformStencil . I guess I would need a different Stencil to so I could have the old index and the new one . Is there an simple way to perform stenciled image resampling in Repa If not how hard would it be hack up mapStencil into transformStencil or something equivalent . Comment : Could you write a signature of transformStencil it s hard to understand what did you want to obtain .", "Question : I am trying to generate a frambuffer object and use stencil inside a native android application using the NDK r5b . Target device is running froyo 2.2 supporting OpenGL ES 2.0 . So I ve been coding lots of gl code in my c++ native libs and havent got through any problem except for this . I just can t seems to make it work . Here s a code snipplet for the framebuffer creation . Completness is all good but screen remains completly black . It s like the fbo I am creating is not really bound to the gl surface that is created by the Java part of the app . The rest of my app-code is all good if I remove the fbo creation and binding everything works perfectly fine except that I don t have the stencils working which I need for my app . I ve also tried rendering to a 2D texture instead of the renderbuffer...didn t worked either . So Is there a way I can fix this Am I getting something wrong here If anyone has any ideas please lemme know....been spending way too much time looking up this problem...hehe .. . .. . Thanks in advance Cheers .. . .. . EDIT : .. . .. . Ok I ve manage to make the stencil buffer work but the FBO are just not working . I think OpenGL ES 2.0 is not fully supported by android using r5b here btw . I think method stubs are defined but not fully implemented . Or the GlSurfaceView created doesn t link correctly with the FBOs . As for the stencil buffer I had to do .. . .. . and remove the usage of glDepthMask in order for them to work correctly . .. . Answer : @ Zennichimaro For the stencil buffer usage During Initialisation : .. . .. . During the rendering : .. . .. . When I need to use stencil I use the following methods depending on what I need : .. . .. . And Finally I do the double pass technic to draw inside the stencil .. . Here s an example : .. . .. . My code is fairly complex so it s hard to only post what s related to the stencil But I hope It ll help", "Question : I have a complex stencil with many small shapes sheet.6 to 43 grouped in a group sheet.44 . There is also sub-groups in it . I want to hide this group using shapesheet formulas to use a user propertie . On a simple shape I would set : Geometry1.NoShow sheet.44 user.isHidden Miscellaneous.HideText sheet.44 user.isHidden .. . .. . But how to make it inherited in all sub shapes with vba Edit with Answer : .. . .. . Thank you Jon for corfirming that there is no other way than VBA . Here is my VBA code for all of you who are having the same problem . See you guys .. . Answer : Your VBA code would have to loop through all the sub shapes and set that formula up any time the group gets a new shape . The format of the formula would be just like your example so it wouldn t be too hard to do : .. . .. . or something like that where that s in a loop for each SubShp in ParShp.Shapes.. .", "Question : My mission is to let users upload their own photos then the site crops the face+hair and pastes them on an ecard . The tough part is that I m not allowed to use flash .. . .. . I understand there are ajax or js face-detection solutions out there but what stumps me is how do I crop an odd shaped pattern . Imagemagick graphicsmagick as I know can only crop a rectangular or square shaped object please correct me if I m wrong . Will this pretty much destroy the whole idea until im has the functionality to crop odd shapes or are there other ways to crop circles or polygons An idea popped up to maybe allow the user to draw some lines in their photo for cropping then maybe the site converts the lines to a vector and fills a color around the lines the colors are then converted by im to transparent.. . but then I have no idea how to start this one. . probably not possible at the moment . I m running out of ideas : Comment : Im not sure of the details but I am going to stay tuned to this question . I am curious to see what others come up with . I m sure there is head-recog software out there that will give you appropriate vectors . You should be able to take those vectors and use them in-place of having the user draw lines . .. . Answer : I have just successfully created a crop : although not perfect it should work in android or iphone ipad . Basically I used a js plotting tool to mark the coordinates save all those coordinates somewhere . Then use the coordinates for imagemagick it appears that although IM doesn t really crop odd shapes it can however use mask to convert the bg of the photo by combining the stencil where we draw the lines using our coordinates fill the bg with 000000 color and the original photo . The result should be the crop we are looking for : now we added in some feathering since it s kinda edgy . All this using imagemagick . Now all we needed are curvier lines since I used path in IM which doesn t really offer a smooth crop . Someone suggested to use cubic curves but may require additional coding since it needs some parameters for each coordinate . This command will create our stencil the long set of numbers are our coordinates : .. . .. . We will then combine the stencil with the original image which should bring out our transparent crop : .. . .. . Finally we feather out the edges : .. . .. . This is how it works now : https : lh6.googleusercontent.com 2lSoW37 zqo TYCD65Vu4zI AAAAAAAAEcc vjlCPM54FTI s800 theoryinpractice.jpg .. . .. . That s about it I hope this helps someone . Comment : nice job @elijah", "Question : Objective : .. . .. . First I should say what I want to do and then I ll describe what I ve done to achieve to my Goal in the next Descriptions part . .. . .. . I want to create a Custom List Master Shape from the Plain Container of the Diagram Parts section in the Insert tab of the ribbon . Then I want to create another Master Shape that can use as the member shape for the Created Custom List Master Shape . In other words I want to add my Created Master Shape to my Custom List Master Shape like attaching the Member and Separator Master Shapes to the Class Master Shape of the UML Stencil . .. . .. . So I ve faced with some problems in achieving to my Goal that I ve described them in the next parts . .. . .. . Descriptions : .. . .. . I ve created some new Master Shapes in a Visio Stencil .vssx file as follows : .. . .. . New Created Master Shapes with used Master Shape http : i.stack.imgur.com BG2kE.jpg .. . .. . Figure 1 - New Created Master Shapes with used Master Shape .. . .. . 1 . Property Master Shape Green Box : that is created from the Member Master Shape of the UML Class Stencil Blue Box . 2 . Object Master Shape Red Box : that is created from the Plain Container of the Diagram Parts section in the Insert tab of the ribbon . The Property Master Shape is created to use as the member shape in the Object Master Shape like the Member Master Shape to use in the Class Master Shape of the UML Stencil . .. . .. . Class Master Shape with its Initial Members http : i.stack.imgur.com FBJ3R.png .. . .. . Figure 2 - Class Master Shape with its Initial Members .. . .. . The Property Master Shape that is created from Member Master Shape has changed as follows : .. . .. . I added one Shape Data to it Figure 3 . Shape Data dialogue box of the Property Master Shape http : i.stack.imgur.com a7kCZ.jpg .. . .. . Figure 3 - Shape Data dialogue box of the Property Master Shape .. . .. . I added one Data Graphic Item to it Figure 4 . Data Graphic and Data Graphic Item dialogue boxes of the Property Master Shape http : i.stack.imgur.com Vf5ri.png .. . .. . Figure 4 - Data Graphic and Data Graphic Item dialogue boxes of the Property Master Shape .. . .. . I changed the User.MemberName Formula in the User-defined cells section of the ShapeSheet window as follows Figure 5 : .. . .. . MID SUBSTITUTE TRIM SHAPETEXT TheText 1 FIND SUBSTITUTE TRIM SHAPETEXT TheText -1 .. . .. . instead of : .. . .. . SHAPETEXT TheText .. . .. . ShapeSheet window of the Property Master Shape http : i.stack.imgur.com 1LQTy.jpg .. . .. . Figure 5 - ShapeSheet window of the Property Master Shape .. . .. . The Object Master Shape that is created from the Plain Container has changed as follows : .. . .. . I changed the contents of the cells in the User-defined cells and Events sections of the ShapeSheet window as Figure 6 : .. . .. . Cells in the User-defined cells and Events sections of the ShapeSheet window after changing their contents http : i.stack.imgur.com fCE08.jpg .. . .. . Figure 6 - Cells in the User-defined cells and Events sections of the ShapeSheet window after changing their contents .. . .. . instead of : .. . .. . Cells in the User-defined cells and Events sections of the ShapeSheet window before changing their contents http : i.stack.imgur.com 6JgbL.jpg .. . .. . Figure 7 - Cells in the User-defined cells and Events sections of the ShapeSheet window before changing their contents .. . .. . .. . .. . Questions : .. . .. . 1st Question : .. . .. . Why isn t aren t instance s of the Property Master Shape arranged and placed correctly after adding it them to the instance s of the Object Master Shape like adding instance s of the Member Master Shape to the instance s of the Class Master Shape of the UML Stencil Figure 8 Comparing an instance of the Object Master Shape and one instance of the Property Master Shape with an instance of the Class Master Shape of the UML Stencil and its Initial Members http : i.stack.imgur.com dlows.png .. . .. . Figure 8 - Comparing an instance of the Object Master Shape and one instance of the Property Master Shape with an instance of the Class Master Shape of the UML Stencil and its Initial Members .. . .. . 2nd Question : .. . .. . Why do es n t instance s of the Object Master Shape add its Initial Members after attaching it them to the page like adding Initial Members after adding Instance s of the Class Master Shape of the UML Stencil to the page Figure 9 Comparing an instance of the Object Master Shape with an instance of the Class Master Shape of the UML Stencil http : i.stack.imgur.com jxgLm.png .. . .. . Figure 9 - Comparing an instance of the Object Master Shape with an instance of the Class Master Shape of the UML Stencil .. . .. . I ve added the following Formula for achieving to this objective However I think that it doesn t work : .. . .. . IF LISTMEMBERCOUNT 0 DOCMD 2270 0 .. . .. . 3rd Question : .. . .. . Why isn t displayed a Bar in the instance s of the Object Master Shape to insert instance s of the Property Master Shape like displaying the Bar in the instance s of the Class Master Shape of the UML Stencil to insert its Members Figure 10 Comparing an instance of the Object Master Shape with an instance of the Class Master Shape of the UML Stencil for displaying the Bar to insert related Members http : i.stack.imgur.com AKANy.png .. . .. . Figure 10 - Comparing an instance of the Object Master Shape with an instance of the Class Master Shape of the UML Stencil for displaying the Bar to insert related Members .. . .. . 4th Question : .. . .. . Why do es instance s of the Object Master Shape accept instance s of All Master Shapes except than only instance s of the Property Master Shape instead of the instance s of the Class Master Shape of the UML Stencil that only accept s the instance s of the Member and Separator Master Shapes of the UML Stencil Figure 11 Comparing an instance of the Object Master Shape that accepts instance s of All Master Shapes with an instance of the Class Master Shape of the UML Stencil that only accepts the instance s of the Member and Separator Master Shapes of the UML Stencil http : i.stack.imgur.com 7REA3.png .. . .. . Figure 11 - Comparing an instance of the Object Master Shape that accepts instance s of All Master Shapes with an instance of the Class Master Shape of the UML Stencil that only accepts the instance s of the Member and Separator Master Shapes of the UML Stencil .. . .. . I ve set USE Property for the User.msvSDListItemMaster in the User-defined cells section of the ShapeSheet window However I think that it doesn t work . 5th Question : .. . .. . Why isn t aren t displayed options for inserting Members on the added instance s of the Property Master Shape to the instance s of the Object Master Shape like attached instance s of the Member and Separator Master Shapes of the UML Stencil to the instance s of the Class Master Shape of the UML Stencil Figure 12 Comparing an instance of the Object Master Shape and one instance of the Property Master Shape with an instance of the Class Master Shape of the UML Stencil and its Members for displaying Options of the inserting members on the added members http : i.stack.imgur.com bovlv.png .. . .. . Figure 12 - Comparing an instance of the Object Master Shape and one instance of the Property Master Shape with an instance of the Class Master Shape of the UML Stencil and its Members for displaying Options of the inserting members on the added members .. . .. . 6th Final Question : .. . .. . Why do es instance s of the Object Master Shape behave and act like the Container while I ve changed its their Master Object to a List .. . Answer : Answer of 1st Question : .. . .. . This problem always is for don t attend to the Category word . In most cases people don t attend to that word and use the Shape Master Name instead of Shape Category however they re different with each other . .. . .. . In my case I was being entered the Shape Master Name Property for User.msvSDContainerRequiredCategories A semicolon-delimited list of category names . Other shapes must have at least one matching name to be allowed as container members . and User.msvSDListRequiredCategories A semicolon-delimited list of category names . Other shapes must have at least one matching name to be allowed as list members . instead of Shape Category User.msvShapeCategories Member . Comparing Shape Master Name with Shape Category http : i.stack.imgur.com x9ZDt.png .. . .. . Figure 1 - Comparing Shape Master Name with Shape Category .. . .. . .. . .. . Answer of 2nd Question : .. . .. . For solving this problem we must be attended to two things : .. . .. . First We must add the shapes that we want to be added them automatically after instantiate the master shape . So we must add the row s for each shape that we want to be added with name User.msvSDListItemMaster Index The name or UniqueID of the master shape to create an instance of for Insert commands . The value must be placed inside a USE function . . As you can see I want to add only one shape . So I must change the name of the User.msvSDListItemMaster row to User.msvSDListItemMaster1 . If I want to add more shapes in instantiate time I must add another row like User.msvSDListItemMaster2 User.msvSDListItemMaster3 and so on . .. . .. . Second and the last thing we must add a formula to the EventDrop cell of Events section . As you can see I ve added it to my Custom List Shape as what mentioned in here https : msdn.microsoft.com en-us library office ff959245 AddingDiagrams BuildingCustomShapes and here http : blogs.msdn.com b visio archive 2010 01 12 custom-containers-lists-and-callouts-in-visio-2010.aspx : .. . .. . Specifying an Insertion Shape .. . .. . There are several ways to add a shape to a list : dragging and dropping the shape clicking the blue insertion triangle that appears near the list edge or right-clicking an existing member and inserting a shape . Clicking the insertion triangle and right-clicking to insert a shape both use the User.msvSDListItemMaster cell to determine what shape to add to the list . The name of the master is placed in quotes inside a USE function for example USE List member master . If no shape is specified in User.msvSDListItemMaster Visio will duplicate an adjacent shape in the list when inserting the shape . .. . It is also possible to automatically populate the list with some member shapes when the list is first dropped on the page . To do this put the following formula in the EventDrop cell of the list repeating the DOCMD 2270 once for each member to be added : .. . .. . IF LISTMEMBERCOUNT 0 DOCMD 2270 +DOCMD 2270 +DOCMD 2270 0 .. . .. . 2270 is the command for inserting before an item in a list visUiCmds.visCmdListInsertBefore . It is also possible to use 2271 the command for inserting after an item in a list visUiCmds.visCmdListInsertAfter . The problem is for 2270 number . I don t know why it doesn t work however when I checked the above-mentioned cell in the Events section of the Class Master Shape of the UML Stencil I saw that have been used 2499 instead of 2270 . So I used that number in my formula and it worked . If I have more than one shape for User.msvSDListItemMaster Index rows I must add +DOCMD 2499 for every shape after shape 1 . .. . .. . Answer of 3rd Question : .. . .. . This problem will solve if the problem of the 1st question be solved . .. . .. . .. . .. . Answer of 4th Question : .. . .. . This problem will solve if the problem of the 1st question be solved . As what mentioned in here https : msdn.microsoft.com en-us library office ff959245 AddingDiagrams BuildingCustomShapes and here http : blogs.msdn.com b visio archive 2010 01 12 custom-containers-lists-and-callouts-in-visio-2010.aspx : .. . .. . Controlling List Membership .. . .. . Lists have their own cells to govern list membership . Use the User.msvSDListRequiredCategories and User.msvSDListExcludedCategories cells to restrict what shapes can become list members . Because lists are also containers it is possible for shapes to become container members of the list . The standard User.msvSDContainerRequiredCategories and User.msvSDContainerExcludedCategories cells determine this behavior . By default Visio will attempt to add a shape to a list as a list member but if that fails it may try to add it as a container member . The difference between a list member and a container member is that only list members will be arranged by the list and affect its size . Shape designers should manage both sets of membership cells to ensure the right results . It s better that we use both User.msvSDListRequiredCategories and User.msvSDContainerRequiredCategories rows to get best efficiency . .. . .. . .. . .. . Answer of 5th Question : .. . .. . This problem will solve if the problem of the 1st question be solved . .. . .. . .. . .. . Answer of 6th Final Question : .. . .. . The answer is here https : msdn.microsoft.com en-us library office ff959245 AddingDiagrams BuildingCustomShapes and here http : blogs.msdn.com b visio archive 2010 01 12 custom-containers-lists-and-callouts-in-visio-2010.aspx : .. . .. . Custom Lists .. . .. . Any shape that has a value of List for the User.msvStructureType cell is treated by Visio as a list . A list orders and arranges its member shapes automatically . Note that lists are also considered to be containers and they have similar capabilities such as automatically moving copying or deleting member shapes . All of the previously mentioned container cells apply to list shapes . .. . Table 1 . ShapeSheet container properties .. . .. . User.msvSDContainerMargin .. . .. . .. . The distance between the container boundary and member shapes . .. . .. . User.msvSDContainerResize .. . .. . .. . The automatic-resize behavior for the shape : .. . .. . .. . 0 No automatic resize . .. . 1 Expand as needed . .. . 2 Always fit to contents . .. . User.msvSDContainerStyle .. . .. . .. . A one-based index value for the current visual style of the container . .. . .. . User.msvSDContainerStyleCount .. . .. . .. . The total number of visual styles that the container supports . .. . .. . User.msvSDHeadingStyle .. . .. . .. . A one-based index value for the current visual style of the container heading . .. . .. . User.msvSDHeadingStyleCount .. . .. . .. . The total number of visual styles that the container heading supports . .. . .. . User.msvSDContainerLocked .. . .. . .. . A Boolean value that prevents membership changes in the container . .. . .. . User.msvSDContainerRequiredCategories .. . .. . .. . A semicolon-delimited list of category names . Other shapes must have at least one matching name to be allowed as container members . .. . .. . User.msvSDContainerExcludedCategories .. . .. . .. . A semicolon-delimited list of category names . Other shapes with at least one matching name are disallowed as container members . .. . .. . User.msvSDContainerNoHighlight .. . .. . .. . A Boolean value that suppresses the container highlighting when member shapes are selected or added to the container . .. . .. . User.msvSDContainerNoRibbon .. . .. . .. . A Boolean value that hides the Container Tools contextual tab in the ribbon for this container . .. . .. . User.msvSDContainerHeadingEdge .. . .. . .. . A string that designates the location of the interior of the container from the perspective of the container heading . Must be Left Right Top or Bottom . .. . .. . User.msvSDMembersOnHiddenLayer .. . .. . .. . A Boolean value that determines whether Visio severs container relationships when the container or member is placed on a hidden layer . If True Visio allows relationships to exist on the hidden layer . If False Visio severs the relationships .", "Question : I want to create a new Master Shape in the Microsoft Visio 2013 x64 like the Class Master Shape in the UML Class Stencil . .. . .. . When add the Class Master Shape to a page it appends two Member and one Separator Master Shapes in itself automatically . Furthermore can add more Member and Separator Master Shapes in it . I was thinking that it adds other Master Shapes in itself by some written VBA codes however when I checked the file of the UML Class Metric Stencil in the following full path I got that it uses no VBA codes not at all . D : Program Files Microsoft Office Office15 Visio Content 1033 USTRME M.VSSX .. . .. . The file extension is Visio Stencil .vssx instead of Visio Macro-Enabled Stencil .vssm so it can t have VBA codes . .. . .. . I know that I can do something by adding some new Rows in the Actions Section of the ShapeSheet however it doesn t exist any action Rows to add fresh Member and Separator Master Shapes for Class Shape . .. . .. . Separator Shape with two additional options in the Context Menu and without any related rows in the ShapeSheet http : i.stack.imgur.com hIl5R.jpg .. . .. . Figure 1 - Separator Shape with two additional options in the Context Menu and without any related rows in the ShapeSheet .. . .. . Display a Bar to insert Separator Shape http : i.stack.imgur.com VORJ5.png .. . .. . Figure 2 - Display a Bar to insert Separator Shape .. . .. . Member Shape with two additional options in the Context Menu and without any related rows in the ShapeSheet http : i.stack.imgur.com rcl9c.jpg .. . .. . Figure 3 - Member Shape with two additional options in the Context Menu and without any related rows in the ShapeSheet .. . .. . Display a Bar to insert Member Shape http : i.stack.imgur.com 2LeWb.png .. . .. . Figure 4 - Display a Bar to insert Member Shape .. . .. . When I do RMB click on a Class Shape that is placed in the page it has two new options in the Context Menu : .. . .. . Show Template Parameter .. . Show Stereotype .. . .. . And I see related Actions Section Rows for them . .. . .. . Class Shape with two additional options in the Context Menu and related rows in the ShapeSheet http : i.stack.imgur.com 0Srrq.jpg .. . .. . Figure 5 - Class Shape with two additional options in the Context Menu and related rows in the ShapeSheet .. . .. . When I do RMB click on the Member and Separator Shapes in added Class Shape can see Insert Member Separator before after however when I add Member and Separator Master Shapes on the page directly not in the Class Shape when I do RMB click on them can t see extra options in the Context Menu . .. . .. . Separator Shape with no additional options in the Context Menu http : i.stack.imgur.com wuP4a.png .. . .. . Figure 6 - Separator Shape with no additional options in the Context Menu .. . .. . Member Shape with no additional options in the Context Menu http : i.stack.imgur.com 7nFgU.png .. . .. . Figure 7 - Member Shape with no additional options in the Context Menu .. . .. . I checked their ShapeSheet and can t find any related rows for above-mentioned actions . Now my question is that how can I create a new Master Shape with the ability to accept some other Master Shapes without any VBA codes like Class Shape in the UML Class Stencil that is created by Microsoft .. . Answer : This feature is called List structured diagram in Visio was introduced in Visio 2010 . To allow this sort of functionality allow some shape to accept others similarly to class shape you need to declare the shape to be a list by setting the user property User.msvStructureType List in it s shape sheet . To declare type of items it should accept you also need to set the cell User.msvSDListItemMaster USE Your item s master name . Means you can just draw a plain rectangle for example and then convert it into a List by adding these two user properties . There are more options available for lists container such as margins behavior etc . The MSDN article describing this functionality in details : http : blogs.msdn.com b visio archive 2010 01 12 custom-containers-lists-and-callouts-in-visio-2010.aspx .. . .. . enter image description here http : i.stack.imgur.com NIGnI.png Comment : tnx for ur good reply @Nikolay :", "Question : I have been struggling with vectorizing a particular application for sometime now and I have tried everything . From autovectorization to handcoded SSE intrinsics . But somehow I am unable to obtain speedup on my stencil based application . Following is a snippet of my current code which I have vectorized using SSE intrinsics . When I compile Intel icc it using -vec-report3 I constantly obtain this message : .. . remark : loop was not vectorized : statement cannot be vectorized . .. . .. . Am I missing something crucial Since the message doesnt elaborate as to why it cannot be vectorized I am finding it difficult to ascertain the bottleneck . UPDATE : After careful consideration of the suggestions I tweaked the code the following way . I thought it best to break it down further to identify the statements that actually are responsible for the vector dependence . When I compile icc the above code without pragma ivdep I get the following message : .. . .. . When I compile icc it with the pragma ivdep I get the following message : .. . .. . Why is there a dependence suggested for Line 196 How can I eliminate the suggested vector dependence Comment : Simplify the for construct by precomputing the end value and the number of loops . Comment : It can t vectorize it because you already vectorized it . You re not getting any speedup because your computation memory-access ratio is too low . Comment : It s not the alignment which was my first thought Mysticial corrected me but it s definitely worth starting by simplifying the expressions for the array offsets . Comment : That s not the issue . You have 10 memory accesses for only 13 operations . That s too much . The CPU will likely bottlenecked by the loads rather than the computation . From my experience you really need to have at least a 3-to-1 ratio of computation memory access . Comment : The only way to reduce the memory access is to change the way you process your data . If you re making multiple passes over the same data try grouping them together . There s not much more I can say here . You can take a look at : en.wikipedia.org wiki Loop tiling http : en.wikipedia.org wiki Loop tiling .. . Answer : The problem is that you re trying to use auto-vectorization together with hand vectorized code . The compiler says that the line can t be vectorize because you can t vectorize a vector function . Either let the compiler to auto vectorize it or disable auto vectorization and manually vectorize your code . As already commented too the auto vectorizer will calculate vectorization profitability : it checks if it s worth or not to vectorize your code ." ] }
[ "yes-answer-long", "yes-answer-short" ]
prototyping
UNK_RELATION
hyperfilesql@mobile-devices@67
hyperfilesql -- hyperfilesql operates with windows and linux with @placeholder with networks of any size and any type and it automatically manages concurrent accesses.several version of hyperfilesql are available : local network client-server windows and linux and mobile .
{ "confidence": [ 64.4184799194336, 59.74592590332031, 58.41166305541992, 51.65477752685547, 51.65477752685547, 50.32051467895508, 46.70281982421875, 45.36855697631836, 43.167686462402344, 35.22515106201172, 32.0645751953125, 24.796390533447266, 22.132423400878906, 22.132423400878906, 21.85527801513672, 21.450889587402344, 20.925769805908203, 20.798158645629883, 20.477523803710938, 20.477523803710938, 20.09758949279785, 17.780353546142578, 16.175931930541992, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 15.218257904052734, 14.197386741638184, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 13.207021713256836, 11.872756004333496, 11.872756004333496, 11.872756004333496, 11.872756004333496, 11.872756004333496, 11.872756004333496, 11.872756004333496, 11.872756004333496 ], "content": [ "How can I create a synonym in HyperFileSQL", "I have a database with HyperFileSQL and I want to access this database via php .", "I m investigate but exists poor information about the HyperFileSQL classic tables .", "And i have to connect my Python Django application to an HyperfileSQL Windev database to write some information on the HyperFile tables .", "If you want to access hyperfile through odbc you need the driver odbc for hyperfilesql .", "So I downloaded WinDev Express and I got the HyperFileSQL Control Center now .", "Here is the documentation : http : doc.pcsoft.fr fr-FR 3044179 .. . .. . Then you will be able to access with python to your database through the odbc driver for hyperfilesql .", "I have a classic HyperfileSQL database which I need to convert .FIC files .. . .. . I m trying to get some overview of the structures and keys in the database .", "Here is how do to it : .. . .. . 1 : You can get the OleDb Provider for hyperfileSql files from this page http : www.pcsoft.fr st telec modules-communs-15 wx15 63j.htm .", "But when i was trying to make a connection in windows Cmd it shows me this error : .. . .. . pyodbc.connect DRIVER HyperFileSQL SERVER Mondev1 DATABASE SP MONTREAL UI D admin PWD Traceback most recent call last : File line 1 in pyodbc.Error : 01000 01000 Microsoft ODBC Driver Manager The driver doesn t support the version of ODBC behavior that the application reques ted see SQLSetEnvAttr .", "I use windev mobile 20 and windows-7 .", "Any help", "Or any suggestion I d be glad .", "Anyone has any idea .", "The last column balance should be the difference between the sum of all operations done before the current date with type payment and the sum of all operation done before the current date with type withdrawal .. . .. . I try the following sql code .. . .. . but the Query does nt display any value .", "Any idea", "I created an application for android with mobile Windev and in this application .", "Thanks for any advice on this. .", "I m working with windev using the database hyperfile client serveur .", "I m working with windev 17 using the database hyperfile client serveur .", "If someone has any idea about what could be the problem .", "The last column balance should be the difference between the sum of all operations done before the current date with type payment and the sum of all operation done before the current date with type withdrawal .. . .. . I try the following sql code .. . .. . But I always have an error telling me that i do not have the right to put a select in the SUM .. . .. . Please can somebody help me .", "I m install the server and I have the password for the compiled application but not for the tables .", "I have an application designed by WinDev and it stores its data in hyperfilesSql files .", "What I want to do is to extract these data using a C application .", "I tried to find a OleDb Provider for these hyperfilesSql but with no result .", "2 : Here is a simple exemple of the code used to extract data : .. . .. . For other connection strings : visite the page http : doc.pcsoft.fr fr-FR 9000059", "Hi thanks for this .", "Is it possible to join to other tables", "I get an error when I do SELECT From Mytable INNER JOIN OtherTable ON Mytable.SomeId OtherTable.SomeId", "@ErikDekker : Hi frankly I did not try it but here is a web page that may help you : doc.pcsoft.fr en-us 2034007 http : doc.pcsoft.fr en-us 2034007", "I have a table named Operation with colums accountNumber date amount operationType .", "operationType can take two values : payment and withdrawal .", "I want to select the List of operations done in an account and my List should display 5 colums : Date accountNumber amount operationType and balance .", "pease how can i write a such sql query .", "thanks in advance", "Please try this :", "Try something like the following using a subquery to find the SUMs .", "There may be a more elegant solution but this should work .", "ok thanks for your response .", "I try this solution but there is something lacking .", "The sum of amounts SUM amount should be based on operations done before the current operation .", "so the date in the INNER JOIN should be the date of the current operation .", "please how can i do it", "I would use the fact that a logical expression yields 0 if false and 1 if true .", "Therefore Operation.amount logical expression will yield 0 if the expression is false and Operation.amount if the expression is true .", "As a result the following query should be close to a solution untested :", "I also tried this one .. . .. . but i m getting an error telling me that column dateop does not exist .", "please i need a help", "Here you go my man .", "Once you have sufficient reputation http : stackoverflow.com help whats-reputation you will be able to comment on any post http : stackoverflow.com help privileges comment instead provide answers that don t require clarification from the asker http : meta.stackexchange.com questions 214173 why-do-i-need-50-reputation-to-comment-what-can-i-do-instead .", "I have an order entry system .", "To do this I use an array variable to store in memory all customer orders before recording them at the last moment in the database HyperFile classic .", "I was asked to change this way of doing it rather through temporary tables .", "So I documented including HDescribeFile unfortunately it is not functional for android .", "I think it is highly possible but how", "I still lose a little so I need your help .", "How to create a classic hf temporary file WM for android", "Thank you", "Did you try this function HDescribeFile http : doc.windev.com en-US 3044206 name HDescribeFile with HDescribeItem http : doc.windev.com en-US 3044233", "I m trying to read a FIC file that is not encrypted indeed the data can almost be read when displaying it .", "I want to convert this file to a more convenient format CSV XML SQL etc.. .", "When I try to open it with Windev Express 19 I have an error telling me that the file is password protected .", "But If there really was a password the file would be encrypted I think .", "What do you mean by the data can almost be read when displaying it", "You should be able to open it by double-clicking it it should open with WDMAP and you will be able to export the datas to Excel with a right-click .", "Encryption and password-protection are two different features in WINDEV .", "You really need the file password to open it even if the content is not encrypted .", "Actually I discovered that FIC files are not only used by Windev .", "This extension is also used by Pervasive SQL .", "I was just using the wrong software to open the files .", "The FIC extension is not only used by Windev but also by Pervasive SQL .", "One should also check if it can be opened using Pervasive clients .", "If I use IODBC to connect with iodbc.ini it works", "But when I want to connect from php with odbc it doesn t I have this in return : .. . .. . SQLSTATE 0 SQLDriverConnect : 0 unixODBC I .. . .. . When I connect to the database from iodbc with this line : .. . .. . It works", "this is the my code : .. . .. . I don t know why I can t connect.. . Pleaze help", "This code works for me WD 21 .", "HTH", "What do you mean by WD 21 and HTH is it a signature", "WinDev 21 Hope This Helps", "You need to compile php with iodbc support instead of odbc .", "Hi everyone this is my first question on this website .", "So i m working on a Python Project at work .", "I ve installed pyodbc library to do the job .", "0 SQLDriverConnect 01S00 Invalid connection-string attribute 0 .. . .. . I really don t understand why the connection failed .", "Note : Sorry about my poor english level i m french : .", "You need to buy it .", "Then install it and configure an odbc connection to your database .", "Hope it will help .", "I have a table named USER and I cannot Access it via ODBC .", "I can t rename it so I want to create a synonym for it .", "How do I do this", "Try wrapping it in a .", "This may escape it for you .", "To create Synonym use this fonction HAlias .", "I simply want to access the USER table .", "Since USER is a keyword I can t access the database via ODBC ." ] }
{ "confidence": [ 88.92570495605469, 74.63725280761719, 67.78022766113281, 63.949493408203125, 61.161956787109375, 61.05021667480469, 52.42039108276367, 25.283002853393555, 23.307781219482422, 21.299854278564453, 20.645023345947266, 20.645023345947266, 15.343217849731445, 15.134988784790039 ], "content": [ "Question : Hi everyone this is my first question on this website . So i m working on a Python Project at work . And i have to connect my Python Django application to an HyperfileSQL Windev database to write some information on the HyperFile tables . I ve installed pyodbc library to do the job . But when i was trying to make a connection in windows Cmd it shows me this error : .. . .. . pyodbc.connect DRIVER HyperFileSQL SERVER Mondev1 DATABASE SP MONTREAL UI D admin PWD Traceback most recent call last : File line 1 in pyodbc.Error : 01000 01000 Microsoft ODBC Driver Manager The driver doesn t support the version of ODBC behavior that the application reques ted see SQLSetEnvAttr . 0 SQLDriverConnect 01S00 Invalid connection-string attribute 0 .. . .. . I really don t understand why the connection failed . Anyone has any idea . Note : Sorry about my poor english level i m french : . .. . Answer : If you want to access hyperfile through odbc you need the driver odbc for hyperfilesql . You need to buy it . Then install it and configure an odbc connection to your database . Here is the documentation : http : doc.pcsoft.fr fr-FR 3044179 .. . .. . Then you will be able to access with python to your database through the odbc driver for hyperfilesql . Hope it will help .", "Question : I have a classic HyperfileSQL database which I need to convert .FIC files .. . .. . I m trying to get some overview of the structures and keys in the database . So I downloaded WinDev Express and I got the HyperFileSQL Control Center now . With this tool I can open the files and i can see that there are keys on some columns . But I can t find a way to see details of the key key to what table . How can I get more details on this to get a good view of the total database structure Thanks for any advice on this. . .. . Answer : The relationships are set at Analysis Level .WDA . The analysis is then responsible to generate .FIC and .NDX indices files .", "Question : null .. . Answer : I need import table content on the new RDBS like MySQL but the original developer as locked the tables with password . I m install the server and I have the password for the compiled application but not for the tables . I m investigate but exists poor information about the HyperFileSQL classic tables . Any idea Other options for import data . Some tool for cr.ack the password database . Thanks for all . enter image description here http : i.stack.imgur.com h1mwS.png", "Question : I have a database with HyperFileSQL and I want to access this database via php . If I use IODBC to connect with iodbc.ini it works But when I want to connect from php with odbc it doesn t I have this in return : .. . .. . SQLSTATE 0 SQLDriverConnect : 0 unixODBC I .. . .. . When I connect to the database from iodbc with this line : .. . .. . It works this is the my code : .. . .. . I don t know why I can t connect.. . Pleaze help .. . Answer : You need to compile php with iodbc support instead of odbc .", "Question : I have an application designed by WinDev and it stores its data in hyperfilesSql files . What I want to do is to extract these data using a C application . I tried to find a OleDb Provider for these hyperfilesSql but with no result . Any help .. . Answer : Here is how do to it : .. . .. . 1 : You can get the OleDb Provider for hyperfileSql files from this page http : www.pcsoft.fr st telec modules-communs-15 wx15 63j.htm . 2 : Here is a simple exemple of the code used to extract data : .. . .. . For other connection strings : visite the page http : doc.pcsoft.fr fr-FR 9000059 Comment : Hi thanks for this . Is it possible to join to other tables I get an error when I do SELECT From Mytable INNER JOIN OtherTable ON Mytable.SomeId OtherTable.SomeId Comment : @ErikDekker : Hi frankly I did not try it but here is a web page that may help you : doc.pcsoft.fr en-us 2034007 http : doc.pcsoft.fr en-us 2034007", "Question : I have a database with HyperFileSQL and I want to access this database via php . If I use IODBC to connect with iodbc.ini it works But when I want to connect from php with odbc it doesn t I have this in return : .. . .. . SQLSTATE 0 SQLDriverConnect : 0 unixODBC I .. . .. . When I connect to the database from iodbc with this line : .. . .. . It works this is the my code : .. . .. . I don t know why I can t connect.. . Pleaze help .. . Answer : This code works for me WD 21 . HTH Comment : What do you mean by WD 21 and HTH is it a signature Comment : WinDev 21 Hope This Helps", "Question : How can I create a synonym in HyperFileSQL I have a table named USER and I cannot Access it via ODBC . I can t rename it so I want to create a synonym for it . How do I do this Comment : Try wrapping it in a . This may escape it for you . .. . Answer : To create Synonym use this fonction HAlias . Comment : I simply want to access the USER table . Since USER is a keyword I can t access the database via ODBC . I have ODBC installed and it works for other tables.. . 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 12461671 Comment : This does not provide an answer to the question . Once you have sufficient reputation http : stackoverflow.com help whats-reputation you will be able to comment on any post http : stackoverflow.com help privileges comment instead provide answers that don t require clarification from the asker http : meta.stackexchange.com questions 214173 why-do-i-need-50-reputation-to-comment-what-can-i-do-instead . - From Review review low-quality-posts 12461671", "Question : I created an application for android with mobile Windev and in this application . I have an order entry system . To do this I use an array variable to store in memory all customer orders before recording them at the last moment in the database HyperFile classic . I was asked to change this way of doing it rather through temporary tables . So I documented including HDescribeFile unfortunately it is not functional for android . I use windev mobile 20 and windows-7 . I think it is highly possible but how I still lose a little so I need your help . How to create a classic hf temporary file WM for android Thank you .. . Answer : Did you try this function HDescribeFile http : doc.windev.com en-US 3044206 name HDescribeFile with HDescribeItem http : doc.windev.com en-US 3044233", "Question : I m working with windev 17 using the database hyperfile client serveur . I have a table named Operation with colums accountNumber date amount operationType . operationType can take two values : payment and withdrawal . I want to select the List of operations done in an account and my List should display 5 colums : Date accountNumber amount operationType and balance . The last column balance should be the difference between the sum of all operations done before the current date with type payment and the sum of all operation done before the current date with type withdrawal .. . .. . I try the following sql code .. . .. . but the Query does nt display any value . I also tried this one .. . .. . but i m getting an error telling me that column dateop does not exist . please i need a help .. . Answer : Here you go my man .", "Question : I m working with windev using the database hyperfile client serveur . I have a table named Operation with colums accountNumber date amount operationType . operationType can take two values : payment and withdrawal . I want to select the List of operations done in an account and my List should display 5 colums : Date accountNumber amount operationType and balance . The last column balance should be the difference between the sum of all operations done before the current date with type payment and the sum of all operation done before the current date with type withdrawal .. . .. . I try the following sql code .. . .. . But I always have an error telling me that i do not have the right to put a select in the SUM .. . .. . Please can somebody help me . pease how can i write a such sql query . thanks in advance .. . Answer : Please try this :", "Question : I m working with windev using the database hyperfile client serveur . I have a table named Operation with colums accountNumber date amount operationType . operationType can take two values : payment and withdrawal . I want to select the List of operations done in an account and my List should display 5 colums : Date accountNumber amount operationType and balance . The last column balance should be the difference between the sum of all operations done before the current date with type payment and the sum of all operation done before the current date with type withdrawal .. . .. . I try the following sql code .. . .. . But I always have an error telling me that i do not have the right to put a select in the SUM .. . .. . Please can somebody help me . pease how can i write a such sql query . thanks in advance .. . Answer : Try something like the following using a subquery to find the SUMs . There may be a more elegant solution but this should work . Comment : ok thanks for your response . I try this solution but there is something lacking . The sum of amounts SUM amount should be based on operations done before the current operation . so the date in the INNER JOIN should be the date of the current operation . please how can i do it", "Question : I m working with windev using the database hyperfile client serveur . I have a table named Operation with colums accountNumber date amount operationType . operationType can take two values : payment and withdrawal . I want to select the List of operations done in an account and my List should display 5 colums : Date accountNumber amount operationType and balance . The last column balance should be the difference between the sum of all operations done before the current date with type payment and the sum of all operation done before the current date with type withdrawal .. . .. . I try the following sql code .. . .. . But I always have an error telling me that i do not have the right to put a select in the SUM .. . .. . Please can somebody help me . pease how can i write a such sql query . thanks in advance .. . Answer : I would use the fact that a logical expression yields 0 if false and 1 if true . Therefore Operation.amount logical expression will yield 0 if the expression is false and Operation.amount if the expression is true . As a result the following query should be close to a solution untested :", "Question : I m trying to read a FIC file that is not encrypted indeed the data can almost be read when displaying it . I want to convert this file to a more convenient format CSV XML SQL etc.. . When I try to open it with Windev Express 19 I have an error telling me that the file is password protected . But If there really was a password the file would be encrypted I think . If someone has any idea about what could be the problem . Or any suggestion I d be glad . Comment : What do you mean by the data can almost be read when displaying it You should be able to open it by double-clicking it it should open with WDMAP and you will be able to export the datas to Excel with a right-click . .. . Answer : The FIC extension is not only used by Windev but also by Pervasive SQL . One should also check if it can be opened using Pervasive clients .", "Question : I m trying to read a FIC file that is not encrypted indeed the data can almost be read when displaying it . I want to convert this file to a more convenient format CSV XML SQL etc.. . When I try to open it with Windev Express 19 I have an error telling me that the file is password protected . But If there really was a password the file would be encrypted I think . If someone has any idea about what could be the problem . Or any suggestion I d be glad . Comment : What do you mean by the data can almost be read when displaying it You should be able to open it by double-clicking it it should open with WDMAP and you will be able to export the datas to Excel with a right-click . .. . Answer : Encryption and password-protection are two different features in WINDEV . You really need the file password to open it even if the content is not encrypted . Comment : Actually I discovered that FIC files are not only used by Windev . This extension is also used by Pervasive SQL . I was just using the wrong software to open the files ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mobile-devices
UNK_RELATION
dd4t@tridion@91
dd4t -- dd4t short for dynamic delivery 4 tridion is a light-weight framework which links @placeholder to your mvc web application architecture .
{ "confidence": [ 60.32236862182617, 60.32236862182617, 57.77439880371094, 56.939117431640625, 55.95336151123047, 50.7900276184082, 50.20621871948242, 49.214202880859375, 48.38576126098633, 48.23004150390625, 47.058326721191406, 46.35851287841797, 45.58330154418945, 45.58330154418945, 45.183692932128906, 44.841156005859375, 43.70866775512695, 43.70866775512695, 43.62433624267578, 43.55598449707031, 42.618263244628906, 42.618263244628906, 42.298255920410156, 41.50971221923828, 40.33751678466797, 40.130897521972656, 40.11929702758789, 39.81580352783203, 39.81580352783203, 38.922645568847656, 37.52970886230469, 37.1590690612793, 37.1590690612793, 37.1590690612793, 36.22682571411133, 35.2844352722168, 35.2844352722168, 35.2844352722168, 35.2844352722168, 34.63995361328125, 34.040794372558594, 33.74293518066406, 32.550254821777344, 30.942468643188477, 30.93386459350586, 30.265155792236328, 30.18187141418457, 29.69882583618164, 29.27907943725586, 29.070587158203125, 27.623260498046875, 26.680471420288086, 25.588062286376953, 24.661666870117188, 24.554689407348633, 23.514726638793945, 23.154924392700195, 23.154924392700195, 22.071590423583984, 22.012340545654297, 22.001895904541016, 21.82050895690918, 21.269451141357422, 21.169477462768555, 20.676918029785156, 20.45522689819336, 19.64382553100586, 18.76605796813965, 18.621082305908203, 18.16053581237793, 18.143754959106445, 17.400463104248047, 17.400463104248047, 17.381319046020508, 17.381319046020508, 17.282257080078125, 16.987089157104492, 16.987089157104492, 16.987089157104492, 16.987089157104492, 16.987089157104492, 16.90241241455078, 16.90241241455078, 16.84136390686035, 16.42990493774414, 16.088851928710938, 15.940899848937988, 15.830361366271973, 15.830361366271973, 15.816822052001953, 15.699833869934082, 15.637534141540527, 15.525829315185547, 15.525829315185547, 15.522719383239746 ], "content": [ "Have you considered asking on the DD4T google-code repository : code.google.com p dynamic-delivery-4-tridion issues list http : code.google.com p dynamic-delivery-4-tridion issues list", "@Vikas : I created an issue on the DD4T google-code site : code.google.com p dynamic-delivery-4-tridion issues http : code.google.com p dynamic-delivery-4-tridion issues detail id 31 .", "I m using Tridion 2011 with DD4T feeding an MVC webapp .", "I have logged this as an issue in the DD4T Google Code site here http : code.google.com p dynamic-delivery-4-tridion issues detail id 29 .", "I am implementing DD4T MVC3 with Tridion 2011 .", "I am creating a new application regarding publishing content from Tridion to web using DD4T and MVC3 .", "I discovered this is an issue in DD4T .", "Also indicate which version of DD4T you re using .", "Publication metadata is not available in the DD4T object-model .", "Normal DD4T operation is to let Tridion own the URLs i.e .", "The reason I want to do this is that I am using DD4T and I want to have the breadcrumb automatically added into the DD4T xml .", "Everything is based on the DD4T SiteEditHelper class .", "I guess it depends on how DD4T reads the data .", "I will look at the DD4T template source to investigate .", "I have published a page to content broker using DD4T Templates and I scripted a Razor template page using DD4T .", "especially code.google.com p dynamic-delivery-4-tridion wiki http : code.google.com p dynamic-delivery-4-tridion wiki 41 QuickstartDotNet can be helpful", "I m not so sure it has to do with the DD4T templates .", "All DD4T then does is insert the SiteEdit comments into the HTML .", "Non-dd4t controllers I guess", "Your first stop should be the DD4T Project wiki : .. . .. . http : code.google.com p dynamic-delivery-4-tridion wiki TableOfContents tm 6 .. . .. . Apart from that I find Albert Romkes post very useful to get started : .. . .. . http : albertromkes.com 2011 08 24 tridion-and-asp-net-mvc3", "The work-around is to create a DD4T template class in .NET which reads the metadata from the publication and stores it in the page .", "There is a template class in DD4T called Add inherited metadata to page which does the same for structure group metadata not publication metadata .", "So : when DD4T receives a request for a tridion page it uses the TridionPage route and when it s an request Controller Action it uses default MVC route .", "We rebuilt the DD4T TBBs from source control and deployed them to tridion using TCMUploadAssembly.exe .", "I am using the DD4T framework with SDL Tridion 2011 and ASP.NET MVC4 .. . .. . I have some non-DD4T Controllers and Views which I want to use however I am getting a 404 error when I try to go to these urls .", "It seems that MetaData fields for Multimedia Components specified on the Metadata tab of my Images Schema in Tridion are not populating the corresponding property on the DD4T Component object .", "They do produce XML but the XML is consumed by DD4T and converted to HTML by the Razor templates .", "In that class you implement the method TransformPage which takes a DD4T page as its argument .", "DD4T has a TBB which does update component metadata from Folder Metadata and it is called InheritMetadataComponent .", "I pointed the siteEdit staging server url to my webserver where i hosted my DD4T application .", "DD4T tries to match your current page to the correct context publication based on the id attribute .", "In a DD4T View I am trying to pick the value of Path of the keyword inside the Category .", "DD4T has utility class FieldsBuilder with AddFields method where you can inject additional metadata .", "@BorisPonomarenko I still need siteedit config.xml to enable disable and to tell DD4T to output the JSON in the right format .", "page.MetadataFields.Add name field should work if your template extends the DD4T.Templates.Base.BasePageTemplate .. . .. . You can also take a look at the source of the Add inherited metadata to page TBB in DD4T http : code.google.com p dynamic-delivery-4-tridion source browse trunk dotnet DD4T.Templates InheritMetadataPage.cs that also shows a way of adding Metadata which gets published to the broker .", "Can anyone direct me on how to use SiteEdit specific syntax or tags in the Razor template in DD4T code", "I am very new to DD4T and am using SiteEdit 2009 SP3 and SDL Tridon 2011 SP1 .", "I am facing an issue while loading the Page created using Razor Template using DD4T .", "Adding tag and removing blueprint attribute from PageSiteEdit of DD4T had solved the problem .", "enter image description here http : i.stack.imgur.com zXrNf.jpg .. . .. . I guess this something to do with DD4T Templates which gives xml kind of output .", "I am trying to enable siteEdit for the Embedded fields for the pages implemented using DD4T .", "componentPublication : new components will be created here .. . pagePublication : new pages will be created here not used in Tridion UI 2012 .. . publishPublication : pages and components will be republished from this context usually coincides with the id .. . .. . DD4T can also easily be configured for use with Tridion UI 2012 .", "GAC ing of DD4T dll s DD4T.ContentModel.Contracts.dll DD4T.ContentModel.dll DD4T.ContentModel.XmlSeri alizers.dll and uploading of DD4T.Templates.dll worked out", "Downside for UI 2012 is that it is not listening yet to the Enable Inline Editing which you can set on the Component or Page Templates something we should consider for a future DD4T version .", "All the settings are stored in the CM Application Data or Tridion web WebUI Editors SiteEdit Configuration SiteEditEditor.conf", "That forum is entirely dedicated to SDL Tridion .", "https : groups.google.com d msg dynamic-delivery-4-tridion K0BzzPovUz4 1RvTHFHktukJ .. . .. . Also if you have multiple publishers make sure you you add the DD4T.Templates.Base.dll to the GAC of all your publishers .", "The page source : .. . .. . One more question : what is the significance of the following tag and its attributes in SiteEdit page tag which is being automatically generated by SiteEdit while using with DD4T", "We have implemented SiteEdit with DD4T using SitEdit 2009 SP1 for Tridion 2011 SP1 for the first time and we are getting a message from SiteEdit that Loading components and Schemas and it is giving this message constantly and we are unable to edit the content as it is still loading .", "You could take a look at this here and you could implement the same : .. . .. . http : code.google.com p dynamic-delivery-4-tridion source browse trunk dotnet DD4T.Templates InheritMetadataComponent.cs .. . .. . FieldsBuilder.AddFields component.MetadataFields tcmFields 1 false mergeAction Manager", "Thanks for your first SDL Tridion related post .", "I suggest you get a new SDL Tridion Content Delivery license first and if you still have the problem get back to us .", "But the Tridion Content Manager is working properly .", "Our solution : Tridion doesn t allow to create pages with mvc inside the link we defined a constraint that ignore PageId with mvc in RouteConfig .", "The Tridion logs will let you know this for sure .", "Dunno why this Q got downvoted : Tridion way of saying your license went to hell is mileading at best", "The Tridion license is going to expire today 30-Apr-2012 .", "The Core log or Tridion event log are very good candidates to contain these errors .", "The community is tying to set up a dedicated Stack Exchange Q and A site for Tridion - your help would be greatly appreciated if you would consider commiting", "In the web app you can retrieve the information from the page metadata .", "Apart from the changes to your views as Bart has described you also need to put a configuration file in the root of your web application called SiteEdit config.xml .", "map only URLs ending with .html to Tridion .", "area51.stackexchange.com proposals 38335 http : area51.stackexchange.com proposals 38335 tridion referrer 7XNO dQBJoWNn9xqeeO2NA2", "This is my route table .. . .. . I have tried moving the default route above the Tridion one but then I get 404s for the Tridion pages .", "Hi LK Thanks for posting your SDL Tridion questions here on SO - You might consider committing to the Stack Exchange proposal at area51.stackexchange.com proposals 38335 http : area51.stackexchange.com proposals 38335 tridion referrer eo63snjNlUWNn9xqeeO2NA2 to help us getting a dedicated Q A area .", "Please consider committing to the Area 51 proposal using your SO id at area51.stackexchange.com proposals 38335 http : area51.stackexchange.com proposals 38335 tridion referrer eo63snjNlUWNn9xqeeO2NA2 - We really need everyone s help .", "On my project I have publication and page metadata which is being consumed in the view .", "By default links are followed for one level from the page or component that you are publishing .", "Some alternatives to work around that : .. . .. . Configure explicit routes for all your first-level structure groups news products etc .. . .. . Publish all Tridion pages into a subsection of your site e.g .", "Have you published your categories to your target", "I guess this is because Xml content is being pushed into html page due to the use of Dynamic Page and Component TBBs which we used in our Component and Page Templates .", "Can you specify which XML you are seeing the data in", "The easiest approach is to create a template class which implements DD4T.Templates.Base.BasePageTemplate .", "If you can recognize a Tridion url from a normal url extension startpath etc you can solve it by adjusting the TridionPage route .", "I m not sure I can tell a Tridion Page from a normal action so I m going to go with creating routes for my controllers I think .", "after updating the license the application started working normal .", "For example my page metadata looks something like this in the view : .. . .. . Is there a corresponding way to access the page s publication metadata", "I do see that the IPage model has Publication.Id available but I m unsure of how to use it to retrieve publication metadata", "Thanks", "Could you ask this question on tridion.stackexchange.com http : tridion.stackexchange.com please", "You can check out the source and use this as a starting point .", "So start your view with : .. . .. . Rather than .. . .. . And try again .", "If you could see your way to fix it that would be awesome .", "The suggestion from digging around http : stackoverflow.com questions 10109183 xmlserialization-and-interfaces is to change this to IEnumerable which does support contravariance .", "The work-around is quite simple : if you use the implementation of Component or Page as your model rather than the interface it works .", "But this is no option for you I think because if you can recognize the Tridion url s from the normal one s you already would have come up with this solution .. . .. . 2 .", "Is the siteEdit tag which am using is correct", "Thanks for your advice .", "Thanks for your response .", "You probably noticed this code is based on your blog post : nunolinhares.blogspot.fr 2012 01 http : nunolinhares.blogspot.fr 2012 01 its-little-things-creating-page.html thanks for that", "Open any page that is XPM-Enabled and then : .. . .. . Click on the Dashboard Tab .. . Click on Settings .. . Click on Blueprint Context Settings .. . Select the Publication for which you want to change the default settings the Published publication .. . Select where to create new components and pages for this publication .. . Apply Changes .. . .. . This should do it .", "My guess is that this is causing your problem .", "This is incorrect because how is SiteEdit supposed to know to which component the field belongs", "The siteedit version which i am using is 2009 SP1 .", "Check your HTML using a validator such as the W3C Markup Validation Service correct your template and republish ." ] }
{ "confidence": [ 90.2602767944336, 88.22073364257812, 86.12820434570312, 85.38763427734375, 84.43961334228516, 81.27224731445312, 78.5726318359375, 77.57598114013672, 73.71595764160156, 68.89881134033203, 65.537841796875, 63.91440963745117, 63.46369171142578, 63.06211853027344, 60.2772102355957, 59.86268615722656, 59.3671989440918, 57.311668395996094, 57.311668395996094, 56.816795349121094 ], "content": [ "Question : In a DD4T View I am trying to pick the value of Path of the keyword inside the Category . but getting null in @Model.Categories . Error : Object reference not set to instance of the object . Although data exist in XML . Please suggest . Comment : Can you specify which XML you are seeing the data in Comment : Have you considered asking on the DD4T google-code repository : code.google.com p dynamic-delivery-4-tridion issues list http : code.google.com p dynamic-delivery-4-tridion issues list Comment : Thanks everyone for the quick response . Quirijn suggestion is working . .. . Answer : I discovered this is an issue in DD4T . The work-around is quite simple : if you use the implementation of Component or Page as your model rather than the interface it works . So start your view with : .. . .. . Rather than .. . .. . And try again . Comment : Hi Quirijn If you give us some more information on this we can look in to code to fix this . Comment : Thanks Quirijn . It is working now . Comment : @Vikas : I created an issue on the DD4T google-code site : code.google.com p dynamic-delivery-4-tridion issues http : code.google.com p dynamic-delivery-4-tridion issues detail id 31 . If you could see your way to fix it that would be awesome . Comment : @user1466538 : could you accept this answer please", "Question : I am creating a new application regarding publishing content from Tridion to web using DD4T and MVC3 . Can anyone did something like that or have an idea about the same so please it would be of great help to me if one can provide the help . Thanks in advance Comment : MVC4 is also supported .. . Answer : Your first stop should be the DD4T Project wiki : .. . .. . http : code.google.com p dynamic-delivery-4-tridion wiki TableOfContents tm 6 .. . .. . Apart from that I find Albert Romkes post very useful to get started : .. . .. . http : albertromkes.com 2011 08 24 tridion-and-asp-net-mvc3 Comment : especially code.google.com p dynamic-delivery-4-tridion wiki http : code.google.com p dynamic-delivery-4-tridion wiki 41 QuickstartDotNet can be helpful", "Question : In a DD4T View I am trying to pick the value of Path of the keyword inside the Category . but getting null in @Model.Categories . Error : Object reference not set to instance of the object . Although data exist in XML . Please suggest . Comment : Can you specify which XML you are seeing the data in Comment : Have you considered asking on the DD4T google-code repository : code.google.com p dynamic-delivery-4-tridion issues list http : code.google.com p dynamic-delivery-4-tridion issues list Comment : Thanks everyone for the quick response . Quirijn suggestion is working . .. . Answer : Have you published your categories to your target", "Question : In a DD4T View I am trying to pick the value of Path of the keyword inside the Category . but getting null in @Model.Categories . Error : Object reference not set to instance of the object . Although data exist in XML . Please suggest . Comment : Can you specify which XML you are seeing the data in Comment : Have you considered asking on the DD4T google-code repository : code.google.com p dynamic-delivery-4-tridion issues list http : code.google.com p dynamic-delivery-4-tridion issues list Comment : Thanks everyone for the quick response . Quirijn suggestion is working . .. . Answer : Yes verify first if you published the Categories to the Broker Database . The way Page or Component XML is deserialized into an IPage or IComponent object is pretty straight forward . Also indicate which version of DD4T you re using . I remember there was an issue with deserialization in earlier releases .", "Question : In a DD4T View I am trying to pick the value of Path of the keyword inside the Category . but getting null in @Model.Categories . Error : Object reference not set to instance of the object . Although data exist in XML . Please suggest . Comment : Can you specify which XML you are seeing the data in Comment : Have you considered asking on the DD4T google-code repository : code.google.com p dynamic-delivery-4-tridion issues list http : code.google.com p dynamic-delivery-4-tridion issues list Comment : Thanks everyone for the quick response . Quirijn suggestion is working . .. . Answer : I have logged this as an issue in the DD4T Google Code site here http : code.google.com p dynamic-delivery-4-tridion issues detail id 29 . It seems this is caused by contravariance not being supported by List and IList meaning that lines like : .. . .. . in the ContentModel class will never work . The suggestion from digging around http : stackoverflow.com questions 10109183 xmlserialization-and-interfaces is to change this to IEnumerable which does support contravariance . Comment : Thanks Neil that sounds like it might be it indeed . Great word contravariance I m going to be using it in casual conversation : Comment : Vote me up Quirijn", "Question : In a DD4T View I am trying to pick the value of Path of the keyword inside the Category . but getting null in @Model.Categories . Error : Object reference not set to instance of the object . Although data exist in XML . Please suggest . Comment : Can you specify which XML you are seeing the data in Comment : Have you considered asking on the DD4T google-code repository : code.google.com p dynamic-delivery-4-tridion issues list http : code.google.com p dynamic-delivery-4-tridion issues list Comment : Thanks everyone for the quick response . Quirijn suggestion is working . .. . Answer : Its working after implementing Quirijn suggestion like Component c Component Model c.Categories 0 .. . Thanks Vikas Kumar", "Question : Is it possible to set the value of a metadata field dynamically from a TBB Or is it possible to dynamically add a metadata field that does not necessarily exist on a schema from a TBB The reason I want to do this is that I am using DD4T and I want to have the breadcrumb automatically added into the DD4T xml . I have tried the following : .. . .. . However neither of these methods seem to work . Is this impossible Comment : I guess it depends on how DD4T reads the data . If they re reading the page component from the package then this should have worked . If they re actually loading it from the Engine then it will ignore any change you made to the package object . Comment : Good point Nuno . I will look at the DD4T template source to investigate . You probably noticed this code is based on your blog post : nunolinhares.blogspot.fr 2012 01 http : nunolinhares.blogspot.fr 2012 01 its-little-things-creating-page.html thanks for that .. . Answer : DD4T has utility class FieldsBuilder with AddFields method where you can inject additional metadata . DD4T has a TBB which does update component metadata from Folder Metadata and it is called InheritMetadataComponent . You could take a look at this here and you could implement the same : .. . .. . http : code.google.com p dynamic-delivery-4-tridion source browse trunk dotnet DD4T.Templates InheritMetadataComponent.cs .. . .. . FieldsBuilder.AddFields component.MetadataFields tcmFields 1 false mergeAction Manager", "Question : Is it possible to set the value of a metadata field dynamically from a TBB Or is it possible to dynamically add a metadata field that does not necessarily exist on a schema from a TBB The reason I want to do this is that I am using DD4T and I want to have the breadcrumb automatically added into the DD4T xml . I have tried the following : .. . .. . However neither of these methods seem to work . Is this impossible Comment : I guess it depends on how DD4T reads the data . If they re reading the page component from the package then this should have worked . If they re actually loading it from the Engine then it will ignore any change you made to the package object . Comment : Good point Nuno . I will look at the DD4T template source to investigate . You probably noticed this code is based on your blog post : nunolinhares.blogspot.fr 2012 01 http : nunolinhares.blogspot.fr 2012 01 its-little-things-creating-page.html thanks for that .. . Answer : page.MetadataFields.Add name field should work if your template extends the DD4T.Templates.Base.BasePageTemplate .. . .. . You can also take a look at the source of the Add inherited metadata to page TBB in DD4T http : code.google.com p dynamic-delivery-4-tridion source browse trunk dotnet DD4T.Templates InheritMetadataPage.cs that also shows a way of adding Metadata which gets published to the broker .", "Question : I am using the DD4T framework with SDL Tridion 2011 and ASP.NET MVC4 .. . .. . I have some non-DD4T Controllers and Views which I want to use however I am getting a 404 error when I try to go to these urls . This is my route table .. . .. . I have tried moving the default route above the Tridion one but then I get 404s for the Tridion pages . The only way to get it working it seems is to have a specific route to my controller e.g : .. . .. . Anyone have any ideas As the above solution is not ideal . I do not have any UI 2012 config in my web.config Comment : What do you mean by normal controllers Non-dd4t controllers I guess .. . Answer : Our solution : Tridion doesn t allow to create pages with mvc inside the link we defined a constraint that ignore PageId with mvc in RouteConfig . So : when DD4T receives a request for a tridion page it uses the TridionPage route and when it s an request Controller Action it uses default MVC route . Comment : What about pages in a structure group Surely they would contain a slash Comment : you re right I updated the solution", "Question : On my project I have publication and page metadata which is being consumed in the view . For example my page metadata looks something like this in the view : .. . .. . Is there a corresponding way to access the page s publication metadata I do see that the IPage model has Publication.Id available but I m unsure of how to use it to retrieve publication metadata Thanks Comment : Could you ask this question on tridion.stackexchange.com http : tridion.stackexchange.com please That forum is entirely dedicated to SDL Tridion . .. . Answer : Publication metadata is not available in the DD4T object-model . The work-around is to create a DD4T template class in .NET which reads the metadata from the publication and stores it in the page . In the web app you can retrieve the information from the page metadata . There is a template class in DD4T called Add inherited metadata to page which does the same for structure group metadata not publication metadata . You can check out the source and use this as a starting point .", "Question : Can anyone direct me on how to use SiteEdit specific syntax or tags in the Razor template in DD4T code I have seen Site Edit related classes in it but could not understand how to use SiteEdit tags in the view where there were some syntax similar to Dreamweaver for example RenderComponentField or tcdl : ComponentField which we used in Dreamweaver . I am very new to DD4T and am using SiteEdit 2009 SP3 and SDL Tridon 2011 SP1 . Thanks in advance . Update : We have tried the implementation mentioned in the answer but unfortunately we are getting an error when we are accessing the page in proxy stating Invalid template -The HTML is invalid probably because your template code produces invalid HTML such as a p tag inside another p tag . Check your HTML using a validator such as the W3C Markup Validation Service correct your template and republish . I guess this is because Xml content is being pushed into html page due to the use of Dynamic Page and Component TBBs which we used in our Component and Page Templates . Let us kow how to continue further . Comment : The community is tying to set up a dedicated Stack Exchange Q and A site for Tridion - your help would be greatly appreciated if you would consider commiting area51.stackexchange.com proposals 38335 http : area51.stackexchange.com proposals 38335 tridion referrer 7XNO dQBJoWNn9xqeeO2NA2 Comment : Hi @L K . I just noticed that this question is still open . Did any of the answers below help you solve the problem If so can you accept that answer by clicking the large check mark to the left of it .. . Answer : Apart from the changes to your views as Bart has described you also need to put a configuration file in the root of your web application called SiteEdit config.xml . It should look like this : .. . .. . You must list all your active publications here . DD4T tries to match your current page to the correct context publication based on the id attribute . If it cannot find it SiteEdit will be disabled . The other attributes allow you to control the behaviour of SiteEdit . componentPublication : new components will be created here .. . pagePublication : new pages will be created here not used in Tridion UI 2012 .. . publishPublication : pages and components will be republished from this context usually coincides with the id .. . .. . DD4T can also easily be configured for use with Tridion UI 2012 . Just change the first element in the configuration as follows : Comment : Thanks Quirijn for additional info", "Question : I am using the DD4T framework with SDL Tridion 2011 and ASP.NET MVC4 .. . .. . I have some non-DD4T Controllers and Views which I want to use however I am getting a 404 error when I try to go to these urls . This is my route table .. . .. . I have tried moving the default route above the Tridion one but then I get 404s for the Tridion pages . The only way to get it working it seems is to have a specific route to my controller e.g : .. . .. . Anyone have any ideas As the above solution is not ideal . I do not have any UI 2012 config in my web.config Comment : What do you mean by normal controllers Non-dd4t controllers I guess .. . Answer : Normal DD4T operation is to let Tridion own the URLs i.e . catch all URLs and pass them to one PageController . This interferes with the automatic routing of controllers actions based on their names so one of these niceties has to give I personally like Albert s first suggestion because it is simple . E.g . map only URLs ending with .html to Tridion . Unfortunately this causes a problem with default pages in SGs since sg is not recognized even though you may have a sg index.html in the broker . Some alternatives to work around that : .. . .. . Configure explicit routes for all your first-level structure groups news products etc .. . .. . Publish all Tridion pages into a subsection of your site e.g . content and map that to a specific route Comment : Thanks Quirijn . I m not sure I can tell a Tridion Page from a normal action so I m going to go with creating routes for my controllers I think .", "Question : I am using the DD4T framework with SDL Tridion 2011 and ASP.NET MVC4 .. . .. . I have some non-DD4T Controllers and Views which I want to use however I am getting a 404 error when I try to go to these urls . This is my route table .. . .. . I have tried moving the default route above the Tridion one but then I get 404s for the Tridion pages . The only way to get it working it seems is to have a specific route to my controller e.g : .. . .. . Anyone have any ideas As the above solution is not ideal . I do not have any UI 2012 config in my web.config Comment : What do you mean by normal controllers Non-dd4t controllers I guess .. . Answer : We just placed a page se blank.html in the root and made sure it was only deployed to staging so it was there where needed and didn t require a specific route . That is not really answering your question of course but you can consider it as an option perhaps .", "Question : I am using the DD4T framework with SDL Tridion 2011 and ASP.NET MVC4 .. . .. . I have some non-DD4T Controllers and Views which I want to use however I am getting a 404 error when I try to go to these urls . This is my route table .. . .. . I have tried moving the default route above the Tridion one but then I get 404s for the Tridion pages . The only way to get it working it seems is to have a specific route to my controller e.g : .. . .. . Anyone have any ideas As the above solution is not ideal . I do not have any UI 2012 config in my web.config Comment : What do you mean by normal controllers Non-dd4t controllers I guess .. . Answer : Perhaps you could make a catch all mapping like the TridionPage mapping to a Controller which redirects to the correct controller and action based on the parameters with the RedirectToAction function Not sure if this is an ideal solution for you .", "Question : I m using Tridion 2011 with DD4T feeding an MVC webapp . It seems that MetaData fields for Multimedia Components specified on the Metadata tab of my Images Schema in Tridion are not populating the corresponding property on the DD4T Component object . e.g . LinkedComponentFields 0 .MetadataFields is empty and Multimedia.AltText is null . Specifically the field I m after is the AltText . But as the entire MetadataFields collection is empty on the Component it s obviously not pulling through any metadata properties . i have tried using TemplateBuilder to set parameters in the Component Template I set resolve width and height to yes and the MergeAction to Merge - this did not help . Any ideas Comment : Thanks for your first SDL Tridion related post . Please consider committing to the Area 51 proposal using your SO id at area51.stackexchange.com proposals 38335 http : area51.stackexchange.com proposals 38335 tridion referrer eo63snjNlUWNn9xqeeO2NA2 - We really need everyone s help . Comment : Do you see anything in the Template Builder log at the DEBUG level You should see messages like : start retrieving tcm metadata fields add fields : found 1 fields .. . Answer : It is possibly caused by the linklevel . By default links are followed for one level from the page or component that you are publishing . You can increase this by adding a parameter to the template invocation called linklevel . Try it with a value of 2 first then increase until it works . Comment : Excellent that did the trick Thanks .", "Question : I am using the DD4T framework with SDL Tridion 2011 and ASP.NET MVC4 .. . .. . I have some non-DD4T Controllers and Views which I want to use however I am getting a 404 error when I try to go to these urls . This is my route table .. . .. . I have tried moving the default route above the Tridion one but then I get 404s for the Tridion pages . The only way to get it working it seems is to have a specific route to my controller e.g : .. . .. . Anyone have any ideas As the above solution is not ideal . I do not have any UI 2012 config in my web.config Comment : What do you mean by normal controllers Non-dd4t controllers I guess .. . Answer : There are several options AFAICS : .. . .. . 1 . If you can recognize a Tridion url from a normal url extension startpath etc you can solve it by adjusting the TridionPage route . But this is no option for you I think because if you can recognize the Tridion url s from the normal one s you already would have come up with this solution .. . .. . 2 . Implement a route-constraint on the TridionPage route . Check in this routeconstraint if the requested url is in the Broker . If true : return true otherwise false . If it returns false the next route that matches will handle the request . Not sure about performance though . 3 . Your own option : a specific route for your normal pages . I am sure I missed some options . Hopefully someone else shares them here . Comment : Thanks Albert . I think I m probably going to have to go with the 3rd solution for now If I think of a better way I will update here . Comment : +1 to the specific route - that s how we tackled this . Obviously you dont have to have MyController in the url", "Question : Can anyone direct me on how to use SiteEdit specific syntax or tags in the Razor template in DD4T code I have seen Site Edit related classes in it but could not understand how to use SiteEdit tags in the view where there were some syntax similar to Dreamweaver for example RenderComponentField or tcdl : ComponentField which we used in Dreamweaver . I am very new to DD4T and am using SiteEdit 2009 SP3 and SDL Tridon 2011 SP1 . Thanks in advance . Update : We have tried the implementation mentioned in the answer but unfortunately we are getting an error when we are accessing the page in proxy stating Invalid template -The HTML is invalid probably because your template code produces invalid HTML such as a p tag inside another p tag . Check your HTML using a validator such as the W3C Markup Validation Service correct your template and republish . I guess this is because Xml content is being pushed into html page due to the use of Dynamic Page and Component TBBs which we used in our Component and Page Templates . Let us kow how to continue further . Comment : The community is tying to set up a dedicated Stack Exchange Q and A site for Tridion - your help would be greatly appreciated if you would consider commiting area51.stackexchange.com proposals 38335 http : area51.stackexchange.com proposals 38335 tridion referrer 7XNO dQBJoWNn9xqeeO2NA2 Comment : Hi @L K . I just noticed that this question is still open . Did any of the answers below help you solve the problem If so can you accept that answer by clicking the large check mark to the left of it .. . Answer : The SiteEdit markup is not generated like it is done in a Dreamweaver Template you are responsible yourself to place the markup for your editable fields in the Razor view . Good thing for this is that it works for similar for SiteEdit 2009 SP3 and UI 2012 . Downside for UI 2012 is that it is not listening yet to the Enable Inline Editing which you can set on the Component or Page Templates something we should consider for a future DD4T version . Everything is based on the DD4T SiteEditHelper class . You start in your page view before the body tag by placing the following call : .. . .. . This will write out the page markup and if you set the style to SiteEdit2012 in your SiteEdit config.xml it will also write out the bootstrap script required for UI 2012 . Then for every Component Presentation and every editable Component Field you will also need to add the appropriate markup . For a Component presentation you can use : .. . .. . Make sure you write this out inside a DIV or some other element that can mark the boundary of your Component Presentation . For Component Fields a similar story you can use : Comment : Thanks Bart will get back with more doubts :", "Question : We have implemented SiteEdit with DD4T using SitEdit 2009 SP1 for Tridion 2011 SP1 for the first time and we are getting a message from SiteEdit that Loading components and Schemas and it is giving this message constantly and we are unable to edit the content as it is still loading . Can anybody let me know the issue The page source : .. . .. . One more question : what is the significance of the following tag and its attributes in SiteEdit page tag which is being automatically generated by SiteEdit while using with DD4T Comment : Hi LK Thanks for posting your SDL Tridion questions here on SO - You might consider committing to the Stack Exchange proposal at area51.stackexchange.com proposals 38335 http : area51.stackexchange.com proposals 38335 tridion referrer eo63snjNlUWNn9xqeeO2NA2 to help us getting a dedicated Q A area . Hope to see you there . .. . Answer : Issue got ressolved : We just need to surround or add span tags to SiteEdit tags . For example .. . .. . Happy coding", "Question : We have implemented SiteEdit with DD4T using SitEdit 2009 SP1 for Tridion 2011 SP1 for the first time and we are getting a message from SiteEdit that Loading components and Schemas and it is giving this message constantly and we are unable to edit the content as it is still loading . Can anybody let me know the issue The page source : .. . .. . One more question : what is the significance of the following tag and its attributes in SiteEdit page tag which is being automatically generated by SiteEdit while using with DD4T Comment : Hi LK Thanks for posting your SDL Tridion questions here on SO - You might consider committing to the Stack Exchange proposal at area51.stackexchange.com proposals 38335 http : area51.stackexchange.com proposals 38335 tridion referrer eo63snjNlUWNn9xqeeO2NA2 to help us getting a dedicated Q A area . Hope to see you there . .. . Answer : Compare in IIS Manager the following virtual directories under .. . .. . With .. . .. . Those directories should contain the same items structure . If not I have seen that error happening . The forever Loading components and Schemas also can happen if popup window that SiteEdit pops during login is blocked by a popup-blocker .", "Question : We rebuilt the DD4T TBBs from source control and deployed them to tridion using TCMUploadAssembly.exe . We Created a simple component with a multimedia link field a component link field and a text field and populated the values . Then created a CT with Generate dynamic component Publish binaries for component TBB s inside it and tried to publish a single DCP . We are able to run the CT against component in template builder and get the expected output i.e well formatted Serialized component XML output .. . .. . However when publishing we get a serialization error . see below . This error is occurring while the code is trying to serialize any component field text multimedia component link etc .. . .. . We are unable to identify the root cause . Tried to remote debug the code even though all the dynamic.component object properties are correctly set while serializing the component object we are facing this issue . Even tried to restart COM + publisher services but issue still persists . Any pointers is highly appreciated . Couldn t able to find why the code is running correctly in Template builder without serialization errors but failing at publish time with below error . .. . .. . Here s the error message : .. . .. . There was an error generating the XML document . .. . There was an error generating the XML document . .. . Object reference not set to an instance of an object . .. . Component : Templating .. . .. . Errorcode : 0 .. . .. . User : NORD DWTMTSUser .. . .. . StackTrace Information Details : .. . .. . at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterField.XSArrayInfo.get Item Object a Int32 i .. . .. . at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterField.Write13 Field String n String ns Object o Boolean isNullable Boolean needType .. . .. . at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterField.Write14 Field Object o .. . .. . at System.Xml.Serialization.XmlSerializer.Serialize XmlWriter xmlWriter Object o XmlSerializerNamespaces namespaces String encodingStyle String id .. . .. . at System.Xml.Serialization.XmlSerializer.Serialize XmlWriter xmlWriter Object o .. . .. . at DD4T.ContentModel.SerializableDictionary 3.WriteXml XmlWriter writer in D : DW-Source Mainline Src DD4T DD4T.ContentModel SerializableDictionary.cs : line 80 .. . .. . at System.Xml.Serialization.XmlSerializationWriter.WriteSerializable IXmlSerializable serializable String name String ns Boolean isNullable Boolean wrapped .. . .. . at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write13 Component String n String ns Component o Boolean isNullable Boolean needType in : line 0 .. . .. . at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write32 Component Object o in : line 0 .. . .. . at Microsoft.Xml.Serialization.GeneratedAssembly.ComponentSerializer.Serialize Object objectToSerialize XmlSerializationWriter writer in : line 0 .. . .. . at System.Xml.Serialization.XmlSerializer.Serialize XmlWriter xmlWriter Object o XmlSerializerNamespaces namespaces String encodingStyle String id .. . .. . at System.Xml.Serialization.XmlSerializer.Serialize XmlWriter xmlWriter Object o XmlSerializerNamespaces namespaces String encodingStyle String id .. . .. . at System.Xml.Serialization.XmlSerializer.Serialize XmlWriter xmlWriter Object o XmlSerializerNamespaces namespaces String encodingStyle .. . .. . at System.Xml.Serialization.XmlSerializer.Serialize XmlWriter xmlWriter Object o XmlSerializerNamespaces namespaces .. . .. . at DD4T.Templates.Base.BaseComponentTemplate.Transform Engine engine Package package in D : DW-Source Mainline Src DD4T DD4T.Templates.Base BaseComponentTemplate.cs : line 88 .. . .. . at Tridion.ContentManager.Templating.Assembly.AssemblyMediator.Transform Engine engine Template template Package package .. . .. . at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate Engine engine Package package String templateUri String className .. . .. . at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform Engine engine Package package .. . .. . at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform Engine engine Template template Package package .. . .. . at Tridion.ContentManager.Templating.Engine.ExecuteTemplate Template template Package package .. . Answer : Did Quirijn s answer help you https : groups.google.com d msg dynamic-delivery-4-tridion K0BzzPovUz4 1RvTHFHktukJ .. . .. . Also if you have multiple publishers make sure you you add the DD4T.Templates.Base.dll to the GAC of all your publishers . If you ve gone for option 2 of Q s answer Comment : GAC ing of DD4T dll s DD4T.ContentModel.Contracts.dll DD4T.ContentModel.dll DD4T.ContentModel.XmlSeri alizers.dll and uploading of DD4T.Templates.dll worked out Uploading of ILMerged DD4T.Templates.merged.dll is still throwing serilization error at publish time . We are figuring out the solution for the same . Thanks a lot for help :" ] }
[ "yes-answer-long", "yes-answer-short" ]
tridion
UNK_RELATION
game-theory@modeling@129
game-theory -- studies conflict and cooperation between rational agents in games with applications in computer game programming @placeholder of economical or coevolutionary processes and more .
{ "confidence": [ 45.70045471191406, 45.676509857177734, 40.407142639160156, 40.21195602416992, 39.78727722167969, 39.35353088378906, 38.86542510986328, 38.32224655151367, 38.32224655151367, 37.489654541015625, 36.81623458862305, 36.81623458862305, 36.54057693481445, 35.75593566894531, 35.723079681396484, 35.297576904296875, 35.17097473144531, 34.074180603027344, 33.767887115478516, 33.07075500488281, 32.846641540527344, 32.79624557495117, 32.25285339355469, 32.24436950683594, 31.69408416748047, 31.69408416748047, 31.489280700683594, 31.489280700683594, 31.489280700683594, 31.489280700683594, 31.489280700683594, 31.420475006103516, 31.269508361816406, 31.16059112548828, 30.97962188720703, 30.592132568359375, 30.510379791259766, 30.419898986816406, 30.318313598632812, 30.318313598632812, 30.113510131835938, 29.927513122558594, 29.927513122558594, 29.795806884765625, 29.795806884765625, 29.488712310791016, 29.435935974121094, 29.432392120361328, 29.365921020507812, 29.365921020507812, 29.21969985961914, 29.19570541381836, 29.19570541381836, 29.19570541381836, 29.19570541381836, 29.19570541381836, 29.162857055664062, 29.162857055664062, 29.073688507080078, 28.90887451171875, 28.88387680053711, 28.88387680053711, 28.875675201416016, 28.669414520263672, 28.669414520263672, 28.669414520263672, 28.551742553710938, 28.546733856201172, 28.464611053466797, 28.405899047851562, 28.367456436157227, 28.367456436157227, 28.02399444580078, 27.990150451660156, 27.828601837158203, 27.819934844970703, 27.819934844970703, 27.819934844970703, 27.817543029785156, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.41490936279297, 27.23497772216797, 27.11699676513672, 27.089988708496094, 26.902843475341797, 26.75829315185547, 26.75829315185547 ], "content": [ "In reality it is either dynamic-programming or even more relevant game-theory problem .", "If not what are the most well known applications of game-theory in computer-science", "Technically it s combinatorial game-theory .", "The games I model are actually TU games and the agents in the game dynamically change the game by adding value to the characteristic function and then competing for profits which they only imperfectly find .", "In Net-logo i am trying to implement min-max strategy algorithm of a game-theory for decision making between agents within a swarm .", "As for a more general library for solving game-theory there s nothing specifically designed for that .", "You need to dig into the game-theory in particular Grundy numbers and how they relate to Nim games .", "This is not game-theory http : en.wikipedia.org wiki Game theory", "That s not the usual definition of optimal in game-theory .", "hi Sainath do you know how to run stochastic games using gambit game-theory tool... .", "There is always a chance to beat the computer along the course of a game .", "It was an announcement that the game of chess was solved by a Russian chess computer .", "In transferable utility characteristic function games cooperative game-theory the most famous solution concept is the core of the game defined as the set of feasible payoff allocations that cannot be improved upon by any coalition .", "a A game consists of more than a programming language .", "Grundy s Game and many games like it can be solved with an algorithm like this : .. . .. . Implementations of GameState and Move depend on the game .", "I m writing a game-theory simulation in Python .", "Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback .", "Turn the collection into a game where you re taking turns with different games and the person who wins the last game wins .", "I am solving this question just for practice and I don t know much about game-theory .", "I m trying to define the game inductive type for combinatorial games .", "I m new to game-theory and was thinking about how to find mixed strategies for a particular game and furthermore how to find good mixed strategy approximations of a game that may be too large to compute .", "Grundy s Game", "A B if the two games are equivalent in the sense that the sum of games A + -B is a zero-game so that the player who goes first loses .", "Chess is a finite deterministic game with complete information about the game state .. . 2 .", "I have read http : www.codechef.com wiki tutorial-game-theory but couldn t apply the same logic here .", "From game-theory which is what this question is about the answer is yes Chess can be played perfectly .", "However the Game Log is incomplete .", "The Game Log will not mention this .", "A starts the game and they alternate moves .", "It is a typical impartial game .", "It is called as follows in the Game class .", "What game is it", "So she wants to change the rules of the game .", "I ve been trying to reproduce the Extensive Form of the Game efg into Gambit so as to perform some other basic Game Theory computations on the Tree Structure .", "enter image description here http : i.stack.imgur.com KRkNH.jpg .. . .. . I would like to solve for it s Nash Equilibrium and do some basic Game Theory computations on it using Gambit the Python Game Theory library .", "It is possible for a computer or a person for that matter to end every single chess game that he she it participates in in either a win or a stalemate .", "The center node would be the start of the game .", "The exact nimber is only useful when you can break a complex game into a collection of separate games that you are choosing between on each turn .", "Neural networks actually aren t very good for exploring combinatorial game-theory and neither are genetic algorithms .", "Of course neural networks are very good for exploring how neural networks deal with combinatorial game-theory but that s not the same thing .", "For Grundy s game both are simple .", "If your implication was true wouldn t it be true of every 2 player game meaning every game has a perfect strategy", "See : chess.com blog kurtgodden the-longest-possible-chess-game http : www.chess.com blog kurtgodden the-longest-possible-chess-game", "We can use Grundy function here because after converting ++ to -- the game is divided into a sum of 2 separate games : to the left from -- and to the right .", "As you can see you can easily calculate who will win a game with n stones by complete knowledge of the outcomes of the games with 1 to n-1 stones .", "The problem is a variant of Game of Nim but I am not able to visualize it .", "If I can get this idea off the ground it would be great for experimenting Combinatorial Game Theory http : www.math.ucla.edu tom Game Theory comb.pdf to see if a computer and find the optimal move .", "To find the perfect game you would then just need to use the Minimax algorithm see http : en.wikipedia.org wiki Minimax to compute the optimal moves for each player which would lead to one or more optimal games .", "Raymond Hettinger wrote a recipe for solving zero-sum payoff matrices http : code.activestate.com recipes 496825-game-theory-payoff-matrix-solver .", "I m not mathematician and not a very good chess-player I also assumed that in theory should the entire game tree be known that the answer to this is yes .", "Game class constructor accepts two player objects and number of the game .", "My primary source of information is the Game Log .", "Does the starting positions uniquely identifies the winner of this game", "This is not a question about computers but only about the game of chess .", "This is not a question about computers but only about the game of chess .", "Therefore the following is an entirely legal game : 1 .", "run method of each Game instance is executed in a different thread so all the games are going on in parallel .", ": - The point is that you come up with the right strategy for the combined game by looking at the xors of the nimbers of the individual games .", "We need only to pass the coalitional values to the function ShapleyValue to get .. . .. . More details are given by my Matlab Game Theory Toolbox that can be found here : .. . .. . http : www.mathworks.com matlabcentral fileexchange 35933-mattugames", "I ve struggled some time with a problem from a programming contest Andrew Stankevich Contest 21 http : codeforces.com gym 100337 about a game that goes like follows : .. . .. . Nick and Peter like to play the following game .. . .", "I ve done some volunteer game programming in LPC for a MUD in my past and everything there was easy .", "A lot of the help on game programming I ve found has been about making sprites move and handling collision-detection .", "I ve just started putting together some game-theory python code : http : drvinceknight.github.com Gamepy .. . .. . There s code which : .. . .. . solves matching games .. . calculates shapley values in cooperative games .. . runs agent based simulations to identify emergent behaviour in normal form games .. . clumsily - my python foo is still growing uses the lrs library written in C : http : cgm.cs.mcgill.ca avis C lrs.html to calculate the solutions to normal form games this is I believe what you want .", "There are multiple works in the intersection of machine-learning game-theory mechanism design and social network-analysis .", "Recently there is also surge in interest about using mechanism design and game-theory for active learning problems .", "I ve been reading this small tutorial https : www.mathcamp.org gettoknowmathcamp academics archives Alfonso-CGT-lectures.pdf on Nimbers and game-theory .", "I m not even sure whether it makes sense to have this as a one shot game or a sort of hide and seek kind of game", "I need help in solving this question - .. . .. . Manasa loves the NIM Game but having played the same game so many times she gets bored one day .", "By the way this game is fun : D", "Programs look at all possible moves for both sides in the current position and use heuristics to find a good move to drive the game in the direction of a favorable position for the computer .", "Since we know the territory owners at the end of the game and the Game Log mentions all owner changes determining territory owners at any point in time is easy .", "It has been proven for the game of checkers http : www.sciam.com podcast episode.cfm id E3E98228-E7F2-99DF-392B5305E37F61F1 that a program can always win or tie the game .", "The example below can be reproduced with my Matlab Game Theory Toolbox MatTuGames which can be downloaded at the following URL : .. . .. . http : www.mathworks.com matlabcentral fileexchange 35933-mattugames .. . .. . To start with consider the following five person game : .. . .. . The Shapley value is quickly calculated through .. . .. . Elapsed time is 0.002676 seconds .", "If I can get this idea off the ground it would be great for experimenting Combinatorial Game Theory http : www.math.ucla.edu tom Game Theory comb.pdf .", "The game is a variation of poker in each round there can be between 1 -to- 5 moves and the max depth is 40 5 O-Poker", "An example dictionary+game would be ideal to show a disproof .", "which game to know the branching factor which depth", "The player who has no valid moves loses the game .", "You could use the browser-based Game Theory Explorer gte.csc.liv.ac.uk gte builder http : gte.csc.liv.ac.uk gte builder to create the game and solve it for all equilibria and then save the game in GTE s xml format which should be able to be read by Gambit .", "Notes : .. . .. . It s not in the Game Log but all territories start w 3 troops .", "The Game Log gives information on troop deployment reinforcement and conquest .", "Players A and B play a game optimally and move alternately .", "For demonstration let us compute the Shapley value for the above game v .", "GAMUT assumes that you demanded the generation of a game using the command-line .", "Openings are scripted to get you to a mid-game that gives you a strong position .", "Either way the information is perfect -- everything is known -- the game is deterministic by definition .", "The question is does there exist a fail-safe strategy for never losing the game", "For example the game tic-tac-toe normally is played based on heuristics .", "2 Solving the game does NOT imply that their exists a failsafe strategy .", "All of the really interesting research in the field is being done in the game Go .", "Unfortunately the chess game problem is too large for machine-learning to work .", "Lots of answers here make the important game-theoretic points : .. . .. . 1 .", "You can solve a finite game and identify a perfect strategy .. . 3 .", "Are there mid-point in the game where the other player could force a disadvantage", "Here is updated solution : .. . .. . This link discusses the strategy : http : www.geeksforgeeks.org dynamic-programming-set-31-optimal-strategy-for-a-game", "In this game you can figure out the general formula by simply looking at n numbers for games in which player A wins in inital state without actually calculating Grundy numbers .", "I want to use Shapely value to evaluate each player s value in a cooperative game .", "http : stackoverflow.com questions 22342854 what-is-the-optimal-algorithm-for-the-game-2048 .. . .. . That question asks what is the best way to win the game", "Now this seems like a classical game-theory problem where each player tries to play optimally and at each step plays a move that moves him to a winning position .", "You might be able to do something with GarlicSim http : pypi.python.org pypi garlicsim 0.6.1 which claims to be for any kind of simulation : Physics game theory.. . but I ve never used it before so I can t recommend it ." ] }
{ "confidence": [ 47.289039611816406, 44.704219818115234, 44.543426513671875, 44.09653091430664, 44.021202087402344, 43.276973724365234, 42.61360168457031, 41.6678352355957, 41.641578674316406, 41.005332946777344, 40.738067626953125, 40.40663528442383, 40.39024353027344, 40.38804626464844, 40.12553024291992, 39.97834777832031, 39.59236145019531, 39.57672119140625, 38.962074279785156, 38.551265716552734 ], "content": [ "Question : Is their any notable work research papers applications articles etc . regarding both of these fields being used together If not what are the most well known applications of game-theory in computer-science I ve come across mention of this several times . .. . Answer : There are multiple works in the intersection of machine-learning game-theory mechanism design and social network-analysis . Follow the work of Avrim Blum Nina Balcan and Michael Kearns . Recently there is also surge in interest about using mechanism design and game-theory for active learning problems .", "Question : I was recently in a discussion with a non-coder person on the possibilities of chess computers . I m not well versed in theory but think I know enough . I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . I think that even if you search the entire space of all combinations of player1 2 moves the single move that the computer decides upon at each step is based on a heuristic . Being based on a heuristic it does not necessarily beat ALL of the moves that the opponent could do . My friend thought to the contrary that a computer would always win or tie if it never made a mistake move however do you define that . However being a programmer who has taken CS I know that even your good choices - given a wise opponent - can force you to make mistake moves in the end . Even if you know everything your next move is greedy in matching a heuristic . Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback . Again the endgame in question is avoidable though . Edit : Hmm.. . looks like I ruffled some feathers here . That s good . Thinking about it again it seems like there is no theoretical problem with solving a finite game like chess . I would argue that chess is a bit more complicated than checkers in that a win is not necessarily by numerical exhaustion of pieces but by a mate . My original assertion is probably wrong but then again I think I ve pointed out something that is not yet satisfactorily proven formally . I guess my thought experiment was that whenever a branch in the tree is taken then the algorithm or memorized paths must find a path to a mate without getting mated for any possible branch on the opponent moves . After the discussion I will buy that given more memory than we can possibly dream of all these paths could be found . Comment : +1 : excellent topic . However I would think that this should be wiki-fied as demonstrated by the variety and volume of answers . Comment : think I ve pointed out something that is not yet satisfactorily proven What have you pointed out that s not proven formally Comment : ack how can there be 20 different answers to such a black and white question no pun intended . Comment : I too am astonished at the number of people who post their speculative answers unaware that the answer has in fact been mathematically determined - answer in the sense that it has been proved that chess has a solution - it s just not practical to calculate it . Comment : Reminds me of the joke about the Perfect Chess Playing Computer . Playing white it thinks and thinks and thinks and then... . resigns .. . Answer : It actually is possible http : mathoverflow.net questions 32174 infinite-games-are-they-well-defined for both players to have winning strategies in infinite games with no well-ordering however chess is well-ordered . In fact because of the 50-move rule http : en.wikipedia.org wiki Fifty-move rule there is an upper-limit to the number of moves a game can have and thus there are only finitely many possible games of chess which can be enumerated to solve exactly. . theoretically at least : Comment : Technically the fifty-move rule like three-move repetition which also limits things -- there are a finite number of possible positions so multiplying that number by three gives us an upper limit doesn t cause a draw . Rather it gives either player the opportunity to claim a draw . Ordinarily the losing player will do so but it s not required . Therefore the following is an entirely legal game : 1 . Nc3 Nc6 2 . Nb1 Nb8 3 . Nc3 Nc6 4 . Nb1 Nb8 repeated forever . And if I m not mistaken it hasn t been disproven that that s not the result-of two perfect algorithms playing as white and black .", "Question : In transferable utility characteristic function games cooperative game-theory the most famous solution concept is the core of the game defined as the set of feasible payoff allocations that cannot be improved upon by any coalition . Geometrically the core is a closed convex polyhedron : http : www.jstor.org stable 2630190 .. . .. . In these game a payoff allocation is either in the core or not . The TUGlab set of tools has a command that can compute whether or not a payoff allocation is in the core or not : http : webs.uvigo.es mmiras TUGlab But there is no command that would tell you what the exact distance of a certain payoff allocation is to the core . If there is a geometric characterization of the core as a closed convex polyhedron then there should be a way to calculate the geometric distance between a point and that polyhedron as distance from the core of characteristic function . Unfortunately I have found no paper that actually shows me the formula or algorithm for computing this distance that I could implement in MATLAB . My guess is that there may be a clue in the code by Stephen Cameron that calculates distance between two polyhedrons . But my problem should be simpler than that : just the distance between a point and a polyhedron . In the end I need a MATLAB program that takes as input a a characteristic function and b a payoff distribution and then gives as output the distance between the payoff distribution and the core of the characteristic function . Assuming of course that the core is nonempty . .. . Answer : Although I don t understand why you are interested in the distance of a point outside of the core to the core itself I shall give you a quick procedure of how to get an approximation . The example below can be reproduced with my Matlab Game Theory Toolbox MatTuGames which can be downloaded at the following URL : .. . .. . http : www.mathworks.com matlabcentral fileexchange 35933-mattugames .. . .. . To start with consider the following five person game : .. . .. . The Shapley value is quickly calculated through .. . .. . Elapsed time is 0.002676 seconds . sh v .. . .. . In the next step we check whether the core exists or not .. . .. . ans .. . .. . Since the return-value is one true the core exists for the example game . Furthermore we also check on convexity average-convexity and super-additivity .. . .. . ans .. . .. . ans .. . .. . ans .. . .. . None of these properties is satisfied . Next we verify if the Shapley value belongs-to the core . crQ .. . .. . This is not the case . Thus we use the Shapley value to compute an approximated distance to the core . To complete we compute the vertices of the core this can be accomplished by .. . .. . Elapsed time is 0.001161 seconds . crv .. . .. . ans .. . .. . Now we can compute the Euclidean distance of the Shapley value to the core vertices . Hence we evaluate .. . .. . ed .. . .. . Single out the smallest distance value and its position is done through .. . .. . We observe that the first core vertex in the above list has smallest distance to Shapley value . You might get a better approximation if you choose that face with vertex .. . .. . ans .. . .. . that is closest to the Shapley value . Then compute the center of the face which might give you a better approximation . Update : .. . .. . Based on the answer by Mehdi Pouragha that gives the correct approach to use an orthogonal projection from a point outside of the core to the core itself . I present a small Matlab function to calculate the closest point of the core to an arbitrary point outside of the core . Now we can compute the closest point of the core to the Shapley value from the above five person game by .. . .. . The result is .. . .. . Correctness can be checked out by Comment : Thank you for your step by step answer I hadn t realized that someone had answered this...I really appreciate it . However If I am not mistaken distance to the nearest vertex of the core is not exactly distance from the core because somewhere on the edge of the core between some vertices may be closer to our focal point than the nearest vertex . Am I right The application for this is to compute how close or far an economy is from equilibrium . I am working on simulations of economic dynamics where knowing this is useful : onlinelibrary.wiley.com doi 10.1002 smj.2203 abstract http : onlinelibrary.wiley.com doi 10.1002 smj.2203 abstract Comment : Of course the nearest vertex might not be the closest point to the Shapley value . But it should give you the face that contains the point that is closest . For this reason I argue that it might be useful to compute the center of the face to get a better approximation . However this might not be end of the iteration . But if you study competitive equilibria these are NTU games not TU games you know that these are contained in the core from this point of view you have to find out the set of equilibria points to get an idea how close an economy is from equilibrium . What is the focal point Comment : The games I model are actually TU games and the agents in the game dynamically change the game by adding value to the characteristic function and then competing for profits which they only imperfectly find . So the characteristic function and profit vector are changing once in a while and each time we want to know how far the current profit vector is from the core of the current characteristic function if it has a core and the profit vector is not in it . The focal point is usually not the Shapley value because that is usually already in the core so distance from equilibrium is zero . Comment : An exchange economy is a mapping from the set of agents into the space of agents characteristics . The set of agents is assumed to be countably infinite or a continuum . For TU games n is assumed to finite a competitive equilibrium does not exist . In your model an equilibrium point should be a kind of a Nash equilibrium Cournot Bertrand Stackelberg etc which does not belong to the core . The core specifies in your model a set of profit vectors that cannot be blocked by a sub-coalition . Comment : Cont . The characteristic function specifies for each coalition a value profit from which it cannot be prevented from by its opponents . Profit vectors in the core are a subject of negotiation and not of competition . However to understand your model better I have to read it . In this respect a link-to your paper would be helpful .", "Question : Is there a Python library out there that solves for the Nash equilibrium of two-person zero-games I know the solution can be written down in terms of linear constraints and in theory scipy should be able to optimize it . However for two-person zero-games the solution is exact and unique but some of the solvers fail to converge for certain problems . Rather than listing any of the libraries on Linear programing http : wiki.python.org moin NumericAndScientific Libraries on the Python website I would like to know what library would be most effective in terms of ease of use and speed . .. . Answer : Raymond Hettinger wrote a recipe for solving zero-sum payoff matrices http : code.activestate.com recipes 496825-game-theory-payoff-matrix-solver . It should serve your purposes alright . As for a more general library for solving game-theory there s nothing specifically designed for that . But like you said scipy can tackle optimization problems like this . You might be able to do something with GarlicSim http : pypi.python.org pypi garlicsim 0.6.1 which claims to be for any kind of simulation : Physics game theory.. . but I ve never used it before so I can t recommend it . Comment : The code snippet seems to work well however it uses an iterative technique an exact solution would be nice since it exists and is unique . Comment : @Hooked blame Raymond not me You can try GarlicSim but no promises Comment : GarlicSim developer here . If you re looking for an analytical solution GarlicSim is not good for you . If you want to run simulations of players playing your games you can do it with GarlicSim and you can try to use that to get a numerical solution but I think you re better off with an analytical solution i.e . not using GarlicSim . Assuming I understood your question correctly .", "Question : null .. . Answer : In Net-logo i am trying to implement min-max strategy algorithm of a game-theory for decision making between agents within a swarm . Each agent has a reward function based on area that explored by a particular agent . It will be a value that lie between 0-100 . On the basis of reward value i want to take a decision on the basis of reward value by making decision matrix . Matrix value will decide that either which agent will go or which will stop . Kindly suggest me how can i create matrix in Net-logo . Comment : Post what you ve tried to get better answers .", "Question : I was recently in a discussion with a non-coder person on the possibilities of chess computers . I m not well versed in theory but think I know enough . I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . I think that even if you search the entire space of all combinations of player1 2 moves the single move that the computer decides upon at each step is based on a heuristic . Being based on a heuristic it does not necessarily beat ALL of the moves that the opponent could do . My friend thought to the contrary that a computer would always win or tie if it never made a mistake move however do you define that . However being a programmer who has taken CS I know that even your good choices - given a wise opponent - can force you to make mistake moves in the end . Even if you know everything your next move is greedy in matching a heuristic . Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback . Again the endgame in question is avoidable though . Edit : Hmm.. . looks like I ruffled some feathers here . That s good . Thinking about it again it seems like there is no theoretical problem with solving a finite game like chess . I would argue that chess is a bit more complicated than checkers in that a win is not necessarily by numerical exhaustion of pieces but by a mate . My original assertion is probably wrong but then again I think I ve pointed out something that is not yet satisfactorily proven formally . I guess my thought experiment was that whenever a branch in the tree is taken then the algorithm or memorized paths must find a path to a mate without getting mated for any possible branch on the opponent moves . After the discussion I will buy that given more memory than we can possibly dream of all these paths could be found . Comment : +1 : excellent topic . However I would think that this should be wiki-fied as demonstrated by the variety and volume of answers . Comment : think I ve pointed out something that is not yet satisfactorily proven What have you pointed out that s not proven formally Comment : ack how can there be 20 different answers to such a black and white question no pun intended . Comment : I too am astonished at the number of people who post their speculative answers unaware that the answer has in fact been mathematically determined - answer in the sense that it has been proved that chess has a solution - it s just not practical to calculate it . Comment : Reminds me of the joke about the Perfect Chess Playing Computer . Playing white it thinks and thinks and thinks and then... . resigns .. . Answer : From game-theory which is what this question is about the answer is yes Chess can be played perfectly . The game space is known predictable and yes if you had you grandchild s quantum computers you could probably eliminate all heuristics . You could write a perfect tic-tac-toe machine now-a-days in any scripting-language and it d play perfectly in real-time . Othello is another game that current computers can easily play perfectly but the machine s memory and CPU will need a bit of help .. . .. . Chess is theoretically possible but not practically possible in 2008 .. . .. . i-Go is tricky it s space of possibilities falls beyond the amount of atoms in the universe so it might take us some time to make a perfect i-Go machine . Comment : This is not game-theory http : en.wikipedia.org wiki Game theory Comment : Technically it s combinatorial game-theory .", "Question : I was recently in a discussion with a non-coder person on the possibilities of chess computers . I m not well versed in theory but think I know enough . I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . I think that even if you search the entire space of all combinations of player1 2 moves the single move that the computer decides upon at each step is based on a heuristic . Being based on a heuristic it does not necessarily beat ALL of the moves that the opponent could do . My friend thought to the contrary that a computer would always win or tie if it never made a mistake move however do you define that . However being a programmer who has taken CS I know that even your good choices - given a wise opponent - can force you to make mistake moves in the end . Even if you know everything your next move is greedy in matching a heuristic . Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback . Again the endgame in question is avoidable though . Edit : Hmm.. . looks like I ruffled some feathers here . That s good . Thinking about it again it seems like there is no theoretical problem with solving a finite game like chess . I would argue that chess is a bit more complicated than checkers in that a win is not necessarily by numerical exhaustion of pieces but by a mate . My original assertion is probably wrong but then again I think I ve pointed out something that is not yet satisfactorily proven formally . I guess my thought experiment was that whenever a branch in the tree is taken then the algorithm or memorized paths must find a path to a mate without getting mated for any possible branch on the opponent moves . After the discussion I will buy that given more memory than we can possibly dream of all these paths could be found . Comment : +1 : excellent topic . However I would think that this should be wiki-fied as demonstrated by the variety and volume of answers . Comment : think I ve pointed out something that is not yet satisfactorily proven What have you pointed out that s not proven formally Comment : ack how can there be 20 different answers to such a black and white question no pun intended . Comment : I too am astonished at the number of people who post their speculative answers unaware that the answer has in fact been mathematically determined - answer in the sense that it has been proved that chess has a solution - it s just not practical to calculate it . Comment : Reminds me of the joke about the Perfect Chess Playing Computer . Playing white it thinks and thinks and thinks and then... . resigns .. . Answer : There are two mistakes in your thought experiment : .. . .. . 1 . If your Turing machine is not limited in memory speed .. . you do not need to use heuristics but you can calculate evaluate the final states win loss draw . To find the perfect game you would then just need to use the Minimax algorithm see http : en.wikipedia.org wiki Minimax to compute the optimal moves for each player which would lead to one or more optimal games . 2 . There is also no limit on the complexity of the used heuristic . If you can calculate a perfect game there is also a way to compute a perfect heuristic from it . If needed its just a function that maps chess positions in the way If I m in this situation S my best move is M . As others pointed out already this will end in 3 possible results : white can force a win black can force a win one of them can force a draw . The result-of a perfect checkers games has already been computed . If humanity will not destroy itself before there will be also a calculation for chess some day when computers have evolved enough to have enough memory and speed . Or we have some quantum computers.. . Or till someone researcher chess experts genius finds some algorithms that significantly reduces the complexity of the game . To give an example : What is the sum of all numbers between 1 and 1000 You can either calculate 1+2+3+4+5...+999+1000 or you can simply calculate : N N+1 2 with N 1000 result 500500 . Now imagine don t know about that formula you don t know about Mathematical induction you don t even know how to multiply or add numbers .. . So it may be possible that there is a currently unknown algorithm that just ultimately reduces the complexity of this game and it would just take 5 Minutes to calculate the best move with a current computer . Maybe it would be even possible to estimate it as a human with pen paper or even in your mind given some more time . So the quick answer is : If humanity survives long enough it s just a matter of time", "Question : I was recently in a discussion with a non-coder person on the possibilities of chess computers . I m not well versed in theory but think I know enough . I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . I think that even if you search the entire space of all combinations of player1 2 moves the single move that the computer decides upon at each step is based on a heuristic . Being based on a heuristic it does not necessarily beat ALL of the moves that the opponent could do . My friend thought to the contrary that a computer would always win or tie if it never made a mistake move however do you define that . However being a programmer who has taken CS I know that even your good choices - given a wise opponent - can force you to make mistake moves in the end . Even if you know everything your next move is greedy in matching a heuristic . Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback . Again the endgame in question is avoidable though . Edit : Hmm.. . looks like I ruffled some feathers here . That s good . Thinking about it again it seems like there is no theoretical problem with solving a finite game like chess . I would argue that chess is a bit more complicated than checkers in that a win is not necessarily by numerical exhaustion of pieces but by a mate . My original assertion is probably wrong but then again I think I ve pointed out something that is not yet satisfactorily proven formally . I guess my thought experiment was that whenever a branch in the tree is taken then the algorithm or memorized paths must find a path to a mate without getting mated for any possible branch on the opponent moves . After the discussion I will buy that given more memory than we can possibly dream of all these paths could be found . Comment : +1 : excellent topic . However I would think that this should be wiki-fied as demonstrated by the variety and volume of answers . Comment : think I ve pointed out something that is not yet satisfactorily proven What have you pointed out that s not proven formally Comment : ack how can there be 20 different answers to such a black and white question no pun intended . Comment : I too am astonished at the number of people who post their speculative answers unaware that the answer has in fact been mathematically determined - answer in the sense that it has been proved that chess has a solution - it s just not practical to calculate it . Comment : Reminds me of the joke about the Perfect Chess Playing Computer . Playing white it thinks and thinks and thinks and then... . resigns .. . Answer : I think you are dead on . Machines like Deep Blue and Deep Thought are programmed with a number of predefined games and clever algorithms to parse the trees into the ends of those games . This is of course a dramatic oversimplification . There is always a chance to beat the computer along the course of a game . By this I mean making a move that forces the computer to make a move that is less than optimal whatever that is . If the computer cannot find the best path before the time limit for the move it might very well make a mistake by choosing one of the less-desirable paths . There is another class of chess programs that uses real machine-learning or genetic-programming evolutionary algorithms . Some programs have been evolved and use neural networks et al to make decisions . In this type of case I would imagine that the computer might make mistakes but still end up in a victory . There is a fascinating book on this type of GP called Blondie24 http : rads.stackoverflow.com amzn click 1558607838 that you might read . It is about checkers but it could apply to chess . Comment : That s how you beat today s computers at chess . Tomorrow s will be better . I do agree with you though that Blondie24 is fascinating . Comment : Voted back up . This post doesn t deserve a negative score . Comment : Unfortunately the chess game problem is too large for machine-learning to work . They could never get a learning chess program to even play novicely without blunders . Heuristics are better . But Brute Force was even better . The field of Machine learning only learned from its failure with chess . Comment : Chess programs don t make short term mistakes and the best programs play better then world champions . I think the latest version of Rybka 64 bit is rated like 3200 ELO", "Question : I was recently in a discussion with a non-coder person on the possibilities of chess computers . I m not well versed in theory but think I know enough . I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . I think that even if you search the entire space of all combinations of player1 2 moves the single move that the computer decides upon at each step is based on a heuristic . Being based on a heuristic it does not necessarily beat ALL of the moves that the opponent could do . My friend thought to the contrary that a computer would always win or tie if it never made a mistake move however do you define that . However being a programmer who has taken CS I know that even your good choices - given a wise opponent - can force you to make mistake moves in the end . Even if you know everything your next move is greedy in matching a heuristic . Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback . Again the endgame in question is avoidable though . Edit : Hmm.. . looks like I ruffled some feathers here . That s good . Thinking about it again it seems like there is no theoretical problem with solving a finite game like chess . I would argue that chess is a bit more complicated than checkers in that a win is not necessarily by numerical exhaustion of pieces but by a mate . My original assertion is probably wrong but then again I think I ve pointed out something that is not yet satisfactorily proven formally . I guess my thought experiment was that whenever a branch in the tree is taken then the algorithm or memorized paths must find a path to a mate without getting mated for any possible branch on the opponent moves . After the discussion I will buy that given more memory than we can possibly dream of all these paths could be found . Comment : +1 : excellent topic . However I would think that this should be wiki-fied as demonstrated by the variety and volume of answers . Comment : think I ve pointed out something that is not yet satisfactorily proven What have you pointed out that s not proven formally Comment : ack how can there be 20 different answers to such a black and white question no pun intended . Comment : I too am astonished at the number of people who post their speculative answers unaware that the answer has in fact been mathematically determined - answer in the sense that it has been proved that chess has a solution - it s just not practical to calculate it . Comment : Reminds me of the joke about the Perfect Chess Playing Computer . Playing white it thinks and thinks and thinks and then... . resigns .. . Answer : I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . You re not quite right . There can be such a machine . The issue is the hugeness of the state space that it would have to search . It s finite it s just REALLY big . That s why chess falls back on heuristics -- the state space is too huge but finite . To even enumerate -- much less search for every perfect move along every course of every possible game -- would be a very very big search problem . Openings are scripted to get you to a mid-game that gives you a strong position . Not a known outcome . Even end games -- when there are fewer pieces -- are hard to enumerate to determine a best next move . Technically they re finite . But the number of alternatives is huge . Even a 2 rooks + king has something like 22 possible next moves . And if it takes 6 moves to mate you re looking at 12 855 002 631 049 216 moves . Do the math on opening moves . While there s only about 20 opening moves there are something like 30 or so second moves so by the third move we re looking at 360 000 alternative game states . But chess games are technically finite . Huge but finite . There s perfect information . There are defined start and end-states There are no coin-tosses or dice rolls . Comment : All endgames with 6 pieces or less have been enumerated and solved . See tablebase and bitbase here : en.wikipedia.org wiki Tablebase http : en.wikipedia.org wiki Tablebase . For example there s a KQNKRBN endgame where 517 moves are required to force a mate But the total number of chess games is around 10 10 50 . Comment : Scripted to win is one thing . Exhaustively enumerated is a different thing . Either way the information is perfect -- everything is known -- the game is deterministic by definition . Comment : @RoadWarrior : disagree . Random applies to weather . God rolls dice . Random doesn t apply to chess -- by definition . Chess has complete information . Weather has quantum effects -- it can t be complete . Comment : @S.Lott : I m not sure how Free Will could sit on top of a Random Universe any better than on a Determined Universe who is making the decisions . If you haven t read Freedom Evolves by Dan C.Dennet I would recommend it-he coins the phrase evitability : he argues that an agent living in a deterministic Universe is still able to make decisions which affect it s future . I don t really get it but it makes for an interesting read-he uses J Conway s Life to illustrate it . also if you haven t already : Shadows of the Mind R.Penrose-again I don t really get it : - but interesting Comment : @monojohnny : The rules forbid three repetitions of the same position . Chess is simply finite . It s large but finite .", "Question : Is there a Python library out there that solves for the Nash equilibrium of two-person zero-games I know the solution can be written down in terms of linear constraints and in theory scipy should be able to optimize it . However for two-person zero-games the solution is exact and unique but some of the solvers fail to converge for certain problems . Rather than listing any of the libraries on Linear programing http : wiki.python.org moin NumericAndScientific Libraries on the Python website I would like to know what library would be most effective in terms of ease of use and speed . .. . Answer : I ve just started putting together some game-theory python code : http : drvinceknight.github.com Gamepy .. . .. . There s code which : .. . .. . solves matching games .. . calculates shapley values in cooperative games .. . runs agent based simulations to identify emergent behaviour in normal form games .. . clumsily - my python foo is still growing uses the lrs library written in C : http : cgm.cs.mcgill.ca avis C lrs.html to calculate the solutions to normal form games this is I believe what you want . The code is all available on github and that site the first link at the beginning of this answer explains how the code works and gives user examples . You might also want to check out Gambit which I ve never used .", "Question : I was recently in a discussion with a non-coder person on the possibilities of chess computers . I m not well versed in theory but think I know enough . I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . I think that even if you search the entire space of all combinations of player1 2 moves the single move that the computer decides upon at each step is based on a heuristic . Being based on a heuristic it does not necessarily beat ALL of the moves that the opponent could do . My friend thought to the contrary that a computer would always win or tie if it never made a mistake move however do you define that . However being a programmer who has taken CS I know that even your good choices - given a wise opponent - can force you to make mistake moves in the end . Even if you know everything your next move is greedy in matching a heuristic . Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback . Again the endgame in question is avoidable though . Edit : Hmm.. . looks like I ruffled some feathers here . That s good . Thinking about it again it seems like there is no theoretical problem with solving a finite game like chess . I would argue that chess is a bit more complicated than checkers in that a win is not necessarily by numerical exhaustion of pieces but by a mate . My original assertion is probably wrong but then again I think I ve pointed out something that is not yet satisfactorily proven formally . I guess my thought experiment was that whenever a branch in the tree is taken then the algorithm or memorized paths must find a path to a mate without getting mated for any possible branch on the opponent moves . After the discussion I will buy that given more memory than we can possibly dream of all these paths could be found . Comment : +1 : excellent topic . However I would think that this should be wiki-fied as demonstrated by the variety and volume of answers . Comment : think I ve pointed out something that is not yet satisfactorily proven What have you pointed out that s not proven formally Comment : ack how can there be 20 different answers to such a black and white question no pun intended . Comment : I too am astonished at the number of people who post their speculative answers unaware that the answer has in fact been mathematically determined - answer in the sense that it has been proved that chess has a solution - it s just not practical to calculate it . Comment : Reminds me of the joke about the Perfect Chess Playing Computer . Playing white it thinks and thinks and thinks and then... . resigns .. . Answer : I m coming to this thread very late and that you ve already realised some of the issues . But as an ex-master and an ex-professional chess programmer I thought I could add a few useful facts and figures . There are several ways of measuring the complexity of chess http : en.wikipedia.org wiki Shannon number : .. . .. . The total number of chess games is approximately 10 10 50 . That number is unimaginably large . The number of chess games of 40 moves or less is around 10 40 . That s still an incredibly large number . The number of possible chess positions is around 10 46 . The complete chess search tree Shannon number is around 10 123 based on an average branching factor of 35 and an average game length of 80 . For comparison the number of atoms in the observable universe is commonly estimated to be around 10 80 . All endgames of 6 pieces or less have been collated and solved http : en.wikipedia.org wiki Tablebase . My conclusion : while chess is theoretically solvable we will never have the money the motivation the computing power or the storage to ever do it . Comment : C mon . You have to think of the problem differently . Don t think of the number of games because transpositions and alpha-beta algorithms and such cut that back immensely . Think of board positions 10 60 or combinations of chess pieces 100 million . With Quantum Computing it s trivial . Comment : Alpha-beta in this context solving chess would require a perfect evaluation function . So does board positions and piece combinations . We don t have a perfect evaluation function so quantum-computing doesn t help us . Comment : Anytime that I think that something is trivial and I m sure that no one s already done it I m also sure I ve been wrong at least once . Comment : @lkessler : Board positions don t tell the whole story . At least some history of the game is necessary for castling or en passant captures or draw due to lack of capture or pawn move and the whole history for draw by repetition . Moreover since it was a notable research result recently for a quantum computer to factor 15 I d say nothing s trivial with quantum-computing right now . Comment : For comparison here if you can generate all possible chess positions you can trivially brute-force any cipher with a 128-bit key since 10 46 is about 2 152 or 2 153 . There are excellent reasons to think this is impossible before the heat death of the Universe .", "Question : I was recently in a discussion with a non-coder person on the possibilities of chess computers . I m not well versed in theory but think I know enough . I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . I think that even if you search the entire space of all combinations of player1 2 moves the single move that the computer decides upon at each step is based on a heuristic . Being based on a heuristic it does not necessarily beat ALL of the moves that the opponent could do . My friend thought to the contrary that a computer would always win or tie if it never made a mistake move however do you define that . However being a programmer who has taken CS I know that even your good choices - given a wise opponent - can force you to make mistake moves in the end . Even if you know everything your next move is greedy in matching a heuristic . Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback . Again the endgame in question is avoidable though . Edit : Hmm.. . looks like I ruffled some feathers here . That s good . Thinking about it again it seems like there is no theoretical problem with solving a finite game like chess . I would argue that chess is a bit more complicated than checkers in that a win is not necessarily by numerical exhaustion of pieces but by a mate . My original assertion is probably wrong but then again I think I ve pointed out something that is not yet satisfactorily proven formally . I guess my thought experiment was that whenever a branch in the tree is taken then the algorithm or memorized paths must find a path to a mate without getting mated for any possible branch on the opponent moves . After the discussion I will buy that given more memory than we can possibly dream of all these paths could be found . Comment : +1 : excellent topic . However I would think that this should be wiki-fied as demonstrated by the variety and volume of answers . Comment : think I ve pointed out something that is not yet satisfactorily proven What have you pointed out that s not proven formally Comment : ack how can there be 20 different answers to such a black and white question no pun intended . Comment : I too am astonished at the number of people who post their speculative answers unaware that the answer has in fact been mathematically determined - answer in the sense that it has been proved that chess has a solution - it s just not practical to calculate it . Comment : Reminds me of the joke about the Perfect Chess Playing Computer . Playing white it thinks and thinks and thinks and then... . resigns .. . Answer : Some games have in fact been solved . Tic-Tac-Toe is a very easy one for which to build an AI that will always win or tie . Recently Connect 4 has been solved as well and shown to be unfair to the second player since a perfect play will cause him to lose . Chess however has not been solved and I don t think there s any proof that it is a fair game i.e . whether the perfect play results in a draw . Speaking strictly from a theoretical perspective though Chess has a finite number of possible piece configurations . Therefore the search space is finite albeit incredibly large . Therefore a deterministic Turing machine that could play perfectly does exist . Whether one could ever be built however is a different matter .", "Question : I am a machine-learning beginner . I d like to learn the basics by teaching computers to play checkers . Actually the games I want to learn are Domineering http : en.wikipedia.org wiki Domineering and Hex http : en.wikipedia.org wiki Hex 28board game 29 . My language of choice is Python .. . .. . These games are pretty easy to store and the rules are much simpler than chess but there aren t too many people who play . If I can get this idea off the ground it would be great for experimenting Combinatorial Game Theory http : www.math.ucla.edu tom Game Theory comb.pdf to see if a computer and find the optimal move . I found this old paper on checkers from the 1960 s http : researcher.watson.ibm.com researcher files us-beygel samuel-checkers.pdf by a guy at IBM . Originally I had asked about neural networks http : stackoverflow.com questions 12592857 how-to-build-game-playing-neural-network-in-python but they are saying it s the wrong tool . EDIT : It could be that machine-learning is not the right strategy . In that case what goes wrong and what is a better way Comment : Why do you think that machine-learning is a good approach for this problem Comment : I wanted to write something that learns how to play . If they board is small enough it may be possible to exhaustively search the space of moves . What is a smarter way Comment : For classic checkers and many other games it is very difficult to calculate all possible moves . A possible alternative strategy is to define characteristics of strong positions or good moves and then try to find paths to those positions . For example a strong position is where you vastly outnumber your opponent and a good move is to crown a soldier . Comment : I would think Alpha Beta would be better ai for this .. . Comment : If you re serious about learning about machine-learning you ll want to explore many different approaches that a checkers alone might not allow you to explore . I ve been following the Machine Learning course provided by Coursera taught by Andrew Ng . So far it s very good and it s free . I recommend you look into it . .. . Answer : You might want to take a look at the following : Chinook Upper Confidence Trees Reinforcement Learning and Alpha-Beta pruning . I personally like to combine Alpha-Beta Pruning and Upper Confidence Trees UCT for perfect information games where each player has less than 10 reasonable moves . You can use Temporal Difference Learning to create a position evaluation function . Game AI is probably the most fun way to learn machine-learning . For links to all of these topics click on .. . .. . http : artent.net blog 2012 09 26 checkers-and-machine-learning .. . .. . I was not able to include more links because the stack-overflow software considers me a newbie", "Question : null .. . Answer : I have the following extensive form game efg : .. . .. . enter image description here http : i.stack.imgur.com KRkNH.jpg .. . .. . I would like to solve for it s Nash Equilibrium and do some basic Game Theory computations on it using Gambit the Python Game Theory library . I could create it s Normal Form equivalent and it s shown below : enter image description here http : i.stack.imgur.com Rk4U1.jpg .. . .. . I managed to reproduce the Normal Form Game in Python Gambit with the help of this tutorial https : github.com gambitproject gambit blob master doc pyapi.rst id65 . I ve been trying to reproduce the Extensive Form of the Game efg into Gambit so as to perform some other basic Game Theory computations on the Tree Structure . I just couldn t make it work as I couldn t find any good tutorial on building efg games into Gambit . Gambit only provides some efg files to work on directly which even after studying how they are structured I still can t load this efg shown into Python I m using IPython .. . .. . Can anyone with experience in Gambit help There is also another alternative other than writing code where I simply manipulate the string in an efg file to produce the string corresponding to the efg game shown . I tried but couldn t do it can anyone guide me Your help will really be appreciated thanks Comment : You could use the browser-based Game Theory Explorer gte.csc.liv.ac.uk gte builder http : gte.csc.liv.ac.uk gte builder to create the game and solve it for all equilibria and then save the game in GTE s xml format which should be able to be read by Gambit . Writing to this format is explicitly mentioned here gambit-project.org gambit15 http : www.gambit-project.org gambit15 pyapi.html highlight xml gambit.Game.write but not under read game but this functionality should be very easy to test . Also GTE may be useful for your analysis anyway .", "Question : I ve been reading this small tutorial https : www.mathcamp.org gettoknowmathcamp academics archives Alfonso-CGT-lectures.pdf on Nimbers and game-theory . Could someone explain why the mex rule governs the nimber of a game position See : http : en.wikipedia.org wiki Mex mathematics .. . .. . From the minimal excluded ordinal it seems to me that the Nimber for a state is actually the minimum state that the person cannot reach . How does that help in governing the state of the current game I see a proof on Wikipedia but I don t understand anything from it . http : en.wikipedia.org wiki Sprague E2 80 93Grundy theorem Proof .. . Answer : The entire idea of a nimber is to draw an analogy with the well understood game of Nim . So unless you understand THAT game it won t make sense to you . In the game of Nim we have a set of piles of things . On each turn you take as many things as you want from one pile and one pile only . The winner is the person to take the last thing from the last pile . Now try to convince yourself of the following facts . 1 . In Nim the nimber of a single pile is the size of that pile . 2 . If we have a 2 pile game the nimber of the position is the xor of the sizes of the two piles . You will need to do a double induction . 3 . If we take the set of piles and split it into two then the nimber of the whole position is the xor of the nimbers of the two subsets . Now here is the point . Replace the piles with arbitrary deterministic games with a guaranteed win lose . Turn the collection into a game where you re taking turns with different games and the person who wins the last game wins . The nimber as defined above tells you by analogy with Nim how to play the combined game perfectly . If you re playing just the regular 2 person game then the only fact about the nimber that you actually need to know is whether it is 0 you re in a losing position or non-zero you re in a winning position . The exact nimber is only useful when you can break a complex game into a collection of separate games that you are choosing between on each turn . However a surprising number of mathematical games do admit of such a structure . Comment : I kinda do understand that bit. . What I don t understand is why the nimber of a position is the minimal excluded nimber on the set of possible moves Is it because if we have a possible move to a 0 nimber then the mex will be non zero and hence winning Comment : +1 for a clear and practical explanation though . : Comment : The minimal excluded nimber is the first thing that your opponent could do to you that you can t respond to by playing in that game . Comment : The mex nimber is not in my set of possible moves . How is it ensured that the opponent can always reach that nimber Comment : That is not ensured . Some positions you can win from . : - The point is that you come up with the right strategy for the combined game by looking at the xors of the nimbers of the individual games .", "Question : I m writing a game-theory simulation in Python . As part of the simulation each generation two players are paired and played against each other each player is an instance of the Player1 or Player2 classes . Simplified a bit the code looks like this : .. . .. . Payoffs are kept as an attribute of the player . At the end of each round depending on the moves of the players the game will either continue or end play game will return True or False respectively . How can I make this code run in parallel That is how can I play more than 1 pair play each other at once I ve Googled around a bit and found the Python multiprocessing https : docs.python.org 2 library multiprocessing.html library but I can t figure out how to apply it to this snippet of code . Thanks Comment : multithreading and multiprocessing are very different beasts so you should decide which one you want first . Comment : I know very little about both . From my searching around it seems like multiprocessing is easier to work with right Comment : Without knowing what s happening in your play game function it s hard to say what to do exactly . How is output being handled in play game How many cores to do you have available A naive solution would be to fork a process for each pair . That would result in 50 processes . Depending on what s happening in play game that could be fine or it could swamp your CPU . Need more information . Comment : The strategies are represented as finite state automata . In play game the two strategies are played against each other the first player s move is fed into player 2 who responds by deciding whether to continue playing or stop . Payoffs are added after each move . It s pretty light weight not a ton of computation involved in that step . I m planning on running this on an EC2 instance . Probably 4-8 cores vCPUs . Comment : @sundance well generally threading is easier to work with since you don t have to worry about interprocess communication something you might want to research . But in CPython threading is subject to the Global Interpreter Lock more research meaning that it will not result in performance speedups if your task is CPU-bound - in fact it will result in slowdowns . multiprocessing sidesteps that limitation but can have additional complications that threading won t have . .. . Answer : I would create a class Game that is inherited from threading.Thread so it behaves similar to the thread . Game class constructor accepts two player objects and number of the game . number is required to facilitate returning of the game result into main program through the shared variable resultList lists are thread-safe in Python . resultList is a list of lists and each Game instance puts the result to the corresponding cell of resultList according to its number . run method of each Game instance is executed in a different thread so all the games are going on in parallel . To work with the Game class you do the following : .. . .. . PS : I wouldn t recommend to go with multiprocessing since there is a substantial overhead in creating a process need to allocate stack etc . . In your case multiprocessing would suffice since your application has no need in memory isolation . Comment : The result returned by playing the game is actually stored in the player objects themselves payoffs an attribute of each player holds that value . So I don t actually need the results of the game in any list . Does that simplify things at all Comment : Sure no problem here . Your Player objects will retain the state they have after all the games . Player object variables are modified in Game.Run but keep the value once all the threads are joined . resultList becomes unnecessary", "Question : In transferable utility characteristic function games cooperative game-theory the most famous solution concept is the core of the game defined as the set of feasible payoff allocations that cannot be improved upon by any coalition . Geometrically the core is a closed convex polyhedron : http : www.jstor.org stable 2630190 .. . .. . In these game a payoff allocation is either in the core or not . The TUGlab set of tools has a command that can compute whether or not a payoff allocation is in the core or not : http : webs.uvigo.es mmiras TUGlab But there is no command that would tell you what the exact distance of a certain payoff allocation is to the core . If there is a geometric characterization of the core as a closed convex polyhedron then there should be a way to calculate the geometric distance between a point and that polyhedron as distance from the core of characteristic function . Unfortunately I have found no paper that actually shows me the formula or algorithm for computing this distance that I could implement in MATLAB . My guess is that there may be a clue in the code by Stephen Cameron that calculates distance between two polyhedrons . But my problem should be simpler than that : just the distance between a point and a polyhedron . In the end I need a MATLAB program that takes as input a a characteristic function and b a payoff distribution and then gives as output the distance between the payoff distribution and the core of the characteristic function . Assuming of course that the core is nonempty . .. . Answer : Complicated though the core concept may be a geometrical translation can simplify it by an order of magnitude Knowing the core description as a system of inequalities you can numerically minimize the Euclidean distance of a given point to the surface of the N-D convex polyhedron . Assuming that the core is characterized by the system of inequalities and equalities as : .. . .. . and .. . .. . this part may not exist in all descriptions .. . .. . one can simply minimize the distance Cp-Gp where Gp is the coordinates of a given point and Cp is the point closest to Gp that satisfies the above constraints describing the core . A simple numerical solution is using the lsqlin function already available in MATLAB . A single line of code would give you the distance D and the position of the closest point on the convex Cp as : .. . .. . Moreover if the returned argument residual is negative one can conclude that Gp is contained within the core .", "Question : https : www.hackerrank.com challenges chessboard-game-again-1 .. . .. . I have tried the above question in the following manner but the answers are evaluated as wrong . I am not asking for a solution but I am asking for the defects in the approach .. . .. . my code please ignore the c99 errors .. . .. . My approach is to go on making all the moves possible for all the coins until we come to a point when no moves are possible . But this is giving wrong answers in some test cases . Comment : Your question relies entirely on links . Links can get broken over time so it would be better to include the relevant code and quotes into the question . Comment : the link has my code.....isn t it working Comment : yes sorry I was a little quick off the mark . I added your code to the question . I also took away the c++ tag as it seems like its straight c . If you explain the issue you are having it will improve your question . Comment : Thanks .. . @PaulRooney Comment : Out of curiosity what is the point to passing board into issafe it would seem something is missing.. . like actually checking the board . .. . Answer : You are asking what is wrong with this approach My approach is to go on making all the moves possible for all the coins until we come to a point when no moves are possible . But this is giving wrong answers in some test cases . I didn t read your code but I can say that the main issue is your approach itself . You are thinking of this problem as a brute-force make all possible move paths and see who is winning . The number of possible moves can be arbitrarily large checking is moves lead to a win is infinitely slow . In reality it is either dynamic-programming or even more relevant game-theory problem . Think about it this way . Does the starting positions uniquely identifies the winner of this game What if I change the initial position of a single coin will the winner change too Best way to approach this kind of problems is to simplify it . Assume that there is only a single board with a single coin positioned at x y . Now notice that after each move of a coin from position x y to position a b the following is true a+b x+y . So if x y is one of 1 1 1 2 2 1 2 2 player making the move already lost . So my goal is to make sure my opponent will be making a move from already lost position and if I can do it I am in winning position . If u follow the same logic you will realise that this approach will uniquely identify if position is winning or losing . So for any position we can answer if it is winning or losing simply building the grid of answers by going backwards from 1 1 to 15 15 . Now what would u do if the number of boards is more than one You need to dig into the game-theory in particular Grundy numbers and how they relate to Nim games . I would suggest you to check the following links for further information : .. . .. . https : en.wikipedia.org wiki Nim .. . .. . https : en.wikipedia.org wiki Nimber .. . .. . https : www.topcoder.com community data-science data-science-tutorials algorithm-games", "Question : I was recently in a discussion with a non-coder person on the possibilities of chess computers . I m not well versed in theory but think I know enough . I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . I think that even if you search the entire space of all combinations of player1 2 moves the single move that the computer decides upon at each step is based on a heuristic . Being based on a heuristic it does not necessarily beat ALL of the moves that the opponent could do . My friend thought to the contrary that a computer would always win or tie if it never made a mistake move however do you define that . However being a programmer who has taken CS I know that even your good choices - given a wise opponent - can force you to make mistake moves in the end . Even if you know everything your next move is greedy in matching a heuristic . Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback . Again the endgame in question is avoidable though . Edit : Hmm.. . looks like I ruffled some feathers here . That s good . Thinking about it again it seems like there is no theoretical problem with solving a finite game like chess . I would argue that chess is a bit more complicated than checkers in that a win is not necessarily by numerical exhaustion of pieces but by a mate . My original assertion is probably wrong but then again I think I ve pointed out something that is not yet satisfactorily proven formally . I guess my thought experiment was that whenever a branch in the tree is taken then the algorithm or memorized paths must find a path to a mate without getting mated for any possible branch on the opponent moves . After the discussion I will buy that given more memory than we can possibly dream of all these paths could be found . Comment : +1 : excellent topic . However I would think that this should be wiki-fied as demonstrated by the variety and volume of answers . Comment : think I ve pointed out something that is not yet satisfactorily proven What have you pointed out that s not proven formally Comment : ack how can there be 20 different answers to such a black and white question no pun intended . Comment : I too am astonished at the number of people who post their speculative answers unaware that the answer has in fact been mathematically determined - answer in the sense that it has been proved that chess has a solution - it s just not practical to calculate it . Comment : Reminds me of the joke about the Perfect Chess Playing Computer . Playing white it thinks and thinks and thinks and then... . resigns .. . Answer : This is not a question about computers but only about the game of chess . The question is does there exist a fail-safe strategy for never losing the game If such a strategy exists then a computer which knows everything can always use it and it is not a heuristic anymore . For example the game tic-tac-toe normally is played based on heuristics . But there exists a fail-safe strategy . Whatever the opponent moves you always find a way to avoid losing the game if you do it right from the start on . So you would need to proof that such a strategy exists or not for chess as well . It is basically the same just the space of possible moves is vastly bigger . Comment : So who had the urge to downvote my answer Is there anything wrong in it Want to get yourself in front Comment : @ypnos I didn t down vote your answer at all . I just commented to say not to let random down-voters get you down . You ve gained 30 rep and only lost 1 . Also +1 Comment : Several reasons for downvote . 1 It is known that there exists an algorithm for solving the game it is just that the algorithm is impractical to calculate using any conceivable technology . 2 Solving the game does NOT imply that their exists a failsafe strategy . Tic-tac-toe is solved but there is no strategy for the second player that avoids a loss . Comment : This is not a question about computers but only about the game of chess . Well computer-science isn t actually about computers . They are just a tool . The computer-science works without computers . Comment : It -is- actually a question about computers as the questions is whether a Turing Machine Computer could exist that solves chess .", "Question : I was recently in a discussion with a non-coder person on the possibilities of chess computers . I m not well versed in theory but think I know enough . I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess . I think that even if you search the entire space of all combinations of player1 2 moves the single move that the computer decides upon at each step is based on a heuristic . Being based on a heuristic it does not necessarily beat ALL of the moves that the opponent could do . My friend thought to the contrary that a computer would always win or tie if it never made a mistake move however do you define that . However being a programmer who has taken CS I know that even your good choices - given a wise opponent - can force you to make mistake moves in the end . Even if you know everything your next move is greedy in matching a heuristic . Most chess computers try to match a possible end game to the game in progress which is essentially a dynamic-programming traceback . Again the endgame in question is avoidable though . Edit : Hmm.. . looks like I ruffled some feathers here . That s good . Thinking about it again it seems like there is no theoretical problem with solving a finite game like chess . I would argue that chess is a bit more complicated than checkers in that a win is not necessarily by numerical exhaustion of pieces but by a mate . My original assertion is probably wrong but then again I think I ve pointed out something that is not yet satisfactorily proven formally . I guess my thought experiment was that whenever a branch in the tree is taken then the algorithm or memorized paths must find a path to a mate without getting mated for any possible branch on the opponent moves . After the discussion I will buy that given more memory than we can possibly dream of all these paths could be found . Comment : +1 : excellent topic . However I would think that this should be wiki-fied as demonstrated by the variety and volume of answers . Comment : think I ve pointed out something that is not yet satisfactorily proven What have you pointed out that s not proven formally Comment : ack how can there be 20 different answers to such a black and white question no pun intended . Comment : I too am astonished at the number of people who post their speculative answers unaware that the answer has in fact been mathematically determined - answer in the sense that it has been proved that chess has a solution - it s just not practical to calculate it . Comment : Reminds me of the joke about the Perfect Chess Playing Computer . Playing white it thinks and thinks and thinks and then... . resigns .. . Answer : I found this article by John MacQuarrie http : www-groups.dcs.st-and.ac.uk history Projects MacQuarrie Chapters Ch4.html that references work by the father of game-theory Ernst Friedrich Ferdinand Zermelo http : en.wikipedia.org wiki Ernst Zermelo . It draws the following conclusion : .. . .. . In chess either white can force a win or black can force a win or both sides can force at least a draw . The logic seems sound to me ." ] }
[]
modeling
UNK_RELATION
nsregularexpression@unicode@133
nsregularexpression -- this class in the apple developer library mac os x ios is used to represent and apply regular expressions to @placeholder strings .
{ "confidence": [ 37.087608337402344, 36.97370147705078, 34.47140884399414, 33.96276092529297, 31.22718620300293, 31.128511428833008, 30.857969284057617, 29.170116424560547, 29.10957908630371, 28.963275909423828, 28.88531494140625, 28.671016693115234, 28.06907081604004, 28.06907081604004, 27.74629783630371, 27.6971378326416, 26.99668312072754, 26.554574966430664, 26.55289649963379, 26.55289649963379, 26.158185958862305, 26.045026779174805, 25.803661346435547, 25.661611557006836, 25.661611557006836, 25.268693923950195, 25.268693923950195, 25.206972122192383, 24.843313217163086, 24.763153076171875, 24.607938766479492, 24.59702491760254, 24.59702491760254, 24.540035247802734, 24.4991397857666, 24.468416213989258, 24.468416213989258, 24.468416213989258, 24.26902198791504, 23.95989418029785, 23.95989418029785, 23.556516647338867, 23.427907943725586, 23.387968063354492, 23.38384246826172, 23.37661361694336, 22.997112274169922, 22.962566375732422, 22.962566375732422, 22.84865951538086, 22.84865951538086, 22.84865951538086, 22.84865951538086, 22.84865951538086, 22.309438705444336, 22.309438705444336, 22.309438705444336, 22.235294342041016, 22.180830001831055, 22.136764526367188, 22.136764526367188, 22.097999572753906, 22.083438873291016, 21.92205810546875, 21.92205810546875, 21.92205810546875, 21.92205810546875, 21.808151245117188, 21.359996795654297, 21.18175506591797, 21.115787506103516, 20.95136070251465, 20.91701316833496, 20.760963439941406, 20.760963439941406, 20.760963439941406, 20.760963439941406, 20.67498016357422, 20.67498016357422, 20.67498016357422, 20.67498016357422, 20.666858673095703, 20.465633392333984, 20.43649673461914, 20.23773765563965, 20.184677124023438, 19.720455169677734, 19.720455169677734, 19.720455169677734, 19.720455169677734, 19.720455169677734, 19.720455169677734, 19.681015014648438, 19.681015014648438, 19.680599212646484, 19.66993522644043, 19.62635040283203, 19.62635040283203, 19.413532257080078 ], "content": [ "What are the correct regular expressions using NSRegularExpression for syntax-highlighting", "The ICU regular expressions are described at http : userguide.icu-project.org strings regexp .", "I m having trouble getting NSRegularExpression to match patterns on strings with wider", "Apple says that NSRegularExpression is based on the ICU Regular Expression library : https : developer.apple.com library ios documentation Foundation Reference NSRegularExpression Class .. . .. . The pattern syntax currently supported is that specified by ICU .", "@Thomas The documentation states that the NSRegularExpression class was added to iOS 4.0 not that support for Named Capture Groups was added in iOS 4.0 .", "Oh and NSRegularExpression is powered by ICU http : userguide.icu-project.org strings regexp which does not support recursive patterns or anything similar .", "Then I decided to make it also for Mac OS X when I suddenly encountered a problem : NSRegularExpression is only supported by Mac OS X 10.7 or later and I m using 10.6.7 .", "What would the regex be to be used in IOS NSRegularExpression to get the words from a string delimited by a space s i.e .", "I m working on a small iOS App and got stuck with creating a pattern using NSRegularExpression class .", "NSRegularExpression http : developer.apple.com library mac documentation Foundation Reference NSRegularExpression Class Reference Reference.html says its flavor of regex is ICU .", "From the NSRegularExpression Class Reference https : developer.apple.com library mac Documentation Foundation Reference NSRegularExpression Class index.html : .. . .. . Table 2 Regular Expression Operators .. . .. . .. . .. . .. . ismwx-ismwx : .. . .. . Flag settings .", "I guess it involves NSRegularExpression but I m not skilled with regular expression syntax.. .", "Can any one suggest me how to use NSRegularExpression class in Xamarin iOS .", "iOS and OSX both uses NSRegularExpression class so i believe we are not faciliate to use this feature for OSX as well .", "I looked into the Apple reference https : developer.apple.com library mac documentation Foundation Reference NSRegularExpression Class Reference Reference.html on NSRegularExpression and understand that in order see if the string is Cyrillic I should use p script cyrillic .", "Foundation has a NSRegularExpression http : developer.apple.com library ios documentation Foundation Reference NSRegularExpression Class Reference Reference.html class iOS4 and later which may be useful to you .", "I m using two regular expressions : .. . .. . I m removing non number characters and spaces but there a way to combine the regular expressions", "Test each of those strings", "I m not very experienced with regular expressions .", "ICU is based on Perl regular expressions .", "A NSRegularExpression approach would be something like this .. . .. . Since our replacement strings come from an array I doubt we have a single statement solution to this .", "Any regular expression would probably turn out with the same problem what you need is to sanitize your entries or strings either by escaping your commas or by highlighting strings this way : My string .", "NSRegularExpression uses ICU regex syntax .", "There is no need to use NSRegularExpression .", "This doesn t need NSRegularExpression at all .", "Did you looked at Named capture groups with NSRegularExpression http : stackoverflow.com questions 24814974 named-capture-groups-with-nsregularexpression", "This is not working with the following code : NSRegularExpression regex NSRegularExpression regularExpressionWithPattern : @ b i em b .", "This doesn t require any parsing or Regular expressions etc.. .", "And the Apple doc state that is Available in iOS 4.0 and later .. .", "You don t need NSRegularExpression to do this .", "Have you filed a bug with Apple with the expressions that are missing in your case", "It s my first time to use NSRegularExpression .", "So How can I create the correct NSRegularExpression", "Here s the code : .. . .. . The StringChecker class is a custom one that I wrote it just has class methods that parse the strings .", "HTML isn t a regular-language and can t be properly parsed using regular expressions .", "Just divide the string into a series of strings using the comma .", "I need to compare strings such that certain conditions are met .", "edit : .. . .. . You have to escape all special strings .", "stackoverflow.com questions 5478170 regular-expression-in-ios http : stackoverflow.com questions 5478170 regular-expression-in-ios", "Obligatory Using regular expressions to parse HTML : why not", "Don t parse HTML with regular expressions or NSScanner .", "Does NSRegularExpression support named capture groups", "Objective-C takes double escapes for slashes in strings .", "Well this regex doesn t work in ios because their are special-characters for NSRegularExpression that need to be escaped and it isn t really working for me .", "I want to use regular expressions but I can t", "You will need to parse the strings manually .", "I m building a regular expression for use in a parser in an iOS app .", "I want to fetch url of images from the String using NSRegularExpression .", "However I can t figure out how to format it correctly to work with NSRegularExpression .", "The problem is you re adapting this from JavaScript which allows the use of to delimit strings .", "So I don t need to extract any part of the strings .", "Not related at all but the importance of sanitizing strings : http : xkcd.com 327 hehehe .", "This is per the ICU regex reference http : userguide.icu-project.org strings regexp .", "I suggest that you provide test strings and the desired result .", "You need to check out the NSRegularExpression documenation page .", "I think it would be great to use NSRegularExpression .", "Is that even possible to get those groups using NSRegularExpression", "@WiktorStribi ew right I am thinking the original question to be I want to match strings that don t contain a or a space", "Why not if you only need a couple strings", "So I think the failure is that the two lines of this Regular Expressions .. . .. . are combined false .", "http : stackoverflow.com questions 590747 using-regular-expressions-to-parse-html-why-not", "Have a look at stackoverflow.com questions 30845495 http : stackoverflow.com questions 30845495 how-to-use-nsregularexpression-in-swift or other recent questions about NSRegularExpression there should be plenty examples .", "Regular expressions aren t sophisticated enough to properly parse HTML because HTML is not a regular-language .", "I m trying to modify an NSString while iterating NSTextCheckingResults from an NSRegularExpression .", ".. . .. . I m new to NSRegularExpression any reference to a better tutorial would be great .", "See if that range is formatted like a hashtag NSRegularExpression @ w w .. . 3 .", "I m trying to get the substring from a NSString by using NSRegularExpression .", "Try this you will get array in which there will be all seperated strings .", "I m quite new to Mac OS X development just my second day .", "apple document https : developer.apple.com library mac documentation AppKit Reference NSTextCheckingResult Class apple ref c tdef NSTextCheckingTypes just say : .. . .. . the user can extend those types by subclassing NSTextCheckingResult and adding their own custom types .", ": alnum : are often used within bracket expressions e.g .", "+ .+ .. . .. . Capture group 1 contains the dotted strings .. . .. . Capture group 2 contains the second term of the dotted strings .. . .. . Capture group 3 contains the names on the right side .", "I was creating a Regular expression but in can t solve this problem .. . .. . Here are the errors I got : .. . .. . Cannot invoke initializer for type NSRegularExpression with an argument list of type pattern : String options : error : inout NSError", "I am using the Swift Playground to experiment with NSRegularExpression and I do not get what I would like to .", "I have a string like : .. . .. . I want to get the value for the key I use this NSRegularExpression i key . +", "Though I admit inheriting from NSRegularExpression seems odd and might be a code-smell .", "As far as its use of NSRegularExpression I m sure that helps with parsing more normal things like phone numbers", "Count all occurrences with an NSRegularExpression loop through them and replace them .", "I would like to use NSRegularExpression for parsing turtle files .", "Do you know if NSRegularExpression is able to support UTF-32 characters", ".. . .. . Example input : .. . .. . Example result : .. . .. . Unfortunately NSRegularExpression does not accept R apparently .", "edit 2 : .. . .. . You cannot have unlimited length strings in your look-behind .", "That page on icu-project.org claims that Named Capture Groups are now supported using the same syntax as .NET Regular Expressions : .. . .. . name .. . Named capture group .", "For your convenience i tried this thread on both iOS and OSX and this pattern fails unless the named group address and params removed : stackoverflow.com questions 8470613 http : stackoverflow.com questions 8470613 unable-to-extract-information-using-nsregularexpression .", "I have used a regular expression for this which is given below .", "Here s a simplified test case that I m running in Xcode 7.0 2 : .. . .. . The two debugging lines display : .. . .. . After that the app crashes with the following message : .. . .. . 2015-06-24 23 : 18 : 45.027 swift 42912 : 648900 Terminating app due to uncaught exception NSRangeException reason : - NSRegularExpression enumerateMatchesInString : options : range : usingBlock : : Range or index out of bounds .. . .. . I ve looked over the following documentation but nothing is jumping out to me : .. . .. . NSRegularExpression Class Reference https : developer.apple.com library prerelease ios documentation Foundation Reference NSRegularExpression Class index.html apple ref doc uid TP40009708-CH1-SW13 .. . NSRegularExpression enumerateMatchesInString : options : range : usingBlock : https : developer.apple.com library prerelease ios documentation Foundation Reference NSRegularExpression Class index.html apple ref occ instm NSRegularExpression enumerateMatchesInString : options : range : usingBlock : .. . .. . I can only think that the issue has something to do with passing an NSRange instance as a parameter to the stringByReplacingMatchesInString method but I ve tried adjusting the value to NSRange 0 1 and NSRange 1 2 expecting to see something that would help but it s still throwing the exception .", "The NSRegularExpression initializer has changed to throw its error instead of passing in an ErrorPointer : .. . .. . To specific nil for an OptionType value use .", "answer on my blog http : www.developers-life.com nsregularexpression-sample-for-comment-syntax-highlighting.html", "I wanted to have an NSRegularExpression pattern that would read and return those paragraphs completely disregarding the number of linespaces .", "I cannot help you with the NSRegularExpression matching and replacing but I believe the regex you are looking for is n n + .", "To get the NSRange of the current hashtag being typed I ran a for-loop over the NSRegularExpression matches in the text string .", "I was thinking about NSRegularExpression regularExpressionWithPattern but copy-pasted NSMutableString stringWithString : Anyway I love the community here", "Using regular expressions you are relying on the document never changing format in ways that are syntactically otherwise perfectly valid .", "While you will generally be advised to not parse HTML with regular expressions see my all-time favorite S.O .", "regular expression .", "From the docs : .. . .. . The fundamental matching method for NSRegularExpression is a Block iterator method that allows clients to supply a Block object which will be invoked each time the regular expression matches a portion of the target string .", "This answer : http : stackoverflow.com a 22017608 3937 has some code for replacing regexes in strings", "How can we use he NSScanner or NSRange to calculate the string size or identify strings between the numeric characters .", "As an example for the string This should be removed and only this part should remain after using NSRegularExpression it should become and only this part should remain ." ] }
{ "confidence": [ 59.35565948486328, 45.599525451660156, 44.62852478027344, 42.306297302246094, 41.80616760253906, 41.442874908447266, 40.59203338623047, 39.38113784790039, 38.985443115234375, 38.90279006958008, 38.01349639892578, 37.311031341552734, 35.43225860595703, 34.054664611816406, 33.750526428222656, 33.750526428222656, 33.750526428222656, 33.10689926147461, 32.965538024902344 ], "content": [ "Question : Apple says that NSRegularExpression is based on the ICU Regular Expression library : https : developer.apple.com library ios documentation Foundation Reference NSRegularExpression Class .. . .. . The pattern syntax currently supported is that specified by ICU . The ICU regular expressions are described at http : userguide.icu-project.org strings regexp . That page on icu-project.org claims that Named Capture Groups are now supported using the same syntax as .NET Regular Expressions : .. . .. . name .. . Named capture group . The angle brackets are literal - they appear in the pattern . I have written a program which gets a single match with multiple ranges which seem correct - though each range is returned twice for reasons unknown - but the only information I have is the range s index and its text range . For example the regex : foo foo . bar bar . bar2 baz with test string foo.bar.baz .. . .. . Gives me these results : .. . .. . Is there any way to know that baz came from the capture-group bar2 Comment : Did you looked at Named capture groups with NSRegularExpression http : stackoverflow.com questions 24814974 named-capture-groups-with-nsregularexpression Comment : @Thomas I did see that however it is from 2014 and the discussions all say that Named Capture Groups are not supported - however at least on iOS 9 and OS X 10.11 the do appear to be supported - and they re working on my machines at least I just can t map from a result range back to the group they came from . Comment : And the Apple doc state that is Available in iOS 4.0 and later .. . Comment : @Thomas The documentation states that the NSRegularExpression class was added to iOS 4.0 not that support for Named Capture Groups was added in iOS 4.0 . Comment : @Thomas In fact Apple s own documentation for NSRegularExpression does not list the syntax for Named Capture Groups it only appears on ICU s own documentation suggesting that Named Capture Groups are a recent addition . .. . Answer : I was facing the same issue and ended up backing my own solution . Feel free to comment or improve - .. . .. . Here is an usage example : Comment : Interesting Can you please amend your answer with some usage examples Comment : done . After taking a second look I also realised it was not obvious.. . Wrote this code a few months ago and there were reasons to go to have matches and ranges on 2 separate calls .", "Question : What are the correct regular expressions using NSRegularExpression for syntax-highlighting The following test must be passed : Comment : this situation comment comment code might be resolved by an quite complex regular expression . Comment : I suggest that you provide test strings and the desired result . test01 @ comment check01 @ comment for unambiguous verification . The current question is ambiguous in what the result-of code comment comment should return . Comment : @zx81 you should post that as an answer so I can downvote it . : D But seriously there s nothing straightforward about this task . It may not require a full-on parser but it can t be done with regexes alone . Also the quoted-string regex in your comment is an abomination and you should get a ruling on whether block comments can be nested in most languages they can t . Comment : Oh and NSRegularExpression is powered by ICU http : userguide.icu-project.org strings regexp which does not support recursive patterns or anything similar . Comment : @Alan Swift supports nested comments and it is the future . .. . Answer : I think it s impossible in global sense not just on the sample . So regexp cann t be used for syntax-highlighting .", "Question : Does NSRegularExpression support named capture groups It doesn t look like it from the documentation https : developer.apple.com library mac documentation Foundation Reference NSRegularExpression Class Reference Reference.html but I wanted to check before I explore alternative solutions . .. . Answer : Named grouping is not supported in iOS all you can do as I see is to make use of Enum : .. . .. . Enum : .. . .. . Sample Code : Comment : interesting didn t know about that . Comment : Thanks that s a cool approach . For completeness though I want to make sure this applies to OS X as well which I m working in at the moment - do you know Comment : iOS and OSX both uses NSRegularExpression class so i believe we are not faciliate to use this feature for OSX as well . For your convenience i tried this thread on both iOS and OSX and this pattern fails unless the named group address and params removed : stackoverflow.com questions 8470613 http : stackoverflow.com questions 8470613 unable-to-extract-information-using-nsregularexpression . Hope it helps", "Question : I m building a regular expression for use in a parser in an iOS app . Here s my code : .. . .. . From this answer http : stackoverflow.com questions 20633416 regex-match-line-if-previous-line-satisfies-a-criteria comment30894792 20633416 . This gives out this error : .. . .. . regexError : Error Domain NSCocoaErrorDomain Code 2048 The operation couldn t be completed . Cocoa error 2048 . UserInfo 0x8e86670 NSInvalidValue EXT .. . .. . Cocoa error 2048 is an NSFormattingErrorMinimum according to the docs https : developer.apple.com library mac documentation Cocoa Reference Foundation Miscellaneous Foundation Constants Reference reference.html .. . But there s literally no further explanation . What does it mean .. . Answer : are you trying to match a new line line feed character you ve inserted a literal new line character into your regex.. . you need to instead insert the code for a newline . Try escaping as n etc . edit : .. . .. . You have to escape all special strings . For example you want your regex string to contain + r not a linefeed character . So you need to use r instead of r . i.e . edit 2 : .. . .. . You cannot have unlimited length strings in your look-behind . So no and no + allowed . This is per the ICU regex reference http : userguide.icu-project.org strings regexp . NSRegularExpression uses ICU regex syntax . Comment : Yes I am trying to match a new line character . I tried this : @ EXT r n r n + r n + but I got the same error . Comment : You have to escape all the special-characters now just n . I updated my answer . Comment : Thanks I tried that too same error . Comment : Turns out your look-behind is invalid . Do it without look-behind . Comment : Well I answered the error question : now you need to debug your regex . I use Reggy : macupdate.com app mac 24078 reggy https : www.macupdate.com app mac 24078 reggy", "Question : NSRegularExpression http : developer.apple.com library mac documentation Foundation Reference NSRegularExpression Class Reference Reference.html says its flavor of regex is ICU . I have RegexBuddy which supports a bunch of different flavors but none of them calls itself ICU . But is one of them ICU under another name .. . Answer : ICU is based on Perl regular expressions .", "Question : I m having trouble getting NSRegularExpression to match patterns on strings with wider Unicode characters in them . It looks like the problem is the range parameter -- Swift counts individual Unicode characters while Objective-C treats strings as-if they re made up of UTF-16 code units . Here is my test string and two regular expressions : .. . .. . I can match the first regex with no problems : .. . .. . But the second fails with the same parameters because the range I send it 0...7 isn t long enough to cover the whole string as far as NSRegularExpression is concerned : .. . .. . If I use a different range I can make the match succeed : .. . .. . but then I don t know how to extract the matched text out of the string since that range falls outside the range of the Swift string . Comment : +one for the dogcow reference . .. . Answer : Turns out you can fight fire with fire . Using the Swift-native string s utf16Count property and the substringWithRange : method of NSString -- not String -- gets the right result . Here s the full working code : .. . .. . I figured this out in the process of writing the question score one for rubber duck debugging http : blog.codinghorror.com rubber-duck-problem-solving . Comment : If you convert let nsstr str as NSString first then you can simply use length : nsstr length as you would in ObjC .", "Question : I have a C project I m intending to port to Objective-C . From what I understand about Obj-C it looks like there s a confusing variety of Regex options but I can t see anything about a way of doing a replace with callback . I m looking for something that is the equivalent of the C MatchEvaluator delegate or PHP s preg-replace-callback . An example of what I want to do in C is - .. . .. . How could I do this in Objective-C In my actual situation the Regex has both lookahead and lookbehind assertions in it though so any alternative involving finding the strings in advance and then doing a series of straight string replaces won t work unfortunately . .. . Answer : Foundation has a NSRegularExpression http : developer.apple.com library ios documentation Foundation Reference NSRegularExpression Class Reference Reference.html class iOS4 and later which may be useful to you . From the docs : .. . .. . The fundamental matching method for NSRegularExpression is a Block iterator method that allows clients to supply a Block object which will be invoked each time the regular expression matches a portion of the target string . There are additional convenience-methods for returning all the matches as an array the total number of matches the first match and the range of the first match . For example :", "Question : What are the correct regular expressions using NSRegularExpression for syntax-highlighting The following test must be passed : Comment : this situation comment comment code might be resolved by an quite complex regular expression . Comment : I suggest that you provide test strings and the desired result . test01 @ comment check01 @ comment for unambiguous verification . The current question is ambiguous in what the result-of code comment comment should return . Comment : @zx81 you should post that as an answer so I can downvote it . : D But seriously there s nothing straightforward about this task . It may not require a full-on parser but it can t be done with regexes alone . Also the quoted-string regex in your comment is an abomination and you should get a ruling on whether block comments can be nested in most languages they can t . Comment : Oh and NSRegularExpression is powered by ICU http : userguide.icu-project.org strings regexp which does not support recursive patterns or anything similar . Comment : @Alan Swift supports nested comments and it is the future . .. . Answer : Using PCRE the s modifier is a single-line mode where . can even match newlines . Live example http : regex101.com r eB9bE4 .. . .. . You will notice that the second-to-last line with nested will ONLY match the first to the first and will not match the at the end of the line which is actually correct behavior . Comment : WRT the second-to-last line Swift supports nested comments . Comment : PCRE is not Obj-C regexp .", "Question : I looked into the Apple reference https : developer.apple.com library mac documentation Foundation Reference NSRegularExpression Class Reference Reference.html on NSRegularExpression and understand that in order see if the string is Cyrillic I should use p script cyrillic . However I have not been able to find an actual example of how this is done in the reference guide or in an answer http : stackoverflow.com questions 11897531 detecting-if-nsstring-contains-chinese-characters located in SO . What I would ideally like to achieve is : .. . Answer : Maybe I am an iOS programming newbie : .. . .. . And then the usage a category for NSString would probably be better Comment : Great This was what I needed - thank you", "Question : I m quite new to Mac OS X development just my second day . Did a couple months of iOS programming got the basics made a small app . Then I decided to make it also for Mac OS X when I suddenly encountered a problem : NSRegularExpression is only supported by Mac OS X 10.7 or later and I m using 10.6.7 . After a bit of googling I found a RegexKit.framework . So I installed it but then I gotta rewrite this piece of code for RegexKit framework . Any help on how can I do the same thing by using RegexKit would be appreciated . edit : got it working that way : .. . .. . hopefully it will help somebody someday : Comment : You should add the solution as an answer to your question so that it no longer appears unanswered . Comment : Ole thanks will keep in mind .. . Answer : got it working that way : .. . .. . hopefully it will help somebody someday :", "Question : Is the gamut of expressions that NSDataDetector can parse documented We know that NSDataDetector can interpret lots of expressions such as Monday evening . And it s understandable that the NSDataDetector Class Reference doesn t want to cover these in detail since that would likely require frequent documentation revisions . Still it would be good to know what s recognized and what isn t especially with an eye to extending the class . .. . .. . I suspect that NSHipster http : nshipster.com nsdatadetector is mistaken in thinking that NSDataDetector relies on Cocoa s linguistic analysis APIs if it did would NSDataDetector be a subclass of NSRegularExpression Though I admit inheriting from NSRegularExpression seems odd and might be a code-smell . Comment : As far as its use of NSRegularExpression I m sure that helps with parsing more normal things like phone numbers .. . Answer : The list of what NSDataDetector recognizes is not documented since it is very complex it supports thousands of expressions and dozens of languages . This class is also not designed to be subclassable . Have you filed a bug with Apple with the expressions that are missing in your case Comment : It s not so much a question of expressions that are missing but rather knowing what is covered by data detectors and what we should handle ourselves . Comment : It s not precisely defined but it s basically time-wise since you were mentioning Monday evening all the times and dates that are precise enough to create an useful event not too ambiguous because they try to avoid false positives and that are not noise e.g . a Mail on xxxx at yyy zzz wrote in about two dozen languages .", "Question : As the title states I wonder if NSRegularExpression in both Objective-c or Swift support partial case insensitive search Namely will the pattern recognize ismx If not is there a brief reason for this inability I truly appreciate your explanation . .. . Answer : From the NSRegularExpression Class Reference https : developer.apple.com library mac Documentation Foundation Reference NSRegularExpression Class index.html : .. . .. . Table 2 Regular Expression Operators .. . .. . .. . .. . .. . ismwx-ismwx : .. . .. . Flag settings . Evaluate the parenthesized expression with the specified flags enabled or -disabled . .. . .. . .. . ismwx-ismwx .. . Flag settings . Change the flag settings . Changes apply to the portion of the pattern following the setting . For example i changes to a case insensitive match . .. . Example : .. . .. . Output : .. . .. . The pattern matches foo and Foo because the f is matched case insensitive . It does not match fOO because oo is matched case sensitive . Comment : Is that capturing or not Comment : @Zaph : It does not as far as I can see introduce a new capture group . Is that what you mean Comment : Yes that is the question . Thanks . Comment : @Zaph : I have tested it : replacing result.range with result.rangeAtIndex 1 in the above example code throws an out of range exception which means that there is no capture group in the pattern . Comment : Thank you for detailed testing and explanation", "Question : I have the following strings : .. . .. . mary poppins 50th anniversary edition .. . the blues brothers 25th anniversary edition .. . .. . How can I find one or two digits th anniversary edition substring and remove it to eventually end with : .. . .. . mary poppins .. . the blues brothers .. . .. . Please note that 50th and 25th are just examples and in reality it could be any number from 1 to 99 . I guess it involves NSRegularExpression but I m not skilled with regular expression syntax.. . Comment : it could be any number from 1 to 99 . : you can add a third digit . .. . Answer : Try with d 1 2 . and replace with empty string . Regex101 Demo https : regex101.com r hI5oS4 1", "Question : Why is this code only spitting out the entire regex match instead of the capture group Input .. . .. . Output expected .. . .. . Actual output .. . .. . Code .. . .. . Code taken from Apple docs . I know there are other libraries to do this but i want to stick with what s built-in for this task . Comment : Update : Adding even more capture groups wont log out any more matches . Always one match . Why .. . Answer : Don t parse HTML with regular expressions or NSScanner . Down that path lies madness . This has been asked many times on SO . parsing HTML on the iPhone http : stackoverflow.com questions 405749 parsing-html-on-the-iphone .. . .. . The data i am picking out is as simple as td Name : A name td and i think its simple enough to just use regular expressions instead of including a full blown HTML parser in the project . Up to you and I m a strong advocate for first to market has huge advantage . The difference being that with a proper HTML parser you are considering the structure of the document . Using regular expressions you are relying on the document never changing format in ways that are syntactically otherwise perfectly valid . I.e . what if the input were td class name Name : A name td Your regex parser just broke on input that is both valid HTML and from a tag contents perspective identical to the original input . Comment : Why not if you only need a couple strings No lists etc . Comment : I.e . The input will never change in structure the ordering of tags will never change the code will never be reused or refactored the tags will never hav attributes added and the encoding will never change Sure . Go for it . seriously-- if it is good enough for now.. . Go for it . Just know that you ve got a time suck on your hands that may crop up someday . Comment : Well if you use a parser you still have to know where-in the document the data is and a change in the original document will affect your parsing no matter how you do it . The data i am picking out is as simple as td Name : A name td and i think its simple enough to just use regular expressions instead of including a full blown HTML parser in the project . Comment : Regular expressions aren t sophisticated enough to properly parse HTML because HTML is not a regular-language . You d have to make a lot of assumptions about the input such as limiting the nesting level . Your program will fail on any input that violates those rigid expectations . Are you willing to take that risk Comment : Yes because im after simple strings like the one above and it works perfectly now that im able to access the capture groups .", "Question : Context : I come from 15-20 years of JavaScript Ruby and modern PHP . I ve been poking at Swift over the last year and I m brand-new to Cocoa . Here s a simplified test case that I m running in Xcode 7.0 2 : .. . .. . The two debugging lines display : .. . .. . After that the app crashes with the following message : .. . .. . 2015-06-24 23 : 18 : 45.027 swift 42912 : 648900 Terminating app due to uncaught exception NSRangeException reason : - NSRegularExpression enumerateMatchesInString : options : range : usingBlock : : Range or index out of bounds .. . .. . I ve looked over the following documentation but nothing is jumping out to me : .. . .. . NSRegularExpression Class Reference https : developer.apple.com library prerelease ios documentation Foundation Reference NSRegularExpression Class index.html apple ref doc uid TP40009708-CH1-SW13 .. . NSRegularExpression enumerateMatchesInString : options : range : usingBlock : https : developer.apple.com library prerelease ios documentation Foundation Reference NSRegularExpression Class index.html apple ref occ instm NSRegularExpression enumerateMatchesInString : options : range : usingBlock : .. . .. . I can only think that the issue has something to do with passing an NSRange instance as a parameter to the stringByReplacingMatchesInString method but I ve tried adjusting the value to NSRange 0 1 and NSRange 1 2 expecting to see something that would help but it s still throwing the exception . As I wrote in the title I m working in Swift 2.0 . Comment : I dont know if it is the cause of your issue but take a look here about using NSRage nshipster.com nsrange http : nshipster.com nsrange .. . Answer : I see that the first argument to stringByReplacingMatchesInString is replacement . Should this be self Comment : facepalm . Yes you re right . But then where does the replacement value go I have my compiled regex and I m calling stringByReplacingMatchesInString on it passing self .", "Question : Context : I come from 15-20 years of JavaScript Ruby and modern PHP . I ve been poking at Swift over the last year and I m brand-new to Cocoa . Here s a simplified test case that I m running in Xcode 7.0 2 : .. . .. . The two debugging lines display : .. . .. . After that the app crashes with the following message : .. . .. . 2015-06-24 23 : 18 : 45.027 swift 42912 : 648900 Terminating app due to uncaught exception NSRangeException reason : - NSRegularExpression enumerateMatchesInString : options : range : usingBlock : : Range or index out of bounds .. . .. . I ve looked over the following documentation but nothing is jumping out to me : .. . .. . NSRegularExpression Class Reference https : developer.apple.com library prerelease ios documentation Foundation Reference NSRegularExpression Class index.html apple ref doc uid TP40009708-CH1-SW13 .. . NSRegularExpression enumerateMatchesInString : options : range : usingBlock : https : developer.apple.com library prerelease ios documentation Foundation Reference NSRegularExpression Class index.html apple ref occ instm NSRegularExpression enumerateMatchesInString : options : range : usingBlock : .. . .. . I can only think that the issue has something to do with passing an NSRange instance as a parameter to the stringByReplacingMatchesInString method but I ve tried adjusting the value to NSRange 0 1 and NSRange 1 2 expecting to see something that would help but it s still throwing the exception . As I wrote in the title I m working in Swift 2.0 . Comment : I dont know if it is the cause of your issue but take a look here about using NSRage nshipster.com nsrange http : nshipster.com nsrange .. . Answer : After @Ben s answer I feel stupid . That kicked-off a little more poking around and I figured it out . Here s the code .", "Question : Context : I come from 15-20 years of JavaScript Ruby and modern PHP . I ve been poking at Swift over the last year and I m brand-new to Cocoa . Here s a simplified test case that I m running in Xcode 7.0 2 : .. . .. . The two debugging lines display : .. . .. . After that the app crashes with the following message : .. . .. . 2015-06-24 23 : 18 : 45.027 swift 42912 : 648900 Terminating app due to uncaught exception NSRangeException reason : - NSRegularExpression enumerateMatchesInString : options : range : usingBlock : : Range or index out of bounds .. . .. . I ve looked over the following documentation but nothing is jumping out to me : .. . .. . NSRegularExpression Class Reference https : developer.apple.com library prerelease ios documentation Foundation Reference NSRegularExpression Class index.html apple ref doc uid TP40009708-CH1-SW13 .. . NSRegularExpression enumerateMatchesInString : options : range : usingBlock : https : developer.apple.com library prerelease ios documentation Foundation Reference NSRegularExpression Class index.html apple ref occ instm NSRegularExpression enumerateMatchesInString : options : range : usingBlock : .. . .. . I can only think that the issue has something to do with passing an NSRange instance as a parameter to the stringByReplacingMatchesInString method but I ve tried adjusting the value to NSRange 0 1 and NSRange 1 2 expecting to see something that would help but it s still throwing the exception . As I wrote in the title I m working in Swift 2.0 . Comment : I dont know if it is the cause of your issue but take a look here about using NSRage nshipster.com nsrange http : nshipster.com nsrange .. . Answer : Maybe :", "Question : I have the following strings : .. . .. . mary poppins 50th anniversary edition .. . the blues brothers 25th anniversary edition .. . .. . How can I find one or two digits th anniversary edition substring and remove it to eventually end with : .. . .. . mary poppins .. . the blues brothers .. . .. . Please note that 50th and 25th are just examples and in reality it could be any number from 1 to 99 . I guess it involves NSRegularExpression but I m not skilled with regular expression syntax.. . Comment : it could be any number from 1 to 99 . : you can add a third digit . .. . Answer : You match a digit with 0-9 . If you want something to be matched 0 or 1 time use a after it .. . You match anything a single character with . .. . .. . So you could use 0-9 0-9 . . anniversary edition because there s th nd and st to worry about . This answer : http : stackoverflow.com a 22017608 3937 has some code for replacing regexes in strings Comment : Thanks looks great . Comment : BTW can I make the edition optional using regex Comment : edition should work . Parens group things for using or other operators . Comment : Thanks you helped me a lot", "Question : I was creating a Regular expression but in can t solve this problem .. . .. . Here are the errors I got : .. . .. . Cannot invoke initializer for type NSRegularExpression with an argument list of type pattern : String options : error : inout NSError and .. . .. . Use of unresolved identifier countElements .. . .. . I only want to use this : .. . Answer : There are a few issues with your code . It looks like you are migrating from an earlier version of Swift to Swift 2.x . The NSRegularExpression initializer has changed to throw its error instead of passing in an ErrorPointer : .. . .. . To specific nil for an OptionType value use . To get the length of a string use input.characters.count since countElements has been removed from Swift :" ] }
[ "yes-answer-long", "yes-answer-short" ]
unicode
UNK_RELATION
windows-shell@user-interface@54
windows-shell -- the windows-shell is main graphical @placeholder in windows hosted by windows-explorer .
{ "confidence": [ 52.97003173828125, 49.06855773925781, 48.39698791503906, 47.454036712646484, 44.04214096069336, 43.41675567626953, 43.171260833740234, 43.171260833740234, 43.171260833740234, 43.171260833740234, 42.93321228027344, 42.21678161621094, 42.207176208496094, 42.16203308105469, 42.16203308105469, 42.16203308105469, 40.95245361328125, 40.95245361328125, 40.95245361328125, 40.95245361328125, 40.95245361328125, 40.76375961303711, 40.639366149902344, 40.639366149902344, 39.63014221191406, 38.68701934814453, 38.57659912109375, 38.544952392578125, 38.430458068847656, 38.42055892944336, 38.42055892944336, 38.42055892944336, 38.42055892944336, 38.16826629638672, 37.55739212036133, 37.41633224487305, 37.40237808227539, 37.40237808227539, 37.40237808227539, 37.40237808227539, 37.40237808227539, 37.40237808227539, 37.22563171386719, 37.22087478637695, 37.13561248779297, 36.98977279663086, 36.79096221923828, 36.63566207885742, 36.627105712890625, 36.419677734375, 36.39315414428711, 36.39315414428711, 36.39315414428711, 36.39315414428711, 36.39315414428711, 36.39315414428711, 36.39315414428711, 36.39315414428711, 36.39315414428711, 36.35124969482422, 36.12638854980469, 36.12638854980469, 36.12638854980469, 35.94896697998047, 35.6224479675293, 35.547264099121094, 35.547264099121094, 35.44219207763672, 35.41045379638672, 35.183570861816406, 35.183570861816406, 35.183570861816406, 35.01275634765625, 34.916805267333984, 34.916805267333984, 34.916805267333984, 34.916805267333984, 34.916805267333984, 34.916805267333984, 34.916805267333984, 34.916805267333984, 34.916805267333984, 34.40829849243164, 34.40829849243164, 34.32898712158203, 34.23261260986328, 34.14735412597656, 34.14735412597656, 34.14442825317383, 33.871700286865234, 33.871700286865234, 33.871700286865234, 33.871700286865234, 33.871700286865234, 33.32845687866211, 33.32845687866211, 33.32845687866211, 33.32845687866211, 33.31380844116211 ], "content": [ "A windows-shell solution to that problem .", "i don t want to launch 2 windows but 2 windows-shell .", "On Windows a console does not need a shell .", "Is there any Windows shell script that will do the job", "Hosts include the Windows Explorer in Windows Vista or Microsoft Outlook 2007 .", "I m trying to set a custom shell in Windows 8.1 IND with the additional lock down features that come with this version of Windows .", "The output is .. . .. . I m really lost as I m no expert in windows-shell programming .", "How can i see internal Windows shell SDK logs traces", "As others have pointed out shell extensions are not practical in windows development currently .", "I know how to extend the shell to provide thumbnails to Windows .", "It points to Favorites of Windows explorer .", "The properties are available in Windows Explorer and in Search .", "I am running GNU Emacs on Windows so entering : .. . .. . launches the Windows command-line DOS shell .", "How would I go about coding a new Windows Vista Shell", "@Will Is it supported to write Windows Shell Extension using .NET 4 today", "3 .. . .. . My ultimate objective is to run adb commands off the Windows shell .", "A user may have more than login session and shell on windows right", "Or if this is shell can I install something in Windows 7 for having it work", "Why don t Windows Shell cmd.exe built-in commands read from stdin", "It is IShellExtInit : : Initialize of my class that gets called from the windows-shell .", "I m coding with C++ but I think it isn t matter as it is business with Windows shell .", "When launching a script-type python file from Windows you get a windows-shell type window where the script runs .", "When a user has navigated in the Windows Explorer to e.g .", "Windows explorer has the ability to show thumbnails of files .", "I want to get a pointer to the Windows Explorer and not the InternetExplorer .", "Is it possible to run 32-bit shell extensions in 64-bit Windows or must the shell extension be ported rebuilt to 64-bit to be used in Windows 7 64-bit", "There is a whole section of MSDN that describes has to create Shell Namespace Extensions including : .. . .. . Windows Shell https : msdn.microsoft.com en-us library windows desktop bb773177.aspx .. . .. . Creating Shell Data Source Objects and Extending the Shell Namespace https : msdn.microsoft.com en-us library windows desktop ff521656.aspx .. . .. . Creating Shell Extension Handlers https : msdn.microsoft.com en-us library windows desktop cc144067.aspx .. . .. . Implementing the Basic Folder Object Interfaces https : msdn.microsoft.com en-us library windows desktop cc144093.aspx", "I d like to develop a shell extension context menu handler compatible with both Windows XP SP2 32-bit and Windows 7 64-bit .", "The path according to Process Explorer is C : Windows SysWOW64 regedit.exe but the command-line is C : Windows System32 regedit.exe .", "but other explorer windows does not contain a list view .", "In this timing Windows explorer read registry in my guessing .", "Sometimes the new name is not applied in Windows Explorer .", "I m finding an interface having Windows Explorer refreshed .", "This works on Windows 8 but not on Windows 7.. .", "That Windows.. .", "Windows or Linux", "How do I pass an arbitrary command-line argument to a native Windows program from a MinGW shell", "@MatteoItalia linux shell has it powershell based on .net has it don t know about Windows CScript.exe does it have or not", "Windows shell scripting really isn t designed to work with arrays let alone complex data-structures .", "stackoverflow.com questions 22973841 http : stackoverflow.com questions 22973841 how-does-the-windows-shell-resize-icon-overlays 22994570 22994570", "Due to the environment I m working in the only option that I have is windows-shell not Powershell where the issue would not a problem .", "Which Windows Shell command will print a file content on the standard output like cat in Linux", "Replace show me this file in windows by show in windows folder windows is optional here -- problem solved .", "I am trying to get a list of selected files from the Windows Desktop and the Explorer Windows .", "I need to get the current collection of files that are selected in Windows Explorer .", "Notepad++ automatically adds a shell shortcut so that when you re in Windows Explorer you can right-click on a file and select edit with Notepad++ .", "So I just always end up with a list from the explorer windows and get no results even when no explorer windows are open .", "This behavior was reproduced both on Windows 7 and Windows Vista .", "PS : I tried running using cmd on windows and also on Powershell on windows .", ".. . .. . 1 In Windows that s Explorer the program which presents you with the task bar the desktop the icons the file browser windows etc that is basically provides the integration UI .", "I want to open multiple windows-shell and then load different telnet connection to send the same commad to different computers .", "Hoping to use a windows-shell API call that can accept wild cards to change attributes programmatically .", "I have a MFC application that uses IExplorerBrowser interface to implement the windows-shell inside my application .", "I know this answer applies to standard windows settings but are you sure it applies to all of the Shell interfaces", "Is there a command I can put into a Windows XP .bat file to bring the command shell to the front", "I m on Windows 7 trying to use a batch-file to open the GitBash shell and make a git call .", "I was wanting to write a simple windows-shell extension to add to the context menu and C is the language I most use these days .", "SharpShell http : sharpshell.codeplex.com .. . .. . SharpShell makes it easy to create Windows Shell Extensions using the .NET Framework .", "There is a program written and compiled in C with typical data input from a Unix shell on the other hand I m using Windows .", "However I would like to instead be able to run the Cygwin Bash Shell or any other non-Windows shell from within Emacs .", "Is it possible to get the windows-explorer style breadcrumb navigation control in a WinForms app", "However both of these are system-wide settings and will affect all Explorer windows .", "What you mean when you write get a pointer to the Windows Explorer", "http : stackoverflow.com questions 6440715 how-to-pass-multiple-filenames-to-a-context-menu-shell-command .. . .. . Windows context menu for multiple-files C++ http : stackoverflow.com questions 2972800 windows-context-menu-for-multiple-files-c .. . .. . Taking multiple-files arguments from Windows shell context menu on C http : stackoverflow.com questions 1878145 taking-multiple-files-arguments-from-windows-shell-context-menu-on-c-sharp", "With Windows 10 all apps both Classic Windows apps and Universal Windows apps will be unable to invoke a prompt to change your defaults only Windows .", "It should come with Windows .", "It should be built into windows .", "on Windows winlogon shell i specified to run a start.bat file which starts a program now i want to run on windows logon specific programs for specific user .", "Windows XP Explorer Folders Pane http : www.howtogeek.com wp-content uploads 2008 02 image66.png .. . .. . Here s the Windows 7 Navigation Pane : .. . .. .", "When I use the Windows Search API I get results including the Shell API System.ItemUrl .", "The Windows Shell team obviously reached the same conclusion and cut the sharing hand overlay .", "Do you have any clue about user authorization through Windows shell .", "Here is a list to get you started : .. . .. . http : www.lsdev.org .. . http : bb4win.cvs.sourceforge.net bb4win blackbox Blackbox.cpp revision 1.49 view markup http : bb4win.cvs.sourceforge.net bb4win blackbox Blackbox.cpp revision 1.49 view markup .. . http : xoblite.net source Blackbox.cpp.html .. . http : svn.reactos.org svn reactos trunk reactos base shell .. . http : www.geoffchappell.com viewer.htm doc studies windows-shell explorer index.htm tx 36 http : www.geoffchappell.com viewer.htm doc studies windows-shell explorer index.htm tx 36", "I am working on a Windows Explorer Namespace Extension which is a virtual filesystem .", "Otherwise Windows Explorer offers only an option to permanently delete it .", "Being able to launch Emacs from Windows Explorer is useful to many people .", "Open the Windows Explorer and select the Tools Folder Options.. . menu item .", "To find that simply paste APPDATA Microsoft Windows SendTo into an Explorer window .", "I am looking for a way to programmatically add a folder to the Favorites in Windows Explorer .", "For example in Windows Explorer single click selects a file and double click opens it .", "I am writing a Windows Explorer Preview Handler in ATL no MFC .", "I don t think Explorer loads column handlers in Vista Windows 7 .", "I had Windows 7 then but am using Windows 8 now .", "http : i.stack.imgur.com lsdJx.png .. . .. . This happens in both Windows 7 and Windows 8 .", "I am using the following code to reference a shell dll .. . .. . It works fine on my windows-7 development machine.But when I try running the exe on Win 2003 server I get this exception .. . .. . I took some help from C : Referencing a windows-shell interface http : stackoverflow.com questions 1924974 c-referencing-a-windows-shell-interface but no luck .", "I dont have Windows Server 2008 R2 but afaik Windows Shell uses Perceived Type http : msdn.microsoft.com en-us subscriptions downloads bb776871 28v vs.85 29.aspx mechanism .", "Single quotes never work in Windows .", "The SHGetSetFolderCustomSettings is not suported since XP windows .", "With Windows support not being a priority and the vast conceptual difference of the Windows API I d say spawn uses quite sensible approach when invoked on Windows .", "Windows shell scripts are less user friendly than JCL and that s saying something so I m afraid I can t help you there .", "The basic idea with Windows shell programming is that you can associate a given file-type extension with what MS is currently calling a progid e.g .", "I have a situation where I want to perform special processing on some Windows shell special-folders those corresponding to values in the CSIDL enum .", "I ve been reading that what I probably want to do is replace the windows-shell and have it run my app when the OS loads .", "The command is : type filename .. . .. . However if you want to Unix-fy your Windows shell there are Win32 ports http : unxutils.sourceforge.net of most of the command Unix style commands .", "stdout is on Windows a file handle .", "This is default Windows behavior .", "And what sizes are required by Windows", "This path should be in Windows format .", "And windows tell me that my encoding is utf8 but... . And at last i cant rename my user of windows.. ." ] }
{ "confidence": [ 47.28822708129883, 46.37964630126953, 46.31550216674805, 45.58549118041992, 45.14815139770508, 45.01173782348633, 44.5776252746582, 44.5776252746582, 44.0904426574707, 43.60960388183594, 43.19921112060547, 43.05696487426758, 42.979026794433594, 42.562686920166016, 42.404056549072266, 42.309932708740234, 42.21926498413086, 42.06559753417969, 41.98970413208008, 41.97831344604492 ], "content": [ "Question : I d like to develop a shell extension context menu handler compatible with both Windows XP SP2 32-bit and Windows 7 64-bit . Is it possible to run 32-bit shell extensions in 64-bit Windows or must the shell extension be ported rebuilt to 64-bit to be used in Windows 7 64-bit Are there any disadvantages known issues in using 32-bit shell extensions in 64-bit operating systems 32-bit apps run just fine in 64-bit Windows but I m not sure about shell extensions since if my understanding is correct shell extensions are in-proc COM servers loaded into Explorer process which should be a 64-bit process in 64-bit Windows...or is a form of 32-bit emulation provided for 32-bit shell extensions running in 64-bit OS Comment : Not an option . Simply add another configuration to your project that uses the Win32 target in addition to the x64 target . If your code is clean then you ll have no trouble generating both an x86 and an x64 version of your DLL . Comment : @HansPassant : That sounds like a legit answer . Comment : @HansPassant : I also wonder if the 32-bit and 64-bit shell extensions should have different GUIDs . Comment : They should share the same GUID . registering the 32bit extension on a 64bit OS should cause it to be put into the 32bit compatibility section of the registry Comment : @Petesh : But is a 64-bit build of the shell extension still required on 64-bit OS Or does the 32-bit extension run fine in the 64-bit OS .. . Answer : A shell extension is just a DLL and the rule is that 32-bit applications can only load 32-bit DLLs and 64-bit applications can only load 64-bit DLLs . There is no way around this . A 32-bit shell extension may still be useful on a 64-bit system as it means that any 32-bit third-party applications that load shell extensions will work . For example TortoiseSVN ships with and installs both 32- and 64-bit versions and so on 64-bit Windows you can still access TortoiseSVN context menus from 32-bit applications like a third-party file-manager . But Explorer itself is 64-bit native on 64-bit Windows and so you need a 64-bit version of your extension if you want it to work in Explorer .", "Question : How would I go about coding a new Windows Vista Shell Comment : Do you mean an Explorer replacement or a command shell like PowerShell or bash Comment : Explorer Always use GUI now barely use cmd .. . Answer : Everything you need to do as shell has never been documented so there are some issues with file change notifications etc . The basics are : .. . .. . 1 . SystemParametersInfo SPI SETMINIMIZEDMETRICS ...MINIMIZEDMETRICS with undocumented flag 8 .. . 2 . Register as the shell SetShellWindow SetProgmanWindow ShellDDEInit RegisterShellHook etc .. . 3 . Hide welcome screen by setting a signal msgina : ShellReadyEvent and ShellDesktopSwitchEvent .. . 4 . Start registry run key start menu startup and ShellServiceObjects .. . 5 . Set registry Explorer SessionInfo .. . .. . The good thing is you are not the first to write a new shell if you look around you can find some obscure required info . Here is a list to get you started : .. . .. . http : www.lsdev.org .. . http : bb4win.cvs.sourceforge.net bb4win blackbox Blackbox.cpp revision 1.49 view markup http : bb4win.cvs.sourceforge.net bb4win blackbox Blackbox.cpp revision 1.49 view markup .. . http : xoblite.net source Blackbox.cpp.html .. . http : svn.reactos.org svn reactos trunk reactos base shell .. . http : www.geoffchappell.com viewer.htm doc studies windows-shell explorer index.htm tx 36 http : www.geoffchappell.com viewer.htm doc studies windows-shell explorer index.htm tx 36 Comment : +1 for the good links", "Question : null .. . Answer : Please consider my problem : .. . .. . .. . 1 I Have a Windows 7 - x64 system with cygwin installed and SSHD running . 2 From another Windows machine from futty SSH to the above machine . 3 Command TaskKill IM explorer.exe F to kill explorer . Success 4 Command cygdrive c Windows sysnative cmd.exe c start B explorer.exe to start explorer . Failed From task manager I can see that the explorer process is running but no visible proof for it . No icons No task bar . 5 optional Command ps -W grep explorer cut -c 31-36 paste -s -d to see running explorer process Id from cygwin shell itself . After searching google and StackOverFlow the command mentioned in step 4 worked manually on direct cygwin shell on target system . Primary : : My question here is is there any command to replace in Step 4 so that we have a neat Windows Explorer process up and running Secondary : : My aim is to remotely kill and start windows-explorer properly Any methods for doing it Advanced Thanks - Rx3 -", "Question : Windows explorer has the ability to show thumbnails of files . These thumbnails are provided by core and third-party shell extensions . I know how to extend the shell to provide thumbnails to Windows . What I want to do is retrieve the thumbnail image from any file on the system via the shell using C . Is this possible Essentially I m writing a custom file browser and I want to show thumbnails and can t possibly parse every file on the planet to make my own thumbnails . Clarification : Many answers seem to be centered around web page thumbnails or scaling an image . But that s not at all what I m looking for . What I want is to ask Windows for the thumbnail representation of these file types : .DOC .PDF .3DM .DWG.. . and mabye about a dozen more . I don t want to parse render and make thumbnails myself because Windows already knows how . The code I posted as an answer actually works.. . maybe it can be simplified and cleaned up a bit . Comment : Please clarify that you want the file s thumbnail and not the icon for the file s type extension . That you do not want How to use the SHGetFileInfo function to get the icons that are associated with files . Comment : Clarification based on accepted answer - Brian Gillespie wants the Shell Thumbnail image and not the Shell Icon image . .. . Answer : This may help : .. . .. . http : blogs.msdn.com windowssdk archive 2009 06 12 windows-api-code-pack-for-microsoft-net-framework.aspx .. . .. . This includes the Shell API and allows you to do almost everything that the shell can including rendering thumbnails .", "Question : Windows explorer has the ability to show thumbnails of files . These thumbnails are provided by core and third-party shell extensions . I know how to extend the shell to provide thumbnails to Windows . What I want to do is retrieve the thumbnail image from any file on the system via the shell using C . Is this possible Essentially I m writing a custom file browser and I want to show thumbnails and can t possibly parse every file on the planet to make my own thumbnails . Clarification : Many answers seem to be centered around web page thumbnails or scaling an image . But that s not at all what I m looking for . What I want is to ask Windows for the thumbnail representation of these file types : .DOC .PDF .3DM .DWG.. . and mabye about a dozen more . I don t want to parse render and make thumbnails myself because Windows already knows how . The code I posted as an answer actually works.. . maybe it can be simplified and cleaned up a bit . Comment : Please clarify that you want the file s thumbnail and not the icon for the file s type extension . That you do not want How to use the SHGetFileInfo function to get the icons that are associated with files . Comment : Clarification based on accepted answer - Brian Gillespie wants the Shell Thumbnail image and not the Shell Icon image . .. . Answer : Ran across this today -- it s a few months old but it got the job done for me on Win7 extracting thumbnails on MPEG-4 files : .. . .. . http : blogs.msdn.com windowssdk archive 2009 06 12 windows-api-code-pack-for-microsoft-net-framework.aspx .. . .. . Hope it helps Comment : Awesom thanks heaps.. . was looking at the code above thinking geez does it really have to be that hard . Worked a treat +1 Comment : @Lightweight : Yes it has to be that hard because the poster states they do not want to use third-party extensions and they specifically want to use the Shell . Comment : Using Microsoft s API Code Pack is a much simpler solution . Changing my accepted solution . Comment : Nice stuff . This made my life easier . Comment : Can this be done with a stream instead of a mapped path", "Question : I have a shell extension that needs to reload its configuration when a specific window message custom message registered with RegisterWindowMessage is broadcasted by another application . I tried several approaches to intercept the message : .. . .. . Installing a window subclass callback on a window of Windows Explorer using SetWindowSubclass . This works on Window 7 but not on Windows 8 because apparently DllMain is not called on the main thread and SetWindowSubclass doesn t work from another thread . This is mentioned in the documentation : .. . .. . You cannot use the subclassing helper functions to subclass a window across threads .. . .. . Installing a hook for CALLWNDPROC using SetWindowsHookEx . Because I don t want to slow down the whole system I install the hook for a specific thread only the explorer s main thread . This works on Windows 8 but not on Windows 7.. . I suspect this is because I m hooking on the wrong thread but I m not sure . And anyway this approach seems overly intrusive . Creating a message-only window to handle the message . This doesn t work at all because message-only windows don t receive broadcasted messages . Is there a reliable way to receive a window message in a shell extension A window message initially seemed to be the easiest way to notify the shell extension but if you think another mechanism would be more appropriate I m open to suggestions . Comment : What kind of shell extension Comment : @SimonMourier icon overlay and context menu handler .. . Answer : Create a hidden window and listen for the message in its window procedure . 1 . Register a window class that has default values for all the fields apart from the window procedure and class name . You don t need to specify anything else in the window class since the window will never be visible . 2 . When you create the window pass 0 for the window style . Specifically exclude WS VISIBLE . 3 . Pass 0 for the WndParent when you create the window . This will make it a top level window and so eligible to receive broadcast messages . Comment : Thanks I ll give it a try Comment : That works flawlessly thanks", "Question : Windows explorer has the ability to show thumbnails of files . These thumbnails are provided by core and third-party shell extensions . I know how to extend the shell to provide thumbnails to Windows . What I want to do is retrieve the thumbnail image from any file on the system via the shell using C . Is this possible Essentially I m writing a custom file browser and I want to show thumbnails and can t possibly parse every file on the planet to make my own thumbnails . Clarification : Many answers seem to be centered around web page thumbnails or scaling an image . But that s not at all what I m looking for . What I want is to ask Windows for the thumbnail representation of these file types : .DOC .PDF .3DM .DWG.. . and mabye about a dozen more . I don t want to parse render and make thumbnails myself because Windows already knows how . The code I posted as an answer actually works.. . maybe it can be simplified and cleaned up a bit . Comment : Please clarify that you want the file s thumbnail and not the icon for the file s type extension . That you do not want How to use the SHGetFileInfo function to get the icons that are associated with files . Comment : Clarification based on accepted answer - Brian Gillespie wants the Shell Thumbnail image and not the Shell Icon image . .. . Answer : The windows API code pack thumbnail calls are not supported by XP 2003 unfortunately . 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 .", "Question : Windows explorer has the ability to show thumbnails of files . These thumbnails are provided by core and third-party shell extensions . I know how to extend the shell to provide thumbnails to Windows . What I want to do is retrieve the thumbnail image from any file on the system via the shell using C . Is this possible Essentially I m writing a custom file browser and I want to show thumbnails and can t possibly parse every file on the planet to make my own thumbnails . Clarification : Many answers seem to be centered around web page thumbnails or scaling an image . But that s not at all what I m looking for . What I want is to ask Windows for the thumbnail representation of these file types : .DOC .PDF .3DM .DWG.. . and mabye about a dozen more . I don t want to parse render and make thumbnails myself because Windows already knows how . The code I posted as an answer actually works.. . maybe it can be simplified and cleaned up a bit . Comment : Please clarify that you want the file s thumbnail and not the icon for the file s type extension . That you do not want How to use the SHGetFileInfo function to get the icons that are associated with files . Comment : Clarification based on accepted answer - Brian Gillespie wants the Shell Thumbnail image and not the Shell Icon image . .. . Answer : Not exactly what you asked but here s a project to open a Thumbs.db file http : www.petedavis.net MySite DynPageView.aspx pageid 31 . The Wikipedia article has more information http : en.wikipedia.org wiki Windows 5Fthumbnail 5Fcache on where to find thumbnails in Vista 7 . Comment : Nope you re right - it s not what I m looking for :", "Question : I m trying to programmatically open .jpg file in Windows Server 2008 R2 . But this code causes an error because Photo Gallery Viewer component is not installed in the system . enter image description here http : i.stack.imgur.com bcynn.png .. . .. . But if I open the file by double click from explorer it opens in MS Paint . In the register there is only one verb printto . How Windows open file in MS Paint What verb used by default in double click action enter image description here http : i.stack.imgur.com eOFY3.png .. . Answer : I dont have Windows Server 2008 R2 but afaik Windows Shell uses Perceived Type http : msdn.microsoft.com en-us subscriptions downloads bb776871 28v vs.85 29.aspx mechanism . So If Shell dont know how open JPEG file-type looks HKEY CLASSES ROOT SystemFileAssociations image OpenWithList key and hooray - mspaint.exe .", "Question : Notepad++ automatically adds a shell shortcut so that when you re in Windows Explorer you can right-click on a file and select edit with Notepad++ . How can I do the same with emacs I am using GNU Emacs 22.3 for Windows . Comment : Seems strange to be wanting a mainly mouse driven approach to launching a keyboard-heavy editor Don t you just use the console Comment : Not at all . Good productivity comes from correctly mixing keyboard and mouse . Being able to launch Emacs from Windows Explorer is useful to many people . .. . Answer : Check out an Emacs distribution with Windows integration : http : ourcomments.org Emacs EmacsW32.html .. . .. . Its installer creates an Explorer menu entry which does what you want .", "Question : I was wanting to write a simple windows-shell extension to add to the context menu and C is the language I most use these days . Is it a decent choice for a shell extension Are the interfaces easy to get to with it Is there additional overhead that causes the menu to be slower to pop-up Any one have good pointers for getting started Comment : Times change and this question s answer is no longer valid . With 4.0 you can now write managed shell extensions . http : blogs.msdn.com b codefx archive 2010 09 14 writing-windows-shell-extension-with-net-framework-4-c-vb-net-part-1.aspx Comment : You can write shell extensions with .NET 4.0 but it s not officially supported yet Comment : don t understand why this is closed writing shell extensions is a very common programming task on Windows and I consider the question asked very legitimate . See also : codeproject.com KB shell columnhandler.aspx http : www.codeproject.com KB shell columnhandler.aspx on writing a column handler in C Comment : I can t believe this was closed . He is asking the very same question I came here to find an answer to . Now I m going to have to open up another question . Comment : @Will Is it supported to write Windows Shell Extension using .NET 4 today http : blogs.msdn.com b codefx archive 2011 01 04 is-it-officially-supported-to-write-windows-shell-extension-using-net-4-today.aspx Microsoft has not fully tested all of the scenarios involved with managed shell extensions and has not determined whether it will support managed shell extensions for the long term . Therefore Microsoft will not support managed shell extensions and recommends against writing them . .. . Answer : A Raymond s post : Do not write in-process shell extensions in managed code http : blogs.msdn.com oldnewthing archive 2006 12 18 1317290.aspx . .. . .. . A recent follow-up : Now that version 4 of the .NET Framework supports in-process side-by-side runtimes is it now okay to write shell extensions in managed code http : blogs.msdn.com b oldnewthing archive 2013 02 22 10396079.aspx .. . .. . The bottom line is no it is not okay : .. . .. . The Guidance for implementing in-process extensions http : msdn.microsoft.com en-us library windows desktop dd758089 28v vs.85 29.aspx has been revised and it continues the recommendation against writing shell extensions and Internet Explorer extensions and other types of in-process extensions in managed code even if you re using version 4 or higher . Comment : it can be done but its a bad idea . I know MS dev team that wrote shell ext in c and they ended up recoding in c++ native Comment : The latest .Net 4.0 runtime supports in process side-by-side loading of the .Net 4.0 runtime and ALL future runtimes with earlier .Net runtimes . See following excerpt from msdn.microsoft.com en-us magazine ee819091.aspx http : msdn.microsoft.com en-us magazine ee819091.aspx With the ability to have multiple runtimes in process with any other runtime we can now offer general support for writing managed shell extensions even those that run in-process with arbitrary applications on the machine . Comment : Are the authors implying that it s OK to drop support for apps written in FWs previous to 4.0 Comment : @logicnp There s finally a follow-up http : blogs.msdn.com b oldnewthing archive 2013 02 22 10396079.aspx from Raymond Chen on that one . Comment : There s no rule against writing out-of-process extensions in .NET assuming you can figure out how to do that and follow the refcount contracts though .", "Question : my question is similar into this http : stackoverflow.com questions 8689225 adding-a-menu-item-to-windows-explorer-right-click-context-menu-in-c-sharp but that didn t gave all info I need or I didn t understand that very well . I want that in file context menu there would be option to notify my app . I added keys : .. . .. . Code of test : .. . .. . This works fine but.. . If I mark a few files folders and right-click and select my added option many test apps launches . This is not the behaviour I want I want that all paths would be passed into single instance of my app as list of argv s does anyone knows how to do that BTW . I m coding with C++ but I think it isn t matter as it is business with Windows shell . Thanks . Comment : You can use DDE I believe . But that s not recommended . Better would be a shell extension . .. . Answer : I think the right way is to write ContextMenuHandler http : msdn.microsoft.com en-us library bb776881.aspx and register it as shell extension . You can find lot of samples like here http : code.msdn.microsoft.com windowsdesktop ATLShellExtContextMenuHandl-e5c5fc23 here http : yanaware.com com4me ShellExtGuide1.php-author Michael 20DUNN mail mdunn@inreach.com url http---home.inreach.com-mdunn idTute 2.htm or here http : blogs.msdn.com b codefx archive 2012 05 15 sample-of-may-15th-c-windows-shell-context-menu-handler.aspx .. . .. . Context menu handlers are registered under key .. . .. . There are similar questions on SO already : .. . .. . How to pass in multiple file folder paths via a rigth-click event verb to an executable http : stackoverflow.com questions 1826791 how-to-pass-in-multiple-file-folder-paths-via-a-rigth-click-eventverb-to-an-ex .. . .. . How to Pass MULTIPLE filenames to a Context Menu Shell Command http : stackoverflow.com questions 6440715 how-to-pass-multiple-filenames-to-a-context-menu-shell-command .. . .. . Windows context menu for multiple-files C++ http : stackoverflow.com questions 2972800 windows-context-menu-for-multiple-files-c .. . .. . Taking multiple-files arguments from Windows shell context menu on C http : stackoverflow.com questions 1878145 taking-multiple-files-arguments-from-windows-shell-context-menu-on-c-sharp", "Question : Windows explorer has the ability to show thumbnails of files . These thumbnails are provided by core and third-party shell extensions . I know how to extend the shell to provide thumbnails to Windows . What I want to do is retrieve the thumbnail image from any file on the system via the shell using C . Is this possible Essentially I m writing a custom file browser and I want to show thumbnails and can t possibly parse every file on the planet to make my own thumbnails . Clarification : Many answers seem to be centered around web page thumbnails or scaling an image . But that s not at all what I m looking for . What I want is to ask Windows for the thumbnail representation of these file types : .DOC .PDF .3DM .DWG.. . and mabye about a dozen more . I don t want to parse render and make thumbnails myself because Windows already knows how . The code I posted as an answer actually works.. . maybe it can be simplified and cleaned up a bit . Comment : Please clarify that you want the file s thumbnail and not the icon for the file s type extension . That you do not want How to use the SHGetFileInfo function to get the icons that are associated with files . Comment : Clarification based on accepted answer - Brian Gillespie wants the Shell Thumbnail image and not the Shell Icon image . .. . Answer : You should use the windows GDI+ to get these thumbnails like this http : www.java2s.com Code CSharp 2D-Graphics ImageGetThumbnailImage.htm . Comment : While that s a short sweet answer it doesn t do what I need . It only works for .jpg .gif .png .bmp and whatever other files are supported in .NET . If you read through the code you called complex you ll find that it s actually calling into the IExtractImage method in some COM object with the GUID BB2E617C-0920-11d1-9A0B-00C04FC2D6C1 . This is much more involved than just scaling an image . Comment : The DotNet component I presented use GDI+ that is directly from Win32API which means that this component supports everything that the OS supports . If the number of file types that the OS supports does not suit your needs you should look for a 3rd party module to handle your images . Comment : GDI+ won t support for example PDFs or Photoshop PSDs . Third parties can register handlers with the shell GDI+ does not talk to 3rd party COM objects . Comment : I think you misunderstood me . Use GDI+ Win32API if it supports the file types you need if it doesn t - use 3rd party components .", "Question : I d like to develop a shell extension context menu handler compatible with both Windows XP SP2 32-bit and Windows 7 64-bit . Is it possible to run 32-bit shell extensions in 64-bit Windows or must the shell extension be ported rebuilt to 64-bit to be used in Windows 7 64-bit Are there any disadvantages known issues in using 32-bit shell extensions in 64-bit operating systems 32-bit apps run just fine in 64-bit Windows but I m not sure about shell extensions since if my understanding is correct shell extensions are in-proc COM servers loaded into Explorer process which should be a 64-bit process in 64-bit Windows...or is a form of 32-bit emulation provided for 32-bit shell extensions running in 64-bit OS Comment : Not an option . Simply add another configuration to your project that uses the Win32 target in addition to the x64 target . If your code is clean then you ll have no trouble generating both an x86 and an x64 version of your DLL . Comment : @HansPassant : That sounds like a legit answer . Comment : @HansPassant : I also wonder if the 32-bit and 64-bit shell extensions should have different GUIDs . Comment : They should share the same GUID . registering the 32bit extension on a 64bit OS should cause it to be put into the 32bit compatibility section of the registry Comment : @Petesh : But is a 64-bit build of the shell extension still required on 64-bit OS Or does the 32-bit extension run fine in the 64-bit OS .. . Answer : Shell extensions are COM components . If you install it as an out-of-process server Windows DCOM should take care of all the 32 - 64-bit marshalling . The MIDL compiler will then create the 64-bit stub which loads in process . Comment : It doesn t actually work like that though.. . Comment : That s incorrect . Content menu handlers are in-process extensions and cannot be implemented as out-of-process . msdn.microsoft.com en-us library windows desktop https : msdn.microsoft.com en-us library windows desktop dd758089 v vs.85 .aspx . Distributed COM DCOM does not apply Comment : @Micky your link doesn t support your claim . Have another reference Comment : Specifically The following list shows examples of extensions that can be implemented as either in-process or out-of-process extensions : IExecuteCommand IDropTarget IExplorerCommandState http : tinyurl.com o37qowa and Shortcut menu handlers also known as context menu handlers or verb handlers are a type of file-type handler . Like all such handlers they are in-process Component Object Model COM objects implemented as DLLs http : tinyurl.com pav7kvq and Shell extension handlers are all in-process COM objects implemented as DLLs http : tinyurl.com q7fnb48 . Yours Comment : @Micky : Your third link is wrong the quote from your first link is the proof . The quote from your first link is a list of examples i.e . not exhaustive . The second link does support your point . Why didn t you link that in the first place", "Question : null .. . Answer : How do i get the shell IPreviewHandler http : msdn.microsoft.com en-us library windows desktop bb775315 28v vs.85 29.aspx for a particular file extension Background .. . .. . Windows allows developers to create a preview handler for their custom file types : .. . .. . Preview handlers are called when an item is selected to show a lightweight rich read-only preview of the file s contents in the view s reading pane . This is done without launching the file s associated application . .. . A preview handler is a hosted application . Hosts include the Windows Explorer in Windows Vista or Microsoft Outlook 2007 . I want to leverage the existing IPreviewHandler infrasturcture to get a thumbnail for a file . In A Stream .. . .. . The problem is that my files are not housed in the shell namespace i.e . they are not sitting on the hard drive . They are sitting in memory accessable through an IStream . This means i cannot use the legacy IExtractImage interface as it does not support loading a file from a Stream . Fortunately this is why the modern IPreviewHandler supports recommends and prefers loading data from a Stream and recommends against loading previews from a file : .. . .. . This method is preferred to Initialize http : msdn.microsoft.com en-us library windows desktop bb761819 28v vs.85 29.aspx due to its ability to use streams that are not accessible through a Win32 path such as the contents of a compressed file with a .zip file name extension . So how do i get it There is no documentation on the correct way to get ahold of the IPreviewHandler associated with a particular extension . But if i take the directions of how to register an IPreviewHandler and read the contract from the other side http : blogs.msdn.com b oldnewthing archive 2003 12 26 45979.aspx : .. . .. . I should be able to follow the same route given that i know the extension . Lets follow that with a real world example a .jpg file : .. . .. . enter image description here http : i.stack.imgur.com ncIXZ.png .. . .. . enter image description here http : i.stack.imgur.com vKwO4.png .. . .. . Notice that the file has a preview . Notice i included the second screenshot only to reinforce the idea that the preview doesn t come from a file sitting on the hard drive . Lets get spellunking http : blogs.msdn.com b oldnewthing archive 2013 08 01 10438543.aspx First is the fact that it s a .jpg file : .. . .. . Wait there is no 8895b1c6-b41f-4c1c-a562-0d564250836f subkey for a previewhandler . That must mean that we cannot get a thumbnail for .jpg files . reducto an absurdum .. . .. . The Real Question .. . .. . The careful reader will realize that the actual question i m asking is : .. . .. . How do i get the preview of an image contained only in a stream And while that is a useful question and the real issue i m having having an answer on how to use IPreviewHandler is also a useful question . So feel free to answer either or both Bonus Reading .. . .. . MSDN : Preview Handlers and Shell Preview Host http : msdn.microsoft.com en-us library windows desktop cc144143 28v vs.85 29.aspx .. . MSDN : How to Register a Preview Handler http : msdn.microsoft.com en-us library windows desktop cc144144 28v vs.85 29.aspx .. . MSDN : IInitializeWithStream : : Initialize method http : msdn.microsoft.com en-us library windows desktop bb761812 28v vs.85 29.aspx .. . IPreviewHandler throws uncatchable exception http : stackoverflow.com questions 3598868 ipreviewhandler-throws-uncatchable-exception .. . Outlook IPreviewHandler for Delphi http : stackoverflow.com questions 3089304 outlook-ipreviewhandler-for-delphi Comment : Would it be acceptable to save the stream to a temporary file In this case you simply can use a ready-to-use preview control for .Net like this http : www.jam-software.de shellbrowser net file-preview.shtml . Comment : Do you REALLY need IPreviewHandler It looks IThumbnailProvider extension is what you need . Even in case of IExtractImage you can try to initialize extension with IInitializeWithStream or IPersistStream at least Windows explorer tries . Comment : A comment on Hosting Preview Handlers in Windows Forms Applications http : www.brad-smith.info blog archives 79 points out that AssocQueryString http : msdn.microsoft.com en-us library bb773471 28v VS.85 29.aspx can be used for that . ASSOCSTR SHELLEXTENSION http : msdn.microsoft.com en-us library bb762475 28v vs.85 29.aspx can be used to request a shell extension which implements a specific interface for example IPreviewHandler . Posting this as a comment because I cannot verify it and some details still need to be filled in before this is a useful answer . Comment : In the case of Outlook for example similar to what your second screenshot exhibit the attachment is indeed saved as a temporary file on the disk so a preview can be extracted by many other means . Comment : Note that .jpg has a PerceivedType of image . See AssocGetPerceivedType MSDN https : msdn.microsoft.com en-us library windows desktop bb773463 28v vs.85 29.aspx . Please let me know if this answers your question .", "Question : I am running GNU Emacs on Windows so entering : .. . .. . launches the Windows command-line DOS shell . However I would like to instead be able to run the Cygwin Bash Shell or any other non-Windows shell from within Emacs . How can this be easily done .. . Answer : Since these approaches didn t work for me I got it the following way : .. . .. . I m using NTEmacs which opens a dos shell by default so perhaps your emacs behaves the same .. . .. . Create a windows environment variable named SHELL SHELL not SHELL and give it the path to bash.exe of your cygwin installation for example c : programs cygwin bin bash.exe .. . .. . Now when doing M-x shell it opens a bash . Regards .. . .. . Inno Comment : I had the same problem and this worked for me as well . I will note that I had to close and re-open Emacs in order for this to take effect .", "Question : We use Icon Overlays to show a state to the users . All but one of our icons are shown sharp . This unsharpness only happens when we set the explorer to the large icon view . We can t figure out why this happens . We tried different tools to create th icon file . This is the result : .. . .. . enter image description here http : i.stack.imgur.com 7tuIH.png .. . .. . And we started from this image : .. . .. . enter image description here http : i.stack.imgur.com SiOFV.png .. . .. . You can find the source files png s and the ico file here http : nmd.sk JL3ZbO4X .. . .. . Does anyone knows how to fix this or what is causing this Comment : stackoverflow.com questions 22973841 http : stackoverflow.com questions 22973841 how-does-the-windows-shell-resize-icon-overlays 22994570 22994570 Comment : @DenisAnisimov I have all these sizes .. . Answer : It looks like a specific of Windows resize engine . In large icons mode shell uses 48x48x32 icon . I created icon with grid : .. . .. . enter image description here http : i.stack.imgur.com 0qysx.png .. . .. . And shell draws this icon without any interpolation : .. . .. . enter image description here http : i.stack.imgur.com JtvnD.png .. . .. . And it looks like there is no solution of your problem . Comment : Thx for the help it looks like we ll have to rethink our icons then .", "Question : I think there is a way to extend the Windows Shell to make for example other types of archives in the same vein of the support for ZIP-files compressed folders . I admit that the Shell Interface is pretty clear when you re familiar with the shell terminology but really obtuse otherwise . My current guess would be IShellFolder but I think this would be creating an extra folder at the same place as andin addition to the file instead of providing special support for the file itself . Therefore what to implement Comment : I think it s a shell namespace extension . IShellFolder is just the interface that represents all shell containers folders . Comment : That is exactly what it is . An ordinary SNE that opens a .zip file and represents its content as folders and files using standard shell interfaces like IShellFolder and IShellItem and PIDLs . .. . Answer : There is no shell interface specifically intended for implementing compressed folders . It is implemented as an ordinary Shell Namespace Extension that just happens to create open a normal .zip file and represent its content to the Shell using PIDLs and standard shell interfaces like IShellFolder IShellItem IDataObject IEnumIDList etc . The SNE even represents a .zip file itself as a subfolder within its parent folder instead of as a file so the Shell can traverse into the .zip file using the SNE s IShellFolder implementation like any other folder . The Shell has no concept that it is accessing a .zip file it is just another Shell item whose characteristics tell the Shell how to work with it . The SNE s implementation handles the details of accessing updating the .zip file instead of the file system . There is a whole section of MSDN that describes has to create Shell Namespace Extensions including : .. . .. . Windows Shell https : msdn.microsoft.com en-us library windows desktop bb773177.aspx .. . .. . Creating Shell Data Source Objects and Extending the Shell Namespace https : msdn.microsoft.com en-us library windows desktop ff521656.aspx .. . .. . Creating Shell Extension Handlers https : msdn.microsoft.com en-us library windows desktop cc144067.aspx .. . .. . Implementing the Basic Folder Object Interfaces https : msdn.microsoft.com en-us library windows desktop cc144093.aspx Comment : Isn t there a semantic overload on the word extension there I may be wrong but extension handlers seem to be about filepath extensions whereas namespace extension seems to be about extending the namespace .", "Question : How do I pass an arbitrary command-line argument to a native Windows program from a MinGW shell I would like a general solution but a solution that works for any valid Windows filename would be acceptable . .. . Answer : That shell is Bash . Cygwin MSYS2 Bash can accept Windows paths but you need to deal with spaces and backslashes . Regarding backslashes : .. . .. . Regarding spaces : .. . .. . As you can see if you are supplying Windows paths this is pretty straight forward . The only issue you might get is if you are trying to supply Bash paths to a Windows native program : .. . .. . Windows native programs have no concept of tmp or even . Cygwin MSYS2 have cygpath to assist in converting these paths : .. . .. . Side note : MinGW is an old project . You should be using Cygwin or MSYS2 . Comment : What if the path I want to pass has spaces in it Comment : @Demetri see update", "Question : How would I go about coding a new Windows Vista Shell Comment : Do you mean an Explorer replacement or a command shell like PowerShell or bash Comment : Explorer Always use GUI now barely use cmd .. . Answer : A good place to start would be investigating how to build a command-line-parser something that can tokenize and interpret the inputs . There are tools that can help with this like ANTLR http : antlr.org or you might like to try building your own . Once you ve parsed the inputs you need to decide what actions to take - launching processes piping between processes redirecting output - and making those system calls . If you re just after a more powerful shell rather than interested in building one give PowerShell http : technet.microsoft.com en-us scriptcenter dd742419.aspx a try ." ] }
[]
user-interface
UNK_RELATION
movieplayer@mpmovieplayercontroller@59
movieplayer -- movieplayer is the informal name for class @placeholder that manages the playback of a movie from a file or a network stream on ios framework .
{ "confidence": [ 45.73712921142578, 45.34137725830078, 44.770851135253906, 42.57300567626953, 41.45820617675781, 40.82316207885742, 39.78226852416992, 38.285789489746094, 38.27098846435547, 38.03242492675781, 37.04521179199219, 36.87156677246094, 35.16775894165039, 35.16775894165039, 33.41791534423828, 33.41791534423828, 33.2972412109375, 32.97325134277344, 32.34358215332031, 31.67675018310547, 30.865739822387695, 30.865739822387695, 30.593738555908203, 30.035240173339844, 29.180400848388672, 28.734935760498047, 28.152891159057617, 25.01220703125, 24.819957733154297, 23.994060516357422, 23.863706588745117, 23.591798782348633, 23.569305419921875, 23.261558532714844, 23.0535945892334, 22.82289695739746, 22.51849937438965, 22.465261459350586, 22.388545989990234, 22.307785034179688, 21.611148834228516, 21.611148834228516, 21.32730484008789, 21.09453582763672, 21.07305145263672, 20.645648956298828, 20.645648956298828, 20.48979949951172, 20.45420265197754, 20.45420265197754, 20.45420265197754, 20.45420265197754, 20.45029067993164, 20.206497192382812, 20.204204559326172, 20.138978958129883, 19.93368148803711, 19.85306167602539, 19.293346405029297, 19.293346405029297, 19.293346405029297, 19.189247131347656, 19.17087173461914, 18.895803451538086, 18.895803451538086, 18.895803451538086, 18.895803451538086, 18.895803451538086, 18.895803451538086, 18.780736923217773, 18.681364059448242, 18.623613357543945, 18.522754669189453, 18.28148651123047, 18.154993057250977, 18.154993057250977, 17.979747772216797, 17.94202995300293, 17.94202995300293, 17.902027130126953, 17.902027130126953, 17.850109100341797, 17.734947204589844, 17.29004669189453, 17.29004669189453, 17.206844329833984, 17.046367645263672, 16.873769760131836, 16.873769760131836, 16.781173706054688, 16.774944305419922, 16.693511962890625, 16.405149459838867, 16.405149459838867, 16.3436279296875, 16.3436279296875, 16.183767318725586, 16.08916473388672, 15.982658386230469, 15.936498641967773 ], "content": [ "one small issue in my movieplayer. .", "I use the example named MoviePlayer from SDK 3.0 but it sometimes crashes .", "The Default MoviePlayer is rotated in portrait mode and sometimes the moviePlayer object is not visible .", "If you want to get rid of this you need to release the MoviePlayer and allocate a new one each time you play a movie .", "is that really that simple to change the UIButton customary in the MoviePlayer UI", "However when you press the back button on the device the movieplayer goes back to the beginning of the movie .", "I did find that adding moviePlayer prepareToPlay solved the problem .", "I ve a video playing as a background of my loginViewController View A and I m using MoviePlayer Framework to achieve this .", "And I am using Multiple MPMoviePlayerViewController to play the resident movie files .mov on fullscreen mode refered to MoviePlayer sample .", "I meant the button as a button that belongs-to MoviePlayer standard UI .", "Did you like me think you could download Apple s Movieplayer sample click Build and Run and see a movie of an airplane", "There is a MoviePlayer inside a subview of this parent and this now no longer recognises any gestures .", "movieplayer shows like this .. . .. . 1 http : i.stack.imgur.com DTIll.png : http : i.stack.imgur.com WujxB.png but i want to show as below screenshot", "@Stacky : At the first time itself i want to show the movieplayer as second screenshot i.e. . with done button remain works well. .", "I have a question regarding the MoviePlayer http : developer.apple.com iPhone library samplecode MoviePlayer iPhone index.html sample code provided by apple .", "My requirement is this : I would like to handle the Pause Play event of that moviePlayer by registering the notification handler .", "For me it was adding these two lines from the MPMoviePlayerController documentation that are not in the MoviePlayer sample code app .", "Because the MoviePlayer http : developer.apple.com library ios samplecode MoviePlayer iPhone Introduction Intro.html demo is very old 2009-05-03 and because Apple is too lazy to update their code to support new approach on iOS 3.2 4.0 .", "Clicking the image-button does start the video as it should calls moviePlayer play .. . .. . Has something changed that I have not taken into consideration", "I have methods inside my open class controller that instantiates a moviePlayer which is set to autoPlay NO .. . .. . I have added the movieplayer.view as a subview of the controllers view configured it and created a full screen button on top for starting the video .", "Requirement is to switch between movies by switching between default and alternate moviePlayer upon touch detection .", "The way I did it was by using the currentPlaybackTime property of the MPMediaPlayback interface which the MoviePlayer controller should also conform to .", "I have a UiWebView inside which I open m.youtube.com and when I click one of the Youtube videos it plays that video in a movieplayer .", "i have post this question before but cannot get a answer so i post it again.is about the MoviePlayer sample download from iphone developer site when i press the Done button come with the movie player control mode the movie was finish and exit to main view at the same time the moviePlayBackDidFinish function have been called however when i play the movie again the player screen keep blinking how to prevent this", "@Stacky : thanx for ur reply..but i m not grtting u..already i did that all. . setting frame for movieplayer and add that player to my view then what else i want to do", "The movie isn t buffering because of Network Issues .", "Apple has changed the behavior of the movie player under WebView in iOS 4.3 .", "In the URL you are calling .php file but not with movie extension file file : localhost Users mac-01 Desktop php ios.php .. . .. . Better way to call this URL using the Json format then do the Json parsing and then load the video URL to play on MoviePlayer .. . .. . Check this Answer hope it will help you to solve How to play a video with MPMoviePlayerController http : stackoverflow.com questions 10194776 how-to-play-a-video-with-mpmovieplayercontroller rq 1", "If I play it again or I play another movie it is called .", "First check whether your movie file is added to your project or not .", "When I closed the movie and return to the previous view and then return to the movie view the movie will not even start .", "The sound for a movie only plays for the first 5 seconds of the movie and then it stops .", "The controls you want are for embedded playback not fullscreen .", ".. . .. . Question 3 : .. . .. . The delegate named MPMoviePlayerContentPreloadDidFinishNotification does not work the first time I play the movie .", "2.In movie player example overlay view is there but how to change the name of the button and label in that and I m unable to do that. . .. . .. . plz help me.its urgent .", "I want only video or movie to be played only to half the screen and I want to add custom-controls buttons to the remaining half of movie player .", "You bind the Video class to a Panel control like this : .. . .. . The video class contains several methods for playback like Play Pause Stop and of course FromFile .", "Previously the sound played for the duration of the movie .", "Those are the default controls for fullscreen playback since you set moviePlayerController.fullscreen YES .", "Question 3 I too saw that the delegate named MPMoviePlayerContentPreloadDidFinishNotification does not work the first time I play the movie which is totally strange .", "While waiting for the user to make a decision the movie will be looping .", "Note that this movie player is default player of iPhone i.e .", "When I start a html5-video from the UIWebView it is automatically shown in the native movie player .", "I had decent success on Android 2.2 with the frame animation technique but when I tried it on Android 1.5 I ran into major out-of-memory exceptions and ended up having to scrap that method and instead use a movie file of which I seek to different frames of the movie file to give me a similar effect .", "wow actually the movie route is NOT better because there is small lag time in between stitching different movies together or seeking to different spots in the movie .", "I ve few doubts regarding movie player app .. . .. . 1.can anyone tell me how to customize the screen-size .", "What you want is moviePlayerController.controlStyle MPMovieControlStyleEmbedded but you can only use it if your movie is embbeded in one of your views .", "After trial and error it would seem that if you need to play a lot of large frames in your app going the movie file route will be a better route .", "I would like to implement a similar custom movie player in my app .", "Just wanna make custom movie player with new button and slide", "I put in a movie you can go on movies and play it by yourself .", "I tried to install a movie plugin but this hasn t helped me .", "I m doing simple movie player in swift .", "I added this to my code when im initializing the movie .. . .. . m pMPmpc.moviePlayer setControlStyle : MPMovieControlStyleNone .. . .. . where m pMPmpc is an MPMoviePlayerViewController .. . .. . It worked fine but then I noticed that the movie doesnt rotate anymore while playing but the app after the movie still rotates but it detects the orientation at the start and follows that .", "On iOS4 providing a value for initialPlaybackTime started the video playback timeline from zero at this point whereas on iOS5 setting this value effectively cues to this point in the playback and starts from there .", "MPMoviePlayerViewController is meant for fullscreen playback only", "http : stackoverflow.com questions 4431762 is-it-a-good-idea-to-use-an-video-as-splash-screen-in-my-iphone-app .. . play movie file during iphone application startup i.e during application loading http : stackoverflow.com questions 342383 play-movie-file-during-iphone-application-startupi-e-during-application-loading", "If I play another MP4 file it works fine .", "It sounds like you want a splash-screen which shows a movie .", "But when I play the movie all I get is a black screen .", "I want to automatically open movie player like on picture 2 .", "Previosly under iOS 4.2 the player was closed with its own window .", "movie with subtitle http : i.stack.imgur.com qWtyz.png .. . .. . So basicly I would need a way to get a method called when movie is playing and then synchronize the text displayed on the label with the movie timing .", "In it s simplest explanation I m making a really small interactive movie app on Android .", "In a nut shell when the app is loaded it will play a short movie maybe a few seconds at most @ 12-24fps .", "The movie source is stop-motion photography so it s already chopped up into frames .", "My question here is if I should use a Frame Animation technique or if I should use a Movie player for this .", "No but you can put the movie player s view inside your own view and overlay buttons on it yourself .", "Hook those up to IBAction methods that call the movie player s -play -pause etc . and there you have it .", ".. . .. . Question 2 : .. . .. . And sometimes if I play an MP4 file and then I play it again the screen of the simulater will shock .", "Can I use buttons in a tab bar or similar to play different video clips like this Movie Player in Swift http : stackoverflow.com questions 26440238 movie-player-in-swift and how would I do that a video array or", "But you can have the controls that you want if your movie is embedded somewhere in a view keeping in mind that when you hit the fullscreen toggle the control are going to change to default one .", "more info in this link developer.apple.com library ios documentation MediaPlayer https : developer.apple.com library ios documentation MediaPlayer Reference MPRemoteCommandCenter Ref", "MPMoviePlayerController http : developer.apple.com library ios documentation MediaPlayer Reference MPMoviePlayerController Class .. . .. . UIButton http : developer.apple.com library ios documentation UIKit Reference UIButton Class .. . .. . UISlider http : developer.apple.com library ios documentation UIKit Reference UISlider Class", "Like I said it was odd that the first frame always showed up prior to iOS 6 .", "Like I said prior to iOS 6 just adding the video used to show the first frame of the paused video .", "I don t know exactly how to do without Json but I suggest you load name file file : localhost Users mac-01 Desktop php ios.php and add video name to the link and check if loads .", "I will then have 2 buttons displayed on the screen and depending on what button is pressed it I will play another short movie 5-10 seconds .", "Right now I have coded the first video : .. . .. . If I build the app I cannot stop it : my movie player does not show any controls .", "Problem a : I am not sure if this is the right way to achieve movie switching .", "The problem is I cannot dismiss one movie player and then present another .", "Apple suggest to use AVPlayer : developer.apple.com library ios samplecode AVPlayerDemo https : developer.apple.com library ios samplecode AVPlayerDemo Listings ReadMe txt.html", "I have a quicktime movie that I would like to appear when the user starts my app .", "Problem c : The Alternate movie player object of MPMoviePlayerViewController and added first as subview of UIWindow rotates on device rotation and behaves properly the Default Movie Player object of MPMoviePlayerViewController added after doesn t .", "So the View hierarchy is .. . .. . Alternate Movie Player View is at bottom Default Movie Player view is next Cocos2D Layer View is on top -- Cocos2D view also receives all of the events .", "If streaming you could encode on the fly using something like this : tuaw.com 2011 02 08 http : www.tuaw.com 2011 02 08 banana-tv-may-let-ios-devices-stream-video-to-the-mac from ericasadun.com http : ericasadun.com she may have some code for encoding that you could use for local video playback as well .", "is there is any changes to make in ios or in a php to make it work", "Every thing is working perfect but when I tap to play the video it invokes iPhone s DEFAULT MOVIE PLAYER and then I rotate my iPhone to landscape and video plays in landscape mode .", "The main view is for portrait mode only - rotation is prohibited but the native movie player allows landscape mode.So when I watch the video in landscape mode and tap on done I can see the bar rotate .", "i have a problem in my app .. . .. . i m downloading a zip in my app and adding it on NSDocumentDirectory this zip have some images and a movie .", "I suggest you to try the AVPlayer Class here s the documentation from Apple http : developer.apple.com library ios documentation AVFoundation Reference AVPlayer Class Reference Reference.html apple ref occ cl AVPlayer .", "I have implemented Gif movie player using https : github.com sbakhtiarov gif-movie-view it s working good but I want pause Gif image when first start-activity that means first open activity I tried gif1.setPaused true but it s not working so how can i solve it", "I got the message Restart the simulator to have it use the newly-selected device and restarted the iOS Simulator but nothing changed .", "I have a button which I would like to show and hide as the iOS MPMoviePlayer controls do when the video is tapped .", "Aim of the project is to have a custom interactive User Interface UI on top of Movie Player objects .mov files on device .", "Kaleidescape Movie Cover View http : www.youtube.com watch v HnsCFd0YExY list UUuExcBfcXTCw8QDsoOoFC3g index 20", "Instance your class instead the default MPMoviePlayerViewController .", "Well. . basically that s what happens when I play a movie from a game I have only the sound plays the video doesn t showing a black screen even the touch is disabled .", "the code i didnt make any change is completly build from the sample code downloaded from apple site have anybody met this problem before and solve it", "Assuming you are not creating any MPMoviePlayerController object the solution might be to reuse the sample from developer.apple.com library ios samplecode MoviePlayer iPhone http : developer.apple.com library ios samplecode MoviePlayer iPhone Introduction Intro.html apple ref doc uid DTS40007798 You can track the video link using shouldStartLoadWithRequest method of your webView delegate but not sure how do you handle start-playing ." ] }
{ "confidence": [ 60.753238677978516, 56.722232818603516, 56.421287536621094, 55.274192810058594, 52.70136260986328, 51.252830505371094, 50.06437683105469, 49.771549224853516, 47.36443328857422, 45.94160461425781, 44.43376922607422, 43.291046142578125, 42.647926330566406, 41.64413833618164, 41.59072494506836, 40.333343505859375, 38.95732879638672, 35.234764099121094, 32.41459274291992, 32.10572814941406 ], "content": [ "Question : one small issue in my movieplayer. . movieplayer shows like this .. . .. . 1 http : i.stack.imgur.com DTIll.png : http : i.stack.imgur.com WujxB.png but i want to show as below screenshot Want to show like this http : i.stack.imgur.com DTIll.png .. . .. . mycode : Comment : Prajan What exact you want Comment : @Stacky : thanx for ur reply..but i m not grtting u..already i did that all. . setting frame for movieplayer and add that player to my view then what else i want to do Comment : @Stacky : At the first time itself i want to show the movieplayer as second screenshot i.e. . with done button remain works well. . Comment : @miamk : moviePlayerController.controlStyle MPMovieControlStyleEmbedded now i want to add this code and remove fullscreen property..right Comment : Actually the above screenshot which is quick time player . .. . Answer : Those are the default controls for fullscreen playback since you set moviePlayerController.fullscreen YES . The controls you want are for embedded playback not fullscreen . What you want is moviePlayerController.controlStyle MPMovieControlStyleEmbedded but you can only use it if your movie is embbeded in one of your views . Then you would have the controls that you want including a toggle between fullscreen and embedded . Comment : @miamk : moviePlayerController.controlStyle MPMovieControlStyleEmbedded now i want to add this code and remove fullscreen property..right Comment : @Prajan What i mean is that you are always going to have default controls on fullscreen . There s no way to change that . But you can have the controls that you want if your movie is embedded somewhere in a view keeping in mind that when you hit the fullscreen toggle the control are going to change to default one . Comment : @miamk : moviePlayerController MPMoviePlayerController alloc initWithContentURL : videoURL moviePlayerController.view.backgroundColor UIColor blackColor moviePlayerController.controlStyle MPMovieControlStyleFullscreen moviePlayerController.view.frame CGRectMake 0 0 320 480 self.view addSubview : moviePlayerController.view moviePlayerController play Comment : @miamk : now i m changing the code as above.now it showa done button at the first time.All controls are working now except done button . Comment : NSNotificationCenter defaultCenter addObserver : self selector : @selector moviePlaybackComplete : name : MPMoviePlayerPlaybackDidFinishNotification object : moviePlayerController", "Question : i have post this question before but cannot get a answer so i post it again.is about the MoviePlayer sample download from iphone developer site when i press the Done button come with the movie player control mode the movie was finish and exit to main view at the same time the moviePlayBackDidFinish function have been called however when i play the movie again the player screen keep blinking how to prevent this the code i didnt make any change is completly build from the sample code downloaded from apple site have anybody met this problem before and solve it .. . Answer : This problem is occurs only in the simulator not on the actual device . If you want to get rid of this you need to release the MoviePlayer and allocate a new one each time you play a movie . E.g . : .. . .. . and .. . .. . elsewhere .", "Question : I m developing an iPad magazine App . While researching other apps I thought the GQ one was the best . I would like to implement a similar custom movie player in my app . It would include a Play button pause button stop button and slidebar along with the player . I m looking for ideas on how GQ implements a player like this or how I may go about creating my own . Comment : what is this GQ Comment : Oh I Guess there isn t GQ App in US Appstore . Never mind about the App . Just wanna make custom movie player with new button and slide .. . Answer : MPMoviePlayerController http : developer.apple.com library ios documentation MediaPlayer Reference MPMoviePlayerController Class .. . .. . UIButton http : developer.apple.com library ios documentation UIKit Reference UIButton Class .. . .. . UISlider http : developer.apple.com library ios documentation UIKit Reference UISlider Class Comment : I meant the button as a button that belongs-to MoviePlayer standard UI . is that really that simple to change the UIButton customary in the MoviePlayer UI Comment : No but you can put the movie player s view inside your own view and overlay buttons on it yourself . Hook those up to IBAction methods that call the movie player s -play -pause etc . and there you have it . Comment : Thank you I think I found a solution on your answer", "Question : I wish I could have found this solution when I googled every possible combination of these words . Did you like me think you could download Apple s Movieplayer sample click Build and Run and see a movie of an airplane And nothing happens right Here is the solution : Using MPMoviePlayerViewController in SDK 3.2 for iPad http : stackoverflow.com questions 2218158 using-mpmovieplayerviewcontroller-in-sdk-3-2-for-ipad 4291028 4291028 Comment : What is your question Comment : I guess I could have said why doesn t the sample work .. . Answer : Because the MoviePlayer http : developer.apple.com library ios samplecode MoviePlayer iPhone Introduction Intro.html demo is very old 2009-05-03 and because Apple is too lazy to update their code to support new approach on iOS 3.2 4.0 .", "Question : null .. . Answer : This is my first post at SO . I would like to thank all of the SO users their contribution have helped me a lot in all of my projects . I am new to the iPhone Application development scene . Aim of the project is to have a custom interactive User Interface UI on top of Movie Player objects .mov files on device . The underlying FullScreen MoviePlayers can be more than one and need to switch to different ones based on user Interaction . I am using cocos2D to achieve the custom interactive UI and effects for e.g . particle effects on swipe-gesture . And I am using Multiple MPMoviePlayerViewController to play the resident movie files .mov on fullscreen mode refered to MoviePlayer sample . Requirement is to switch between movies by switching between default and alternate moviePlayer upon touch detection . Also the switching should be as smooth as possible . To achieve smooth switching I am using two moviePlayerViewControllers each a subview of UIView object in AppController . Problem a : I am not sure if this is the right way to achieve movie switching . Problem b : In my current solution . The Default MoviePlayer is rotated in portrait mode and sometimes the moviePlayer object is not visible . The behaviour is not consistent . Problem c : The Alternate movie player object of MPMoviePlayerViewController and added first as subview of UIWindow rotates on device rotation and behaves properly the Default Movie Player object of MPMoviePlayerViewController added after doesn t . Can t think of logical explanation of it . Somewhere I read that MPMoviePlayerViewController creates it s own window and that might be an issue . So the View hierarchy is .. . .. . Alternate Movie Player View is at bottom Default Movie Player view is next Cocos2D Layer View is on top -- Cocos2D view also receives all of the events . Following is the moviePlayerViewController init code -- basically it allocs and inits two moviePlayerViewController objects and adds them as subview to the Default and Alternate UIView objects from AppController .. . .. . Thanks for all of your help . Let me know if you need any more details on it .", "Question : I have methods inside my open class controller that instantiates a moviePlayer which is set to autoPlay NO .. . .. . I have added the movieplayer.view as a subview of the controllers view configured it and created a full screen button on top for starting the video . Since iOS4.3 this has been working fine . The button is transparent and the first frame of the video showed through which was a picture of a custom Automoble Auto-Start button . Since iOS6 I only get a black screen . Clicking the image-button does start the video as it should calls moviePlayer play .. . .. . Has something changed that I have not taken into consideration I have provided the two sections of code I think are necessary . .. . Answer : I am not sure why I got a -1 rating for this question for lack of research or clarity Maybe I do not know the proper usage of this forum . I apologize . I did find that adding moviePlayer prepareToPlay solved the problem . Like I said it was odd that the first frame always showed up prior to iOS 6 .", "Question : I want to add a subtitles to a video played in an iPhone app . I don t want those subtitles encoded into the video itself - ideally I d love to have a view showing the video with pause play volume and such standard controls together with a view displaying the text that changes together with movie time changing . If I drawn that it s something like this movie with subtitle http : i.stack.imgur.com qWtyz.png .. . .. . So basicly I would need a way to get a method called when movie is playing and then synchronize the text displayed on the label with the movie timing . Anyone used a solution that was able to do it Comment : Would the video be on the device local or streaming If streaming you could encode on the fly using something like this : tuaw.com 2011 02 08 http : www.tuaw.com 2011 02 08 banana-tv-may-let-ios-devices-stream-video-to-the-mac from ericasadun.com http : ericasadun.com she may have some code for encoding that you could use for local video playback as well . Are you going to use a .srt file for the subtitle s Comment : can we edit using the changing text in the video like movies in which names of actor comes one by one . .. . Answer : I ve recently done something that syncs graphics to times in an audio track . The way I did it was by using the currentPlaybackTime property of the MPMediaPlayback interface which the MoviePlayer controller should also conform to . This returns the seconds elapsed in the media in a double typedef ed as NSTimeInterval . The actual synchronisation in my app was not done in notifications as I couldn t find any resembling a tick but instead I created a timer calling a function queried the currentPlaybackTime and updated the graphics based on this . In terms of your implementation I would assume you have some kind of system for associating label text subtitles with a particular time . You could then compare the text s time range with the time returned from currentPlaybackTime to find the correct text to display . Comment : can we edit using the changing text in the video like movies in which names of actor comes one by one .", "Question : one small issue in my movieplayer. . movieplayer shows like this .. . .. . 1 http : i.stack.imgur.com DTIll.png : http : i.stack.imgur.com WujxB.png but i want to show as below screenshot Want to show like this http : i.stack.imgur.com DTIll.png .. . .. . mycode : Comment : Prajan What exact you want Comment : @Stacky : thanx for ur reply..but i m not grtting u..already i did that all. . setting frame for movieplayer and add that player to my view then what else i want to do Comment : @Stacky : At the first time itself i want to show the movieplayer as second screenshot i.e. . with done button remain works well. . Comment : @miamk : moviePlayerController.controlStyle MPMovieControlStyleEmbedded now i want to add this code and remove fullscreen property..right Comment : Actually the above screenshot which is quick time player . .. . Answer : You have to use MPMoviePlayerViewController instead of using MPMoviePlayerController .", "Question : I have methods inside my open class controller that instantiates a moviePlayer which is set to autoPlay NO .. . .. . I have added the movieplayer.view as a subview of the controllers view configured it and created a full screen button on top for starting the video . Since iOS4.3 this has been working fine . The button is transparent and the first frame of the video showed through which was a picture of a custom Automoble Auto-Start button . Since iOS6 I only get a black screen . Clicking the image-button does start the video as it should calls moviePlayer play .. . .. . Has something changed that I have not taken into consideration I have provided the two sections of code I think are necessary . .. . Answer : Have you tried : Comment : No . I do not have a StartButton per se . The first several frames of the video is an image of the start button that exists in this particular automobile . When the fullscreen UIButton which is over top the video is clicked the video starts.. . which plays the video starting with the start button shaking and being pressed in . Comment : Like I said prior to iOS 6 just adding the video used to show the first frame of the paused video .", "Question : Well. . basically that s what happens when I play a movie from a game I have only the sound plays the video doesn t showing a black screen even the touch is disabled . This is the relevant part of the code : .. . .. . myMovie MPMoviePlayerViewController alloc initWithContentURL : self movieURL .. . .. . myMovie.moviePlayer.scalingMode MPMovieScalingModeFill myMovie.moviePlayer.controlStyle MPMovieControlModeHidden .. . .. . myMovie.moviePlayer play .. . .. . Thx . Edit . : Ok I got it working now I needed to add this line of code : .. . .. . self presentMoviePlayerViewControllerAnimated : myMovie .. . .. . The problem now is that I dont want to see the mediaplayer controls pause stop etc I just want to watch the video fullscreen that s all any ideas .. . Answer : For me it was adding these two lines from the MPMoviePlayerController documentation that are not in the MoviePlayer sample code app . So I was getting just audio when playing a stream in the sample app in both 4.1 and 4.2 . Comment : Thx that solved the problem .", "Question : I use the example named MoviePlayer from SDK 3.0 but it sometimes crashes . PS : I never change any code . .. . .. . Question 1 : .. . .. . My enviroment : .. . .. . lan media server : 10.0 0.118 .. . .. . I enter an MP4 address : .. . .. . http : 10.0.0.118 1.mp4 .. . .. . It works fine but sometimes it crashes . using gdb : bt mach msg trap .. . .. . mach msg CFRunLoopRunSpecific CFRunLoopRunInMode GSEventRunModal GSEventRun UIApplicationMain main .. . .. . What does it mean I never modify any code . .. . .. . Question 2 : .. . .. . And sometimes if I play an MP4 file and then I play it again the screen of the simulater will shock . If I play another MP4 file it works fine . How can I make it work .. . .. . Question 3 : .. . .. . The delegate named MPMoviePlayerContentPreloadDidFinishNotification does not work the first time I play the movie . If I play it again or I play another movie it is called . Why Comment : Excuse me but which SDK Or is there some product SDK I only know it as Software development kit which is a rather generic term . Comment : This sounds like iPhone SDK . Your question is very generic and unclear . If you expect people to help you you might want to put a bit more effort into phrasing a useful question.. . .. . Answer : 1 . Question 2 This shock and blinking is only a bug in the emulator . It is not happening on a real iPhone device so don t worry about it . 2 . Question 3 I too saw that the delegate named MPMoviePlayerContentPreloadDidFinishNotification does not work the first time I play the movie which is totally strange . Maybe this is fixed in newest firmware I don t know . I can t check it . Did you find any workaround for Question 3", "Question : null .. . Answer : I ve a video playing as a background of my loginViewController View A and I m using MoviePlayer Framework to achieve this . The video is playing but the problem is when im in another ViewController View B and do a navigation pop gesture to view A . The video gets laggy and stuck for awhile . Somebody have an idea why that s happening And that s the code that I ve tried to solve my problem but no success : .. . .. . Thanks in advance mates .", "Question : I wish I could have found this solution when I googled every possible combination of these words . Did you like me think you could download Apple s Movieplayer sample click Build and Run and see a movie of an airplane And nothing happens right Here is the solution : Using MPMoviePlayerViewController in SDK 3.2 for iPad http : stackoverflow.com questions 2218158 using-mpmovieplayerviewcontroller-in-sdk-3-2-for-ipad 4291028 4291028 Comment : What is your question Comment : I guess I could have said why doesn t the sample work .. . Answer : Refer to this http : iphonedevelopertips.com video getting-mpmovieplayercontroller-to-cooperate-with-ios4-3-2-ipad-and-earlier-versions-of-iphone-sdk.html .. . .. . It works both for new and old devices .", "Question : null .. . Answer : In the URL you are calling .php file but not with movie extension file file : localhost Users mac-01 Desktop php ios.php .. . .. . Better way to call this URL using the Json format then do the Json parsing and then load the video URL to play on MoviePlayer .. . .. . Check this Answer hope it will help you to solve How to play a video with MPMoviePlayerController http : stackoverflow.com questions 10194776 how-to-play-a-video-with-mpmovieplayercontroller rq 1 Comment : How can i use Json in streaming a video Comment : php handle fopen jplayer.org video m4v Big Buck Bunny Trailer.m4v http : www.jplayer.org video m4v Big Buck Bunny Trailer.m4v jplayer.org video m4v quot http : www.jplayer.org video m4v quot rb contents while feof handle contents . fread handle 80 fclose handle fp fopen Big Buck Bunny Trailer.m4v wb fwrite fp contents fclose fp Comment : json will not use to streaming you video it just load the particular files in an array from you php file like this I do this to load Images json result image localhost image theme 1.png quot http : localhost image theme 1.png quot sno 1 image localhost image theme 2.png quot http : localhost image theme 2.png quot sno 2 image img.gismeteo.ru images icon quot http : img.gismeteo.ru images icon quot sno 3 Comment : How can i do this without Json is there is any changes to make in ios or in a php to make it work Comment : I don t know exactly how to do without Json but I suggest you load name file file : localhost Users mac-01 Desktop php ios.php and add video name to the link and check if loads .", "Question : null .. . Answer : I have a UiWebView inside which I open m.youtube.com and when I click one of the Youtube videos it plays that video in a movieplayer . My requirement is this : I would like to handle the Pause Play event of that moviePlayer by registering the notification handler . I don t understand how to do that . I did try the following lines in ViewDidLoad of the UiViewController that has a UIWebView in it but the notification handlers were never called . I ll appreciate any help to achieve this . NSNotificationCenter defaultCenter addObserver : self selector : @selector moviePreloadDidFinish : name : MPMoviePlayerContentPreloadDidFinishNotification object : nil Comment : Are you removing the notification observer at viewWillDisappear Comment : No am not removing it in viewWillDisappear . Should I do that Comment : Another question is if the observer should be the uiWebView that is inside the uiviewcontroller Currently I have self as observer in ViewDidLoad . Am I missing something Comment : Assuming you are not creating any MPMoviePlayerController object the solution might be to reuse the sample from developer.apple.com library ios samplecode MoviePlayer iPhone http : developer.apple.com library ios samplecode MoviePlayer iPhone Introduction Intro.html apple ref doc uid DTS40007798 You can track the video link using shouldStartLoadWithRequest method of your webView delegate but not sure how do you handle start-playing . Comment : I am not creating MPMoviePlayerController object . I did look at the sample code and they seem to be creating a MPMoviePlayerController Object and set NSNotifications on that object . I am not sure how to handle notification callbacks from the modal QuickTime player that is invoked when you click youtube videos from a UIWebView .", "Question : null .. . Answer : Currently I have a parent view with a gestureRecognizer on it that recognises a tap and does some code this works . There is a MoviePlayer inside a subview of this parent and this now no longer recognises any gestures . How can I get both to work simultaneously I have found examples in objC but can t seem to map this to swift . I ve tried adding the following methods as suggested in a post but doesn t work . My class extends UIGestureRecognizerDelegate and the GestureRecognizer delegate is set to self . Hierarchy : .. . .. . Any ideas Regards", "Question : I m working on an android application that plays video by using an intent : .. . .. . This works great . However when you press the back button on the device the movieplayer goes back to the beginning of the movie . Only when you press back again it goes back to my application . While the current behaviour makes some sense I would like to know if I can change it : Is is possible to directly go back after pressing back Thanks PanMan . Comment : Have you tried handling KeyEvent.KEYCODE BACK Comment : I don t think you can handle keyevent s while in other apps the intent basically fires another app . But it s possible I m wrong I hope so . Any idea s on that .. . Answer : given that you cannot handle another application s key event your other option is to find or build some third party application that plays video . Comment : Dat would be a nightmare : Comment : Another option is to create an activity that uses MediaPlayer instead of a third party app .", "Question : I have a question regarding the MoviePlayer http : developer.apple.com iPhone library samplecode MoviePlayer iPhone index.html sample code provided by apple . I don t understand how the overlayViewTouch notification works . The NSlog message I added to it does not get sent when I touch the view not button . I can however get the NSlog notification if I place it in - void touchesBegan in MyOverlayView.m . Which makes me think it is recognizing touches but not sending a notification . Can anyone shed light on what I am missing or doing wrong Thank you . .. . Answer : It s because the overlay view is small . You can see the area covered by the overlay view by changing the background-color of the overlay view . The notification will be delivered when you touch the area .", "Question : I have a question regarding the MoviePlayer http : developer.apple.com iPhone library samplecode MoviePlayer iPhone index.html sample code provided by apple . I don t understand how the overlayViewTouch notification works . The NSlog message I added to it does not get sent when I touch the view not button . I can however get the NSlog notification if I place it in - void touchesBegan in MyOverlayView.m . Which makes me think it is recognizing touches but not sending a notification . Can anyone shed light on what I am missing or doing wrong Thank you . .. . Answer : As it seems to me the sample code is missing the addObserver selector call to the Notification . An example of the registration can be found in the AppDelegate : .. . .. . As in NSNotificationCenter Documentation When an object known as the notification sender posts a notification it sends an NSNotification object to the notification center . The notification center then notifies any observers for which the notification meets the criteria specified on registration by sending them the specified notification message-passing the notification as the sole argument . If there are no observers no one will be informed by NSNotificationCenter . Just add the appropriate register in init for example .", "Question : null .. . Answer : The sound for a movie only plays for the first 5 seconds of the movie and then it stops . Previously the sound played for the duration of the movie . I tried .mov and .m4v but had the same problem . When I closed the movie and return to the previous view and then return to the movie view the movie will not even start . I got the message Restart the simulator to have it use the newly-selected device and restarted the iOS Simulator but nothing changed . There were also the messages : .. . .. . MPAVController Autoplay : Disabling autoplay Autoplay : Disabling autoplay for pause Autoplay : Disabling autoplay Autoplay : streamLikelyToKeepUp : 1 - 1 Autoplay : Enabling autoplay Autoplay : Likely to keep up or full buffer : 0 Autoplay : Skipping autoplay not enough buffered to keep up . I am running in Xcode 4.5.2 Any ideas dh@idugsf.com Comment : The movie isn t buffering because of Network Issues . Comment : here s the .m code :" ] }
[ "yes-answer-long", "yes-answer-short" ]
mpmovieplayercontroller
UNK_RELATION
umdh@debugging@34
umdh -- user-mode dump heap is a @placeholder utility for performing analysis of heap-memory allocations for a windows process .
{ "confidence": [ 42.19231033325195, 39.72675704956055, 38.8994255065918, 36.04185485839844, 36.04185485839844, 33.510154724121094, 33.190528869628906, 32.06990432739258, 31.65819549560547, 30.801315307617188, 29.791473388671875, 29.32758140563965, 28.96587371826172, 28.538814544677734, 27.84659194946289, 27.43994140625, 27.329265594482422, 27.329265594482422, 27.275362014770508, 27.141357421875, 26.76015853881836, 26.75054931640625, 26.47760772705078, 26.47760772705078, 26.341392517089844, 26.325782775878906, 26.126407623291016, 26.032608032226562, 25.561382293701172, 25.561382293701172, 25.561382293701172, 25.561382293701172, 25.561382293701172, 25.561382293701172, 25.561382293701172, 25.076099395751953, 24.972780227661133, 24.65532684326172, 24.65532684326172, 24.544435501098633, 24.544435501098633, 24.51661491394043, 24.371749877929688, 24.319717407226562, 24.06328010559082, 23.254127502441406, 23.254127502441406, 23.254127502441406, 23.254127502441406, 23.254127502441406, 23.254127502441406, 23.22285270690918, 22.85373306274414, 22.831544876098633, 22.831544876098633, 22.770919799804688, 22.770919799804688, 22.42856788635254, 22.162446975708008, 22.012462615966797, 21.842041015625, 21.842041015625, 21.842041015625, 21.842041015625, 21.08584976196289, 20.939016342163086, 20.939016342163086, 20.939016342163086, 20.677507400512695, 20.260448455810547, 20.260448455810547, 20.260448455810547, 20.170703887939453, 20.114513397216797, 20.114513397216797, 20.114513397216797, 20.114513397216797, 19.7332763671875, 19.564847946166992, 19.30057716369629, 19.10679817199707, 19.10679817199707, 19.018781661987305, 18.778594970703125, 18.70600128173828, 18.70600128173828, 18.6199951171875, 18.579315185546875, 18.206707000732422, 18.19400405883789, 18.19400405883789, 17.859853744506836, 17.530384063720703, 17.09526824951172, 16.61008644104004, 16.61008644104004, 16.28871726989746, 16.09568214416504, 15.97616195678711, 15.761271476745605 ], "content": [ "At the top of UMDH snapshot files it mentions Only allocations for which the heap manager collected a stack are dumped .", "It would appear that once the allocations went over the 2G memory space UMDH reported failed to enumerate process modules .", "What would cause UMDH to show a decrease in heap use but perfmon show a rather large increase in allocated memory use by the same process", "As this seemed excessive I examined the heap change using umdh .", "I would assume that is the overhead in heap allocation that umdh is reporting .", "When running UMDH on a process on Windows 7 I only get a response of failed to enumerate process modules .", "I m trying to debug a memory leak using UMDH .", "If so is there a way that I can get a log of the allocations on the heap by call stack in a Windows 7 8 approved tool", "UMDH or actually : Windows due to a GFlag setting will store the callstack at the time memory is allocated for an object .", "Never used umdh but dr . memory might serve you better", "Once I have isolated it to couple of C++ components with PerfMon log and WinDbg SOS debugging I tried to use UMDH gflags enabled with +ust to compare snapshots and find out which heap allocations were leaking memory .", "I am trying to hunt down reason for memory buildup in my application native-code on windows In umdh when I take a diff between logs I find call stacks arranged by decreasing size of allocations .", "I searched the web and the available documentation says Logs the heap blocks that are not referenced by the process garbage-collection .", "It uses the same symbol engine as UMDH .", "When the problem reoccurred resource manager reported multiple GB under Working set and Private bytes but the UMDH snapshots account only for a few MB allocations in the process heaps .", "Try the following - .. . .. . umdh -p : pid -f : one.txt .. . .. . umdh -p : pid -f : two.txt .. . .. . umdh -v -l one.txt two.txt diff.txt .. . .. . -l is a new switch extracting file and line numbers from the PDBs .", "UMDH switches syntax changed slightly somewhere in the last releases of debugging-tools-for-windows .", "Advanced Windows Debugging claimed that those tools could be installed via a copy but that doesn t seem to work with UMDH .", "In Windows Vista I found UMDH to be very helpful but I can t find it for Windows 7 8 has Microsoft deprecated GFlags and UMDH", "Heap allocations always have book-keeping overhead you get a high number because it must store those stack traces .", "The following commands worked replace PID with actual process ID you want to dump : .. . .. . If you see the following warning : .. . .. . run : .. . .. . and restart the exe before running umdh again .", "Well then go with the UMDH logs .", "UMDH does the PDB association when you do the command : .. . .. . umdh -d one.txt two.txt -f : outputfile.txt .. . .. . Not when you originally take the snapshots .", "Problems That You Can Experience When You Use UMDH .. . .. . The most common errors when you use UMDH occur because stack tracing is not enabled .", "I performed the above repro again watched the same 500M growth pattern but UMDH is reporting a small increase in memory use", "I doubt umdh is very useful for analyzing CLR memory-leaks .", "Is the heap use expressed the same i.e .", "UMDH diff shows a decrease of.. . some huge number .", "I ve used UMDH a dozen times before never with any problem .", "When I do the diff .. . .. . umdh one.txt two.txt diff.txt .. . .. . the result is not useful .", "If it does not work it might be our main app rather than UMDH .", "Thanks for all your help with getting a better understanding of UMDH Steve .", "Also incorrect symbols for Ntdll.dll prevent UMDH from running .", "After adding the flag the dumps from UMDH were successful .", "I have two fundamental questions regarding umdh : .. . .. . 1 .", "At the bottom of the report there are a few allocations which are a negative-number and the number of the allocations is 0 .", "I have been using umdh to debug the memory and have found a callstack that used 127mb between to dumps of the memory .", "I ve got ust enabled : .. . .. . gflags exe name +ust .. . .. . I start exe name then I do .. . .. . umdh -p : pid one.txt umdh -p : pid two.txt .. . .. . I look at one.txt and two.txt and they have no indications of where these are coming from .", "It is http : www.eggheadcafe.com software aspnet 31544565 umdh-stack-traces-incompl.aspx well known http : www.nynaeve.net p 209 that on VC8 CRT s malloc was compiled with FPO - which UMDH cannot overcome .", "I was wondering why UMDH didn t catch this", "UMDH never reported this as an issue in the comparison log .", "Would WinDbg heap commmands would have helped to point out the leak", "I m trying to use UMDH to find where huge chunks of memory are being allocated but the results I m getting seem completely absurd .", "I start the program wait for it to reach an equilibrium and then grab a snapshot with umdh .", "Microsoft hasn t deprecated GFlags and UMDH .", "I am new to using UMDH and I am having some trouble understanding how to proceed with some of the errors it is outputting .", "I have used UMDH on another computer and did not experience these same problems the other computer is no longer available for my use .", "And if not is there any way to interpret a UMDH stack-trace like this : .. . .. . In particular what does ObjectCommunicator", "I m very confused since I understand that UMDH and CDB use the same symbol finding engine .", "After installing using the official installer I was able to get UMDH to see the symbols .", "I m not exactly sure about this but consider a long-living object which existed before you took the first UMDH snapshot .", "The installation of UMDH is from the 32-bit version of Debugging Tools for Windows collection I am running a 32-bit version of WinXP Professional and my software is in C++ using Visual Studio 2008 .", "Once the Debugging Tools for Windows installation completes GFlags and UMDH will be located in the installation directory e.g .", "UMDH logs have line numbers too with file names in their diff logs .", "UMDH logs have line numbers too with filenames in their diff logs .", "The difference between the heap before and after I find an increase of 9Mb .", "The private working set is the size of the heap plus the size of the stack .", "I follow the typical usage from the MS site : .. . .. . In another terminal window : .. . .. . And then back in the original terminal window : .. . .. . But I am getting the following warnings from UMDH .. . .. . When I make the second call to UMDH I get the same error and when I use UMDH to diff the two snapshots I do not get any useful output no stacks or backtraces .", "In order to investigate memory build up in my Application Native code on windows platform I did the following .. . .. . 1 Ran test case in iteration .. . .. . 2 after each iteration dumped UMDH and then took diff between certain iterations to see a pattern of memory build up in the call stacks .", "I turned +ust with gflags restarted the service and started taking scheduled UMDH snapshots .", "Make sure your symbol path is set correctly .. . especially if you a running UMDH on a different machine than the one that compiled the code .", "For the other symbols files UMDH runs but the log file contains stack traces that do not have function names but instead have relative addresses inside modules .", "Yeah - it s old but upgrading isn t an option : .. . .. . And linked with these options minus some .libs : .. . .. . Why would UMDH not be able to load my symbols", "CDB can find my symbols - in particular it appears I can use ln address to find the symbols in the stack-trace from UMDH .", "umdh reports Total increase 5601391 requested + 3685785 overhead 9287176", "Does that mean umdh.exe -g already lists the memory that has leaked since there are no references to it in the process", "Does not indicate failure only indicates that the memory is no longer in use by the process and can now be collected by garbage-collection .", "Dumps work fine when the process is initially executing but fail when the memory usage increases .", "I am trying to figure out a memory leak using UMDH and I run into this issue where the displayed call stack is partial even though I got all the relevant symbols .", "It is also known http : weblogs.asp.net mdavey archive 2004 03 09 86569.aspx see Pavel Lebedinsky s comment that UMDH cannot handle certain allocator types e.g .", "I am pretty sure I have things set up correctly - .. . .. . But UMDH refuses to load the symbols for ObjectCommunicator.exe : .. . .. . ObjectCommunicator.exe was built with these options using vc 6.0 .", "It could indicate that you should start making UMDH snapshots earlier but usually it s also ok to ignore those if the size does not match the objects you re looking for .", "I am asking what the difference between the 9mb heap including 4mb of overhead and the working set increase of 22mb is .", "By default this value is 32Megs as far as I know and for multiple stack allocations this can be easily overrun .", "How can it help me find leaks if all it does is report allocations not deallocations", "So the remaining items everything you see are allocations which are potentially causing the leak .", "UPDATED2 : DebugDiag shows a leak correctly with 10000 allocations and a few sampled call stacks pointing to right location .", "I am trying to isolate memory-leaks in native-code on Windows .", "Continued execution waited till it stops @ second getchar .. . 5 . umdh.exe -pn : helloworld.exe -f : c : second.log .. . .. . What I noticed is that no matter with which parameters I call whether it is 100 allocations or 1000 allocations first.log and second.log look very similar for different experiments .", "Windows does its memory accounting in pages i.e .", "In the diff result I get lots of new allocations but there s no report on which were deallocated and which weren t thus causing a leak .", "For all those allocations you know where the object is created from the callstack and it s your task to find out where it should be freed e.g .", "UMDH gives me a stack-trace which points to MSVCR120 and I do not know how to interprete this : .. . .. . Can anyone give me some suggestions where I can find the root cause of this", "Here is the umdh info : .. . .. . First the compare between first run and second .. . .. . The second run callstack", "If that memory is freed the callstack is lost as well .", "If this is freed later on it will appear as negative memory .", "Suddenly I don t get a function names in the stack traces in my dump files - just a series of addresses .", "And you should remember to do a forced GC before taking snapshots otherwise you might observe lots of ghost objects in the heap .", "Am using umdh.exe to analyze possible memory leak .", "Enter your process name and press Tab .", "The target process had the LARGE ADDRESS AWARE flag turned on .", "it s the closest thing to valgrind that I ve used on windows .", "I m trying to learn how to troubleshoot memory-leaks with umdh.exe .", "I ran multiple iterations of a test case and attached DebugDiag to the process to collect information on the suspected leak memory leak confirmed through multiple runs in PerfMon .", "This information is used to evaluate how the process behaves and that their values will depend on how the application operates .", "It s not clear from the description whether you did this but you have to restart the process after setting the +ust flag for it .", "I m investigating some kind of memory leak in an application using UMHD .", "use ETW to capture a trace of the memory usage grow and analyze this : channel9.msdn.com Shows Defrag-Tools https : channel9.msdn.com Shows Defrag-Tools Defrag-Tools-49-WPT-Memory-Analysis-VirtualAlloc channel9.msdn.com Shows Defrag-Tools https : channel9.msdn.com Shows Defrag-Tools Defrag-Tools-154-Memory-Footprint-and-Leaks", "is it the allocated memory that has not been freed .. .", "The reason I want to know this is because I want to zero down on suspective callstacks in the analysis ." ] }
{ "confidence": [ 59.57219696044922, 53.20099639892578, 52.40324401855469, 51.46033477783203, 51.441490173339844, 50.12670135498047, 47.591094970703125, 46.96104431152344, 42.310020446777344, 40.37437438964844, 39.90808868408203, 39.109291076660156, 38.59513854980469, 38.350399017333984, 35.316001892089844, 34.86155700683594, 34.75203323364258, 32.40401077270508, 32.04844284057617, 31.040605545043945 ], "content": [ "Question : null .. . Answer : I have a service which intermittently starts gobbling up server memory over time and needs to be restarted to free it . I turned +ust with gflags restarted the service and started taking scheduled UMDH snapshots . When the problem reoccurred resource manager reported multiple GB under Working set and Private bytes but the UMDH snapshots account only for a few MB allocations in the process heaps . At the top of UMDH snapshot files it mentions Only allocations for which the heap manager collected a stack are dumped . How can an allocation in a process be without a trace when +ust flags were specified How can I find out where how these GBs were allocated Thanks in advance for any help... .", "Question : null .. . Answer : I was investigating a memory leak with the application written in C C++ . Once I have isolated it to couple of C++ components with PerfMon log and WinDbg SOS debugging I tried to use UMDH gflags enabled with +ust to compare snapshots and find out which heap allocations were leaking memory . At end the leak was found by a manual review of code . The sample code snippet below . I was wondering why UMDH didn t catch this UMDH never reported this as an issue in the comparison log . Would WinDbg heap commmands would have helped to point out the leak Comment : Believe it or not your code as written tends not to leak on msvc . The difference in msvc between the scalar deleter and the vector deleter is that the vector deleter will call destructors of the individual elements in the array . Since char is trivial there is no leak . It s still a malformed program and bad but it tends to work . screenshot showing no growth http : i.imgur.com fSgmu5v.png Comment : That s a very strange observation and hard to believe until a ran a sample code . Even though we just use a delete p not sure how the memory is being freed for the entire character array .", "Question : In Windows Vista I found UMDH to be very helpful but I can t find it for Windows 7 8 has Microsoft deprecated GFlags and UMDH If so is there a way that I can get a log of the allocations on the heap by call stack in a Windows 7 8 approved tool .. . Answer : Microsoft hasn t deprecated GFlags and UMDH . It is still included as part of Debugging Tools for Windows . You can get it as part of the Windows Software Development kit go to http : msdn.microsoft.com en-US windows desktop bg162891 to get the version compatible with Windows 7 and 8 . Once the Debugging Tools for Windows installation completes GFlags and UMDH will be located in the installation directory e.g . at C : Program Files x86 Windows Kits 8.x Debuggers x86 .", "Question : I m trying to use UMDH to find where huge chunks of memory are being allocated but the results I m getting seem completely absurd . I start the program wait for it to reach an equilibrium and then grab a snapshot with umdh . Then I perform the activity that causes it to suck up memory wait for it to reach equilibrium again and grab another snapshot . Then I run a diff : .. . .. . I m witnessing 500M of additional private bytes in perfmon other memory counters also grow accordingly . UMDH diff shows a decrease of.. . some huge number . Say what Can anyone explain why that might be the case Then I commented out all activity in the function that was reported in the largest growth stack . I performed the above repro again watched the same 500M growth pattern but UMDH is reporting a small increase in memory use Very small being the operative word there . The first part really blows my mind . What would cause UMDH to show a decrease in heap use but perfmon show a rather large increase in allocated memory use by the same process I considered thread stacks but the thread stack count actually goes down . What else might go into private bytes .. . Answer : Put debug info file i.e . pdb into the same path of exe . The following commands worked replace PID with actual process ID you want to dump : .. . .. . If you see the following warning : .. . .. . run : .. . .. . and restart the exe before running umdh again .", "Question : When running UMDH on a process on Windows 7 I only get a response of failed to enumerate process modules . Dumps work fine when the process is initially executing but fail when the memory usage increases . The exact point of failure is unclear and the error doesn t give any hints . .. . Answer : The target process had the LARGE ADDRESS AWARE flag turned on . It would appear that once the allocations went over the 2G memory space UMDH reported failed to enumerate process modules . I solved this issue by adding the LARGE ADDRESS AWARE flag using editbin LARGEADDRESSAWARE umdh.exe -- editbin is a Visual Studio tool c : Program Files x86 Microsoft Visual Studio 10.0 VC bin editbin.exe for me . After adding the flag the dumps from UMDH were successful .", "Question : C++ native-code running on Windows 7 . VS2008 . A particular state change on my application increases the working set private working set from 16Mb 6.5Mb to 38Mb 22Mb . As this seemed excessive I examined the heap change using umdh . The difference between the heap before and after I find an increase of 9Mb . What accounts for the additional memory in the working set I suspect it might be dll loading but how can I confirm this and break it down Comment : Windows does its memory accounting in pages i.e . 38 MB is really 9500 pages . Is the heap use expressed the same i.e . 2250 pages Or is it the sum of the requested allocation sizes Comment : It is the byte sum of the requested allocation size . umdh reports Total increase 5601391 requested + 3685785 overhead 9287176 Comment : The private working set is the size of the heap plus the size of the stack . Are you spawning any additional threads Comment : Yes there are multiple threads in the application . I know that each thread is allocated a 1 mb stack but I think that in practice it is a 4kb stack with markers to allow it grow i.e spawning a new thread doesn t add the full 1mb . .. . Answer : When an application requests memory windows gives it much more than it asks for so that subsequent request from all apps does not result in excessive fragmentation . For example you ask for 1 byte at a time your working set will not grow 1 byte at a time or by page at a shot but could be by megabytes at a shot . Working set are the pages in physical memory . Also windows can take the excess away from you if something else needs it . Comment : I would assume that is the overhead in heap allocation that umdh is reporting . I am asking what the difference between the 9mb heap including 4mb of overhead and the working set increase of 22mb is .", "Question : I have two fundamental questions regarding umdh : .. . .. . 1 . How can it help me find leaks if all it does is report allocations not deallocations In the diff result I get lots of new allocations but there s no report on which were deallocated and which weren t thus causing a leak . 2 . The diff report is ordered by decreasing allocation size . At the bottom of the report there are a few allocations which are a negative-number and the number of the allocations is 0 . What does that mean .. . Answer : 1 . UMDH or actually : Windows due to a GFlag setting will store the callstack at the time memory is allocated for an object . If that memory is freed the callstack is lost as well . But that s ok because it is freed and you don t have a leak in that case . So the remaining items everything you see are allocations which are potentially causing the leak . For all those allocations you know where the object is created from the callstack and it s your task to find out where it should be freed e.g . by code-review . 2 . I m not exactly sure about this but consider a long-living object which existed before you took the first UMDH snapshot . If this is freed later on it will appear as negative memory . In such a case you probably don t have a callstack as well as explained in 1 . and it s just an information . It could indicate that you should start making UMDH snapshots earlier but usually it s also ok to ignore those if the size does not match the objects you re looking for .", "Question : null .. . Answer : In order to investigate memory build up in my Application Native code on windows platform I did the following .. . .. . 1 Ran test case in iteration .. . .. . 2 after each iteration dumped UMDH and then took diff between certain iterations to see a pattern of memory build up in the call stacks . I need some help here with following data which I need to interpret .. . .. . a At the very end of diff log i find something like this Total increase 86928 requested + 38080 overhead 125008 What exactly is overhead here If I add up all allocation and deduct the deallocations I get a number close to the requested amount . I cannot account for the overhead number . b Another help needed is with call stacks below is a snapshot of a part of call stack .. . .. . what is the significance of that offset I did not find any document explaining this . c How is the delta in private bytes captured by perfmon correlated to be delta in call stack during that interval Comment : Heap allocations always have book-keeping overhead you get a high number because it must store those stack traces . You always get an offset from the known function address where ever inside the compiled function body the call was made . Private bytes is a very inaccurate number with high granularity it includes free blocks . Comment : Hi @HansPassant Thanks a ton for your response . I have few additional queries . I am trying to hunt down reason for memory buildup in my application native-code on windows In umdh when I take a diff between logs I find call stacks arranged by decreasing size of allocations . In the topmost I have a stack that sought most allocation say callStack1 . When I scroll to bottom I find the same call stack i.e . callStack1 with negative allocation in the diff log is it deallocation from the call stack Please clarify Comment : @HansPassant A second Query as character limit wouldn t allow me to club them together Additionally If it is deallocation then typically it should have similar magnitude as allocation Please correct me if I am wrong . I am stating this because you would use the same handle pointer for deallocation as the one you used while allocating memory.Only undercircumstances it was released from a different ponter to that memeory would the magnitudes differ . The reason I want to know this is because I want to zero down on suspective callstacks in the analysis .", "Question : I ve used UMDH a dozen times before never with any problem . Suddenly I don t get a function names in the stack traces in my dump files - just a series of addresses . I ve got ust enabled : .. . .. . gflags exe name +ust .. . .. . I start exe name then I do .. . .. . umdh -p : pid one.txt umdh -p : pid two.txt .. . .. . I look at one.txt and two.txt and they have no indications of where these are coming from . When I do the diff .. . .. . umdh one.txt two.txt diff.txt .. . .. . the result is not useful . Help I love this tool . .. . Answer : UMDH switches syntax changed slightly somewhere in the last releases of debugging-tools-for-windows . Perhaps that s the issue . Try the following - .. . .. . umdh -p : pid -f : one.txt .. . .. . umdh -p : pid -f : two.txt .. . .. . umdh -v -l one.txt two.txt diff.txt .. . .. . -l is a new switch extracting file and line numbers from the PDBs . And again make sure the NT SYMBOL PATH environment variable includes the path to your PDB . Docs are now available also online http : msdn.microsoft.com en-us library cc267868.aspx . EDIT : the critical switch in the comparison -v is now present.. . .. . .. . EDIT : You did not specify your operating environment . It is http : www.eggheadcafe.com software aspnet 31544565 umdh-stack-traces-incompl.aspx well known http : www.nynaeve.net p 209 that on VC8 CRT s malloc was compiled with FPO - which UMDH cannot overcome . It is also known http : weblogs.asp.net mdavey archive 2004 03 09 86569.aspx see Pavel Lebedinsky s comment that UMDH cannot handle certain allocator types e.g . SysAllocString . If you are indeed using some exotic allocators you might want to give LeakDiag http : thetweaker.wordpress.com 2009 04 09 native-memory-leaks-part-1-leakdiag a try - it handles much more of them .", "Question : I am new to using UMDH and I am having some trouble understanding how to proceed with some of the errors it is outputting . I follow the typical usage from the MS site : .. . .. . In another terminal window : .. . .. . And then back in the original terminal window : .. . .. . But I am getting the following warnings from UMDH .. . .. . When I make the second call to UMDH I get the same error and when I use UMDH to diff the two snapshots I do not get any useful output no stacks or backtraces . I have used UMDH on another computer and did not experience these same problems the other computer is no longer available for my use . The installation of UMDH is from the 32-bit version of Debugging Tools for Windows collection I am running a 32-bit version of WinXP Professional and my software is in C++ using Visual Studio 2008 . I have done a search on these warnings and have not found anything useful about them . Any help would be much appreciated . Comment : It appears the executing gflags in the same terminal as the executable appears to not give the warnings contrary to the example from MS and what I experienced on my previous computer . But I get the same warnings with our main app not OCES.exe which returns control to the terminal OCES.exe does not It locks the terminal . So I am assuming that the effects gflags might have limited scope . Is there a better way to approach the usage of gflags for an application that release control back to a terminal window Comment : gflags should affect the registry . You can check whether it worked using gflags i oces.exe which dumps the current settings . Use gflags with no params and you should load the GUI version you can check and set your EXE s flags this way too . Comment : @Steve . I will try this . If it does not work it might be our main app rather than UMDH . It is a fairly large code base with a number of COTS products so there might be something that gflags is not happy with . I am going to try some other leak tools like LeakDiag and DebugDiag . Thanks for all your help with getting a better understanding of UMDH Steve . Much appreciated .. . Answer : Run gflags application and go to Image File tab . Enter your process name and press Tab . Now increase value in Stack backtrace Megs to e.g . 64 or even 128 . By default this value is 32Megs as far as I know and for multiple stack allocations this can be easily overrun .", "Question : I m trying to debug a memory leak using UMDH . It never successfully loads the symbols though . I am pretty sure I have things set up correctly - .. . .. . But UMDH refuses to load the symbols for ObjectCommunicator.exe : .. . .. . ObjectCommunicator.exe was built with these options using vc 6.0 . Yeah - it s old but upgrading isn t an option : .. . .. . And linked with these options minus some .libs : .. . .. . Why would UMDH not be able to load my symbols Is there any way to debug that And if not is there any way to interpret a UMDH stack-trace like this : .. . .. . In particular what does ObjectCommunicator +0 : 43C3E4 mean Can I do something with CDB for example to turn that into a meaningful reference Comment : Never used umdh but dr . memory might serve you better it s the closest thing to valgrind that I ve used on windows . Comment : Hard to guess at this . By all means do use CDB to troubleshoot this . It uses the same symbol engine as UMDH . CDB has the -n option to turn on noisy symbol load . Comment : CDB can find my symbols - in particular it appears I can use ln address to find the symbols in the stack-trace from UMDH . I do get a WARNING : Unable to verify checksum for C : Program Files Datacard SCS bin ObjectCommunicator.exe message from CDB but it finds the symbols from e : mysymbols . I m very confused since I understand that UMDH and CDB use the same symbol finding engine . .. . Answer : Turns out I just needed to do a real install of the Debugging tools . Advanced Windows Debugging claimed that those tools could be installed via a copy but that doesn t seem to work with UMDH . After installing using the official installer I was able to get UMDH to see the symbols .", "Question : I ve used UMDH a dozen times before never with any problem . Suddenly I don t get a function names in the stack traces in my dump files - just a series of addresses . I ve got ust enabled : .. . .. . gflags exe name +ust .. . .. . I start exe name then I do .. . .. . umdh -p : pid one.txt umdh -p : pid two.txt .. . .. . I look at one.txt and two.txt and they have no indications of where these are coming from . When I do the diff .. . .. . umdh one.txt two.txt diff.txt .. . .. . the result is not useful . Help I love this tool . .. . Answer : UMDH does the PDB association when you do the command : .. . .. . umdh -d one.txt two.txt -f : outputfile.txt .. . .. . Not when you originally take the snapshots . You have to let it do the diff for you And yeah...you need to have your symbol path set properly .", "Question : I ve used UMDH a dozen times before never with any problem . Suddenly I don t get a function names in the stack traces in my dump files - just a series of addresses . I ve got ust enabled : .. . .. . gflags exe name +ust .. . .. . I start exe name then I do .. . .. . umdh -p : pid one.txt umdh -p : pid two.txt .. . .. . I look at one.txt and two.txt and they have no indications of where these are coming from . When I do the diff .. . .. . umdh one.txt two.txt diff.txt .. . .. . the result is not useful . Help I love this tool . .. . Answer : The mapping between executable addresses and function names are defined in PDBs . Make sure your symbol path is set correctly .. . especially if you a running UMDH on a different machine than the one that compiled the code .", "Question : We are streaming video from a ashx implementing IHttpAsyncHandler to our Silverlight client . On the clientside the async handler is getting use in a implementation of MediaStreamSource . It all runs fine in latest Firefox chrome and also in Internet Explorer 8 . But in Internet Explorer 9 we see a memory leak . I have been using umdh to debug the memory and have found a callstack that used 127mb between to dumps of the memory . So i think i have narrowed it down to this callstack . But now i don t know now to continue with my debugging . Here is the umdh info : .. . .. . First the compare between first run and second .. . .. . The second run callstack Comment : I doubt umdh is very useful for analyzing CLR memory-leaks . Since .NET manages memory by itself CLR won t allocate memory as little as necessary . Rather it will cut big peices of memory at once in order to optimize performance fragmentation etc . I d start with .NET-specific tools say ANTS Memory Profiler to determine which memory-leaks : managed or unmanaged . And you should remember to do a forced GC before taking snapshots otherwise you might observe lots of ghost objects in the heap . .. . Answer : Have you already solved your problem Have you checked SL memory debugging tips such as : .. . .. . http : radheyv.blogspot.cz 2011 04 detecting-memory-leaks-in-silverlight.html 2011 04 detecting-memory-leaks-in-silverlight.html .. . .. . http : blogs.msdn.com b slperf archive 2010 08 19 analyzing-silverlight-memory-usage-part-1-obtaining-measurements.aspx .. . .. . http : dllshepherdnotes.blogspot.cz 2011 02 silverlight-memory-leak-part-4.html 2011 02 silverlight-memory-leak-part-4.html .. . .. . http : www.dllshepherd.net 2011 02 silverlight-memory-leak-part-2.html Comment : Thanks for all the links ill give you the right anwser", "Question : I am new to using UMDH and I am having some trouble understanding how to proceed with some of the errors it is outputting . I follow the typical usage from the MS site : .. . .. . In another terminal window : .. . .. . And then back in the original terminal window : .. . .. . But I am getting the following warnings from UMDH .. . .. . When I make the second call to UMDH I get the same error and when I use UMDH to diff the two snapshots I do not get any useful output no stacks or backtraces . I have used UMDH on another computer and did not experience these same problems the other computer is no longer available for my use . The installation of UMDH is from the 32-bit version of Debugging Tools for Windows collection I am running a 32-bit version of WinXP Professional and my software is in C++ using Visual Studio 2008 . I have done a search on these warnings and have not found anything useful about them . Any help would be much appreciated . Comment : It appears the executing gflags in the same terminal as the executable appears to not give the warnings contrary to the example from MS and what I experienced on my previous computer . But I get the same warnings with our main app not OCES.exe which returns control to the terminal OCES.exe does not It locks the terminal . So I am assuming that the effects gflags might have limited scope . Is there a better way to approach the usage of gflags for an application that release control back to a terminal window Comment : gflags should affect the registry . You can check whether it worked using gflags i oces.exe which dumps the current settings . Use gflags with no params and you should load the GUI version you can check and set your EXE s flags this way too . Comment : @Steve . I will try this . If it does not work it might be our main app rather than UMDH . It is a fairly large code base with a number of COTS products so there might be something that gflags is not happy with . I am going to try some other leak tools like LeakDiag and DebugDiag . Thanks for all your help with getting a better understanding of UMDH Steve . Much appreciated .. . Answer : It s not clear from the description whether you did this but you have to restart the process after setting the +ust flag for it . The comparison will continue to fail until you get rid of the warnings on the snapshot runs . EDIT : .. . .. . This article http : support.microsoft.com kb 268343 indicates that if symbols are not set up properly for ntdll.dll the tool will not work . Could you check this Problems That You Can Experience When You Use UMDH .. . .. . The most common errors when you use UMDH occur because stack tracing is not enabled . Also incorrect symbols for Ntdll.dll prevent UMDH from running . For the other symbols files UMDH runs but the log file contains stack traces that do not have function names but instead have relative addresses inside modules . A distant third error is specifying a wrong PID . Comment : Yes . The gflags call was before the call to OCES.exe . Comment : @Clifford - is there anything else in out1.txt", "Question : I am trying to isolate memory-leaks in native-code on Windows . I ran multiple iterations of a test case and attached DebugDiag to the process to collect information on the suspected leak memory leak confirmed through multiple runs in PerfMon . DebugDiag pointed out suspicious call stacks like .. . .. . I have configured symbols properly now I wanted to know how do I extract more info from call stack . 1 . UMDH logs have line numbers too with file names in their diff logs . However in DebugDiag report I do not find any line numbers of those functions . If the functions are really very long then it becomes difficult to describe the context by just looking at call stack without having the line numbers . Is there any way I can extract line number of function file from DebugDiag logs 2 . Another thing I wanted to know was the significance of hex offset with each module function entry in the call stacks . 3 . What is the Allocation size in the call stack is it the allocated memory that has not been freed hence the leak per execution of this call stack 4 . Any pointers to comprehensive documentation about DebugDiag capabilities .. . Answer : UMDH logs have line numbers too with filenames in their diff logs . However in debug diag report I do not find any line numbers of those functions . Well then go with the UMDH logs . significance of hex offset with each module function entry in the call stacks . The hex offset points to a specific assembler instruction in a compiled method . It is roughly related to the line number offset in source code but may heavily be influenced by compiler optimizations . What is the Allocation size in the call stack is it the allocated memory that has not been freed .. . Yes .. . .. . .. . per execution of this call stack No . Running the same method again may allocate a different size . Consider a function like AllocateSomeMemory int bytes that would depend on the parameter on how much memory is allocated . Any pointers to comprehensive documentation about DebugDiag capabilities .. . .. . Sorry I can t mention a good site off of my head .", "Question : Am using umdh.exe to analyze possible memory leak . I have a question regarding the -g option of umdh.exe . I searched the web and the available documentation says Logs the heap blocks that are not referenced by the process garbage-collection . Does that mean umdh.exe -g already lists the memory that has leaked since there are no references to it in the process Please clarify . Thanks in advance Kiran .. . Answer : Does not indicate failure only indicates that the memory is no longer in use by the process and can now be collected by garbage-collection . This information is used to evaluate how the process behaves and that their values will depend on how the application operates . See more info about memory at Slides for our All Day PDC 2008 talks on : Performance By Design http : blogs.msdn.com vancem archive 2008 10 30 slides-for-our-all-day-pdc-2008-talks-on-performance-by-design.aspx", "Question : null .. . Answer : I have a problem I do not completely understand . I m investigating some kind of memory leak in an application using UMHD . The leak does NOT appear in the debug build only in the release build . I can see a continous increase of the private working set with the sysinternals Process Explorer . UMDH gives me a stack-trace which points to MSVCR120 and I do not know how to interprete this : .. . .. . Can anyone give me some suggestions where I can find the root cause of this The application does quiet some parallel proccessing including building and shutting down of worker threads .", "Question : I am new to using UMDH and I am having some trouble understanding how to proceed with some of the errors it is outputting . I follow the typical usage from the MS site : .. . .. . In another terminal window : .. . .. . And then back in the original terminal window : .. . .. . But I am getting the following warnings from UMDH .. . .. . When I make the second call to UMDH I get the same error and when I use UMDH to diff the two snapshots I do not get any useful output no stacks or backtraces . I have used UMDH on another computer and did not experience these same problems the other computer is no longer available for my use . The installation of UMDH is from the 32-bit version of Debugging Tools for Windows collection I am running a 32-bit version of WinXP Professional and my software is in C++ using Visual Studio 2008 . I have done a search on these warnings and have not found anything useful about them . Any help would be much appreciated . Comment : It appears the executing gflags in the same terminal as the executable appears to not give the warnings contrary to the example from MS and what I experienced on my previous computer . But I get the same warnings with our main app not OCES.exe which returns control to the terminal OCES.exe does not It locks the terminal . So I am assuming that the effects gflags might have limited scope . Is there a better way to approach the usage of gflags for an application that release control back to a terminal window Comment : gflags should affect the registry . You can check whether it worked using gflags i oces.exe which dumps the current settings . Use gflags with no params and you should load the GUI version you can check and set your EXE s flags this way too . Comment : @Steve . I will try this . If it does not work it might be our main app rather than UMDH . It is a fairly large code base with a number of COTS products so there might be something that gflags is not happy with . I am going to try some other leak tools like LeakDiag and DebugDiag . Thanks for all your help with getting a better understanding of UMDH Steve . Much appreciated .. . Answer : @Steve - I moved the topic slightly from OCES.exe our network engine to our main app but I am getting the same warnings please see my follow above for the details of the main main app . Its that same code base as OCES.exe it just adds other code . There is output in out1.txt like the following : .. . .. . This is slightly different than some of the output that I received on my previous computer : .. . .. . So I m assuming that I am missing that stack-trace information from out1.txt . I wonder if gflags has some limited scope on how it affects executables Comment : See my edit . btw - you can edit your own question with more data if you wish .", "Question : null .. . Answer : I am trying to figure out a memory leak using UMDH and I run into this issue where the displayed call stack is partial even though I got all the relevant symbols . as you can see it displays as-if the call originated in xerces although I have an EXE which loads a DLL which loads xerces and calls the transcode function . I should emphasize all the relevant symbols are loaded including microsoft ntdll etc . and that I am aware of the need to call the xerces release function for these allocated strings . I also tried to increase the stack-trace database as suggested in some places and it didn t help . Any ideas Thanks Comment : use ETW to capture a trace of the memory usage grow and analyze this : channel9.msdn.com Shows Defrag-Tools https : channel9.msdn.com Shows Defrag-Tools Defrag-Tools-49-WPT-Memory-Analysis-VirtualAlloc channel9.msdn.com Shows Defrag-Tools https : channel9.msdn.com Shows Defrag-Tools Defrag-Tools-154-Memory-Footprint-and-Leaks" ] }
[ "yes-answer-long", "yes-answer-short" ]
debugging
UNK_RELATION
gideros@iphone@93
gideros -- gideros studio allows developers to code in lua primary for developing games for @placeholder ipad and android writing once and running on many platforms .
{ "confidence": [ 57.20783615112305, 56.65694808959961, 50.25198745727539, 49.443992614746094, 48.69859313964844, 48.69859313964844, 48.035308837890625, 47.068729400634766, 46.91119384765625, 46.85649108886719, 46.85649108886719, 44.98454666137695, 44.184444427490234, 44.00617218017578, 43.00010299682617, 42.762569427490234, 42.56240463256836, 42.16822814941406, 41.74459457397461, 40.92655563354492, 40.679527282714844, 40.679527282714844, 39.203739166259766, 38.892127990722656, 38.892127990722656, 38.892127990722656, 38.50771713256836, 37.95338821411133, 37.88728332519531, 37.763389587402344, 37.416343688964844, 37.39725875854492, 37.054420471191406, 37.03815841674805, 36.847145080566406, 36.775840759277344, 36.67282485961914, 35.95842361450195, 35.95842361450195, 35.95842361450195, 34.38237380981445, 34.38237380981445, 34.17102813720703, 33.93315505981445, 33.16427993774414, 33.16427993774414, 33.16427993774414, 32.98525619506836, 31.740230560302734, 31.623607635498047, 31.5640811920166, 30.471153259277344, 30.335220336914062, 30.095840454101562, 29.920368194580078, 29.83620834350586, 29.832759857177734, 28.045360565185547, 28.045360565185547, 26.85959243774414, 25.984180450439453, 25.005855560302734, 24.788043975830078, 23.999797821044922, 23.691673278808594, 23.244272232055664, 23.14826202392578, 22.777790069580078, 22.379972457885742, 22.059410095214844, 22.04811668395996, 21.592021942138672, 21.360862731933594, 20.987274169921875, 20.5802001953125, 20.56622886657715, 20.56622886657715, 20.260719299316406, 20.175094604492188, 19.563440322875977, 19.53820037841797, 19.116310119628906, 18.377025604248047, 18.273067474365234, 17.964176177978516, 17.861238479614258, 17.63155174255371, 17.593061447143555, 17.387104034423828, 17.229747772216797, 17.175533294677734, 17.12061309814453, 16.891393661499023, 16.66065788269043, 16.50650978088379, 16.50650978088379, 16.50650978088379, 16.302919387817383, 16.196598052978516, 16.196598052978516 ], "content": [ "I am using Lua with Gideros", "gideros studio .", "Event.ENTER FRAME is called once for every frame Gideros runs .", "PS : I m not sure if this is a bug on Gideros .", "What game-engine is this gideros", "@Schollii : Yes its gideros .", "Apparently gideros has luasocket installed http : appcodingeasy.com Gideros-Mobile Using-LuaSocket-in-Gideros .", "I m creating a turn-based game in Gideros which uses Lua and I m running into a problem of recording the events of each actor .", "Gideros do that by default .", "Is it possible to use motion sensors with Gideros Mobile SDK", "Gideros supports Accelerometer Geolocation and Gyroscope so no problem there .", "I just begin to learning Gideros .", "I m looking for a way to play MP4 video in Gideros .", "I m trying a GTween example from the following link .. . .. . Gideros GTween with Easing http : appcodingeasy.com Gideros-Mobile Gideros-GTween-with-easing disqus thread .. . .. . The example doesn t work out of the box so I dug into the source code of GTween and added the following lines to my example in order to allow event dispatching .", "I don t know Gideros however you could use those events to store a Lua variable that indicates the touch-state .", "It seems that the constants are not set probably a bug but you can still use the values from here : http : docs.giderosmobile.com reference gideros Application setScaleMode Application : setScaleMode http : docs.giderosmobile.com reference gideros Application setScaleMode Application 3asetScaleMode .. . .. . As application : setScaleMode center .. . .. . But you can also set the value in the Gideros Studio project properties", "Here is what I have done so far.. . .. . .. . -Included the mobdebug and socket lua files in my project .. . .. . -Included a require mobdebug .start in main .. . .. . -Set ZeroBrane interpreter to Gideros .. . .. . -Started the ZeroBrane Debug Server .. . .. . -Set the Gideros player in Gideros Studio to the GiderosAndroidPlayer IP address .. . .. . -Pressed play in Gideros Studio .. . .. . The code uploads to the device but when it tries to connect to the Debug Server it comes back with a Connection Refused .", "There are mindbogglingly many : Corona SDK Moai Gideros Studio Unity 3D Google Sketchup ShiVa3D and anything I left out", "In my game using Lua and Gideros studio I want someone to draw a straight line from mouse down to mouse up .", "In my game that uses gideros studio I have a function that has multiple parameters .", "I am quite new to Gideros and game development as well .", "In Gideros I have am making use of a custom event to update the score .", "I am using Lua with gideros I have the text updating in OnEnterFrame method : .. . .. . but this way the next count is just displayed over the earlier one .", "Does Gideros or any other similar SDK offer this capability", "I have got Dispatched events in my gideros game .", "Someone on gideros forums helped me out thanks to Advert as well .", "PS : I m programming with Gideros Game Engine and I want to publish my app for Android .", "In Gideros studio box2d bodies which are basicly the physical object not the picture that goes with it always show up as a translucent shape .", "When you download Gideros there are built-in examples under Hardware section where you can both check the code and test run them on device", "Here are more specifics on that topic : http : appcodingeasy.com Gideros-Mobile Difference-between-content-logical-and-device-dimensions-in-Gideros-Mobile .. . .. . So if you are developing only for one specific resolution you can use Device dimensions otherwise it is suggested to use Logical dimensions with the scale mode you find suitable .", "In my Game using Gideros and Lua I want players to be able to draw a straight line from the point they touch the screen until the point they release .", "I run Gideros Studio under OpenSUSE 12.2 with Wine but i don t think its a matter because all stuff go well .", "i just tried with the latest gideros gtween https : github.com gideros GTween note that it is edited 10 days ago and use this sample i took the sample from your link and add sprite definition also include a image file in project and it works the callback is called :", "Gideros provides exactly such capability you just install Gideros Player on your device enter IP address on your computer and instantly run your app on device without any exporting or building just click play .", "I am trying to build a game it looked fine with the Gideros player but when I tried with an Android phone the background was way too small .", "In my game using Lua and Gideros studio I want someone to be able to draw a straight line with touch by making the beginning of the line where they touched the screen and the end of the line where they released .", "Why not if you look at the list of properties under Application class you will see in the docs there are orientation constants but there are no scaling constants as docs are generated directly from the code it means there are also no scaling constants in the code but there are orientation constants docs.giderosmobile.com reference gideros http : docs.giderosmobile.com reference gideros Application Application", "According to Gideros documentation Timer.delayedCall returns a Timer object which should be the table the error message is referring to .", "I don t know anything about gideros but I would also assume that should work .", "MovieClip http : docs.giderosmobile.com reference gideros MovieClip MovieClip appears to be entirely unsuitable for this purpose .", "http : docs.giderosmobile.com reference gideros Timer delayedCall .. . .. . I m not intimately familiar with Gideros but I believe you would want something closer to this : .. . .. . However this will presumably still fire with every ENTER FRAME event just that each change will be delayed randomly .", "Also after a little bit of Googling I noticed a TOUCHES MOVE and TOUCHES CANCEL event as well and the END event is called TOUCHES END for the Sprite library you might want to check up on those : .. . .. . http : docs.giderosmobile.com reference gideros Sprite Event.TOUCHES MOVE .. . http : docs.giderosmobile.com reference gideros Sprite Event.TOUCHES CANCEL .. . .. . Hopefully this will help you on your way .", "I m working with Gideros and I got the error but I don t know why and how to fix .", "I am using Lua with Gideros and having alert box to show up when back button is pressed.According to Gideros documentation when first button is pressed it returns index 1 but it does not really seem to work this way.I tested the app on my android phone.I realized the oncomplete function is not getting called at all since I tried using a print statement and even it was not executed so any idea why is is not getting called", "In Gideros which is a 2d game development engine box2d is a physics library which probably is external library and not internal to Lua there are function called edgeshape.new and Polygonshape.new what is the difference between two", "Here is a link-to my new question : stackoverflow.com questions 26110692 http : stackoverflow.com questions 26110692 lua-gideros-touble-drawing-line-with-touch BTW I would post screenshot but I don t have enough reputation .", "Here is part 2 of my question : stackoverflow.com questions 26370334 http : stackoverflow.com questions 26370334 lua-gideros-line-with-touch-2 Maybe you could answer", "I ve seen that you can do this in corona but I haven t seen anything about Gideros .", "I tried using above code in Gideros but it gives an error that bad argument 1 to setScaleMode string expected got nil at setScaleMode how can I fix this Actually It did not recognise Application.CENTER though according to Apress Lua game development It should .", "I am using Gideros and getting this error : .. . .. . I have this piece of code and as soon as the text is displayed it gives me the above mentioned error : How can I fix this", "However when I test it in Gideros it stores a string with the line plus a carriage-return which I don t need .", "You may also launch your application on the device from ZeroBrane Studio directly you can find the details in this Gideros forum post http : giderosmobile.com forum discussion comment 20903 .", "Basicallu what I am trying to do is change the speed of rotation randomly but since I do not want it to change at every second I tried using Timer.delayedCall in Gideros but it gives an error that says attempt to perform arithmetic on a table value : Lua error message .", "@Arturs Sosins : Thanks a ton yes I figured soon : Your book on Gideros Game development is my religion these day : D Thanks for such awesome explanations :", "I am writing for Android if it matters .", "But I managed to add them via code I m working with Gideros Game Engine : .. . .. . It works for now at least with administrator accounts which is what I was trying to do .", "I am fairly new to Gideros and do not totally understand the changes that needs to be made while I create a class.A short quick explanation is really required Please", "On Gideros I set the Logical Dimensions to 720x1080 with Scale Mode Letterbox and when I test it on the emulator with the same resolution it looks good with no bars at the top and bottom or at the sides .", "Something like local ev Event.new GridLetterDown ev.letter letter ev.x event.x ev.y event.y ev.target self self : dispatchEvent ev I think this should work -- but I can t say for sure since I m not familiar with Gideros", "I ve been trying to use the ZeroBrane Debug Server to debug my app developed using Gideros while testing in the GiderosAndroidPlayer using the various examples available on the web and those which come in the ZeroBrane samples .", "I m developing an app which I added to My Apps on facebook developers .", "I am using LUA with Gideros.It has TOUCHES BEGIN and TOUCHES ENDS but are dispatch only once when the user touches and untouch the screen .", "To create a joint you usually need two bodies but what if you would to attach body through joint to some random position in the air or dynamic position as mouse cursor well you can do it by creating dummy physics object Here is an example : http : appcodingeasy.com Gideros-Mobile Dragging-Box2d-object-in-Gideros-Mobile .. . .. . In case of your example then this body is used for EdgeShape which is usually an arbitrary shape used for creating world boundaries or in this case simply ground so the dynamic object won t fall outside the screen", "Lua is normally embeded in to something what environment are you running in", "OK I found an answer on the Gideros Mobile forums : http : giderosmobile.com forum discussion 4393 stuck-with-simple-custom-event p1 .. . .. . There user ar2rsawseen indicates that the sender and receiver must communicate via some common object not sure about the how or why but it works so the following code actually worked for me : .. . .. . And the sender of the event :", "lua-users.org wiki ObjectOrientationTutorial http : lua-users.org wiki ObjectOrientationTutorial", "Actually 1 x is not even valid Lua .", "I am a noob in Lua .", "I am using Gideros Here is the code that I have to check for collisions but what is really happening is collision is printed only 3 times since there are only 3 members in groupA I want to check collisions with all 3 but obviously as long as game is running so how can I check for every collision that my second sprite cute happens to have with any of the 3 objects grouped in groupA", "While it will not help you create a game on Android immediately the concepts inherent in all games remain the same .", "Pure Lua doesn t know anything about touch-events .", "I need a method in Lua .", "It s because it is Event.MOUSE DOWN Lua is case sensitive .", "What i need to do it with Lua", "If you were to run the above code without it it would just run through the code once the ball will move and then the ball will cease to move .", "edit - Global variables are usually considered as something bad in Lua but in this case it would help you out a big deal .", "If I am understanding you correctly you may consider using the lua version of classes .", "new those are Lua tutorials and has no explanation for box2d concepts .", "I need it to build a simple login page with lua .", "Any piece of code link-to tutorial example will be helpful .", "I m currently using giderous studio to make a tower defense game .", "Here s an example : http : giderosmobile.com forum discussion comment 13692 Comment 13692 .. . .. . Work with desktop simulator set with your logical dimensions if what is better for your and change resolutions of the Desktop player to see how spaces appear and what BG pics may cover it .. . .. . Another confusion may be that by scaling in center 0 0 coordinate is not in the left top position anymore thus having spaces So what if I want to position object in the corner completely Then as you did ignore scaling by calculating the real offsets .. . .. . http : appcodingeasy.com Gideros-Mobile Ignore-Automatic-Screen-Scaling-when-positioning-objects .. . .. . Hope that helps :", "I want TOUCHES ENDS event to be dispatched until user touches the screen how ever it is dispatched only once when the touch is removed for example I want my player to be running continuously while the user is not touching the screen and need to do something else when user touches the screen .", "Assuming the code is running in a loop you then simply have the player walk when the global touching variable is set to false and do something else when that variable evaluates to true .", "Once you have fixed this you ll notice that youLoose is defined after that for-loop when you call youLoose it is not yet defined .", "It must be compatible with both Android and iOS but does not necessarily have to be a single solution that covers both .", "Basically it all brings down to these points : .. . .. . 1 Choose the scaling mode that is proper for your game Letterbox being most popular .. . .. . 2 Choose logical dimensions for your game and create all the graphics for logical dimensions you set in the project properties recommended 480x800 or 640x960 .. . .. . 3 Create backgrounds a little more bigger than logical dimensions to cover whitespaces on devices with different ratios .. . .. . 4 Use absolute positioning http : appcodingeasy.com Gideros-Mobile Ignore-Automatic-Screen-Scaling-when-positioning-objects for objects that need to stick to sides of the screen as on screen buttons for example .. . .. . 5 Optionally prepare bigger graphics in in some fixed ratio coefficient and use Automatic Image Resoltuion feature to automatically load them for bigger devices .. . .. . More information available here : http : members.giderosmobile.com knowledgebase.php action displayarticle id 79 http : members.giderosmobile.com knowledgebase.php action displayarticle id 79 .. . .. . Addition : Difference between device and logical dimensions .. . .. . Device dimensions is exactly what device has .", "Is there anyone who knows lua and box2d well enough to tell me how to do this", "I have this piece of code .", "my code have many bodies in on timer function every second for example : .. . .. . I want remove any body on click .", "However the code doesn t run as expected .", "When you run your application on the device it makes a call to ZeroBrane Studio to start debugging but it needs to have IP address of the computer running ZBS for this call to work .", "could You please fix Your code indentation", "So I guess there should be some way to store the database in files or just not commit all the writing transaction in the database", "I have above piece of code and my question is why Event.ENTER FRAME here", "Are you doing anything else with LooserText somewhere else in the code", "Where did you try putting the removeChild please show in code .", "I have the following code for the receiver of the event some lines left out for brevity : .. . .. . And this is the code that triggers the event : .. . .. . However the function registered as the listener above is never reached .", "However the app crashes .", "I tried commenting the following line in gtween.lua .. . .. . and the app doesn t crash however the callbacks aren t invoked obviously why would it" ] }
{ "confidence": [ 67.58622741699219, 64.81834411621094, 64.81790924072266, 61.47333526611328, 61.4251594543457, 61.15944290161133, 57.91175079345703, 57.06654357910156, 56.872859954833984, 55.096290588378906, 53.995670318603516, 53.64276885986328, 53.55371856689453, 52.77113342285156, 52.15373992919922, 51.55567169189453, 50.169254302978516, 49.68062973022461, 49.04111099243164, 48.39549255371094 ], "content": [ "Question : I need a method in Lua . This method should work like post and get methods which exist in php . I need it to build a simple login page with lua . What i need to do it with Lua Thanks in advance Comment : Lua is normally embeded in to something what environment are you running in Comment : gideros studio . Comment : I don t know it but have you looked at the URLLoader Class giderosmobile.com forum discussion comment 10127 Comment 10127 http : www.giderosmobile.com forum discussion comment 10127 Comment 10127 Comment : There is no post and get methods in php . You are referencing to the variables . .. . Answer : What about using Luasockets http : w3.impa.br diego software luasocket http.html Apparently gideros has luasocket installed http : appcodingeasy.com Gideros-Mobile Using-LuaSocket-in-Gideros .", "Question : I tried using above code in Gideros but it gives an error that bad argument 1 to setScaleMode string expected got nil at setScaleMode how can I fix this Actually It did not recognise Application.CENTER though according to Apress Lua game development It should . Comment : Shouldn t it be Application : setScaleMode Comment : No No Not that .. . Answer : It seems that the constants are not set probably a bug but you can still use the values from here : http : docs.giderosmobile.com reference gideros Application setScaleMode Application : setScaleMode http : docs.giderosmobile.com reference gideros Application setScaleMode Application 3asetScaleMode .. . .. . As application : setScaleMode center .. . .. . But you can also set the value in the Gideros Studio project properties Comment : @ArtursSosins : If it was that way then I should not be able to set orientation either but I was . Comment : Why not if you look at the list of properties under Application class you will see in the docs there are orientation constants but there are no scaling constants as docs are generated directly from the code it means there are also no scaling constants in the code but there are orientation constants docs.giderosmobile.com reference gideros http : docs.giderosmobile.com reference gideros Application Application", "Question : Is it possible to use motion sensors with Gideros Mobile SDK Any piece of code link-to tutorial example will be helpful . I am writing for Android if it matters . .. . Answer : Gideros supports Accelerometer Geolocation and Gyroscope so no problem there . When you download Gideros there are built-in examples under Hardware section where you can both check the code and test run them on device", "Question : I ve been trying to use the ZeroBrane Debug Server to debug my app developed using Gideros while testing in the GiderosAndroidPlayer using the various examples available on the web and those which come in the ZeroBrane samples . Here is what I have done so far.. . .. . .. . -Included the mobdebug and socket lua files in my project .. . .. . -Included a require mobdebug .start in main .. . .. . -Set ZeroBrane interpreter to Gideros .. . .. . -Started the ZeroBrane Debug Server .. . .. . -Set the Gideros player in Gideros Studio to the GiderosAndroidPlayer IP address .. . .. . -Pressed play in Gideros Studio .. . .. . The code uploads to the device but when it tries to connect to the Debug Server it comes back with a Connection Refused . I have tried this on both Windows and Mac computers disabling firewalls and checking the Debug Server port is open . I have tried specifying localhost and the specific ip-address for the debug server in the ZeroBrane settings file and changing the port-number . I think I am now thoroughly stuck and would really appreciate any help you can give as I am now at a point where I need to debug the impact of rotating the device . Thanks Comment : if using localhost try with your IPAddress instead of Localhost .. . Answer : instead of localhost or ZeroBrane Server into your IPAddress its work 100 .. . .. . enter image description here http : i.stack.imgur.com clnTQ.png", "Question : I ve been trying to use the ZeroBrane Debug Server to debug my app developed using Gideros while testing in the GiderosAndroidPlayer using the various examples available on the web and those which come in the ZeroBrane samples . Here is what I have done so far.. . .. . .. . -Included the mobdebug and socket lua files in my project .. . .. . -Included a require mobdebug .start in main .. . .. . -Set ZeroBrane interpreter to Gideros .. . .. . -Started the ZeroBrane Debug Server .. . .. . -Set the Gideros player in Gideros Studio to the GiderosAndroidPlayer IP address .. . .. . -Pressed play in Gideros Studio .. . .. . The code uploads to the device but when it tries to connect to the Debug Server it comes back with a Connection Refused . I have tried this on both Windows and Mac computers disabling firewalls and checking the Debug Server port is open . I have tried specifying localhost and the specific ip-address for the debug server in the ZeroBrane settings file and changing the port-number . I think I am now thoroughly stuck and would really appreciate any help you can give as I am now at a point where I need to debug the impact of rotating the device . Thanks Comment : if using localhost try with your IPAddress instead of Localhost .. . Answer : The way remote debugging works requires you to specify address of the computer you device needs to connect to . When you run your application on the device it makes a call to ZeroBrane Studio to start debugging but it needs to have IP address of the computer running ZBS for this call to work . You only need to specify this in the start call : .. . .. . When the application is started on the device you should see it suspended with the current line marker green arrow pointing to the next executable line after the start call . You may also launch your application on the device from ZeroBrane Studio directly you can find the details in this Gideros forum post http : giderosmobile.com forum discussion comment 20903 .", "Question : I want TOUCHES ENDS event to be dispatched until user touches the screen how ever it is dispatched only once when the touch is removed for example I want my player to be running continuously while the user is not touching the screen and need to do something else when user touches the screen . Please Comment : Pure Lua doesn t know anything about touch-events . What library framework are you using Comment : @hugomg : My apologies I did not mention . I am using LUA with Gideros.It has TOUCHES BEGIN and TOUCHES ENDS but are dispatch only once when the user touches and untouch the screen . .. . Answer : I don t know Gideros however you could use those events to store a Lua variable that indicates the touch-state . For example when the TOUCHES BEGIN event is fired set a global variable named touching to true . When the TOUCHES END event is fired you could then set that global variable to false . Assuming the code is running in a loop you then simply have the player walk when the global touching variable is set to false and do something else when that variable evaluates to true . Also after a little bit of Googling I noticed a TOUCHES MOVE and TOUCHES CANCEL event as well and the END event is called TOUCHES END for the Sprite library you might want to check up on those : .. . .. . http : docs.giderosmobile.com reference gideros Sprite Event.TOUCHES MOVE .. . http : docs.giderosmobile.com reference gideros Sprite Event.TOUCHES CANCEL .. . .. . Hopefully this will help you on your way . edit - Global variables are usually considered as something bad in Lua but in this case it would help you out a big deal .", "Question : Basicallu what I am trying to do is change the speed of rotation randomly but since I do not want it to change at every second I tried using Timer.delayedCall in Gideros but it gives an error that says attempt to perform arithmetic on a table value : Lua error message . How can I fix this .. . Answer : According to Gideros documentation Timer.delayedCall returns a Timer object which should be the table the error message is referring to . http : docs.giderosmobile.com reference gideros Timer delayedCall .. . .. . I m not intimately familiar with Gideros but I believe you would want something closer to this : .. . .. . However this will presumably still fire with every ENTER FRAME event just that each change will be delayed randomly . You may want to use a control variable so that only one Timer can be pending : Comment : Thank you so much . It worked Thanks a ton Comment : I got your point but don t you think timerpending will just add an extra condition check since the above code delayed the rotation randomly or may be I am not able to understand the fine purpose of timerpending", "Question : In my game using Lua and Gideros studio I want someone to be able to draw a straight line with touch by making the beginning of the line where they touched the screen and the end of the line where they released . When I run my code below I always get this message : .. . .. . main.lua : 66 : attempt to index global event a nil value stack traceback : main.lua : 66 : in main chunk .. . .. . Here is my code : .. . .. . This next line is line 66 in my code : .. . .. . Anybody know why this is happening Thanks .. . Answer : It s because it is Event.MOUSE DOWN Lua is case sensitive . Comment : I did that and it fixed that problem . Now it is saying : main.lua : 66 : index userdata cannot be found stack traceback : main.lua : 66 : in main chunk Comment : open a new question with the proper information such as full stack-trace message and show the scene line so we can check how you created the scene Comment : Here is a link-to my new question : stackoverflow.com questions 26110692 http : stackoverflow.com questions 26110692 lua-gideros-touble-drawing-line-with-touch BTW I would post screenshot but I don t have enough reputation . Sorry", "Question : I m trying a GTween example from the following link .. . .. . Gideros GTween with Easing http : appcodingeasy.com Gideros-Mobile Gideros-GTween-with-easing disqus thread .. . .. . The example doesn t work out of the box so I dug into the source code of GTween and added the following lines to my example in order to allow event dispatching . However the app crashes . I tried commenting the following line in gtween.lua .. . .. . and the app doesn t crash however the callbacks aren t invoked obviously why would it This is the stack-trace from the app . Any pointers would be greatly appreciated . Thanks . PS : I m not sure if this is a bug on Gideros . .. . Answer : i just tried with the latest gideros gtween https : github.com gideros GTween note that it is edited 10 days ago and use this sample i took the sample from your link and add sprite definition also include a image file in project and it works the callback is called : Comment : Hi I tried by copying the example and it worked not sure why it didn t work before . Thanks for your time .", "Question : null .. . Answer : I am a noob in Lua . I just begin to learning Gideros . I have implement a simple program that use Isqlite3 to open a database create-table and insert some record select them and dispaly the result . All these function work good . But there is a problem . After I finish running the program and relaunch the program with the same database name it load a new pure database that does not have any record in there.. . Basically the database should the previous record and tables . But that is pure everytime . So I guess there should be some way to store the database in files or just not commit all the writing transaction in the database Comment : Show your code .", "Question : I need a method in Lua . This method should work like post and get methods which exist in php . I need it to build a simple login page with lua . What i need to do it with Lua Thanks in advance Comment : Lua is normally embeded in to something what environment are you running in Comment : gideros studio . Comment : I don t know it but have you looked at the URLLoader Class giderosmobile.com forum discussion comment 10127 Comment 10127 http : www.giderosmobile.com forum discussion comment 10127 Comment 10127 Comment : There is no post and get methods in php . You are referencing to the variables . .. . Answer : If you want it to act as a web server you will probably need something like Xavante . Other than that beforementioned luasockets has some HTTP functions you should look at its documentation .", "Question : null .. . Answer : I m looking for a way to play MP4 video in Gideros . It must be compatible with both Android and iOS but does not necessarily have to be a single solution that covers both . The API provides some MovieClip class but I m not sure if or how it can be used to play MP4 or if an MP4 can be converted to whatever format MovieClip expects . Any guidance much appreciated . Comment : MovieClip http : docs.giderosmobile.com reference gideros MovieClip MovieClip appears to be entirely unsuitable for this purpose .", "Question : I am using Lua with Gideros and having alert box to show up when back button is pressed.According to Gideros documentation when first button is pressed it returns index 1 but it does not really seem to work this way.I tested the app on my android phone.I realized the oncomplete function is not getting called at all since I tried using a print statement and even it was not executed so any idea why is is not getting called Comment : How does it work What are you getting there instead Are you getting anything there If not what is happening Comment : @EtanReisner : Actually nothing happens Alert dialog shows up and when I click on it no event is dispatching.nothing happens Comment : Does the COMPLETE event fire on the stage or does it fire on the alertDialog Comment : on alert box only Comment : Then should you be adding the listener on stage or on alertDialog .. . Answer : As per the conversation the issue was that the event-listener for the alert box close event was being attached to the stage instead of the alert dialog . stage : addEventListener Event.COMPLETE oncomplete .. . .. . instead of .. . .. . alertDialog : addEventListener Event.COMPLETE oncomplete", "Question : In my game using Lua and Gideros studio I want someone to draw a straight line from mouse down to mouse up . Here is my code that doesn t work : .. . .. . Anybody know why this isn t working Thanks This is part 2 of my other question . .. . Answer : If you by not working you mean that nothing is happening and nothing is drawn on the screen then it is because you did not add your shape to the stage hiearchy .. . .. . It should be like this : Comment : THANK YOU SO MUCH It finally works I am really glad since this was keeping me from continuing with my app", "Question : In Gideros studio box2d bodies which are basicly the physical object not the picture that goes with it always show up as a translucent shape . In my game i don t want players to be able to see these bodies . I ve seen that you can do this in corona but I haven t seen anything about Gideros . Is there anyone who knows lua and box2d well enough to tell me how to do this Thanks Comment : sounds like you have physics debug drawing enabled Comment : Thanks I was editing an example that I downloaded and I didn t see that part of the code . .. . Answer : If it is really debug drawing then click on top menu Edit choose Find in files and search for DebugDraw .. . .. . You should find something like : .. . .. . Just comment out the line --stage : addChild debugDraw and you are good to go . Remove setting debug draw completely for production for better performance .. . .. . You can setup some global variable debug and toggle it to enable disable debug drawing : .. . .. . and then later in your code", "Question : I have this piece of code . In this example If I replace Graphic with self at Graphic : setAnchorPoint and Graphic : setRotation the image appears on screen but does not rotate . What is the reason I am fairly new to Gideros and do not totally understand the changes that needs to be made while I create a class.A short quick explanation is really required Please I am using Lua with Gideros Comment : Probably second occurence of Graphic should also be replaced with self in self : setRotation Graphic : getRotation + 5 Comment : @EgorSkriptunoff : That is okay I made that change but the point is I want to now why does that work with Graphic : setRotation only and not self : setRotation .. . Answer : In your case Graphic is an instance of Bitmap which you want to manipulate while self is referencing to the instance of the class you are in which in your case is WatchHands .. . .. . If you rotate Graphic then only Graphic should rotate but if you rotate WatchHands then all children of it including Graphic should rotate . You can put a print in the ENTER FRAME event like print Angle : self : getRotation to see if the angle of self is actually increasing or you are having some other error in your code", "Question : I am using Lua with gideros I have the text updating in OnEnterFrame method : .. . .. . but this way the next count is just displayed over the earlier one . If I do .. . .. . self : removeChild text7 the text is not displayed at all . Where should I be removing the last count so that only the updated count is displayed Comment : Where did you try putting the removeChild please show in code . Comment : @Schollii : I just needed to used setText instead of removing the child.Fixed now : Thanks .. . Answer : It should be : .. . .. . And then later inside ENTER FRAME event :", "Question : In Gideros I have am making use of a custom event to update the score . I have the following code for the receiver of the event some lines left out for brevity : .. . .. . And this is the code that triggers the event : .. . .. . However the function registered as the listener above is never reached . .. . Answer : OK I found an answer on the Gideros Mobile forums : http : giderosmobile.com forum discussion 4393 stuck-with-simple-custom-event p1 .. . .. . There user ar2rsawseen indicates that the sender and receiver must communicate via some common object not sure about the how or why but it works so the following code actually worked for me : .. . .. . And the sender of the event :", "Question : I am quite new to Gideros and game development as well . I am trying to build a game it looked fine with the Gideros player but when I tried with an Android phone the background was way too small . I changed its properties to autoscaling so as to fit in with the width . The background now fits in the width but other objects seem to go to absurd locations . Though I was using W application : getDeviceWidth H application : getDeviceHeight and while setting up the location used W 2 and H 2 instead of hardcoding it . However this object that seems to shift to rightmost bottom end in landscape left mode was right at its center if I do not apply fit width property . What can I do to fix it .. . Answer : You should use W application : getContentWidth H application : getContentHeight which would return logical dimensions that are used when in scaling mode . Basically it all brings down to these points : .. . .. . 1 Choose the scaling mode that is proper for your game Letterbox being most popular .. . .. . 2 Choose logical dimensions for your game and create all the graphics for logical dimensions you set in the project properties recommended 480x800 or 640x960 .. . .. . 3 Create backgrounds a little more bigger than logical dimensions to cover whitespaces on devices with different ratios .. . .. . 4 Use absolute positioning http : appcodingeasy.com Gideros-Mobile Ignore-Automatic-Screen-Scaling-when-positioning-objects for objects that need to stick to sides of the screen as on screen buttons for example .. . .. . 5 Optionally prepare bigger graphics in in some fixed ratio coefficient and use Automatic Image Resoltuion feature to automatically load them for bigger devices .. . .. . More information available here : http : members.giderosmobile.com knowledgebase.php action displayarticle id 79 http : members.giderosmobile.com knowledgebase.php action displayarticle id 79 .. . .. . Addition : Difference between device and logical dimensions .. . .. . Device dimensions is exactly what device has . Meaning on an iPhone 3GS it will return width as 320 .. . .. . But logical dimensions are exactly what you set in your project properties . No matter what resolution you have the logical dimensions will always be the same . They basically will be scaled based on the scale mode you choose . Here are more specifics on that topic : http : appcodingeasy.com Gideros-Mobile Difference-between-content-logical-and-device-dimensions-in-Gideros-Mobile .. . .. . So if you are developing only for one specific resolution you can use Device dimensions otherwise it is suggested to use Logical dimensions with the scale mode you find suitable . Comment : @ArtursSosins : Thank you so much but could you please throw some light on what exactly is the difference between logical dimensions and otherwise I mean if I have the device width and I am using fir to width then I think I should be getting images that exactly fit to the screen of device no How does logical dimensions or application : getContentWidth make any difference here please Comment : I ve updated my answer Comment : Thanks a ton :", "Question : It is very time-consuming to build an application copy the apk on the device install it and run it just because you want to change the value of a variable . Is there any way to run an application straight to the phone like in Unity Does Gideros or any other similar SDK offer this capability I read that ZeroBrane offers on device debugging but I didn t find any more tutorial information how can you do it . .. . Answer : Gideros provides exactly such capability you just install Gideros Player on your device enter IP address on your computer and instantly run your app on device without any exporting or building just click play . Additionally with combination of ZeroBrane you can achieve live coding http : bowerhaus.eu blog files live coding.html" ] }
[ "yes-answer-long", "yes-answer-short" ]
iphone
UNK_RELATION
ddrmenu@provider@30
ddrmenu -- ddrmenu is a menu @placeholder for dotnetnuke that allows a skin to have its own template for the menu markup .
{ "confidence": [ 62.14104080200195, 56.591819763183594, 55.89347457885742, 52.61285400390625, 51.0406608581543, 48.63942337036133, 48.56220245361328, 48.384307861328125, 48.375221252441406, 42.11815643310547, 42.0569953918457, 40.832359313964844, 40.16819763183594, 40.05390930175781, 39.232200622558594, 39.042724609375, 37.660369873046875, 37.17216110229492, 37.133888244628906, 36.062721252441406, 35.95793151855469, 35.424072265625, 33.83436965942383, 33.83436965942383, 32.96247100830078, 32.12063980102539, 29.414379119873047, 29.2235164642334, 28.96308708190918, 28.272676467895508, 27.971158981323242, 27.55807113647461, 27.286754608154297, 27.286754608154297, 26.512155532836914, 26.224058151245117, 26.00189781188965, 25.621309280395508, 25.621309280395508, 25.621309280395508, 25.621309280395508, 25.36701202392578, 25.36701202392578, 24.74034881591797, 24.46196174621582, 24.33645248413086, 24.18647003173828, 24.08345603942871, 23.808944702148438, 23.73785400390625, 23.37796401977539, 23.37796401977539, 23.37796401977539, 23.37796401977539, 22.385517120361328, 22.09310531616211, 22.004985809326172, 20.70473861694336, 20.70473861694336, 20.70473861694336, 20.392377853393555, 19.40746307373047, 19.180192947387695, 19.180192947387695, 19.180192947387695, 18.642745971679688, 18.584136962890625, 18.316869735717773, 17.642410278320312, 17.642410278320312, 17.6126766204834, 17.6126766204834, 14.707014083862305, 14.707014083862305, 14.654725074768066, 14.654725074768066, 14.654725074768066, 14.654725074768066, 14.654725074768066, 14.654725074768066, 14.450830459594727, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281, 12.717964172363281 ], "content": [ "I m trying to create a menu with an image in the center using DDRMenu Menu Token template see link http : www.dnnsoftware.com wiki page DDRMenu-token-templates .", "DDRMenu just builds its menu from the Tabs table in the DNN database .", "A good resource for DDRMenu template examples is this .", "I m developing a breadcrumb for DotNetNuke 7 using the DDRMenu XSLT Templates .", "I would imagine that this is a bug limitation of the DDRMenu though it could be something that might just need to be tweaked in the settings for DDRMenu within the skin .", "I m using DNN 7.1.2 with DDRMenu .", "Have you tried using the NodeSelector option in the DDRMenu", "You might try another skin that doesn t use DDRMenu search for MultiFunction in the forge and you ll find my OpenSource skin .", "I have my own DNN7 skin based on Twitter Bootstrap 3 which utilizes a DDRMenu .", "A single submenu item looks like this : .. . .. . My skin is using the ULTokens.txt method for creating a DDRMenu .", "This is my code .. . .. . Here are some tokens that can be used for DDRMenu :", "Example below : .. . .. . This resource http : www.dotnetnuke.com Resources Wiki Page DDRMenu-reference-guide.aspx IncludeHidden 5 http : www.dotnetnuke.com Resources Wiki Page DDRMenu-reference-guide.aspx IncludeHidden 5 says : .. . .. . IncludeHidden .. . .. . For DotNetNuke 6 only if set to true hidden pages will be included .", "I am writing a DDRMenu template using xsl and I wonder how I can pass the current tabID into the xsl template .", "Usually the Menu.ascx in DDRMenu inherits from the DDRMenu SkinObject : .. . .. . Since you are talking about changing the code-behind I guess that you are using a custom control that embeds the Menu.ascx .", "Right now the DNN site is using DDRMenu http : dnnddrmenu.codeplex.com for the navigation .", "I am having problems trying to get the following XSLT template for the DotNetNuke DDRMenu to spit out the last page node of the breadcrumb for the following conditions : .. . .. . the last page is NOT Include d in the Menu in its page settings .. . however the last page is a child of the the parent node which does show up in my output .. . .. . How do I get the page not included in the menu to be outputted at the end of my breadcrumb from the following XSL template", "I think DNN and DDRmenu handles the components in the program thus I don t have to create a seperate XML to operate it .", "Show all CHILDREN of CHILDREN Fund Offerings .. . .. . The existing template is located here : http : bit.ly 1MH2fgW .. . .. . The DDR Menu guide http : www.dnnsoftware.com wiki ddrmenu-xslt-templates doesn t comprehensively tell me how to create a template so any help would be appreciated .", "I am creating my own custom menu in DNN using the DDR Menu token template .", "The blue tree menu below it is the DDR Menu with TreeView template .", "I ve added a new menu to our skin that loads a different menu style and shows only a special submenu .", "Issue : By default the menu template is showing the main parent menu links with private markets highlighted as the active menu .", "Try the following : .. . .. . Include the DDRMenu assembly in your current project because it won t load the type if it doesn t find the assembly then rewrite the include to kick the designer into motion .", "https : github.com MarkXA ddrmenutemplates .. . .. . The full set of xslt node attributes are documented here http : www.dnnsoftware.com wiki ddrmenu-xslt-templates .", "I m using DDRMenu in DotNetNuke to select a menu node from my site structure and display only a subnode in a specific navigation in my template .. . .. . Now I want to be able to set the NodeSelector attribute in the code-behind file because I want to be able to dynamically set the value on Page Load .. . .. . But this doesn t work as there is no NodeSelector attribute on System.Web.UI.UserControl .", "I don t know anything about index you could hack a bit by using Keywords .. . .. . If you really need the index I think you should use xslt version with position see http : www.dnnhero.com Premium Tutorial tabid 259 ArticleID 12 Beginning-XSLT-with-DDRMenu-for-DotNetNuke-Part-2.aspx", "Short of creating my own menu provider and abovementioned workarounds is there any easy way to use glyphicons for menu items", "I am creating a menu using ULTOKENS in DNN .", "This loads from the directory .. . .. . DNN-INSTALL Portals default Skin mySkin MenuProfile .. . .. . The menu loads just fine in my development-environment .", "I can t figure out how where-in the template to specify that this menu should do the following : .. . .. . 1 .", "In my menu I would like the menu link of the page that I am currently in to be selected .", "For example NodeSelector RootChildren displays children of the currently selected root menu item .", "Can you load a different menu style successfully", "in my packaging prozess the menudef.xml got lost for the menu .", "I would like to recreate this menu for all pages on the site so that the menu is dynamically updated from the CMS instead of having to be updated manually in the HTML .", "Let s say I have 6 items in my menu root I have to add a class to the fourth item for the margin .", "Below is the Example XML the menu component uses", "Is there another setting somewhere to force the menu to use what s in the Page URL field", "I haven t modified any code related to the menu or URLs .", "Couldn t load menu style MenuProfile : System.ArgumentException : Illegal character in path .", "Use the module version of the DDR menu and drop it on an empty page .", "To do that I have to create an empty space where the image will be by adding a margin to the item number X of my menu .", "URL : http : bit.ly 1Lqi1io .. . .. . Brief : On the example URL I have a Static orange menu using the DNN HTML module .", "I tried the following code and it threw an exception .. . .. . Here is a copy of the xslt with your suggestion in it : http : pastebin.com gANkhz2g .. . .. . The menu is the standard menu : .. . .. . I honestly do not know the xml that is produced by that control .", "Isn t that the same menu system using Font Icons", "Included the example XML of the menu component in case you need it for reference .", "What I have in my breadcrumbs now is : .. . .. . News Publications is a subpage of my menu and what I m trying to achieve is to show the rootlevel .. . .. . Here is my XSLT Template .. . .. . This is the input XML .", "You could create a custom module or skin object that administrators could use to assign an icon saved as a tab page setting but that would be outside of the main page settings and you wouldn t be able to access it from the menu template you d need to switch your menu to a Razor template so that you can execute arbitrary code and retrieve tab page settings .", "I n most cases you won t need to create your own template .", "I have already tried everything in the documentation but whenever I add anything to the Node Expression to specify the starting level the entire menu disappears .", "This can be useful for creating separate menus to show site sections that are hidden from the main menu .", "But when I change languages the menu isn t using the value in the Page URL field of the page settings .", "You should spend some time reading the DNN Wiki pages related to the DDR menu .", "If you take away the NodeSelector attribute the menu should show the entire set of pages .", "Adding IncludeHidden true to the skin object tag fixed the problem .", "Hi Tim however the first page on my menu is not home but a page on getting started .", "I ve tried to set this up the same for the other languages but the menu isn t using the page urls I ve set up instead using the default URL for the page .", "The problem was that my ascx skin object tag was missing an attribute setting to allow hidden pages to be output .", "Now I ve packaged the skin and deployed it with installing it in Host Extensions and the files are deployed on the server .", "Make sure that the skin is really in the same relative directory structure as in your development-environment .", "The MegaMenu template is also approachable .", "Here is a basic template : .. . .. . Is there a way to know the index of the item", "You could just set up a WebService that gives you the menu structure and you could rebuild your MVC navigation based on this .", "Haven t looked into linked site too much yet but seems it uses font-awesome and is more about the menu itself than about setting icons for pages .", "It s a shame that the menu is behind on the times using images will be blurry on non-retina unless you load twice the size or detect retina with js and so forth .", "I highly recommend using the ULTokens template for your explorations .", "If the priority for these icons gets high enough I can consider creating a skin object or module for this since we have more of those anyways .", "I have been using the sample template provided by DNN and I just made changes in the XSLT .", "example of expanded menu http : i.stack.imgur.com RDlbP.png .. . .. . The image is a mockup using just the default Twitter Bootstrap .navbar-fixed-top http : getbootstrap.com components navbar-fixed-top .", "The only non-option for sticking with glyphicons that I currently see is to use Javascript to inject them into the menu run time but I feel dirty for even only suggesting that .", "You can also use the DumpXml template to show exactly what is available to the templates .", "Can anyone provide an example on how to pass dynamic attributes into the xsl template files .", "Alf I have updated my question with links to the xslt and information about the control .", "I have DNN bin DotNetNuke.Web.DDRMenu.dll as reference in my project and in the code-behind using DotNetNuke.Web.DDRMenu is set .", "I want to check the depth of the page so that it only displays the child pages of the current page the user is in .", "Is it possible to check the Depth of the page using the DEPTH TOKEN and how do I go about doing it", "Thanks .", "You use NodeSelector to determine which pages are displayed .", "Thare are many other ways tomselect pages .", "See the DNN Wiki at dnnsoftware.com .", "What I am suspecting is happening is that your control type is not loaded correctly by the designer and that it falls back on the UserControl type which doesn t have the NodeSelector property .", ":", "Why was this downvoted", "I found out that my XSLT code is fine .", "I need to know if the previous node was a @selected node .", "I need to basically mark the next following node if it exists with a special css class .", "xsl : if test preceding-sibling : : 1 @selected next xsl : if", "That added next to the selected node and everything after it .", "If you post an actual stylesheet and example XML it ll be easier to test .", "Without seeing the XML I can t say for sure but I suspect this is what you re looking for : xsl : if test preceding-sibling : : node 1 @selected 1 next xsl : if", "Use preceding-sibling : : node 1 to select the first in reverse order preceding sibling named node :", "I m having trouble to add that class .", "Thanks for any help", "Using XSLT seems a better option since the keywords can be changed in the CMS .", "Thx", "I ve just localized my DNN website into 3 languages and for the default language I ve set up custom Page URLs for most of the pages in the Page Settings field .", "What I m after is site.com de page-name .", "What I m getting is site.com de Parent-Page Child-Page .", "The url site.com de page-name loads fine when I access it directly .", "Please add some code so we can see what you might be doing wrong ." ] }
{ "confidence": [ 93.44789123535156, 79.9130859375, 73.51358032226562, 66.20067596435547, 64.67282104492188, 63.84141159057617, 63.70510482788086, 62.73176956176758, 62.47062683105469, 60.360836029052734, 40.821739196777344, 28.242023468017578, 24.462413787841797 ], "content": [ "Question : I am having problems trying to get the following XSLT template for the DotNetNuke DDRMenu to spit out the last page node of the breadcrumb for the following conditions : .. . .. . the last page is NOT Include d in the Menu in its page settings .. . however the last page is a child of the the parent node which does show up in my output .. . .. . How do I get the page not included in the menu to be outputted at the end of my breadcrumb from the following XSL template : Comment : Why was this downvoted .. . Answer : I found out that my XSLT code is fine . The problem was that my ascx skin object tag was missing an attribute setting to allow hidden pages to be output . Adding IncludeHidden true to the skin object tag fixed the problem . Example below : .. . .. . This resource http : www.dotnetnuke.com Resources Wiki Page DDRMenu-reference-guide.aspx IncludeHidden 5 http : www.dotnetnuke.com Resources Wiki Page DDRMenu-reference-guide.aspx IncludeHidden 5 says : .. . .. . IncludeHidden .. . .. . For DotNetNuke 6 only if set to true hidden pages will be included . This can be useful for creating separate menus to show site sections that are hidden from the main menu .", "Question : I m trying to create a menu with an image in the center using DDRMenu Menu Token template see link http : www.dnnsoftware.com wiki page DDRMenu-token-templates . To do that I have to create an empty space where the image will be by adding a margin to the item number X of my menu . Let s say I have 6 items in my menu root I have to add a class to the fourth item for the margin . I m having trouble to add that class . Here is a basic template : .. . .. . Is there a way to know the index of the item Thanks for any help .. . Answer : I don t know anything about index you could hack a bit by using Keywords .. . .. . If you really need the index I think you should use xslt version with position see http : www.dnnhero.com Premium Tutorial tabid 259 ArticleID 12 Beginning-XSLT-with-DDRMenu-for-DotNetNuke-Part-2.aspx Comment : Using XSLT seems a better option since the keywords can be changed in the CMS . Thx", "Question : null .. . Answer : I ve just localized my DNN website into 3 languages and for the default language I ve set up custom Page URLs for most of the pages in the Page Settings field . I ve tried to set this up the same for the other languages but the menu isn t using the page urls I ve set up instead using the default URL for the page . What I m after is site.com de page-name . What I m getting is site.com de Parent-Page Child-Page . The url site.com de page-name loads fine when I access it directly . Is there another setting somewhere to force the menu to use what s in the Page URL field I m using DNN 7.1.2 with DDRMenu . Comment : Please add some code so we can see what you might be doing wrong . Comment : There isn t any code in particular that I m using . It s using just the detault settings in DNN7 with Advanced URL management enabled . I haven t modified any code related to the menu or URLs . The default language version works completely fine which suggests that all the code is working . But when I change languages the menu isn t using the value in the Page URL field of the page settings . Comment : I would imagine that this is a bug limitation of the DDRMenu though it could be something that might just need to be tweaked in the settings for DDRMenu within the skin . You might try another skin that doesn t use DDRMenu search for MultiFunction in the forge and you ll find my OpenSource skin . See if you experience the same results . It also might simply be a language bug in DNN", "Question : I m developing a breadcrumb for DotNetNuke 7 using the DDRMenu XSLT Templates . The codes I am using are working fine however I want to display the rootlevel of the breadcrumbs without hardcoding it . What I have in my breadcrumbs now is : .. . .. . News Publications is a subpage of my menu and what I m trying to achieve is to show the rootlevel .. . .. . Here is my XSLT Template .. . .. . This is the input XML . Below is the Example XML the menu component uses Comment : can you post also your input XML Comment : Hi Joel I ve edited my post to include the XML . Comment : I don t see any root and node there . Comment : I think DNN and DDRmenu handles the components in the program thus I don t have to create a seperate XML to operate it . I have been using the sample template provided by DNN and I just made changes in the XSLT . Comment : Included the example XML of the menu component in case you need it for reference . Appreciate your help .. . Answer : Instead of doing this to get the breadcrumbs .. . .. . Try doing this to get the firs node under root too .. . .. . Note the union operator will only get distinct elements so that if the root node is also marked as a breadcrumb it won t get selected and output twice . Comment : Hi Tim however the first page on my menu is not home but a page on getting started . I m currently displaying it by using this method : xsl : apply-templates select node @breadcrumb 1 or @title Home however if there is another way to check if it is the home page I would prefer that method just in case in future the home page name is changed . Comment : Well it should select the very first node under the root which in your example XML is the root . If this is not the case then you will need to determine some other way to uniquely identify what the Home node is .", "Question : We have two websites : a DNN site and an ASP.NET MVC site . We want to have a global navigation system across both of them . Right now the DNN site is using DDRMenu http : dnnddrmenu.codeplex.com for the navigation . Is there a way to get the html rendered from this exposed as a web service or something to include it on the MVC site Or maybe there s a better way of sharing a common navigation across these two sites .. . Answer : DDRMenu just builds its menu from the Tabs table in the DNN database . You could just set up a WebService that gives you the menu structure and you could rebuild your MVC navigation based on this .", "Question : I m using DDRMenu in DotNetNuke to select a menu node from my site structure and display only a subnode in a specific navigation in my template .. . .. . Now I want to be able to set the NodeSelector attribute in the code-behind file because I want to be able to dynamically set the value on Page Load .. . .. . But this doesn t work as there is no NodeSelector attribute on System.Web.UI.UserControl . Error System.Web.UI.UserControl does not contain a definition for NodeSelector and no extension method NodeSelector accepting a first argument of type System.Web.UI.UserControl could be found are you missing a using directive or an assembly reference C : Projects eWolf2012 dev DNN Portals default Skins JWEwolfSkin2012 Simple.ascx.cs 141 24 JWEwolfSkin2012 .. . .. . Is there any way to achieve this Kind regards .. . Answer : Usually the Menu.ascx in DDRMenu inherits from the DDRMenu SkinObject : .. . .. . Since you are talking about changing the code-behind I guess that you are using a custom control that embeds the Menu.ascx . In which case you should be able to access the NodeSelector property since it exists in the SkinObject class . What I am suspecting is happening is that your control type is not loaded correctly by the designer and that it falls back on the UserControl type which doesn t have the NodeSelector property . Try the following : .. . .. . Include the DDRMenu assembly in your current project because it won t load the type if it doesn t find the assembly then rewrite the include to kick the designer into motion . I m pretty confident this is the cause of the problem but if not : .. . Fiddle with your src attribute http : stackoverflow.com questions 8677453 designer-cs-issues-with-using-user-control-in-visual-studio and check in the .designer file what type is defined . Define it manually in your code-behind file instead of letting the designer do it . Comment : I have DNN bin DotNetNuke.Web.DDRMenu.dll as reference in my project and in the code-behind using DotNetNuke.Web.DDRMenu is set . But the designer assigns the wrong type . I will try to define it manually or check the designer Comment : @spankmaster79 It does that sometimes especially when you are working in a project that doesn t live in DNN itself . You could also cast the control manually to SkinObject if you don t want to fight the designer Comment : I ve deleted it from the designer and casted it manually to SkinObject in my code-behind . Now it compiles and works . Big thx", "Question : URL : http : bit.ly 1Lqi1io .. . .. . Brief : On the example URL I have a Static orange menu using the DNN HTML module . I would like to recreate this menu for all pages on the site so that the menu is dynamically updated from the CMS instead of having to be updated manually in the HTML . The blue tree menu below it is the DDR Menu with TreeView template . Issue : By default the menu template is showing the main parent menu links with private markets highlighted as the active menu . I can t figure out how where-in the template to specify that this menu should do the following : .. . .. . 1 . Start from the CHILD links Private Equity and Real Assets of the current Parent Private Markets .. . 2 . Show all CHILDREN of CHILDREN Fund Offerings .. . .. . The existing template is located here : http : bit.ly 1MH2fgW .. . .. . The DDR Menu guide http : www.dnnsoftware.com wiki ddrmenu-xslt-templates doesn t comprehensively tell me how to create a template so any help would be appreciated . Comment : Have you tried using the NodeSelector option in the DDRMenu .. . Answer : You should spend some time reading the DNN Wiki pages related to the DDR menu . That coupled with some experimentation should give you a really good understanding of how it all works . Use the module version of the DDR menu and drop it on an empty page . Then you can play around with the NodeSelector parameter to see how it determines which pages are shown . Start with that empty and you should get all pages . Move on from there . I highly recommend using the ULTokens template for your explorations . You ll get a nice UL showing the selected pages . You can also use the DumpXml template to show exactly what is available to the templates . Other attributes that are helpful are IncludeNodes and Exclude nodes . I n most cases you won t need to create your own template . Restyling ULTokens or SuperFish is often enough . The MegaMenu template is also approachable . I m happy to answer other questions . Comment : Thanks for that . Unfortunately I m on a time crunch and this is the last piece to get a site production ready . I have already tried everything in the documentation but whenever I add anything to the Node Expression to specify the starting level the entire menu disappears . Comment : If you take away the NodeSelector attribute the menu should show the entire set of pages . as for the time crunch it shouldn t take more than a half-hour to an hour to figure this out . We ve been discussing this for a couple of days .", "Question : I am creating my own custom menu in DNN using the DDR Menu token template . In my menu I would like the menu link of the page that I am currently in to be selected . I am able to achieve this by using the token SELECTED . However whenever I am in the 2nd tier or 3rd tier pages the link is not selected . How can I write the code so that the Parent Page Link will be selected even when I am in the Children pages This is my code .. . .. . Here are some tokens that can be used for DDRMenu : .. . Answer : Your code is not testing for SELECTED at the lower levels . That is in the section that begins with NODE . Note that there is also a BREADCRUMB that will be true for all pages in the breadcrumb trail . Comment : Thank you Joe Using Breadcrumb to check solved the problem :", "Question : I have my own DNN7 skin based on Twitter Bootstrap 3 which utilizes a DDRMenu . I would like to have a glyphicon next to some of my submenu items like this : .. . .. . example of expanded menu http : i.stack.imgur.com RDlbP.png .. . .. . The image is a mockup using just the default Twitter Bootstrap .navbar-fixed-top http : getbootstrap.com components navbar-fixed-top . A single submenu item looks like this : .. . .. . My skin is using the ULTokens.txt method for creating a DDRMenu . A typical submenu node looks like this at the moment : .. . .. . Now I know I can use the ICON token to place an icon which seems to be the preferred approach . However the screen for adding an icon to a page is like this : .. . .. . add icon from site file http : i.stack.imgur.com wZg3J.png .. . .. . or .. . .. . add icon from system image http : i.stack.imgur.com eL1qy.png .. . .. . In short we can only use image files . Instead I want to use a glyphicon . It seems my only real option is to create a PNG from the appropriate glyphicons and select them as an image for pages . The only non-option for sticking with glyphicons that I currently see is to use Javascript to inject them into the menu run time but I feel dirty for even only suggesting that . Short of creating my own menu provider and abovementioned workarounds is there any easy way to use glyphicons for menu items Comment : This looks pretty old but it may help you : albe.ihnet.it but Features http : albe.ihnet.it but Features Comment : Thanks for the tip . However I don t see it yet : which part of that tool would help me accomplish my goal Comment : Isn t that the same menu system using Font Icons If not then sorry Comment : No worry I just thought I misunderstood . Haven t looked into linked site too much yet but seems it uses font-awesome and is more about the menu itself than about setting icons for pages . Thanks though for taking the time to respond Comment : It s a shame that the menu is behind on the times using images will be blurry on non-retina unless you load twice the size or detect retina with js and so forth . Too bad you can t add a class at least to the a href then insert the span that matches it with jQuery or something . .. . Answer : Yeah there isn t any way within the default page settings dialog to assign a class or present a list of icons . You could create a custom module or skin object that administrators could use to assign an icon saved as a tab page setting but that would be outside of the main page settings and you wouldn t be able to access it from the menu template you d need to switch your menu to a Razor template so that you can execute arbitrary code and retrieve tab page settings . There was a project in DNN 7.1 http : www.dnnsoftware.com voice custom-tab-settings to introduce a section in page settings for arbitrary settings but it was cut from the release for not being complete enough . Ideally that would get fixed up and added back it s scoped via DNN-3175 https : dnntracker.atlassian.net browse DNN-3175 but I don t think anyone is focusing on it . Comment : Thanks for finding my question and taking the time to provide these insights . For now I guess the answer indeed then is this can t be done . If the priority for these icons gets high enough I can consider creating a skin object or module for this since we have more of those anyways . In addition I guess I have to look at the Razor templated menu s hadn t seen much of that yet . Anyways : cheers", "Question : I am writing a DDRMenu template using xsl and I wonder how I can pass the current tabID into the xsl template . Can anyone provide an example on how to pass dynamic attributes into the xsl template files . Thanks for any suggestion on this topic . .. . Answer : A good resource for DDRMenu template examples is this . https : github.com MarkXA ddrmenutemplates .. . .. . The full set of xslt node attributes are documented here http : www.dnnsoftware.com wiki ddrmenu-xslt-templates . I believe the tabId is the @id attribute : Comment : Thank you for your reply but @id references the id of any tab in the underlying xml sitemap document . What I want is a reference to the id of the current selected tab . So I need a way to pass this id as a parameter into the xsl document as it is not part of the underlying xml document . This could also be interesting for some other variables that deal with the current tab .", "Question : I ve added a new menu to our skin that loads a different menu style and shows only a special submenu . This loads from the directory .. . .. . DNN-INSTALL Portals default Skin mySkin MenuProfile .. . .. . The menu loads just fine in my development-environment . Now I ve packaged the skin and deployed it with installing it in Host Extensions and the files are deployed on the server . I ve checked that every file is in the right path on the server . But it runs into the following exception : .. . .. . Server Error in Application . Couldn t load menu style MenuProfile : System.ArgumentException : Illegal character in path . at System.IO.Path.CheckInvalidPathChars String path Boolean checkAdditional .. . .. . .. . What am I missing here .. . Answer : Make sure that the skin is really in the same relative directory structure as in your development-environment . Also check in the menudef.xml file that paths are correct . Can you load a different menu style successfully Comment : in my packaging prozess the menudef.xml got lost for the menu . Fixed that and now it works . Thank you", "Question : I am creating a menu using ULTOKENS in DNN . I want to check the depth of the page so that it only displays the child pages of the current page the user is in . Is it possible to check the Depth of the page using the DEPTH TOKEN and how do I go about doing it Thanks . .. . Answer : You use NodeSelector to determine which pages are displayed . For example NodeSelector RootChildren displays children of the currently selected root menu item . Thare are many other ways tomselect pages . See the DNN Wiki at dnnsoftware.com .", "Question : I need to know if the previous node was a @selected node . I need to basically mark the next following node if it exists with a special css class . I tried the following code and it threw an exception .. . .. . Here is a copy of the xslt with your suggestion in it : http : pastebin.com gANkhz2g .. . .. . The menu is the standard menu : .. . .. . I honestly do not know the xml that is produced by that control . Comment : xsl : if test preceding-sibling : : 1 @selected next xsl : if Comment : That added next to the selected node and everything after it . Comment : If you post an actual stylesheet and example XML it ll be easier to test . Comment : Alf I have updated my question with links to the xslt and information about the control . Comment : Without seeing the XML I can t say for sure but I suspect this is what you re looking for : xsl : if test preceding-sibling : : node 1 @selected 1 next xsl : if .. . Answer : Use preceding-sibling : : node 1 to select the first in reverse order preceding sibling named node :" ] }
[ "yes-answer-long", "yes-answer-short" ]
provider
UNK_RELATION
ws4py@server@118
ws4py -- ws4py is a python package implementing the websocket protocol as defined in rfc 6455 .it provides client and @placeholder implementations alike that using different techniques like threads micro-threads or event loops .
{ "confidence": [ 57.84384536743164, 50.56128692626953, 49.627803802490234, 48.92729949951172, 48.36360168457031, 47.363040924072266, 46.922462463378906, 45.404319763183594, 44.48348617553711, 44.22996520996094, 43.32393264770508, 42.53367614746094, 41.52008056640625, 40.58281707763672, 40.0760383605957, 39.66234588623047, 39.0941162109375, 38.58783721923828, 37.84510803222656, 37.84510803222656, 36.88020324707031, 36.50048828125, 35.670135498046875, 35.670135498046875, 34.767311096191406, 34.42488479614258, 34.32698440551758, 33.407997131347656, 32.93242263793945, 32.66346740722656, 32.66346740722656, 32.66346740722656, 30.892715454101562, 29.92575454711914, 29.92575454711914, 29.295886993408203, 29.295886993408203, 27.053333282470703, 26.558177947998047, 26.428647994995117, 25.474136352539062, 25.370262145996094, 24.66459083557129, 24.279579162597656, 23.745534896850586, 23.523757934570312, 23.4724063873291, 23.282699584960938, 22.7410888671875, 22.34984588623047, 21.37777328491211, 21.13656234741211, 19.89966583251953, 19.684162139892578, 19.604759216308594, 19.604759216308594, 19.604759216308594, 19.604759216308594, 19.536052703857422, 19.536052703857422, 19.15322494506836, 19.112010955810547, 18.66726303100586, 18.66726303100586, 18.66726303100586, 18.398853302001953, 18.263975143432617, 17.797313690185547, 17.797313690185547, 17.617977142333984, 17.422014236450195, 17.422014236450195, 17.011497497558594, 17.011497497558594, 16.867048263549805, 16.867048263549805, 16.867048263549805, 16.415515899658203, 15.92955207824707, 15.563321113586426, 15.504109382629395, 15.46890926361084, 15.25432300567627, 15.151817321777344, 15.137466430664062, 14.922471046447754, 14.879522323608398, 14.879522323608398, 14.879522323608398, 14.847447395324707, 14.666454315185547, 14.51005744934082, 14.464971542358398, 14.223661422729492, 14.202945709228516, 14.202945709228516, 14.202945709228516, 14.202945709228516, 14.202945709228516, 14.202945709228516 ], "content": [ "Also cherrypy has a websocket tool as defined by ws4py .", "We are using ws4py on top of cherrypy .", "I am trying to make a websocket server using CherryPy and Ws4py .", "But ws4py will not download them for you .", "I m running the basic cherrypy server with ws4py and I was wondering if there was a way to get a list of connetions from ws4py or the ws4py cherrypy plugin .", "So there is no need for ws4py and we have no plans of porting the WAMP layer that Autobahn Python includes to ws4py .", "requirements openssl ws4py kivy in buildozer.spec .", "I am trying to dynamically create destroy websocket-capable paths in CherryPy using ws4py .", "I have installed ws4py by this command sudo pip install ws4py and my server script is :", "@brousch : ws4py doesn t have mandatory dependencies .", "ws4py provides a WebSocket type that is supposed to provide an abstraction of the websocket that is independent of the underlying server gevent and others .. . .. . My problem is when using gevent at the server-side there is nothing that lets me access the global container of all websockets .", "I added ws4py to my buildozer.spec file under requirements requirements kivy ws4py and it seems to download correctly while running buildozer android-debug .", "I have created a web server socket using ws4py 0.3.2 and which uses cherrypy 3.2.4 on python 3.3.2 .When I try to print Message of client send to server like this http : stackoverflow.com questions 16748374 creating-own-appplication-using-ws4py .. . .. . I got error message :", "Also ws4py has a lot of dependencies you might have to add .", "guides incorrectly https : github.com Lawouach WebSocket-for-Python blob v0.3.4 ws4py websocket.py L153 you can not send from opened hook .", "the file websocket.py in ws4py has a class called Heartbeat which looks like exactly what I want and I believe that an instance is created inside the WebSocket if its has a heartbeat freq parameter passed in .. . .. . Above is the ws4py ctor but I cannot find where this code is called from .", "I am tied to CherryPy so I was hoping for a way to run autobahn python as WSGI app inside CherryPy as ws4py does or to utilize some autobahn WAMP code on top of ws4py .", "Also I am only using the base client of ws4py which doesn t include those dependencies and only requires the standard-library .", "Is possible to use autobahn functionality to extend ws4py or is there an alternative way", "It is not clear to me : .. . .. . if this is a lack of compatibility between cherrypy and ws4py when in an WSGI environment .", "I have created a web server socket using ws4py and which uses cherrypy .", "Here is my websocket client : .. . .. . My server is Cherrypy with ws4py : .. . .. . When I run the app this is what I get on the server-side : .. . .. . The last two messages also have an open rectangle after the second dash .", "After trail and error I settled on the fact that my import of ws4py was causing the error .", "I notice that ws4py can build with setuptools or distutils - have you tried adding setuptools to your requirements", "This uses ws4py and uWSGI instead of gunicorn .. . .. . We use uWSGI s internal mechanism http : uwsgi-docs.readthedocs.org en latest WebSockets.html highlight websocket to receive downstream websocket message loop .", "I created a web socket server with ws4py that dispatches messages to a ZMQ message bus and returns responses to the web socket .", "I am using ws4py https : ws4py.readthedocs.org en latest CherryPy http : www.cherrypy.org for websockets support and would like to implement WAMP http : wamp.ws on top of it .", "if it is a problem of ws4py when in a WSGI environment .. . if it is because Openshift websockets have a different port than the http one .. . .. . PPS : this is a complete OpenShift project that you can run and try this yourself : https : github.com spocchio wsgi-cherrypy-ws4py", "I have a simple web application that uses CherryPy for a RESTful backend and ws4py for websockets .", "Looking through the source code of ws4py and reading the docs there are no imports other than modules in the standard lib so it doesn t seem to be a dependency issue but maybe it is .", "I stripped out everything in my app except drawing a circle which works and then adding the ws4py import which breaks everything .", "I know I could get the handler instance in Main.socket and store that in an array but I would rather use a solution managed by ws4py if possible .", "A custom ws4py ProxyConnection is created which can combine ws4py event-loop with uWSGI event-loop .. . .. . The thing is started and messages start fly around .. . .. . This uses Pyramid request based on WebOb but this really shouldn t matter and code should be fine for any Python WSGI app with little modifications .. . .. . As you can see this does not really take advantage of asynchronicity but just sleep if there is nothing coming in from the socket .. . .. . Code goes here :", "What Graham calls an evil hack is documented in ws4py CherryPy module https : ws4py.readthedocs.org en latest sources ws4py.server module-ws4py.server.cherrypyserver .", "I can understand your confusion because in several places ws4py documentation either alludes or directly guides you the wrong way .", "Here is a full program that demonstrates the problem : .. . .. . This is as simple an example as I could construct : the Root class is placed as the main application along with a ws4py config directive to allow for creation of websockets at ws : localhost : 9000 other .", "the chat example that comes with ws4py uses Cherrypy specific features which makes me think I d have to implement a gevent specific way of doing what I want to do .", "Everything work wonderfully except when I create a websocket connecting to ws : myserver : 8000 ws this is the stacktrace I get : .. . .. . I manually deleted the absolute path from the filenames PS : I use python3.3 cherrypy 3.5.0 ws4py 0.3.4 .", "If you open Wireshark or another sniffer you can see that indeed our Login 0 appears before ws4py replies with a handshake response or maybe there is a race-condition .", "https : github.com Lawouach WebSocket-for-Python blob master requirements py2kreqs.txt", "I m encountering issues on making a WebSocket Server Client .", "I am using the built-in client That client is solely based on the Python stdlib it uses a thread to run the inner processing loop .", "Python websocket code : .. . .. . Python CherryPy code : .. . .. . Javascript code : .. . .. . POST to API : .. . .. . Websocket section : .. . .. . This works fine on my machine and deployed on Amazon EC2 .", "If possible I d like to get rid of that trailing ws on my websocket paths .", "That sort of makes sense since the server is set up to return a valid result in that case which I guess interferes with the websocket protocol somehow .", "The WebSocket code is relying on being used on a WSGI server implemented as a pure Python WSGI server which deals directly with the client socket itself .", "WSGI is a synchronous protocol 1 http : bottlepy.org docs dev async.html 2 http : tornado.readthedocs.org en latest wsgi.html tornado.wsgi.WSGIContainer WebSocket protocol is asynchronous .", "See list python package dependencies without loading them", "The code below is where I specify the WebSocket handler class websocket2.Handler inherits from WebSocket that the callback creates an instance of .", "I want to handle all request from client browser or it may another from different sources like using c by this url ip : port app and send payload from the client .", "http : stackoverflow.com questions 2875232 list-python-package-dependencies-without-loading-them for more details .", "What s the reason you can t save the websocket-connections to a list", "But for us CherryPy is set as base server we instead run other WSGI apps on top of it so I ended up re-implementing a WAMP-like protocol on top of CherryPy .", "In your websocket-server.py .. . .. . You have the line : .. . .. . So it looks like the server thinks it is sending back a binary message but chrome is expecting text .", "The heartbeat is only activated when the websocket object has its run method executed usually in a thread as it s blocking .", "However if you do need that feature create an instance of the Heartbeat class with the websocket instance .", "But why do I get a 301 after mounting a new app specifically for this websocket creation purpose", "The trick seems to be that I can t install a websocket handler on the index path of a handler object .", "It includes a full-featured WebSocket implementation and WAMP on top of that .", "Is the websocket receiver thread stuck somehow in Docker", "In my case I am using Python so I was thinking I may somehow get more information .", "There is nothing like WSGI for websockets in Python world yet", "I m not yet decided as to what to do with the heartbeat yet because as it stands it d have to be run in its own thread for each websocket .", "I can add a bird at the add URL then instantiate a websocket object from the console and communicate through it and then finally I can remove the bird at the remove URL .", "How does one access all websockets on the server-side when a websocket has received a message when gevent is used at the server-side", "It is crude but should serve as a starting point for building websocket proxy .", "Use weakref to remove them when the client disconnects .", "Chromium console has more useful error message : .. . .. . WebSocket connection to ws : 127.0.0.1 : 8080 live ws zones failed : Error during WebSocket handshake : Invalid status line .. . .. . Ok we have a handshake problem .", "However when I exit the CherryPy application in Docker the websocket message comes through : .. . .. . Output when I run it without Docker : .. . .. . In the non-Docker case the websocket identifies itself immediately .", "It helped to use snakefood to list the each of the modules loaded by a python script .", "As a remainder you can only perform websocket upgrade on the ws path here since that s how you configured it at the bottom of your snippet .", "The reason I m getting for the websocket closing is Invalid UTF-8 bytes but I m not sure where those invalid bytes are coming from .", "You can disable this behavior by disabling the trailing slah tool for the class where the index is defined .", "Based on the docs WebSocketManager has this list and I d expect some sort of pre-defined method for accessing this .", "This is the excerpt code in question : .. . .. . I also tried to create my own WebSocket proxy class but it doesn t work either .", "Unfortunately the WSGI spec was written long before WebSocket and didn t consider that use-case .", "The suspicious part from the Docker logs is when the application exits the websocket received message finally arrives :", "They also changed the websockets implementation maybe using Python 3 asyncio is the way to go now .", "Here is my Dockerfile : .. . .. . Output when I run from Docker : .. . .. . It never reaches the stage where the Javascript file is able to send data through the websocket .", "Replacing the Python multiprocessing module with threading.Thread fixed the problem .", "The DDMS log is here : .. . .. . I checked out a few questions on the kivy and python-for-android google groups of people who had the same question about the imaging.so error .", "I would like ideally to wait some time if needed and connect again .", "Some notes : If in the other method I replace the pass statement with something like return OK I won t be able to create websockets like in my first JS console example .", "Seems like that s not it .", "openshift.com provides me a WSGI so I embed my cherrypy to it so that my wsgi.py script define an application object .", "At current I am just broadcasting a heartbeat to all which I dont like the sound of personally", "Here is how that works for Flask : github.com tavendo AutobahnPython tree master examples twisted https : github.com tavendo AutobahnPython tree master examples twisted websocket echo wsgi", "This is my WebSocket Clas : .. . .. . And my JavaScript page note not the whole : .. . .. . Mounting Service : .. . .. . LiveService : .. . .. . So the mounting and starting works the whole run in production for months now but the new LiveService with ws is not working .", "In log im getting 21 Jul 2015 : 16 : 55 : 28 ENGINE Starting WebSocket processing and Opened Messages but I never receive or able to send Messages .", "Solution .. . .. . For now I suggest you to initiate your communication on client-side .", "If you have some pre-login chat you can make a little protocol on top of web sockets you will end up doing it anyway .", "I tried changing some parameters in the functions modifying some things in my code here and there searching with google and StackOverflow but I didn t manage to find anything related to my problem.. . so if someone could give me a hint it would make me happy : .. . .. . here is the code of my server : .. . .. . and here are the code for my 2 DummyClients : Dummy Client 1 PC : from ws4py.client.threadedclient import WebSocketClient import httplib .. . .. . Dummy Client 2 Mobile which is basically the same but doesn t connect to the same websocket address : from ws4py.client.threadedclient import WebSocketClient import httplib", "Just to show the difference between bird eagle and some other path that I didn t create using the add path : .. . .. . The 404 makes sense there is no such path on the server .", "It looks like all I m doing is sending normal text .", "some of simlarity score are ranged between 0 and 1 such as shortest-path and WuP .", "therefore the similarity between car and automobile will be 1 but other measures such as LCh will be .. . .. . I want to know the maximum score for these measures .", "Is 3.6889 consider to be the maximum value", "Is these means LCH score between 0 and 3.6889 .", "I addition the following measures", "also take a look at word2vec http : radimrehurek.com 2013 09 deep-learning-with-word2vec-and-gensim - could be fun" ] }
{ "confidence": [ 78.38754272460938, 68.74198150634766, 64.10054779052734, 63.2940559387207, 63.28208923339844, 62.98613739013672, 60.889259338378906, 60.32325744628906, 56.79106903076172, 55.9543342590332, 55.580970764160156, 55.16862487792969, 53.50932312011719, 53.22248840332031, 50.11703109741211, 48.50138854980469, 46.263145446777344, 41.91395568847656, 24.23310089111328, 17.446147918701172 ], "content": [ "Question : I am trying to implement websockets on a openshift.com server which should support them . openshift.com provides me a WSGI so I embed my cherrypy to it so that my wsgi.py script define an application object . Also cherrypy has a websocket tool as defined by ws4py . This is a minimal cherrypy application that works under WSGI in OpenShift and that should use websockets too Everything work wonderfully except when I create a websocket connecting to ws : myserver : 8000 ws this is the stacktrace I get : .. . .. . I manually deleted the absolute path from the filenames PS : I use python3.3 cherrypy 3.5.0 ws4py 0.3.4 . It is not clear to me : .. . .. . if this is a lack of compatibility between cherrypy and ws4py when in an WSGI environment . if it is a problem of ws4py when in a WSGI environment .. . if it is because Openshift websockets have a different port than the http one .. . .. . PPS : this is a complete OpenShift project that you can run and try this yourself : https : github.com spocchio wsgi-cherrypy-ws4py .. . Answer : I don t think it is possible at all . WSGI is a synchronous protocol 1 http : bottlepy.org docs dev async.html 2 http : tornado.readthedocs.org en latest wsgi.html tornado.wsgi.WSGIContainer WebSocket protocol is asynchronous . Wiki states that for a Python application interface OpenShift uses WSGI 3 http : en.wikipedia.org wiki OpenShift Supported frameworks . Alas . However I ve recently played with ws4py in pub sub scenario and it works really well on top of CherryPy standard HTTP-server deployment . So it shouldn t be a problem on a generic virtual-server with no application interface constraints . Comment : I know on Heroku it works perfectly . Unlucky they have a 55 seconds timeout on websockets so the client have to keep the connection alive at least once a minute not the best option for a mobile app that runs in background . Comment : Although the WSGI specification technically disallows it the issue is more to do with the WSGI server being used . The WebSocket code is relying on being used on a WSGI server implemented as a pure Python WSGI server which deals directly with the client socket itself . It then sides steps the WSGI specification and WSGI server and reaches down to grab the actual socket connection for the client and communicates over it directly . In other words it is using an evil hack . This hack will not work on mod-wsgi as it doesn t expose the original socket connection . Comment : To make it clearer I would add that in case of Python Openshift uses Apache webserver https : www.openshift.com products technologies thus mod-wsgi for WSGI . What Graham calls an evil hack is documented in ws4py CherryPy module https : ws4py.readthedocs.org en latest sources ws4py.server module-ws4py.server.cherrypyserver . Comment : I had indeed to perform such a hack which i wasn t that proud about . Unfortunately the WSGI spec was written long before WebSocket and didn t consider that use-case . Hopefully someday it ll be amended to address it .", "Question : When I start my Kivy app on my Android phone Samsung GSIII the splash-screen appears then it crashes and returns to my previous screen . After trail and error I settled on the fact that my import of ws4py was causing the error . I added ws4py to my buildozer.spec file under requirements requirements kivy ws4py and it seems to download correctly while running buildozer android-debug . Looking through the source code of ws4py and reading the docs there are no imports other than modules in the standard lib so it doesn t seem to be a dependency issue but maybe it is . The DDMS log is here : .. . .. . I checked out a few questions on the kivy and python-for-android google groups of people who had the same question about the imaging.so error . The response seemed to be that is not causing the issue . I stripped out everything in my app except drawing a circle which works and then adding the ws4py import which breaks everything . Is there something I am missing about adding third party libraries other than adding them to the spec file Everything works fine when running in Ubuntu . Any help would be greatly appreciated because my app is dependent on web sockets to connect to my backend . Comment : RuntimeWarning : import cdrom : No module named cdrom -- this is what is killing your app . pygame.cdrom is a C extension module and C extension modules can cause major problems for no apparent reason . I notice that ws4py can build with setuptools or distutils - have you tried adding setuptools to your requirements Comment : I added setuptools and it is still giving me the same import cdrom error : .. . Answer : Have you enabled the INTERNET Android permission Also ws4py has a lot of dependencies you might have to add . I can see problems especially with tornado gevent and cython . https : github.com Lawouach WebSocket-for-Python blob master requirements py2kreqs.txt Comment : Yes the internet permission is enabled . Also I am only using the base client of ws4py which doesn t include those dependencies and only requires the standard-library . ws4py.readthedocs.org en latest sources requirements http : ws4py.readthedocs.org en latest sources requirements Comment : I am using the built-in client That client is solely based on the Python stdlib it uses a thread to run the inner processing loop . Comment : @brousch : ws4py doesn t have mandatory dependencies . However some of its backends do require some of them indeed only if you use them . But ws4py will not download them for you .", "Question : I am using ws4py https : ws4py.readthedocs.org en latest CherryPy http : www.cherrypy.org for websockets support and would like to implement WAMP http : wamp.ws on top of it . I thought of using autobahn https : github.com tavendo AutobahnPython but it only seems to support Twisted and asyncio out of the box . Is possible to use autobahn functionality to extend ws4py or is there an alternative way .. . Answer : As you have already noted Autobahn Python https : github.com tavendo AutobahnPython supports running under either Twisted https : twistedmatrix.com or asyncio http : docs.python.org 3.4 library asyncio.html . It includes a full-featured WebSocket implementation and WAMP on top of that . So there is no need for ws4py and we have no plans of porting the WAMP layer that Autobahn Python includes to ws4py . Twisted also supports running any WSGI compliant application . So in principle you should be able to run CherryPy under Twisted . I have not tested that - I only tested and regularily use Flask on Twisted . Comment : I am tied to CherryPy so I was hoping for a way to run autobahn python as WSGI app inside CherryPy as ws4py does or to utilize some autobahn WAMP code on top of ws4py . Thank you you anyway . Comment : You might research if CherryPy which is a WSGI compliant application itself if I get this right can run under Twisted running as a WSGI container . Here is how that works for Flask : github.com tavendo AutobahnPython tree master examples twisted https : github.com tavendo AutobahnPython tree master examples twisted websocket echo wsgi", "Question : I have created a web server socket using ws4py and which uses cherrypy . When I connect to the server using ip : port it connects perfectly and am able to chat through multiple browsers . However when I try to connect ip : port ws it also works . However after I connect without using the ws I am unable to handshake . I want to handle all request from client browser or it may another from different sources like using c by this url ip : port app and send payload from the client . I have installed ws4py by this command sudo pip install ws4py and my server script is : Comment : Hai meawoppl I am happy as You rectify my grammar if you solve my problem i ll more heappy .. . Answer : Could you precsie what you mean by : .. . .. . However after I connect whithot using the ws I am unable to handshake . Do you mean you can t use the server at all afterwards As a remainder you can only perform websocket upgrade on the ws path here since that s how you configured it at the bottom of your snippet . Comment : Hai @Sylvain Hellegouarch thanks for your reply I had did it by using gevent", "Question : Inspired by ipython-notebook-proxy https : npmjs.org package ipython-notebook-proxy and based on ipydra https : github.com UnataInc ipydra and extending the latter to support more complex user authentication as well as a proxy because in my use-case only port 80 can be exposed . I am using flask-sockets https : github.com kennethreitz flask-sockets for the gunicorn worker but I am having troubles to proxy WebSockets . IPython uses three different WebSockets connections shell stdin and iopub but I am only able to get the 101 Switching Protocols for the first two . And stdin receives a Connection Close Frame as soon as is created . This is the excerpt code in question : .. . .. . I also tried to create my own WebSocket proxy class but it doesn t work either . Regular request-response cycle works like a charm so I removed that code . If interested the complete code is hosted in hidra https : github.com versae hidra . I run the server with Comment : Any progress on this yet I was going to built something similar . Comment : Not really . I abandoned the idea . I guess we ll have to wait for an official development from IPython . They also changed the websockets implementation maybe using Python 3 asyncio is the way to go now . Comment : Ok . I am working on this : You ll be the first one to be notified when I figure this out . .. . Answer : Here is my solution ish . It is crude but should serve as a starting point for building websocket proxy . The full code is available in unreleased project pyramid notebook https : bitbucket.org miohtama pyramid notebook src . This uses ws4py and uWSGI instead of gunicorn .. . .. . We use uWSGI s internal mechanism http : uwsgi-docs.readthedocs.org en latest WebSockets.html highlight websocket to receive downstream websocket message loop . There is nothing like WSGI for websockets in Python world yet but looks like every web server implements its own mechanism . A custom ws4py ProxyConnection is created which can combine ws4py event-loop with uWSGI event-loop .. . .. . The thing is started and messages start fly around .. . .. . This uses Pyramid request based on WebOb but this really shouldn t matter and code should be fine for any Python WSGI app with little modifications .. . .. . As you can see this does not really take advantage of asynchronicity but just sleep if there is nothing coming in from the socket .. . .. . Code goes here : Comment : Even though it s not using the same libs I neede I am marking as the answer because of the awesome work of pyramid notebook . Thanks", "Question : When I start my Kivy app on my Android phone Samsung GSIII the splash-screen appears then it crashes and returns to my previous screen . After trail and error I settled on the fact that my import of ws4py was causing the error . I added ws4py to my buildozer.spec file under requirements requirements kivy ws4py and it seems to download correctly while running buildozer android-debug . Looking through the source code of ws4py and reading the docs there are no imports other than modules in the standard lib so it doesn t seem to be a dependency issue but maybe it is . The DDMS log is here : .. . .. . I checked out a few questions on the kivy and python-for-android google groups of people who had the same question about the imaging.so error . The response seemed to be that is not causing the issue . I stripped out everything in my app except drawing a circle which works and then adding the ws4py import which breaks everything . Is there something I am missing about adding third party libraries other than adding them to the spec file Everything works fine when running in Ubuntu . Any help would be greatly appreciated because my app is dependent on web sockets to connect to my backend . Comment : RuntimeWarning : import cdrom : No module named cdrom -- this is what is killing your app . pygame.cdrom is a C extension module and C extension modules can cause major problems for no apparent reason . I notice that ws4py can build with setuptools or distutils - have you tried adding setuptools to your requirements Comment : I added setuptools and it is still giving me the same import cdrom error : .. . Answer : Having the same problem . Adding openssl to the list of required modules fixed the issue i.e . requirements openssl ws4py kivy in buildozer.spec . It helped to use snakefood to list the each of the modules loaded by a python script . See list python package dependencies without loading them http : stackoverflow.com questions 2875232 list-python-package-dependencies-without-loading-them for more details .", "Question : I m encountering issues on making a WebSocket Server Client . This is my WebSocket Clas : .. . .. . And my JavaScript page note not the whole : .. . .. . Mounting Service : .. . .. . LiveService : .. . .. . So the mounting and starting works the whole run in production for months now but the new LiveService with ws is not working . In log im getting 21 Jul 2015 : 16 : 55 : 28 ENGINE Starting WebSocket processing and Opened Messages but I never receive or able to send Messages . When I change LiveService.LoginLiveServiceWebSocketHandler to EchoWebSocket he gets Messages and sends them but on ws zones handler .. . .. . cherrypy.request.ws handler.send b Login 0 False .. . .. . is not working . wether with the b or not . Comment : Show your LiveService.LiveService . Comment : Added LiveService . .. . Answer : Analysis .. . .. . First thing to say is that you should pay attention to debugging tools that are at you disposal . For instance when you try you app in Firefox Firebug or Web Console tells you : .. . .. . Firefox can t establish a connection to the server at ws : 127.0.0.1 : 8080 live ws zones . Chromium console has more useful error message : .. . .. . WebSocket connection to ws : 127.0.0.1 : 8080 live ws zones failed : Error during WebSocket handshake : Invalid status line .. . .. . Ok we have a handshake problem . If you open Wireshark or another sniffer you can see that indeed our Login 0 appears before ws4py replies with a handshake response or maybe there is a race-condition . I can understand your confusion because in several places ws4py documentation either alludes or directly guides you the wrong way . Let s see : .. . .. . alludes https : ws4py.readthedocs.org en latest sources servertutorial cherrypy you can not send from normal handler . guides incorrectly https : github.com Lawouach WebSocket-for-Python blob v0.3.4 ws4py websocket.py L153 you can not send from opened hook . So I think it s either an outdated documentation or a bug . Solution .. . .. . For now I suggest you to initiate your communication on client-side . If you have some pre-login chat you can make a little protocol on top of web sockets you will end up doing it anyway . Something like this : Comment : Thanks Trying to accomplish that now", "Question : null .. . Answer : ws4py provides a WebSocket type that is supposed to provide an abstraction of the websocket that is independent of the underlying server gevent and others .. . .. . My problem is when using gevent at the server-side there is nothing that lets me access the global container of all websockets . The Design section of the documentation here http : ws4py.readthedocs.org en latest sources maintainer design says that there is a global instance of WebSocketManager that manages the individual web socket . The call diagram on the same page implies that there is a manager instance on the server-side that manages things . I can t even write a simple chat server because I d need to access the other sockets and write them but there is no abstraction that I could find that lets me do this . In case of gevent I d need to access other greenlets or websockets presented by other greenlets . the chat example that comes with ws4py uses Cherrypy specific features which makes me think I d have to implement a gevent specific way of doing what I want to do . So am I missing a feature here How does one access all websockets on the server-side when a websocket has received a message when gevent is used at the server-side Comment : What s the reason you can t save the websocket-connections to a list Use weakref to remove them when the client disconnects . Comment : @Daniel sure I can do that . But I m trying to understand if there is an abstraction for this . Based on the docs WebSocketManager has this list and I d expect some sort of pre-defined method for accessing this . I just did not want to hack the source if the feature is already there . Comment : I agree such list would be handy . Could you open an issue on github so that it gets addressed", "Question : null .. . Answer : I m running the basic cherrypy server with ws4py and I was wondering if there was a way to get a list of connetions from ws4py or the ws4py cherrypy plugin . The server code is as follows . I know I could get the handler instance in Main.socket and store that in an array but I would rather use a solution managed by ws4py if possible .", "Question : I have created a web server socket using ws4py 0.3.2 and which uses cherrypy 3.2.4 on python 3.3.2 .When I try to print Message of client send to server like this http : stackoverflow.com questions 16748374 creating-own-appplication-using-ws4py .. . .. . I got error message : Comment : Replace cherrypy.log + Message d s len m m with cherrypy.log + Message d r len m m . Then what happen Comment : output off cherrypy.log + Message d r len m m is : + Message 46 ws4py.messaging.TextMessage object at 0x7f15d8785650 .. . Answer : The returned object is of type TextMessage or BinaryMessage so you can t cast it to a string directly . To get to the payload string in this case you need to access the data attribute : .. . .. . Like this : .. . .. . Hope this is usable .", "Question : I have spent about 5 hours searching for how to do this to no avail . We are using ws4py on top of cherrypy . At current when a connection is physically lost say you turn off your WiFi the connection will not be terminated untill a message is sent from the server at which point it detects the dropped line and cleans up the socket . This is causing us issues and we need to know sooner if the socket is gone . the file websocket.py in ws4py has a class called Heartbeat which looks like exactly what I want and I believe that an instance is created inside the WebSocket if its has a heartbeat freq parameter passed in .. . .. . Above is the ws4py ctor but I cannot find where this code is called from . What I do know is that it is tied up in a CherryPy callback system . Here is what I found .. . .. . The above ctor is called from cherrypyserver.py in the function .. . .. . This function seems to be a callback as it is called from cprequest.py in a function .. . .. . Now there is a bit more stuff floating around but in honesty I m kinda lost and think I am going about this wrong . From what I can figure out I need to set the heartbeat freq parameter of the callback but am not sure where I would set this parameter . The code below is where I specify the WebSocket handler class websocket2.Handler inherits from WebSocket that the callback creates an instance of . I believe that somewhere in this rootmap I have to specify the parameter . Does anybody know how to do this . To clarify I want my server to create a heartbeat for each peer . I believe this is done by passing in a heartbeat freq value . At current I am just broadcasting a heartbeat to all which I dont like the sound of personally .. . Answer : The heartbeat is only activated when the websocket object has its run method executed usually in a thread as it s blocking . However the CherryPy plugin does not use that code path anymore for various reasons . I m not yet decided as to what to do with the heartbeat yet because as it stands it d have to be run in its own thread for each websocket . I find that expensive memory-wise . However if you do need that feature create an instance of the Heartbeat class with the websocket instance . Simply hold a reference to each Heartbeat instance .", "Question : I am trying to dynamically create destroy websocket-capable paths in CherryPy using ws4py . Here is a full program that demonstrates the problem : .. . .. . This is as simple an example as I could construct : the Root class is placed as the main application along with a ws4py config directive to allow for creation of websockets at ws : localhost : 9000 other . The add method creates a new application and mounts it at an appropriate path to mimic the setup of the other application . After starting the server I can do this in Chrome s JavaScript console : .. . .. . Fantastic it works Now after visiting http : localhost : 9000 add eagle in my browser to cause the creation of a new path I get the following exchange in the console : .. . .. . Hmm.. . why do I get a 301 Just to show the difference between bird eagle and some other path that I didn t create using the add path : .. . .. . The 404 makes sense there is no such path on the server . But why do I get a 301 after mounting a new app specifically for this websocket creation purpose Why does it behave differently from the one set up at server start time on path other And what might I do differently to accomplish this behavior that I m after Comment : Some notes : If in the other method I replace the pass statement with something like return OK I won t be able to create websockets like in my first JS console example . Instead of a 301 or a 404 I get an unexpected 200 . That sort of makes sense since the server is set up to return a valid result in that case which I guess interferes with the websocket protocol somehow . That s why I have the Nothing class as the root object for the dynamically mounted application . .. . Answer : The 301 is a default behavior of CherryPy when a request hits an index page handler indeed So bird would redirect to bird if the handler for it was index . You can disable this behavior by disabling the trailing slah tool for the class where the index is defined . This ought to do the trick . Comment : Sylvain thanks for this information . It didn t even occur to me that the slash tool could be the problem . I will try this out when I get a chance . Comment : Hi again Sylvain . Long time for an update I know : . Turning on the trailing-slash tool didn t help unfortunately . If possible I d like to get rid of that trailing ws on my websocket paths . Do you have any other ideas", "Question : I am trying to dynamically create destroy websocket-capable paths in CherryPy using ws4py . Here is a full program that demonstrates the problem : .. . .. . This is as simple an example as I could construct : the Root class is placed as the main application along with a ws4py config directive to allow for creation of websockets at ws : localhost : 9000 other . The add method creates a new application and mounts it at an appropriate path to mimic the setup of the other application . After starting the server I can do this in Chrome s JavaScript console : .. . .. . Fantastic it works Now after visiting http : localhost : 9000 add eagle in my browser to cause the creation of a new path I get the following exchange in the console : .. . .. . Hmm.. . why do I get a 301 Just to show the difference between bird eagle and some other path that I didn t create using the add path : .. . .. . The 404 makes sense there is no such path on the server . But why do I get a 301 after mounting a new app specifically for this websocket creation purpose Why does it behave differently from the one set up at server start time on path other And what might I do differently to accomplish this behavior that I m after Comment : Some notes : If in the other method I replace the pass statement with something like return OK I won t be able to create websockets like in my first JS console example . Instead of a 301 or a 404 I get an unexpected 200 . That sort of makes sense since the server is set up to return a valid result in that case which I guess interferes with the websocket protocol somehow . That s why I have the Nothing class as the root object for the dynamically mounted application . .. . Answer : Though I don t understand why I get that 301 I did figure out how to actually make this work the way I want it to . The trick seems to be that I can t install a websocket handler on the index path of a handler object . Instead you need to do it on some other named path . My example program changed in just two places : .. . .. . 1 The Nothing class gained a new method : .. . .. . 2 The line that mounts the dynamically created handler changes its mount point : .. . .. . Now things work very nicely . I can add a bird at the add URL then instantiate a websocket object from the console and communicate through it and then finally I can remove the bird at the remove URL .", "Question : I am using ws4py https : ws4py.readthedocs.org en latest CherryPy http : www.cherrypy.org for websockets support and would like to implement WAMP http : wamp.ws on top of it . I thought of using autobahn https : github.com tavendo AutobahnPython but it only seems to support Twisted and asyncio out of the box . Is possible to use autobahn functionality to extend ws4py or is there an alternative way .. . Answer : @oberstet is right . This is a quick showcase on how to run a CherryPy app : .. . .. . Assuming you save this snippet into a module called : cptw.py you can now serve your CherryPy application as follow : .. . .. . This works with Twisted 13.2 and CherryPy 3.2.6+ Comment : I vote this answer up because its certainly useful to some people . But for us CherryPy is set as base server we instead run other WSGI apps on top of it so I ended up re-implementing a WAMP-like protocol on top of CherryPy . Comment : Thanks . I m sorry if my response came too late . I have a feeling WSGI is meant to enable cross-framework scenarios .", "Question : I m trying to build a simple echoing server with Websockets but I can only get the connection to stay alive for a few seconds before I get an error . The reason I m getting for the websocket closing is Invalid UTF-8 bytes but I m not sure where those invalid bytes are coming from . Here is my websocket client : .. . .. . My server is Cherrypy with ws4py : .. . .. . When I run the app this is what I get on the server-side : .. . .. . The last two messages also have an open rectangle after the second dash . and this is what Chrome Dev Tools console says : .. . .. . Where could these invalid bytes be coming from It looks like all I m doing is sending normal text . Thanks . .. . Answer : In your websocket-server.py .. . .. . You have the line : .. . .. . So it looks like the server thinks it is sending back a binary message but chrome is expecting text . try : Comment : Seems like that s not it . The websockets aren t working either way .", "Question : null .. . Answer : I am trying to make a websocket server using CherryPy and Ws4py . I can connect to the server with a dummy client but I can t get any messages or rather answers from the server . So I was thinking it might be my use of the cherrypy.engine.subscribe wich is wrong because I believe I don t fully understand its functionning . I tried to subscribe to a custom channel so that when I receive a message on this channel I send this message to another channel but I might not be doing it right because I can t get any results.. . I tried changing some parameters in the functions modifying some things in my code here and there searching with google and StackOverflow but I didn t manage to find anything related to my problem.. . so if someone could give me a hint it would make me happy : .. . .. . here is the code of my server : .. . .. . and here are the code for my 2 DummyClients : Dummy Client 1 PC : from ws4py.client.threadedclient import WebSocketClient import httplib .. . .. . Dummy Client 2 Mobile which is basically the same but doesn t connect to the same websocket address : from ws4py.client.threadedclient import WebSocketClient import httplib", "Question : I have a simple web application that uses CherryPy for a RESTful backend and ws4py for websockets . Python websocket code : .. . .. . Python CherryPy code : .. . .. . Javascript code : .. . .. . POST to API : .. . .. . Websocket section : .. . .. . This works fine on my machine and deployed on Amazon EC2 . However when I try to deploy it in a Docker container the websockets don t work . Here is my Dockerfile : .. . .. . Output when I run from Docker : .. . .. . It never reaches the stage where the Javascript file is able to send data through the websocket . Chrome debug shows the WS state as Pending . However when I exit the CherryPy application in Docker the websocket message comes through : .. . .. . Output when I run it without Docker : .. . .. . In the non-Docker case the websocket identifies itself immediately . I can t figure this out . Is the websocket receiver thread stuck somehow in Docker The suspicious part from the Docker logs is when the application exits the websocket received message finally arrives : Comment : Have you tried running strace -p YOUR SERVER PID to see if you can see what it s stuck on Comment : Just ran it - turns out the multiprocessing module was making the entire application stick somehow . When my app services the POST request it launches a process with pool.starmap async to generate the unique id . Maybe Docker + multiprocessing is no good .. . Answer : Replacing the Python multiprocessing module with threading.Thread fixed the problem . I was using multiprocessing in the POST method handler . Here s the commit with the fix on the actual project : .. . .. . https : github.com sevagh youtube-audio-dl commit 9e23ae174f8791206b934608a1d4d702b411d18e", "Question : null .. . Answer : I created a web socket server with ws4py that dispatches messages to a ZMQ message bus and returns responses to the web socket . The stripped down code looks like this : .. . .. . In this minimal example I removed the processing part of the system that sends results back to the message bus and subscribe to message directly essentially making it a complicated echo-server . The problem is that recv result is never being called . I removed all subscription filter prefixes and made it a gevent thread but this doesn t help . Does anyone have an idea what might be wrong", "Question : I m encountering issues on making a WebSocket Server Client . This is my WebSocket Clas : .. . .. . And my JavaScript page note not the whole : .. . .. . Mounting Service : .. . .. . LiveService : .. . .. . So the mounting and starting works the whole run in production for months now but the new LiveService with ws is not working . In log im getting 21 Jul 2015 : 16 : 55 : 28 ENGINE Starting WebSocket processing and Opened Messages but I never receive or able to send Messages . When I change LiveService.LoginLiveServiceWebSocketHandler to EchoWebSocket he gets Messages and sends them but on ws zones handler .. . .. . cherrypy.request.ws handler.send b Login 0 False .. . .. . is not working . wether with the b or not . Comment : Show your LiveService.LiveService . Comment : Added LiveService . .. . Answer : Was a bit stupid.. . .. . .. . @saaj was right but the real Problem was that I tried to call function log which requires str with m m.data etc . Doing this with either repr or removing it it worked Thanks", "Question : null .. . Answer : I have established connection with the server and everything worked fine . After couple of days I noticed data is not being updated checked the logs and saw this : .. . .. . Message : Closed down Arguments : 1006 Going away .. . .. . From the documentation : .. . .. . What may cause the problem I think it may be either lost internet-connection or the server went down for a moment the server is from a third party not ours . However those are my wild guesses and if anyone could give me some directions how to handle this error I will be very thankful . I would like ideally to wait some time if needed and connect again . Thank you Comment : stackoverflow.com questions 19304157 http : stackoverflow.com questions 19304157 getting-the-reason-why-websockets-closed This link might be of some help . Comment : In my case I am using Python so I was thinking I may somehow get more information ." ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
rt.jar@runtime@77
rt.jar -- rt.jar contains all of the compiled class files for the base java @placeholder environment .
{ "confidence": [ 44.62720489501953, 44.62720489501953, 44.10326385498047, 42.56378936767578, 42.47774124145508, 41.881103515625, 40.54330825805664, 38.63594055175781, 37.376346588134766, 37.02391052246094, 35.85009765625, 35.85009765625, 35.85009765625, 35.653053283691406, 34.53388214111328, 33.762962341308594, 32.867210388183594, 32.867210388183594, 31.620046615600586, 31.08570098876953, 29.176063537597656, 28.849279403686523, 28.849279403686523, 28.14653205871582, 27.651037216186523, 26.42182731628418, 25.154685974121094, 24.60871124267578, 23.635982513427734, 21.854475021362305, 19.266582489013672, 19.010828018188477, 18.786022186279297, 17.428524017333984, 17.308069229125977, 16.742782592773438, 16.742782592773438, 16.742782592773438, 16.543045043945312, 16.117780685424805, 16.029048919677734, 15.961549758911133, 15.450706481933594, 15.27590560913086, 15.224079132080078, 15.140960693359375, 14.84604263305664, 14.647201538085938, 14.642267227172852, 14.599077224731445, 14.599077224731445, 14.55679702758789, 14.449965476989746, 14.449965476989746, 14.449965476989746, 14.449965476989746, 14.268472671508789, 14.247541427612305, 13.913455963134766, 13.913455963134766, 13.913455963134766, 13.913455963134766, 13.913455963134766, 13.90397834777832, 13.863081932067871, 13.7572021484375, 13.54350471496582, 13.190781593322754, 13.190781593322754, 13.190781593322754, 13.190781593322754, 13.190781593322754, 12.748489379882812, 12.664862632751465, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955, 12.54259967803955 ], "content": [ "why have this error because explicitly dependency a rt.jar .. . .. . after remove this rt.jar it could started successfully .", "because if remove this rt.jar it will use default rt.jar in JAVA HOME but in this case ConstructorAccessorImpl still is package-private .", "The rt.jar is part of your Java Installation JRE .", "I unpacked my current rt.jar and replaced all the files in sun.security.ec with my own compiled files .", "Keep rt.jar in your classpath .", "would be the rt.jar .", "Boot class loader - including rt.jar .. . 2 .", "Is there another possibility to make rt.jar useful again", "Bootstrap classes are in the rt.jar and several other jar files in the jre lib directory .", "When executed from IntelliJ IDEA rt.jar is part of that class .", "rt.jar doesn t need to be in the classpath since it is already in the bootclasspath .", "I could successfully manipulate classes from the rt.jar .", "Perhaps a typo---did you mean rt.jar", "What do you mean by keep rt.jar in your classpath", "Googling a lot I found nothing about the problem with this specific class Key.Adapter.class but there are a lot of topics about rt.jar of course and I tried so many things to correct it I tried to set the location of rt.jar and installed the plugin Java Source Attacher didn t work .", "Application class loader - java.class.path .. . .. . You can see rt.jar on the boot class path by printing java.lang.ManagementFactory.getRuntimeMXBean .getBootClassPath .", "Unfortunately bootstrap classloader refuses to load any manipulated content from rt.jar .", "Since it appears to be quite hard to override classes from rt.jar .", "Just to be clear : All the classes contained in rt.jar get loaded just fine it is just the property that is confusing me .", "You cannot use rt.jar with an Android application and somewhat overlaps with android.jar .", "Despite the code I have posted I don t think the code is bugged because that was working fine before I really think that the rt.jar is the source of the problem.. .", "But on closer inspection I found that when I execute my program with gradle there is no rt.jar in this classpath .", "In additional of following the instructions of article I had to do some other things in order to be able manipulate the classes of rt.jar .", "I m not familiar with IDEA so I have no idea why IDEA includes rt.jar in java.class.path but I suspect it is redundant since those classes will all be loaded by the boot class loader anyway .", "Here an example of I want to do : .. . .. . http : mindprod.com jgloss laf.html .. . .. . I want to use the same class name but I don t want to change the original rt.jar classes jar file .", "I have a recurrent problem with Eclipse : when I try to launch my plugin Eclipse application it often opens a new tab to attach a missing source in jre7 lib rt.jar .", "I was reading this article : .. . .. . http : www.thegeekstuff.com 2013 08 hide-tomcat-version-number .. . .. . I want to do similar thing but to replace externally a method included in rt.jar file .", "I don t see the ones that are in rt.jar so I can t use the classes that are present in javax.naming package for example -- that is because they are not a part of Android .", "This has me suspicious that something is really wonky with my classpath and that I have a rogue DocumentBuilderFactory not the one defined in rt.jar javax xml parsers somewhere in my code that is passing a NULL arg to this finder method .", "This is my scenario : .. . .. . android.jar http : i.stack.imgur.com QpQLm.png .. . .. . rt.jar http : i.stack.imgur.com XiIJV.png .. . .. . When I try to import a javax package I only see the ones that are in the android.jar crypto microedition net security sql xml .", "When started a web project by jetty plugin met below exception .. . .. . it seems GeneratedConstructorAccessor6 is dynamic generated because cannot search it in eclipse by shift + ctrl + t and after decompile could see .. . .. . So it seems it is a package-private class so cannot access it successfully but the GeneratedConstructorAccessor6 also in the same package-- sun.reflect .", "There is no SwingUtilities2.java at all in src.zip and nowhere to define MENU SELECTION MANAGER LISTENER KEY .", "Remember I want to change only a method not all source code of class .", "It is not a good idea to change compiled JDK classes .", "So why", "pd : .. . .. . Replacing Overriding Java native Classes", "Works for me on Linux Ubuntu 14.04 with Java 1.8.0 05 .", "robert@habanero : javac HostName.java java HostName .. . .. . habanero", "I was trying a simple maven project in which i want to include the core java library from maven-central repository .", "http : stackoverflow.com questions 19568971 replacing-overriding-java-native-classes .. . .. . Is different .", "You can redefine java .", "The bootstrap class loader is special in many ways many but not all of the classes are loaded before the agent even starts up .", "I found this dependency from search.maven.org .. . .. . But maven stores rt s pom in local repository i am not able to access rt jar which has java core libraries .", "InetAddress.getLocalHost .getHostName is no more getting the name of the HostName since I switched to java-8 .. . .. . .. . with the jdk1.8 the InetAddress.getLocalHost .getHostName returns localhost .", "I m not that good of a java programmer yet I feel. .", "to implement an util class .", "Which class are you training to manipulate", "I need to do this in order to get arbitrary curves working and I already downloaded the OpenJDK source edited the code and compiled it again .", "In the application I m using the Java SDK that supports Android : github.com watson-developer-cloud java-sdk android https : github.com watson-developer-cloud java-sdk android The error that appears in runtime is this : Could not find class javax.naming.InitialContext referenced from method com.ibm.watson.developer cloud.util.CredentialUtils.getKeyUsingJNDI .", "No the JVM makes sure that you never define custom classes in the java .", "Hi Java 8 Groovy 2.4.3 Eclipse Luna here .", "There is a screen of the problem : http : img11.hostingpics.net pics 436657Bug.png .. . .. . The only way I found to fix it is to delete the .metadata of the project each time it does that.. . and to loose all my preferences breakpoints and so .", "For example I manipulated the bytecode of the BigDecimal class .", "Such classes must be loaded by the bootstrap class loader .", "I am trying to change the ECParameters class in sun.security.ec .", "Well overriding ECParameters will not work since the class is final .", "You can refer to this Oracle doc : http : docs.oracle.com javase 8 docs technotes tools findingclasses.html .. . .. . How the Java Launcher Finds Bootstrap Classes .. . .. . Bootstrap classes are the classes that implement the Java 2 Platform .", "For Java the minimum requirement is 1.7 .", "It is very unlikely that you will need to redefine the bootstrap class path .", "Extension class loader - including JAVA HOME jre lib ext .. . 3 .", "Just adding logs to every method of the class like in the article that you mentioned", "In the LoggerAgent class I added an array of classes that I explicitly want to manipulate .", "Last in the HelloWorld class I created a BigDecimal just to check the manipulation behavior .", "That s more of a Java EE feature", "This is however not possible for all bootstrap classes .", "String includeArr new String java math BigDecimal .. . ArrayList String include new ArrayList Arrays.asList includeArr .. . .. . .. . 2 .", "You cannot redefine all classes some are possible .", "These archives are specified by the value of the bootstrap class path which is stored in the sun.boot.class.path system property .", "In the transform method of the LoggerAgent class I modified the loop to include the classes I explicitly want to manipulate .", "Edit : I have read that it is not recommended to edit these classes but this particular class even has a piece of code that is commented out .", "I also forgot to mention that for example when using Keytool it also uses that particular class .", "So it can not handle arbitrary curves that s one of the reasons why I am opting to edit the class itself .", "Would it be possible to define a custom Classloader below the system and bootstrap classloader that will load a modified version and delegates only when he doesn t find the class", "I m using the BigIP iControl Java client https : devcentral.f5.com login returnurl 2fwiki 2fiControl.Java.ashx for controlling a powerful load balancer programmatically which in turn uses Apache Axis 1.4 .", "I am new to maven .", "So you don t need to define a dependency apart from that JRE is not in Central .", "then why is that dependency present in the maven repo", "Those artifacts are from 2006 means 8 years old...apart from that you really don t need 1.5 deps cause it s long EoL etc .", "1.6 also Furthermore those artifacts are in central based on an error cause it s not legal to distribute artifacts like this .", "I must be a bug since it usually works and I have never modified that file .", "And clean the project .", "I cleaned the project but it didn t solve the problem .", "I reinstalled Eclipse as well but the error still occurs : .. . .. .", "Error Screenshot http : i.stack.imgur.com jvYWp.png .. . .. . What s strange about this is that I didn t make any change at anything related to the library if I did that was not intentional .", "I was just moving some things but nothing related to the libraries .", "The console returns NullPointerException at line 190 : .. . .. . To make a new project will be that way as well .", "And the Window Designer Run doesn t work as well .", "You need better details in your question .", "For example you say line 190 but you don t provide a stack-trace or the actual line numbers of the code you ve added .", "Currently there s no way to answer your question effectively .", "The console shows this message as well : at java.awt.EventDispatchThread.run Unknown Source .. .", "Still not enough .", "You should edit your original question to contain the entire stack-trace and indicate which line of code the exception is being thrown from .", "Well I have edited the post I didn t realize that was more lines on the console.. . sorry .", "No need to apologize .", "I have one issue in following code where new line character is converted into space character .", "How to preserve it in axis.jar", "String is : .. . .. . forward orojhn 111ask n 098 deliveryRcpt N send 9999 9999 .. . .. . Here in above string we can see there is line break between 9999 and 9999 .", "I want to preserve the new line character .", "UPDATED .. . .. . Now i preserve the new line with before converting it into bytes and then pass to new document ." ] }
{ "confidence": [ 51.841468811035156, 50.6322021484375, 46.56367492675781, 45.352020263671875, 44.194610595703125, 43.325904846191406, 42.140480041503906, 37.608646392822266, 36.914886474609375, 35.46894836425781, 31.763994216918945, 30.410167694091797, 29.936161041259766, 15.399397850036621, 14.868104934692383, 13.778465270996094, 12.530574798583984 ], "content": [ "Question : null .. . Answer : When started a web project by jetty plugin met below exception .. . .. . it seems GeneratedConstructorAccessor6 is dynamic generated because cannot search it in eclipse by shift + ctrl + t and after decompile could see .. . .. . So it seems it is a package-private class so cannot access it successfully but the GeneratedConstructorAccessor6 also in the same package-- sun.reflect . why have this error because explicitly dependency a rt.jar .. . .. . after remove this rt.jar it could started successfully . So why because if remove this rt.jar it will use default rt.jar in JAVA HOME but in this case ConstructorAccessorImpl still is package-private .", "Question : I use the system property java.class.path to find all jars and directories that belong to the classpath . At first sigth this seems to work great . But on closer inspection I found that when I execute my program with gradle there is no rt.jar in this classpath . When executed from IntelliJ IDEA rt.jar is part of that class . Why do the classpaths between IntelliJ and Gradle differ in this way Just to be clear : All the classes contained in rt.jar get loaded just fine it is just the property that is confusing me . .. . Answer : rt.jar doesn t need to be in the classpath since it is already in the bootclasspath . It is safe to remove it from your classpath . You can refer to this Oracle doc : http : docs.oracle.com javase 8 docs technotes tools findingclasses.html .. . .. . How the Java Launcher Finds Bootstrap Classes .. . .. . Bootstrap classes are the classes that implement the Java 2 Platform . Bootstrap classes are in the rt.jar and several other jar files in the jre lib directory . These archives are specified by the value of the bootstrap class path which is stored in the sun.boot.class.path system property . This system property is for reference only and should not be directly modified . It is very unlikely that you will need to redefine the bootstrap class path . The nonstandard option -Xbootclasspath allows you to do so in those rare cicrcumstances in which it is necessary to use a different set of core classes .", "Question : I use the system property java.class.path to find all jars and directories that belong to the classpath . At first sigth this seems to work great . But on closer inspection I found that when I execute my program with gradle there is no rt.jar in this classpath . When executed from IntelliJ IDEA rt.jar is part of that class . Why do the classpaths between IntelliJ and Gradle differ in this way Just to be clear : All the classes contained in rt.jar get loaded just fine it is just the property that is confusing me . .. . Answer : By default there are three ClassLoader s in the JVM : .. . .. . 1 . Boot class loader - including rt.jar .. . 2 . Extension class loader - including JAVA HOME jre lib ext .. . 3 . Application class loader - java.class.path .. . .. . You can see rt.jar on the boot class path by printing java.lang.ManagementFactory.getRuntimeMXBean .getBootClassPath . I m not familiar with IDEA so I have no idea why IDEA includes rt.jar in java.class.path but I suspect it is redundant since those classes will all be loaded by the boot class loader anyway .", "Question : null .. . Answer : I newbye and I m very lost . I was reading this article : .. . .. . http : www.thegeekstuff.com 2013 08 hide-tomcat-version-number .. . .. . I want to do similar thing but to replace externally a method included in rt.jar file . Here an example of I want to do : .. . .. . http : mindprod.com jgloss laf.html .. . .. . I want to use the same class name but I don t want to change the original rt.jar classes jar file . I want to invoke my new method without put more code like is needed in the original method I don t want to overrinding overloading in line . Remember I want to change only a method not all source code of class . Is possible How can I do thanks a lot . pd : .. . .. . Replacing Overriding Java native Classes http : stackoverflow.com questions 19568971 replacing-overriding-java-native-classes .. . .. . Is different .", "Question : I have a recurrent problem with Eclipse : when I try to launch my plugin Eclipse application it often opens a new tab to attach a missing source in jre7 lib rt.jar . I must be a bug since it usually works and I have never modified that file . There is a screen of the problem : http : img11.hostingpics.net pics 436657Bug.png .. . .. . The only way I found to fix it is to delete the .metadata of the project each time it does that.. . and to loose all my preferences breakpoints and so . .. . Answer : Keep rt.jar in your classpath . And clean the project . Comment : I cleaned the project but it didn t solve the problem . What do you mean by keep rt.jar in your classpath", "Question : null .. . Answer : Googling a lot I found nothing about the problem with this specific class Key.Adapter.class but there are a lot of topics about rt.jar of course and I tried so many things to correct it I tried to set the location of rt.jar and installed the plugin Java Source Attacher didn t work . I reinstalled Eclipse as well but the error still occurs : .. . .. . Error Screenshot http : i.stack.imgur.com jvYWp.png .. . .. . What s strange about this is that I didn t make any change at anything related to the library if I did that was not intentional . I was just moving some things but nothing related to the libraries . The console returns NullPointerException at line 190 : .. . .. . To make a new project will be that way as well . And the Window Designer Run doesn t work as well . Is there another possibility to make rt.jar useful again Comment : You need better details in your question . For example you say line 190 but you don t provide a stack-trace or the actual line numbers of the code you ve added . Currently there s no way to answer your question effectively . Comment : The console shows this message as well : at java.awt.EventDispatchThread.run Unknown Source .. . Despite the code I have posted I don t think the code is bugged because that was working fine before I really think that the rt.jar is the source of the problem.. . Comment : Still not enough . You should edit your original question to contain the entire stack-trace and indicate which line of code the exception is being thrown from . Comment : Well I have edited the post I didn t realize that was more lines on the console.. . sorry . Comment : No need to apologize .", "Question : I am trying to change the ECParameters class in sun.security.ec . I need to do this in order to get arbitrary curves working and I already downloaded the OpenJDK source edited the code and compiled it again . I unpacked my current rt.jar and replaced all the files in sun.security.ec with my own compiled files . Everything looks right but when I compile it again and try to start netbeans nothing happens. . Does anyone know what I did wrong and how I should do it properly Edit : I have read that it is not recommended to edit these classes but this particular class even has a piece of code that is commented out . Comment : Why not package your implementation as a patch and submit it to the OpenJDK project See openjdk.java.net contribute http : openjdk.java.net contribute for details . Comment : but when I compile it again and try to start netbeans nothing happens. . You mean : Netbeans does not start Or your program does not run Comment : I m not that good of a java programmer yet I feel. . I m actually a bit surprised that nobody did it already since Elliptic Curve Cryptography is on the rise . Comment : My netbeans won t even start i m running this on ubuntu-12.04 . Comment : Perhaps there is no corresponding bug . The first step to get this implemented in the JDK is to file a bug report at bugreport.java.com http : bugreport.java.com Without a bug report nothing will happen . Potentially ever . .. . Answer : It is not a good idea to change compiled JDK classes . Why you don t use normal ways to implement your case As you already mentioned that it isn t a good way you could use the commented code you ve found e.g . to implement an util class . Comment : I might try this as well but I m not sure how to make this work. . Since it appears to be quite hard to override classes from rt.jar . Maybe stackoverflow.com a 30422178 5061639 http : stackoverflow.com a 30422178 5061639 might help me with trying this . Comment : Well overriding ECParameters will not work since the class is final . Comment : I also forgot to mention that for example when using Keytool it also uses that particular class . So it can not handle arbitrary curves that s one of the reasons why I am opting to edit the class itself .", "Question : I am currently trying to track method calls for learning purposes . The javagent I have implemented is a modified version of the implementation in this article https : today.java.net pub a today 2008 04 24 add-logging-at-class-load-time-with-instrumentation.html . The programm adds to any method call logging instructions into the bytecode . Unfortunately bootstrap classloader refuses to load any manipulated content from rt.jar . I can understand that this isn t a good idea for a production enviroment but for a student it would be really amazing . Do you got any ideas how to make this happen .. . Answer : I could successfully manipulate classes from the rt.jar . For example I manipulated the bytecode of the BigDecimal class . Which class are you training to manipulate And what kind of manipulation are you doing Just adding logs to every method of the class like in the article that you mentioned In additional of following the instructions of article I had to do some other things in order to be able manipulate the classes of rt.jar . 1 . In the LoggerAgent class I added an array of classes that I explicitly want to manipulate . String includeArr new String java math BigDecimal .. . ArrayList String include new ArrayList Arrays.asList includeArr .. . .. . .. . 2 . In the transform method of the LoggerAgent class I modified the loop to include the classes I explicitly want to manipulate . for int i 0 i ignore.length i++ .. . if className.startsWith ignore i include.contains className .. . return bytes .. . .. . .. . .. . .. . 3 . Fixed the method methodReturnsValue of JavassistHelper to correctly distinguish between methods and constructors . private static boolean methodReturnsValue CtBehavior method throws NotFoundException .. . .. . if method instanceof CtMethod .. . CtClass returnType CtMethod method .getReturnType .. . String returnTypeName returnType.getName .. . if returnTypeName.equals void .. . return false .. . else .. . return true .. . .. . else .. . return false .. . .. . .. . .. . .. . 4 . Last in the HelloWorld class I created a BigDecimal just to check the manipulation behavior . The output looks like as follow : .. . .. . I hope it helps . If not please add more details of what you are trying to do . Comment : Thanks for your answer I fixed the constructor thing in LoggerAgent.doMethod . I tried to enable logging everything that is maybe the wrong approach I will try it with your way now : I am interested in the Collection Framework and everything related to Streams Lambdas . Do you know how classes with native-code getting translated or execeuted by the JVM Trying to instrument hashmap for example produced some strange errors by the JVM . some .cpp exception classes were mentioned", "Question : null .. . Answer : I am new to maven . I was trying a simple maven project in which i want to include the core java library from maven-central repository . I found this dependency from search.maven.org .. . .. . But maven stores rt s pom in local repository i am not able to access rt jar which has java core libraries . Comment : The rt.jar is part of your Java Installation JRE . So you don t need to define a dependency apart from that JRE is not in Central . Comment : then why is that dependency present in the maven repo Comment : Those artifacts are from 2006 means 8 years old...apart from that you really don t need 1.5 deps cause it s long EoL etc . 1.6 also Furthermore those artifacts are in central based on an error cause it s not legal to distribute artifacts like this .", "Question : null .. . Answer : Please note : Although there are several questions on SO that paste in a similar exception stack-trace this question is definitely not a dupe of any of them as I m trying to understand where my classloading is going awry . Hi Java 8 Groovy 2.4.3 Eclipse Luna here . I m using the BigIP iControl Java client https : devcentral.f5.com login returnurl 2fwiki 2fiControl.Java.ashx for controlling a powerful load balancer programmatically which in turn uses Apache Axis 1.4 . In its use of Axis 1.4 I am getting the following stacktrace from Eclipse console : .. . .. . Hmmm let s have a look at that XMLUtils.getDOMFactory method : .. . .. . OK LN 221 is that call to DocumentBuilderFactory.newInstance so let s have a look at it : .. . .. . The plot thickens Now let s take a final look at FactoryFinder.find : .. . .. . So if I m interpreting this right it s throwing the FactoryConfigurationError because it can t find the main provider class whatever that means and no fallback has been specified . But hasn t it The call to FactoryFinder.find included the non-null com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl string argument . This has me suspicious that something is really wonky with my classpath and that I have a rogue DocumentBuilderFactory not the one defined in rt.jar javax xml parsers somewhere in my code that is passing a NULL arg to this finder method . But that doesn t make sense either because Axis 1.4 doesn t appear at least according to Maven repo to have any dependencies...which means the only provider for javax.xml . would be the rt.jar . Unless perhaps Eclipse is mucking things up somehow I m so confused please help : - .. . .. . .. . .. . Update .. . .. . This is definitely an Eclipse issue . If I package my app as an executable JAR and run it from the command-line I don t get this exception .", "Question : I am currently trying to track method calls for learning purposes . The javagent I have implemented is a modified version of the implementation in this article https : today.java.net pub a today 2008 04 24 add-logging-at-class-load-time-with-instrumentation.html . The programm adds to any method call logging instructions into the bytecode . Unfortunately bootstrap classloader refuses to load any manipulated content from rt.jar . I can understand that this isn t a good idea for a production enviroment but for a student it would be really amazing . Do you got any ideas how to make this happen .. . Answer : The only chance you have is to change the contents of rt.jar . The bootstrap class loader is special in many ways many but not all of the classes are loaded before the agent even starts up . Some classes can be explicitly redefined using the redefine method . This is however not possible for all bootstrap classes . Comment : Thanks for you answer Would it be possible to define a custom Classloader below the system and bootstrap classloader that will load a modified version and delegates only when he doesn t find the class Would be again really dirty.. . - Agent.transform : checks whether call comes from Boostrtrap - CustomClassloader calls Transformer loads modified ByteCode Comment : No the JVM makes sure that you never define custom classes in the java . namespace . Such classes must be loaded by the bootstrap class loader . Comment : I m don t think that this is correct . You can redefine java . classes . See stackoverflow.com questions 29059553 http : stackoverflow.com questions 29059553 javac-classpath-order-contradicts-oracle-documentation 29060452 29060452 and others . Comment : You cannot redefine all classes some are possible .", "Question : I m developing an Android Application with Android Studio 2.1.2 . In one of the classes of an external library in particular the Watson library of IBM Bluemix com.ibm.watson.developer cloud : java-sdk : 3.0.1 I need to import these three classes : .. . .. . The problem is that these importations are not possible Cannot resolve symbols . This is my scenario : .. . .. . android.jar http : i.stack.imgur.com QpQLm.png .. . .. . rt.jar http : i.stack.imgur.com XiIJV.png .. . .. . When I try to import a javax package I only see the ones that are in the android.jar crypto microedition net security sql xml . I don t see the ones that are in rt.jar so I can t use the classes that are present in javax.naming package for example . I ve tried to explicitly add the dependency in this way .. . .. . but I think this is not correct in fact it compiles but I can t run on the device because of this error : .. . .. . It s the same problem I ve encountered in this post : Javax content not accessible http : stackoverflow.com questions 36217233 javax-content-not-accessible but this time the problem is independent from the specific Watson Library that request the importations . What is the way to make visible that classes to let the application work Comment : I don t see the ones that are in rt.jar so I can t use the classes that are present in javax.naming package for example -- that is because they are not a part of Android . The android.jar that you compile against is a series of stubs sufficient to satisfy the compiler . The real equivalent of that JAR is part of the Android firmware and is loaded into your process at runtime . Neither has those classes . See if there is a different version of Bluemix that is Android-compatible . Comment : If you re not able to find an Android library you could always make a Java Web server that runs your IBM stuff and have the Android device call methods of that Comment : Thanks for the help I ve commented also in the accepted answer writing an additional explanation of the problem . .. . Answer : You cannot use rt.jar with an Android application and somewhat overlaps with android.jar . That is the runtime library for the desktop JRE not Android . Please see the Android API reference https : developer.android.com reference packages.html for a list of available packages you ll notice that javax.naming is not one of them . strike Clearly that IBM framework is not Android compatible . strike .. . .. . My earlier assessment is inaccurate as the README clearly states that it is : .. . .. . The library supports Android 2.3 and above . For Java the minimum requirement is 1.7 . It depends on OkHttp and gson . Source . https : github.com watson-developer-cloud java-sdk android .. . .. . However I suspect the issue is related to incorrectly configured credentials see here https : github.com watson-developer-cloud java-sdk getting-the-service-credentials causing the library to then attempt JNDI lookup as a fallback which definitely isn t supported by Android . Comment : Thank you for the clarification I suspected this but it wasn t clear in my mind . In the application I m using the Java SDK that supports Android : github.com watson-developer-cloud java-sdk android https : github.com watson-developer-cloud java-sdk android The error that appears in runtime is this : Could not find class javax.naming.InitialContext referenced from method com.ibm.watson.developer cloud.util.CredentialUtils.getKeyUsingJNDI . This part should work on Android 2.3 and higher the API calls are done specifically for Android use.. . I don t know how to solve this problem : Comment : @Dieghitus I don t believe Android supports JDNI which is the root of the problem . That s more of a Java EE feature Comment : @Dieghitus ah I suspect I see the issue . I d be willing to bet as other frameworks work this way that you don t have your credentials configured in a properties file correctly so it s trying to look them up via other means JNDI being one of them . However that isn t supported on Android . See github.com watson-developer-cloud https : github.com watson-developer-cloud java-sdk getting-the-service-credentials for instructions on how to correctly configure the credentials . Comment : Thanks for the tip . I ve spotted this problem only with Visual Recognition service all others work well . I ll work on this tomorrow I hope to resolve . I ll write here news . Thank you Comment : I have tried to resolve without success . It s from the update 2.7.0 that this error appears not only to me but also to other users as you can see in this other discussion on Bluemix forum : developer.ibm.com answers questions 260244 https : developer.ibm.com answers questions 260244 javax-content-not-accessible Is it possibile that this error may be caused by the version of the device Android 4.4 The other users also have this problem on 4.4 . I ve tried in every manner but nothing to do.. .", "Question : i am using Ubuntu x64 15.04 and in netbeans ide i am trying to use proguard so created proguard.pro file : .. . .. . and modified the build.xml file : .. . .. . but when i try to compile and build MyApp i m getting below errors : .. . .. . it would be great if any one could help me out to solve this error at this point i can only think to change the permission for usr lib jvm jdk1.8.0 60 jre lib rj.jar so that netbeans can access it but want to know is it good to do this. . or is there a proper way to solve it..thanks in advance . .. . Answer : Perhaps a typo---did you mean rt.jar Comment : ohhh no. . its a typo mistake. . thanks a lot @JonathanCrosmer sir. . : now working perfect. .", "Question : InetAddress.getLocalHost .getHostName is no more getting the name of the HostName since I switched to java-8 .. . .. . .. . with the jdk1.8 the InetAddress.getLocalHost .getHostName returns localhost . Before when I was using jdk1.6 it gives me the right hostname which is ACTION03 according to the network config : .. . .. . any help Comment : What does hostname give you Comment : @Robert it gives me ACTION03 Comment : You had two host entries for localhost in your host file prior to edit . Not sure if that has something to do with it . Perhaps without one-to-one mapping it gives localhost Would need to test it . Unsure of the correct behavior but it otherwise works for me . Comment : What is the content of the etc hosts-file .. . Answer : Works for me on Linux Ubuntu 14.04 with Java 1.8.0 05 . robert@habanero : javac HostName.java java HostName .. . .. . habanero Comment : Me I have Centos 7 And it gives me localhost", "Question : null .. . Answer : I compile jdk source codes jdk-7u79-linux-x64.tar.gz and encounter the following error . There is no SwingUtilities2.java at all in src.zip and nowhere to define MENU SELECTION MANAGER LISTENER KEY . How to fix it", "Question : InetAddress.getLocalHost .getHostName is no more getting the name of the HostName since I switched to java-8 .. . .. . .. . with the jdk1.8 the InetAddress.getLocalHost .getHostName returns localhost . Before when I was using jdk1.6 it gives me the right hostname which is ACTION03 according to the network config : .. . .. . any help Comment : What does hostname give you Comment : @Robert it gives me ACTION03 Comment : You had two host entries for localhost in your host file prior to edit . Not sure if that has something to do with it . Perhaps without one-to-one mapping it gives localhost Would need to test it . Unsure of the correct behavior but it otherwise works for me . Comment : What is the content of the etc hosts-file .. . Answer : There was similar bug https : bugs.openjdk.java.net browse JDK-8062840 focusedCommentId 13631364 page com.atlassian.jira.plugin.system.issuetabpanels : comment-tabpanel comment-13631364 fired in JDK . What I understand is that they changed default resolution process . They honor configuration in etc nsswitch.conf where hosts are configured for etc hosts that gives it main priority for name resolution . Usually etc hosts has record for 127.0.0.1 localhost that provide name for host localhost", "Question : null .. . Answer : I have one issue in following code where new line character is converted into space character . How to preserve it in axis.jar String is : .. . .. . forward orojhn 111ask n 098 deliveryRcpt N send 9999 9999 .. . .. . Here in above string we can see there is line break between 9999 and 9999 . I want to preserve the new line character . UPDATED .. . .. . Now i preserve the new line with before converting it into bytes and then pass to new document . it works fine . is there any other way to solve this" ] }
[ "yes-answer-long", "yes-answer-short" ]
runtime
UNK_RELATION
jinja2@python@48
jinja2 -- jinja2 is a fast template-engine for @placeholder .
{ "confidence": [ 50.603355407714844, 44.34531021118164, 44.21805191040039, 43.66845703125, 43.08156204223633, 42.30155563354492, 42.04743194580078, 41.6339225769043, 40.824039459228516, 40.63294982910156, 40.501197814941406, 40.440338134765625, 40.13742446899414, 40.13742446899414, 39.52252197265625, 39.408836364746094, 39.408836364746094, 39.408836364746094, 38.689788818359375, 38.689788818359375, 38.689788818359375, 38.689788818359375, 38.63455581665039, 38.6248664855957, 38.53889846801758, 38.53889846801758, 37.96119689941406, 37.96119689941406, 37.96119689941406, 37.96119689941406, 37.66449737548828, 37.58708953857422, 37.58708953857422, 37.46609878540039, 37.20367431640625, 37.09125900268555, 37.09125900268555, 37.09125900268555, 37.09125900268555, 37.000823974609375, 36.943992614746094, 36.57838439941406, 36.57838439941406, 36.57838439941406, 36.513465881347656, 36.39206314086914, 36.39206314086914, 36.39206314086914, 36.39206314086914, 36.301273345947266, 36.13945007324219, 36.13945007324219, 35.96464538574219, 35.849796295166016, 35.849796295166016, 35.36638259887695, 35.228172302246094, 35.1790771484375, 35.1790771484375, 35.177791595458984, 35.12309646606445, 34.94442367553711, 34.94442367553711, 34.94442367553711, 34.94442367553711, 34.26531219482422, 34.26531219482422, 34.056373596191406, 34.036346435546875, 33.98405456542969, 33.98405456542969, 33.98405456542969, 33.98405456542969, 33.98405456542969, 33.98405456542969, 33.85324478149414, 33.50347900390625, 33.48405456542969, 33.48405456542969, 33.48405456542969, 33.48405456542969, 33.48405456542969, 33.114280700683594, 33.09600067138672, 33.01405334472656, 33.01405334472656, 33.01405334472656, 32.83302307128906, 32.83302307128906, 32.83302307128906, 32.83302307128906, 32.057804107666016, 32.057804107666016, 32.05368423461914, 32.05368423461914, 32.036415100097656, 32.036415100097656, 32.036415100097656, 32.036415100097656 ], "content": [ "a jinja2.Environment or jinja2.Template globals dictionary .. . .. . 3 .", "Jinja2 does streaming of template data .", "There is a jinja2 extension that achieves this effect authored by the jinja2 developer .. . .. . https : github.com mitsuhiko jinja2-htmlcompress", "I am using google-app-engine in python with a Jinja2 template-engine .", "Does Jinja2 support template-relative paths e.g .", "I m just learning Jinja2 .", "Frist you have to install jinja2 : .. . .. . Then modify your TEMPLATES list in the settings.py to contain the jinja2 BACKEND : .. . .. . where templates jinja2 is the directory with your jinja2 template files .", "It turns out that it is not the jinja2 template that is returning the escaped quotes .", "Flask jinja2", "I have a problem with my Django Project I use Jinja2 as template-engine specifically using django-jinja providing unobtrusive Jinja2 support : .", "@iamgopal : Are you using Jinja2 in Google App Engine", "Jinja2 and Mako are both apparently pretty fast .", "Is there any way to do this with jinja2", "For example in python : .. . .. . and in jinja2", "Django template tags will not work inside Jinja2 templates .", "Am I missing something a template file a jinja2 filter", "If not jinja2 is there any other python template library that can do this", "How do I get the number of elements in a list in jinja2 template .", "Jinja2 is what Flask uses", "using jinja not jinja2", "does markup exist in jinja2", "Markup is a Jinja2 class yes .", "I m using django-1.9 with jinja2 I installed the module django-jinja and I load the template well but I can t use the basic filters of jinja2 in the template and I can t use any basic expression of jinja2 .", "Is it actually possible to extend the Jinja2 template-engine so it has somewhat of the functionalities Elm http : elm-lang.org offers", "Turns out there s macros in Jinja2 .", "Will output : .. . .. . Works with Jinja2 version 2.7.3", "now i want to pass it to another python function from jinja2 template .", "I am trying to resort the sorted list i passed to jinja2 template firstly .", "The host variable hostvars.localhost.error flag should be accessible in a when clause without a Jinja2 template .", "At some point you have to call jinja2 to render your template .", "I have a python program that uses Jinja2 template-engine to render html pages on back-end .", "If you forget to include it your jinja2.py module might clash with the from jinja2 import Environment import .", "Added a feature request to enable this by default github.com mitsuhiko jinja2 issues 174 https : github.com mitsuhiko jinja2 issues 174", "According to the documentation for jinja2.Environment.join path http : jinja.pocoo.org 2 documentation api jinja2.Environment.join path support for relative template paths is possible by overriding join path to implement template path joining .", "jinja2-htmlcompress https : github.com mitsuhiko jinja2-htmlcompress strips whitespace between HTML tags but also between jinja tags and variables .", "You should be looking at macros in Jinja2 .", "That is write that expression without the Jinja2 delimiters .", "The built-in backends are django.template.backends.django.DjangoTemplates and django.template.backends.jinja2.Jinja2 .", "2 Change the delimiter notation for Jinja2 .", "Jinja2 http : jinja.pocoo.org docs is an excellent template library for general purpose use .", "In jinja2 template-engine I have a master template file as the following sample : .. . .. . base.tpl : .. . .. . .. . .. . child1.tpl : .. . .. . .. . .. . child2.tpl : .. . .. . These are my code .", "Jinja2 is now included in GAE .", "Why is this a problem with Jinja2", "@techtonik : this is not a Jinja2 problem .", "This is the most frustrating part of debugging Jinja2 template exceptions on App Engine : The source of the exception is almost always misrepresented .", "Jinja2 gets more and more awesome as I work with it .", "I m quite surprised there is no Pythonic way of doing this with jinja2 .", "I bow to your superior Jinja2 knowledge .", "It is not ansible way to use jinja2 in playbooks like this .", "I understand that I have to write an ad hoc template in the jinja2 template language but both jinja2 template syntax and its use in nbconvert have eluded my understanding despite the number of attempts I had made .", "I m using Ansible with Jinja2 templates and this is a scenario that I can t find a solution for in Ansible s documentation or googling around for Jinja2 examples .", "I have been looking on how to use jinja2 in django-1.8 but there is no complete source for using django with jinja2 .", "Mixed Django and Jinja2 Template : Environment : Django 1.8 + Jinja2 .. . .. . I have some legacy django-templates and it s not so easy to rewrite them all at once to jinja2 so add this custom jinja include some template.jinja tag to my custom tags.py : .. . .. . Call it like this from your django template : load my custom tags jinja include some template.jinja", "Jinja2 converts all template variables into unicode before processing .", "I am trying to add a google-font to my jinja2 template .", "There are no public examples of projects using jinja2 templates django-pipeline and app engine .", "Particularly Jinja2 usage .", "@brunodesthuilliers : latex.jinja2 is not the same module as jinja2 and I don t think jinja2 has a make env function .", "Either jinja2 has to learn to read an extractable syntax or I have to extract from something jinja2 can render .", "did the trick for me while doing my app engine project webapp2 and jinja2 .", "You cannot just interpolate text with Jinja2 markup into a template and expect that text to be treated as a template itself .", "What s the rationale for not having standard regex support in Jinja2", "Therefore the Jinja2 Package Loader can not be used .", "@AnkushRaghuvanshi : this question and answer applies to Jinja2 not Django .", "Anyone know of a syntax highlighter for jinja2 in Coda2", "Also in your own code don t access jinja2 from the latex module - explicitely import from jinja2 where you need it replace from latex.jinja2 import make env witth from jinja2 import make env", "Some code I ve used with Jinja2 .. . .. . In my template.html .. . .. . One difference between Django templating and Jinja2 templating is that Jinja2 s philosophy wasn t about making it easy for designers to use so function-calls are allowed within templates .", "3 Output a raw block http : jinja.pocoo.org docs dev templates escaping in Jinja2 using raw or verbatim : .. . .. . 4 Use Jinja2 to write the curly-braces in the template : .. . .. . this will be output as some var in the HTML .", "I have started using Jinja2 http : jinja.pocoo.org 2 documentation as my templating-engine on Google App Engine in Python .", "I am using jinja2.PackageLoader to load it .", "also you can use raw in Jinja2", "how to send PDF file that can be rendered to jinja2", "@Nikhil : Jinja2 has the equivalent to Mako s defs too .", "Can Jinja2 do what I am attempting", "The rest is less interesting just Jinja2 templates for completeness .", "http : stackoverflow.com questions 23186691 stripping-whitespace-in-jinja2-flask-why-do-i-still-need-the-minus-sign and Trimming blocks using whitespace control from jinja2 template http : stackoverflow.com questions 35956589 trimming-blocks-using-whitespace-control-from-jinja2-template .", "If I return a Jinja2 template like so : return render response home.htm context .. . .. . How do then get a list of the variables in context from within the template", "How do I persuade Jinja2 to not print None when the value is None", "Do I need to filter the dictionary before passing it to Jinja2 for rendering", "Using Jinja2 how do I format a date field", "Down voted as question asked about Jinja2 and answer is Flask specific .", "If they want to edit their answers to be on topic and about Jinja2 I will up vote them .", "I am attempting to adapt the Jinja2 WithExtension https : github.com mitsuhiko jinja2 blob 2.8 jinja2 ext.py L413-L431 to produce a generic extension for wrapping a block followed by some more complex ones .", "You can create a jinja2 filter : .. . .. . You need to add the filter to your jinja2 Environment before you can use it : .. . .. . In your template you can use that filter :", "I have a python script that uses Jinja2 template and I m trying to create a one-folder distribution using Pyinstaller .", "Jinja2 doesn t play nicely with template tags so I m wondering if there s a quick workaround", "First you must install the django-jinja2 template backend : this is which I know .", "Am I modifying the Jinja2 Environment inappropriately", "https : github.com mitsuhiko jinja2 issues 511", "This table is being loaded by Jinja2 if that changes anything .", "If not is there a way in Ansible Jinja2 or in Python to easily decode that string", "pelican.writers.py https : github.com getpelican pelican blob master pelican writers.py : This module brings together the templating-engine jinja2 the templates and the data to be inserted in the templates .", "Google App Engine users : If you re moving from Django to Jinja2 and looking to replace the date filter note that the formatting codes are different .", "I have a namespace-package and in one of the packages in that namespace I have a Jinja2 template .", "Now I want a server-side python component to handle AJAX calls and render an HTML template using jinja2 .", "I get this error message : jinja2.exceptions.TemplateAssertionError : no filter named sas magic regex", "Any insights or examples to configs with jinja2 and webassets would be much appreciated .", "For those like me looking for jinja2 solution the following stackoverflow link answers that .", "I got an problem while i was using jinja2 url for function ." ] }
{ "confidence": [ 54.6811408996582, 51.6535758972168, 50.206871032714844, 49.36811065673828, 48.60908508300781, 48.455318450927734, 47.92267990112305, 47.80693054199219, 47.65078353881836, 47.50716781616211, 47.41236114501953, 47.2861328125, 47.15763473510742, 47.076568603515625, 47.04164505004883, 46.89988327026367, 46.887298583984375, 46.74584197998047, 46.176761627197266, 46.07880783081055 ], "content": [ "Question : Is there any way to do this with jinja2 basically I want to be able to do multiple passes on a template . When the template-engine finds a variable in the template that is not in the context instead of replacing it with nothing keep the template variable intact If not jinja2 is there any other python template library that can do this .. . Answer : You can use DebugUndefined http : jinja.pocoo.org docs api jinja2.DebugUndefined which keeps the failed lookups as your Undefined Type http : jinja.pocoo.org docs api undefined-types for the undefined parameter of the Template environment :", "Question : I have been looking on how to use jinja2 in django-1.8 but there is no complete source for using django with jinja2 . I was wondering if you guys knew the process for using jinja2 in django . I have looked through the the official documentation and I have looked at the following question : How to setup django-1.8 to use jinja2 http : stackoverflow.com questions 30288351 how-to-setup-django-1-8-to-use-jinja2 .. . .. . but none of them clearly explain how to use jinja2 in an put-togther manner . I just started using django and don t know all the lingo in the docs . I would really appreciate the help . .. . Answer : From the Django website https : docs.djangoproject.com en 1.8 topics templates configuration please look at this for further guidance in settings.py : .. . .. . BACKEND is a dotted Python path to a template-engine class implementing Django s template backend API . The built-in backends are django.template.backends.django.DjangoTemplates and django.template.backends.jinja2.Jinja2 . Basically find out where-in your settings.py file there is a TEMPLATES variable and set the backend or make sure the backend resembles the one above as Jinga is built-in . If all fails replace the django.template.backends.. . with django.template.backends.jinja2.Jinja2 though I don t think that is necessary .", "Question : I am using jinja2 and I want to call a python function as a helper using a similar syntax as-if I were calling a macro . jinja2 seems intent on preventing me from making a function-call and insists I repeat myself by copying the function into a template as a macro . Is there any straightforward way to do this And is there any way to import a whole set of python functions and have them accessible from jinja2 without going through a whole lot of rigamarole such as writing an extension .. . Answer : I think jinja deliberately makes it difficult to run arbitrary python within a template . It tries to enforce the opinion that less logic in templates is a good thing . You can manipulate the global namespace within an Environment instance to add references to your functions . It must be done before you load any templates . For example : Comment : I discovered this also -- you can add a module using something like this : import utils.helpers env.globals helpers utils.helpers Comment : @Lee . Yes you can inject namespaces modules functions class instances etc . It is useful but not as flexible as other template engines like mako . Still jinja has other good points . I d be grateful if you accept the answer if it helped : Comment : did the trick for me while doing my app engine project webapp2 and jinja2 . thanks", "Question : I have a python program that uses Jinja2 template-engine to render html pages on back-end . I have a task to migrate the major part of data rendering to JsRender engine to process it on front-end . But being in same file they conflict . How does one use both front- and back-end template engines together Could you give please some examples Comment : also you can use raw in Jinja2 .. . Answer : I assume your issue is with Jinja2 and JsRender both using .. . delimiters . You can choose to use different delimiters in JsRender . See Setting tag delimiters for JsRender http : www.jsviews.com settings delimiters for documentation . See also the equivalent question which was answered here : http : stackoverflow.com a 29497325 1054484", "Question : If I return a Jinja2 template like so : return render response home.htm context .. . .. . How do then get a list of the variables in context from within the template Comment : How about reading the template source What s wrong with that .. . Answer : Technically because context is not passed as a named dictionary a little work is required to generate a list of the context variables from inside a template . It is possible though . 1 . Define a Jinja context function http : jinja.pocoo.org 2 documentation api jinja2.contextfunction to return the jinja2.Context object which is essentially a dictionary of the global-variables functions .. . .. . 2 . Make that function available in the global namespace i.e . a jinja2.Environment or jinja2.Template globals dictionary .. . .. . 3 . Optionally filter objects from the context for instance use callable to skip Jinja s default global helper functions range joiner etc . . This may be done in the context function or the template wherever it makes the most sense . Example : .. . .. . Alternately call render response with home.htm context context to make the other solution work . Comment : Much thanks . I bow to your superior Jinja2 knowledge . Comment : Note that because of the callable check your solution would disregard functions that have explicitly been passed as part of the context . Probably doesn t happen often but could make a difference . Comment : True . This simple solution can definitely be improved . For instance if template is a global get context can return a new dictionary based on context but without keys that also exist in template.globals . Comment : Added a feature request to enable this by default github.com mitsuhiko jinja2 issues 174 https : github.com mitsuhiko jinja2 issues 174 Comment : @techtonik Any news I struggle with exactly this", "Question : Does Jinja2 support template-relative paths e.g . here s other template.html to include other templates relative to the current template s place in the filesystem .. . Answer : According to the documentation for jinja2.Environment.join path http : jinja.pocoo.org 2 documentation api jinja2.Environment.join path support for relative template paths is possible by overriding join path to implement template path joining .", "Question : I am trying to implement custom template formatting in python accomplishing two things .. . .. . 1 . Django like delimiter .. . .. . placeholder .. . .. . eg . .. . .. . 1 . If there is key error or value error skip that identifier . class MyTemplate Template : delimiter . . it is only for clarification purpose .. . .. . data HELLO world this is 1st program program .. . .. . mt MyTemplate data .. . .. . mt.substitute world WORLD .. . .. . then o p should be .. . .. . As per my knowledge we can use templates engines like jinja2 but that is my last option . I am preferring to do it using python native libraries . Though if you want to suggest any template-engine if possible with example then it will be also good . Thanks in advance . .. . Answer : If all you want is to just do simple string-formatting python includes the str.format method as well as Template Strings https : docs.python.org 2 library string.html template-strings . Straight from the docs .. . .. . If you need to introduce any sort of logic into the templates then I would be so bold as to say it will be way over your head to write yourself properly and you ll want to use a library . Jinja2 http : jinja.pocoo.org docs is an excellent template library for general purpose use . If you ve ever used Django s templating system it will be a breeze to use as Jinja2 is based on Django . Some code I ve used with Jinja2 .. . .. . In my template.html .. . .. . One difference between Django templating and Jinja2 templating is that Jinja2 s philosophy wasn t about making it easy for designers to use so function-calls are allowed within templates .", "Question : I have been looking on how to use jinja2 in django-1.8 but there is no complete source for using django with jinja2 . I was wondering if you guys knew the process for using jinja2 in django . I have looked through the the official documentation and I have looked at the following question : How to setup django-1.8 to use jinja2 http : stackoverflow.com questions 30288351 how-to-setup-django-1-8-to-use-jinja2 .. . .. . but none of them clearly explain how to use jinja2 in an put-togther manner . I just started using django and don t know all the lingo in the docs . I would really appreciate the help . .. . Answer : Mixed Django and Jinja2 Template : Environment : Django 1.8 + Jinja2 .. . .. . I have some legacy django-templates and it s not so easy to rewrite them all at once to jinja2 so add this custom jinja include some template.jinja tag to my custom tags.py : .. . .. . Call it like this from your django template : load my custom tags jinja include some template.jinja", "Question : Can someone please explain step-by-step how to use tell django-1.9 to use jinja2 template rather than the DTL . I have tried so many tutorials online but none seems to work there is always an error somewhere . Plus i could not find a single youtube tutorial that explains how to use jinja2 with django . Even the django documentation does not explain how to use jinja2 although they claim it can be done . Thank you in advance . .. . Answer : First you must install the django-jinja2 template backend : this is which I know . Then in your settings.py you must define the backend for Jinja2 templates : .. . .. . Notice I ve define the match extension for the Jinja2 templates in case you wanna use the DTL just leave the backend of the Django Templates . best regards", "Question : Using Jinja2 how do I format a date field I know in Python I can simply do this : .. . .. . But how do I format the date in Jinja2 Thanks . .. . Answer : Google App Engine users : If you re moving from Django to Jinja2 and looking to replace the date filter note that the formatting codes are different . The strftime codes are here : http : docs.python.org 2 library datetime.html strftime-and-strptime-behavior", "Question : I have been looking on how to use jinja2 in django-1.8 but there is no complete source for using django with jinja2 . I was wondering if you guys knew the process for using jinja2 in django . I have looked through the the official documentation and I have looked at the following question : How to setup django-1.8 to use jinja2 http : stackoverflow.com questions 30288351 how-to-setup-django-1-8-to-use-jinja2 .. . .. . but none of them clearly explain how to use jinja2 in an put-togther manner . I just started using django and don t know all the lingo in the docs . I would really appreciate the help . .. . Answer : Frist you have to install jinja2 : .. . .. . Then modify your TEMPLATES list in the settings.py to contain the jinja2 BACKEND : .. . .. . where templates jinja2 is the directory with your jinja2 template files . And in your views.py file : .. . .. . This makes static and url available in your Jinja2 templates . P.S . For more details see this article http : jonathanchu.is posts upgrading-jinja2-templates-django-18-with-admin . Comment : And how can we add context processors", "Question : I wish to compress the JS and CSS in my Jinja2 based Python project for Google App engine . I have installed django-pipeline and added it to my project path . Some of the documentation http : django-pipeline.readthedocs.org en latest usage.html is not clear to me . Particularly Jinja2 usage . For Django Templates in base.html example http : www.glenrobertson.co.nz blog 2013 02 04 django-js-css-compression-with-pipeline.html insert : .. . .. . I assume the equivalent for Jina2 would be something like .. . .. . But this gives UndefinedError : compressed css is undefined .. . .. . My question is how to load the compressed template in Jinja2 This is not done in the same way as Django and I can t find an example . The docs also say .. . .. . In order to use Django Compressor s Jinja2 extension we would need to pass compressor.contrib.jinja2ext.CompressorExtension into environment : .. . .. . I have done that . The docs also state .. . .. . Unlike the Django template tag implementation the Jinja2 implementation uses different templates so if you wish to override them please override pipeline css.jinja and pipeline js.jinja . I am not sure if I need to do anything here . My setings.py includes the following statements : Comment : The correct syntax for a seems to be javascript main stylesheet main However it does not load the PIPELINE JS dictionary in settings.py . Pipeline 1.5 adds support for Django 1.8 but drops support for Django 1.6 . However google-app-engine only supports Django 1.5.8 . So there could be compatibility issues . There are no public examples of projects using jinja2 templates django-pipeline and app engine . Try something else .. . Answer : Going to describe things which worked for me on local env not GAE . If you follow django-pipeline official guide http : django-pipeline.readthedocs.org en latest usage.html jinja it states that you should add pipeline.templatetags.ext.PipelineExtension to your environment which for me meant updating my settings.py to this : .. . .. . How to migrate your template For me it was dead easy I just removed load pipeline from top of the template and it worked .", "Question : I am using jinja2 and I want to call a python function as a helper using a similar syntax as-if I were calling a macro . jinja2 seems intent on preventing me from making a function-call and insists I repeat myself by copying the function into a template as a macro . Is there any straightforward way to do this And is there any way to import a whole set of python functions and have them accessible from jinja2 without going through a whole lot of rigamarole such as writing an extension .. . Answer : For those using Flask put this in your init .py : .. . .. . and in your template call it with clever function Comment : Down voted as question asked about Jinja2 and answer is Flask specific . Comment : Upvoted since the answer clearly says it s intended for Flask .", "Question : Does Jinja2 support template-relative paths e.g . here s other template.html to include other templates relative to the current template s place in the filesystem .. . Answer : The cleanest way to overcome this limitation would be with a jinja2 extension that will allow to import relative template names https : gist.github.com wooyek 8d4c37d684a5ba38b8c1 .. . .. . Something in the likes of :", "Question : I m trying to insert jQuery templates http : api.jquery.com jQuery.template into Jinja2 http : jinja.pocoo.org docs api templates . Alas they both in the default setup use the mustaches to indicate expressions and literals respectively . I m inserting my jQuery templates into HTML with script tags like this : .. . .. . If the above is in a Jinja template however it balks because Jinja tries to interpret each as a literal . In the circumstances we ve lots of templates already it isn t practical to change Jinja2 s start and end delimiters for variables . Plus it s confusing decreases interoperability and requires extra training . It is preferable to avoid this option . So the two alternative things I ve thought of to solve this are : .. . .. . 1 . Jinja2 escaping each and which I m not quite sure how to do best perhaps but that s verbose .. . .. . 2 . More practical - perhaps ideal - would be telling Jinja2 to not parse a block of code perhaps via a jQuery extension . I d be grateful for thoughts and feedback . Thank you for reading . Comment : I too have an ambiguous mustache Reminds me it s time to shave . : .. . Answer : You can use the raw endraw construct to ease your escaping woes straight from the Jinja2 docs http : jinja.pocoo.org docs templates escaping . Example : Comment : While escaping and block escaping are nice I m coming to the conclusion that the best way is to make sure the server delimiters are all exclusive to the server and the client delimiters are all exclusive to the client so there is zero escaping required . It seems this is doable by configuring the server template-engine to use your own customized delimiters . This gives one the freedom to pick server and client-side templating without having escaping be an issue . Note additionally one should make sure that BOTH engines do not conflict with JavaScript or other client-side coding . Comment : I don t know if I ll need it but I d like to have the freedom to use Jinja2 features inside my Handlebars templates . The opposite would be appealing too though to be able to use the same language on server and client so I can render a default version on the server and then use the same templates to have the client update it .", "Question : null .. . Answer : If I install as suggested in django-1.9 docs https : docs.djangoproject.com en 1.9 topics templates django.template.backends.jinja2.Jinja2 with two items in TEMPLATES the first is the jinja2 backend the second is the django backend : .. . .. . .. . .. . but WITHOUT environment setting then appears to work provided I remove also auto reload setting for both jinja and django otherwise get .. . .. . If I add myproj.jinja2.py with content as shown in django docs still no environment option I get : .. . .. . If I change from jinja2 import Environment to from jinja2.environment import Environment .. . .. . In light of this post https : groups.google.com forum msg django-users pytjLOVUwmM gbiDmswSuq4J I try renaming jinja2.py to jinja2 settings.py and add this TEMPLATE options : .. . .. . Tried removing django backend altogether but got the same error as above . Not sure what else to try Comment : If you are using Python 2 make sure you have included the from future import absolute import line from the docs . If you forget to include it your jinja2.py module might clash with the from jinja2 import Environment import .", "Question : When I m running Jinja2 in Google App Engine I get useless debugging information . I gather this is because of this item in the FAQ : .. . .. . My tracebacks look weird . What s happening http : jinja.pocoo.org 2 documentation faq my-tracebacks-look-weird-what-s-happening .. . .. . If the speedups module is not compiled and you are using a Python installation without ctypes Python 2.4 without ctypes Jython or Google s AppEngine Jinja2 is unable to provide correct debugging information and the traceback may be incomplete . There is currently no good workaround for Jython or the AppEngine as ctypes is unavailable there and it s not possible to use the speedups extension . While there is no good workaround for this at the moment is there any workaround so that the information printed when exceptions arise can be made more helpful Thank you for reading . Brian Comment : My solution is to simply debug locally . Although that can be hard since you can t always perfectly mimic the app engine environment and variables . Comment : i use jinja2 and debugging information given seems to be quite helpful . at least it point to file and line number . do you want more specific information Comment : @iamgopal : Are you using Jinja2 in Google App Engine Comment : @Brian M . Hunt : I ve added a bounty to this question since I also find it a very interesting question . Let s hope someone else knows or wrote a fitting solution for this . I ve recently modified werkzeug a little to get the console working in the app engine but jinja2 still seems less pretty . Comment : I suspect the only way to get it to work would be to monkey patch the GAE dev svr so it allows c modules to be loaded.. . I have suggested this feature to the gae team but who knows if they will ever get to it .. . Answer : I use the following monkeypatch to enable slightly more helpful information when an exception occurs during Jinja2 template rendering : .. . .. . This will result in slightly more accurate exception tracebacks in your error logs . I don t think it usually shows you exactly what went wrong but if I remember correctly it sometimes does but it will at least narrow the exception down to the correct template . Why this works I do not know or cannot remember . As an example I just added some code that will trigger an exception to one of my templates . Under the development server this is what the normal exception handler shows me : .. . .. . But the exception is not in the accounts base.html template it s in accounts edit card.html . This is the most frustrating part of debugging Jinja2 template exceptions on App Engine : The source of the exception is almost always misrepresented . In my experience the source is usually reported as either the parent template or as some template macro . With the exception-logging monkeypatch installed the same exception generates this traceback in the logs : .. . .. . There s still a lot of extraneous information here but this traceback at least points me in the right direction . It claims that the problem is on line 54 of accounts edit card.html the correct template but the actual exception occurs at line 86 . But given the correct template and the correct exception I can pretty easily find that the troublesome code is this .. . .. . where there is no sequence variable in the template context . This isn t a perfect solution but I ve found it mighty helpful .", "Question : When I m running Jinja2 in Google App Engine I get useless debugging information . I gather this is because of this item in the FAQ : .. . .. . My tracebacks look weird . What s happening http : jinja.pocoo.org 2 documentation faq my-tracebacks-look-weird-what-s-happening .. . .. . If the speedups module is not compiled and you are using a Python installation without ctypes Python 2.4 without ctypes Jython or Google s AppEngine Jinja2 is unable to provide correct debugging information and the traceback may be incomplete . There is currently no good workaround for Jython or the AppEngine as ctypes is unavailable there and it s not possible to use the speedups extension . While there is no good workaround for this at the moment is there any workaround so that the information printed when exceptions arise can be made more helpful Thank you for reading . Brian Comment : My solution is to simply debug locally . Although that can be hard since you can t always perfectly mimic the app engine environment and variables . Comment : i use jinja2 and debugging information given seems to be quite helpful . at least it point to file and line number . do you want more specific information Comment : @iamgopal : Are you using Jinja2 in Google App Engine Comment : @Brian M . Hunt : I ve added a bounty to this question since I also find it a very interesting question . Let s hope someone else knows or wrote a fitting solution for this . I ve recently modified werkzeug a little to get the console working in the app engine but jinja2 still seems less pretty . Comment : I suspect the only way to get it to work would be to monkey patch the GAE dev svr so it allows c modules to be loaded.. . I have suggested this feature to the gae team but who knows if they will ever get to it .. . Answer : Not sure if that will be helpful but it might be possible to at least add block templatetag like django s debug which will at least help to localize the problem . Comment : I m referring to this github.com citylive Django-Template-Tags blob master http : github.com citylive Django-Template-Tags blob master templatetags debug.py additional templatetag .", "Question : I am using jinja2 and I want to call a python function as a helper using a similar syntax as-if I were calling a macro . jinja2 seems intent on preventing me from making a function-call and insists I repeat myself by copying the function into a template as a macro . Is there any straightforward way to do this And is there any way to import a whole set of python functions and have them accessible from jinja2 without going through a whole lot of rigamarole such as writing an extension .. . Answer : Will output : .. . .. . Works with Jinja2 version 2.7.3 Comment : Why the downvote Comment : Probably because you downvoted everyone else s answers : Comment : @BorkoKovacev that s not a good reason . I only down voted 2 answers answers which were about Flask rather than Jinja2 . If they want to edit their answers to be on topic and about Jinja2 I will up vote them . Comment : I believe you were right to downvote . Comment : Tx @BorkoKovacev :", "Question : I m using django-1.9 with jinja2 I installed the module django-jinja and I load the template well but I can t use the basic filters of jinja2 in the template and I can t use any basic expression of jinja2 . When I try to use some basic expression of jinja2 I get the TemplateSyntaxError . This is my setting.py with jinja2 : .. . .. . My url.py Loading the template.. . .. . .. . My jinja2.py file .. . .. . And my index.jinja this template bring me back this error : TemplateSyntaxError at Could not parse the remainder : odd even from loop.cycle odd even .. . .. . Thanks in advance for the help.. . .. . Answer : You ve defined a whole dictionary of settings but you haven t actually assigned it to anything . It needs to be called TEMPLATES - see the settings docs https : docs.djangoproject.com en 1.9 ref settings templates . Note I m not sure why you ve installed a third-party library Django 1.9 includes a Jinja2 template backend . Comment : Yes it is defined A mistake ." ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
form-data@form-data@84
form-data -- formdata is a javascript object interface intended to build multipart @placeholder in ajax more easily .
{ "confidence": [ 37.679195404052734, 37.62810516357422, 36.46319580078125, 34.83888244628906, 34.83374786376953, 32.919960021972656, 32.35874557495117, 31.83196449279785, 31.76398277282715, 31.728607177734375, 31.037506103515625, 30.911088943481445, 30.30312728881836, 30.208707809448242, 30.047561645507812, 29.7298526763916, 29.690006256103516, 29.521167755126953, 29.318347930908203, 29.152515411376953, 28.86835289001465, 28.84259605407715, 28.332820892333984, 28.30694007873535, 28.18166160583496, 28.14848518371582, 27.963937759399414, 27.92526626586914, 27.89095687866211, 27.5819149017334, 27.5819149017334, 27.572561264038086, 27.506290435791016, 27.495227813720703, 27.474271774291992, 27.27711296081543, 27.184274673461914, 27.16636085510254, 27.057348251342773, 26.922504425048828, 26.880630493164062, 26.703237533569336, 26.541709899902344, 26.541709899902344, 26.235157012939453, 26.235157012939453, 26.20604133605957, 26.1038818359375, 25.979421615600586, 25.933509826660156, 25.88148307800293, 25.88148307800293, 25.88148307800293, 25.818801879882812, 25.809358596801758, 25.732622146606445, 25.708101272583008, 25.437480926513672, 25.36380386352539, 25.185256958007812, 25.185256958007812, 25.135005950927734, 25.135005950927734, 24.999271392822266, 24.976362228393555, 24.811769485473633, 24.637121200561523, 24.5904541015625, 24.46718978881836, 24.46718978881836, 24.450246810913086, 24.30864715576172, 24.2424373626709, 24.20749855041504, 24.20749855041504, 24.076536178588867, 24.023021697998047, 24.003286361694336, 23.92174530029297, 23.760156631469727, 23.760156631469727, 23.760156631469727, 23.7567195892334, 23.702354431152344, 23.611286163330078, 23.611286163330078, 23.398635864257812, 23.351015090942383, 23.190753936767578, 23.190753936767578, 23.190753936767578, 23.190753936767578, 23.190753936767578, 23.150917053222656, 23.150917053222656, 23.150917053222656, 23.143739700317383, 23.143739700317383, 23.107967376708984, 23.10331916809082 ], "content": [ "try this .. . .. . Get your file .. . .. . Now append your file to formdata and send it by ajax .. . .. . Note : form enctype should be multipart formdata", "The HTML5 FormData API sends a multipart form-data request .", ".. . .. . It s inconvenient not being able to customise your multipart FormData with javascript .", "For ajax uploading purpose you should create object of FormData new FormData and append the data separately .", "multipart form-data is supported .", "There s no way of getting the data out of a FormData object it s just intended for you to use to send data along with an XMLHttpRequest object for the send method .", "Use multipart form-data", "stackoverflow.com questions 7899513 http : stackoverflow.com questions 7899513 send-multipart-formdata-with-jquery-ajax-in-ie", "Update : the XHR spec https : xhr.spec.whatwg.org interface-formdata now includes several more functions to inspect FormData objects .", "Usually in request headers you will find an encrypted text like the one given below : multipart form-data boundary ----WebKitFormBoundaryUuVvGDydAdTf3Bmp .. . .. . And when you try to alert the form-data it will show object formdata .", "I m using ajax to submit a multipart form with array text fields and files .", "How can I quickly get the data from the form using FormData", "I solved it by sending the JSON string together with FormData object in ajax POST .", "FormData and Form hierarchy .. . .. . The formData hierarchy reflects the form hierarchy .", "You cannot see the data inside a FormData object through inspection .", "well there are few thigns you need to consider while using formData with ajax..and you can append data to FormData using append method of FormData .", "I am trying to submit a file from a form using jQuery s ajax method : .. . .. . This results in the error TypeError : append called on an object that does not implement interface FormData .", "Sending multipart formdata with jQuery.ajax http : stackoverflow.com questions 5392344 sending-multipart-formdata-with-jquery-ajax .. . .. . It looks like you might be running into jQuery adding content-type headers which causes the boundary string to be missing .", "But you re sending a multipart form-data request .", "The method setPropertyByClass .. . is intended to set the value of a form-data property in a form-data object .", "Also make sure that the form is multipart", "To quote .. . .. . If data is a FormData Let the request entity body be the result-of running the multipart form-data encoding algorithm with data as form-data set and with UTF-8 as the explicit character-encoding .", "To AJAX a file with FormData you have to pass a File object to FormData.append what you are passing is a data-uri which is just a string .", "A file in a multipart form-data body looks something like this", "BTW this is in the spec : w3.org TR XMLHttpRequest2 interface-formdata http : www.w3.org TR XMLHttpRequest2 interface-formdata", "After looking at these http : hacks.mozilla.org 2010 05 formdata-interface-coming-to-firefox Mozilla https : developer.mozilla.org en-US docs Web Guide Using FormData Objects articles https : developer.mozilla.org en-US docs Web API FormData it looks like there is no way to get data out of a FormData object .", ".. . Let mime type be the concatenation of multipart form-data a U+0020 SPACE character boundary and the multipart form-data boundary string generated by the multipart form-data encoding algorithm .", "Edit 1 One more thing to consider is that for cases that you want to upload files using ajax you can not set data like FormData this .", "I m trying to upload a file using jQuery Ajax + FormData object found on Chrome and Firefox browsers .", "But console.log formData shows formData is empty .", "But console.log formData shows formData is empty .", "On submit the data gets captured and new FormData object gets created with it .", "Form .. . .. . Create FormData Object .. . .. . Question .. . .. . Is the filename of my file accessible even though it hasn t been specifically defined for DOM manipulation and inserting into database", "I seem not to get additionally data added to formData .", "Thanks - I get that the FormData is storing the form-data and also that it s toString method used by console.log is useless .", "You could also make a wrapper object that logs the fields and appends to the FormData and then check that for the values not forgetting to send the inner FormData instead of the wrapper object .", "Append the Blob object to your FormData object .. . 5 .", "i have implemented this script for uploading files with ajax it works perfect in other browsers except for explorer i noticed that formData is not supported by IE9 and less are there any alternatives for formData in IE and i want use clean javascript", "I want to create a FormData object out of them .", "This https : developer.mozilla.org en-US docs Web Guide Using FormData Objects states : .. . .. . You can also append a File or Blob directly to the FormData object like this : .. . .. . data.append myfile myBlob filename.txt .. . .. . But it doesn t specify whether a filename is automatically added when creating the FormData object from an existing form .", "A form-data property is generated if the associated form has a member variable whose setter and getter is annotated with @FormData .", "Here s an SO thread with a few approaches to that : Get form-data with Javascript Jquery http : stackoverflow.com questions 2276463 get-form-data-with-javascript-jquery", "I need to pass both FormData and JSON object in an ajax call but I get a 400 Bad Request error .", "How can I send both FormData and JSON object in a single ajax request", "thanks - this was a useful quick way to get the FormData object by typing it into the Chrome console .", "At least can I check if formdata object has a file inside", "You don t need to loop through the form fields at all as you can just give the form element to the FormData constructor .", "It exists because the latest specification of FormData https : xhr.spec.whatwg.org interface-formdata requires it to be exposed to Worker contexts .", "As per MDN documentation on FormData https : developer.mozilla.org en-US docs Web API FormData .. . .. . An object implementing FormData can directly be used in a for...of structure instead of entries : for var p of myFormData is equivalent to for var p of myFormData.entries .", "I think the disconnect here is that you re expecting FormData to work like a vanilla JavaScript object or array and let you directly look at and manipulate its contents .", "I use angular js and ajax and want to send a formdata to PHP .", "I wish to upload an image to the server via ajax using jQuery and FormData .", "I m using FormData to make a AJAX 2 POST to a Servlet .", "If you are working in servlet 3.0+ environment you can also use its multipart support to easily finish the multipart-data parsing job .", "I obtain the same result : if I debug the code with a point break after var form-data new FormData form 0 the object is still empty .", "When I test this in Chrome it shows FormData append : function .. . which is to say it s a FormData object which is what we expected .", "Next is the function that assigns the file to a new FormData object .", "According to XMLHttpRequest2 TR http : www.w3.org TR XMLHttpRequest2 interface-formdata FormData constructed data is explicitly encoded to UTF-8 .", "You can only use them for building FormData to send via an AJAX request .", "ImageEditorForm returns a jQuery object https : learn.jquery.com using-jquery-core jquery-object and FormData requires a DOM Node .", "You ll have to send the formData-object somewhere and then get the files from a req-object or something like that .", "I tried parsing the multipart data which is received as part and converted into buffer and submitted into form-data module .", "@cbroe i tried but still empty with a Warning : Missing boundary in multipart form-data POST data", "But when this algorithm is executed from the FormData constructor no submitter is specified so no buttons should be included in the form-data set .", ".. . .. . @FormData configuration .. . .. . You can influence the generation of the formData with the formData annotation .", "Your image data is nothing more than a string so append it to your FormData object like this : .. . .. . Then on your server-side you can store that directly in a database or convert it to an image and store it on the file system .", "I found this post Convert Data URI to File then append to FormData http : stackoverflow.com questions 4998908 convert-data-uri-to-file-then-append-to-formdata 5100158 to be quite helpful .", "I think FormData was designed to do one very specific thing the spec certainly doesn t mention any additional functionality http : www.w3.org TR XMLHttpRequest2 interface-formdata and its implementation does that thing only .", "This is my little javascript code : .. . .. . I don t know how to append the URL to the formData .", "I m a javascript noob - am I just doing something completely wrong here or are these browsers not correctly supporting the FormData API", "You are able to use the jQuery ajax .ajax function and the FormData JavaScript API to upload an image file from your Trigger.io mobile app directly to Amazon S3 as you have done on the web .", "I always use this.It send form-data using ajax", "Follow these links to get more insight on asynchronous behaviour of javascript and how AJAX request callbacks are handled .", "There is something I can t understand in FormData .", "I m playing around with the FormData API .", "I found an error I have to remove enctype multipart form-data from form .", "Regarding Error 2 : If a parameter https : developer.mozilla.org en-US docs Web API FormData FormData is passed to the FormData constructor it must be a HTML Form element which does not seem to be the case in your code .", "When you create the FormData in Javascript it doesn t know that the submission is related to a particular submit button so it can t add that automatically to the FormData .", "I use form-data https : github.com form-data form-data .", "XHR will recognise the FormData object and set it to the correct value which that is not .", "Here the code for FormData which doesn t use File object :", "Added a for-loop and changed .serialize to .serializeArray for object-reference in a .each to append to the FormData .", "I have created a file into the formData like this : .. . .. . how do i get the content out of the formData", "If it is not automatically appended is the only option to manually create a FormData object through multiple append statements in which case filename definition is possible", "There is no way to retrieve the files after you ve appended them in to a formData-object I believe .", "I am stuck with an inconsistent bug when I try to submit a FormData object to the server via the http method .", "I m trying to get a set of keys input names or similar and values input values from a web form : .. . .. . According to the FormData documentation https : developer.mozilla.org en-US docs Web Guide Using FormData Objects formData should contain the keys and values from the form .", "All the request parameters are embedded into the multipart data .", "Chrome and Firefox seem to support reading from FormData .", "I tried with xhr sending the formData but nothing .", "FormData can t be inspected from the web developer console .", "I mean that formData has no enumerable keys .", "Why can I not log the FormData in my console", ".. . .. . A possible way to solve your problem is to change the generated table data in the formData .", "How can I post file and input string data with FormData", "Please notes var test new FormData and data : test .", "Basically AJAX is nothing but a plain HTML request based on JavaScript .", "Basically AJAX is nothing but a plain HTTP request based on JavaScript .", "When you append to FormData the way to check the appended information on the server is by a simple POST your appended data query .", "http : stackoverflow.com questions 13963022 angularjs-how-to-implement-a-simple-file-upload-with-multipart-form" ] }
{ "confidence": [ 46.307373046875, 45.58666229248047, 44.49237060546875, 44.322265625, 43.494102478027344, 43.49273681640625, 43.04579544067383, 42.94963836669922, 41.91486358642578, 41.327518463134766, 40.90666198730469, 40.31767272949219, 39.7974853515625, 39.58836364746094, 39.43412399291992, 39.26197052001953, 38.934303283691406, 37.950748443603516, 37.812774658203125, 37.700870513916016 ], "content": [ "Question : I m playing around with the FormData API . Here https : jsfiddle.net tLqch5x2 2 is the fiddle I m using - I m trying to inject blobs into my form and submit via AJAX . Browser behaviour is a little .. . odd : .. . .. . Chrome 50 in Ubuntu .. . .. . Not able to do it gives : .. . .. . But I thought FormData.set was supported now It seems to work with non-blobs Firefox 46 in Ubuntu .. . .. . Doesn t seem work if FormData object is not initialized with a DOM object that already has the necessary file inputs appended normal inputs are posted however . FormData.set does not seem to work with file inputs and blobs you ll note that thumb0 is null in the payload despite calling fd.set thumb0 blob thumb0.jpg on it . You can verify that it s set by doing console.log fd.get thumb0 just after setting . You ll also note that the payload of image0 is incorrectly your original image not the resized canvas image . .. . .. . It s inconvenient not being able to customise your multipart FormData with javascript . I m a javascript noob - am I just doing something completely wrong here or are these browsers not correctly supporting the FormData API How can I submit image0 and thumb0 correctly in my fiddle .. . .. . Edit : OK going to bounty this . I know there are big jquery-dependent libraries like blueimp out there and I think they base64 the data rather than transmitting as a file input plus I want to avoid jquery . I only have to support the latest Chrome or Firefox for this project and I m really hoping I can keep the code as clean as the FormData API seems to suggest I might be able to . Can anyone successfully grab an image off a canvas and insert it into the POST payload as a file I d like to be able to access it in request.FILES in django . Comment : I might be wrong but shouldn t you send the files object to the server instead of the blob fd.set image e.target.files 0 for single file Also make sure that the form is multipart Comment : Looking at the request s Request Headers and the Request Payload the images seem to be sent just fine . And the server seems to return a 404 and not 400 or something . Comment : Shouldn t you make sure that it posts to your actual server first Right now it posts to a domain of jsfiddle . .. . Answer : I think one thing you are missing here is the asynchronous nature of javascript . In your ajaxSubmit method - .. . .. . Try synchronising the code like this .. . .. . also as jornare has suggested you should comment out the line .. . .. . which is causing error in chrome . Invoke it after the loading image is done . also you have multiple elements with same id .. . .. . this isn t creating problem in your code but the id s should be different . UPDATE .. . .. . Here is the working fiddle https : jsfiddle.net tLqch5x2 5 . Note : change the request url to your corresponding url . Follow these links to get more insight on asynchronous behaviour of javascript and how AJAX request callbacks are handled . How does Asynchronous Javascript Execution happen http : stackoverflow.com questions 7104474 how-does-asynchronous-javascript-execution-happen-and-when-not-to-use-return-st .. . Developer Mozilla - Synchronous and asynchronous requests https : developer.mozilla.org en-US docs Web API XMLHttpRequest Synchronous and Asynchronous Requests .. . How does javascript handle AJAX request in background . http : stackoverflow.com questions 7575589 how-does-javascript-handle-ajax-responses-in-the-background 7575649 7575649 Comment : Thanks that was the problem . Can you recommend a link where I can read up on the asynchronous execution of functions Comment : @Escher are you facing any other problem Comment : No sorry for the delay bounties can t be awarded within 24hrs of offering them . I tried yesterday but it wouldn t let me .", "Question : I m trying to upload a file using jQuery Ajax + FormData object found on Chrome and Firefox browsers . The code I m using to do it is the following : .. . .. . By looking at the developer tools I can see that the request is formed correctly however express is recognising the contents inside req.body instead of req.files . Here is the request payload image : .. . .. . Request payload http : i.stack.imgur.com wVTIY.png .. . .. . Express config : .. . .. . What s what I am doing wrong Thanks a lot . .. . Answer : Because its not a file its just a string . To AJAX a file with FormData you have to pass a File object to FormData.append what you are passing is a data-uri which is just a string . A file in a multipart form-data body looks something like this Comment : You re right I was sending the FileReader result when I needed to send the raw file object", "Question : I have created a file into the formData like this : .. . .. . how do i get the content out of the formData like the filename and the file something like this : fd.filename fd.getData . or fd.get file to retrieve the file back .. . Answer : You cannot get the filedata like that . If you want to send the file to a servlet . try this .. . .. . Get your file .. . .. . Now append your file to formdata and send it by ajax .. . .. . Note : form enctype should be multipart formdata", "Question : I m playing around with the FormData API . Here https : jsfiddle.net tLqch5x2 2 is the fiddle I m using - I m trying to inject blobs into my form and submit via AJAX . Browser behaviour is a little .. . odd : .. . .. . Chrome 50 in Ubuntu .. . .. . Not able to do it gives : .. . .. . But I thought FormData.set was supported now It seems to work with non-blobs Firefox 46 in Ubuntu .. . .. . Doesn t seem work if FormData object is not initialized with a DOM object that already has the necessary file inputs appended normal inputs are posted however . FormData.set does not seem to work with file inputs and blobs you ll note that thumb0 is null in the payload despite calling fd.set thumb0 blob thumb0.jpg on it . You can verify that it s set by doing console.log fd.get thumb0 just after setting . You ll also note that the payload of image0 is incorrectly your original image not the resized canvas image . .. . .. . It s inconvenient not being able to customise your multipart FormData with javascript . I m a javascript noob - am I just doing something completely wrong here or are these browsers not correctly supporting the FormData API How can I submit image0 and thumb0 correctly in my fiddle .. . .. . Edit : OK going to bounty this . I know there are big jquery-dependent libraries like blueimp out there and I think they base64 the data rather than transmitting as a file input plus I want to avoid jquery . I only have to support the latest Chrome or Firefox for this project and I m really hoping I can keep the code as clean as the FormData API seems to suggest I might be able to . Can anyone successfully grab an image off a canvas and insert it into the POST payload as a file I d like to be able to access it in request.FILES in django . Comment : I might be wrong but shouldn t you send the files object to the server instead of the blob fd.set image e.target.files 0 for single file Also make sure that the form is multipart Comment : Looking at the request s Request Headers and the Request Payload the images seem to be sent just fine . And the server seems to return a 404 and not 400 or something . Comment : Shouldn t you make sure that it posts to your actual server first Right now it posts to a domain of jsfiddle . .. . Answer : Looking through your fiddle you were cleaning up the dataURL before it was loaded and therefore the thumbnails did not load at all . The 404 .. . .. . I made an updated fiddle https : jsfiddle.net tLqch5x2 3 .. . .. . It still has a 404 but now from trying to post to a url that does not exist on jsfiddle.net . Please give it a try in your environment . Note that there are also some other minor changes in both the html and the code . improper naming the images and no need to reference the existing form when creating the new form-for submission Comment : Thanks obviously I know very little about memory-management in javascript . The 404 is OK I just wanted to inspect the request payload . In this case I didn t need to reference the existing form when creating a new one for submission but the project I am working on has about 20 more fields that are populated from the form hence why I use it to instantiate new FormData .", "Question : I have created a file into the formData like this : .. . .. . how do i get the content out of the formData like the filename and the file something like this : fd.filename fd.getData . or fd.get file to retrieve the file back .. . Answer : There is no way to retrieve the files after you ve appended them in to a formData-object I believe . You ll have to send the formData-object somewhere and then get the files from a req-object or something like that . In my case angularJS + nodeJS I tested this from an answer on SO link below : .. . .. . Angular : .. . .. . Node expressJS : .. . .. . To see what you can do with the file read this : http : nodejs.org api fs.html .. . .. . The code is taken from : AngularJS : how to implement a simple file-upload with multipart form http : stackoverflow.com questions 13963022 angularjs-how-to-implement-a-simple-file-upload-with-multipart-form", "Question : i have implemented this script for uploading files with ajax it works perfect in other browsers except for explorer i noticed that formData is not supported by IE9 and less are there any alternatives for formData in IE and i want use clean javascript Comment : I don t think there is any alternative Comment : Check this similar post there isn t really any way around this . stackoverflow.com questions 7899513 http : stackoverflow.com questions 7899513 send-multipart-formdata-with-jquery-ajax-in-ie .. . Answer : FormData in IE is only supported from IE10 after doing some research the best solution for this my opinion would be using ajaxForm : http : malsup.com jquery form works perfect in IE8 9 not sure about IE7 Comment : Works perfect if you have a better plugin please do advise.. . Comment : Which better plugin did you use then Comment : Your link has nothing to do with any ajaxForm but rather jquery-upload-progress . Comment : More complex alternative : github.com blueimp jQuery-File-Upload https : github.com blueimp jQuery-File-Upload", "Question : I wish to upload an image to the server via ajax using jQuery and FormData . My jQuery code is as follows .. . .. . This code is called when the user selects a new file to upload . MY server backend is PHP and it handles the request as follows .. . .. . The POST request does occur but POST remains empty . I tried searching for the solution but couldn t find an exact one . Any suggestions would be appreciated . EDIT : Here is the form in HTML Comment : Can you also post the HTML of your form to make sure everything is correct there . Comment : You want to look up in the jQuery docs what processData option does Comment : @AgnosticDev I have added the form HTML Comment : @CBroe I am refferring to this https : developer.mozilla.org en-US docs Web Guide Using FormData Objects redirectlocale en-US redirectslug Web API FormData Using FormData Objects while creating the form . I think processData is not the issue . .. . Answer : I too tried a lot with the following ways : .. . .. . None of them worked for me . But at last I used a javascript way of getting elementById and it worked perfectly . Usually in request headers you will find an encrypted text like the one given below : multipart form-data boundary ----WebKitFormBoundaryUuVvGDydAdTf3Bmp .. . .. . And when you try to alert the form-data it will show object formdata . This means that the formdata function is working fine . When you return the values of POST REQUEST or FILES and if it is blank it would mean that formdata is not able to access the form element provided . So first you have to confirm that formdata is able to access the form element or not and then try other possibilities .", "Question : I have created a file into the formData like this : .. . .. . how do i get the content out of the formData like the filename and the file something like this : fd.filename fd.getData . or fd.get file to retrieve the file back .. . Answer : After looking at these http : hacks.mozilla.org 2010 05 formdata-interface-coming-to-firefox Mozilla https : developer.mozilla.org en-US docs Web Guide Using FormData Objects articles https : developer.mozilla.org en-US docs Web API FormData it looks like there is no way to get data out of a FormData object . You can only use them for building FormData to send via an AJAX request . One way around this would be to build up a regular dictionary and then convert it to FormData : .. . .. . If you want to debug a plain FormData object you could also send it in order to examine it in the network request console of your developer tools : .. . .. . Here s some proof of concept code to Drag and Drop files into FormData http : jsbin.com puteru 11 edit html output and upload via POST to a server . I also made a JS Bin http : jsbin.com lofogo edit js output where you can experiment and see what data is inside of a FormData object if it helps .", "Question : I m trying to get a set of keys input names or similar and values input values from a web form : .. . .. . According to the FormData documentation https : developer.mozilla.org en-US docs Web Guide Using FormData Objects formData should contain the keys and values from the form . But console.log formData shows formData is empty . How can I quickly get the data from the form using FormData JSFiddle http : jsfiddle.net CC7u2 .. . Answer : But console.log formData shows formData is empty . What do you mean by empty When I test this in Chrome it shows FormData append : function .. . which is to say it s a FormData object which is what we expected . I made a fiddle and expanded to code to this http : jsfiddle.net jrunning r4fxS : .. . .. . ...and this is what I saw in the Chrome Developer Tools Network panel : .. . .. . HTTP request http : i.stack.imgur.com dLUY9.png .. . .. . So the code is working as expected . I think the disconnect here is that you re expecting FormData to work like a vanilla JavaScript object or array and let you directly look at and manipulate its contents . Unfortunately it doesn t work like that FormData only has one method in its public API https : developer.mozilla.org en-US docs Web API FormData Methods which is append . Pretty much all you can do with it is create it append values to it and pass it to an XMLHttpRequest . If you want to get the form values in a way you can inspect and manipulate you ll have to do it the old-fashioned way : by iterating through the input elements and getting each value one-by-one or by using a function written by someone else e.g . jQuery s . Here s an SO thread with a few approaches to that : Get form-data with Javascript Jquery http : stackoverflow.com questions 2276463 get-form-data-with-javascript-jquery Comment : What do you mean by empty I mean that formData has no enumerable keys . Comment : It s not supposed to have any enumerable keys . That s not part of its specification . That doesn t mean it s empty as my example shows the expected data is there it just means it s not enumerable . Comment : Thanks - I get that the FormData is storing the form-data and also that it s toString method used by console.log is useless . I don t think that s be design though - it seems very inconsistent with rest of the web API . Comment : I think FormData was designed to do one very specific thing the spec certainly doesn t mention any additional functionality http : www.w3.org TR XMLHttpRequest2 interface-formdata and its implementation does that thing only . It s entirely possible that future revisions of the spec will add methods that make it more useful for other things but if you want an object with enumerable keys you ll unfortunately have to look elsewhere . Comment : Yes I haven t expected and don t expect you do be able to fix the standard sorry if you feel like I have . I was just merely commenting on the lack of utility of the implementation . Almost everything in the web API produces usable results when logged this stands out because it doesn t . It s fairly clear the present situation is quite poor whether that s on the browser makers or WHATWG to fix is probably best discussed elsewhere . Thanks for your answer .", "Question : I m using ajax to submit a multipart form with array text fields and files . I append each VAR to the main data as so .. . .. . than I use the ajax function to send it to a PHP file to store inside sql DB . But on the PHP side the arr variable which is an array appears as a string . When I don t send it with ajax as Form data but use the simple .POST option I do get it as an array on the PHP side but then I can t send the files as well . any solutions .. . Answer : You can also send an array via FormData this way : .. . .. . So you can write arr the same way as you do it with a simple HTML form . In case of PHP it should work . You may find this article useful : How to pass an array within a query-string http : stackoverflow.com questions 6243051 how-to-pass-an-array-within-a-query-string Comment : this should be accepted as the correct answer", "Question : There is something I can t understand in FormData . This is my code : .. . .. . If I debug my code in Chrome I expected to have the form-data object filled with my form input name and values . But it seems to be always empty . Where am I wrong form-data empty http : i.stack.imgur.com JsrlP.png .. . Answer : You don t need to loop through the form fields at all as you can just give the form element to the FormData constructor . Try this : Comment : I obtain the same result : if I debug the code with a point break after var form-data new FormData form 0 the object is still empty . I use jQuery 2.1 Comment : You cannot see the data inside a FormData object through inspection . If you send it in the AJAX request you should see the values sent in your server-side code", "Question : I need to pass both FormData and JSON object in an ajax call but I get a 400 Bad Request error . JS : .. . .. . Controller : .. . .. . There is similar question jquery sending form-data and a json object in an ajax call http : stackoverflow.com q 5938544 1793718 and I m trying the same way . How can I send both FormData and JSON object in a single ajax request .. . Answer : I solved it by sending the JSON string together with FormData object in ajax POST . and in controller you can access it the normal way as you do for other form-data values . and now you ll be having the Stringified JSON and you can parse the json to Java object .. . .. . How to parse a JSON string to an array using Jackson http : stackoverflow.com questions 7246157 how-to-parse-a-json-string-to-an-array-using-jackson .", "Question : I need to pass both FormData and JSON object in an ajax call but I get a 400 Bad Request error . JS : .. . .. . Controller : .. . .. . There is similar question jquery sending form-data and a json object in an ajax call http : stackoverflow.com q 5938544 1793718 and I m trying the same way . How can I send both FormData and JSON object in a single ajax request .. . Answer : You can pass in this way .. . .. . .. . .. . and controller side you can identify the data .", "Question : I am trying to save image using ajax .and passing data through Formdata but at php file i can not retrieve data or image name please help me here is my code .. . .. . here is my ajax script code : .. . .. . And here is my DbManipute.php code : .. . .. . i didn t get any error and data also not inserted . when i remove image upload and use serialize method then data is saved successfully but in serialize method image file name can not retrieve please help me regarding this . .. . Answer : Your client-side error will not be shown in the page just like php . You have some errors in your javascript code . You have missed an closing parenthesis at the end of js code : .. . .. . If you are using chrome or firefox browser press F12 button and console will be shown and will show you your js errors . Tip : you can debug your project by printing any variables in your code . For example try to use console.log test in your js code to check if your ajax command is working . console.log will print in console box of browser . When i did this in your code i understood that your code is not running at all . Because you have set your code to be run on submit and you do not have any submit button . Then you need to change your button s type submit . After that you need to prevent form by submitting the form using browser and tell browser that you want to run your js code . For that you need need to prevent default action for form-submit event like this : .. . .. . Another tip is that your php code is in a function that is never called . you need to call your php function in your php file or you should put your codes out of function . Try changing your code like this . This should make your code work . And to check if your ajax request is working try to echo something in your code and in your js code alert the response . Edit 1 One more thing to consider is that for cases that you want to upload files using ajax you can not set data like FormData this . For ajax uploading purpose you should create object of FormData new FormData and append the data separately . as Rejith R Krishnan said .", "Question : Here is example code http : jsfiddle.net epsSZ 1 : .. . .. . HTML : .. . .. . JS : .. . .. . When i submit this old way via standart form-submit then request payload looks like this : .. . .. . But when i submit this AJAX way then it looks little different : .. . .. . As you can see in former case there is some chars is replaced with character entities but in case of using FormData there is plain string which is of course good because it s utf-8 but is there any possibility to make it behave like standart form-submit .. . Answer : The answer to your question is No . You cannot change it . According to XMLHttpRequest2 TR http : www.w3.org TR XMLHttpRequest2 interface-formdata FormData constructed data is explicitly encoded to UTF-8 . With no mention of allowing to change it . The usual mimeType or Content-Type charset become invalid for multi-part requests since it is handled differently for the exact same reason . To quote .. . .. . If data is a FormData Let the request entity body be the result-of running the multipart form-data encoding algorithm with data as form-data set and with UTF-8 as the explicit character-encoding . .. . Let mime type be the concatenation of multipart form-data a U+0020 SPACE character boundary and the multipart form-data boundary string generated by the multipart form-data encoding algorithm . Hope this helps Update .. . .. . If you are willing to forgo .. . .. . new FormData document.forms.namedItem fileinfo .. . .. . for .. . .. . new FormData .append name value .. . .. . there might be a workable solution possible . Let me know if thats what you are looking for . Another Update .. . .. . Did a little bit of running around . Updated fiddle with all modes http : jsfiddle.net aravindbaskaran epsSZ 4 .. . .. . So this is the story .. . .. . 1 form with accept-charset utf8 default behavior .. . .. . The content does not require any additional escaping encoding . So the request fires with the text intact as f r l bende .. . .. . 2 form with accept-charset windows-1251 your case .. . .. . The content requires additional escaping encoding since the default charset of the browser here is utf8 . So the content is escaped and then fired i.e . the content sent is f 229 r l 248 bende .. . .. . 3 FormData constructed with form element .. . .. . The content does not require any additional escaping encoding since it defaults to utf8 . So the request fires with text as f r l bende . 4 FormData constructed and then appended with escaped data .. . .. . The content is still in the utf8 encoding but it doesn t hurt to call escape content before appending to the form-data . This means the request fires with text as f E5r 20l F8bende . Still no dice right I was wrong nope . Looking closer read staring for a few minutes... . at .. . .. . f 229 r l 248 bende and .. . .. . f E5r 20l F8bende .. . .. . Then it all fell into place - E5 Hexadecimal 229 Decimal . So basically escape is Javascript s way of doing things the based encoding which is not HTML friendly . Similarly as we know is HTML s way of encoding . So I put another mode to ajax which is what you are looking for I m guessing .. . .. . 5 FormData constructed and then appended with html-escaped data .. . .. . The content is still in utf8 encoding . Doesn t hurt to escape it like HTML encoding using this wonderful piece of code from stackoverflow http : stackoverflow.com a 18237140 1304559 . And voila the request fired with the text f 229 r l 248 bende .. . .. . Updated fiddle with all modes http : jsfiddle.net aravindbaskaran epsSZ 4 .. . .. . Hope this helps clear it out UPDATE for windows-1251 full support .. . .. . This f r l bende input was failing in earlier mode 5 . Update fiddle http : jsfiddle.net epsSZ 6 . Uses a combination of solution here http : stackoverflow.com a 2711936 1304559 and mine . So the problem is escaping everything . So now escaping only characters not present in the windows-1251 charset . This helps it I hope Comment : Would be nice to see solution with append if it is not too complex but this answer is yet satisfactory . Comment : Updated the answer with append solution . Have to say thank you for the question Comment : @Dfr Does the solution with append help in any way Comment : not quite beacuse it escapes also all windows-1251 characters which is not desired . Currently i m escaping it on server with InLatin-1 Supplement unicode set Comment : Can you tell me an example", "Question : I m trying to get a set of keys input names or similar and values input values from a web form : .. . .. . According to the FormData documentation https : developer.mozilla.org en-US docs Web Guide Using FormData Objects formData should contain the keys and values from the form . But console.log formData shows formData is empty . How can I quickly get the data from the form using FormData JSFiddle http : jsfiddle.net CC7u2 .. . Answer : I also faced the same problem . I wasn t able to see on the console . You need to add the following to the ajax request so the data ll be sent", "Question : My view is HTML 5 . I m using FormData to make a AJAX 2 POST to a Servlet . Inside the servlet i m trying to read request parameters . I can t see any parameters . However Google Chrome Dev console shows the request payload . How can I get the same in Servlet code Any help will be appreciated . Here s the code . JS code .. . .. . Servlet code both parameters return null .. . .. . Google Chrome Console Comment : Provide some more code of doPost method of Servlet . .. . Answer : The HTML5 FormData API sends a multipart form-data request . It s initially designed to be able to upload files by ajax with the new version 2 XMLHttpRequest . Uploading files wasn t possible with the previous version . The request.getParameter http : docs.oracle.com javaee 6 api javax servlet ServletRequest.html getParameter 28java.lang.String 29 by default recognizes application x-www-form-urlencoded requests only . But you re sending a multipart form-data request . You need to annotate your servlet class with @MultipartConfig http : docs.oracle.com javaee 6 api javax servlet annotation MultipartConfig.html so that you can get them by request.getParameter . Or when you re still not on Servlet 3.0 yet use Apache Commons FileUpload . For a more detailed answer on both approaches see this : How to upload files to server using JSP Servlet http : stackoverflow.com questions 2422468 how-to-upload-files-in-jsp-servlet 2424824 2424824 .. . .. . If you don t need to upload files at all use the standard XMLHttpRequest approach instead . This way you don t need @MultipartConfig on your servlet anymore . See also : .. . .. . How to use Servlets and Ajax http : stackoverflow.com questions 4112686 how-to-use-servlets-and-ajax .. . sending a file as multipart through xmlHttpRequest http : stackoverflow.com questions 9395911 sending-a-file-as-multipart-through-xmlhttprequest Comment : HI Balus Thanks for the post . Your answer was accurate and to the point . FormData is an overkill for my simple app . I think I m better off with the simple XMLHttpRequest . But I ve a simple question how do I send request parameters with xhr I know there s a method called send which takes input . How do I use it Comment : Construct an URL encoded query-string . E.g . name1 value1 name2 value2 name3 value3 and pass it to send . However much easier is to use jQuery http : jquery.com . This saves you from writing XMLHttpRequest boilerplate yourself and worrying about cross-browser problems . See also the doc and examples : api.jquery.com jQuery.post http : api.jquery.com jQuery.post Comment : Yes I got it . It s working . I like jQuery Framework because it can handle lot of boilerplate as you mentioned . But using jQuery how do I check something like this : if typeof xhr.withCredentials undefined do something else do something else Since I don t have a xhr handle Comment : You re welcome . Since you re new here please don t forget to mark the answer accepted whenever it helped most in solving the concrete problem . See also How does accepting an answer work http : meta.stackexchange.com questions 5234 how-does-accepting-an-answer-work 5235 5235 Do the same for questions you asked previously http : stackoverflow.com users 655577 user655577 tab questions whenever applicable . As to your new question you could use beforeSend : function xhr callback of .ajax for this see also api.jquery.com jQuery.ajax http : api.jquery.com jQuery.ajax Ask a new question if you stucks . Comment : Thanks great explanation :", "Question : I have been playing with uploading inside a webworker and found things working in Chrome . However in Safari and Firefox I get FormData is undefined . I found out that this is fine and to be expected : as mentioned in http : stackoverflow.com a 13970107 1238884 FormData is not defined supported for webworkers and implements a polyfill . note : updated polyfill @ https : gist.github.com Rob--W 8b5adedd84c0d36aba64 .. . .. . But why does it work in Chrome v39 Does it have a buggy implementation or have they put in in there on purpose .. . Answer : Chrome supports FormData in Web Workers since version 36.0.1935.0 crbug.com 360546 https : code.google.com p chromium issues detail id 360546 . It exists because the latest specification of FormData https : xhr.spec.whatwg.org interface-formdata requires it to be exposed to Worker contexts . Firefox has not implemented this yet but it is on their radar bugzil.la 739173 https : bugzilla.mozilla.org show bug.cgi id 739173 . I think that you re misreading my answer that you ve linked http : stackoverflow.com questions 13870853 how-to-upload-files-in-web-workers-when-formdata-is-not-defined 13970107 13970107 . new FormData HTMLFormElement is not supported in the sense that the constructor that takes a form and initializes its fields based on the form elements is not supported because form elements can obviously not be created in a Web worker . But you can create an empty FormData object and use it as you wish if the browser implements the latest version of the specification . If you want to use the FormData API in all current browsers then you have to load my polyfill https : gist.github.com Rob--W 8b5adedd84c0d36aba64 that you referenced in your question . This polyfill returns early if it detects that the FormData API is already defined so it won t cause issues in browsers that already support FormData . Note that this polyfill is inefficient compared to a native FormData API because the polyfill has to create the full string upfront in memory whereas a native implementation can just hold light data-structures for a file and stream the file from the disk when the File Blob is uploaded . For small pieces of data this is a non-issue but if you plan on uploading huge files then you d better pass the data to the main thread using postMessage with transferables http : www.w3.org html wg drafts html master infrastructure.html transferable-objects if you use typed-arrays and construct the XMLHttpRequest object over there and send it . Web Workers are mainly useful for offloading CPU-heavy tasks but XMLHttpRequest is mainly network which happens on a separate IO thread at least in Chrome so there is no benefit of usign Web Workers over the main thread in this regard . Comment : My app performs long-running blocking tasks using fairly large Blobs couple of hundred meg typically and getting the worker to perform - which involves multiple XHR steps - them prevents the main thread from throwing the wait screen I m probably doing it wrong . In any case I m glad FormData is coming to workers . Cheers for the reply Comment : there is no benefit of usign Web Workers over the main thread in this regard . . Maybe I miss something but since synchronized AJAX requests are not supported in the main thread anymore they must be used in a worker thread I don t think that async AJAX requests would work in a worker thread where should they return data if the thread ends earlier - but maybe I m wrong . And I see no way how to send and receive requests in a certain order . Comment : @StanE I don t think that async AJAX requests would work in a worker thread - wrong async requests are fully functional in worker threads . If the thread is terminated then the request may be cancelled like what happens when a page is unloaded before the server sends a reply to a request . Sending requests in order is a no-brainer just wait until the request is completed via events . Comment : Well thanks for the no-brainer . Maybe you just don t have a need for them . Using events is generally bad design especially in threads and unnecessary complex - you would need to make chained requests .. . uhh . Testing becomes complex too . Comment : @StanE no-brainer was not intended to be pejorative . I really meant that it takes no efforts and resources to send requests in order whether sync or async . Events are a central concept of JavaScript and DOM using it is not bad design . Look into Promise s and the like if you prefer a sequential syntax . And also take a look at the fetch API https : developer.mozilla.org en-US docs Web API Fetch API this is an API to generate network requests and uses Promises for control-flow nstead of events .", "Question : I have a form with two input text and one upload . I have to send it to the server but I have some problem concatenating the file with the text . The server expects this answer : .. . .. . This is the html : .. . .. . This is the Controller : .. . .. . This is the Directive fileModel : .. . .. . And this is the Service which call the server : .. . .. . If I try to send I get Error 400 and the response is : Multipart form parse-error - Invalid boundary in multipart : None . The Payload of Request is : title : sadf text : sdfsadf file : Comment : Is there a reason you re serializing the FormData .. . Answer : This never gonna work you can t stringify your FormData object . You should do this :", "Question : I m trying to get a set of keys input names or similar and values input values from a web form : .. . .. . According to the FormData documentation https : developer.mozilla.org en-US docs Web Guide Using FormData Objects formData should contain the keys and values from the form . But console.log formData shows formData is empty . How can I quickly get the data from the form using FormData JSFiddle http : jsfiddle.net CC7u2 .. . Answer : Update : the XHR spec https : xhr.spec.whatwg.org interface-formdata now includes several more functions to inspect FormData objects . FireFox has supported the newer functions since v39.0 https : developer.mozilla.org en-US docs Web API FormData Chrome is slated to get support in v50 https : www.chromestatus.com features 5701572055007232 . Not sure about other browsers . Comment : Don t feel bad about answering an old question I ve changed this to the accepted answer particularly with most browsers being evergreen and added some example code . It s not console.log formData but at least we can finally see what s inside ." ] }
[ "yes-answer-long", "yes-answer-short" ]
form-data
UNK_RELATION
facebook-rss@web@32
facebook-rss -- is a family of @placeholder content syndication formats used to publish frequently updated works in this case coming from facebook such as blog entries news headlines audio and video in a standardized format.rss is a dialect of xml .
{ "confidence": [ 37.14875411987305, 36.7732048034668, 36.7732048034668, 36.27842330932617, 34.52954864501953, 33.86948776245117, 33.792396545410156, 33.792396545410156, 33.40403366088867, 33.02128982543945, 31.839019775390625, 30.466312408447266, 29.777263641357422, 29.777263641357422, 29.777263641357422, 28.799392700195312, 28.68752670288086, 28.609962463378906, 27.73379135131836, 27.73379135131836, 27.58557891845703, 27.319915771484375, 27.26195526123047, 27.08401870727539, 26.821399688720703, 26.483741760253906, 26.483741760253906, 26.483741760253906, 25.862579345703125, 25.303058624267578, 24.530364990234375, 24.530364990234375, 24.38178825378418, 23.815399169921875, 23.724637985229492, 23.001197814941406, 22.879817962646484, 22.879125595092773, 22.72657585144043, 22.725805282592773, 22.527347564697266, 22.248451232910156, 22.149166107177734, 21.771259307861328, 21.470869064331055, 20.98749542236328, 20.760793685913086, 20.760793685913086, 20.295074462890625, 20.272945404052734, 19.958599090576172, 19.89206314086914, 19.811246871948242, 19.811246871948242, 19.483619689941406, 18.950754165649414, 18.90875244140625, 18.704967498779297, 18.351375579833984, 18.226844787597656, 18.226844787597656, 18.226844787597656, 18.226844787597656, 17.982616424560547, 17.28553581237793, 17.257156372070312, 17.214277267456055, 17.199193954467773, 17.199193954467773, 17.199193954467773, 17.199193954467773, 17.199193954467773, 17.199193954467773, 17.199193954467773, 17.123153686523438, 17.08353042602539, 16.732845306396484, 16.27346420288086, 16.171070098876953, 16.171070098876953, 15.824888229370117, 14.928010940551758, 14.217691421508789, 13.907991409301758, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.752639770507812, 13.641233444213867, 13.129535675048828 ], "content": [ "Indeed I have an RSS link-to my facebook-page soo my facebook-page s posts will be shown in the News Ticker but I can t figure it where I can add the RSS link I m in loss", "Or you could try Facebook RSS http : fbrss.com", "Facebook has recently stopped supporting rss feed .", "Facebook deprecated public RSS feed for pages https : developers.facebook.com docs apps changelog v2 3 90 day deprecations .", "If i change the rss url to another which is not facebook-rss type it works perfect .", "In my case also Facebook feed was difficult to consume and then I try with feedburner to burn the feed for my facebook-page .", "Does anyone know how to fetch a facebook-page s rss-feed nowadays", "I just have an Facebook Page RSS Link it s wont work", "I need help to pull RSS feeds from a facebook-page I m using the following code but it keeps giving me an error : .. . .. . This code works perfectly with any blog or page rss but with Facebook rss it give an exception with the following message .. . .. . The element with name html and namespace http : www.w3.org 1999 xhtml is not an allowed feed format .", "This PHP script converts the Graph API JSON feed to RSS : https : github.com khawkins98 facebook-json-to-rss", "suddenly Facebook seems to have blocked or shut off RSS feeds .", "Are there any ways to retrieve rss feed from Graph API or some more easy way to retrieve feed from Facebook without much hassel", "Does anyone know how to fetch a facebook-page s rss-feed nowadays 27 January 2016", "I need to get the link of the RSS Feed about one specifc Facebook Page .", "Just a note Facebook deprecated their Page RSS feeds on the 23rd of June 2015 . fbrss.com still seems to work though .", "I have a web-site where I have facebook-comments social plugin on each page and I have facebook-page where I publish items as shared links from my site via RSS through dlvt.it .", "In my rss feed the twitter content looks like this .", "Actually I have the RSS link so I can receive news from my page but I can t figure it where I can add the RSS link into the News Ticker code", "I have publicized my Feedburner feed and added Twitter and Facebook accounts .", "How to make Feedburner successfully post latest feed to Facebook page", "Step 05 : Create the RSS URLs .. . .. . Once you have your 3 Facebook numbers facebook id your internal key and your friend key you re ready to make your custom RSS feeds .", "I actually have no tried this but i am sure you can use the Facebook API to generate your own RSS feed .", "Facebook graph api user feeds https : developers.facebook.com docs graph-api reference v2.3 user feed .. . .. . https : graph.facebook.com user feed access token your access token", "I know fbrss.com works but it s not realtime also it s been almost 3 hours that one of the Facebook page I like and follow has posted something and on fbrss.com rss feed link doesn t appear yet .", "I m developing an RSS feed to FB to ingest content for instant articles .", "The number that follows id is your Facebook ID number .", "The last number is your Facebook Internal Key .", "Go to the your Facebook Page and get the ID of that page .", "You need to create a Facebook application .", "Facebook will return HTML in this instance because it doesn t like the User Agent supplied by XmlReader .", "You have a website with a link-to your Facebook page", "And you want this link in your website Facebook comments", "My facebook posts rss is located at this url : .. . .. . https : www.facebook.com feeds page.php id my app-id format rss20 .. . .. . And i try to get the data from it using Simplepie on my Laravel project and it seems it s not working .", "This should solve your problem : .. . .. . This is strictly a behavior of Facebook but the proposed change should work equally well for other sites that are okay with your current implementation .", "I already know this answer : Facebook page s posts feed http : stackoverflow.com questions 10190529 facebook-pages-posts-feed but it doesn t work anymore those solution .", "I want an RSS Feed the link must end with .rss .", "i am using rss feed link as .. . .. . https : www.facebook.com feeds page.php format rss20 id 58975061171 https : www.facebook.com feeds page.php format rss20 id 58975061171 .. . .. . above link working well from last few days. . but today is suddenly stopped working .", "Do you know if there is a way to tag facebook posts so that I can filter posts from the feed depending on certain tags", "I am not finding a good solution or method to pull these posts from a few facebook pages .. .", "There is no connection between website s link-to facebook-page which shares the same link .", "Attached is a screenshot from my facebook publishing tools interface : .. . .. . http : imgur.com qChzPU2 .. . .. . Any idea what on earth is going on that would cause these extra tags to get added", "Use the profesionnal version of Inoreader http : www.inoreader.com wich alows you to follow 60 Facebook pages in real-time", "1 - I don t know how Google can verify Facebook page and tried looking everywhere .. . .. . 2 - Yet Feedburner successfully posts to Twitter .. . .. . How to troubleshoot this", "Now comments are diferent in two places on facebook-page and on web-site .. . .. . The question is how can I make that comments on facebook-page items appears also on my web-site s comment form", "You could .. . .. . 1 . implement a self hosted version of RSS Bridge https : github.com sebsauvage rss-bridge", "Use Wallflux https : www.wallflux.com rss .. . 3 .", "Step 03 : Go to your Facebook Friends Page : http : www.facebook.com friends ref tn .. . .. . Step 04 : Click on the Friends Status Feed link on the page .", "The URL will look like this : .. . .. . http : www.new.facebook.com feeds friends status.php id your facebook id key your friends key format rss20 .. . .. . The second number is your Facebook Friends Key .", "And I also have shared this link on my facebook-page like www.facebook.com mysite fan club page B .", "Quick note I have been using fbrss.com since this happened and it works well actually less of a pain to use than the original RSS feeds .", "I followed the documentation on FB pages : https : developers.facebook.com docs instant-articles publishing setup-rss-feed .. . .. . and tried to make it work with information found on this two links : https : www.codingfish.com blog 129-how-to-create-rss-feed-rails-4-3-steps .. . .. . and .. . .. . http : apidock.com rails Builder XmlMarkup .. . .. . Sometimes FB had loaded the articles but the style was missing it could not find any content could not find any articles then I got the something went wrong.. . error and had to wait for some time and so on .", "I m not adding figure class op-social anywhere in the script that generates my RSS feed nor those iframes .", "You should now see a RSS feed of your friends activities .", "But I can t understand how RSS Feed must be on the same domain .", "An App Access Token is good enough though so the API endpoint would look like this : .. . .. . More information about Access Tokens and how to generate them : .. . .. . https : developers.facebook.com docs facebook-login access-tokens .. . http : www.devils-heaven.com facebook-access-tokens", "I have a figure class op-interactive tag wrapping the blockquote class twitter-tweet tag : .. . .. . Once it s gets ingested by facebook and put into my Development Articles feed it gets wrapped in an extra figure class op-social tag and an iframe tag .", "In your website you can then add : .. . .. . xmlns http : www.facebook.com 2008 fbml to your HTML tag and then add-in the body tag : .. . .. . This will allow you to access Facebook plugins from your website .", "I was pulling RSS feed from a few Fan Pages and posting to our sites .", "I need to add a News Ticker to my website : http : www.lgeekweek.com .. . .. . This is the News Ticker that I want : http : www.jquerynewsticker.com .. . .. . The probleme is I tried to follow the instructions but it didn t work", "there is no rss feed anymore you can only use the graph api to get json data .", "The IDs in the URL below are the IDs you need to find to create your rss feed .", "According to the documentation you need to add this : .. . .. . Also keep in mind your RSS feed MUST be on the same domain as your site .", "The rss was working on Feedly and I would like to show the articles on FB instant articles .", "Consider setting your User Agent to the one used by FireFox or Chrome", "Step 1 : Find your Facebook ID of the page : http : findmyfacebookid.com .. . .. . Step 2 : Add the ID at the end of following url string .. . .. . http : www.facebook.com feeds page.php format rss20 id http : www.facebook.com feeds page.php format rss20 id ADD HERE ID NUMBER ONLY .. . .. . e.g .", "of course you can create a tool to get an rss feed for your page but asking for tool recommendations is off topic on stackoverflow as this is a platform for developers only .", "It works when using Gregorys code above if you change the feed format to atom10 instead of rss20 .", "any new link is now open for it", "find one solution using graph but it requires user login", "why it was down voted", "whats your problem", "describe it so everyone can see that .", "and one more thing dear all down voter you have solution of it without graph api", "if No than try it and than show your ans or comment instead of down voting .", "I have a blog made in ruby-on-rails and it has few articles .", ".. . .. . Status Feed .. . .. . http : www.new.facebook.com feeds status.php id your facebook id viewer your facebook id key your internal key format rss20 .. . .. . Notifications Feed .. . .. . http : www.new.facebook.com feeds notifications.php id your facebook id viewer your facebook id key your internal key format rss20 .. . .. . Friends Status Feed .. . .. . http : www.new.facebook.com feeds friends status.php id your facebook id key your friends key format rss20 .. . .. . Friends Links Feed .. . .. . http : www.new.facebook.com feeds share friends posts.php id your facebook id key your friend key format rss20 .. . .. . Friends List Feed .. . .. . http : www.new.facebook.com feeds friends status.php id your facebook id key your friend key format rss20 .. . .. . RSS 2.0 .. . .. . http : www.facebook.com feeds page.php format rss20 id http : www.facebook.com feeds page.php format rss20 id PAGE ID .. . .. . Alternative option .. . .. . Facebook RSS http : fbrss.com", "To write the content I use Tinymce gem .", "A little more detail I was using IFTT.com to pull the rss feed and then put it were I wanted it .", "I think I have no other ways of doing what I wanted to achieve but can you recommend me somewhere where I can host RSS Bridge for free", "Yup as of today all the rss feeds and json option in the format : facebook.com feeds page.php id pageid format rss20 https : www.facebook.com feeds page.php id 24pageid format rss20 stopped working .", "I need feed or posts IDs of specific hashtag iframe with this would also works .", "This can be used without any auth or keys for example in jGFeed I guess", "The RSS feed is gone the only way to get the Page feed is the feed endpoint : https : developers.facebook.com docs graph-api reference page feed .. . .. . You will need an App for this though because you need to use a Token for the endpoint .", "Link only answers aren t suitable for SO - primarily because if the link s content changes or disappears but also because it doesn t explain how this link solves the OP s question .", "Thanks", "Since you can t customize it you will need a different solution to grab the feed .", "Thanks Gregory Kurru for your answers.I tried both solutions but now I get a different exception which is Element is an invalid XmlNodeType .I think facebook s feeds format can not be parsed using syndicationFeed class @ least for now .", "At which point which line does the exception occur", "I think we can track this one down with a little more work .", "I tried this and got the exact same exception.. .", "I checked the source of the feed and the offending line is access : restriction relationship deny xmlns : access http : www.bloglines.com about specs fac-1.0", "Change the url :", "Feedburner generated the feed for me in Atom1.0 format .", "And then I successfully : consumed this with system.syndication class my code was :", "Thanks", "enter image description here http : i.stack.imgur.com hTyvn.jpg", "Try something like IFTTT http : IFTTT.com which provides recipes triggered when your feed updates .", "Looks like token options may be required from here on out .", "Any tool online webservice or whatever I can use apart from implementing by myself a webservice on a webserver" ] }
{ "confidence": [ 52.1935920715332, 49.437740325927734, 49.39586639404297, 43.97545623779297, 42.6989860534668, 41.213470458984375, 41.195613861083984, 39.119354248046875, 38.63707733154297, 38.34797286987305, 37.771446228027344, 37.12284469604492, 37.083858489990234, 36.81357192993164, 36.328094482421875, 32.522064208984375, 30.594890594482422, 29.78243637084961, 14.240031242370605, 14.240031242370605 ], "content": [ "Question : I need help to pull RSS feeds from a facebook-page I m using the following code but it keeps giving me an error : .. . .. . This code works perfectly with any blog or page rss but with Facebook rss it give an exception with the following message .. . .. . The element with name html and namespace http : www.w3.org 1999 xhtml is not an allowed feed format . Thanks .. . Answer : In my case also Facebook feed was difficult to consume and then I try with feedburner to burn the feed for my facebook-page . Feedburner generated the feed for me in Atom1.0 format . And then I successfully : consumed this with system.syndication class my code was :", "Question : I need help to pull RSS feeds from a facebook-page I m using the following code but it keeps giving me an error : .. . .. . This code works perfectly with any blog or page rss but with Facebook rss it give an exception with the following message .. . .. . The element with name html and namespace http : www.w3.org 1999 xhtml is not an allowed feed format . Thanks .. . Answer : It works when using Gregorys code above if you change the feed format to atom10 instead of rss20 . Change the url :", "Question : I need to add a News Ticker to my website : http : www.lgeekweek.com .. . .. . This is the News Ticker that I want : http : www.jquerynewsticker.com .. . .. . The probleme is I tried to follow the instructions but it didn t work Indeed I have an RSS link-to my facebook-page soo my facebook-page s posts will be shown in the News Ticker but I can t figure it where I can add the RSS link I m in loss This is my Index.html code : .. . .. . Pleaase help me Any help would be highly appreciated . .. . Answer : According to the documentation you need to add this : .. . .. . Also keep in mind your RSS feed MUST be on the same domain as your site . Here are all the options of the plugin : Comment : But I can t understand how RSS Feed must be on the same domain . I just have an Facebook Page RSS Link it s wont work Comment : I actually have no tried this but i am sure you can use the Facebook API to generate your own RSS feed . Comment : Actually I have the RSS link so I can receive news from my page but I can t figure it where I can add the RSS link into the News Ticker code Comment : feedUrl : false feedUrl : www.example.com rss.xml", "Question : I need help to pull RSS feeds from a facebook-page I m using the following code but it keeps giving me an error : .. . .. . This code works perfectly with any blog or page rss but with Facebook rss it give an exception with the following message .. . .. . The element with name html and namespace http : www.w3.org 1999 xhtml is not an allowed feed format . Thanks .. . Answer : Facebook will return HTML in this instance because it doesn t like the User Agent supplied by XmlReader . Since you can t customize it you will need a different solution to grab the feed . This should solve your problem : .. . .. . This is strictly a behavior of Facebook but the proposed change should work equally well for other sites that are okay with your current implementation . Comment : Consider setting your User Agent to the one used by FireFox or Chrome Comment : Thanks Gregory Kurru for your answers.I tried both solutions but now I get a different exception which is Element is an invalid XmlNodeType .I think facebook s feeds format can not be parsed using syndicationFeed class @ least for now . Comment : At which point which line does the exception occur I think we can track this one down with a little more work . Comment : I tried this and got the exact same exception.. . I checked the source of the feed and the offending line is access : restriction relationship deny xmlns : access http : www.bloglines.com about specs fac-1.0", "Question : null .. . Answer : I m developing an RSS feed to FB to ingest content for instant articles . In my rss feed the twitter content looks like this . I have a figure class op-interactive tag wrapping the blockquote class twitter-tweet tag : .. . .. . Once it s gets ingested by facebook and put into my Development Articles feed it gets wrapped in an extra figure class op-social tag and an iframe tag . Attached is a screenshot from my facebook publishing tools interface : .. . .. . http : imgur.com qChzPU2 .. . .. . Any idea what on earth is going on that would cause these extra tags to get added I m not adding figure class op-social anywhere in the script that generates my RSS feed nor those iframes . Could I have an issue with un-closed tags", "Question : Does anyone know how to fetch a facebook-page s rss-feed nowadays 27 January 2016 I already know this answer : Facebook page s posts feed http : stackoverflow.com questions 10190529 facebook-pages-posts-feed but it doesn t work anymore those solution . I know fbrss.com works but it s not realtime also it s been almost 3 hours that one of the Facebook page I like and follow has posted something and on fbrss.com rss feed link doesn t appear yet . Any tool online webservice or whatever I can use apart from implementing by myself a webservice on a webserver Comment : Just use the Graph API : developers.facebook.com docs graph-api reference v2.5 page feed https : developers.facebook.com docs graph-api reference v2.5 page feed Comment : I don t want to receive a JSON . I want an RSS Feed the link must end with .rss . I need to get the link of the RSS Feed about one specifc Facebook Page . Comment : there is no rss feed anymore you can only use the graph api to get json data . of course you can create a tool to get an rss feed for your page but asking for tool recommendations is off topic on stackoverflow as this is a platform for developers only . Comment : thank you @luschn can you forward me to a better platform where I can forward my question about this topic Comment : this would be an option : facebook.com groups fbdevelopers https : www.facebook.com groups fbdevelopers .. . Answer : You could .. . .. . 1 . implement a self hosted version of RSS Bridge https : github.com sebsauvage rss-bridge 2 . Use Wallflux https : www.wallflux.com rss .. . 3 . Use the profesionnal version of Inoreader http : www.inoreader.com wich alows you to follow 60 Facebook pages in real-time Comment : Hey thanks for your great suggestion . I think I have no other ways of doing what I wanted to achieve but can you recommend me somewhere where I can host RSS Bridge for free", "Question : Facebook has recently stopped supporting rss feed . Are there any ways to retrieve rss feed from Graph API or some more easy way to retrieve feed from Facebook without much hassel Comment : developers.facebook.com docs graph-api reference v2.3 user feed https : developers.facebook.com docs graph-api reference v2.3 user feed Comment : Yup as of today all the rss feeds and json option in the format : facebook.com feeds page.php id pageid format rss20 https : www.facebook.com feeds page.php id 24pageid format rss20 stopped working . Looks like token options may be required from here on out . Comment : Officially deprecated - developers.facebook.com docs apps changelog v2 3 https : developers.facebook.com docs apps changelog v2 3 .. . Answer : This PHP script converts the Graph API JSON feed to RSS : https : github.com khawkins98 facebook-json-to-rss Comment : Link only answers aren t suitable for SO - primarily because if the link s content changes or disappears but also because it doesn t explain how this link solves the OP s question . Comment : I m not a coder . Can you be more specific on how to use this script", "Question : Does anyone know how to fetch a facebook-page s rss-feed nowadays When I log in as a page and go to http : www.facebook.com feeds notifications.php id xx viewer xx key xx format rss20 http : www.facebook.com feeds notifications.php id xx viewer xx key xx format rss20 I get an empty feed . Is there a corresponding page feed that contains the pages posts Thanks M .. . Answer : The IDs in the URL below are the IDs you need to find to create your rss feed . http : www.new.facebook.com feeds notifications.php id YOUR FACEBOOK ID viewer YOUR FACEBOOK ID key YOUR INTERNAL KEY format rss20 .. . .. . There are 3 numbers in this URL . The number that follows id is your Facebook ID number . This number appears twice . The last number is your Facebook Internal Key . Copy these numbers and set them aside . Step 03 : Go to your Facebook Friends Page : http : www.facebook.com friends ref tn .. . .. . Step 04 : Click on the Friends Status Feed link on the page . You should now see a RSS feed of your friends activities . The URL will look like this : .. . .. . http : www.new.facebook.com feeds friends status.php id your facebook id key your friends key format rss20 .. . .. . The second number is your Facebook Friends Key . Copy this number and put it aside . Step 05 : Create the RSS URLs .. . .. . Once you have your 3 Facebook numbers facebook id your internal key and your friend key you re ready to make your custom RSS feeds . All you have to do to is copy and paste them into the link structures below . .. . .. . Status Feed .. . .. . http : www.new.facebook.com feeds status.php id your facebook id viewer your facebook id key your internal key format rss20 .. . .. . Notifications Feed .. . .. . http : www.new.facebook.com feeds notifications.php id your facebook id viewer your facebook id key your internal key format rss20 .. . .. . Friends Status Feed .. . .. . http : www.new.facebook.com feeds friends status.php id your facebook id key your friends key format rss20 .. . .. . Friends Links Feed .. . .. . http : www.new.facebook.com feeds share friends posts.php id your facebook id key your friend key format rss20 .. . .. . Friends List Feed .. . .. . http : www.new.facebook.com feeds friends status.php id your facebook id key your friend key format rss20 .. . .. . RSS 2.0 .. . .. . http : www.facebook.com feeds page.php format rss20 id http : www.facebook.com feeds page.php format rss20 id PAGE ID .. . .. . Alternative option .. . .. . Facebook RSS http : fbrss.com Comment : Thanks but this URL seems to be what I what I was looking for : facebook.com feeds page.php id xx format rss20 http : www.facebook.com feeds page.php id xx format rss20 . This can be used without any auth or keys for example in jGFeed I guess Comment : I edited the post . Try the last link I posted . Go to the your Facebook Page and get the ID of that page . The ID is located at the end of the URL . Comment : Or you could try Facebook RSS http : fbrss.com Comment : Do you know if there is a way to tag facebook posts so that I can filter posts from the feed depending on certain tags Comment : I do not believe so . Does the information I provided help", "Question : i am using rss feed link as .. . .. . https : www.facebook.com feeds page.php format rss20 id 58975061171 https : www.facebook.com feeds page.php format rss20 id 58975061171 .. . .. . above link working well from last few days. . but today is suddenly stopped working . any new link is now open for it find one solution using graph but it requires user login Comment : why it was down voted whats your problem describe it so everyone can see that . and one more thing dear all down voter you have solution of it without graph api if No than try it and than show your ans or comment instead of down voting . .. . Answer : Facebook deprecated public RSS feed for pages https : developers.facebook.com docs apps changelog v2 3 90 day deprecations .", "Question : My facebook posts rss is located at this url : .. . .. . https : www.facebook.com feeds page.php id my app-id format rss20 .. . .. . And i try to get the data from it using Simplepie on my Laravel project and it seems it s not working . If i change the rss url to another which is not facebook-rss type it works perfect . Here is my code : .. . .. . The output is blank page . Any way to fix this .. . Answer : The problem comes from this error : .. . .. . It was because I was using localhost and it seemed that I did not had some curl options set . After I ve put it on production it worked like a charm .", "Question : Does anyone know how to fetch a facebook-page s rss-feed nowadays When I log in as a page and go to http : www.facebook.com feeds notifications.php id xx viewer xx key xx format rss20 http : www.facebook.com feeds notifications.php id xx viewer xx key xx format rss20 I get an empty feed . Is there a corresponding page feed that contains the pages posts Thanks M .. . Answer : Just a note Facebook deprecated their Page RSS feeds on the 23rd of June 2015 . fbrss.com still seems to work though . For more info see : https : developers.facebook.com docs apps changelog v2 3 90 day deprecations Comment : Quick note I have been using fbrss.com since this happened and it works well actually less of a pain to use than the original RSS feeds . Only down side is the re-authentication as I keep forgetting : P", "Question : I have a web-site where I have facebook-comments social plugin on each page and I have facebook-page where I publish items as shared links from my site via RSS through dlvt.it . Links to items are the same . Now comments are diferent in two places on facebook-page and on web-site .. . .. . The question is how can I make that comments on facebook-page items appears also on my web-site s comment form Regards Anton . Comment : Did you ever solve this Anton I have a similar problem . Comment : No Bill I have not found any working solution . If you find something please consider sharing it here . I would really appreciate it .. . Answer : You need to create a Facebook application . Once you have created this you ll get your app-id . In your website you can then add : .. . .. . xmlns http : www.facebook.com 2008 fbml to your HTML tag and then add-in the body tag : .. . .. . This will allow you to access Facebook plugins from your website . So for comments you can use : .. . .. . fb : comments href Your Page num posts 10 fb : comments Comment : I did it like you said . There is no connection between website s link-to facebook-page which shares the same link . How can I make it Comment : @Anton : I m not quite sure I understand what you mean . You have a website with a link-to your Facebook page And you want this link in your website Facebook comments Comment : I have a page www.mysite.com page1.html page A . And I also have shared this link on my facebook-page like www.facebook.com mysite fan club page B . Now if user leaves comment on page A it won t be published on page B as a comment to the shared link . Hopefully this it understandable now .", "Question : Facebook has recently stopped supporting rss feed . Are there any ways to retrieve rss feed from Graph API or some more easy way to retrieve feed from Facebook without much hassel Comment : developers.facebook.com docs graph-api reference v2.3 user feed https : developers.facebook.com docs graph-api reference v2.3 user feed Comment : Yup as of today all the rss feeds and json option in the format : facebook.com feeds page.php id pageid format rss20 https : www.facebook.com feeds page.php id 24pageid format rss20 stopped working . Looks like token options may be required from here on out . Comment : Officially deprecated - developers.facebook.com docs apps changelog v2 3 https : developers.facebook.com docs apps changelog v2 3 .. . Answer : You can use a free service that work in this moment : http : fbrss.com", "Question : I was pulling RSS feed from a few Fan Pages and posting to our sites . suddenly Facebook seems to have blocked or shut off RSS feeds . I am not finding a good solution or method to pull these posts from a few facebook pages .. . Anyone have any suggestions A little more detail I was using IFTT.com to pull the rss feed and then put it were I wanted it . So the trigger was : https : www.facebook.com feeds page.php format rss20 id page https : www.facebook.com feeds page.php format rss20 id page id Suddenly all of these return the following error Not a valid feed url missing feed title .. . .. . Any suggestions code gurus .. . Answer : The RSS feed is gone the only way to get the Page feed is the feed endpoint : https : developers.facebook.com docs graph-api reference page feed .. . .. . You will need an App for this though because you need to use a Token for the endpoint . An App Access Token is good enough though so the API endpoint would look like this : .. . .. . More information about Access Tokens and how to generate them : .. . .. . https : developers.facebook.com docs facebook-login access-tokens .. . http : www.devils-heaven.com facebook-access-tokens", "Question : i am using rss feed link as .. . .. . https : www.facebook.com feeds page.php format rss20 id 58975061171 https : www.facebook.com feeds page.php format rss20 id 58975061171 .. . .. . above link working well from last few days. . but today is suddenly stopped working . any new link is now open for it find one solution using graph but it requires user login Comment : why it was down voted whats your problem describe it so everyone can see that . and one more thing dear all down voter you have solution of it without graph api if No than try it and than show your ans or comment instead of down voting . .. . Answer : Facebook graph api user feeds https : developers.facebook.com docs graph-api reference v2.3 user feed .. . .. . https : graph.facebook.com user feed access token your access token", "Question : Does anyone know how to fetch a facebook-page s rss-feed nowadays When I log in as a page and go to http : www.facebook.com feeds notifications.php id xx viewer xx key xx format rss20 http : www.facebook.com feeds notifications.php id xx viewer xx key xx format rss20 I get an empty feed . Is there a corresponding page feed that contains the pages posts Thanks M .. . Answer : Step 1 : Find your Facebook ID of the page : http : findmyfacebookid.com .. . .. . Step 2 : Add the ID at the end of following url string .. . .. . http : www.facebook.com feeds page.php format rss20 id http : www.facebook.com feeds page.php format rss20 id ADD HERE ID NUMBER ONLY .. . .. . e.g . facebook.com feeds page.php format rss20 id 100001463662167 Comment : This didn t work for me in feedly.. .", "Question : I have publicized my Feedburner feed and added Twitter and Facebook accounts . 1 - I don t know how Google can verify Facebook page and tried looking everywhere .. . .. . 2 - Yet Feedburner successfully posts to Twitter .. . .. . How to troubleshoot this How to make Feedburner successfully post latest feed to Facebook page Thanks enter image description here http : i.stack.imgur.com hTyvn.jpg .. . Answer : Try something like IFTTT http : IFTTT.com which provides recipes triggered when your feed updates .", "Question : null .. . Answer : I have a blog made in ruby-on-rails and it has few articles . Articles are saved in the db . To write the content I use Tinymce gem . The rss was working on Feedly and I would like to show the articles on FB instant articles . I followed the documentation on FB pages : https : developers.facebook.com docs instant-articles publishing setup-rss-feed .. . .. . and tried to make it work with information found on this two links : https : www.codingfish.com blog 129-how-to-create-rss-feed-rails-4-3-steps .. . .. . and .. . .. . http : apidock.com rails Builder XmlMarkup .. . .. . Sometimes FB had loaded the articles but the style was missing it could not find any content could not find any articles then I got the something went wrong.. . error and had to wait for some time and so on . I do not know what to do . This is the last version of feed.rss.builder and FB can t see nothing You haven t created any instant articles yet . Please help me to fix this code I would like to submit it for the review and never again touch the code in feed.rss.builder . Thank you", "Question : Is there any I ve searched and I didn t find anything about it . I need feed or posts IDs of specific hashtag iframe with this would also works . Anyone anything .. . Answer : Right now there is only the keyword search hashtags are not supported yet : https : developers.facebook.com docs reference api search", "Question : Is there any I ve searched and I didn t find anything about it . I need feed or posts IDs of specific hashtag iframe with this would also works . Anyone anything .. . Answer : There will be the Keyword Insights API https : developers.facebook.com docs keyword insights but it s currently not publicly available . So the only option is as @luschn described ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
strong-named-key@.net@99
strong-named-key -- a strong-named-key also called sn key or strong name is used in the microsoft @placeholder framework to uniquely identify a component .
{ "confidence": [ 72.84539031982422, 62.511131286621094, 59.608489990234375, 59.34608459472656, 57.81504821777344, 57.4353141784668, 57.0601921081543, 54.32048797607422, 52.81371307373047, 51.106689453125, 51.106689453125, 51.03578186035156, 50.201515197753906, 50.07325744628906, 49.599910736083984, 49.591121673583984, 48.96910095214844, 48.58055877685547, 48.34675598144531, 48.08757019042969, 47.13728713989258, 47.127925872802734, 46.386566162109375, 46.36115264892578, 46.229400634765625, 45.840858459472656, 45.26111602783203, 44.79963684082031, 44.100669860839844, 44.100669860839844, 43.32634735107422, 43.32634735107422, 43.1473503112793, 41.36096954345703, 41.36096954345703, 40.257423400878906, 39.757625579833984, 39.57185363769531, 39.11887741088867, 38.543052673339844, 38.41187286376953, 38.300750732421875, 38.14717102050781, 37.50225830078125, 37.50225830078125, 37.1104621887207, 36.80718994140625, 36.39928436279297, 35.31245422363281, 35.31245422363281, 33.91692352294922, 33.83079147338867, 33.526336669921875, 33.30017852783203, 33.287742614746094, 33.287742614746094, 33.287742614746094, 33.287742614746094, 32.09865188598633, 32.06812286376953, 32.06812286376953, 29.696842193603516, 28.891328811645508, 28.891328811645508, 28.124317169189453, 27.918712615966797, 27.392375946044922, 27.346675872802734, 27.346675872802734, 27.346675872802734, 27.02182388305664, 26.788036346435547, 26.708839416503906, 25.98827362060547, 25.589393615722656, 25.22884750366211, 25.131317138671875, 25.11660385131836, 25.074138641357422, 24.99210548400879, 24.99210548400879, 24.99210548400879, 24.219833374023438, 23.835224151611328, 23.80802345275879, 23.496498107910156, 23.069091796875, 22.62655258178711, 22.62655258178711, 22.62655258178711, 22.62655258178711, 22.62655258178711, 22.62655258178711, 22.62655258178711, 22.62655258178711, 22.62655258178711, 22.62655258178711, 22.62655258178711 ], "content": [ "Because I checked the two DLL and they are not strong named so I tried to generate a key and strong name the assembly but it was obviously not the same key .", "These projects use a .pfx key to enable strong naming .", "You absolutely should not use a new strong name key the strong name is part of the identity the version is another part - you should use the same strong name key that you used when you created the 1.0.0.0 dll .", "Usually strong name keys have a 160 bytes-length public-key SHA1 : .. . .. . .. .", "If strong name signing an assembly with a password protected pfk is it possible to get access to the password used for the key in an AfterBuild node", "We have a bunch of libraries that are strong-named and placed in the GAC .", "The Visual Studio strong-name signing uses a public private key pair in the process .", "or does the strong name key use the new version information when the assembly is re-built", "I think it is related with Strong Name .", "For one solution I want that the project will be sign with strong name key but for the other solution I want that the project will be without sign .", "create a Strong-Name Key File https : msdn.microsoft.com en-us library dd788548.aspx .", "To correct this try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name : VS KEY 11D604D4C94AB54 CasparKleijne.Toolkit .. . .. . Error 3 Importing key file CasparKleijne.Toolkit.pfx was canceled .", "It s possible however for a system administrator to re-enable name verification by default with a registry key : .. . .. . Microsoft says that the reason this change is allowed is that strong names were not an integrity checking mechanism http : blogs.msdn.com b shawnfa archive 2008 05 14 strong-name-bypass.aspx 9709168 but were an assembly identification mechanism .", "1.Did u strong name this assembly .", "Steps to strong name nuget dlls .", "Should i be creating a new strong name key to resign a class assembly if i change the version information number of the class assembly", "Is the private key I use to sign my assemblies for strong names within visual-studio project properties any way related needed to generate a CSR", "I have a DLL to replace and existing and signed one same name and overall structure which I cannot sign or strong name properly as we cannot reproduce the key .", "To correctly answer this question then it should be mentioned that modifying an assembly will invalidate its strong name and as such there is no way to edit a DLL without invalidating the strong name if the snk is not available .", "Run sn -d VS KEY XXXXXXXXXXX to remove the old key .", "However you can disable strong name validaton you may want to look into it https : blogs.msdn.microsoft.com securitytools 2009 12 30 how-to-turn-off-strong-name-validation .", "Probably because of the strong-named-key file beging corrupt or lost. . resulting in the following errors when building the project : .. . .. . Error 1 Metadata file D : CasparKleijne.Toolkit CasparKleijne.Toolkit bin Debug CasparKleijne.Toolkit.dll could not be found CasparKleijne.Toolkit.Reporting .. . .. . Error 2 Cannot import the following key file : CasparKleijne.Toolkit.pfx .", "It seems very odd that the library s strong name can be veryfied locally but on a test computer .", "Basically strong name verification was disabled for every use-case except Silverlight .", "Since you do not have the key file you must not be the author and as such strong naming prevent you from doing the changes you want to do .", "To correct this try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name : VS KEY DB583A44F66CCF4B AssemblyName .. . .. . Forcing them to reenter the same password for all 11 assemblies image below .", "To correct this try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name : VS KEY 45891C38BC1BB345 .. . .. . To resolve this I use sn.exe with the following command : .. . .. . sn -i sg Key.pfx VS KEY 45891C38BC1BB345 .. . .. . This resolves the issue with the trunk project which then happily builds .", "You can t and that s the whole point of strong names .", "Probably nothing will happen strong name validation is turned off in full trust mode since .NET 3.5SP1 .", "strong-name signatures are not validated when an assembly is loaded into a full-trust application domain .", "I m trying to find some information about how to if at all possible enumerate all container names in the Strong Name CSP Cryptographic Service Provider .", "I have attached the processes to the Visual Studio Debugger on the test computer and the error messgae I get tells me that the strong name could not be veryfied .", "I am trying to find way to use the strong name sign as an configuration .", "Delayed signatures don t constitute a valid strong name http : msdn.microsoft.com en-us library t07a3dye.aspx .", "More on this here : stackoverflow.com questions 16658541 http : stackoverflow.com questions 16658541 enumerating-container-names-of-the-strong-name-csp .", "In addition the CSR contains the public-key that will be used in your digital-certificate .", "Essentially when you type sn.exe -i key.snk MyContainerName the public and private key pairs are stored into what s called a container .", "EDIT Since .NET 3.5 SP1 strong name verification is bypassed http : blogs.msdn.com b shawnfa archive 2008 05 14 strong-name-bypass.aspx provided at least one of the following conditions is met : .. . .. . the assembly is fully signed with Authenticode .. . the assembly is fully trusted without any regards to its strong name evidence .. . the assembly is loaded into a fully trusted AppDomain which is what happens with desktop applications in most scenarios .. . the assembly is loaded from a location under the AppDomain s ApplicationBase i.e .", "Assign the Strong Name to the project by add the key properties https : msdn.microsoft.com en-us library system.reflection.assemblykeyfileattribute v vs.110 .aspx cs-save-lang 1 cs-lang cpp code-snippet-3 this way required to Set Common Language RunTime Support http : stackoverflow.com questions 16732789 system-a-namespace-with-this-name-does-not-exist 20595744 20595744 or to specify the key file we will use at : Project- Properties- Configuration Properties- Linker- Advanced- Key File http : stackoverflow.com questions 2389886 how-do-i-strong-name-a-c-assembly-in-vs2008 answertab votes tab-top this way didn t work to me .", "So I resign my above Dll with same certificate and same public-key token according to procedure mentioned in http : sharepointcoding.wordpress.com 2009 02 27 assign-a-strong-name-to-a-third-party-dll and make a new Dll rj.dll to make it protected again .", "On face value it seems Microsoft.Practices.EnterpriseLibrary.Data.dll has corrupted strong name some sort of tampering to invalidate the hash or is it that this binary that you are using is incompatible with environment framework and it fails the signature validation error is a wrapper over actual issue .", "Editing an assembly with Reflexil does remove the strong name and replaces it with a delay signature but most of the time this does not prevent the assembly from loading .", "Only now two of my nuget packages will not compile because they are not strong name compliant .", "Strong names verify that an executable file has not been tampered with by someone who is not the author .", "After strong naming did you delete the old reference and add a new one", "The key pair information is stored in a key file which can be a Personal Information Exchange PFX file or a certificate from the current user s Windows certificate store .", "The key file may be password protected .", "A malicious assembly could use the fully specified assembly name assembly name version culture and public-key token of the assembly added to the skip verification list to fake its identity .", "Anyone with the original key file is assumed to be the author .", "Yes you should create resign - but with the same key .", "Take note of the section that reads : .. . .. . With either the Vr or Vk option you can optionally include an .snk file for test key signing .", "i have also tried this answer http : stackoverflow.com questions 8977053 cant-get-the-couchbase-net-memcache-client-to-run-complains-its-strong-name-v 8977433 8977433 but with no effect .", "However when I try to build the branch version of the project I receive the same initial error with the same key container name and when I try install the certificate using the sn.exe it not surprisingly gives the following error : .. . .. . Failed to install key pair -- Object already exists .. . .. . This makes sense in that I used the same infile and container on the sn command but what I am trying to understand is : .. . .. . 1 .", "The private key is NOT sent in the CSR as it must be kept private on the server where the CSR was originated .", "I have full source code I don t have the key alone .", "It makes no difference where the key file is located as long as the assembly is signed .", "We have now decided to use a common key for all the libraries .", "Is it safe now to re-sign them with another key and publish", "The specified key file AlphaBeta.pfx has incorrect format .", "This means that for all practical purposes strong names aren t useful to prevent tampering and anyone can tamper with any assembly and still have it load correctly unless the system administrator prevents it .", "The Reflexil page says you can remove strong names and accordingly edit references from other assemblies but it seems cryptographically dubious that you can preserve the original signature and change the assembly .", "exec Command SN-R demo.dll . . key.snk exec Command SN-R demo.exe . . key.snk .. . .. . Please help me how to solve this", "When I first tried to compile the trunk version of the project I get the following error : .. . .. . Cannot import the following key file : sgKey.pfx .", "While developing new libraries for product I generated keys via Visual Studio and signed libraries each with it own key with passwords .", "EDIT : From a comment on this question http : security.stackexchange.com questions 1771 how-can-i-enumerate-all-the-saved-rsa-keys-in-the-microsoft-csp at IT Security StackExchange there s a link-to a little util called KeyPal http : www.jensign.com KeyPal index.html .", "Running this utility with LM will dump the local machine key store : .. . .. . .. . --------- KeyPal : MACHINE store : 3 keycontainers --------- .. . 0 VS KEY F726FDF898BC4CB8 .. . Signature 1024 .. . 1 IIS Express Development Certificate Container .. . Exchange 1024 .. . CertE : CN localhost .. . 2 MyContainerName .. . Signature 1024 .. . ------------------------------------------------- .. . .. . .. . Where I can see that both 0 and 2 are valid container names to use with AssemblyKeyName .", "I understand that for strongly named C++ dll s I need to : .. . .. . 1 .", "But this assembly should only be allowed to be referenced by other assemblys that are signed and thus recognized with a specific public-key .", "A workaround is to export your key into a .snk file and use this when building your project .", "pardon the ignorance but is there a reproducible example on how to export one s key into an .snk file and use it when building one s project", "The certificates work perfectly except every time someone pulls down a TFS branch from a different developer workstation the certificate password is invalid and they receive : .. . .. . Error Cannot import the following key file : CertificateName.pfx .", "The CSR contains information that will be included in your certificate such as your organization name common name domain-name locality and country .", "This would allow the malicious assembly to also skip verification .", "Later within your code you could specify the container name in the AssemblyKeyNameAttribute http : msdn.microsoft.com en-us library system.reflection.assemblykeynameattribute.aspx e.g .", "I will recompile a component code using the unsigned version and later deploy it with unsigned copy using .", "I d also like to provide code-completion for the AssemblyKeyName attribute where I would pre-populate the list with known container names .", "So when I try the following steps to make them strongly named I end up with a runtime-error .", "Depends on how it was used and defined in the compiled code .", "Above problem solved by installing Microsoft SDK 8.0", "I found a post about a similar issue here http : dotnetspeak.com 2013 05 failed-to-install-key-pairobject-already-exists but did not fit my circumstance precisely as I had only ever logged on to my machine as a single user .", "The author explains why she he does that : .. . .. . As projects become more complex a lack of vertical space in the Solution Explorer makes projects more difficult to work with .. . .. . So the reason seems to be to hide the key file inside the properties folder to save some space on the visual-studio Solution Explorer display .", "enter image description here http : i.stack.imgur.com yoOIk.png .. . .. . I do understand that entering the same password from a different workstation uses local values producing technically a different key but I m sure I m not the first person to have this problem .", "I m using two dll assembly from Microsoft to compare Xml .", "Please do not include information about a language used in a question title unless it wouldn t make sense without it .", "Assembly my App Version 1.0.0.0 Culture neutral Public Key Token null is marked with the Allow Partially Trusted Callers Attribute and uses the level 2 security transparency model .", "3.Sign the .dll by the SN tool https : msdn.microsoft.com en-us library k5b5tt23 v vs.110 .aspx : sn.exe -R dll file.dll key file.snk .. . .. . Since step 2 required Visual C++ project change CLR support or specify file key I m wondering if there is a way to sign without changing the existing project because I don t want to touch something that works.. . .. . .. . Any idea", "To turn this feature off remove the registry value HKLM Software Microsoft Fus ion EnableLog .", ": .. . .. . This will cause the assembly to be signed at compile-time .", "I am trying to find out if it s possible to somehow enumerate all container names .", "I m writing a plugin for ReSharper https : github.com hmemcpy ReSharper.InternalsVisibleTo that provides code-completion for the InternalsVisibleTo attribute .", "Is this information accessible", "However there s the 1 one - IIS Express.. . which is not a valid container .", "How do I distinguish between them", "Not solving the actual problem but in case it helps.. . You know in general specifying via Attributes is deprecated as in you ll struggle to see it outside of V1.1 codebases in favor of VS managing the installation into the store and the passing them to the CSC Task", "stackoverflow.com a 16464894 11635 http : stackoverflow.com a 16464894 11635", "@RubenBartelink Interesting thanks .", "I assumed as much since there s barely any up-to-date info about these things .", "I m only doing this out of interest since a user of my ReSharper plugin reported a bug and in his case they re still using the attributes ." ] }
{ "confidence": [ 75.08125305175781, 69.5938720703125, 68.86559295654297, 67.58995056152344, 65.79869079589844, 63.004974365234375, 61.314186096191406, 60.14408874511719, 59.925960540771484, 59.912452697753906, 56.778907775878906, 55.842552185058594, 55.78564453125, 52.08006286621094, 49.82926559448242, 47.679115295410156, 47.169189453125, 41.777427673339844, 36.43572235107422, 34.245689392089844 ], "content": [ "Question : null .. . Answer : I understand that for strongly named C++ dll s I need to : .. . .. . 1 . create a Strong-Name Key File https : msdn.microsoft.com en-us library dd788548.aspx . 2 . Assign the Strong Name to the project by add the key properties https : msdn.microsoft.com en-us library system.reflection.assemblykeyfileattribute v vs.110 .aspx cs-save-lang 1 cs-lang cpp code-snippet-3 this way required to Set Common Language RunTime Support http : stackoverflow.com questions 16732789 system-a-namespace-with-this-name-does-not-exist 20595744 20595744 or to specify the key file we will use at : Project- Properties- Configuration Properties- Linker- Advanced- Key File http : stackoverflow.com questions 2389886 how-do-i-strong-name-a-c-assembly-in-vs2008 answertab votes tab-top this way didn t work to me . 3.Sign the .dll by the SN tool https : msdn.microsoft.com en-us library k5b5tt23 v vs.110 .aspx : sn.exe -R dll file.dll key file.snk .. . .. . Since step 2 required Visual C++ project change CLR support or specify file key I m wondering if there is a way to sign without changing the existing project because I don t want to touch something that works.. . .. . .. . Any idea", "Question : We have a bunch of libraries that are strong-named and placed in the GAC . We are trying to get away from the practice . Here is the scenario I need to address at the moment . I have a DLL to replace and existing and signed one same name and overall structure which I cannot sign or strong name properly as we cannot reproduce the key . I will recompile a component code using the unsigned version and later deploy it with unsigned copy using . If remove the signed copy from GAC will the other components who would use the same probing consume the new one without recompile or still demand the signed version Thank you . Comment : Depends on how it was used and defined in the compiled code . However you can disable strong name validaton you may want to look into it https : blogs.msdn.microsoft.com securitytools 2009 12 30 how-to-turn-off-strong-name-validation . Comment : Thank you . I think I ve read that one before . I did forget to add that it is preferable for us not to have to recompile the other components unless there is no other way or it is so convoluted that it becomes detrimental . Comment : Probably nothing will happen strong name validation is turned off in full trust mode since .NET 3.5SP1 . Gives you lots of time to recompile the rest of the code . .. . Answer : strong-name signatures are not validated when an assembly is loaded into a full-trust application domain . more information about this bypass feature can be found in this link https : msdn.microsoft.com en-us library xwb8f617 v vs.110 .aspx .Hope it helps Comment : Thank you . I think we ve decided not to mess with existing assemblies and move away by creating assemblies with different names slowly migrating . Water always flows where there is less resistance .", "Question : Should i be creating a new strong name key to resign a class assembly if i change the version information number of the class assembly For example : The class assembly version information is currently 1.0.0.0 . If I change the version no . to 1.1.0.0 should i create resign the assembly or does the strong name key use the new version information when the assembly is re-built thanks .. . Answer : You absolutely should not use a new strong name key the strong name is part of the identity the version is another part - you should use the same strong name key that you used when you created the 1.0.0.0 dll . Yes you should create resign - but with the same key .", "Question : I ve made some changes to the code in an existing .NET assembly dll . I do not have the keyfile used to sign the code . How can I force the .NET executable to load it without registering it for skipping verification not portable without removing StrongNames Damages application .. . Answer : You can t and that s the whole point of strong names . Strong names verify that an executable file has not been tampered with by someone who is not the author . Anyone with the original key file is assumed to be the author . Since you do not have the key file you must not be the author and as such strong naming prevent you from doing the changes you want to do . If you want to load your DLL you ll have to use either solution you suggested . EDIT Since .NET 3.5 SP1 strong name verification is bypassed http : blogs.msdn.com b shawnfa archive 2008 05 14 strong-name-bypass.aspx provided at least one of the following conditions is met : .. . .. . the assembly is fully signed with Authenticode .. . the assembly is fully trusted without any regards to its strong name evidence .. . the assembly is loaded into a fully trusted AppDomain which is what happens with desktop applications in most scenarios .. . the assembly is loaded from a location under the AppDomain s ApplicationBase i.e . the assembly is distributed with the application and exists in the same directory . Basically strong name verification was disabled for every use-case except Silverlight . It s possible however for a system administrator to re-enable name verification by default with a registry key : .. . .. . Microsoft says that the reason this change is allowed is that strong names were not an integrity checking mechanism http : blogs.msdn.com b shawnfa archive 2008 05 14 strong-name-bypass.aspx 9709168 but were an assembly identification mechanism . For actual integrity checking Authenticode is the way to go . This means that for all practical purposes strong names aren t useful to prevent tampering and anyone can tamper with any assembly and still have it load correctly unless the system administrator prevents it . To correctly answer this question then it should be mentioned that modifying an assembly will invalidate its strong name and as such there is no way to edit a DLL without invalidating the strong name if the snk is not available . However it will not prevent it from loading in most cases . Comment : I ve seen it done I m looking at an example right now . Comment : Please keep us posted if you do find one . Do you have access to the application s source code Comment : Yes . I have full source code I don t have the key alone . Comment : Not being funny but I really hope you can t . Comment : Like I said I m looking at a DLL that was edited and works with a non-modified .NET application . I d really like to know how this individual did it .", "Question : On an infrequent random interval some projects in a solution won t build anymore . Probably because of the strong-named-key file beging corrupt or lost. . resulting in the following errors when building the project : .. . .. . Error 1 Metadata file D : CasparKleijne.Toolkit CasparKleijne.Toolkit bin Debug CasparKleijne.Toolkit.dll could not be found CasparKleijne.Toolkit.Reporting .. . .. . Error 2 Cannot import the following key file : CasparKleijne.Toolkit.pfx . The key file may be password protected . To correct this try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name : VS KEY 11D604D4C94AB54 CasparKleijne.Toolkit .. . .. . Error 3 Importing key file CasparKleijne.Toolkit.pfx was canceled . CasparKleijne.Toolkit .. . .. . assembly names are changed for some privacy reasons .. . .. . But the file is at the exact same location where it was but I cannot import it anymore . I have to create a new one and all works fine again . How can a file be at the correct location but still not be found by vs2010 what is this mystery How can I avoid this .. . Answer : Its looking for a pfx file . I think that s a certificate file-format . Maybe the certificate expired or like the message said it is password protected . Comment : Whoever downvoted would you care to explain why", "Question : I have 2 different versions of the same project on my machine . One from the code trunk and the other from a code branch . These projects use a .pfx key to enable strong naming . When I first tried to compile the trunk version of the project I get the following error : .. . .. . Cannot import the following key file : sgKey.pfx . The key file may be password protected . To correct this try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name : VS KEY 45891C38BC1BB345 .. . .. . To resolve this I use sn.exe with the following command : .. . .. . sn -i sg Key.pfx VS KEY 45891C38BC1BB345 .. . .. . This resolves the issue with the trunk project which then happily builds . However when I try to build the branch version of the project I receive the same initial error with the same key container name and when I try install the certificate using the sn.exe it not surprisingly gives the following error : .. . .. . Failed to install key pair -- Object already exists .. . .. . This makes sense in that I used the same infile and container on the sn command but what I am trying to understand is : .. . .. . 1 . If this object already exists why is the project failing to build as it would appear the certificate is already installed . 2 . How I resolve this e.g . can I uninstall and then reinstall and if so how .. . Answer : I have managed to resolve my issue without fully understanding the cause . I found a post about a similar issue here http : dotnetspeak.com 2013 05 failed-to-install-key-pairobject-already-exists but did not fit my circumstance precisely as I had only ever logged on to my machine as a single user . The post showed how to delete the container but I couldn t do this either as it said the container didn t exist . What it did though was prompt me to run the command-prompt as an Administrator which I had not done previously . This allowed me to uninstall and re-install the certificate and both versions of the project now build successfully . My assumption is that somehow the certificate had initially been installed by me under a different user than the one I tried to install with the second time though I don t know why this would be as I have only ever logged on to the machine as a single user . It remains something of a mystery to me . .. . .. . Summary : .. . .. . 1 . Start the developer command-prompt as administrator otherwise you ll get a misleading error saying the container doesn t exist . 2 . Run sn -d VS KEY XXXXXXXXXXX to remove the old key . 3 . You should now be able to reinstall the certificate . Comment : Thank you so much for following up on this . This is exactly the situation I was in and your fix worked for me . I had originally logged into Windows 8.1 using my Microsoft account installed the certificate then realized I meant to log into Windows as my domain user . I deleted the old user account from the machine but apparently the previous certificate install still had ill effect . Don t forget to mark your answer as correct . Comment : I am glad I could be of assistance John and thanks for the edit summarising the steps .", "Question : I m using two dll assembly from Microsoft to compare Xml . XmlComparer.cs uses Microsoft.XmlDiffPatch and the two references are correctly added in Visual Studio . However I get this message : .. . .. . Error : Could not load file or assembly XmlDiffPatch Version 1.0.8.28 Culture neutral PublicKeyToken b03f5f7f11d50a3a or one of its dependencies . The locate d assembly s manifest definition does not match the assembly reference . Excepti on from HRESULT : 0x80131040 exception : System.IO.FileLoadException : Could not load file or assembly XmlDiff Patch Version 1.0.8.28 Culture neutral PublicKeyToken b03f5f7f11d50a3a or on e of its dependencies . The located assembly s manifest definition does not match the assembly reference . Exception from HRESULT : 0x80131040 File name : XmlDiffPatch Version 1.0.8.28 Culture neutral PublicKeyToken b03f 5f7f11d50a3a at XmlCompareLib.XmlComparer.Compare String comparisonOptions String sourceX mlFileName String changedXmlFileName String resultHtmlViewFile in C : Users xx Documents Visual Studio 2010 Projects ConsoleApplication3 ConsoleAp plication3 XmlComparer.cs : line 214 at Ionic.Zip.Examples.ReadZip.Main String args in C : Users xx Documents Visual Studio 2010 Projects ConsoleApplication3 ConsoleApplication3 Pr ogram.cs : line 44 .. . .. . WRN : Assembly binding logging is turned OFF . To enable assembly bind failure logging set the registry value HKLM Software Md icrosoft Fusion EnableLog DWORD to 1 . Note : There is some performance penalty associated with assembly bind failure lo gging . To turn this feature off remove the registry value HKLM Software Microsoft Fus ion EnableLog . I think it is related with Strong Name . Because I checked the two DLL and they are not strong named so I tried to generate a key and strong name the assembly but it was obviously not the same key . I m stuck now. . Comment : Maybe these dll-s call another dll-s internally and one of them is missing or has different version just throwing idea . .. . Answer : This is usually the point where I turn on the Fusion logger and log all the bindings . The logs out of Fusion are usually a little clearer on what it is doing . To enable Fusion logging you can open a VisualStudio command-prompt and run fuslogvw.exe . Mine ends up being installed at : .. . .. . C : Program Files Microsoft SDKs Windows v7.1 Bin NETFX 4.0 Tools x64 FUSLOGVW.exe .. . .. . but that may differ based on your install . You then click the Settings button int hat tool and enable logging by flipping a radio-button then running your app then clicking Refresh in fusion logger and it will show you all the bindings that happened and ones that failed . Remember to go back into the settings window and turn off logging when you are done :", "Question : On an infrequent random interval some projects in a solution won t build anymore . Probably because of the strong-named-key file beging corrupt or lost. . resulting in the following errors when building the project : .. . .. . Error 1 Metadata file D : CasparKleijne.Toolkit CasparKleijne.Toolkit bin Debug CasparKleijne.Toolkit.dll could not be found CasparKleijne.Toolkit.Reporting .. . .. . Error 2 Cannot import the following key file : CasparKleijne.Toolkit.pfx . The key file may be password protected . To correct this try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name : VS KEY 11D604D4C94AB54 CasparKleijne.Toolkit .. . .. . Error 3 Importing key file CasparKleijne.Toolkit.pfx was canceled . CasparKleijne.Toolkit .. . .. . assembly names are changed for some privacy reasons .. . .. . But the file is at the exact same location where it was but I cannot import it anymore . I have to create a new one and all works fine again . How can a file be at the correct location but still not be found by vs2010 what is this mystery How can I avoid this .. . Answer : Wild guesses : .. . .. . Check your build configuration and ensure that project is set to build . Make sure it is not getting switched . Otherwise in my experience weird problems like that are ususally due to Visual Studio caching things on its own . There is no reliable way or at least I haven t found yet to detect what or where to look . I generally resort to a rinse-n-repeat procedure : .. . .. . Delete all obj debug folders .. . Clear you temp directory .. . Close all VS instances and restart your IDE . Do a rebuild", "Question : I know this is a probably an easy question but I am starting to get lost . Is the private key I use to sign my assemblies for strong names within visual-studio project properties any way related needed to generate a CSR Comment : Please do not include information about a language used in a question title unless it wouldn t make sense without it . Tags serve this purpose . .. . Answer : A CSR Certificate Signing request is a request typically sent to a certificate-authority for the generation of a digital-certificate . The CSR contains information that will be included in your certificate such as your organization name common name domain-name locality and country . In addition the CSR contains the public-key that will be used in your digital-certificate . The private key is NOT sent in the CSR as it must be kept private on the server where the CSR was originated . The Visual Studio strong-name signing uses a public private key pair in the process . The key pair information is stored in a key file which can be a Personal Information Exchange PFX file or a certificate from the current user s Windows certificate store . Thus if you want to use a certificate from the Windows Certificate store then you might use the following process : .. . .. . Establish a CSR .. . Send to a Certificate Authority .. . Receive the Certificate .. . Import into your User Cert Store .. . Sign the assembly with the certificate .. . .. . Alternatively you could use a self-signed certificate generated via makecert or a tool like Pluralsights SelfCert . References : .. . CSR : http : www.sslshopper.com what-is-a-csr-certificate-signing-request.html .. . Signed Assembly : http : msdn.microsoft.com en-us library ms247123 v vs.90 .aspx .. . SelfCert : http : blog.pluralsight.com selfcert-create-a-self-signed-certificate-interactively-gui-or-programmatically-in-net", "Question : If strong name signing an assembly with a password protected pfk is it possible to get access to the password used for the key in an AfterBuild node Comment : The password is not stored nor accessible by anyone it s just used once to install the certificate durably in a container like the wizard when you double click on the .pfx file from Explorer . More on this here : stackoverflow.com questions 16658541 http : stackoverflow.com questions 16658541 enumerating-container-names-of-the-strong-name-csp . see the VS KEY containers . Perhalps it would help if you tell us hat are you trying to do exactly in the end .. . Answer : No it s not possible to get the password .", "Question : In my applicaiton I am referencing a .dll which works fine locally . After I build the application for release and test it on another computer the library fails to load . I have attached the processes to the Visual Studio Debugger on the test computer and the error messgae I get tells me that the strong name could not be veryfied . To test on another computer I simply build the solution for release and copy the entire Release folder to the other computer . All the .dlls including the failing one are there and all of the except the one are being loaded successfully . When I do the same thing but with the code that uses that .dll commented out it all works just fine . Are there any steps I am missing It seems very odd that the library s strong name can be veryfied locally but on a test computer . Comment : How did you sign your assembly Delay-signed assemblies could not be verified . Comment : Info on signing your assemblies http : msdn.microsoft.com en-us library ms182127.aspx .. . Answer : From your symptoms it sounds like you might have Delay Signing on for that assembly Take note of the section that reads : .. . .. . With either the Vr or Vk option you can optionally include an .snk file for test key signing . .. . Use the -Vr or Vk option only during development . Adding an assembly to the skip verification list creates a security vulnerability . A malicious assembly could use the fully specified assembly name assembly name version culture and public-key token of the assembly added to the skip verification list to fake its identity . This would allow the malicious assembly to also skip verification . You may have run that so it passes on your machine and not on deployment ones . http : msdn.microsoft.com en-us library t07a3dye v vs.110 .aspx http : msdn.microsoft.com en-us library t07a3dye 28v vs.110 29.aspx", "Question : I am trying to find way to use the strong name sign as an configuration . My case is : I have project that it include in two different solution . For one solution I want that the project will be sign with strong name key but for the other solution I want that the project will be without sign . Currently I declare the signing throw : project- properties- signing . .. . Answer : OK I got it just edit proj file manually", "Question : I m trying to find some information about how to if at all possible enumerate all container names in the Strong Name CSP Cryptographic Service Provider . Essentially when you type sn.exe -i key.snk MyContainerName the public and private key pairs are stored into what s called a container . Later within your code you could specify the container name in the AssemblyKeyNameAttribute http : msdn.microsoft.com en-us library system.reflection.assemblykeynameattribute.aspx e.g . : .. . .. . This will cause the assembly to be signed at compile-time . I am trying to find out if it s possible to somehow enumerate all container names . I m writing a plugin for ReSharper https : github.com hmemcpy ReSharper.InternalsVisibleTo that provides code-completion for the InternalsVisibleTo attribute . I d also like to provide code-completion for the AssemblyKeyName attribute where I would pre-populate the list with known container names . Is this information accessible EDIT : From a comment on this question http : security.stackexchange.com questions 1771 how-can-i-enumerate-all-the-saved-rsa-keys-in-the-microsoft-csp at IT Security StackExchange there s a link-to a little util called KeyPal http : www.jensign.com KeyPal index.html . Running this utility with LM will dump the local machine key store : .. . .. . .. . --------- KeyPal : MACHINE store : 3 keycontainers --------- .. . 0 VS KEY F726FDF898BC4CB8 .. . Signature 1024 .. . 1 IIS Express Development Certificate Container .. . Exchange 1024 .. . CertE : CN localhost .. . 2 MyContainerName .. . Signature 1024 .. . ------------------------------------------------- .. . .. . .. . Where I can see that both 0 and 2 are valid container names to use with AssemblyKeyName . However there s the 1 one - IIS Express.. . which is not a valid container . How do I distinguish between them Comment : Not solving the actual problem but in case it helps.. . You know in general specifying via Attributes is deprecated as in you ll struggle to see it outside of V1.1 codebases in favor of VS managing the installation into the store and the passing them to the CSC Task stackoverflow.com a 16464894 11635 http : stackoverflow.com a 16464894 11635 Comment : @RubenBartelink Interesting thanks . I assumed as much since there s barely any up-to-date info about these things . I m only doing this out of interest since a user of my ReSharper plugin reported a bug and in his case they re still using the attributes . So I wondered how difficult it would be to assist them . But it does look like anybody barely uses it anymore . .. . Answer : Here is a sample code that kinda do the same thing as this keypal tool . It enumerates all containers for local machine and from there get the one that can become StrongNameKeyPairs https : msdn.microsoft.com en-us library system.reflection.strongnamekeypair.aspx . Usually strong name keys have a 160 bytes-length public-key SHA1 : .. . .. . .. . Comment : This is excellent thanks I recently modified my little plugin to read the snk files direct using some utils from Roslyn . I might incorporate some of your code into it as well with proper attribution of course", "Question : null .. . Answer : I am trying to profile an IIS web Service Hosted on a different Machine through VSTS Command Line Tools . During this Process My CommercialService.dll file becomes Unsigned . So I resign my above Dll with same certificate and same public-key token according to procedure mentioned in http : sharepointcoding.wordpress.com 2009 02 27 assign-a-strong-name-to-a-third-party-dll and make a new Dll rj.dll to make it protected again . When I try to replace CommercialService.Dll with rj.dll by changing it s name I got from above procedure I am not able to deploy it on IIS .", "Question : My 4.0 MVC app that renders a PDF View to screen . It all works on my dev box but generates a security violation from the host provider environment . To compensate I added AllowPartiallyTrustedCallers and SecurityCritical attributes on controller . Only now two of my nuget packages will not compile because they are not strong name compliant . So when I try the following steps to make them strongly named I end up with a runtime-error . Any suggestions appreciated . Steps to strong name nuget dlls . Runtime Error : Attempt by security transparent method my App . M v c Application . Application Start to access security critical method System.Web.Optimization.Bundle Table.get Bundles failed . n n Assembly my App Version 1.0.0.0 Culture neutral PublicKeyToken null is marked with the Allow Partially Trusted Callers Attribute and uses the level 2 security transparency model . Level 2 transparency causes all methods in Allow Partially Trusted Callers Attribute assemblies to become security transparent by default which may be the cause of this exception . Attempt by security transparent method my App . M v c Application.Application Start to access security critical method System.Web.Optimization.Bundle Table.get Bundles failed . Assembly my App Version 1.0.0.0 Culture neutral Public Key Token null is marked with the Allow Partially Trusted Callers Attribute and uses the level 2 security transparency model . Level 2 transparency causes all methods in Allow Partially Trusted Callers assemblies to become security transparent by default which may be the cause of this exception . .. . Answer : Have you already executed the .NET Security Annotator Tool on your assembliy and its dependencies It guides you through the steps to make it Level 2 compliant . http : msdn.microsoft.com en-us library dd997356.aspx", "Question : I am running windows form application as ClickOnce Deployment . When i debugg the solution i am not getting any error . it s working fine . But when i publish the application using click once deployment and run the application from folder i am getting the following error-log . Can anyone help me out what exactly the problem is Comment : On face value it seems Microsoft.Practices.EnterpriseLibrary.Data.dll has corrupted strong name some sort of tampering to invalidate the hash or is it that this binary that you are using is incompatible with environment framework and it fails the signature validation error is a wrapper over actual issue . What is the source of enterprise-library which version is used . .. . Answer : I faced the same issue when I did click once deployment . The possible errors are the property settings are wrong . 1.Did u strong name this assembly . After strong naming did you delete the old reference and add a new one If so that s wrong . We need not explicitly add the dll again . Once we build it ll get referred automatically . If you have removed the reference added explicitly then check the below condition 1.a Go to project properties - publish - Application Files - Check if there is any reference to this particular DLL other than GAC reference by default this DLL would be reffered to DLL from GAC when u explicitly add reference from your machine then the local references will also get added - If u find any such thing just exclude it build it again and trigger a new click once build - the problem should be solved . 2 . And for the reference set CopyLocal property to true . References - Select the corresponding DLL - Set copyLocal property to true . Thanks Gayathri . chand.gayu@gmail.com Comment : please improve the content while asking question . it s not clear refer : stackoverflow.com help how-to-ask http : stackoverflow.com help how-to-ask", "Question : 11 of the DLLs in my solution must use PFX certificates very large enterprise application using Click-Once install . The certificates work perfectly except every time someone pulls down a TFS branch from a different developer workstation the certificate password is invalid and they receive : .. . .. . Error Cannot import the following key file : CertificateName.pfx . The key file may be password protected . To correct this try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name : VS KEY DB583A44F66CCF4B AssemblyName .. . .. . Forcing them to reenter the same password for all 11 assemblies image below . What is a solution fix for this very time consuming rigmarole enter image description here http : i.stack.imgur.com yoOIk.png .. . .. . I do understand that entering the same password from a different workstation uses local values producing technically a different key but I m sure I m not the first person to have this problem . .. . Answer : This was solved by blocking the .pfx files from being checked-in and brought down from TFS . Three potential solutions emerged : .. . .. . 1 . Forbidden Pattern Policy using Server TFS Power Tools . stackoverflow.com questions 2741412 forbidden-patterns-check-in-policy-in-tfs-2010 .. . .. . msdn.microsoft.com en-us library gg475890 28v vs.100 29.aspx .. . .. . 2 . TFS Cloaking .. . .. . stackoverflow.com questions 29808807 how-to-cloak-directories-in-tfs-command-line .. . .. . MSDN - Cloaking in TFS http : blogs.msdn.com b fai archive 2008 10 02 cloaking-in-tfs.aspx .. . .. . 3 . .tfignore the chosen solution .. . .. . AIS Blog - excluding-files-from-team-foundation-version-control-using-tfignore-files http : blog.appliedis.com 2014 11 06 excluding-files-from-team-foundation-version-control-using-tfignore-files .. . .. . In the end .tfignore I found to be the best solution . The .tfignore was automatically generated by Selecting the Detected changes link in the Excluded section of Pending Changes Page then choosing Ignore by extension .pfx from the PFX file s shortcut menu . The .tfignore was introduced to the root of the mapped workspace so this rule would be immediately applied to every developer s workspace on next pull from TFS .", "Question : I ve made some changes to the code in an existing .NET assembly dll . I do not have the keyfile used to sign the code . How can I force the .NET executable to load it without registering it for skipping verification not portable without removing StrongNames Damages application .. . Answer : You can edit a .NET dll in Reflexil .NET Reflector addon and preserve the original signature on the modified code . Thank you for your answers . To those of you who wish to edit an assembly and not resign it use Reflexil . Just because the idiots who voted this answer down don t fully understand the field they are speaking on doesn t make it wrong . Comment : Really The Reflexil page says you can remove strong names and accordingly edit references from other assemblies but it seems cryptographically dubious that you can preserve the original signature and change the assembly . Mind to explain how you did this Comment : By taking the original dll modifying your desired methods etc.. . saving the assembly then doing a delayed sign . I have proof of this but I am not sure if I am allowed to post the dll I did this to . Comment : Delayed signatures don t constitute a valid strong name http : msdn.microsoft.com en-us library t07a3dye.aspx . Are you sure you did not just turn off the validation for your DLL Comment : I m not interested in teaching you better - Ignorance on your other developer s parts makes my job of pirating your software easier . I LOVE it when developers know everything - until their program gets cracked and ends up on every torrent site on the internet . They aren t so high and mighty when their asses get chewed out by their bosses . The reason this works is because the .NET framework s code signature system is bugged . Comment : I emailed the author of Reflexil to be sure and got an interesting answer http : pastebin.com bA9Kgd7E in French . Editing an assembly with Reflexil does remove the strong name and replaces it with a delay signature but most of the time this does not prevent the assembly from loading . This answer is wrong in that it does remove the original signature but in most cases it won t prevent the assembly from loading and does not damage the application as asserted in the question .", "Question : while signing for dll files command executed successfully but for .exe files i got error Command exited with 1 . exec Command SN-R demo.dll . . key.snk exec Command SN-R demo.exe . . key.snk .. . .. . Please help me how to solve this Comment : More information would be helpful to users trying to diagnose the problem . Have you put in any research effort to see what might be causing this Comment : Above problem solved by installing Microsoft SDK 8.0 Comment : Go ahead and provide that as an answer it might help future users .. . Answer : Initially I had installed Microsoft SDK 7.0 .. . .. . After uninstalling SDK 7.0 I have installed SDK 8.0 then problem solved", "Question : I am using Couchbase client inside my asp.net web mvc project i downloaded the dll files from here http : www.couchbase.com develop net current .. . .. . I have a Couchbase Server installed on Windows Server 2012 x64 . When developing the project everything works as expected . When i publish the website on the server i get this error : .. . .. . I am stuck i have also tried this answer http : stackoverflow.com questions 8977053 cant-get-the-couchbase-net-memcache-client-to-run-complains-its-strong-name-v 8977433 8977433 but with no effect . What can i do .. . Answer : There was a problem with the 1.2.2 build signing related . There s a fix posted to http : packages.couchbase.com clients net 1.2 Couchbase-Net-Client-1.2.3.zip NuGet is also updated . I ll investigate as to why the site doesn t have the new links . Apologies for the confusion . Comment : Thank you..i got the packages from nuget and it is working . The link you posted returns Access Denied Comment : Sorry - the access denied issue should be fixed now ." ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
webkitgtk@webkit@54
webkitgtk -- webkit gtk + is the new gtk + port of the @placeholder an open-source web content engine that powers numerous applications such as web browsers email clients feed readers web and text editors .
{ "confidence": [ 42.38493347167969, 42.38493347167969, 39.32503890991211, 37.976993560791016, 35.94572067260742, 31.496448516845703, 28.326274871826172, 27.426795959472656, 23.997722625732422, 21.8201847076416, 21.81833267211914, 21.81833267211914, 21.81833267211914, 20.736068725585938, 20.736068725585938, 19.892765045166016, 19.27826690673828, 18.791606903076172, 18.38606071472168, 17.61469268798828, 17.59820556640625, 17.386756896972656, 15.75204849243164, 14.6382417678833, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 12.351038932800293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293, 10.687464714050293 ], "content": [ "So I m experimenting with Webkit GTK DOM functions .", "Internally WebKit GTK is checking if the pointer is NULL .", "Possible Duplicate : .. . Webkit GTK : Determine when a document is finished loading http : stackoverflow.com questions 11728195 webkit-gtk-determine-when-a-document-is-finished-loading .. . .. . I want to fetch a website s HTML contents with WebKitGTK+ to handle the javascript redirections automatically .", "We are working on Samsung smart TV SDK Emulator which is using webkit on gtk port .", "Is there any QTimer in GTK", "Now in Javascript a TreeWalker is created by calling : .. . .. . document.createTreeWalker root nodesToShow filter entityExpandBol .. . .. . .. . .. . .. . So in WebKit GTK there is an obvious counterpart in the API - a function called webkit dom document create tree walker .", "The function signature is : .. . .. . So creating a TreeWalker with WebKit GTK seems pretty straightforward - except for one big problem : the fourth argument in the webkit dom document create tree walker expects a filter object that is it wants an instance of WebKitDOMNodeFilter .", "Related : How to know when a web page is loaded when using QtWebKit", "The header file for WebKitDOMNodeFilter.h http : www.google.com url sa t rct j q webkitdomnodefilter.h source web cd 1 ved 0CE4QFjAA url http : www.emdebian.org zumbi tmp webkit-1.6.1 build-2.0 DerivedSources webkit WebKitDOMNodeFilter.h ei 5ngaUNvLHOT40gHryYCwBg usg AFQjCNH14toI2tpkYI20wmBhYNH8390xBA cad rja doesn t expose any constructor for WebKitDOMNodeFilter .", "According to the doc of gtk-show-uri https : developer.gnome.org gtk3 stable gtk3-Filesystem-utilities.html gtk-show-uri which uses the default-browser to open links you additionally need to install the gvfs https : en.wikipedia.org wiki GVfs to get support for uri schemes such as http : or ftp : .. . .. . For debian-based distributions you can install gvfs just like that : .. . .. . sudo apt-get install gvfs gvfs-backends gvfs-fuse .. . .. . If that does not help you additionally can check the error-message of gtk show uri in case it returns FALSE .. . .. . For custom-browsers like yours according to the doc of GtkLinkButton https : developer.gnome.org gtk3 stable GtkLinkButton.html you need to connect to the activate-link signal https : developer.gnome.org gtk3 stable GtkLinkButton.html GtkLinkButton-activate-link and return true from the handler .. . probably you already did so .", "Maybe I m using the wrong version of webkit", "Webkit 1.0 doesn t include the DOMDocument stuff .", "With the Webkit API passing NULL doesn t work .", "Is there a way to know when WebKit has completely loaded a webpage", "How can I know if WebKit is still executing some JavaScript code", "Also WebKit covers a variety of different browsers which may have different support for WebVTT could you provide the precise browser and version you re testing against", "I m importing the method in C mono since dom document isn t implemented in webkit-sharp like this : .. . .. . base.Handle is an IntPtr to the WebView object .", "If you call : .. . .. . You get the error message : .. . .. . webkit : 3367 : CRITICAL : WebKitDOMTreeWalker webkit dom document create tree walker WebKitDOMDocument WebKitDOMNode gulong WebKitDOMNodeFilter gboolean GError : assertion filter failed .. . .. . So the WebKit API won t accept a NULL pointer for the filter argument .", "I ended up having to use a newer version of webkit-sharp which hasn t actually been released yet which already has the DOMDocument implementation .", "So can anyone tell me where should i keep digging in webkit so that it can work .", "Or how can I open these links in the system default browser", "Okay again - this wouldn t be a problem either except I ve searched far and wide through the WebKit API as well as Google and I can t find anyway to create a WebKitDOMNodeFilter object", "Wait for the page result until there are no new loadStarted signals fired and no redirection needs to be done again .", "I am working with HTML5 video-player in webkit i have one webvtt file and i need to display subtitles in the video however subtitles are not displayed even though i have specified webvtt file in track element .", "The webkit web view get dom document never returns .", "I m calling this in a separate thread .", "The thread just hangs indefinitely .", "I also tried isolating the method call to be sure that was what was hanging .", "I passed in an IntPtr and assigned the return-value to an IntPtr .", "It s definitely webkit web view get dom document that isn t returning .", "Anybody know why this is happening", "Does that method not exist", "It s pretty straightforward except for one thing : there s a useful part of the API called the WebKitDOMTreeWalker which I assume lets you walk over each node in the DOM just like the TreeWalker object in Javascript .", "Well the Javascript function also takes a filter but you can pass null if you don t want to use a filter .", "Evidently you need to pass an instance of a WebKitDOMNodeFilter .", "It seems like the API doesn t ever expose anyway to actually construct a WebKitDOMNodeFilter object at all .", "Yet.. . the API exposes many functions like webkit dom document create tree walker and webkit dom document create node iterator which require a WebKitDOMNodeFilter .", "So.. . is the API just incomplete right now", "Or is there some way to create a Filter object which I m just not seeing", "Can you try casting your null to the WebKitDOMNodeFilter type by calling WEBKIT DOM NODE FILTER null", "No it still fails with an assertion failure .", "I am using the following Python code : .. . .. . The website loads fine but there are some special websites which are redirecting to a webpage redirecting somewhere else I ve tried to connect the load-finished event to a function and it s called twice .", "http : stackoverflow.com q 1302874 95735", "There is no sure way to programatically accomplish that task for all websites as there are pages where those redirections are initiated with javascript often started by setTimeout after n-seconds and there is no built-in method to scan for such quirks .", "However if you are parsing a known group of websites where you surely know that such redirections will happen you can create a list of those urls with the required number of seconds after which the redirection will happen .", "After an initial loadFinished is fired you can start a QTimer connect it s signal to a function which will fire loadFinished again so the next page load will surely start while you re waiting for the result .", "Sorry I gave the idea based on my experience from using qtwebkit with pyqt pyside.. .", "I have created my view wrapped in a window and loaded an URL like this : .. . .. . My Mini-Browser starts and I can click on lokal links links which are bound to JavaScript events or links to other pages on the same domain .", "But when the links point to other domains nothing happens .", "How do I catch clicks on external links", "Did you use a GtkLinkButton https : developer.gnome.org gtk3 stable GtkLinkButton.html", "Sorry again if my query is not put correctly but that s what i can extract best to put up here .", "Apps are run from Emulator .", "Apps provide the subtitle information from index.html file .", "index file contains the below information .", "vtt file looks like .. . .. . Actually we saw a macro VIDEO TRACK in HTMLMediaElement.cpp and we enabled it but it does not help .", "Actually we tried enabling VIDEO TRACK using .. . .. . But it didn t help .", "We are seeing below code in HTMLMediaElement .. . .. . but it does not execute .", "Let me know if you need any more information on my query and thanks so much again .", "Thanks Vineet .", "Hi Vineet welcome to Stack Overflow", "To be able to best help you it would be good if you could include an example of what you have tried that isn t working include the video element and a sample of the WebVTT file in your question .", "Hi Brian I have added more clarification please can you see if that helps .", "Thanks .", "Hi Vineet .", "To clarify your question you should edit the question itself rather than posting an answer to it .", "You should also fill out your profile information right now you show up as user3132990 in the question and comment but user3134154 in the answer that you posted .", "I will move the clarification into your question so that it will be in the right place and ask that the answer you posed be deleted since it s not actually an answer .", "I don t think that I can help you on your question itself I was just trying to give you advice on how to ask it better for people who may be able to help", "Thanks Brian i will try to be more clear and precise from the next time i ask any question .", "Anyway my problem is resolved now and thanks again for your help ." ] }
{ "confidence": [ 57.67332458496094, 49.60618591308594, 39.089256286621094, 34.925148010253906, 22.521087646484375 ], "content": [ "Question : Possible Duplicate : .. . Webkit GTK : Determine when a document is finished loading http : stackoverflow.com questions 11728195 webkit-gtk-determine-when-a-document-is-finished-loading .. . .. . I want to fetch a website s HTML contents with WebKitGTK+ to handle the javascript redirections automatically . I am using the following Python code : .. . .. . The website loads fine but there are some special websites which are redirecting to a webpage redirecting somewhere else I ve tried to connect the load-finished event to a function and it s called twice . Is there a way to know when WebKit has completely loaded a webpage How can I know if WebKit is still executing some JavaScript code Comment : Related : How to know when a web page is loaded when using QtWebKit http : stackoverflow.com q 1302874 95735 .. . Answer : There is no sure way to programatically accomplish that task for all websites as there are pages where those redirections are initiated with javascript often started by setTimeout after n-seconds and there is no built-in method to scan for such quirks . However if you are parsing a known group of websites where you surely know that such redirections will happen you can create a list of those urls with the required number of seconds after which the redirection will happen . After an initial loadFinished is fired you can start a QTimer connect it s signal to a function which will fire loadFinished again so the next page load will surely start while you re waiting for the result . Wait for the page result until there are no new loadStarted signals fired and no redirection needs to be done again . Comment : Is there any QTimer in GTK Comment : Sorry I gave the idea based on my experience from using qtwebkit with pyqt pyside.. .", "Question : So I m experimenting with Webkit GTK DOM functions . It s pretty straightforward except for one thing : there s a useful part of the API called the WebKitDOMTreeWalker which I assume lets you walk over each node in the DOM just like the TreeWalker object in Javascript . Now in Javascript a TreeWalker is created by calling : .. . .. . document.createTreeWalker root nodesToShow filter entityExpandBol .. . .. . .. . .. . .. . So in WebKit GTK there is an obvious counterpart in the API - a function called webkit dom document create tree walker . The function signature is : .. . .. . So creating a TreeWalker with WebKit GTK seems pretty straightforward - except for one big problem : the fourth argument in the webkit dom document create tree walker expects a filter object that is it wants an instance of WebKitDOMNodeFilter . Well the Javascript function also takes a filter but you can pass null if you don t want to use a filter . With the Webkit API passing NULL doesn t work . If you call : .. . .. . You get the error message : .. . .. . webkit : 3367 : CRITICAL : WebKitDOMTreeWalker webkit dom document create tree walker WebKitDOMDocument WebKitDOMNode gulong WebKitDOMNodeFilter gboolean GError : assertion filter failed .. . .. . So the WebKit API won t accept a NULL pointer for the filter argument . Evidently you need to pass an instance of a WebKitDOMNodeFilter . Okay again - this wouldn t be a problem either except I ve searched far and wide through the WebKit API as well as Google and I can t find anyway to create a WebKitDOMNodeFilter object The header file for WebKitDOMNodeFilter.h http : www.google.com url sa t rct j q webkitdomnodefilter.h source web cd 1 ved 0CE4QFjAA url http : www.emdebian.org zumbi tmp webkit-1.6.1 build-2.0 DerivedSources webkit WebKitDOMNodeFilter.h ei 5ngaUNvLHOT40gHryYCwBg usg AFQjCNH14toI2tpkYI20wmBhYNH8390xBA cad rja doesn t expose any constructor for WebKitDOMNodeFilter . It seems like the API doesn t ever expose anyway to actually construct a WebKitDOMNodeFilter object at all . Yet.. . the API exposes many functions like webkit dom document create tree walker and webkit dom document create node iterator which require a WebKitDOMNodeFilter . So.. . is the API just incomplete right now Or is there some way to create a Filter object which I m just not seeing .. . Answer : Can you try casting your null to the WebKitDOMNodeFilter type by calling WEBKIT DOM NODE FILTER null Comment : No it still fails with an assertion failure . Internally WebKit GTK is checking if the pointer is NULL .", "Question : I have created my view wrapped in a window and loaded an URL like this : .. . .. . My Mini-Browser starts and I can click on lokal links links which are bound to JavaScript events or links to other pages on the same domain . But when the links point to other domains nothing happens . How do I catch clicks on external links Or how can I open these links in the system default browser .. . Answer : Did you use a GtkLinkButton https : developer.gnome.org gtk3 stable GtkLinkButton.html According to the doc of gtk-show-uri https : developer.gnome.org gtk3 stable gtk3-Filesystem-utilities.html gtk-show-uri which uses the default-browser to open links you additionally need to install the gvfs https : en.wikipedia.org wiki GVfs to get support for uri schemes such as http : or ftp : .. . .. . For debian-based distributions you can install gvfs just like that : .. . .. . sudo apt-get install gvfs gvfs-backends gvfs-fuse .. . .. . If that does not help you additionally can check the error-message of gtk show uri in case it returns FALSE .. . .. . For custom-browsers like yours according to the doc of GtkLinkButton https : developer.gnome.org gtk3 stable GtkLinkButton.html you need to connect to the activate-link signal https : developer.gnome.org gtk3 stable GtkLinkButton.html GtkLinkButton-activate-link and return true from the handler .. . probably you already did so .", "Question : null .. . Answer : I am working with HTML5 video-player in webkit i have one webvtt file and i need to display subtitles in the video however subtitles are not displayed even though i have specified webvtt file in track element . So can anyone tell me where should i keep digging in webkit so that it can work . Sorry again if my query is not put correctly but that s what i can extract best to put up here . We are working on Samsung smart TV SDK Emulator which is using webkit on gtk port . Apps are run from Emulator . Apps provide the subtitle information from index.html file . index file contains the below information . vtt file looks like .. . .. . Actually we saw a macro VIDEO TRACK in HTMLMediaElement.cpp and we enabled it but it does not help . Actually we tried enabling VIDEO TRACK using .. . .. . But it didn t help . We are seeing below code in HTMLMediaElement .. . .. . but it does not execute . Let me know if you need any more information on my query and thanks so much again . Thanks Vineet . Comment : Hi Vineet welcome to Stack Overflow To be able to best help you it would be good if you could include an example of what you have tried that isn t working include the video element and a sample of the WebVTT file in your question . Also WebKit covers a variety of different browsers which may have different support for WebVTT could you provide the precise browser and version you re testing against Comment : Hi Brian I have added more clarification please can you see if that helps . Thanks . Comment : Hi Vineet . To clarify your question you should edit the question itself rather than posting an answer to it . You should also fill out your profile information right now you show up as user3132990 in the question and comment but user3134154 in the answer that you posted . I will move the clarification into your question so that it will be in the right place and ask that the answer you posed be deleted since it s not actually an answer . I don t think that I can help you on your question itself I was just trying to give you advice on how to ask it better for people who may be able to help Comment : Thanks Brian i will try to be more clear and precise from the next time i ask any question . Anyway my problem is resolved now and thanks again for your help .", "Question : I m importing the method in C mono since dom document isn t implemented in webkit-sharp like this : .. . .. . base.Handle is an IntPtr to the WebView object . The webkit web view get dom document never returns . I m calling this in a separate thread . The thread just hangs indefinitely . I also tried isolating the method call to be sure that was what was hanging . I passed in an IntPtr and assigned the return-value to an IntPtr . It s definitely webkit web view get dom document that isn t returning . Anybody know why this is happening Maybe I m using the wrong version of webkit Does that method not exist .. . Answer : Webkit 1.0 doesn t include the DOMDocument stuff . I ended up having to use a newer version of webkit-sharp which hasn t actually been released yet which already has the DOMDocument implementation ." ] }
[ "yes-answer-long", "yes-answer-short" ]
webkit
UNK_RELATION
statsd@daemon@40
statsd -- a simple lightweight network @placeholder to collect and aggregate metrics over udp .
{ "confidence": [ 35.68561553955078, 35.18898010253906, 35.14768600463867, 33.100467681884766, 32.85361862182617, 32.41362762451172, 32.41362762451172, 32.41362762451172, 31.83908462524414, 30.47740936279297, 29.63958168029785, 28.730865478515625, 28.730865478515625, 28.730865478515625, 28.730865478515625, 28.49994659423828, 28.187257766723633, 27.9705867767334, 27.9705867767334, 27.9705867767334, 27.9705867767334, 27.45201301574707, 27.131193161010742, 27.131193161010742, 27.10169792175293, 26.954164505004883, 26.902278900146484, 26.88631820678711, 26.800926208496094, 26.800926208496094, 26.800926208496094, 26.800926208496094, 26.70779800415039, 26.260265350341797, 26.063419342041016, 26.062227249145508, 25.74169158935547, 25.74169158935547, 25.72576332092285, 25.323829650878906, 25.216552734375, 25.216552734375, 25.216552734375, 25.216552734375, 25.090604782104492, 25.090604782104492, 25.090604782104492, 25.090604782104492, 24.990314483642578, 24.990314483642578, 24.990314483642578, 24.534652709960938, 24.378477096557617, 24.317848205566406, 24.142196655273438, 24.117090225219727, 24.109207153320312, 24.109207153320312, 24.079151153564453, 23.955968856811523, 23.955968856811523, 23.955968856811523, 23.952457427978516, 23.952457427978516, 23.76573944091797, 23.76573944091797, 23.63947105407715, 23.50623321533203, 23.50623321533203, 23.50623321533203, 23.50623321533203, 23.50623321533203, 23.50623321533203, 23.50623321533203, 23.50623321533203, 23.50623321533203, 23.50623321533203, 23.19298553466797, 23.082412719726562, 23.082412719726562, 23.082412719726562, 23.082412719726562, 23.082412719726562, 23.082412719726562, 23.082412719726562, 23.082412719726562, 23.082412719726562, 23.082412719726562, 23.082412719726562, 22.998416900634766, 22.986801147460938, 22.768829345703125, 22.717174530029297, 22.717174530029297, 22.670185089111328, 22.668155670166016, 22.668155670166016, 22.668155670166016, 22.668155670166016, 22.406768798828125 ], "content": [ "I m using Graphite+Statsd with Python client to collect custom metrics from a webapp : a counter for successful transactions .", "Currently I have statsd processing over 100 unique metrics .", "How to send JMX metrics to statsD daemon", "I wanted to track some application metrics using statsd and I see collectd has a statsd plugin .", "StatsD operates over UDP which removes the risk of carbon-aggregator.py being slow to respond and introducing latency in your application .", "But the problem is that I cannot see any of statsd metrics in prometheus i.e .", "the statsd plugin just converts statsd s internal metrics to proto2 .", "I m using statsd through a collectd s plugin and I want to send metrics with a .", "StatsD supports different metric types by adding extra aggregate values e.g .", "the statsd.listen-address will listen and collect data from UDP .", "This will then be sent via UDP to a node.js server which will send it to statsd .", "But in my case I m using dropwizard metrics + graphite not statsd + graphite so you may not have that problem .", "I have been using statsd in my python django application for measuring different metrics .", "Hmm you can start StatsD with a console backend and make sure it is receiving the metrics .", "You can change the escape char or simply send statsd metrics directly to Graphite I d do the last", "You send data to StatsD via UDP which is a fire and forget protocol stateless much faster .. . 2 .", "TLDR .. . .. . You should ensure that Graphite is set to store one data point per 10 second interval for metrics coming from StatsD .", "Are you running statsd or something similar", "Yes I am running statsd .", "How do I recycle statsd", "StatsD populates both for regular counters .", "Both of these can be handled by using the recommended Statsd configuration settings https : github.com etsy statsd blob master docs graphite.md .", "Author of the statsd-bridge here .", ".. . no it s writing it to statsd .", "Run a single Statsd aggregator .. . .. . Be sure you are only running one instance of Statsd as running multiple statsd daemons will cause metrics to be dropped as Graphite will be configured to only store one data point for it s highest precision of 10s : 6h .. . .. . Limit the time range in the UI or URL API to less than 6 hours .. . .. . When displaying graphs with data that crosses over the 6 hour threshold e.g .", "I downloaded statsd and graphite 0.9.x .. . I used the stats-client provided with source of statsd as follows : .. . . statsd-client.sh development.com.alpha.operation.testing.rate : 1 c .. . I did the above operation 10 times .", "I have been exploring the Graphite graphing tool for showing metrics from multiple servers and it seems that the recommended way is to send all metrics data to StatsD first .", "I use Statsd client based on Akka IO https : github.com archena statsd-akka source code to send data to statsd server .", "I m sending stats to a Graphite server via statsd .", "I recycled statsd and the files stay deleted now .", "I restarted statsd and that seemed to fix the problem .", "Don t run more than one Statsd aggregator .", "That said if you are overwhelming the statsd daemon you could use sampling on the client most clients have this OR you could modify the globalPrefix used by statsd see exampleConfig.js on each statsd daemon machine to include the statsd machine name which would get around the problem .", "Where are the output files for statsd situated", "statsd is designed to aggregate multiple data points in a single metric because otherwise graphite only stores the last value reported in the minimum storage resolution .", "We want to collect the metrics in order to determine our scalability needs .", "StatsD has broad client-side https : github.com etsy statsd wiki support .", "10s : 6h and 10s : 7d for the retentions and the Statsd flushInterval to 10000 ms so that Statsd and Graphite line up nicely .", "Hopefully something that also reads from Logstash or StatsD and if it can display the numerical changes over time too - even better .", "You can use the Statsd admin interface running on port 8126 by default : .. . .. . Use help to get a list of commands : .. . .. . You can use counters to see a list of all counters : .. . .. . Its the delcounters deltimers and delgauges commands that remove metrics from statsd : .. . .. . After removing the metric from Statsd you can remove the whisper file associated with it .", "Or is this the sort of thing that I should do within my statsd configuration directly", "Lets say we want to delete a counter called bad metrics.sent from Statsd .", "Is there any other way to pull up the statsd admin interface", "I have an application that publishes a number of stats to graphite via statsd .", "StatsD aggregates the data and sends it to graphite or rather Carbon .", "What will I have to change in my statsd", "Finest possible is 1 second and statsd will manage the aggregation .", "What is difference between StatsD vs Riemann", "Wherever I see in the internet I am only getting examples where statsd collectd is used to collect metric information about the Application System .", "My Question is : Can statsd collectd be used to collect statistical information on any other datasets which is not a system performance related data Eg : in Ecommerce", "I found this document digitalocean.com community tutorials https : www.digitalocean.com community tutorials how-to-configure-statsd-to-collect-arbitrary-stats-for-graphite-on-ubuntu-14-04", "I can see there are solutions where there are plugins to poll JMX metrics but I am looking more to push metrics to some Daemon which can aggregate as well as store it in some storage such as InfluxDB", "Running multiple statsd instances would mean that you d get a data point sent per statsd daemon 10 seconds each .. . but only one can be stored per 10 seconds .", "I prefer to keep this bundle pretty simple so I would like to skip statsd if it s possible .", "Should I replace python statsd client with influxdb-python https : github.com influxdata influxdb-python and use telegraf https : github.com influxdata telegraf UDP service as an aggregation part in front of the InfluxDB or just send metrics directly to the InfluxDB instance", "Especially using UDP .", "Data is being reported to statsd using the statsd php library and calling statsd : : increment metric and as stated above the log confirms that 4 000+ updates to this key happened today .", "And the statsd documentation at least as of today also describes this problem and how to solve it at github.com etsy statsd blob master docs graphite.md https : github.com etsy statsd blob master docs graphite.md .", "A couple of things to check try : .. . .. . Configure Graphite for Statsd .. . .. . Check to make sure that you ve used the retention schema https : github.com etsy statsd blob master docs graphite.md storage-schemas and aggregation https : github.com etsy statsd blob master docs graphite.md storage-aggregation settings in Graphite that match how Statsd will be sending data i.e .", "We are using : .. . .. . graphite 0.9.6 with statsD etsy", "Like statsd but without any aggregation on the agent side .", "I have a query regarding the usage of statsd and collectd .", "According to the documentation http : github.com prometheus statsd bridge building-and-running 20statsd.listen-address statsd.listen-address should be the address on which to receive statsd metric lines but you are pointing to the address where you want to see the Prometheus metrics .", "StatsD supports sampling of inbound metrics which is useful when you don t want your aggregator to take 100 of all data points to compute descriptive statistics .", "Graphite and statsd are what you need .", "You send statsd a stat name and stat value .", "carbon aggregator is designed to aggregate values from multiple metrics together into a single output metric typically to increase graph rendering performance .", "StatsD does not even provide aggregation of the kind I am talking about .", "My question is - should I use statsd at all for my use-case", "with statsd it indicates how many logins occurred in during that interval .", "It has two basic aggregation functions sum and average and indeed these are not covered by StatsD .", "StatsD etsy s implementation is in NodeJS which also increases the performance a lot .", "Usually in StatsD clients you dont have to specify the type i.e .", "Their replacement for statsd in C is pushing 4.3 million events sec .", "Does Riemann have all the aggregations as statsD per say", "that depends on what plugins you configured your statsd server with .", "statsd only aggregates data and sends it on to something else like graphite .", "furthermore statsd can automatically perform multiple different aggregations on a single input metric sum mean min max etcetera .. . .. . 4 . if you use statsd on each app server to aggregate response times and then re-aggregate those values on the graphite server using carbon aggregator you end up with an average response time weighted by app server rather than request .", "If not are there other systems that I should be looking at that can generate that type of roll-up data from statsd", "I had the same issue and it was because statsd was flushing the counters it had in memory after I deleted the whisper files .", "By default Statsd will continue to send 0 for counters it hasn t received in the previous flush period .", "The newest StatsD version has an option to not send zeroes after flush anymore but only what is actually sent to it .", "If you turn that one the whisper files shouldn t get recreated : https : github.com etsy statsd blob master exampleConfig.js L39", "We have etsy statsd node application running that flushes stats to carbon whisper every 10 seconds .", "One of the stats simply sends a stat increment to statsd every time a message is received by the service .", "Using the statsd recommended graphite configuration handles this but it is good to know about.. . as this can give the appearance of lost data .", "You should make sure that Graphite is summing not averaging for count data coming from Statsd .", "So are you saying that if I have many servers in a cluster I have to point them all to the same statsd instance", "The recommended statsd graphite configuration specifies that at most one data point will be stored per 10s interval and all others will be dropped .", "I can delete the metrics by removing the files .", "I have been looking at the source code of the Carbon aggregator and StatsD and Bucky https : github.com cloudant bucky a StatsD implementation in Python and they are all so simple that I would not worry about resource usage or performance for either choice .", "http : localhost : 9090 metrics .", "If one use a UDP listener on the InfluxDB side why you mentioned that sending metrics to the InfluxDB directly would block execution of the app-code", "I ve started sending my metrics via UDP directly to the InfluxDB instance with batch-size 1000 and batch-timeout 1s settings .", "In my case I want to do simple aggregations like sum and average on metrics across servers and plot that in graphite .", "I am using following sample code to use StatsD https : github.com etsy statsd blob master examples php-example.php to send telemetry from PHP to Graphite .", "Looks like carbon aggregator and statsd support disjoint set of features : .. . .. . statsd supports rate calculation and summation but does not support averaging values .. . carbon aggregator supports averaging but does not support rate calculation .", "Here you have the requested link : github.com etsy statsd blob master docs https : github.com etsy statsd blob master docs graphite.md correlation-with-statsds-flush-interval", "I don t have hard numbers on statsd but Github s Brubeck post suggests that they were losing about 40 of their statsd events at--I m guessing these graphs are in seconds--25 000 events sec .", "creating loopback udp packets ." ] }
{ "confidence": [ 54.559898376464844, 53.044921875, 49.77095031738281, 47.03370666503906, 46.808448791503906, 46.26715850830078, 45.11399841308594, 43.91719055175781, 42.05670928955078, 41.740501403808594, 41.66697692871094, 41.22396469116211, 40.43013000488281, 40.18434143066406, 37.85205841064453, 37.61125946044922, 37.53609085083008, 37.523616790771484, 36.57926940917969, 36.17723846435547 ], "content": [ "Question : I have been exploring the Graphite graphing tool for showing metrics from multiple servers and it seems that the recommended way is to send all metrics data to StatsD first . StatsD aggregates the data and sends it to graphite or rather Carbon . In my case I want to do simple aggregations like sum and average on metrics across servers and plot that in graphite . Graphite comes with a Carbon aggregator which can do this . StatsD does not even provide aggregation of the kind I am talking about . My question is - should I use statsd at all for my use-case Anything I am missing here .. . Answer : If the Carbon aggregator offers everything you need there is no reason not to use it . It has two basic aggregation functions sum and average and indeed these are not covered by StatsD . I m not sure about the history but maybe the Carbon aggregator already existed and the StatsD authors did not want to duplicate features Receiving data via UDP is also supported by Carbon so the only thing you would miss would be the sampling which does not matter if you aggregate by averaging . StatsD supports different metric types by adding extra aggregate values e.g . for timers : mean lower upper and upper Xth percentile .. . . I like them but if you don t need them the Carbon aggregator is a good way to go too . I have been looking at the source code of the Carbon aggregator and StatsD and Bucky https : github.com cloudant bucky a StatsD implementation in Python and they are all so simple that I would not worry about resource usage or performance for either choice . Comment : Exactly . My question essentially arose from a suspicion that many people might be opting for statsd based on its coolness factor and the fact that many are using it in this configuration . It s a great tool but given my use-case not required as a middleman .", "Question : I have been exploring the Graphite graphing tool for showing metrics from multiple servers and it seems that the recommended way is to send all metrics data to StatsD first . StatsD aggregates the data and sends it to graphite or rather Carbon . In my case I want to do simple aggregations like sum and average on metrics across servers and plot that in graphite . Graphite comes with a Carbon aggregator which can do this . StatsD does not even provide aggregation of the kind I am talking about . My question is - should I use statsd at all for my use-case Anything I am missing here .. . Answer : 1 . StatsD operates over UDP which removes the risk of carbon-aggregator.py being slow to respond and introducing latency in your application . In other words loose coupling . 2 . StatsD supports sampling of inbound metrics which is useful when you don t want your aggregator to take 100 of all data points to compute descriptive statistics . For high-volume code sections it is common to use 0.5 -1 sample rates so as to not overload StatsD . 3 . StatsD has broad client-side https : github.com etsy statsd wiki support . Comment : Thanks . Except for 2 all points are valid for Carbon as well . Carbon can be configured to listen on UDP and it also has wide client support . Comment : Carbon can use UDP that s right", "Question : I have been using statsd in my python django application for measuring different metrics . Now we have been integrating prometheus io so that we can query those metrics at later point of time . In this context I have gone through statsd bridge https : github.com prometheus statsd bridge . I have been using it like following : .. . .. . . statsd bridge -statsd.listen-address localhost : 9090 -statsd.mapping-config -web.listen-address a.b.c.d : 8125 -web.telemetry-path metrics .. . .. . In the above statsd is running on a.b.c.d on port 8125 and I have set up prometheus on my local machine . But the problem is that I cannot see any of statsd metrics in prometheus i.e . http : localhost : 9090 metrics . So if anyone helps me in figuring out what mistakes I am doing here I will be really grateful . Comment : Are you sure you re using the right arguments According to github.com prometheus statsd bridge building-and-running https : github.com prometheus statsd bridge building-and-running statsd.listen-address should be the address on which to receive statsd metric lines but you are pointing to the address where you want to see the Prometheus metrics . Check the config parameters carefully Comment : Author of the statsd-bridge here . @dukebody is right . The arguments need to be reversed . .. . Answer : the statsd.listen-address will listen and collect data from UDP . your should use . statsd bridge -statsd.listen-address : 8125 -statsd.mapping-config -web.listen-address 127.0.0.1 : 9090 -web.telemetry-path metrics than for check http : localhost : 9090 metrics", "Question : I have been exploring the Graphite graphing tool for showing metrics from multiple servers and it seems that the recommended way is to send all metrics data to StatsD first . StatsD aggregates the data and sends it to graphite or rather Carbon . In my case I want to do simple aggregations like sum and average on metrics across servers and plot that in graphite . Graphite comes with a Carbon aggregator which can do this . StatsD does not even provide aggregation of the kind I am talking about . My question is - should I use statsd at all for my use-case Anything I am missing here .. . Answer : Because graphite s minimum resolution is 10 seconds so you cannot send two different values for the same metric in less than 10 seconds . StatsD solves this problem by pre-aggregating them and instead of saying 1 user registered now and 1 user registered now it says 2 users registered . The other reason is performance because : .. . .. . 1 . You send data to StatsD via UDP which is a fire and forget protocol stateless much faster .. . 2 . StatsD etsy s implementation is in NodeJS which also increases the performance a lot . Comment : Can you point towards any link which talks about graphite s minimum resolution For the other points - 1 Carbon also support UDP answers.launchpad.net graphite +question 216002 https : answers.launchpad.net graphite +question 216002 2 The data will ultimately get into Carbon so is it relevant if statsd is high performing or not unless we always use statsd for aggregation and hence Carbon ends up getting less data than it would have if it had been talked to directly Comment : Here you have the requested link : github.com etsy statsd blob master docs https : github.com etsy statsd blob master docs graphite.md correlation-with-statsds-flush-interval Comment : The link you have posted talks about why one should not push data from statsd to graphite faster than every 10 seconds . It does not say that graphite s minimum resolution is 10 seconds . Does graphite s documentation say that Comment : -1 . In fact Graphite s minimum resolution is 1 second not 10 - see stackoverflow.com a 19150080 http : stackoverflow.com a 19150080 Comment : @rogercampos would you please update this post", "Question : null .. . Answer : So my setup is I use collectd to collect a bunch of metrics CPU etc from my system and use the output rrdtool plugin to write those data to . I wanted to track some application metrics using statsd and I see collectd has a statsd plugin . Now I enabled that and I can send data to the port 8125 . But I dont see any corresponding rrdtool output . Shouldn t collectd be writing the data received at port 8125 to some rrd file How do I configure such that the rrd files are created Comment : .. . no it s writing it to statsd . Comment : how can I look into the output Where are the output files for statsd situated Comment : that depends on what plugins you configured your statsd server with . statsd only aggregates data and sends it on to something else like graphite .", "Question : null .. . Answer : How to send JMX metrics to statsD daemon I can see there are solutions where there are plugins to poll JMX metrics but I am looking more to push metrics to some Daemon which can aggregate as well as store it in some storage such as InfluxDB", "Question : I have been exploring the Graphite graphing tool for showing metrics from multiple servers and it seems that the recommended way is to send all metrics data to StatsD first . StatsD aggregates the data and sends it to graphite or rather Carbon . In my case I want to do simple aggregations like sum and average on metrics across servers and plot that in graphite . Graphite comes with a Carbon aggregator which can do this . StatsD does not even provide aggregation of the kind I am talking about . My question is - should I use statsd at all for my use-case Anything I am missing here .. . Answer : tldr : you will probably want statsd if you ever want to look at the server-specific sums . carbon aggregator is designed to aggregate values from multiple metrics together into a single output metric typically to increase graph rendering performance . statsd is designed to aggregate multiple data points in a single metric because otherwise graphite only stores the last value reported in the minimum storage resolution . statsd example : assume that your graphite storage-schemas.conf file has a minimum retention of 10 seconds the default and your application is sending approximately 100 data points every 10 seconds to services.login.server1.count with a value of 1 . without statsd graphite would only store the last count received in each 10-second bucket . after the 100th message is received the other 99 data points would have been thrown out . however if you put statsd between your application and graphite then it will sum all 100 datapoints together before sending the total to graphite . so without statsd your graph only indicates if a login occurred in during the 10 second interval . with statsd it indicates how many logins occurred in during that interval . for example http : stackoverflow.com questions 7095998 accumulation-of-value-in-graphite .. . .. . carbon aggregator example : assume you have 200 different servers reporting 200 separate metrics services.login.server1.response.time services.login.server2.response.time etcetera . on your operations dashboard you show a graph of the average accross all servers using this graphite query : weightedAverage services.login.server .response.time services.login.server .response.count 2 . unfortunately rendering this graph takes 10 seconds . to solve this problem you can add a carbon aggregator rule to pre-calculate the average across all your servers and store the value in a new metric . now you can update your dashboard to simply pull a single metric e.g . services.login.response.time . the new metric renders almost instantly . side notes : .. . .. . 1 . the aggregation rules in storage-aggregation.conf apply to all storage intervals in storage-schemas.conf except the first smallest retention period for each retention string . it is possible to use carbon-aggregator to aggregate data points within a metric for that first retention period . unfortunately aggregation-rules.conf uses blob patterns rather than regex patterns . so you need to add a separate aggregation-rules.conf file entry for every path depth and aggregation type . the advantage of statsd is that the client sending the metric can specify the aggregation type rather than encoding it in the metric path . that gives you the flexibility to add a new metric on the fly regardless of metric path depth . if you wanted to configure carbon-aggregator to do statsd-like aggregation automatically when you add a new metric your aggregation-rules.conf file would look something like this : .. . .. . n1 .avg 10 avg n1 .avg .. . n1 .count 10 sum n1 .count .. . n1 . n2 .avg 10 avg n1 . n2 .avg .. . n1 . n2 .count 10 sum n1 . n2 .count .. . n1 . n2 . n3 .avg 10 avg n1 . n2 . n3 .avg .. . n1 . n2 . n3 .count 10 sum n1 . n2 . n3 .count .. . .. . .. . n1 . n2 . n3 .. . n99 .count 10 sum n1 . n2 . n3 .. . n99 .count .. . .. . .. . notes : the trailing is not needed in graphite 0.10+ currently pre-release here is the relevant patch on github https : github.com graphite-project carbon commit f80d086073bf549589ee5727241911c60410ac09 and here is the standard documentation on aggregation rules http : graphite.readthedocs.org en latest config-carbon.html aggregation-rules-conf .. . .. . 2 . the weightedAverage function is new in graphite 0.10 but generally the averageSeries function will give a very similar number as long as your load is evenly balanced . if you have some servers that are both slower and service fewer requests or you are just a stickler for precision then you can still calculate a weighted-average with graphite 0.9 . you just need to build a more complex query like this : .. . .. . divideSeries sumSeries multiplySeries a.time a.count multiplySeries b.time b.count sumSeries a.count b.count .. . .. . .. . 3 . if statsd is run on the client box this also reduces network load . although in theory you could run carbon-aggregator on the client-side too . however if you use one of the statsd client libraries you can also use sampling to reduce the load on your application machine s cpu e.g . creating loopback udp packets . furthermore statsd can automatically perform multiple different aggregations on a single input metric sum mean min max etcetera .. . .. . 4 . if you use statsd on each app server to aggregate response times and then re-aggregate those values on the graphite server using carbon aggregator you end up with an average response time weighted by app server rather than request . obviously this only matters for aggregating using a mean or top 90 aggregation rule and not min max or sum . also it only matters for mean if your load is unbalanced . as an example : assume you have a cluster of 100 servers and suddenly 1 server is sent 99 of the traffic . consequentially the response times quadruple on that 1 server but remain steady on the other 99 servers . if you use client-side aggregation your overall metric would only go up about 3 . but if you do all your aggregation in a single server-side carbon aggregator then your overall metric would go up by about 300 .", "Question : I have been exploring the Graphite graphing tool for showing metrics from multiple servers and it seems that the recommended way is to send all metrics data to StatsD first . StatsD aggregates the data and sends it to graphite or rather Carbon . In my case I want to do simple aggregations like sum and average on metrics across servers and plot that in graphite . Graphite comes with a Carbon aggregator which can do this . StatsD does not even provide aggregation of the kind I am talking about . My question is - should I use statsd at all for my use-case Anything I am missing here .. . Answer : Looks like carbon aggregator and statsd support disjoint set of features : .. . .. . statsd supports rate calculation and summation but does not support averaging values .. . carbon aggregator supports averaging but does not support rate calculation .", "Question : I am trying to delete some old graphite test whisper metrics without any success . I can delete the metrics by removing the files . See : How to cleanup the graphite whisper s data http : stackoverflow.com questions 9587161 how-to-cleanup-the-graphite-whispers-data But within a few seconds of blowing away the files they regenerate they are empty of metrics and stay that way since nothing is creating new metrics in those files . I ve tried stopping carbon carbon-cache.py stop before deleting the files but when I restart carbon carbon-cache.py --debug start they just come back . How do I permanently delete these files metics so they never come back .. . Answer : Are you running statsd or something similar I had the same issue and it was because statsd was flushing the counters it had in memory after I deleted the whisper files . I recycled statsd and the files stay deleted now . Hope this helps Comment : Yes I am running statsd . How do I recycle statsd", "Question : I am trying to delete some old graphite test whisper metrics without any success . I can delete the metrics by removing the files . See : How to cleanup the graphite whisper s data http : stackoverflow.com questions 9587161 how-to-cleanup-the-graphite-whispers-data But within a few seconds of blowing away the files they regenerate they are empty of metrics and stay that way since nothing is creating new metrics in those files . I ve tried stopping carbon carbon-cache.py stop before deleting the files but when I restart carbon carbon-cache.py --debug start they just come back . How do I permanently delete these files metics so they never come back .. . Answer : By default Statsd will continue to send 0 for counters it hasn t received in the previous flush period . This causes carbon to recreate the file . Lets say we want to delete a counter called bad metrics.sent from Statsd . You can use the Statsd admin interface running on port 8126 by default : .. . .. . Use help to get a list of commands : .. . .. . You can use counters to see a list of all counters : .. . .. . Its the delcounters deltimers and delgauges commands that remove metrics from statsd : .. . .. . After removing the metric from Statsd you can remove the whisper file associated with it . In this example case that would be : .. . .. . or in Ubuntu : Comment : Is there any other way to pull up the statsd admin interface Say from a root command-prompt on the server The telnet interface isn t working on our server for some reason Comment : Note : On my server it IS working but when I telnet in it displays the word ERROR . But it s actually doing OK Comment : Note : for me deleting the counters wasn t sufficient . I restarted statsd and that seemed to fix the problem .", "Question : I have an application that publishes a number of stats to graphite via statsd . One of the stats simply sends a stat increment to statsd every time a message is received by the service . I need to display a graph that shows the the relative traffic over time for this stat . Generally speaking I should be able to display a graph that refreshes every say 10 seconds and displays how many messages were recived in those 10 seconds as well as the history for a given period of time . However no matter how I format my API query I cannot seem to get accurate data . I ve read a number of articles including this one : .. . .. . http : code.hootsuite.com accurate-counting-with-graphite-and-statsd .. . .. . That seems to give some good insight but is still not quite giving me what I need . this is the closes I have come : .. . .. . integral hitcount stats.recieved 10seconds .. . .. . However I don t like the cumulative result-of this and when I run this I get statistics that come nowhere near to what I see n my logs for messages received . I am ok with accepting some packet-loss but we talking about orders of magnitude . I know I am doing something wrong . Just hoping someone can give me some insight as to what . .. . Answer : A couple of things to check try : .. . .. . Configure Graphite for Statsd .. . .. . Check to make sure that you ve used the retention schema https : github.com etsy statsd blob master docs graphite.md storage-schemas and aggregation https : github.com etsy statsd blob master docs graphite.md storage-aggregation settings in Graphite that match how Statsd will be sending data i.e . it sends one data point per 10 second flush interval . Run a single Statsd aggregator .. . .. . Be sure you are only running one instance of Statsd as running multiple statsd daemons will cause metrics to be dropped as Graphite will be configured to only store one data point for it s highest precision of 10s : 6h .. . .. . Limit the time range in the UI or URL API to less than 6 hours .. . .. . When displaying graphs with data that crosses over the 6 hour threshold e.g . from now to 7 hours ago you will begin seeing 1 minute worth of aggregated count data for the displayed graph if you ve configured Graphite for statsd with retentions 10s : 6h 1min : 7d 10min : 5y . Rollups will occur based on the oldest data point in the time range e.g . now till 7+ days you ll get 10 min rollups . If sending sparse or bursty data AND displaying old time range triggering aggregation .. . .. . Confirm that your xFilesFactor is low enough that aggregation produces non null values even with a high rate of nulls . For example 100 requests in the first 10 seconds and none for the remaining 50 seconds in a minute would cause a storage of 100 null null null null null which would be summed up to null when the data ages if the XFilesFactor is higher than 1 6 . Using the statsd recommended graphite configuration handles this but it is good to know about.. . as this can give the appearance of lost data . Saving schema or aggregation changes .. . .. . If you changed the graphite schema or aggregation settings after any metrics were stored in whisper graphite s storage you ll need to either delete the .wsp files for the metric graphite will recreate them or run whisper-resize.py . Validating settings .. . .. . You can verify the settings against some whisper data by running whisper-info.py on a .wsp file . Find the .wsp file for one of your metrics in graphite storage whisper Run : whisper-info.py my metric data.wsp . whisper-info.py output should tell you more about how the storage settings are working . TLDR .. . .. . You should ensure that Graphite is set to store one data point per 10 second interval for metrics coming from StatsD . You should make sure that Graphite is summing not averaging for count data coming from Statsd . Both of these can be handled by using the recommended Statsd configuration settings https : github.com etsy statsd blob master docs graphite.md . Don t run more than one Statsd aggregator . When using the UI limit the data returned to less than 6 hours OR understand what rollup you are viewing when looking at data that crosses retention thresholds . Lastly make sure the settings take if you ve already been sending metrics . Comment : Great information @Matt So are you saying that if I have many servers in a cluster I have to point them all to the same statsd instance Comment : You got it . The recommended statsd graphite configuration specifies that at most one data point will be stored per 10s interval and all others will be dropped . Running multiple statsd instances would mean that you d get a data point sent per statsd daemon 10 seconds each .. . but only one can be stored per 10 seconds . Comment : Argh . That seems like a problem in a large cluster . Especially using UDP . I ll give it a shot and see how it goes down . Thank you @Matt Comment : We ve run in a large cluster w thousands of req s for a while now and haven t had any trouble . That said if you are overwhelming the statsd daemon you could use sampling on the client most clients have this OR you could modify the globalPrefix used by statsd see exampleConfig.js on each statsd daemon machine to include the statsd machine name which would get around the problem . Comment : I m going to try this as it is for now . We are looking at 2k req s right now with significant projected growth . Could be interesting . I may just write a blog to track these adventures . Thanks again", "Question : For now I have a such monitoring system configured : .. . .. . And I use Grafana over Graphite as a graphing tool . Due to too poor query-performance I ve decided to change this stack to just InfluxDB + Grafana bundle . So my question is how can I send app metrics to the InfluxDB I prefer to keep this bundle pretty simple so I would like to skip statsd if it s possible . Should I replace python statsd client with influxdb-python https : github.com influxdata influxdb-python and use telegraf https : github.com influxdata telegraf UDP service as an aggregation part in front of the InfluxDB or just send metrics directly to the InfluxDB instance .. . Answer : I would send the data to telegraf using the line protocol . I ve used influxdb-python a lot to submit stats directly to InfluxDB . Sending the results locally to telegraf may well be quicker depending on how quickly and reliably your InfluxDB installation responds - this will block your application if there are delays . The line protocol seems easier to use to me than the other options and telegraf can accept the line protocol directly . A potential downside is that anything you send that way would end up in the database allocated to telegraf stats . Going directly to InfluxDB you can choose which database your data will end up in although it means bypassing the python-module if you d like to use the line protcol format . To use influxdb-python and send to InfluxDB directly you have a choice of JSON format or using a subclass of SeriesHelper .. . .. . JSON .. . .. . Creating the JSON structure that the write points write uses is really awkward and clunky . It only converts it into line format anyway . Compare the JSON : .. . .. . to the line format : .. . .. . I know which I think is easier to produce And I know the timestamps don t match I m just using examples . The line format can be POST ed straight to InfluxDB using the requests library or sent via UDP if that listener has been configured . SeriesHelper .. . .. . The module has a way to just accept the values and tags by using SeriesHelper https : github.com influxdata influxdb-python blob master examples tutorial serieshelper.py which can be awkward to set up but is easy to use . The example they give is : .. . .. . So you can see from calling MySeriesHelper that makes life easy once it s set up but the configuration for the client either needs to be set up in the global-scope which is bad for a module or in the class definition . This isn t good for getting configuration from a config file or service-discovery so you end up doing things like this in your config parsing functions : .. . .. . I ve not had issues with reliability with influxdb-python and most of the time we use SeriesHelper classes . It s not the most complex of things but the idea behind metrics is not that one person with the knowledge adds it all but that it s part of the way of life of all the people writing code at every part in the chain . From that perspective ease of use is key to get people to adopt a tool . Comment : Ok thanks a lot However I still have two questions . If one use a UDP listener on the InfluxDB side why you mentioned that sending metrics to the InfluxDB directly would block execution of the app-code And the second one - is InfluxDB optimized to receive a lot of metrics without aggregation in the telegraf on the fly Comment : I wrote the part about blocking execution while only thinking of the regular http POST method apologies for the confusion there . For the second part the newer database engine in 0.9 onwards tsm1 I think it s called should be able to receive a large number of metrics without aggregation . Our first draft of LDAP metrics stored 1 data point per query about 30 million a day and InfluxDB coped . We ve aggregated that now just for our own storage size Comment : Hm I m afraid that I still have questions . I ve started sending my metrics via UDP directly to the InfluxDB instance with batch-size 1000 and batch-timeout 1s settings . However for now I have only one value per second I am guessing the last one stored for unique combination of tags set and fields set . But I want to have exactly all metrics accounted . Looks like I have to switch to the batched metrics sending via HTTP but I have to somehow eliminate latencies in the app-code . Maybe using telegraf can help with it Comment : I ve not used telegraf to send metrics yet so I can t help with that sorry . From the documentation it appears that UDP has 1 second as the lowest resolution which is awkward . Comment : Exactly . I m going to try batched HTTP insertion via some kind of proxy agent . Like statsd but without any aggregation on the agent side . Only holding incoming metrics for a period and then dump they all at once to the InfluxDB .", "Question : I wish to monitor user-perceived page load times on my website based on the users approximate geographical location as well as other info such as browser versions etc . This can all be gathered via JavaScript on the pages . My issue however is what is the best option for sending storing and then presenting the data that I am monitoring I have looked at graphite and statsd but I am unsure if these would work as I need to show correlations between user location and load times for various pages e.g . Login Create new order etc .. . Answer : Graphite and statsd are what you need . You just need to be thoughtful about how you parse that information out of the logs and send it to statsd . You send statsd a stat name and stat value . The stat name will be the key to organizing your data by user location browser type etc . It is a namespace delimited by . characters . So if you parse your log correctly you could call the stat : .. . .. . stat.server1.client location.browser type.load time .. . .. . It will then appear in the graphite UI under a directory structure corresponding to the namespace so you could roll up data by server location or browser type if you wanted to . EDIT : After rereading your question it is kind of difficult to plot location against load-time in Graphite . It is more focused on having time along the x-axis . However it can be done with some work in R : https : danslimmon.wordpress.com 2013 04 05 parameterizing-metrics-by-time-through-graphite-abuse Comment : Given that statsd can handle the parameters that I want stat.server1.client location.browser type.load time and from the link you gave Graphite does look configurable to present what I want . Can statsd handle different values being sent in each time i.e . stat.value1.value2 and then stat.value1.value2 value3 As for getting the data to Statsd in theory what I have considered is using javascript to get perceived load times using the navigation.timing api and then get the other information too . This will then be sent via UDP to a node.js server which will send it to statsd . Comment : Yea you can use javascript and Navigation Timing or you can use boomerang.js which is a javascript library that uses the Navigation Timing API if it is enabled on the clients browser . It gets the perceived load times among other things if you desire from your users RUM . There are also instructions to get a asynchronous non-blocking version running on your web pages . github.com lognormal boomerang https : github.com lognormal boomerang I am not sure if I understand this question about different values being sent in . Currently I have statsd processing over 100 unique metrics .", "Question : I have been using statsd in my python django application for measuring different metrics . Now we have been integrating prometheus io so that we can query those metrics at later point of time . In this context I have gone through statsd bridge https : github.com prometheus statsd bridge . I have been using it like following : .. . .. . . statsd bridge -statsd.listen-address localhost : 9090 -statsd.mapping-config -web.listen-address a.b.c.d : 8125 -web.telemetry-path metrics .. . .. . In the above statsd is running on a.b.c.d on port 8125 and I have set up prometheus on my local machine . But the problem is that I cannot see any of statsd metrics in prometheus i.e . http : localhost : 9090 metrics . So if anyone helps me in figuring out what mistakes I am doing here I will be really grateful . Comment : Are you sure you re using the right arguments According to github.com prometheus statsd bridge building-and-running https : github.com prometheus statsd bridge building-and-running statsd.listen-address should be the address on which to receive statsd metric lines but you are pointing to the address where you want to see the Prometheus metrics . Check the config parameters carefully Comment : Author of the statsd-bridge here . @dukebody is right . The arguments need to be reversed . .. . Answer : According to the documentation http : github.com prometheus statsd bridge building-and-running 20statsd.listen-address statsd.listen-address should be the address on which to receive statsd metric lines but you are pointing to the address where you want to see the Prometheus metrics . The arguments need to be reversed . Check the config parameters carefully", "Question : null .. . Answer : I m using statsd through a collectd s plugin and I want to send metrics with a . in it to construct a good tree on my graphite . My problem is when I do something like this : .. . .. . echo foo.bar : 1 c nc 127.0.0.1 8125 .. . .. . I get a metric like this in graphite : statsd.derive.foo bar and what I would like to have is statsd.derive.foo.bar . Is it possible Comment : humm see github.com collectd collectd issues 419 https : github.com collectd collectd issues 419 . You can change the escape char or simply send statsd metrics directly to Graphite I d do the last", "Question : I am trying to delete some old graphite test whisper metrics without any success . I can delete the metrics by removing the files . See : How to cleanup the graphite whisper s data http : stackoverflow.com questions 9587161 how-to-cleanup-the-graphite-whispers-data But within a few seconds of blowing away the files they regenerate they are empty of metrics and stay that way since nothing is creating new metrics in those files . I ve tried stopping carbon carbon-cache.py stop before deleting the files but when I restart carbon carbon-cache.py --debug start they just come back . How do I permanently delete these files metics so they never come back .. . Answer : The newest StatsD version has an option to not send zeroes after flush anymore but only what is actually sent to it . If you turn that one the whisper files shouldn t get recreated : https : github.com etsy statsd blob master exampleConfig.js L39 Comment : Setting this flag causes the graphs to have null values which displays unattached data points . Therefore on each graph you would have to enable the Draw Null as Zero setting to fix this . Do you happen to know of any other solutions I m encountering the same problem . Comment : deleteIdleStats : true Comment : There are several settings that apply : deleteIdleStats which applies to all stats and individually overridable deleteGauges deleteTimers deleteSets and deleteCounters . These default to false which means statsd will always send 0 previous value for gauges when data isn t received for a time bucket .", "Question : I m using Graphite+Statsd with Python client to collect custom metrics from a webapp : a counter for successful transactions . Let s say the counter is stats.transactions.count that also has a rate per second metric available at stats.transactions.rate . I ve also setup Seyren https : github.com scobal seyren as a monitor+alert system and successfully pulled metrics from Graphite . Now I want to setup an alert in Seyren if the number of successful transactions in the last 60 minutes is less than a certain minimum . Which metric and Graphite function should I use I tried with summarize metric 1h but this gives me an alert each hour when Graphite starts aggregating the metric for the starting hour . Note that Seyren also allows to specify Graphite s from and until parameters if this helps . .. . Answer : I contributed the Seyren code to support from until in order to handle this exact situation . The following configuration should raise a warning if the count for the last hour drops below 50 and an error if it drops below 25 . Target : summarize nonNegativeDerivative stats.transactions.count 1h sum true .. . From : -1h .. . To : blank .. . Warn : 50 soft minimum .. . Error : 25 hard minimum .. . .. . Note this will run every minute so the last hour is a sliding scale . Also note that the third boolean parameter true for the summarize function is telling it to align its 1h bucket to the From meaning you get a full 1-hour bucket starting 1 hour ago rather than accidentally getting a half bucket . Newer versions of Graphite may do this automatically . Your mileage may vary . I have had problems with this approach when the counter gets set back to 0 on a server restart . But in my case I m using dropwizard metrics + graphite not statsd + graphite so you may not have that problem . Please let me know if this approach works for you Comment : Thanks I ve been using integral transformNull stats.transactions.count 0 fom -1h to blank to achieve a similar result . Perhaps we can contribute some examples to the Seyren docs", "Question : null .. . Answer : I use Statsd client based on Akka IO https : github.com archena statsd-akka source code to send data to statsd server . In my scenario I want to monitor spark jobs status if current job success we gonna send 1 to statsd server otherwise 0 . So in one flush interval I just wanna send one value 1 or 0 to statsd server but it didn t work If I added a for-loop and send this value 1 or 0 at least twice it works But I don t know why should I send the same value twice so I checked the statsd source code and found : .. . .. . So the type of gauges should be the iterator if I just send one value It can not be iteratored this is what I thought maybe it is wrong hope someone can help me explain why should I send one value at least twice . My client code snippet : Comment : Can you add the client code that you are using to send the value of the gauge Also can you explain what you mean by it didn t work A gauge works by recording the last received value . So if you re sending the same metric from multiple machines it will override previously sent values . Comment : @mrwillihog Thanks for comments added the client code snippet at this time I tried the ExcutionTime same as Timer . it didn t work means the server didn t show any data in metrics I just want to send one value and it is from one machine . send twice works for me but just send once it will not show the data in the metrics so I want to know what is the reason . Comment : Thanks - that code looks like a timer not a gauge Gauges end with g . Is your metric appearing in the timers section Comment : @mrwillihog yes I use Timer in my code It will work if I send them twice for both Gauge and Timer . it won t work for sending once for both of them . Comment : Hmm you can start StatsD with a console backend and make sure it is receiving the metrics . Usually in StatsD clients you dont have to specify the type i.e . ms . Are you sure the ExecutionTime method isn t adding ms for you", "Question : What is difference between StatsD vs Riemann and which one performs better on large scale distributed systems we have a distributed platform built on Java and we want to monitor application metrics and perhaps some alerts . We understand that instrumentation is not free so Ideally we are looking for a highly scalable application monitoring framework which can add the least instrumentation cost to our platform apps and be able to do all sorts of aggregations and so on . I also understand we can build something that is a combination of both but I can t think of reasons why as both seem to do aggregations and so on but I am unable to identify which one would be a better fit or why one performs better than the other . It will be a great help if someone can share their experiences on these tools in the industry . .. . Answer : I don t have hard numbers on statsd but Github s Brubeck post suggests that they were losing about 40 of their statsd events at--I m guessing these graphs are in seconds--25 000 events sec . Their replacement for statsd in C is pushing 4.3 million events sec . http : githubengineering.com brubeck .. . .. . Riemann won t compete with that on a per-packet basis but in batches of say 10-100 metrics message I ve heard multiple production users report 10 million events sec . Unlike statsd Riemann will scale to all available cores--I ve saturated both network interfaces and all 48 cores on my box in tests--but actual performance is gonna vary depending on contention and what you do with your streams . Could be much slower . All depends . Compared to statsd Riemann has a much richer event model and performs arbitrary computation . A small Riemann config can replicate of statsd s functionality--but Riemann really shines when you need multidimensional rollups state transition detection integration with all kinds of other storage and alerting services flap suppression flow-control etc etc etc . The cost of that is working in a programming language--Clojure--that may be unfamiliar to your team and having to reason more carefully about scope state and if you re writing your own streams concurrency . Riemann also isn t as widely deployed which could be a drawback in terms of library support and hiring staff . Comment : Hi Kyle Thanks a lot for your response . Riemann does seem to have bindings in other languages right riemann.io clients.html . so in my case there is a Java Client Library I wonder why do I need to work with Clojure Does Riemann have all the aggregations as statsD per say Finally do you have any idea of how many nodes they used to scale 10million sec Comment : Riemann also seem to use ruby for dashboard . Now that is another thing developers needs to know and manage and plan for deployment . I would like to stay away from ruby as much as possible . Comment : so we need to use closure in config files is that how it works where does riemann stores its data what if I want to store the aggregated data in a database like InfluxDB to do historical analysis later Comment : 10million sec is on a single node yes it has all the aggregations in statsd yes Clojure is the config language no Riemann doesn t store any data and yes Riemann talks to Influx and dozens of other services and by the way all of this is in the comprehensive documentation on riemann.io http : riemann.io . : Comment : everything sounds good but not convinced with Ruby Dashboard .", "Question : I ve managed to get the UserMetric extension working in my Java application to send my own stats to a statsd backend but at present the metric-name-normalization-strategy overrides my use of . in the key names and replaces it with . I understand why it does this due to the integration with Akka but I don t want this to apply for my own UserMetrics where the . is important for creating buckets of stats . Is it possible to use an alternative metric-name-normalization-strategy for my user metrics rather than the one used for Akka metrics Thanks .. . Answer : You can provide the FQCN of your own implementation of kamon.statsd.MetricKeyGenerator in the configuration file 1 . Probably you might want to extend the default one 2 and add some special conditions for normalizing user metrics . 1 https : github.com kamon-io Kamon blob v0.3.5 kamon-statsd src main resources reference.conf L35 .. . .. . 2 https : github.com kamon-io Kamon blob v0.3.5 kamon-statsd src main scala kamon statsd SimpleMetricKeyGenerator.scala L13 .. . .. . See : https : groups.google.com forum topic kamon-user 6Jt vcKrrbI" ] }
[ "yes-answer-long", "yes-answer-short" ]
daemon
UNK_RELATION
awesomium@html@76
awesomium -- awesomium is a webkit wrapper which provides means to display @placeholder interfaces and web content within c++ and .net desktop applications thus being an html ui engine .
{ "confidence": [ 49.66546630859375, 47.177467346191406, 46.08934783935547, 43.985740661621094, 43.985740661621094, 43.581626892089844, 43.55778884887695, 43.038002014160156, 42.88374328613281, 42.35234069824219, 42.35234069824219, 42.253414154052734, 41.268733978271484, 41.268733978271484, 40.92543029785156, 40.62001419067383, 40.353755950927734, 40.16732406616211, 40.15869140625, 39.970001220703125, 39.970001220703125, 39.970001220703125, 39.926883697509766, 39.84182357788086, 39.536407470703125, 39.536407470703125, 39.536407470703125, 39.536407470703125, 39.536407470703125, 39.536407470703125, 39.536407470703125, 39.430694580078125, 39.430694580078125, 39.430694580078125, 39.430694580078125, 39.21730041503906, 39.11211395263672, 38.939903259277344, 38.35790252685547, 38.35790252685547, 38.29348373413086, 38.29348373413086, 38.237674713134766, 38.237674713134766, 38.237674713134766, 38.237674713134766, 38.22800827026367, 38.14093780517578, 38.127899169921875, 37.500038146972656, 37.43196487426758, 37.209877014160156, 37.209877014160156, 37.209877014160156, 37.209877014160156, 37.206199645996094, 37.206199645996094, 36.98937225341797, 36.8277587890625, 36.77547073364258, 36.77547073364258, 36.77547073364258, 36.10074234008789, 35.975563049316406, 35.91114807128906, 35.75674057006836, 35.675010681152344, 35.312808990478516, 35.14207077026367, 35.14207077026367, 35.14207077026367, 35.14207077026367, 35.14207077026367, 35.14207077026367, 35.14207077026367, 35.14207077026367, 35.04157257080078, 34.44014358520508, 34.18547058105469, 34.05846405029297, 34.05846405029297, 34.05846405029297, 34.05846405029297, 34.05846405029297, 34.05846405029297, 34.05846405029297, 34.05846405029297, 33.9650993347168, 33.9650993347168, 33.91286849975586, 33.6150016784668, 33.55386734008789, 33.55386734008789, 33.55386734008789, 33.55386734008789, 33.33271408081055, 33.29267120361328 ], "content": [ "The Awesomium API is similar between C++ and .Net .", "I m trying to load a PDF into PDFJS version 1.0.702 which is built-in into Awesomium an HTML UI Engine at the following URI asset : osm-pdf web viewer.html .", "I have a C winforms app with an Awesomium web control .", "Awesomium version is 1.7.5.1", "This is a solution for Awesomium v1.7.0.5 .", "It was a problem of Awesomium .", "The approach depends on which version of Awesomium you re using .", "Finally I managed to use Awesomium .NET in web-applications using a separate HttpModule which spans a single thread during life time of the application .", "I m working at touch Awesomium-based web brower .", "I used Awesomium 1.7.5 .", "Install Awesomium 1.7.4.2 .. . 2 .", "@Dagrooms I no longer use Awesomium .", "In developers console it works but not with awesomium.. .", "It is not possible because Awesomium is outdated .", "So this is just a small personal project that I m working on using awesomium in .net .", "Can Awesomium handle dynamic elements", "Flash throws security errors trying to access local content video-player and the solution s Awesomium offers have not been ported to the .NET wrapper yet .", "im using awesomium and vb.net as a client-side application for my web application .", "Can you find HTML elements in awesomium webcontrol to do the further processing", "Disclaimer : I created Awesomium .", "But I need Awesomium .", "inside website that is loaded into Awesomium :", "kobashicomputing.com http : www.kobashicomputing.com proxy-authentication-with-the-awesomium-browser", "I have a project built with Awesomium built-in .NET and it requires the use of Flash .", "2 Awesomium WebBrowser control awesomium.com .", "Hi it is about awesomium not the standard webbrowser", "As a result I moved on to try Awesomium .", "Im also using Awesomium browser .", "As of Awesomium 1.7.5 this solution no longer works .", "I just started to use awesomium .", "Didn t hear about awesomium before .", "I m making an C Windows Form Application with an Awesomium webbrowser inside it .", "My sound play work in chrome but don t work in awesomium browser for C .", "Any solutions suggestion to access dynamic elements with awesomium in C++", "I m using Awesomium in C winforms app to click on a div inside the webpage .", "I ve been trying to navigate to this website - https : www.avito.ru by using Awesomium webcontrol .", "I am using Awesomium library http : www.awesomium.com for UI of my C++ application plain C++ no .NET precompiled-headers etc . .", "Can I use another one for debugging Awesomium UI", "What script to use and in which event awesomium should I put this", "Which makes me think - does Awesomium support div clicks or not", "I ve done this in the past with older versions of awesomium with no problems .", "But i like awesomium because it s freaking fast .", "Using the program awesomium client 2 .", "EVERYTHING on Awesomium looks promising except this", "What is the version Awesomium you use", "I have Awesomium Version : awesomium 1 7 5 1 sdk win", "I m using Awesomium in a WPF-application to display a website which works well in principle .", "We are looking for tool which not only support desktop application but also it should identify awesomium controls", "here are my c++ codes .. . .. . contents of my html file is below .. . .. . Note : I am pretty new to awesomium and c++ in a sense ..making this simple will be great .", "I used them both together - the app was a Windows wrapper around a payment-gateway that used an Awesomium win browser component to display the page .", "Hagdahi Thanks Dude...After I upgraded my kernel..awesomium failed to start.....I browsed the web and found there is a bug running awesomium webkit on linux with kernels 3.0..So I did not get to test this after upgrading..I ll accept your efforts seeing the snapshot... . : D", "I am using awesomium webcontrol and dotnetbar supertabcontrol .", "Maybe the bitmap size is incorrect and Awesomium is overflowing the buffer", "Awesomium doesn t want to even show the dropdown menu .", "There have been many undocumented changes in Awesomium lately .", "It is documented on their github page https : github.com awesomium awesomium-pub issues 52 and their answers page http : answers.awesomium.com questions 4716 .", "The two I ve seen so far are Berkelium http : berkelium.org and Awesomium http : www.khrona.com products awesomium .", "I have a WPF application in which I am using Awesomium web control .. . .. . Details : .. . .. . The javascript method is as follows : .. . .. . In C I have following code : .. . .. . Not sure why but the onNonceReceived method is never invoked .", "5 . execute JS command in awesomium based on previous step results .. . .. . All of this would be easier if awesomium had DOM support. . but. . well. .", "Tell the awesomium developers that you think you have found a bug .", "Do you mean about Awesomium DLL to output folder", "First it s free for all commercial use unlike Awesomium .", "See this previous question : Awesomium Winforms does not work in VMWare http : stackoverflow.com questions 30591261 awesomium-winforms-does-not-work-in-vmware .. . .. . The answer for some reason is : .. . .. . You need to setup at least 2 processor cores in your vm when using Awesomium .. . .. . I would love to know an explanation and or workaround for this .", "And where can I look which Awesomium Version I have", "A 32-bit process in order to use Awesomium .", "My response page is as follows : .. . .. . When the file is opened on Awesomium the PDFViewer is rendered to its HTML content but JS objects are undefined or null .", "I m using Awesomium .NET 1.7.0.5 and am trying to retrieve an image element from page and save it into memory disk .", "I used Awesomium in a project not so long ago and struggled to get content from pages .", "Confirm your version of Awesomium supports these methods if you are not using the latest bits .", "I m Trying to embed Awesomium into my project executable file .", "In the documentation of Awesomium they said that set the target-platform of your project to X86 .", "I ve made two simple classes to use for displaying UIs with Awesomium .", "Have not used Awesomium but your GetMessage only pumps messages for the WebCore window .", "This should be very easy with Awesomium but I can t figure it out .", "Consider hosting Acrobat Reader ActiveX control directly side-by-side with Awesomium .", "I have a simple-form with an Awesomium webcontrol going to a website .", "BUT according to the WebCore documentation http : docs.awesomium.net monomac html T Awesomium Core WebCore.htm : .. . .. . Note that Awesomium and Awesomium.NET are not thread-safe .", "I currently want to return a value from a Javascript function back into C in Awesomium .", "awesomium is for creating desktop apps according to tag description so what does this have to do with any website", "Is this due because Awesomium is built with an oldier chrome version V18", "Some ideas to get first paint time approximation with awesomium", "So it is not the getElementsByClassName selection that does not work it is Awesomium that does not work here .", "There is also a further developed Awesomium named DotNetBrowser but it is 1000 per license .", "I am trying to render the Awesomium headless-browser in a BackgroundWorker .", "I heard that this exception must have happened with unmanaged code Awesomium", "Moreover the good news is : - .. . .. . The Awesomium JSObject approach as mentioned in above post works .", "The tool is able to identify wpf controls but unable to identify awesomium controls on chromium .", "I was using Awesomium to screen-capture a web page and the Flash security window kept opening and halting the operation of the program .", "I am using the Awesomium Web Control for WinForms not WPF for Automation in Visual Basic .", "This is my code so far for Awesomium .. . .. . In my code-behind .. . .. . The HTML works fine when opened up in Chrome however results in this in my C application .. . .. .", "I have an Awesomium control which loads a Flash swf up which is something a little new to me .", "I m learning Awesomium and following is the code in which I m trying to login to https : accounts.google.com .", "Maybe because there is no any ResourceInterceptor class in Awesomium dlls only the IResourceInterceptor interface which you need to implement", "@Alex11223 when this post was post was made the current version of Awesomium was 1.7RC3 which still had the ResourceInterceptor class .", "The answer above has a couple of issues which at the very least make it unworkable with v1.7 of Awesomium .", "In my Form I m using an Awesomium Web Browser control loaded with a local html which has embebed an inline svg file which represents a human body diagram with bones and internal organs .", "How can I use a windowed WebViews on Mac OS X and Linux using Awesomium .NET" ] }
{ "confidence": [ 63.95395278930664, 63.518367767333984, 58.35150909423828, 57.76813888549805, 56.02001953125, 55.66474533081055, 55.66474533081055, 54.582855224609375, 54.44240188598633, 54.43561935424805, 54.296875, 52.93858337402344, 52.64649963378906, 52.30812072753906, 52.18525695800781, 51.95166778564453, 51.52600860595703, 51.4208869934082, 51.28623580932617, 51.145591735839844 ], "content": [ "Question : null .. . Answer : I m trying to load a PDF into PDFJS version 1.0.702 which is built-in into Awesomium an HTML UI Engine at the following URI asset : osm-pdf web viewer.html . Since I don t have the file on local I m using a Uint8Array and calling the PDFView.open array function . I have created the array from a Base64 string and loaded it into the custom generated HTML response page . Nevertheless the script embedded into the HTML page is not working although when I test it on the console it works . My response page is as follows : .. . .. . When the file is opened on Awesomium the PDFViewer is rendered to its HTML content but JS objects are undefined or null .", "Question : I have a project built with Awesomium built-in .NET and it requires the use of Flash . Flash throws security errors trying to access local content video-player and the solution s Awesomium offers have not been ported to the .NET wrapper yet . I m wondering if there is a fairly straight-forward way to include a run-time web server in the application where I can just pick some arbitrary port and create a localhost server when the application runs and point my Awesomium browser there . Any ideas Comment : So you re trying to get a flash-player to load local content Would adding something to the hosts-file allow you to work around that .. . Answer : For ASP.Net MVC and other self-hosting You can use OWIN http : owin.org implementations : .. . .. . Open Web Interface for .NET OWIN defines an abstraction between .NET web servers and web-applications . OWIN decouples the web application from the server which makes OWIN ideal for self-hosting a web application in your own process outside of IIS . Here http : www.asp.net web-api overview hosting-aspnet-web-api use-owin-to-self-host-web-api you can find a simple example with WebAPI .", "Question : Is it possible to hide the native close maximize and minimize button and the surrounding edges of the window that holdes an awesomium application. . enter image description here http : i.stack.imgur.com mSGL4.png .. . .. . I am looking for a way to design nice close maximize and minimize button within the html document will do the function of the native buttons to be hidden . here are my c++ codes .. . .. . contents of my html file is below .. . .. . Note : I am pretty new to awesomium and c++ in a sense ..making this simple will be great . .. . Answer : You control the traits of the created Windows window by setting the dwStyle property in the call to CreateWindow . I used the Awesomium Tutorial 2 http : wiki.awesomium.com tutorials tutorial-2-displaying-your-first-page.html .. . .. . Locate the ViewWin int width int height constructor and edit the call to the CreateWindow . The following example creates a window with no borders nor a caption . When I tried it I got a problem with the WndProc being called pre-maturely the view-pointer still NULL so I added a quick fix to make the application run . This may not be the way to go and you can probably figure something better out The created window looks like the following : .. . .. . Awesomium Hello World with no caption nor borders http : i.stack.imgur.com wYNAr.png .. . .. . I hope this will get you on track to get your application to work as you like it to Comment : Hagdahi Thanks Dude...After I upgraded my kernel..awesomium failed to start.....I browsed the web and found there is a bug running awesomium webkit on linux with kernels 3.0..So I did not get to test this after upgrading..I ll accept your efforts seeing the snapshot... . : D Comment : Hi You are on Linux Sorry I have to admit my example is for Windows as your example looked very much like a Windows window The basic idea still holds though but you have to read the definition of your Linux platform windows creation call . I ll see if I get around to find a Linux Platform answer for you but I can t give you any promises . Comment : @ Kjell-Olov H gdahl...I am on linux....sure whenever you have tested on linux just add it in your answer. . thanks", "Question : I m making an C Windows Form Application with an Awesomium webbrowser inside it . I m trying to get some rows from an table and parse them to an array . The JSPart is running inside the browser fine . Here s the code that i use inside C : .. . .. . That returns now 2 tr rows inside Chrome but that will be more later so i was hoping that i could loop through the elements with an foreach but i can t find any way to loop through it . Does anybody got any idea Comment : I used Awesomium in a project not so long ago and struggled to get content from pages . In the end I switched and used the HTML Agility Pack that can be found here : htmlagilitypack.codeplex.com http : htmlagilitypack.codeplex.com I found it far easier to scrape content from pages . Comment : @bhs i ve worked on an little project with htmlafility before . Don t know exactly how that went anymore . But i like awesomium because it s freaking fast . So i hope that there s an simple answer or else i ll be back to the htmlafilitypack.. . Comment : I used them both together - the app was a Windows wrapper around a payment-gateway that used an Awesomium win browser component to display the page . Comment : @bhs the problem is that the whole project is depending on an web session so i think that i can t use both of them.. . If that was possible i would be very happy : D .. . Answer : I would use an anonymous function in Javascript to parse the table and return the contents as an array of array of strings . This will be easier to parse in C . See http : jsfiddle.net stevejansen xDZQP for an example of parsing a table in Javascript . Sidenote : I would check to see if your data source provides a REST API or similar to access this data parsing HTML is really fragile . This is roughly how I would combine C and JS to solve your problem the C is untested . Note you were using the wrong return-type for IWebView.ExecuteJavascriptWithResult . Comment : EThis looks good to me . I m now on my phone but i will check this out tomorow . Thank you for the explanation Comment : Thank you . It worked . There was only 1 thing . this line of code and the other 2 wich are similar gave me an error : if row null : Ambiguous user defined conversions Awesomium.Core.JSValue.implicit operator Awesomium.Core.JSValue string and Awesomium.Core.JSValue.implicit operator Awesomium.Core.JSValue Awesomium.Core.JSObject when converting from null to Awesomium.Core.JSValue . So after i deleted the null it worked . Comment : Also inside your foreach cell You do another check with the if-statement . I suppose you meant to check on cell instead of row Comment : @Mathlight - thanks I updated the answer with these 3 fixes .", "Question : I have a project built with Awesomium built-in .NET and it requires the use of Flash . Flash throws security errors trying to access local content video-player and the solution s Awesomium offers have not been ported to the .NET wrapper yet . I m wondering if there is a fairly straight-forward way to include a run-time web server in the application where I can just pick some arbitrary port and create a localhost server when the application runs and point my Awesomium browser there . Any ideas Comment : So you re trying to get a flash-player to load local content Would adding something to the hosts-file allow you to work around that .. . Answer : I appears as though you can play local flash content as long as the content is set to be trusted . What is Flash Player security for local content http : www.adobe.com security flashplayer articles localcontent .. . .. . Local content can be designated as trusted so that it is not interrupted by this dialog box and is allowed to function as designed . This trust must be explicitly designated in one of two ways . .. . By running a software installation program in which the content in the application you install is already registered as trusted . When you run an installation program you are explicitly allowing a program to be installed on your computer . Thus the publisher of the application can automatically register the content with Flash Player as trusted . .. . By adding specific content or directories to a list of trusted files through the Global Security Settings panel in the Flash Player Settings Manager . In this panel you can designate specific content or even directories as trusted by manually registering locations with Flash Player . For step-by-step instructions on how to designate content as trusted see the TechNote : How do I let local Flash content communicate with the Internet", "Question : I have a project built with Awesomium built-in .NET and it requires the use of Flash . Flash throws security errors trying to access local content video-player and the solution s Awesomium offers have not been ported to the .NET wrapper yet . I m wondering if there is a fairly straight-forward way to include a run-time web server in the application where I can just pick some arbitrary port and create a localhost server when the application runs and point my Awesomium browser there . Any ideas Comment : So you re trying to get a flash-player to load local content Would adding something to the hosts-file allow you to work around that .. . Answer : Here s another alternative I wrote last year and and has served me well . EmbedIO : https : github.com unosquare embedio .. . .. . I use it mostly to create RESTful services on the Raspberry Pi soft-float . Updated code for Mono 3.10 support for WebSockets and Asynchronous handling of requests . NuGet Package also available .", "Question : I have a project built with Awesomium built-in .NET and it requires the use of Flash . Flash throws security errors trying to access local content video-player and the solution s Awesomium offers have not been ported to the .NET wrapper yet . I m wondering if there is a fairly straight-forward way to include a run-time web server in the application where I can just pick some arbitrary port and create a localhost server when the application runs and point my Awesomium browser there . Any ideas Comment : So you re trying to get a flash-player to load local content Would adding something to the hosts-file allow you to work around that .. . Answer : If you need a little ASP.NET on the server-side use Mono.WebServer and Mono.WebServer.XSP . Here : .. . https : github.com mono xsp tree master src .. . .. . Else you can use uhttpsharp : .. . https : github.com raistlinthewiz uhttpsharp .. . .. . Or you can use webserver from codeplex : .. . http : webserver.codeplex.com .. . .. . Or more heavyweight Cassini : .. . https : cassinidev.codeplex.com", "Question : null .. . Answer : We have a desktop application developed with below technologies .. . .. . WPF Chromium awesomium controls .. . .. . Can anyone suggest me any tool for automating this application We tried all popular tools in market but no luck . Let me know if anyone have worked on these application or please provide any suggestions Comment : Which tools did you try for now Have you looked at open-source tools like TestStack.White or Winium.Desktop Comment : We tried tools like UFT Ranorex TestComplete...But no use . We are looking for tool which not only support desktop application but also it should identify awesomium controls Comment : I thought of giving TestStack.White a try . I installed Visual UI Automation Verify tool and tried identifying the objects . The tool is able to identify wpf controls but unable to identify awesomium controls on chromium . Comment : Didn t hear about awesomium before . Probably these controls don t implement UIA providers to support Microsoft UI Automation technology . Or they require some special steps to enable accessibility .", "Question : I have a project built with Awesomium built-in .NET and it requires the use of Flash . Flash throws security errors trying to access local content video-player and the solution s Awesomium offers have not been ported to the .NET wrapper yet . I m wondering if there is a fairly straight-forward way to include a run-time web server in the application where I can just pick some arbitrary port and create a localhost server when the application runs and point my Awesomium browser there . Any ideas Comment : So you re trying to get a flash-player to load local content Would adding something to the hosts-file allow you to work around that .. . Answer : NHttp https : github.com pvginkel NHttp provides an HTTP server with request parsing but you have to roll your own responses . There s also Kayak https : github.com kayak kayak and the framework s own HttpListener http : msdn.microsoft.com en-us library system.net.httplistener.aspx . Nancy http : nancyfx.org is a full MVC framework supports the ASP.NET Razor syntax and has lots of options for configuration and extensibility . There s a self-host package http : nuget.org packages Nancy.Hosting.Self available on nuget . If you just need to serve up a SWF file and some JSON data the first set would probably be simpler to integrate -- if you need to render full web pages I would recommend Nancy . Comment : The link for Kayak is no longer valid it points to a domain on sale -- the correct one is github.com kayak kayak https : github.com kayak kayak Comment : @edymtt updated thanks .", "Question : null .. . Answer : I am using the Awesomium Web Control for WinForms not WPF for Automation in Visual Basic . I have the following inputs in an array .. . .. . How can I set the referer and user-agent just before visiting a site . My guess is something like this : .. . .. . Looking at the documentation here didn t help me to much I am a noob .. . .. . Awesomium Referer Docs http : docs.awesomium.net html P Awesomium Core Data DataSourceRequest Referrer.htm .. . .. . Awesomium UserAgent Docs http : docs.awesomium.net html P Awesomium Core WebConfig UserAgent.htm .. . .. . Some Answers that I couldn t make sense of : .. . .. . User Agent Answer http : answers.awesomium.com questions 3376 change-referee-and-user-agent-for-webcontrol.html .. . .. . Referer and UserAgent Answer http : www.blackhatworld.com blackhat-seo c-c-c 554271-c-discussion-awesomium-change-referrer-user-agent.html .. . .. . Stack Overflow Q A http : stackoverflow.com questions 31090383 how-to-change-awesomium-user-agent .. . .. . C answer StackOverflow http : stackoverflow.com questions 15992233 awesomium-change-useragent-and-referrer", "Question : I have a project built with Awesomium built-in .NET and it requires the use of Flash . Flash throws security errors trying to access local content video-player and the solution s Awesomium offers have not been ported to the .NET wrapper yet . I m wondering if there is a fairly straight-forward way to include a run-time web server in the application where I can just pick some arbitrary port and create a localhost server when the application runs and point my Awesomium browser there . Any ideas Comment : So you re trying to get a flash-player to load local content Would adding something to the hosts-file allow you to work around that .. . Answer : I m guessing this is Windows. . You don t or shouldn t need to use a web server . If you create a cfg file doesn t matter what it s called in this directory : .. . .. . appdata Macromedia Flash Player Security FlashPlayerTrust .. . .. . And put a single line in it containing the path to the folder you want to trust then Flash will load local resources without security issues . You can delete the file again when you shutdown this is what we do . Same principal on other platforms just the location of that FlashPlayerTrust folder is different . Comment : Thank you I was using Awesomium to screen-capture a web page and the Flash security window kept opening and halting the operation of the program . This was a tremendous help .", "Question : I am using Awesomium library http : www.awesomium.com for UI of my C++ application plain C++ no .NET precompiled-headers etc . . Everything works fine I am able to send events from C++ application to JavaScript in Awesomium and vice versa . UI responds to clicks etc . thanks to webCore- Update . The problem is sometimes errors in JavaScript occurs . And I would like to see them like in e.g . Edge Chrome Firefox where you can press F12 to see console debugger etc . . I know that it s possible to use remote debugger for Awesomium with appropriate WebConfig so I ve tried : .. . .. . Now in Chrome at http : localhost : 9222 I see my session : enter image description here http : i.stack.imgur.com LxjOw.jpg .. . .. . I am able to e.g . select UI elements inside my C++ application with debugger . But I cannot see anything in my debugger s console tab in Chrome I do use console.log Hello inside website that is loaded into Awesomium : enter image description here http : i.stack.imgur.com RKn1Y.jpg .. . .. . p.s . The debugger window is not 100 height as you see on screen . Can I fix it somehow p.s.2 . Google Chrome is not my browser of choice . Can I use another one for debugging Awesomium UI .. . Answer : JavaScript error debug messages are not visible in the remote debugger of Awesomium v1.7.5.1 . The only way I found was by listening to the OnAddConsoleMessage method in the WebViewListener : : Load class . You have to make your own subclass and register it to your webview . Register it :", "Question : From this page http : wiki.awesomium.com general-use introduction-to-javascript-integration.html I can see how to get a JSObject from a JSValue in C++ . Is there a similar way to do so in .NET The ToObject method doesn t seem to exist . .. . Answer : Just cast the argument from a JSValue to JSObject Comment : What if you do not know the name of the property Comment : See Awesomium : : JSObject Class Reference http : awesomium.com docs 1 7 0 cpp api class awesomium 1 1 j s object.html . Try GetMethodNames or HasProperty or HasMethod . Comment : Your link points to the C++ API . How can I find out the property name with HasProperty Test for all possible variable names I just found this http : docs.awesomium.net html M Awesomium Core JSObject GetPropertyNames.htm but unfortunatly this yields an InvalidOperation exception . Comment : The Awesomium API is similar between C++ and .Net . See docs.awesomium.net html T Awesomium Core JSObject.htm http : docs.awesomium.net html T Awesomium Core JSObject.htm . Confirm your version of Awesomium supports these methods if you are not using the latest bits . Comment : I found it . But as I just said I think I can only find the property names by calling myJSObject.GetPropertyNames but this yields an InvalidOperation exception .", "Question : I ve scoured the internet looking for an answer but I must be asking the wrong question . I have a C winforms app with an Awesomium web control . Am I able to call methods defined in the app from javascript in the page that loads If so how sample js code would be greatly appreciated . Thanks .. . Answer : In C++ : the .NET bindings will likely be similar .. . .. . Define a callback class : .. . .. . Then as you set up your WebView : .. . .. . Then in your HTML JS :", "Question : null .. . Answer : Problem : The C method is not invoked when JavaScript method is invoked . I have a WPF application in which I am using Awesomium web control .. . .. . Details : .. . .. . The javascript method is as follows : .. . .. . In C I have following code : .. . .. . Not sure why but the onNonceReceived method is never invoked . I have verified that the javascript function onPaymentMethod nonce type details is invoked which means a call must have been done to app.onNonceReceived nonce . Can someone help", "Question : I m using Awesomium in C winforms app to click on a div inside the webpage . the following script works just fine if you type it directly in google-chrome : .. . .. . but when I try to execute it in awesomium using either : .. . .. . or this : .. . .. . It s not working . Which makes me think - does Awesomium support div clicks or not Or maybe there is another reason why it s not working I ve also tried to execute the code : .. . .. . on LoadCompleted event to make sure that the page is loaded completely .. . by typing the script manually in addressBox1 native awesomium address-bar control .. . .. . As usual - nothing is working . EDIT : .. . .. . I ve tested the same javascript in GeckoFX and it s not working there either. . Any workaround EDIT2 .. . .. . Standart WebBrowser control executes the script perfectly Although it s using IE5 or so. . that s why I d like to see Awesomium solution working . P.S . it was working in webcontrol and now it s not how do i reset it P.P.S . i removed the cache in IE but it s sooo unreliable to use standard WebBrowser. . Comment : what version of geckofx firefox did you try Comment : Have you tried upgrading to the latest Awesomium 1.7 RC http : awesomium.com download The API changes significantly but it may solve your issue . Version 1.7 allows you to manipulate the DOM and access HTML DOM objects . Provided you use 1.7 I could give you an alternative example of how to do this . Comment : just tried 1.7RC3 - it can t access HTML DOM nor it does any operations with HTML elements except executing javascript . It doesn t even support as simple operation as saving page s HTML to string.. . stackoverflow.com questions 14761334 http : stackoverflow.com questions 14761334 interacting-with-awesominum-webcontrol 14761555 comment20662646 14761555 Comment : DIV click doesn t work either Comment : goto vk.com - goto music - try clicking on div with id ac play using awesomium .. . Answer : Remember that you have to wait for DocumentReady event with DocumentReadyState as Loaded not Ready - because then Awesomium is not quite ready yet", "Question : Can you find HTML elements in awesomium webcontrol to do the further processing For example I can find necessary element or even element collection in Watin using : .. . .. . When found - you can extract multiple properties of that element .. . .. . How do I do it in awesomium Does it have built-in DOM parser to operate with website controls divs links tables etc. . .. . .. . So far I could only find javascript execution command but that s not what I m looking for . . .. . .. . Additionally I d like to know how to save webpage s HTML to string in awesomium EDIT : explaination .. . .. . It looks like awesomium doesnt support HTML element parsing natively so my backup plan is following : .. . .. . 1 . open webpage in awesomium .. . 2 . grab HTML to string currently using : ExecuteJavascriptWithResult .. . 3 . parse string to HTML currently using : HTML Agility pack .. . 4 . do what I need to do find elements collection etc . 5 . execute JS command in awesomium based on previous step results .. . .. . All of this would be easier if awesomium had DOM support. . but. . well. . Comment : no you can t - case closed .. . Answer : Yes we can found html element to do further processing on . For example .. . .. . It is the way i found the htmlInputElement and i have tested it and it works for me .", "Question : Can you find HTML elements in awesomium webcontrol to do the further processing For example I can find necessary element or even element collection in Watin using : .. . .. . When found - you can extract multiple properties of that element .. . .. . How do I do it in awesomium Does it have built-in DOM parser to operate with website controls divs links tables etc. . .. . .. . So far I could only find javascript execution command but that s not what I m looking for . . .. . .. . Additionally I d like to know how to save webpage s HTML to string in awesomium EDIT : explaination .. . .. . It looks like awesomium doesnt support HTML element parsing natively so my backup plan is following : .. . .. . 1 . open webpage in awesomium .. . 2 . grab HTML to string currently using : ExecuteJavascriptWithResult .. . 3 . parse string to HTML currently using : HTML Agility pack .. . 4 . do what I need to do find elements collection etc . 5 . execute JS command in awesomium based on previous step results .. . .. . All of this would be easier if awesomium had DOM support. . but. . well. . Comment : no you can t - case closed .. . Answer : And how about a JS trick Cheers", "Question : I ve scoured the internet looking for an answer but I must be asking the wrong question . I have a C winforms app with an Awesomium web control . Am I able to call methods defined in the app from javascript in the page that loads If so how sample js code would be greatly appreciated . Thanks .. . Answer : The approach depends on which version of Awesomium you re using . There s been a bit of a change of how this is done in the upcoming version 1.7 currently at 1.7 RC3 and how it was done before . Note that there s one improvement in 1.7 in that .NET methods can now return values when JS calls a method on your app . I don t believe this was possible prior to 1.7 . Here are the two methods : .. . .. . test.html used for both versions .. . .. . Version 1.7 .. . .. . Form1.cs .. . .. . Version 1.6 .. . .. . Form.cs Comment : Bind is now deprecated . Can we update this answer to reflect newer versions Comment : @Dagrooms I no longer use Awesomium . I have switched to an open-source alternative CEFSharp github.com cefsharp CefSharp . First it s free for all commercial use unlike Awesomium . More importantly Awesomium s current version 1.7.5 runs on Chromium 18 and scores poorly on HTML5 tests 335 of 555 on html5test.com . CEFSharp runs on Chromium 39 and scores much better on HTML5 tests 470 of 555 on html5test.com . For the benefit of those still using Awesomium please feel free to edit my answer or post your own .", "Question : I m using Awesomium in C winforms app to click on a div inside the webpage . the following script works just fine if you type it directly in google-chrome : .. . .. . but when I try to execute it in awesomium using either : .. . .. . or this : .. . .. . It s not working . Which makes me think - does Awesomium support div clicks or not Or maybe there is another reason why it s not working I ve also tried to execute the code : .. . .. . on LoadCompleted event to make sure that the page is loaded completely .. . by typing the script manually in addressBox1 native awesomium address-bar control .. . .. . As usual - nothing is working . EDIT : .. . .. . I ve tested the same javascript in GeckoFX and it s not working there either. . Any workaround EDIT2 .. . .. . Standart WebBrowser control executes the script perfectly Although it s using IE5 or so. . that s why I d like to see Awesomium solution working . P.S . it was working in webcontrol and now it s not how do i reset it P.P.S . i removed the cache in IE but it s sooo unreliable to use standard WebBrowser. . Comment : what version of geckofx firefox did you try Comment : Have you tried upgrading to the latest Awesomium 1.7 RC http : awesomium.com download The API changes significantly but it may solve your issue . Version 1.7 allows you to manipulate the DOM and access HTML DOM objects . Provided you use 1.7 I could give you an alternative example of how to do this . Comment : just tried 1.7RC3 - it can t access HTML DOM nor it does any operations with HTML elements except executing javascript . It doesn t even support as simple operation as saving page s HTML to string.. . stackoverflow.com questions 14761334 http : stackoverflow.com questions 14761334 interacting-with-awesominum-webcontrol 14761555 comment20662646 14761555 Comment : DIV click doesn t work either Comment : goto vk.com - goto music - try clicking on div with id ac play using awesomium .. . Answer : Link http : answers.awesomium.com questions 2601 javascript-click-on-img-o-a-tag-doesnt-works.html" ] }
[ "yes-answer-long", "yes-answer-short" ]
html
UNK_RELATION
lwuit-combobox@popup@117
lwuit-combobox -- a combo box is a list that allows only one selection at a time when a user clicks the combo box a @placeholder button with the full list of elements allows the selection of a single element .
{ "confidence": [ 60.00740432739258, 42.17018508911133, 40.340736389160156, 36.51671600341797, 32.92781066894531, 32.01457977294922, 31.234981536865234, 31.06253433227539, 28.859886169433594, 28.60492706298828, 26.368534088134766, 25.955392837524414, 25.745845794677734, 25.5068359375, 23.879352569580078, 23.879352569580078, 23.756298065185547, 23.291160583496094, 23.279052734375, 23.25638771057129, 23.071035385131836, 22.935386657714844, 22.38200569152832, 21.82341194152832, 21.82341194152832, 21.82341194152832, 21.335342407226562, 20.13058090209961, 19.411697387695312, 19.408889770507812, 19.408889770507812, 18.51108169555664, 17.24942970275879, 16.997175216674805, 16.402172088623047, 16.21446418762207, 15.809277534484863, 15.26413345336914, 15.26413345336914, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.208191871643066, 13.062551498413086, 10.796477317810059, 10.796477317810059, 10.796477317810059, 10.796477317810059, 10.796477317810059, 10.796477317810059, 10.796477317810059, 10.796477317810059, 10.796477317810059, 10.796477317810059 ], "content": [ "How to remove all items or a single item from a combo box in LWUIT", "If you want to add date in combo values you can add the selected date in the vector or list of the combo component s vector .", "In order to allow selecting a blank you need to actually add it to the combo box there is no way around it .", "I created a ComboBox of String : .. . .. . genretxt new ComboBox new String F minin Masculin .. . .. . The problem is that the popup has a blank item when clicking the ComboBox at runtime but this blank item is not clickable : even though I click it then the selection remains at the previous selection .", "Deleting the all the items from combobox in lwuit sample code given below :", "If you are adding the list to the ComboBox I think that you should put the ActionListener to the ComboBox not to the List as you are doing .", "I have a LWUIT application that has a list which involving some items .", "The list itself has been added to a Combobox .", "The LWUIT version I use is 1.4", "@blay only before your statements Ishould write this statement final com.sun.lwuit.ComboBox Combo new com.sun.lwuit.ComboBox mylist.getModel", "LWUIT has a special case for empty strings where they occupy 0 space .", "Also the genretxt component s value is not mandatory in my application so the user can select null in the ComboBox .", "I am creating an application using lwuit .", "It seems that I will be forced to reuse that code lwuit.blogspot.com 2008 07 http : lwuit.blogspot.com 2008 07 lwuit-list-renderer-by-chen-fishbein.html but what getListCellRenderer method", "I tried to derive the ComboBox class and implemented the createPopupList method but the problem is the same", "So how to make it possible to select a null item in the ComboBox", "And i want to add calendar in comboBox .", "I tried to add the String to the array argument of the ComboBox : genretxt new ComboBox new String F minin Masculin but in runtime there is two blank items so it is not very good to see", "1 How I change the colour of an item of list when I focus on it", "I m not exactly sure where you see that blank and without an exact way to reproduce version of LWUIT theme used there isn t much I can help with there .", "It seems that I will be forced to reuse that code lwuit.blogspot.com 2008 07 http : lwuit.blogspot.com 2008 07 lwuit-list-renderer-by-chen-fishbein.html comment-form 8868619825488006175 but what getListCellRenderer method from where you get it", "Here if India is the comboBox item then 10 is its key .", "How can I achieve this in Lwuit 1.5 . could you guys guide me to do this .", "Use getModel .removeItem index and remove the item s from ComboBox .", "I want to store and retrieve a key-value associated with the comboBox .", "I think that you must map the values with the items in the ComboBox .", "you load your list in mylist.setRenderer getListCellRenderer", "The object list that you work is what you put in mylist.setRenderer getListCellRenderer .", "To change the colour of a ComboBox you should modify the ComboBoxFocus style from the ResourceEditor .", "Do u mean that you want to add the selected date of calendar component at the end of combobox values or to show the selected date in textbox", "See the sample code .. . .. . If you want to remove all item means set the empty ListModel on combobox.setModel model or pass the empty Vector on ComboBox constructor .", "If so then below code shows the selected date of calendar component in textbox : .. . .. . this code will add one calendar button to your main form and will display the selected date in textfield here named txtDate .", "I have used only getSelectedIndex and getSelectedItem .", "You Should set a renderer to ComboBox and can use both of setRenderer and setListCellRenderer but setListCellRenderer is deprecated than use setRenderer : .. . .. . this working well .", "Its helpful tool look here for example http : lwuit.blogspot.co.il 2011 03 list-rendering-easy-way-generic-list.html .. . .. . You can implement getListCellRendererComponent . . - this function return the compenents that display on screen and responsible on UI .", "I have wrote this method public Component getListCellRendererComponent List list java.lang.Object value int index boolean isSelected com.sun.lwuit.ComboBox myCombo new com.sun.lwuit.ComboBox list.getModel value list.getModel if isSelected myCombo.setFocus true myCombo.getStyle .setBgTransparency 100 else myCombo.setFocus false myCombo.getStyle .setBgTransparency 0 return myCombo I am correct till now", "When India is selected I need to get the value as 10 if china 15 if Russia 18 .", "Can you write a complete example", "You can resolve it either by having a string like None or by calling setRenderingPrototype XXXXXXXX or by creating your own renderer .", "please give me an idea as soon as possible. .", "If this is not what you want kindly briefly explain what you want actually to do .", "Is there any functions like removeall", "Thanks Bharath you saved my day .", "I missed the getModel part : ashamed :", "you are welcome ganesh .", ":", "This is im searching .", "should the .removeItem 0 have .removeItem i", "This will not help my purpose as I have to get a unique key-value assocaiated with the item .", "Example Scenario : .. . .. . India - 10 China - 15 Russia - 18 .", "Likewise 15 for china and 18 for Russia .", "You can do this in some different ways .", "You can do it with a Hashtable for example .", "You will need to make the proper castings to get the value in the data type what you want .", "Thanks jmunoz just what I was looking for", "You are welcome .", "If you can upvote it will be great", "2 I want to do an action when I click or double click on an item .. . .. . ActionListener interface didn t make that for me can someone guide me", "Try this facts .", "You can work with ListCellRenderer .", "If you work with ListCellRenderer you can use actionLisiner like this :", "No .", "you use in your code how you want .", "in function you do casting to specific object and build the component with container labels and ect how do you like .", "its helpful to create class and wotk with him .", "in the constructor you intliaize your components like checkbox .", "you don t need to call list.getMode because you get your value at java.lang.Object .", "value you need cast to your object ." ] }
{ "confidence": [ 77.12397766113281, 69.32453918457031, 64.9564208984375, 61.65438461303711, 58.2271728515625, 43.140350341796875, 37.86457061767578, 33.85447311401367 ], "content": [ "Question : I created a ComboBox of String : .. . .. . genretxt new ComboBox new String F minin Masculin .. . .. . The problem is that the popup has a blank item when clicking the ComboBox at runtime but this blank item is not clickable : even though I click it then the selection remains at the previous selection . I tried to add the String to the array argument of the ComboBox : genretxt new ComboBox new String F minin Masculin but in runtime there is two blank items so it is not very good to see Also the genretxt component s value is not mandatory in my application so the user can select null in the ComboBox . I tried to derive the ComboBox class and implemented the createPopupList method but the problem is the same So how to make it possible to select a null item in the ComboBox Comment : Can you write a complete example .. . Answer : I m not exactly sure where you see that blank and without an exact way to reproduce version of LWUIT theme used there isn t much I can help with there . In order to allow selecting a blank you need to actually add it to the combo box there is no way around it . LWUIT has a special case for empty strings where they occupy 0 space . You can resolve it either by having a string like None or by calling setRenderingPrototype XXXXXXXX or by creating your own renderer . Comment : The LWUIT version I use is 1.4", "Question : How to remove all items or a single item from a combo box in LWUIT Is there any functions like removeall .. . Answer : Deleting the all the items from combobox in lwuit sample code given below : Comment : should the .removeItem 0 have .removeItem i", "Question : How to remove all items or a single item from a combo box in LWUIT Is there any functions like removeall .. . Answer : Use getModel .removeItem index and remove the item s from ComboBox . See the sample code .. . .. . If you want to remove all item means set the empty ListModel on combobox.setModel model or pass the empty Vector on ComboBox constructor . Comment : Thanks Bharath you saved my day . I missed the getModel part : ashamed : Comment : you are welcome ganesh . : Comment : This is im searching .", "Question : I am creating an application using lwuit . And i want to add calendar in comboBox . please give me an idea as soon as possible. . .. . Answer : Do u mean that you want to add the selected date of calendar component at the end of combobox values or to show the selected date in textbox If so then below code shows the selected date of calendar component in textbox : .. . .. . this code will add one calendar button to your main form and will display the selected date in textfield here named txtDate . If you want to add date in combo values you can add the selected date in the vector or list of the combo component s vector . If this is not what you want kindly briefly explain what you want actually to do .", "Question : I have a LWUIT application that has a list which involving some items . The list itself has been added to a Combobox . 1 How I change the colour of an item of list when I focus on it 2 I want to do an action when I click or double click on an item .. . .. . ActionListener interface didn t make that for me can someone guide me .. . Answer : You Should set a renderer to ComboBox and can use both of setRenderer and setListCellRenderer but setListCellRenderer is deprecated than use setRenderer : .. . .. . this working well . Comment : @blay only before your statements Ishould write this statement final com.sun.lwuit.ComboBox Combo new com.sun.lwuit.ComboBox mylist.getModel", "Question : I have a LWUIT application that has a list which involving some items . The list itself has been added to a Combobox . 1 How I change the colour of an item of list when I focus on it 2 I want to do an action when I click or double click on an item .. . .. . ActionListener interface didn t make that for me can someone guide me .. . Answer : To change the colour of a ComboBox you should modify the ComboBoxFocus style from the ResourceEditor . If you are adding the list to the ComboBox I think that you should put the ActionListener to the ComboBox not to the List as you are doing . Try this facts .", "Question : I have a LWUIT application that has a list which involving some items . The list itself has been added to a Combobox . 1 How I change the colour of an item of list when I focus on it 2 I want to do an action when I click or double click on an item .. . .. . ActionListener interface didn t make that for me can someone guide me .. . Answer : You can work with ListCellRenderer . Its helpful tool look here for example http : lwuit.blogspot.co.il 2011 03 list-rendering-easy-way-generic-list.html .. . .. . You can implement getListCellRendererComponent . . - this function return the compenents that display on screen and responsible on UI . If you work with ListCellRenderer you can use actionLisiner like this : Comment : It seems that I will be forced to reuse that code lwuit.blogspot.com 2008 07 http : lwuit.blogspot.com 2008 07 lwuit-list-renderer-by-chen-fishbein.html but what getListCellRenderer method Comment : It seems that I will be forced to reuse that code lwuit.blogspot.com 2008 07 http : lwuit.blogspot.com 2008 07 lwuit-list-renderer-by-chen-fishbein.html comment-form 8868619825488006175 but what getListCellRenderer method from where you get it Comment : No . you use in your code how you want . The object list that you work is what you put in mylist.setRenderer getListCellRenderer . in function you do casting to specific object and build the component with container labels and ect how do you like . Comment : I have wrote this method public Component getListCellRendererComponent List list java.lang.Object value int index boolean isSelected com.sun.lwuit.ComboBox myCombo new com.sun.lwuit.ComboBox list.getModel value list.getModel if isSelected myCombo.setFocus true myCombo.getStyle .setBgTransparency 100 else myCombo.setFocus false myCombo.getStyle .setBgTransparency 0 return myCombo I am correct till now Comment : No . its helpful to create class and wotk with him . in the constructor you intliaize your components like checkbox . you don t need to call list.getMode because you get your value at java.lang.Object . value you need cast to your object . you load your list in mylist.setRenderer getListCellRenderer", "Question : I want to store and retrieve a key-value associated with the comboBox . I have used only getSelectedIndex and getSelectedItem . This will not help my purpose as I have to get a unique key-value assocaiated with the item . Example Scenario : .. . .. . India - 10 China - 15 Russia - 18 . Here if India is the comboBox item then 10 is its key . Likewise 15 for china and 18 for Russia . When India is selected I need to get the value as 10 if china 15 if Russia 18 . How can I achieve this in Lwuit 1.5 . could you guys guide me to do this . .. . Answer : I think that you must map the values with the items in the ComboBox . You can do this in some different ways . You can do it with a Hashtable for example . You will need to make the proper castings to get the value in the data type what you want . Comment : Thanks jmunoz just what I was looking for Comment : You are welcome . If you can upvote it will be great" ] }
[ "yes-answer-long", "yes-answer-short" ]
popup
UNK_RELATION
yaxlib@.net@65
yaxlib -- yaxlib is a flexible xml-serialization library in the @placeholder framework .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
toolkit@user@128
toolkit -- a widget toolkit widget library or gui toolkit is a set of widgets for use in designing applications with graphical @placeholder interfaces guis .
{ "confidence": [ 56.593505859375, 51.8623046875, 48.42916488647461, 48.171295166015625, 46.6470947265625, 46.30247497558594, 43.82228088378906, 43.82228088378906, 43.624908447265625, 43.624908447265625, 43.23166275024414, 43.18468475341797, 42.9384880065918, 42.5623893737793, 42.44566345214844, 41.19873809814453, 40.81836700439453, 40.74353790283203, 40.74353790283203, 40.74353790283203, 40.74353790283203, 40.593727111816406, 40.388160705566406, 40.388160705566406, 40.33244323730469, 40.30290222167969, 40.1456298828125, 39.932960510253906, 39.622230529785156, 39.416664123535156, 39.416664123535156, 39.416664123535156, 39.416664123535156, 39.416664123535156, 39.381568908691406, 39.381568908691406, 39.381568908691406, 39.381568908691406, 39.335052490234375, 39.192832946777344, 38.962127685546875, 38.862266540527344, 38.604454040527344, 38.57099151611328, 38.57099151611328, 38.57099151611328, 38.482662200927734, 38.40477752685547, 38.363555908203125, 38.363555908203125, 38.363555908203125, 38.306922912597656, 38.2995719909668, 38.27705383300781, 38.27705383300781, 38.27705383300781, 38.217350006103516, 38.162933349609375, 38.162933349609375, 38.162933349609375, 37.82185363769531, 37.76612854003906, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.59949493408203, 37.48899841308594, 37.48899841308594, 37.467010498046875, 37.382957458496094, 37.10493469238281, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.94109344482422, 36.683746337890625, 36.625423431396484, 36.539955139160156, 36.539955139160156 ], "content": [ "I need to decide on a GUI Widget toolkit to use with Python for a new project .", "What is the easiest cross-platform widget toolkit", "As you ve noted the Identity Toolkit widget currently needs to be triggered by page load .", "What GUI toolkit does Valve use for Steam", "Customized menu items are now supported in Google Identity Toolkit javascript widget .", "Realize that the Windows API is not a GUI toolkit .", "The old way : toolkit 0.8.7 .. . .. . The new way : toolkit 0.9.0 .. . .. . What is there to substitute it", "The Globus Toolkit Installation Guide http : globus.org toolkit docs 3.2 installation .", "Toolkit and A.P.I .", "Template Toolkit", "Last time I programmed a GUI I used a GUI toolkit .", "My GUI toolkit of choice is Ext-JS .", "I m looking for a cross-platform widget toolkit that I can use for a C application that I m developing .", "I was checking out a new GUI toolkit and my first impression was wow this is a lot harder to use than my previous toolkit .", "There are not many public applications using the MVVM Light Toolkit .", "That pacified the Surface Toolkit .", "Go here to get the toolkit : Simple MVVM Toolkit http : simplemvvmtoolkit.codeplex.com .", "I am curious on what gui toolkit Steam uses too .", "Is WPF yet another GUI toolkit like WinForms with some enhanced features", "WPF is indeed the most recent Desktop GUI toolkit for Windows OS", "This correctly answers the first part of the question : Is WPF yet another GUI toolkit .", "The reference implementation for Shoes 4 is SWT Standard Widget Toolkit which runs on JRuby .", "deployJava.js is the Deployment Toolkit .", "Should I reinstall toolkit", "As it can t find SIM Toolkit library there it returns this error .", "You need : System.Windows.Controls from the Silverlight SDK client library System.Windows.Controls.Input.Toolkit form the Silverlight toolkit and System.Windows.Controls.Toolkit from the Silverlight toolkit .", "I know how to use template-toolkit sort of .", "You can make a GUI for Tempi my new dataflow toolkit .", "The URL should point to the Identity Toolkit widget page with a one-time code in the query param .", "Include the toolkit using NuGet .", "I used a TOOLKIT ListPicker .", "There are problems with these calculation in this toolkit however .", "Few of the calculations in the toolkit account for that .", "we have a toolkit XVT .", "I am new to the Dojo Toolkit .", "Is this still applicable to Identity Toolkit V3", "What is the difference between and - - in Template Toolkit", "I m using the globus toolkit for a project .", "I want to use HTK toolkit for the training .", "It seems that enterprise-library collides with ESB Toolkit .", "You could use the Google Identity Toolkit Python client library to verify that token : https : github.com google identity-toolkit-python-client .", "You may find how to use Google Identity Toolkit https : developers.google.com identity toolkit from the official site .", "I want to create applications for Linux Mac Windows and looking for the best GUI toolkit option .", "Do you know other toolkit", "Download the toolkit source and modify it yourself .", "First of is there any real documentation of the toolkit", "See the updated examples at Gephi toolkit demos https : github.com gephi gephi-toolkit-demos blob master src main java org gephi toolkit demos PreviewJFrame.java 0.9.1 they helped me with the same issue .", "It is a GUI toolkit completely built from scratch with a vastly different feature set and in my opinion not even comparable to WinForms .", "In my application I use the silverlight wp8-toolkit .", "@brandizzi The option is don t use the Toolkit in the first place .", "I want to use the helix toolkit for some visualization .", "Develop secured applications using basic security mechanisms available in Globus Toolkit .", "I can t find a licence for the Google Identity Toolkit CocoaPod https : developers.google.com identity toolkit ios .", "You mean the Silverlight Toolkit", "uninstalled toolkit and reinstalled but no change.. .", "I referenced the Aug13 toolkit .", "What s the main difference between API Toolkit Framework and Library", "So does anyone know of a toolkit that can do this", "Is there any good installation guide for Globus toolkit", "i am trying to setup globus toolkit .", "I have recently been learning how to program with the Clutter GUI toolkit .", "I am trying to build an obj file viewer using Helix Toolkit https : github.com helix-toolkit helix-toolkit with SharpDX .", "The graph is made with silverlight wpf toolkit .", "Install the Silverlight Toolkit on the new machine .", "It looks like the Silverlight toolkit is installed .", "I wanted to do it with the toolkit if possible .", "Is it because the toolkit is animating the PhoneApplicationPage or the Frame", "Which version of the toolkit are you using", "I was using an old version of the toolkit .", "I m using netsuite s php-toolkit .", "Download Translate Toolkit 1.11.0 .. . 5 .", "Browse to the Krypton Toolkit DLL and add .", "Is google-identity-toolkit production ready", "There have a lot of ESB Toolkit resources .", "Found the Solution in the issues section of helixtoolkit : https : github.com helix-toolkit helix-toolkit issues 226", "The reason for this user-experience is documented https : developers.google.com identity toolkit web federated-login on the Identity Toolkit site .", "If you ll use UICC toolkit you have to use EA tag .", "http : stackoverflow.com questions 1415592 what-is-the-major-difference-between-a-framework-and-a-toolkit .. . .. . Framework vs . Toolkit vs . Library http : stackoverflow.com questions 3057526 framework-vs-toolkit-vs-library .. . .. . I prefer to call a library as an alias of module or namespace .", "If rendering the sign-in button is a problem there is documentation https : developers.google.com identity toolkit web setup-frontend page with sign in widget on how to load the widget directly .", "I m not sure what the Simple MVVM toolkit is .", "Trying to integrate the Directx toolkit into my game .", "I have a wpf datagrid from the wpf toolkit .", "I try to develop a Sim Application Toolkit Applet. .", "In the Sim Toolkit is default a menu entry working fine .", "The toolkit doesn t work very well in the designer .", "I am using template-toolkit with perl Dancer .", "Can I do something similar with Template Toolkit", "Does Template : : Toolkit have anything like this", "i have a variable .. . .. . in perl template-toolkit .", "What is Template toolkit why for passing arguments to a subroutine", "probably means something different in Template : : Toolkit .", "Template-Toolkit filters are actually quite easy to write .", "Is this an issue with the identity toolkit or am I missing something", "I am interested in using the same toolkit for a project .", "Is anyone actually using this toolkit in a live production environment", "If a rewrite is necessary then one might as well pick a mainstream toolkit .", "I have followed this document link https : developers.google.com identity toolkit web quickstart php to create login in php using google-identity-toolkit .", "http : marktinderholt.wordpress.com 2011 07 12 silverlight-toolkit-for-silverlight-5-beta .. . .. . its the recompiled toolkit in SL5 just reference those and you re set", "I have been trying to set up sample Android app of Google Identity Toolkit demo gitkitdemo https : github.com googlesamples identity-toolkit-android ." ] }
{ "confidence": [ 63.95074462890625, 57.310096740722656, 56.936317443847656, 56.44895935058594, 56.01070022583008, 54.270538330078125, 53.44560623168945, 52.61644744873047, 52.5067253112793, 51.54315948486328, 51.34621810913086, 51.10443115234375, 51.03284454345703, 50.552162170410156, 50.28177261352539, 49.619075775146484, 49.07289505004883, 48.63945388793945, 48.460208892822266, 48.3633918762207 ], "content": [ "Question : Is WPF yet another GUI toolkit like WinForms with some enhanced features What other GUI toolkits are available for .Net I am new to .Net and I believe that WinForms is a GUI Toolkit as per : http : www.mono-project.com Gui Toolkits Comment : WPF is indeed the most recent Desktop GUI toolkit for Windows OS Comment : @LuisFilipe - almost WinRT is the most recent Desktop GUI - Comment : Thanks Luis Filepe and ColinE .. . Answer : From the very first sentence of Wikipedia s page on WPF http : en.wikipedia.org wiki Windows Presentation Foundation : .. . .. . Developed by Microsoft the Windows Presentation Foundation or WPF is a computer-software graphical subsystem for rendering user interfaces in Windows-based applications .. . .. . So .. . yes . Other GUI toolkits for .NET include .. . .. . Windows Forms .. . Windows Presentation Foundation .. . ASP.NET .. . Silverlight Comment : This correctly answers the first part of the question : Is WPF yet another GUI toolkit . The answer to the second part Is WPF .. . like WinForms with some enhanced features is a resounding NO . It is in no way based on WinForms . It is a GUI toolkit completely built from scratch with a vastly different feature set and in my opinion not even comparable to WinForms .", "Question : What is the easiest cross-platform widget toolkit I m looking for one that minimally covers Windows OSX and Linux with a C or C++ interface . Comment : responding to EMK others - Ease of development is the priority and relatively rich set - eg a table widget is essential . c++ is fine . Comment : You might also want to refer to this similar question http : stackoverflow.com questions 610 gui-programming-apis if you are reading these answers . .. . Answer : The easiest to write a new program in would be the one you re most familiar with . The easiest to use test or distribute would probably be the most cross-platform most distributed or the most supported one so GTK+ wx Qt Tk Note that C itself isn t a particularly easy language especially with the growing object-oriented approach to GUIs . The easiest one to cook up a prototype in a scripting-language then convert to a compiled one might be any toolkit with a scripting-language binding pyGTK wxPython etc . That being said of the big ones only GTK+ and Tk have a C bindings . wxWidgets Qt and FLTK were all written in C++ and don t have any C bindings as far as I know . I suggest you look into learning C++ and then comparing the available options . Coding in C++ might feel like coding in a scripting-language with great conveniences such as automatic pointers utility classes and overloaded operators non-invasive garbage collectors and easy to inherit parent classes all brought to your fingertips by the language itself and your widget toolkit . Then my personal suggestion would be wxWidgets quite easy to use better documented than GTKmm and freer than Qt .", "Question : What is the easiest cross-platform widget toolkit I m looking for one that minimally covers Windows OSX and Linux with a C or C++ interface . Comment : responding to EMK others - Ease of development is the priority and relatively rich set - eg a table widget is essential . c++ is fine . Comment : You might also want to refer to this similar question http : stackoverflow.com questions 610 gui-programming-apis if you are reading these answers . .. . Answer : As with the other posters I strongly recommend looking at C++ toolkits . GTK will work on Windows and the Mac OS but will only give you truly good results on Linux . And even some of the GTK maintainers are inventing their their own object-oriented C dialect http : live.gnome.org Vala to avoid writing GUIs against the native GTK API . As for C++ it depends on what you want . Ease of development Native GUIs on every platform Commercial support If you want native-looking GUIs on Win32 and Linux and something semi-reasonable on the Mac one excellent choice is wxWidgets . Here s a longer article with real-world wxWidgets experiences http : www.randomhacks.net articles 2002 12 10 wxwindows-experiences . The Mac port has improved substantially since 2002 when that article was written but it still has some soft spots . Comment : Ease of development and relatively rich - eg a table widget is essential . c++ is fine . Comment : wxWidgets and QT should both be on your shortlist then . If lots of fancy high-level widgets are more important to you than native-looking GUIs then I m not terribly familiar with what other options might exist . Good luck", "Question : What GUI toolkit does Valve use for Steam Is it Qt I am interested in using the same toolkit for a project . Comment : Do you mean the old UI or the new one currently in Beta Comment : To the closers - how is this not programming related Last time I programmed a GUI I used a GUI toolkit . I don t know many other uses for GUI toolkits in fact : Comment : I am curious on what gui toolkit Steam uses too . .. . Answer : According to Valve itself : .. . .. . VGUI is Valve s proprietary Graphical User Interface . All Source and Steam applications use VGUI to draw windows dialogs and menus . It also handles localization : the displaying of text in the user s preferred language . .. . .. . That s interesting maybe if you guys do some research you can have it working in your programming language . I ll download the SDK to see if I can make it work with Java : .. . .. . http : developer.valvesoftware.com wiki VGUI Documentation Comment : So it s basically a complete cross-platform UI rendering engine Does it use OpenGL for drawing", "Question : I need to decide on a GUI Widget toolkit to use with Python for a new project . The target platforms will be Linux with KDE and Windows XP and probably Vista . What Python GUI toolkit looks best and consistent with the native look-and-feel of the run time platform If possible cite strengths and weaknesses of the suggested toolkit . Thank you .. . .. . Luis Comment : Please try to proofread your posts a little better . The title contains a repeated word and you tagged it phyton . : Comment : Sorry about that . .. . Answer : Like others said PyQt or wxPython.. . The technical difference between the two is more or less imaginary - it s a question of your comfort with the toolkit that matters really . Comment : since qt renders itself and wx let render there is a technical difference", "Question : What GUI toolkit does Valve use for Steam Is it Qt I am interested in using the same toolkit for a project . Comment : Do you mean the old UI or the new one currently in Beta Comment : To the closers - how is this not programming related Last time I programmed a GUI I used a GUI toolkit . I don t know many other uses for GUI toolkits in fact : Comment : I am curious on what gui toolkit Steam uses too . .. . Answer : Steam only runs on Windows and predates QT for Windows so I d have to guess something else . Since Steam has had the same GUI since 2003 chances are it uses some variant of MFC http : en.wikipedia.org wiki Microsoft Foundation Class Library . It also uses an embedded Internet Explorer web browser for its Store and Community sections . However I can t give any guarantees about what the version currently in Beta http : store.steampowered.com uiupdate uses . It looks quite a bit different and includs the Webkit rendering engine instead of using IE . It may use Webkit for everything rather than drawing their own GUIs . Comment : I tried the beta it is pretty sick glad they are ditching IE cause they are possibly adding Mac support Comment : This information is out of date now . Steam is now released on Mac and coming very soon on Linux .", "Question : I need to decide on a GUI Widget toolkit to use with Python for a new project . The target platforms will be Linux with KDE and Windows XP and probably Vista . What Python GUI toolkit looks best and consistent with the native look-and-feel of the run time platform If possible cite strengths and weaknesses of the suggested toolkit . Thank you .. . .. . Luis Comment : Please try to proofread your posts a little better . The title contains a repeated word and you tagged it phyton . : Comment : Sorry about that . .. . Answer : Python binding of Wx is very strong since at least one of the core developer is a python guy itself . WxWdgets is robust time proven stable mature but also bit more than just GUI . Even is a lot is left out in WxPython - because Python itself offers that already - you might find that extra convenient for your project . Wx is the fastest especially on Win because it lets render the OS and yes WxLicense is de facto LGPL . With XRC you have also a way like Glade to click you to a UI that you can reuse by different projects and languages . What is one major reason for me to use Wx is the fast and helping mailing list never seen a flamewar you get even often answers from core developers there like the notorious vadim zeitlin++ . The only thing con to Wx is the API that once grew out of MS MFC and has still its darker unelegant corners but with every version you have some improvements on that as well . QT done some nice stuff especially warping the language but under python that don t count . They invented also a lot of extra widgets . In wx you have also combined more complex widgets like e.g . for config dialog but that goes not that far as in QT . And you could of course use GTK . almost no difference under linux to Wx but a bit alien and slower under win . but also free .", "Question : So I am trying to implement Google Identity Toolkit for my website . Now what happens is when I try to login and put up my Email Id .. . .. . 1 . If its a gmail id it directly goes into google-login . 2 . If any other domain is used then we get options to sign-in using google microsoft facebook etc .. . .. . Link for reference : https : developers.google.com identity toolkit .. . .. . But my problem is people using facebook generally login with their gmail id and so on . So how to modify the toolkit so as to have all the options of signing in available along with the email-id text box just like it is in google idenitity toolkit v1 but I can t use it since it does not have facebook as an Identity provider Also I would like to have the widget for login appear without using the initial sign-in button.Any suggestions .. . Answer : To load the widget without using the sign-in button you can simply create a link-to the location of your widget with the additional query parameter mode select as documented here https : developers.google.com identity toolkit web setup-frontend page with sign in widget . You can redirect to that link as you wish e.g . after the user clicks a sign in button of your own making . There is currently no way of displaying other login options alongside the email box . The reason for this user-experience is documented https : developers.google.com identity toolkit web federated-login on the Identity Toolkit site . Comment : Seems right . I have been through the documentation but I was wondering if there still was a way . Comment : @dsalama Asking for just the email first and then recommending login options is fine but why force the users with Gmail addresses to sign in with Google Maybe this particular website is for professional networking and the users like to sign in with LinkedIn . They would still want to use their Gmail address for email exchanges but would like to connect their LinkedIn profile and network with this website . Comment : @Price I agree with your point . I find the design of GIT login flow somewhat illogical . It simply isn t designed the way most users think of registering signing in and managing accounts online .", "Question : Does a framework allow you to abstract generic code - but not in a complete way Ex : Abstract a network connection - but not what you actually do with the data and does not solve any particular common requirement whereas a toolkit has solutions to generic problems Ex : Dialog box widget Real world Example : Prototype http : www.prototypejs.org is a framework but Dojo http : dojotoolkit.org is a toolkit . So my question is what is the criteria to call something a framework vs calling it a toolkit .. . Answer : Framework enforces some design pattern on the developer and give some tools for code generation . This sits well with my first sentence as it generates code in a certain style pattern . Library gives you functionality for you to use as you wish . Like the stdio functions of C Console of C The built-in functions of PHP etc .. . You can regard a library as a kind of API", "Question : What is the easiest cross-platform widget toolkit I m looking for one that minimally covers Windows OSX and Linux with a C or C++ interface . Comment : responding to EMK others - Ease of development is the priority and relatively rich set - eg a table widget is essential . c++ is fine . Comment : You might also want to refer to this similar question http : stackoverflow.com questions 610 gui-programming-apis if you are reading these answers . .. . Answer : Are we talking GUI Widgets If so I can suggest 3 .. . .. . FLTK : .. . .. . http : www.fltk.org .. . .. . GTK : .. . .. . http : www.gtk.org .. . .. . QT : .. . .. . http : trolltech.com products qt Comment : I don t think GTK works on Mac OS X except via the X11 subsystem which makes it look very much not like a native app . Comment : I worked on a large cross-platform application that used FLTK and we wished we hadn t . Save it for smaller stuff . Comment : @Justsalt : Interesting . Could you explain what problems you encountered I always thought FLTK was fairly solid though smaller than other toolkits .", "Question : The Google Identity Toolkit Gitkit documenation still has a patchy coverage of topics . One of the cases which doesn t have proper documentation is the verification of email addresses of users who create a password account instead of signing in with an Identity Provider . I did find a method public String getEmailVerificationLink String email in the Java library https : github.com google identity-toolkit-java-client for Gitkit but there is no description for this method . Upon running this method I found that besides returning a user specific verification link it also triggered a verification mail to this email-address . Sometimes this method also returns an error : org.json.JSONException : JSONObject oobCode not found . So the question is : how is this method supposed to be used and are there any other steps checks that are required in the email verification process For example do we need to separately check whether an email-address has already been verified before calling this method Gitkit team besides answering this question it would be really helpful if you could please plug other gaps in the documentation of both the Gitkit API and the client libraries . An example of another topic that is not yet covered is the control over password requirements : how can we customize the password strength requirements and communicate them to users on the sign up page .. . Answer : In the Google Identity Toolkit IdToken https : developers.google.com identity toolkit web required-endpoints decoding the identity toolkit id token there is a field verified . If it is false that means the email of the user has not been verified . When your server wants to verify a user s email call getEmailVerificationLink email to get back a one-time verification url from Identity Toolkit server . The URL should point to the Identity Toolkit widget page with a one-time code in the query param . Your server then sends an email containing the url to the address . Once the user clicks the url the Identity Toolkit widget will handle the remaining steps validate the one time code mark the verified flag in storage and redirect the browser to the SignInSuccessUrl . The password strength is not customizable in the current SDK . We are working on that . Comment : Thanks Does the Gitkit Java client library contain a method to read the ID token fields directly or would we need to use an external library for this purpose Comment : Yes the Gitkit java library provides the validateTokenToJson method to validate a token and return all fields in the token payload including the verified field . github.com google identity-toolkit-java-client blob master src https : github.com google identity-toolkit-java-client blob master src main java com google identitytoolkit GitkitClient.java L165", "Question : Does a framework allow you to abstract generic code - but not in a complete way Ex : Abstract a network connection - but not what you actually do with the data and does not solve any particular common requirement whereas a toolkit has solutions to generic problems Ex : Dialog box widget Real world Example : Prototype http : www.prototypejs.org is a framework but Dojo http : dojotoolkit.org is a toolkit . So my question is what is the criteria to call something a framework vs calling it a toolkit .. . Answer : Quoting Martin Folwer in his article on Inversion of Control http : martinfowler.com bliki InversionOfControl.html : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . .. . A framework embodies some abstract design with more behavior built-in . In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes . The framework s code then calls your code at these points . So in short the big difference is that your code calls a library while a framework calls your code .", "Question : I need to integrate Google s identitytoolkit Google s identitytoolkit https : developers.google.com identity toolkit with my Google webtoolkit GWT application . However rendering the gitkit signInButton or widget is already not straightforward because the way to do it is linked to window.onload . And I need to render the widget at a later moment . I managed to do it see below but I am not happy with this and I wonder if someone else found a better way of integration . Update Actually using the popupMode parameter for the signInButton makes a seamless integration even closer . This lets the widget popup in a browser window and leaving the GWT window unchanged . Then in the widget instead of redirecting to the successUrl I use the JS callback to trigger an AJAX call instead . Update Finally the GWT parent window will wait for the result cookie and if found make the AJAX call to the signInSuccessUrl . It will also have to render the signInButton again which will then show the signed in user . So the only ugly workaround is how the signInButton is rendered using the onload method call . It would be very helpful if there would be a way to render the signInButton dynamically when needed for instance if there were a wnd.google.identitytoolkit.update method . This could be called any time for the first time and should also be able to handle signin-status change In conclusion I have answered my own question which might be helpful to others but also I would still like to ask if there would be a better way which I missed . Comment : Just a note the signOutUrl value is a relative-path so it should be gitkit signout . Comment : @dsalama Thanks . I have cleaned up the urls and added more info . .. . Answer : As you ve noted the Identity Toolkit widget currently needs to be triggered by page load . Single-page applications like those built with GWT should place the widget on a separate page . Then you can redirect the user there - or render via popup as you ve noted - to sign in the user in . If rendering the sign-in button is a problem there is documentation https : developers.google.com identity toolkit web setup-frontend page with sign in widget on how to load the widget directly . Comment : If I place the widget on a separate page using the mode select parameter it would in the end be not much different to the popup scenario which I describe in the updated question . Derek if you could please review my solution and confirm that there is currently no better solution I would be happy to accept your answer . Also please consider the implementation of something along the lines of wnd.google.identitytoolkit.update described in the question . Comment : Yes your way looks like the best approach given the constraints . Your suggestion has been duly noted - we are definitely interested in improving integration for SPAs .", "Question : I need to decide on a GUI Widget toolkit to use with Python for a new project . The target platforms will be Linux with KDE and Windows XP and probably Vista . What Python GUI toolkit looks best and consistent with the native look-and-feel of the run time platform If possible cite strengths and weaknesses of the suggested toolkit . Thank you .. . .. . Luis Comment : Please try to proofread your posts a little better . The title contains a repeated word and you tagged it phyton . : Comment : Sorry about that . .. . Answer : For KDE and Windows Qt http : www.trolltech.com is the best option . Qt is fine for Gnome Windows too but in that case you might prefer WxWidgets http : wxwidgets.org . Qt bindings for python are here http : www.riverbankcomputing.co.uk software pyqt intro . Remember that for closed source development you need a Qt license plus a PyQt license . For open-source it should be free but I m not very familiar with the PyQt licensing . Comment : At least QT will be also LGPLed by Nokia soon enough . Comment : QT is already LGPL starting with version 4.5 the newest", "Question : Does a framework allow you to abstract generic code - but not in a complete way Ex : Abstract a network connection - but not what you actually do with the data and does not solve any particular common requirement whereas a toolkit has solutions to generic problems Ex : Dialog box widget Real world Example : Prototype http : www.prototypejs.org is a framework but Dojo http : dojotoolkit.org is a toolkit . So my question is what is the criteria to call something a framework vs calling it a toolkit .. . Answer : In my book a framework provides a structure and encourages or requires that it be used in a certain way . This can be good if the developer wants to do things the framework s way since it s easier for many thing to be automatic but it can be bad if the developer wants to deviate from the framework s intent . A toolkit on the other hand provides various tools that can be used together or separately . It s more flexible but requires more effort on the programmer s behalf .", "Question : What GUI toolkit does Valve use for Steam Is it Qt I am interested in using the same toolkit for a project . Comment : Do you mean the old UI or the new one currently in Beta Comment : To the closers - how is this not programming related Last time I programmed a GUI I used a GUI toolkit . I don t know many other uses for GUI toolkits in fact : Comment : I am curious on what gui toolkit Steam uses too . .. . Answer : Having had experience with the Source engine I know that Valve have an library called VGUI which they use for all their games and many of their tools when in game the library sits on top of the Source renderer when in tools it sits on top of the Windows API I believe . Although I can t answer the question with 100 certainty I suspect that this is what they use for Steam as well I seem to recall some Steam updates that mentioned VGUI I would be surprised if the new beta uses a different library . Even if it is not using VGUI given what I know of Valve I would think they will have written something else entirely in-house . So it is almost certainly proprietary and highly unlikely to ever be available for third party use unless you have the funds to buy a Source engine license .", "Question : What is the easiest cross-platform widget toolkit I m looking for one that minimally covers Windows OSX and Linux with a C or C++ interface . Comment : responding to EMK others - Ease of development is the priority and relatively rich set - eg a table widget is essential . c++ is fine . Comment : You might also want to refer to this similar question http : stackoverflow.com questions 610 gui-programming-apis if you are reading these answers . .. . Answer : I don t know of any I ve personally used with a C API but wxWidgets http : www.wxwidgets.org is C++ . It runs on Windows Linux and Mac OS X . And if you re looking for easy wxPython http : www.wxpython.org is a Python wrapper around wxWidgets and it is pretty easy to use .", "Question : I came to JRuby from MRI mainly for SWT and Java libraries for the use in desktop development . With some little experimentation I find that it is usable for my purposes . But it looks like java code written using equivalent ruby syntax . hello world JRuby+SWT http : i.stack.imgur.com vrJlI.png .. . .. . I looked around for any rubyish wrappers or DSLs on top of SWT . I found glimmer https : github.com AndyObtiva glimmer . But I am not sure about the status and it looks to be unmaintained . What are the other options do I have for SWT using JRuby And what is your experience with them Comment : Maybe see how Redcar does it : redcareditor.com http : redcareditor.com Comment : @echristopherson redcar is using swt gem . its a good start . thanks but i am not sure if that is the only thing around . i would prefer something more like glimmer . .. . Answer : Shoes 4 https : github.com shoes shoes4 wiki is the new version of the shoes DSL Domain Specific Language for writing GUI applications in ruby . The reference implementation for Shoes 4 is SWT Standard Widget Toolkit which runs on JRuby . By the feedback given to the answer of : What s the best easiest GUI Library for Ruby http : stackoverflow.com questions 260905 whats-the-best-easiest-gui-library-for-ruby we can say a great gem and has active development Comment : Thanks for info about Shoes 4 . Good to know community is keeping shoes alive n kicking . What do u mean by it uses SWT as reference impl Shoes uses SWT internally Comment : @ragu.pattabi according to the wiki https : github.com shoes shoes4 wiki : The reference implementation for Shoes 4 is SWT Standard Widget Toolkit which runs on JRuby . However we want there to be multiple backends for shoes -- maybe Qt maybe GTK -- you name it There have been different flavors of shoes before but Shoes 4 aims to establish a shared DSL and a shared spec suite so that the implementations can be more or less interchangeable . Note that in the project there are a variety of samples that should show that a given shoes implementation works as intended . Comment : @ragu.pttabi So by default if you use Shoe for your program you use SWT underneath . There are samples in the Shoe4 project and I suggest to read this page https : github.com shoes shoes . Thanks . Comment : That s awesome . Thanks .", "Question : So I am trying to implement Google Identity Toolkit for my website . Now what happens is when I try to login and put up my Email Id .. . .. . 1 . If its a gmail id it directly goes into google-login . 2 . If any other domain is used then we get options to sign-in using google microsoft facebook etc .. . .. . Link for reference : https : developers.google.com identity toolkit .. . .. . But my problem is people using facebook generally login with their gmail id and so on . So how to modify the toolkit so as to have all the options of signing in available along with the email-id text box just like it is in google idenitity toolkit v1 but I can t use it since it does not have facebook as an Identity provider Also I would like to have the widget for login appear without using the initial sign-in button.Any suggestions .. . Answer : There is a hacky recipe I ve been using for my preliminary website toolkit integration-testing : .. . .. . in the initial widget screen if you already have listed the email account you d like to use but with a different non-native IDP just select +Add account which leads you to the email-only input screen .. . in the email-only input screen enter a fake email like test@example.com which will not match any of the IDPs and thus will send you to the email + IDP selection screen .. . in the email + IDP selection screen just replace the fake email-address with the real one and select the desired provider . Warning : once a selection is done it appears to remains the prefered one I m not sure if it s really persistent and or it can be changed later on via Manage Account I saw a You may remove any except the first note in there still on my todo list to check out the details . But IMHO this awkward recipe is not suited for actual users in production except maybe as a workaround solution available via support faq for those insisting on not using the native IDP matching their email I m still wondering why would they do that .", "Question : What is the easiest cross-platform widget toolkit I m looking for one that minimally covers Windows OSX and Linux with a C or C++ interface . Comment : responding to EMK others - Ease of development is the priority and relatively rich set - eg a table widget is essential . c++ is fine . Comment : You might also want to refer to this similar question http : stackoverflow.com questions 610 gui-programming-apis if you are reading these answers . .. . Answer : I ve used both wxWidgets and QT professionally . Both are certainly capable of meeting your goals . Which one is easiest is hard to say . You don t tell us whether you re looking for easy to use or easy to learn . Qt is easier for big programs . WxWidgets is easier to learn . This for a large part due to the signal slot mechanism in QT which is a good but non-intuitive architecture for large applications . Both libraries are actually so good that I d recommend them for non-crossplatform programming too . Comment : I agree with this comment but the Qt docs are very good . The other good thing about Qt4 is the Designer application which makes a big difference . I haven t come across anything for Wx as good ." ] }
[ "yes-answer-long", "yes-answer-short" ]
user
UNK_RELATION
silkjs@server-side@104
silkjs -- silkjs is a command shell built on top of google s v8 javascript engine highly optimized for @placeholder applications .
{ "confidence": [ 48.19647979736328, 48.19647979736328, 46.99843215942383, 45.848270416259766, 45.49424743652344, 45.49424743652344, 44.91816329956055, 44.91816329956055, 42.90232849121094, 41.83392333984375, 41.83392333984375, 41.83392333984375, 40.86836242675781, 38.95551300048828, 38.841007232666016, 37.82638931274414, 36.90348434448242, 36.90348434448242, 36.90348434448242, 36.90348434448242, 36.90348434448242, 36.90348434448242, 36.90348434448242, 36.90348434448242, 36.90348434448242, 36.90348434448242, 34.2092170715332, 33.91056823730469, 33.88595199584961, 33.88595199584961, 30.893037796020508, 30.506206512451172, 27.513290405273438, 24.138172149658203, 21.489566802978516, 21.489566802978516, 21.226516723632812, 20.035728454589844, 20.035728454589844, 17.983699798583984, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 10.481973648071289, 10.481973648071289, 10.481973648071289 ], "content": [ "My goal here is not to bash SilkJS .", "SilkJS does not do GZIP or SSL .", "Perform the SilkJS OSX Lion Quick Install http : silkjs.org installing-silkjs .. . 2 .", "Load MySQL http : silkjs.org documentation MySQL from SilkJS REPL .. . .. . Download configure : .. . .. . Starting the SilkJS REPL I ran : .. . .. . How can I run a simple MySQL query from SilkJS under Lion", "It is an exploration of the reliability of SilkJS for more commercial projects .", "Load balancer in front of a farm of SilkJS servers .", "2 What resources are available regarding the security of using SilkJS as a web-server or other V8 based solutions", "It is an exploration of the reliability of SilkJS and V8 based server-side solutions for more enterprise projects .", "I have followed the instructions to install SilkJS from website http : www.silkjs.net installing-silkjs I have got following error while performing make command in instruction 5 .", "In other words : SilkJS m.connect 127.0.0.1 root test Works great now .", "I have been using SilkJS for a few hobby projects of mine .", "SilkJS should scale exactly like you would Apache+PHP .", "3 What pitfalls have you guys faced with using SilkJS or other V8 based solutions as a web-server and how if possible have you dealt with it", "I m trying to set headers for a simple HTTP request in SilkJS. . the request goes through fine but without my headers. .", "Does anyone know of a way to utilize prepared statements in SilkJS", "I think if you post any security or other issues to the SilkJS google group you will see a patch posted to the github repository in a timely manner .", "Fresh web install of silkjs on OSX Lion : .. . .. . Now to see it works : .. . .. . Note the console.dir shows a function .", "1 What enterprise projects if any do you guys know using SilkJS", "4 Does SilkJS handle horizontal-scaling well distributing load across multiple servers", "5 What resources are you aware of regarding the building of a website using SilkJS as the web-server besides the official website itself", "Whoever makes the best case for or against the use of SilkJS for use in an enterprise environment gets the correct answer vote .", "You can trivially implement Apache as a reverse proxy in front of SilkJS to provide those functions .", "Other than the SilkJS.net site you might look for various repos on github that have example programs using SilkJS .", "It says : .. . .. . The SilkJS servers are hosted on Amazon s EC2 cloud behind a load balancer for both speed and redundancy .", "I am trying to install SilkJS in mavericks I am getting the following error .", "Version of my XCode is 5.0.2 and I have downloaded latest version of silk from github https : github.com mschwartz SilkJS .", "http : www.sencha.com blog discover-music-with-sencha-touch-2 .. . .. . That article discusses how Modus Create built an application for NPR using Sencha Touch as the front end and SilkJS as the back end .", "I am looking into using SilkJS http : silkjs.org to build a web-application that utilizes MySQL .", "I d like to use MySQL from SilkJS http : silkjs.org under OSX Lion but can t find the exact steps to get it to work .", "I reinstalled SilkJS and connected as described above using m.connect localhost root test on a clean mysql install containing the test database .", "In response to those of you that might say to just use NodeJS NodeJS is asynchronous and I am looking to use synchronous logic SilkJS is synchronous .", "Both SilkJS hosts are fed by the NPR API via cURL and are responsible for trimming more than 300KB out of the data package bringing the average load to less than 200KB before being gzipped for transmission", "SEE : stackoverflow.com questions 4771984 http : stackoverflow.com questions 4771984 are-dynamic-mysql-queries-with-sql-escaping-just-as-secure-as-prepared-statement SilkJS does not currently provide prepared statements", "3 I am fully aware that most applications are i o bound and not cpu bound .", "Also I am aware that despite my desire to avoid NodeJS it does utilize V8 .", "In that regard I am open to security reviews and stability reviews for V8 on the server-side within the context of usage via NodeJS .", "As for what I mean by enterprise think e-commerce sites with several hundred thousand hits per month and or applications for which stability and up-time are essential and have hundred of thousands of users .", "There is a much higher level class for accessing curl that has a JavaScript flavor instead of a C style procedure style .", "The intent is to write JavaScript classes or interfaces that do the error checking and those would call the builtin methods .", "So far the performance is amazing and I absolutely love being able to use JavaScript for both the front-end and the back-end .", "The curl.setHeader method just returns undefined from what I can read in the documentation http : www.silkjs.net documentation builtin curl curl-setHeader it should return integer 0 for success or an error-code otherwise. . is undefined some kind of error-code", "Here s a simple test to reproduce the problem :", "The documentation is bad it s describing the format of setting a cookie NAME CONTENT rather than the expected way to set a header NAME : CONTENT .", "I noticed this when I went through the source code .", "The status flag is still undefined though but now I can see that the header is there in the http-request :", "Thanks Nik .", "See this page : .. . .. . http : silkjs.net documentation cURL .. . .. . You are using the lowest level routines for accessing curl .", "Anything that is builtin .", "method is low-level with absolutely no error checking .", "You can pass invalid values as parameters to these functions and your program will core dump crash .", "I followed the general instructions found here : .. . .. . 1 .", "Install MySQL http : stackoverflow.com a 7141542 54426 .. . 3 .", "The rest of the methods defined as properties of the function constructor .", "So you must construct a MySQL object : .. . .. . Now in order to connect you have to pass in host user passwd and db .", "Or if you re running in the httpd environment you set Config.mysql something like this : Config.mysql host : localhost or some other host running MySQL server user : someuser username to authenticate in MySQL server passwd : whatever password of username in MySQL server db : database name name of database in MySQL server to connect to .. . .. . Then the HTTP server will create a global SQL object available from request to request .", "This is automatic you can just use SQL.getDataRows SQL.getScalar and so on .", "No dice .", "I still got the apparent error followed by the segfault on invoking startTransaction .", "I m able to connect using the mysql5 client without issues : mysql5 -u root -p test", "I found the problem .", "I forgot to use 127.0.0.1 instead of localhost for the hostname .", "I am thinking about using it in some commercial projects but I want to do my due diligence on the viability of such a decision .", "There are some questions I have and would like some insight into .", "history of vulnerabilities average time to patch etc .", "Is your answer based on theoretical calculations and field-tested examples", "Before responding let me first eliminate 80 of the responses I will get with the following constraints : .. . .. . 1 No I will not use NodeJS .", "For both business and mental-health reasons asynchronous call-back frenzied programming is not something I will use .", "Do not attempt to convince me that I will get used to it and love it .", "It s not optimal for the type of projects I am working on .", "Yes you heard me - asynchronous is not perfect for everything .", "2 I am aware that synchronous programming can be simulated in NodeJS .", "No I am not interested in that either .", "I am not using NodeJS - get over it .", "As a result yes using PHP is usually fine .", "However there are certain projects for which cpu optimzations due yield a sizeable return on investment .", "No a company does not have to be Facebook for this to be true .", "This is not intended to be a discussion on why PHP is okay .", "3 Yes I know what Java is .", "No I am not interested on why that would be great if I wanted to reduce the cpu bottleneck .", "Once again this is not intended to be a discussion on why other languages are okay .", "4 Yes it is possible to have a best answer to this question .", "I absolutely love it and will continue using it when possible .", "However as a professional programmer I can t just use what I enjoy for every project .", "So let the insight commence. .", "Scale a MySQL backend like you already know how .", "I think it would be a risk to trust an implementation of either or both of those in the wild against all the various bots hacker or otherwise spiders browser custom perl programs etc .", "In fact you can shard your server-side application and use apache as a reverse proxy to connect to the proper shard based upon URL requested .", "Thank you very much", "A requirement of this project is that it supports using prepared statements for MySQL .", "In response to those of you that might say to just escape the input that is not a secure way to use MySQL .", "In response to those of you that might say to just get used to asynchronous because it s so much better no no it is not ." ] }
{ "confidence": [ 77.82173919677734, 63.39350891113281, 59.15636444091797, 54.535072326660156, 45.12282943725586, 44.4109992980957 ], "content": [ "Question : I have been using SilkJS for a few hobby projects of mine . So far the performance is amazing and I absolutely love being able to use JavaScript for both the front-end and the back-end . I am thinking about using it in some commercial projects but I want to do my due diligence on the viability of such a decision . There are some questions I have and would like some insight into . 1 What enterprise projects if any do you guys know using SilkJS 2 What resources are available regarding the security of using SilkJS as a web-server or other V8 based solutions history of vulnerabilities average time to patch etc . 3 What pitfalls have you guys faced with using SilkJS or other V8 based solutions as a web-server and how if possible have you dealt with it 4 Does SilkJS handle horizontal-scaling well distributing load across multiple servers Is your answer based on theoretical calculations and field-tested examples 5 What resources are you aware of regarding the building of a website using SilkJS as the web-server besides the official website itself Before responding let me first eliminate 80 of the responses I will get with the following constraints : .. . .. . 1 No I will not use NodeJS . For both business and mental-health reasons asynchronous call-back frenzied programming is not something I will use . Do not attempt to convince me that I will get used to it and love it . It s not optimal for the type of projects I am working on . Yes you heard me - asynchronous is not perfect for everything . 2 I am aware that synchronous programming can be simulated in NodeJS . No I am not interested in that either . I am not using NodeJS - get over it . 3 I am fully aware that most applications are i o bound and not cpu bound . As a result yes using PHP is usually fine . However there are certain projects for which cpu optimzations due yield a sizeable return on investment . No a company does not have to be Facebook for this to be true . This is not intended to be a discussion on why PHP is okay . It is an exploration of the reliability of SilkJS for more commercial projects . 3 Yes I know what Java is . No I am not interested on why that would be great if I wanted to reduce the cpu bottleneck . Once again this is not intended to be a discussion on why other languages are okay . It is an exploration of the reliability of SilkJS and V8 based server-side solutions for more enterprise projects . 4 Yes it is possible to have a best answer to this question . Whoever makes the best case for or against the use of SilkJS for use in an enterprise environment gets the correct answer vote . Also I am aware that despite my desire to avoid NodeJS it does utilize V8 . In that regard I am open to security reviews and stability reviews for V8 on the server-side within the context of usage via NodeJS . As for what I mean by enterprise think e-commerce sites with several hundred thousand hits per month and or applications for which stability and up-time are essential and have hundred of thousands of users . My goal here is not to bash SilkJS . I absolutely love it and will continue using it when possible . However as a professional programmer I can t just use what I enjoy for every project . So let the insight commence. . .. . Answer : SilkJS should scale exactly like you would Apache+PHP . Load balancer in front of a farm of SilkJS servers . Scale a MySQL backend like you already know how . SilkJS does not do GZIP or SSL . I think it would be a risk to trust an implementation of either or both of those in the wild against all the various bots hacker or otherwise spiders browser custom perl programs etc . You can trivially implement Apache as a reverse proxy in front of SilkJS to provide those functions . In fact you can shard your server-side application and use apache as a reverse proxy to connect to the proper shard based upon URL requested . I think if you post any security or other issues to the SilkJS google group you will see a patch posted to the github repository in a timely manner . Other than the SilkJS.net site you might look for various repos on github that have example programs using SilkJS . http : www.sencha.com blog discover-music-with-sencha-touch-2 .. . .. . That article discusses how Modus Create built an application for NPR using Sencha Touch as the front end and SilkJS as the back end . It says : .. . .. . The SilkJS servers are hosted on Amazon s EC2 cloud behind a load balancer for both speed and redundancy . Both SilkJS hosts are fed by the NPR API via cURL and are responsible for trimming more than 300KB out of the data package bringing the average load to less than 200KB before being gzipped for transmission Comment : Thank you very much", "Question : null .. . Answer : I am trying to install SilkJS in mavericks I am getting the following error . Version of my XCode is 5.0.2 and I have downloaded latest version of silk from github https : github.com mschwartz SilkJS . I have followed the instructions to install SilkJS from website http : www.silkjs.net installing-silkjs I have got following error while performing make command in instruction 5 .", "Question : I d like to use MySQL from SilkJS http : silkjs.org under OSX Lion but can t find the exact steps to get it to work . I followed the general instructions found here : .. . .. . 1 . Perform the SilkJS OSX Lion Quick Install http : silkjs.org installing-silkjs .. . 2 . Install MySQL http : stackoverflow.com a 7141542 54426 .. . 3 . Load MySQL http : silkjs.org documentation MySQL from SilkJS REPL .. . .. . Download configure : .. . .. . Starting the SilkJS REPL I ran : .. . .. . How can I run a simple MySQL query from SilkJS under Lion .. . Answer : Fresh web install of silkjs on OSX Lion : .. . .. . Now to see it works : .. . .. . Note the console.dir shows a function . The rest of the methods defined as properties of the function constructor . So you must construct a MySQL object : .. . .. . Now in order to connect you have to pass in host user passwd and db . Or if you re running in the httpd environment you set Config.mysql something like this : Config.mysql host : localhost or some other host running MySQL server user : someuser username to authenticate in MySQL server passwd : whatever password of username in MySQL server db : database name name of database in MySQL server to connect to .. . .. . Then the HTTP server will create a global SQL object available from request to request . This is automatic you can just use SQL.getDataRows SQL.getScalar and so on . Comment : No dice . I reinstalled SilkJS and connected as described above using m.connect localhost root test on a clean mysql install containing the test database . I still got the apparent error followed by the segfault on invoking startTransaction . I m able to connect using the mysql5 client without issues : mysql5 -u root -p test Comment : I found the problem . I forgot to use 127.0.0.1 instead of localhost for the hostname . In other words : SilkJS m.connect 127.0.0.1 root test Works great now .", "Question : null .. . Answer : I am looking into using SilkJS http : silkjs.org to build a web-application that utilizes MySQL . A requirement of this project is that it supports using prepared statements for MySQL . Does anyone know of a way to utilize prepared statements in SilkJS In response to those of you that might say to just escape the input that is not a secure way to use MySQL . In response to those of you that might say to just use NodeJS NodeJS is asynchronous and I am looking to use synchronous logic SilkJS is synchronous . In response to those of you that might say to just get used to asynchronous because it s so much better no no it is not . Comment : SEE : stackoverflow.com questions 4771984 http : stackoverflow.com questions 4771984 are-dynamic-mysql-queries-with-sql-escaping-just-as-secure-as-prepared-statement SilkJS does not currently provide prepared statements", "Question : I m trying to set headers for a simple HTTP request in SilkJS. . the request goes through fine but without my headers. . The curl.setHeader method just returns undefined from what I can read in the documentation http : www.silkjs.net documentation builtin curl curl-setHeader it should return integer 0 for success or an error-code otherwise. . is undefined some kind of error-code Here s a simple test to reproduce the problem : .. . Answer : Thanks Nik . See this page : .. . .. . http : silkjs.net documentation cURL .. . .. . You are using the lowest level routines for accessing curl . There is a much higher level class for accessing curl that has a JavaScript flavor instead of a C style procedure style . Anything that is builtin . method is low-level with absolutely no error checking . You can pass invalid values as parameters to these functions and your program will core dump crash . The intent is to write JavaScript classes or interfaces that do the error checking and those would call the builtin methods .", "Question : I m trying to set headers for a simple HTTP request in SilkJS. . the request goes through fine but without my headers. . The curl.setHeader method just returns undefined from what I can read in the documentation http : www.silkjs.net documentation builtin curl curl-setHeader it should return integer 0 for success or an error-code otherwise. . is undefined some kind of error-code Here s a simple test to reproduce the problem : .. . Answer : The documentation is bad it s describing the format of setting a cookie NAME CONTENT rather than the expected way to set a header NAME : CONTENT . I noticed this when I went through the source code . The status flag is still undefined though but now I can see that the header is there in the http-request :" ] }
[ "yes-answer-long", "yes-answer-short" ]
server-side
UNK_RELATION
xshell@sftp@59
xshell -- xshell is a terminal-emulator that supports ssh @placeholder telnet rlogin and serial .
{ "confidence": [ 55.30454635620117, 51.80469512939453, 51.496429443359375, 50.2293586730957, 48.4464111328125, 46.395896911621094, 46.395896911621094, 44.18943786621094, 38.07196807861328, 35.865509033203125, 24.16064453125, 16.695419311523438, 16.695419311523438, 16.695419311523438, 16.695419311523438, 16.695419311523438, 16.695419311523438, 16.695419311523438, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973 ], "content": [ "I m not familiar with XShell but searching for it it looks like it talks to a remote computer over SSH or Telnet .", "According to the response from technical support team of XSHELL it seems xshell does not support interactive shell currently .", "The script is executed in xshell 5 .", ".. . Xshell does not support interactive shell at this time .", "I just begin to use xshell in Windows 7 it looks good but how can I enter interactive console of iPython in xshell", "BTW I m using xshell 5 home school edition in Windows 7 .", "1 . how can I enter interactive console of iPython in xshell", "enter image description here http : i.stack.imgur.com iKwut.png .. . .. . xshell conf .. . .. .", "However in xshell I ve tried several command like ipython ipython console all of them would not bring me to the interactive console of ipython .", "tmux -2 http : i.stack.imgur.com 7Bp1w.png .. . .. . I use tmux -2 to create a tmux session but the xshell can t display the folder s color .", "I m ssh to localhost and yes I ve installed iPython already .", ".. . .. . In cmd of windows when I type ipython it will bring me to the interactive console automatically .", "If that s the case then IPython will need to be installed on the computer you connect to .", "@ThomasK Thank you .", "What do you see when you run ipython", "@ThomasK nothing just a blank like the command is out of response .", "In cmd of windows when I type ipython it will bring me to the interactive console automatically .", "We are working on it .", "I want it display the folder s color just like : .. . .. .", "enter image description here http : i.stack.imgur.com fICNR.png .. . .. . .. . .. . linux conf .. . .. .", "enter image description here http : i.stack.imgur.com eoKi5.png", "what i meant was that when opening tmux it opens a new shell using tmux settings .", "you should check if in the new shell the color settings are the same", "Using python through ansible I gathered a list of 7000 hostnames from DNS but I want to prompt the user to enter a hostname and in return the hostname will appear if present .", "But it should be optional whether to look at the whole list or just one specified hostname .", "Any idea how I can proceed", "One way you could do this would be using input python3 or raw input python2 or specifying hostname as an argument to your script .", "You could get output from all by not specifying any hostname .", "Assuming your hostnames are in a python list dnshostnames : .. . .. . input : .. . .. . or as argument to script : .. . .. . which would then be called as python myscript.py myhostname", "Using python through ansible .. . .. . I assume this means you use a dynamic inventory script http : docs.ansible.com ansible developing inventory.html .", "The not satisfying but common approach seen in most inventory scripts is to use environment-variables affect the behavior of inventory scripts since currently it is not possible to access any parameter passed to ansible .", "So if you call ansible like this : .. . .. . You could access the pattern as os.environ.get LIMIT PATTERN and use it to limit your result set .", "It s not advisable to shove all 7000 hosts to Ansible and later limit the result in ansible for example with a vars prompt http : docs.ansible.com ansible playbooks prompts.html or the pause module http : docs.ansible.com ansible pause module.html since it slows Ansible startup considerably down ." ] }
{ "confidence": [ 75.31219482421875, 53.972259521484375, 44.206031799316406, 38.245052337646484 ], "content": [ "Question : I just begin to use xshell in Windows 7 it looks good but how can I enter interactive console of iPython in xshell .. . .. . In cmd of windows when I type ipython it will bring me to the interactive console automatically . However in xshell I ve tried several command like ipython ipython console all of them would not bring me to the interactive console of ipython . BTW I m using xshell 5 home school edition in Windows 7 . Comment : I m not familiar with XShell but searching for it it looks like it talks to a remote computer over SSH or Telnet . If that s the case then IPython will need to be installed on the computer you connect to . Comment : @ThomasK Thank you . I m ssh to localhost and yes I ve installed iPython already . Comment : What do you see when you run ipython Comment : @ThomasK nothing just a blank like the command is out of response . .. . Answer : According to the response from technical support team of XSHELL it seems xshell does not support interactive shell currently . 1 . how can I enter interactive console of iPython in xshell In cmd of windows when I type ipython it will bring me to the interactive console automatically . However in xshell I ve tried several command like ipython ipython console all of them would not bring me to the interactive console of ipython . .. . Xshell does not support interactive shell at this time . We are working on it .", "Question : null .. . Answer : tmux -2 http : i.stack.imgur.com 7Bp1w.png .. . .. . I use tmux -2 to create a tmux session but the xshell can t display the folder s color . I want it display the folder s color just like : .. . .. . enter image description here http : i.stack.imgur.com fICNR.png .. . .. . .. . .. . linux conf .. . .. . enter image description here http : i.stack.imgur.com iKwut.png .. . .. . xshell conf .. . .. . enter image description here http : i.stack.imgur.com eoKi5.png Comment : what i meant was that when opening tmux it opens a new shell using tmux settings . you should check if in the new shell the color settings are the same", "Question : Using python through ansible I gathered a list of 7000 hostnames from DNS but I want to prompt the user to enter a hostname and in return the hostname will appear if present . But it should be optional whether to look at the whole list or just one specified hostname . The script is executed in xshell 5 . Any idea how I can proceed .. . Answer : One way you could do this would be using input python3 or raw input python2 or specifying hostname as an argument to your script . You could get output from all by not specifying any hostname . Assuming your hostnames are in a python list dnshostnames : .. . .. . input : .. . .. . or as argument to script : .. . .. . which would then be called as python myscript.py myhostname", "Question : Using python through ansible I gathered a list of 7000 hostnames from DNS but I want to prompt the user to enter a hostname and in return the hostname will appear if present . But it should be optional whether to look at the whole list or just one specified hostname . The script is executed in xshell 5 . Any idea how I can proceed .. . Answer : Using python through ansible .. . .. . I assume this means you use a dynamic inventory script http : docs.ansible.com ansible developing inventory.html . The not satisfying but common approach seen in most inventory scripts is to use environment-variables affect the behavior of inventory scripts since currently it is not possible to access any parameter passed to ansible . So if you call ansible like this : .. . .. . You could access the pattern as os.environ.get LIMIT PATTERN and use it to limit your result set . It s not advisable to shove all 7000 hosts to Ansible and later limit the result in ansible for example with a vars prompt http : docs.ansible.com ansible playbooks prompts.html or the pause module http : docs.ansible.com ansible pause module.html since it slows Ansible startup considerably down ." ] }
[ "yes-answer-long", "yes-answer-short" ]
sftp
UNK_RELATION
jqxgrid@toolkit@54
jqxgrid -- jqxgrid is a jquery widget from jqwidgets @placeholder that displays tabular data .
{ "confidence": [ 61.966697692871094, 56.978885650634766, 56.5311164855957, 52.64760208129883, 51.39838790893555, 48.573638916015625, 47.63421630859375, 47.38249969482422, 45.68035125732422, 45.611175537109375, 45.611175537109375, 45.52128219604492, 45.52128219604492, 45.110286712646484, 43.909027099609375, 43.74995803833008, 43.74995803833008, 43.74641036987305, 43.44816207885742, 43.44816207885742, 43.44816207885742, 43.44816207885742, 43.30409240722656, 43.02164840698242, 43.02164840698242, 43.02164840698242, 43.02164840698242, 43.02164840698242, 42.73392105102539, 42.57130432128906, 41.67683410644531, 41.25032424926758, 40.872589111328125, 40.65606689453125, 40.075218200683594, 40.075218200683594, 40.075218200683594, 39.934329986572266, 39.63575744628906, 39.63575744628906, 39.63575744628906, 39.63575744628906, 39.5816650390625, 38.735809326171875, 38.22456741333008, 38.16300582885742, 37.86443328857422, 37.86443328857422, 37.86443328857422, 37.86443328857422, 37.86443328857422, 37.84474182128906, 37.722999572753906, 37.673309326171875, 37.5064811706543, 36.98281478881836, 36.83888626098633, 36.68932342529297, 36.45323944091797, 36.15972137451172, 36.07341766357422, 35.87193298339844, 35.73515319824219, 35.73515319824219, 35.43207550048828, 35.27813720703125, 35.226837158203125, 35.07497787475586, 35.07497787475586, 35.07497787475586, 35.07497787475586, 35.07497787475586, 34.93170928955078, 33.303653717041016, 33.303653717041016, 33.303653717041016, 33.303653717041016, 32.12854766845703, 31.04754638671875, 30.720149993896484, 29.973331451416016, 29.880088806152344, 29.33725357055664, 28.50048065185547, 28.202007293701172, 27.149810791015625, 27.149810791015625, 27.026901245117188, 27.015411376953125, 24.583908081054688, 24.583908081054688, 23.67851448059082, 23.3786678314209, 23.025657653808594, 22.812583923339844, 22.582061767578125, 21.734355926513672, 21.63747787475586, 21.63747787475586, 21.42289924621582 ], "content": [ "I m using Jqxgrid of jqwidgets .", "I m using jqxgrid from jQWidgets to display some data .", "I am using the jqxGrid jqWidgets library with AngularJS .", "Does anybody have experience with jQWidgets jqxGrid and know how to get custom sorting on jqxGrid working with knockout observable arrays", "In JQWidgets Inside JqxGrid control I had added jqxdropdown .", "sort : function .. . if isFilterSortGrid .. . jqxgrid .jqxGrid updatebounddata sort .. . .. . .. . filter : function .. . if isFilterSortGrid .. . jqxgrid .jqxGrid updatebounddata filter .. . .. . .. . .. . .. . 3 .", "Selenium webdriver jqwidgets jqxgrid data grid with java : How to scroll and get the rows visible", "jqxGrid and jqGrid are different products .", "I am using the code at http : www.jqwidgets.com jquery-widgets-demo demos jqxgrid index.htm demos jqxgrid checkboxselection.htm .. . .. . as base and calling rowselect and rowunselect functions .", "In jqxGrid we do like .", "is it possible to make it with the jqxGrid options", "I am using JqxGrid with selectionmode : checkbox .", "I am working with jqxgrid and PHP .", "Unlike jqxGrid http : jqwidgets.com jquery-widgets-demo demos jqxgrid index.htm arctic demos jqxgrid rowselection.htm multiselect is not working in jqxTreeGrid and toggling the selected row to unselected on a click is also not working .", "I am refering the demo given here http : www.jqwidgets.com jquery-widgets-demo demos jqxgrid index.htm demos jqxgrid filtering.htm .", "It seems that you use jqxGrid and not jqgrid .", "jqxGrid has an AngularJS API version .", "I have a jqxGrid that is being shown using in jquery UI dialog .", "I am trying to use jqxGrid for managing my grid data .", "In which i want a some calculation based on that jqxgrid table data .", "When the user load a page firsttime then jqxgrid data and below calculations are correct .", "Basically jqxgrid provide this method for getting current table data .", "I have my jqxGrid in my page that load data from php backend service .", "in Html I provided a button to add a row in the jqxgrid .", "I am applying jqxgrid in my project .", "In the jqxgrid i have problem with filter functionality .", "I have a section below jqxgrid table .", "i am trying to make editable columns in jqxgrid .", "You can enable the Toolbar Feature of the Grid : jqxGrid Toolbar http : www.jqwidgets.com jquery-widgets-demo demos jqxgrid toolbar.htm light", "I am using a jqxGrid inside a jQuery-Smart-Wizard .", "I am using jqxgrid to get the grid data exported in excel .", "I have one jqxGrid that I want to export .", "Then if I filter the grid content it filter the grid but it shows this error : .. . .. . jqxgrid.js : 7 Uncaught Error : jqxGrid : The data is still loading .", "After digging lot in the jqxgrid documentation I found the answer that how to get filterable data from grid table .", "Cannot find a straight forward method in jqxGrid documentation .", "i m doing a filter sorting server-side with jqxGrid .", "I m a beginner on jqxGrid any suggestion is welcome", "The demo of spreadsheet http : www.jqwidgets.com jquery-widgets-demo demos jqxgrid spreadsheet.htm light is awesome looks like it is as strong as excel .", "I was trying to export JQxGrid in Excel its done by their documentation .", "What is the programmatic method determine the current sort order of a jqxGrid", "You may just use the jqxgrid API method getsortinformation .", "I have a jqxGrid and I need to populate it with some object .", "You write very little about how you use the jqxGrid local data source remote data source etc .", "With the next settings on the jqxGrid it is working : .. . .. . When I try to add the filter row to the jqxGrid I get the following error message and the filter is not working : .. . .. . Cannot read property 0 of undefined .. . .. . If I put the jqxGrid outside of the jQuery-Smart-Wizard steps then it is working with the filter also .", "when click on add-in this jqxwindow this time it is adding two rows to the jqxgrid with same data in both the records .", "You can try something like that : Cells Styling http : www.jqwidgets.com jquery-widgets-demo demos jqxgrid gridcellclass.htm arctic .", "Using the cellbeginedit property instead of the editable property when defining the columns in the jqxGrid :", "I have enabled filtering in the grid filtering functionality that is built-in with jqxgrid .", "jqxdropdown is inside the jqxgrid Here we need to do event bubbling .", "You can use the jqxgrid API method getrows : .. . .. . Gets all rows .", "I am facing an issue with date column sorting with jqxGrid plugin .", "jqxgrid have feature to show aggregates for some column that aggregates could be SUM COUNT or AVERAGE .. . .. . you can set the aggregates types when u set the column setting in jqxgrid declaration .", "I will try to explain : I have a page with a jqxGrid on this grid I m implementing Row details .", "Look a the API here : http : www.jqwidgets.com jquery-widgets-documentation documentation jqxgrid jquery-grid-api.htm", "You use jqxGrid thus you shoud remove jqgrid tag from your question .", "Jqxgrid has ready properties to do anything after the grid is initialized and the binding is complete so you can trigger begin update method : .. . .. . See also : .. . .. . Example http : jsfiddle.net e3m2L11t .. . .. . Jqxgrid ready properties http : jsfiddle.net jqwidgets Xr4LS", "You can check it here : jqwidgets.com jquery-widgets-documentation documentation http : www.jqwidgets.com jquery-widgets-documentation documentation jqxgrid jquery-grid-datasources.htm .", "The jqxGrid as far as I know does not accept Array of objects as source .", "I want to initially load a jqxGrid with a message eg.- This grid contains huge data .", "var ordersbyid .. . for var m 0 m orders.length m++ .. . var result1 filter.evaluate orders m deptCode .. . if result1 .. . ordersbyid.push orders m .. . .. . var secondaryDataFields .parseJSON name : UserId type : int name : TransactionName type : string name : tranDate type : string name : tranUser type : string .. . .. . var orderssource1 .. . datafields : innerRows .. . id : dept Code .. . localdata : ordersbyid .. . .. . var nestedGridAdapter new .jqx.dataAdapter orderssource1 .. . var secondaryGridColumn .parseJSON text : User Id datafield : UserId hidden : true text : Transaction Name datafield : TransactionName text : Transaction Date datafield : tranDate text : User datafield : tranUser .. . if grid null .. . grid.jqxGrid .. . source : nestedGridAdapter width : 780 height : 200 .. . .. . columns : innerRows .. . .. . .. . .. . creage jqxgrid .. . jqxgrid .jqxGrid clear .. . .. . jqxgrid .jqxGrid .. . .. . width : 850 .. . height : 365 .. . theme : nspl .. . .. . sortable : true .. . source : source .. . rowdetails : true .. . rowsheight : 35 .. . initrowdetails : initrowdetails .. . rowdetailstemplate : rowdetails : div id grid style margin : 10px div rowdetailsheight : 220 rowdetailshidden : true .. . ready : function .. . jqxgrid .jqxGrid showrowdetails 1 .. . .. . columns : text : User Id datafield : UserId hidden : true text : My Transactions datafield : TransactionName .. . .. . columns : rows .. . .. . .. . .. . .. . .. . .. . .. . else .. . alert Other report + ----- +result.keyValue .. . .. . .. . .. . .. . .. . .. . .. . error : function e .. . .. . alert ajax error + e.message .. . .. . .. . .. . script .. . title JQWidget JQX Nested Grip Implementation @ SibeeshPassion title .. . head .. . body class default .. . JQWidget JQX Nested Grip Implementation @ SibeeshPassion br .. . div id jqxgrid .. . div .. . -- script type text javascript src jqwidgets jqxcore.js script .. . script type text javascript src jqwidgets jqxdata.js script -- .. . script type text javascript src jqwidgets jqxbuttons.js script .. . script type text javascript src jqwidgets jqxscrollbar.js script .. . script type text javascript src jqwidgets jqxmenu.js script .. . script type text javascript src jqwidgets jqxgrid.js script .. . script type text javascript src jqwidgets jqxgrid.selection.js script .. . script type text javascript src jqwidgets jqxgrid.filter.js script .. . script type text javascript src jqwidgets jqxgrid.sort.js script .. . body .. . html", "to provide list filters in advanced filters http : jqwidgets.moucha-net.com demos jqxdatatable javascript-datatable-advanced-filtering.htm of jqxDataTable like we can do in jqxGrid like this one http : jqwidgets.moucha-net.com demos jqxgrid filterrowwithcustomitems.htm .", "u can learn about the localization here jqwidgets.com jquery-widgets-documentation documentation https : www.jqwidgets.com jquery-widgets-documentation documentation jqxgrid jquery-grid-localization.htm fill blank space in localizationobj.currencysymbol", "I want to get all the cell value s from a 7 columns JQXgrid table .", "How can i solve it dynamically loaded JQXgrid to get all the values from the table", "for simple example is like this : .. . .. . for custom aggregates u can learn from this link http : www.jqwidgets.com jquery-widgets-demo demos jqxgrid aggregates.htm arctic .. . .. . for complete documentation for aggregates please check the API s documentation from their documentation .", "In my web application i have an option to export jqxgrid data to .CSV format .", "Im am using jqxgrid export data functionality : .. . .. . But this causes the data to leave encrypted connection and be sent over unencrypted connection .", "Once window is opened I enter all the fields and then click on add which adds a record into the jqxgrid .", "doing the same third time now it adds 1 + 2 + 3 6 rows in jqxgrid .", "It is not the behavior of jqxgrid jqxwindow that it adds multiple rows in one call unless you provide multiple rows to add .", "How can someone use jqxGrid to create a table that has headers that not moving when scrolling and also auto row height", "But when user make some filterization in jqxgrid table below calculation does not change .", "I have a requirement where I select a jqxGrid Cell but I do some processing and delete some rows in the same grid .", "I have a JQXGrid which utilizes the jqxNumberInput to allow users to enter number and what not .", "I use jqxGrid and it is necessary to make search so that if you use some symbols like or", "I am trying to make a cell in a jqxGrid editable depending on the value of another column in the row with the name Editable .", "When someone defines the root and the record with jqxGrid to search an xml file are there any parameters to define the child level for the specific map", "It also works fine when I dont use custom sorting but just the sorting that is standard for jqxgrid .", "I am using jqWidgets 3.9.0 in combination with JQuery 1.7.1 .", "I have a large table and I am using jqxGrid http : kirsehirilan.net paging filter.asp .", "Demo http : jsfiddle.net jqwidgets 6HRU8 .", "The header is with Fixed position by default when the scrolling comes from jQWidgets Grid .", "I m making some kind of file-manager using JQXGrid and I need to have a fixed pinned row in the top of the grid with the link Go Back .", "If you want the func to work with both observable and non-observable data you need to use ko.unwrap on source.localdata unless jqxgrid does it for you and perhaps in your toString implementation if CaseViewModel has observable values .", "Better you post to JQWidgets forums .", "i trying to display jqxgrid inside jqxwindow.its working fine but grid content is coming from server so dynamically size of grid will change.I need to resize the jqxwindow according to grid size .. . .. . can anyone tell me how to it", "But i am having the error .. . Uncaught Error : jqxGrid : Missing references to the following module s : jqxgrid.edit.js but as you can see from below i have used the reference jqxgrid.edit.js i also have similar problem with columnresize true propery .", "It seems like jQWidgets problem to me .", "As reference of the example below I took the example angularjs-grid-with-jqx-settings.htm from jqwidgets 4.0.0 and added just the cellsrenderer .", "And if I load default state then generate this error .. . .. . I am using the version jQWidgets v3.8.2 .", "You can try it out in JqWidget s jsfiddle http : jsfiddle.net jqwidgets cBeq7 by setting the autorowheight to false .", "The data are loaded from backend php controller .", "jqWidgets needs to send your grid data to a server so this server can resend it to the user .", "I m new to jqxWidgets plugin and I got a problem with showing my json data to jqxgrid below is the json data from PHP file : .. . .. . Employee : 1 : employeeID : 00001 employeeDesc : Employee1 regionID : 3 areaID : 15 branchID : 0 sectionID : 0 2 : employeeID : 00002 employeeDesc : Employee2 regionID : 6 areaID : 27 branchID : 0 sectionID : 0 3 : employeeID : 00003 employeeDesc : Employee3 regionID : 4 areaID : 21 branchID : 0 sectionID : 0 .. . .. . The example above was a nested json data and I just want to show the employee part.. . Below is the code for jqxGrid initialization : .. . .. . There are other tables that I queried also but I will only show the Employee part below is the PHP file for outputting of json data : .. . .. . When I try to change the root to 1 it will show the data from the first row only and if I change it to Employee again all I can see on the console.log is the iteration on how many rows I got from the json data like on my example it will show from Name : 1 to Name : 3 only... .", "If you don t have the export file then you can export only through jQWidgets server .", "When you call exportdata it uses a file which is located on jqWidgets servers .", "Some help here https : www.jqwidgets.com jquery-widgets-documentation documentation jqxdataadapter jquery-data-adapter.htm .But the question remains .", "I asked on jQWidgets forum but seems like it ll take them sometimes it will probably take them a month or so to reply .", "jQWidgets http : www.jqwidgets.com released a new version 2 days ago so this seems to work now .", "It displays good in the grid but when I call .. . .. . currentId is AA01 without .... . so then when I use this id to query db in php it fails ." ] }
{ "confidence": [ 66.03033447265625, 65.38690948486328, 63.39658737182617, 62.90455627441406, 62.7634162902832, 61.76616287231445, 60.428096771240234, 58.63280487060547, 58.438899993896484, 58.40324783325195, 58.28569793701172, 58.243160247802734, 56.47599792480469, 56.42157745361328, 55.514312744140625, 54.579769134521484, 53.95390319824219, 53.24460983276367, 52.984703063964844, 52.351707458496094 ], "content": [ "Question : null .. . Answer : I was trying to export JQxGrid in Excel its done by their documentation . Demo http : jsfiddle.net jqwidgets 6HRU8 . Now i want to add some text in that file for example text could be .. . .. . 1 . Top 10 Employees .. . 2 . Top 3 Students .. . 3 . etc Comment : jqxGrid and jqGrid are different products . You use jqxGrid thus you shoud remove jqgrid tag from your question .", "Question : I am trying to make a cell in a jqxGrid editable depending on the value of another column in the row with the name Editable . This does not work . The cell is always editable regardless of the value of rowdata.Editable . Replacing return rowData.Editable with return false does not work either . I am using jqWidgets 3.9.0 in combination with JQuery 1.7.1 . Can anybody explain why this does not work and how to get it to work .. . Answer : I got this to work by doing the following : .. . .. . Replacing the url in the data source with localdata which references a local array called data . This array is filled using the original source url . Using the cellbeginedit property instead of the editable property when defining the columns in the jqxGrid :", "Question : null .. . Answer : I have searched alot but could not find a way . Is there anyway to provide list filters in advanced filters http : jqwidgets.moucha-net.com demos jqxdatatable javascript-datatable-advanced-filtering.htm of jqxDataTable like we can do in jqxGrid like this one http : jqwidgets.moucha-net.com demos jqxgrid filterrowwithcustomitems.htm . In jqxGrid we do like . Comment : Better you post to JQWidgets forums .", "Question : Selenium webdriver jqwidgets jqxgrid data grid with java : How to scroll and get the rows visible I want to get all the cell value s from a 7 columns JQXgrid table . This is a dynamic loaded data grid with row count will be updated when page gets refreshed . But more than 6 row s will not be visible at a time . User needs to scroll down to get the next 6 rows . Problem is : Selenium cannot read the data which is not visible . We can find the xpath of the vertical scroller to go down to get the next 6 rows to make it visible . How can i solve it dynamically loaded JQXgrid to get all the values from the table .. . .. . Thanks in advance .. . Answer : If it is similar to an ajax grid this link might solve your problem . http : stackoverflow.com a 26797156 4193730 http : stackoverflow.com a 26797156 4193730 .. . .. . Here a working example of scrolling and finding an element inside a grid is given .", "Question : I am using a jqxGrid inside a jQuery-Smart-Wizard . With the next settings on the jqxGrid it is working : .. . .. . When I try to add the filter row to the jqxGrid I get the following error message and the filter is not working : .. . .. . Cannot read property 0 of undefined .. . .. . If I put the jqxGrid outside of the jQuery-Smart-Wizard steps then it is working with the filter also . .. . Answer : Check whether all data fields in the Grid s source object has type set as this is mandatory . Comment : The source object is simply an array of objects but when I copy the same grid outside of the jQuery-Smart-Wizard steps it is working without any error message . Comment : The jqxGrid as far as I know does not accept Array of objects as source . It supports data-binding to jqxDataAdapter only . Comment : You can check it in this document : jqwidgets.com jquery-widgets-documentation documentation http : www.jqwidgets.com jquery-widgets-documentation documentation angularjs angularjs.htm But as I said it is working outside of the jQuery-Smart-Wizard so the data displayed and the filter working as well Comment : You can check it here : jqwidgets.com jquery-widgets-documentation documentation http : www.jqwidgets.com jquery-widgets-documentation documentation jqxgrid jquery-grid-datasources.htm . This page shows that the source should be dataAdapter . So I guess the other approach tries to do something like that but in general the widget expects dataAdapter always .", "Question : Im am using jqxgrid export data functionality : .. . .. . But this causes the data to leave encrypted connection and be sent over unencrypted connection . And third party can easily read the data . Since it may be sensitive information is it possible for me to prevent it from leaving secure connection while still using the feature .. . Answer : jqWidgets needs to send your grid data to a server so this server can resend it to the user . This is how the user get the file like a download you can t do that only on client-side . When you call exportdata it uses a file which is located on jqWidgets servers . You have to add the URL of your own server to make sure it won t send data to a third party . Look a the API here : http : www.jqwidgets.com jquery-widgets-documentation documentation jqxgrid jquery-grid-api.htm Comment : But then dos that not require me to have the actual exporting mechanism in my server How do I get the file for that Comment : Yes you need a file on your server to take the data from javascript and repush it to the user .", "Question : null .. . Answer : I am using the jqxGrid jqWidgets library with AngularJS . jqxGrid has an AngularJS API version . The UI design requires the external and no the header-row-filter embedded in the grid filterable property I am looking for add an external filter dropdownlist to this grid but so far I have not found an example with AngularJS and external filters . If somebody can point me in the right direction I will be grateful . Thanks in advance and here two snippets of the code .. . .. . HTML .. . .. . JavaScript AngularJS configuration", "Question : null .. . Answer : Jqx widgets - unable to close parent row in jqx nested grid .. . .. . Hi all i am using jqx nested grid . Once i expand the parent row it become hidden and i am unable to close the child row . Any help on this would be appreciable . Find my code below . DOCTYPE html .. . html .. . head .. . meta name viewport content width device-width .. . link href jqwidgets styles jqx.base.css rel stylesheet .. . -- script type text javascript src jqwidgets jquery-1.9.1.js script -- .. . script type text javascript src js jquery-1.10.2.js script .. . script type text javascript src . . js jqx-all.js script .. . .. . script type text javascript src js jqxcore.js script .. . script type text javascript src js jqxdata.js script .. . .. . link rel stylesheet href . . css jquery-ui.css type text css .. . .. . .. . .. . .. . .. . link rel stylesheet type text css href . . css divpopup.css .. . link rel stylesheet href . . css jqx.energyblue.css type text css .. . link rel stylesheet type text css href . . css admin.css .. . link rel stylesheet type text css href . . css admindiv.css .. . link rel stylesheet type text css href . . css reportDiv.css .. . link rel stylesheet href . . css jquery-ui.css type text css .. . .. . .. . script type text javascript src . . js jquery-1.10.2.js script .. . script type text javascript src . . js jquery-ui.js script .. . script type text javascript src . . js jqx-all.js script .. . script type text javascript src . . js jqXGridNestedReport.js script .. . script type text javascript src . . js charts.js script .. . .. . script type text javascript src . . js jqxdraw.js script .. . script type text javascript src . . js jqxchart.core.js script .. . script type text javascript src . . js script.js script .. . script type text javascript src . . js excelReport.js script .. . .. . script type text javascript .. . var rows .. . var main .. . var headerArr .. . .. . var innerRows .. . var innerHeader .. . .. . var resValue .. . var reportName .. . var fil .. . var fromDate toDate empId empName dept shiftName category designation userType deptName .. . var gridData .. . var keyValue .. . var reportStatus .. . var comboData productionReport .. . var multiExcelData .. . var ctx window.location.toString .split .. . var rootURL ctx 0 + +ctx 1 + +ctx 2 + +ctx 3 + rest .. . .. . document .ready function .. . .. . .. . .. . .ajax .. . tradional : true .. . type : POST .. . url : rootURL+ reports filter .. . data : .. . option : comboData .. . fromDate : fromDate .. . toDate : c .. . empId : empId .. . empName : empName .. . dept : dept .. . shiftName : shiftName .. . category : category .. . continuousDays : .. . loc : .. . designation : designation .. . .. . dataType : json .. . success : function result .. . alert JSON.stringify result.innerList .. . .. . multiExcelData .. . if result.outerList null result.outerList 0 .. . alert outerList .. . .. . if typeof result.outerList.keyValue undefined .. . keyValue result.outerList.keyValue .. . headerArr Object.keys result.outerList.obj 0 .. . else .. . headerArr Object.keys result.outerList 0 .. . .. . rows .. . var data1 headerArr .. . .. . for var i 0 i data1.length i++ .. . var obj .. . obj text data1 i .toUpperCase .. . obj datafield data1 i .. . obj width 150 .. . obj columntype textbox .. . obj filtertype input .. . rows.push obj .. . obj null .. . .. . .. . .. . .. . .. . .. . if typeof result.innerList.keyValue undefined .. . keyValue result.innerList.keyValue .. . innerHeader Object.keys result.innerList.obj 0 .. . else .. . innerHeader Object.keys result.innerList 0 .. . .. . innerRows .. . var data2 innerHeader .. . .. . for var i 0 i data2.length i++ .. . var obj .. . obj text data2 i .toUpperCase .. . obj datafield data2 i .. . obj width 170 .. . obj columntype textbox .. . obj filtertype input .. . innerRows.push obj .. . obj null .. . .. . .. . .. . .. . .. . .. . var tdData result.outerList .. . var source .. . .. . datafields : rows .. . id : dept Code .. . datatype : json .. . async : false .. . localdata : tdData .. . .. . .. . .. . var orderdetailsurl result.innerList .. . alert innerList +JSON.stringify orderdetailsurl .. . var ordersSource .. . .. . datafields : innerRows .. . datatype : json .. . localdata : orderdetailsurl .. . async : false .. . .. . var ordersDataAdapter new .jqx.dataAdapter ordersSource autoBind : true .. . orders ordersDataAdapter.records .. . var nestedGrids new Array .. . create nested grid . var initrowdetails function index parentElement gridElement record .. . var id record.uid.toString .. . var id 9709 .. . .. . var grid parentElement .children 0 .. . nestedGrids index grid .. . var filtergroup new .jqx.filter .. . var filter or-operator 1 .. . var filtervalue id .. . var filtercondition equal .. . var filter filtergroup.createfilter stringfilter filtervalue filtercondition .. . fill the orders depending on the id . var ordersbyid .. . for var m 0 m orders.length m++ .. . var result1 filter.evaluate orders m deptCode .. . if result1 .. . ordersbyid.push orders m .. . .. . var secondaryDataFields .parseJSON name : UserId type : int name : TransactionName type : string name : tranDate type : string name : tranUser type : string .. . .. . var orderssource1 .. . datafields : innerRows .. . id : dept Code .. . localdata : ordersbyid .. . .. . var nestedGridAdapter new .jqx.dataAdapter orderssource1 .. . var secondaryGridColumn .parseJSON text : User Id datafield : UserId hidden : true text : Transaction Name datafield : TransactionName text : Transaction Date datafield : tranDate text : User datafield : tranUser .. . if grid null .. . grid.jqxGrid .. . source : nestedGridAdapter width : 780 height : 200 .. . .. . columns : innerRows .. . .. . .. . .. . creage jqxgrid .. . jqxgrid .jqxGrid clear .. . .. . jqxgrid .jqxGrid .. . .. . width : 850 .. . height : 365 .. . theme : nspl .. . .. . sortable : true .. . source : source .. . rowdetails : true .. . rowsheight : 35 .. . initrowdetails : initrowdetails .. . rowdetailstemplate : rowdetails : div id grid style margin : 10px div rowdetailsheight : 220 rowdetailshidden : true .. . ready : function .. . jqxgrid .jqxGrid showrowdetails 1 .. . .. . columns : text : User Id datafield : UserId hidden : true text : My Transactions datafield : TransactionName .. . .. . columns : rows .. . .. . .. . .. . .. . .. . .. . .. . else .. . alert Other report + ----- +result.keyValue .. . .. . .. . .. . .. . .. . .. . .. . error : function e .. . .. . alert ajax error + e.message .. . .. . .. . .. . script .. . title JQWidget JQX Nested Grip Implementation @ SibeeshPassion title .. . head .. . body class default .. . JQWidget JQX Nested Grip Implementation @ SibeeshPassion br .. . div id jqxgrid .. . div .. . -- script type text javascript src jqwidgets jqxcore.js script .. . script type text javascript src jqwidgets jqxdata.js script -- .. . script type text javascript src jqwidgets jqxbuttons.js script .. . script type text javascript src jqwidgets jqxscrollbar.js script .. . script type text javascript src jqwidgets jqxmenu.js script .. . script type text javascript src jqwidgets jqxgrid.js script .. . script type text javascript src jqwidgets jqxgrid.selection.js script .. . script type text javascript src jqwidgets jqxgrid.filter.js script .. . script type text javascript src jqwidgets jqxgrid.sort.js script .. . body .. . html Comment : This example is too complex and you seem to be asking someone to debug your code for you . My recommendation is that you use jsfiddle.net https : jsfiddle.net to show your code but simplify it as much as you can to still reproduce the problem . Comment : I am not asking to debug it my friend . I just want to show the full code thats y i post it like that . Anyhow thanks for your suggestion and i ll try in that way .", "Question : null .. . Answer : Does anybody have experience with jQWidgets jqxGrid and know how to get custom sorting on jqxGrid working with knockout observable arrays When I try with a regular array custom sorting works fine . But when I try with knockout observablearray i just get errors like Uncaught TypeError : Cannot convert object to primitive value . This hits on my sortdata.sort . But when I take a regular array it works fine . It also works fine when I dont use custom sorting but just the sorting that is standard for jqxgrid . Any tips .. . .. . Comment : It looks like you might need to dereference the observables . If you want the func to work with both observable and non-observable data you need to use ko.unwrap on source.localdata unless jqxgrid does it for you and perhaps in your toString implementation if CaseViewModel has observable values . If you are fine with it being only for observables you probably need to use the function syntax to get the values rather than the observables .", "Question : I am trying to make a cell in a jqxGrid editable depending on the value of another column in the row with the name Editable . This does not work . The cell is always editable regardless of the value of rowdata.Editable . Replacing return rowData.Editable with return false does not work either . I am using jqWidgets 3.9.0 in combination with JQuery 1.7.1 . Can anybody explain why this does not work and how to get it to work .. . Answer : I was using the cellclick to do this kind of control .", "Question : I m using Jqxgrid of jqwidgets . I have taken a dropdown list in a grid . I want to show dropdown list in editable mode by default on page load . please have a look this screen shot where first dropdown showing as Please Choose it s coming on click on grid cell how to bind it default . enter image description here http : i.stack.imgur.com 8wtCp.png .. . .. . Below is the code . Please help me . .. . Answer : Jqxgrid has ready properties to do anything after the grid is initialized and the binding is complete so you can trigger begin update method : .. . .. . See also : .. . .. . Example http : jsfiddle.net e3m2L11t .. . .. . Jqxgrid ready properties http : jsfiddle.net jqwidgets Xr4LS Comment : Thanks Rong for reply It s working for single row How can I applied for all rows please have a look jsfiddle.net e3m2L11t 6 http : jsfiddle.net e3m2L11t 6 Comment : Ok view this trick : jsfiddle.net 2zrwpfxb http : jsfiddle.net 2zrwpfxb Comment : aah. . Thank you Rong its fine.. . :", "Question : I have one jqxGrid that I want to export . By default jqWidget uses it own server url instead of that I want to use my url.But for custom-url export is not workking . code Comment : It seems that you use jqxGrid and not jqgrid . You should remove wrong tab from your question . Comment : @Oleg thanks..updated .. . Answer : The url should point to where the export file is hosted . Its definitely wrong to write window.location.href . If you don t have the export file then you can export only through jQWidgets server . Comment : But export file will be generated so that is why I have given same url Comment : the parameter is called serverURL so it should point to the export s PHP file not to a file generated and based on your data", "Question : I am working with jqxgrid and PHP . In the jqxgrid i have problem with filter functionality . I want to know that is there any function that show me what filterting options i selected for filtering data . I have a section below jqxgrid table . In which i want a some calculation based on that jqxgrid table data . When the user load a page firsttime then jqxgrid data and below calculations are correct . But when user make some filterization in jqxgrid table below calculation does not change . I want what filter options choose by user for filtering operation . Is there any way to do that .. . Answer : After digging lot in the jqxgrid documentation I found the answer that how to get filterable data from grid table . Basically jqxgrid provide this method for getting current table data . You can use this method in your filter functionality and will get the filterable result . Now create a showResults function in like this way .", "Question : null .. . Answer : I am applying jqxgrid in my project . And I am saving the states in the database . In one state I choose grouping and save state in database and next I apply filtering on grid and save this state with different name . When I load state from one state to another it gives me error . And if I load default state then generate this error .. . .. . I am using the version jQWidgets v3.8.2 .", "Question : How can someone use jqxGrid to create a table that has headers that not moving when scrolling and also auto row height I did the following but the result is an auto row height but a header that moves when scrolling . .. . Answer : You can activate the scrollbars within the grid so that the headers remain visible as you scroll down the content . Do this by setting autoheight to false and specifying a fixed height . You can try it out in JqWidget s jsfiddle http : jsfiddle.net jqwidgets cBeq7 by setting the autorowheight to false .", "Question : null .. . Answer : I am using jqxTreeGid http : jqwidgets.com jquery-widgets-demo demos jqxtreegrid index.htm demos jqxtreegrid javascript-tree-grid-binding-to-json.htm . Unlike jqxGrid http : jqwidgets.com jquery-widgets-demo demos jqxgrid index.htm arctic demos jqxgrid rowselection.htm multiselect is not working in jqxTreeGrid and toggling the selected row to unselected on a click is also not working . Any clues on this please", "Question : How can someone use jqxGrid to create a table that has headers that not moving when scrolling and also auto row height I did the following but the result is an auto row height but a header that moves when scrolling . .. . Answer : autoheight : false pageable : true is your solution . The header is with Fixed position by default when the scrolling comes from jQWidgets Grid . If autoheight is true jqxGrid s vertical-scrolling is disabled because Grid s height is the sum of all rows height so if there is a scrollbar it is the browser s scrollbar and your Grid s height could be 5000px .", "Question : I m using jqxgrid from jQWidgets to display some data . When I export my grid data to PDF using Firefox if the data in a cell is too long it will ram all over next couple columns like in this screenshot http : i.stack.imgur.com 5HUlZ.png . This doesn t happen in Chrome or Safari though . I asked on jQWidgets forum but seems like it ll take them sometimes it will probably take them a month or so to reply . I can even replicate this behavior using their jsfiddle demo here http : jsfiddle.net 3cymb54r 6 .. . .. . .. . .. . by copying Caffe Espresso Caffe and pasting it a couple times to produce a long string then export to PDF using Firefox browser . It seems like jQWidgets problem to me . But I m wondering if anyone encounter this too is there any work around for this .. . Answer : jQWidgets http : www.jqwidgets.com released a new version 2 days ago so this seems to work now . Hope this information help you . Comment : They did include this bug to the fix in v4.0.0 . Thanks : D", "Question : I am using JqxGrid with selectionmode : checkbox . I am able to alert when the checkbox is checked and unchecked using the rowselect and rowunselect functions . Problem is I need to only allow the user 4 selections . Hence when he checks the 5th checkbox I show him an alert and uncheck this checkbox . I am able to do everything except : uncheck this last checked checkbox .. . .. . Since this is not a real checkbox not sure what to check . I am using the code at http : www.jqwidgets.com jquery-widgets-demo demos jqxgrid index.htm demos jqxgrid checkboxselection.htm .. . .. . as base and calling rowselect and rowunselect functions . .. . Answer : You should be able to cancel the select by calling rowunselect using the rowId from the row select event :", "Question : I m making some kind of file-manager using JQXGrid and I need to have a fixed pinned row in the top of the grid with the link Go Back . Is there a way to insert a fixed row not affected by sorting or to move aggregates to the top under the header thanks .. . Answer : You can enable the Toolbar Feature of the Grid : jqxGrid Toolbar http : www.jqwidgets.com jquery-widgets-demo demos jqxgrid toolbar.htm light Comment : Yes but it is not under the header it s on top of it ." ] }
[ "yes-answer-long", "yes-answer-short" ]
toolkit
UNK_RELATION
fuelphp-orm@fuelphp@69
fuelphp-orm -- fuelphp s orm is an object relational mapper for the @placeholder framework modeled after the active record pattern .
{ "confidence": [ 65.93185424804688, 60.04985046386719, 60.04985046386719, 58.07499694824219, 52.661231994628906, 52.661231994628906, 52.661231994628906, 44.24079895019531, 43.24584197998047, 43.24584197998047, 43.074440002441406, 43.074440002441406, 42.56526184082031, 41.47264099121094, 38.77872848510742, 38.77872848510742, 38.77872848510742, 38.77872848510742, 37.005523681640625, 36.84803771972656, 36.52468490600586, 36.044761657714844, 34.88029479980469, 34.88029479980469, 34.355777740478516, 34.355777740478516, 34.355777740478516, 34.355777740478516, 33.89140701293945, 33.20850372314453, 32.98261642456055, 32.98261642456055, 32.91828536987305, 32.82866668701172, 32.58257293701172, 32.387298583984375, 32.146324157714844, 31.43427085876465, 31.43427085876465, 31.43427085876465, 31.43427085876465, 31.43427085876465, 31.43427085876465, 31.43427085876465, 31.43427085876465, 31.43427085876465, 31.43427085876465, 30.45734405517578, 29.6462459564209, 29.6462459564209, 29.6462459564209, 29.084182739257812, 27.96434783935547, 27.873043060302734, 27.643592834472656, 27.643592834472656, 27.643592834472656, 27.643592834472656, 27.535837173461914, 27.535837173461914, 27.535837173461914, 25.46932029724121, 25.46932029724121, 25.33504867553711, 24.104841232299805, 23.997493743896484, 23.745159149169922, 23.444067001342773, 23.40723419189453, 23.279159545898438, 22.419645309448242, 21.812747955322266, 21.487287521362305, 21.252164840698242, 21.20467758178711, 21.20467758178711, 21.20467758178711, 21.20467758178711, 21.20467758178711, 20.734193801879883, 20.734193801879883, 20.734193801879883, 20.734193801879883, 20.734193801879883, 20.11074447631836, 20.078393936157227, 19.63511848449707, 19.29874038696289, 18.074981689453125, 17.55177116394043, 17.55177116394043, 17.55177116394043, 17.55177116394043, 17.55177116394043, 17.55177116394043, 17.55177116394043, 17.55177116394043, 17.55177116394043, 17.55177116394043 ], "content": [ "Using fuelphp is there a way to modify an existing ORM Model to convert it to ORM Model Temporal", "FuelPHP ORM needs Primary key to get ALL results .", "FuelPHP Observer UpdatedAt http : fuelphp.com docs packages orm observers included.html os updated", "When i use FuelPHP ORM to get ALL results using find all it s return only one record .", "There is plenty of documentation about relations in the main fuelphp docs http : fuelphp.com docs packages orm relations intro.html .", "I am using ORM in FuelPHP to fetch some data on a table view I created in my data base .", "Is there anyway to add two of the same type of observer to a Model in FuelPHP http : fuelphp.com ORM .", "I am using FuelPHP and MySQL and would like to use the ORM to query with a case insensitive like query against a column with a case sensitive collation .", "Thanks to Harro over at the FuelPHP Forums for answering this one : .. . .. . Are you using MySQL", "Also it FuelPHP should be able to get that info from the model isn t it", "Trying to set conditions for has-many orm on fuelphp but this is not working I m just having all the related invitations back when I try to get only the ongoing ones here is how the has-many look like any suggestions", "How can execute this query using orm in fuelPHP : .. . .. . I dont know how to implement this part and c 1 or d 2 or e 3 .. . .. . Just stuck in : .. . .. . Is there any way to accomplish this", "http : i.stack.imgur.com mSPdk.png .. . .. . SQL Pivot Statement : .. . .. . Question : .. . .. . Can I execute the above statement then access the columns through the normal ORM methods such as .. . .. . .. . .. . Also I looked at FuelPHP EAV http : fuelphp.com docs packages orm eav.html and it looks like it might be what I need.. . but I couldn t get it working .", "How can I get the desired behavior in FuelPHP despite that constraint", "I m new to PHP frameworks and to start my venture I went to try FuelPHP .", "I want to order by LOWER title rather then just title however I am having issues making this work in FuelPHP .", "I tried changing options in default fuelphp tables for user-roles user role permissions and so on but to no avail .", "I am new developing fuelPHP and I have 4 questions about it : .. . .. . 1 .", "I start using Fuelphp v1.7.3 but if I want to get all data from my mysql table nothing happens .", "That is not going to be produced the ORM uses the array index value to store the PK of the related record so it can be found back .", "By default in the orm this is simply a column called id .", "In Yii in example you can build a model using CActiveRecord if linked to a table or CFormModel to build Contact forms in example how this is done with fuelPHP model crud", "I think FuelPHP doesn t support this feature but I would like to know the best way to do it... .", "If FuelPHP wraps the column names in backticks in the generated SQL then the expression won t work.. . the generated SQL will be WHERE lower name LIKE .", "It does exactly what I need but not sure how to integrate with ORM .", "If you are using the ORM you should not be manually constructing your queries like that .", "You should not be specifying joins when building a query with the orm .", "Which ORM model are you using and do you have a compound PK", "You should read the ORM documentation http : fuelphp.com dev-docs packages orm intro.html were you ll find a similar example on many-to-many relations http : fuelphp.com dev-docs packages orm relations many many.html among other things .", "Instead of mucking about with observers seeing as you want an ORM-centric approach you can fetch the parent update its updated at then commit both objects to the DB via the ORM .", "From the FuelPHP forum thread http : fuelphp.com forums discussion comment 15462 Harro answered : .. . .. . You can not have a column which is at the same time FK and PK .", "You can also make use of it in this manner or take a look at this link for more light .. . Query builder Where - Classes FuelPHP documentation http : fuelphp.com docs classes database qb where.html", "I am running the command below on FuelPHP 1.7.3 in development mode : .. . .. . And it outputs the below as expected : .. . .. . However when I run the migrate command the table isn t being created with the custom created updated deleted column names and when you delete the record via front-end it hard deletes the record .", "Returns : .. . .. . I want the relations as arrays : .. . .. . This happens because the ORM returns related result arrays with keys corresponding to the record s PKEY and JSON interprets this as an Object .", "I have a many-to-many relationship created using fuelphp s ORM .", "Oh for what it s worth I m using the current stable version of FuelPHP 1.7.2", "The workaround is to use the Custom SQL query feature available in FuelPHP to bypass the syntax limitations and get a SQL query-string passed to the database .", "Question .. . .. . Is it possible to create a custom SQL query and treat its results like you treat tables with FuelPHPs ORM", "I also had a good read in the docs http : fuelphp.com docs packages orm crud.html find chaining .", "I think its got more to do with how my ORM relations have been setup .", "The issue here is that indeed as @vee says the ORM expects you to have a primary-key assigned to your table .", "The simplest thing would be to just add an auto-incrementing ID column as this is the default for orm models .", ".. . There is nothing wrong with you ORM code as far as I can see but I never use array notation .", "example : class Model Article extends Orm Model protected static primary-key array aid", "I checked the documentation for the observers but I cannot find how to do that in a ORM way .", "No the current ORM code does not allow you to add multiple observers of the same class .", "Basic code samples can be found in the documentation : http : fuelphp.com docs packages orm relations has one.html has one", "How can I use a core classe in my ORM Model", "I ve been banging my head with this ORM error : Fuel Core FuelException Error : Primary key on model Model CustomValue cannot be changed .", "Please see the first paragraph under the code sample in the documentation http : fuelphp.com dev-docs packages orm observers included.html os updated .", "Now I will answer my question : .. . .. . You just need to save the field in the student except to the user id it will be automatically save when you join it using orm .", "As far as how to get a predicate of the form shown by MarcB or the form demonstrated in my previous comment via FuelPHP.. . that may only be available using a Custom SQL query .", "It turned out to be a problem with the current release of Fuel s ORM version 1.7 .", "I have ORM autoloaded my model has defined table name primary-key and also as properties all my columns from that table .", "As long as your child model has a relation to the parent model you can add the relation name into the relations property and the ORM will do the rest for you when you save the model .", "I followed the instruction that is given here http : fuelphp.com forums discussion 12006 orm-how-to-use-view-tables Item 3 but I m getting an error as seen on the title above .", "Unfortunately we can t change it in v1 as it would create a huge backwards compatibility issue as much as I would like to be able to make the v1 orm more sensible .", "In your controller you can simply do .. . .. . instead of .. . .. . Providing you have your relations set up correctly which it appears that you do the ORM will automatically populate the key for you on save .", "modules users has these fields : - id - user id - module id - actual state - previous state - updated at .. . .. . I need two ORM Models : Model User and Model Modules .", "And I d usually do what @spencer7593 suggested but I m using an ORM not pure sql", "I am trying to get FuelPHP s orm to use a compound key when using the related method .", "In short : you can t unless you create a hook in Query : hydrate https : github.com fuel orm blob 1.7 develop classes query.php L1083 or shadowing the Query class with some implementation that returns the very same results except for hydrate .", "I would have used which should generate the same SQL : .. . .. . pages Model pages : : query - order by title asc - get .. . .. . The full thread can be found here for anyone running into the same issue : .. . .. . http : fuelphp.com forums discussion 13226 fuelphp039s-orm-isn039t-ordering-items-correctly", "For instance gimme student record with id 1 could be as simple as student : new student 1 and after that you have access to the student s name address etc .", "So the one result you get is that last record in your query resultset .", "What worked for me was to update the ORM to a more recent development version 60cc4eb576 https : github.com fuel orm tree 60cc4eb576c5378ce1c517ace672ecaf21cc140a on the ORM s 1.8 develop branch and then to set the order by on the many-to-many relation like this : .. . .. . This is a combination of approaches 2 and 3 above and not quite the syntax that the documentation http : fuelphp.com docs packages orm relations many many.html many many currently suggests but seems to work as expected desired for both eager- and lazy-loading .", "For example in my orm model I d like to do something like this : .. . .. . The problem here is that when I search for name john the expression will not match rows where the column includes John and vice-versa .", "It would be good if the framework would allow this like CakePHP does IIRC .", "For example I would normally use a relation like this in my orm model : .. . .. . But instead of using key from id and key to object id I d like to join them on their composite-key which might look something like this : .. . .. . To clarify the top example which is the one recommended in FuelPHP s docs creates a query that looks like this : .. . .. . But the query that I d like to build with the ORM would look like this :", "Are you simply passing it as an object", "But I am trying to learn this framework and I would be happy use all the features .", "After a few days of testing around I understood how things work .", "I m new to Fuel.. . got my script inserting a record using the following code : .. . .. . I think I should be able to get the insert id via address- id but it s empty .", "Here are the three ways I ve tried defining the children relationship : .. . .. . Approach 1 .. . .. . This is the approach that the relevant page in FuelPHP s documentation http : fuelphp.com docs packages orm relations many many.html many many suggests should work .", "query Model Something : : find - related hasMany .. . .. . returns a query object in 1.6 an exception in 1.6 and null in 1.6.1+ .", "This way checks the array-key if key is number and value is object or array clean key", "To start associating we forge a new Model Category object and add it to the array : .. . .. . Notice the two boolean parameters passed to the save method .", "Ah in that case you need the observer attached to the parent Post object and be saving that instead of the Comment model .", "If I omit to array it works as expected returns the object with all relationships although the data isn s in the format I need .", "Models are abstractions over data stored elsewhere they encapsulate the data-access through standard object creation method calls property access etc .", "The main idea here is that the controller or whatever object that requires the data doesn t need to know how to get the data or how it s stored .", "You can do that by calling to array on a model object or by using the Format class to convert an array of model objects to an array : result Format : : forge result - to array", "Format : : forge isn t what I want the outgoing JSON is still based on an id-keyed array and will be expressed as a JSON object not an array .", "It s structure should be similar to this : .. . .. . Being post a Model Post object and post- categories an array for associated categories we can start working .", "Turns out I had installed php5-cli which I shouldn t .. . .. . Solution was adding usr local zend bin to the PATH variable after uninstalling php5-cli", "Wiki http : en.wikipedia.org wiki Model E2 80 93view E2 80 93controller s pretty clear : The model manages the behavior and data of the application domain responds to requests for information about its state usually from the view and responds to instructions to change state usually from the controller .", "Here are relevant info from my models I m having issues with : .. . .. . When trying to save the Model Purchase with an array of Model CustomValue objects as a property named customvalues on the purchase object I get the Primary key on model Model CustomValue cannot be changed .", "If the answer to the above is yes then how should I go about adding the soft-delete after generating the scaffold", "For example : .. . .. . The PHP magic-method toString is used to present a textual representation of the object .", "Controllers control the actions views control the content and the template controls the layout .", "But what about models What are they for", "In event-driven systems the model notifies observers usually views when the information changes so that they can react .", "just like ordinary objects .", "It could be stored in files web via webservice database whatever thing that could persist data .", "The data could be retrieved with webservice request database query file reading etc .", "But how does the student retrieve its data", "Where does it store the data", "It s out of concern and could be tuned or should be tunable as needed .", "models controle your data and have a direct contact with your db have a read here http : en.wikipedia.org wiki Model E2 80 93view E2 80 93controller" ] }
{ "confidence": [ 71.18609619140625, 66.05718231201172, 65.80131530761719, 61.121376037597656, 61.098209381103516, 60.79710006713867, 59.681209564208984, 58.09423065185547, 58.09423065185547, 57.27920913696289, 56.11560821533203, 55.71039962768555, 53.38761520385742, 52.43314743041992, 52.29664993286133, 52.153987884521484, 51.949317932128906, 49.42835998535156, 47.97321701049805, 45.76649475097656 ], "content": [ "Question : When i use FuelPHP ORM to get ALL results using find all it s return only one record . This is my db . table name ws config . no primary-key .. . .. . This is my model . This is my controller .. . .. . This is my view file . The result is just .. . .. . site name My Site .. . .. . How to get ALL results from this database-table or How to get multiple results upon where ondition .. . Answer : FuelPHP ORM needs Primary key to get ALL results . No PK you can get only one result . erm.. . : Comment : @trippino I would say it does answer the question and the answer is add a PK to the table . Comment : The reason for this is that the hydration process used the primary-key as an index value . When no PK is available all records will have the same index value null and all results will overwrite each other . So the one result you get is that last record in your query resultset .", "Question : How can execute this query using orm in fuelPHP : .. . .. . I dont know how to implement this part and c 1 or d 2 or e 3 .. . .. . Just stuck in : .. . .. . Is there any way to accomplish this Thank in advanced .. . Answer : You can also make use of it in this manner or take a look at this link for more light .. . Query builder Where - Classes FuelPHP documentation http : fuelphp.com docs classes database qb where.html", "Question : When i use FuelPHP ORM to get ALL results using find all it s return only one record . This is my db . table name ws config . no primary-key .. . .. . This is my model . This is my controller .. . .. . This is my view file . The result is just .. . .. . site name My Site .. . .. . How to get ALL results from this database-table or How to get multiple results upon where ondition .. . Answer : The issue here is that indeed as @vee says the ORM expects you to have a primary-key assigned to your table . By default in the orm this is simply a column called id . If you do not specify a PK unexpected behaviour happens such as this . Once you define a primary-key on your table this issue should be resolved . The simplest thing would be to just add an auto-incrementing ID column as this is the default for orm models . Comment : Come to think of it you could use your config name column as the PK", "Question : I am using FuelPHP and MySQL and would like to use the ORM to query with a case insensitive like query against a column with a case sensitive collation . For example in my orm model I d like to do something like this : .. . .. . The problem here is that when I search for name john the expression will not match rows where the column includes John and vice-versa . Anyone know how to get around this Comment : mysql string comparisons are usually case-insensitive unless you re using a case-sensitive collation or a binary comparison . worst case you can always coerce-to-lower and compare that e.g . lower foo LIKE CONCAT lower bar Comment : MySQL syntax allows for the COLLATE keyword to be used in a conjunction with a string-comparison . For example if name is latin1 characterset with a case sensitive collation you can get a case insensitive comparison with a predicate like this : name LIKE latin1 john COLLATE latin1 swedish ci . We want the literal to match the characterset of the column . I was just using latin1 as an example . Comment : MarcB yes I am using a case-sensitive collation . And I d usually do what @spencer7593 suggested but I m using an ORM not pure sql Comment : As far as how to get a predicate of the form shown by MarcB or the form demonstrated in my previous comment via FuelPHP.. . that may only be available using a Custom SQL query . But you could experiment with some expressions . See how big a smokeball that makes... . - where lower name like .strtolower name . - Comment : If FuelPHP wraps the column names in backticks in the generated SQL then the expression won t work.. . the generated SQL will be WHERE lower name LIKE . And unless you ve created a column named lower name that s going to make a good sized smokeball . .. . Answer : The workaround is to use the Custom SQL query feature available in FuelPHP to bypass the syntax limitations and get a SQL query-string passed to the database .", "Question : I am using ORM in FuelPHP to fetch some data on a table view I created in my data base . I followed the instruction that is given here http : fuelphp.com forums discussion 12006 orm-how-to-use-view-tables Item 3 but I m getting an error as seen on the title above . Here is a screenshot of the error for reference http : prntscr.com 72ssqc . Here is the code : http : pastebin.com ips5VCzV .. . .. . Here is a screenshot of the view Table : http : prntscr.com 72st1e .. . Answer : Your view definition is wrong it misses the columns array as the message explains .", "Question : Let s say I have a Model Post that has may Model Comment . Is there any way that the updated at field of Model Post gets updated every time that a new comment is saved I checked the documentation for the observers but I cannot find how to do that in a ORM way . This code doesn t seem to work : .. . .. . I create a new comment using this code : .. . Answer : Instead of mucking about with observers seeing as you want an ORM-centric approach you can fetch the parent update its updated at then commit both objects to the DB via the ORM . However you re not implementing the whole observer config : . You re missing the property key and the mysql timestamp key . FuelPHP Observer UpdatedAt http : fuelphp.com docs packages orm observers included.html os updated Comment : Yes I know I would have finished earlier if I updated the field manually . But I am trying to learn this framework and I would be happy use all the features . I omitted the mysql timestamp and the property fields because reading the source code I assumed that they were defaulted to false and updated at respectively . Is there something I misunderstood", "Question : How can execute this query using orm in fuelPHP : .. . .. . I dont know how to implement this part and c 1 or d 2 or e 3 .. . .. . Just stuck in : .. . .. . Is there any way to accomplish this Thank in advanced .. . Answer : You can use where or like this : .. . .. . or indeed like this which i find much easier to read when selecting :", "Question : Using fuelphp is there a way to modify an existing ORM Model to convert it to ORM Model Temporal I started looking into creating a migration which needs to 1 add the necessary columns to my table not difficult 2 update the primary-key to include the new columns as part of a compound primary-key difficult . The problem I am having is that I don t see a method in the DBUtil http : fuelphp.com docs classes database dbutil.html that performs this operation . What is the right way to do this .. . Answer : Currently DBUtil does not include a way to alter primary keys because the method of doing so differs between DB systems and DBUtil is not actually that aware what DBMS you are using . To do this you will have to construct the query manually in your migration and use DB : : query to execute it . Comment : Thanks for pointing me in the right direction .", "Question : Using fuelphp is there a way to modify an existing ORM Model to convert it to ORM Model Temporal I started looking into creating a migration which needs to 1 add the necessary columns to my table not difficult 2 update the primary-key to include the new columns as part of a compound primary-key difficult . The problem I am having is that I don t see a method in the DBUtil http : fuelphp.com docs classes database dbutil.html that performs this operation . What is the right way to do this .. . Answer : In case anyone else is faced with the same task here is what I ended up doing . My database is MySQL the syntax may have to be changed if you re using a different DBMS . My original primary-key was an auto-incrementing column named id .", "Question : Trying to set conditions for has-many orm on fuelphp but this is not working I m just having all the related invitations back when I try to get only the ongoing ones here is how the has-many look like any suggestions .. . Answer : You will want to update your fuel install to the latest 1.8 develop as this issue was reported recently and fixed . There was a bug in the query-builder that was causing the value null to be translated to an empty string when used in join queries . The issue was reported here : http : fuelphp.com forums discussion 13081 how-to-set-conditions-to- has-many .. . .. . And fixed here : https : github.com fuel core commit f708cc36e55177fc411bfe1c884bc321a24a14bd Comment : ok that was me reporting the bug :", "Question : I has a table name Account . It has three columns named Id Name primary user id . I want to show id name and name corresponding to user id . I mean I have t use left-join . I get collection using .. . .. . In model : - .. . .. . In view : - .. . .. . I am trying to get value of name corresponding to primary user id . Please help me how can I achieve it . .. . Answer : If you are using the ORM you should not be manually constructing your queries like that . You will want to set up a relation between your Account and User models . There is plenty of documentation about relations in the main fuelphp docs http : fuelphp.com docs packages orm relations intro.html . Comment : I edited by question but it give error Comment : I think you sill misunderstand . You should not be specifying joins when building a query with the orm . Instead you should be specifying a relationship between your two models .", "Question : I have a table with a title field I am trying to get all rows in this table and order them by the title ASC . The four records I am testing with have the titles : .. . .. . Another test .. . .. . My New Page .. . .. . NEW .. . .. . aaa .. . .. . This is also the order the rows are returned which is incorrect . aaa should be at the top of the list . I assume the problem is with the lower and upper case characters . I want to order by LOWER title rather then just title however I am having issues making this work in FuelPHP . The code I m using to select the records is : .. . .. . How do I make the code above order items regardless of their case EDIT : .. . .. . @Uru thanks for the feedback : I have tried the following code all variations result in SQL or PHP errors : .. . Answer : The issue was with the database collation in MySQL changing it to utf8 general ci resolved the issue . Thanks to Harro over at the FuelPHP Forums for answering this one : .. . .. . Are you using MySQL And if so what collating sequence do you use for your table .. . MySQL as collating sequence with ci at the end like utf8 general ci which are case insensitive . Which means aaa and AAA are sorted equally . .. . If you want to know what SQL is executed exactly set profiling to true in your config.php and set it to true in your database definition in db.php . .. . You will get a little black profiler in the lower right corner of your page and if you click on it the profiler will open and it will show you all SQL queries executed . .. . There is nothing wrong with you ORM code as far as I can see but I never use array notation . I would have used which should generate the same SQL : .. . .. . pages Model pages : : query - order by title asc - get .. . .. . The full thread can be found here for anyone running into the same issue : .. . .. . http : fuelphp.com forums discussion 13226 fuelphp039s-orm-isn039t-ordering-items-correctly", "Question : Is there anyway to add two of the same type of observer to a Model in FuelPHP http : fuelphp.com ORM . I d actually be using a custom observer rather than the CreatedAt at shown below .. . .. . Obviously the above won t work because only one of a given key can be set in an array . Is there any workaround to avoid duplicating the observer file itself .. . Answer : No the current ORM code does not allow you to add multiple observers of the same class . Comment : No hacky workaround short of duplicating the class file and giving it a slightly different name Comment : You could create a second observer like class MyFakeObserver extends MyTargetObserver and then use both observers in the model it s not very clean at all but would allow you to use the same observer twice . Comment : The other thing that comes to mind is updating your custom observer to be able to handle multiple properties at once removing the need to add it to the model a second time . Comment : The extending is certainly cleaner than coping the file outright . Editing the observer it handle mutliple would also be good . It would be good if the framework would allow this like CakePHP does IIRC . Thanks for the help Comment : The issue will be addressed in the upcoming v2 as the way that observers are dealt with internally is going to change . Unfortunately we can t change it in v1 as it would create a huge backwards compatibility issue as much as I would like to be able to make the v1 orm more sensible .", "Question : Let s say I have a Model Post that has may Model Comment . Is there any way that the updated at field of Model Post gets updated every time that a new comment is saved I checked the documentation for the observers but I cannot find how to do that in a ORM way . This code doesn t seem to work : .. . .. . I create a new comment using this code : .. . Answer : If you use the relations property of the observer config you can have the updated at update when relations change . As long as your child model has a relation to the parent model you can add the relation name into the relations property and the ORM will do the rest for you when you save the model . Please see the first paragraph under the code sample in the documentation http : fuelphp.com dev-docs packages orm observers included.html os updated . Comment : Hi but this is exactly what I am trying to do . In my code the Post model has-many array comments and in the Comment model belongs-to array post . Also in the observer I have relations array post . Is there something I am missing Comment : That looks correct . It could be that you are not loading the post relation when you select the comments that could be causing the parent model to not get updated . Comment : The thing is that what I want to do is to update the updated at in Model Post every time a new Comment is created . Right now don t know how to load the relation when I do Model Comment : : forge . Also it FuelPHP should be able to get that info from the model isn t it Comment : Ah in that case you need the observer attached to the parent Post object and be saving that instead of the Comment model . I am not actually 100 sure if the observer will trigger when a relation is changed but I don t see why it would not . Comment : Thanks you put me on the right track . By the way relations in the observer are not needed if saving the message . Probably because because the model already had the has-many property didn t check .", "Question : I have a many-to-many relationship created using fuelphp s ORM . The pseudocode for the relation looks like this .. . .. . The idea here is that I only want the relationship to look at newer relatedmodels that were created in the last week . However this obviously won t work because of a php language constraint - an expression is not allowed as a field default-value . How can I get the desired behavior in FuelPHP despite that constraint Comment : AFAIK where conditions in the relation is actually used in the JOIN as an ON condition . Have you tried putting it into a real where condition in a query Even if you want to make it a permanent condition for all cases : you can override the query method in the Model so that every query is executed with that condition . .. . Answer : The work around for the language constraint here is to use Fuel autoloader s public static init function to set the value . This gets called automatically when the class is loaded by the autoloader . http : fuelphp.com docs general classes.html init method", "Question : Question .. . .. . Is it possible to create a custom SQL query and treat its results like you treat tables with FuelPHPs ORM .. . .. . Example .. . .. . I have an SQL statement that pivots a table for me . The image below shows what the pivot SQL statement does . On the left we have the properties table and on the right we have the result-of the SQL pivot statement below . SQL Pivot Statement Results : On the left we have the properties table and on the right we have the result-of the following SQL pivot . http : i.stack.imgur.com mSPdk.png .. . .. . SQL Pivot Statement : .. . .. . Question : .. . .. . Can I execute the above statement then access the columns through the normal ORM methods such as .. . .. . .. . .. . Also I looked at FuelPHP EAV http : fuelphp.com docs packages orm eav.html and it looks like it might be what I need.. . but I couldn t get it working . Is it what I need I got the code above from a buysql.com tutorial on pivot tables http : buysql.com mysql 14-how-to-automate-pivot-tables.html . It does exactly what I need but not sure how to integrate with ORM . .. . Answer : I got something working for my purposes let me know if there is a better way . 1 Make the sql create a temporary table . .. . .. . 2 Create a Model .. . .. . 3 Read the data in the Model .. . .. . .. . .. . Also I looked into EAV and got it working . Issue is my attribute field is actually another foreign key auto-increment number . That means I m unable to use it since it s an auto-increment number . Basically I can t access it like this properties- 10", "Question : I ve been banging my head with this ORM error : Fuel Core FuelException Error : Primary key on model Model CustomValue cannot be changed . Here are relevant info from my models I m having issues with : .. . .. . When trying to save the Model Purchase with an array of Model CustomValue objects as a property named customvalues on the purchase object I get the Primary key on model Model CustomValue cannot be changed . I ve tried swapping the key from to in the belongs-to on the Model CustomValue but to no avail . I m using Fuel 1.6 hash : 6e6d764 .. . .. . Please let me know if more information would be helpful and I ll provide . .. . Answer : From the FuelPHP forum thread http : fuelphp.com forums discussion comment 15462 Harro answered : .. . .. . You can not have a column which is at the same time FK and PK . Which you have on your Model CustomValue . .. . The reason for that is that when you disconnect a relation the FK will be set to NULL which should not happen with a PK . I then clarified for those of us who may need specific examples from the original example I confirmed the following : .. . .. . So just re-stating why that s not allowed : .. . .. . Model CustomValue uses the purchase id as part of its PK as well as the FK to Model Purchase . And if the two Models were to be unlinked that would lead to a null portion of the PK for Model CustomValue -- which obviously isn t allowed .", "Question : I am running the command below on FuelPHP 1.7.3 in development mode : .. . .. . And it outputs the below as expected : .. . .. . However when I run the migrate command the table isn t being created with the custom created updated deleted column names and when you delete the record via front-end it hard deletes the record . Does the soft-delete function not work with scaffolding If the answer to the above is yes then how should I go about adding the soft-delete after generating the scaffold .. . Answer : Apparently the soft-delete does not work with the scaffolding a trick i use is to generate the scaffold of tradicinal way and then regenerate the model with the soft-delete flag and the flag -f to overwrite the file .", "Question : null .. . Answer : I start using Fuelphp v1.7.3 but if I want to get all data from my mysql table nothing happens . I have ORM autoloaded my model has defined table name primary-key and also as properties all my columns from that table . But if i put to my controller .. . .. . and .. . .. . this- template- content View : : forge path to browse data .. . .. . and in view browse.php i have print r pagedata it do nothing nor in the debug bar there is 0 SQL queries . Many thanks . Comment : 0 queries is very suspicious . Can you make sure Model Admin Cms : : find all runs Comment : Also don t use print r for debugging or for anything else because it outputs nothing if your value is an empty string or null so you can t differentiate between them . Comment : Many thanks Barta . I change for experimental purposes print r to var-dump and it works now i got my query results . But from debug bar is still 0 querries so it doesn t matter.Thank you once again . Comment : I see . You re welcome . Though it s strange that number of queries shows 0 . Comment : The query count will only show up if profiling is enabled on the DB connection . fuelphp.com docs general profiling.html database profiling http : fuelphp.com docs general profiling.html database profiling", "Question : I m new to PHP frameworks and to start my venture I went to try FuelPHP . After a few days of testing around I understood how things work . Controllers control the actions views control the content and the template controls the layout . But what about models What are they for Comment : Wiki http : en.wikipedia.org wiki Model E2 80 93view E2 80 93controller s pretty clear : The model manages the behavior and data of the application domain responds to requests for information about its state usually from the view and responds to instructions to change state usually from the controller . In event-driven systems the model notifies observers usually views when the information changes so that they can react . .. . Answer : models controle your data and have a direct contact with your db have a read here http : en.wikipedia.org wiki Model E2 80 93view E2 80 93controller" ] }
[ "yes-answer-long", "yes-answer-short" ]
fuelphp
UNK_RELATION
three20@facebook@80
three20 -- three20 is an open-source objective-c library originally created at @placeholder that provides a number of features for people writing ios iphone ipad applications .
{ "confidence": [ 46.65367126464844, 46.4593505859375, 45.25078201293945, 44.34639358520508, 43.90367126464844, 43.43997573852539, 42.854530334472656, 42.45488357543945, 41.914764404296875, 41.896728515625, 41.896728515625, 41.83803176879883, 41.175254821777344, 40.8846549987793, 40.8846549987793, 40.66876220703125, 40.628944396972656, 40.628944396972656, 40.628944396972656, 40.628944396972656, 40.41981887817383, 40.16025924682617, 39.650489807128906, 39.63969802856445, 39.60954666137695, 39.598838806152344, 39.598838806152344, 39.3050651550293, 39.15630340576172, 38.962013244628906, 38.962013244628906, 38.962013244628906, 38.27287292480469, 37.96947479248047, 37.96947479248047, 37.96947479248047, 37.96947479248047, 36.93936538696289, 36.72330856323242, 36.72330856323242, 36.72330856323242, 36.72330856323242, 36.72330856323242, 36.72330856323242, 36.72330856323242, 36.72330856323242, 36.69729232788086, 36.66304016113281, 36.13631057739258, 36.00815200805664, 35.84451675415039, 35.70823287963867, 35.704750061035156, 35.704750061035156, 35.693199157714844, 35.693199157714844, 35.693199157714844, 35.693199157714844, 35.37090301513672, 35.31291198730469, 35.10160827636719, 34.83857727050781, 34.665557861328125, 34.520751953125, 34.458587646484375, 34.458587646484375, 34.458587646484375, 34.458587646484375, 34.458587646484375, 34.43550109863281, 33.941062927246094, 33.75339126586914, 33.75339126586914, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.69085693359375, 33.39155578613281, 33.39155578613281, 33.39155578613281, 33.04819107055664, 33.04819107055664, 33.04819107055664, 32.75789260864258, 32.75634002685547 ], "content": [ "Three20 Three20.h", "Three20 is a collection of Objective-C classes that powers a growing number of popular applications on the App Store .", "I write an iPhone application using Three20 library to display thumbnail images .", "I found that three20 library has a TTStyledTextLabel which provides cool features like showing images and url links .", "Source : Three20 source code https : github.com willbailey three20 blob master src Three20Network Sources TTURLCache.m", "I m currently working with Three20 in an iOS project .", "Forget Three20 .", "I wend through this http : mobile.tutsplus.com tutorials iphone iphone-photo-gallery-three20 tutorial and created a photo-gallery for the iPhone .", "I am using Xcode 4 with Three20 http : three20.info 1.0.5 .", "Also this is in context of TTTableViewController a class from Three20 library .", "that s looks like another a bug in three20 library .", "In fact that s the main reason people use three20 - it s very difficult to do a fast good photoviewer and three20 is the only open-source project I m aware of that has done it .", "I m building an iOS application with Three20 integrated .", "Now I am using Three20 http : three20.info in my apps .", "You do this in Three20 as you would do in a project without Three20 .", "The Facebook iPhone app seems pretty good and that uses three20 right", "Will three20 run fast", "Release-iphoneos . . . . three20 Three20Core .", "These are required for using three20 .", "In Three20 there is a TTPhotoViewController class .", "There are many other applyXXX methods check out the docs here http : github.com facebook three20 blob 60340d76780ac5ab8a5dc853e3577b1c854eb6e0 src Three20 TTNavigator.h and here http : github.com facebook three20 blob 5ffc8d0d54cfbbb4b48fd3564c9d9ae5b5ce87b3 src Three20 TTURLAction.h", "You may have better luck asking this at : three20.stackexchange.com http : three20.stackexchange.com since the guy taking over the three20 code moderates that forum", "In the latest version of three20 as of this writing it seems to me that the problem lives at TTStyledLayout : 345 .", "I am using Three20 for my new iOS project .", "In the mean time I found a solution to this with the help of the kind people on the Three20 Google Group http : groups.google.com group three20 browse thread thread affbd2a0ee2851c8 .", "three20 is not a bad framework .", "+1 for hating Three20", "Please see the following Tutorial to help you with implementing TTStyleSheet properly : .. . .. . Three20 Stylesheets iPhone Tutorial http : mattvague.com three20-stylesheets-tutorial", "I ve an Xcode project that use Three20 Library for iPhone apps but I use only TTPhotoViewController", "How does three20 caching work", "Hi I am a newbee to three20 .", "I m using Three20 framework and TTNavigator .", "I am using this library https : github.com facebook three20 .", "github.com facebook three20 issues 634 https : github.com facebook three20 issues 634", "see http : three20.info article 2010-10-06-Adding-Three20-To-Your-Project", "Take a look at the Three20 TTNavigator Demo http : github.com facebook three20 tree master samples TTNavigatorDemo .", "But I don t want to : .. . .. . use Three20 http : three20.info - it looks perfect except for the horrid coding experience due to documentation .", "the line the OP was referring to is : .. . .. . import Three20 Three20+Additions.h .. . .. . setTabUrls : is defined in a category on UIToolbarController", "The tab bar will disappear when switched to TTThumbsViewController of Three20 .", "It shows you how to use Three20 with a UITabBarController .", "I also posted this question on the Three20 Google Group .", "In Three20 I ve a custom cell which includes a UIButton .", "In my application I m using three20 library s photoViewController .", "Because three20 preserves your picture s proportions .", "I m trying to use the Three20 TTPhotoViewController with MonoTouch .", "How to style the text of a UITableViewCell using Three20 TTStyledTextLabel", "Which version of three20 are you using", "There s quite a few questions here : .. . .. . Analysing the three20 code : People often try this but it seems not many people have success with this .", "From the documentation https : github.com enormego PhotoViewer : EGOPhotoViewer was originally started as a stripped down version of three20 s PhotoViewer .", "I m trying to update an app that already have the Three20 library .", "I m trying to pass parameters via Three20 for iOS in a way similar to this question : Multi-parameter mapping with Three20 and TTURLMap http : stackoverflow.com questions 3182585 multi-parameter-mapping-with-three20-and-tturlmap .. . .. . However I m running into an issue that question doesn t address .", "I did the following to make it work for me : .. . .. . 1 . for the three20 static library I used cocoapods http : cocoapods.org q three20 to include the files within the main project. . it just got rid of all the trouble three20 was giving me and they are lots. . btw i tried replacing three20 with Nimbus http : nimbuskit.info . . but Nimbus was lacking on some of the features that my project was using three20 for. . so Nimbus wasn t helpful .", "link http : three20.info article 2010-10-06-Adding-Three20-To-Your-Project", "In my project I use the Facebook API three20 : https : github.com facebook three20 .. . .. . Now I need to customize the TTPhotoViewController .", "I am using Three20 TTThumbsviewcontroller to load photos .", "I m using Three20 for a viewing Thumbnails of Pictures in an album .", "anyways it also includes the TTPhotoViewController which Three20 offers .", "I m stuck trying to pop a TTPhotoViewController from three20 .", "http : three20.info article 2010-11-10-Hiding-The-iphone-Tab-Bar-With-TTNavigator", "I ve tried : .. . .. . as well as .. . .. . I also can t find anything on this documentation : https : github.com facebook three20 blob 60340d76780ac5ab8a5dc853e3577b1c854eb6e0 src Three20 TTNavigator.h .. . .. . Any help", "If what you want is get rid of such a thumbnail view completely take a look at three20 s source code https : github.com facebook three20 and override the part that generates the thumbnail view and you ll be fine .", "Have a look at enormego s PhotoViewer sounds like it should fit the bill : .. . .. . Photo Viewer is the photo viewer from Facebook s three20 library torn out and freed of it s dependency on three20 .", "I want to start using THree20 s TTNavigator in my app however I read here http : groups.google.com group three20 web ttnavigator-secrets that it shouldn t be used on IPad .", "I m trying to set the background-image of a NILauncherViewController included with iOS NimbubKit update of the three20 kit .", "Take a look at the latest Three20 releases yesterday .", "Sorry I have no experience with Three20 yet .", "Unfortunately three20 behaves exactly as I described above .", "I have already reinstall the last version of Three20... .", "someone added a pod for three20 few weeks ago .", "Three20 code is here : .. . .. . TTMessageController.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageController.h TTMessageController.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageController.m .. . .. . TTMessageControllerDelegate.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageControllerDelegate.h .. . .. . TTMessageField.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageField.h TTMessageField.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageField.m .. . .. . TTMessageRecipientField.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageRecipientField.h TTMessageRecipientField.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageRecipientField.m .. . .. . TTMessageSubjectField.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageSubjectField.h TTMessageSubjectField.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageSubjectField.m .. . .. . TTMessageTextField.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageTextField.h TTMessageTextField.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageTextField.m .. . .. . Of course you should just use the Message UI framework http : developer.apple.com library ios documentation MessageUI Reference MessageUI Framework Reference index.html from Apple now that they released it .", "You can open a bug for it in http : github.com facebook three20 hopefully someone will fix it .", "Yea I don t know if it s just me but the source code for Three20 is a little confusing .", "You should then be able to set the photo source property on the TTPhotoViewController and Three20 s magic should work .", "I m using Three20 and I ve got the standard search mechanism working .", "Going through the three20 code it appears the searchdisplaycontroller is already built-in .", "I hope this can help those like me using storyboard with three20 .", "I have PhotoTest1Controller very similiar to the one in Three20 samples .", "I m new to three20 and trying to find my way through the TTNavigator class .", "Is there anybody who has successfully used Three20 v1.1 in Xcode 4", "Figures it was right in front of my face the whole time inside the three20 package .", "I m not sure what three20 is doing internally to cause that to occur .", "I have been working on a project using the TTNavigator of the Three20 framework .", "create a fake root controller and have it be the first controller three20 uses .", "I posted this question on Three20 google group but did not get any response .", "I kind of added Three20 to the project because I wanted a nice PhotoViewer .", "You can t really escape Three20 s way of doing things .", "I just integrated the photo viewer from three20 framework .", "Previously i have used Three20 and my apps was in the appStore now .", "You can see TTPhotoViewController are three20 src Three20UI Souces TTPhotoViewController .", "Just my two cents : stay away from Three20 .", "I m quite new to Three20 please give me some clues .", "Is there anyway I can use that on only the Three20 libraries and not the other", "After searching high and low I came to the conclusion that something must be missing from the core Three20 library .", "The problem is I m afraid including the entire Three20 library is quite an overkill since it has much to offer besides that capability .", "I m trying to add Three20 to my project but the -ObjC and -all load flags are messing with another library I m using .", "The TTWebController in Three20 http : github.com facebook three20 looks very promising since it has also implemented a navigation toolbar loading indicators etc .", "You can hack Three20 to make it work or you can wait a few more weeks for official support from the Three20 developers .", "In my project I use the Facebook API three20 : https : github.com facebook three20 .. . .. . How can I deactivate the auto rotation", "The Three20 library is great but I ve found that it s often hard to change parts of their library such as this .", "Please give me the line number in the current version : github.com facebook three20 blob master src Three20UI Sources https : github.com facebook three20 blob master src Three20UI Sources TTScrollView.m" ] }
{ "confidence": [ 58.5821647644043, 58.28961181640625, 55.05400848388672, 53.47455596923828, 51.894142150878906, 51.403865814208984, 51.126102447509766, 50.382869720458984, 49.903358459472656, 49.370941162109375, 49.20225143432617, 48.79009246826172, 48.67679977416992, 48.23921585083008, 48.20512390136719, 47.5902099609375, 46.597713470458984, 46.535980224609375, 46.535980224609375, 46.221214294433594 ], "content": [ "Question : I wan to add a view in my iPhone app where the user can scroll paged through a series of web loaded images . I ve been reading many threads and most of them end up suggesting the Three20 lib . I ve tried that and looks complicated to integrate and quite heavy in size 1.2Mb added to my app . Additionally I only need the TTPhotoViewContoller class but I have to integrate with the whole Three20 bundle . Is there a lighter solution or component to do a image scroller on iPhone Thanks in advance . Gonso Comment : I d also be interested to see if there is an alternative . I m currently using Three20 in my own apps mainly just for photo viewer but if I can replace it with something a little less heavy that d be great . .. . Answer : Have a look at enormego s PhotoViewer sounds like it should fit the bill : .. . .. . Photo Viewer is the photo viewer from Facebook s three20 library torn out and freed of it s dependency on three20 . We ve removed most of the bulk code and it s weighing in at a lean 800KB vs . three20 s 4.7MB which is an awful lot for a simple photo viewer . http : github.com enormego PhotoViewer Comment : Photo Viewer is what I was looking for . However it throws a Warining I can t get rid of and I m concern about App Approval : somePath PhotoViewer-Release.fmwk libPhotoViewer-simulator.a file is not of required architecture Any ideas on how to fix it Thanks Gonso Comment : It usually means you re trying to use a simulator compiled library on the device or vice versa . Essentially the library is not a universal-binary containing both arm and i386 architectures . This is something you can fix if you have the source code by recompiling the library against both SDKs device and simulator and using the lipo command-line tool to create the universal-binary . Comment : PhotoViewer is no longer the same as the photo viewer from three20 - it s been rewritten from scratch as the documentation now states . From the documentation https : github.com enormego PhotoViewer : EGOPhotoViewer was originally started as a stripped down version of three20 s PhotoViewer . We ultimately decided the three20 code base wasn t flexible enough and scrapped the project all together . We rewrote PhotoViewer as EGOPhotoViewer from scratch based upon our reliable open-source libraries EGOCache and EGOImageLoading . Comment : and so can anyone who has used both three20 and photoviewer give feedback on pros cons of each", "Question : I want to use three20 s TTThumbsView TTPhotoView to build something like Grindr . Instead of 1 subclassing these classes I d prefer to 2 analyze them and build take the necessary code tweak it accordingly . Why Because my concern is that option 1 will increase the download size of our app slow it s performance . Another thing I want to ues is three20 s caching but I don t really understand it because right now we re using Core Data . How does three20 caching work If I m only using part of three20 when I compile the app will it also build in the other code that s not being used Or will it leave it out If it leaves it out then that gives me some hope that maybe option 1 won t make the app a lot larger to download . In terms of performance speed . Will three20 run fast There s a lot of subclassing going on . Doesn t that slow things down The Facebook iPhone app seems pretty good and that uses three20 right What do you think Thanks Matt .. . Answer : There s quite a few questions here : .. . .. . Analysing the three20 code : People often try this but it seems not many people have success with this . Here s an example of one project that gave up : http : github.com enormego PhotoViewer the history is all in git I believe so you can go back and see what they achieved before they gave up .. . .. . Three20 caching : can t help you there you might want to ask a separate question about that . Generally it s best to only ask one question per question : .. . .. . Size of three20 : I believe these views have a lot of dependencies other three20 classes so whilst only the necessary code is built-in that s actually quite a lot of code . Speed : Yep it s what the iphone facebook uses so you should be fine there . In fact that s the main reason people use three20 - it s very difficult to do a fast good photoviewer and three20 is the only open-source project I m aware of that has done it .", "Question : I ve an Xcode project that use Three20 Library for iPhone apps but I use only TTPhotoViewController It s possible to import only this features My app before Three20 was 430 KB now it s 2 4 MB : thx in advance .. . Answer : Yeah . Forget Three20 . It might have been a more viable solution had it been broken out into separate components as you re suggesting but alas it was not . Try this : https : github.com kirbyt KTPhotoBrowser .. . .. . Best regards . Comment : +1 @Matt Long Nice tutorial for Photo library . Previously i have used Three20 and my apps was in the appStore now . Does apple allowed for used this KTPhotoBrowser package . Thanks . Comment : Yes . Kirby Turner the developer mentions on the github readme that he has apps in the app-store that use his library . Comment : +1 Just what I ve been looking for thanks", "Question : I ve an Xcode project that use Three20 Library for iPhone apps but I use only TTPhotoViewController It s possible to import only this features My app before Three20 was 430 KB now it s 2 4 MB : thx in advance .. . Answer : you may take a look at this then it s just an essential photo-gallery easier to install and use : .. . .. . mwaterfall-MWPhotoBrowser https : github.com mwaterfall MWPhotoBrowser", "Question : I m using version 1.1 of the Three20 library and I m setting a global style sheet to change the navigationBarTintColor in my app delegate like this : .. . .. . That is working just fine except when my app state is restored by calling restoreViewControllers in TTNavigator . In that case the navigation bar is showing the iOS default pale blue color . When I navigate on to the next view the style sheet takes effect again . I also posted this question on the Three20 Google Group . I ll update here if I find an answer there of course . Comment : I thought there used to be a way to answer your own questions but I can t find it right now . Probably missing something obvious.. . In the mean time if someone is looking for a solution to this you ll find the answer here : groups.google.com group three20 browse thread thread http : groups.google.com group three20 browse thread thread affbd2a0ee2851c8 Comment : Never mind I just found the button.. . .. . Answer : In the mean time I found a solution to this with the help of the kind people on the Three20 Google Group http : groups.google.com group three20 browse thread thread affbd2a0ee2851c8 . In short : The global style sheet will work correctly if all view controllers descend from TTViewController . When inheriting directly from UIViewController a work-around is needed to enforce the wanted behavior . Use either categories or a common super-class to implement the following method for your view controllers :", "Question : I m trying to update an app that already have the Three20 library . Now i m using xcode 4.5 and everytime i try to make an Archive i recive this error : .. . .. . Three20 Three20.h file-not-found .. . .. . At the beginning i wasn t able to make any kind of build but after the adding of BUILT PRODUCTS DIR . . three20 and BUILT PRODUCTS DIR . . . . three20 in the Header Search Path of the build and the target settings i can make a Build in my Device . Anyway if i try to made an Archive to publish my app the same errors returns . What i can do I have already reinstall the last version of Three20... . I have to try this solution that i found on internet : .. . .. . Go to Xcode4 Preferences Cmd + Locations Build Location and select Place build products in locations specified by targets .. . .. . In xcode 4.5 i can t approach this solution...Maybe Build Location men is changed i can t find the option Place build products in locations specified by targets ... . Someone knows where i can found this setting At least there s someone how have made successfully an Archive on Xcode4.5 and Three20 .. . Answer : Three20 has t update in long time.And it has-many bugs.set up this framework is very hard . you can try nimbus https : github.com jverkoey nimbus .It come from three20 . Nimbus Background .. . .. . Nimbus has been built with much inspiration from the Three20 framework . That being said there are a number of fundamental problems with Three20 that Nimbus works very hard to avoid . Among them : .. . .. . Poor documentation . Spaghetti dependencies . Suffering from a kitchen sink complex . A complex build structure . An enormous number of difficult-to-solve bugs . Next-to-zero test-coverage . For its weaknesses Three20 does provide a good deal of value through its feature set . It is used in over 100 apps in the app-store by companies such as Facebook LinkedIn Posterous Meetup and SCVNGR . .. . Nimbus hopes to one day provide as much value as Three20 does on a feature-by-feature comparison but with the invaluable benefit of sublime documentation and test-coverage . Comment : Thanks but how i can do with the old user with the older version of my app If i publish a new version of my app with Nimbus the users that made the update will have an app with with some traces of Three20 or the old library will be completely deleted I m sorry i don t know how can works an update made over a library so invasive like three20.. . Comment : You need t worry about update.As I know iOS App s updating will replacing fully Comment : it seems that both Cri1682 and agassi yzh the user who asked and the user who posted the above answer respectively haven t been on SO for a while. . so this is an open question : has anyone actually migrated their three20 to Nimbus how did it go b c honestly this three20 business just seems way more trouble than it s worth", "Question : I am using Three20 s TTLauncherView and was wondering whether anyone has had experience loading high resolution images http : three20.info showcase launcher .. . .. . I am using the following method to set my TTLauncherItem s : .. . .. . This is the method I use to determine whether it s an iOS4 . The problem is that images are actually getting displayed in their full dimensions on an iPhone 4 whereas any iOS device below an iPhone 4 are getting displayed properly . Just wondering whether I would need to make changes to the TTLauncherView library or whether there s an easier way to resolve such an issue . .. . Answer : I accomplished this by adding a new style to my three20 stylesheet based on launcherButtonImage . This is the original.. . .. . .. . ...and this is the updated version.. . There s probably stuff in there you don t need like rounded image corners . The operative part is the TTImageStyle directive which locks the image-size to 64x64 . Hope this helps .", "Question : I want to start using THree20 s TTNavigator in my app however I read here http : groups.google.com group three20 web ttnavigator-secrets that it shouldn t be used on IPad . I don t really get the explanation and what using url browsing mechanism has to do the with the IPad screen-size . Did anyone encountered problem with TTNavigator on IPad I don t want to start using to later find out I have problems running the app on an IPad . .. . Answer : The reason is that TTNavigator is written so that it adds a TTNavigationController to the application s window . You can use it in this fashion if you d like and it will work but that s not how most developers want to use it on the iPad . We want to be able to have a a TTNavigator control the view-hierarchy in one if not both of the view controller s in a split view . Because TTNavigator is designed to work automatically on the app s key UIWindow it doesn t directly support being added as a view controller in a UISplitViewController . You can hack Three20 to make it work or you can wait a few more weeks for official support from the Three20 developers . Comment : Official support should be out in a couple weeks where did you hear about that anyway if I understand correctly then there is no reason why I can t start using TTNavigator now and if in the future I would want to use UISplitViewController and Three20 would implement it I would change my code a little bit . Correct Comment : Take a look at the latest Three20 releases yesterday . There s been changes to TTBaseNavigator and the TTCatalog sample is has a SplitCatalogController which inherits from TTSplitViewController . Comment : I m looking into it myself . Good luck . Comment : btw do they have a static library you take or do you always download the latest code and overwrite the files at your working directory Thanks Comment : The Three20 project builds as static-libraries which are linked against your app . I ve only been using Three20 for a few weeks so I haven t had to worry about messing with my repo clone . I ve just used the provided Python scripts to add it to my project . link http : three20.info article 2010-10-06-Adding-Three20-To-Your-Project", "Question : Krumelur http : stackoverflow.com users 304870 krumelur asked this question http : stackoverflow.com questions 4707873 pick-recipients-like-mfmailcomposeviewcontroller-does about how create a recipient bubble similar to the mail.app . Please see screenshots below of what I mean : .. . .. . Mail.app picker bubble picture http : i.stack.imgur.com rJNcU.png .. . .. . Selected contact http : i.stack.imgur.com 4MSE8.png .. . .. . I can create the look of this element including the look when it has been selected but I am struggling with getting the behaviour when it s part of a UITextField . How do you get the bubble to act as part of the UITextField text For example when you press the backspace button enough the bubble becomes highlighted and after one more press will be deleted as-if it was part of the text . I ve also had difficulties moving the cursor as well . Preferably the answer would be great in Monotouch but Objective-C answers are more than appreciated too . I m not asking for the exact code though if you are willing to part with it then I won t say no : D but rather how to achieve this . I m aware of the Three20 project which has a similar element but I can t find where abouts in the code this is actually performed . I m sorry if this doesn t make much sense I ve kinda struggled to put this question elequantly please feel free to ask me any questions clarifying the question Comment : Sorry for bringing this old question to life . But can you please show the code how you implemented this . Also do you have the image files for the blue pill .. . Answer : It seems magical doesn t it Three20 code is here : .. . .. . TTMessageController.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageController.h TTMessageController.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageController.m .. . .. . TTMessageControllerDelegate.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageControllerDelegate.h .. . .. . TTMessageField.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageField.h TTMessageField.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageField.m .. . .. . TTMessageRecipientField.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageRecipientField.h TTMessageRecipientField.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageRecipientField.m .. . .. . TTMessageSubjectField.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageSubjectField.h TTMessageSubjectField.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageSubjectField.m .. . .. . TTMessageTextField.h https : github.com facebook three20 blob development src Three20UI Headers TTMessageTextField.h TTMessageTextField.m https : github.com facebook three20 blob development src Three20UI Sources TTMessageTextField.m .. . .. . Of course you should just use the Message UI framework http : developer.apple.com library ios documentation MessageUI Reference MessageUI Framework Reference index.html from Apple now that they released it . Comment : Thanks - I ve scourered through these links before and haven t really had much luck finding the actual code which performs the behaviour I described . Also I do use the Message UI framework when the app is sending an email - however the app also needs the ability to send a message via our own propritory messaging system - which I m sure the Messaging UI Framework doesn t support . Please correct me if I m wrong Comment : Also it appears the file I want is : github.com facebook three20 blob development src Three20UI https : github.com facebook three20 blob development src Three20UI Sources TTPickerTextField.m", "Question : I m currently working with Three20 in an iOS project . I ve got the TTLauncherView displaying with a few icons . However I can t see to get them to open their views in an animated fashion as with the Facebook app . I ve tried : .. . .. . as well as .. . .. . I also can t find anything on this documentation : https : github.com facebook three20 blob 60340d76780ac5ab8a5dc853e3577b1c854eb6e0 src Three20 TTNavigator.h .. . .. . Any help Thanks .. . Answer : This should work . I just tried this in my code and the curl down transition works like expected . Here is the code which gets executed when the user taps an icon in the launcher : .. . .. . .. . .. . Hope this helps .", "Question : I write an iPhone application using Three20 library to display thumbnail images . At first I build the app using XCode 4.0.2 with iOS SDK 4.3 and I used deployment-target 4.2 . It did fine the images appeared normally . thumbnail image in iOS 4.3 Simulator http : flic.kr p axaom6 .. . .. . Then I upgraded to XCode 4.2 with iOS 5 SDK and ran the app with iOS 5.0 simulator there s white bar in there . thumbnail image in iOS 5.0 simulator http : flic.kr p axaom2 .. . .. . I don t know what is this thing exactly maybe some kind of border or something that I don t know . Any help or clue would be appreciated . Thanks . Comment : There s an update for this but someone said it is only working in the simulator not in real device . forums.three20.info discussion 400 http : forums.three20.info discussion 400 strange-white-bar-shows-when-using-ttthumbsviewcontroller-with-ios-5-sdk Here s the source . github.com facebook three20 issues 634 https : github.com facebook three20 issues 634 .. . Answer : Here s what I did to make it work. . Create a subclass of TTThumbsViewController then do the following : .. . .. . 1 . in ViewDidLoad include this line .. . .. . self.tableView.sectionHeaderHeight 0 .. . .. . 2 . Overwrite - void updateTableLayout to the following .. . .. . - void updateTableLayout self.tableView.contentInset UIEdgeInsetsMake TTBarsHeight + 4 0 0 0 self.tableView.scrollIndicatorInsets UIEdgeInsetsMake TTBarsHeight 0 0 0 Comment : Thanks for the reply : . I m gonna test it in real device to check it as soon as I get the device .", "Question : I am using Three20 s TTLauncherView and was wondering whether anyone has had experience loading high resolution images http : three20.info showcase launcher .. . .. . I am using the following method to set my TTLauncherItem s : .. . .. . This is the method I use to determine whether it s an iOS4 . The problem is that images are actually getting displayed in their full dimensions on an iPhone 4 whereas any iOS device below an iPhone 4 are getting displayed properly . Just wondering whether I would need to make changes to the TTLauncherView library or whether there s an easier way to resolve such an issue . .. . Answer : I am using Three20 s TTLauncherView .. . .. . Instead try using SDWebImage : .. . .. . https : github.com rs SDWebImage .. . .. . You could just issue two loads on a UIImageView one for the high and one for the low res image . The low-res should finish first.. . Comment : Thanks for this the problem is not loading caching images . It s that the TTLauncherView doesn t have a facility for loading high resolution images as far as I know Comment : The very fact you are using ThreeTwenty is inherently a problem if you are even considering making changes to it it means you need to move to something else even if you have to change it to do what you want also . ThreeTwenty was the very first of the frameworks was not well written and most aspects of it have been superseded by better frameworks to take up where it left off . Comment : SOrry don t understand what you meant by the last question . The way I generally use SDWebImage is a local placeholder and a URL that loads in the background a high-res image . I usually have a UIImageView set to scaleAspectFit so if the image is larger it will look good on both Retina and non-retina displays and the iPad kind of acts like a retina for running iPhone apps at 2x size Comment : Okay so not really related to what I m trying to do with TTLauncherView then . Appreciate your help though .", "Question : if the image of TTLauncherItem is not from @ bundle : 12.png but as the following it would not appear as a image . Does this kind of init is not supported .. . Answer : iOS apps have no access to your local filesystem . Use the documents keyword instead of the bundle . A quick look at the code shows that it handles nested directories too . Source : Three20 source code https : github.com willbailey three20 blob master src Three20Network Sources TTURLCache.m", "Question : I m trying to update an app that already have the Three20 library . Now i m using xcode 4.5 and everytime i try to make an Archive i recive this error : .. . .. . Three20 Three20.h file-not-found .. . .. . At the beginning i wasn t able to make any kind of build but after the adding of BUILT PRODUCTS DIR . . three20 and BUILT PRODUCTS DIR . . . . three20 in the Header Search Path of the build and the target settings i can make a Build in my Device . Anyway if i try to made an Archive to publish my app the same errors returns . What i can do I have already reinstall the last version of Three20... . I have to try this solution that i found on internet : .. . .. . Go to Xcode4 Preferences Cmd + Locations Build Location and select Place build products in locations specified by targets .. . .. . In xcode 4.5 i can t approach this solution...Maybe Build Location men is changed i can t find the option Place build products in locations specified by targets ... . Someone knows where i can found this setting At least there s someone how have made successfully an Archive on Xcode4.5 and Three20 .. . Answer : I did the following to make it work for me : .. . .. . 1 . for the three20 static library I used cocoapods http : cocoapods.org q three20 to include the files within the main project. . it just got rid of all the trouble three20 was giving me and they are lots. . btw i tried replacing three20 with Nimbus http : nimbuskit.info . . but Nimbus was lacking on some of the features that my project was using three20 for. . so Nimbus wasn t helpful . 2 . set skip install to yes under build settings for all other sub projects static-libraries and switched the copy headers from public to project under build phases .. . 3 . most importantly : under the sub libraries. . under build phases i ensured that copy files destination was changed from Absolute path to products directory . and that was it hint : to get an idea of the offending files that s causing your archive to create an archive file rather than an ipa do this : .. . .. . 1 . Select the archive and click the Distribute button . 2 . Select the Save Built Products option . 3 . Hit Next and Save . 4 . Browse the created directory in Finder . 5 . The libraries subdirectory will identify the libraries that you need to set the Skip Install to Yes . 6 . in some cases usr local include will identify the culprit header-files you need to move from Public to Project or the files that you have to change from absolute path to products directory . but that directory ie usr local include varies depending on your sublibrary directory structure", "Question : I am now using this code : .. . .. . Old method : .. . .. . I am using the TTLauncherView controller from http : three20.info . Three20 is a collection of Objective-C classes that powers a growing number of popular applications on the App Store . It provides dozens of incredibly useful features that save you development time . The library is built to be modular which means you can selectively incorporate elements of the library into your project . There is also a growing set of extensions including drop-in XML and JSON parsing as well as CSS stylesheet support for theming your applications . I am not quite sure how to do the following : .. . .. . 1 . Check whether my arrayOfLauncherItems has 16 objects in it and .. . 2 . If there are more than 16 objects add the rest of the remaining objects to launcherView.pages . So if let s say there s a total of 32 objects I d want to be able to create another array of the remaining 16 objects and add them to the launcherView.pages NSArray . This is an example of how the TTLauncherView controller works : .. . .. . The arrayOfLauncherItems may contain more than 16 objects which means that the remaining TTLauncherItem objects should be on the second page and so forth depending on how many total objects there are . Doing the following obviously adds the same 16 objects from arrayOfLauncherItems which means that there s now a second page which is essentially what I want to achieve if there s more than 32 objects in arrayOfLauncherItems . .. . Answer : I have the following code that you may want to use . Basic idea is to calculate automatically the number of pages based on the number of objects available . I assume that you have 3x3 9 launcher items in each page . In this way you don t have to worry about the total number of objects less than or greater than 9 . You can put this value in a constant if you want . Comment : I ve updated my original question and used your code . But I m not getting the same items on both pages . Also setting initWithCapacity to 2 for the number of pages . How can I control this if there s more pages than two for the total number of items Comment : Are you able to help me with this bug I am using your code however I m now using a columnCount of 3 which gives me a total of 9 categories per page . The problem is that the 10th item is not getting displayed . It simply skips the 10th item and moves onto page 2 but it starts from the 11th category item . Would you mind giving me a hand with this Comment : Hi Fulvio sorry for the delay I was not aware of your comment . Please see the updated code if it works .", "Question : how can I skip the thumbnail images and go straight to the Fullscreen mode of the Image viewer included within the Three20 Framework . .. . Answer : One solution my own experience : I followed this Three20 tutorial http : www.raywenderlich.com 1430 how-to-use-the-three20-photo-viewer and set up a full screen image viewer controller . Then I simply presented the controller modally . It shows the full screen viewer perfectly . However the user would be able to access the thumbnail view if they click the see all button on the nav bar right button which as for my app isn t a bad idea . If what you want is get rid of such a thumbnail view completely take a look at three20 s source code https : github.com facebook three20 and override the part that generates the thumbnail view and you ll be fine . An alternative : Kick Three20 out of your project and try this simple yet powerful stand-alone full screen image viewer https : github.com enormego PhotoViewer from enormego . Comment : Yea I don t know if it s just me but the source code for Three20 is a little confusing . So I might just take your second suggestions and use that source from enormego .", "Question : I wan to add a view in my iPhone app where the user can scroll paged through a series of web loaded images . I ve been reading many threads and most of them end up suggesting the Three20 lib . I ve tried that and looks complicated to integrate and quite heavy in size 1.2Mb added to my app . Additionally I only need the TTPhotoViewContoller class but I have to integrate with the whole Three20 bundle . Is there a lighter solution or component to do a image scroller on iPhone Thanks in advance . Gonso Comment : I d also be interested to see if there is an alternative . I m currently using Three20 in my own apps mainly just for photo viewer but if I can replace it with something a little less heavy that d be great . .. . Answer : You might want to take a look at MWPhotoBrowser http : github.com mwaterfall mwphotobrowser : .. . .. . MWPhotoBrowser can display one or more images by providing either UIImage objects or URLs to files web images or library assets . The photo browser handles the downloading and caching of photos from the web seamlessly . Photos can be zoomed and panned and optional customisable captions can be displayed . The browser can also be used to allow the user to select one or more photos using either the grid or main image view . MWPhotoBrowser Screenshots http : i.stack.imgur.com I74Gs.png", "Question : I am implementing an IM app on iOS . I found that three20 library has a TTStyledTextLabel which provides cool features like showing images and url links . However I want to embed the TTStyledTextLabel in a message bubble just like the sms app shipped with iphone does where I need the label to adjust its size according to the text length . I found that TTStyledTextLabel can adjust its height according to its width but I don t know how to make it shrink horizontally when the text is very short and can t fill up a whole line . Any suggestions Comment : Out of interest may I ask what you re using for the actual IM functionality libpurple .. . Answer : I think I have a slightly better solution : I get the rootFrame of the ttstyledtext and iterate over its sibling frames to find the max width . It works like this : Comment : What is the behavior of label sizeToFit in this scenario Does it lays out everything across the screen width", "Question : I am implementing an IM app on iOS . I found that three20 library has a TTStyledTextLabel which provides cool features like showing images and url links . However I want to embed the TTStyledTextLabel in a message bubble just like the sms app shipped with iphone does where I need the label to adjust its size according to the text length . I found that TTStyledTextLabel can adjust its height according to its width but I don t know how to make it shrink horizontally when the text is very short and can t fill up a whole line . Any suggestions Comment : Out of interest may I ask what you re using for the actual IM functionality libpurple .. . Answer : I tried doing it by incrementally passing the width parameter in size to sizeToFit and looking at the resulting height to give cues in terms of whether the size is ok . But this is not a elegant solution .. . .. . for int index 100 index 320 index index+30 .. . .. . label.width x if label.height 20 break .. . .. . Comment : I just checked again this solution works Comment : I think I have a slightly better solution : I get the rootFrame of the ttstyledtext and iterate over its sibling frames to find the max width .", "Question : Hi I am a newbee to three20 . I am getting SettingsViewController setOriginalNavigatorURL unrecognized-selector sent exception . How do I use the TTLauncherView if I already have a navigation controller in my app I have a UITableViewController within a UINavigationController . I want to launch a launcher when a row Settings is selected in the table . Following is what I have done : .. . .. . I have a SettingsViewController : UIViewController with loadView where I created the TTLauncherView and add it as subview to SettingsViewController : .. . Answer : -ObjC -all load was missing in the other compiler-flags . These are required for using three20 . see http : three20.info article 2010-10-06-Adding-Three20-To-Your-Project" ] }
[ "yes-answer-long", "yes-answer-short" ]
facebook
UNK_RELATION
serviceloader@providers@68
serviceloader -- serviceloader is a java sdk way to load different @placeholder for a class from the classpath .
{ "confidence": [ 50.29945755004883, 44.91083908081055, 44.823143005371094, 44.820823669433594, 44.627445220947266, 42.50078582763672, 42.50078582763672, 42.50078582763672, 42.390438079833984, 42.15717697143555, 42.07416915893555, 41.96100616455078, 40.93895721435547, 40.7541389465332, 40.103336334228516, 40.103336334228516, 39.873497009277344, 39.78717803955078, 39.72567367553711, 38.425323486328125, 38.332183837890625, 38.332183837890625, 38.332183837890625, 37.88530349731445, 37.716766357421875, 37.569923400878906, 37.525001525878906, 37.525001525878906, 36.897315979003906, 36.897315979003906, 36.86423873901367, 36.43946838378906, 36.432064056396484, 36.34906005859375, 36.31993103027344, 36.03875732421875, 35.868072509765625, 35.7693977355957, 35.536808013916016, 35.536808013916016, 35.536808013916016, 35.4097900390625, 35.335426330566406, 35.261016845703125, 35.261016845703125, 35.261016845703125, 35.261016845703125, 35.261016845703125, 35.261016845703125, 35.261016845703125, 35.261016845703125, 35.261016845703125, 35.044090270996094, 34.9991569519043, 34.9991569519043, 34.432735443115234, 34.432735443115234, 34.432735443115234, 34.432735443115234, 34.432735443115234, 34.432735443115234, 34.17548370361328, 34.17548370361328, 34.17548370361328, 34.075809478759766, 34.00056457519531, 33.99361801147461, 33.91362380981445, 33.43021011352539, 33.43021011352539, 32.91503143310547, 32.635009765625, 32.34468078613281, 32.343692779541016, 32.343692779541016, 32.343692779541016, 32.12710952758789, 31.875286102294922, 31.875286102294922, 31.381820678710938, 31.26363754272461, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.99871063232422, 30.296287536621094 ], "content": [ "Is there a way to point the ServiceLoader at this internal class", "I am trying to use the ServiceLoader class to load some plugins .", "Then it will be handled by the ServiceLoader .", "They will be loaded the same way in the ServiceLoader .", "Its ResourceConfig shall load the plugins via the ServiceLoader .", "OSGi ServiceLoader at all .", "Why is the ServiceLoader so limited", "The ServiceLoader is a prime example of that .", "I am wondering if it is possible to load this grammar file with ServiceLoader or a similar function .", "Use a static ServiceLoader instance and only support loading classes from the same classloader as the one holding the ServiceLoader reference .", "Instead of ServiceLoader I m using the org.openide.util.Lookup class-library that comes with NetBeans - it is a superset of ServiceLoader .", "ServiceLoader is stuff from the Java language that is not really relevant on Android .", "I am trying to make a Java app that can load plugins implementing an abstract-class and am having an AbstractMethodError with the instances generated from ServiceLoader .", "I have a ServiceLoader that tries to load anything that extends Plugin .", "The module uses the standard Java ServiceLoader mechanism to provide its service i.e .", "I have troubles using the java ServiceLoader in a NetBeans module application .", "The main class is in main module which is also responsible for loading the services in classpath using ServiceLoader mechanism .", "ServiceLoader is part of the JRE class libs and it unware of OSGi class loading .", "Alternatively JBossOSGi claims to be handle ServiceLoader jbossosgi.blogspot.com 2010 01 http : jbossosgi.blogspot.com 2010 01 suns-serviceloader-and-how-it-relates.html", "Honest I don t like the generics used in ServiceLoader .", "If the ServiceLoader instance survives the framework restart it will still be referencing the original class object .", "The ServiceLoader class is included in Android API level 9 so it is relevant .", "This is why ServiceLoader often does not work in environments with custom class loaders e.g .", "ServiceLoader uses the application class loader to load any classes listed in META-INF services .", "Then I found a simple ServiceLoader Tutorial http : www.tutorialspoint.com java util serviceloader load loader.htm .", "You can load the main plugin class via the ServiceLoader and then use the class class loader to resolve resources cl.getClassLoader .getResourceAsStream file.jpg or let the class load files via its cloassloader .", "Currently I achieve this by adding the dependency to the pom so that the dependency jar is in the classpath and the ServiceLoader can pick it up .", "How am I able to have JARs that aren t in my classpath show up in the ServiceLoader", "You don t want to use the ServiceLoader itself to create multiple copies .", "Why is that so and how do I get the ServiceLoader to cache it", "From some other class make the call to ServiceLoader to get an instance of Foo and inject it into the code that needs it .", "What I want to to is to add all the classes in these modules to classpath when starting the program so that ServiceLoader will be aware of the services in these modules .", "As seh points out if you re only interested in simple service-discovery then ServiceLoader is a lightweight way to decouple consumers from providers .", "So to conclude my question s : Is there any way I can make the serviceloader use a DI container to instantiate the class", "I found documentation that states that this kind of action is supported by Android -- technically that states that ServiceLoader exists in Android s SDK .", "Following is my simple ServiceLoader Tutorial project .", "What happens now is that every time my plugin is using a method that will trigger the serviceLoader of the external library the serviceLoader is unable to find the concrete implementation .", "It looks like you can bootstrap neo4j a standard way as long as you have your services directory in order since neo4j will use ServiceLoader and ServiceLoader will look into META-INF services folder .", "no each EAR has own classloader and ServiceLoader will load only those who in parent EAR", "Recently i have been playing around with writing plugins which i then load using a ServiceLoader .", "I have a maven application and I like to use the ServiceLoader mechanism to load plugins .", "Trying to create an expansion IoC style architecture via a combination of Google Guice and ServiceLoader but can t seem to get the ServiceLoader part working running Java 1.7.0 75 and IntelliJ IDEA 14 .", "In the plugin .jar files the services plugintest.SimplePlugin file was missing inside the META-INF directory so the ServiceLoader couldn t identify the jars as services and load the class .", "This gives me full control over which classes to be loaded by ServiceLoader .", "Not sure if you are actually using OSGI or if your framework just breaks ServiceLoader .", "The docs for ServiceLoader say I need to place a file in META-INF services .", "By contrast ServiceLoader does just one thing : it exposes discoverable factories .", "Another thing to bear in mind with ServiceLoader is to try to abstract the lookup mechanism .", "Is it even possible to be half-in and half-out of OSGi when using the ServiceLoader mechanism", "I personally do not like the ServiceLoader under any circumstances .", "Another thing to bear in mind with ServiceLoader is to try to abstract the lookup mechanism .", "Because it limited that one ServiceLoader can only handle classes for one interface .", "I would like to know if I can combine the ServiceLoader with EJB and injection from Java EE 6 .", "I have to define in a META-INF file which Java classes should be gathered by the ServiceLoader .", "Take a look at this ServiceLoader http : www.ibm.com developerworks java library j-5things12 N100BD example .", "The text file has to be named after the Interface the ServiceLoader is looking for and must include the canonical name of the implementing class es .", "ServiceLoader has the Tester class which iterates through the implementors and calls the init method on them .", "include in your question : where how you attempt to access the ServiceLoader what class", "I am trying to find out if there is a Spring analogue of the ServiceLoader class which is part of the standard SDK s API .", "I have an InterfaceService which holds a singleton ServiceLoader and will return the correct implementing class based on a key inside the service .", "If ServiceLoader mostly fits your needs that says that you re looking for service-discovery via the presence of files on the class path .", "However whilst the main resources are still parsed by the ServiceLoader this isn t possible .", "I m using ServiceLoader to instantiate the implementation provided by the integrator and it works just fine .", "It would help we had any idea what serviceloader is .", "I currently have a framework that is split into 12 or 13 jar files that uses the serviceloader mechanism for the core component to scan for modules on the classpath .", "Is neo4j 1.8.3 still supported in a non-ServiceLoader OSGi context and if so what is the proper way to set it up", "Quoting Dianne Hackborn http : stackoverflow.com a 5761705 115145 a key Google engineer working on Android : ServiceLoader is stuff from the Java language that is not really relevant on Android .", "Would you consider using java decompiler to see how the ServiceLoader is used in the 3rd party library", "Also how can I get more debug info from ServiceLoader such as the folders it is searching for the file in", "I ended up using ServiceLoader from JDK 6 and it worked perfectly first time .", "For those interested a little more investigation lead to the fact that this wasn t really Hibernate s problem but more the way the ServiceLoader loads in files .", "The javadoc for ServiceLoader states that it DOES maintain a cache but my mock service does not seem to be cached .", "Then you can just do something like this : .. . .. . And move your ServiceLoader files from META-INF services to services .", "TLDR : I have a working ServiceLoader where I can load in new JARs containing new implementations of an interface during runtime of my application .", "Alternate service styles .. . .. . Say you wanted to apply the ServiceLoader type concept to redesign URL handling and find load the java.net.URLStreamHandler for a specific protocol .", "I didn t use the standard ServiceLoader But my process is quite similiar use a properties to define the plugin classes I need to load .", "In mi application i m using ServiceLoader to load modules classes from .jar file with diferents ClassLoaders in order to completely unload them when not needed from the context of the application and from the JVM itself .", "I ve already managed to create a plugin manager project to test ServiceLoader and it runs just fine but it s a plain console Java application not a web project .", "What are the best practices for using ServiceLoader http : download.oracle.com javase 6 docs api java util ServiceLoader.html in an Environment with multiple ClassLoaders", "If the static ServiceLoader reference is in a shared class then it would initialize itself with the context classloader of the first thread accessing it and perhaps loading an implementation that is not accessible to other webapps .", "Here is my aar file structure : .. . .. . In my Eclipse Development environment my methods run w o any problem but when they run in Axis2 Tomcat platform ServiceLoader class can not load implementation classes .", "Are you saying that using the ServiceLoader architecture you were able to discover services between separate EAR deployments", "In order for the ServiceLoader to find my Plugins there has to be a text file included in my jar under META-INF services .", "The plugins directory is added as expected as one can check calling sysLoader.getURLs but then the iterator given by the ServiceLoader object is empty .", "I have been using Neo4J 1.8.x as an embedded database in an application framework that breaks the regular ServiceLoader used by Neo4j .", "It seems that the relevant code you are linking to still depends on a functional ServiceLoader and hence breaks in my plugin environment", "Just so you know this is possible in fact many recent JSR s like JSR-356 aka javax.websocket rely on ServiceLoader .", "So I am writing a webapp in Eclipse and I want to use the serviceloader in one of my classes .", "When trying to iterate through the ServiceLoader I am not seeing my internal implementation .", "FYI this is in a scala app open to any suggestions ServiceLoader is pretty damn close to what I want .", "Hence ServiceLoader is best used when providers won t overlap or compete with one another .", "Can you elaborate on a simple abstraction for ServiceLoader that would make it easier to migrate to OSGi later .", "The documentation recommends to create and save a single service instance at initialization : .. . .. . This would initialize the ServiceLoader using the current context classloader .", "Always creating a new ServiceLoader seems wasteful performance wise since it has to enumerate and parse service files each time .", "stackoverflow.com questions 1959991 http : stackoverflow.com questions 1959991 when-to-use-serviceloader-over-something-like-osgi", "I do not see any performance issues in my large project with ServiceLoader so I will stick with the JDK solution here .", "A ServiceLoader instantiated in a WebApplication will detect classes defined in the application in addition to those defined in the container .", "Luckily we had loaded the config into memory since we didn t use the standard ServiceLoader .", "Initialize the ServiceLoader on each access passing the context classloader of the current thread as the second parameter .", "Can anybody give me a shot what I m doing wrong here and how to fix it so the concrete class is found by serviceLoader" ] }
{ "confidence": [ 59.00878143310547, 58.257774353027344, 57.499549865722656, 55.90638732910156, 55.178382873535156, 54.48024368286133, 53.071712493896484, 52.123233795166016, 51.82514190673828, 51.02485275268555, 50.861778259277344, 50.73445510864258, 50.428375244140625, 50.386749267578125, 50.075416564941406, 49.520111083984375, 49.16676330566406, 49.15385818481445, 48.855255126953125, 47.60982131958008 ], "content": [ "Question : Being someone who is allergic to dependencies when would I use something like OSGi instead of the built-in java-6 http : java.sun.com javase 6 docs api java util ServiceLoader.html I want to let plugin jars just be dropped in . FYI this is in a scala app open to any suggestions ServiceLoader is pretty damn close to what I want . .. . Answer : As seh points out if you re only interested in simple service-discovery then ServiceLoader is a lightweight way to decouple consumers from providers . But it doesn t offer any assistance with composing services together . For example suppose service A needs to use service B . This is a service dependency .. . but what should A do if B is not available In OSGi we can arrange that if B is not available then neither will A be -- assuming the dependency is mandatory we can also support optional dependencies . On the other hand when using ServiceLoader service A has no control over its availability so long as the JAR enclosing it is on the classpath.. . so it must provide its functionality even in the absence of required back end services . Another thing to bear in mind with ServiceLoader is to try to abstract the lookup mechanism . The publish mechanism is quite nice and clean and declarative . But the lookup via java.util.ServiceLoader is as ugly as hell implemented as a classpath scanner that breaks horribly if you put the code into any environment such as OSGi or Java EE that does not have global visibility . If your code gets tangled up with that then you ll have a hard time running it on OSGi later . Better to write an abstraction that you can replace when the time comes . Comment : Can you elaborate on a simple abstraction for ServiceLoader that would make it easier to migrate to OSGi later . I currently have a framework that is split into 12 or 13 jar files that uses the serviceloader mechanism for the core component to scan for modules on the classpath . I wish for the framework to play nicely in OSGi in the future but not to depend upon OSGi . So far I can t see how to achieve the duality . Is it even possible to be half-in and half-out of OSGi when using the ServiceLoader mechanism Comment : The best abstraction would be something like dependency-injection . In your code that requires some service Foo don t try to lookup that service but simply allow it to be injected through a setFoo method . From some other class make the call to ServiceLoader to get an instance of Foo and inject it into the code that needs it . If you later move to OSGi simply scrap the second class and use Declarative Services or Blueprint to handle injection of OSGi Services .", "Question : I have a project with the following structure : .. . .. . The modules uses ServiceLoader mechanism to register their services . The main class is in main module which is also responsible for loading the services in classpath using ServiceLoader mechanism . The problem is that the main module is not aware of module1 module2 module3 and module4 because they re installed by the user independently . What I want to to is to add all the classes in these modules to classpath when starting the program so that ServiceLoader will be aware of the services in these modules . Currently I m loading these modules at runtime from main module but it doesn t seem to be good way of solving this problem because the IDE doesn t aware of these modules and it seems that it takes much more time to load these modules at runtime . I have looked at how modular Java projects like Elasticsearch and PrestoDB handle this problem but it seems they both load the installed modules at runtime . How do you handle this problem when developing modular Java applications Let s say I have a directory called plugins that has the jar files of the modules the user installed is there any way to start the application with the classpath that contains all the jars in that directory using a maven-plugin Or do I have to load these jars at runtime Comment : This may sound too simple in which case I haven t understood your question correctly : If the jar-files classes exist when you run your application what about simply adding your folder to the classpath -cp folder .. . Answer : Usually the user will start the application from a script or in windows with some configurable java exe launcher . In the script you can simply add the plugin folder to your classpath in a way similar to this :", "Question : I m working on a plugin for a 3rd party software that is quite undocumented . For the plugin I m using a external lib .jar managed by maven and is later on executed on a tomcat server . Everything was working great till I updated to the latest release of the library which now is using java.util.serviceLoader in order to load a concrete implementation of a interface . When build my project has this package structure on a tomcat server : .. . .. . As you can see the external library has the correct services entry which is necessary for the serviceLoader to find the concrete of a interface within META-INF . The content of the full.path.to.TheFactoryInterface file is full.path.to.TheConcreteClass which seems legit . My plugin package as well as the core however do not have any of those META-INF information . What happens now is that every time my plugin is using a method that will trigger the serviceLoader of the external library the serviceLoader is unable to find the concrete implementation . What I already tried is adding the exact same services full.path.to.TheFactoryInterface to all my META-INF directories which is not working I guess I would need to change the content of the full.path.to.TheFactoryInterface file but I m not sure - because of the undocumented plugin structure for the 3rd party software - what the right relative-path would look like . Can anybody give me a shot what I m doing wrong here and how to fix it so the concrete class is found by serviceLoader What META-INF folder should the services folder with it s content be placed in and should I change the paths Is that the error at all or am I missing something compleatly different I understand that this is a very special topic since the 3rd party software is unkown but any information depending serviceLoader and it s behaviour when run across multiple jars with multiple META-INF folders and in different execution context classpaths would be appreciated . Comment : Would you consider using java decompiler to see how the ServiceLoader is used in the 3rd party library And just guessing could it be that it uses the wrong classloader Do you have multiple external.lib.path.TheConreteClass or TheFactoryInterface in classpath Comment : decompiler would be like the last thing ever I d try if nothing else works . Yes I m almost sure it s using the wrong classloader but I dunno how to fix it since the external lib dosn t provide a way to provide a different classloader to the method that is using the serviceLoader . No there are not multiple paths to the conrete in the classpath - checked that already . Comment : There you go use the decompiler .. . Answer : I was able to get it working by extending the external lib so I m able to provide a custom ClassLoader . Turned out the default ClassLoader was wrong . Also I was able to get in touch with the 3rd party tool devs and get the information I needed - call it social decompiling . Everything working now .", "Question : What are the best practices for using ServiceLoader http : download.oracle.com javase 6 docs api java util ServiceLoader.html in an Environment with multiple ClassLoaders The documentation recommends to create and save a single service instance at initialization : .. . .. . This would initialize the ServiceLoader using the current context classloader . Now suppose this snippet is contained in a class loaded using a shared classloader in a web container and multiple web-applications want to define their own service implementations . These would not get picked up in the above code it might even be possible that the loader gets initialized using the first webapps context classloader and provide the wrong implementation to other users . Always creating a new ServiceLoader seems wasteful performance wise since it has to enumerate and parse service files each time . Edit : This can even be a big performance problem as shown in this answer regarding java s XPath implementation http : stackoverflow.com questions 6340802 java-xpath-apache-jaxp-implementation-performance 6341739 6341739 . How do other libraries handle this Do they cache the implementations per classloader do they reparse their configuration everytime or do they simply ignore this problem and only work for one classloader Comment : hi Horstmann Look this you . stackoverflow.com questions 1959991 http : stackoverflow.com questions 1959991 when-to-use-serviceloader-over-something-like-osgi Comment : Take a look at Apache Camel - it handles this problem elegantly both in JEE apps and OSGi note there s a specific module for jboss classloading in the Camel extras package hosted on googlecode Comment : @earcam : can you point me to some more details on how Apache Camel solves this problem Comment : @J rn : there s not a great deal of documentation about as not part of public API apart from camel.apache.org pluggable-class-resolvers.html http : camel.apache.org pluggable-class-resolvers.html Take a look at org.apache.camel.spi.ClassResolver and it s subclasses several in camel-core e.g . OSGi see camel-extras project code.google.com a apache-extras.org p camel-extra source browse http : code.google.com a apache-extras.org p camel-extra source browse trunk components camel-jboss src main java org apachextras camel jboss JBossPackageScanClassResolver.java . Alternatively JBossOSGi claims to be handle ServiceLoader jbossosgi.blogspot.com 2010 01 http : jbossosgi.blogspot.com 2010 01 suns-serviceloader-and-how-it-relates.html .. . Answer : I really like Neil s answer in the link I added in my comment . Due to I have same experences in my recent project . Another thing to bear in mind with ServiceLoader is to try to abstract the lookup mechanism . The publish mechanism is quite nice and clean and declarative . But the lookup via java.util.ServiceLoader is as ugly as hell implemented as a classpath scanner that breaks horribly if you put the code into any environment such as OSGi or Java EE that does not have global visibility . If your code gets tangled up with that then you ll have a hard time running it on OSGi later . Better to write an abstraction that you can replace when the time comes . I actually met this problem in OSGi environment actually it s just eclipse in our project . But I luckily fixed it in a timely fashion . My workaround is using one class from the plugin I want to load and get classLoader from it . That will be a valid fix . I didn t use the standard ServiceLoader But my process is quite similiar use a properties to define the plugin classes I need to load . And I know there is another way to know each plugin s classloader . But at least I don t need to use that . Honest I don t like the generics used in ServiceLoader . Because it limited that one ServiceLoader can only handle classes for one interface . Well is it really useful In my implementation it don t force you by this limitation . I just use one implementation of loader to load all the plugin classes . I don t see the reason to use two or more . Due to the consumer can know from the config files about the relationships between interfaces and implementation . Comment : The breaking horrible part is exactly what I m trying to avoid . The classloader hierarchy should not matter for the user of my library . I would like it to work the same in a standalone script and inside a jee container without requiring additional frameworks or containers like osgi . Comment : @Horst I have reviewed the factory config access things in your link . Luckily we had loaded the config into memory since we didn t use the standard ServiceLoader . Comment : I am not sure how in detail Neil did . But I know how I did it . In my implemtation . I will load those plugins with my own classloader.And for those dependencies luckily they are together with the Loader class itself so I can rely on the classloader of Loader class to find all the dependency class . And those plugin classes are cached in a map with classname as key . So I don t think I have performance concern . It don t rely on any framework . But you just need to ensure it can work in OSGi or JEE environment .", "Question : null .. . Answer : I m looking to make a plugin-based application in Java . For future reference I am using Sphinx4 the latest one to make my program voice-controlled . So far I have gotten the plugin effect to work but that is only because the grammar file is within the application .jar and not that for the plugin . I am wondering if it is possible to load this grammar file with ServiceLoader or a similar function . Is there a way to include it within the META-INF Services file or is there a better more effective way Any response will be greatly appreciated . Comment : You can load the main plugin class via the ServiceLoader and then use the class class loader to resolve resources cl.getClassLoader .getResourceAsStream file.jpg or let the class load files via its cloassloader .", "Question : What are the best practices for using ServiceLoader http : download.oracle.com javase 6 docs api java util ServiceLoader.html in an Environment with multiple ClassLoaders The documentation recommends to create and save a single service instance at initialization : .. . .. . This would initialize the ServiceLoader using the current context classloader . Now suppose this snippet is contained in a class loaded using a shared classloader in a web container and multiple web-applications want to define their own service implementations . These would not get picked up in the above code it might even be possible that the loader gets initialized using the first webapps context classloader and provide the wrong implementation to other users . Always creating a new ServiceLoader seems wasteful performance wise since it has to enumerate and parse service files each time . Edit : This can even be a big performance problem as shown in this answer regarding java s XPath implementation http : stackoverflow.com questions 6340802 java-xpath-apache-jaxp-implementation-performance 6341739 6341739 . How do other libraries handle this Do they cache the implementations per classloader do they reparse their configuration everytime or do they simply ignore this problem and only work for one classloader Comment : hi Horstmann Look this you . stackoverflow.com questions 1959991 http : stackoverflow.com questions 1959991 when-to-use-serviceloader-over-something-like-osgi Comment : Take a look at Apache Camel - it handles this problem elegantly both in JEE apps and OSGi note there s a specific module for jboss classloading in the Camel extras package hosted on googlecode Comment : @earcam : can you point me to some more details on how Apache Camel solves this problem Comment : @J rn : there s not a great deal of documentation about as not part of public API apart from camel.apache.org pluggable-class-resolvers.html http : camel.apache.org pluggable-class-resolvers.html Take a look at org.apache.camel.spi.ClassResolver and it s subclasses several in camel-core e.g . OSGi see camel-extras project code.google.com a apache-extras.org p camel-extra source browse http : code.google.com a apache-extras.org p camel-extra source browse trunk components camel-jboss src main java org apachextras camel jboss JBossPackageScanClassResolver.java . Alternatively JBossOSGi claims to be handle ServiceLoader jbossosgi.blogspot.com 2010 01 http : jbossosgi.blogspot.com 2010 01 suns-serviceloader-and-how-it-relates.html .. . Answer : I personally do not like the ServiceLoader under any circumstances . It s slow and needlessly wasteful and there is little you can do to optimize it . I also find it a bit limited -- you really have to go out of your way if you want to do more than search by type alone . xbean-finder s ResourceFinder .. . .. . ResourceFinder http : svn.apache.org repos asf geronimo xbean tags xbean-3.7 xbean-finder src main java org apache xbean finder ResourceFinder.java is a self-contained java file capable of replacing ServiceLoader usage . Copy paste reuse is no problem . It s one java file and is ASL 2.0 licensed and available from Apache . Before our attention spans get too short here s how it can replace a ServiceLoader .. . .. . This will find all of the META-INF services org.acme.Plugin implementations in your classpath . Note it does not actually instantiate all the instances . Pick the one s you want and you re one newInstance call away from having an instance . Why is this nice How hard is it to call newInstance with proper exception-handling Not hard . Having the freedom to instantiate only the ones you want is nice . Now you can support constructor args Narrowing search scope .. . .. . If you want to just check specific URLs you can do so easily : .. . .. . Here only the some.jar will be searched on any usage of this ResourceFinder instance . There s also a convenience class called UrlSet which can make selecting URLs from the classpath very easy . Alternate service styles .. . .. . Say you wanted to apply the ServiceLoader type concept to redesign URL handling and find load the java.net.URLStreamHandler for a specific protocol . Here s how you might layout the services in your classpath : .. . .. . META-INF java.net.URLStreamHandler foo .. . META-INF java.net.URLStreamHandler bar .. . META-INF java.net.URLStreamHandler baz .. . .. . Where foo is a plain text file that contains the name of the service implementation just as before . Now say someone creates a foo : .. . URL . We can find the implementation for that quickly via : .. . .. . Alternate service styles 2 .. . .. . Say you wanted to put some configuration information in your service file so it contains more than just a classname . Here s an alternate style that resolves services to properties files . By convention one key would be the class names and the other keys would be injectable properties . So here red is a properties file .. . .. . META-INF org.acme.Plugin red .. . META-INF org.acme.Plugin blue .. . META-INF org.acme.Plugin green .. . .. . You can look things up similarly as before . Here s how you could use those properties with xbean-reflect another little library that can give you framework-free IoC . You just give it the class name and some name value pairs and it will construct and inject . Here s how that might look spelled out in long form : .. . .. . The xbean-reflect library is a step beyond the built-in JavaBeans API but a bit better without requiring you to go all the way to a full-on IoC framework like Guice or Spring . It supports factory methods and constructor args and setter field injection . Why is the ServiceLoader so limited Deprecated code in the JVM damages the Java language itself . Many things are trimmed to the bone before being added to the JVM because you cannot trim them after . The ServiceLoader is a prime example of that . The API is limited and OpenJDK implementation is somewhere around 500 lines including javadoc . There s nothing fancy there and replacing it is easy . If it doesn t work for you don t use it . Classpath scope .. . .. . APIs aside in pure practicality narrowing the scope of the URLs searched is the true solution to this problem . App Servers have quite a lot of URLs all by themselves not including the jars in your application . Tomcat 7 on OSX for example has about 40 URLs in the StandardClassLoader alone this is the parent to all webapp classloaders . The bigger your app server the longer even a simple search will take . Caching doesn t help if you intend to search for more than one entry . As well it can add some bad leaks . Can be a real lose-lose scenario . Narrow the URLs down to the 5 or 12 that you really care about and you can do all sorts of service loading and never notice the hit . Comment : Nice answer I m not sure yet if I will use this class but I think it deserves the bounty . Does this also work in a container like JBoss which I think uses its own vfs url-scheme internally Comment : That might throw it for a loop as it understands jar : and file : internally . That said it isn t a lot of code and adding support for another URL scheme would be easy if it could be mapped back to file : and jar : eventually . If you hack issue a pull request bit.ly qfJQXz http : bit.ly qfJQXz Comment : After struggling for a day with ResourceFinder latest version I had a lot of trouble using ResourceFinder . It does not seem to process the META-INF services file properly for comments newlines etc . I ended up using ServiceLoader from JDK 6 and it worked perfectly first time . I do not see any performance issues in my large project with ServiceLoader so I will stick with the JDK solution here . Comment : Thanks for the note though very appreciated . I ll make sure those things are fixed . Comment : So is this able to find an implementation class itself or the the properties file that points to the location", "Question : What are the best practices for using ServiceLoader http : download.oracle.com javase 6 docs api java util ServiceLoader.html in an Environment with multiple ClassLoaders The documentation recommends to create and save a single service instance at initialization : .. . .. . This would initialize the ServiceLoader using the current context classloader . Now suppose this snippet is contained in a class loaded using a shared classloader in a web container and multiple web-applications want to define their own service implementations . These would not get picked up in the above code it might even be possible that the loader gets initialized using the first webapps context classloader and provide the wrong implementation to other users . Always creating a new ServiceLoader seems wasteful performance wise since it has to enumerate and parse service files each time . Edit : This can even be a big performance problem as shown in this answer regarding java s XPath implementation http : stackoverflow.com questions 6340802 java-xpath-apache-jaxp-implementation-performance 6341739 6341739 . How do other libraries handle this Do they cache the implementations per classloader do they reparse their configuration everytime or do they simply ignore this problem and only work for one classloader Comment : hi Horstmann Look this you . stackoverflow.com questions 1959991 http : stackoverflow.com questions 1959991 when-to-use-serviceloader-over-something-like-osgi Comment : Take a look at Apache Camel - it handles this problem elegantly both in JEE apps and OSGi note there s a specific module for jboss classloading in the Camel extras package hosted on googlecode Comment : @earcam : can you point me to some more details on how Apache Camel solves this problem Comment : @J rn : there s not a great deal of documentation about as not part of public API apart from camel.apache.org pluggable-class-resolvers.html http : camel.apache.org pluggable-class-resolvers.html Take a look at org.apache.camel.spi.ClassResolver and it s subclasses several in camel-core e.g . OSGi see camel-extras project code.google.com a apache-extras.org p camel-extra source browse http : code.google.com a apache-extras.org p camel-extra source browse trunk components camel-jboss src main java org apachextras camel jboss JBossPackageScanClassResolver.java . Alternatively JBossOSGi claims to be handle ServiceLoader jbossosgi.blogspot.com 2010 01 http : jbossosgi.blogspot.com 2010 01 suns-serviceloader-and-how-it-relates.html .. . Answer : This question seem to be more complicated than I first anticipated . As I see it there are 3 possible strategies for dealing with ServiceLoaders . 1 . Use a static ServiceLoader instance and only support loading classes from the same classloader as the one holding the ServiceLoader reference . This would work when .. . .. . The service configuration and implementation are in a shared classloader and all child classloaders are using the same implementation . The example in the documentation is geared towards theis use-case . Or .. . .. . Configuration and implementation are put into each child classloader and deployed along each webapp in WEB-INF lib . In this scenario it is not possible to deploy the service in a shared classloader and let each webapp choose its own service implementation . 2 . Initialize the ServiceLoader on each access passing the context classloader of the current thread as the second parameter . This approach is taken be the JAXP and JAXB apis although they are using their own FactoryFinder http : java.net projects jaxp-sources sources svn content trunk jaxp-api src javax xml parsers FactoryFinder.java raw true implementation instead of ServiceLoader . So it is possible to bundle a xml parser with a webapp and have it automatically get picked up for example by DocumentBuilderFactory newInstance . This lookup has a performance impact https : issues.apache.org jira browse XALANJ-2540 but in the case of xml-parsing the time to look up the implementation is small compared to the time needed to actually parse a xml document . In the library I m envisioning the factory itself is pretty simple so the lookup time would dominate the performance . 3 . Somehow cache the implementation class with the context classloader as the key . I m not entirely sure if this is possible in all the above cases without causing any memory-leaks . In conclusion I will probably be ignoring this problem and require that the library gets deployed inside each webapp i.e . option 1b above . Comment : ServiceLoader.load CodecSet.class will use classload in the current thread context.ServiceLoader.load CodecSet.class ClassLoader cl will load the class with classloader you specified . So I think you can use the second API with classloader used in each webapp and certainly each webapp should do this in the initial time . Which means they use different service loader instance . But you can put the libraries in a shared place . Is it right Comment : If the static ServiceLoader reference is in a shared class then it would initialize itself with the context classloader of the first thread accessing it and perhaps loading an implementation that is not accessible to other webapps . Furthermore it would contain a reference to this webapps classloader causing a memory leak on redeploy . Comment : The fact is the classloaders used in webapps are different with the classloader used in loading the shared library . So if the classes in the shared library has dependencies on the classes in the webapp then it will be a big trouble to implement the correct classloader . But if the classes in the shared library are independent then it is possible that we use a system class loader to load them . Then these classes can be shared among all webapps Comment : Using classloaders as a key is going to be rather leaky . Better to use a WeakHashMap Integer Loader and use the hashCode of the classloader as key instead of an instance of said classloader . That way if a thread gets GC d it s classloader won t leak and if no other threads see the Loader it will get GC d as well .", "Question : What are the best practices for using ServiceLoader http : download.oracle.com javase 6 docs api java util ServiceLoader.html in an Environment with multiple ClassLoaders The documentation recommends to create and save a single service instance at initialization : .. . .. . This would initialize the ServiceLoader using the current context classloader . Now suppose this snippet is contained in a class loaded using a shared classloader in a web container and multiple web-applications want to define their own service implementations . These would not get picked up in the above code it might even be possible that the loader gets initialized using the first webapps context classloader and provide the wrong implementation to other users . Always creating a new ServiceLoader seems wasteful performance wise since it has to enumerate and parse service files each time . Edit : This can even be a big performance problem as shown in this answer regarding java s XPath implementation http : stackoverflow.com questions 6340802 java-xpath-apache-jaxp-implementation-performance 6341739 6341739 . How do other libraries handle this Do they cache the implementations per classloader do they reparse their configuration everytime or do they simply ignore this problem and only work for one classloader Comment : hi Horstmann Look this you . stackoverflow.com questions 1959991 http : stackoverflow.com questions 1959991 when-to-use-serviceloader-over-something-like-osgi Comment : Take a look at Apache Camel - it handles this problem elegantly both in JEE apps and OSGi note there s a specific module for jboss classloading in the Camel extras package hosted on googlecode Comment : @earcam : can you point me to some more details on how Apache Camel solves this problem Comment : @J rn : there s not a great deal of documentation about as not part of public API apart from camel.apache.org pluggable-class-resolvers.html http : camel.apache.org pluggable-class-resolvers.html Take a look at org.apache.camel.spi.ClassResolver and it s subclasses several in camel-core e.g . OSGi see camel-extras project code.google.com a apache-extras.org p camel-extra source browse http : code.google.com a apache-extras.org p camel-extra source browse trunk components camel-jboss src main java org apachextras camel jboss JBossPackageScanClassResolver.java . Alternatively JBossOSGi claims to be handle ServiceLoader jbossosgi.blogspot.com 2010 01 http : jbossosgi.blogspot.com 2010 01 suns-serviceloader-and-how-it-relates.html .. . Answer : Mu . In a 1x WebContainer - Nx WebApplication system the ServiceLoader instantiated in the WebContainer will not pick up any classes defined in WebApplications just those in the container . A ServiceLoader instantiated in a WebApplication will detect classes defined in the application in addition to those defined in the container . Keep in mind WebApplications will need to be kept separate are designed that way things will break if you try and circumvent that and they are not the method and system available to extend the container - if your library is a simple Jar just drop it into the appropriate extension folder of the container .", "Question : I m trying to make VertX Mertrics http : vertx.io docs vertx-dropwizard-metrics java work when running via the exec : java Maven plugin . All works as expected when I package the application into a fatjar and run it with java -jar fat.jar -conf config.json -Dvertx.metrics.options.enabled true .. . .. . When I run it with mvn clean package exec : java -DskipTests I see : 2016-03-22 18 : 39 : 58.833 WARN i.v.c.i.VertxImpl : 348 - Metrics has been set to enabled but no VertxMetricsFactory found on classpath .. . .. . I tried several approaches : .. . .. . adding io.vertx : vertx-dropwizard-metrics : 3.2.1 as compile dependency .. . create an in-house metrics implementation and register it by means of src main resources META-INF services io.vertx.core.spi.VertxMetricsFactory file double-checked that it s actually copied to target classes META-INF services io.vertx.core.spi.VertxMetricsFactory .. . also adding basedir src main resources as additional classpath element in addition to previous point .. . .. . I have double-checked in the debugger that ServiceLoader actually returns an empty iterator . This is my exec-plugin config : plugin groupId org.codehaus.mojo groupId artifactId exec-maven-plugin artifactId configuration additionalClasspathElements element basedir src main resources element additionalClasspathElements mainClass io.vertx.core.Launcher mainClass commandlineArgs run vertx.mainVerticle -conf vertx.config commandlineArgs systemProperties systemProperty key vertx.logger-delegate-factory-class-name key-value io.vertx.core.logging.SLF4JLogDelegateFactory value systemProperty systemProperty key vertx.metrics.options.enabled key-value true value systemProperty systemProperties configuration plugin .. . .. . Here is exec : exec configuration that does work but I want to understand if and why it s im- possible to do it with exec : java .. . .. . profile id exec id build plugins plugin groupId org.codehaus.mojo groupId artifactId exec-maven-plugin artifactId executions execution goals goal exec goal goals phase process-classes phase configuration executable java executable arguments argument -Dvertx.metrics.options.enabled true argument argument -Dvertx.logger-delegate-factory-class-name vertx.logger-delegate-factory-class-name argument argument -classpath argument classpath argument io.vertx.core.Launcher argument argument run argument argument vertx.mainVerticle argument argument -conf argument argument vertx.config argument arguments configuration execution executions plugin plugins build profile .. . Answer : Did you try exec : exec instead of exec : java exec : exec runs in a separate process and this might solve your problem . ServiceLoader uses the application class loader to load any classes listed in META-INF services . This is why ServiceLoader often does not work in environments with custom class loaders e.g . OSGi . Since Maven constructs its own class loader for each Maven plugin even if you declare compile-time dependencies containing your SPI these classes will only be visible to the Maven class loader but not to the application class loader . Comment : I know I could use exec : exec as this would be equivalent to running java directly from CLI . I d be interested to find out how exactly Maven classloader precludes using ServiceLoader . Where can I find the details for how the custom classloader is expected to operate What if I added the SPI to the plugins deps Comment : There are no special requirements for a custom class loader . It s the difference between ServiceLoader.loadClass Class and ServiceLoader.loadClass Class ClassLoader . If the SPI consumer uses the first variant without explicit class loader then the system class loader will be used .", "Question : I have a maven application and I like to use the ServiceLoader mechanism to load plugins . Currently I achieve this by adding the dependency to the pom so that the dependency jar is in the classpath and the ServiceLoader can pick it up . But how can this be achieved without declaring the dependency in the pom I don t like to change the pom with every plugin that shall be used . How can I do this - or must the plugin jar always be in the pom Comment : How are you running your application Comment : Currently I use GrizzlyHttpServerFactory.createHttpServer to create a server . Its ResourceConfig shall load the plugins via the ServiceLoader . I guess when its more stable the idea is to use tomcat or similar . Comment : So are you building a JAR If so how are you running it You can always manually download these plugins and add them to the classpath yourself when running your app - but there is no way for Maven to read your mind and know you want them present without declaring them in your POM . Comment : yes - for now I m building a jar . I know that maven cannot read my mind therefore I asked . I simply forgot the URLClassloader though and could work this out with it see my answer . thanks for the help .. . Answer : I was blind.. . I simply can use the URLClassloader to load all plugin jars from a folder of my application . .. . .. . This is valid and works for the setup now .", "Question : I am very new to java and android development and to learn I am trying to start with an application to gather statistics and information like munin does . I am trying to be able to load plugins in my application . These plugins are already in the application but I don t want to have to invoke them all separately but be able to iterate over them . I was trying to use serviceloader but could never get the META-INF services into my apk . So I am wondering if it is possible to use serviceloader on android Thanks .. . EDIT : I am asking about java.util.ServiceLoader I think it should but I can t figure out how to get my services folder into META-INF on the apk Comment : It would help we had any idea what serviceloader is . Comment : I am asking about java.util.ServiceLoader I think it should but I can t figure out how to get my services folder into META-INF on the apk Comment : I m trying this myself and I found this person http : groups.google.com group android-developers browse thread thread ba98351e50897499 2c96aecee4ece3d0 who has managed to do it unfortunately he s kind of light on the details . I ve asked for some more info and if he gets back to me I ll be sure to let you know here : Comment : There are more details in the info indicated by @SubmittedDenied in Android issue 17450 https : code.google.com p android issues detail id 17450 can 1 q ServiceLoader colspec ID 20Type 20Status 20Owner 20Summary 20Stars but I have not been able to reproduce it for my project - modification to the apk happens after signing and thus cannot be installed Comment : Possible duplicate of Keep META-INF services -files in apk http : stackoverflow.com questions 16898409 keep-meta-inf-services-files-in-apk Since the author of this question hasn t been online since 2011 I didn t post my answer here . .. . Answer : ServiceLoader is stuff from the Java language that is not really relevant on Android . I recommend not using it . If you just want to find a list of classes within your .apk to load there are all kinds of ways to do this -- put in XMl file in res xml that lists them use reflection annotations etc . Comment : I am having trouble finding much information on either of the methods you suggested to load plugins without me specifying every one to run by hand . I could really use a good link or example because I am a major java noob Thanks Comment : The ServiceLoader class is included in Android API level 9 so it is relevant . Including the list of implementing classes in a resource file won t work as it needs to go into the a file called META-INF services ServiceInterface in the APK .", "Question : I have a ServiceLoader that tries to load anything that extends Plugin . It is not finding anything even though I have the service file set up . Source code com.otabi.firestar.pajamatale.plugin.loader.PluginFinder is the class : https : github.com firestar115 PajamaTale .. . .. . The plugin : https : github.com firestar115 PajamaTest .. . .. . What am I doing wrong here Why doesn t the Plugin show up and print Test Kappa Comment : What is the question Comment : How am I able to have JARs that aren t in my classpath show up in the ServiceLoader @NicolasFilotto .. . Answer : You need to create an instance of URLClassLoader to which you provide the url of the directories that contain your plugins with the context ClassLoader as parent ClassLoader I mean Thread.currentThread .getContextClassLoader and use ServiceLoader.load Plugin.class myURLClassLoader instead of ServiceLoader.load Plugin.class that uses internally the context ClassLoader which is not enough in your case as your plugins are not in your classpath . Something like : Comment : So basically ServiceLoader.load new URLClassLoader plugins Comment : yes this is the idea with the context classloader as parent classloader Comment : For creating the URL do I use a file : protocol or just use the normal plugin Comment : you need an URL that you can get with new File foo .toURI .toURL Comment : Can you provide a method example in the answer", "Question : null .. . Answer : Quick background on the setup technology : .. . .. . I have setup a basic Service Provider Interface https : docs.oracle.com javase tutorial ext basics spi.html for my application . I am developing a system that will run tests on certain items . I have successfully taken the first tester and decoupled it from my program using the SPI . The JAR created for the new service contains the needed META-INF services file with the name of the interface as the name which contains the class that is implementing that interface . I am dynamically loading in the JAR containing the Service and then calling a ServiceLoader.reload on my loader . I am bringing the JAR in using reflection which works it s for a specific requirement of users being able to load these service modules in after startup without needing to modify code or anything . I have an InterfaceService which holds a singleton ServiceLoader and will return the correct implementing class based on a key inside the service . TLDR : I have a working ServiceLoader where I can load in new JARs containing new implementations of an interface during runtime of my application . I pass the class signature into my app and a JAR path it then loads it in using reflection wizardry and reloads the loader making the new implementation available . .. . .. . The problem here is I have the requirement for one of these service implementations to live within the same project as the code that is pulling these new JAR files . This project is not a JAR but a WAR I am deploying . The new service I want to dynamically load is within the class path of the application since it is built and deployed with it . When trying to iterate through the ServiceLoader I am not seeing my internal implementation . I have tried a few places to include the META-INF services xyz file but the loader still doesn t seem to be able to pickup this internal class . Should I bundle my WAR as a JAR too and pull that in seems dangerous Is there a way to point the ServiceLoader at this internal class Is there a better solution I m not seeing", "Question : null .. . Answer : I have been using Neo4J 1.8.x as an embedded database in an application framework that breaks the regular ServiceLoader used by Neo4j . So far I ve worked around this issue by using the OSGi instructions for Neo4j http : docs.neo4j.org chunked 1.8.3 tutorials-java-embedded-osgi.html . This has worked great . However these OSGi instructions no longer work for 1.9.0 1.9.1 or 2.0.0-M03 . When initializing the embedded database I get this exception : .. . .. . I am aware that the OSGi setup instructions have changed from 1.9.0 and higher versions OSGI http : docs.neo4j.org chunked 2.0.0-M03 tutorials-java-embedded-osgi.html but the new initialization methods do not address the issue . Is neo4j 1.8.3 still supported in a non-ServiceLoader OSGi context and if so what is the proper way to set it up Comment : The service loading code has changed quite a bit in Neo4j 1.9 and above : github.com neo4j neo4j blob 1.9.1 community kernel src main https : github.com neo4j neo4j blob 1.9.1 community kernel src main java org neo4j helpers Service.java You aren t able to load a cache : github.com neo4j neo4j blob 1.9.1 community kernel src main https : github.com neo4j neo4j blob 1.9.1 community kernel src main java org neo4j graphdb factory GraphDatabaseSettings.java L394 Though I don t know why . Comment : Right it did change . It seems that the relevant code you are linking to still depends on a functional ServiceLoader and hence breaks in my plugin environment Comment : I m guessing yes . Have you tried the META-INF services directory It looks like you can bootstrap neo4j a standard way as long as you have your services directory in order since neo4j will use ServiceLoader and ServiceLoader will look into META-INF services folder . EDIT : Oh Not sure if you are actually using OSGI or if your framework just breaks ServiceLoader . In the latter case best bet may be to patch neo4j yourself it s why I gave you the source code link . blog.osgi.org 2013 02 javautilserviceloader-in-osgi.html http : blog.osgi.org 2013 02 javautilserviceloader-in-osgi.html", "Question : I am writing a web app in Eclipse . I am trying to use the ServiceLoader class to load some plugins . The docs for ServiceLoader say I need to place a file in META-INF services . I have placed the file in the WebContent META-INF service folder but when I run the JUnit test via Eclipse it does not find any plugins . Is this the correct location for the file Also how can I get more debug info from ServiceLoader such as the folders it is searching for the file in .. . Answer : The META-INF services should be at the root of the jar file or resource directory in the classpath of the classloader used to locate plugins . If you have a web application then you can have directory structure like : .. . .. . But the ideal way is to have it in your plugin s jar file . E.g if you have a plugin bundled as WEB-INF lib myplugin.jar and your plugin class is com.example.plugin.MyPlugin Then the jar should have a structure : .. . .. . Having done that you can get a service loader using your web application s class loader Comment : OK I have got it working now Never would have guessed it goes in the WEB-INF folder I will use you idea of creating a JAR file for it later when I get a Ant script going . Comment : @Leith cool but make that change about jar files sooner than later :", "Question : What are the best practices for using ServiceLoader http : download.oracle.com javase 6 docs api java util ServiceLoader.html in an Environment with multiple ClassLoaders The documentation recommends to create and save a single service instance at initialization : .. . .. . This would initialize the ServiceLoader using the current context classloader . Now suppose this snippet is contained in a class loaded using a shared classloader in a web container and multiple web-applications want to define their own service implementations . These would not get picked up in the above code it might even be possible that the loader gets initialized using the first webapps context classloader and provide the wrong implementation to other users . Always creating a new ServiceLoader seems wasteful performance wise since it has to enumerate and parse service files each time . Edit : This can even be a big performance problem as shown in this answer regarding java s XPath implementation http : stackoverflow.com questions 6340802 java-xpath-apache-jaxp-implementation-performance 6341739 6341739 . How do other libraries handle this Do they cache the implementations per classloader do they reparse their configuration everytime or do they simply ignore this problem and only work for one classloader Comment : hi Horstmann Look this you . stackoverflow.com questions 1959991 http : stackoverflow.com questions 1959991 when-to-use-serviceloader-over-something-like-osgi Comment : Take a look at Apache Camel - it handles this problem elegantly both in JEE apps and OSGi note there s a specific module for jboss classloading in the Camel extras package hosted on googlecode Comment : @earcam : can you point me to some more details on how Apache Camel solves this problem Comment : @J rn : there s not a great deal of documentation about as not part of public API apart from camel.apache.org pluggable-class-resolvers.html http : camel.apache.org pluggable-class-resolvers.html Take a look at org.apache.camel.spi.ClassResolver and it s subclasses several in camel-core e.g . OSGi see camel-extras project code.google.com a apache-extras.org p camel-extra source browse http : code.google.com a apache-extras.org p camel-extra source browse trunk components camel-jboss src main java org apachextras camel jboss JBossPackageScanClassResolver.java . Alternatively JBossOSGi claims to be handle ServiceLoader jbossosgi.blogspot.com 2010 01 http : jbossosgi.blogspot.com 2010 01 suns-serviceloader-and-how-it-relates.html .. . Answer : Have you tried using the two argument version so that you can specify which classloader to use Ie java.util.ServiceLoader.load Class ClassLoader", "Question : I have a web application that defines a Hibernate Integrator as part of the Java ServiceLoader specification like so : .. . .. . src main resources META-INF services org.hibernate.integrator.spi.Integrator .. . .. . This is done according to the Hibernate guide here http : docs.jboss.org hibernate orm 4.0 devguide en-US html ch07.html services-IntegratorService . My issue is that when I try to perform unit tests the main Integrator descriptor is still parsed and instantiated . This means that because I m mocking a large portion of the application in unit tests when the integrator tries to run it encounters errors which causes my tests to fail . I ve defined the same file in the test resources : .. . .. . src test resources META-INF services org.hibernate.integrator.spi.Integrator .. . .. . but instead I find that both test and main integrator files are parsed . I expected that the test resource would overwrite the main resource thus rendering the main resource obscolete but that s not what happens . As both files are on the classpath I m running the tests through Maven with the surefire-plugin which puts both test-classes and classes on the classpath . A similar thing happens with persistence.xml . In my unit-testing environment I don t want any Integrators to be instantiated because I want to control the construction of these beans as manually as possible . Give that I m testing units of execution I don t want additional beans such as Integrators lying around that may affect the running of the tests . I think this is a perfectly legitimate requirement during unit-testing . However whilst the main resources are still parsed by the ServiceLoader this isn t possible . The solution I ve come to do is based on the persistence.xml solution posted here : .. . .. . How to configure JPA for testing in Maven http : stackoverflow.com questions 385532 how-to-configure-jpa-for-testing-in-maven .. . .. . My question is whether there s a better way of excluding main resources from being processed during unit-testing than forcing renaming especially in the context of ServiceLoader files To try and summarize it a bit better : .. . .. . What happens when you have two files both named after the same service interface on the classpath To me it seems that all services within both files are instantiated . There is no overwriting it would seem . .. . Answer : For those interested a little more investigation lead to the fact that this wasn t really Hibernate s problem but more the way the ServiceLoader loads in files . From the API http : docs.oracle.com javase 6 docs api java util ServiceLoader.html : .. . .. . If a particular concrete provider class is named in more than one configuration file or is named in the same configuration file more than once then the duplicates are ignored . Unfortunately this only pertains to concrete classes . So if I specify two copies of the same file in the form : .. . .. . org.emmerich.MyServiceInterface .. . .. . then MyServiceImpl is only instantiated once . However if I specify two files with two different implementation classes then both implementations are instantiated . This isn t really good for unit-testing where you want a bit finer control on where your services are instantiated . I don t really know enough about the design decisions behind it but Hibernate s use of this makes it harder to unit test . Anyways the solution I came up with was to delegate the overriding of main resources to a file I had control over like a properties file . Inside the service I now check whether a flag is true or false in that properties file . In my main resource it s true . In my test it s false . Because looking up the properties hits the first file on the classpath I know it ll get the test resource . My structure looks like this : .. . .. . And in MyIntegrator : .. . .. . When I run in a test environment the properties file lookup points to the test resource . Outside of a test environment it points to the main resource .", "Question : I am very new to java and android development and to learn I am trying to start with an application to gather statistics and information like munin does . I am trying to be able to load plugins in my application . These plugins are already in the application but I don t want to have to invoke them all separately but be able to iterate over them . I was trying to use serviceloader but could never get the META-INF services into my apk . So I am wondering if it is possible to use serviceloader on android Thanks .. . EDIT : I am asking about java.util.ServiceLoader I think it should but I can t figure out how to get my services folder into META-INF on the apk Comment : It would help we had any idea what serviceloader is . Comment : I am asking about java.util.ServiceLoader I think it should but I can t figure out how to get my services folder into META-INF on the apk Comment : I m trying this myself and I found this person http : groups.google.com group android-developers browse thread thread ba98351e50897499 2c96aecee4ece3d0 who has managed to do it unfortunately he s kind of light on the details . I ve asked for some more info and if he gets back to me I ll be sure to let you know here : Comment : There are more details in the info indicated by @SubmittedDenied in Android issue 17450 https : code.google.com p android issues detail id 17450 can 1 q ServiceLoader colspec ID 20Type 20Status 20Owner 20Summary 20Stars but I have not been able to reproduce it for my project - modification to the apk happens after signing and thus cannot be installed Comment : Possible duplicate of Keep META-INF services -files in apk http : stackoverflow.com questions 16898409 keep-meta-inf-services-files-in-apk Since the author of this question hasn t been online since 2011 I didn t post my answer here . .. . Answer : I ve figured out a solution that may work for some situations . Instead of ServiceLoader I m using the org.openide.util.Lookup class-library that comes with NetBeans - it is a superset of ServiceLoader . It does not require NetBeans itself and seems to work ok with Eclipse . It is necessary to replace whatever ServiceLoader functionality you are using in your application with Lookup equivalents and add the org-openide-util-lookup library . Then you can just do something like this : .. . .. . And move your ServiceLoader files from META-INF services to services . Note that because of the ProxyLookup this will continue to work on standard Java environments unchanged i.e . in those cases it will continue to look in META-INF services . Here is a link-to the documentation for the library : http : bits.netbeans.org dev javadoc org-openide-util-lookup org openide util lookup Lookups.html .. . .. . UPDATE .. . .. . After working with this for a couple of days it seems to function well - I move between environments standard Java and Android and it works properly in each location . The primary downside is having to manually copy the files to the services directory . Comment : Lookup is relevant for Java not for Android . this will continue to work on standard Java environments unchanged not Android . Comment : No Lookup works on Android you just have to include the library jar org-openide-util-lookup.jar in the app . My point was that the code I included works properly in both Android and standard Java environments because of the Proxy aspect .", "Question : null .. . Answer : There is a similar question http : stackoverflow.com q 3142515 1735836 out here on this topic but there has got to be an answer . Maybe I can make it more clear in my description of what I am trying to do . I am using Ren Link s source code from this answer http : stackoverflow.com a 34462277 1735836 . He wrote a blog about a pluggable architecture with standard java here http : www.link-intersystems.com blog 2016 01 02 a-plug-in-architecture-implemented-with-java and also provides the source code https : github.com link-intersystems blog tree master java-plugin-architecture on GitHub . I followed all of the instructions and I cannot load the services from a unit test because I m not using JARs . Then I found a simple ServiceLoader Tutorial http : www.tutorialspoint.com java util serviceloader load loader.htm . I made my own project and copied the code directly into my classes of the same name and it worked . I think I figured out the difference or problem : The Interface or Abstract ServiceProvider in the multi-module project is in a different project than the ServiceProvider s implementation . Here is a screen-capture of the multi-module Java Plugin Architectrue Blueprint project . JavaPluginArchitectureBlueprint.JPG http : i.stack.imgur.com 2cpen.jpg .. . .. . Notice that the GreetingService Interface is located in the java-spi project but the CasualGreetingService implementation class is located in the java-spi-casual-greeting-service project which is where the META-INF services folder is located . Following is my simple ServiceLoader Tutorial project . Notice that the ServiceProvider Abstract class and ServiceImplementation are located in the same project as is also the META-INF services folder . TestingServiceProvider.JPG http : i.stack.imgur.com Ni7Me.jpg .. . .. . So the question becomes How do you configure a multi-module project to find the META-INF services folders for the appropriate module projects Comment : In the interest of time I ended up creating a test project with everything in it just like the ServiceLoader Tutorial project . I would still like to know if there is a way to configure a multi-module project to find SPIs .", "Question : Being someone who is allergic to dependencies when would I use something like OSGi instead of the built-in java-6 http : java.sun.com javase 6 docs api java util ServiceLoader.html I want to let plugin jars just be dropped in . FYI this is in a scala app open to any suggestions ServiceLoader is pretty damn close to what I want . .. . Answer : If ServiceLoader mostly fits your needs that says that you re looking for service-discovery via the presence of files on the class path . That s only a small part of what OSGi provides . OSGi will let you dynamically install bundles advertise services revoke advertisements and uninstall bundles all while the application is running . Furthermore as a consumer of services you can look them up eagerly -- with filtering predicate queries -- and detect when offered service providers come and go . These bundles need not lie on the class path and they can be provided in various forms Jar files and exploded directories are the two I recall . By contrast ServiceLoader does just one thing : it exposes discoverable factories . Usually you ll create a factory-style interface that takes some argument to decide whether that provider can offer the appropriate service such as mapping a given character set name to a CharsetDecoder . There s no formalized protocol for acquiring and releasing a service from such a provider . OSGi does formalize the binding and unbinding of consumers to services . The consumer can receive notification when new providers come online and the provider can receive notification when a consumer acquires and releases a service instance . If this life-cycle control is important to your service and you forgo OSGi you ll have to build this yourself ServiceLoader doesn t go that far . Alternately rather than eager service lookup and use you can take a more passive declarative approach and let one of the OSGi dependency managers match your stated needs to the available service providers . There are many dependency managers to choose from . Spring Dynamic Modules http : www.springsource.org osgi is one of the most capable . OSGi provides many other middleware facilities . I won t try to sell you on them here as your question focuses mostly on what you d be missing out on by choosing ServiceLoader . Comment : Thanks - always hard to really know what OSGi is . No I really only need what ServiceLocator has and I appreciate that it is built-in . I was just suspicious having not heard of it before I thought it must be diseased or something . Comment : I use ServiceLoader on a current project and the only frustrations I ve found are 1 with the need to push extensions as Jar files onto the class path our applications do not encourage end-user fiddling with the class path and 2 the unspecified order by which sibling providers of the same service interface will be exposed to a consumer . The latter makes it hard to incorporate a priority such as that user-provided extensions should be preferable to the application s basic services . Hence ServiceLoader is best used when providers won t overlap or compete with one another ." ] }
[ "yes-answer-long", "yes-answer-short" ]
providers
UNK_RELATION
hornetq@asynchronous@38
hornetq -- hornetq is an open-source @placeholder messaging project from jboss .
{ "confidence": [ 49.10621643066406, 46.83271026611328, 46.085205078125, 46.085205078125, 46.085205078125, 44.538307189941406, 42.990760803222656, 42.831871032714844, 42.745941162109375, 42.295936584472656, 41.993064880371094, 41.993064880371094, 41.89540481567383, 41.89540481567383, 41.502532958984375, 40.955291748046875, 40.953651428222656, 40.953651428222656, 40.855987548828125, 40.80979919433594, 40.61410903930664, 40.61410903930664, 40.61410903930664, 40.395484924316406, 40.33210754394531, 40.24588394165039, 40.147071838378906, 39.707881927490234, 39.707881927490234, 39.707881927490234, 39.707881927490234, 39.707881927490234, 39.57469177246094, 39.57469177246094, 39.57469177246094, 39.57469177246094, 39.5307731628418, 39.43291473388672, 38.953033447265625, 38.953033447265625, 38.84980010986328, 38.463157653808594, 38.38363265991211, 38.347434997558594, 38.32892608642578, 38.28898620605469, 38.24653625488281, 38.210391998291016, 37.96398162841797, 37.96398162841797, 37.96398162841797, 37.93031692504883, 37.91361999511719, 37.91361999511719, 37.91361999511719, 37.91361999511719, 37.27126693725586, 36.9344367980957, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.722198486328125, 36.667850494384766, 36.667850494384766, 36.64360046386719, 36.62730026245117, 36.566627502441406, 36.480979919433594, 36.480979919433594, 36.480979919433594, 36.480979919433594, 36.480979919433594, 36.480979919433594, 36.480979919433594, 36.406463623046875, 35.89501953125, 35.68278121948242, 35.68278121948242, 35.68278121948242, 35.68278121948242, 35.68278121948242, 35.68278121948242, 35.68278121948242, 35.68278121948242, 35.68278121948242, 35.68278121948242, 35.67879867553711, 35.67879867553711, 35.441566467285156, 35.31675720214844, 35.26719284057617 ], "content": [ "hornetq-configuration.xml in client Jboss node .", "QSA .. . .. . hornetq-beans.xml .. . .. . hornetq-configuration.xml .. . .. . hornetq-jms.xml .. . .. . QSB .. . .. . hornetq-beans.xml .. . .. . hornetq-configuration.xml .. . .. . hornetq-jms.xml", "Now server-side Jboss HornetQ settings .", ".. . .. . Edit the hornetq-configuration.xml in Server Jboss and change the section .", "Is that possible to run HornetQ JBoss JMS implementation on Tomcat", "Server A - HornetQ live Server1 and HornetQ BackupServer2 .. . 2 .", "The bridge is configured on the Jboss EAP 6.3 side - in standalone.xml and the aim is to listen to local HornetQ topic and publish to remote Jboss Messaging .", "work hornetq .", "JBoss Messaging offered the slow-consumer option at the connection factory and hornetq offers the consumer window size .", "The jars to copy are : .. . hornetq-bootstrap.jar .. . hornetq-core.jar .. . hornetq-jboss-as-integration.jar .. . hornetq-jms.jar .. . hornet-logging.jar .. . netty.jar .. . Copy resource adapter from hornetq pack to deploy and rename it from hornetq-ra.rar to jms-ra.rar effectively replacing old version in step 2 above .. . Copy client libs from HornetQ pack to JBOSS HOME client .", "But it s not possible to configure it for browsing in JBoss EAP 6.3 HornetQ 2.3 .", "I am trying to listen to a topic hosted on JBOSS with Hornetq .", "I mean the xml configurations in hornetq-jms.xml and hornetq-configuration.xml .", "What I need is an example hornetq-configuration.xml and hornetq-jms.xml demonstrating this .", "In HornetQ the core server is protocol API agnostic - it s a generic messaging server .", "JBoss .. . .. . 1 . prepare HornetQ .. . 2 . prepare Oracle .. . 3 . commit HornetQ .. . 4 . commit Oracle .. . .. . What happens if the message consumer starts reading the data after commit is completed in HornetQ but is still being executed in Oracle", "If you are using JBoss HornetQ might have better integration .", "Is there anyway by which I can upgrade HornetQ version in JBoss 6 AS", "The jars to copy are : .. . hornetq-core-client.jar .. . hornetq-jms-client.jar .. . netty.jar", "The HornetQ documentation is all about JBoss AS or standalone scenarios.. . .. . .. . Update : .. . This is from HornetQ feature list : HornetQ is architected as a set of Plain Old Java Objects it can therefore be run in JBoss Microcontainer Spring Google Guice or embedded in any third party product and instantiated directly .", "JTB should work with HornetQ .", "JBoss2 hornetQ configs .", "This is done by changing the hornetq-jms.xml :", "HornetQ Core API is a proprietary API from HornetQ while the JMS API is a standard API defined by the Java Community Process .", "I try to setup JMS bridge between HornetQ built-in Jboss EAP 6.3 and Jboss Messaging topic hosted on Jboss 4.2.2 .", "Also the hornetq Author s say .. . .. . http : hornetq.blogspot.com 2011 06 hornetq-on-jboss-as7.html .. . .. . Can some guru s throw some light on this", "The HornetQ mailing list jboss.org hornetq community.html http : www.jboss.org hornetq community.html is currently very active since they re gearing up for thw 1.0 release .", "I have looked at the Apache Activemq Artemis formerly Jboss HornetQ .", "I setup HornetQ clustering in jboss7.1.1 2 standalone clustered jboss servers .", "This is probably to make sure HornetQ registers its stuff into JBoss JNDI context .", "Does this attribute in JBoss 7 HornetQ refer to temporary queues", "All observations are based on JBoss 7.1.1.Final with HornetQ Server 2.2.13.Final .", "HornetQ participating in an XA transaction .", "HornetQ is very simple to use .", "HornetQ wins in performance and reliability .", "Why HornetQ over ActiveMQ", "Yes but unless you have completely reimplemnted the HornetQ client you will be using hornetq jars to connect to the message broker .", "I have a client run in JBoss JB Client and it needs to send messages to a remote Jboss server JB Server HornetQ .", "I am using hornetq 2.4 .", "And the final test is to kill the prime hornetq .", "This from HornetQ feature list : HornetQ is architected as a set of Plain Old Java Objects it can therefore be run in JBoss Microcontainer Spring Google Guice or embedded in any third party product and instantiated directly .", "Chances a networking problem then some of the things I would do : .. . .. . 1 Ping HornetQ from the problematic client and ping the client from the HornetQ server .", "I am using JBoss-6.0.0 AS which by default comes with HornetQ-2.1.2 version but this version of HornetQ has-many Iteration related bugs which are now resolved in HornetQ-2.2.5 version which by default comes with JBoss 7 AS .", "My hornetq-jms.xml looks like this : .. . .. . The section connection-factory is copy-paste from the link above but I got the error : .. . .. . This may be JBoss-6 related because in other environments this seems to work : force order of messages with HornetQ http : stackoverflow.com questions 4085270 force-order-of-messages-with-hornetq", "There are method on the management with hornetQ 2.2.2+ .", "Setup my classpath to use the HornetQ 2.2.5 libraries .", "JBOSS with embedded HornetQ is another server and Spring Web is running on Tomcat Server .", "so hornetq server will deliver messages from the queue or topic", "For an example how to use a topic with JMS via HornetQ I stongly recommend the examples that come with HornetQ itself .", "The idea is this : .. . .. . A notification gets posted to a topic on HornetQ server A .. . This notification gets sent to a topic on HornetQ server B over a bridge", "Yes because as I have said here Hornetq-core api is a proprietary API hence it will only work on HornetQ .", "We are trying using HornetQ for messaging on Jboss AS 7.1 and the documentation at .. . .. . https : docs.jboss.org author display AS71 Messaging+configuration says .. . .. . There is also a pooled-connection-factory which is special in that it leverages the outbound adapter of the HornetQ JCA Resource Adapter .", "HornetQ is significantly faster than ActiveMQ .", "HornetQ only requires netty and slf4j .", "HornetQ only supports file persistence .", "Are you sur HornetQ is started correctly", "I m the founder of the HornetQ project although I don t work on it any more .", "However HornetQ does not distinguish internally the destinations topic or queue since it tries to be a generic messaging middleware .", "what s the fastest way to push millions of messages into HornetQ", "What would you recommend for massive inserts into HornetQ", "I read the hornetQ documentation confused a lot .", "In HornetQ all topics or queues are implemented as addresses and queues .", "All he has to do is to add it to hornetq-jms.xml", "Specifically which version of HornetQ it s running", "I have a bit of understanding problems using hornetQ .", "I have running HornetQ server locally .", "I don t believe this has anything to do with HornetQ .", "I am using HornetQ 2.2.14.Final .", "I have few questions regarding HornetQ : .. . .. . 1 .", "queues can be created per HornetQ instance", "You can stop the Queue on HornetQ .", "I can t speak to the hornetq issue .", "Is there a way to verify that HornetQ is ready to accept connections from outside the application server", "Im trying to migrate from default JbossMQ for Jboss 4.0.5 GA to a embebed HornetQ 2.2.14 .", "So below is suitable module.xml at least for for Jboss Messaging 1.4.2 : .. . .. . Those configurations were tested for both directions I ve made one more bridge which listened to Jboss Messaging and published to HornetQ and both look okay", "You should provide some code and post it on the HornetQ user s forum Or JBoss user s forum .", "Is client who can t get to JBoss Hornetq in a different subnet than the clients who can connect", "We have a Scala client that connects to the HornetQ JMS in jboss EAP the topology is set to be collacted with two servers .. . .. . 1 .", "I know glassfish has had issues with this but has anyone running jboss hornetq seen this before", "I have a HornetQ setup with 2 separate Jboss running on 2 different machines .", "And Remote jboss server JB server needs to send the response message back to it s HornetQ .", "I m trying to deploy an application EAR which has Spring JMS listeners BlazeDS flex and HornetQ in Jboss EAP 6.2.4 .", "I m working on an older application and upgrade it s JMS system from JBoss Messaging to HornetQ in the process I ve run into a few gotchas that seem to be related to how this application uses and manages JMS connections .", "http : community.jboss.org wiki HornetQPerformance .. . .. . In fact HornetQ is the 1 fastest enterprise messaging system on the market .", "I uses HornetQ JMS server to send message .", "has less overal dependencies .. . .. . Everything on HornetQ is modular .", "For example setting cluster of HornetQ machines was a nightmare for me :", "The HornetQ team will be happy to respond to any perceived issues .", "HornetQ unlike ActiveMQ was not built around JMS .", "This question is similar to Are multiple client consumers possible in hornetq", "Look at the right one at your hornetq-configuration.xml", "hornetq-2.2.14.Final ships with an example on message-counters .", "HornetQ internally uses Netty and if there is any leak then it has to be it .", "Could you be more specific about HornetQ and Tomcat", "Situation : .. . .. . We have standalone hornetq server say QSA and another hornetq server say QSB .", "The Core bridge uses proprietary HornetQ core-api so it can only connect two HornetQ servers .", "I tried with standalone HornetQ-2.2.5 by running it as different process but with that JBoss JMX Console is not available .", "For example Log on live server about initiates replication .. . .. . Log pushing journal files on backup serever .. . .. . And starting backup server .. . .. . hornetq-configuration.xml .. . .. . hornetq-jms.xml", "Now hornetQ in our framework is embedded and it s logging is delegated to log4J programatically ." ] }
{ "confidence": [ 59.13460922241211, 58.923683166503906, 58.72064208984375, 58.44102096557617, 57.30854797363281, 56.54657745361328, 55.34194564819336, 55.1723747253418, 54.84358596801758, 54.575801849365234, 54.561676025390625, 53.84342956542969, 53.56830978393555, 53.34966278076172, 53.193050384521484, 52.80406188964844, 51.95926284790039, 51.883358001708984, 51.72478485107422, 51.722373962402344 ], "content": [ "Question : I am using JBoss-6.0.0 AS which by default comes with HornetQ-2.1.2 version but this version of HornetQ has-many Iteration related bugs which are now resolved in HornetQ-2.2.5 version which by default comes with JBoss 7 AS . I can t switch to JBoss 7 AS because I am already using many other services specific to JBoss 6 AS and it would be very risky for us to switch to JBoss 7 AS as of now . Is there anyway by which I can upgrade HornetQ version in JBoss 6 AS I tried with standalone HornetQ-2.2.5 by running it as different process but with that JBoss JMX Console is not available . Any suggestion is appreciated for this . Please let me know if I am missing something here . Thanks . .. . Answer : but with that JBoss JMX Console is not available . use the jconsole from the JDK distribution . You can either get a nightly-build at http : hudson.jboss.org hudson view JBoss 20AS job JBoss-AS-6.1.x lastSuccessfulBuild artifact JBossAS 6 1 build target jboss-6.1.x.zip .. . .. . Or this same question has been asked on the HornetQ user s forum : .. . .. . http : community.jboss.org message 616616 tstart 0 616616 .. . .. . Delete message journal since the file-format for 2.2.5 is not backwards compatible JBOSS HOME server data hornetq .. . Delete existing JMS Resource adapter jms-ra.rar folder under deploy -Copy libs from HornetQ pack to JBOSS HOME common lib . The jars to copy are : .. . hornetq-bootstrap.jar .. . hornetq-core.jar .. . hornetq-jboss-as-integration.jar .. . hornetq-jms.jar .. . hornet-logging.jar .. . netty.jar .. . Copy resource adapter from hornetq pack to deploy and rename it from hornetq-ra.rar to jms-ra.rar effectively replacing old version in step 2 above .. . Copy client libs from HornetQ pack to JBOSS HOME client . The jars to copy are : .. . hornetq-core-client.jar .. . hornetq-jms-client.jar .. . netty.jar", "Question : Is that possible to run HornetQ JBoss JMS implementation on Tomcat The HornetQ documentation is all about JBoss AS or standalone scenarios.. . .. . .. . Update : .. . This is from HornetQ feature list : HornetQ is architected as a set of Plain Old Java Objects it can therefore be run in JBoss Microcontainer Spring Google Guice or embedded in any third party product and instantiated directly . So I would be glad to to know how the Web Application WAR running on plain Tomcat can embed HornetQ .. . Answer : To Rajiv HornetQ can be integrated with Tomcat JNDI and can be used from from spring beans . Description here http : wash-inside-out.blogspot.com 2010 08 hornetq-jms-integration-with-tomcat.html", "Question : I would appreciate some general pointers and opinions regarding which of the two messaging systems is .. . .. . easier to manage .. . has less gotchas or magic stuff one needs to know and avoid .. . has less overal dependencies .. . is simple to work with . Comment : I haven t used HornetQ but I can say ActiveMQ could be all four . If you are using JBoss HornetQ might have better integration . Comment : I want to use it w out Jboss AS . Whether one uses or doesnt use JBossAS shouldnt make any difference to its key observable features . Comment : If you re looking for someone to say something that will help you decided one way or another . You most certainly can t go wrong with ActiveMQ minor Spring dep issue aside . I ve been using it in anger for over two years in a large investment back deployed around the globe and I ve only ever had one significant problem and that was fixed by an easy upgrade . Comment : We also embed AMQ in our tests suite with little trouble . Comment : I think the more useful approach would be for a clear idea of how the two differ . It would also be nice if any one know what target problem each is aimed at .. . Answer : Firstly I m biased . I m the founder of the HornetQ project although I don t work on it any more . Why HornetQ over ActiveMQ Here are a few good reasons : .. . .. . 1 . HornetQ is significantly faster than ActiveMQ . http : community.jboss.org wiki HornetQPerformance .. . .. . In fact HornetQ is the 1 fastest enterprise messaging system on the market . Or at least it was when we tested it against the market last year . We tested it against the top 11 or so JMS implementations out there .. . .. . 2 . Features . HornetQ has a full enterprise feature set that you d expect to see . Feature list is here http : community.jboss.org wiki HornetQFeatures .. . .. . You ll find HornetQ has equivalents to most of the features you find in ActiveMQ and others that you won t find in ActiveMQ .. . .. . 3 . Clustering has recently been overhauled so it is rock solid . If you have any gripes with the clustering please use the forums . The HornetQ team will be happy to respond to any perceived issues . 4 . Used in production by many high profile names including large financial organisations and other such as last.fm .. . .. . 5 . Trusted enough to be the core messaging technology in JBoss AS 7 . The latest version of the worlds favourite Java application server . 6 . Protocol agnostic architecture . HornetQ unlike ActiveMQ was not built around JMS . In HornetQ the core server is protocol API agnostic - it s a generic messaging server . Various protocols APIs like STOMP JMS REST Websockets etc are added as thin adaptors to the generic core . This makes it much more flexible . Comment : +1 for disclosing your affiliation .", "Question : I use both JBoss AS 4 JBoss MQ and JBoss AS 7 Hornet Q . I would like to configure the place of storing the queue . In destination of JBoss AS 4 jboss server default deploy I have default-ds.xml which I believe is configuration of storing queue in database : .. . .. . DefaultDS .. . .. . I would like to know is there such file in JBOSS AS 7 by hornetQ which will help me to configure storing queues . I need to keep the queue between restarts of server etc . Where is the file Is it just standalone.xml .. . Answer : HornetQ only supports file persistence . HornetQ uses a set of binary journal files to store the messages in the queues . The information by default is stored in JBOSS HOME standalone data messagingbindings messagingjournal and messaginglargemessages directory . You can change the default directory modifying the messaging subsystem https : docs.jboss.org author display AS71 Messaging+configuration in the standalone.xml file . Eg .. . .. . Note the path is always relative to relative-to property system property in this example user home . Not is possible define absolute path .", "Question : I have a JBoss-6 server with HornetQ and a single queue : .. . .. . There a different consumers on different machines connected to this queue but only a single consumer is active at a time . If I shut down this consumer the messages are immediately processed by one of the other consumers . Since my messages have some time consuming processing I want multiple consumer process their unique messages concurrently . I remember a similar in earlier versions of JBoss where this setup worked without problems . Here in Jboss-6 the messaging system is working well -- except of the issue described above . This question is similar to Are multiple client consumers possible in hornetq http : stackoverflow.com questions 6338133 but the scenario is not similar to mine . Update 1 : If I close STRG+C one consumer there is a short timeout until the server recognized the lost consumer until the next consumer gets the message . Update 2 : Code Snippet .. . .. . And the MessageListerner : .. . Answer : With multiple consumers on a queue messages are load balanced between the consumers . As you have some time consuming the message you should disable buffering by setting consumer-window-size . On hornetQ there s an example on the distribution about how to disable client buffering and give a better support for slow consumers . a slow consumer is a consumer that will have some time processing the message .. . .. . message systems will pre-fetch read-ahead messages to the client buffer to speed up processing and avoid network latency . This is not an issue if you have fast processing queues and a single consumer . JBoss Messaging offered the slow-consumer option at the connection factory and hornetq offers the consumer window size . Most Message systems will provide you a way to enable or disable client pre-fetching . Comment : But does this explain why Consumer A is processing a message while Consumer B is idle and there are additional elements waiting in the queue Comment : Yes message systems will pre-fetch read-ahead messages to the client buffer to speed up processing and avoid network latency . This is not an issue if you have fast processing queues and a single consumer . It will be an issue with slow processing also . JBoss Messaging offered the slow-consumer option at the connection factory and hornetq offers the consumer window size . Most Message systems will provide you a way to enable disable client pre-fetching . I m placing this to my original answer Comment : This seems to be the right answer but unfortunately I cannot activate the consumer-window-size 0 consumer-window-size see : stackoverflow.com questions 7021485 http : stackoverflow.com questions 7021485 Comment : I have answered your other question . you have used the wrong connector . Look at the right one at your hornetq-configuration.xml", "Question : I would appreciate some general pointers and opinions regarding which of the two messaging systems is .. . .. . easier to manage .. . has less gotchas or magic stuff one needs to know and avoid .. . has less overal dependencies .. . is simple to work with . Comment : I haven t used HornetQ but I can say ActiveMQ could be all four . If you are using JBoss HornetQ might have better integration . Comment : I want to use it w out Jboss AS . Whether one uses or doesnt use JBossAS shouldnt make any difference to its key observable features . Comment : If you re looking for someone to say something that will help you decided one way or another . You most certainly can t go wrong with ActiveMQ minor Spring dep issue aside . I ve been using it in anger for over two years in a large investment back deployed around the globe and I ve only ever had one significant problem and that was fixed by an easy upgrade . Comment : We also embed AMQ in our tests suite with little trouble . Comment : I think the more useful approach would be for a clear idea of how the two differ . It would also be nice if any one know what target problem each is aimed at .. . Answer : I did an extensive evaluation of both before deciding on ActiveMQ . It is proven and stable something that you want in a messaging system . I have used ActiveMQ on two large scale systems with great success . There was some hype around HornetQ a while back when they claimed to be faster than ActiveMQ so I took a look . HornetQ has some serious flaws with it s clustering which can result in messages being lost and servers trying to indefinitely connect to a failed node . The lead developer on HornetQ refuses to recognize flaws in HornetQ and gets quite defensive on the user forums something that should make you very wary of the product . Comment : Im not sure which answer to pick - both have interesting points to ponder.. . Comment : Regarding your point on HornetQ refuses to recognize flaws in HornetQ and gets quite defensive on the user forums something that should make you very wary of the product . I don t think that s the case . If it was it isn t any longer . I m currently the lead on HornetQ and We have done a few refactoring on HornetQ 2.2.2 and 2.2.5 and we are doing a few extra great improvements on 2.3.0 and we would love any feedback Comment : Did you use AMQ embedded or remote broker", "Question : null .. . Answer : I have a HornetQ setup with 2 separate Jboss running on 2 different machines . Jboss1 -- Live1 and Backup2 .. . .. . JBoss2 -- Live2 and Backup1 .. . .. . The configurations for the hornetq servers are pasted below . The JBoss starts successfully without any ERRORs but in the JBoss web-console I am unable to see any Queue messages . The JMS destinations Queue Metrics is 0 all the time . Is there some specific config that I am missing in this case JMS Destinations Screenshot http : i.stack.imgur.com uVyvX.jpg .. . .. . JBoss1 hornetQ configs . JBoss2 hornetQ configs .", "Question : I have a spring-boot application acting as a HornetQ server and 10 client applications sending and receiving messages without any problem . But there s one specific client that refuses to connect with the following exception : .. . .. . On the server this line appears on the log : .. . .. . Any directions to discover what s wrong with this client Firewall proxy network resources version .. . Answer : Chances a networking problem then some of the things I would do : .. . .. . 1 Ping HornetQ from the problematic client and ping the client from the HornetQ server . If you can t ping from either side it s likely a configuration issue such as bad netmask or gateway or something . Traceroute tracert is your friend her . 2 From the problematic client try to telnet to Hornetq server on port 5446 assuming you re using the default . If the port open type some garbage characters and see if you get a response even with garbage getting some sort of response should indicate that the client can reach the server . 3 Turn on a bunch more logging depending on how its configured or whether you re running in JBoss or some other app server might change what specifically you want to do can t tell you without knowing the details of your implementation . Client-side debug logging should be your friend . Comment : Telnet works this is the intriguing part and log is on trace but I can t find anything useful there . Comment : Any firewall or something sniffing traffic Is client who can t get to JBoss Hornetq in a different subnet than the clients who can connect Could there be something in between that s filtering that specific traffic based on content It might be that telnet to port 5446 doesn t trigger anything because you haven t sent data in the right protocol but an actual Hornetq message does . The fact that your not seeing anything in the JBoss log means its not even getting it might be worth trying a netstat -a on the OS . You also might check what JBoss is listening to might be a specific subnet .", "Question : I would appreciate some general pointers and opinions regarding which of the two messaging systems is .. . .. . easier to manage .. . has less gotchas or magic stuff one needs to know and avoid .. . has less overal dependencies .. . is simple to work with . Comment : I haven t used HornetQ but I can say ActiveMQ could be all four . If you are using JBoss HornetQ might have better integration . Comment : I want to use it w out Jboss AS . Whether one uses or doesnt use JBossAS shouldnt make any difference to its key observable features . Comment : If you re looking for someone to say something that will help you decided one way or another . You most certainly can t go wrong with ActiveMQ minor Spring dep issue aside . I ve been using it in anger for over two years in a large investment back deployed around the globe and I ve only ever had one significant problem and that was fixed by an easy upgrade . Comment : We also embed AMQ in our tests suite with little trouble . Comment : I think the more useful approach would be for a clear idea of how the two differ . It would also be nice if any one know what target problem each is aimed at .. . Answer : easier to manage .. . .. . hornetQ has a clear api for amanagement and very easy to use . has less gotchas or magic stuff one needs to know and avoid .. . .. . hornetQ was made for the embedded case . It is very very easy to integrate it in your code . As a matter of fact you can do it with less than 10 lines-of-code . has less overal dependencies .. . .. . Everything on HornetQ is modular . The only required dependency on HornetQ is Netty which is the network provider . is simple to work with . HornetQ is very simple to use . Clear api and mainly the documentation is very very complete . You don t need to buy any books to use HornetQ . All the docs are right there for free at the hornetq s website . Comment : Thanks Clebert for the answer and for your hard work on HQ I forgot about my question but your notes are right . Themore one gets into HQ the more one appreciates how kool it is . Comment : I ve tried both HornetQ and ActiveMQ as a JMS broker for our application which generates very high-load . HornetQ wins in performance and reliability . Unfortunately both projects has lacks in documentation . For example setting cluster of HornetQ machines was a nightmare for me :", "Question : I m new to JMS programming Java . I have a machine M1 in a domain D1 and a machine M2 in another domain D2 . I have in M1 a JMS producer . And in M2 a JMS consumer . Both have as servers JBoss 7.2 . So it seems the only solution is to create a JMS bridge . I m reading the official documentation http : docs.jboss.org hornetq 2.4.0.Final docs user-manual html single jms-bridge . So I wonder if creating an SSH tunnel is necessary . Second in which hornetq-configuration.xml file should I set the following configuration Should it be in the in JBoss server of the JMS producer machine or consumer machine .. . .. . My third question is is there a difference in settings between JMS bridge and core bridge .. . .. . I would be so thankful for any additional information and explainations Thank you a lot .. . Answer : I know this is little late for OP may be this information helps someone . Firstly the difference between Core and JMS bridge . Read doc here http : docs.jboss.org hornetq 2.2.5.Final user-manual en html core-bridges.html .. . .. . Core bridges are for linking a HornetQ node with another HornetQ node and do not use the JMS API . A JMS Bridge is used for linking any two JMS 1.1 compliant JMS providers . The Core bridge uses proprietary HornetQ core-api so it can only connect two HornetQ servers . Whereas JMS bridges use the JMS API so could connect any JMS1.1 API complaint servers.eg : HornetQ to ActiveMQ . The configuration mentioned in question is Core bridge and can be configured in the source server.Since you seem to connect two HornetQ server Core bridges is the way forward . That said in your case you could use JMS bridges as well since both are JMS complaint.But the recommended approach would be to use Core bridge due to performance advantage gain . Finally the JBoss installation server comes with some handy examples.You could find Core bridge example under JBOSS HOME jboss-as extras hornetq examples jms bridge .", "Question : null .. . Answer : We have a Scala client that connects to the HornetQ JMS in jboss EAP the topology is set to be collacted with two servers .. . .. . 1 . Server A - HornetQ live Server1 and HornetQ BackupServer2 .. . 2 . Server B - HornetQ live Server2 and HornetQ BackupServer1 .. . .. . When we try a jms client in java it automatically fails over to the back up when the live server is brought down . But the scala client cannot do failover", "Question : JMSToolBox https : sourceforge.net projects jmstoolbox source navbar is a tool for browsing queues in a jms provider . But it s not possible to configure it for browsing in JBoss EAP 6.3 HornetQ 2.3 . Anyone tried this and can provide the right configuration Thanks in advance Mario .. . Answer : I m the author of JMSToolbox https : sourceforge.net projects jmstoolbox . JTB should work with HornetQ . At least it does on my test workstation . Did you follow the instructions to setup JMSToolBox for HornetQ https : sourceforge.net p jmstoolbox wiki Setup 20for 20JBoss 20HornetQ What exact problem do you encounter", "Question : I try to setup JMS bridge between HornetQ built-in Jboss EAP 6.3 and Jboss Messaging topic hosted on Jboss 4.2.2 . The bridge is configured on the Jboss EAP 6.3 side - in standalone.xml and the aim is to listen to local HornetQ topic and publish to remote Jboss Messaging . To achieve this I try to follow recommendations described here https : access.redhat.com documentation en-US JBoss Enterprise Application Platform 6.2 html Migration Guide Configure a JMS Bridge to Migrate Existing JMS Messages to Enterprise Application Platform 6.html At the moment I have it configured as follows : .. . .. . .. . jms-bridge name myBridge module org.jbossmessaging .. . source .. . connection-factory name ConnectionFactory .. . destination name jms SourceTopic .. . source .. . target .. . connection-factory name java : ConnectionFactory .. . destination name jms TargetTopic .. . user user user .. . password pass password .. . context .. . property key java.naming.factory.initial value org.jnp.interfaces.NamingContextFactory .. . property key java.naming.provider.url value jnp : 10.26.75.194 : 1099 .. . property key java.naming.factory.url.pkgs value org.jboss.naming : org.jnp.interfaces .. . context .. . target .. . quality-of-service DUPLICATES OK quality-of-service .. . failure-retry-interval 500 failure-retry-interval .. . max-retries 1 max-retries .. . max-batch-size 500 max-batch-size .. . max-batch-time 500 max-batch-time .. . add-messageID-in-header true add-messageID-in-header .. . jms-bridge .. . .. . I ve created next module : .. . .. . And when I try to start Jboss I have the next exception : .. . .. . .. . 20 : 49 : 37 101 WARN org.hornetq.jms.server ServerService Thread Pool -- 62 HQ122010 : Failed to connect JMS Bridge : javax.naming.CommunicationException Root exception is java.rmi.ConnectException : Connection refused to host : 10.26.75.194 nested exception is : .. . java.net.ConnectException : Connection timed out : connect .. . at org.jnp.interfaces.NamingContext.lookup NamingContext.java : 647 jnpserver-3.2.3.jar : 3.2.3 build : CVSTag JBoss 3 2 3 date 200311301445 .. . at org.jnp.interfaces.NamingContext.lookup NamingContext.java : 507 jnpserver-3.2.3.jar : 3.2.3 build : CVSTag JBoss 3 2 3 date 200311301445 .. . at javax.naming.InitialContext.lookup InitialContext.java : 417 rt.jar : 1.8.0 40 .. . at javax.naming.InitialContext.lookup InitialContext.java : 417 rt.jar : 1.8.0 40 .. . at org.hornetq.jms.bridge.impl.JNDIFactorySupport.createObject JNDIFactorySupport.java : 58 hornetq-jms-server-2.3.21.Final-redhat-1.jar : 2.3.21.Final-redhat-1 .. . at org.hornetq.jms.bridge.impl.JNDIDestinationFactory.createDestination JNDIDestinationFactory.java : 40 hornetq-jms-server-2.3.21.Final-redhat-1.jar : 2.3.21.Final-redhat-1 .. . at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects JMSBridgeImpl.java : 1236 hornetq-jms-server-2.3.21.Final-redhat-1.jar : 2.3.21.Final-redhat-1 .. . at org.hornetq.jms.bridge.impl.JMSBridgeImpl.start JMSBridgeImpl.java : 416 hornetq-jms-server-2.3.21.Final-redhat-1.jar : 2.3.21.Final-redhat-1 .. . at org.jboss.as.messaging.jms.bridge.JMSBridgeService.startBridge JMSBridgeService.java : 99 .. . at org.jboss.as.messaging.jms.bridge.JMSBridgeService 1.run JMSBridgeService.java : 78 .. . at java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java : 1142 rt.jar : 1.8.0 40 .. . at java.util.concurrent.ThreadPoolExecutor Worker.run ThreadPoolExecutor.java : 617 rt.jar : 1.8.0 40 .. . at java.lang.Thread.run Thread.java : 745 rt.jar : 1.8.0 40 .. . at org.jboss.threads.JBossThread.run JBossThread.java : 122 .. . Caused by : java.rmi.ConnectException : Connection refused to host : 10.26.75.194 nested exception is : .. . java.net.ConnectException : Connection timed out : connect .. . at sun.rmi.transport.tcp.TCPEndpoint.newSocket TCPEndpoint.java : 619 rt.jar : 1.8.0 40 .. . at sun.rmi.transport.tcp.TCPChannel.createConnection TCPChannel.java : 216 rt.jar : 1.8.0 40 .. . at sun.rmi.transport.tcp.TCPChannel.newConnection TCPChannel.java : 202 rt.jar : 1.8.0 40 .. . at sun.rmi.server.UnicastRef.invoke UnicastRef.java : 130 rt.jar : 1.8.0 40 .. . at org.jnp.server.NamingServer Stub.lookup Unknown Source jnpserver-3.2.3.jar : 3.2.3 build : CVSTag JBoss 3 2 3 date 200311301445 .. . at org.jnp.interfaces.NamingContext.lookup NamingContext.java : 528 jnpserver-3.2.3.jar : 3.2.3 build : CVSTag JBoss 3 2 3 date 200311301445 .. . .. . 13 more .. . Caused by : java.net.ConnectException : Connection timed out : connect .. . at java.net.TwoStacksPlainSocketImpl.socketConnect Native Method rt.jar : 1.8.0 40 .. . at java.net.AbstractPlainSocketImpl.doConnect AbstractPlainSocketImpl.java : 345 rt.jar : 1.8.0 40 .. . at java.net.AbstractPlainSocketImpl.connectToAddress AbstractPlainSocketImpl.java : 206 rt.jar : 1.8.0 40 .. . at java.net.AbstractPlainSocketImpl.connect AbstractPlainSocketImpl.java : 188 rt.jar : 1.8.0 40 .. . at java.net.PlainSocketImpl.connect PlainSocketImpl.java : 172 rt.jar : 1.8.0 40 .. . at java.net.SocksSocketImpl.connect SocksSocketImpl.java : 392 rt.jar : 1.8.0 40 .. . at java.net.Socket.connect Socket.java : 589 rt.jar : 1.8.0 40 .. . at java.net.Socket.connect Socket.java : 538 rt.jar : 1.8.0 40 .. . at java.net.Socket . init Socket.java : 434 rt.jar : 1.8.0 40 .. . at java.net.Socket . init Socket.java : 211 rt.jar : 1.8.0 40 .. . at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket RMIDirectSocketFactory.java : 40 rt.jar : 1.8.0 40 .. . at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket RMIMasterSocketFactory.java : 148 rt.jar : 1.8.0 40 .. . at sun.rmi.transport.tcp.TCPEndpoint.newSocket TCPEndpoint.java : 613 rt.jar : 1.8.0 40 .. . .. . 18 more .. . .. . The host is available and the port is open so a problem is in configuration . I suppose in the module I created . I haven t found an appropriate example so I decided to include to the module a library which contains org.jnp.interfaces.NamingContextFactory and jboss-messaging.jar . Maybe there must be involved something else Or maybe I misconfigured jmg-bridge itself Please assist if you have any ideas .. . Answer : Finally I solved the problem . And the key was as supossed in the proper module configuration . So below is suitable module.xml at least for for Jboss Messaging 1.4.2 : .. . .. . Those configurations were tested for both directions I ve made one more bridge which listened to Jboss Messaging and published to HornetQ and both look okay", "Question : Is that possible to run HornetQ JBoss JMS implementation on Tomcat The HornetQ documentation is all about JBoss AS or standalone scenarios.. . .. . .. . Update : .. . This is from HornetQ feature list : HornetQ is architected as a set of Plain Old Java Objects it can therefore be run in JBoss Microcontainer Spring Google Guice or embedded in any third party product and instantiated directly . So I would be glad to to know how the Web Application WAR running on plain Tomcat can embed HornetQ .. . Answer : Tomcat is the same as standalone you just have Tomcat running in a JVM and all you need to do is put the proper classes in the classpath . Everything here is in the manual http : hornetq.sourceforge.net docs hornetq-2.0.0.GA user-manual en pdf HornetQ UserManual.pdf .. . .. . 1 You need to have a HornetMQ server running . 2 Put the jar files in the Tomcat classpath . 3 Put the proper Queue Connection factories and Queue Connections into your JNDI provider . You are now ready to run.. . .. . .. . 1 Get QCF and Q properties from JNDI . 2 Access in Servlet . Comment : Romain thanks for reply . Have you managed to run this configuration I am not sure I understand how will HornetQServer be started What s the trigger It looks as standalone HornetQServer comes with built-in JNDI implementation but Tomcat has its own one can it be re-used Comment : @Gennady Shumakher is a separate server that you run just like Tomcat . The whole purpose of Message Queueing is that it is a reliable system and you application does not need to be running to have messages going back and forth . Like a database it is independent of TomCat . Comment : @Gennady Shumakher it runs as a service on your server just like you would setup Tomcat Comment : but then it misses the point.. . Maybe I need to update the question . I want to run HornetQ as embedded broker in Web Application WAR running on Tomcat . This from HornetQ feature list : HornetQ is architected as a set of Plain Old Java Objects it can therefore be run in JBoss Microcontainer Spring Google Guice or embedded in any third party product and instantiated directly . So I would like to know how that can be achieved in WAR running on plain Tomcat.. . Comment : @Gennady Shumakher Look at Chapter 43 of the manual they have how to embed it into an application", "Question : We are trying using HornetQ for messaging on Jboss AS 7.1 and the documentation at .. . .. . https : docs.jboss.org author display AS71 Messaging+configuration says .. . .. . There is also a pooled-connection-factory which is special in that it leverages the outbound adapter of the HornetQ JCA Resource Adapter . It is also special because : .. . .. . Every thing made sense except the third bullet which says .. . .. . It should only be used to send i.e . produce messages . .. . .. . My mdb uses Pooled connection factory and is consuming messages Not sending . My understanding is Pooled connection factory is what the MDB should use for better performance . Also the hornetq Author s say .. . .. . http : hornetq.blogspot.com 2011 06 hornetq-on-jboss-as7.html .. . .. . Can some guru s throw some light on this Thanks Rama Comment : I tried your block for sso siteminder nice tutorials.I don t know where to download siteminder software whatever you have mentioned in your post.Please let me know.my emailid is sun.leo04@gmail.com .. . Answer : This is something we try to make it easier for users but still some confusion . the JCA Adapter specifies InBound Connections and Outbound connections.. . .. . .. . InBound connections are used by MDBs and outBounds are done through using the JNDI and instantiating connections . InBound connections don t need pooling for instance as they just instantiate the consumers for the MDBs and stay up as long as you have an MDB.. . .. . .. . We keep definitions on the PooledConnection factories for defining the MDBs but underneath there are a few things happening as I said . So we could maybe reword this item you mentioned to explain that better . Comment : Thank Clebert.Appreciate your quick response . Comment : Now it makes sense as why MDB need not use pooled connection factory . Comment : Please accept the answer as well then", "Question : null .. . Answer : what s the fastest way to push millions of messages into HornetQ I have these both approaches : .. . .. . 1 . My current code reuses one session for all messages ca . 2.200 messages per second .. . .. . 2 . The optimized way but it hangs after the first 30k messages til then 9.000 messages per second .. . .. . The question is why does the second snippet hang after the 30k What would you recommend for massive inserts into HornetQ Regards Chris Comment : I use RabbitMQ with Torquebox due to issues.jboss.org browse TORQUE-1174 https : issues.jboss.org browse TORQUE-1174 and issues.jboss.org browse TORQUE-1175 https : issues.jboss.org browse TORQUE-1175 being able to use non-blocking IO with the messaging system is really helpful . Also you have access to all the queueing features when outside JBoss which is really helpful too . Both aspects would be helpful in your case .", "Question : During configuration of JMS queues on JBoss 7 with HornetQ based on standalone-full.xml configuration I noticed an attribute durable . enter image description here http : i.stack.imgur.com ICked.png .. . .. . I browsed several sources and many of them stated queues are always durable meaning the message will be always delivered even in case of potential receivers being inactive at the time of send . Does this attribute in JBoss 7 HornetQ refer to temporary queues Or does this attribute refer to some kind of non-temporary non-durable queues .. . Answer : I feel the word Durable is more applicable to Topics than queues . A durable subscription is one where the publications for a subscriber are stored by the messaging provider when that subscriber is not running . Once the subscriber becomes active these stored messages will be delivered to that subscriber . For non-Durable subscribers will not receive any publications if they are not active . With respect to Queues the messages are held in the queue till someone receives them or they expire . The messages can be persistent meaning they will survive restart of messaging provider and non-persistent where the messages are lost when messaging provider goes down . Comment : Thanks for the info as mentioned most of sources suggested queues are durable by default . That is why I wondered what is the meaning of non-durable queue in context of HornetQ on JBoss 7 . I tried a few examples and shall post my observations as an answer . Comment : @Shashi What is the reason explanation to say that durable is more applicable to topics than to queue s", "Question : I have a client run in JBoss JB Client and it needs to send messages to a remote Jboss server JB Server HornetQ . And Remote jboss server JB server needs to send the response message back to it s HornetQ . So JB Client MDB is listening to remote HorentQ for the responses . I am using Jboss AS6 for my client and server . This system works perfectly in local environment which is client and server both in same Jboss . But now I need to separate client and server in to two machines . here is my test client configuration . Server does not have special settings except queues defined . What configuration I need to do in server and client-side to make this work .. . Answer : I was able to connect to remote-server and get the response from the remote queue . Both my client and server running in two separate computers JBossAS 6.1.0.Final Neo . My client is a simple web app a war file .. . .. . Client side queue sender class . .. . .. . Above is client-side sender code . Now let s see how client-side message receiver . I used MDB to listen remote-server queue . MDB configuration is in ejb-jar.xml in the META-INF folder of my war file . Above last two activation-config-properties is additionally added to connect to the remote-server . So client java coding is over now . Bonus . Above is just call it through JNDI in a simple java class . But you might interest to do it through EJB CDI injection without using context properties etc . For that you need to modify below settings in client jboss side . .. . .. . There are two settings I changed in the client Jboss node . 1 . hornetq-configuration.xml in client Jboss node . connector name netty factory-class org.hornetq.core.remoting.impl.netty.NettyConnectorFactory factory-class param key host value MY IP : 10.1.4.48 -- For MY IP you can put any word . Doesn t matter . -- param key port value hornetq.remoting.netty.port : 5445 connector .. . .. . 1 . ra.xml file in jms-ra.rar deploy folder in client Jboss node . Comment the below settings like this . -- config-property description The transport configuration . These values must be in the form of key val key val if multiple connectors are used then each set must be separated by a comma i.e . host host1 port 5445 host host2 port 5446 . Each set of params maps to the connector classname specified . description config-property-name ConnectionParameters config-property-name config-property-type java.lang.String config-property-type config-property-value server-id 0 config-property-value config-property -- .. . .. . Ok . Jboss settings are over . Now let s see EJB bean . We need to inject the above connection through annotation . If you check your hornetq-jms.xml you can see under connection-factory name NettyConnectionFactory above mappedName is defined entry name ConnectionFactory . This is the JNDI name you should look in your EJB to find the connectionFactory in the remote HornetQ server . That s it if you need to use EJB CDI injection rather than JNDI lookup . Restart the client jboss then you should be able to send the messages from client to Server . No special settings in starting the jboss .. . .. . You can verify where is it connecting if you go to jmx-console of the client and go to org.hornetq then click on module JMS name NettyConnectionFactory type ConnectionFactory . In StaticConnectors you see where this NettyConnector is connecting . Now server-side Jboss HornetQ settings . .. . .. . Edit the hornetq-configuration.xml in Server Jboss and change the section . So this is server Jboss settings . And I start the server with run.bat -b 10.1.4.48 option . Hope this helps .", "Question : I would appreciate some general pointers and opinions regarding which of the two messaging systems is .. . .. . easier to manage .. . has less gotchas or magic stuff one needs to know and avoid .. . has less overal dependencies .. . is simple to work with . Comment : I haven t used HornetQ but I can say ActiveMQ could be all four . If you are using JBoss HornetQ might have better integration . Comment : I want to use it w out Jboss AS . Whether one uses or doesnt use JBossAS shouldnt make any difference to its key observable features . Comment : If you re looking for someone to say something that will help you decided one way or another . You most certainly can t go wrong with ActiveMQ minor Spring dep issue aside . I ve been using it in anger for over two years in a large investment back deployed around the globe and I ve only ever had one significant problem and that was fixed by an easy upgrade . Comment : We also embed AMQ in our tests suite with little trouble . Comment : I think the more useful approach would be for a clear idea of how the two differ . It would also be nice if any one know what target problem each is aimed at .. . Answer : I use ActiveMq quite heavily in my day job and rate it very highly for most of the points you raised . I especially rely in the JMX admin console it s top class . I have also been keeping a close eye on HornetQ and may one day add support for that too . From what I can see HornetQ is a bit lighter weight and has some really nice NIO optimisations which should make it fly . But lacks some of the enterprise integration features offered by ActiveMQ and possibly some of the admin features . However from what I can see the HornetQ team is working hard to fill in the gaps . I don t think you could do wrong with either choice in my opinion . Try them both out and see which feels better . Comment : One thing i disliked when looking at ActiveMQ is its dependency on Spring correct me if im wrong . Suck in Spring and before you know it you have lots of dependencies . HornetQ only requires netty and slf4j . I cant comment about its more exciting features but analysing dependencies is always a good start imho - where less is better . Comment : Agreed . I forgot about that . Comment : I agree . I feel it is much better when extras can be orthogonal and optional to a tool . Not always possible however low-level tools like DB-s MQ-s TM-s and the like need not be tightly coupled .", "Question : I want to set the consumer-window-size to 0 . This seems to be the answer of another question JMS queue with multiple consumers http : stackoverflow.com questions 7008664 and is described in this article http : hornetq.sourceforge.net docs hornetq-2.0.0.GA user-manual en html flow-control.html in chapter 17.1.1 . I retrieve the connection factory using JNDI . My hornetq-jms.xml looks like this : .. . .. . The section connection-factory is copy-paste from the link above but I got the error : .. . .. . This may be JBoss-6 related because in other environments this seems to work : force order of messages with HornetQ http : stackoverflow.com questions 4085270 force-order-of-messages-with-hornetq .. . Answer : Before you place netty-connector you need to look at the connectors your have registered at your hornetq-configuration.xml .. . .. . From your hornetq-configuration you will see something like this : .. . .. . You will have match the connector here at your connection-factory definition . For more information read the HornetQ s documentation about acceptors and connectors . Comment : Thanks for pointing this out" ] }
[ "yes-answer-long", "yes-answer-short" ]
asynchronous
UNK_RELATION
git-mv@symlink@59
git-mv -- git-mv - move or rename a file a directory or a @placeholder .
{ "confidence": [ 56.73813247680664, 55.13218307495117, 55.067317962646484, 54.116695404052734, 53.066749572753906, 52.84885787963867, 51.542930603027344, 51.0705680847168, 51.0705680847168, 49.60870361328125, 49.55755615234375, 48.44850158691406, 46.944419860839844, 46.944419860839844, 46.24567794799805, 45.63462829589844, 45.43140411376953, 45.43140411376953, 45.43140411376953, 44.310943603515625, 44.121612548828125, 43.07801055908203, 42.15351104736328, 41.60634231567383, 41.4908332824707, 41.38652038574219, 40.64049530029297, 40.25310516357422, 39.873504638671875, 39.873504638671875, 37.98496627807617, 37.799537658691406, 37.4732780456543, 37.46505355834961, 37.27783203125, 36.614192962646484, 36.30128860473633, 35.93293380737305, 35.82337951660156, 35.42072677612305, 34.91846466064453, 34.8151969909668, 34.72841262817383, 34.50695037841797, 34.37397766113281, 34.21878433227539, 34.17510223388672, 33.096771240234375, 32.81468200683594, 32.81468200683594, 32.625850677490234, 32.43472671508789, 32.43472671508789, 32.14274215698242, 32.00797653198242, 31.740413665771484, 31.44955062866211, 31.294361114501953, 31.294361114501953, 31.087543487548828, 31.087543487548828, 30.45009994506836, 30.434417724609375, 30.32819175720215, 29.920974731445312, 29.89075469970703, 29.587705612182617, 29.587705612182617, 29.587705612182617, 29.494369506835938, 29.192646026611328, 29.192646026611328, 29.08354949951172, 29.019947052001953, 29.019947052001953, 29.019947052001953, 28.937088012695312, 28.921405792236328, 28.921405792236328, 28.882606506347656, 28.863880157470703, 28.450565338134766, 28.450565338134766, 28.360027313232422, 28.22136878967285, 28.074691772460938, 27.759864807128906, 27.759864807128906, 27.759864807128906, 27.523536682128906, 27.499114990234375, 27.349864959716797, 26.91024398803711, 26.91024398803711, 26.91024398803711, 26.91024398803711, 26.91024398803711, 26.91024398803711, 26.91024398803711, 26.184307098388672 ], "content": [ "The only difference between mv old new and git-mv old new is that the git-mv also adds the files to the index .", "Doing git-mv is the same as doing plain mv followed by git-add on the new name and git-rm on the old .", "After git-mv the new file is already in the index .", "Lets use git-mv instead .", "git-mv does the staging for you as well so that you don t need to git-rm olfdfile and git-add newfile after physically moving the file via mv MOVE explorer.exe .", "I ve accidentally used mv to rename a file which was under git .", "I know that git provides the git-rm and git-mv to remove move files or directories .", "git-mv old new automatically updates the index .", "So why use git-mv at all", "Are there any cases that only git-rm and git-mv capable of", "How can I do recursive git-mv", "Question .. . .. . Does it make a difference if I move Git tracked files with the git-mv http : git-scm.com docs git-mv command as opposed to just moving the files with MS-DOS move http : www.computerhope.com movehlp.htm or the Windows Explorer", "However doing just this tonight I ended up reverting to git-mv .", "mv old new then git-add -A would have worked too .", "Renaming foldername to folderName on case insensitive file systems .. . .. . Simple renaming with a normal mv command not git-mv won t get recognized as a filechange from git .", "Example .. . .. . The entire history has been retained despite not using git-mv and Git says that is has detected a renaming .", "As confirmed by @VonC in http : stackoverflow.com a 32924692 2274140 this is a bug in git-mv .", "But git-status does not recognize the mv it shows the deletion and addition separately .", "-name jndi.properties -exec git-mv oldFileName s jndi environment", "but everytime I got a reply while using git-mv that the said file is not under version-control .", "git-rm and git-mv allows you to be more specific granular about what you re doing .", "git-mv http : www.kernel.org pub software scm git docs git-mv.html and git-rm http : www.kernel.org pub software scm git docs git-rm.html are about updating the index directly .", "What you may be confused about is that for example git-log -- new will stop at the point where you committed git-mv old new .", "I am using GIT under windows with the GIT Bash tool and was trying to move a file from one directory to the another .", "If it s same as git-mv abc ABC then I can t do that .", "But that s the point of my answer : the man page says that the index is updated when you use git-mv .", "you could do it the way you said but it sounds like it would be simpler to use git-rm and git-mv as it s a one-step process .", "When you use git-mv it will index the modifications for you .. . .. . If you do it manually with your OS you will need to do .. . .. . So that git understands you actually renamed the file .", "The GitFaq https : git.wiki.kernel.org index.php GitFaq Why does git not .22track.22 renames.3F does present git-mv as : .. . .. . just a convenience .", "The goal of my answer was more to illustrate that it was probably a bug of git-mv when recursive submodules are involves .", "Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result .", "For git-mv the manual page http : kernel.org pub software scm git docs git-mv.html says .. . .. . The index is updated after successful completion ... . .. . .. . So at first you have to update the index on your own by using git-add mobile.css .", "They also didn t use git-mv so when I got the pull request I saw a new file being added and an old file being deleted which makes it impracticable for reviewing .", "Git then uses its rename copy detection to let you know it was a rename .", "Now git detects context are the same and expose it as a rename .", "Normally I just mv or rm the files or whatever in the command-line and after I m done with all the necessary actions I can just run git-add -u and git-add .", "then it will show the same output in git-status .. . .. . you can see it clearly in the status output the new name of the file : .. . .. . and the old name : .. . .. . i think behind the scenes git-mv is nothing more than a wrapper script which does exactly that : delete the file from the index and add it under a different name", "If you try it with the git-mv command like in the following line .. . .. . If you re using a case insensitive filesystem e.g .", "When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index .", "Now git-status and git-commit --dry-run -a shows two different results where git-status shows bbb.txt as a new file aaa.txt is deleted and the --dry-run commands shows the actual rename .", "The git submodule update then fixes this .git file again .", "I believe if you did the move via Finder and then did git-add css mobile.css git-rm css iphone.css git would compute the hash of the new file and only then realize that the hashes of the files match and thus it s a rename .", "Not what I want lets undo the rename and let git do the work .", "I know of dirty ways to do this that involve modifying .git config and changing gitdir in several of the files in the .git modules files .. . .. . I recently read that git-mv should be able to do this i.e . running .. . .. . This works fine for repositories in which there is no nested submodule d in my case .", "you have to git-add css mobile.css the new file and git-rm css iphone.css so git knows about it .", "Step1 : rename the file from oldfile to newfile .. . .. . Step2 : git-commit and add comments .. . .. . Step3 : push this change to remote sever", "Being a nice guy I pulled their code and tried to do a late git-mv so I d be able to add a commit to their pull request and see things beautifully on Github review page but that didn t work .", "mv abc.java ABC.java .. . .. . I ve also made changes and committed the file after that .", "How do I now make an actual git rename of this file", "@AshwiniR hey git please rename the file abc.java to ABC.java", "I have the following git structure .. . .. . I would like to move the git submodule c to the folder 2015 .", "Also git-status -a is invalid with Git 1.7.0 and later .", "See Difference of git-add -A and git-add .", "I m a bit scared to use mv without understanding .", "For git 1.7.x the following commands worked for me : .. . .. . There was no need for git-add since the original file i.e .", "Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one .", "Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status .", "So why didn t git recognise the rename the first time around when I used Finder", "using a script to batch-rename a bunch of files then using git-add -A . worked for me .", "http : stackoverflow.com questions 572549 difference-of-git-add-a-and-git-add", "Note that with git 2 git-add . does add removals to the index .", "It s only after you add the file that git will recognize it from content .", "See this is reproducible on git-diff .", "git-status is not git-commit --dry-run anymore . in kernel.org pub software scm git docs RelNotes-1.7.0.txt http : www.kernel.org pub software scm git docs RelNotes-1.7.0.txt .", "However when I run this command on my directory I m getting errors like .. . .. . note this error occurs on a git-status after executing the above mentioned move .. . .. . Is anyone aware of a clean method to do this move i.e . one that does not involve manually changing paths in .git modules files", "You have to add the two modified files to the index before git will recognize it as a move .", "For what matters for Git both are correct .", "Maybe I m misunderstanding the workflow in git .", "Do a git Status on your folder .", "I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file .", "-M stands for -M50 50 or more similarity will make git express it as a rename but you can reduce this to -M20 20 if you edit mobile.css a lot .", "Many git commands support a -M option that lets you specify the similarity threshold for deciding that a delete and an add-in the same commit should be regarded as a rename .", "Well GIT under Windows does not detect the difference in the case-when looking for changed files through git-status -u .", "Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history .", "Git will recognise the file from the contents rather than seeing it as a new untracked file .. . .. . That s where you went wrong .", "Someone changed a file name and its content in a way that git was unable to detect that it was the same file .", "It works as follows : .. . .. . It temporarily removes the .git file in the d subsubmodule .", "man git-status .", "This will not help with git-status", "Is there a way to do a posthumous rename of a file", "However .. . git-status will still show two different files .. . .. . You can get a different output by running git-commit --dry-run -a which results in what you expect .. . .. . I can t tell you exactly why we see these differences between git-status and .. . git-commit --dry-run -a but here is a hint from Linus http : marc.info l git m 119638337122721 w 2 .. . .. . git really doesn t even care about the whole rename detection internally and any commits you have done with renames are totally independent of the heuristics we then use to show the renames .", "Thanks for the status -a clarification I used git 1.6.4", "@Greg K : git-rm will not remove history .", "Keep in mind git doesn t track any metadata about your files .. . .. . Your repository has among others .. . .. . and it is under git control : .. . .. . Test this with : .. . .. . When you do .. . .. . From git perspective .. . .. . there is no iphone.css it is deleted -git warns about that- .", "I would have expected it to work the same way in Git but a test see example below showed that Git detects by itself that the file has been moved and that the history is kept intact .", "And technically IT IS deletion and addition in git internals", "if you do a normal git-commit it will not commit the renamed file and the working tree is still the same .", "Now you can see that the file is in fact renamed and what s shown in git-status is wrong .", "Moral of the story : If you re not sure whether your file got renamed issue a git-commit --dry-run -a .", "If you have such a constellation where the commmitted version differs from the checkout version with respect to the case of the directory name git-status -u will never complain .", "The file which I wanted to move was in a directory whose name was ABCD but the commited version was abcd .", "Without it git-status -a would only have seen the removal of the previously tracked iphone.css file but would not have touched the new untracked mobile.css file .", "Once you have done this git-status will work as you expect .", "I just moved a bunch of files into a public html dir that are tracked in git .", "You failed to mention the step where you did git-add mobile.css .", "Use git-commit --dry-run -a if you want this functionality .", "Thanks for the git-add -A link very useful as I was looking for such shortcut", "If you want to follow renames use git-log --follow -- new .", "Let s think about your files from git perspective .", "Git doesn t track file identity : there s nothing in the repository that says that file bar in revision n was renamed copied moved from file foo in revision n -1 ." ] }
{ "confidence": [ 68.96910095214844, 68.65666961669922, 66.4150390625, 66.23123931884766, 65.39859771728516, 64.89335632324219, 64.89173126220703, 64.69488525390625, 64.67572021484375, 63.747955322265625, 62.95433807373047, 62.788856506347656, 62.62274169921875, 61.93379211425781, 61.57133102416992, 61.328460693359375, 60.62761306762695, 60.25131607055664, 58.7197265625, 58.17102813720703 ], "content": [ "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : You have to add the two modified files to the index before git will recognize it as a move . The only difference between mv old new and git-mv old new is that the git-mv also adds the files to the index . mv old new then git-add -A would have worked too . Note that you can t just use git-add . because that doesn t add removals to the index . See Difference of git-add -A and git-add . http : stackoverflow.com questions 572549 difference-of-git-add-a-and-git-add Comment : Thanks for the git-add -A link very useful as I was looking for such shortcut Comment : Note that with git 2 git-add . does add removals to the index .", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : You didn t stage the results of your finder move . I believe if you did the move via Finder and then did git-add css mobile.css git-rm css iphone.css git would compute the hash of the new file and only then realize that the hashes of the files match and thus it s a rename .", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : Step1 : rename the file from oldfile to newfile .. . .. . Step2 : git-commit and add comments .. . .. . Step3 : push this change to remote sever Comment : Please add some comment so that it is helpful to OP Comment : Step 2 is unnecessary . After git-mv the new file is already in the index . Comment : sure I will modify it . thanks", "Question : Question .. . .. . Does it make a difference if I move Git tracked files with the git-mv http : git-scm.com docs git-mv command as opposed to just moving the files with MS-DOS move http : www.computerhope.com movehlp.htm or the Windows Explorer Back in the Subversion days it was necessary to use for example the TortoiseSVN SVN Move versioned files here http : tortoisesvn.net docs release TortoiseSVN en tsvn-dug-rename.html command to keep the history intact . I would have expected it to work the same way in Git but a test see example below showed that Git detects by itself that the file has been moved and that the history is kept intact . So why use git-mv at all Example .. . .. . The entire history has been retained despite not using git-mv and Git says that is has detected a renaming . .. . Answer : git-mv does the staging for you as well so that you don t need to git-rm olfdfile and git-add newfile after physically moving the file via mv MOVE explorer.exe . This is on purpose https : git.wiki.kernel.org index.php GitFaq Why does Git not .22track.22 renames.3F .", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : you have to git-add css mobile.css the new file and git-rm css iphone.css so git knows about it . then it will show the same output in git-status .. . .. . you can see it clearly in the status output the new name of the file : .. . .. . and the old name : .. . .. . i think behind the scenes git-mv is nothing more than a wrapper script which does exactly that : delete the file from the index and add it under a different name Comment : I didn t think I had to git-rm css iphone.css because I thought this would remove the existing history . Maybe I m misunderstanding the workflow in git . Comment : @Greg K : git-rm will not remove history . It only removes an entry from the index so that the next commit will not have the entry . However it will still exist in the ancestral commits . What you may be confused about is that for example git-log -- new will stop at the point where you committed git-mv old new . If you want to follow renames use git-log --follow -- new .", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : Git will recognise the file from the contents rather than seeing it as a new untracked file .. . .. . That s where you went wrong . It s only after you add the file that git will recognize it from content .", "Question : Question .. . .. . Does it make a difference if I move Git tracked files with the git-mv http : git-scm.com docs git-mv command as opposed to just moving the files with MS-DOS move http : www.computerhope.com movehlp.htm or the Windows Explorer Back in the Subversion days it was necessary to use for example the TortoiseSVN SVN Move versioned files here http : tortoisesvn.net docs release TortoiseSVN en tsvn-dug-rename.html command to keep the history intact . I would have expected it to work the same way in Git but a test see example below showed that Git detects by itself that the file has been moved and that the history is kept intact . So why use git-mv at all Example .. . .. . The entire history has been retained despite not using git-mv and Git says that is has detected a renaming . .. . Answer : When you use git-mv it will index the modifications for you .. . .. . If you do it manually with your OS you will need to do .. . .. . So that git understands you actually renamed the file .", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : For git 1.7.x the following commands worked for me : .. . .. . There was no need for git-add since the original file i.e . css mobile.css was already in the committed files previously .", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : In cases where you really have to rename the files manually for eg . using a script to batch-rename a bunch of files then using git-add -A . worked for me .", "Question : Someone changed a file name and its content in a way that git was unable to detect that it was the same file . They also didn t use git-mv so when I got the pull request I saw a new file being added and an old file being deleted which makes it impracticable for reviewing . Being a nice guy I pulled their code and tried to do a late git-mv so I d be able to add a commit to their pull request and see things beautifully on Github review page but that didn t work . Is there a way to do a posthumous rename of a file .. . Answer : Git doesn t track file identity : there s nothing in the repository that says that file bar in revision n was renamed copied moved from file foo in revision n -1 . Doing git-mv is the same as doing plain mv followed by git-add on the new name and git-rm on the old . The repository just stores a snapshot of the directory tree at each commit and it s up to the tools examining the repository to make decisions about how the files in different commits relate to each other . When you re looking at the revision history and git says a file was moved or renamed it s determining that locally as a guess based on the similarity of the old and new files contents . Many git commands support a -M option that lets you specify the similarity threshold for deciding that a delete and an add-in the same commit should be regarded as a rename . The default threshold is 50 . If you want git to treat the change as a rename by default without having to specify a lower -M threshold every time you examine the repository you can split the change into two commits : one to change the contents while keeping the name and one to rename the file while keeping the contents unchanged or at least less than 50 changed . Doing this posthumously will of course require resetting the branch head to before the old commit replacing it with the two new commits force-pushing and contacting anyone who might have pulled the original version to let them know you ve changed history . This is no different from making any other kind of change to a commit that s been published to others . Comment : and I suppose github doesn t let me somehow specify the -M to their code comparison page right Comment : Not that I know of but I don t use github much . Comment : @Roberto - A quick browse through github.com tiimgreen github-cheat-sheet https : github.com tiimgreen github-cheat-sheet didn t turn up anything but maybe you ll have better luck than I did . And if you didn t already know about that cheat sheet well glad I could help . : -", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : Let s think about your files from git perspective . Keep in mind git doesn t track any metadata about your files .. . .. . Your repository has among others .. . .. . and it is under git control : .. . .. . Test this with : .. . .. . When you do .. . .. . From git perspective .. . .. . there is no iphone.css it is deleted -git warns about that- . there is a new file mobile.css . Those files are totally unrelated . So git advises about files it already knows iphone.css and new files it detects mobile.css but only when files are in index or HEAD git starts to check their contents . At this moment neither iphone.css deletion nor mobile.css are on index . Add iphone.css deletion to index .. . .. . git tells you exactly what has happened : iphone.css is deleted . Nothing more happened .. . .. . then add new file mobile.css .. . .. . This time both deletion and new file are on index . Now git detects context are the same and expose it as a rename . In fact if files are 50 similar it will detect that as a rename that let you change mobile.css a bit while keeping the operation as a rename . See this is reproducible on git-diff . Now that your files are on index you must use --cached . Edit mobile.css a bit add that to index and see the difference between : .. . .. . and .. . .. . -M is the detect renames option for git-diff . -M stands for -M50 50 or more similarity will make git express it as a rename but you can reduce this to -M20 20 if you edit mobile.css a lot .", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : For git-mv the manual page http : kernel.org pub software scm git docs git-mv.html says .. . .. . The index is updated after successful completion ... . .. . .. . So at first you have to update the index on your own by using git-add mobile.css . However .. . git-status will still show two different files .. . .. . You can get a different output by running git-commit --dry-run -a which results in what you expect .. . .. . I can t tell you exactly why we see these differences between git-status and .. . git-commit --dry-run -a but here is a hint from Linus http : marc.info l git m 119638337122721 w 2 .. . .. . git really doesn t even care about the whole rename detection internally and any commits you have done with renames are totally independent of the heuristics we then use to show the renames . A dry-run uses the real renaming mechanisms while a git-status probably doesn t . Comment : You failed to mention the step where you did git-add mobile.css . Without it git-status -a would only have seen the removal of the previously tracked iphone.css file but would not have touched the new untracked mobile.css file . Also git-status -a is invalid with Git 1.7.0 and later . git-status is not git-commit --dry-run anymore . in kernel.org pub software scm git docs RelNotes-1.7.0.txt http : www.kernel.org pub software scm git docs RelNotes-1.7.0.txt . Use git-commit --dry-run -a if you want this functionality . As others have said just update the index and git-status will just work as the OP expects . Comment : if you do a normal git-commit it will not commit the renamed file and the working tree is still the same . git-commit -a defeats pretty much every aspect of git s workflow thinking model every change is committed . what if you only want to rename the file but commit changes to index.html in another commit Comment : @Chris : yep of course I added mobile.css which I should have mentioned . But that s the point of my answer : the man page says that the index is updated when you use git-mv . Thanks for the status -a clarification I used git 1.6.4 Comment : @knittl : I forgot to write that I added mobile.css before running git-status but you can tell that I did so by the output . I edited the answer and it should show me point much better now Comment : Great answer I was banging my head against the wall trying to figure out why git-status wasn t detecting the renaming . Running git-commit -a --dry-run after adding my new files showed the renames and finally gave me confidence to commit", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : Best thing is to try it for yourself . Now git-status and git-commit --dry-run -a shows two different results where git-status shows bbb.txt as a new file aaa.txt is deleted and the --dry-run commands shows the actual rename . Now go ahead and do the check-in . Now you can see that the file is in fact renamed and what s shown in git-status is wrong . Moral of the story : If you re not sure whether your file got renamed issue a git-commit --dry-run -a . If its showing that the file is renamed you re good to go . Comment : For what matters for Git both are correct . The latter is being closer to how you as commiter probably see it though . The real difference between rename and delete + create is only at the OS filesystem level e.g . same inode vs . new inode which Git does not really care very much about . Comment : This is the clearest answer for a noob like me .", "Question : I d read that when renaming files in git http : blog.bauermann.eng.br 2008 01 03 take-care-when-renaming-files-in-git you should commit any changes perform your rename and then stage your renamed file . Git will recognise the file from the contents rather than seeing it as a new untracked file and keep the change history . However doing just this tonight I ended up reverting to git-mv . Rename my stylesheet in Finder from iphone.css to mobile.css .. . .. . So git now thinks I ve deleted one CSS file and added a new one . Not what I want lets undo the rename and let git do the work . Back to where I began . Lets use git-mv instead . Looks like we re good . So why didn t git recognise the rename the first time around when I used Finder Comment : Git tracks content not files so it doesn t matter how you get your index into the proper state - add+rm or mv - it produces the same result . Git then uses its rename copy detection to let you know it was a rename . The source you quoted is inaccurate too . It really doesn t matter whether you modify+rename in the same commit or not . When you do a diff across both the modify and rename the rename detection will see it as a rename+modification or if the modification is a total rewrite it ll show as added and deleted - still doesn t matter how you performed it . Comment : If this is true why didn t it detect it with my rename using Finder Comment : git-mv old new automatically updates the index . When you rename outside of Git you will have to do the git-add new and git-rm old to stage the changes to the index . Once you have done this git-status will work as you expect . Comment : I just moved a bunch of files into a public html dir that are tracked in git . Having performed git-add . and git-commit it still showed a bunch of deleted files in git-status . I performed a git-commit -a and the deletions were commited but now I ve no history on the files that live in public html now . This work flow is not as smooth as I d like . .. . Answer : For Xcode users : If your rename your file in Xcode you see the badge icon change to append . If you do a commit using XCode you will actually create a new file and lose the history . A workaround is easy but you have to do it before commiting using Xcode : .. . .. . 1 . Do a git Status on your folder . You should see that the staged changes are correct : .. . .. . renamed : Project OldName.h - Project NewName.h renamed : Project OldName.m - Project NewName.m .. . .. . 1 . do commit -m name change .. . .. . Then go back to XCode and you will see the badge changed from A to M and it is save to commit furtur changes in using xcode now .", "Question : I know that git provides the git-rm and git-mv to remove move files or directories . But I can t see the practical use-case for this . Normally I just mv or rm the files or whatever in the command-line and after I m done with all the necessary actions I can just run git-add -u and git-add . as I asked and got answers in here http : stackoverflow.com questions 3638897 staging-modified-files-according-to-their-status-with-git . Am I missing something Are there any cases that only git-rm and git-mv capable of .. . Answer : git-rm and git-mv allows you to be more specific granular about what you re doing . If you ve deleted two directories and want to split up those deletions between two commits you can use git-rm to remove only one directory from the staging area rather than getting them both via git -u", "Question : I know that git provides the git-rm and git-mv to remove move files or directories . But I can t see the practical use-case for this . Normally I just mv or rm the files or whatever in the command-line and after I m done with all the necessary actions I can just run git-add -u and git-add . as I asked and got answers in here http : stackoverflow.com questions 3638897 staging-modified-files-according-to-their-status-with-git . Am I missing something Are there any cases that only git-rm and git-mv capable of .. . Answer : git-mv http : www.kernel.org pub software scm git docs git-mv.html and git-rm http : www.kernel.org pub software scm git docs git-rm.html are about updating the index directly . While directly moving or deleting files in the working tree won t immediately affect the index . The GitFaq https : git.wiki.kernel.org index.php GitFaq Why does git not .22track.22 renames.3F does present git-mv as : .. . .. . just a convenience . The effect is indistinguishable from removing the file and adding another with different name and the same content . Comment : +1 convenience is certainly a practical use-case .", "Question : In bash I can do find . -name jndi.properties -exec rename s jndi environment to recursively find all jndi.propertie files and have them renamed to environment.properties . But git-status does not recognize the mv it shows the deletion and addition separately . How can I do recursive git-mv Comment : find . -name jndi.properties -exec git-mv oldFileName s jndi environment Comment : man git-status . There is an option to detect renames . And technically IT IS deletion and addition in git internals .. . Answer : Since you re doing an exact match on the name you don t really need to do a dynamic substitution do you If your find supports it BSD and GNU do but it s not specified in POSIX you could use -execdir to execute the command in the directory so you could just do Comment : This will not help with git-status Comment : I was not aware of the -execdir possibility . thanks . Comment : @AlexeyTen it seems to keep the deleted part of the status but I don t see the add part with my solution so it half-helps with the git-status", "Question : I know that git provides the git-rm and git-mv to remove move files or directories . But I can t see the practical use-case for this . Normally I just mv or rm the files or whatever in the command-line and after I m done with all the necessary actions I can just run git-add -u and git-add . as I asked and got answers in here http : stackoverflow.com questions 3638897 staging-modified-files-according-to-their-status-with-git . Am I missing something Are there any cases that only git-rm and git-mv capable of .. . Answer : you could do it the way you said but it sounds like it would be simpler to use git-rm and git-mv as it s a one-step process .", "Question : I ve accidentally used mv to rename a file which was under git . I renamed the file from lower case to uppercase keeping the name same . mv abc.java ABC.java .. . .. . I ve also made changes and committed the file after that . How do I now make an actual git rename of this file Git bash doesn t seem to understand the difference between ABC.java and abc.java . I m not sure what changed on master by others but after moving to a branch I m no more able to commit my changes to the file . It says the old file index still exists . git-commit -m renamed to uppercase ABC.java fatal : Will not add file alias dir1 ABC.java dir1 abc.java already exists in index .. . .. . When I do git-status it shows the renamed files but doesn t let me commit the renamed files . If I try to do a delete abc.java which is actually not present at least locally again I think because of case insensitivity git deletes the new one . If I clone a new repo out of this the repo still pulls out the files with old name abc.java but all my changes until the recently failing ones are there in it . Comment : What version of git are you using Woudl a git-rm --cached abc.java help followed by git -A . and git-commit Comment : git-rm --cached abc.java fatal : pathspec abc.java did not match any files I m not sure if git thinks abc.java is in git or not . It says its not under git but also says it is in the index . .. . Answer : You can do : Comment : could you please explain a bit on what the above expression means . I m a bit scared to use mv without understanding . I shall update on the versions soon Comment : @AshwiniR hey git please rename the file abc.java to ABC.java Comment : If it s same as git-mv abc ABC then I can t do that . It says abc is not under source control", "Question : I am using GIT under windows with the GIT Bash tool and was trying to move a file from one directory to the another . I tried different methods like clean commit again etc . but everytime I got a reply while using git-mv that the said file is not under version-control . However git-status -u shows that everything is OK . After trying a lot I found the answer which I am going to answer myself . .. . Answer : I found out that the reason was a uppercase in the directory name . Well GIT under Windows does not detect the difference in the case-when looking for changed files through git-status -u . The file which I wanted to move was in a directory whose name was ABCD but the commited version was abcd . I dont know how the directory name changed to uppercase but thats not the point here . If you have such a constellation where the commmitted version differs from the checkout version with respect to the case of the directory name git-status -u will never complain ." ] }
[ "yes-answer-long", "yes-answer-short" ]
symlink
UNK_RELATION
jsf-1.2@jsp@105
jsf-1 .2 -- jsf-1 .2 is the latest release of the jsf 1.x specification and it works with servlet-2 .5 and @placeholder 2.1 .
{ "confidence": [ 76.15453338623047, 72.72050476074219, 72.71638488769531, 67.60406494140625, 66.09455108642578, 65.11924743652344, 64.91169738769531, 64.83865356445312, 64.07967376708984, 63.200599670410156, 59.3415412902832, 58.98293685913086, 58.48834991455078, 58.250526428222656, 57.61592102050781, 56.68062210083008, 56.19002914428711, 55.64425277709961, 55.64425277709961, 54.89258575439453, 54.792816162109375, 54.792816162109375, 54.792816162109375, 53.49089050292969, 52.959041595458984, 52.959041595458984, 52.93830871582031, 52.28045654296875, 52.28045654296875, 51.96733856201172, 51.64822769165039, 51.203670501708984, 51.203670501708984, 51.203670501708984, 51.203670501708984, 51.203670501708984, 50.80793762207031, 50.30862045288086, 49.799530029296875, 49.163700103759766, 48.995059967041016, 48.89533615112305, 48.51779556274414, 48.38249206542969, 48.34339141845703, 47.839874267578125, 47.6336784362793, 47.344200134277344, 47.3264045715332, 47.161285400390625, 46.94482421875, 46.938270568847656, 46.27968978881836, 46.27968978881836, 46.27968978881836, 46.27968978881836, 46.27968978881836, 46.27968978881836, 46.065162658691406, 45.89833068847656, 45.80863571166992, 45.68877029418945, 45.36933135986328, 45.239295959472656, 45.239295959472656, 45.239295959472656, 45.203468322753906, 44.74966812133789, 44.74966812133789, 44.74966812133789, 44.59022521972656, 44.574283599853516, 44.574283599853516, 44.574283599853516, 44.574283599853516, 44.574283599853516, 44.574283599853516, 44.373931884765625, 44.29375076293945, 43.880611419677734, 43.603092193603516, 43.558834075927734, 43.558834075927734, 43.558834075927734, 43.40451431274414, 43.40451431274414, 43.06304168701172, 42.9158935546875, 42.9158935546875, 42.9158935546875, 42.9158935546875, 42.4363899230957, 42.283905029296875, 42.283905029296875, 42.283905029296875, 42.283905029296875, 42.283905029296875, 42.283905029296875, 42.08280563354492 ], "content": [ "And the OP is using JSF 1.x not 2.x .", "See also : .. . .. . Migrating JSF 1.1 with Ajax4jsf 1.x to JSF 2 http : stackoverflow.com questions 17553033 migrating-jsf-1-1-with-ajax4jsf-1-x-to-jsf-2 .. . Migrating from JSF 1.2 to JSF 2.0 http : stackoverflow.com questions 4441713 migrating-from-jsf-1-2-to-jsf-2-0 .. . a4j : support tag not found using JSF 2 http : stackoverflow.com questions 5402697 a4jsupport-tag-not-found-using-jsf-2", "I have to use JSF 1.x and cannot upgrade it to JSF 2 .", "jsf 1.x", "Mojarra is the reference implementation of the Oracle JSF 1.x 2.x spec .", "This is not compatible with JSF 2.x .", "The jspx tag on question only confirms JSF 1.x more as JSP is deprecated in JSF 2.x and no one sane developer would use it in JSF 2.x .", "This answer works in JSF 2.x only .", "For that refer this answer : Migrating from JSF 1.2 to JSF 2.0 http : stackoverflow.com questions 4441713 migrating-from-jsf-1-2-to-jsf-2-0 4532870 4532870 .", "It s not available in JSF 1.x .", "@T.G Hint : question is about JSF 1.x .", "As pointed by BallusC this answer works in JSF 2.x only sorry .", "Are you using jsf-2 or no", "JSF 2.1 which offer much better functionality .", "Note that this is not JSF 1.x specific the same applies on JSF 2.x as well and also on UIRepeat class behind Facelets ui : repeat .", "Migrating from JSF 1.2 to JSF 2.0 http : stackoverflow.com questions 4441713 migrating-from-jsf-1-2-to-jsf-2-0 and Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards", "Better ask OP which JSF version exactly he is using before suggesting JSF 2.x specific solutions .", "You seem to be trying to use JSF 1.2 with Facelets 1.x .", "It s however possible to integrate Facelets 1.x in JSF 1.2 .", "If you are learning JSF then avoid using that legacy JSF 1.2 thing and start with an average later version - at least JSF 2 .", "@Mahendran : nothing in the question implies that OP is using JSF 2.x .", "OP did nowhere imply confirm that he is using JSF 2.x .", "You need to look for a JSF 2.x targeted question answer .", "Is there anything equivalent in JSF 1.2 .. . .. . Passing parameters to method calls is not specific to JSF 2 .", "Upgrade your application code to work with JSF 2.x .", "This was only available in JSF 2.x in flavor of f : ajax listener .", "This does not work on IBM WAS 7 JSF 1.2 JSP 2.1 .", "I ve googled for things such as custom JSF 1.x components with javascript etc .", "classes in the stacktrace tells that you re still using Ajax4jsf for JSF 1.x .", "jsf-1.2 or jsf 2.0", "Sorry I should have clarified that I m using JSF 1.2 and seems like the h : button tag only is supported in JSF 2.x", "We will be moving to JDeveloper 12c and JSF 2 as soon as possible .", "@Lion probably maintenance of a legacy application that can t migrate to JSF 2 .", "I have seen in JSF 2 that it is possible to pass parameters to method calls .", "I have seen in JSF 2 that it is possible to pass parameters to method calls .", "JSF 2 just happens to be part of Java EE 6 as well .", "Case 3 namely uses JSF 2.x specific syntax .", "JSF 1.2 is 100 backwards compatible with JSF 1.1 .", "The task is to find way to use datatable s var in the columns block using jsf-1.2 Earlier I use jsf 2.1 and I didn t have such problems .", "But it ll in end make the upgrade path to JSF 2.x so much easier .", "my current application use jsf 1 and doesnt use Ajax", "Moreover reRender attribute implies RichFaces 3.x which strongly suggests JSF 1.x .", "we are using jsf-impl jsf-api jsf-ibm jars .", "It s only migrating from JSF 1.x to 2.x which requires more work for sure if you also need to change the view technology from JSP to Facelets .", "Hope this works with JSF 1.2.. .", "I m using JSF 1.2 not 2 so no composite-component .", "Why not given them up and upgrade the application to have at least JSF 2.x", "In other words if you deploy your JSF 1.2 web application to a Servlet 3.0 compatible container like Tomcat 7 Glassfish 3 etc and your web.xml is declared conform Servlet 3.0 spec version then it ll just work out the box for JSF 1.x as well .", "Nobody would expect that one would be using JSF 1.x these days as it has more than 5 years ago been upgraded to JSF 2.0 and is EOL ed for three years .", "That makes sense I never used JSF 1 with JSP", "When trying this with JSF 1.2 this is working but not with JSF 2.2 .", "https : community.jboss.org message 845006 or Migrate JSF 1.2 Seam app to WildFly Beta 1 http : stackoverflow.com questions 19843066 migrate-jsf-1-2-seam-app-to-wildfly-beta-1 but the proposed solution excluding the weld subsystem doesn t work for me .", "I m using JSF 1.2 .", "JSF 1.2 .. . 4 .", "My Question is related to jsf .", "They re both JSF 1.2 .", "Is it a JSF version issue", "Is there anything equivalent in JSF 1.2", "I m using JSF 1.2 .. . .. . The mentioned context-param is introduced in JSF 2.0 .", "Have a look at this post http : stackoverflow.com questions 11578940 jsf-1-2-not-able-to-retreive-bean-values-in-xhtml-page 11579028 comment15320495 11579028 .", "While upgrading the application from jsf-1.1 to jsf-1.2 i am getting the below error .. . .. . Below is the tld file .. . .. . Edit 2 : Tld tag below that is used in jsp .. . .. . Edit 3 : JSP code .. . .. . Edit 4 : Below is stack-trace after changed the namespace to 2.1", "I m not sure about the compatibility of the old Sun Rave framework on JSF 2 .", "I use the latest version of JWL and Portlet Bridge jsf-ibm.jar v 3.1.20 jsf-portletbridge.jar v 3.1.19 .", "It s not useable on JSF 1.x but it s open-source and should provide some insight .", "I am working on JSF 1.x On an example stated in JavaServer Faces in Action .", "You should rather be using an action event here but this was not available for inputs in JSF 1.x .", "It is necessary to use the ICEfaces 1.8.2a release libraries on Glassfish 3 as the original ICEfaces 1.8.2 runtime libraries will fail with a JSF 2 not supported error when used in a JEE5 JSF 1.2 project .", "i m using jsf-1.2", "JSF indeed doesn t validate that .", "jsf-1.2 with Apache MyFaces", "How exactly does that fail in JSF 1.2", "Are seam 1.1 and JSF 1.2 compatible", "I am using JSF 1.2 .", "Does it already have JSF builtin", "Replace .. . .. . by .. . .. . to get JSF to autocreate the bean .", "Sorry missed the JSF 1.2 part .", "What JSF impl version exactly", "I m noticing a lot of issues operating the hot deploying of JSF pages in the following environment : .. . .. . 1 .", "Only if you re relying on view scoped state but in JSF 1.x the view-scope already doesn t exist as a managed-bean scope .", "You ve 2 options : .. . .. . 1 .", "You know JSF is an abstraction over the raw Servlet API .", "I m using JDeveloper 11.1.2.4 with JSF 1.2 and having issues with the selectOneChoice components that are being populated by JSF selectItems .", "Problem resolved only changed the jars in WEBINF jsf-api-1.2 10.jar and jsf-impl-1.2 10.jar .", "An AJAX call invokes the JSF lifecycle the same way that any regular JSF postback would .", "I have been using JSF + RF for over 2 years and have nt had a chance to extend the existing capabilities of components .", "Point 2 : Your method addRow return a String which is an ID used by JSF for the navigation .", "Given the lack of Facelets view handler I wonder if you re reading the right Facelets tutorial since JSF 2.0 a Facelets view-handler configuration is not mandatory as it s the default view handler already so perhaps you were accidently reading a JSF 2.0 targeted tutorial while you should really be reading the one for JSF 1.x so for the sake of completeness here s a link-to the official developer guide of Facelets 1.x http : facelets.java.net nonav docs dev docbook.html .", "Or this possible when using jsf", "Only for JSF 2.0.. .", "But it s not possbile to set it in jsf .", "In JSF side you mean", "The Sun JSF Reference Implementation also known as Sun JSF RI was named like that just JSF RI from the beginning on until version 1.2 08 .", "I am using a selectManyListbox with JSF 1.2 .", "I m using richfaces 3 and jsf-1.2 .", "CKEditor is not a JSF component its a third library", "I have a form with JSF 1.2 RichFaces 3.3.4 .", "If you want to implement this mechanism inside JSF context .", "Sadly we are using JSF 1.2 and JSP .", "http : stackoverflow.com questions 5897262 jsf-1-2-how-to-keep-managed-bean-with-request-scope 5897322 5897322 .. . How to call an action method of a UICommand Component which was rendered conditionally" ] }
{ "confidence": [ 69.23889923095703, 69.13087463378906, 67.50515747070312, 67.4594497680664, 66.04569244384766, 65.52642059326172, 64.80744171142578, 64.18160247802734, 63.66857147216797, 63.603755950927734, 62.43958282470703, 61.626548767089844, 60.64988708496094, 60.363121032714844, 59.61613845825195, 58.97327423095703, 58.79469299316406, 58.39449691772461, 58.377479553222656, 58.042030334472656 ], "content": [ "Question : I would like after click on save button data should be saved and user redirected to corbeille page . This is my current implementation : .. . .. . I tried with this : .. . .. . it is not working How can I do this Comment : Have only one action . Have the save method return-type as String . After you save the values return the path to your welcome page or the navigation case to your welcome page . E.g return welcome.xhtml redirect-faces true Comment : Or you can do save in actionListener and have action welcome.xhtml redirect-faces true Comment : @Mahendran : nothing in the question implies that OP is using JSF 2.x . Moreover reRender attribute implies RichFaces 3.x which strongly suggests JSF 1.x . The jspx tag on question only confirms JSF 1.x more as JSP is deprecated in JSF 2.x and no one sane developer would use it in JSF 2.x . Better ask OP which JSF version exactly he is using before suggesting JSF 2.x specific solutions . Comment : @BalusC oh thanks . My inexperience in richfaces is showing . So I am thinking aloud here . So h : outputLink or navigation case .. . Answer : To enable page redirection just add faces-redirect true in the end of the string return on the bean . As pointed by BallusC this answer works in JSF 2.x only sorry . You could use the onComplete attribute of the a4j button to execute the redirect which version of JSF are you using tag documentation http : docs.jboss.org richfaces latest vdldoc a4j commandButton.html Comment : This answer works in JSF 2.x only . OP did nowhere imply confirm that he is using JSF 2.x . Comment : i m using jsf-1.2 Comment : Since i m new to JSF i have not worked with versions before 2.0 and cant do much to help you . About the a4j button as told above 2 actions will not work you can try to change the second one to the onComplete attribute it will execute its method after the request has been completed . Good Luck and hope your problem will be solved soon", "Question : null .. . Answer : While upgrading the application from jsf-1.1 to jsf-1.2 i am getting the below error .. . .. . Below is the tld file .. . .. . Edit 2 : Tld tag below that is used in jsp .. . .. . Edit 3 : JSP code .. . .. . Edit 4 : Below is stack-trace after changed the namespace to 2.1 Comment : @BalusC do you have any idea . Comment : As already stated you are likely to face unusual problems regularly with those versions . Why not given them up and upgrade the application to have at least JSF 2.x It is even quite difficult to get some help for those legacy JSF versions . Comment : You don t even provide the JSP code where this exception appears . Seriously it s hard to help you with the current state of your question .", "Question : I am using a datatable and for each row I have two buttons an Edit and a Delete . I need these buttons to be read-only i.e . disabled if a certain condition is met for the row in question . I have seen in JSF 2 that it is possible to pass parameters to method calls . Is there anything equivalent in JSF 1.2 Ideally what I would like it something like the looping variable is loop and there is another bean helper which contains the method I would like to invoke : .. . .. . In this case it does not make semantic sense to add an isEditable attribute to the bean and it is not practical to create a wrapper Object around the bean . Thanks in advance . .. . Answer : I have seen in JSF 2 that it is possible to pass parameters to method calls . Is there anything equivalent in JSF 1.2 .. . .. . Passing parameters to method calls is not specific to JSF 2 . It is specific to EL 2.2 which is in turn part of JSP 2.2 Servlet 3.0 Java EE 6 . JSF 2 just happens to be part of Java EE 6 as well . In other words if you deploy your JSF 1.2 web application to a Servlet 3.0 compatible container like Tomcat 7 Glassfish 3 etc and your web.xml is declared conform Servlet 3.0 spec version then it ll just work out the box for JSF 1.x as well . If you re however still targeting a container of an older Servlet version then you need to supply a different EL implementation which supports invoking methods with arguments . One of those implementations is JBoss-EL http : docs.jboss.org seam 2.0.0.GA reference en html elenhancements.html which you can install by just dropping the jboss-el.jar https : maven.atlassian.com content repositories jboss-releases org jboss-seam jboss-el 2.0.0.GA jboss-el-2.0.0.GA.jar file in WEB-INF lib of your webapp and adding the following context parameter to the web.xml . Here s a Mojarra-specific example Mojarra http : stackoverflow.com questions 7162190 what-is-mojarra is the codename of JSF RI : .. . .. . If you re using MyFaces as JSF implementation you need the following context parameter instead : .. . .. . See also : .. . .. . Invoke direct methods or methods with arguments variables parameters in EL http : stackoverflow.com questions 3284236 invoke-direct-methods-or-methods-with-arguments-variables-parameters-in-el", "Question : We are migrating our JSF 1.2 project to JSF 2.0 and using a command button in a JSP page .Clicking command button get a reponse from external system and display response . While clicking this command button we are getting blank page with below execption .. . .. . During debug I found that we are getting a success response but its not able to find original page as it lost state view ID .. . .. . Is there any specific config required in web.xml to save view state .. . Answer : The presence of Ajax4jsf 1.x specific org.ajax4jsf . classes in the stacktrace tells that you re still using Ajax4jsf for JSF 1.x . This is not compatible with JSF 2.x . You must remove all Ajax4jsf 1.x related JAR files and registrations in web.xml . You need to use JSF s own f : ajax facilities instead or to upgrade to RichFaces 4.x which bundles a newer JSF 2.0 compatible version of a4j : xxx tags . Note that this in turn requires Facelets instead of JSP . So you have to migrate from JSP to Facelets as well . See also : .. . .. . Migrating JSF 1.1 with Ajax4jsf 1.x to JSF 2 http : stackoverflow.com questions 17553033 migrating-jsf-1-1-with-ajax4jsf-1-x-to-jsf-2 .. . Migrating from JSF 1.2 to JSF 2.0 http : stackoverflow.com questions 4441713 migrating-from-jsf-1-2-to-jsf-2-0 .. . a4j : support tag not found using JSF 2 http : stackoverflow.com questions 5402697 a4jsupport-tag-not-found-using-jsf-2", "Question : We migrated to WebSphere 7.0 from 6.1 recently and also upgraded from JSF1.1 to JSF1.2 . Everytime the session expires and anything is submitted through the browser i now get an exception : .. . .. . How can i prevent that error The results of a request are rendered on the same page as the input fields . I am using a session scoped backing bean for the page . Edit : It does look like a WAS 7.0 JSF 1.2 migration issue see https : www.ibm.com developerworks forums thread.jspa threadID 332460 tstart 30 https : www.ibm.com developerworks forums thread.jspa threadID 332460 tstart 30 no answer provided .. . .. . BalusC explains here why it happens javax.faces.application.ViewExpiredException : View could not be restored http : stackoverflow.com questions 3642919 javax-faces-application-viewexpiredexception-view-could-not-be-restored . But why did it not happen before Several apps were working fine before the migration . Comment : A slightly offtopic question but why do you near the end of 2011 still migrate to something as old as WebSphere 7 and JSF 1.2 Both have been superseded by WebSpere 8 resp . JSF 2.1 which offer much better functionality . Comment : 1 . Being on the latest version of IBM products is not a painless experience . 2 . Management decision . .. . Answer : Have you checked this Handling session expired in JSF web application running in JBoss AS 5 http : stackoverflow.com questions 1030892 handling-session-expired-in-jsf-web-application-running-in-jboss-as-5 .. . .. . At least that is how I m handling session expiration in my JSF application . Hope it helps Steven Comment : I would like to not handle it at all as i used to . But instead of refreshing the page it now shows a HTTP 500 in the browser .", "Question : Is there any way of iterating over a list in JSF 1.2 without using any third party components I know I can do it using Tomahawk . I also know that it can be done using JSTL but I am keeping that as my last resort . Also I cannot use ui : repeat since we are using JSF 1.2 . Is there any elegant way like ui : repeat to do it in jsf-1.2 .. . Answer : The only JSF 1.2 component http : docs.oracle.com javaee 5 javaserverfaces 1.2 docs tlddocs which can iterate over a List is the h : dataTable http : docs.oracle.com javaee 5 javaserverfaces 1.2 docs tlddocs h dataTable.html . In JSP the only other standard i.e . not 3rd party tag which can iterate over a List is the JSTL c : forEach http : docs.oracle.com javaee 5 jstl 1.1 docs tlddocs c forEach.html . Using JSTL shouldn t harm that much if the List which you d like to iterate over is already available during view build time . You ll only run into trouble when it s only available during view render time for example because it s been nested in a h : dataTable and should be iterating over a property of table s var . This just won t work due to reasons also mentioned in JSTL in JSF2 Facelets.. . makes sense http : stackoverflow.com questions 3342984 jstl-in-jsf2-facelets-makes-sense 3343681 3343681 .. . .. . There are no other ways without using a 3rd party library such as Tomahawk s t : dataList unless you re open to reinventing the wheel by creating a custom UIComponent yourself . This is however not a trivial job . It s however possible to integrate Facelets 1.x in JSF 1.2 . A guide is described in the Facelets 1.x docbook http : facelets.java.net nonav docs dev docbook.html . This is only going to be quite some of work if you already have an existing JSF application using JSP as view technology you d need to convert JSP to Facelets . But it ll in end make the upgrade path to JSF 2.x so much easier . See also a.o . Migrating from JSF 1.2 to JSF 2.0 http : stackoverflow.com questions 4441713 migrating-from-jsf-1-2-to-jsf-2-0 and Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards http : stackoverflow.com questions 13092161 why-facelets-is-preferred-over-jsp-as-the-view-definition-language-from-jsf2-0-o Comment : thanks ...... . Comment : +1 for the detailed explaination Comment : You re welcome . Comment : Thank you for this depressing piece of information.. . Why oh why am I trapped in JSF 1.2 Comment : @nvy : you need a h : column to specify a table column . Also unlike in Facelets you can t use deferred EL in template text in JSP so you should really use h : outputText for the abc . So all with all this should do : h : datatable value bean.list var abc h : column h : outputText value abc h : column h : datatable . See also the Java EE 5 tutorial : docs.oracle.com javaee 5 tutorial doc bnarf.html bnarz http : docs.oracle.com javaee 5 tutorial doc bnarf.html bnarz", "Question : I m trying to get a very basic JSF page running . Using Websphere 7.0 as the server so I m trying to stick with JSF 1.2 . The browser isn t rendering the html by which I mean that it s simply displaying all the html code including doctype etc . My first guess might be that it s not getting passed through the FacesServlet but when the url-pattern doesn t match it gets page not found . Is it a JSF version issue Any other ideas Thanks folks .. . .. . I ve included jstl-api-1.2.jar and jstl-imp-1.2.jar in my lib folder . I have the following web.xml set up : .. . .. . faces-config.xml : .. . .. . index.jsp : .. . .. . And the start of the xhtml file : Comment : It looks that you re using Facelets in your proyect . If this is the scenario then you have a problem with the suffix and the pattern : Faces Servlet will process every .jsf page i.e . http : YourServerIP YourProject index.jsf but then the default suffix is xhtml . Try changing the Faces Servlet pattern to .xhtml and check that you re accesing to your pages like http : YourServerIP YourProject index.xhtml . .. . Answer : You seem to be trying to use JSF 1.2 with Facelets 1.x . That s fine but the Facelets view handler is missing in faces-config.xml . You should have the following entry in there : .. . .. . Note that you need the jsf-facelets.jar http : mavenhub.com mvn thirdparty-releases com.sun.facelets jsf-facelets 1.1.15 file for this . Also note that you actually don t need to provide JSTL http : stackoverflow.com tags jstl info along with your webapp WebSphere 7 as being a full fledged Java EE 5 application server already provides it by itself . I recommend to remove those JSTL JAR files as it might possibly conflict with the ones provided by WebSphere . JSF is also already provided by WebSphere but Facelets not as that is only part of Java EE since Java EE 6 . Given the lack of Facelets view handler I wonder if you re reading the right Facelets tutorial since JSF 2.0 a Facelets view-handler configuration is not mandatory as it s the default view handler already so perhaps you were accidently reading a JSF 2.0 targeted tutorial while you should really be reading the one for JSF 1.x so for the sake of completeness here s a link-to the official developer guide of Facelets 1.x http : facelets.java.net nonav docs dev docbook.html .", "Question : Can anybody tell me what things I need to keep in mind before migrating an application from JSF 1.1 to JSF 1.2 Comment : Are you using Rational Application Developer or WASdev Comment : no I am going to use eclipse but we are migrating from websphere 6.1 to 8.0 . .. . Answer : Not much really . JSF 1.2 is 100 backwards compatible with JSF 1.1 . Only thing which you need to take into account that JSF 1.2 fixes many really many bugs . So if you ever incorrectly assumed some specific JSF 1.1 application behavior as normal behavior but which is under the covers actually caused by a bug then it would seemingly break . In any case just run unit tests before and after the upgrade and fix the issues individually . It s only migrating from JSF 1.x to 2.x which requires more work for sure if you also need to change the view technology from JSP to Facelets . For that refer this answer : Migrating from JSF 1.2 to JSF 2.0 http : stackoverflow.com questions 4441713 migrating-from-jsf-1-2-to-jsf-2-0 4532870 4532870 . Comment : can you tell me is there any other way to run junit tests if we have not used annotations and also not extended TestCase class Comment : Would I only need to replace the libraries and the system will be up and running", "Question : We migrated to WebSphere 7.0 from 6.1 recently and also upgraded from JSF1.1 to JSF1.2 . Everytime the session expires and anything is submitted through the browser i now get an exception : .. . .. . How can i prevent that error The results of a request are rendered on the same page as the input fields . I am using a session scoped backing bean for the page . Edit : It does look like a WAS 7.0 JSF 1.2 migration issue see https : www.ibm.com developerworks forums thread.jspa threadID 332460 tstart 30 https : www.ibm.com developerworks forums thread.jspa threadID 332460 tstart 30 no answer provided .. . .. . BalusC explains here why it happens javax.faces.application.ViewExpiredException : View could not be restored http : stackoverflow.com questions 3642919 javax-faces-application-viewexpiredexception-view-could-not-be-restored . But why did it not happen before Several apps were working fine before the migration . Comment : A slightly offtopic question but why do you near the end of 2011 still migrate to something as old as WebSphere 7 and JSF 1.2 Both have been superseded by WebSpere 8 resp . JSF 2.1 which offer much better functionality . Comment : 1 . Being on the latest version of IBM products is not a painless experience . 2 . Management decision . .. . Answer : This is not new for JSF 1.2 and also has little to do with Websphere . My guess is that you previously had state stored on the client and thus never encountered this exception before . The default in JSF is to save the state on the server . You can explicitly ask for state on the client by putting the following in web.xml : .. . .. . See this question for a more elaborate answer : Why does JSF need to save the state of UI components on the server-side http : stackoverflow.com questions 5474316 why-does-jsf-need-to-save-the-state-of-ui-components-on-the-server-side Comment : Setting was always server .", "Question : I m noticing a lot of issues operating the hot deploying of JSF pages in the following environment : .. . .. . 1 . Eclipse Indigo latest version .. . 2 . Tomcat 5.5 .. . 3 . JSF 1.2 .. . 4 . Facelets View Handler .. . .. . I noticed that if I modify an already rendered xhtml page for example the CSS style of an element and then re-publish through Eclipse or manually copying the xhtml file inside Tomcat this page maintaining the servlet container up it doesn t show me the current changes . I also in vain setup the following configuration on my web application : .. . .. . My last tought is that the Restore-View Phase of a typical JSF page processing does not check if the client-view the xhtml page of course has changed from the last time it has been loaded in the FacesContext . If so how can i force the building of a new UIViewRoot object for each submitted request I m a lot frustrating in restarting the tomcat server for each change in jsf pages . Thanks a lot for your support . .. . Answer : Try adding the following to your web.xml config file : .. . .. . It tells JSF to re-render the Facelet . See how I put 1 . In a Prod environment you would always put -1 to disable this feature since the facelets shouldn t be changing in a Prod environment . You also need to make sure you can Hot Deploy class and JSP resources . You can find how to do that here : .. . .. . http : ducquoc.wordpress.com 2010 11 06 eclipse-wtp-tomcat-hot-deploy Comment : Works great thanks - Any thoughts on how to conditionally set this instead of hard-coding it into web.xml i.e . if server is localhost", "Question : I would like after click on save button data should be saved and user redirected to corbeille page . This is my current implementation : .. . .. . I tried with this : .. . .. . it is not working How can I do this Comment : Have only one action . Have the save method return-type as String . After you save the values return the path to your welcome page or the navigation case to your welcome page . E.g return welcome.xhtml redirect-faces true Comment : Or you can do save in actionListener and have action welcome.xhtml redirect-faces true Comment : @Mahendran : nothing in the question implies that OP is using JSF 2.x . Moreover reRender attribute implies RichFaces 3.x which strongly suggests JSF 1.x . The jspx tag on question only confirms JSF 1.x more as JSP is deprecated in JSF 2.x and no one sane developer would use it in JSF 2.x . Better ask OP which JSF version exactly he is using before suggesting JSF 2.x specific solutions . Comment : @BalusC oh thanks . My inexperience in richfaces is showing . So I am thinking aloud here . So h : outputLink or navigation case .. . Answer : The simplest way : Just return your welcome page full path on your consultDossier.save method . Comment : OP asked to perform a redirect not a forward . Comment : I do Agree with BalusC and I would like to manage this through my jspx", "Question : How is Mojarra different from Sun s JSF Reference Implemenation Is it just a later version Is it simply a rename .. . Answer : Mojarra is the reference implementation of the Oracle JSF 1.x 2.x spec .", "Question : If I have an exception in my business-layer e.g . a SQL exception in my JDBC connection bean how can I propagate it with a custom message to a global error.jsp page .. . Answer : JSF 1.x doesn t provide any implicit error-handling of this type though you can redirect to an error page using navigation rules assuming a form post .. . .. . .. . ...or using a redirect.. . I recommend looking at the JSF specification http : java.sun.com javaee javaserverfaces reference api for more details . Error messages can be placed on the request scope session-scope url-parameters as you like . .. . .. . Assuming a Servlet container you can use the usual web.xml error page configuration http : java.sun.com javaee 5 docs tutorial doc bnaeo.html bnaet . In your backing bean you can wrap and throw your checked-exceptions in RuntimeException http : java.sun.com javase 6 docs api java lang RuntimeException.html RuntimeException 28java.lang.Throwable 29 s . .. . .. . Some JSF implementations frameworks will catch these errors Apache MyFaces Facelets so you ll have to configure them not to http : wiki.apache.org myfaces Handling Server Errors . Comment : this was an excellent response I wish I could give you 10 points for your answer .", "Question : I m currently migrating a JSF-1.2 app to Wildfly 8 Final and am stuck : .. . .. . First of all I ve read many post with related issues e.g . https : community.jboss.org message 845006 or Migrate JSF 1.2 Seam app to WildFly Beta 1 http : stackoverflow.com questions 19843066 migrate-jsf-1-2-seam-app-to-wildfly-beta-1 but the proposed solution excluding the weld subsystem doesn t work for me . What I did : .. . .. . .. . I followed the multi-jsf feature tutorial here https : community.jboss.org wiki StepsToAddAnyNewJSFImplementationOrVersionToWildFly and installed JSF 1.2 as a module for wildfly to be exact 3 modules . The next was that I added exclusions for javax.faces.api and com.sun.jsf-impl main slots as well as the corresponding dependencies to the 1.2 slots to my jboss-deployment-structure.xml for my war . Since the app is using Tomahawk and Tomahawk Sandbox which I am also deploying with my ear I also excluded the main slots and included the 1.2 slots of both modules for these deployments . My problem : .. . .. . .. . When I try to call the initial page of the deployment login.xhthml I get the following error which is caused by the module org.jboss.as.jsf-injection in slot 1.2 .. . .. . The error is caused by the ConversationAwareViewHandler which is contained in the jar weld-core-jsf-2.1.2.Final.jar in module org.jboss.as.jsf-injection which I also installed with the JSF 1.2 modules . This Class still references JSF 2.2 API and fails accordingly . Excluding the weld subsystem from tomahawk and my war did also not work . I tried this : .. . .. . What can I do else .. . Answer : To make it short this problem is caused by an incompatibility of weld and JSF 1.2 that won t be fixed in future releases see here https : issues.jboss.org browse WFLY-3215 . In my opinion there are three ways one can go : .. . .. . 1 . Upgrade your application code to work with JSF 2.x . 2 . Exclude the weld subsystem where necessary will likely require reconfiguring the default-cdi settings of wildfly . 3 . Patch the class ConversationAwareViewHandler appropriately to act differently in case of the old JSF API . For me there was only the option to patch the JSF-injection module since an application upgrade was not possible and option 2 would require a larger restructuring of the application . Comment : Very well stated . I found out the following post access.redhat.com solutions 1273803 https : access.redhat.com solutions 1273803 which shows a way of configuring weld to use JSF 1.2 slot . It worked fine in EAP 6.3.0 .", "Question : I have a web-application where the users can be sent directly to some specific pages such as a page where he can view or edit an item . To achieve that we provide a specific url . These urls are located outside the current web-application i.e . they can be present in another web-application or in an email . The url looks like http : myserver my-app forward.jsf action XXX param YYY where : .. . .. . action represents the page where the user will be redirected . You can consider this as the from-outcome of any JSF action in navigation-case in faces-config.xml . actionParam is a parameter for the previous action generally an item ID .. . .. . So for example I can have these kind of urls : .. . .. . http : myserver my-app forward.jsf action viewItem actionParam 1234 .. . http : myserver my-app forward.jsf action editItem actionParam 1234 .. . .. . Of course I have a Java class bean that will check some security constraints i.e . is the user allowed to see edit the corresponding item and then redirect the user to the correct page such as edit.xhtml view.xhtml or access-denied.xhtml . .. . .. . Current implementation .. . .. . Currently we have a basic way to accomplish the forward . When the user clicks on the link the following XHTML page is called : .. . .. . As you can see I bind two h : inputHidden components in my Java bean . They will be used to store the value of both action and actionParam request parameter using FacesContext.getCurrentInstance .getExternalContext .getRequestParameterMap .get actiontParam . I also provide the doForward method that which will be called immediately when the page is rendered which will redirect again the user to the real page . The method is : .. . .. . .. . .. . This solution is working but I have two problems with that : .. . .. . I don t like the way it is implemented . I m sure that I can have something simplier using a Servlet . This solution is using Javascript and I must not use Javascript as this forward may be used by old Blackberry users where the Javascript is not supported . So my question is how to refactor this redirection forward feature .. . .. . Technical information .. . .. . Java 1.6 JSF 1.2 Facelets Richfaces Comment : I am not sure whether it is best to do or not but you are giving user a link-to click and using intermediate xhtml and making javascript click but Why are you not pointing it to a servlet and from there you can handle this scenario I mean instead of intermediate xhtml why not to use servlet . I don t think its bad to add our own servlet in jsf env Comment : @org : This can certainly be done without servlets . Using a servlet would only add extra maintenance headache because it doesn t have instant access to navigation cases . Comment : @BalusC Thanks I want to know how Can we use jsp scriptlets on xhtml directly Comment : @org : I have a theory but I only post answers of which I can tell from own experience that it s correct . And I don t have a JSF 1.2 playground environment at hands now . Maybe if I have more time . Using scriptlets is discouraged to all extent . Regardless of view technology . Comment : @org scriptlet is just outside my vocabulary And indeed if I create a solution using a Servlet I will not benefit of the navigation cases of JSF . .. . Answer : Set the GET query parameters as managed properties in faces-config.xml so that you don t need to gather them manually : .. . .. . This way the request forward.jsf action outcome1 actionParam 123 will let JSF set the action and actionParam parameters as action and actionParam properties of the ForwardBean . Create a small view forward.xhtml so small that it fits in default response buffer often 2KB so that it can be resetted by the navigationhandler otherwise you ve to increase the response buffer in the servletcontainer s configuration which invokes a bean method on beforePhase of the f : view : .. . .. . The ForwardBean can look like this : .. . .. . The navigation-rule speaks for itself note the redirect entries which would do ExternalContext redirect instead of ExternalContext dispatch under the covers : .. . .. . .. . .. . An alternative is to use forward.xhtml as .. . .. . and update the navigate method to be invoked on @PostConstruct which will be invoked after bean s construction and all managed property setting : .. . .. . It has the same effect however the view side is not really self-documenting . All it basically does is printing ForwardBean toString and hereby implicitly constructing the bean if not present yet . .. . .. . Note for the JSF2 users there is a cleaner way of passing parameters with f : viewParam and more robust way of handling the redirect navigation by f : event type preRenderView . See also among others : .. . .. . JSF - how to hit a bean method and redirect based on a get variable http : stackoverflow.com questions 7488211 jsf-how-to-hit-a-bean-method-and-redirect-based-on-a-get-variable .. . Is there any easy way to preprocess and redirect GET requests http : stackoverflow.com questions 7294651 is-there-any-easy-way-to-preprocess-and-redirect-get-requests Comment : I like your idea of using f : view beforePhase .. . . However my first tests are not succesfull as the beforePhase method is not called . I don t understand why.. . Comment : I still don t understand why the first solution does not work maybe I will create a separate post for that but the second solution is indeed working Thanks a lot Comment : Was the PhaseEvent argument present What JSF impl version exactly I must admit that I tested on 2.1-nightly with faces-config declared as 1.2 so that 2.x features won t work . That attribute was by the way introduced in 1.2 so won t work at all on 1.1 or older . But so is @PostConstruct .", "Question : I try to write my own tree component . A tree node renders as a div containing child components of the tree component for example : .. . .. . So far so good - everything works as expected but the h : outputText gets the same id repeatedly . So I had my component implement javax.faces.NamingController overwriting getContainerClientId : .. . .. . index is set and updated during iteration over the nodes . But getContainerClientId is called only once for every children not for every iteration and every children as I would expect . That causes every child id to be prefixed with the same container id : .. . .. . Same thing for overwriting getClientId . What did I miss Comment : My humble plea goes to Cura ao is there someone knowing the answer : .. . Answer : The answer is hidden in the bottom of chapter 3.1.6 of JSF 1.2 specification http : download.oracle.com otndocs jcp jsf-1.2-fr-eval-oth-JSpec : .. . .. . 3.1.6 Client Identifiers .. . .. . .. . .. . .. . The value returned from this method must be the same throughout the lifetime of the component instance unless setId is called in which case it will be recalculated by the next call to getClientId . In other words the outcome of getClientId http : docs.oracle.com javaee 5 api javax faces component UIComponent.html getClientId 28javax.faces.context.FacesContext 29 is by default cached by the JSF component as implemented in UIComponentBase getClientId http : docs.oracle.com javaee 5 api javax faces component UIComponentBase.html getClientId 28javax.faces.context.FacesContext 29 see also the nullcheck at line 275 as it is in Mojarra 1.2 15 http : grepcode.com file repo1.maven.org maven2 javax.faces jsf-api 1.2 15 javax faces component UIComponentBase.java UIComponentBase.getClientId 28javax.faces.context.FacesContext 29 and this cache is resetted when the UIComponentBase setId is called see also line 358 as it is in Mojarra 1.2 15 http : grepcode.com file repo1.maven.org maven2 javax.faces jsf-api 1.2 15 javax faces component UIComponentBase.java UIComponentBase.setId 28java.lang.String 29 . As long as you don t reset the cached client ID it will return the same value on every getClientId call . So while rendering the children in encodeChildren implementation of your component or the renderer which shall most probably look like this .. . .. . you should for every child be calling UIComponent setId http : docs.oracle.com javaee 5 api javax faces component UIComponentBase.html setId 28java.lang.String 29 with the outcome of UIComponent getId http : docs.oracle.com javaee 5 api javax faces component UIComponent.html getId 28 29 to reset the internally cached client ID before encoding the child : .. . .. . The UIData class behind the h : dataTable implementation does that by the way also see line 1382 as it is in Mojarra 1.2 15 http : grepcode.com file repo1.maven.org maven2 javax.faces jsf-api 1.2 15 javax faces component UIData.java UIData.restoreDescendantState 28javax.faces.component.UIComponent 2Cjavax.faces.context.FacesContext 29 . Note that this is not JSF 1.x specific the same applies on JSF 2.x as well and also on UIRepeat class behind Facelets ui : repeat .", "Question : I have a web-application where the users can be sent directly to some specific pages such as a page where he can view or edit an item . To achieve that we provide a specific url . These urls are located outside the current web-application i.e . they can be present in another web-application or in an email . The url looks like http : myserver my-app forward.jsf action XXX param YYY where : .. . .. . action represents the page where the user will be redirected . You can consider this as the from-outcome of any JSF action in navigation-case in faces-config.xml . actionParam is a parameter for the previous action generally an item ID .. . .. . So for example I can have these kind of urls : .. . .. . http : myserver my-app forward.jsf action viewItem actionParam 1234 .. . http : myserver my-app forward.jsf action editItem actionParam 1234 .. . .. . Of course I have a Java class bean that will check some security constraints i.e . is the user allowed to see edit the corresponding item and then redirect the user to the correct page such as edit.xhtml view.xhtml or access-denied.xhtml . .. . .. . Current implementation .. . .. . Currently we have a basic way to accomplish the forward . When the user clicks on the link the following XHTML page is called : .. . .. . As you can see I bind two h : inputHidden components in my Java bean . They will be used to store the value of both action and actionParam request parameter using FacesContext.getCurrentInstance .getExternalContext .getRequestParameterMap .get actiontParam . I also provide the doForward method that which will be called immediately when the page is rendered which will redirect again the user to the real page . The method is : .. . .. . .. . .. . This solution is working but I have two problems with that : .. . .. . I don t like the way it is implemented . I m sure that I can have something simplier using a Servlet . This solution is using Javascript and I must not use Javascript as this forward may be used by old Blackberry users where the Javascript is not supported . So my question is how to refactor this redirection forward feature .. . .. . Technical information .. . .. . Java 1.6 JSF 1.2 Facelets Richfaces Comment : I am not sure whether it is best to do or not but you are giving user a link-to click and using intermediate xhtml and making javascript click but Why are you not pointing it to a servlet and from there you can handle this scenario I mean instead of intermediate xhtml why not to use servlet . I don t think its bad to add our own servlet in jsf env Comment : @org : This can certainly be done without servlets . Using a servlet would only add extra maintenance headache because it doesn t have instant access to navigation cases . Comment : @BalusC Thanks I want to know how Can we use jsp scriptlets on xhtml directly Comment : @org : I have a theory but I only post answers of which I can tell from own experience that it s correct . And I don t have a JSF 1.2 playground environment at hands now . Maybe if I have more time . Using scriptlets is discouraged to all extent . Regardless of view technology . Comment : @org scriptlet is just outside my vocabulary And indeed if I create a solution using a Servlet I will not benefit of the navigation cases of JSF . .. . Answer : you should use action instead of actionListener : .. . .. . and in close method you right something like : .. . .. . where index is one of your pages index.xhtml .. . .. . Of course all this staff should be written in our original page not in the intermediate . And inside the close method you can use the parameters to dynamically choose where to redirect . Comment : Using action or actionListener has absolutely no impact on my current problem . Comment : And the OP is using JSF 1.x not 2.x . Also the redirect will cause request parameters to be lost .", "Question : How do we handle session variables add fetch in JSF 1.2 A scenario : Consider a login screen where the user logs in successfully the user model is stored in session . The user modes contains the user role . Next time onwards for every user action check the user role from the user model and display the form accordingly . In such a case how to add the user odel in session and how to etrieve it every time from the session Previously I have worked in Struts 1.2 where-in the execute method we have a request e which is used to get the session and access the session variables also . But I am not sure how to achieve th same in JSF 1.2 . Is the only way achieveable is to add the managed-bean in the session-scope in the faces-config.xml file Please help me out with the session handling concepts in JSF 1.2 . Comment : Any reason why you re still using JSF 1.2 Comment : @Lion probably maintenance of a legacy application that can t migrate to JSF 2 . .. . Answer : I think you can use Java EE filters http : www.di.unipi.it ghelli didattica bdldoc A97329 03 web.902 a95878 filters.htm for this mechanism . Filters are controlled by Servlet Container and runs first on an action depending on your web.xml order . Add a servlet filter to your project . Add your filter to your web.xml .. . .. . Secondly put your User class to the session inside a JSF action . P.S . : User class is a user defined POJO class . you should implement it according to your needs . If you want to implement this mechanism inside JSF context . You can build the same logic by implementing JSF phase listeners http : www.softwareengineeringsolutions.com thoughts frameworks JSF.Techniques-PhaseListeners.htm .", "Question : My Question is related to jsf . I am trying to make a jsf dataTable with radio buttons . For e.g . In the first row there are 5 columns : The first column has a question and rest 4 are radio buttons . : I want the user to select only one radio-button out of the 4 in a single row and repeat the same process for all the rows . I have read the following link where a javascript code is given for selecting one row using radio-buttons : How to group Radio Buttons in h : datatable jsf2.0 http : stackoverflow.com questions 7146625 how-to-group-radio-buttons-in-hdatatable-jsf2-0 and http : www.javabeat.net how-to-use-hselectoneradio-inside-hdatatable-in-jsf .. . .. . But my requirement is to select one of the radio-button in a row .. . .. . I got some clue here : http : www.javaworld.com article 2077687 enterprise-java group-radio-buttons-inside-a-jsf-datatable-component.html but I would rather prefer a javascript code to do this activity rather than going for a custom tag if possible.Or if there is another way to do the same in pure jsf . Edit : .. . .. . Code in jsp : .. . .. . JS : .. . .. . The problem is that each radio-button in the consecutive rows have the same value for radio.name.substring radio.name.lastIndexOf : but the radio buttons in the same row doesn t have the same name as I checked in View Source of browser . So how to overcome that . Comment : If you have tried it show the code you have worked with it ll help identify what mistake you may be making . Comment : @ miqdadamirali I added the code .. . Answer : The name of the radio buttons generated in html by jsf in the first row are : j id jsp 2000213722 8 : 0 : rad1 j id jsp 2000213722 8 : 0 : rad2 j id jsp 2000213722 8 : 0 : rad3 and j id jsp 2000213722 8 : 0 : rad4 .. . .. . Similarly the name of the radio buttons generated in html by jsf in the second row are : j id jsp 2000213722 8 : 1 : rad1 j id jsp 2000213722 8 : 1 : rad2 j id jsp 2000213722 8 : 1 : rad3 and j id jsp 2000213722 8 : 1 : rad4 .. . .. . So we can see the string after last colon in the name rad1 rad2 rad3 signifies that the column is different and the integer after the first colon 0 1 2 signifies that the row is different but they are same for every radio-button in the same row . So my logic will be that no two radio buttons with name i.e . 0 or 1 or 2 should be checked at the same time . So I changed my script code as follows to extract that 0 or 1 or 2 for each row : .. . .. . My requirement is that it should allow me to select radio buttons simultaneously in different rows but not in the same row in the first row all radio buttons have the name 0 in second 1 in third 2 and in fourth row the value of name is 4 . So I am taking that part of name which is same for a row i.e . the part after the first colon so that according to the logic it will allow only one radio-button to be checked with that name and it will uncheck all other radio buttons with the same name except the one checked . So this logic works for me .", "Question : I write a application use bundled IceFaces 1.8.1 and jsf-1.2 . but it cannot deploy in Glassfish 3.1.2 . The error message is .. . .. . java.lang.ClassNotFoundException : org.icefaces.x.context.BridgeFacesContext2 .. . Answer : Check the answer to this question : JSF 1.2 app not working with GlassFish v3 http : stackoverflow.com questions 2333330 jsf-1-2-app-not-working-with-glassfish-v3 Also check : https : wikis.oracle.com display GlassFish JavaServerFacesRI JavaServerFacesRI-IwanttouseMojarra1.2inGlassfishv3 .. . .. . Also : http : www.icesoft.org JForum posts list 17044.page sthash.4uwE5n1N.F9JR7G2x.dpbs .. . .. . However I have the same problem on Glassfish 4 and did not succeed yet deployment ok but I cannot view my pages due to : java.lang.ClassNotFoundException : org.icefaces.x.context.BridgeFacesContext2 .. . .. . UPDATE : .. . .. . Checkout http : anonsvn.icesoft.org repo icefaces tags icefaces-1.8.2a icefaces Call ant build.all inside icefaces folder . Copy the icefaces jars from lib folder inside your .war WEB-INF lib that means remove icefaces1.8.2.jar icefaces-comps-1.8.2.jar icefaces-facelets-1.8.2.jar and replace them with the same new jars - 1.8.2a version from lib folder . The explanation is here : http : www.icesoft.org JForum posts list 16568.page sthash.3XjXYufx.dpbs : .. . .. . NOTE : The ICEfaces 1.8.2a release consists of official ICEfaces 1.8.2 release plus a patch to resolve issues when deploying a JSF 1.1 or JSF 1.2 ICEfaces project to Glassfish 3 . It is necessary to use the ICEfaces 1.8.2a release libraries on Glassfish 3 as the original ICEfaces 1.8.2 runtime libraries will fail with a JSF 2 not supported error when used in a JEE5 JSF 1.2 project . - See more at : http : www.icesoft.org JForum posts list 16568.page sthash.3XjXYufx.dpuf .. . .. . Followed steps from here : http : www.icesoft.org JForum posts list 17044.page sthash.4uwE5n1N.F9JR7G2x.dpbs see deryk.sinotte s post starting with : I did the following .. . .. . After deploying the .war with 1.8.2a icefaces jars the error went away" ] }
[ "yes-answer-long", "yes-answer-short" ]
jsp
UNK_RELATION
gendarme@cil@65
gendarme -- gendarme is a tool to find defects inside .net ecma @placeholder applications and libraries .
{ "confidence": [ 47.836116790771484, 45.396385192871094, 45.39500045776367, 45.009178161621094, 43.56836700439453, 43.56663513183594, 42.940879821777344, 42.940879821777344, 42.726280212402344, 42.35012435913086, 40.50559616088867, 39.61476135253906, 38.691986083984375, 38.442413330078125, 38.442413330078125, 37.86985778808594, 37.78500747680664, 37.78500747680664, 37.0728759765625, 36.735801696777344, 36.57114028930664, 36.025611877441406, 35.41389846801758, 35.134490966796875, 35.134490966796875, 35.134490966796875, 35.134490966796875, 35.11628723144531, 34.97365951538086, 34.811744689941406, 34.725223541259766, 34.534034729003906, 33.80510330200195, 33.4096794128418, 33.30474090576172, 33.30474090576172, 33.30474090576172, 33.047760009765625, 32.760311126708984, 32.72850799560547, 32.6420783996582, 32.47553634643555, 32.39247131347656, 32.39247131347656, 32.39247131347656, 32.09087371826172, 32.09087371826172, 32.09087371826172, 32.05667495727539, 31.809085845947266, 30.96481704711914, 30.63602066040039, 30.63602066040039, 30.63602066040039, 30.562721252441406, 30.562721252441406, 29.348854064941406, 29.348854064941406, 29.321311950683594, 29.321311950683594, 29.321311950683594, 28.929410934448242, 28.929410934448242, 28.929410934448242, 28.929410934448242, 28.924684524536133, 28.92443084716797, 28.296098709106445, 27.894001007080078, 27.491559982299805, 27.491559982299805, 27.294401168823242, 26.277692794799805, 26.277692794799805, 26.18739128112793, 25.395877838134766, 25.274173736572266, 24.82284164428711, 24.82284164428711, 21.78336524963379, 21.731685638427734, 21.488487243652344, 21.488487243652344, 18.545095443725586, 18.255964279174805, 17.33412742614746, 17.078317642211914, 17.078317642211914, 17.078317642211914, 16.92994499206543, 16.793149948120117, 16.58038902282715, 16.58038902282715, 16.359474182128906, 16.17777442932129, 15.488531112670898, 15.212346076965332, 15.141314506530762, 15.129913330078125, 15.129913330078125 ], "content": [ "Is this a bug in Gendarme", "I am new to using Gendarme .", "or the gendarme is showing it wrongly", "I downloaded this version of the tool Gendarme 2.11 unsupported build - Win32 - Requires .NET Framework 4.0 from https : github.com spouliot gendarme downloads and it worked fine as an independent app .", "I m working with gendarme for .net called by Sonar launched by Jenkins .", "Gendarme is indeed the Mono equivalent of FxCop .", "I d like to import gendarme reports into sonarqube .", "The custom ones I d already written in gendarme .", "Gendarme supports them all .", "Or can anyone point me in the direction of some Gendarme rules usage documentation", "a SupressMessage for a FxCop rule that matches a Gendarme rule will also suppress the Gendarme rule but at least it lets you use the Gendarme names to suppress .", "is there any particular rule that Gendarme offers that you re missing in SonarQube currently", "The problem is after specifying all the rules in this way I m getting a different number of defects detected compared with when I use the default-method Gendarme provides which is of the form : .. . .. . Has anyone done this before", "We run Gendarme on our local machines and on CC.NET .", "I used FXCOP and Gendarme but i think they are not sufficient .", "Does anyone know the correct way to explicitly specify which rules Gendarme will use", "There is a properties in Sonar to exclude generated files but it doesn t seem to be applied for gendarme .", "FxCop and Gendarme essentially do the same thing but have slightly different rules .", "As Gendarme doesn t integrate directly into Visual Studio though you can make it part of the build-process http : unintelligible.org blog 2010 10 02 gendarme-msbuild-task and you won t see many people using Visual Studio use Gendarme .", "Is it possible to suppress a specific gendarme defect message", "I have got exactly the same problem with Mono Gendarme .", "Gendarme http : www.mono-project.com Gendarme and FxCop http : msdn.microsoft.com en-us library bb429476 28v vs.80 29.aspx look very similar and seem to tackle the same problem .", "I created a config file for gendarme and specified .NET 4.0 but I still get the same error .", "The Gendarme installation v3.10.0.0 on my machine CentOS release 6.5 Final was unable to report line numbers .", "I am also open to the idea of integrating Gendarme to VS and MSBuild by some other way too if it works .", "I have problems when I use gendarme rules but without those rules it works fine .", "A sonar-csharp-gendarme-plugin existed once for this purpose but seems to have been abandoned .", "What is the command-line you are currently using to run Gendarme on terminal", "Thanks for your comment the code base is in C so the likely tools would be Sonar s own xpath-based tool fxcop and gendarme .", "This link describes the format and also has a helpful note : http : manpages.ubuntu.com manpages oneiric man5 gendarme.5.html .. . .. . An ignore-file can be generated automatically using gd2i from a XML defect list produced by Gendarme .", "When I run Gendarme 2.11 on my C .NET project the following code triggers the EnsureLocalDisposalRule : .. . .. . with the message : .. . .. . Local of type XmlNodeList is not disposed of at least not locally .", "I will aim to have a look at what gendarme says next week : update - done https : code.google.com p protobuf-net source detail r 630 - note that most of this was basically busy work - it didn t really change anything important other than it made Gendarme happy .", "More on gendarme http : www.mono-project.com docs tools+libraries tools gendarme rules exceptions useobjectdisposedexceptionrule issue and similar conversation Thread here http : forums.asp.net t 1491426.aspx Why 20doesn 20t 20ActionResult 20implement 20IDisposable 20 .. . .. . If i apply the solution http : stackoverflow.com questions 1964496 what-should-be-passed-as-the-objectname-when-throwing-an-objectdisposedexception 1964521 1964521 to all the functions gendarme is happy .", "As far as I can see there is no way to enable SuppressMessage in Gendarme at 2.8 .", "I do use ReSharper already but it t not nearly as powerful in static-analysis as FxCop or Gendarme is at least not in my experience .", "The strength of CQLinq over FxCop or Gendarme is that it is straightforward to write a code rule and get immediately results .", "Presently I am attempting to build Gendarme 2.10 using Visual Studio 2010 .", "Gendarme http : www.mono-project.com Gendarme has an AvoidAssemblyVersionMismatchRule http : www.mono-project.com Gendarme.Rules.BadPractice AvoidAssemblyVersionMismatchRule with the following description : .. . .. . This rule checks that the AssemblyVersion http : msdn.microsoft.com en-us library system.reflection.assemblyversionattribute.aspx matches the AssemblyFileVersion http : msdn.microsoft.com en-us library system.reflection.assemblyfileversionattribute.aspx when both are present inside an assembly .", "Finally Gendarme will sometimes throw a 1 exit code as it finishes the report but the report have been successful and every rule check also so I think this is probably a minor error according to the manpages http : manpages.ubuntu.com manpages precise man1 gendarme.1.html of Gendarme this code is returned when .. . .. . The runner execution was successful but either some defects where found or no assembly was specified .", "FYI : I had the same problem as you however I was able to get gendarme running in sonar by installing the most recent snapshot version : https : github.com spouliot gendarme downloads currently at gendarme-2.11-snapshot-20110305-win32-setup.zip .. . .. . Make sure to set the installation path in your sonar-project.properties file : .. . .. . sonar.gendarme.installDirectory C : Program Files Gendarme", "I can see in the source-code and documentation for Gendarme that you can specify an ignore list to get Gendarme to ignore certain classes within an assembly but I can t for the life of me find any documentation online that shows an example of the format required for this file .", "This is pretty simple and you can find an example in the self-test.ignore https : github.com mono mono-tools blob master gendarme self-test.ignore file .", "Now when I run Gendarme I get the following trace : .. . .. . What should I do to get line numbers in the report", "sonar-csharp-plugin-3.1 .. . sonar-dotnet-gendarme-plugin-2.0 .. . sonar-dotnet-ndeps-plugin-2.0 .. . sonar-dotnet-plugin-2.0", "Now if you really would like to you still could develop a SonarQube plugin to integrate Gendarme results but I don t think it is a good idea .", "What definable static code checking rule do you wish to see added to FxCop and or Gendarme", "Gendarme has a test suite unit tests and weird binaries that is used to ensure it does not fail when loading assemblies .", "I haven t used Gendarme so I don t know whether or not that s feasible but it s worth looking into .", "What I m trying to do is to specify the rules one by one in the Gendarme rules.xml file like this : .. . .. . Doing this I m hoping we can then switch off the rules we don t care about .", "Gendarme expects you provide an ignore list .. . .. . http : www.mono-project.com Gendarme.FAQ .. . .. . https : github.com mono mono-tools blob master gendarme self-test.ignore .. . .. . The ignore file-format is bit of weird but you can learn it by experiments .", "If anyone has experience with gendarme how important are these sort of notifications and is this something I could possibly contribute back to protobuf-net by attempting to clean up any Severity : High issues", "Gendarme works fine on other assemblies that reference System.Drawing as well as assemblies that reference the one that is broken .", "I need to suppress unwanted gendarme rules for the whole assembly of my project or even for individual projects .", "I have used Gendarme manually on our project and can totally use the benefits it offers .", "There is a IDisposable which contains a field for the Logger : .. . .. . Gendarme reports that there is a DisposableFieldsShouldBeDisposedRule-Defect http : www.mono-project.com Gendarme.Rules.Correctness DisposableFieldsShouldBeDisposedRule but I don t want to dispose the logger .", "Am getting gendarme issues on my MVC 5 Application in all the public methods stating .. . .. . A method of an IDisposable type does not throw System.ObjectDisposedException .", "This bug report http : www.mail-archive.com mono-bugs@lists.ximian.com msg70212.html suggests this is a bug in Gendarme which hasn t been fixed .", "I m working on a C solution and I m using Gendarme integrated with Visual Studio in order to output to the Error List window when I compile .", "I got it from here https : github.com xamarin Gendarme.Rules.Xamarin tree master lib and copied it to mono lib gendarme along with Mono.Cecil.Mdb.dll from the installation of MonoDevelop as mentioned in the question .", "Gendarme is an inactive project for quite a while and I really doubt its development will resume : Indeed like FxCop it does analysis based on the assemblies not directly on the source code .", "This raised the bar of what people expect from code analyzers and FxCop analyzers as well as Gendarme ones should be rewritten using Roslyn to improve the end-user s experience .", "The full list of rules and their assembly names are here http : www.mono-project.com Gendarme Rules .", "The new Gendarme 2.8 has basic read incomplete and buggy support for the SuppressMessage attribute same as fxcop .", "But the EngineDependency typeof SuppressMessageEngine isn t applied to all of the compiled rules which is how it gets subscribed to when Gendarme actually runs .", "Anyone familiar with Gendarme know if it s possible to create a rule that detects C unsafe code", "Upon some searching I found that Mono.Cecil.Mdb.dll was missing in the installation as suggested in the FAQs http : www.mono-project.com docs tools+libraries tools gendarme faq .. . .. . After doing some search on resolving this I came across this https : bugs.launchpad.net ubuntu +source mono-tools +bug 539598 link .", "I ran it through gendarme http : www.mono-project.com Gendarme and it came up with many performance notifications e.g : .. . .. . Target : System.Int32 ProtoBuf.ProtoReader : : ReadFieldHeader Assembly : protobuf-net Version 1.0.0.0 Culture neutral PublicKeyToken null .. . .. . Severity : High Confidence : High Source : debugging symbols unavailable IL offset 0x0055 Details : Type System.Int32 is being boxed .", "However in this case the rule tries to load data from the resources which deserialization requires a version of .NET 4.0 that is different from the one Gendarme is being executed 3.5 .", "After updating all of our projects Gendarme is is getting this error for one of our assemblies with logging turned on : .. . .. . The same error occurs on multiple computers .", "After reading the rule description https : github.com spouliot gendarme wiki Gendarme.Rules.Correctness.EnsureLocalDisposalRule 2.10 I attempted to rewrite it as follows : .. . .. . but this gives the error : .. . .. . System.Xml.XmlNodeList : type used in a using-statement must be implicitly convertible to System.IDisposable .. . .. . What is causing this", "For info I ve been through these none of them were particularly noticeable but I ve done some tidying up to make gendarme happier - but frankly they were false-positives really .", "I understood that tool only runs on .net assemblies .", "I have the indexer and want to check if is it not null and if it is then throw ArgumentNullException but Gendarme sets the warning .. . .. . InstantiateArgumentExceptionCorrectlyRule : This method throws ArgumentException or derived exceptions without specifying an existing parameter name .", "The basic ignore rule format is the following : .. . .. . You might also wish to take a look at the ignore file parsing code https : github.com mono mono-tools blob master gendarme console IgnoreFileList.cs .", "As well latest versions add FxCop compatibility so if you already have a SuppressMessage from FxCop and has an equivalent rule in Gendarme the message will be suppressed .", ".. . .. . If indeed there is no good reason I will soon suggest the Gendarme developers to change the rule to .. . .. . This rule checks that the AssemblyVersion http : msdn.microsoft.com en-us library system.reflection.assemblyversionattribute.aspx and AssemblyFileVersion http : msdn.microsoft.com en-us library system.reflection.assemblyfileversionattribute.aspx have a common non-empty prefix when both are present inside an assembly .", "To answer my own question : .. . .. . Specifying the rules explicitly as I outlined above is the correct way to customise the rules list the reason I was getting a different number of results back was because the default rule set in Gendarme leaves out scanning for Code Smells once I added this scan to the default list the defect totals matched .", "a project you can add the following lines in your ignore file : .. . .. . Here s a link-to Gendarme s ignore https : github.com mono mono-tools blob master gendarme self-test.ignore file used for it s self-check .", "Thanks for the comments As far a erro messages I have none I just don t know how to make it work I mean send to execute Gendarme as a build step of teamcity .", "no output from the tool .", "Here is the console command needed for it : .. . .. . gendarme.exe --v --html Your Path To Save Report GendarmeReport.html --severity all --confidence all Path To Your Project Library ScriptAssemblies Assembly-CSharp.dll Path To Your Project Library ScriptAssemblies Assembly-CSharp-firstpass.dll Path To Your Project Library ScriptAssemblies Assembly-UnityScript-firstpass.dll .. . .. . Probably if you run this build step after doing the Unity build the Assemblies here would have been erased by Unity so you need to have another console command build step before the Gendarme step this one : .. . .. . This will make unity re-generate the Library folder contents and running Gendarme build step after that will do the trcik .", "I haven t runned Gendarme on terminal I have just been acquainted with the software I used the wizrd to check the assemblies of my project and started searching about using it as a build step of teamcity but finding nothing about it and my blind tries have been without success .", "Teamcity has a Command Line build step that can be used for using Gendarme as part of your build-process For the custom scripts I am going to write here in the Workspace property of the Build Step you need to put where each of this .exe s are .", "Recently came across protobuf-net awesome library .", "I did what has been mentioned there to integrate it with VS but I did not see any code-review suggestion from the tool i.e .", "I can t find a way to do that .", "An alternative or a good complement to FxCop Gendarme would be to use the commercial tool NDepend http : www.ndepend.com .", "With this tool one can write Code Rule over LINQ Queries namely CQLinq http : www.ndepend.com Features.aspx CQL .", "With the tool NDepend http : www.ndepend.com it is immediate Disclaimer : I am one of the developer of NDepend .", "Maybe you re not supposed to use that tool when you fix bugs .", ".. . .. . As far as i know most of the .net resources Managed resources by default implement IDisposable .", "Or which rules to exclude", "I m not having a lot of joy searching the Mono documentation for the answer .", "I ve used NDepend I m NOT associated with them and I find it useful .", "you can always get the PDB from the download NuGet as well ..yourproject packages protobuf-net.2.0.0.621 lib net40 there are many tests in the project as well .", "I can take a look in a day or two just got back from a long flight - but : it could be a false-positive : protobuf-net actually exists as a double code-base : a reflection model and a meta-programming model .", "Because ideally all of these builds gearing up for a release share the same assembly version then file version is the right tool for differentiating them .", "There is a Visual Studio add-in which allows you to run FxCop from inside Visual Studio Professional http : visualstudiogallery.msdn.microsoft.com 706b0d9f-9726-474e-b687-2bb9704c9784 as well .", "We ve recently updated our C projects from .NET 3.5 to 4.0 .", "Are there any tools to perform a security analysis against .net desktop assemblies and excutables" ] }
{ "confidence": [ 60.95977020263672, 59.42694854736328, 57.314029693603516, 54.102752685546875, 53.768226623535156, 52.728118896484375, 52.423545837402344, 51.78900909423828, 51.77071762084961, 51.38863754272461, 50.80794143676758, 50.318485260009766, 49.7567138671875, 49.40547561645508, 48.73828125, 45.73921585083008, 45.59342956542969, 45.37938690185547, 45.13712692260742, 44.48609924316406 ], "content": [ "Question : Does anyone know the correct way to explicitly specify which rules Gendarme will use Or which rules to exclude I m not having a lot of joy searching the Mono documentation for the answer . What I m trying to do is to specify the rules one by one in the Gendarme rules.xml file like this : .. . .. . Doing this I m hoping we can then switch off the rules we don t care about . The problem is after specifying all the rules in this way I m getting a different number of defects detected compared with when I use the default-method Gendarme provides which is of the form : .. . .. . Has anyone done this before Or can anyone point me in the direction of some Gendarme rules usage documentation .. . Answer : To answer my own question : .. . .. . Specifying the rules explicitly as I outlined above is the correct way to customise the rules list the reason I was getting a different number of results back was because the default rule set in Gendarme leaves out scanning for Code Smells once I added this scan to the default list the defect totals matched .", "Question : null .. . Answer : I am new to using Gendarme . I downloaded this version of the tool Gendarme 2.11 unsupported build - Win32 - Requires .NET Framework 4.0 from https : github.com spouliot gendarme downloads and it worked fine as an independent app . But I want to integrate it with my VS2010 Premium . After lot of search I found that this https : github.com unintelligible GendarmeMsBuild is the only wrapper that serves my purpose . I did what has been mentioned there to integrate it with VS but I did not see any code-review suggestion from the tool i.e . no output from the tool . I tried to integrate it only to VS and did not try for MSBuild yet . What is it that I might be doing wrong Anyone please I am also open to the idea of integrating Gendarme to VS and MSBuild by some other way too if it works . Thanks in advance", "Question : Am getting gendarme issues on my MVC 5 Application in all the public methods stating .. . .. . A method of an IDisposable type does not throw System.ObjectDisposedException . .. . .. . As far as i know most of the .net resources Managed resources by default implement IDisposable . Whether the MVC ActionResult doesn t implement IDisposable or the gendarme is showing it wrongly More on gendarme http : www.mono-project.com docs tools+libraries tools gendarme rules exceptions useobjectdisposedexceptionrule issue and similar conversation Thread here http : forums.asp.net t 1491426.aspx Why 20doesn 20t 20ActionResult 20implement 20IDisposable 20 .. . .. . If i apply the solution http : stackoverflow.com questions 1964496 what-should-be-passed-as-the-objectname-when-throwing-an-objectdisposedexception 1964521 1964521 to all the functions gendarme is happy . So am little confused .. . Answer : MVC ActionResult is not derived from any class interface . ActionResult is basically an abstract-class .", "Question : The Gendarme installation v3.10.0.0 on my machine CentOS release 6.5 Final was unable to report line numbers . Upon some searching I found that Mono.Cecil.Mdb.dll was missing in the installation as suggested in the FAQs http : www.mono-project.com docs tools+libraries tools gendarme faq .. . .. . After doing some search on resolving this I came across this https : bugs.launchpad.net ubuntu +source mono-tools +bug 539598 link . Therefore I copied the dll from MonoDevelop installation directory as suggested in the link . Now when I run Gendarme I get the following trace : .. . .. . What should I do to get line numbers in the report .. . Answer : I was missing another dependency Mono.Cecil.dll . I got it from here https : github.com xamarin Gendarme.Rules.Xamarin tree master lib and copied it to mono lib gendarme along with Mono.Cecil.Mdb.dll from the installation of MonoDevelop as mentioned in the question .", "Question : I m working with gendarme for .net called by Sonar launched by Jenkins . I ve a lot of AvoidVisibleFieldsRule violations . The main violations are found in the generated files . As I can t do anything on it i would like to exclude .designer.cs from the scan . I can t find a way to do that . There is a properties in Sonar to exclude generated files but it doesn t seem to be applied for gendarme . Is there a way to do such a thing Thanks for all .. . Answer : Gendarme expects you provide an ignore list .. . .. . http : www.mono-project.com Gendarme.FAQ .. . .. . https : github.com mono mono-tools blob master gendarme self-test.ignore .. . .. . The ignore file-format is bit of weird but you can learn it by experiments . Comment : I ve looked a bit on this file but it seems really complicated . I can t found easy explication on the web.. . Do you know some Comment : Try to write some and then you will learn it . I did that by experiments and I don t have much time to document the format yet .", "Question : null .. . Answer : When I run Gendarme 2.11 on my C .NET project the following code triggers the EnsureLocalDisposalRule : .. . .. . with the message : .. . .. . Local of type XmlNodeList is not disposed of at least not locally . After reading the rule description https : github.com spouliot gendarme wiki Gendarme.Rules.Correctness.EnsureLocalDisposalRule 2.10 I attempted to rewrite it as follows : .. . .. . but this gives the error : .. . .. . System.Xml.XmlNodeList : type used in a using-statement must be implicitly convertible to System.IDisposable .. . .. . What is causing this Is this a bug in Gendarme Or have I misunderstood the rule How could my code be improved", "Question : We ve recently updated our C projects from .NET 3.5 to 4.0 . We run Gendarme on our local machines and on CC.NET . After updating all of our projects Gendarme is is getting this error for one of our assemblies with logging turned on : .. . .. . The same error occurs on multiple computers . Gendarme works fine on other assemblies that reference System.Drawing as well as assemblies that reference the one that is broken . I created a config file for gendarme and specified .NET 4.0 but I still get the same error . I removed the reference and added it again with no change . If I run our program the controls in this assembly load and work without any issues . We have unit tests in this assembly and NUnit and PartCover also run fine . I noticed that it is using a machine.config file from the Framework64 v2.0.50727 folder but I can t see why this assembly would be different from the others . Could that be an issue What else can I try .. . Answer : FYI : I had the same problem as you however I was able to get gendarme running in sonar by installing the most recent snapshot version : https : github.com spouliot gendarme downloads currently at gendarme-2.11-snapshot-20110305-win32-setup.zip .. . .. . Make sure to set the installation path in your sonar-project.properties file : .. . .. . sonar.gendarme.installDirectory C : Program Files Gendarme", "Question : I d like to import gendarme reports into sonarqube . A sonar-csharp-gendarme-plugin existed once for this purpose but seems to have been abandoned . Is there any replacement Comment : is there any particular rule that Gendarme offers that you re missing in SonarQube currently Comment : The custom ones I d already written in gendarme . But I ll investigate moving these to Roslyn . .. . Answer : There is no replacement and it is not supported . Gendarme is an inactive project for quite a while and I really doubt its development will resume : Indeed like FxCop it does analysis based on the assemblies not directly on the source code . Now with Visual Studio 2015 Roslyn analyzers are executed live as you type . This raised the bar of what people expect from code analyzers and FxCop analyzers as well as Gendarme ones should be rewritten using Roslyn to improve the end-user s experience . Now if you really would like to you still could develop a SonarQube plugin to integrate Gendarme results but I don t think it is a good idea .", "Question : Gendarme http : www.mono-project.com Gendarme and FxCop http : msdn.microsoft.com en-us library bb429476 28v vs.80 29.aspx look very similar and seem to tackle the same problem . Which would you suggest for a small team of developers 3-5 mainly working on web application with lots of business logic Why Comment : I m not sure if covers a similar area but I highly recommend ReSharper and machines with enough RAM CPU to make it happy . Comment : I do use ReSharper already but it t not nearly as powerful in static-analysis as FxCop or Gendarme is at least not in my experience . Comment : any additional information you d need to make a decision Comment : Nah your answer is pretty much what I was looking for . Just marked it as the accepted answer Thank you .. . Answer : An alternative or a good complement to FxCop Gendarme would be to use the commercial tool NDepend http : www.ndepend.com . With this tool one can write Code Rule over LINQ Queries namely CQLinq http : www.ndepend.com Features.aspx CQL . Disclaimer : I am one of the developers of the tool .. . .. . More than 200 code rules http : www.ndepend.com DefaultRules webframe.html are proposed by default these include design architecture code quality code evolution naming-conventions dead-code .NET Fx usage .. . .. . .. . CQLinq is dedicated to write code rules that can be verified live in Visual Studio http : www.ndepend.com Doc VS CQL.aspx or that can be verified during build-process and reported in an HTML javascript report http : www.ndepend.com Doc CI Report.aspx CQLRule . The strength of CQLinq over FxCop or Gendarme is that it is straightforward to write a code rule and get immediately results . Facilities are proposed to browse matched code elements . Concretely this looks like that : .. . .. . CQLinq code rule http : i.stack.imgur.com OHPhy.png Comment : Wtf s with the down vote . At least give a reason . I ve used NDepend I m NOT associated with them and I find it useful .", "Question : I m working on a C solution and I m using Gendarme integrated with Visual Studio in order to output to the Error List window when I compile . I can see in the source-code and documentation for Gendarme that you can specify an ignore list to get Gendarme to ignore certain classes within an assembly but I can t for the life of me find any documentation online that shows an example of the format required for this file . Can anyone help .. . Answer : This link describes the format and also has a helpful note : http : manpages.ubuntu.com manpages oneiric man5 gendarme.5.html .. . .. . An ignore-file can be generated automatically using gd2i from a XML defect list produced by Gendarme .", "Question : I m working on a C solution and I m using Gendarme integrated with Visual Studio in order to output to the Error List window when I compile . I can see in the source-code and documentation for Gendarme that you can specify an ignore list to get Gendarme to ignore certain classes within an assembly but I can t for the life of me find any documentation online that shows an example of the format required for this file . Can anyone help .. . Answer : This is pretty simple and you can find an example in the self-test.ignore https : github.com mono mono-tools blob master gendarme self-test.ignore file . The basic ignore rule format is the following : .. . .. . You might also wish to take a look at the ignore file parsing code https : github.com mono mono-tools blob master gendarme console IgnoreFileList.cs .", "Question : Recently came across protobuf-net awesome library . I ran it through gendarme http : www.mono-project.com Gendarme and it came up with many performance notifications e.g : .. . .. . Target : System.Int32 ProtoBuf.ProtoReader : : ReadFieldHeader Assembly : protobuf-net Version 1.0.0.0 Culture neutral PublicKeyToken null .. . .. . Severity : High Confidence : High Source : debugging symbols unavailable IL offset 0x0055 Details : Type System.Int32 is being boxed . If anyone has experience with gendarme how important are these sort of notifications and is this something I could possibly contribute back to protobuf-net by attempting to clean up any Severity : High issues Comment : Guess it depends on what you are really trying to do . Marc makes the source available would it not be more effective if you are that concerned that you review the source you can always get the PDB from the download NuGet as well ..yourproject packages protobuf-net.2.0.0.621 lib net40 there are many tests in the project as well . Comment : I can take a look in a day or two just got back from a long flight - but : it could be a false-positive : protobuf-net actually exists as a double code-base : a reflection model and a meta-programming model . It uses the best it can which usually means the meta-programming model . It could be that it is complaining about the reflection model which is less efficient by necessity . But : I ll take a look . Btw the PDBs are fully available - it should have access to the debugging symbols Comment : For info I ve been through these none of them were particularly noticeable but I ve done some tidying up to make gendarme happier - but frankly they were false-positives really . The only thing of note it caught was one place where I had the wrong if markers meaning the custom exception wasn t binaryformatter-serializable . Not exactly a critical point . Comment : Many thanks Marc .. . Answer : The specific error you cite comes from : .. . .. . so yes technically this is an unnecessary box - HOWEVER it is an extreme edge case that is not worth caring about if you get that exception you have bigger problems than the box . It could be fixed if it is causing you concern though . It is also likely that some further errors will be being raised from the reflection implementation - which would be misleading because in most scenarios that isn t actually used the code has both a reflection model and a meta-programming model . I will aim to have a look at what gendarme says next week : update - done https : code.google.com p protobuf-net source detail r 630 - note that most of this was basically busy work - it didn t really change anything important other than it made Gendarme happy .", "Question : Is it possible to suppress a specific gendarme defect message I would like to do this in the source code with a flag or something like it . .. . Answer : As far as I can see there is no way to enable SuppressMessage in Gendarme at 2.8 . I grabbed the latest source off of GitHub because it wasn t working as described . The SupressMessageEngine is there in the code and there are tests exercising it via a manual override of Runner.Engines.Subscribe . But the EngineDependency typeof SuppressMessageEngine isn t applied to all of the compiled rules which is how it gets subscribed to when Gendarme actually runs . I also looked at the source to find a way to always subscribe to a particular engine via config -- but there is none . I could be wrong but it looks like an oversight that they forgot to go back and apply the appropriate EngineDependency attributes . The only workaround that I can think of is to write a custom rule that when called adds a subscription SuppressMessageEngine and doesn t do anything else . Hacky yes but this should work based on what I ve seen in their code . FYI -- Just implemented this . You need to create your own custom rule import Mono.Cecil and Gendarme.Framework and target .NET framework 3.5 .. . .. . Sadly this won t pull in the FxCopCompatibility attributes that are there i.e . a SupressMessage for a FxCop rule that matches a Gendarme rule will also suppress the Gendarme rule but at least it lets you use the Gendarme names to suppress .", "Question : I have set up a Teamcity server for start working with Continous Integration and having daily builds and also when VCS check-in is detected . Me and my team is now working on a videogame we are using Unity as the game-engine and C as programming language . I have used Gendarme manually on our project and can totally use the benefits it offers . So I was trying to make it run as a build step of Teamcity but I can seem to figure out how to make it to work . Do someone have some expirience with this combination of tools Any experience shared is apreciated . Thanks . Comment : Do you have specific error logs you could provide Comment : What is the command-line you are currently using to run Gendarme on terminal Comment : Thanks for the comments As far a erro messages I have none I just don t know how to make it work I mean send to execute Gendarme as a build step of teamcity . I haven t runned Gendarme on terminal I have just been acquainted with the software I used the wizrd to check the assemblies of my project and started searching about using it as a build step of teamcity but finding nothing about it and my blind tries have been without success . .. . Answer : Well finally I did ended up finding a solution and I am posting it here so that anyone interested can see it . Teamcity has a Command Line build step that can be used for using Gendarme as part of your build-process For the custom scripts I am going to write here in the Workspace property of the Build Step you need to put where each of this .exe s are . Here is the console command needed for it : .. . .. . gendarme.exe --v --html Your Path To Save Report GendarmeReport.html --severity all --confidence all Path To Your Project Library ScriptAssemblies Assembly-CSharp.dll Path To Your Project Library ScriptAssemblies Assembly-CSharp-firstpass.dll Path To Your Project Library ScriptAssemblies Assembly-UnityScript-firstpass.dll .. . .. . Probably if you run this build step after doing the Unity build the Assemblies here would have been erased by Unity so you need to have another console command build step before the Gendarme step this one : .. . .. . This will make unity re-generate the Library folder contents and running Gendarme build step after that will do the trcik . Finally Gendarme will sometimes throw a 1 exit code as it finishes the report but the report have been successful and every rule check also so I think this is probably a minor error according to the manpages http : manpages.ubuntu.com manpages precise man1 gendarme.1.html of Gendarme this code is returned when .. . .. . The runner execution was successful but either some defects where found or no assembly was specified . If the assemblies are been checked correctky since you have the step that re-generates them then you can tell Teamcity to ignore the exit code 1 you can do this going to the Build Failure conditions of Teamcity and unchecking the option build-process exit code is not zero and that s all . Hope this helps someone else that is also interested in something like this .", "Question : We ve recently updated our C projects from .NET 3.5 to 4.0 . We run Gendarme on our local machines and on CC.NET . After updating all of our projects Gendarme is is getting this error for one of our assemblies with logging turned on : .. . .. . The same error occurs on multiple computers . Gendarme works fine on other assemblies that reference System.Drawing as well as assemblies that reference the one that is broken . I created a config file for gendarme and specified .NET 4.0 but I still get the same error . I removed the reference and added it again with no change . If I run our program the controls in this assembly load and work without any issues . We have unit tests in this assembly and NUnit and PartCover also run fine . I noticed that it is using a machine.config file from the Framework64 v2.0.50727 folder but I can t see why this assembly would be different from the others . Could that be an issue What else can I try .. . Answer : In general it does not matter what version of the framework you re analyzing i.e . Gendarme supports them all . However in this case the rule tries to load data from the resources which deserialization requires a version of .NET 4.0 that is different from the one Gendarme is being executed 3.5 . This is a bug in the rule itself and needs to be fixed please open the bug report like the error message asked . In the mean time exclude this rule totally or over some assembly type method from your analysis . Comment : Thanks for your response . This is now logged here https : bugzilla.novell.com show bug.cgi id 706526 .", "Question : Gendarme http : www.mono-project.com Gendarme and FxCop http : msdn.microsoft.com en-us library bb429476 28v vs.80 29.aspx look very similar and seem to tackle the same problem . Which would you suggest for a small team of developers 3-5 mainly working on web application with lots of business logic Why Comment : I m not sure if covers a similar area but I highly recommend ReSharper and machines with enough RAM CPU to make it happy . Comment : I do use ReSharper already but it t not nearly as powerful in static-analysis as FxCop or Gendarme is at least not in my experience . Comment : any additional information you d need to make a decision Comment : Nah your answer is pretty much what I was looking for . Just marked it as the accepted answer Thank you .. . Answer : Gendarme is indeed the Mono equivalent of FxCop . Given that Microsoft is planning to ship a considerable set of Code Analysis rules with most versions of the next Visual Studio you might want to use FxCop and stick with that . The integrated version of FxCop called Code Analysis is the simplest to use if your Visual Studio version supports it Visual Studio 2010 Premium and Ultimate . There is a Visual Studio add-in which allows you to run FxCop from inside Visual Studio Professional http : visualstudiogallery.msdn.microsoft.com 706b0d9f-9726-474e-b687-2bb9704c9784 as well . You need to download FxCop 10 separately http : blogs.msdn.com b codeanalysis archive 2010 07 26 fxcop-10-0-is-available.aspx it s part of the Windows Platform SDK http : www.microsoft.com download en details.aspx id 8279 . Do note that the Visual Studio integrated version comes with a few additional rules http : blogs.msdn.com b codeanalysis archive 2010 04 14 data-flow-analysis-rules-in-visual-studio-2010.aspx so the output may differ . As Gendarme doesn t integrate directly into Visual Studio though you can make it part of the build-process http : unintelligible.org blog 2010 10 02 gendarme-msbuild-task and you won t see many people using Visual Studio use Gendarme . Mostly because it isn t too well known . In the end I d use FxCop from a convenience perspective . It s integrated into the version of Visual Studio I use by default and it s well known in the developer community . But if you re not using Visual Studio Premium or Ultimate then you can pick either or even both . Just keep in mind that if you choose both you ll probably be receiving a number of duplicate messages or even conflicting messages as the creators of these different tools don t always agree . If you don t mind investing some money then as niaher suggests Resharper http : www.jetbrains.com resharper or Coderush http : devexpress.com Products Visual Studio Add-in Coding Assistance are very useful additions I wouldn t call them replacements as they don t run outside of the IDE in the continuous-integration build for example as they provide direct feedback as you re writing the code . Often even without having to compile it . And they often provide the ability to apply the fix without you having to figure out exactly what to do .", "Question : Gendarme http : www.mono-project.com Gendarme has an AvoidAssemblyVersionMismatchRule http : www.mono-project.com Gendarme.Rules.BadPractice AvoidAssemblyVersionMismatchRule with the following description : .. . .. . This rule checks that the AssemblyVersion http : msdn.microsoft.com en-us library system.reflection.assemblyversionattribute.aspx matches the AssemblyFileVersion http : msdn.microsoft.com en-us library system.reflection.assemblyfileversionattribute.aspx when both are present inside an assembly . Having different version numbers in both attributes can be confusing once the application is deployed . For example this rule would warn on Microsoft s System.dll which has the following attributes : .. . .. . I disagree with Gendarme s rule . Following it would make it impossible to you use a versioning scheme similar to the one used by Microsoft that is .. . .. . update AssemblyFileVersion on every build .. . change AssemblyVersion only on public interface or otherwise major changes .. . make sure that AssemblyVersion and AssemblyFileVersion share a common prefix .. . .. . and I think this versioning scheme is the design reason why it was made possible to differentiate between AssemblyVersion and AssemblyFileVersion in the first place . I cannot come up with a reason why forcing both assembly attributes to be equal is a good practice but maybe you can I would be interested in your opinions . .. . .. . If indeed there is no good reason I will soon suggest the Gendarme developers to change the rule to .. . .. . This rule checks that the AssemblyVersion http : msdn.microsoft.com en-us library system.reflection.assemblyversionattribute.aspx and AssemblyFileVersion http : msdn.microsoft.com en-us library system.reflection.assemblyfileversionattribute.aspx have a common non-empty prefix when both are present inside an assembly . Comment : opinion community wiki .. . Answer : Agreed this is a silly rule . You could not deploy a drop-in bug fix update for a strong named assembly when you follow it . There is otherwise few reasons not to make them the same if you actually have to change the AssemblyVersion . Maybe you re not supposed to use that tool when you fix bugs . Ironic .", "Question : Gendarme http : www.mono-project.com Gendarme has an AvoidAssemblyVersionMismatchRule http : www.mono-project.com Gendarme.Rules.BadPractice AvoidAssemblyVersionMismatchRule with the following description : .. . .. . This rule checks that the AssemblyVersion http : msdn.microsoft.com en-us library system.reflection.assemblyversionattribute.aspx matches the AssemblyFileVersion http : msdn.microsoft.com en-us library system.reflection.assemblyfileversionattribute.aspx when both are present inside an assembly . Having different version numbers in both attributes can be confusing once the application is deployed . For example this rule would warn on Microsoft s System.dll which has the following attributes : .. . .. . I disagree with Gendarme s rule . Following it would make it impossible to you use a versioning scheme similar to the one used by Microsoft that is .. . .. . update AssemblyFileVersion on every build .. . change AssemblyVersion only on public interface or otherwise major changes .. . make sure that AssemblyVersion and AssemblyFileVersion share a common prefix .. . .. . and I think this versioning scheme is the design reason why it was made possible to differentiate between AssemblyVersion and AssemblyFileVersion in the first place . I cannot come up with a reason why forcing both assembly attributes to be equal is a good practice but maybe you can I would be interested in your opinions . .. . .. . If indeed there is no good reason I will soon suggest the Gendarme developers to change the rule to .. . .. . This rule checks that the AssemblyVersion http : msdn.microsoft.com en-us library system.reflection.assemblyversionattribute.aspx and AssemblyFileVersion http : msdn.microsoft.com en-us library system.reflection.assemblyfileversionattribute.aspx have a common non-empty prefix when both are present inside an assembly . Comment : opinion community wiki .. . Answer : I think the rule makes sense in many scenarios since the .NET Framework essentially considers two assemblies with the same AssemblyVersion to be interchangeable . So for example an old version is in the Download Cache will not be automatically overwritten by a new version differing only in AssemblyFileVersion . This can be confusing for the average developer hence the rule . Of course if you know what you re doing and understand the trade-offs you can ignore the rule .", "Question : I m working with gendarme for .net called by Sonar launched by Jenkins . I ve a lot of AvoidVisibleFieldsRule violations . The main violations are found in the generated files . As I can t do anything on it i would like to exclude .designer.cs from the scan . I can t find a way to do that . There is a properties in Sonar to exclude generated files but it doesn t seem to be applied for gendarme . Is there a way to do such a thing Thanks for all .. . Answer : Indeed that is actually not normal at all . Generated code is excluded by the plugin with the standard configuration . What version of the C plugins are you using Anyway the configuration property you can try is sonar.exclusions see http : docs.codehaus.org display SONAR Advanced+parameters . If you do not solve your problem right away the best thing would be to drop a mail to the user mailing list see http : www.sonarsource.org support support and send the verbose output of your build . To get this output simply add -X to the command-line . Hope it helps Comment : I ve tried the sonar.exclusions but it seems to do anything . The fact is that the aspx file is linked to the designer file by a partial class . The report show the error in the aspx file but talks about a variable in the designer file . Seems really strange.. . I m using sonar 2.13 and C plugins ecosystem 1.3", "Question : I m new in sonar . I have problems when I use gendarme rules but without those rules it works fine . This is the error in debug mode sonar-runner -X : .. . .. . .. . .. . .. . .. . sonar-project.properties : .. . .. . .. . .. . .. . .. . I have the following list of plugins installed . Do I need to install other plugins too sonar-csharp-plugin-3.1 .. . sonar-dotnet-gendarme-plugin-2.0 .. . sonar-dotnet-ndeps-plugin-2.0 .. . sonar-dotnet-plugin-2.0 .. . Answer : All dotnet plugins version must have they same version . If not the will be not compatible . Comment : +1 but remember to upvote the question since you found it interesting enough to answer it . And add some references links to a documentation which would support your answer ." ] }
[ "yes-answer-long", "yes-answer-short" ]
cil
UNK_RELATION
jacl@java@58
jacl -- implementation of the tcl interpreter written in @placeholder default scripting-language expected by was administration .
{ "confidence": [ 48.04007339477539, 43.2154541015625, 36.87394714355469, 35.55023956298828, 34.63288497924805, 33.91168212890625, 33.78491973876953, 33.47394561767578, 32.21064376831055, 31.51801872253418, 31.064748764038086, 30.75725746154785, 30.68697166442871, 30.206727981567383, 29.66825294494629, 29.572021484375, 29.0556697845459, 28.927343368530273, 28.196697235107422, 28.145408630371094, 27.124465942382812, 27.015274047851562, 26.912372589111328, 26.912372589111328, 26.912372589111328, 26.324960708618164, 26.324960708618164, 26.10324478149414, 25.943042755126953, 25.746627807617188, 25.7309513092041, 25.7309513092041, 25.7309513092041, 25.172683715820312, 25.172683715820312, 25.172683715820312, 25.172683715820312, 25.172683715820312, 25.172683715820312, 24.92182159423828, 24.68018341064453, 24.679096221923828, 23.991262435913086, 23.991262435913086, 23.991262435913086, 23.991262435913086, 23.991262435913086, 23.84026336669922, 23.421167373657227, 23.421167373657227, 23.395389556884766, 22.894981384277344, 22.894981384277344, 22.894981384277344, 22.82933235168457, 22.82933235168457, 22.82933235168457, 22.82933235168457, 22.82933235168457, 22.71902847290039, 22.718082427978516, 22.57529640197754, 22.57529640197754, 22.299449920654297, 21.999622344970703, 21.818782806396484, 21.713558197021484, 21.647911071777344, 21.647911071777344, 21.647911071777344, 21.647911071777344, 21.614543914794922, 21.614543914794922, 21.614543914794922, 21.614543914794922, 21.614543914794922, 21.614543914794922, 21.614543914794922, 21.614543914794922, 21.614543914794922, 21.52259063720703, 21.395151138305664, 21.242874145507812, 20.937238693237305, 20.887758255004883, 20.864830017089844, 19.895179748535156, 19.889801025390625, 19.889801025390625, 19.889801025390625, 19.889801025390625, 19.889801025390625, 19.889801025390625, 19.889801025390625, 19.889801025390625, 19.889801025390625, 19.788814544677734, 19.788814544677734, 19.432781219482422, 19.2032527923584 ], "content": [ "-----------------------------------------------------------UPDATE---------- .. . .. . .. . .. . Jacl is a Tcl 8.x interpreter written in Java .", "I am using JACL interpreter to run TCL script in JAVA .", "I don t know jacl but does it have raw strings marked with as in TCL", "The administrative API was written with Jacl in mind .", "Jacl Tcl is a string-based language and the delimiter prevents variable interpolation similar to in UNIX shell programming .", "Wsadmin Jython Jacl Python Tcl experts : what s your opinion on that", "Code is in TCL- need of an interpreter not of a compiler .", "Quoting from description of this tool at given link .. . .. . When selecting a scripting-language Jython is the strategic direction as the administration scripting-language for WebSphere Application Server because future enhancements of the scripting-language is focused on the use of Jython .", "Is this in bash or jacl", "As you ve pointed out TCL is a scripting-language meaning your real challenge is a run-time deployment problem .", "Tcl doesn t do that by default .", "Even if Jacl had been the default language for wsadmin IBM promotes Jython for future and even provided a tool to convert Jacl scripts to Jython http : www-01.ibm.com support docview.wss uid swg24012144 .", "When i log into joomla administration and go to the menu jacl plus option from the drop down under components .", "This might be the reason why Jacl is deprecated since WAS v5.1 and still default .", "Facing the programming for the wsadmin scripting client I see that you can use both jacl and jython .", "Hi I have written one jacl script which is not working properly in case of", "You can not use Jacl to display Tk widgets but TclBlend http : tcljava.sourceforge.net docs website index.html could do that because TclBlend uses the C reference implementation of Tcl .", "But what happens if a project is in a scripting-language", "Jacl isn t actively supported by the community .", "Due to security policy the Tcl interpreter cannot access the TCL code from the filesystem so I must make it available in a jar in the EAR itself .", "In the C reference implementation of Tcl you get Tk as well .", "How to do that using Jython or JACL", "As for the error can you see JACL in the backend of the website", "IBM has really cornered itself with Jython and Jacl .", "The API is Jacl-friendly wasn t rewritten for Jython .", "Here s a simple dictionary tcl .", "This is example to create in TCL script .", "First download the latest probably 1.4.1 prebuilt jacl binary zip file from sourceforge http : sourceforge.net projects tcljava files jacl .", "If there s a tcl implementation in Java and why not that would work I m sure .", "Jacl is looking for pkgIndex in the variable auto path .. . .. . if you execute the command puts auto path you see the entires for example : .. . .. . resource : tcl lang library .. . .. . add your path with : lappend auto path resource :", "I personally have found the JACL approach to be not fun", "JACL is depricated anyway just use Jython", "This Jacl snippet should do what you want :", "However Jacl had a bug in its pkgUnknown procedure that prevented that from working .", "Although Jython is the strategic directions Jacl has been there since WAS v4 .", "I ve tried the following with Jacl but it s unable to evaluate the file .", "in a WSADMIN jacl Script how i can get wsadmin.properties values", "Fortunately there is an alternative - jacl http : tcljava.sourceforge.net docs website index.html .", "Can you suggest any other frameworks instead of JACL .", "It would be great if I can get an answer to this in JACL as I have all my scripts in jacl and I was trying with jython only for this piece .", "Tcl is designed to integrate at the interpreter-result level that I described earlier you ll find it much easier to make work for anything complex .", "I also wouldn t recommend it if you were interacting with Tcl from any other language either e.g . C or C++ .", "I am trying to use variables in install script in wsadmin on jacl .", "Below is the jacl script which I use for syncing the Node in WAS 7 .", "Alternatively you could avoid the complexities of Jacl strings by switching to -lang jython .", "Is there any IBM standard jython or jacl script is there to fetch these values", "Is there a way to use a Jython or Jacl script to recreate these certs and configure them properly", "Tcl itself can not display a GUI .", "I simply started the tcl wish shell in a subprocess and executed my tcl script .", "or I could set as an argument .tcl meaning that it can run all the .tcl files", "I image if you setVar the dictionary you could use the getter in tcl .", "Tk has not been ported to Java Tcl has .", "That means that the user needs a working Tcl Tk installation .", "Its a recent java tcl on github called Jtcl .", "How can I convince Jacl 1.4.1 if it matters to find a pkgIndex.tcl for a package on the classpath", "Lots of client solutions are based on the tricks you have to do in Jython there s plenty of Jacl-based solutions .", "I ve looked into Jacl and Swank but they don t seem to do exactly what I want .", "You can also use the java goal to run Jacl or jTcl interpreters in a sub-process .", "That s because jacl calls System.exit in it s main function so it kills the jvm .", "In short : .. . .. . If you re going to write a small script for a specific task Jacl may be more convenient for you since you ve mentioned that you re comfortable with both Python and Tcl .. . Should you however be interested in developing larger framework for managing your WAS infrastructure then Jython with its object-orientation may be a better option .", "I am using tcl java where I am trying to create some TCLDict object and setting that dictionary object to a dictionary variable in tcl script using setVar from TCLInterpreter .", "Is there a difference between what I can do with Jacl and JTcl", "@John JTcl is meant to be a fork of advance on Jacl but I ve not used either .", "While debugging I can see that it completes parsing my tcl file but it throws an exception while parsing through the BWidget package tcl files .", "There are four jar files here you need to publish to your local repository or another repo you use : .. . .. . You ll also need to add these as dependencies to the project where you re calling the tcl script : .. . .. . Then just call the tcl or really jacl script using the exec goal of the exec-maven-plugin passing in the script file path as the first argument customize the execution as necessary to bind to the proper phase etc .", "I ve just discovered http : elenako.com 2013 04 04 expect-script-start-telnet-run-commands-close-telnet expect a tcl based scripting-language for automating among other things telnet connections : .. . .. . What mechanisms are available to either hook into expect with Java or into Java with expect", "You can script your Java applications in Tcl .", "One way to do it could be using Jython or jacl scripts http : www.ibm.com developerworks websphere library samples SampleScripts.html .", "The environment is clustered post deployment of the EAR file I m invoking this jacl script to sync the changes to Nodes .", "In attempting to run the following command in a Jacl script with APPNAME having been set prior to this call : .. . .. . I get the following error .", "Then you can run your jacl script with your application name as the first argument .", "There are some problems with TclBlend and Tcl 8.5 through which result in a segfault .", "Is there any way to set up maven for supporting a TCL project", "But I don t see any code in TCL just in Java .", "Stuff under .. . core.tests rawtests in the folder structure appears to be TCL though .", "So how would a TCL build-process make deployment simpler", "Disclaimer : Been a while since I ve programmed with TCL so hope this helps .", "How to get the data from standard output after running tcl file", "How to pass arguments for tcl script when executing using jatcl", "I need to work run some TCL script and get the output .", "If the script doesn t throw handle WAS exception the output looks as expected : .. . .. . Same with Jacl : .. . .. . wsadmin outputs the following which again is quite expected : .. . .. . I have to confess a bit : the reason why I m asking this question is that I actually reported the problem to WebSphere Support .", "I ve searched a lot in the internet and I found only jacl but I don t really know how I can use it for setting up Maven .", "I m currently using Tcl Java .", "Perhaps you could find some answers from this repo https : eclipse.googlesource.com dltk org.eclipse.dltk.tcl + master tcl tests as it seems to have TCL tests in a maven project", "I m wondering if in the specific of wsadmin programming there are advantages of using one language over the other such as robustness availability of examples or libraries for websphere administration or something like that arisen from your experience in the use and building of this kind of scripts .", "I need to run using some interpreter", "I have Default Messaging Provider available as its Default so i guess every WAS profile having this Default Messaging Provider .", "I need to distribute some TCL code as part of an enterprise application and this code must be available to all nodes in the cluster .", "I have a TCL file which uses Tcl s BWidget package that I ve been using as a GUI for my program .", "All maven can do now with TCL is copy the files around and put them in the right place in the target directory .", "However I don t know anything about TCL so don t take my word for it .", "Tcl isn t closely integrated with Maven unlike Java so you ll have to do more work .", "You could also make a Maven plugin to run Tcl but that s way more work .", "These native installers can use dependency-management to ensure the TCL interprertor is also installed .", "Another useful build option are starkits http : equi4.com starkit which would bundle the TCL interpretor in a single file .", "I want to read that output to some variable like x i.eval sample.tcl then x should contain Hi this is from tcl .", "With Jython one you have to do tricks like this one to get server list as list : .. . .. . whereas in Jacl one can simply do this : .. . .. . Obviously many AdminConfig and AdminControl methods return lists as newline-separated string .", "You can obtain the values of these properties by working with Java s java.lang.System object and then retrieving the specific property you want : .. . .. . Here s the JACL code : .. . .. . For anyone interested here s the Jython equivalent :", "testdict.tcl .. . .. . output : .. . .. . So in thiis case I image a setVar addresses home Maple Street office Downtown or whatever the syntax may be should get you a dictionary in tcl .", "This assistance uses Jython as language ." ] }
{ "confidence": [ 52.96197509765625, 51.608394622802734, 49.93057632446289, 49.68718719482422, 49.411136627197266, 45.76597213745117, 44.9244384765625, 43.843894958496094, 43.246795654296875, 41.556312561035156, 41.5025634765625, 41.14110565185547, 38.28589630126953, 37.73789978027344, 35.88568115234375, 33.438228607177734, 33.228553771972656, 31.158554077148438, 31.061561584472656, 29.591957092285156 ], "content": [ "Question : Facing the programming for the wsadmin scripting client I see that you can use both jacl and jython . I ve the same level of confidence with both two languages . I m wondering if in the specific of wsadmin programming there are advantages of using one language over the other such as robustness availability of examples or libraries for websphere administration or something like that arisen from your experience in the use and building of this kind of scripts . .. . Answer : I m not trying to question any of previous responses just add some facts . Although Jython is the strategic directions Jacl has been there since WAS v4 . In WAS v8.5 it is still the default and deprecated . The administrative API was written with Jacl in mind . With Jython one you have to do tricks like this one to get server list as list : .. . .. . whereas in Jacl one can simply do this : .. . .. . Obviously many AdminConfig and AdminControl methods return lists as newline-separated string . IBM has really cornered itself with Jython and Jacl . They re still using Jython 2.1 released in 2002 even in the latest and greatest WAS v8.5 . Jacl isn t actively supported by the community . The API is Jacl-friendly wasn t rewritten for Jython . Lots of client solutions are based on the tricks you have to do in Jython there s plenty of Jacl-based solutions . Even IBM internally has a plenty of dependencies on that legacy . This might be the reason why Jacl is deprecated since WAS v5.1 and still default . In short : .. . .. . If you re going to write a small script for a specific task Jacl may be more convenient for you since you ve mentioned that you re comfortable with both Python and Tcl .. . Should you however be interested in developing larger framework for managing your WAS infrastructure then Jython with its object-orientation may be a better option . But don t expect too much from that version of Jython - it s quite buggy and you won t be able to use too many Python libraries simply because they dropped Python2.1 support loooong time ago . The conclusion is : it s not that simple answer which means that you ve asked a good question . Comment : +1 it makes sense : just because the answer is not simple that I asked . Comment : Wondering why IBM not taking care of Jython version changes 100 I agree with Marcin", "Question : Facing the programming for the wsadmin scripting client I see that you can use both jacl and jython . I ve the same level of confidence with both two languages . I m wondering if in the specific of wsadmin programming there are advantages of using one language over the other such as robustness availability of examples or libraries for websphere administration or something like that arisen from your experience in the use and building of this kind of scripts . .. . Answer : Jython is the language to prefer : .. . .. . Rational Application Developer has tooling support for Jyton Jython editor debugger command completition and ability to test your scripts against your test server inside IDE . WebSphere administrative console provides console command assistance it gives you scripting equivalents of the operations you perform using administrative console in case you want to automate them . This assistance uses Jython as language . Even if Jacl had been the default language for wsadmin IBM promotes Jython for future and even provided a tool to convert Jacl scripts to Jython http : www-01.ibm.com support docview.wss uid swg24012144 . Quoting from description of this tool at given link .. . .. . When selecting a scripting-language Jython is the strategic direction as the administration scripting-language for WebSphere Application Server because future enhancements of the scripting-language is focused on the use of Jython . Comment : Plus I see more value in developing Python experience . Comment : +1 WebSphere administrative console provides console command assistance I think this feature is important . I believe this is a good answer and accepted it . Any other opinions or comments are welcome .", "Question : Maven is for building and managing any Java-based project . But what happens if a project is in a scripting-language All maven can do now with TCL is copy the files around and put them in the right place in the target directory . My problems are as follows : .. . .. . 1 . Code is in TCL- need of an interpreter not of a compiler . 2 . It doesn t see any Java code so it doesn t compile anything . 3 . It doesn t see any Java tests so it doesn t run them . 4 . There s no java to run coverage against so the jococo won t have anything to do . Is there any way to set up maven for supporting a TCL project I ve searched a lot in the internet and I found only jacl but I don t really know how I can use it for setting up Maven . Comment : Perhaps you could find some answers from this repo https : eclipse.googlesource.com dltk org.eclipse.dltk.tcl + master tcl tests as it seems to have TCL tests in a maven project Comment : That s interesting But I don t see any code in TCL just in Java . Correct me if I see it wrong . Comment : Stuff under .. . core.tests rawtests in the folder structure appears to be TCL though . So even though it s the source code for Dynamic Languages Toolkit for Eclipse might be something there . However I don t know anything about TCL so don t take my word for it . Just jumped at me when I did a quick Google search for this topic and figured I d mention it as you said you didn t find anything helpful . .. . Answer : It is very much not the maven way to make dependencies on external build tools outside the maven ecosystem . Linking to tclsh will break your builds if tclsh isn t available . Not saying I haven t done worse sometimes you just have to get it done and forget the maven way . Fortunately there is an alternative - jacl http : tcljava.sourceforge.net docs website index.html . First download the latest probably 1.4.1 prebuilt jacl binary zip file from sourceforge http : sourceforge.net projects tcljava files jacl . Next unzip and go into the lib tcljava1.4.1 subdirectory . There are four jar files here you need to publish to your local repository or another repo you use : .. . .. . You ll also need to add these as dependencies to the project where you re calling the tcl script : .. . .. . Then just call the tcl or really jacl script using the exec goal of the exec-maven-plugin passing in the script file path as the first argument customize the execution as necessary to bind to the proper phase etc . : .. . .. . Update : Note that I had to use the exec goal above instead of the java goal . That s because jacl calls System.exit in it s main function so it kills the jvm . With this config you can fail the build by using : .. . .. . From within your tcl code or any exit value other than zero or other successCodes configured in the plugin . Hope that helps .", "Question : I need to distribute some TCL code as part of an enterprise application and this code must be available to all nodes in the cluster . Due to security policy the Tcl interpreter cannot access the TCL code from the filesystem so I must make it available in a jar in the EAR itself . How can I convince Jacl 1.4.1 if it matters to find a pkgIndex.tcl for a package on the classpath .. . Answer : Jacl is looking for pkgIndex in the variable auto path .. . .. . if you execute the command puts auto path you see the entires for example : .. . .. . resource : tcl lang library .. . .. . add your path with : lappend auto path resource : Comment : Interestingly enough you re half right . However Jacl had a bug in its pkgUnknown procedure that prevented that from working . I ve had to patch it locally in order to use that feature .", "Question : I have two questions basically . I am using JACL interpreter to run TCL script in JAVA . My questions are : .. . .. . 1 . How to get the data from standard output after running tcl file 2 . How to pass arguments for tcl script when executing using jatcl E.G : .. . sample.tcl : .. . .. . When ran using java as follows : .. . .. . then the output will be written to stdout console of JAVA . I want to read that output to some variable like x i.eval sample.tcl then x should contain Hi this is from tcl . 2 . How to pass some parameter to sample.tcl .. . Answer : Getting standard out is a bit difficult you have to do a lot of work creating your own instance of a tcl.lang.channel.Channel and then plugging that in with TclIO.registerChannel which isn t really for someone just starting out yet you often don t need to do that if you are just wanting to communicate with a Tcl program . The result-of the script which is not the standard output but rather the result-of the last command in the script will be available via the Interp s getResult method after the eval finishes . More likely once you ve source d the script you ll then invoke commands in the same interpreter and inspect their results . That works much better . If you want to pass something more complex the simplest way is to store the value you want to pass in a Tcl variable prior to invoking the script which can then pull the value out of the variable when it needs it . .. . .. . If you re insisting on reading script stdout you can try this : .. . .. . I truly do not recommend this . I also wouldn t recommend it if you were interacting with Tcl from any other language either e.g . C or C++ . Tcl is designed to integrate at the interpreter-result level that I described earlier you ll find it much easier to make work for anything complex . Comment : I tried reading the output from getResult which is giving me an empty output . I will try reading it from channel and let you know the status Comment : Hi Donal I tried with channel also . It didn t work . Can you suggest any other frameworks instead of JACL . I need to work run some TCL script and get the output . I need to run using some interpreter", "Question : Maven is for building and managing any Java-based project . But what happens if a project is in a scripting-language All maven can do now with TCL is copy the files around and put them in the right place in the target directory . My problems are as follows : .. . .. . 1 . Code is in TCL- need of an interpreter not of a compiler . 2 . It doesn t see any Java code so it doesn t compile anything . 3 . It doesn t see any Java tests so it doesn t run them . 4 . There s no java to run coverage against so the jococo won t have anything to do . Is there any way to set up maven for supporting a TCL project I ve searched a lot in the internet and I found only jacl but I don t really know how I can use it for setting up Maven . Comment : Perhaps you could find some answers from this repo https : eclipse.googlesource.com dltk org.eclipse.dltk.tcl + master tcl tests as it seems to have TCL tests in a maven project Comment : That s interesting But I don t see any code in TCL just in Java . Correct me if I see it wrong . Comment : Stuff under .. . core.tests rawtests in the folder structure appears to be TCL though . So even though it s the source code for Dynamic Languages Toolkit for Eclipse might be something there . However I don t know anything about TCL so don t take my word for it . Just jumped at me when I did a quick Google search for this topic and figured I d mention it as you said you didn t find anything helpful . .. . Answer : Tcl isn t closely integrated with Maven unlike Java so you ll have to do more work . To run a Tcl script from Maven the simplest way is to use the Exec Maven Plugin http : mojo.codehaus.org exec-maven-plugin but you have to bind the executions to explicit lifecycle phases yourself instead of relying on defaults . For example to run a script during the test phase i.e . to do tclsh testscript.tcl anotherArgument you use : .. . .. . Maven s long-winded Don t forget that you can probably put much of the complexity in a parent POM and you can use properties and profiles to do interesting things . You can also use the java goal to run Jacl or jTcl interpreters in a sub-process . It depends on what exactly you want to do . Comment : You could also make a Maven plugin to run Tcl but that s way more work . If you do please make it available to others and do an announcement on comp.lang.tcl Comment : Thanks Donal I ll try your solution . If I get it correctly that could work only for one file or I could set as an argument .tcl meaning that it can run all the .tcl files Comment : Tcl doesn t do that by default . You d need a library script that takes in all the filenames as arguments and runs each of them . Crudely with no error-handling : foreach filename argv source filename or perhaps foreach filename argv puts exec info nameofexecutable filename but I reckon you will need to tweak beyond those recipes . You might be better off asking a separate question on this matter .", "Question : I have a TCL file which uses Tcl s BWidget package that I ve been using as a GUI for my program . I now want to be able to load up this GUI from a separate Java program . I ve looked into Jacl and Swank but they don t seem to do exactly what I want . I ve tried the following with Jacl but it s unable to evaluate the file . While debugging I can see that it completes parsing my tcl file but it throws an exception while parsing through the BWidget package tcl files . Here s my Java code : .. . .. . Any ideas on how I can accomplish what I want to do Is it even possible Comment : What is the exception Comment : It might be easier to run the GUI in a subprocess see java.lang.ProcessBuilder Java s subprocess handling is not really all that great but it beats working with a large chunk of unported code Comment : @DonalFellows Thank you for the help . I simply started the tcl wish shell in a subprocess and executed my tcl script . .. . Answer : Tcl itself can not display a GUI . It uses a plugin called Tk for that . In the C reference implementation of Tcl you get Tk as well . Tk has not been ported to Java Tcl has . You can not use Jacl to display Tk widgets but TclBlend http : tcljava.sourceforge.net docs website index.html could do that because TclBlend uses the C reference implementation of Tcl . That means that the user needs a working Tcl Tk installation . There are some problems with TclBlend and Tcl 8.5 through which result in a segfault . IIRC you have to remove the conditional if around Tcl FindNameOfExecutable in TclBlends C code and compile it yourself .", "Question : In attempting to run the following command in a Jacl script with APPNAME having been set prior to this call : .. . .. . I get the following error . I seem unable to find the docs that shed light on the use of script variables within an option specifier string . Clearly there must be some way to do what I m trying to do which is deploy an EAR file with a name of my choosing at the time the script is run .. . Answer : Jacl Tcl is a string-based language and the delimiter prevents variable interpolation similar to in UNIX shell programming . You want something like : .. . .. . ...or : .. . .. . This Tcl tutorial http : www.tcl.tk man tcl8.5 tutorial tcltutorial.html might be of interest particularly the Evaluation Substitutions section . Alternatively you could avoid the complexities of Jacl strings by switching to -lang jython . Comment : Thanks . Your suggestions solved the problem .", "Question : Maven is for building and managing any Java-based project . But what happens if a project is in a scripting-language All maven can do now with TCL is copy the files around and put them in the right place in the target directory . My problems are as follows : .. . .. . 1 . Code is in TCL- need of an interpreter not of a compiler . 2 . It doesn t see any Java code so it doesn t compile anything . 3 . It doesn t see any Java tests so it doesn t run them . 4 . There s no java to run coverage against so the jococo won t have anything to do . Is there any way to set up maven for supporting a TCL project I ve searched a lot in the internet and I found only jacl but I don t really know how I can use it for setting up Maven . Comment : Perhaps you could find some answers from this repo https : eclipse.googlesource.com dltk org.eclipse.dltk.tcl + master tcl tests as it seems to have TCL tests in a maven project Comment : That s interesting But I don t see any code in TCL just in Java . Correct me if I see it wrong . Comment : Stuff under .. . core.tests rawtests in the folder structure appears to be TCL though . So even though it s the source code for Dynamic Languages Toolkit for Eclipse might be something there . However I don t know anything about TCL so don t take my word for it . Just jumped at me when I did a quick Google search for this topic and figured I d mention it as you said you didn t find anything helpful . .. . Answer : Unless you re using jTcl https : kenai.com nonav projects jtcl I don t see what Maven will do apart from complicate your build-process . Unless you understand Maven well and can develop some supporting plugins . As you ve pointed out TCL is a scripting-language meaning your real challenge is a run-time deployment problem . So how would a TCL build-process make deployment simpler I would propose building RPM Debian or MSI package for each targeted environment . These native installers can use dependency-management to ensure the TCL interprertor is also installed . Another useful build option are starkits http : equi4.com starkit which would bundle the TCL interpretor in a single file . Once built these binaries can be stored in your Maven repository like jar files and used as part of your deployment process . And finally don t forget you are not forced to use Maven as your build tool . Disclaimer : Been a while since I ve programmed with TCL so hope this helps . Comment : Thanks Mark . But actually...I am forced to use Maven indeed This is a project on my work and I just try to setup everything locally which is clearly a pain .", "Question : See also a better question http : stackoverflow.com q 26541669 262852 more specific on this topic . I ve just discovered http : elenako.com 2013 04 04 expect-script-start-telnet-run-commands-close-telnet expect a tcl based scripting-language for automating among other things telnet connections : .. . .. . What mechanisms are available to either hook into expect with Java or into Java with expect Yes there are http : tcljava.sourceforge.net as well as a few others but they seem out of date . If there s a tcl implementation in Java and why not that would work I m sure . However I m inferring from the lack of updates to web pages that nothing was ever fully implemented.. . .. . .. . Wikipedia says : .. . .. . Java .. . .. . However expect4j says that it s an attempt ExpectJ hasn t been changed since 2010 and Expect-for-Java also hasn t been touched in years . If these libraries are used and functioning my apologies but the dates indicated that they aren t maintained . I would rather use expect and Java separately but so that they interact . Is there a hook or mechanism for passing messages between the two -----------------------------------------------------------UPDATE---------- .. . .. . .. . .. . Jacl is a Tcl 8.x interpreter written in Java . You can script your Java applications in Tcl . .. . .. . http : wiki.tcl.tk 1215 .. . .. . However the library hasn t been touched in some time . I m not quite sure how well it works . I don t know whether it supports anything like expect or not it looks like the various expect attempts are not being maintained . Most likely the answer by Donal Fellows that there s no real solution is correct . However it might just be possible to use this tcl library to initiate a telnet session invoking real telnet and not with process builder but that s very tentative . Comment : Define interact here What exactly are you trying to do from java What from expect And how do you need them to interact Comment : hook into pass messages between . How can I pass messages to a Java program from expect and vice versa see also stackoverflow.com questions 15143619 http : stackoverflow.com questions 15143619 how-to-implement-expect-interact-command-using-java for a similar question with a different solution ssh is different from telnet . Comment : You want to use expect to automate a telnet connection You want to control a java application from expect You want to have java see the contents of the telnet connection You want to write the expect -like logic in java Comment : something like that . Java doesn t hook into telnet well . From wiki.tcl.tk 1215 http : wiki.tcl.tk 1215 it looks like this is doable although I m just beginning to read documentation . Seems that expect drives or hooks into telnet much better presumably because tcl derives from c . I want to make the bulk of the program in Java just use tcl to establish the connection . Comment : expect doesn t hook into anything . It acts as the input and output devices by pretending to be a terminal of sorts and then drives the spawned applications by expect ing certain output and providing the scripted input . That s it . You don t need expect to do that it just happens to exist and do its job well . You could do it all yourself if you wanted to bother . .. . Answer : As with my knowledge Swig would help you better in hooking up the the two languages . Let me know in case i was wrong Comment : swig.org compat.html SupportedLanguages http : www.swig.org compat.html SupportedLanguages lists Java and Ruby as well as tcl . Very very intriguing .", "Question : null .. . Answer : Hi I have written one jacl script which is not working properly in case of .. . .. . test.jacl .. . .. . Script OUTPUT .. . .. . When I run .. . .. . it returns .. . .. . CASE 2 : .. . .. . OUTPUT .. . .. . CASE 3 : .. . .. . OUTPUT .. . .. . CASE 3 : .. . .. . OUTPUT .. . .. . Kindly suggest best way to overcome this problem Comment : Quotes . Single quotes . They are your friends . The shell is seeing b4r as a variable name and expanding it . The shell is seeing as a command separator and splitting it . The shell is seeing as a glob character and trying to expand it that isn t happening here because nothing matches but it could . The shell is seeing as a history expansion character and trying to expand it . All of those are prevented by single quoting the argument . The too . Comment : The is a special character inside bash - make sure the string is inside quotes . Comment : @cdarke thanks for ur suggestion but here is some problem with single qoutes if we use . . test.jacl testUser Foo b4r then it rturns output as Fo4r so b is being considered as backspace . Comment : Then double the backslash . Comment : Is this in bash or jacl You have tagged both products and its not clear which one you are having issues with . In bash the single quotes prevent any interpolation . I don t know jacl but does it have raw strings marked with as in TCL", "Question : See also a better question http : stackoverflow.com q 26541669 262852 more specific on this topic . I ve just discovered http : elenako.com 2013 04 04 expect-script-start-telnet-run-commands-close-telnet expect a tcl based scripting-language for automating among other things telnet connections : .. . .. . What mechanisms are available to either hook into expect with Java or into Java with expect Yes there are http : tcljava.sourceforge.net as well as a few others but they seem out of date . If there s a tcl implementation in Java and why not that would work I m sure . However I m inferring from the lack of updates to web pages that nothing was ever fully implemented.. . .. . .. . Wikipedia says : .. . .. . Java .. . .. . However expect4j says that it s an attempt ExpectJ hasn t been changed since 2010 and Expect-for-Java also hasn t been touched in years . If these libraries are used and functioning my apologies but the dates indicated that they aren t maintained . I would rather use expect and Java separately but so that they interact . Is there a hook or mechanism for passing messages between the two -----------------------------------------------------------UPDATE---------- .. . .. . .. . .. . Jacl is a Tcl 8.x interpreter written in Java . You can script your Java applications in Tcl . .. . .. . http : wiki.tcl.tk 1215 .. . .. . However the library hasn t been touched in some time . I m not quite sure how well it works . I don t know whether it supports anything like expect or not it looks like the various expect attempts are not being maintained . Most likely the answer by Donal Fellows that there s no real solution is correct . However it might just be possible to use this tcl library to initiate a telnet session invoking real telnet and not with process builder but that s very tentative . Comment : Define interact here What exactly are you trying to do from java What from expect And how do you need them to interact Comment : hook into pass messages between . How can I pass messages to a Java program from expect and vice versa see also stackoverflow.com questions 15143619 http : stackoverflow.com questions 15143619 how-to-implement-expect-interact-command-using-java for a similar question with a different solution ssh is different from telnet . Comment : You want to use expect to automate a telnet connection You want to control a java application from expect You want to have java see the contents of the telnet connection You want to write the expect -like logic in java Comment : something like that . Java doesn t hook into telnet well . From wiki.tcl.tk 1215 http : wiki.tcl.tk 1215 it looks like this is doable although I m just beginning to read documentation . Seems that expect drives or hooks into telnet much better presumably because tcl derives from c . I want to make the bulk of the program in Java just use tcl to establish the connection . Comment : expect doesn t hook into anything . It acts as the input and output devices by pretending to be a terminal of sorts and then drives the spawned applications by expect ing certain output and providing the scripted input . That s it . You don t need expect to do that it just happens to exist and do its job well . You could do it all yourself if you wanted to bother . .. . Answer : What mechanisms are available to either hook into expect with Java or into Java with expect None really . The problem is that expect does some really complicated low-level things to manage pseudo-terminals and that uses OS interfaces that the JRE doesn t expose . It s even more tricky if you re on Windows where it uses the system debug API . You d have to go to doing nasty stuff with native-code . The easy route is to run expect as a subprocess via ProcessBuilder .", "Question : I m developing an automation framework and I ve experienced strange behavior of wsadmin tool . The problem is reproducible in WAS 6.1 7.0 and 8.0 I haven t tried with was 8.5 . I m wondering if this is a bug in wsadmin quite strange that nobody noticed it yet probably since WAS 5 .. . The example scripts can be safely executed against any WAS environment without doing any harm . If I understand correctly the above script fails on zero-division . But wsadmin output is a bit confusing : .. . .. . What s really interesting Jacl seems to have the same problem : .. . .. . wsadmin also does not print any information about the actual exception which terminated the script : .. . .. . After changing both scripts slightly to avoid throwing WAS exception the output of both scripts is correct . If the script doesn t throw handle WAS exception the output looks as expected : .. . .. . Same with Jacl : .. . .. . wsadmin outputs the following which again is quite expected : .. . .. . I have to confess a bit : the reason why I m asking this question is that I actually reported the problem to WebSphere Support . I m not fully satisfied with their replies though . Wsadmin Jython Jacl Python Tcl experts : what s your opinion on that Am I doing something wrong Is it a bug in wsadmin Is it expected behavior .. . Answer : The problem will be fixed in upcoming FixPacks for WSAS 6.1 7.0 8.0 and 8.5 . IBM Support was a bit concerned about breaking compatibility with previous implementations well it s arguable but some scripts may rely on this bug therefore the proper behavior needs to be explicitly enabled using com.ibm.ws.scripting.exceptionPropagation thrown JVM property . I m aware of two ways of passing this property to wsadmin s JVM : .. . .. . javaOption environment variable .. . javaoption option .. . .. . The environment variable way : .. . .. . The command-line option way : .. . .. . The fix solves the problem for both Jython and Jacl . Link to official document : http : www-01.ibm.com support docview.wss uid swg1PM80400", "Question : I have a TCL file which uses Tcl s BWidget package that I ve been using as a GUI for my program . I now want to be able to load up this GUI from a separate Java program . I ve looked into Jacl and Swank but they don t seem to do exactly what I want . I ve tried the following with Jacl but it s unable to evaluate the file . While debugging I can see that it completes parsing my tcl file but it throws an exception while parsing through the BWidget package tcl files . Here s my Java code : .. . .. . Any ideas on how I can accomplish what I want to do Is it even possible Comment : What is the exception Comment : It might be easier to run the GUI in a subprocess see java.lang.ProcessBuilder Java s subprocess handling is not really all that great but it beats working with a large chunk of unported code Comment : @DonalFellows Thank you for the help . I simply started the tcl wish shell in a subprocess and executed my tcl script . .. . Answer : Go to this site http : jtcl-project.github.io jtcl and download now for the binary zip . Its a recent java tcl on github called Jtcl . Unzip it and you will find a jar called jtcl-2.7.0.jar . I am using Netbeans 8 my preference . I add the jar into Project Library . I create a java file called JTclHallo.java and this is the code . For swing.tcl Comment : Could you please explain your answer in a few sentences instead of simply dumping the code inhere", "Question : See also a better question http : stackoverflow.com q 26541669 262852 more specific on this topic . I ve just discovered http : elenako.com 2013 04 04 expect-script-start-telnet-run-commands-close-telnet expect a tcl based scripting-language for automating among other things telnet connections : .. . .. . What mechanisms are available to either hook into expect with Java or into Java with expect Yes there are http : tcljava.sourceforge.net as well as a few others but they seem out of date . If there s a tcl implementation in Java and why not that would work I m sure . However I m inferring from the lack of updates to web pages that nothing was ever fully implemented.. . .. . .. . Wikipedia says : .. . .. . Java .. . .. . However expect4j says that it s an attempt ExpectJ hasn t been changed since 2010 and Expect-for-Java also hasn t been touched in years . If these libraries are used and functioning my apologies but the dates indicated that they aren t maintained . I would rather use expect and Java separately but so that they interact . Is there a hook or mechanism for passing messages between the two -----------------------------------------------------------UPDATE---------- .. . .. . .. . .. . Jacl is a Tcl 8.x interpreter written in Java . You can script your Java applications in Tcl . .. . .. . http : wiki.tcl.tk 1215 .. . .. . However the library hasn t been touched in some time . I m not quite sure how well it works . I don t know whether it supports anything like expect or not it looks like the various expect attempts are not being maintained . Most likely the answer by Donal Fellows that there s no real solution is correct . However it might just be possible to use this tcl library to initiate a telnet session invoking real telnet and not with process builder but that s very tentative . Comment : Define interact here What exactly are you trying to do from java What from expect And how do you need them to interact Comment : hook into pass messages between . How can I pass messages to a Java program from expect and vice versa see also stackoverflow.com questions 15143619 http : stackoverflow.com questions 15143619 how-to-implement-expect-interact-command-using-java for a similar question with a different solution ssh is different from telnet . Comment : You want to use expect to automate a telnet connection You want to control a java application from expect You want to have java see the contents of the telnet connection You want to write the expect -like logic in java Comment : something like that . Java doesn t hook into telnet well . From wiki.tcl.tk 1215 http : wiki.tcl.tk 1215 it looks like this is doable although I m just beginning to read documentation . Seems that expect drives or hooks into telnet much better presumably because tcl derives from c . I want to make the bulk of the program in Java just use tcl to establish the connection . Comment : expect doesn t hook into anything . It acts as the input and output devices by pretending to be a terminal of sorts and then drives the spawned applications by expect ing certain output and providing the scripted input . That s it . You don t need expect to do that it just happens to exist and do its job well . You could do it all yourself if you wanted to bother . .. . Answer : I have created yet another Java expect library ExpectIt https : github.com Alexey1Gavrilov ExpectIt not listed in Wikipedia which implements interact loop . Have a look at this example https : github.com Alexey1Gavrilov ExpectIt blob master expect-java8 src main java net sf expectit java8 Java8Example.java . Comment : Do you have to use import org.apache.commons.net.telnet.TelnetClient or would it be possible to use the system telnet Comment : The library as all the other Java libraries uses standard Java streams which can come from a Telnet client a socket connection or any other stream source . Here is a telnet example : github.com Alexey1Gavrilov ExpectIt blob master expectit-core https : github.com Alexey1Gavrilov ExpectIt blob master expectit-core src test java net sf expectit TelnetExample.java Comment : This question morphed and got away from me I narrowed it down to your library and asked a more specific question here with regards to the Java stream for a Telnet client http : stackoverflow.com questions 36865567 how-to-use-expectit-to-interact-with-the-telnet-stream .", "Question : I am using joomla 1.0.13 and i am trying to access JACLplus but this error is occuring and i dont know why it was running fine and all of a sudden now it is saying this Sorry Component JACLPlus has been installed UNSUCCESSFULLY .. . .. . i have never used joomla and have inherited it . .. . Answer : Before anything else your version of Joomla is way out of date . The current version is 1.5.22 . You should look at upgrading . As for the error can you see JACL in the backend of the website Looks like it s been uninstalled but not all of the files have been removed . Comment : I cant upgrade due to other reasons . When i log into joomla administration and go to the menu jacl plus option from the drop down under components . I dont want it uninstalled any idea how to get it back to how it was Comment : All the files are there on the backend on the server nothing has been altered Comment : Could be a permissions issue . Depending on your host you might need to FTP and change the file-permissions and try reinstalling it . Comment : Any idea how i start to try re install it the permissions on all the folders of the site are fine Comment : Uninstall and then reinstall . You ll need to download the latest version . Make sure you backup the database first", "Question : I m having some trouble writing a GUI in Java that can interact with Tcl scripts . When a Tcl script is run I want information passed to this GUI and displayed . Further inputted information on the GUI should be able to be returned back to the script . I m currently using Tcl Java . Unfortunately I am using Teamcenter and according to the user-manual the Tk toolkit is not supported . So I m trying to work with Swing again . This is what I ve tried to get to work for Swing but nothing shows up when I run the script : .. . .. . I ve also found out about Swank http : www2.tcl.tk 2858 but there seems to be little documentation on it so I m not sure how to proceed . Any advice on how to best approach this Or where to find additional resources .. . Answer : Searching for background on what your problem might be I found this thread on comp.lang.tcl https : groups.google.com forum topic comp.lang.tcl QiqSmNriiac which explains the problem . The issue is that you re not creating the GUI from the AWT Event Thread . To do that you need to make a small Java class that implements Runnable called Runner below and which creates your GUI objects and shows them . This you can then instantiate and fire off through SwingUtilities.invokeLater via JTcl : .. . .. . However you re using JTcl which includes a package hyde http : wiki.tcl.tk 2745 that lets you put your Java code inside your Tcl code : .. . .. . It s just a shame that it isn t documented more clearly http : jtcl.kenai.com docs jtcllib hyde.html it s easy to miss because it is located within the jtcllib documentation group . Comment : Is there a difference between what I can do with Jacl and JTcl I m getting the error msg can t find package hyde . Comment : @John JTcl is meant to be a fork of advance on Jacl but I ve not used either . My current apps tend to be either Java or Tcl but not both . All I can really say is that searching indicates that hyde is a convenient solution or you can write the thunk directly in Java that ll work too and that it appears to be part of the current release of JTcl in the jtcllib part . Comment : Is it possible to accomplish what I m trying to do if I just develop the entire GUI separately in Java The original problem I was having was getting my Tcl scripts to actually call and run the GUI in the first place .", "Question : I am trying to use variables in install script in wsadmin on jacl . First I am specifying .. . .. . Then in my script I want to use these 2 variables but for some reason it done want to take them .. . .. . Probably something wrong with the syntax .. . Answer : In the initial script you provided I don t see any attempt to use the variables nodeName or cellName . Also do you actually care about supplying all of those arguments Most of them are defaults . Also you re not putting quotes around the .war path which is required . To use a variable in a wsadmin script put a sign in front of the variable name . Such as : .. . .. . So to install an app it should be as simple as : .. . .. . I d recommend taking a look at the IBM doc for WebSphere scripting it describes what you re trying to do : Installing enterprise applications using wsadmin scripting https : www-01.ibm.com support knowledgecenter SSEQTP 8.5.5 com.ibm.websphere.base.doc ae txml callappinstall.html", "Question : I have several modules say Mod1 under my deployed application s say App manage modules and for the modules Mod1 I have to do these things : .. . .. . Under General properties 1 . Check the box Override session management and click Apply . 2 . Click the Enable cookies link under Session tracking mechanism . 3 . Under General properties uncheck the box Set session-cookies to HTTP Only to help prevent cross-site scripting attacks and click Apply . So far I could get myself to only check or uncheck the Override session management option under my application by first getting its id using the following code but I am not able to figure out how to do the above 3 things for a module under my application . It would be great if I can get an answer to this in JACL as I have all my scripts in jacl and I was trying with jython only for this piece . .. . Answer : Not sure if your problem is solved already . I had the same problem and I solved it with this post http : www.coderanch.com t 556690 Websphere WSadmin-set-sessionManagement-cookiePath-WebModule . Instead of WebModuleConfig I configure the ApplicationConfig .", "Question : in a WSADMIN jacl Script how i can get wsadmin.properties values for example the com.ibm.ws.scripting.traceFile i already try with .. . .. . puts com.ibm.ws.scripting.traceFile .. . .. . buts return .. . .. . can t read com.ibm.ws.scripting.traceFile : no such variable while executing puts com.ibm.ws.scripting.traceFile .. . Answer : The values stored in wsadmin.properties are loaded into the JVM and are stored as System Properties . You can obtain the values of these properties by working with Java s java.lang.System object and then retrieving the specific property you want : .. . .. . Here s the JACL code : .. . .. . For anyone interested here s the Jython equivalent :" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
mako@python@47
mako -- mako is a template library written in @placeholder .
{ "confidence": [ 51.12923049926758, 47.04186248779297, 46.39904022216797, 45.557430267333984, 45.557430267333984, 44.48036575317383, 44.48036575317383, 44.21803283691406, 44.21803283691406, 43.875179290771484, 43.131202697753906, 43.131202697753906, 42.629268646240234, 42.03126525878906, 41.68086242675781, 41.470062255859375, 41.42607879638672, 40.39299774169922, 40.39299774169922, 40.38323211669922, 40.202545166015625, 40.202545166015625, 39.910240173339844, 39.787811279296875, 39.462791442871094, 39.30616760253906, 39.30616760253906, 39.30616760253906, 39.30616760253906, 39.16680145263672, 39.16680145263672, 39.16680145263672, 39.16680145263672, 39.08063507080078, 38.786155700683594, 38.786155700683594, 38.70098114013672, 38.70098114013672, 38.70098114013672, 38.70098114013672, 38.36969757080078, 38.003570556640625, 38.003570556640625, 37.743446350097656, 37.69932174682617, 37.69932174682617, 37.528533935546875, 37.528533935546875, 37.528533935546875, 37.528533935546875, 37.528533935546875, 37.528533935546875, 37.39838409423828, 37.39838409423828, 36.87895965576172, 36.44170379638672, 36.44170379638672, 36.44170379638672, 36.44170379638672, 36.44170379638672, 36.44170379638672, 36.44170379638672, 36.40760803222656, 36.40760803222656, 36.106483459472656, 36.106483459472656, 36.106483459472656, 36.106483459472656, 36.106483459472656, 36.106483459472656, 36.10517883300781, 35.79518127441406, 35.320777893066406, 35.240699768066406, 35.240699768066406, 35.240699768066406, 35.240699768066406, 35.240699768066406, 35.240699768066406, 35.13910675048828, 35.13910675048828, 35.13910675048828, 35.13910675048828, 35.018348693847656, 34.732688903808594, 34.48768615722656, 34.46821594238281, 34.46821594238281, 34.46821594238281, 34.46821594238281, 34.46821594238281, 34.46821594238281, 34.46821594238281, 34.46821594238281, 34.46821594238281, 34.46821594238281, 34.153865814208984, 34.153865814208984, 34.020721435546875, 33.725643157958984 ], "content": [ "I am a beginner to mako template .", "Is it possible to import mako template in django", "Let s say that I have a template written in mako : base.mako .", "How is this done properly in mako", "Can this be done in Mako", "I have a mako template like .. . .. . that other templates inherit from .", "I am trying to understand who the mako template-engine operates .", "Now I am using mako template-engine .", "I need to put javascript function to mako template .", "Did you import mako properly", "It uses the Pylons framework with the Mako template language", "What does this mean relative to the Mako template", "Is that the mako module", "It is best to think of a Mako template as being similar to a piece of python code .", "You want the mako folder that is inside the Mako-0.3.4 folder .", "mako still raise the exception.. .", "Mako will set these variables to the value UNDEFINED .", "How do I use Webhelpers in a Mako template in my Pyramid app", "Pass dict1 to to bunch function before passing it to Mako template .", "mako genshi etc .", "Also I have a template written in mako named : concrete.mako which inherits from base.mako this way : inherit file base.mako .", "I have base.html which is written in Django Template Engine and I want to import a mako file footer.html .", "All I do is download http : www.makotemplates.org downloads Mako-0.3.4.tar.gz mako directly then place the mako module directory in my app root .", "I am a newer to tornado and mako .", "E.g . the original was something like : .. . .. . Now in mako our first attempt was : .. . .. . But this threw the error TypeError : int object is not callable because mako compiled that line to : .. . .. . Since mako uses the character to mean pipe the left to the function on the right .", "I m generating a Sprox form with Turbogears 2.1 and trying to display it in a Mako template .", "The body argument I was referring to was the function-call within the Mako template .", "I am using python pyramid framework and mako template-engine now .", "Now I am using pyramid framework and mako template-engine .", "I want to set up a lookup function with mako .", "I haven t used Mako but it works in the Python shell :", "It s not clear to me why Mako has trouble with this .", "Use named arguments .. . .. . In the mako side you d do", "There is no equivalent for py : strip in Mako .", "My current workaround is items .join data as mako script but I wonder if this is also possible with built-in mako directives .", "Perhaps BaseTemplate.defaults gets fed into the Mako templates or maybe Mako provides a similar mechanism for setting the defaults", "I use Mako on App Engine .", "I have the folder Mako-0.3.4 .", "I found this general problem with Mako .", "Works with Mako templates in Pyramid framework", "Example code populating mako template : .. . .. . The template file test.mak creating multiple lines which is not what I want : .. . .. . The expected expanded mako script output should be items foo bar baz .", "I use Pylons framework Mako template for a web based application .", "While I display the text through mako template I display as it is .", "Maybe at some point in the future the paren method will work : github.com zzzeek mako pull 19 https : github.com zzzeek mako pull 19", "I have to pass the variable through the the n mako filter to remove any automatic filters mako applies to the html generated .", "Looking at the Flask-Mako http : pythonhosted.org Flask-Mako source I found an undocumented configuration parameter called MAKO TRANSLATE EXCEPTIONS .", "Installing different version of mako without any effect .", "Look at the homepage of mako http : makotemplates.org for an example .", "Well have Mako generate the templates as it does now .", "I m building a pyramid application using mako templates .", "Mako .. . .. . output .. . .. . See the new line n is not escape .", "Anyone know how to format the length of a string with Mako", "What s the best way to do this in Mako", "There has to be an elegant equivalent to py : strip for Mako no", "Mako throws out errors when I try to reference these multi-word keys in a template .", "Unfortunately our main site is built using Mako .", "Jinja and Mako are somewhat similar I believe .", "In Mako that just means render the derived templates body .", "Our Django site is built using Mako templates .", "I ve tried editing the mako files e.g .", "Is it possible to use the class from mako templates .", "You then don t need to alter Mako source code .", "If my mako template were python objects I would have it sort of like .. . .. . Here is what I have attempted in mako but it doesn t work .. . .. . If I call span it renders the same as div .", "I constantly get this error using mako : .. . .. . I ve told mako I m using unicode in any possible way : .. . .. . All my template files starts with : .. . .. . and inside them all costant strings are prefixed with u .", "When I type : set ft mako it works wonderfully .", "Any ideas of how to solve this in an elegant avoid ifs inside the mako way", "Today is my first day trying to use mako templates with angularjs. .", "i think in mako it searches the function in global but it s not in global .", "It appears from my evaluation that this may be a feature of mako in the way it handles namespaces .", "You cannot use from future import statements in Mako templates .", "All examples I ve seen so far create multiple lines and writing the mako for-loop in one line causes mako errors .", "This was a good enough solution to the issue stackoverflow.com questions 19303817 http : stackoverflow.com questions 19303817 dynamically-set-mako-template-to-include-another-template", "Our Mako templates all currently do the following : .. . .. . What I want is to be able to do something like this from a Django Template : .. . .. . With the following in mako base.html : .. . .. . Has anyone had to do this before", "I want to write this in my mako template : .. . .. . To state that page content contains markdown code and should be processed as such .", "As mako templates really translated to python modules any name imported by this lines will be available as a name in your template .", "I want to access GMAPS API KEY renderer global from my mako template in pyramid .", "I need to set up a server using CherryPy and the Mako Template Engine though I can t get the latter to work .", "If you know the basics of Mako you should be able to change the template-engine object and its calls accordingly .", "None of these suggestions including the accepted answer work in all cases specifically where the mako template renders content eg .", "Jinja2 and Mako are both apparently pretty fast .", "So the debugtoolbar somehow makes mako available to the application", "I m converting a bunch of Genshi templates to Mako .", "Because Mako operates on bytes not html xml tags .", "Also you might want to check your rendering of templates with mako since from what I read you are placing a mako placeholder into an html file .", "We have an app thats is a fusion of flask and django and it uses mako as a template-engine we want to provide alternative templates in some views for when the user is on mobile currently the what I have done is to make two sub folders in my templates folder and overide the render method to grab the appropriate mako .. . .. . So for example if I call render index.mako and the request has request.mobile True then it will translate the file url to mobile index.mako if the mobile some template .mako doesn t exist it will automatically grab the desktop some template .mako since all templates exist for the desktop .", "Took me a while to find this but reading that entire section on the Mako Runtime http : docs.makotemplates.org en latest runtime.html will clear up how Mako recieves sets and uses context variables .", "So I called my mako files by doing : .. . .. . Still no dice .", "Is it possible to populate a mako script s for-loop to one line only", "Here is mako code : .. . .. . parser code : .. . .. . XML file is : .. . .. . please help. .", "I m trying to create some reusable widgets in mako using defs .", "Reading the mako docs I m not sure if it s possible to do this at all .", "Can someone help me with some example for using babel with Mako and bottle", "you can use python s string-formatting fairly easily in mako .. . .. . giving :", "Thanks for answer but in my case problem probably was connected with nested mako templates .", "Whenever I pass a complicated data structure to Mako it s hard to iterate it .", "Unfortunately Mako doesn t provide any hooks to do this automatically .", "What I think I want is a template tag that will call out to Mako and request to be embedded .", "A template tag would be incredibly useful to a lot of projects that are using Mako I think .", "I got this error when I try to run this report which written in mako template : .. . .. . It was working fine in openerp-7 but in odoo-8 didn t work .", "The Mako docs specify how to call defs from outside a template http : www.makotemplates.org docs defs.html defs programmatic but they do not indicate how to do this properly at runtime ." ] }
{ "confidence": [ 57.57722473144531, 53.42473220825195, 52.92607498168945, 51.57756423950195, 51.466064453125, 51.369571685791016, 50.69308090209961, 50.67102813720703, 49.70814895629883, 49.32827377319336, 49.29967498779297, 49.19037628173828, 49.14815902709961, 49.01848220825195, 48.90972137451172, 48.86623764038086, 48.78935623168945, 48.725730895996094, 48.62862777709961, 48.42807388305664 ], "content": [ "Question : null .. . Answer : I am a beginner to mako template . I am trying to understand who the mako template-engine operates . So if I have a html template for instance call it index.html : .. . .. . And I call it with the script.py : .. . .. . Can I even do this because I get an error for this Thanks a lot for your help . UPDATED : .. . .. . I get the following error : Comment : What error are you getting Comment : Did you import mako properly render is a method of Template class located in mako.template library .", "Question : I have base.html which is written in Django Template Engine and I want to import a mako file footer.html . Is it possible to import mako template in django How I can import it Comment : Why a vote down Would you like to explain No comment no reference for solution thats harsh . .. . Answer : How about this", "Question : Is it possible to populate a mako script s for-loop to one line only All examples I ve seen so far create multiple lines and writing the mako for-loop in one line causes mako errors . Example code populating mako template : .. . .. . The template file test.mak creating multiple lines which is not what I want : .. . .. . The expected expanded mako script output should be items foo bar baz . My current workaround is items .join data as mako script but I wonder if this is also possible with built-in mako directives . .. . Answer : As mako documentation http : docs.makotemplates.org en latest syntax.html newline-filters says you may consume endline character by adding backslash at the very end-of-line . So your template should look like this : Comment : Thanks . I didn t spot this part in the documentation .", "Question : I m building a pyramid application using mako templates . How can I make a function be accessible in all my mako templates without having to namespace a file in each and every template Not that having to add the namespace tag is bad per se but in this case I m trying to add a filter function for markdown processing . That does not belong in a template file but is more of a library thing and belongs in a .py file . I want to write this in my mako template : .. . .. . To state that page content contains markdown code and should be processed as such . Comment : You can also register global functions helpers that can be used in your templates as exaplined here : docs.pylonsproject.org projects pyramid-cookbook en latest http : docs.pylonsproject.org projects pyramid-cookbook en latest templates templates.html Comment : @webjunkie I like your solution much better than mine . If you write an answer with @subscriber BeforeRender I ll accept that . That s what I m using now . .. . Answer : You can specify lines of python code that should be included on the top of the modules that will be created from your mako templates . This is intended for doing just this . As mako templates really translated to python modules any name imported by this lines will be available as a name in your template . Filters are simply functions that accept a string and return a new string or unicode . You can add a special module in your pyramid project to contain such functions e.g . as mako imports.py .. . .. . Now to include that functions you add to your configuration-files development.ini production.ini .. . the following at your mako . section : .. . .. . You need to specify the imports explicitly as from .. . import is not supported there . Now you should be able to do this in your mako templates : .. . .. . And you should get rendered markdown without any filtering for malicious html of course be sure to take care of that if needed . The additional n filter is needed because by default mako would escape the created html . s I think there must be a way to move the part in the .ini-files over to your program code e.g . in the main function of your application but I did not figure that out yet . s .. . .. . Edit : there is a way see accepted answer .", "Question : We have an app thats is a fusion of flask and django and it uses mako as a template-engine we want to provide alternative templates in some views for when the user is on mobile currently the what I have done is to make two sub folders in my templates folder and overide the render method to grab the appropriate mako .. . .. . So for example if I call render index.mako and the request has request.mobile True then it will translate the file url to mobile index.mako if the mobile some template .mako doesn t exist it will automatically grab the desktop some template .mako since all templates exist for the desktop . The problem now comes with inheritence say I have the following template .. . .. . results.mako .. . .. . and I call the render results.mako with request.mobile True the path will translate to desktop results.mako since the results.mako doesnt exist for mobile and the results.mako will inherit from the desktop base.mako since it uses the relative-path and not the correct mobile base.mako which should be used since its a mobile and the mobile base.mako exists . Any ideas of how to solve this in an elegant avoid ifs inside the mako way Maybe by changing somehow the dir make thinks the template is located .. . Answer : I solved the problem by overriding the get template method of the mako s TemplateLookup object .", "Question : Let s say that I have a template written in mako : base.mako . I would like to use it as a renderer in a view named : base view . Also I have a template written in mako named : concrete.mako which inherits from base.mako this way : inherit file base.mako . It is used by different view . Question : .. . .. . I would like to rewrite concrete.mako in pyjade as a concrete.jade and on rendering it I would like it to compile to mako and then to compile to concrete html . How to set it up in pyramid it would be great if the pyramid system will use different renderers depending on file extension and after using pyjade will also compile pyjade output with mako compiler to concrete html . Thx . .. . Answer : Well pyramid does use different renderers based on file extension . However they do not cascade or anything a renderer just returns a string . I think you ll have to write your own .jade2mako2html renderer to do what you re asking . http : docs.pylonsproject.org projects pyramid en latest narr renderers.html adding-and-changing-renderers", "Question : null .. . Answer : I posted a similar question. . maybe it s confusing. . I ll try this : .. . .. . How do I replace this code labeled as this code below via mako but keep the outer shell the collapse div part . I think the block element might be the opposite of what I want Because all of this code is really contained in a def tag .. . .. . today s my first day with mako stuff don t be too harsh .. . .. . p.s . passing in a variable to a mako definition only makes sense if I can some how send a lot of code to it like sending the include file tag some how Comment : This was a good enough solution to the issue stackoverflow.com questions 19303817 http : stackoverflow.com questions 19303817 dynamically-set-mako-template-to-include-another-template", "Question : I constantly get this error using mako : .. . .. . I ve told mako I m using unicode in any possible way : .. . .. . All my template files starts with : .. . .. . and inside them all costant strings are prefixed with u . I know the self.stuff parameter contains unicode strings but the way I instantiate the mako objects should take care of it otherwise what those arguments are good for . Is there anything I forgot to do One more question : what s the point of encoding errors replace EDIT I left only a single unicode string and this is the traceback : Comment : this is nice : I got rid of all my templates code leaving a single unicode string value.decode utf-8 and guess what mako still raise the exception.. . Comment : please show the traceback Comment : oh and I forgot to mention that if I run debug the application inside Eclipse+PyDev mako does not report any error and the resulting html is ok . launching from a console or a shortcut results in the unicode error . Comment : Is the actual template file itself saved as UTF-8 I had this problem before and that fixed it . Comment : tomasky : those files does not contains any non-ascii text so I m not sure how save them as unicode . should I write the BOM in them .. . Answer : For the sake of googlers : .. . .. . Mako raises an exception mako.exceptions.CompileException : Unicode decode operation of encoding ascii failed in file etc . when your template file comprehends non-ascii characters and when the Unicode BOM isn t written into the file . You need to manually add the BOM this is not made automatically at least in my text-editor so that this : .. . .. . becomes this : Comment : This is no longer true . If the file is utf-8 without BOM and the input encoding is utf-8 it will at least work with Template didn t try TemplateLookup .", "Question : We made the decision quite awhile ago to use Mako Templates in our Django project . We re also supporting Django Templates since a lot of reusable apps obviously assume that Django Templating is available . I ve found it possible to render Django Templates from Mako but I haven t been able to find a way to make it work the other way around . I ve just added django-articles to our list of apps and it uses Django Templating . It assumes that the base.html file is an overriden Django Template . Unfortunately our main site is built using Mako . I can t yet figure out a clean way for Django Templates to host themselves within Mako . What I think I want is a template tag that will call out to Mako and request to be embedded . Our Mako templates all currently do the following : .. . .. . What I want is to be able to do something like this from a Django Template : .. . .. . With the following in mako base.html : .. . .. . Has anyone had to do this before I m not very familiar with writing template tags . Do you think this can be done The alternative is probably going to be re-writing all the templates in Mako and that doesn t appeal to me at all . A template tag would be incredibly useful to a lot of projects that are using Mako I think . .. . Answer : Good question Rendering a Mako template within a Django template can be done thanks to Django s custom template tags http : docs.djangoproject.com en 1.3 howto custom-template-tags . The Django docs explain the process in greater detail but basically you ll have to parse the tag s input ensure that the arguments are valid and create a django.template.Node object from that . The Node is an object that takes your template tag arguments and defines a render method to process them . You ll have to take special care however to escape the text your template tag returns since you definitely don t want HTML tags to be escaped . Apparently the Django folks have considered this as well and there s a section in the same doc called Auto-escaping considerations http : docs.djangoproject.com en 1.3 howto custom-template-tags auto-escaping-considerations that explains how to do it . Once you figure out how to parse the input from the template tag which is really just validating the arguments you can define the Node.render method to call Mako s rendering function with the template and context given in the tag and return the output to the Django template . I was a bit confused by your description though when you used body as the second argument . What does this mean relative to the Mako template I must admit I ve never used Mako but a quick glance at the documentation shows many similarities to the Django and Jinja2 systems I apologize if this assumption is mistaken . If you can make it through the Django template tag docs this seems like a reasonable undertaking . Best of luck Comment : thanks for the reply . Jinja and Mako are somewhat similar I believe . The body argument I was referring to was the function-call within the Mako template . In Mako that just means render the derived templates body . I think I need to look into Mako a little more to see if I can just use python function-calls to provide a block of text html and the template used as the base . I m putting this off to the side for a moment but I ll post an answer here if I get it working . Cheers for the input . Comment : @JoshSmeaton thanks for the clarification . I think the function you re looking for is mako.template.Template http : www.makotemplates.org docs usage.html basic-usage which takes a template as an argument and returns a Template object . This object has a render method that renders the template with the given context arguments . My only concern now is whether the body function executes by default when the template is rendered . If I get a working example I ll post the code in my answer . Comment : EDIT : I realized too late to edit that I have no knowledge of your Mako template inheritance structure so I can t really replicate behavior of next.body . Comment : the bit I m having trouble with is using a template tag to get the currently rendered output of the template . I posted a new question with the hope that somebody could help me with that piece . The body part is irrelevant at this point . stackoverflow.com questions 5611924 http : stackoverflow.com questions 5611924 how-can-i-get-the-rendered-output-of-a-template-within-a-template-tag-in-django", "Question : I m generating a Sprox form with Turbogears 2.1 and trying to display it in a Mako template . Here is my code : .. . .. . To define the form : .. . .. . The controller definition that assigns the form and calls the template : .. . .. . And the relevant template code : .. . .. . The problem is the HTML code is displayed as plain text on the page not rendered HTML . .. . Answer : Figured it out . I have to pass the variable through the the n mako filter to remove any automatic filters mako applies to the html generated . So : .. . .. . tmpl context.register form value value n", "Question : I constantly get this error using mako : .. . .. . I ve told mako I m using unicode in any possible way : .. . .. . All my template files starts with : .. . .. . and inside them all costant strings are prefixed with u . I know the self.stuff parameter contains unicode strings but the way I instantiate the mako objects should take care of it otherwise what those arguments are good for . Is there anything I forgot to do One more question : what s the point of encoding errors replace EDIT I left only a single unicode string and this is the traceback : Comment : this is nice : I got rid of all my templates code leaving a single unicode string value.decode utf-8 and guess what mako still raise the exception.. . Comment : please show the traceback Comment : oh and I forgot to mention that if I run debug the application inside Eclipse+PyDev mako does not report any error and the resulting html is ok . launching from a console or a shortcut results in the unicode error . Comment : Is the actual template file itself saved as UTF-8 I had this problem before and that fixed it . Comment : tomasky : those files does not contains any non-ascii text so I m not sure how save them as unicode . should I write the BOM in them .. . Answer : None of these suggestions including the accepted answer work in all cases specifically where the mako template renders content eg . value n where the value contains non ascii characters . This is because by default mako wraps unicode foo around any values in the generated compiled templates which will still result in : .. . .. . The only sure fire way of making mako handle unicode in python2 is to replace the default unicode handler like this :", "Question : I want to set up a lookup function with mako . on top of the template i have .. . .. . so i can use it later .. . .. . this gives me a function is not a defined error . can i get around this i know why it doesn t work as it runs first before the method gets loaded but how else would i set this up .. . Answer : Maybe you could delay the lookup of function from dict-creation time to invocation time I haven t used Mako but it works in the Python shell : Comment : nope nice try though . i think in mako it searches the function in global but it s not in global . thx", "Question : I m building a pyramid application using mako templates . How can I make a function be accessible in all my mako templates without having to namespace a file in each and every template Not that having to add the namespace tag is bad per se but in this case I m trying to add a filter function for markdown processing . That does not belong in a template file but is more of a library thing and belongs in a .py file . I want to write this in my mako template : .. . .. . To state that page content contains markdown code and should be processed as such . Comment : You can also register global functions helpers that can be used in your templates as exaplined here : docs.pylonsproject.org projects pyramid-cookbook en latest http : docs.pylonsproject.org projects pyramid-cookbook en latest templates templates.html Comment : @webjunkie I like your solution much better than mine . If you write an answer with @subscriber BeforeRender I ll accept that . That s what I m using now . .. . Answer : As requested by @kratenko you can use a BeforeRender subscriber as detailed here http : docs.pylonsproject.org projects pyramid-cookbook en latest templates templates.html using-a-beforerender-event-to-expose-a-mako-base-template .. . .. . You can add the following subscriber in your view .. . .. . And in your mako template call it like so : Comment : I m using a @subsriber BeforeRender now but differently : mine just has one line : event markdown markdown . Now I can use something line div page.text n markdown div to trigger markdown rendering in the template as I did in my own answer http : stackoverflow.com a 32413231 1358283 . Your solution to make the function available is better since that stuff does not belong in the config.ini .", "Question : Whenever I pass a complicated data structure to Mako it s hard to iterate it . For example I pass a dict of dict of list and to access it in Mako I have to do something like : .. . .. . for item in dict1 dict2 list : .. . endfor .. . .. . I am wondering if Mako has some mechanism that could replace usage to access dictionary elements with simple . Then I could write the line above as : .. . .. . for item in dict1.dict2.list : .. . endfor .. . .. . Which is much nicer isn t it Thanks Boda Cydo . .. . Answer : Pass dict1 to to bunch function before passing it to Mako template . Unfortunately Mako doesn t provide any hooks to do this automatically . Comment : Thank you ukasz this was an excellent answer and I understood everything .", "Question : I want to use Mako templates with GAE instead of Django templates . I found this post http : blog.pansapiens.com 2008 06 24 mako-templates-in-google-app-engine-seems-to-work-for-me .. . .. . I downloaded Mako from this page by using easy install http : www.makotemplates.org download.html .. . .. . But that gave me a beaker file .. . .. . c : python26 lib site-packages beaker-1.5.4-py2.6.egg .. . .. . that I don t know what to do with . Can someone help me so that I can get Mako file to put in my GAE directory as instructed in the blog . I saw the reference to Mako GAE here http : stackoverflow.com questions 744828 google-app-engine-dynamically-created-templates .. . .. . Thank you . .. . Answer : I use Mako on App Engine . It works very well for me . All I do is download http : www.makotemplates.org downloads Mako-0.3.4.tar.gz mako directly then place the mako module directory in my app root . Comment : Thanks I have the folder Mako-0.3.4 . Is that the mako module And what is the correct from-import language that I need to use in the script . Thanks again . Comment : You want the mako folder that is inside the Mako-0.3.4 folder . Then you can use the command from the guide you found from mako.template import Template and so on . Comment : That gives an error : File C : Users A Desktop hw2 mako filters.py line 11 in module import markupsafe ImportError : No module named markupsafe Comment : Sorry forgot about that . Edit filters.py change line 11 import markupsafe to import cgi then change line 25 return markupsafe.escape string to return cgi.escape string . Comment : Or download also MarkupSafe http : pypi.python.org pypi MarkupSafe . You then don t need to alter Mako source code .", "Question : In Perl by using Template Toolkit here is what I do .. . .. . Perl .. . .. . HTML .. . .. . In Mako http : www.makotemplates.org docs usage.html usage file template how can I do so Check through their render function doesn t get much hint . .. . Answer : Use named arguments .. . .. . In the mako side you d do Comment : yourTemplateInstance.render xyz value of xyz Check out diveintopython.org power of introspection http : diveintopython.org power of introspection optional arguments.html", "Question : I would like to use flask-assets to organize my webassets and mako for templating . Flask-assets normally uses jinja in the following way : .. . .. . The Mako equivalent as far as I know would be the following : .. . .. . However this causes a compile error : .. . .. . Is there any way to use custom control keywords like assets in Mako Here is my app.py for the record : .. . Answer : Well I came up with a solution . You can make it work by importing the environment into your base template and acting on that . assets.py : .. . .. . Template : .. . .. . There might be way to avoid the import by using the MAKO IMPORTS config parameter but I haven t played with it .", "Question : null .. . Answer : Hi all . I am a newer to tornado and mako . This code I have changed tornado default template to mako I know in tornado I can use static url in html this way : link rel stylesheet href static url css reset.css but how can I use it in mako html I have tried some different ways but it doesn t work . Anyone can help thanks .", "Question : Our Django site is built using Mako templates . We want to use a third party project called django-socialregistration http : github.com flashingpumpkin django-socialregistration but its template tags use Django s templates . If we used Django templates we could just .. . .. . How can I do the same thing in Mako You can inline strait up python in Mako but I haven t figured out how to do it that way either . Final Fix .. . Answer : I ve hardly used Mako but if you can include arbitrary Python code you could always inline the template rendering function there . Comment : Hi I posted a very similar question here : stackoverflow.com questions 4799715 http : stackoverflow.com questions 4799715 jinja2-templates-using-django-template-tags - thought I d check to see if you have any advice .", "Question : I have this delete view in Pyramid and I m using mako templates and knockout js . This is my route to delete view in pyramid . I want to bind some buttons in the template to this url so that it invokes the delete view . I ve tried doing it as : .. . .. . However this returns the following traceback : .. . .. . 1 . What is the correct way of doing this 2 . The delete view has location set to the current page . So is there a way to do this without refreshing the current page .. . Answer : request.route url delete id detail id is python mako code not javascript code . If your ID were 99 it should ultimately render to html as delete 99 . You are getting the TypeError in python because there is no object variable in the template namespace called detail . Perhaps this is because you have called it record or something when you passed the arguments into mako You haven t included enough information for me to tell.. . If you passed into mako detail id : 99 then request.route url delete id detail id would work . If detail were an object then detail.id would be more appropriate . Further to this though you may be better off defining a javascript object in mako like this presuming I ve passed an object into mako as the variable mako object .. . .. . and thus the html would look like" ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
cvc4@modulo@86
cvc4 -- cvc4 is an efficient open-source automatic theorem prover for satisfiability @placeholder theories smt problems .
{ "confidence": [ 51.7958984375, 50.297733306884766, 49.58775329589844, 48.138004302978516, 47.33832931518555, 46.794185638427734, 46.07908630371094, 45.61252212524414, 45.13804244995117, 44.63229751586914, 42.80390930175781, 42.80390930175781, 42.80390930175781, 41.59095001220703, 41.59095001220703, 41.357200622558594, 41.11164093017578, 41.11164093017578, 39.81563949584961, 39.28325271606445, 39.28325271606445, 39.28325271606445, 39.28325271606445, 39.1026611328125, 38.505348205566406, 37.51405334472656, 37.420955657958984, 36.36933517456055, 34.54094696044922, 34.54094696044922, 34.54094696044922, 34.54094696044922, 34.54094696044922, 34.54094696044922, 34.54094696044922, 34.54094696044922, 33.32798767089844, 32.97006607055664, 32.95781707763672, 31.903926849365234, 31.874217987060547, 31.874217987060547, 31.744855880737305, 31.638553619384766, 30.42559242248535, 30.21615982055664, 29.22231674194336, 28.645538330078125, 28.481525421142578, 28.387771606445312, 28.319841384887695, 25.43653106689453, 25.195911407470703, 24.858402252197266, 24.83392333984375, 24.83392333984375, 24.83392333984375, 24.83392333984375, 23.367523193359375, 23.367523193359375, 23.367523193359375, 23.367523193359375, 23.367523193359375, 23.367523193359375, 23.367523193359375, 23.220680236816406, 23.053564071655273, 22.828237533569336, 22.15456199645996, 21.65636444091797, 21.392292022705078, 21.392292022705078, 21.392292022705078, 21.392292022705078, 20.4451847076416, 20.183406829833984, 19.689502716064453, 19.689502716064453, 18.671600341796875, 18.671600341796875, 17.124032974243164, 17.02631950378418, 16.568037033081055, 16.568037033081055, 15.839184761047363, 15.157563209533691, 14.940591812133789, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785, 13.834710121154785 ], "content": [ "In CVC4 you can avoid this by using the following commands : .. . .. . set-logic QF UF .. . set-info : cvc4-logic QF SAT .. . .. . instead of .. . .. . set-logic QF UF .. . .. . Note that this is a CVC4 extension not part of the SMT-LIB standard .", "In this post we try to prove such theorem using both Z3 and CVC4 using the following SMT-LIB code : .. . .. . When this code is executed using Z3 or CVC4 the correct results are obtained .", "But CVC4 does not if the above formula is valid or not because SMT solvers are not full-fledged first-order logic theorem provers .", "See the following for examples : rise4fun http : rise4fun.com z3 tutorial cvc4 s input examples https : github.com CVC4 CVC4 tree master test regress regress0 datatypes and cvc4 s api example https : github.com CVC4 CVC4 blob master examples api datatypes.cpp .", "This is probably a CVC4 specific option .", "It will look something like this assuming you ve done using namespace CVC4 and included cvc4 cvc4.h : .. . .. . Then you can assert and query applications of your predicate :", "You can download the latest development version of CVC4 at http : cvc4.cs.nyu.edu downloads on the right of the page .", "I m converting my problem to SMT and I have noticed that the SMT solvers MathSat5 and CVC4 are slow when solving sat instances .", "In Cvc4 the code is executed without problems and the correct answer is obtained .", "Is there any function available in z3 cvc4 for calculating it", "Unfortunately CVC4 does not yet support optimization .", "So as far as Z3 or CVC4 are concerned this problem is SAT .", "In smt2 cvc4 follows z3 s extension for this .", "While cvc4 isn t in the FreeBSD ports tree cvc3 is .", "I would suggest you try that with cvc4 as well .", "3.9.3 of The SMT-LIBv2 Language and Tools : A Tutorial http : www.grammatech.com resources smt SMTLIBTutorial.pdf it is possible to declare a composite sort like this in SMT-LIBv2 : .. . .. . I am using CVC4 and it seems to accept this syntax .", "cvc4 says it spent 5.862 seconds in : theory uf symmetry breaker .. . .. . Thanks", "Thanks Clark with that mod the cvc4 solver finishes in 1.25 seconds .", "I have tried several SMT solvers CVC3 CVC4 and Z3 on the following seemingly trivial benchmark : .. . .. . The solvers all return unknown .", "Both Z3 and CVC4 do indeed return SAT for the example in the question .", "In the case of CVC4 a message unknown is produced while Z3 produces sat .", "Also : CVC4 -h says absolutely nothing about the --dump-models option .", "I ve tested with both Z3 version 4.4.2 and CVC4 version 1.4 .", "When inputting the following file to cvc4 I get the following error : .. . .. . The file test.txt was : .. . .. . The command-line :", "I have found the following information in paper by Andrew Reynolds and co -authors Model Finding for Recursive Functions in SMT .. . .. . If CVC4 s finite model finding mode for recursive functions is enabled using the command-line option --fmf-fun .. . .. . But I have install current version of CVC4 --fmf-fun is not available in CVC4 Can you please guide me in this .", "The following SMT-LIB code runs without problems in Z3 MathSat and CVC4 but it is not running in Alt-Ergo please let me know what happens many thanks :", "The latest version of CVC4 can be downloaded under Development versions on the right hand side of : http : cvc4.cs.nyu.edu downloads .. . .. . The latest development version has support for recursive function definitions .", "For this example : http : pastebin.com QyebfD1p z3 and cvc4 return unknown as result-of check-sat .", "Does CVC4 an option to maximize or minimize the result model for bitvectors as Z3 does http : rise4fun.com Z3Opt tutorial guide", "CVC4 change s its return-value to an error state if get-value is called illegally .", "For CVC4 being run from the command-line add the flag .. . .. . This is not as specific as get-value .", "This option is non-standard and CVC4 currently does not support setting this flag from the SMT2 parser .", "Nevermind CVC4 -h does contain a message about --dump-models I just missed it initially .", "This is an example in native CVC language : .. . .. . How would I write it using the C++ API for CVC4", "Sorry should have made it clear : How do I write it using the C++ API for CVC4", "Although unfortunately your example with factorial also requires non-linear arithmetic which CVC4 does not yet support .", "You may also email cvc-bugs@cs.nyu.edu and I or another CVC4 developer can ask more in-depth questions .", "The following SMT-LIB code runs without problems in Z3 MathSat and CVC4 but it is not running in Alt-Ergo please let me know what happens many thanks : .. . .. . Run this example online here http : rise4fun.com Z3 OqSE .. . .. . 1 .", "In particular examples api combination.cpp creates some functions and predicates and makes some assertions : .. . .. . https : github.com CVC4 CVC4 blob master examples api combination.cpp .. . .. . In your case you ll create a predicate type with ExprManager : : mkFunctionType then you construct an isblue predicate with ExprManager : : mkVar giving it that type .", "You can use the cvc4 command-line option --fmf-fun to enable a technique that finds small models for problems involving recursive function applications assuming definitions are admissible .", "I am trying to figure out how to code quantifiers in CVC4 using the C++ interface .", "If you want to try something that works try in CVC4 language : .. . .. . And in C++ we have", "Anyway manually adding usr local lib did not work so here are my configure https : github.com athanclark freebsd-cvc4 blob master configure and config.log https : github.com athanclark freebsd-cvc4 blob master config.log files .", "http : stackoverflow.com questions 36431075 how-to-deal-with-recursive-function-in-z3 .. . .. . CVC4 has support : http : lara.epfl.ch reynolds pres-smt15.pdf", "The configure file is almost a megabyte so I really suggest you just clone the repo at https : github.com athanclark freebsd-cvc4 .", "I m attaching a sample cnf instance and the smt2 translation for reference and below I m providing solver times excluding the translation time for a larger instance to compare MathSat5 CVC4 and MiniSat .", "Is there a way to attack these problems and what are the limits of reasoning in quantified arithmetic in SMT", "In a previous post http : stackoverflow.com questions 20135410 how-to-use-z3-smt-lib-to-prove-theorems-for-the-group-d3 one theorem for the dihedral group D3 using Z3 SMT-LIB was proved .", "You would have to write your own theorem prover or use an existing one that s available from C++ I guess .", "I m not sure that CVC3 and CVC4 support quantifier elimination for LIA but in Z3 you can do .. . .. . From Rise4Fun execution http : rise4fun.com Z3 t5c I ve got unsat result .", "I am trying to compile CVC4 http : cvc4.cs.nyu.edu downloads from source on FreeBSD but I m running into a hiccup at configuration time - GMP cannot be found even though the shared object is clearly in a common path : .. . .. . ...and here is the output of . configure : .. . .. . After that I did a bit of googling and found an article describing an ABI error that I thought could be related http : www.mpfr.org faq.html no libgmp .", "In SMT-LIB 2.0 and 2.5 all functions are total so this example is SAT in SMT-LIB .", "SMT solvers have extra overhead because of theory solvers .", "Specifically given : .. . .. . Z3 outputs : .. . .. . And CVC4 outputs : .. . .. . My best guess is that there is some sort of flag I need to set or I need to be using some specific logic but I ve had a lot of trouble finding any sort of detailed instructions or examples with define-fun-rec .", "In SMT-LIB : .. . .. . Should this model be SAT or UNSAT", "How to execute the SMT-LIB code using Mathsat .", "It is not exactly clear what should be added to SMT though .", "SMT-LIB does not have rational types .", "Yes that s how SMT defines those operators functions .", "For consistency with the rest of SMT I guess this sqrt example should also be SAT .", "Regarding question 1 the option : incremental is not part of the SMT-LIB 2.0 standard .", "This issue comes up often in interacting with SMT-solvers from other languages .", "In fact does the SMT-LIB standard have a rational not just real sort", "On a related note is there an SMT solver that supports rationals at the input level", "I m currently trying to write an SMT script using define-fun-rec .", "Your script uses the tactic .. . .. . This tactic applies the Z3 simplifier and then executes a general purpose SMT solver available in Z3 .", "Regarding Alt-Ergo and SMT-LIB2 please consider reading the answer to one of your previous posts here : How to execute the following SMT-LIB code using Alt-Ergo http : stackoverflow.com questions 16874099 how-to-execute-the-following-smt-lib-code-using-alt-ergo", "In Mathematica the equivalent code returns an empty list indicating that no solution exists i.e . FindInstance Element x Reals Element y Reals x 0 y 1 x x y returns .. . .. . Nonetheless is defined this way in SMT-LIB http : smtlib.cs.uiowa.edu theories-Reals.shtml .", "For now Alt-Ergo does not provide a full support for the SMT-2 format .", "@Tim - Is it available in ALIVe Automatic LLVM InstCombine Verifier tool as well", "Here the qe tactic is a preprocessing step before applying end-game tactic smt .", "Regarding question 2 the SMT-LIB 2.0 standard says there are 3 possible outputs for the check-sat : unsat sat and unknown .", "I don t think there s a good way if what you want is to have one SMT file to rule the whole transaction .", "This includes the complete SMT-LIB benchmark that contains not a single sort declaration with arity 0 .", "Please feel free to ask questions and report problems .", "Illegally calling get-value is an issue for me as I am running different smt solvers in a flow and checking the program s return-value and then parsing their output .", "Unfortunately it seems your problems get stuck in the subresultant step .", "However some of these steps may make some problems harder to solve .", "It is only effective on satisfiable problems that have solutions of the form a + b sqrt 2 where a and b are rational-numbers .", "END EDIT .. . .. . EDIT 2 Your problems are on the fringe of what Z3 can do in a reasonable amount of time .", "Problem 2 will be soon fixed after we replace the old algebraic number package with the new one http : research.microsoft.com en-us um people leonardo blog 2013 02 02 inf-trans.html that is much more efficient .", "There are some API examples in the source distribution that might help you .", "I needed to add the option --lang smt2.5 for the format to support double quote escaping using the new standard .", "So :", "If anyone can post an example for a use-case of a user-defined sort with arity 0 I ll happily accept that as answer . .. . .. . After reading the SMT-LIBv2 standard more carefully I am now thinking that sort declarations with arity 0 only have an application in theory definitions for declaring sorts like Array not in user-supplied code .", "The solution I adopted is that I keep an open pipe with the solver and feed it the lines of the script read the responses and decide on what to send next based on the responses I get .", "I then compiled GMP from source but still with no luck being found from the configure script .", "The option --fmf-fun is not available in the latest stable release 1.4 however it is available in the latest development release .", "Both are not very verbose about the cause is there a way to make z3 more verbose about its execution", "This solver is not complete for nonlinear arithmetic .", "It is based on a combination of : Simplex Interval Arithmetic and Grobner Basis .", "One of the big limitations of this module is that it can t find models solutions containing irrational numbers .", "In the future we will replace this module with new nonlinear solvers available in Z3 .", "For nonlinear arithmetic we usually suggest the nlsat solver available in Z3 .", "This is a complete procedure and is usually very effective for unsatisfiable and satisfiable instances .", "You can find more about nlsat in this article http : research.microsoft.com en-us um people leonardo files IJCAR2012.pdf .", "To use nlsat we have to use .. . .. . Unfortunately nlsat will get stuck in your example .", "It will get stuck computing Subresultants http : mathworld.wolfram.com Subresultant.html of very big polynomials produced during solving. . .. . .. . Z3 has yet another engine for handling nonlinear arithmetic .", "This engine reduces the problem to SAT .", "Using this engine we can solve your problem in a very short amount of time ." ] }
{ "confidence": [ 77.24510192871094, 74.74503326416016, 71.62113189697266, 71.40188598632812, 68.60821533203125, 68.15906524658203, 66.39457702636719, 65.36669158935547, 62.896568298339844, 62.2099723815918, 60.78201675415039, 56.95956039428711, 52.9548454284668, 51.31195831298828, 50.973941802978516, 49.578338623046875, 49.53315734863281, 48.34603500366211, 47.31077575683594, 44.58634567260742 ], "content": [ "Question : In a previous post http : stackoverflow.com questions 20135410 how-to-use-z3-smt-lib-to-prove-theorems-for-the-group-d3 one theorem for the dihedral group D3 using Z3 SMT-LIB was proved . In this post we try to prove such theorem using both Z3 and CVC4 using the following SMT-LIB code : .. . .. . When this code is executed using Z3 or CVC4 the correct results are obtained . Run this code with Z3 online here http : rise4fun.com Z3 aIJ5 .. . .. . The questions are : .. . .. . 1 . In the case of Z3 a message unsupported : incremental is produced . This message seems does not to alter the results why 2 . In the case of CVC4 a message unknown is produced while Z3 produces sat . Again this message seems does not to alter the results why 3 . How to execute the SMT-LIB code using Mathsat . .. . Answer : Mathsat seems produce the correct results but it generates the message : .. . .. . enter image description here http : i.stack.imgur.com SewBh.jpg", "Question : This is an example in native CVC language : .. . .. . How would I write it using the C++ API for CVC4 Couldn t find any documentation on how to do this . Comment : You would have to write your own theorem prover or use an existing one that s available from C++ I guess . C++ is not a first-order logic language . Comment : Sorry should have made it clear : How do I write it using the C++ API for CVC4 .. . Answer : There are some API examples in the source distribution that might help you . In particular examples api combination.cpp creates some functions and predicates and makes some assertions : .. . .. . https : github.com CVC4 CVC4 blob master examples api combination.cpp .. . .. . In your case you ll create a predicate type with ExprManager : : mkFunctionType then you construct an isblue predicate with ExprManager : : mkVar giving it that type . It will look something like this assuming you ve done using namespace CVC4 and included cvc4 cvc4.h : .. . .. . Then you can assert and query applications of your predicate :", "Question : In a previous post http : stackoverflow.com questions 20135410 how-to-use-z3-smt-lib-to-prove-theorems-for-the-group-d3 one theorem for the dihedral group D3 using Z3 SMT-LIB was proved . In this post we try to prove such theorem using both Z3 and CVC4 using the following SMT-LIB code : .. . .. . When this code is executed using Z3 or CVC4 the correct results are obtained . Run this code with Z3 online here http : rise4fun.com Z3 aIJ5 .. . .. . The questions are : .. . .. . 1 . In the case of Z3 a message unsupported : incremental is produced . This message seems does not to alter the results why 2 . In the case of CVC4 a message unknown is produced while Z3 produces sat . Again this message seems does not to alter the results why 3 . How to execute the SMT-LIB code using Mathsat . .. . Answer : Regarding question 1 the option : incremental is not part of the SMT-LIB 2.0 standard . The standard defines suggests a small set of options that should be supported by all solvers and : incremental is not one of them . This is probably a CVC4 specific option . Z3 just ignores this command . Moreover Z3 does not need the user to enable incremental solving . Regarding question 2 the SMT-LIB 2.0 standard says there are 3 possible outputs for the check-sat : unsat sat and unknown . The unknown result is used when a solver did not manage to establish whether the set of assertions is satisfiable or not . Some solvers produce a candidate model even when they produce unknown . As far as I know MathSAT 5 does not support quantifiers yet . However this should change in the future . Comment : Many thanks your answers are very useful . In the case of Mathsat please look below . Comment : Note that line 13 is the one that contains the forall and as far as I know MathSAT does not support quantifiers . Comment : You are right in Mathsat it is necessary to replace the forall by the corresponding collection of asserts . Many thanks .", "Question : I m converting my problem to SMT and I have noticed that the SMT solvers MathSat5 and CVC4 are slow when solving sat instances . My suspension is that there is something in my translation that is making it go slow . I m attaching a sample cnf instance and the smt2 translation for reference and below I m providing solver times excluding the translation time for a larger instance to compare MathSat5 CVC4 and MiniSat . So does anyone have an idea why these times are drastically different PS . cvc4 says it spent 5.862 seconds in : theory uf symmetry breaker .. . .. . Thanks .. . Answer : SMT solvers have extra overhead because of theory solvers . In CVC4 you can avoid this by using the following commands : .. . .. . set-logic QF UF .. . set-info : cvc4-logic QF SAT .. . .. . instead of .. . .. . set-logic QF UF .. . .. . Note that this is a CVC4 extension not part of the SMT-LIB standard . But if you are truly using only Boolean reasoning this should give you competitive performance . Comment : Thanks Clark with that mod the cvc4 solver finishes in 1.25 seconds .", "Question : In SMT-LIB : .. . .. . Should this model be SAT or UNSAT .. . Answer : In SMT-LIB 2.0 and 2.5 all functions are total so this example is SAT in SMT-LIB . Both Z3 and CVC4 do indeed return SAT for the example in the question . I found this counter-intuitive . I think it would be mathematically more well justified to say that y 1 x x 0 is unsatisfiable in the reals . In Mathematica the equivalent code returns an empty list indicating that no solution exists i.e . FindInstance Element x Reals Element y Reals x 0 y 1 x x y returns .. . .. . Nonetheless is defined this way in SMT-LIB http : smtlib.cs.uiowa.edu theories-Reals.shtml . So as far as Z3 or CVC4 are concerned this problem is SAT . Comment : Yes that s how SMT defines those operators functions . A recurring theme that always has exactly 50 supporters and 50 opponents : Comment : Thanks a lot Christoph . I ran into this trying to figure out whether or not and y x 0.5 x 0.0 should be SAT or UNSAT . For consistency with the rest of SMT I guess this sqrt example should also be SAT . Now I just need to figure out how to get Z3 to actually give SAT for this sqrt example .", "Question : I have found the following information in paper by Andrew Reynolds and co -authors Model Finding for Recursive Functions in SMT .. . .. . If CVC4 s finite model finding mode for recursive functions is enabled using the command-line option --fmf-fun .. . .. . But I have install current version of CVC4 --fmf-fun is not available in CVC4 Can you please guide me in this . .. . Answer : The option --fmf-fun is not available in the latest stable release 1.4 however it is available in the latest development release . You can download the latest development version of CVC4 at http : cvc4.cs.nyu.edu downloads on the right of the page .", "Question : null .. . Answer : I am trying to figure out how to code quantifiers in CVC4 using the C++ interface . Here is an example I am trying to get to run but cannot . Instead I just get an error message : .. . .. . But I define the quantifier as forall . What did I do wrong EDIT asked https : www.andrew.cmu.edu user liminjia : .. . .. . Syntax is wrong . We want to know if .. . .. . is true or not . But CVC4 does not if the above formula is valid or not because SMT solvers are not full-fledged first-order logic theorem provers . If you want to try something that works try in CVC4 language : .. . .. . And in C++ we have Comment : I don t see anything in the posted code that corresponds to the error message .", "Question : According to sec . 3.9.3 of The SMT-LIBv2 Language and Tools : A Tutorial http : www.grammatech.com resources smt SMTLIBTutorial.pdf it is possible to declare a composite sort like this in SMT-LIBv2 : .. . .. . I am using CVC4 and it seems to accept this syntax . But how do I access the elements I tried the following and various variations of that and other things I found online : .. . .. . But it looks like those operators only work on vectors and arrays . I can t find any example that uses such composite sorts and can t find anything about accessing those elements in the tutorial or the language standard . How is it done Or did I completely misunderstand what this feature is for My application : I want to encode a temporal problem and want to do it in form of a state transition function that converts the old state into a new state so I can write something like the following when experimenting with the system : .. . Answer : This is an answer to my own question . If anyone can post an example for a use-case of a user-defined sort with arity 0 I ll happily accept that as answer . .. . .. . After reading the SMT-LIBv2 standard more carefully I am now thinking that sort declarations with arity 0 only have an application in theory definitions for declaring sorts like Array not in user-supplied code . The example in David Cok s Tutorial seems to be misleading as it suggests that this can be used to declare composite sorts . I have not found any indication of that anywhere else . This includes the complete SMT-LIB benchmark that contains not a single sort declaration with arity 0 . Instead of composite sorts one should use uninterpreted functions to create the equivalent of complex data-structures . Example : .. . .. . This will effectively declare the following 4 independent Bool expressions . Comment : This is mostly right . The declare-sort command makes new sort functions . These can be applied to generate new sorts . However if the sort does not have an associated theory it is uninterpreted . So Array CONTAINER SORT CONTAINER SORT is an application of the Array function to a user made constant sort symbol CONTAINER SORT . As Array has a theory all makes sense . The Triple you declared above does not so an application generates a new sort symbol with an uninterpreted domain . Comment : As for encoding simple datatypes I would recommend looking into the theory of inductive datatypes http : www.cs.nyu.edu barrett pubs BST07-JSAT.pdf . In smt2 cvc4 follows z3 s extension for this . cvc3 4 supports this theory in CVC language as well as the apis . Also yices s syntax supports non-recursive datatypes . See the following for examples : rise4fun http : rise4fun.com z3 tutorial cvc4 s input examples https : github.com CVC4 CVC4 tree master test regress regress0 datatypes and cvc4 s api example https : github.com CVC4 CVC4 blob master examples api datatypes.cpp .", "Question : The following SMT-LIB code runs without problems in Z3 MathSat and CVC4 but it is not running in Alt-Ergo please let me know what happens many thanks : .. . .. . Run this example online here http : rise4fun.com Z3 OqSE .. . .. . 1 . In Z3 the message unsupported : incremental is generated but this does not alter the computations and the correct answer is obtained . 2 . In mathsat some messages unsupported are generated but the correct answer is displayed . 3 . In Cvc4 the code is executed without problems and the correct answer is obtained . 4 . In Alt-Ergo the code is executed without messages but wrong answer unsat is generated the correct answer is : unsat sat . .. . Answer : Regarding Alt-Ergo and SMT-LIB2 please consider reading the answer to one of your previous posts here : How to execute the following SMT-LIB code using Alt-Ergo http : stackoverflow.com questions 16874099 how-to-execute-the-following-smt-lib-code-using-alt-ergo Comment : Thank you now I understand why alt-ergo fails in this example .", "Question : I m currently trying to write an SMT script using define-fun-rec . I ve tested with both Z3 version 4.4.2 and CVC4 version 1.4 . As far as I can tell these are the most recent versions of both and both support the feature . However both do not seem to recognize the command . I made some changes to this based on Nikolaj s reply . It still gives the error messages . Specifically given : .. . .. . Z3 outputs : .. . .. . And CVC4 outputs : .. . .. . My best guess is that there is some sort of flag I need to set or I need to be using some specific logic but I ve had a lot of trouble finding any sort of detailed instructions or examples with define-fun-rec . Any advice would be appreciated . Thanks Z3 has support : How to deal with recursive function in Z3 http : stackoverflow.com questions 36431075 how-to-deal-with-recursive-function-in-z3 .. . .. . CVC4 has support : http : lara.epfl.ch reynolds pres-smt15.pdf .. . Answer : The latest version of CVC4 can be downloaded under Development versions on the right hand side of : http : cvc4.cs.nyu.edu downloads .. . .. . The latest development version has support for recursive function definitions . You can use the cvc4 command-line option --fmf-fun to enable a technique that finds small models for problems involving recursive function applications assuming definitions are admissible . Although unfortunately your example with factorial also requires non-linear arithmetic which CVC4 does not yet support .", "Question : I have tried several SMT solvers CVC3 CVC4 and Z3 on the following seemingly trivial benchmark : .. . .. . The solvers all return unknown . I understand that this is an undecidable fragment well non-linear but I was expecting there would be some simple instantiation heuristics that could solve it . I also tried adding some extra assertions with constants but it didn t help . Is there a way to attack these problems and what are the limits of reasoning in quantified arithmetic in SMT .. . Answer : Your example falls into Linear Integer Arithmetic LIA category . LIA i.e . Presburger Arithmetic http : en.wikipedia.org wiki Presburger arithmetic admits quantifier elimination qe though time-complexity of qe procedures is prohibitively high . I m not sure that CVC3 and CVC4 support quantifier elimination for LIA but in Z3 you can do .. . .. . From Rise4Fun execution http : rise4fun.com Z3 t5c I ve got unsat result . Here the qe tactic is a preprocessing step before applying end-game tactic smt .", "Question : The SMT2 standard states that calling get-value is only legal after a call to check-sat and only when check-sat returns sat or unknown . Here is a simple example of an unsat problem : .. . .. . Since the problem is unsat the get-value commands are illegal . Take out any one assert and it becomes sat and the get-value commands become legal . So my question is how do you write a SMT2 script that checks the return-value of check-sat and only calls get-value if it returned sat Illegally calling get-value is an issue for me as I am running different smt solvers in a flow and checking the program s return-value and then parsing their output . CVC4 change s its return-value to an error state if get-value is called illegally . .. . Answer : For CVC4 being run from the command-line add the flag .. . .. . This is not as specific as get-value . This option is non-standard and CVC4 currently does not support setting this flag from the SMT2 parser . Let us know if you would like this to be supported . Comment : Thanks Tim . This solves my issue although the initial question still stands . I suppose each solver will have it s own solution . One thing to note is that --dump-models requires that the produce-models option also be set from command-line not from the parser i.e . -m --dump-models is required . Is this a bug Regardless it s a non-issue for me but took me a bit to figure out why --dump-models wasn t working at first . Also : CVC4 -h says absolutely nothing about the --dump-models option . Maybe consider adding it in Comment : Nevermind CVC4 -h does contain a message about --dump-models I just missed it initially . Comment : Yep each solver will have its own solution . You can always implement Levent s suggestion for textual interaction . This is the intended use model for now .", "Question : I am trying to compile CVC4 http : cvc4.cs.nyu.edu downloads from source on FreeBSD but I m running into a hiccup at configuration time - GMP cannot be found even though the shared object is clearly in a common path : .. . .. . ...and here is the output of . configure : .. . .. . After that I did a bit of googling and found an article describing an ABI error that I thought could be related http : www.mpfr.org faq.html no libgmp . I then compiled GMP from source but still with no luck being found from the configure script . What might be causing this error Any creative ideas or help would be much appreciated . Thank you Comment : PATH is irrelevant . How about looking at config.log to see how exactly that test failed Also is your freebsd configured to look for libraries in usr local lib at runtime Was GMP installed by yourself or by freebsd s package manager Comment : Try . configure LDFLAGS -L usr local lib otherargs . If that works then Marc is likely right and either usr local lib or libgmp.a is not being properly found by ld . If that wasn t it you should probably give your full . configure command and builds config.log file . The config.log file may also be in a directory like builds x86 64-unknown-linux-gnu debug config.log i.e . architecture and configuration name . You may also email cvc-bugs@cs.nyu.edu and I or another CVC4 developer can ask more in-depth questions . Comment : You guys are my heroes . Anyway manually adding usr local lib did not work so here are my configure https : github.com athanclark freebsd-cvc4 blob master configure and config.log https : github.com athanclark freebsd-cvc4 blob master config.log files . Thank you so much you guys are life savers . The configure file is almost a megabyte so I really suggest you just clone the repo at https : github.com athanclark freebsd-cvc4 . Thank you Comment : configure : 16729 : checking for gmpz init in -lgmp .. . yes that s not the same error.. . Now you are missing gmpxx which you can likely get somehow through freebsd or by compiling GMP yourself with --enable-cxx passed to configure . .. . Answer : While cvc4 isn t in the FreeBSD ports tree cvc3 is . Looking at that port s Makefile http : svnweb.freebsd.org ports head math cvc3 Makefile revision 362025 view markup you need to call configure with some arguments . I would suggest you try that with cvc4 as well .", "Question : Does CVC4 an option to maximize or minimize the result model for bitvectors as Z3 does http : rise4fun.com Z3Opt tutorial guide Thanks . .. . Answer : Unfortunately CVC4 does not yet support optimization . For bitvectors you can always do it yourself using multiple queries and binary-search but it s not built-in .", "Question : I want to prove a simplification which involves calculating log to the base 2 . Is there any function available in z3 cvc4 for calculating it Comment : In which theory do you want a log base 2 calculation : Bitvectors integers or reals Comment : @Tim - Bitvectors and integer . Comment : @Tim - Is it available in ALIVe Automatic LLVM InstCombine Verifier tool as well .. . Answer : Alive does have a log2 foo function btw . It uses a linear encoding similar to the one given by Tim . Comment : Thanks for the clarification .", "Question : The following SMT-LIB code runs without problems in Z3 MathSat and CVC4 but it is not running in Alt-Ergo please let me know what happens many thanks : Comment : I ve tried the Windows version of Alt-Ergo . It complains about get-model . Once I removed theses lines I got unknown unsat results which should be sat . I also tried adding the -sat commandline parameter but this did not change anything . Strange Comment : Many thanks for your answer . You are right when the lines get-model are removed the code runs in Alt-Ergo but the generated output is wrong : unsat unsat unsat unsat . .. . Answer : For now Alt-Ergo does not provide a full support for the SMT-2 format . In particular the command get-model is not recognized . Moreover the commands push and pop are ignored . This is why Alt-Ergo says sat unsat .. . unsat on the given code when get-model is removed .", "Question : When inputting the following file to cvc4 I get the following error : .. . .. . The file test.txt was : .. . .. . The command-line : .. . Answer : I needed to add the option --lang smt2.5 for the format to support double quote escaping using the new standard . So :", "Question : I m currently trying to write an SMT script using define-fun-rec . I ve tested with both Z3 version 4.4.2 and CVC4 version 1.4 . As far as I can tell these are the most recent versions of both and both support the feature . However both do not seem to recognize the command . I made some changes to this based on Nikolaj s reply . It still gives the error messages . Specifically given : .. . .. . Z3 outputs : .. . .. . And CVC4 outputs : .. . .. . My best guess is that there is some sort of flag I need to set or I need to be using some specific logic but I ve had a lot of trouble finding any sort of detailed instructions or examples with define-fun-rec . Any advice would be appreciated . Thanks Z3 has support : How to deal with recursive function in Z3 http : stackoverflow.com questions 36431075 how-to-deal-with-recursive-function-in-z3 .. . .. . CVC4 has support : http : lara.epfl.ch reynolds pres-smt15.pdf .. . Answer : 1 . Don t set the logic to LIA . This is not in the LIA fragment and Z3 will use the wrong tactic to solve the problem.Just remove the set-logic line . 2 . It helps to not use an undefined function f inside the definition of fib . 3 . I would suggest that you call the function fac and not fib since you are defining a factorial function . Thus .. . .. . z3 -version .. . .. . Z3 version 4.4.2 .. . .. . z3 fac.smt2 .. . .. . sat .. . .. . If you change 24 to 25 you get unsat . Comment : I feel silly about 1 and 2 - I originally called the function f then figured I d make the name more descriptive for others benefit on here- obviously I had fibonacci rather than factorial on the mind for some reason so two misfires there.. . Unfortunately even after making the f consistent again and removing the set-logic line I m still getting the exact same errors . I also tried copy and pasting the formula you posted and it gives me the same errors as well . z3 -version does output Z3 version 4.4.2 for me . Comment : It turns out that apparently there are some versions of z3 that report there version number as 4.4.2 but do not support this.. . I just pulled from github and tried building again and it worked . Thanks for your pointers on the other topics Nikolaj Comment : 4.4.2 is not officially released yet the latest official release is 4.4.1 : github.com Z3Prover z3 releases https : github.com Z3Prover z3 releases all the development versions that are currently being worked on report their version as 4.4.2 . Ideally we should always report the current githash when referring to these but we don t always remember . Also the output of -version didn t report them but I ve added that now .", "Question : The SMT2 standard states that calling get-value is only legal after a call to check-sat and only when check-sat returns sat or unknown . Here is a simple example of an unsat problem : .. . .. . Since the problem is unsat the get-value commands are illegal . Take out any one assert and it becomes sat and the get-value commands become legal . So my question is how do you write a SMT2 script that checks the return-value of check-sat and only calls get-value if it returned sat Illegally calling get-value is an issue for me as I am running different smt solvers in a flow and checking the program s return-value and then parsing their output . CVC4 change s its return-value to an error state if get-value is called illegally . .. . Answer : I don t think there s a good way if what you want is to have one SMT file to rule the whole transaction . This issue comes up often in interacting with SMT-solvers from other languages . The solution I adopted is that I keep an open pipe with the solver and feed it the lines of the script read the responses and decide on what to send next based on the responses I get . Essentially programmed interaction . This is what the Haskell SBV library does for instance . However I do agree that this is a pain and it would be nice if there was an SMT2-lib sanctioned way of handling such common interaction . Comment : This is the intended interaction model for better or worse . It is not exactly clear what should be added to SMT though . Loops are clearly out of the intended scope of the language but what about a check-sat : print-model-if-sat I am sure Clark and Cesare would appreciate suggestions for adding simple usability features if they can fit neatly into the framework .", "Question : I have tried several SMT solvers CVC3 CVC4 and Z3 on the following seemingly trivial benchmark : .. . .. . The solvers all return unknown . I understand that this is an undecidable fragment well non-linear but I was expecting there would be some simple instantiation heuristics that could solve it . I also tried adding some extra assertions with constants but it didn t help . Is there a way to attack these problems and what are the limits of reasoning in quantified arithmetic in SMT .. . Answer : Pad is correct the qe preprocessor can be quite expensive . Moreover it is not effective in formulas coming from software verification tools such as VCC http : vcc.codeplex.com Poirot http : research.microsoft.com en-us projects poirot Dafny http : research.microsoft.com en-us projects dafny VeriFast http : www.cs.kuleuven.be bartj verifast Why3 http : why3.lri.fr and ESCJava2 http : kindsoftware.com products opensource ESCJava2 . It is not effective because the formulas produced by these applications also contain uninterpreted functions arrays etc . As Pad s answer suggests Z3 is a collection of engines . It provides APIs and commands that allow users to select which engine or combination of engines will be used to solve a problem . When the user just says check-sat is tries to guess what is the best engine for solving the input formula . The guess is based on the structure of input formula and annotations provided by the user example : the set-logic command . We are continuously expanding the set of fragments that are automatically detected and the set of engines we provide . That being said it is embarrassing that Z3 missed a fragment such as LIA and did not automatically applied the qe procedure to it . For LIA formulas qe is usually the best option . Alternatives based on E-matching or MBQI are not effective since they are meant for completely different fragments . I just committed code http : z3.codeplex.com SourceControl changeset 97bf9418f721 that detects LIA even when set-logic is not used . The change is already available in the unstable working-in-progress branch . It will be available tomorrow in the nightly builds and in the next official release ." ] }
[ "yes-answer-long", "yes-answer-short" ]
modulo
UNK_RELATION
dsc@powershell@64
dsc -- desired state configuration dsc is a feature in windows @placeholder that enables deployment and management of configuration data for software services and management of the environment in which these services run .
{ "confidence": [ 66.61212158203125, 56.28226089477539, 55.31388473510742, 53.23409652709961, 50.54465103149414, 50.38646697998047, 49.298858642578125, 49.292877197265625, 48.28303146362305, 48.100624084472656, 47.1079216003418, 46.92112731933594, 45.86392593383789, 45.86392593383789, 45.8314094543457, 45.62165069580078, 45.27267837524414, 44.77033615112305, 44.21630096435547, 43.916439056396484, 43.916439056396484, 43.916439056396484, 43.88486099243164, 43.25151443481445, 42.891937255859375, 42.7791748046875, 42.7791748046875, 42.595088958740234, 41.70624542236328, 41.70624542236328, 41.420536041259766, 41.31760787963867, 41.13072967529297, 41.11917495727539, 41.07516098022461, 40.99412155151367, 40.74467468261719, 40.06071090698242, 39.77208709716797, 39.77208709716797, 39.77208709716797, 39.77208709716797, 39.77208709716797, 39.184783935546875, 39.184783935546875, 39.15422058105469, 39.01689529418945, 38.88977813720703, 38.88977813720703, 38.88977813720703, 38.88977813720703, 38.88977813720703, 38.88977813720703, 38.7122802734375, 38.67850112915039, 38.58562469482422, 38.48231506347656, 38.377140045166016, 38.342803955078125, 38.189056396484375, 38.15135955810547, 37.96691131591797, 37.53453826904297, 37.53340530395508, 37.492034912109375, 37.38872528076172, 37.36780548095703, 37.36780548095703, 37.36780548095703, 37.2413330078125, 37.2413330078125, 37.21180725097656, 37.04474639892578, 36.89347839355469, 36.44136047363281, 36.439815521240234, 36.178916931152344, 36.07802963256836, 36.04375457763672, 36.04375457763672, 36.02556228637695, 35.869937896728516, 35.869937896728516, 35.869937896728516, 35.869937896728516, 35.869937896728516, 35.869937896728516, 35.869937896728516, 35.586509704589844, 35.4476318359375, 35.407623291015625, 35.2504768371582, 35.19975280761719, 34.950164794921875, 34.950164794921875, 34.8370475769043, 34.458961486816406, 34.458961486816406, 34.302711486816406, 34.272552490234375 ], "content": [ "@AaronStainback DSC is a configuration-management tool that you re using to deploy software .", "And I have to do all this using Powershell DSC Desired State Configuration .", "Then run Start-DscConfiguration -useExisting for DSC to apply the configuration .", "I have a second DSC configuration that does the work of installing Windows Roles Features software configuration etc .", "My Continuous Delivery with TFS VSTS Server Configuration and Application Deployment with Release Management http : pleasereleaseme.net continuous-delivery-tfs-vsts-server-configuration-application-deployment-release-management blog post has a complete walkthrough of how to use DSC and Release Management in TFS 2015 Update 2 .", "In summary a DSC configuration is applied as under : .. . .. . 1 .", "A DSC configuration should try to describe the state of the local machine .", "Can you post your DSC configuration", "DSC doesn t support phases but you could use partial configuration to solve your scenario if you control delivery of the DSC configuration .", "So it seems the problem is how do you consume resources defined in a DSC resource module file outside of a DSC configuration", "At its basic level a DSC configuration is run on a single machine configuring that machine into a specified state .", "http : blogs.msdn.com b powershell archive 2013 12 26 holiday-gift-desired-state-configuration-dsc-resource-kit-wave-1.aspx", "I m trying to create my first DSC pull configuration .", "DSC validates all resources in a configuration before it applies any changes .", "I am using TFS2015 Release Management and Powershell DSC to manage the deployment of applications - previously I was using RM2013 .", "Upon running the configuration DSC and the resources being called by the configuration will simply make it so ensuring that the system exists in the state laid out by the configuration .", "I would also suggest opening a uservoice issue request @ https : windowsserver.uservoice.com forums 301869-powershell category 148047-desired-state-configuration-dsc for : .. . .. . 1 .", "From there the DSC engine in the virtual-machine takes over and applies the configuration .", "I have a DSC configuration that installs a bunch of prerequisites included PowerShell 5 itself and several DSC packages via Install-Package .", "You don t use the parameters directly in the DSC configuration - rather you use them via the configuration hash table .", "DSC doesn t require all partial configuration fragments to be available at the time of applying the configuration .", "If you were using DSC simply to enforce correct configuration then yes you d just have a single script to enforce that configuration .", "When I try to push my configuration to the target host It complain of missing DSC resource .", "Apart from the TFS Build Service configuration block I can run my DSC configuration successfully against all of my build agents .", "Which version of PowerShell DSC", "I am new to DSC .", "It was fun looking up on DSC .", "I m exploring DSC and wondering what s the best way to copy DSC resources to target host", "I am hearing that Powershell DSC can be used for application deployment .", "Whether Powershell DSC can really be used for application deployment", "You could configure a centralized pull-server for DSC that clients can get configuration and resources from .", "Yes a custom DSC resource is the only way to do this with DSC .", "DSC runs as SYSTEM .", "Use DSC to boostrap the resources themselves", "I need to run a file.bat using DSC resources .", "I am able to run the DSC locally on the VM only not via Powershell DSC extension .", "I just finished the initial tests phase on automating our product release to Azure Virtual Machines using DSC particularly with the commands described in this article http : blogs.msdn.com b powershell archive 2014 08 07 introducing-the-azure-powershell-dsc-desired-state-configuration-extension.aspx which are part of the Azure PowerShell SDK .", "The promise of DSC is to push a config and make it so no matter the current state of the system .", "One of my release steps is a PowerShell on Target Machines task that I m using to apply a DSC configuration .", "My recommendation for flexibility is to declare a configuration hash table in your DSC script and pass parameters in to configure it .", "I m trying to use Azure Automation Pull server to add DSC configuration to a VM .", "As soon as I try to import xSystemSecurity at the top of the Configuration DSC blows up because it s not installed yet .", "More info on partial configuration can be found at https : msdn.microsoft.com en-us powershell dsc partialconfigs .", "DSC requires WinRM even when run in Push mode because no matter what it s remoting into the machine when it executes the configuration .", "Sorry but I just disagree saying I must run one configuration before another in order or else things break defeats the primary purpose of DSC .", "What is the correct way to upgrade a windows service using DSC", "I can push a DSC configuration fine using PowerShell but since this process is automated I wanted to get feedback on how the configuration process progressed .", "I ve written two of my own DSC resources .", "I m trying to install an msi or an exe with PS DSC .", "Is it possible to alter a MOF file in DSC after compiling it", "@MNFour ans that s not the way DSC is intended to work .", "Is that foldername required to get DSC to work i.e .", "I highly recommend the PowerShell.org E-Book on DSC .", "I think this could work : .. . .. . References : .. . .. . DSC Script Resource http : technet.microsoft.com en-us library dn282130.aspx .. . DSC File Resource http : technet.microsoft.com en-us library dn282129.aspx .. . PowerShellMagazine - Tag DSC http : www.powershellmagazine.com tag dsc", "I m trying to create a configuration using PowerShell DSC that would help me create a SharePoint farm using Virtual Machines .", "DSC does indeed run as the local system account thanks briantist .", "msdn.microsoft.com en-us powershell dsc authoringresource https : msdn.microsoft.com en-us powershell dsc authoringresource", "DSC is designed to configure an instance of a resource .", "Like with DSC I can call .. . .. . or .. . .. . Is there any kind of similar api to check if a node is in its desired state", "I get different technologies from Devs and Ops in the organization : .. . .. . Ops Microsoft Deployment Toolkit .. . Dev Desired State Configuration .. . Dev Release Management for TFS .. . .. . Which of these technologies work well together", "Unfortunatelly DSC do not allow to reconfigure LCM via DSC Resource which means i cannot change this setting by Pull Mode on local machine .", "Having read the DSC documentation https : msdn.microsoft.com en-us powershell dsc overview I thought that is might be possible using composite resources https : msdn.microsoft.com en-us powershell dsc authoringresourcecomposite using-the-composite-resource but I am unable to get the configuration to continue onto the new Virtual Machine after creation .", "Check out : .. . .. . How to Deploy and Discover Windows PowerShell Desired State Configuration Resources http : blogs.msdn.com b powershell archive 2013 12 05 how-to-deploy-and-discover-windows-powershell-desired-state-configuration-resources.aspx .. . Building a Desired State Configuration Pull Server http : powershell.org wp 2013 10 03 building-a-desired-state-configuration-pull-server comment-page-1", "On the server when DSC runs it generates a folder stucture like the following : .. . .. . C : Packages Plugins Microsoft.Powershell.DSC 2.18.0.0 DSCWork DSC.0 .. . .. . The only trouble is when DSC gets a new version it increments the .X folder. .", "How else can I run a batch-file using DSC", "Sure just a different DSC source...I m sure this would also work with a hosted DSC server .", "It would be best to do this with a DSC configuration on the machine you are targeting with the standard group resource .", "How can I tell what specific Resource in the Configuration that DSC is getting hung up on .", "This way when the machine is up after reboot DSC won t automatically apply the configuration .", "The file myNetworkShares DSC-Configs name.mof is not found .", "I have not gone through the DSC book myself .", "I m using a DSC configuration where a DSC Script resource is as follows : .. . .. . I receive an error : .. . .. . This might be due to the fact the LCM on the node VM is using a local SYSTEM user credential by default .", "Is it possible to download some software from internet then install it on some of my servers using DSC", "The installation instructions says : .. . .. . To install all DSC Resource Kit Modules unzip the content under .. . .. . .. . env : ProgramFiles WindowsPowerShell Modules .. . .. . .. . To confirm installation run Get-DSCResource to see that all of the resources on this page are among the DSC Resources listed .", "However when I attempt to run my TFS Build Service configuration block my DSC configuration succeeds however the unattended configuration of the service fails with the following log message : .. . .. . Since I am running the DSC configuration with my own credentials and I am a Project Collection Administrator on the TFS service there is no issue with permissions .", "I am trying to install OpenSSL from Chocolatey using following Powershell DSC script : .. . .. . This DSC is pushed to a new VM in Azure using Powershell DSC extension in an ARM template .", "I could be wrong but I think the intention for DSC is to run it as many times as needed since we are restoring state", "https : blogs.msdn.microsoft.com powershell 2014 02 11 dsc-diagnostics-module-analyze-dsc-logs-instantly-now", "What is the best most recommended approach to dynamically get the name of the current VM within the DSC configuration when using Azure Automation", "PowerShell DSC is the absolute bomb but my build farm of 70 machines is still going to need some manual configuration it would seem .", "To get this into your Resource Group deployment template you need to copy the xNetworking module https : github.com PowerShell xNetworking into your project under the DSC folder that was created when you added the PowerShell DSC Extensions .", "All DSC tutorials are pretty hard to understand at least for me .", "Yes it is possible to use DSC to do what you desire .", "I did not use DSC reporting server I guess .", "What is DSC trying to convert and how to I get this error to go away", "to go beyond just being a module to being a real DSC", "So how can I install the DSC Resource Kit", "I ve created a DSC resource to copy a Modules directory from a certain source .", "I ve followed the instructions found in Powershell.org s DSC Book http : powershell.org wp ebooks to set up an http Pull Server Windows 2012 server to use with DSC .", "I m playing around DSC to manage 2 nodes I ve been able to setup my pull-server but the problem now is pushing pulling configuration from the pull-server which is not working .", "DSC scripts run as a separate process running as a system account and cannot update your console .", "I have my LocalConfigurationManager set up as follows : .. . .. . Then I kick off a DSC Configuration via .. . .. . This configuration sets up an RemoteApp server which involves a whole bunch of steps and several reboots .", "I know there is something like Partial Configuration in Powershell v5 however to use this feature i have to reconfigure LCM on target node everytime when amount of configurations is changed which is impossible because i want to configure LCM manually only once on first DSC configuration .", "These are the crucial parts of my DSC Configuration .file just used for sample reason .. . .. . This only works the very first time it is executed by LCM .", "I would be interested to see an example of a newly created VM contacting a DSC server after initialization to pull it s configuration if anybody has experience with this", "This cmdlet will fail if something else is already running in DSC .", "I am currently working on a project in which I read some values from a MODBUS device using DSC module .", "As I m new to PowerShell and also DSC and programming in total i have a question to which i couldn t find an answer in the web .", "I m trying to create a software-distribution point to deploy internal applications to azure virtual machines with Azure Automation DSC .", "I have 2 servers set up for DSC Both running Powershell 5.0 and Server 12 R2 DSCPULL is configured as a DSC Pull Server over HTTP DSCIIS is the client ." ] }
{ "confidence": [ 90.38613891601562, 75.03204345703125, 73.37347412109375, 72.42826843261719, 67.43767547607422, 67.0445327758789, 66.45083618164062, 66.00652313232422, 65.49176788330078, 64.14089965820312, 63.597450256347656, 63.583072662353516, 63.525508880615234, 62.83514404296875, 62.328670501708984, 62.094818115234375, 62.01605224609375, 60.83455276489258, 60.48094177246094, 60.339813232421875 ], "content": [ "Question : Below is an example of my config install works fine but if I replace BuildMachine Output MyService.exe with a newer version DSC fails with file in use errors . What is the correct way to upgrade a windows service using DSC Thanks . Comment : I am not sure that you can do this with the built-in resources . I started writing a DSC solution about 6 months ago and after a little tinkering with the built-in stuff opted to create a custom resource to deploy our services . This allowed me to write completely custom logic that met our needs allowing for the comparison of binaries and configurations . I think you should consider going down this road . msdn.microsoft.com en-us powershell dsc authoringresource https : msdn.microsoft.com en-us powershell dsc authoringresource .. . Answer : It s not one desired state it s two desired states . The first desired state is : The service is properly shut down and ready for maintenance . The second desired state is : The service is active and running using the latest version of the code . Write it as two scripts . Comment : This goes against everything I ve learned about desired state you don t say step one step two etc.. . Now this suggestion is the exact opposite it s saying I have one desired state that is dependent on another happening first . Comment : @AaronStainback DSC is a configuration-management tool that you re using to deploy software . In the context of a deployment it s two states . If you were using DSC simply to enforce correct configuration then yes you d just have a single script to enforce that configuration . But your deployment requires an offline state . Comment : Sorry but I just disagree saying I must run one configuration before another in order or else things break defeats the primary purpose of DSC . The promise of DSC is to push a config and make it so no matter the current state of the system . I should not need to know anything about the current state of the system . I am working on a custom resource that will stop the service on file changes this should accomplish what I am looking for . Comment : You have all ready broken up this desired state into 2 resource in your example . You really need to write a custom resource to do what you want in one step. . I really think that is the way forward for you .", "Question : I m working on leveraging Microsoft s DSC Resource Kit specifically XWebAdministration at least for starters . I m relatively familiar with DSC so no worries on the script s actual functionality.. . it does what it s supposed to or at least I m pretty sure it does . The problem is that when I execute the script from my orchestration box the servers I m targeting return this error : .. . .. . The reason why it s happening is obvious : I didn t install the xWebAdministration module on those machines . The question is : What s the proper method for automatically distributing custom resources as part of a deployment It s onerous to manually install custom resources on dozens or hundreds of boxes so there has to be a way I just don t see any documentation on the subject anywhere . Comment : Vote to close as not code related . Comment : This is exactly what turned me away from DSC when I tried looking into using it . It seemed that the simple things for getting started are just not well supported or at least documented . To test out the technology one would want to manually push a configuration that depends on some custom resources to a target machine.. . How does one do this with DSC without having to manually copy the files into the powershell folder first Use DSC to boostrap the resources themselves If so some documentation or tutorial would go a long way on explaining this . .. . Answer : You could configure a centralized pull-server for DSC that clients can get configuration and resources from . Check out : .. . .. . How to Deploy and Discover Windows PowerShell Desired State Configuration Resources http : blogs.msdn.com b powershell archive 2013 12 05 how-to-deploy-and-discover-windows-powershell-desired-state-configuration-resources.aspx .. . Building a Desired State Configuration Pull Server http : powershell.org wp 2013 10 03 building-a-desired-state-configuration-pull-server comment-page-1 Comment : Is this the only way to accomplish this natively For what I m trying to accomplish a pull server doesn t suit my needs . Comment : AFAIK Yes . Two alternatives : 1 : Push file copy manual installation 2 : Pull pull-server .", "Question : I m using TFS 2015 Update 2 to create a release . One of my release steps is a PowerShell on Target Machines task that I m using to apply a DSC configuration . I d like to use the Script Arguments field to pass in parameters from TFS to the DSC script . My script looks like this : .. . .. . The Script Arguments field contains this : .. . .. . However at this point data seems to always be null . How can I get the argument defined in the Script Arguments field into my Script Resource .. . Answer : My recommendation for flexibility is to declare a configuration hash table in your DSC script and pass parameters in to configure it . My Continuous Delivery with TFS VSTS Server Configuration and Application Deployment with Release Management http : pleasereleaseme.net continuous-delivery-tfs-vsts-server-configuration-application-deployment-release-management blog post has a complete walkthrough of how to use DSC and Release Management in TFS 2015 Update 2 . Getting the parameters in then becomes a case of declaring your parameters as follows : .. . .. . and then passing in the value in either directly : .. . .. . Script Arguments field contains myFirstValue mySecondValue .. . .. . or better as variables : .. . .. . Script Arguments field contains myFirstValue mySecondValue Comment : That s a great article However I couldn t get that configuration technique to work until I used the using prefix from the other answer . Any thoughts Comment : For example : Write-Verbose using : Node.NodeName -Verbose Comment : You don t use the parameters directly in the DSC configuration - rather you use them via the configuration hash table . My post shows how to do this . Comment : Indeed and that s how I m attempting to do it but I can t seem to even reference the contents of the hash table without the using prefix . Comment : What error message are you getting when you don t use using", "Question : When attempting to access a network shared folder DSC returns an Access is denied error despite that I have provided a valid credential to it . I m using a DSC configuration where a DSC Script resource is as follows : .. . .. . I receive an error : .. . .. . This might be due to the fact the LCM on the node VM is using a local SYSTEM user credential by default . I attempted to change the user credential manually by navigating to the windows-services manager Hint : RUN then services.msc and change the user credential in the logon tab of winRM service properties . Everytime I attempt to run the Windows Remote Management WS-Managment service I receive and error : .. . .. . Windows could not start the Windows Remote Management WS-Management service on Local Computer . Error 1079 : The account specified for this service is different from the account specified for other services running in the same process . I don t know how to change the credential of LCM so that it can access the network shared folder upon the execution of Get-ChildItem . Comment : Which version of PowerShell DSC Changing the LCM credential is supported in v5 . Comment : v5 is what I m using . .. . Answer : Comment : I don t think it s a good idea to pass my password in the .mof file in plain text . Comment : No it is not i mentioned in my last comment due to size constrained i couldn t put this along with my last comment that s why xFileUpload is using certificates to encrypt the credential .", "Question : I ve followed the instructions found in Powershell.org s DSC Book http : powershell.org wp ebooks to set up an http Pull Server Windows 2012 server to use with DSC . I set up the http Pull Server then crafted a configuration to be pulled then set up my node s LCM to pull and run the configuration . I can see a Scheduled task on the node under Task Scheduler Microsoft Windows Desired State Configuration so I know at least something worked . However my configuration is not being run . When I look at the Event Logs under Apps Svcs Microsoft Windows Desired State Configuration Operational Log I see the following event : .. . .. . When I manually hit that URL after enabling CustomErrors here is the error : .. . .. . I tried googling for this error no luck and I can t find helpful information on this DLL . It looks like it s supposed to come with some parts of Windows but I don t see it on my system . I m reluctant to download it from one of those DLL Downloader sites . Any ideas why the DSC Pull Server seems to require this DLL and I don t have it .. . Answer : It seems that the PSDSCPullServer resource out of xPSDesiredStateConfiguration defaults to using Esent as a database provider which only works with Windows 8.1 not Server 2012 . I found some documentation here http : powershell.org wp 2013 10 03 building-a-desired-state-configuration-pull-server with some code I could copy . I just had to edit the web.config for my pull server and change this : .. . .. . with this : .. . .. . The fact that the original configuration tried to point to a Devices.edb which did not exist on my system .mdb did is further evidence that something funky was going on .", "Question : I m trying to create a configuration using PowerShell DSC that would help me create a SharePoint farm using Virtual Machines . Assuming that I have a Windows 10 machine with Hyper-V installed I would like my configuration script to create the required VMs for example DC SPA1 SPw1 SPW2 and SPDB1 configure their network connections and connect to a domain controller DC1 then proceed to install the SharePoint SQL Server prerequisites and installation before going on to configure the farm once available . I ve created configurations that complete various stages but I am unable to figure out how to connect them to work in an orchestrated manor . For example I can create the VMs or perform the install and configuration of SharePoint but I can t get these configurations to work in tandem . Having read the DSC documentation https : msdn.microsoft.com en-us powershell dsc overview I thought that is might be possible using composite resources https : msdn.microsoft.com en-us powershell dsc authoringresourcecomposite using-the-composite-resource but I am unable to get the configuration to continue onto the new Virtual Machine after creation . From the composite resource documentation : .. . .. . Ideally the node names would be dynamically declared in the configuration data and not explicitly defined I.P addresses . I m also having trouble with my Hyper-V configuration creating multiple switches but that s a separate issue . So I guess my question is : .. . .. . Is it possible to create a configuration that deals with the creation and advanced configuration of Virtual Machines Comment : Have you tried to combine your configurations via DependsOn With that you can be sure that the vm-config is done before your SharePoint starts to install . Comment : I have tried the DependsOn attribute and using the WaitForAll resource but the configuration still tries to process the VM s configuration before it s ready . I ll try to add more details of error messages etc. . later . Comment : Just to clarify your looking to create a single flow so you create the VM on hyper-v then configure the machine that is created So your hyper-v configuration launches your VM and then initiates the Sharepoint installation Comment : That s correct . I m looking at creating a way I can easily throw up and tear down a development-environment that mirrors our production environment . So the configuration will look to : create the virtual machines create domain + attach VM s install SharePoint SQL Server run SharePoint configuration . Not too much to ask right : .. . Answer : The problem you are running up against is a conceptual one of what DSC does . Reading the document https : msdn.microsoft.com en-us powershell dsc overview that you linked it says .. . .. . Configurations are declarative PowerShell scripts which define and configure instances of resources . Upon running the configuration DSC and the resources being called by the configuration will simply make it so ensuring that the system exists in the state laid out by the configuration . DSC is designed to configure an instance of a resource . At its basic level a DSC configuration is run on a single machine configuring that machine into a specified state . DSC scripts should be constrained to work within the boundaries of the machine that they are running on . It seems that this is part of the problem you are experiencing . If you have two sets of scripts . A Deploy VM script that runs against a hyper-v server and a Sharepoint build that then configures the VM once it has launched . It seems that what you are trying to do is launch the Sharepoint script from within the hyper-v deploy script . At that stage though the Sharepoint server is outside of the boundary of control of the hyper-v server apart from its atomic VM capabilities start stop delete etc .. . .. . Instead what I would suggest you do is see them as two entirely separate entities . There is no need to have a scripted connection between creating a VM and installing Sharepoint . At a high level your pipeline would look something like this .. . .. . 1 . Run deploy configuration to create a new VM . At the point where that VM is running that configuration is complete . It has no other actions . 2 . The VM builds and starts part of its initial configuration is to run a bootstrap script that tells it its function . 3 . The VM contacts the DSC server tells it its function and requests any configurations that are available for it . 4 . The VM downloads its configurations and configures itself as a Sharepoint Server or SQL Server etc .. . 5 . If there are external dependencies i.e . you can install Sharepoint before SQL has completed then simply have a dependson for a shared file . i.e . if server share sqlcompleted.txt exists Or whatever other mechanism fits your environment . Building servers this way removes dependencies it means that if you decide you want to switch to ESX then all you need to change is your deploy script . Equally if you move everything to a cloud deployment . Comment : This definitely seems to be the way to go . I understood that the configuration needs to be enacted on the machine that it s configuring but I thought you might be able to push the configuration after the VM had been initialized . I would be interested to see an example of a newly created VM contacting a DSC server after initialization to pull it s configuration if anybody has experience with this Comment : @AndyCox It is probably worth having another question about that a lot of it will depend what you re deploying whether it is a prebuilt image or building from scratch . Primarily it is just having something in there that contacts a DSC pull server . - and it is largely irrelevant once its booted that it is a VM at that point it is just another machine on the network .", "Question : I have my LocalConfigurationManager set up as follows : .. . .. . Then I kick off a DSC Configuration via .. . .. . This configuration sets up an RemoteApp server which involves a whole bunch of steps and several reboots . One of those reboots is happening in a loop over and over again . When the reboot happens I can get into the system long enough to run a quick command or two before DSC restarts the system again . How can I tell what specific Resource in the Configuration that DSC is getting hung up on . If I run .. . .. . the reboots stop...but then I seem to lose all information on where the problem is happening . I can capture the output of Get-DSCConfiguration but I can t make sense enough of the output to tell where the reboot loop is happening . How can I further debug this .. . Answer : There are many ways to troubleshoot this issue : 1 Set RebootNodeIfNeeded to true and ActionAfterReboot to StopConfiguration . This way when the machine is up after reboot DSC won t automatically apply the configuration . Then you can from powershell console run : Start-DscConfiguration -UseExisting -wait -verbose to capture the verbose messages . The last resource that gets executed is the one that requested the reboot . 2 Run Get-DscConfigurationStatus cmdlet to get the status of the last configuration run . This cmdlet will fail if something else is already running in DSC . It will give you list of resources that are in desired state and not in desired state . It will also give JobId for the operation . Search for windir system32 Configuration ConfigurationStatus JobId .json . This json file contains the verbose messages for the configuration run . This will run only with WMF 5.0 RTM . 3 Get xDSCDiagnostics module and use the info from this blog to troubleshoot . https : blogs.msdn.microsoft.com powershell 2014 02 11 dsc-diagnostics-module-analyze-dsc-logs-instantly-now", "Question : I have a DSC configuration that installs a bunch of prerequisites included PowerShell 5 itself and several DSC packages via Install-Package . I have a second DSC configuration that does the work of installing Windows Roles Features software configuration etc . How can I schedule these in a chained manner That is I want my Setup Configuration to run after my Prerequisites Configuration has finished applying successfully I can t use DependsOn or Composite Resources because some of the DSC packages that the Setup Configuration uses are actually installed during the Prerequisites Configuration...so if I tried to make a Composite Resource with DependsOn it would error out trying to generate the mof file in the first place . .. . Answer : DSC doesn t support phases but you could use partial configuration to solve your scenario if you control delivery of the DSC configuration . Have two partial configuration partial1 and partial2 . Deploy only partial1 using publish-DScConfiguration in push mode . Then run Start-DscConfiguration -useExisting for DSC to apply the configuration . Check the status of the configuration using Get-DscConfigurationStatus cmdlet . If first partial configuration was applied successfully publish partial2 configuration and again use Start-DscConfiguration -useExisting to apply both the configurations . You can use pull mode as well to deliver configuration but you need to have a way to publish partial2 on pull server only when partial1 is successfully applied . More info on partial configuration can be found at https : msdn.microsoft.com en-us powershell dsc partialconfigs . I would suggest file a uservoice request https : windowsserver.uservoice.com forums 301869-powershell for supporting phases in DSC as well .", "Question : I would like to combine few small DSC configurations into one MOF file . I know there is something like Partial Configuration in Powershell v5 however to use this feature i have to reconfigure LCM on target node everytime when amount of configurations is changed which is impossible because i want to configure LCM manually only once on first DSC configuration . Unfortunatelly DSC do not allow to reconfigure LCM via DSC Resource which means i cannot change this setting by Pull Mode on local machine . I m still wondering why LCM do not support inside PartialConfigurtion property when it could be very usefull specially when every configuration uses GUID anyway .GUID.MOF .. . .. . Have you ever found any solution to workaround this problem Thanks in advance .. . Answer : DSC doesn t require all partial configuration fragments to be available at the time of applying the configuration . So you can still populate many partialConfig ahead of time in LCM which may become available at some point of time . This gives you some flexibility for not modifying LCM settings every time you need to add another partial configuration . I would also suggest opening a uservoice issue request @ https : windowsserver.uservoice.com forums 301869-powershell category 148047-desired-state-configuration-dsc for : .. . .. . 1 . Allowing in partial configuration . 2 . Allowing updating meta-config from pull server .", "Question : I want to add a user to a particular usergroup on a remote-server . Also I need to check if the user is already in that group . Only if the user is not a part of that usergroup add user . And I have to do all this using Powershell DSC Desired State Configuration . Comment : i would suggest that you look at a few examples here https : msdn.microsoft.com en-us powershell dsc configurations ....write your code...test...if something dosent work then you can post your code with the error and perhaps somebody can help.... . .. . Answer : It would be best to do this with a DSC configuration on the machine you are targeting with the standard group resource . A DSC configuration should try to describe the state of the local machine . If you have a dependency on that user being created on another machine it would be best to use WaitForAll https : msdn.microsoft.com en-us powershell dsc crossnodedependencies and have any resource that needs to wait on the remote resource depend on that resource .", "Question : I just finished the initial tests phase on automating our product release to Azure Virtual Machines using DSC particularly with the commands described in this article http : blogs.msdn.com b powershell archive 2014 08 07 introducing-the-azure-powershell-dsc-desired-state-configuration-extension.aspx which are part of the Azure PowerShell SDK . I can push a DSC configuration fine using PowerShell but since this process is automated I wanted to get feedback on how the configuration process progressed . When I call Update-AzureVM I get an ok but the DSC configuration happens after that asynchronously and I don t know how it is going unless I log into the machine or look at the updated Azure Portal which now shows this http : blogs.msdn.com b powershell archive 2014 10 28 manage-the-powershell-dsc-extension-in-the-azure-preview-portal.aspx . I d like to fail my automated process if the configuration fails . How can I check the status of the configuration from my script and gracefully detect success or failure Comment : i think Get-xDscOperation might be what you are looking for technet.microsoft.com en-us library dn249926.aspx http : technet.microsoft.com en-us library dn249926.aspx it is basically using the event logs to check the status Comment : @Paul Very interesting. . I suppose I d need to run these commands against the VM remotely right I was hoping for something a bit more automated using the Azure SDK . Comment : You should also be able to call it locally but basically yes . Not sure if the Azure SDK has specialized cmdlets for that but i kind of doubt it . .. . Answer : We have added a new cmdlet Get-AzureVMDscExtensionStatus to obtain status of the running DSC configuration .. . .. . This article explains the same http : blogs.msdn.com b powershell archive 2015 02 27 introducing-get-azurevmdscextensionstatus-cmdlet-for-azure-powershell-dsc-extension.aspx Comment : Absolutely perfect just what I needed Thanks for the update Nana . I have a feeling that our process will be a lot more reliable using this cmdlet .", "Question : When attempting to access a network shared folder DSC returns an Access is denied error despite that I have provided a valid credential to it . I m using a DSC configuration where a DSC Script resource is as follows : .. . .. . I receive an error : .. . .. . This might be due to the fact the LCM on the node VM is using a local SYSTEM user credential by default . I attempted to change the user credential manually by navigating to the windows-services manager Hint : RUN then services.msc and change the user credential in the logon tab of winRM service properties . Everytime I attempt to run the Windows Remote Management WS-Managment service I receive and error : .. . .. . Windows could not start the Windows Remote Management WS-Management service on Local Computer . Error 1079 : The account specified for this service is different from the account specified for other services running in the same process . I don t know how to change the credential of LCM so that it can access the network shared folder upon the execution of Get-ChildItem . Comment : Which version of PowerShell DSC Changing the LCM credential is supported in v5 . Comment : v5 is what I m using . .. . Answer : There isn t an easy way to make it work with script resource because you need an ability to pass credentials to the script resource so that you can mount a drive and use it to copy-paste . If you want to copy files directory from the share you can use File resource . If you want to copy files directory to the share you can use xFileUpload resource from xPsDesiredStateConfiguration https : gallery.technet.microsoft.com xPSDesiredStateConfiguratio-417dc71d Module . If you really need to use script resource to do this job look into how xFileUpload resource is doing it . Comment : I was able to use the File resource to perform copy tasks from the same network-shares without errors . However the full Script resource gets a list of subdirectories which are multiple build folders named alphanumerically and it chooses the latest build folder to copy its content . This operation cannot be done using the File resource . Comment : I think it is best to modify xFileUpload resource which internally is using script resource and passing credentials securely to suit your need . Comment : It doesn t help I spent a whole day trying the workaround which you advised . It requires a thumbprint and I m not using a certificate in my DSC framework . I mean the source code of the Script resource must be similar to what s in the xUploadFile module or else why does the Script resource accept credential parameters if it won t be using them to execute the script Comment : If you were using plainTextPassword for your original script not recommended use only plaintext password in xFileUpload . Comment : If you were using plainTextPassword for your original script not recommended use only plaintext password in xFileUpload . You need an ability to explicitly mount a drive using supplied credential in your script resource not via Credential property of script resource . That is what xUploadFile is doing . Other way to make it work with your sample is to pass username password you have to worry about securing them though and use them to create new-psdrive and then you will be able to access it . Example in the next comment .", "Question : I ve followed the instructions found in Powershell.org s DSC Book http : powershell.org wp ebooks to set up an http Pull Server Windows 2012 server to use with DSC . I set up the http Pull Server then crafted a configuration to be pulled then set up my node s LCM to pull and run the configuration . I can see a Scheduled task on the node under Task Scheduler Microsoft Windows Desired State Configuration so I know at least something worked . However my configuration is not being run . When I look at the Event Logs under Apps Svcs Microsoft Windows Desired State Configuration Operational Log I see the following event : .. . .. . When I manually hit that URL after enabling CustomErrors here is the error : .. . .. . I tried googling for this error no luck and I can t find helpful information on this DLL . It looks like it s supposed to come with some parts of Windows but I don t see it on my system . I m reluctant to download it from one of those DLL Downloader sites . Any ideas why the DSC Pull Server seems to require this DLL and I don t have it .. . Answer : What method have you used The xPSDesiredConfiguration module from the resource kit or manual steps I have not gone through the DSC book myself . So I wouldn t know what they are recommending . The Microsoft.Isam.Esent.Interop assembly is the ESE database provider . However you need to use this provider only for Blue OS Windows 8.1 . Which OS are you using for the Pull Server For all supported OS other than the Blue OS you are supposed to use the Jet provider for the devices.mdb . Comment : I used the PSDSCPullServer and PSDSCComplianceServer resources out of the module you mentioned . This is a Windows 2012 server . I have no idea how the database provider was set I imagine it was set by the resource . Where can I change this Comment : Your answer definitely led me in the right direction . I ve posted my own answer along with specifics on what I had to change to get it working . I hope you don t feel like I was trying to steal your credit here Comment : NP that is what I meant . The xPSDesiredStateConfiguration module has a bug .", "Question : I m working on leveraging Microsoft s DSC Resource Kit specifically XWebAdministration at least for starters . I m relatively familiar with DSC so no worries on the script s actual functionality.. . it does what it s supposed to or at least I m pretty sure it does . The problem is that when I execute the script from my orchestration box the servers I m targeting return this error : .. . .. . The reason why it s happening is obvious : I didn t install the xWebAdministration module on those machines . The question is : What s the proper method for automatically distributing custom resources as part of a deployment It s onerous to manually install custom resources on dozens or hundreds of boxes so there has to be a way I just don t see any documentation on the subject anywhere . Comment : Vote to close as not code related . Comment : This is exactly what turned me away from DSC when I tried looking into using it . It seemed that the simple things for getting started are just not well supported or at least documented . To test out the technology one would want to manually push a configuration that depends on some custom resources to a target machine.. . How does one do this with DSC without having to manually copy the files into the powershell folder first Use DSC to boostrap the resources themselves If so some documentation or tutorial would go a long way on explaining this . .. . Answer : Assuming you re using Windows Management Framework PowerShell 5 you can use Install-Module https : technet.microsoft.com en-us library dn807169.aspx to install the resource from a NuGet feed .", "Question : I ve been toying around with DSC and I think it s an awesome platform . I made a few tests to automate the deployment of our TFS build outputs and to automatically install the web-applications and configure an environment . This was relatively easy as I could pass my drop folder path to the DSC script using a file share on our internal network and use relative paths inside the configuration to select each of our modules . My problem now is in how to expand this to Azure virtual machines . We wanted to create these scripts to automatically deploy to our QA and Production servers which are hosted on Azure . Since they are not in our domain I can t use the File resource anymore to transfer the files but at the same time I want exactly the same functionality : I d like to somehow point the configuration to our build output folder and copy the files from there to the virtual machines . Is there some way I can copy the drop folder files easily from inside a configuration that is run on these remote computers without sharing the same network and domain I successfully configured the VMs to accept DSC calls over https using certificates and I just found out that the Azure PowerShell cmdlets enable you to upload a configuration to Azure storage and run it in the VMs automatically http : blogs.msdn.com b powershell archive 2014 08 07 introducing-the-azure-powershell-dsc-desired-state-configuration-extension.aspx which seems a lot better than what I did but I still don t know how I d get access to my build outputs from inside the virtual-machine when the configuration script is run . Comment : Release Management s DSC implementation puts the build outputs in an Azure storage account . Did you look into doing that Comment : @DanielMann I did not know RM did that interesting . Is it documented somewhere This is what I ll probably end up doing now that I think about it . I just need to add my drop files to the zip that is published to azure storage somehow and then I wouldn t need direct access to the drops . I would like to stay away from the new pipelines because they only support the deployment tasks.. . this is not enough to me I need to run arbitrary actions on the workflow like I mentioned in another question for deploying my android apks to google-play for example . Comment : I don t think it s documented anywhere but presumably it s using the Azure SDK to push the binaries from the build drop RM server into Azure storage then executing something on the deployment-target to download the binaries from Azure storage . The Azure APIs can definitely do this so it s just a matter of hacking your own together . .. . Answer : I ended up using the Publish-AzureVMDscExtension cmdlet to create a local zip file appending my build outputs to the zip and then publishing the zip something along those lines : .. . .. . By using a zip inside the zip used by Azure I can access the inner contents in the working directory of the PowerShell DSC Extension in the DSCWork folder . I tried just adding the drop folder directly to the zip without zipping it first but then the DSC Extension copies the folder to the modules path thinking it is a module . I m not completely happy with this solution yet and I m having a few problems already http : stackoverflow.com questions 26653975 set-azurevmdscextension-with-large-package-leads-to-extreme-memory-usage-in-powe but it makes sense in my mind and should work fine .", "Question : As part of an Azure resource group template I have a PowerShell DSC extension setup for my VM which provisions various Windows features . As part of this automated setup I want to be able to open some ports in the firewall after a bit of research I found there is a xFirewall DSC module available . My problem is how can I automatically install this module onto the Azure VM before the DSC executes My configuration looks like this : .. . .. . The import of xFirewall fails because the module is not installed . I have thought about creating another DSC script that could run before this one but that proves difficult as you can only have one DSC extensions attached to a VM at a time . Comment : Are you using Visual Studio to author edit the template Comment : @RickRainey Yes Comment : 1 . xNetworking is the name of the module which contains xFirewall 2 . Are you using Publish-AzureVMDscConfiguration to create the extension Zip file If so it should include the module in the zip . .. . Answer : Refer to How to use and discover DSC resources in this article https : blogs.msdn.microsoft.com powershell 2013 12 05 how-to-deploy-and-discover-windows-powershell-desired-state-configuration-resources .. . .. . Assuming you dropped xFirewall module as part of the DscResource First you need import the module I think that s xNetworking by using Import-Module FullPath then follow by Import-DSCResource -ModuleName xNetworking -name xFirewall .. . .. . Or try Import-DSCResource -Name xFirewall seems this will make it scan the entire resource folder and find the xFirewall for you .", "Question : As part of an Azure resource group template I have a PowerShell DSC extension setup for my VM which provisions various Windows features . As part of this automated setup I want to be able to open some ports in the firewall after a bit of research I found there is a xFirewall DSC module available . My problem is how can I automatically install this module onto the Azure VM before the DSC executes My configuration looks like this : .. . .. . The import of xFirewall fails because the module is not installed . I have thought about creating another DSC script that could run before this one but that proves difficult as you can only have one DSC extensions attached to a VM at a time . Comment : Are you using Visual Studio to author edit the template Comment : @RickRainey Yes Comment : 1 . xNetworking is the name of the module which contains xFirewall 2 . Are you using Publish-AzureVMDscConfiguration to create the extension Zip file If so it should include the module in the zip . .. . Answer : The module you need to import is the xNetworking module and the resource is xFirewall . So a simple example of the DSC script would look like this . To get this into your Resource Group deployment template you need to copy the xNetworking module https : github.com PowerShell xNetworking into your project under the DSC folder that was created when you added the PowerShell DSC Extensions . Then add the xNetworking folder to your project as shown here . enter image description here http : i.stack.imgur.com K6A9H.png .. . .. . Next go through your normal Deploy process . What will be different now that you have a DSC extension is that you will need to specify an artifacts storage account prior to deploying . enter image description here http : i.stack.imgur.com CX3SW.png .. . .. . The Deploy-AzureResourceGroup.ps1 script in your project will upload the DSC.zip which now includes your xNetworking module into the storage account so that Azure Resource Manager ARM can then push the extension into the virtual-machine after it has been provisioned . From there the DSC engine in the virtual-machine takes over and applies the configuration .", "Question : With the following DSC configuration snippet of the resources section only cut out preamble diagnostics and Start-DscConfiguration parts for SO : .. . .. . My script to configure the TFS Build Service in unattended mode is as follows I ve taken out logging error checking and diagnostics for the purpose of SO : .. . .. . I can run the script Configure-TfsBuildService.ps1 successfully on any of my build Windows 2012 R2 agents successfully as long as I m logged in locally . Apart from the TFS Build Service configuration block I can run my DSC configuration successfully against all of my build agents . However when I attempt to run my TFS Build Service configuration block my DSC configuration succeeds however the unattended configuration of the service fails with the following log message : .. . .. . Since I am running the DSC configuration with my own credentials and I am a Project Collection Administrator on the TFS service there is no issue with permissions . I ve proven that by successfully running the configuration script locally on an agent machine and being successful there . I realize that there is no double-hop permissions allowed with PowerShell but since DSC executes on the agent involved there shouldn t be an issue of double-hop credentials and the permissions would be allowed to be relayed to the TFS service for registration . Maybe I ve missed something more trivial EDIT : A description of unattended installation of TFS 2012 2013 is found here : http : blogs.msdn.com b visualstudioalm archive 2012 10 12 unattended-installation-of-team-foundation-server-2012.aspx .. . Answer : You may still be running into double-hop issues . DSC requires WinRM even when run in Push mode because no matter what it s remoting into the machine when it executes the configuration . That still counts as a hop . Consider these 2 executions : .. . .. . The first invocation should work no remoting is being done with that parameter set . The second should fail with a permission error . Comment : Yes that seems to ring a bell for me now . You cannot even apply DSC configurations to localhost without enabling WinRM Remoting in Powershell IIRC and hence the double-hop issue is likely the culprit in my case . How terribly disappointing PowerShell DSC is the absolute bomb but my build farm of 70 machines is still going to need some manual configuration it would seem . Comment : DSC uses SYSTEM account and CredSSP does not play any role here . You can pass the credentials to access the network resource and should be good .", "Question : I just finished the initial tests phase on automating our product release to Azure Virtual Machines using DSC particularly with the commands described in this article http : blogs.msdn.com b powershell archive 2014 08 07 introducing-the-azure-powershell-dsc-desired-state-configuration-extension.aspx which are part of the Azure PowerShell SDK . I can push a DSC configuration fine using PowerShell but since this process is automated I wanted to get feedback on how the configuration process progressed . When I call Update-AzureVM I get an ok but the DSC configuration happens after that asynchronously and I don t know how it is going unless I log into the machine or look at the updated Azure Portal which now shows this http : blogs.msdn.com b powershell archive 2014 10 28 manage-the-powershell-dsc-extension-in-the-azure-preview-portal.aspx . I d like to fail my automated process if the configuration fails . How can I check the status of the configuration from my script and gracefully detect success or failure Comment : i think Get-xDscOperation might be what you are looking for technet.microsoft.com en-us library dn249926.aspx http : technet.microsoft.com en-us library dn249926.aspx it is basically using the event logs to check the status Comment : @Paul Very interesting. . I suppose I d need to run these commands against the VM remotely right I was hoping for something a bit more automated using the Azure SDK . Comment : You should also be able to call it locally but basically yes . Not sure if the Azure SDK has specialized cmdlets for that but i kind of doubt it . .. . Answer : Based on @David s suggestion I ended up creating a polling function to detect the status changes and report back to my main script . First I needed to find what the terminating status codes where I need to finish my loop as soon as I detect a successful DSC operation or if any error happens . I drilled down in the files used by the DSC Extension in the VM to find the possible status codes and based my condition on that . The status codes can be found at C : Packages Plugins Microsoft.Powershell.DSC 1.4.0.0 bin DscExtensionStatus.psm1 in any virtual-machine with the DSC Extension installed . Here are the status codes as of version 1.4.0.0 of the DSC Extension : .. . .. . The logic in the function is somewhat convoluted because the state changes are persistent i.e . they are not from a single DSC operation but from the whole extension itself . Because of that I needed to pick the status first to then try to find updates . I m using the timestamp field to detect a new status . Here is the code : .. . .. . I m not very proficient in PowerShell yet so this could probably look a bit better and be easier to read . Still I hope it can be of use to someone in the same situation as me . UPDATE 28 11 2014 : .. . .. . Microsoft has updated the DSC Extension to version 1.5.0.0 and my function broke how nice of them . I mean.. . it s not as-if changing the response codes is a breaking change or anything like that .. . .. . Here are the new status codes : .. . .. . For some reason they swapped the codes and now 1 is success while errors went up from 100 to 1000 they surely are expecting a lot of errors on this one .", "Question : When attempting to debug issues with Desired State Configuration I ve found the following command invaluable .. . .. . This will obviously allow viewing of all the verbose logs . The problem is that if the server needs to reboot as part of the configuration or - more importantly - it s running normally e.g . non-interactively as part of a pull configuration it s not as easy to view these logs . Is there any way to get the exact same output logged to a specific location I do not have any .json files in the C : Windows system32 configuration configurationstatus folder as suggested in one of the answers .. . Answer : You can follow the steps outlined in this blog to get the results post a reboot http : nanalakshmanan.com blog DSC-get-job-details-post-reboot" ] }
[ "yes-answer-long", "yes-answer-short" ]
powershell
UNK_RELATION
cross-page-posting@web@97
cross-page-posting -- by default buttons and other controls that cause a postback on an asp.net @placeholder page submit the page back to itself .
{ "confidence": [ 88.57530212402344, 68.12528228759766, 65.23993682861328, 62.403743743896484, 60.65403747558594, 60.39684295654297, 59.32555389404297, 57.994354248046875, 55.69947052001953, 55.69947052001953, 52.93638610839844, 52.36492919921875, 52.03971481323242, 51.78135681152344, 51.071319580078125, 49.64834213256836, 48.62574005126953, 47.95829391479492, 47.719120025634766, 46.65617370605469, 46.05524444580078, 45.955814361572266, 45.91645812988281, 45.42762756347656, 45.14051818847656, 45.041831970214844, 44.909000396728516, 44.8609733581543, 44.8609733581543, 44.73561096191406, 44.73561096191406, 44.668052673339844, 44.595943450927734, 44.36357879638672, 44.17374801635742, 43.84575271606445, 43.561363220214844, 43.34059143066406, 43.30380630493164, 42.74774932861328, 42.60196304321289, 42.15281677246094, 41.862220764160156, 41.625709533691406, 41.003440856933594, 40.88639450073242, 40.88639450073242, 40.53123474121094, 40.37299346923828, 40.067657470703125, 40.067657470703125, 40.067657470703125, 40.067657470703125, 40.067657470703125, 40.067657470703125, 40.067657470703125, 40.067657470703125, 39.59238052368164, 39.509361267089844, 39.509361267089844, 39.509361267089844, 39.33751678466797, 39.33751678466797, 39.33751678466797, 39.33751678466797, 39.33751678466797, 39.221923828125, 38.963653564453125, 38.94731521606445, 38.70841598510742, 38.56949996948242, 38.51115036010742, 38.37790298461914, 38.36130905151367, 38.24524688720703, 37.7172966003418, 37.560768127441406, 37.560768127441406, 37.560768127441406, 37.560768127441406, 37.560768127441406, 37.560768127441406, 37.10905456542969, 36.933570861816406, 36.933570861816406, 36.933570861816406, 36.62093734741211, 36.62093734741211, 36.340728759765625, 35.67918395996094, 35.67918395996094, 35.46794128417969, 35.364051818847656, 35.300331115722656, 35.300331115722656, 35.167503356933594, 35.167503356933594, 35.167503356933594, 35.167503356933594, 35.156822204589844 ], "content": [ "For a more information please see Cross-Page Posting in ASP.NET Web Pages http : msdn.microsoft.com en-us library ms178139.aspx : .. . .. . By default buttons and other controls that cause a postback on an ASP.NET Web page submit the page back to itself .", "Basically cross-page posting means that you are posting form-data to another page as opposed to posting form-data back to the same page as is the default in ASP.NET .", "I have a few questions about cross-page posting in ASP.NET : .. . .. . What is cross-page posting in ASP.NET", "http : csharpdotnetfreak.blogspot.com 2009 08 cross-page-posting-in-aspnet.html .. . .. . there are two method how to use Cross Page Posting PostBack", "I m using the asp.net PreviousPage functionality and cross-page postback .", "This is referred to as cross-page posting .", "Cross - page posting is targeting a different page from the original page .", "my website uses cross page postback from page to page to access information from the previous page .", "What are pros and cons of cross-page posting", "Cross-page posting was the order of the day in classic ASP .", "I d imagine that only controls that have PostBackUrl exposed can take advantage of Cross Page Posting .", "I have a web page that uses cross-page-posting to post to a different target page .", "Cross-page posting provides some advantages over using the Transfer method to redirect to another page .", "I thought the whole idea of Cross Page Posting was to allow postbacks to a page that is not the source page and to do so you have to set the PostBackUrl property of a control .", "I can t use this because it will cause a Get rather than reposting the informaiton that was posted to the page via cross-page postback resulting in a loss of this information and preventing me from pupulating my controls with the selection criteria of the previous page .", "Is it possible to somehow change the cross-page-posting target dynamically on the client", "What methods do you use to retain this sort of information that was passed in via cross-page postback", "I have seen other questions that handle the Unload event for the UpdatePanel but that doesn t seem to work with the addition of the Cross Page Posting .", "your code is fine.i think you can only do this with PreviousPageType directive adding in your page.see link cosnetics.co.uk articles cross-page-posting-not-working http : www.cosnetics.co.uk articles cross-page-posting-not-working", "This page submits to page 1 .. . .. . This page receives the submit .. . .. . WebForm1.aspx.cs", "When the form on page 1 is submitted the user is presented with page 2 they complete that page and then all the form-data from page 1 is posted back to page 1 but with the hidden fields 1 + 2 complete .", "Is it possible to use cross-page postbacks or a similar method perhaps Server.Transfer to post form-data say Data-set A to a page which then allows the user to add some additional information say Data-set B and then postback to the original page the complete set of data A+B which then flows through the normal event execution process similar to as-if all data A+B was submitted on the original page to itself in a normal postback", "I m working on a wizard-like set of page and I m relying on cross page postbacks to navigate between them .", "i am wondering if it is possible to do cross page postback when clicking on the links in a sitemappath as it seems it is simply doing a response.redirect which is causing the PreviousPage to be null .", "This is similar to this question http : stackoverflow.com questions 2467709 crosspage-postback-in-series-of-web-pages but in that example each page is specfic to the previous page .", "ASP.NET is based on the post-back model where the same page that sent it to you processes the response .", "Or you could have it post back to the same page though I m sure you have a reason for doing a cross-page post .", "Completing the email and password and clicking the login button results in a cross-page postback to the login.aspx page .", "Clicking the forgot-password button also results in a cross-page postback to the login.aspx page .", "What are my alternatives rewrite the pages to remove cross-page posting and do a response redirect passing the data in session", "I am experimenting with cross-page posting by following this MSDN article http : msdn.microsoft.com en-us library ms178139.aspx .", "When either button is clicked it ll submit the form fields to the second page .", "I m thinking that perhaps page 2 just needs to use PreviousPage and take its post data add to it and then post it back to page 1 but as-if it came from Page 1 and not Page 2 .", "But submitting an ASP.NET form to a second page isn t necessarily simple .", "Without page extensions I can not do cross page postbacks .", "You could have a hidden text box on the form from the first page that each button sets a value in before posting to the second page .", "In that case you can configure certain controls those that implement the IButtonControl interface such as the Button control on the page to post to a different target page .", "I am wondering if there is a way to perform a cross page postback while maintaining the source event and viewstate .", "Notes : .. . .. . I am using asp.net-4.5 .. . I am using a master page .. . FriendlyURLs is installed by default .. . I am trying to cross page post using the POST method .. . .. . On the target url it comes back with PreviousPage null .. . .. . Is this due to FriendlyURls", "Press the Back button to transfer to the Setup page .. . 6 .", "So instead of going back to a previously navigated page in order to get data you will cache the data the first time you reach the first page and then when the user navigates to the 2nd page it will have access to that information .", "Hope its helping u : .. . .. . Page 1 : .. . .. . Page 1 Behind Code : .. . .. . Page 2 : define this at the page header : .. . .. . Page 2 Behind Code :", "I need to click a button and refresh the page as-if it was newly posted and i don t really see a way to re-submit a postback short of F5 and then clicking the dialog to accept reposting of data .", "I m new to ASP.NET and I m having a problem getting a listbox to return the proper data when posting to another page .", "However due to the way ASP.NET validates the previous page if you have a route alias set up for that page you may run into more issues .", "Or even have a datagrid in it s own page but callable from any other page on my site .", "Is your textbox directly within page 1 s naming container or within some other control on the page", "If this is just pure HTML and your form action attribute points to the 2nd page.. . .. . .. . You simply need to have two different submit buttons with the same name attrib and two different value attribs .", "The original problem of the previous page reported as null is not related to the postback url in this case but to the use of routes with friendly urls", "Currently I have two pages : .. . .. . The first page contains an input form and the 2nd page generates an excel document .", "Your aim is to pass a search term from a page in one virtual-directory to get processed by a page in another virtual-directory is it not", "I need to be able to trigger the Load event on the previous page in order to save the form-data for the page .", "Have you considered moving whatever persistence logic you re doing in the load of the Previous Page into a method on the page", ".. . Under some circumstances you might want to post one page to another page .", "For example you might be creating a multi-page form that collects different information on each page .", "You first create a class that keep your information and its going to move from page to page and fill with data .", "In every page you have a reference to this class a variable that ether create a new ether get it from the previous page .", "I am trying to pass the value of a variable from one page to another using cross page post-back using this code : .. . .. . on page1 : .. . .. . I have assigned its value at runtime from the database in the cs file as : changepwd.Text dataSet.Tables 0 .Rows 0 empPassword .ToString .. . .. . On page 2 : In page load event : .. . .. . but I don t get the value from the previous page .", "At the moment it s setup so that the first page has no real logic the button has its PostBackUrl attribute set to the 2nd page where the 2nd page uses Page.PreviousPage to get the values of what was posted", "This can be useful when you want to post data to another page and don t want to incur the overhead of reloading the current page simply to redirect the user to another page via an HTTP 302 i.e .", "I don t want Page 2 to know about Page 1 though instead of specifying the virtual path perhaps it could just cast PreviousPage to a specific type of Page that has a public property of the type of that abstract-class", "The input form s button posts to this 2nd page .", "Pick it up on the code-behind of your results page as : -", "Added a reference to the destination : @ Reference Page PreviousPageName.aspx .. . .. . 2 .", "For details see Redirecting Users to Another Page .", "Page 1 then has all the information it needs to complete .", "Start the Setup page .. . 2 .", "Hm I wonder if this could work if an abstract-class holds the two fields that would be populated by page 2 so that page 2 doesn t need to know about the other fields it can just fill those in and pass it on .", "Expose the textbox s text as a public property of page 1 then in page 2 cast PreviousPage to page 1 s type and read the property .", "Yes you can postback to a page in your virtual application by setting the PostBackUrl http : msdn.microsoft.com en-us library system.web.ui.webcontrols.button.postbackurl.aspx property of your search button then access-control values send from the page through Page.PreviousPage http : msdn.microsoft.com en-us library system.web.ui.page.previouspage.aspx .", "1 Put the GridView in other page .. . 2 Call window.open on button click that will display GridView .. . 3 Pass the textbox setting parameter to other page via QueryString and on the other page - fetch the query-string value run the query to fill datatable and bind the GridView .", "I don t want the second page to have any type knowledge of the original page it just needs to supply two additional feeds and send the data on .", "If something failed like in case JavaScript being disabled make your fallback script output page with a hidden data field so it should not be modified anymore and visible submit button POSTing data to a proper location .", "I am getting the dreaded exception Cannot unregister UpdatePanel with ID UpdatePanel since it was not registered with the ScriptManager when trying to combine a popup window and some Cross-Page Posting .", "nope. . im not using master page", "What I d like to do is add a second button which also posts to the 2nd page however I ll need requests created from this new button to act differently which brings me to my question : .. . .. . Is there a way I can tell from the 2nd page which button was pressed to submit the request", "The second page could then evaluate the value of that hidden text box .", "In your search page : - .. . .. . Note the lack of a runat server tag on the form .", "Can t you do it on the results page where such stuff would logically sit", "Example assuming there is a public property named Test on the PreviousPageName Source page :", "Store the previous page s values in the ViewState on the initial page load .", "And any pages that implement this method would need to be of that type of page", "You shoud use .. . .. . instead of .. . .. . see it on MSDN http : msdn.microsoft.com en-us library ms228169 28v vs.90 29.aspx .. . .. . EDIT : Chek this URL http : www.developerscode.com 2011 03 cross-page-posting-of-form-contents-for.html for more Details on accessing types. .", ".NET has nothing to do with what is on the page .", "Press the Next button to transfer to the Target page .. . 5 .", "Strongly-typing the previous page is not an option in this case .", "The main reason I m asking is I d like to re-use the 2nd page s logic in parsing the information from the first page if possible I d rather not have to copy it to a new page and have the new button post to that .", "I ve been told that for situations of this sort all I had to do is access the PreviousPage property in the destination page and this would trigger the load event of the previous page but for some reason this doesn t seem to be working .", "This made the previous page null .", "I have a page Control.aspx where I am loading templates controls based on query-string parameters .", "I don t have access to the controls contained on the Control.aspx page except when they are rendered on Default.aspx .", "That would be easiest as you would have two methods : .. . .. . and .. . .. . When you re using the cross-page posting you lose some of the context .", "But the ViewState is no longer available on the next page .", "I think you are correct that the issue here appears to me that OP is getting bumped to an extensionless url so when the framework looks for cross-page postbacks going to the extensionless url it can t find any because the destination without the extension is technically not the same as the page defined in the PostbackUrl .", "Anyway the issue here appears to me that OP is getting bumped to an extensionless url so when the framework looks for cross-page postbacks going to the extensionless url it can t find any because the destination without the extension is technically not the same as the page defined in the PostbackUrl .", "If you re simply trying to determine which button on the sending page was clicked it could be done with the querystring : .. . .. . Page1.aspx : .. . .. . Page2.aspx.cs :", "The problem i m running into is that if I have any postbacks on my page the PreviousPage information seems to be lost .", "UPDATE : .. . .. . Most of the answers to questions raised about refreshing the page mention using Response.Redirect .", "For example : .. . .. . Page 1 could have a form with various text inputs and two hidden fields Hidden1 + Hidden2 which are empty .", "The line document.aformiam.action targetURL is directly referenceing the form element on the page ." ] }
{ "confidence": [ 103.2222900390625, 70.0251235961914, 68.13948059082031, 67.41670989990234, 63.39958190917969, 62.915435791015625, 61.745361328125, 57.815643310546875, 57.51030731201172, 57.217803955078125, 57.00404357910156, 55.07493591308594, 51.915771484375, 50.208526611328125, 50.099365234375, 49.44267272949219, 49.35535430908203, 47.76481246948242, 47.500343322753906, 46.043495178222656 ], "content": [ "Question : I have a few questions about cross-page posting in ASP.NET : .. . .. . What is cross-page posting in ASP.NET When should I consider using it in my web application What are pros and cons of cross-page posting .. . Answer : Basically cross-page posting means that you are posting form-data to another page as opposed to posting form-data back to the same page as is the default in ASP.NET . This can be useful when you want to post data to another page and don t want to incur the overhead of reloading the current page simply to redirect the user to another page via an HTTP 302 i.e . Response.Redirect . For a more information please see Cross-Page Posting in ASP.NET Web Pages http : msdn.microsoft.com en-us library ms178139.aspx : .. . .. . By default buttons and other controls that cause a postback on an ASP.NET Web page submit the page back to itself . This is part of the round-trip cycle that ASP.NET Web pages go through as part of their normal processing . For details see Introduction to ASP.NET Web Pages . .. . Under some circumstances you might want to post one page to another page . For example you might be creating a multi-page form that collects different information on each page . In that case you can configure certain controls those that implement the IButtonControl interface such as the Button control on the page to post to a different target page . This is referred to as cross-page posting . Cross-page posting provides some advantages over using the Transfer method to redirect to another page . For details see Redirecting Users to Another Page . Comment : True . +1 to Andrew . Cross-page posting was the order of the day in classic ASP . Initially .NET 1.1 this was missing .", "Question : I m using the asp.net PreviousPage functionality and cross-page postback . The problem i m running into is that if I have any postbacks on my page the PreviousPage information seems to be lost . I don t want to put it in ViewState because that will be quite large . I ve thought about Session but I don t want the data to persist after i ve moved on to another page and I really don t like the idea of putting code in all my other pages to delete old session variables . What methods do you use to retain this sort of information that was passed in via cross-page postback UPDATE : .. . .. . Most of the answers to questions raised about refreshing the page mention using Response.Redirect . I can t use this because it will cause a Get rather than reposting the informaiton that was posted to the page via cross-page postback resulting in a loss of this information and preventing me from pupulating my controls with the selection criteria of the previous page . I need to update the data in the grid while retaining the postback information . I thought about using AJAX but that s not really an acceptable solution right now per customer requirements . I need to click a button and refresh the page as-if it was newly posted and i don t really see a way to re-submit a postback short of F5 and then clicking the dialog to accept reposting of data . .. . Answer : Store the previous page s values in the ViewState on the initial page load . Comment : I said I don t want to store it in viewstate because it s a lot of data . That wil create a gigantic viewstate that must be sent to the user and back . Comment : sorry i didn t read that sentence in the first paragraph . I would create a Session object then then destroy it when you re done with it . It doesn t have to persist throughout the rest of your app . Comment : Not really the answer i m looking for but nobody else is suggesting anything.. . so you get the answer .", "Question : my website uses cross page postback from page to page to access information from the previous page . i am wondering if it is possible to do cross page postback when clicking on the links in a sitemappath as it seems it is simply doing a response.redirect which is causing the PreviousPage to be null . .. . Answer : I thought the whole idea of Cross Page Posting was to allow postbacks to a page that is not the source page and to do so you have to set the PostBackUrl property of a control . To my knowledge the siteMapNode element doesn t have the PostBackUrl property . I d imagine that only controls that have PostBackUrl exposed can take advantage of Cross Page Posting . But hey I ve been wrong before", "Question : I am experimenting with cross-page posting by following this MSDN article http : msdn.microsoft.com en-us library ms178139.aspx . I have this code : .. . .. . CrossPagePosting1.aspx .. . .. . CrossPagePosting2.aspx .. . .. . CrossPagePosting2.aspx.cs .. . .. . This code above produces a NullReferenceException at Page.PreviousPage . Why This is an ASP.Net 4.0 application . It uses FriendlyUrls which is the default . NOTE : I do NOT want the previous page to be strongly-typed e.g . using the PreviousPageType directive . According to the referenced article this shouldn t be necessary . .. . Answer : I think following article will helps you . http : csharpdotnetfreak.blogspot.com 2009 08 cross-page-posting-in-aspnet.html .. . .. . there are two method how to use Cross Page Posting PostBack Comment : I read that article before posting my question . It does not offer any solutions to my problem as far as I can see . Do you see any specific issues with my code Comment : your code is fine.i think you can only do this with PreviousPageType directive adding in your page.see link cosnetics.co.uk articles cross-page-posting-not-working http : www.cosnetics.co.uk articles cross-page-posting-not-working Comment : Strongly-typing the previous page is not an option in this case . Comment : In my case I was pointing to wron URL webblogsforyou.com http : www.webblogsforyou.com crosspagepostback-access-previouspage-controls-to-nextpage-in-asp-net article helps me to do so .", "Question : I have a web page that uses cross-page-posting to post to a different target page . A new requirement has arisen that means that there could be 4 different target pages to post too depending on what data was entered on the client . Is it possible to somehow change the cross-page-posting target dynamically on the client From looking at the source html I guess it would be possible to use jquery to manipulate the postback target on the submit button but this seems a bit of a hack . What are my alternatives rewrite the pages to remove cross-page posting and do a response redirect passing the data in session .. . Answer : You may try changing the action attribute of your form using JavaScript just before form submission . Unfortunately most browsers do not support POST redirection . Even RFC notes http : www.w3.org Protocols rfc2616 rfc2616-sec10.html sec10.3.3 : .. . .. . RFC 1945 and RFC 2068 specify that the client is not allowed to change the method on the redirected request . However most existing user-agent implementations treat 302 as-if it were a 303 response performing a GET on the Location field-value regardless of the original request method . The status codes 303 and 307 have been added for servers that wish to make unambiguously clear which kind of reaction is expected of the client . So IMHO the choices are limited to either JavaScript action modification or re-POSTing data from your server your server accepts the POSTed data analyzes it and performs POST by itself . Storing data in session or just returning it on POST and then re-POSTing it from the client requires either JavaScript support to automatically submit the form or making user click submit button one more time . You may consider using this method as a fallback though . Make default action point to your fallback script . If you succeeded to modify action before submission everything is okay at this point . If something failed like in case JavaScript being disabled make your fallback script output page with a hidden data field so it should not be modified anymore and visible submit button POSTing data to a proper location .", "Question : I have a few questions about cross-page posting in ASP.NET : .. . .. . What is cross-page posting in ASP.NET When should I consider using it in my web application What are pros and cons of cross-page posting .. . Answer : Cross - page posting is targeting a different page from the original page . ASP.NET is based on the post-back model where the same page that sent it to you processes the response . COnsider using it when you have lots of entry points that need the same processing . Pros : single point of handling common routine Cons : pages are hard-linked and have intimate knowledge . AKA coupling .", "Question : Is it possible to use cross-page postbacks or a similar method perhaps Server.Transfer to post form-data say Data-set A to a page which then allows the user to add some additional information say Data-set B and then postback to the original page the complete set of data A+B which then flows through the normal event execution process similar to as-if all data A+B was submitted on the original page to itself in a normal postback I don t want the second page to have any type knowledge of the original page it just needs to supply two additional feeds and send the data on . This way different pages and controls could use this method for gaining additional data . For example : .. . .. . Page 1 could have a form with various text inputs and two hidden fields Hidden1 + Hidden2 which are empty . When the form on page 1 is submitted the user is presented with page 2 they complete that page and then all the form-data from page 1 is posted back to page 1 but with the hidden fields 1 + 2 complete . Page 1 then has all the information it needs to complete . I m thinking that perhaps page 2 just needs to use PreviousPage and take its post data add to it and then post it back to page 1 but as-if it came from Page 1 and not Page 2 . But I m not sure if this is possible and ASP.NET might read this as tampered data This is similar to this question http : stackoverflow.com questions 2467709 crosspage-postback-in-series-of-web-pages but in that example each page is specfic to the previous page . Happy to reword this if I m not particularly clear.. . .. . Answer : You first create a class that keep your information and its going to move from page to page and fill with data . In every page you have a reference to this class a variable that ether create a new ether get it from the previous page . You store it on ViewState .. . .. . Now from Page1 - Page2 . You send it from Page1 by set to the .. . .. . On page2.aspx you set where you can get informations .. . .. . and you get them by.. . .. . .. . And one other manual way is to make your class seriable send it as xml via post and decode it on the next page . Comment : Hm I wonder if this could work if an abstract-class holds the two fields that would be populated by page 2 so that page 2 doesn t need to know about the other fields it can just fill those in and pass it on . I don t want Page 2 to know about Page 1 though instead of specifying the virtual path perhaps it could just cast PreviousPage to a specific type of Page that has a public property of the type of that abstract-class And any pages that implement this method would need to be of that type of page Comment : @PirateKitten then just send them as xml or your simple string struct from one to the other .", "Question : I am experimenting with cross-page posting by following this MSDN article http : msdn.microsoft.com en-us library ms178139.aspx . I have this code : .. . .. . CrossPagePosting1.aspx .. . .. . CrossPagePosting2.aspx .. . .. . CrossPagePosting2.aspx.cs .. . .. . This code above produces a NullReferenceException at Page.PreviousPage . Why This is an ASP.Net 4.0 application . It uses FriendlyUrls which is the default . NOTE : I do NOT want the previous page to be strongly-typed e.g . using the PreviousPageType directive . According to the referenced article this shouldn t be necessary . .. . Answer : The reason this is happening is simply because you did not set the postbackurl property correctly . If CrossPagePosting2.aspx is at root of your program change postbackurl to CrossPagePosting1.aspx .. . .. . You do not need to add the @ PreviousPageType directive when using postbackurl property . using PreviousPage.FindControl id will search the form elements that are posted using postbackurl property Comment : The original problem of the previous page reported as null is not related to the postback url in this case but to the use of routes with friendly urls", "Question : Currently I have two pages : .. . .. . The first page contains an input form and the 2nd page generates an excel document . The input form s button posts to this 2nd page . What I d like to do is add a second button which also posts to the 2nd page however I ll need requests created from this new button to act differently which brings me to my question : .. . .. . Is there a way I can tell from the 2nd page which button was pressed to submit the request The main reason I m asking is I d like to re-use the 2nd page s logic in parsing the information from the first page if possible I d rather not have to copy it to a new page and have the new button post to that . Thanks .. . Answer : If this is just pure HTML and your form action attribute points to the 2nd page.. . .. . .. . You simply need to have two different submit buttons with the same name attrib and two different value attribs . When either button is clicked it ll submit the form fields to the second page . Checking the value of the posted element with the submit button s name will tell you which one was clicked . If we re talking ASP.NET as your title and tag suggests you can handle the server-side click event of each button in a postback to determine which one was clicked . But submitting an ASP.NET form to a second page isn t necessarily simple . See the Scott Guthrie post http : weblogs.asp.net scottgu archive 2007 02 26 tip-trick-url-rewriting-with-asp-net.aspx on URL Rewriting specifically the section near the end about overriding the form tag s action attrib . Comment : At the moment it s setup so that the first page has no real logic the button has its PostBackUrl attribute set to the 2nd page where the 2nd page uses Page.PreviousPage to get the values of what was posted", "Question : I have a web page that uses cross-page-posting to post to a different target page . A new requirement has arisen that means that there could be 4 different target pages to post too depending on what data was entered on the client . Is it possible to somehow change the cross-page-posting target dynamically on the client From looking at the source html I guess it would be possible to use jquery to manipulate the postback target on the submit button but this seems a bit of a hack . What are my alternatives rewrite the pages to remove cross-page posting and do a response redirect passing the data in session .. . Answer : Yes you can certainly change the action of the form . I ll walk you through how to do it . First your form must have a name and an action URL specified in the HTML : .. . .. . Next you re going to want to run some JavaScript on form submission so you should set the onClick property of your submit button to a function such as the following : .. . .. . Finally is your JavaScript function to actually change the form action and submit the form . Note that in the last step where we return true this submits the form because the input element s type is submit and the function is triggered by the onClick event . If this were for example a button type input element or an a tag or img then we would need to trigger the form to submit using something like the following : .. . .. . This solution will work to change the action and submit to a single URL . If you need to post to multiple URLs at once you will have to make use of other methods such as XMLHttpRequest . If this is the case post a comment indicating so and I ll provide an example for that . Comment : Thanks Dustin just wondering if this will work in the .net scenario as the action is not specified on the form instead it is part of a javascript function-call on the submit button click event . Comment : .NET has nothing to do with what is on the page . Think about how HTTP works . It s all request and response . The client browser forms and sends a request and the server receives and processes it doesn t matter if your server-side code is .NET PHP or BASIC for all I care . The action is set in the js function but it still ends up in the HTML form - that is what you are setting it to . It literally overwrites the original value when it is set . The line document.aformiam.action targetURL is directly referenceing the form element on the page . Hopefully this clears up some confusion .", "Question : null .. . Answer : I am wondering if there is a way to perform a cross page postback while maintaining the source event and viewstate . Below is a longer explanation . I have a page Control.aspx where I am loading templates controls based on query-string parameters . I access this page through a JQuery AJAX GET request to render this template control inside a container on another page Default.aspx . Because of this I can end up having Control1 Control2 and Control3 all on Default.aspx . I would like the buttons of Control1 to post back to Control.aspx id 1 the buttons of Control2 to post back to Control.aspx id 2 and so on and I want events to be fired as they would normally . I don t have access to the controls contained on the Control.aspx page except when they are rendered on Default.aspx . I also have to avoid iframes because of their inability to scroll cleanly on mobile-safari . I can give more detailed information if it s needed . Thanks for any help you can provide .", "Question : I m new to ASP.NET and I m having a problem getting a listbox to return the proper data when posting to another page . I have gotten dropdownlists and radio buttons to work . For instance for dropdownlists I simply did this : .. . .. . Then on the next page I successfully returned the value using PreviousPage.SiteID . However when I try this for a listbox : .. . .. . then call it using PreviousPage I get an empty string as SelectedIndex is always returning -1 even though I select an item in the listbox . .. . Answer : The SelectedValue is read from the ViewState on postback . But the ViewState is no longer available on the next page . Why don t you save the SelectedValue in Session so you can refer to it on the next page", "Question : I am experimenting with cross-page posting by following this MSDN article http : msdn.microsoft.com en-us library ms178139.aspx . I have this code : .. . .. . CrossPagePosting1.aspx .. . .. . CrossPagePosting2.aspx .. . .. . CrossPagePosting2.aspx.cs .. . .. . This code above produces a NullReferenceException at Page.PreviousPage . Why This is an ASP.Net 4.0 application . It uses FriendlyUrls which is the default . NOTE : I do NOT want the previous page to be strongly-typed e.g . using the PreviousPageType directive . According to the referenced article this shouldn t be necessary . .. . Answer : The problem here was being caused by FriendlyUrls which were installed by default on the test site I was working in . I disabled FriendlyUrls and it worked .", "Question : I am experimenting with cross-page posting by following this MSDN article http : msdn.microsoft.com en-us library ms178139.aspx . I have this code : .. . .. . CrossPagePosting1.aspx .. . .. . CrossPagePosting2.aspx .. . .. . CrossPagePosting2.aspx.cs .. . .. . This code above produces a NullReferenceException at Page.PreviousPage . Why This is an ASP.Net 4.0 application . It uses FriendlyUrls which is the default . NOTE : I do NOT want the previous page to be strongly-typed e.g . using the PreviousPageType directive . According to the referenced article this shouldn t be necessary . .. . Answer : I found that Friendly URLS might get you this problem . By default the Web Forms template includes ASP.NET Friendly URLs . When you use the default WebForm from visual Studio the AutoRedirectMode is set to Permanent . This makes you request into a GET and since you are using Friendly URLS you can t evaluate the PreviousPage . Workarounds : .. . .. . If you want a POST action then set the AutoRedirectMode RedirectMode.Off this will give you PreviousPage info but only from non-Friendly-Url pages ex : www.you.com mypage.aspx however this will get you an error if you try to access the Friendly-Url page ex : www.you.com mypage no .aspx . If you want the PreviousPage information you will have to set the previous post directive in you webpage @ PreviousPageType VirtualPath Page1.aspx OR maybe use the Server.Transfer in a OnClick Method .", "Question : Notes : .. . .. . I am using asp.net-4.5 .. . I am using a master page .. . FriendlyURLs is installed by default .. . I am trying to cross page post using the POST method .. . .. . On the target url it comes back with PreviousPage null .. . .. . Is this due to FriendlyURls source : .. . .. . target : .. . .. . EDIT : I eventually used this code to solve my problem : .. . .. . .aspx .. . .. . code-behind .. . Answer : Your issue is not really due to FriendlyUrls your issue is because you are using routing in your app you would have the same issue if you defined routes manually instead of letting FriendlyUrls wire them up for you . If you change the PostbackUrl property to whatever route your app is using for that page NewApplicationConfirmation possibly then PreviousPage will no longer be null . However due to the way ASP.NET validates the previous page if you have a route alias set up for that page you may run into more issues . I would say you should either use PreviousPage and no routing or routing and change your code to look at Request.Form for the values posted to it . Comment : What a mess . To avoid this I have have used server.transfer -- which avoids for some reason the issue and previouspage works and findcontrol works and I don t need to disable friendlyurls and routing works . I think you are correct that the issue here appears to me that OP is getting bumped to an extensionless url so when the framework looks for cross-page postbacks going to the extensionless url it can t find any because the destination without the extension is technically not the same as the page defined in the PostbackUrl . Comment : @WillHoward You may run into issues with back etc . with Server.Transfer depending on how you ve implemented it . It might be better to switch your implementation to use Request.Form input instead of using FindControl on PreviousPage . Or you could have it post back to the same page though I m sure you have a reason for doing a cross-page post .", "Question : Scenario .. . .. . I have a site where users can register for a course I m developing a new feature allowing existing students to login with an email password and register using their previous details . Architecture .. . .. . Register.aspx contains an email and password textbox a login button and a forgot-password button . Completing the email and password and clicking the login button results in a cross-page postback to the login.aspx page . Clicking the forgot-password button also results in a cross-page postback to the login.aspx page . Knowing that PreviousPage will be an instance of the code-behind class for the Register.aspx page how can I distinguish between the two events Login Forgot Password in the Page Load for the Login.aspx page Comment : @M M Don t necessarily agree with the recent edit why tag with forms That maybe the solution you proposed but don t think it necessary to tag the question with it Comment : I gave this some thought on the retag . My main goal was to increase the profile of your question so you might get more answers . The original tags are a bit specialized and may not be visible to helpful folks who subscribe to broad tags like asp.net . You re clearly asking about asp.net likely webforms since you were talking about code-behind pages which are less common in MVC . Generic html forms may be too broad I agree . Since you didn t post any code I wasn t quite sure how you had implemented your forms so I wanted to err on the side of making your question more visible to SO users . .. . Answer : Why not handle the button logic in the code-behind then use transfer That would be easiest as you would have two methods : .. . .. . and .. . .. . When you re using the cross-page posting you lose some of the context . You could add that back however in the control definition e.g . Which you can then read like this : Comment : I m working within a n asp.net webform don t want to be tinkering with the form defintion i.e . changing the action attribute Comment : In that case just put a parameter in the control action e.g . asp : Button runat server Text Login PostBackUrl login.aspx cmd login Comment : that s the solution I settled on in the end thanks for your help", "Question : null .. . Answer : I am getting the dreaded exception Cannot unregister UpdatePanel with ID UpdatePanel since it was not registered with the ScriptManager when trying to combine a popup window and some Cross-Page Posting . I ve been able to reproduce the problem with a small example . I have seen other questions that handle the Unload event for the UpdatePanel but that doesn t seem to work with the addition of the Cross Page Posting . How do I get around this issue .. . .. . To duplicate the issue with the code below : .. . .. . 1 . Start the Setup page .. . 2 . Press the View Popup link .. . 3 . Close the popup .. . 4 . Press the Next button to transfer to the Target page .. . 5 . Press the Back button to transfer to the Setup page .. . 6 . Press the View link and close the popup .. . 7 . Press the Next button and see the failure .. . .. . Here are the highlights forgive the length but it should be cut-and-pastable : .. . .. . Setup.aspx .. . .. . Setup.Aspx.cs .. . .. . ViewData.aspx .. . .. . ViewData.aspx.cs .. . .. . TargetPage.aspx .. . .. . TargetPage.aspx.cs .. . .. . As you can see it s enough to have the UpdatePanel just sitting on the page and doing nothing for this error to occur . Comment : No offense but you omitted to specify a question . Great user name BTW Comment : @AnnL . None taken . Updated and specified that I want to not have this behavior .", "Question : I m new to ASP.NET and I m having a problem getting a listbox to return the proper data when posting to another page . I have gotten dropdownlists and radio buttons to work . For instance for dropdownlists I simply did this : .. . .. . Then on the next page I successfully returned the value using PreviousPage.SiteID . However when I try this for a listbox : .. . .. . then call it using PreviousPage I get an empty string as SelectedIndex is always returning -1 even though I select an item in the listbox . .. . Answer : I had a similar situation . I used user252340 s approach and store the value : .. . .. . and then in the PageLoad of the other page get the value : .. . .. . Hope this helps", "Question : I m working on a wizard-like set of page and I m relying on cross page postbacks to navigate between them . I need to be able to trigger the Load event on the previous page in order to save the form-data for the page . I ve been told that for situations of this sort all I had to do is access the PreviousPage property in the destination page and this would trigger the load event of the previous page but for some reason this doesn t seem to be working . Is there anything else I can do to explicitly trigger the load event on the previouspage if the PreviousPage property is not null Thanks for your help .. . .. . Yong .. . Answer : This sounds a little confusing to me but if you are wanting access to data it s best to save that data into something that you can easily get to like the ASP.NET session cache . So instead of going back to a previously navigated page in order to get data you will cache the data the first time you reach the first page and then when the user navigates to the 2nd page it will have access to that information .", "Question : Notes : .. . .. . I am using asp.net-4.5 .. . I am using a master page .. . FriendlyURLs is installed by default .. . I am trying to cross page post using the POST method .. . .. . On the target url it comes back with PreviousPage null .. . .. . Is this due to FriendlyURls source : .. . .. . target : .. . .. . EDIT : I eventually used this code to solve my problem : .. . .. . .aspx .. . .. . code-behind .. . Answer : You need to add the directive : .. . .. . See the documentation https : msdn.microsoft.com en-us library vstudio ms228169 28v vs.100 29.aspx from Microsoft on working with PreviousPages . You could try the tips in this Microsoft article https : msdn.microsoft.com en-us library 6c3yckfw 28v vs.100 29.aspx as well Comment : This will only make the PreviousPage property a strongly-typed property but it will still be null . Comment : Actually I thought you were talking about using the PreviousPageType directive . This will only strongly-type the Master page which isn t even being referenced by the code Comment : D oh Looked up the wrong type.. . need...more...coffee.. . Comment : I ve never gotten PreviousPage to work without strongly typing it...but I m on .NET 4.0 I don t know if this has changed in 4.5...and since the OP is trying to get to the master on the previous page I think he needs a reference to the master there too . Comment : Yeah if you need to get at a specific property of the page you need to strongly type it . As for the master page OP can t even get to that area of the code but it shouldn t need to be typed since the MasterPage type implements control exposing FindControl . Anyway the issue here appears to me that OP is getting bumped to an extensionless url so when the framework looks for cross-page postbacks going to the extensionless url it can t find any because the destination without the extension is technically not the same as the page defined in the PostbackUrl ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
upx@executable@49
upx -- upx ultimate packer for executables is a @placeholder packer that is used to compress executable files .
{ "confidence": [ 82.94134521484375, 68.73204040527344, 68.47079467773438, 58.454837799072266, 54.756893157958984, 52.51515197753906, 48.85585403442383, 48.732879638671875, 48.70795822143555, 48.693328857421875, 47.365631103515625, 47.32195281982422, 47.21706771850586, 46.612037658691406, 46.23207092285156, 46.137306213378906, 45.601863861083984, 45.601863861083984, 45.556007385253906, 45.361289978027344, 45.09699249267578, 44.9044189453125, 44.89246368408203, 44.800689697265625, 44.77016067504883, 44.07859802246094, 44.07859802246094, 43.8364372253418, 43.659915924072266, 43.27695846557617, 42.79996871948242, 42.526336669921875, 42.526336669921875, 42.526336669921875, 42.517127990722656, 42.517127990722656, 42.517127990722656, 41.549259185791016, 41.549259185791016, 41.37635040283203, 40.88874053955078, 40.806766510009766, 39.90742874145508, 39.78837203979492, 39.78837203979492, 39.287445068359375, 38.81067657470703, 38.78217697143555, 38.64759826660156, 38.64759826660156, 38.509742736816406, 38.509742736816406, 38.509742736816406, 38.509742736816406, 38.509742736816406, 38.509742736816406, 38.48749542236328, 38.313499450683594, 38.1315803527832, 38.04267501831055, 38.04267501831055, 37.909950256347656, 37.51775360107422, 37.51775360107422, 37.51775360107422, 37.36896896362305, 37.36896896362305, 37.36896896362305, 37.36896896362305, 37.231201171875, 37.11786651611328, 37.11786651611328, 37.11786651611328, 37.11786651611328, 37.11786651611328, 37.11786651611328, 37.11786651611328, 36.85334396362305, 36.17776107788086, 36.15050506591797, 36.090431213378906, 36.0017204284668, 35.92182922363281, 35.92182922363281, 35.497413635253906, 35.497413635253906, 35.4754524230957, 35.398292541503906, 35.398292541503906, 35.398292541503906, 35.398292541503906, 35.398292541503906, 35.398292541503906, 35.398292541503906, 35.398292541503906, 35.398292541503906 ], "content": [ "UPX is a packer for executables .", "Can I use upx packer to compress a commercial program", "@mox this response is specific to the UPX packer .", "so if read these sections and compare the name with the string UPX you can determine if the exe was compressed using the UPX packer .", "However compression whether you use UPX or another executable packer or Windows filesystem compression has side effects .", "UPX will not affect the ability of major anti-virus software as they support UPX-compressed executables as well as other executable compression formats .", "I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well .", "As the author of a commercial PE compressor PECompact I can say that every packer should support DEP fully - including UPX .", "When compile the test.c C language source and compress it with UPX in Linux not windows .", "Try the following switch with upx : .. . .. . --compress-exports 0", "I have also same problem when I m trying use only upx packer : ...Every time .", "It s not a zip file the program isn t a standard self-extracting archive it s rather packed with some other PE packer and ALSO an UPX as I mentioned above the UPX header is also present .", "upx is not-responding to sent files", "To Enzo : you should better not use UPX over Delphi executables .", "That s why there is an exception to GPL in UPX license : .. . .. . SPECIAL EXCEPTION FOR COMPRESSED EXECUTABLES .. . .. . The stub which is imbedded in each UPX compressed program is part of UPX and UCL and contains code that is under our copyright .", "I m using the UPX compressor to compress my application written in Delphi XE .", "executable uncompressed by UPX http : i.stack.imgur.com CptR8.jpg .. . .. .", "executable compressed by UPX http : i.stack.imgur.com KbFO2.jpg", "Please have a look at the UPX license http : upx.sourceforge.net upx-license.html .", "This is not something that works by chance UPX is intended to compress Win32-PE and many other formats whether that s executables or DLLs .", "It is list in Terminal : UPX : test.so NotCompressibleException .", "Running additional packers or obfuscators may further modify the section names however by default the UPX packer will-change the section names described above .", "I thought UPX only worked with end executables not libraries. .", "with UPX for Linux .", "My problem is that I can t compress the PIE executable with UPX because it says the executable format is unknown .", "My guess is UPX Shell just wraps the UPX compressed PE in another layer .", "So just try : gcc -static -o mytest mytest.c and then upx -o mytest-upx mytest .", "Unfortunately I m not able to decompress it with upx latest it says not packed by UPX .", "UPX is not for protection .", "If someone wants to modify the EXE then they will see it is compress with UPX and then uncompress it .", "UPX cannot handle binaries under 40Kb .", "What is your motivation for using UPX", "How did you invoke UPX", "Are you using special UPX switches", "Is it really necessary to use UPX", "try to uncompress it with upx", "Are there any UPX forks for Android", "Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g .", "UPX compression algorithm is at least equal to LZMA for compressing individual executable file .", "UPX supports decompressing too .", "You must compress your program with a completely unmodified UPX version either with our precompiled version or at your option with a self compiled version of the unmodified UPX sources as distributed by us .", "The program runs smoothly without UPX .", "If I do not call the method then UPX can write the files with no problem .", "Try looking at UPX unpacker source-code i am sure an algorithm for UPX detection should be there", "If the function IsUPXCompressed is called then you try to run upx upx can not save the file it modifies .", "This embeds a signed marker into the file that identifies the licensee of the packer as well as the packer vendor .", "Download upx source code from UPX Homepage http : upx.sf.net and open src p w32pe.cpp file the function you are looking for is .. . .. . This function checks if the file is compressed with win32 upx .", "Note to Zifre : UPX is GPL but it s not the same as creating an image with GIMP since part of the UPX code is added to the commercial application the decompressing part .", "+1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus .", "If you don t want UPX to cause your app to be identified as being a virus stop using UPX .", "and after is known to work OK with UPX below not .", "What happens if you don t Use UPX", "Right now I am starting with UPX .", "Does anyone know how to detect UPX on Linux", "The section names are not included the UPX word always .", "What did UPX do to the binary that resulted in this breakage", "I have used UPX on software and McAfee will flag the file as having a virus .", "I m surprised this hasn t been mentioned yet but using UPX-packed executables also increases the risk of producing false-positives from heuristic anti-virus software because statistically a lot of malware also uses UPX .", "In the source code to UPX there s a function int PackW32Pe : : canUnpack which is first ran as a test right when you do a upx -d file unpack executable .", "His tool is named UPX shell and was at http : bash.x2i.net but website is down for now it is not the same as upxshell.sourceforge.net His tool has option Protect file from decompression and it works just great even with latest UPX", "I tried to use UPX to unpack the binaries but I have got the following message for all of them : .. . .. . NotPackedException : not packed by UPX .. . .. . Does that mean UPX can t unpack these binaries", "Virus scanners that look for unknown viruses can flag UPX compressed executables as having a virus .", "When I deliver the app I compress the dlls via upx http : upx.sourceforge.net .", "It won t make your program statically linked because that would actually increase its size where the goal of UPX is to compress .", "But whenever I use upx and scan my application after compress its shows that this application has virus .", "So UPX is not a good solution for file size .", "I have a file which is UPX packed .", "Unpackers such as UPX need to place the unpacked image somewhere .", "Now i see that some people are using UPX .", "@Shelwien when you re reading a Win32 executable header to see if it s been compressed by UPX why does portability matter", "There s a special exception for commercial applications so they can use UPX .", "The thing with UPX is that a loader stub gets included to your program .", "This also implies that the UPX stub must be completely unmodfied i.e .", "How can I read the file version from a UPX compressed EXE", "I use no switches just upx myfile.exe I will try that flag though", "I wanted to decompress a UPX file available to download from this link .", "This is the message : .. . .. . The question is how can I decompress this file using UPX tool", "I got the script here : http : nsis.sourceforge.net Invoking NSIS run-time commands on compile-time .. . .. . Recently I started using UPX to compress the EXE of the application .", "upx shell from russian guy doesn t have command-line interface at all which is needed for automatically compressing files with Visual Studio Post-Build .", "When I just declare .. . .. . in my program and then compress .exe file with UPX the compression succeeds .", "Some people may be more suspicious of your executable just because it is compressed with UPX .", "But why do you even use upx", "UPDATE : Note that as the Taggant project is completed the ability to use UPX or anything else without causing false positives will be enhanced assuming UPX supports it .", "The problem is that malware often uses UPX to reduce size and try to conceal content and therefore all of the virus scanners look for signs of UPX .", "If you are looking to stop people from cracking your software then even the Russian guy s UPX Shell won t help .", "If this is the case just use another PE compressor on top of UPX like PECOmpact http : pecompact.com pecompact.php", "I have experienced significant increases in start up time when UPX compressed executables are run on systems with certain virus scanners .", "I m having problems using madExcept + UPX on Delphi 2007 .", "I opened it with some hex editor and it contains UPX1 section and 3.00 UPX", "UPX changes them to UPX0 UPX1 UPX2 I believe .", "If not how to access the headers and get that UPX string name of the header", "It shows which offsets are to be tested to detect if a file was packed with UPX .", "You can download the source code for UPX on the project site http : upx.sourceforge.net .", "Is there a method to determine if an exe file has been compressed with UPX", "You you call it then try to run UPX it will not save the file .", "UPX reports an IOException Permission denied error when trying to write the file ." ] }
{ "confidence": [ 80.42597198486328, 79.89837646484375, 79.4972152709961, 75.67864990234375, 74.55406951904297, 72.64707946777344, 71.11176300048828, 69.58396911621094, 69.39952087402344, 69.1886215209961, 69.11322784423828, 68.70984649658203, 68.5703125, 68.26302337646484, 68.15805053710938, 68.01490783691406, 67.19950866699219, 67.13886260986328, 67.05742645263672, 66.4891128540039 ], "content": [ "Question : Can I use upx packer to compress a commercial program Or does GPL restrict me from doing that .. . Answer : Yes you can . Please have a look at the UPX license http : upx.sourceforge.net upx-license.html . There s a special exception for commercial applications so they can use UPX . Note to Zifre : UPX is GPL but it s not the same as creating an image with GIMP since part of the UPX code is added to the commercial application the decompressing part . That s why the exception in the license is required . Comment : You could have just commented on my answer . But you re right I forgot about the exception for the stub .", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : I believe there is a possibility that it might not work on computers that have DEP http : en.wikipedia.org wiki Data Execution Prevention Data Execution Prevention turned on . Comment : As the author of a commercial PE compressor PECompact I can say that every packer should support DEP fully - including UPX . I can t say for sure that it does but surely it does -- that was an issue from years ago .", "Question : Can I use upx packer to compress a commercial program Or does GPL restrict me from doing that .. . Answer : The thing with UPX is that a loader stub gets included to your program . That s why there is an exception to GPL in UPX license : .. . .. . SPECIAL EXCEPTION FOR COMPRESSED EXECUTABLES .. . .. . The stub which is imbedded in each UPX compressed program is part of UPX and UCL and contains code that is under our copyright . The terms of the GNU General Public License still apply as compressing a program is a special form of linking with our stub . .. . Hereby Markus F.X.J . Oberhumer and Laszlo Molnar grant you special permission to freely use and distribute all UPX compressed programs including commercial ones subject to the following restrictions : .. . .. . 1 . You must compress your program with a completely unmodified UPX version either with our precompiled version or at your option with a self compiled version of the unmodified UPX sources as distributed by us . 2 . This also implies that the UPX stub must be completely unmodfied i.e . the stub imbedded in your compressed program must be byte-identical to the stub that is produced by the official unmodified UPX version . 3 . The decompressor and any other code from the stub must exclusively get used by the unmodified UPX stub for decompressing your program at program startup . No portion of the stub may get read copied called or otherwise get used or accessed by your program .", "Question : I m trying to figure out how to detect whether a binary has been compressed with UPX . I am using a simple CRC to detect whether my app was in any way changed and if the CRC failed on the size due to a packer I would like to detect that as OK . Right now I am starting with UPX . So is there any marker on the binary are there any specific JMP or other instructions that I should search This will mainly be tested in Windows but in the future I might add it to Linux as well . Any help and code is appreciated . ADDED : .. . .. . I found that in the 10 binaries I checked the .. . .. . AddressOfEntryPoint .. . Import Directory RVA .. . Resouce Directory RVA .. . .. . either point to UPX or have an offset that is set by UPX . Any information on this Thanks Comment : Try looking at UPX unpacker source-code i am sure an algorithm for UPX detection should be there Comment : Already did and it s a mess to put it mildly . .. . Answer : You might try checking the section names of the executable . UPX changes them to UPX0 UPX1 UPX2 I believe . Comment : This method is unfortunately not reliable . The sections of some packed encrypted images are renamed to standard traditional sections names . The names of the sections is never interpreted by the Loader . The names of the sections are sometimes even missing aka removed by some tools . Comment : @mox this response is specific to the UPX packer . Running additional packers or obfuscators may further modify the section names however by default the UPX packer will-change the section names described above .", "Question : I ve found an application which seems to be packed . I opened it with some hex editor and it contains UPX1 section and 3.00 UPX string . Unfortunately I m not able to decompress it with upx latest it says not packed by UPX . Is there a way to find out what other PE compressors crypters were used .. . Answer : In many cases a packaged executable starts with the launch program followed by a standard zip file . This is possible because the ZIP header is at the end of the file so you can prepend arbitrary data to a zip file and it remains to be a zipfile . So try unzipping it and see whether that works . Comment : Unfortunately that is not my case . It s not a zip file the program isn t a standard self-extracting archive it s rather packed with some other PE packer and ALSO an UPX as I mentioned above the UPX header is also present .", "Question : Can I use upx packer to compress a commercial program Or does GPL restrict me from doing that .. . Answer : IANAL but the output of a program is not a derivative work . You can compress whatever you want including a commercial program . Edit : Also think of it this way if you couldn t do this then any image you create with the GIMP would have to be under the GPL for example . The GPL only matters when you are distributing the program or a derivative work of it .", "Question : I am trying to reduce my application size with upx using --lzma compression method . But whenever I use upx and scan my application after compress its shows that this application has virus . This is the virus result that comes up .. . .. . Gen : Adware.Heur.RmTfWDj6fzli .. . .. . If I scan the application before using upx application is totally clean and no virus detected . How do I avoid this issue I am using upx 391 from here http : upx.sourceforge.net Comment : Simply put don t use a packer if you want to avoid being targeted by anti malware software . It s really that simple . If you want a small executable then choose a compiler that is more economical . Or remove third party libraries . Comment : You can t . The problem is that malware often uses UPX to reduce size and try to conceal content and therefore all of the virus scanners look for signs of UPX . If you don t want UPX to cause your app to be identified as being a virus stop using UPX . Comment : Thank you @DavidHeffernan and Ken White for the information . .. . Answer : You can t avoid this issue . The problem is that malware authors often use UPX and other packers to reduce size and try to conceal content and therefore all of the virus scanners look for signs of those packers especially UPX because it s readily available . If you don t want UPX to cause your app to be identified as being a virus stop using UPX .", "Question : When I just declare .. . .. . in my program and then compress .exe file with UPX the compression succeeds . But when I try to launch the compressed exe Windows tells me that it s not valid win32 application . There is a bug report for UPX similar bug https : sourceforge.net tracker func detail aid 3256788 group id 2331 atid 102331 but it has different error message The application failed to initialize properly 0xc0000005 . In my case OS thinks the file is corrupted or something so it cant even be started to show errors Why Win7x64 C++ VisualStudio boost 1.47 UPX3.07 .. . .. . strange news : .. . .. . 1 . Unpacking exe makes corrupted exe that throws error exactly the same as here https : sourceforge.net tracker func detail aid 3256788 group id 2331 atid 102331 . The application failed to initialize properly 0xc0000005 And this is for unpacked exe not packed as in bug report . 2 . extern C void tss cleanup implemented void before the inclusion of boost s thread header does not matter . The result is the same . main.cpp : .. . .. . May be someone will try to compile and compress Comment : Well is your build set up with boost such that it results in a 32-bit executable or is it a 64-bit executable UPX on windows does not support 64-bit binaries sourceforge.net tracker http : sourceforge.net tracker func detail aid 2859708 group id 2331 atid 352331 Comment : executable is 32bit Comment : tried another packer it just writes tls callbacks are not supported Comment : Does uncompressing result in getting you a working EXE back As for TLS supposedly UPX supports thread-local-storage since v3.06 Sept 2010 . However if the problem in UPX is related to the handling of thread-local-storage you might be able to work around it by putting extern C void tss cleanup implemented void before the inclusion of boost s thread header as prescribed in this older bug report : svn.boost.org trac boost ticket 1848 https : svn.boost.org trac boost ticket 1848 Comment : @HostileFork I added some info .. . Answer : Bug was repaired in new version 3.08 . It s ok now .", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : I m surprised this hasn t been mentioned yet but using UPX-packed executables also increases the risk of producing false-positives from heuristic anti-virus software because statistically a lot of malware also uses UPX . Comment : UPX is not for protection . Just packing . Comment : Sorry I slurred that a bit . Changed the wording now . Comment : Fully agree . At Free Pascal we get a few such reports that one or the other binary in the distro triggers some avirus an year . We then stopped routinely upxing . Comment : @JohnSmith You are right. . but just FYI you can actually pretty easily shift the UPX-compressed file s entrypoint so default standard UPX unpacking method won t be able to unpack it essentially making it protected look for UPX Scrambler which does that automatically", "Question : I ve found an application which seems to be packed . I opened it with some hex editor and it contains UPX1 section and 3.00 UPX string . Unfortunately I m not able to decompress it with upx latest it says not packed by UPX . Is there a way to find out what other PE compressors crypters were used .. . Answer : Development and Support of PEiD https : tuts4you.com download.php view.398 has been discontinued in April 2011 but it s still the best tool available for Packer detection . you can also use ExeScan .it is available here http : securityxploded.com exe-scan.php .. . .. . ExeScan http : i.stack.imgur.com C7BIg.jpg", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : Virus scanners that look for unknown viruses can flag UPX compressed executables as having a virus . I have been told this is because several viruses use UPX to hide themselves . I have used UPX on software and McAfee will flag the file as having a virus . Comment : McAfee It s the most terrible antivirus software I ve ever used . Stay away Comment : In fact stay away from any virus scanner that is stupid enough to mark every upx compressed file as a virus .", "Question : I recently do some study about executable compression . When compile the test.c C language source and compress it with UPX in Linux not windows . It is list in Terminal : UPX : test.so NotCompressibleException . The source code of test.c is : .. . .. . What am I guessing is that the executable file is too simple to compress Or may be I missed something If there is anyone know about this issue Please tell me the reason . If nobody tell me I have to read source code to find out the issue . Ah reading source code burden . .. . Answer : There are several reasons to output a NotCompressibleException but in your case it is simply because the size of your binary is too small . UPX cannot handle binaries under 40Kb . The best way to workaround this problem is to compile your binary in static mode in order to get a bigger executable file . So just try : gcc -static -o mytest mytest.c and then upx -o mytest-upx mytest .", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : There are three drawbacks : .. . .. . 1 . The whole code will be fully uncompressed in virtual-memory while in a regular EXE or DLL only the code actually used is loaded in memory . This is especially relevant if only a small portion of the code in your EXE DLL is used at each run . 2 . If there are multiple instances of your DLL and EXE running their code can t be shared across the instances so you ll be using more memory . 3 . If your EXE DLL is already in cache or on a very fast storage medium or if the CPU you re running on is slow you will experience reduced startup speed as decompression will still have to take place and you won t benefit from the reduced size . This is especially true for an EXE that will be invoked multiple times repeatedly . Thus the above drawbacks are more of an issue if your EXE or DLLs contains lots of resources but otherwise they may not be much of a factor in practice given the relative size of executables and available memory unless you re talking of DLLs used by lots of executables like system DLLs . To dispell some incorrect information in other answers : .. . .. . UPX will not affect your ability to run on DEP-protected machines . UPX will not affect the ability of major anti-virus software as they support UPX-compressed executables as well as other executable compression formats . UPX has been able to use LZMA compression for some time now 7zip s compression algorithm use the --lzma switch .", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : The only time size matters is during download off the Internet . If you are using UPX then you actually get worse performance than if you use 7-zip http : www.7-zip.org based on my testing 7-Zip is twice as good as UPX . Then when it is actually left compressed on the target computer your performance is decreased see Lars answer . So UPX is not a good solution for file size . Just 7zip the whole thing . As far as to prevent tampering it is a FAIL as well . UPX supports decompressing too . If someone wants to modify the EXE then they will see it is compress with UPX and then uncompress it . The percentage of possible crackers you might slow down does not justify the effort and performance loss . A better solution would be to use binary signing or at least just a hash . A simple hash verification system is to take a hash of your binary and a secret value usually a guid . Only your EXE knows the secret value so when it recalculates the hash for verification it can use it again . This isn t perfect the secret value can be retrieved . The ideal situation would be to use a certificate and a signature . Comment : Size matters on USB stick . Portable apps are one case where it d make sense . Comment : Given the current prices of multi-gigabyte sticks I m not sure size matters there anymore either . Unless you are storing HD video of course . Comment : UPX compression algorithm is at least equal to LZMA for compressing individual executable file . 7-zip only is better if you have several exe dll to compress at once : in this case 7-zip will compress all those files as once therefore gaining some ratio . Comment : Size also matters when using files NOT on a local harddisk . Like on a networkshare or and external harddisk .", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : The final size of the executable on disk is largely irrelevant these days . Your program may load a few milliseconds faster but once it starts running the difference is indistinguishable . Some people may be more suspicious of your executable just because it is compressed with UPX . Depending on your end users this may or may not be an important consideration . Comment : +1 I m always suspicious of packed executables DLLs especially if I can t unpack them .", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : If your only interest is in decreasing the size of the executables then have you tried comparing the size of the executable with and without runtime packages Granted you will have to also include the sizes of the packages overall along with your executable but if you have multiple executables which use the same base packages then your savings would be rather high . Another thing to look at would be the graphics glyphs you use in your program . You can save quite a bit of space by consolidating them to a single Timagelist included in a global data module rather than have them repeated on each form . I believe each image is stored in the form resource as hex so that would mean that each byte takes up two bytes...you can shrink this a bit by loading the image from a RCData resource using a TResourceStream .", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : The reason UPX has so many false alarms is because its open licensing allows malware authors to use and modify it with impunity . Of course this issue is inherent to the industry but sadly the great UPX project is plagued by this problem . UPDATE : Note that as the Taggant project is completed the ability to use UPX or anything else without causing false positives will be enhanced assuming UPX supports it .", "Question : I m trying to build a qt-based software with static-libraries on gnu linux amd64 without success qt is successfuly statically built . Now i see that some people are using UPX . So i tried on a dynamic built and indeed the file command recognizes the binary as statically linked . Can I trust it Should i consider using statifier instead Thanks in advance .. . .. . edit .. . .. . Sorry i was not clear enough . I m trying to build an application using the QT framework but the building script is complex and is made for shared-libraries . I am able to build the application in a binary dynamically linked it s working but i would like to get a binary with static linked libraries . I tried the UPX software http : upx.sourceforge.net as i saw on other topics that it was used in order to transform a binary with dynamic libraries into a binary with static-libraries . But it seems too magic for me is it really working or is it just hiding some stuff and linux thinks the binary is now statically linked Thanks for your answers . Comment : What is the problem with QT Comment : What is the exact problem that you re facing What platform Comment : What buildsystem are you using Why not just pass the static keyword to the underlying compiler as opposed to using upx .. . Answer : No UPX doesn t transform a dynamically linked progam into a staticaly linked one . UPX is a packer for executables . It won t make your program statically linked because that would actually increase its size where the goal of UPX is to compress . However due to the way UPX works tools like file will just see a small statically linked stub . This is UPX s decompression routine . When you start a program compressed with UPX this stub is what will run first instead of the normal main function of your program . The stub itself is statically linked but it will then decompress your program load the dynamic libraries for your program and start it normally . Thus you still need the dynamic librarires to be there or your program will not be loaded correctly after being decompressed . So as you might have guessed it s not actually magic it s just hiding some things to keep the size down . You should consider opening another question if you still have problems with those other libraries .", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : IMHO routinely UPXing is pointless but the reasons are spelled above mostly memory is more expensive than disk . Erik : the LZMA stub might be bigger . Even if the algorithm is better it does not always be a net plus . Comment : It seems memory and disk space aren t impacted very much either way on modern hardware making UPX just an extra complication . In my experience I only save around 500 KB from a 3 MB app especially on Mac where dylib files aren t supported .", "Question : I ve used UPX http : upx.sourceforge.net before to reduce the size of my Windows executables but I must admit that I am naive to any negative side effects this could have . What s the downside to all of this packing unpacking Are there scenarios in which anyone would recommend NOT UPX-ing an executable e.g . when writing a DLL Windows Service or when targeting Vista or Win7 I write most of my code in Delphi but I ve used UPX to compress C C++ executables as well . On a side note I m not running UPX in some attempt to protect my exe from disassemblers only to reduce the size of the executable and prevent cursory tampering . Comment : +1 reason for not using UPX : some anti-virus indentifies Delphi+UPX as a potential Virus . Preferable is to use our LVCL which makes 30 KB exe with Delphi with no compression instead of 300KB 800KB exe with regular VCL . It s enough e.g . for a setup program which will uncompress its content . See synopse.info forum viewtopic.php id 30 http : synopse.info forum viewtopic.php id 30 You can take a look also at KOL which are more difficult to use but also more powerful . .. . Answer : The reason is there are downsides to using EXE compressors . Most notably : .. . .. . Upon startup of a compressed EXE DLL all of the code is decompressed from the disk image into memory in one pass which can cause disk thrashing if the system is low on memory and is forced to access the swap file . In contrast with uncompressed EXE DLLs the OS allocates memory for code pages on demand i.e . when they are executed . .. . Multiple instances of a compressed EXE DLL create multiple instances of the code in memory . If you have a compressed EXE that contains 1 MB of code before compression and the user starts 5 instances of it approximately 4 MB of memory is wasted . Likewise if you have a DLL that is 1 MB and it is used by 5 running applications approximately 4 MB of memory is wasted . With uncompressed EXE DLLs code is only stored in memory once and is shared between instances . http : www.jrsoftware.org striprlc.php execomp Comment : Not all software is in a situation where VM page sharing between multiple-instances is an issue though and some compressors allow skipping of shared sections . PECompact skips them by default for instance . Also concerning all the memory being loaded that is true but that memory will be paged back out if unused and needed elsewhere . In some situations it creates faster loads because the storage medium usually HDD overhead is lower and everything gets loaded at once and is already there . So there are exceptions and to each his own . DISCLAIMER : I am the author of PECompact . Comment : Jeremy : Shared sections are not so much the problem as the actual code sections . Code is normally memory mapped read-execute which means that if you launch 10 programs they will all use the same identical phsyical memory pages and the physical data is only loaded from disk once . The OS can also discard pages that contain code which has never been called if it runs low on memory knowing that it can always trivially reload them from the image . None of that is the case with code that came from an exe packer the respective pages must be backed by the swap file . Comment : I agree with you Damon so the question then becomes - does your application tend to have multiple instances running This is one of the caveats I ve long warned against . Of course the code sections are usually pretty small anyway - look at the sizes we are talking about in comparison to today s systems . I would argue MUCH more memory tends to be dynamically allocated in MOST applications ." ] }
[ "yes-answer-long", "yes-answer-short" ]
executable
UNK_RELATION
unionfs@linux@48
unionfs -- unionfs is a filesystem service for @placeholder freebsd and netbsd which implements a union mount for other file systems .
{ "confidence": [ 51.600093841552734, 50.905765533447266, 43.4566764831543, 41.518795013427734, 33.221858978271484, 32.59849166870117, 29.086345672607422, 24.599365234375, 24.294776916503906, 23.919612884521484, 23.4410343170166, 22.726083755493164, 22.363719940185547, 22.09682273864746, 21.777860641479492, 21.514760971069336, 21.514760971069336, 20.707754135131836, 20.707754135131836, 20.707754135131836, 20.707754135131836, 20.69069480895996, 20.497270584106445, 19.368783950805664, 19.332683563232422, 19.332683563232422, 19.268674850463867, 18.811782836914062, 18.8074893951416, 18.672365188598633, 18.196352005004883, 17.7681827545166, 17.76399040222168, 17.203227996826172, 16.87595558166504, 16.793453216552734, 16.318998336791992, 15.912071228027344, 15.80136489868164, 15.271925926208496, 15.271925926208496, 15.271925926208496, 15.271925926208496, 15.271925926208496, 15.271925926208496, 15.271925926208496, 15.271925926208496, 15.271925926208496, 15.267810821533203, 14.571362495422363, 14.571362495422363, 14.571362495422363, 13.429831504821777, 13.429831504821777, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996 ], "content": [ "However it was not working with unionfs .", "That is supposed to be supported in unionfs 0.26 which isn t currently on my system I ve only got unionfs 0.24 .", "Given that Docker uses UnionFS a lot internally I am rather hoping there are options to do a union mount at a specific path inside a container but I can t find them if so .", "One thing that must be considered is that Docker uses a proprietary UnionFS to store data .", "The test Suite pts disk http : openbenchmarking.org suite pts disk for example should definitely use docker volumes instead of UnionFS .", "I want to mount the union of these two directories at mountPoint in my container i.e .", "Suppose to have the following scenario on a linux system : .. . .. . An ext4 data partition mounted as Read-Only : data ro .. . An overlay partition : data overlay .. . The two of them union-mounted using UnionFS : mount -t overlayfs -o lowerdir data ro upperdir data overlay overlayfs data .. . .. . At a certain point in time it is needed to persist the changes from data overlay into data ro obviously data ro will be remounted R W in such case and then remounted back R O .", "Is there a better way to inspect filesystem changes in a docker-container", "you can mount multiple volumes as far as I know .", "The suggested workaround is to mount onto a separate directory and then bind-mount that back over the required folder .", "a is initially accesible but after mount its not accessible anymore", "The obvious thing doesn t work sadly : docker : Error response from daemon : Duplicate mount point mount1", "is it some other kind of file system", "You can find the filesystem of a running container the Docker data directory usually var lib docker .", "Make sure that the permissions are correct for accessing all the directories - the union file system enforces the permissions of the underlying directories you can t bypass the OS s protection using this .", "When committing a running container with docker commit is this creating a consistent snapshot of the filesystem", ".. . .. . How to persist changes in the overlay upperdir into the base lowerdir filesystem", "I have been trying to mount directories in linux additively and fail to do so .", "Now when i mount a and b into c and then open c there are only x and y present in c .", "when i mount a b and c into c the directory c is empty and ls says permission-denied .", "What i want to do is to mount a b and c in one of them and be able to see x y and z all together .", "If I have a directory d1 I know I can mount it at mountPoint inside a Docker container by doing this : .. . .. . However I have two directories d1 and d2 let s say they contain files a.txt and b.txt respectively .", "Each nfs mount point is one branch in aufs .", "The solution I propose is to use the docker-volume https : docs.docker.com engine userguide containers dockervolumes to mount a host directory into docker .", "Does overlayfs support having upper layer as nfs mount point", "I am able to have lower layer as nfs mount point but not upper", "I ve started a docker-container and I ve modified a file .", "Now I use docker cp to export the file inspect it delete it .", "As mentioned in Mount a shared-storage volume as a data volume https : docs.docker.com engine userguide containers dockervolumes mount-a-shared-storage-volume-as-a-data-volume .. . .. . In addition to mounting a host directory in your container some Docker volume plugins https : docs.docker.com engine extend plugins volume allow you to provision and mount shared storage such as iSCSI NFS or FC .", "Next if we mount them all into one folder : .. . .. . i.e there s no issue mounting them all over one directory making the mounted directory look different to the underlying directory .", "But this multistep copy-read-delete process seems like over kill if I just want to read a file .", "I have three directrories a b and c . a contains file x b contains file y and c contains file z .", "mount -t aufs -o br : data first rw : data second rw none tmp merged .", "The specific location varies depending on which storage driver http : blog.docker.io 2013 11 docker-0-7-docker-now-runs-on-any-linux-distribution is used .", "However when running a real-world application like Apache inside Docker the persistent data are usually stored on a dedicated folder on the host running on a standard Linux filesystem like ext4 or in my case btrfs .", "Basically this means that no file must change after the snapshot is started .", "Are there any other caveats to consider when benchmarking Docker", "Since docker 1.9 this is done with docker-volume create https : docs.docker.com engine reference commandline volume create and then you mount those volumes in their expected paths in the container .. . .. . That allows you to : .. . .. . make those volumes independent of the host .. . still bypass UFS .. . experiments with different Docker volume plugins https : docs.docker.com engine extend plugins volume .. . compare their performance benchmarks http : stackoverflow.com q 35137655 6309 .. . .. . Which directories in the Docker container should be mounted from host .. . .. . Any folder which include persistent data and or has an high volume of IO operations .", "If you re creating a unioned file system of multiple sources then all the source locations need to be accessible by the user that s trying to access the directory .", "At some point later I d like to inspect this change from the docker host .", "I need more info than docker diff is showing .", "In the case of AUFS the location is var lib docker aufs mnt CONTAINER ID .", "This is not a general solution but in special cases you can use mounted volumes : .. . .. . Start the container with volume : .. . .. . Store files you want to inspect in container dir shared or copy ln files to shared and make needed files symbolic links to files stored in shared .", "Then you can inspect these files directly in host path shared .", "Note : You cannot symbolic-link special files like etc passwd etc hostname etc .", "I want mountPoint a.txt and mountPoint b.txt to exist .", "docker run -v path to d1 : mountPoint -v path to d2 : mountPoint .. . would this not work", "Also Ive never tried to go to the same folder so I understand why this wouldn t work .", "I just prefer using docker-volume create since docker 1.9 as plugin or not it keeps volumes more visible instead of being hidden being a container which exists just to be started never run and mounted by other containers .", "The thing is I don t know which directories are to be used in the benchmarks and have to be mounted inside the Docker container .", "Which directories in the Docker container should be mounted from host made docker volumes", "I have not programmed the test so I do not see any easy way to guess which folders are in use .", "Just to note the answer to the question why use a data volume plugin like flicker instead of just Docker data volume is Unlike a Docker data volume which is tied to a single server a Flocker data volume called a dataset is portable and can be used with any container in your cluster .", "Could you please advise me looking at the tests I am going to run generally disk I O intensive tasks using real-world applications which folders are the best candidates to being mounted from host as a docker-volume or docker-volume plugin", "i cannot also unmount c even with sudo .", "is it possible or is there a solution to this problem please let me know .", "This site is for programming questions .", "Try SuperUser instead .", "I am sorry but i want to use it in my bash script with the code that i have written if there is a way to do it with c++ i will be happy to accept that as well", "This is really a SuperUser question so I ve flagged it as such .", "Take for example : .. . .. . i.e .", "we can see all the content .", "change the permissions on one of the folders - e.g .", "and now when we ls the join folder : .. . .. . i.e .", "all folders need to be accessible in order for the joined directory to be accessible .", "You are putting three of them in the fourth folder i am trying to put a b c in a . without changing the user-permissions .", "And I ve just added an example of mounting them all over c in this example case .", "Is there anything special about a", "Is it an external drive", "Yes you are right it works with aufs thanks for the help .", "I m considering this approach for backing up containers .", "You would just have to docker commit container container : date and push it to a local registry .", "The backup would be incremental as the commit would just create a new layer .", "Also would the big amount of layers hurt io performance of the container drastically", "Is there a way to remove intermediate layers at a later point in time", "Edit .. . .. . By consistent I mean that every application that is designed to survive a power-loss should be able to recover from this snapshots .", "Meanwhile I found out that docker supports multiple storage drivers aufs devicemapper btrfs now .", "Unfortunately there is hardly any documentation about the differences between them and the options they support .", "if your docker image has volumes be aware that docker commit won t ever commit the files within those mounted volumes", "Possible duplicate of Is it safe to commit a running container in docker", "http : stackoverflow.com questions 27288070 is-it-safe-to-commit-a-running-container-in-docker", "I guess consistency is what you define it to be .", "In terms of flattening and the downsides of stacking too many AUFS layers see : https : github.com dotcloud docker issues 332 .. . .. . docker flatten https : github.com dqminh docker-flatten is linked there .", "Thanks for the hint to the flattening issue .", "But my main question remains unanswered .", "I edited the question to better reflect what I understand by consistency .", "I am in a similar situation .", "I am thinking about not using a dedicated data volume container instead committing regularly to have some kind of incremental backup .", "Beside the incremental backup the big benefit is for a team developing approach .", "As newcomer you can simply docker pull a database image already containing all the data you need to run debug and develop .", "So what I do right now is to pause before commit : .. . .. . As far as I can tell I have no problems right now .", "But this is a developing machine so no I have no experience on heavy load servers .", "Is it coping moving from overlay to the base FS enough like in the following commands sequence", "I am trying to benchmark the overall system performance of running Docker using the Phoronix Test Suite 6.4.0 Milestone 2 running inside a fedora : 23 image based container .", "It contains these tests .", "Is it even a good idea to use the docker volumes", "Afaik if I sacrifice portability Docker data volume is functionally equivalend and probably even faster than any Docker volume plugin right", "@Slazer I agree .", "The tests are being run as root inside a Docker container .", "@Slazer It really depends on the application being run ." ] }
{ "confidence": [ 66.0324478149414, 64.14358520507812, 59.42558670043945, 49.90863037109375, 26.90336799621582, 23.981658935546875, 21.372201919555664, 20.49746322631836, 18.963584899902344, 18.963584899902344 ], "content": [ "Question : null .. . Answer : Suppose to have the following scenario on a linux system : .. . .. . An ext4 data partition mounted as Read-Only : data ro .. . An overlay partition : data overlay .. . The two of them union-mounted using UnionFS : mount -t overlayfs -o lowerdir data ro upperdir data overlay overlayfs data .. . .. . At a certain point in time it is needed to persist the changes from data overlay into data ro obviously data ro will be remounted R W in such case and then remounted back R O . .. . .. . How to persist changes in the overlay upperdir into the base lowerdir filesystem Is it coping moving from overlay to the base FS enough like in the following commands sequence", "Question : I have been trying to mount directories in linux additively and fail to do so . I have three directrories a b and c . a contains file x b contains file y and c contains file z . Now when i mount a and b into c and then open c there are only x and y present in c . when i mount a b and c into c the directory c is empty and ls says permission-denied . i cannot also unmount c even with sudo . What i want to do is to mount a b and c in one of them and be able to see x y and z all together . is it possible or is there a solution to this problem please let me know . Comment : This site is for programming questions . Try SuperUser instead . Comment : I am sorry but i want to use it in my bash script with the code that i have written if there is a way to do it with c++ i will be happy to accept that as well .. . Answer : This is really a SuperUser question so I ve flagged it as such . If you re creating a unioned file system of multiple sources then all the source locations need to be accessible by the user that s trying to access the directory . Take for example : .. . .. . i.e . we can see all the content . change the permissions on one of the folders - e.g . and now when we ls the join folder : .. . .. . i.e . all folders need to be accessible in order for the joined directory to be accessible . Make sure that the permissions are correct for accessing all the directories - the union file system enforces the permissions of the underlying directories you can t bypass the OS s protection using this . Next if we mount them all into one folder : .. . .. . i.e there s no issue mounting them all over one directory making the mounted directory look different to the underlying directory . Comment : You are putting three of them in the fourth folder i am trying to put a b c in a . without changing the user-permissions . a is initially accesible but after mount its not accessible anymore Comment : And I ve just added an example of mounting them all over c in this example case . Is there anything special about a Is it an external drive is it some other kind of file system Comment : Yes you are right it works with aufs thanks for the help . However it was not working with unionfs . Comment : That is supposed to be supported in unionfs 0.26 which isn t currently on my system I ve only got unionfs 0.24 . The suggested workaround is to mount onto a separate directory and then bind-mount that back over the required folder .", "Question : null .. . Answer : If I have a directory d1 I know I can mount it at mountPoint inside a Docker container by doing this : .. . .. . However I have two directories d1 and d2 let s say they contain files a.txt and b.txt respectively . I want to mount the union of these two directories at mountPoint in my container i.e . I want mountPoint a.txt and mountPoint b.txt to exist . Given that Docker uses UnionFS a lot internally I am rather hoping there are options to do a union mount at a specific path inside a container but I can t find them if so . Comment : you can mount multiple volumes as far as I know . docker run -v path to d1 : mountPoint -v path to d2 : mountPoint .. . would this not work Also Ive never tried to go to the same folder so I understand why this wouldn t work . Comment : The obvious thing doesn t work sadly : docker : Error response from daemon : Duplicate mount point mount1", "Question : I am trying to benchmark the overall system performance of running Docker using the Phoronix Test Suite 6.4.0 Milestone 2 running inside a fedora : 23 image based container . One thing that must be considered is that Docker uses a proprietary UnionFS to store data . However when running a real-world application like Apache inside Docker the persistent data are usually stored on a dedicated folder on the host running on a standard Linux filesystem like ext4 or in my case btrfs . The solution I propose is to use the docker-volume https : docs.docker.com engine userguide containers dockervolumes to mount a host directory into docker . The thing is I don t know which directories are to be used in the benchmarks and have to be mounted inside the Docker container . The test Suite pts disk http : openbenchmarking.org suite pts disk for example should definitely use docker volumes instead of UnionFS . It contains these tests . Which directories in the Docker container should be mounted from host made docker volumes Is it even a good idea to use the docker volumes Are there any other caveats to consider when benchmarking Docker .. . Answer : As mentioned in Mount a shared-storage volume as a data volume https : docs.docker.com engine userguide containers dockervolumes mount-a-shared-storage-volume-as-a-data-volume .. . .. . In addition to mounting a host directory in your container some Docker volume plugins https : docs.docker.com engine extend plugins volume allow you to provision and mount shared storage such as iSCSI NFS or FC . Since docker 1.9 this is done with docker-volume create https : docs.docker.com engine reference commandline volume create and then you mount those volumes in their expected paths in the container .. . .. . That allows you to : .. . .. . make those volumes independent of the host .. . still bypass UFS .. . experiments with different Docker volume plugins https : docs.docker.com engine extend plugins volume .. . compare their performance benchmarks http : stackoverflow.com q 35137655 6309 .. . .. . Which directories in the Docker container should be mounted from host .. . .. . Any folder which include persistent data and or has an high volume of IO operations . Comment : Just to note the answer to the question why use a data volume plugin like flicker instead of just Docker data volume is Unlike a Docker data volume which is tied to a single server a Flocker data volume called a dataset is portable and can be used with any container in your cluster . Afaik if I sacrifice portability Docker data volume is functionally equivalend and probably even faster than any Docker volume plugin right Comment : @Slazer I agree . I just prefer using docker-volume create since docker 1.9 as plugin or not it keeps volumes more visible instead of being hidden being a container which exists just to be started never run and mounted by other containers . Comment : Could you please advise me looking at the tests I am going to run generally disk I O intensive tasks using real-world applications which folders are the best candidates to being mounted from host as a docker-volume or docker-volume plugin I have not programmed the test so I do not see any easy way to guess which folders are in use . The tests are being run as root inside a Docker container . Comment : @Slazer It really depends on the application being run . Hence my last general-worded sentence in my answer . Try running your test without volume first to establish a baseline then introduce volumes . Comment : I guess the best way to know is to confine them one by one inside the home-directory by SELinux perhaps and see what happens . I suspect them trying to use something like tmp and maybe var or usr . At least Apache and SQLite could perhaps get by solely with my home directory.. .", "Question : I ve started a docker-container and I ve modified a file . At some point later I d like to inspect this change from the docker host . Now I use docker cp to export the file inspect it delete it . But this multistep copy-read-delete process seems like over kill if I just want to read a file . Is there a better way to inspect filesystem changes in a docker-container I need more info than docker diff is showing . .. . Answer : You can find the filesystem of a running container the Docker data directory usually var lib docker . The specific location varies depending on which storage driver http : blog.docker.io 2013 11 docker-0-7-docker-now-runs-on-any-linux-distribution is used . In the case of AUFS the location is var lib docker aufs mnt CONTAINER ID .", "Question : I ve started a docker-container and I ve modified a file . At some point later I d like to inspect this change from the docker host . Now I use docker cp to export the file inspect it delete it . But this multistep copy-read-delete process seems like over kill if I just want to read a file . Is there a better way to inspect filesystem changes in a docker-container I need more info than docker diff is showing . .. . Answer : This is not a general solution but in special cases you can use mounted volumes : .. . .. . Start the container with volume : .. . .. . Store files you want to inspect in container dir shared or copy ln files to shared and make needed files symbolic links to files stored in shared . Then you can inspect these files directly in host path shared . Note : You cannot symbolic-link special files like etc passwd etc hostname etc .", "Question : null .. . Answer : Does overlayfs support having upper layer as nfs mount point I am able to have lower layer as nfs mount point but not upper Any workaround possible Kernel version - 4.4.0-21-generic .. . .. . Ubuntu 16.04", "Question : null .. . Answer : I am trying to merge multiple nfs share using aufs . Each nfs mount point is one branch in aufs . mount -t aufs -o br : data first rw : data second rw none tmp merged . The above command succeeds but when I try to traverse tmp merged I get Input Output error . ls -l tmp merged .. . .. . ls : reading directory tmp merged : Input output error .. . .. . Does aufs support nfs exports as branches If yes what could be wrong here Thanks", "Question : When committing a running container with docker commit is this creating a consistent snapshot of the filesystem I m considering this approach for backing up containers . You would just have to docker commit container container : date and push it to a local registry . The backup would be incremental as the commit would just create a new layer . Also would the big amount of layers hurt io performance of the container drastically Is there a way to remove intermediate layers at a later point in time Edit .. . .. . By consistent I mean that every application that is designed to survive a power-loss should be able to recover from this snapshots . Basically this means that no file must change after the snapshot is started . Meanwhile I found out that docker supports multiple storage drivers aufs devicemapper btrfs now . Unfortunately there is hardly any documentation about the differences between them and the options they support . Comment : if your docker image has volumes be aware that docker commit won t ever commit the files within those mounted volumes Comment : Possible duplicate of Is it safe to commit a running container in docker http : stackoverflow.com questions 27288070 is-it-safe-to-commit-a-running-container-in-docker .. . Answer : I guess consistency is what you define it to be . In terms of flattening and the downsides of stacking too many AUFS layers see : https : github.com dotcloud docker issues 332 .. . .. . docker flatten https : github.com dqminh docker-flatten is linked there . Comment : Thanks for the hint to the flattening issue . But my main question remains unanswered . I edited the question to better reflect what I understand by consistency .", "Question : When committing a running container with docker commit is this creating a consistent snapshot of the filesystem I m considering this approach for backing up containers . You would just have to docker commit container container : date and push it to a local registry . The backup would be incremental as the commit would just create a new layer . Also would the big amount of layers hurt io performance of the container drastically Is there a way to remove intermediate layers at a later point in time Edit .. . .. . By consistent I mean that every application that is designed to survive a power-loss should be able to recover from this snapshots . Basically this means that no file must change after the snapshot is started . Meanwhile I found out that docker supports multiple storage drivers aufs devicemapper btrfs now . Unfortunately there is hardly any documentation about the differences between them and the options they support . Comment : if your docker image has volumes be aware that docker commit won t ever commit the files within those mounted volumes Comment : Possible duplicate of Is it safe to commit a running container in docker http : stackoverflow.com questions 27288070 is-it-safe-to-commit-a-running-container-in-docker .. . Answer : I am in a similar situation . I am thinking about not using a dedicated data volume container instead committing regularly to have some kind of incremental backup . Beside the incremental backup the big benefit is for a team developing approach . As newcomer you can simply docker pull a database image already containing all the data you need to run debug and develop . So what I do right now is to pause before commit : .. . .. . As far as I can tell I have no problems right now . But this is a developing machine so no I have no experience on heavy load servers ." ] }
[ "yes-answer-long", "yes-answer-short" ]
linux
UNK_RELATION
qpid@amqp@124
qpid -- apache qpid is a cross-platform enterprise messaging system which implements the advanced message queuing protocol @placeholder providing message brokers written in c++ and java along with clients for c++ java jms .net python and ruby .
{ "confidence": [ 58.9227409362793, 58.237545013427734, 57.01306915283203, 55.755802154541016, 54.4020881652832, 52.77796936035156, 51.86307907104492, 51.549312591552734, 51.018375396728516, 50.96489334106445, 50.647823333740234, 50.11319351196289, 50.08738708496094, 48.8300666809082, 48.60933303833008, 47.55859375, 47.53481674194336, 47.48863983154297, 47.488624572753906, 46.78972244262695, 46.70486831665039, 46.60801696777344, 46.60477828979492, 46.26435852050781, 46.26435852050781, 46.20199966430664, 46.067359924316406, 45.620418548583984, 45.506404876708984, 45.46274948120117, 45.0313720703125, 44.901859283447266, 44.76396942138672, 44.48215103149414, 44.317073822021484, 43.88356399536133, 43.847110748291016, 43.72099304199219, 42.8224983215332, 42.72407531738281, 42.66415786743164, 42.58324432373047, 42.55820083618164, 42.48705291748047, 42.46495819091797, 42.2279052734375, 42.148109436035156, 42.025108337402344, 42.015811920166016, 42.00251770019531, 41.76410675048828, 41.64812469482422, 41.64812469482422, 41.53050994873047, 41.528297424316406, 41.450279235839844, 41.44872283935547, 41.218753814697266, 41.17243957519531, 41.036251068115234, 41.028133392333984, 40.89921569824219, 40.54975128173828, 40.510398864746094, 40.42824172973633, 40.03612518310547, 39.85943603515625, 39.47509765625, 39.47509765625, 39.420555114746094, 39.23332214355469, 39.172332763671875, 39.064186096191406, 38.87160110473633, 38.87160110473633, 38.87160110473633, 38.63908767700195, 38.37672424316406, 38.29512023925781, 38.203773498535156, 37.95673370361328, 37.95673370361328, 37.37156677246094, 37.34398651123047, 37.10540008544922, 36.858360290527344, 36.7349853515625, 36.7349853515625, 36.7349853515625, 36.699745178222656, 36.45679473876953, 36.29747009277344, 36.29747009277344, 36.29747009277344, 36.29747009277344, 36.18907928466797, 35.788970947265625, 35.788970947265625 ], "content": [ "What is difference between Qpid Java 6.0.1 and Qpid JMS 0.9.0 and Qpid Proton", "I want to subscribe to a Java Messaging Service JMS publish-subscribe service using Apache Qpid .", "I have not used QPID personally however the documentation hints http : qpid.apache.org releases qpid-0.22 messaging-api ruby api classes Qpid Messaging Session.html M000009 to the fact that individual message acks are possible .", "The Qpid JMS client is built on top of Qpid Proton .", "I am developing a application in C++ using Qpid C++ Messaging API .", "I send a lot of message to windows azure event hub with Qpid proton in c . .. . .. . If a network disconnection happen I want to buffering this message and return it when the network is up .. . .. . It s possible with Qpid proton in C code", "Is there an example sample in Java on Qpid Dispatch Router usage", "I am trying to use Apache Qpid through Spring Boot application using Jms Qpid client .", "The Qpid JMS project http : qpid.apache.org components jms index.html is a stand alone JMS v1.1 client library that speaks AMQP v1.0 and can be used against any AMQP 1.0 compliant broker such as Qpid Java AcitveMQ Qpid C++ broker etc .", "Apache Qpid the message broker shows high throughput to high latency .", "https : github.com apache qpid-proton blob master examples engine c psend.c .. . .. . However it uses structs that are not part of the Qpid Proton C API 0.12.0 .", "This is my first day with Apache Proton and Qpid java-broker version 0.32 and I need a simple send and receive example in Java no JMS .", "For example the Apache Qpid project also has a JMS client that speaks AMQP 1.0 : http : qpid.apache.org components jms index.html .", "Qpid Java does include a JMS client for the older draft specification of AMQP 0.9 0.9.1 and 0.10.0 but it does not include an AMQP 1.0 JMS client that is what Qpid JMS is .", "That means whenever a message is sent to queue in apache qpid broker the Message driven bean should get triggered .", "I want to create a Message Driven Bean in websphere 8.5.5 which will be attached to queue in apache qpid broker .", "According to this https : azure.microsoft.com en-us documentation articles service-bus-amqp-overview as of 10 5 2015 the tested java clients are Apache Qpid Java Message Service JMS client and IIT Software SwiftMQ Java client .", "QPID Java Broker with QPID Proton library works without error for anonymous authentication .", "I would like to explore Qpid Dispatch Router with consumer and producer in Java .", "I used the Qpid C++ client library .", "Rabbimq implements AMQP 0.9.1 and qpid client 1.0 .", "In terms of 1.0 implementations it s still a little early and I know there s a lot of development going on but as of now here s a list of available components : .. . .. . Brokers : .. . .. . SwiftMQ - http : www.swiftmq.com downloads .. . Apache Qpid Java broker 0.18 release - http : qpid.apache.org .. . Microsoft Azure Service Bus - http : www.windowsazure.com en-us develop net how-to-guides service-bus-amqp-overview .. . .. . Client libraries : .. . .. . SwiftMQ Java client library - http : www.swiftmq.com downloads .. . Apache Qpid JMS client library 0.18 release - http : qpid.apache.com .. . Apache Qpid Proton-C - C client lib inc . bindings for Python and PHP - http : qpid.apache.org proton .. . Apache Qpid Proton-J - Java client lib - http : qpid.apache.org proton .. . Microsoft Azure Service Bus .NET client - http : nuget.org packages ServiceBus.Preview", "The upcoming Qpid release probably available in the next couple of weeks will have 1.0 support for the JMS client and the Java broker .", "I am new with JMS and wanted to implement simple JMS application with Apache Qpid .", "Kaazing JMS edition integration with AMQP 1.0 architecture Apache Qpid JMS AMQP 1.0 Client centered around ActiveMQ .", "As mentioned above the Qpid JMS client uses the Proton protocol engine to implement its AMQP 1.0 protocol support and maps JMS behaviours on top of that protocol .", "I am using qpid client version 0.24 with artifact id qpid-amqp-1-0-client-jms and qpid-client and facing the same issue .", "I have a queue in apache qpid broker .", "Im using Qpid JMS 0.8.0 library in order to implement a standalone java AMQP client .", "Qpid C++ message broker : I used a fanout type exchange and a queue with default configuration .", "Apache Qpid Dispatch Router supports AMQP 1.0 so many examples available with AMQP 1.0 clients will be usable with it .", "I use apache qpid and I am not doing a random acknowledgement but doing acknowledgment on a particular message .", "The two sentences of prose in the Qpid java broker documentation are not helping me .", "I don t believe this is true see 10.3.5 here : qpid.apache.org releases qpid-0.20 java-broker book https : qpid.apache.org releases qpid-0.20 java-broker book Java-Broker-Security-Authentication-Providers.html", "The 0.18 release of Qpid which was relased som etime ago now did contain 1.0 support in Java Broker and and 1.0 based JMS client .", "This is a bug from Qpid .", "I m trying to use python-qpid-proton version 0.9.1 to send a message to a Azure Service Bus queue .", "Take the .rar file from the subfolder qpid-java-xxx jca rar target should look like qpid-ra-0.32.rar .", "I found that qpid-perftest program is using Qpid s old messaging Apis .", "Hello I will be happy to understand how can I write simple Java standalone program which sends and receives messages to RabbitMQ using Apache QPID jms client .", "I also have this python script using Qpid Proton 0.10 that speaks AMQP 1.0 and sends essentially the same message to the .net application .", "so I did this : .. . .. . Get a package of QPID : http : qpid.apache.org components qpid-jca .. . .. . Like : http : www.apache.org dyn closer.lua qpid 0.32 qpid-java-0.32.tar.gz .. . .. . In the exploded folder run Maven on the pom.xml like so : mvn clean install -DskipTests .. . .. . Download the internet.. . Well just kidding .", "The NONE option for sasl mechanisms is documented nowhere in the Qpid C++ API documentation .", "link is : link http : stackoverflow.com questions 35628705 message-without-handler-issue-for-apache-qpid-in-spring-boot 35629566 35629566", "I m new to Azure Event Hubs and cross-compiling and I m trying to run the example code provided https : github.com apache qpid-proton blob master examples c messenger send.c by qpid-proton-c 0.12.2 on my embedded system ARM 926 EJS .", "Is there a similar solution in Qpid", "rabbitmq-plugins list includes this output : .. . .. . I am attempting to send messages to it using QPID JMS qpid-amqp-1-0-client-jms from Maven Central .", ".. . .. . To implement a monitor trigger in qpid : .. . .. . JMS spec defines an asynchronous delivery mode .", "Afer doing that the performance improved 10 times for the code using new qpid api and the performance bacame similar to the Qpid old messaging Api .", "the upcoming Qpid release probably available in the next couple of weeks will have 1.0 support for the JMS client and the Java broker that was 11 weeks ago .", "I am currently using QPID libraries in Python .", "This application uses Apache QPid broker 6.0.1 to send messages .", "The first thing it does is connect to qpid with JMX RMI with the apache API .", "The Details for your issue please refer to my post at python-qpid-proton examples send message to azure not working http : stackoverflow.com questions 32189596 python-qpid-proton-examples-send-message-to-azure-not-working 32197104 noredirect 1 comment52285281 32197104 .", "But it does not have anything about Qpid system .", "And with the Glassfish server 4.1 on Java 1.8 running I am trying to deploy the resource adapter like so : .. . .. . c : Program Files glassfish-4.1 bin asadmin deploy --type rar --name q-rar C : User s moe Downloads qpid-java-0.32.tar qpid-java-0.32 qpid-java-0.32 jca rar target qpid-ra-0.32.rar remote failure : Error occurred during deployment : Exception while loading the ap p : Failed to start resource adapter : Could not locate javax.transaction.Transa ctionManager .", "I m using Qpid-Proton-0.10 Python - AMQP 1.0 based messaging library to send data to Azure Event Hubs .", "EDIT : - Found some extra configuration parameters on the QPID website https : qpid.apache.org releases qpid-java-6.0.3 jms-client-0-10 book JMS-Client-0-10-Configuring-Addresses.html i had missed When i configure the address as follows it works", "I then downloaded qpid-python-0.32 which was installed successfully .", "I ve tested c++ qpid .. . .. . I sent 50000 messages per second between two diferent machines for a long time with no queuing .", "Please note that I am using Apache qpid APi for AMQP protocol with activeMQ .", "As an alternative you can lock the Qpid Client to a particular protocol version with system property qpid.amqp.version .", "So far the only one I have come across is Apache Qpid .", "If Qpid supports 1.0 why is it not advertised", "I found that Apache Qpid has a function that detects slow consumers and disconnect them .", "I m running a few integration tests with Qpid qpid setup based on the answer to this previous question http : stackoverflow.com questions 2176043 example-of-standalone-apache-qpid-amqp-junit-test .", "But using the standalone qpid tools .. . .. . this works as expected .", "The second application is an app I did to test QPID and see how i can send a message .", "With the second application QPID detect the connexion and display it in web interface but it doesn t create the queue or put message if it already exists .", "I need a high performance message bus for my application so I am evaluating performance of ZeroMQ RabbitMQ and Apache Qpid .", "I am trying to integrate Apache Qpid in my Spring application .", "The Qpid Proton http : qpid.apache.org proton index.html project is an AMQP 1.0 based project that provides clients and a protocol engine for message based applications to use to communicate using AMQP .", "And I noticed the system is quite idle when working with RabbitMQ or Qpid .", "Here is the setup method I use for QPID 0.30 I use this in a Spock test but should be portable to Java of Junit with no problems .", "Please follow below steps to avoid connection abort for QPID Java Broker 0.32 .", "Qid and Proton still needs a Java tutorial if only so the qpid team can test it .", "Unfortunately I can t find a way to set this parameter though there must be a way : there is this Transport class http : qpid.apache.org releases qpid-proton-0.13.0 proton java-api org apache qpid proton engine Transport.html which offers to get or set max frame size .", "We ve developed an open-source message bus built on top of ZeroMQ - we initially did this to replace Qpid .", "The project includes clients in a number of languages including C C++ Python and Java to name a few .", "+1 For a definite statement from someone working on qpid .", ".. . QPid Proton C client 2 We have successfully tested against the proton command-line tool this client ships with .", "I am trying to write an AMQP 1.0 client using Qpid Proton in C . I do not want to use messenger .", "I would like to simply open an AMQP 1.0 connection with a specific max frame size using the Apache Qpid Proton client library http : qpid.apache.org releases qpid-proton-0.13.0 .", "The Qpid Java http : qpid.apache.org components java-broker index.html project is a Messageing Broker for AMQP that includes support for the 0.9 0.9.1 and 0.10 AMQP draft specification along with support for the current AMQP v1.0 specification .", "QPid is used to create a simulator of another application .", "I m aware of people having success with this against Azure Service Bus Qpid C++ broker and ActiveMQ .", "I am having an issue with the most trivial step in QPid Proton .", "Running qpid-send against the Proton server also seems to work fine .", "I m currently going through the process of installing the Qpid broker on Windows .", "I believe this should be possible due to the fact that both RabbitMQ and QPID are using AMQP protocol .", "So my questions are : .. . .. . Anybody have any experience with qpid java broker + junit", "Does anyone have an example of using Apache Qpid within a standalone junit test .", "The driver API was removed in Apache Qpid Proton https : qpid.apache.org proton index.html release 0.9 in March 2015 .", "I need guidance from you to configure websphere 8.5.5 to listen to apache qpid queue .", "EDIT : I have tried creating two sessions and consuming from different sessions but with apache qpid atleast this performs inconsistently .", "I am using 0.32 Qpid JMS client in my spring-boot application .", "Sorry qpid proton instead of pqid proton .", "However there are no examples of connnecting to the event hubs with qpid ." ] }
{ "confidence": [ 104.80123138427734, 88.88191223144531, 80.76921081542969, 77.15959930419922, 75.1010971069336, 73.19613647460938, 72.65518188476562, 71.27244567871094, 69.75550079345703, 69.3504867553711, 68.7348403930664, 68.56024932861328, 68.1796646118164, 67.68843841552734, 67.19960021972656, 66.96064758300781, 66.24317932128906, 66.0344467163086, 65.42813110351562, 65.31748962402344 ], "content": [ "Question : What is difference between Qpid Java 6.0.1 and Qpid JMS 0.9.0 and Qpid Proton I am new with JMS and wanted to implement simple JMS application with Apache Qpid . Can anyone provide me links to understand it . .. . Answer : The three are quite different beasts . The Qpid Java http : qpid.apache.org components java-broker index.html project is a Messageing Broker for AMQP that includes support for the 0.9 0.9.1 and 0.10 AMQP draft specification along with support for the current AMQP v1.0 specification . Qpid Java does include a JMS client for the older draft specification of AMQP 0.9 0.9.1 and 0.10.0 but it does not include an AMQP 1.0 JMS client that is what Qpid JMS is . The Qpid JMS project http : qpid.apache.org components jms index.html is a stand alone JMS v1.1 client library that speaks AMQP v1.0 and can be used against any AMQP 1.0 compliant broker such as Qpid Java AcitveMQ Qpid C++ broker etc . The Qpid JMS client is built on top of Qpid Proton . The Qpid Proton http : qpid.apache.org proton index.html project is an AMQP 1.0 based project that provides clients and a protocol engine for message based applications to use to communicate using AMQP . The project includes clients in a number of languages including C C++ Python and Java to name a few . Besides the clients the project provides a core protocol engine that can be used to implement your own AMQP clients or server applications using a variety of programming-languages . As mentioned above the Qpid JMS client uses the Proton protocol engine to implement its AMQP 1.0 protocol support and maps JMS behaviours on top of that protocol . Which of these projects you use depends on what your use-case is and what you are needing to implement . Each project has documentation and examples that you can review to get a better understanding of the scope of features each provides . Comment : Thanks Tim Bish for your explanation .", "Question : I want to subscribe to a Java Messaging Service JMS publish-subscribe service using Apache Qpid . However rather than using Java I want to use C++ . My customer told me this was possible and even said trivial . Are they correct Can anyone point me to an example Everywhere I ve looked says that to use JMS I have to use Java . The point here is that the service is a third party service so I can t change it to use AMQP or any other protocol other than JMS . Comment : If your customer said it s trivial maybe he can provide for pointers Comment : I suspect my customer may not actually know . Also want to get independent opinion . .. . Answer : This depends quite a bit on what JMS Broker you are using . If the broker supports the AMQP 1.0 protocol as well as whatever native protocol it implements for its JMS client then you might be in luck . The main thing you need besides support for AMQP 1.0 then is good cross protocol communication support such that a message send from the JMS client can get turned into something meaningful for the subscribed AMQP client or the other way round the broker needs to map incoming AMQP messages into meaningful JMS representations so that the two interoperate successfully . A Broker like ActiveMQ does support this sort of thing along with support for other protocols as well . You need to have the AMQP http : activemq.apache.org amqp.html support turned on in the broker and then you can use the C++ client from the Qpid http : qpid.apache.org project to send messages and receive messages with relative ease . Comment : the problem is I have no control over the provider . So are you saying that this can all be done in the client So far the provider has rejected sending AMQP over the wire .", "Question : Is there an example sample in Java on Qpid Dispatch Router usage I would like to explore Qpid Dispatch Router with consumer and producer in Java . Comment : The examples in their documentation use python proton messenger API . Have you tried using Java proton messenger .. . Answer : Apache Qpid Dispatch Router supports AMQP 1.0 so many examples available with AMQP 1.0 clients will be usable with it . For example the Apache Qpid project also has a JMS client that speaks AMQP 1.0 : http : qpid.apache.org components jms index.html . There are examples included with that that can be run against the Dispatch Router . 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 13080451 Comment : The link doesn t answer the question . The answer to the question is that you can use examples provide with AMQP 1.0 clients against the router . The router itself does not provide client examples . The link simply references one possible client which I know has examples .", "Question : I am running rabbitmq server 3.1.5 and trying to connect to this broker from a Qpid 6.0.0 client both running on Linux . The rabbitmq broker is using amqp 0-9-1 . When I try to connect from the Qpid client it fails with connection reset . From the Qpid client stack-trace I ve masked the first two octets of the IP addresses : .. . .. . On the RabbitMQ broker side the log file shows : .. . .. . The rabbitmq error message indicates that it is rejecting the proposed amqp version 1-0-10 from the Qpid client . I captured a tcpdump trace of the attempted session and I see the client .33 above opens the TCP connection sends an amqp message with protocol ID 1-1 version 0-10 and then follows that by sending another amqp message with protocol ID 0-0 version 9-1 . However the rabbitmq broker side .41 above seems to have given up after the 1-0-10 message and resets the TCP connection without processing the 0-9-1 amqp message . Any ideas how I can get the rabbitmq broker to take the 0 0 9 1 version negotiation .. . Answer : Rabbimq implements AMQP 0.9.1 and qpid client 1.0 . Try using the AMQP 1.0 RabbitMQ plug-in . You can enble it using : .. . .. . please read here https : github.com rabbitmq rabbitmq-amqp1.0 blob rabbitmq v3 6 0 README.md .. . .. . The current field of AMQP 1.0 clients is somewhat limited . Therefore we have not achieved as much interoperability as we might like . .. . We have tested against : .. . .. . .. . SwiftMQ Java client 1 We have done most of our testing against this client and things seem to work . .. . QPid Proton C client 2 We have successfully tested against the proton command-line tool this client ships with . .. . QPid Proton Java client 2 We have not been able to get this client to get as far as opening a network connection tested against .. . .. . .. . 0.2 and 0.4 . Comment : I installed the amqp 1.0 plugin and restarted rabbitmq server but it did not seem to change my result .", "Question : How to ensure message acknowledge deletes only messages upto the message on which acknowledge is called in a jms broker . Currently I have a system which consumes from a jms queue and partially processes it.Sometime later a batch of these messages gets persisted by a different thread . I need to acknowledge on messages now . But the problem is I have to stop consuming the messages otherwise acknowledging a previously received message will also acknowledge all other subsequent messages received . In other words suppose I have 10 messages in a queue . I consume 7 of them and then acknowledge on 5th message . This in turn removes all 7 messages received by consumer from the queue.Is there a way to only acknowledge and remove messages from queue till 5th message . EDIT : I have tried creating two sessions and consuming from different sessions but with apache qpid atleast this performs inconsistently . By inconsistently I mean sometimes during the test it so happens that one consumer is able to receive messages while the other doesn t receive at all no matter how long you wait . This would have worked for me as a solution but because of inconsistency can t use this as a solution . Comment : You have not specified which message provider you are using . But as far as I know many messaging providers don t allow random message acknowledgement . If you acknowledge one message all messages received till that point will also be acknowledged and removed from queue Comment : I use apache qpid and I am not doing a random acknowledgement but doing acknowledgment on a particular message . Its ok if all messages before that gets cleared but if further messages have been received they also get removed . .. . Answer : I understand this post is old but this answer should benefit those who stumble upon it later . If you d like fine grained control of which messages you d like to acknowledge the individual acknowledge method should help you . Using this acknowledgement mode you can ack individual messages in a session . Messages that have not been ack-ed will be redelivered . This is not part of the spec but most queue providers support it outside the spec . Oracle http : docs.oracle.com cd E19717-01 819-7757 aeqeg index.html .. . .. . For more flexibility Message Queue lets you customize the JMS client-acknowledge mode . In client-acknowledge mode the client explicitly acknowledges message consumption by invoking the acknowledge method of a message object . .. . The standard behavior of this method is to cause the session to acknowledge all messages that have been consumed by any consumer in the session since the last time the method was invoked . That is the session acknowledges the current message and all previously unacknowledged messages regardless of who consumed them . .. . In addition to the standard behavior specified by JMS Message Queue lets you use client-acknowledge mode to acknowledge one message at a time . ActiveMQ https : java.net jira browse JMS SPEC-95 .. . .. . One can imagine other acknowledge modes that would be useful too for example : CONSUMER ACKNOWLEDGE where Message.acknowledge would acknowledge only messages received up on a particular MessageConsumer or CONSUMER CHECKPOINT ACKNOWLEDGE where Message.acknowledge would acknowledge only messages received up to and including the Message instance on which the method was called . .. . But without embarking on all these various different possibilities would it be possible to consider just adding INDIVIDUAL ACKNOWLEDGE mode This alone would make it possible for multithreaded applications to achieve whatever behaviors they need . I have not used QPID personally however the documentation hints http : qpid.apache.org releases qpid-0.22 messaging-api ruby api classes Qpid Messaging Session.html M000009 to the fact that individual message acks are possible . While processing a batch you can ack each message that is received and processed . If you encounter an exception do not ack the message .", "Question : I m doing research to figure out what messaging solution to settle on for our future products and I can t really figure this one out . There is a bunch of AMQP 0.9.1 implementations RabbitMQ Apache Qpid OpenAMQ to name a few but no AMQP 1.0 implementation although 1.0 has been finalized October 2011 . Well except for SwiftMQ 1 . Reading up on 1.0 it seems to be a major departure from the pre-1.0 spec so it seems understandable that there s little enthusiasm for a major rewrite of something that is working fine . In fact I can t see why RabbitMQ and others wouldn t just decide to migrate to ZeroMQ instead of AMQP 1.0 . Still I cannot find any clear statement on that by implementors of the pre-1.0 AMQP spec except some vague commitments like striving to always implement the latest AMQP spec . Edit : RabbitMQ actually does say .. . .. . A future version of RabbitMQ will implement AMQP 1.0 . Please contact us for details . http : www.rabbitmq.com specification.html .. . .. . However something http : web.archive.org web 20090505005816 http : www.rabbitmq.com specification.html tells me that statement is more than 3 years old i.e . it predates the release of AMQP 1.0 . So are there any indications AMQP 1.0 could become a standard except for the fact that major banks - and Microsoft - are behind it The latter btw . without an implementation of its own . It almost seems like AMQP 0.9.1 is more standard than 1.0 will be . Well there s https : github.com rabbitmq rabbitmq-amqp1.0 it s self-proclaimed status is prototype with no work on it apparently for half a year . 1 My first impression of SwiftMQ I got by means of its author s rant on Spring s lacking AMQP support http : forum.springsource.org archive index.php t-121724.html which is why I m not considering it for the time being . I wouldn t want to count on support from that guy . Comment : Interesting background on this from iMatix of ZeroMQ fame : imatix.com articles : whither-amqp http : www.imatix.com articles : whither-amqp Comment : The article on pre-1.0 background that Eugene mentions above was redacted and moved to imatix.com articles : whats-wrong-with-amqp http : www.imatix.com articles : whats-wrong-with-amqp . .. . Answer : The OASIS AMQP 1.0 Standard was ratified this week see https : www.oasis-open.org news pr amqp-1-0-approval . In terms of 1.0 implementations it s still a little early and I know there s a lot of development going on but as of now here s a list of available components : .. . .. . Brokers : .. . .. . SwiftMQ - http : www.swiftmq.com downloads .. . Apache Qpid Java broker 0.18 release - http : qpid.apache.org .. . Microsoft Azure Service Bus - http : www.windowsazure.com en-us develop net how-to-guides service-bus-amqp-overview .. . .. . Client libraries : .. . .. . SwiftMQ Java client library - http : www.swiftmq.com downloads .. . Apache Qpid JMS client library 0.18 release - http : qpid.apache.com .. . Apache Qpid Proton-C - C client lib inc . bindings for Python and PHP - http : qpid.apache.org proton .. . Apache Qpid Proton-J - Java client lib - http : qpid.apache.org proton .. . Microsoft Azure Service Bus .NET client - http : nuget.org packages ServiceBus.Preview", "Question : null .. . Answer : I m currently going through the process of installing the Qpid broker on Windows . I ve already installed CMake boost and python and I ve added the environment variable for the root of the Boost directory . I m now at the step where Qpid client is to be build from a source distribution Visual Studio 12 . After having changed into the directory qpid cpp I ran the command : cmake -G Visual Studio 12 2013 . Toward the end of the log I got the error : .. . .. . CMake Error at CMakeLists.txt : 73 install : install FILES given no DESTINATION .. . .. . So I checked the CMakeLists.txt file and saw that lines 73 - 76 have : .. . .. . I think the problem could be related to the fact that EXAMPLESDIR is being used but the INSTALL WINDOWS text file instructs you to go into the cpp directory which is located in examples the full path is : qpid-cpp-0.34 bindings qmf2 examples cpp .. . .. . This is the first time I ve had to work with qpid or messaging brokers so I have a limited understanding of what s going on here . What destination should I be providing for the install files .. . .. . The CMakeLists.txt file is below for reference : Comment : This is a bug from Qpid . Ask the developers to fix this . Comment : @usr1234567 Really How can you be sure", "Question : I need a high performance message bus for my application so I am evaluating performance of ZeroMQ RabbitMQ and Apache Qpid . To measure the performance I am running a test program that publishes say 10 000 messages using one of the message-queue implementations and running another process in the same machine to consume these 10 000 messages . Then I record time difference between the first message published and the last message received . Following are the settings I used for the comparison . 1 . RabbitMQ : I used a fanout type exchange and a queue with default configuration . I used the RabbitMQ C client library . 2 . ZeroMQ : My publisher publises to tcp : localhost : port1 with ZMQ PUSH socket My broker listens on tcp : localhost : port1 and resends the message to tcp : localhost : port2 and my consumer listens on tcp : localhost : port2 using ZMQ PULL socket . I am using a broker instead of peer to to peer communication in ZeroMQ to to make the performance comparison fair to other message-queue implementation that uses brokers . 3 . Qpid C++ message broker : I used a fanout type exchange and a queue with default configuration . I used the Qpid C++ client library . Following is the performance result : .. . .. . 1 . RabbitMQ : it takes about 1 second to receive 10 000 messages . 2 . ZeroMQ : It takes about 15 milli seconds to receive 10 000 messages . 3 . Qpid : It takes about 4 seconds to receive 10 000 messages . Questions : .. . .. . 1 . Have anyone run similar performance comparison between the message queues Then I like to compare my results with yours . 2 . Is there any way I could tune RabbitMQ or Qpid to make it performance better Note : .. . .. . The tests were done on a virtual-machine with two allocated processor . The result may vary for different hardware however I am mainly interested in relative performance of the MQ products . Comment : I have run simple tests months ago with similar results . And I noticed the system is quite idle when working with RabbitMQ or Qpid . I think something must be wrong . Comment : RabbitMQ : it takes about 12 seconds to receive 10 000 messages . -- In our own tests we regularly see 20-25 000 sec ingress per CPU . So you are doing something wrong or using a slow client . Have you tried emailing rabbitmq-discuss with questions Comment : Here s a good comparison dated April 10 2013 : x-aeon.com wp 2013 04 10 http : x-aeon.com wp 2013 04 10 a-quick-message-queue-benchmark-activemq-rabbitmq-hornetq-qpid-apollo Comment : A comparison of performance of RabbitMQ Kafka HornetQ SQS and Mongo-based replicated queues : warski.org blog 2014 07 http : www.warski.org blog 2014 07 evaluating-persistent-replicated-message-queues Comment : Give a try to nanomsg -- another offspring evolved by Martin Sustrik the ZeroMQ co-father . A good place to start to read is nanomsg.org documentation-zeromq.html http : nanomsg.org documentation-zeromq.html .. . Answer : Try to configure prefetch on sender and receptor with a value like 100 . Prefetching just sender is not enough Comment : Fro qpid I had the impression that Receiver.setCapacity 100 sets the prefetch for receiver . Afer doing that the performance improved 10 times for the code using new qpid api and the performance bacame similar to the Qpid old messaging Api . I have updated the post with the result . However Qpid still seems to be 4 times slower than rabbitmq .", "Question : Using QPID Java Client i can only get messages delivered through the exchange to the bound queue using the following expanded syntax of AMQAnyDestination .. . .. . If i attempt to use the different form which just specifies the address as follows it doesnt work : - .. . .. . The message hits RabbitMQ ok but is not delivered . Qpid 0.32 Client Rabbit MQ 3.5.7 .. . .. . Exchange onms Routing Key Simon .. . .. . I have been using the qpid examples and modifying the ListSender example as below .. . .. . When it works using the expanded format of AMQAnyDestination the debug logs looks like this : - .. . .. . When it fails using the shorter syntax the debug log looks like this : - .. . .. . Ideally i need the shorter syntax to work as this is what is used by another application I am using which is posting messages using AMQP . I suspect there is something incorrect with the syntax i am using to define the address but i cant see what it is . I have tried : - .. . .. . amqp : onms2 Simon ADDR : onms2 Simon .. . .. . I have confirmed the rabbit config is correct by testing using both a standalone java client using qpid and also using both perl using net amqp and python using pika . So i dont think its that . Any gudiance appreciated . EDIT : - Found some extra configuration parameters on the QPID website https : qpid.apache.org releases qpid-java-6.0.3 jms-client-0-10 book JMS-Client-0-10-Configuring-Addresses.html i had missed When i configure the address as follows it works onms3 Simon create : always node : type : topic Detail .. . .. . Simon .. . Answer : EDIT : - Found some extra configuration parameters on the QPID website https : qpid.apache.org releases qpid-java-6.0.3 jms-client-0-10 book JMS-Client-0-10-Configuring-Addresses.html i had missed When i configure the address as follows it works Detail Comment : I edited my own question with the answer . Not sure what you mean - please elaborate . Comment : That s the idea . Comment : np : - thanks for the guidance Comment : Please use the edit link on your question to add additional information . The Post Answer button should be used only for complete answers to the question . - From Review review low-quality-posts 12663488", "Question : null .. . Answer : I am developing a application in C++ using Qpid C++ Messaging API . The application should send messages to another .net application running amqpnetlite . However when initiating the connection on the C++ side I got this security error : .. . .. . I was wondering anyone has any thoughts about the error Additional Info : .. . .. . 1 . I confirm that the C++ application speaks AMQP 1.0 . 2 . I also have this python script using Qpid Proton 0.10 that speaks AMQP 1.0 and sends essentially the same message to the .net application . This python script works just fine . 3 . I set up a C++ AMQP broker with qpidd --auth no . Now both the python script and the C++ application connection configured with sasl mechanism : ANONYMOUS could send messages through . Any or all help would be appreciated .. . .. . EDIT .. . .. . Find the solution myself . When initiate the connection on the C++ application side the SASL MECHANISMS must be set to NONE explicitly as amqpnetlite defaults to disable any authentication not even the ANONYMOUS mode when listening for incoming connection . This can be done in the C++ code by doing .. . .. . or by supplying the option from the command-line . The NONE option for sasl mechanisms is documented nowhere in the Qpid C++ API documentation . It has to be found out by looking into the source code .", "Question : I need a high performance message bus for my application so I am evaluating performance of ZeroMQ RabbitMQ and Apache Qpid . To measure the performance I am running a test program that publishes say 10 000 messages using one of the message-queue implementations and running another process in the same machine to consume these 10 000 messages . Then I record time difference between the first message published and the last message received . Following are the settings I used for the comparison . 1 . RabbitMQ : I used a fanout type exchange and a queue with default configuration . I used the RabbitMQ C client library . 2 . ZeroMQ : My publisher publises to tcp : localhost : port1 with ZMQ PUSH socket My broker listens on tcp : localhost : port1 and resends the message to tcp : localhost : port2 and my consumer listens on tcp : localhost : port2 using ZMQ PULL socket . I am using a broker instead of peer to to peer communication in ZeroMQ to to make the performance comparison fair to other message-queue implementation that uses brokers . 3 . Qpid C++ message broker : I used a fanout type exchange and a queue with default configuration . I used the Qpid C++ client library . Following is the performance result : .. . .. . 1 . RabbitMQ : it takes about 1 second to receive 10 000 messages . 2 . ZeroMQ : It takes about 15 milli seconds to receive 10 000 messages . 3 . Qpid : It takes about 4 seconds to receive 10 000 messages . Questions : .. . .. . 1 . Have anyone run similar performance comparison between the message queues Then I like to compare my results with yours . 2 . Is there any way I could tune RabbitMQ or Qpid to make it performance better Note : .. . .. . The tests were done on a virtual-machine with two allocated processor . The result may vary for different hardware however I am mainly interested in relative performance of the MQ products . Comment : I have run simple tests months ago with similar results . And I noticed the system is quite idle when working with RabbitMQ or Qpid . I think something must be wrong . Comment : RabbitMQ : it takes about 12 seconds to receive 10 000 messages . -- In our own tests we regularly see 20-25 000 sec ingress per CPU . So you are doing something wrong or using a slow client . Have you tried emailing rabbitmq-discuss with questions Comment : Here s a good comparison dated April 10 2013 : x-aeon.com wp 2013 04 10 http : x-aeon.com wp 2013 04 10 a-quick-message-queue-benchmark-activemq-rabbitmq-hornetq-qpid-apollo Comment : A comparison of performance of RabbitMQ Kafka HornetQ SQS and Mongo-based replicated queues : warski.org blog 2014 07 http : www.warski.org blog 2014 07 evaluating-persistent-replicated-message-queues Comment : Give a try to nanomsg -- another offspring evolved by Martin Sustrik the ZeroMQ co-father . A good place to start to read is nanomsg.org documentation-zeromq.html http : nanomsg.org documentation-zeromq.html .. . Answer : I am using a broker instead of peer to to peer communication in ZeroMQ to to make the performance comparison fair to other message-queue implementation that uses brokers . Not sure why you want to do that -- if the only thing you care about is performance there is no need to make the playing field level . If you don t care about persistence filtering etc . then why pay the price I m also very leery of running benchmarks on VM s -- there are a lot of extra layers that can affect the results in ways that are not obvious . Unless you re planning to run the real system on VM s of course in which case that is a very valid method .", "Question : I am running rabbitmq server 3.1.5 and trying to connect to this broker from a Qpid 6.0.0 client both running on Linux . The rabbitmq broker is using amqp 0-9-1 . When I try to connect from the Qpid client it fails with connection reset . From the Qpid client stack-trace I ve masked the first two octets of the IP addresses : .. . .. . On the RabbitMQ broker side the log file shows : .. . .. . The rabbitmq error message indicates that it is rejecting the proposed amqp version 1-0-10 from the Qpid client . I captured a tcpdump trace of the attempted session and I see the client .33 above opens the TCP connection sends an amqp message with protocol ID 1-1 version 0-10 and then follows that by sending another amqp message with protocol ID 0-0 version 9-1 . However the rabbitmq broker side .41 above seems to have given up after the 1-0-10 message and resets the TCP connection without processing the 0-9-1 amqp message . Any ideas how I can get the rabbitmq broker to take the 0 0 9 1 version negotiation .. . Answer : You are using the Qpid Client for earlier versions http : qpid.apache.org components jms amqp-0-x.html which speaks AMQP 0-8 through 0-10 . Its default behaviour is to initiate a connection a connection at 0-10 and then negotiate if it receives a different protocol response from the Broker . When connecting this client to RabbitMQ you should see a connection attempt at 0-10 which Rabbit will reject with a 0-91 protocol response and then the client should automatically retry at this suggestion . From what you have posted above it appears that Rabbit is upholding its side of the bargain . If you turn on logging on the Qpid client-side logger org.apache.qpid to DEBUG this might help you understand why things are going wrong . For a comparison here s what I see when connecting the Qpid Client to RabbitMQ 3.5.4 some superfluous lines omitted . As an alternative you can lock the Qpid Client to a particular protocol version with system property qpid.amqp.version . Starting your code with -Dqpid.amqp.version 0-91 will mean it will skip the negotiation phase entirely . Comment : Thanks your description matches what I observedm and setting the version to 0-91 using the command-line argument solved the version negotiation issue Comment : It is good to hear that the qpid.amqp.version workaround is working for you . If you can turn on logging to expose the original underlying problem and report on users@qpid.apache.org qpid.apache.org discussion.html https : qpid.apache.org discussion.html that would be appreciated .", "Question : I am looking into using a product such as RabbitMQ or ActiveMQ . I see that there is to a certain extent a level of support in these products for AMQP v1.0 . However I am struggling to find a client for using AMQP 1.0 with .NET . So far the only one I have come across is Apache Qpid . However having to install all its dependencies along with building it all rather than just using something like NuGet to obtain the client library all seems a bit cumbersome and doesn t give me confidence in support moving forward . Microsoft Azure Service Bus has AMQP 1.0 support and has a client but it appears to be specific to that product as far as I can tell which is a shame as I thought one of the benefits of AMQP was the ease to switch out different brokers . From what I have read on RabbitMQ it appears that they are not committing to building a client for AMQP 1.0 . Does anyone have any thoughts on the above and whether there are any clients I have overlooked Many thanks in advance .. . Answer : The most complete AMQP 1.0 client for .NET is Amqp.Net Lite 1 . I m aware of people having success with this against Azure Service Bus Qpid C++ broker and ActiveMQ . Regards Dave . 1 https : amqpnetlite.codeplex.com", "Question : I need a high performance message bus for my application so I am evaluating performance of ZeroMQ RabbitMQ and Apache Qpid . To measure the performance I am running a test program that publishes say 10 000 messages using one of the message-queue implementations and running another process in the same machine to consume these 10 000 messages . Then I record time difference between the first message published and the last message received . Following are the settings I used for the comparison . 1 . RabbitMQ : I used a fanout type exchange and a queue with default configuration . I used the RabbitMQ C client library . 2 . ZeroMQ : My publisher publises to tcp : localhost : port1 with ZMQ PUSH socket My broker listens on tcp : localhost : port1 and resends the message to tcp : localhost : port2 and my consumer listens on tcp : localhost : port2 using ZMQ PULL socket . I am using a broker instead of peer to to peer communication in ZeroMQ to to make the performance comparison fair to other message-queue implementation that uses brokers . 3 . Qpid C++ message broker : I used a fanout type exchange and a queue with default configuration . I used the Qpid C++ client library . Following is the performance result : .. . .. . 1 . RabbitMQ : it takes about 1 second to receive 10 000 messages . 2 . ZeroMQ : It takes about 15 milli seconds to receive 10 000 messages . 3 . Qpid : It takes about 4 seconds to receive 10 000 messages . Questions : .. . .. . 1 . Have anyone run similar performance comparison between the message queues Then I like to compare my results with yours . 2 . Is there any way I could tune RabbitMQ or Qpid to make it performance better Note : .. . .. . The tests were done on a virtual-machine with two allocated processor . The result may vary for different hardware however I am mainly interested in relative performance of the MQ products . Comment : I have run simple tests months ago with similar results . And I noticed the system is quite idle when working with RabbitMQ or Qpid . I think something must be wrong . Comment : RabbitMQ : it takes about 12 seconds to receive 10 000 messages . -- In our own tests we regularly see 20-25 000 sec ingress per CPU . So you are doing something wrong or using a slow client . Have you tried emailing rabbitmq-discuss with questions Comment : Here s a good comparison dated April 10 2013 : x-aeon.com wp 2013 04 10 http : x-aeon.com wp 2013 04 10 a-quick-message-queue-benchmark-activemq-rabbitmq-hornetq-qpid-apollo Comment : A comparison of performance of RabbitMQ Kafka HornetQ SQS and Mongo-based replicated queues : warski.org blog 2014 07 http : www.warski.org blog 2014 07 evaluating-persistent-replicated-message-queues Comment : Give a try to nanomsg -- another offspring evolved by Martin Sustrik the ZeroMQ co-father . A good place to start to read is nanomsg.org documentation-zeromq.html http : nanomsg.org documentation-zeromq.html .. . Answer : I ve tested c++ qpid .. . .. . I sent 50000 messages per second between two diferent machines for a long time with no queuing . I didn t use a fanout just a simple exchange non persistent messages .. . .. . Are you using persistent messages Are you parsing the messages I suppose not since 0MQ doesn t have message structs . If the broker is mainly idle you probably haven t configured the prefetch on sender and receptor . This is very important to send many messages . Comment : I am using non durable queue I don t parse the message Actually I am using the same code to generate messages for all three queue experiments . Changing exchange type to direct didn t have effect on performance . Also after using sender flow-control api sender.SetCapaclity 8 the the timing got worse . without the sender flow-control the queue seems to grow unbounded . When measuring time have you waited until receiving all the messages and the queue is fully drained Comment : I found that qpid-perftest program is using Qpid s old messaging Apis . Switching to the old Apis improved performance 10 times in my test .", "Question : This is my first day with Apache Proton and Qpid java-broker version 0.32 and I need a simple send and receive example in Java no JMS . By poking around I found Send.java and Recv.java neither of which actually work . On mng.send I get .. . .. . From stackoverflow and a half dozen other google searches it seems that one must create an anonymous security provider first . How does one do this I can t guess either the config.json change nor how to use the web interface . The two sentences of prose in the Qpid java broker documentation are not helping me . On a related note couldn t I just use amqp : admin : admin@localhost : 5672 or amqps : admin : admin@localhost and take advantage of the security provider that is already there Does anyone have a documented Java example of Send and Recv that is known to actually run on the current version of Qpid and Proton and comes with any prerequisite config.json changes .. . Answer : The Java broker does not support anonymous authentication . I need to switch to the C++ broker . Qid and Proton still needs a Java tutorial if only so the qpid team can test it . Comment : I don t believe this is true see 10.3.5 here : qpid.apache.org releases qpid-0.20 java-broker book https : qpid.apache.org releases qpid-0.20 java-broker book Java-Broker-Security-Authentication-Providers.html Comment : I will look up the URL that mentions this as a TBD", "Question : null .. . Answer : Hello I will be happy to understand how can I write simple Java standalone program which sends and receives messages to RabbitMQ using Apache QPID jms client . How can I create an initial context from QPID and then lookup destination from RabbitMQ I searched a lot in internet but I was not able to find any solution which helps me to get better understanding on creating the connection between this two . I believe this should be possible due to the fact that both RabbitMQ and QPID are using AMQP protocol . I tried with to create the Context with the following jndi.properties : .. . .. . java.naming.factory.initial org.apache.qpid.jms.jndi.JmsInitialContextFactory connectionfactory.myFactoryLookup amqp : : 5672 queue.myQueueLookup queue .. . .. . And the following code : .. . .. . But I am getting an exception : .. . .. . Do somebody have an idea what could be the reason and and advise if there is something wrong with the code Thanks in advance Comment : Are you using the AMQP 1.0 plugin in Rabbit The JMS client only speaks 1.0 Comment : Since I am bit new with Rabbit I am not quite sure but I suppose not . Can you please expalin how to check this and how to configure it Comment : Rabbit has a Website with lots of docs that cover this", "Question : null .. . Answer : I have a queue in apache qpid broker . I want to create a Message Driven Bean in websphere 8.5.5 which will be attached to queue in apache qpid broker . That means whenever a message is sent to queue in apache qpid broker the Message driven bean should get triggered . I need guidance from you to configure websphere 8.5.5 to listen to apache qpid queue . I searched over google intensely but did not find any useful information . Please help .. . .. . Thanks Bhargav", "Question : I need a high performance message bus for my application so I am evaluating performance of ZeroMQ RabbitMQ and Apache Qpid . To measure the performance I am running a test program that publishes say 10 000 messages using one of the message-queue implementations and running another process in the same machine to consume these 10 000 messages . Then I record time difference between the first message published and the last message received . Following are the settings I used for the comparison . 1 . RabbitMQ : I used a fanout type exchange and a queue with default configuration . I used the RabbitMQ C client library . 2 . ZeroMQ : My publisher publises to tcp : localhost : port1 with ZMQ PUSH socket My broker listens on tcp : localhost : port1 and resends the message to tcp : localhost : port2 and my consumer listens on tcp : localhost : port2 using ZMQ PULL socket . I am using a broker instead of peer to to peer communication in ZeroMQ to to make the performance comparison fair to other message-queue implementation that uses brokers . 3 . Qpid C++ message broker : I used a fanout type exchange and a queue with default configuration . I used the Qpid C++ client library . Following is the performance result : .. . .. . 1 . RabbitMQ : it takes about 1 second to receive 10 000 messages . 2 . ZeroMQ : It takes about 15 milli seconds to receive 10 000 messages . 3 . Qpid : It takes about 4 seconds to receive 10 000 messages . Questions : .. . .. . 1 . Have anyone run similar performance comparison between the message queues Then I like to compare my results with yours . 2 . Is there any way I could tune RabbitMQ or Qpid to make it performance better Note : .. . .. . The tests were done on a virtual-machine with two allocated processor . The result may vary for different hardware however I am mainly interested in relative performance of the MQ products . Comment : I have run simple tests months ago with similar results . And I noticed the system is quite idle when working with RabbitMQ or Qpid . I think something must be wrong . Comment : RabbitMQ : it takes about 12 seconds to receive 10 000 messages . -- In our own tests we regularly see 20-25 000 sec ingress per CPU . So you are doing something wrong or using a slow client . Have you tried emailing rabbitmq-discuss with questions Comment : Here s a good comparison dated April 10 2013 : x-aeon.com wp 2013 04 10 http : x-aeon.com wp 2013 04 10 a-quick-message-queue-benchmark-activemq-rabbitmq-hornetq-qpid-apollo Comment : A comparison of performance of RabbitMQ Kafka HornetQ SQS and Mongo-based replicated queues : warski.org blog 2014 07 http : www.warski.org blog 2014 07 evaluating-persistent-replicated-message-queues Comment : Give a try to nanomsg -- another offspring evolved by Martin Sustrik the ZeroMQ co-father . A good place to start to read is nanomsg.org documentation-zeromq.html http : nanomsg.org documentation-zeromq.html .. . Answer : i think if you use celery Rabbitmq performance will improve Comment : The OP doesn t mention using python and you should be aware that while a great library celery is not black magic and is not going to make rabbitmq faster just by using it .", "Question : I need a high performance message bus for my application so I am evaluating performance of ZeroMQ RabbitMQ and Apache Qpid . To measure the performance I am running a test program that publishes say 10 000 messages using one of the message-queue implementations and running another process in the same machine to consume these 10 000 messages . Then I record time difference between the first message published and the last message received . Following are the settings I used for the comparison . 1 . RabbitMQ : I used a fanout type exchange and a queue with default configuration . I used the RabbitMQ C client library . 2 . ZeroMQ : My publisher publises to tcp : localhost : port1 with ZMQ PUSH socket My broker listens on tcp : localhost : port1 and resends the message to tcp : localhost : port2 and my consumer listens on tcp : localhost : port2 using ZMQ PULL socket . I am using a broker instead of peer to to peer communication in ZeroMQ to to make the performance comparison fair to other message-queue implementation that uses brokers . 3 . Qpid C++ message broker : I used a fanout type exchange and a queue with default configuration . I used the Qpid C++ client library . Following is the performance result : .. . .. . 1 . RabbitMQ : it takes about 1 second to receive 10 000 messages . 2 . ZeroMQ : It takes about 15 milli seconds to receive 10 000 messages . 3 . Qpid : It takes about 4 seconds to receive 10 000 messages . Questions : .. . .. . 1 . Have anyone run similar performance comparison between the message queues Then I like to compare my results with yours . 2 . Is there any way I could tune RabbitMQ or Qpid to make it performance better Note : .. . .. . The tests were done on a virtual-machine with two allocated processor . The result may vary for different hardware however I am mainly interested in relative performance of the MQ products . Comment : I have run simple tests months ago with similar results . And I noticed the system is quite idle when working with RabbitMQ or Qpid . I think something must be wrong . Comment : RabbitMQ : it takes about 12 seconds to receive 10 000 messages . -- In our own tests we regularly see 20-25 000 sec ingress per CPU . So you are doing something wrong or using a slow client . Have you tried emailing rabbitmq-discuss with questions Comment : Here s a good comparison dated April 10 2013 : x-aeon.com wp 2013 04 10 http : x-aeon.com wp 2013 04 10 a-quick-message-queue-benchmark-activemq-rabbitmq-hornetq-qpid-apollo Comment : A comparison of performance of RabbitMQ Kafka HornetQ SQS and Mongo-based replicated queues : warski.org blog 2014 07 http : www.warski.org blog 2014 07 evaluating-persistent-replicated-message-queues Comment : Give a try to nanomsg -- another offspring evolved by Martin Sustrik the ZeroMQ co-father . A good place to start to read is nanomsg.org documentation-zeromq.html http : nanomsg.org documentation-zeromq.html .. . Answer : We ve developed an open-source message bus built on top of ZeroMQ - we initially did this to replace Qpid . It s brokerless so it s a totally fair comparison but it provides the same functionality as brokered solutions . Our headline performance figure is 140K msgs per second between two machines but you can see more detail here : https : github.com Abc-Arbitrage Zebus wiki Performance", "Question : I am trying to use Apache Qpid through Spring Boot application using Jms Qpid client . I am able to configure it but when I am trying to receive message from the queue the logger is printing : .. . .. . Here is my code : .. . .. . JmsConfiguration.java .. . .. . application.properties .. . .. . ScheduledTask.java It just run send and receive messages in intervals . .. . Answer : You create an instance implementing MessageListener but you don t do anything with it . In Spring you should use DefaultMessageListenerContainer or SimpleMessageListenerContainer from spring-jms and create it as a Spring Bean in the JmsConfiguration class . After setting connection details ConnectionFactory Queue sessionTransacted etc . you also need to set the JMS MessageListener implementing class . Comment : I will try it now . But I was thinking as I have implemented a method which checks for message after a particular delay I don t need a listener . Am I wrong" ] }
[ "yes-answer-long", "yes-answer-short" ]
amqp
UNK_RELATION
livedb@wrapper@32
livedb -- livedb is a database @placeholder for concurrent editing systems .
{ "confidence": [ 48.26015090942383, 39.173309326171875, 35.851497650146484, 31.948532104492188, 16.996370315551758, 14.886168479919434, 14.886168479919434, 14.886168479919434, 14.886168479919434, 14.886168479919434, 14.886168479919434, 14.886168479919434, 14.886168479919434, 14.886168479919434, 14.886168479919434, 14.886168479919434, 14.886168479919434, 13.382264137268066, 13.382264137268066, 13.382264137268066, 13.382264137268066, 13.382264137268066, 13.382264137268066, 13.382264137268066 ], "content": [ "Counting the underlying mongodb collection is rather complicated since LiveDB I think it is LiveDB creates many mongodb documents for one derbyjs document .", "You will have to convert the collection to use it with Racer livedb because of the metadata on the document itself .", "In livedb every collection has a corresponding operations collection for example profiles will have a profiles ops collection which holds all the operations for the profiles .", "A utility was written for this purpose : https : github.com share igor .. . .. . You may need to modify it to only run against a single collection instead of the whole database but it essentially goes through every document in the database and modifies it with the necessary livedb metadata and creates a default operation for it as well .", "An alternative if you dont want to convert is to use traditional AJAX REST to get the data from your mongo database and then just put it in your local model .", "How can I count the results of a query without loading the whole resultset into memory", "The easy way of counting documents returned by a query would be : .. . .. . But this would load the whole resultset into memory and count an array in javascript .", "When you have lots of data you don t want to do this .", "I think .", "The internets point to this google groups thread https : groups.google.com forum topic derbyjs 1pcDUKSiuDI from 2013 but the solution described there putting count : true into the query options doesn t seem to work in DerbyJS 0.6 and current mongodb . .", "query.extraRef is undefined .", "It is done like described in the google groups thread .", "But query.extraRef is now query.refExtra .", "Example :", "you still want count : true so that you don t fetch all the documents as well", "@enjalot of course .", "Thanks :", "Same situation like this question but with current DerbyJS version 0.6 : .. . Using imported docs from MongoDB in DerbyJS http : stackoverflow.com questions 10379276 using-imported-docs-from-mongodb-in-derbyjs .. . .. . I have a MongoDB collection with data that was not saved through my Derby app .", "I want to query against that and pull it into my Derby app .", "Is this still possible", "The accepted answer there links to a dead link .", "The newest working link would be this : https : github.com derbyjs racer blob 0.3 lib descriptor query README.md .. . .. . Which refers to the 0.3 branch for Racer current master version is 0.6 .", ".. . .. . What I tried .. . .. . Searching the internets .. . The na ve way : .. . .. . var query model.query projects-legacy public : true .. . model.fetch query function .. . query.ref page.projects .. . .. . .. . .. . doesn t work", "This will not be real-time or synced to the server but it will allow you to drive your templates from data that you dont want to convert for some reason ." ] }
{ "confidence": [ 53.55854034423828, 53.54087829589844 ], "content": [ "Question : Same situation like this question but with current DerbyJS version 0.6 : .. . Using imported docs from MongoDB in DerbyJS http : stackoverflow.com questions 10379276 using-imported-docs-from-mongodb-in-derbyjs .. . .. . I have a MongoDB collection with data that was not saved through my Derby app . I want to query against that and pull it into my Derby app . Is this still possible The accepted answer there links to a dead link . The newest working link would be this : https : github.com derbyjs racer blob 0.3 lib descriptor query README.md .. . .. . Which refers to the 0.3 branch for Racer current master version is 0.6 . .. . .. . What I tried .. . .. . Searching the internets .. . The na ve way : .. . .. . var query model.query projects-legacy public : true .. . model.fetch query function .. . query.ref page.projects .. . .. . .. . .. . doesn t work .. . Answer : A utility was written for this purpose : https : github.com share igor .. . .. . You may need to modify it to only run against a single collection instead of the whole database but it essentially goes through every document in the database and modifies it with the necessary livedb metadata and creates a default operation for it as well . In livedb every collection has a corresponding operations collection for example profiles will have a profiles ops collection which holds all the operations for the profiles . You will have to convert the collection to use it with Racer livedb because of the metadata on the document itself . An alternative if you dont want to convert is to use traditional AJAX REST to get the data from your mongo database and then just put it in your local model . This will not be real-time or synced to the server but it will allow you to drive your templates from data that you dont want to convert for some reason .", "Question : How can I count the results of a query without loading the whole resultset into memory The easy way of counting documents returned by a query would be : .. . .. . But this would load the whole resultset into memory and count an array in javascript . When you have lots of data you don t want to do this . I think . Counting the underlying mongodb collection is rather complicated since LiveDB I think it is LiveDB creates many mongodb documents for one derbyjs document . The internets point to this google groups thread https : groups.google.com forum topic derbyjs 1pcDUKSiuDI from 2013 but the solution described there putting count : true into the query options doesn t seem to work in DerbyJS 0.6 and current mongodb . . query.extraRef is undefined . .. . Answer : It is done like described in the google groups thread . But query.extraRef is now query.refExtra . Example : Comment : you still want count : true so that you don t fetch all the documents as well Comment : @enjalot of course . Thanks :" ] }
[ "yes-answer-long", "yes-answer-short" ]
wrapper
UNK_RELATION
resources@configuration-files@127
resources -- assets like memory disk space cpu power or alike necessary for effective operation or physical files like images @placeholder or other to provide some externalized enrichment to an application .
{ "confidence": [ 33.19008255004883, 29.173311233520508, 28.369766235351562, 28.079010009765625, 27.09215545654297, 26.853519439697266, 26.853519439697266, 26.317113876342773, 25.955249786376953, 25.677656173706055, 25.594148635864258, 25.213777542114258, 25.086692810058594, 24.46029281616211, 24.36731719970703, 23.74591827392578, 23.56960105895996, 23.260753631591797, 23.228900909423828, 23.00691795349121, 22.800630569458008, 22.743608474731445, 22.566967010498047, 22.526241302490234, 22.510465621948242, 22.435333251953125, 22.381366729736328, 22.36910629272461, 22.36910629272461, 22.31731414794922, 22.31731414794922, 22.25614356994629, 22.227340698242188, 22.18289566040039, 22.115234375, 21.96055030822754, 21.947494506835938, 21.94614028930664, 21.938262939453125, 21.92641258239746, 21.92192268371582, 21.893260955810547, 21.86724853515625, 21.779428482055664, 21.745235443115234, 21.73743438720703, 21.713205337524414, 21.71271514892578, 21.71271514892578, 21.64573860168457, 21.579153060913086, 21.528629302978516, 21.527612686157227, 21.442344665527344, 21.33882713317871, 21.26459503173828, 21.205734252929688, 21.19867706298828, 21.177616119384766, 21.177616119384766, 21.15170669555664, 21.12738800048828, 21.12152862548828, 21.062185287475586, 21.03760528564453, 20.97214126586914, 20.97214126586914, 20.956939697265625, 20.8946590423584, 20.885887145996094, 20.751602172851562, 20.735774993896484, 20.64004135131836, 20.604585647583008, 20.565731048583984, 20.531593322753906, 20.455585479736328, 20.425071716308594, 20.36949348449707, 20.344074249267578, 20.28786277770996, 20.213279724121094, 20.20090103149414, 20.12851333618164, 20.09160041809082, 20.085037231445312, 20.085037231445312, 20.068592071533203, 20.068592071533203, 20.068592071533203, 20.006208419799805, 19.97146987915039, 19.94226837158203, 19.874958038330078, 19.867958068847656, 19.86400604248047, 19.857521057128906, 19.806312561035156 ], "content": [ "The question is not about physical images in directories but resources in resx files .", "It uses Java classes some images and generates some other resources .php files images stylesheets etc .", "getrusage accomplishes cpu memory and disk etc .", "But I need to make links inside my webview that point to some other resources For example images or other html files .", "I want the information for all 3 resources cpu disk and network", "Some of the images are like 16 MB files otherwise 1 MB in average .", "Some of the images are like 16 MB files otherwise 1 MB in average .", "Also I tried some other prefix like .. . resources src resources .. . etc .", "BTW there are also other Android resources available like for example icons images etc .", "It seems that Assets provide much more flexibility and functionality then Raw resources .", "Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS", "Or you can add default values for resources to your library-project and add some of this resources to application projects if necessary .", "When stopping the application the resources are freed and the CPU load of the Xorg process is normal .", "Look at the source for the Resources constructor and you ll see that creating a new Resources object like this changes things deep in the process s assets apparently a singleton .", "Of course the space they take are consuming virtual-memory resources so are limited .", "I have a simple WinForms application but it has some Embedded Resources in a subfolder under Resources that I would like to copy out to a folder on the computer .", "There is no problem in your code of loading assets from Resources .", "The ResourceReader class allows you to read a .resources file like this : .. . .. . And you can use the ResourceWriter class to create a new .resources file like this : .. . .. . However the real question to ask is do you have to use .resources files", "Now you can access resources from the other project like this :", "I am writing an Orchard theme and I d like to be able to locate some of the resources packaged with the theme images swfs etc .", "You can only store plain-text XML in the assets folder not layout files and such-like .", "The path according to my scene is .. . .. . Assets Resources System PlayerAnimator.controller .. . .. . This is how I used in my other scripts to load the resources .. . .. . What is the fix for this", "Files resources", "First of all I m need disk usage limitation but possibility to set limits for CPU and Memory usage interesting too .", "Ok in my project resources i have some images .png .", "Appart for other objections resources may be easily localized but AFAIK there is no l10n in-built mechanism for assets .", "There are like 20 images in all .", "I don t want to save files in application path or database or other things like that .", "I don t want to save files in application path or database or other things like that .", "You can bundle XML files in assets also .", "Normally on Android you put such files in the assets directory .", "In android R.java is used to provide access to resources defined in XML files .", "I have a webview in my iPhone application and I also have some html files inside my Resources folder .", "Like memory or performance implications .. . .. . The difference between static and dynamic resources comes when the underlying object changes .", "Flat resources that don t contain other resources are no problem .", "And how I need to use this images and other resources on GSP page .", "The resources include cputime disk usage and network usage .", "Resources on the classpath are not meant to be enumerable as there is no guarantee where they are loaded from could be from disk in a JAR file HTTP a database or other exotic resources - including ones where the enumeration of available files would not be feasible .", "Put the resources under : src main webapp images logo.png and then access them via resources images logo.png .", "Is there any way to measure the resources consumed by Docker containers like RAM CPU usage", "All like this : .. . .. . Application folders tree : .. . .. . Resources folders tree : .. . .. . But this sameness within names leads to error of resources conflict in the App GlobalResources folder .", "However some operations are more easily done by placing files in this folder like copying a database file to the system s memory .", "resources are compiled binary files not text .", "just like the way you add Image to ImageList at design-time so if I move my application files somewhere else the added images move with it .", "I would like to hide from the dropdown the resources that are created by other vendor users and display only my resources .", "I confirmed by print that they have been set .. . .. . Physical memory usage goes above 2.4Gb at which point CPU usage falls 5 and it hangs .", "This is the only way to get resources as opposed to assets that I can find .", "Your resources folder should now look like this : .. . .. .", "it is in one of my custom resources file like testsResources.groovy", "Other images referenced from css files works fine and rewriting is going on .", "I d like to point out that one issues is what if the same resources are in multiple jar files .", "The resources are not files anymore .", "If these resources are static binary files such as images PDFs try setting them uncached .", "Like memory allocated in several places", "I have a Python package with some css stylesheets which I have included as resources like so : .. . .. . I would now like to load one of these included resources as a string .", "But when i m watching the resources in Visual Studio 2010 they are sorted by type : Strings Files Images Icons .", "This way you can put your resources pdf images in the directory resources .", "there are basically 4 servers that are alike they all contain the same packages this operation only performed on one of them .", "How does one combine several resources for an application images sounds scripts xmls etc .", "Creating and compiling my own WPF Application with the same the resources of same type images for example .. . 3 .", "As can be seen your Resources dont need to be recreated instead they do use some resources that cant be reloaded probably images .", "However this mapping stops the access to static files like CSS JS images etc which are all in the res folder .", "And that s why program can t find necessary resources .", "I am interested in measuring how much resources they consume as far as regarding CPU and Memory usage .", "cpu memory AS or so how can OS enforce these", "So it seems like a good candidate for on-demand resources .", "It seems like the server is running out of resources .", "Plase note that when some operation in try-with-resources block without catch throws an exception the code following that block will not be executed .", "The externalized location would be only accessible by a different classloader .", "But I have some strange problems with maven-resources-plugin .. . .. . It s returning permission-denied on all my .resources files .", "Changing application wide resources in runtime is like : .. . .. . About the InvalidOperationException i guess WallStreet Programmer is right .", "It is not unprofessional for an application to store data on the disk .", "It s got cpu disk and network all on one screen .", "This jar also contains some JSP resources like : .. . .. . Now I want to override a specific JSP using the following structure in my application .", "The disk space usage stuff requires Java 1.6 or higher .", "And track whiz resources is consuming more memory", "the physical folder of the application executable assembly i.e .", "PS some plugins do allow you to specify the resources you want to copy like copy-resources .", "The second location classpath : WEB-INF public-resources in mvc : resources looks like you used some roo based template can be to expose resources for example js-files form jars if they are located in the directory WEB-INF public-resources in the jar .", "Sounds more like memory remaining and not in use .", "Sure resources may not always be files but the question was about resources originating from files directories .", "after running into some problems with the deprecated ways to include css resources into my application I m eager about using ClientBundle to include the css files .", "I understand that try-with-resources is necessary : program works with it not without it .", "Then they provide functions for accessing these data blocks like normal files although I don t know how they really work .", "My code looks like this : .. . .. . I would like it to use the minimum possible resources .", "I m trying to understand the reason for using Raw resources vs . Assets .", "No you can directly use resources or assets but it would be messy and inefficient .", "You should not chain resources like that because it may lead to unpleasant surprises .", "NOTE Calling the Resources constructor like this changes something internally in Android .", "This is what I find to be the best solution for handling resources like JDBC .", "In other words it returns web resources .", "There have been questions asking which is faster strpos or preg-match but I m interested in knowing which uses the least memory and CPU resources .", "I have to write an essay on scheduling non-CPU resources .", "You shouldn t use the maven-resources-plugin to copy webapp resources this plugin is only for application resources .", "Using Resources will be more space efficient and adds a bit more safety into things .", "Can my web-application hosted locally or with a server use device s resources like camera wifi sensors etc .", "At the moment in my ASP.NET webApp I have some resources such as some .pdf files or pictures in specific folder in the host .", "That folder also contains some other stacks like HyperCard Basics that might be of use to you ." ] }
{ "confidence": [ 37.47343444824219, 33.31949996948242, 33.31854248046875, 31.64917755126953, 31.63275146484375, 31.24336814880371, 31.036266326904297, 30.34363555908203, 30.301128387451172, 30.22197151184082, 30.016143798828125, 29.64664077758789, 29.552637100219727, 29.457378387451172, 28.8782901763916, 28.76993751525879, 28.693323135375977, 28.693323135375977, 28.693323135375977, 28.56694984436035 ], "content": [ "Question : I w writing a PHP script that uses Montage which is an extension of ImageMagick that creates tiled arrays of images . The Montage syntax is straightforward : .. . .. . However I m generating these images on the fly and I would hate to have to write them to disk just to run this command . Is there some way I can pass there resources in without writing them to file This isn t really a Montage question but rather a general question that could apply to many different situations . Any help would be great Comment : You could use a memory-based filesystem like tmpfs Comment : How are you integrating montage with dynamic images and PHP right now Is it generate images with PHP and then have PHP make a shell call to montage Comment : @FoolishSeth : The images are generated by a custom C script then I m using passthru to get the raw image data . I ve been writing this to files and then using Montage but I d like to skip the writing to file part.. . Comment : @BasileStarynkevitch : This is the first I m hearing of tmpfs - sounds very interesting . I would imagine the setup is quite involved Comment : @BasileStarynkevitch : After a bit of reading it sounds like I can just save the files to dev shm on Ubuntu which would in fact save it into RAM . Is that correct If so that s the perfect solution .. . Answer : As I commented you could find some tmpfs http : en.wikipedia.org wiki Tmpfs file system e.g . with df grep tmpfs such as run and put your files inside . They will then live within the virtual-memory and won t usually need any disk I O . Of course the space they take are consuming virtual-memory resources so are limited . BTW on many Linux systems writing small files don t use a lot of disk I O because they sit in the file system cache . Of course any tmpfs file system loses all its content at every reboot so you don t want to keep important unrecoverable data inside .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : You can get some limited memory information from the Runtime class . It really isn t exactly what you are looking for but I thought I would provide it for the sake of completeness . Here is a small example . Edit : You can also get disk usage information from the java.io.File class . The disk space usage stuff requires Java 1.6 or higher . Comment : I think Total memory currently in use by the JVM is a little confusing . The javadoc http : docs.oracle.com javase 6 docs api java lang Runtime.html totalMemory 28 29 says that function returns the total amount of memory currently available for current and future objects measured in bytes . Sounds more like memory remaining and not in use . Comment : the performance of these functions is low Comment : @Dirk : I updated the wording to address your comment . Thanks Comment : @LeonardoGaldioli : I don t know the performance characteristics of these classes and methods but I wouldn t be surprised if they weren t optimized for speed . Other answers explain how to collect certain information using JMX which might be faster . Comment : This doesn t answer the question correctly . All that data reefers to JVM and not to the OS.. .", "Question : I am doing a project in pure OpenGL and FREEGLUT named Space Voyager https : github.com sohailchd SpaceVoyager . Problem is that during run time when programe calls a function to load all the images player has to wait around 2 minutes on loading screen Some of the images are like 16 MB files otherwise 1 MB in average . There are like 20 images in all . I need to load all the images before staring the level . Now I am using SOIL http : www.lonesock.net soil.html for loading the images in my game . SOIL has a function to load images from memory SOIL load OGL texture load from memory unsigned char image in RAM .. . . My solution is to embed all the images in .exe file of the game and use it at run time so as to save the time to load all the images in game . I am pretty much lost as how to exactly embed the jpg images in executable and .. . use it at run time as unsigned char imagePointer Comment : Have you profiled your code to check that the loading is the bottleneck in your app Comment : You might use .tga files instead of .jpg This is a format designed to textures . It is heavier on your disk because files are usually larger than .jpg but it loads slightly faster . Comment : The logic seems shaky that the same data will load from disk to memory faster if it s in an exe file . Comment : See LoadResource and related stuff . msdn.microsoft.com en-us library windows desktop https : msdn.microsoft.com en-us library windows desktop ms648046 28v vs.85 29.aspx Comment : I don t see how this would be any faster . The data still needs to be loaded from disk and the JPG or whatever format still needs to be decoded . It s just coming from a different place on disk .. . .. . Answer : My solution is to embed all the images in .exe file of the game and use it at run time so as to save the time to load all the images in game . How do you suppose this would do the trick It doesn t matter what label the data on the storage device has on it . The effort for the computer system are invariant . It doesn t matter if you place the resources in a separate file to the computer it makes no difference whatsoever . Some of the images are like 16 MB files otherwise 1 MB in average . There are like 20 images in all . I need to load all the images before staring the level . That s not a lot of data . 20 images with 1MiB in average that s 20MiB in average . Even slow HDD disks of spinning rust can deliver 10MiB s easily . A much more common figure is something like 50MiB to 80MiB s for cheap HDDs these days . Wherever your bottleneck lies it s not I O . Also keep in mind that if you embedded the files RAW into the executable you re forcing the system to shove more data through I O having the images compressed in the executable still requires you to decompress . Given the fact that most of the time you re I O bound and not CPU bound having compressed images in storage is desireable . UPDATE .. . .. . Your problem is this : .. . .. . SOIL FLAG POWER OF TWO https : github.com sohailchd SpaceVoyager blob master SpaceVoyager TextureLoader.cpp L29 .. . .. . You re asking soil to rescale each and every image to the next bigger size that s a power of 2 . Before OpenGL-2 this had to be done since OpenGL-1 would only accept power-of-2 sized images for textures . Ever since OpenGL-2 came out and you ll be hard pressed to find a GPU that doesn t support OpenGL-2 these days that constraint has been lifted . Another time consuming operation is the generation of mipmaps SOIL FLAG MIPMAPS since this required the generation of a whole image pyramid for each image . Now mipmapping is something you generally want to have . In case you have a context OpenGL-3 you can use the OpenGL built-in mipmap generator . Also you re asking SOIL to generate texture IDs for you but you also generate IDs yourself . Use either one but don t use both . This leads to the following suggested changes in your code : Comment : Actually go all the required images amounts to exactly 167 MB . I am trying to load them before the game level starts . I need to use another thread to load the resources . Hopefully I may be able to save some of the time spent on loading screen . Thanks . Comment : Can I ask you Is there any method to load and link any pre compiled object code at run time . Anything close to that or something Comment : @Sohail CHD : What does it matter that it s object code Yes you could place the image data into object code but what purpose does it serve . All you get is a file with a slightly different structure but the workload getting the image to the GPU does not change For the computer it makes absolutely no difference You have to understand this deep down in your guts : There is no difference between code and data Data is code and code is data . Yes you could slap the images into a PE and throw LoadLibrary dlopen at it but behind the scenes it boils down to opening and reading a file . Comment : @Sohail CHD : 167MiB are not terribly much data . Even with a slow HDD this would load in under 4s . The issue you have at hand is that SOIL is probably not the most efficient image loader there is . Also generating the mipmaps online is expensive . You d gain much more if you would precompute the mipmaps . DON T BOTHER WITH TRYING TO PACK UP THE IMAGES DIFFERENTLY it won t do anything good . Instead look at more efficient JPEG loaders TurboJPEG libjpeg-turbo . Also memory mapping can help but if you have to keep the while file in memory for decoding anyway a simple read works just as well . Comment : Never learn so much so quickly . Great pieces of advice . I will do away with SOIL and try something as you suggested . vielen Dank", "Question : this is some sort of a philosophical question . . . I m in the mid of my studies in the Android world and I just covered the Assets and Raw resources . I m trying to understand the reason for using Raw resources vs . Assets . 1 . They both provide with an uncompiled resource input stream . 2 . It seems that Assets provide much more flexibility and functionality then Raw resources . a . You can create folder structure under Assets and not under Raw .. . .. . b . you can list all resources dynamically in the assets folder and not in the Raw folder . So why would i use Raw resources in Android Thanks . Comment : Possible duplicate of Difference between res and assets directories http : stackoverflow.com questions 5583608 difference-between-res-and-assets-directories .. . Answer : The main differences between the raw folder and the Assets folder . Since raw is a subfolder of Resources res Android will automatically generate an ID for any file located inside it . This ID is then stored an the R class that will act as a reference to a file meaning it can be easily accessed from other Android classes and methods and even in Android XML files . Using the automatically generated ID is the fastest way to have access to a file in Android . The Assets folder is an appendix directory . The R class does not generate IDs for the files placed there so its less compatible with some Android classes and methods . Also it s much slower to access a file inside it since you will need to get a handle to it based on a String . However some operations are more easily done by placing files in this folder like copying a database file to the system s memory . There s no easy way to create an Android XML reference to files inside the Assets folder . Comment : @user370305 Hi is the 1MB limitation still there for new Android OS now I can t find any documentation that talk about this . Do you have any idea where can I find it Comment : @GMsoF - There is no any specific document for this . But I have some useful links for you . 1 . blog.rossgreenhalf.com 2010 12 13 android-file-size-limits http : blog.rossgreenhalf.com 2010 12 13 android-file-size-limits 2 . stackoverflow.com questions 11276112 http : stackoverflow.com questions 11276112 is-it-possible-to-add-specific-files-uncompressed-to-a-android-apk-using-build-x 3 . stackoverflow.com questions 6809651 http : stackoverflow.com questions 6809651 documentation-for-aapt-element-in-ant-script 4 . elinux.org Android aapt http : elinux.org Android aapt and 5 . android-developers.blogspot.in 2012 03 http : android-developers.blogspot.in 2012 03 android-apps-break-50mb-barrier.html Just go through as per sr no . Comment : @GMsoF - There are many tricks to put the file size larger than 1 mb in asset directory . Comment : @GMsoF - I am accessing 5mb size png file from res drawable-xhdpi directory . Comment : i never had a restriction of file size for the assets folder . are you sure there is such a thing", "Question : null .. . Answer : I am thinking of adopting on-demand resources in one of my apps . It will contain about 30 videos which most users will only view once . So it seems like a good candidate for on-demand resources . The lifespan of this app is expected to be about a week so it is good if the system will purge its assets after the user is done with it and forgets to delete it . However I obviously want to keep some assets available when the app is still being used . According to the official documentation https : developer.apple.com library ios documentation FileManagement Conceptual On Demand Resources Guide : .. . .. . An asset pack is eligible for purging when all of the associated tags are no longer retained by any request . The resources associated with a tag may remain on the device for some time before it is purged including across app launches . This description is extremely vague as it doesn t give enough hints as to when the assets can be purged after they are downloaded . Does it happen only when the device is low on memory Or will the system try to always optimise available memory even if the device has a lot of free space I would be really grateful if someone could tell which of the above is correct from their experience . In the case of my app the above uncertainty can lead to two scenarios : .. . .. . 1 Some videos will be purged for users running low on memory . This is great because those users wouldn t be able to download the app if I bundled all videos with the app so this inconvenience is totally tolerable . 2 A user who has 64GB of free space on their 128GB device will lose access to some videos and will have to download them again . This would result in ODR performing worse then simply bundling all videos together and I would like to avoid this scenario . I watched the WWDC video about ODRs https : developer.apple.com videos play wwdc2015 214 but it also doesn t give an answer to the above question.. .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : Usually to get low-level OS information you can call OS specific commands which give you the information you want with Runtime.exec or read files such as proc in Linux .", "Question : this is some sort of a philosophical question . . . I m in the mid of my studies in the Android world and I just covered the Assets and Raw resources . I m trying to understand the reason for using Raw resources vs . Assets . 1 . They both provide with an uncompiled resource input stream . 2 . It seems that Assets provide much more flexibility and functionality then Raw resources . a . You can create folder structure under Assets and not under Raw .. . .. . b . you can list all resources dynamically in the assets folder and not in the Raw folder . So why would i use Raw resources in Android Thanks . Comment : Possible duplicate of Difference between res and assets directories http : stackoverflow.com questions 5583608 difference-between-res-and-assets-directories .. . Answer : From the Android documentation http : developer.android.com guide topics resources providing-resources.html table1 the raw directory is used for : .. . .. . Arbitrary files to save in their raw form . To open these resources with a raw InputStream call Resources.openRawResource with the resource ID which is R.raw.filename . .. . However if you need access to original file names and file hierarchy you might consider saving some resources in the assets directory instead of res raw . Files in assets are not given a resource ID so you can read them only using AssetManager . .. . .. . In one line the files in the raw directory are not compiled by the platform http : thedevelopersinfo.com 2009 11 27 using-files-as-raw-resources-in-android are assigned a resource ID and cannot be grouped into sub-folders whereas if you want the otherwise use the assets directory . Comment : Are raw files the best option if you want to copy a large file to storage folder Comment : @40-Love There s no restriction on file size for Android 2.3 and above unless you re supporting earlier versions . http : ponystyle.com blog 2010 03 26 dealing-with-asset-compression-in-android-apps You may choose any storage folder depending on your requirement . A major distinction is the way these files are accessed .", "Question : null .. . Answer : I m use unoconv to convert user files from different format doc docx rft xls ppt .. . to html . Unoconv is a simple python wrapper on OpenOffice LibreOffice in headless mode . OS is Debain . Some day ago all free space on my server was filled with one 54Gb temp file which was created during file convertation . So what is the best way to limit resource for file processing . First of all I m need disk usage limitation but possibility to set limits for CPU and Memory usage interesting too .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : If you are using Jrockit VM then here is an other way of getting VM CPU usage . Runtime bean can also give you CPU load per processor . I have used this only on Red Hat Linux to observer Tomcat performance . You have to enable JMX remote in catalina.sh for this to work .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : Add OSHI dependency via maven : .. . .. . Get a battery capacity left in percentage : Comment : OSHI has most of the information described in the other comments . It uses JNA to get it via OS native calls when possible .", "Question : How do you go about finding unused icons images strings in .resx files that may have become orphaned and are no longer required .. . Answer : Rename your current image directory and then create a new one do a find-in-files search within VS for your image path i.e . content images multiselect all the used images and drag them into the new image folder . You can then exclude the old directory from the project or just delete it . Comment : The question is not about physical images in directories but resources in resx files .", "Question : I am trying to access the i18n properties file I m using in my JSF application in code . The idea is to have a page that displays its keys and values as a table actually . The project is a maven project and in the src resources localization folder and deployed in the war file in WEB-INF classes localization .. . .. . But the variable foo turns out to be null whatever I set the path variable to WEB-INF classes localization stat codes.properties localization.stat codes.properties etc . A similar question is here http : stackoverflow.com questions 3291398 java-accessing-properties-file-inside-a-war but there is no helpful answer there as well . .. . Answer : The Class getResourceAsStream can take a path which is relative to the location of the Class which you re using there as starting point . So for example if the class is located in the com.example package and you request the path foo filename.properties then it will actually load the com example foo filename.properties file . But if you use foo filename.properties then it will actually load foo filename.properties from the classpath root . So your code .. . .. . will actually look for java util localization stat codes.properties file . But in applications with a complex multiple classloader hierarchy the one classloader isn t the other . The classloader which loaded the core Java classes does not necessarily have knowledge about files which are in the webapp s WEB-INF classes . So prefixing the path with will not necessarily be the solution it would still return null . If you can guarantee that the current class is visible by the same classloader as the properties files because they re in the same sub-root of the classpath e.g . WEB-INF classes then you should indeed use .. . .. . But if at some point the properties files will be externalized because of more easy maintenance editing during runtime so that you don t need to rebuild redeploy restart the webapp whenever you want to edit the files then the above line of code will likely fail as well . The externalized location would be only accessible by a different classloader . The canonical solution is to use the thread s context classloader as starting point instead it has access to all resources in the classpath . note that this one cannot take a path starting with it s always relative to the common root .. . .. . See also : .. . .. . Where to place and how to read configuration resource files in servlet based application http : stackoverflow.com questions 2161054 where-to-place-and-how-to-read-configuration-resource-files-in-servlet-based-app .. . ExternalContext getResourceAsStream returns null where to place the resource file http : stackoverflow.com questions 25784482 externalcontextgetresourceasstream-returns-null-where-to-place-the-resource Comment : Thank you BalusC your continuous efforts for the JSF community and especially newcomers like me is very much appreciated .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : CPU usage isn t straightforward -- java.lang.management via com.sun.management.OperatingSystemMXBean.getProcessCpuTime comes close see Patrick s excellent code snippet above but note that it only gives access to time the CPU spent in your process . it won t tell you about CPU time spent in other processes or even CPU time spent doing system activities related to your process . for instance i have a network-intensive java process -- it s the only thing running and the CPU is at 99 but only 55 of that is reported as processor CPU . don t even get me started on load average as it s next to useless despite being the only cpu-related item on the MX bean . if only sun in their occasional wisdom exposed something like getTotalCpuTime .. . .. . .. . for serious CPU monitoring SIGAR mentioned by Matt seems the best bet .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : Have a look at the APIs available in the java.lang.management http : java.sun.com javase 6 docs api java lang management package-summary.html package . For example : .. . .. . OperatingSystemMXBean.getSystemLoadAverage .. . ThreadMXBean.getCurrentThreadCpuTime .. . ThreadMXBean.getCurrentThreadUserTime .. . .. . There are loads of other useful things in there as well . Comment : OperatingSystemMXBean.getSystemLoadAverage is not implemented in windows because its too expensive Comment : ThreadMXBean.getCurrentThreadCpuTime only returns how long that thread has been running . Not the cpu-usage percentage .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : You can get some system-level information by using System.getenv passing the relevant environment variable name as a parameter . For example on Windows : .. . .. . For other operating systems the presence absence and names of the relevant environment-variables will differ . Comment : These are platform dependent because variable names are different among systems . Oracle article on environment-variables tells that . I am also finding a way to get system independent way .", "Question : i know this may get a down vote this is bothering me a lot .. . .. . i have already read all posts on .close method like .. . .. . explain the close method in Java in Layman s terms http : stackoverflow.com questions 7118603 explain-the-close-method-in-java-in-laymans-terms .. . .. . Why do I need to call a close or shutdown method http : stackoverflow.com questions 16070634 why-do-i-need-to-call-a-close-or-shutdown-method lq 1 .. . .. . the usage of close method Java Beginner http : stackoverflow.com questions 35419715 the-usage-of-close-methodjava-beginner lq 1 .. . .. . i have these questions which may seem too trivial .. . .. . 1.what does the word resource exactly mean is it the file or the FileWriter object or some other thing try to explain as broadly as possible .. . .. . lets consider following code .. . .. . after compiling and executing it .. . .. . G : java characterstreams .. . .. . lets say resource is FileWriter below since i have yet to get the meaning of resources .. . .. . JVM starts and opens up so-called resources and then execution completes and after which JVM get shuts down after execution .. . .. . 2.it unlocks the resource that it has opened since it s not running right correct me if i am wrong .. . .. . G : .. . .. . at this point JVM is not running .. . .. . 3.before shuting down garbage collector is called right correct me if am wrong so FileWriter objects get destroyed then why are we supposed to close all the resources that we have opened up .. . .. . and .. . .. . 4.again i read that resources get leaked what does this supposed to mean. . Comment : You are thinking about a small self-contained example . There are countless cases where that would not apply . What if part of your program stays in memory indefinitely e.g . daemon threads Or if it leaves the impacted file system resource in an inconsistent state due to your application terminating incorrectly Etc . Etc . Comment : @Mena what does resource exactly mean...i have risked down vote so try and explain me.. . Comment : A resource is provided by the OS disks access sockets .. . .. . Answer : resource means anything which is needed by the JVM and or operating-system to provide you with the functionality you request . Taken your example . If you open a FileWriter the operating-system in general depends on the operating-system file system etc . will do assuming you want to write a file to a disc like HDD SDD .. . .. . 1 . create a directory entry for the requested filename .. . 2 . create a data structure to maintain the writing process to the file .. . 3 . allocate disc space if you actually write data to the file .. . .. . note : this is not an exhaustive list .. . .. . The point will be done for any file you open for writing . If you don t close the resource all this remains in the memory and is still maintained by the operating-system . Assume your application is running over a long time and is constantly opening files . The number of open file the operating-system allows you to keep open is limited the concrete number depends on the operating-system quota settings .. . . If the resources are exhausted something will behave unexpected or fail . Find below a small demonstration on Linux . The code open one-thousend file for writing . Assume your limit of open files is 1024 .. . .. . you run the snippet and it will generate 1000 files tmp demo . . If your limit of open files is only 100 the code will fail .. . .. . it fails before as the JVM itself has some open files .. . .. . To prevent such problems lack of resources you should close files which you don t need any longer to write to . If you don t do it in Java close the operating-system also doesn t know if the memory etc . can be freed and used for another request .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : It is still under development by you can already use jHardware https : github.com profesorfalken jHardware .. . .. . It is a simple library that scraps system data using Java . It works in both Linux and Windows .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : Hey you can do this with java com integration . By accessing WMI features you can get all the information .", "Question : I m currently building a Java app that could end up being run on many different platforms but primarily variants of Solaris Linux and Windows . Has anyone been able to successfully extract information such as the current disk space used CPU utilisation and memory used in the underlying OS What about just what the Java app itself is consuming Preferrably I d like to get this information without using JNI . Comment : With respect to free memory see stackoverflow.com a 18366283 231397 http : stackoverflow.com a 18366283 231397 Runtime.getRuntime .freeMemory as suggested in the accepted answer DOES NOT given you the amount of free memory . .. . Answer : For windows I went this way . For details I am sharing the link http : www.programcreek.com java-api-examples index.php api java.lang.management.OperatingSystemMXBean", "Question : Ok in my project resources i have some images .png . Whenever the user clicks on a Button a new image will be shown in an ImageBox . Because all of my images are stored in my project resources i have to get the Image.Source by code . I managed to do it by using a Method like this : .. . .. . In my app everything works fine . No errors no warnings images change fine every time i push the Button . After some monitoring in the memory i noticed that every time i call the getBitmapSourceFromBitmap my memory explodes 100MB EVERY TIME . Does anyone have any idea why is this happening Sorry for my English . .. . Answer : You are using unmanaged resources to create bitmap from your image . GC doesn t takes care of memory allocated to unmanaged resources . You need to dispose of your memory that you are using in that method . After you have converted your image to bitmap you need to release all the unmanaged resources . my memory explodes 100MB EVERY TIME .. . .. . As a general statement if your memory increases by 100MB doesn t means that you have a memory leak . In case of managed resources GC will collect all the memory that is collectible whenever it will feel feasible . Your Problem : As stated in the MSDN http : msdn.microsoft.com en-us library 1dz311e4.aspx .. . .. . You are responsible for calling the GDI DeleteObject method to free the memory used by the GDI bitmap object .. . .. . You need to change your code like this Comment : Perfect . Thank you a lot . After some search i found out that Imaging.CreateBitmapSourceFromHBitmap could cause memory problems if the image is in a format other than .png . After converting all my images in a non transparent .png image about 9kB per image everything went smoothly . And your solution works perfect so i will check it as answered so that anyone else with same problem have a guide . Thnak you again for your answer ." ] }
[]
configuration-files
UNK_RELATION