uid
stringlengths
6
55
question
stringlengths
34
465
context_short
sequence
context_long
sequence
tags
sequence
answer
stringlengths
1
25
relation
stringclasses
1 value
zedgraph@web@77
zedgraph -- zedgraph written in c is an lgpl class-library user control and @placeholder control for .net for creating various types of graphs and charts .
{ "confidence": [ 57.20790100097656, 54.93603515625, 48.436866760253906, 47.152591705322266, 45.787940979003906, 45.167564392089844, 43.262855529785156, 43.262855529785156, 42.98899841308594, 42.567779541015625, 42.567779541015625, 42.567779541015625, 40.292274475097656, 40.292274475097656, 39.007999420166016, 39.007999420166016, 38.409278869628906, 37.46875762939453, 35.49726486206055, 35.49726486206055, 35.49726486206055, 32.67374801635742, 28.756664276123047, 26.452190399169922, 25.707115173339844, 24.839990615844727, 24.422840118408203, 22.88359832763672, 22.140121459960938, 20.48879051208496, 20.47779655456543, 20.47779655456543, 20.47779655456543, 20.10582733154297, 18.22195053100586, 18.006690979003906, 18.006690979003906, 17.24609375, 17.24609375, 17.038169860839844, 16.121139526367188, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.648089408874512, 14.419663429260254, 13.924280166625977, 13.586840629577637, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504, 12.712204933166504 ], "content": [ "I am using ZedGraph to draw graphs in C .", "I use ZedGraph control to plot the data .", "Is there such an ability in zedgraph at all", "Is there a way to know that in ZedGraph", "I need to have multiple time frame on a zedgraph .", "I use the Zedgraph library to draw my graphs so something like graphPane.AddCurve PointPairList .", "Then you put everything on it you need in your typical tabpage including the ZedGraph control. . .. . .. . Also write your logic there .", "What must be done to get the frmGraph form or the ZedGraph control to update refresh redraw properly", "Everything seems to working the RefreshGraph Sub within frmGraph is being executed and new data is pushed into the ZedGraph control however the control never updates .", "You probably should be able to do it with ZedGraph .", "That being true I may add the functionality to ZedGraph .", "Yes antialiasing can be turnened on for ZedGraph diagramms .", "I am using ZedGraph to draw many curves on the pane .", "Thanks for the suggestion but it makes no sense to show all the 20k labels on the zedgraph .", "ZedGraph is the closest thing I could find http : zedgraph.org .", "Currently I have a script that map the Zedgraph to bitmap then paste it on the pdf file .", "In following my question ZedGraph custom graph http : stackoverflow.com questions 10172001 zedgraph-custom-graph I have chart with every second inserting of datas now I have other questions : .. . .. . 1 .", "This issue has been fixed in later versions of ZedGraph 5.1.7 .", "I m using 2 zedgraph axis in my graph and I need the labels to align .", "could you please help me about converting date to Persian date on X-Axis of zedgraph", "I am sorry this is beyond my skills with ZedGraph - hopefully someone else can help you out .", "If you select anything else but 100 ZedGraph 5.1.5 will not be able to calculate the zoom box correct .", "On Form1 I have a Dockpanel and am creating two new forms as shown below : .. . .. . Within the frmGraphTools class I have the following delegate event and button click event defined : .. . .. . Within the frmGraph class I have the following Sub defined : .. . .. . I have a ZedGraph control on the frmGraph form that is supposed to be refreshed redrawn upon the button click as defined on frmGraphTools .", "I also tested other software tools where I knew that they also use Zedgraph in order to see whether I am doing something wrong but the effect was exactly the same .", "0 label 1 1 label 2 . .. . .. . by default zedgraph has it line up with 0 N A 1 Label 1 2 label 2 .. . .. . is there a way of shifting the labels over 1 or shifting the label that it is displaying over 1 .", "However my control still is not updating", "Update In addidtion to a sufficient resolution it is of interest to draw quality lines etc. . A speciality of ZedGraph is that one can turn on Antialiasing either for individual lines : .. . .. . or other elements : .. . .. . or the whole Chart : .. . .. . All examples are taken from this post http : stackoverflow.com questions 17287666 isantialias-creates-border-around-graph .", "It appears that the zooming using Zedgraph has issues on some systems leading to the zoom selection box being off from where the mouse position would be see screenshot .. . .. . I think it has something todo with high DPI screens but I am not sure since my sample size is quite small .", "I am currently working on a C application that aims to do some computation and output graphs in a pdf file .", "I am looking for an Open Source .NET Library or wrapper to a library that will create contour plots from a set of values along a grid mesh .", "This is my first time using the Dockpanel Suite and there is a refresh method that must be called on the dockpanel control in order to refresh its contents .", "So you need to create and fill a bitmap with a larger size and take control of its dpi resolution .", "Note that it does not matter if the control is too large to fit on the screen DrawToBitmap will still work .", "Now I tried to output these graphs to pdf file via MigraDoc package .", "When the user gives the command to see the hourly graph i hide the daily candle stick and show the hourly time graph .", "You could also subclass a tabpage but going the UC way gives go an additional layer of independency you could place the same UC on a form or inside a container control. .", "So you should create such a Bitmap . . : .. . .. . ..and set the resolution : .. . .. . To fill it up your control must have the same size : .. . .. . Now DrawToBitmap should create an image that is crisp and fit to zoom in. .", "I have to display the stock data on a daily time frame and then if user wishes to view the view in monthly time frame or hourly time frame i need to support it .", "So your method event handler that supports this user action should : .. . - show-hide proper curves at pane change .. . - adjust the scale using properties I listed above .. . - refresh the graph .", "I want to let the user highlights a single point by right-clicking on it .", "First you create a new class of type UserControl .", "Note that the data must be in candle stick bar and not the line bar .", "Currently i have 3 curves and i display only one at a time and hide the others .", "For example initially i set up my graph to be on daily time frame and hide the hour and monthly time frame candle stick curve .", "However i am not able to change the x axis as it still shows the daily time instead of changing to hourly .", "I need to do something to change the x axis time frame from daily to hourly .", "Any kind of help is appreciable .", "Please advise even if there is a workaround .", "Thanks .", "You probably can do it by changing Min Max and Step properties of XAxis.Scale object .", "Note that Refresh method of ZedGraphControl isn t cheap .", "It redraws all elements on your graph so if you have a lot of data it isn t good idea to use it .", "In that situation you should use combination of AxisChange and Invalidate methods .", "It should be faster and cheaper .", "Now when you need another page you create one and add a new instance of the UC class you have created .", "You should think a little about dependencies with the rest of you application including the deleting of the pages a page controller class comes to mind that can handle these things if necessary .", "Pass the reference to RefreshGroup method from the correct instance of frmGraph .. . .. . also this call should be flagged by the compiler because you are passing a string instead of a Date .. . .. . probably you have Option Strict Off http : msdn.microsoft.com en-US library zcd4xwzs 28v VS.80 29.aspx", "There I need the Symbol type of that single point to change .", "I know I can change the color of a single point of a curve but I couldn t find anything about the symbol type or symbolsize modification of only one point .", "Btw I am trying to avoid adding extra curves as shadow curves etc .", "to my pane .", "I m using xAxis and x2Axis I can t change the X2Axis.Scale.MajorStep minorstep max maxauto min and minAuto .", "I have to align the 2 different axis s grid lines and label that it will display example .. . .. . text axis label 60 will display over linear axis 60 .", "Thanks", "I customize the right-click menu thanks to this : .. . .. . And .. . .. . But the menu Simple Cursor won t check when clicked .", "I try to force the sender in the function DisplaySimpleCursor it doesn t work .", "When I debug my app I see that in DisplaySimpleCursor the sender s property Checked is set to true .", "What am I missing", "As the menu is build on the heat the checkOnClick means nothing since the object is destroyed I guess everytime the menu is hidden .", "The solution was to set the property :", "I have a question about Persian date .", "thanks", "How to smoothly move down Y2Axis DateTime type with a chart line and show in chart always only last 30 minutes", "2 .", "How to format Y2Axis labels HH : mm to get 10 : 05 10 : 10 10 : 15 .. . 10 : 30", "Thanks for help", "UPD1 : Thanks kmp", "I try your code - its good but with issue : when I started I see this :", "enter image description here http : i.stack.imgur.com CeRby.png When after few minutes I see this picture :", "enter image description here http : i.stack.imgur.com C7IKH.png .. . .. . I have a compression of chart area but I want statically show always last 30 minute and slowly move down old datas without of scaling or packing chart with axis .", "I hope you understand me .", "UPD2 : Yet another issue - labels of Y2Axis haven t fixed values .", "For example now :", "enter image description here http : i.stack.imgur.com 9Myo4.png .. . .. . And after few seconds :", "enter image description here http : i.stack.imgur.com fwogo.png", "That axis is only showing about 5 minutes of data - it will not move until 30 minutes are shown - adjust the TotalMinutes value in the code to say 2 to see what I mean .", "Starting with the easiest - formatting the labels can be done like so : .. . .. . One way you could do this and it feels a bit flaky but I will let you decide is to simply remove the points from the curve once they go beyond your threshold in this case more than 30 minutes .", "That way when the chart redraws the axis will update accordingly .", "I feel like taking the scale min value might be a better approach than this but failing that you can simply maintain a queue as you add the points like so and then remove them when they go beyond your threshold :", "If I understand you this code compress graph chart axis and line until 30 minute happens and after 30 minute will scroll chart", "yes that is right - it will show only the last 30 minutes of data and discard anything else .", "But I want initially show 30 minutes without compess chart until 30 minute happen .", "I have update question .", "How to make fixed labels values on Y2Axis", "Now when new datas inserted every 1 second axis-labels always changed but I want to have 15 : 45 : 00 15 : 50 : 00 15 : 55 : 00 .. . labels .", "Is there any ways around to find the index position of a curve based on the current xPosition .. . .. . let s say I have a curve Item - MyCurve which has 20k points and when the mouse moves I could get the mouse location then I could get the x y positions by simply using the following function .", "but I want to find the data points from the curve item any suggestions.. .", "enter image description here http : i.stack.imgur.com V2DVt.png Thanks in advance... . :" ] }
{ "confidence": [ 58.1612548828125, 56.655723571777344, 55.508079528808594, 54.27197265625, 52.194618225097656, 52.194618225097656, 50.14411163330078, 47.63397979736328, 46.948097229003906, 45.59779357910156, 38.2961311340332, 35.93719482421875, 35.13785934448242, 12.659165382385254, 12.659165382385254 ], "content": [ "Question : null .. . Answer : I am using ZedGraph to draw graphs in C . I have been asked to draw a parabole and a normal line in the same graph and I need to know programatically if the parabole and the line intersect at any point actually I have to know that AND if one line is close enough from the other . Is there a way to know that in ZedGraph Thank you very much in advance . Comment : Analytical solution is inacceptable", "Question : I am currently working on a C application that aims to do some computation and output graphs in a pdf file . I use the Zedgraph library to draw my graphs so something like graphPane.AddCurve PointPairList . Now I tried to output these graphs to pdf file via MigraDoc package . Currently I have a script that map the Zedgraph to bitmap then paste it on the pdf file . So something like this : .. . .. . The problem is that this give me a slightly pixellated image on the pdf page . And I need this graph to be in a very high quality . So are there anything I can change the improve the quality or do i have to change my entire approach for such thing . Thank you so much in advance . .. . Answer : By default a Bitmap you create has your current screen-resolution which could be as low as 75dpi more common 96dpi more modern monitors have 120dpi or more but a good print quality starts 150dpi . For really crips images you want 300dpi and to allow zooming you may want to have 600dpi or more. . So you need to create and fill a bitmap with a larger size and take control of its dpi resolution . Assuming your size of 3.5f x 4.5f is inches for 300dpi you need a Bitmap with 1050 x 1350 pixels . So you should create such a Bitmap . . : .. . .. . ..and set the resolution : .. . .. . To fill it up your control must have the same size : .. . .. . Now DrawToBitmap should create an image that is crisp and fit to zoom in. . Note that it does not matter if the control is too large to fit on the screen DrawToBitmap will still work . Update In addidtion to a sufficient resolution it is of interest to draw quality lines etc. . A speciality of ZedGraph is that one can turn on Antialiasing either for individual lines : .. . .. . or other elements : .. . .. . or the whole Chart : .. . .. . All examples are taken from this post http : stackoverflow.com questions 17287666 isantialias-creates-border-around-graph . Comment : Yay I think it works now Thank you so much buddy . Just another point that I also discovered in case anybody else has the same problem . There is a function lineItem.Line.isAntiAlias which handles the pixellation from the zedgraphControl . Comment : Yes antialiasing can be turnened on for ZedGraph diagramms . See here http : stackoverflow.com questions 17287666 isantialias-creates-border-around-graph It seems to be available at several levels. . - If you are happy with the answer please consider consider accepting http : stackoverflow.com help accepted-answer it. . Comment : I found another problem in applying this method . The print out pdf size is huge . Is there anyway we can scale the output so that the quality for 300x300dpi still apply I only have half a page to fit this image in Comment : Hm you need to check the numbers you get . Inserting a bitmap with 300 dpi should be honored by the pdf lib but I m not really familiat with it and its Scale function. . You your image is 1050 1350 pixels", "Question : First off I do not work with winform development full time so don t bash me too bad.. . .. . .. . As the title somewhat depicts I am having an issue refreshing the controls on a form after an event has been raised and captured . On Form1 I have a Dockpanel and am creating two new forms as shown below : .. . .. . Within the frmGraphTools class I have the following delegate event and button click event defined : .. . .. . Within the frmGraph class I have the following Sub defined : .. . .. . I have a ZedGraph control on the frmGraph form that is supposed to be refreshed redrawn upon the button click as defined on frmGraphTools . Everything seems to working the RefreshGraph Sub within frmGraph is being executed and new data is pushed into the ZedGraph control however the control never updates . What must be done to get the frmGraph form or the ZedGraph control to update refresh redraw properly .. . Answer : Pass the reference to RefreshGroup method from the correct instance of frmGraph .. . .. . also this call should be flagged by the compiler because you are passing a string instead of a Date .. . .. . probably you have Option Strict Off http : msdn.microsoft.com en-US library zcd4xwzs 28v VS.80 29.aspx Comment : Steve thanks for the response . I have updated the AddHandler accordingly. . DUH been staring at it too long . However my control still is not updating I have tried Me.Update within the RefreshGraph Sub right after the call to CreateGraph and still no luck Comment : Have you put a breakpoint inside the RefreshGraph method and checked if the method is called Comment : yes and and I have followed the CreateGraph method all the way through to ensure that new data is being loaded . I even put a little MsgBox after and it pops up like it should.. . Comment : OK just figured it out . This is my first time using the Dockpanel Suite and there is a refresh method that must be called on the dockpanel control in order to refresh its contents . Thanks again for your assistance . I have updated the RefreshGraph Sub in the above code accordingly . Comment : Without the code of CreateGraph is difficult to say . Do you have called zedGraphControl1.Invalidate and zedGraphControl1.Refresh inside the CreateGraph method", "Question : I have data for several days . I want to plot that data one day in one tab page . The tab page can change dynamically corresponding with the number of the day . Previously I always make a static page in the design mode . I use ZedGraph control to plot the data . I decided how many pages that I need . Then it means the number of pages is static . Now I need more dynamically . I want the number of tab pages can change dynamically . Each page has similar controls inside it . How to do that I have no clue about it . .. . Answer : First you create a new class of type UserControl . These are meant to act as containers for controls . Then you put everything on it you need in your typical tabpage including the ZedGraph control. . .. . .. . Also write your logic there . Now when you need another page you create one and add a new instance of the UC class you have created . You should think a little about dependencies with the rest of you application including the deleting of the pages a page controller class comes to mind that can handle these things if necessary . You could also subclass a tabpage but going the UC way gives go an additional layer of independency you could place the same UC on a form or inside a container control. .", "Question : I am looking for an Open Source .NET Library or wrapper to a library that will create contour plots from a set of values along a grid mesh . ZedGraph is the closest thing I could find http : zedgraph.org . It would also be great if it could export to EPS . Comment : You probably should be able to do it with ZedGraph . Also it provides the functionality to save in EPS . There were also few topics here on SO regarding using ZG to save in real EPS format . Comment : Thanks its great to know it has the ability to write to EPS . That being true I may add the functionality to ZedGraph . They provide an example of a contour plot but frankly I don t consider that real contour functionality . I need an efficient contour plot given a mesh . I just need a good algorithm . .. . Answer : With D3 you can plot contour lines isolines for WPF http : dynamicdatadisplay.codeplex.com . I am not sure about contour surfaces . WPF has great printing capabilities so I think that printing to EPS would not be a problem . Edit : recently found this http : www.esnips.com doc 3403c875-a957-43b0-a134-8f693d8a4b98 wContourDemo 2011 7 28 one WinForms example around a .dll which calculates isolines . Comment : I couldn t find a feature list but it appears to be able to", "Question : I am looking for an Open Source .NET Library or wrapper to a library that will create contour plots from a set of values along a grid mesh . ZedGraph is the closest thing I could find http : zedgraph.org . It would also be great if it could export to EPS . Comment : You probably should be able to do it with ZedGraph . Also it provides the functionality to save in EPS . There were also few topics here on SO regarding using ZG to save in real EPS format . Comment : Thanks its great to know it has the ability to write to EPS . That being true I may add the functionality to ZedGraph . They provide an example of a contour plot but frankly I don t consider that real contour functionality . I need an efficient contour plot given a mesh . I just need a good algorithm . .. . Answer : The contour extraction routine ConRec worked very well fast and efficient for me : .. . .. . http : paulbourke.net papers conrec .. . .. . It doesn t output contours but a collection of line segments and associated z-values . You can use this raw data to construct contour polygon if required . Comment : FYI I ended up using meteothinker.com wContourProduct.aspx http : www.meteothinker.com wContourProduct.aspx", "Question : null .. . Answer : I am using ZedGraph to draw many curves on the pane . I want to let the user highlights a single point by right-clicking on it . There I need the Symbol type of that single point to change . I know I can change the color of a single point of a curve but I couldn t find anything about the symbol type or symbolsize modification of only one point . Btw I am trying to avoid adding extra curves as shadow curves etc . to my pane . Is there such an ability in zedgraph at all Thanks .", "Question : null .. . Answer : I m using 2 zedgraph axis in my graph and I need the labels to align . 0 label 1 1 label 2 . .. . .. . by default zedgraph has it line up with 0 N A 1 Label 1 2 label 2 .. . .. . is there a way of shifting the labels over 1 or shifting the label that it is displaying over 1 . I m using xAxis and x2Axis I can t change the X2Axis.Scale.MajorStep minorstep max maxauto min and minAuto . I have to align the 2 different axis s grid lines and label that it will display example .. . .. . text axis label 60 will display over linear axis 60 . Thanks", "Question : I observed something interesting the other day and I wanted to know whether anyone has a clue why this is happening and also how one could fix this issue . It appears that the zooming using Zedgraph has issues on some systems leading to the zoom selection box being off from where the mouse position would be see screenshot .. . .. . I think it has something todo with high DPI screens but I am not sure since my sample size is quite small . Once it happened on a Microsoft Surface 3 pro and the other time on a Lenovo Y50-70 both running windows-8.1 . I also tested other software tools where I knew that they also use Zedgraph in order to see whether I am doing something wrong but the effect was exactly the same . Any ideas The dashed selection box is not where my mouse cursor is selecting it http : i.stack.imgur.com 6zl4k.png .. . Answer : I found the issue being related to the DPI settings of the screen in windows . If you select anything else but 100 ZedGraph 5.1.5 will not be able to calculate the zoom box correct . This issue has been fixed in later versions of ZedGraph 5.1.7 . From Windows 8.1 http : i.stack.imgur.com R1ZHe.png", "Question : null .. . Answer : I have a question about Persian date . could you please help me about converting date to Persian date on X-Axis of zedgraph thanks", "Question : In following my question ZedGraph custom graph http : stackoverflow.com questions 10172001 zedgraph-custom-graph I have chart with every second inserting of datas now I have other questions : .. . .. . 1 . How to smoothly move down Y2Axis DateTime type with a chart line and show in chart always only last 30 minutes 2 . How to format Y2Axis labels HH : mm to get 10 : 05 10 : 10 10 : 15 .. . 10 : 30 Thanks for help UPD1 : Thanks kmp I try your code - its good but with issue : when I started I see this : enter image description here http : i.stack.imgur.com CeRby.png When after few minutes I see this picture : enter image description here http : i.stack.imgur.com C7IKH.png .. . .. . I have a compression of chart area but I want statically show always last 30 minute and slowly move down old datas without of scaling or packing chart with axis . I hope you understand me . UPD2 : Yet another issue - labels of Y2Axis haven t fixed values . For example now : enter image description here http : i.stack.imgur.com 9Myo4.png .. . .. . And after few seconds : enter image description here http : i.stack.imgur.com fwogo.png Comment : That axis is only showing about 5 minutes of data - it will not move until 30 minutes are shown - adjust the TotalMinutes value in the code to say 2 to see what I mean . .. . Answer : Starting with the easiest - formatting the labels can be done like so : .. . .. . One way you could do this and it feels a bit flaky but I will let you decide is to simply remove the points from the curve once they go beyond your threshold in this case more than 30 minutes . That way when the chart redraws the axis will update accordingly . I feel like taking the scale min value might be a better approach than this but failing that you can simply maintain a queue as you add the points like so and then remove them when they go beyond your threshold : Comment : If I understand you this code compress graph chart axis and line until 30 minute happens and after 30 minute will scroll chart Comment : yes that is right - it will show only the last 30 minutes of data and discard anything else . Comment : But I want initially show 30 minutes without compess chart until 30 minute happen . Comment : I have update question . How to make fixed labels values on Y2Axis Now when new datas inserted every 1 second axis-labels always changed but I want to have 15 : 45 : 00 15 : 50 : 00 15 : 55 : 00 .. . labels . Comment : I am sorry this is beyond my skills with ZedGraph - hopefully someone else can help you out .", "Question : I need to have multiple time frame on a zedgraph . I have to display the stock data on a daily time frame and then if user wishes to view the view in monthly time frame or hourly time frame i need to support it . Note that the data must be in candle stick bar and not the line bar . Currently i have 3 curves and i display only one at a time and hide the others . For example initially i set up my graph to be on daily time frame and hide the hour and monthly time frame candle stick curve . When the user gives the command to see the hourly graph i hide the daily candle stick and show the hourly time graph . However i am not able to change the x axis as it still shows the daily time instead of changing to hourly . I need to do something to change the x axis time frame from daily to hourly . Any kind of help is appreciable . Please advise even if there is a workaround . Thanks . .. . Answer : You probably can do it by changing Min Max and Step properties of XAxis.Scale object . So your method event handler that supports this user action should : .. . - show-hide proper curves at pane change .. . - adjust the scale using properties I listed above .. . - refresh the graph . Note that Refresh method of ZedGraphControl isn t cheap . It redraws all elements on your graph so if you have a lot of data it isn t good idea to use it . In that situation you should use combination of AxisChange and Invalidate methods . It should be faster and cheaper .", "Question : Is there any ways around to find the index position of a curve based on the current xPosition .. . .. . let s say I have a curve Item - MyCurve which has 20k points and when the mouse moves I could get the mouse location then I could get the x y positions by simply using the following function . but I want to find the data points from the curve item any suggestions.. . enter image description here http : i.stack.imgur.com V2DVt.png Thanks in advance... . : .. . Answer : If you are not concerned with using the positions programmatically but only want to see the positions displayed in your graph you can set zedGraphControl1.IsShowPointValues to true : .. . .. . Display point values in graph http : i.stack.imgur.com lRkUF.png Comment : Thanks for the suggestion but it makes no sense to show all the 20k labels on the zedgraph . Comment : @San Just to point out setting IsShowPointValues to true will only show the closest point to the mouse of the curve not all at once . Comment : @NominSim Sorry Yeah You re Correct....as mentioned in my quesstion I m trying to find the exact index so that I could read Power Time x y and display those values on a marker table not on the graph .", "Question : I customize the right-click menu thanks to this : .. . .. . And .. . .. . But the menu Simple Cursor won t check when clicked . I try to force the sender in the function DisplaySimpleCursor it doesn t work . When I debug my app I see that in DisplaySimpleCursor the sender s property Checked is set to true . What am I missing .. . Answer : As the menu is build on the heat the checkOnClick means nothing since the object is destroyed I guess everytime the menu is hidden . The solution was to set the property :", "Question : Is there any ways around to find the index position of a curve based on the current xPosition .. . .. . let s say I have a curve Item - MyCurve which has 20k points and when the mouse moves I could get the mouse location then I could get the x y positions by simply using the following function . but I want to find the data points from the curve item any suggestions.. . enter image description here http : i.stack.imgur.com V2DVt.png Thanks in advance... . : .. . Answer : Bear in mind that the following is only an approximation it should be accurate especially when you the mouse gets closer to the point but as you are looking at the mouse position you may not be directly on a point on your curve . It also assumes that your CurveItem Curve has points and that they are evenly distributed . OR you can use the following function : .. . .. . But keep in mind that that will look for the nearest curve and the index of the nearest point within that curve . Comment : Thanks a lot NominSim I ve tried both the methods but nothings suits my need I need get the exact data points not the approximates . In order to use Method-2 I have to place the mouse position over curve item which is good for single curve . Comment : @San Instead of int xPos xStep + startPos you can play around with doing Math.Round .Floor or .Ceiling . Since you are using your mouse position you re going to be close to the point but not exactly on it so there will have to be some manipulation of the index you obtain to get a more accurate result . Comment : @San There is a FindNearestPoint overload http : zedgraph.sourceforge.net documentation html M ZedGraph GraphPane FindNearestPoint.htm that allows you to specify the target curve for which you are trying to find your point index and you can also configure the search tolerance using GraphPane.Default.NearestTol http : zedgraph.sourceforge.net documentation html T ZedGraph GraphPane Default.htm . Would this be enough for your needs Comment : @AndersGustafsson Cheers again for pointing out the overloading option but there is an issue with this approach please check my updated image it will only get the nearest point not according to x axis . Comment : @San The first method then in my answer is going to be your safest bet ." ] }
[]
web
UNK_RELATION
doxygen@rtf@194
doxygen -- doxygen is a multilanguage documentation-generation application for c++ c java objective-c python idl fortran vhdl php and c that supports a wide variety of output formats including @placeholder html xml and pdf .
{ "confidence": [ 81.96760559082031, 76.29912567138672, 72.94652557373047, 64.95155334472656, 59.19623565673828, 58.553321838378906, 57.43852996826172, 57.21080017089844, 57.12131118774414, 56.19102478027344, 54.900657653808594, 54.83868408203125, 54.49688720703125, 53.00700378417969, 52.15492248535156, 51.44200897216797, 51.43384552001953, 51.43384552001953, 51.43384552001953, 51.41951370239258, 51.272377014160156, 50.04198455810547, 49.37607955932617, 48.751747131347656, 48.627376556396484, 48.08902359008789, 47.98882293701172, 47.82146453857422, 47.591217041015625, 47.23676300048828, 46.852012634277344, 46.827762603759766, 46.63246536254883, 46.6165885925293, 46.19797897338867, 46.19797897338867, 46.19797897338867, 46.19797897338867, 46.19797897338867, 46.19797897338867, 45.973854064941406, 45.873504638671875, 45.873504638671875, 45.873504638671875, 45.64128875732422, 45.26769256591797, 45.18595504760742, 45.00700759887695, 44.94322204589844, 44.773834228515625, 44.4305419921875, 44.15272521972656, 44.15272521972656, 44.09260177612305, 44.09260177612305, 44.09260177612305, 44.09260177612305, 43.918922424316406, 43.265647888183594, 42.53831100463867, 41.68302917480469, 41.200679779052734, 41.169315338134766, 41.13602828979492, 41.1257209777832, 41.013912200927734, 40.974761962890625, 40.91815185546875, 40.700077056884766, 40.66625213623047, 40.64834213256836, 40.62020492553711, 40.606292724609375, 40.458343505859375, 40.278533935546875, 40.24737548828125, 40.22737121582031, 39.92514419555664, 39.767032623291016, 39.767032623291016, 39.767032623291016, 39.767032623291016, 39.767032623291016, 39.767032623291016, 39.767032623291016, 39.767032623291016, 39.694061279296875, 39.63579559326172, 39.59960174560547, 39.59960174560547, 39.50086975097656, 39.31797790527344, 39.31797790527344, 39.31635284423828, 39.29597473144531, 39.193302154541016, 39.186309814453125, 39.167083740234375, 39.16462326049805, 39.112953186035156 ], "content": [ "Doxygen supports C Objective-C C PHP Java Python IDL Corba Microsoft and UNO OpenOffice flavors Fortran VHDL Tcl and to some extent D . See Overview http : www.stack.nl dimitri doxygen index.html .", ".. . It relies on Doxygen to parse your source code and create an intermediate XML representation of the information it collects so it supports all the same programming-languages that Doxygen supports : C C++ C Objective C Java Python PHP Tcl D IDL VHDL and Fortran .", "According to doxygen.org http : www.stack.nl dimitri doxygen Doxygen is available for : .. . .. . C++ .. . C .. . Java .. . Objective-C .. . Python .. . IDL Corba .. . IDL Microsoft .. . Fortran .. . VHDL .. . PHP .. . C .. . D some support .. . .. . Sorry it doesn t look like Lingo is supported .", "For the C++ and The Objective C Languages we use Doxygen for all of the documentation .", "You can also pipe options through doxygen via a script using doxygen - see question 17 of the FAQ http : www.stack.nl dimitri doxygen faq.html for an example .. . .. . Doxygen is not limited to Objective-C it supports a large range of languages including C C++ and Java .", "For Android Java and iOS Objective-C we are going with Doxygen .", "Roxygen is inspired by the Doxygen documentation system that is used by C C++ programmers .", "Doxygen supports reading XML documentation http : www.stack.nl dimitri doxygen xmlcmds.html which is mostly identical to the standard XML documentation for C .", "It is working for C and doxygen .", "The c++ project is documented with doxygen .", "I like doxygen to create documentation of C or PHP code .", "I m using doxygen to write the documentation for a C codebase .", "Why not support DOxygen in C instead", "Doxygen supports a number of formats .", "I m documenting my C code with doxygen .", "Doxygen is not designed specifically for C C++ and does not include C C++ macro preprocessor .", "I am creating internal documentation for a C++ project using Doxygen .", "I ve read everywhere that doxygen is the way to go for generating documentation for C code .", "I am using Doxygen to generate documentation for our API written in C .", "This takes most of the work out of creating and updating DocXml Doxygen JavaDoc or Qt format comments and it supports C C++ C++ CLI C Java JavaScript TypeScript JScript UnrealScript PHP and Visual Basic code .", "Since Doxygen is valid for multiple-languages this is valid for C C++ too .", "I m using Doxygen with some embedded C source .", "I need some basic help using Doxygen on C code .", "possible duplicate of Issue getting Doxygen to document an enum in C http : stackoverflow.com questions 1717941 issue-getting-doxygen-to-document-an-enum-in-c", "Other Notes .. . .. . For a general introduction to Doxygen and how to document Objective-C code this page http : duckrowing.com 2010 03 18 documenting-objective-c-with-doxygen-part-i seems like a good resource .", "If your language supports a C preprocessor you could use doxygen s C preprocessor to hide parts of the file from doxygen i.e .", "I m interested to know if it is possible to have some comments in a function c c++ java in a way that doxygen could put them in the generated html file .", "Doxygen can be enabled under the project properties by selecting Enable project specific settings in the C C++ General tab and selecting Doxygen .", "I am trying to include a .ini file in the doxygen documentation of a C++ class using include .", "For Xcode 4 there is also a nice guide http : www.duckrowing.com 2010 03 18 documenting-objective-c-with-doxygen-part-ii how to integrate doxygen .", "The file under the link above - doxygen.xml does this refer to doxygen sources I mean c++ source files where doxygen notation is used or to doxygen configuration", "Is it possible to get Swig to take those doxygen comments and produce doxygen comments for the C wrapper classes and functions", "I do not know how to do 2 for C i.e . how to translate the Doxygen XML output into suitable C documentation this you may need to implement yourself perhaps by modifying the doxy2swig.py script .", "After running Doxygen on my C++ code I built the pdf documentation like this : .. . .. . All page numbers in the table of contents in the resulting pdf file are .", "The C++ code uses Doxygen style comments to annotate the classes and functions .", "I have some C codes using doxygen comments for some equations .", "I have a C program called ncdump.c and I am documenting it with doxygen .", "Im attempting to document enum values in C using doxygen .", "I have some C code that uses doxygen to document it .", "I don t know how well C is supported by Doxygen .", "I m using Doxygen to document API written in Objective-C . .. . Doyxygen fail to understand NS ENUM typedef .", "Finally I don t know C but what is the point of having the Doxygen comments included in the C wrapper", "As for your question : Finally I don t know C but what is the point of having the Doxygen comments included in the C wrapper", "I feel somewhat left in the 18th century as I use Doxygen in C by way of C++ .", "How can I tell Doxygen to disable documentation-generation for some classes", "I often use Doxygen with C targeting embedded systems .", "I m trying to use doxygen to parse php code into xml output .", "@IdoRan The other option is AppleDoc http : stackoverflow.com questions 10109496 objective-c-documentation-generators-headerdoc-vs-doxygen-vs-appledoc .", "http : sphinx-doc.org .. . .. . There is nothing wrong with doxygen but it provides a great deal of benefit for c c++ programs .", "For better readability I group documentation of every .c .h file pair sometimes also more files with defgroup and addtogroup see doxygen in c : grouping of defines http : stackoverflow.com questions 27840411 doxygen-in-c-grouping-of-defines .", "Create a Doxygen layout XML file and configure Doxygen to use it instructions http : www.stack.nl dimitri doxygen manual customize.html .. . 2 .", "I was already familiar with Doxygen as a long time C++ developer .", "I have difficulties using efficiently doxygen with Visual Studio 2010 and C++ .", "The best option currently is therefore to extract the Doxygen documentation from the C++ source code and insert it into the SWIG generated wrapper .", "I have written the documentation for a medium sized C++ piece of software using Doxygen together with Markdown .", "I have C++ code for which I can generate documentation using Doxygen .", "I haven t been able to find a single package for atom.io that lets you write Doxygen-style documentation for C++ code .", "A nice real-life example of using doxygen for Objective-C can be found here http : dl.dropbox.com u 2601212 NanoStore 202.0 html index.html .", "This works fine but for some reason doxygen treats the contents of the file as C code which leads to strange formatting .", "I have this C file : .. . .. . And the .h file : .. . .. . For some reason Doxygen is complaining about this function : .. . .. . The Doxyfile looks like : .. . .. . What am I missing in the documentation of that method to make Doxygen happy", "Doxygen should then include this in the documentation .", "2 I use doxygen for my c++ projects but I use phpdoc for my php projects because I have had better results with it .", "I want Doxygen to document the code written in C-like language PARI GP but having slightly different syntax .", "In C I hide some of our password-encryption members like this : .. . .. . The doxygen documentation would have you believe that you need a conditional symbol defined to doxygen and used on the @cond line but that did not work for me .", "But when I create a documentation of these files using the commands doxygen -g and doxygen the file html class socket.html looks like this : .. . .. .", "I made documentation for my SDK using Doxygen .", "I ve looked at the Doxygen documentation including Automatic link generation Links to files and the entire Special Commands section but I haven t found what I m looking for .", "The Doxygen manual provides this example code : .. . .. . and a link-to the output http : www.stack.nl dimitri doxygen manual examples file html file 8h.html : .. . .. .", "I m trying to create some documentation for some Python scripts included in my project the rest is Fortran C .", "you could build an latex output with doxygen and include the code in your documentation", "My question is how do I generate the documentation for Swift and Objective-C from Objective-C headers", "Currently SWIG does not parse code comments including Doxygen documentation at all .", "Doxygen docs link below states that it supports HTML Commands - you can insert html tags directly .", "Although the latest releases of Doxygen claim better handling of Objective-C categories http : www.stack.nl dimitri doxygen changelog.html it still seems to choke on categories in my source code .", "Is this possible with Doxygen", "See point three on the second list in the special documentation blocks http : www.stack.nl dimitri doxygen docblocks.html section of the Doxygen documentation .", "I am unable to generate chm html output from Doxygen 1.8.6 .", "Let Doxygen extract the documentation into its XML format .. . 2 .", "I want to use Graphviz http : www.graphviz.org + Doxygen http : www.doxygen.nl to generate a class-diagram based on C++ code .", "I have 3 files : .. . .. . test.c .. . .. . test2.c .. . .. . test.x .. . .. . I use doxygen to create callgraphs for these functions .", "I have a C-project documented with doxygen and want to add a table of contents that shows the sections and subsections .", "Has anyone tried embedding Doxygen comments within Lazy C++ source files", "I went ahead and downloaded Lazy C++ to try it out and it seems that it does not play nice with Doxygen .", "Im currently trying to use Doxygen to document my C code that im writing using Code Composer Studio .", "As Doxygen uses C-like parser when the input filter is run it can recognize types .", "My team is starting to document our C code using doxygen paying particular attention to our public API headers .", "We have an API for OSX that we offer in 3 different languages Objective-C C++ and Java .", "This is the Doxygen generated HTML code block :", "If you only want to use Doxygen to generate documentation you can do this from the C++ sources directly so you don t gain anything .", "I have extern variable in C code : .. . .. . However according to Doxygen this style of documentation is wrong : .. . .. . What is the proper way of documenting extern variables", "Is there any tool or plugin for visual-studio c++ to generate an auto pre-structure of doxygen comments based on the definition of function", "A different better approach than my previous answer : .. . In Window- Preferences- C C++- Editor .. . In the right tab look for Documentation tool comments and in Workspace default set doxygen .", "For Project specific settings .. . In Project- Properties- C C++ General : .. . .. . Tick Enable project specific Settings .. . Select Doxygen as Documentation tool .. . .. . Then typing above the function method and hitting enter will work .", "We ve found Doxygen the solution for java C++ and android PC cross-language cross-platform development but I ve no knowledge of iOS or JS aspects .", "I am using Doxygen to generate HTML documentation from my code .", "You can find a tutorial that covers categories here : .. . .. . http : www.duckrowing.com 2010 03 18 documenting-objective-c-with-doxygen-part-i", "I ve got some C++ CLI software which is all nice and documented in a C ish kind of way which means DOxygen is able to pull it out into some nice html .", "Most users of doxygen use it for C and C++ code so naturally these languages have the most mature support and the output is more tuned towards the features and needs for these languages .", "This doesn t seem to be valid doxygen markup http : www.stack.nl dimitri doxygen docblocks.html .", "I am running doxygen version 1.8.2 which is supposed to support class extensions in objective C . Do you know what I could be doing wrong in terms of configuration" ] }
{ "confidence": [ 104.20567321777344, 99.58646392822266, 97.0980224609375, 71.98381042480469, 70.79339599609375, 70.73980712890625, 69.6202621459961, 64.47754669189453, 63.70238494873047, 62.94722366333008, 62.72172546386719, 62.28818130493164, 61.144256591796875, 61.02109909057617, 60.860321044921875, 60.653072357177734, 60.43688201904297, 60.23075485229492, 60.145870208740234, 59.49965286254883 ], "content": [ "Question : Does anyone know of or have a Lingo filter for Doxygen I have played with DocMaker but it introduces dependencies on director and is not a flexible or full featured as Doxygen . -Marty .. . Answer : According to doxygen.org http : www.stack.nl dimitri doxygen Doxygen is available for : .. . .. . C++ .. . C .. . Java .. . Objective-C .. . Python .. . IDL Corba .. . IDL Microsoft .. . Fortran .. . VHDL .. . PHP .. . C .. . D some support .. . .. . Sorry it doesn t look like Lingo is supported .", "Question : I want to use Graphviz http : www.graphviz.org + Doxygen http : www.doxygen.nl to generate a class-diagram based on C++ code . This works already as Doxygen comes with a native DOT support but is it possible to produce a UML-like output with the corresponding access modificators public private etc . return and parameter types of the class methods similar to the diagram below I m aware of thread How to use doxygen to create UML class diagrams from C++ source http : stackoverflow.com questions 4755913 how-to-use-doxygen-to-create-uml-class-diagrams-from-c-source but it doesn t answer the question though . enter image description here http : i.stack.imgur.com NuPoo.png .. . Answer : Try Doxygraph https : code.google.com p doxygraph Doxygraph is a collection of tools to automate reverse-engineering UML class diagrams from your project s source code and present them as interactive web apps . .. . It relies on Doxygen to parse your source code and create an intermediate XML representation of the information it collects so it supports all the same programming-languages that Doxygen supports : C C++ C Objective C Java Python PHP Tcl D IDL VHDL and Fortran . You need to read the README from the cloned Project .", "Question : As I understood it javadoc is the name of the tool that generates html-documentation which also goes by the name javadoc . Atleast that is how I ve been using the words. . But what is the generated output of the tool doxygen called Doxygen-doc doxy-doc or maybe something else Question in c++ context if it matters Comment : we simply call it documentation because we use only doxygen but if you are using doxygen and javadoc maybe you want to do it equivalent to javadoc javadoc and simply call doxygen doxygen seems logical to me Comment : We just call it the doyxgen . Comment : I usually go for documentation or if someone is curious enough the documentation generated by Doxygen . I think the style of comments in use are actually also called javadoc and qtdoc by Doxygen itself . .. . Answer : Separate the tools from the output format . Javadoc is a markup system . I think it is incorrect to call its html output or any other output javadoc . The same way as you would not call a web page styled in Word Word . Similarly Doxygen is also a markup system . It does not have its own documentation output type . Its types are the output types it supports that is : HTML Latex Man pages RTF and more . See the full list http : www.stack.nl dimitri doxygen manual output.html . You mention C++ . Doxygen supports C Objective-C C PHP Java Python IDL Corba Microsoft and UNO OpenOffice flavors Fortran VHDL Tcl and to some extent D . See Overview http : www.stack.nl dimitri doxygen index.html .", "Question : I need to implement a documentation-generation solution for my workplace and have narrowed it down to the three mentioned in the title . I have been able to find very little information in the way of formalized comparisons between these solutions and I m hoping that those of you with experience in one or more of the above can weigh in : .. . .. . Here is what I have been able to glean from my initial pass : .. . .. . HeaderDoc Pros : Consistent with apple s existing docs compatibility with making apple docsets .. . HeaderDoc Cons : Difficult to modify behavior project is not actively worked on many have switched away from it meaning there must be something deficient though I can t quantify it . Doxygen Pros : Active support community b c of wide use base very customizable most output types like latex etc .. . Doxygen Cons : Takes work to make it look behave consistent with apples docs compatibility with apple docsets is not as simple .. . .. . AppleDoc Pros : Looks consistent with apple s existing docs compatibility with making apple docsets .. . AppleDoc Cons : Issue with documentation of typedefs enums and functions actively being developed .. . .. . Does this sound accurate Our desired solution will have : .. . .. . Consistent look-and-feel with apples objective-c class reference .. . Ability for option-click to pull up documentation reference from within Xcode and then link-to the doc just like apple s classes .. . Smart handling of categories extensions and the like even custom categories of apple s classes .. . Ability to create our own reference pages like this page : Loading that can include images and be linkable from generated class references seamlessly like how apple s UIViewController class reference links to the linked page . Easy to run command-line commands that can be integrated into build scripts .. . Graceful handling of very large codebase .. . .. . Based on all of the information above are any of the above solutions clearly better than the others Any suggestions or information to add would be extremely appreciated . Comment : FYI Apple s document New Features In Xcode 5 https : developer.apple.com library ios documentation DeveloperTools Conceptual WhatsNewXcode Articles xcode 5 0.html says that in the quick help panel and in code-completion popover views Doxygen and HeaderDoc structured comments are supported formats . No mention of AppleDoc . .. . Answer : As the creator and lead developer of doxygen let me also provide my perspective .. . obviously biased as well - .. . .. . If you are looking for a 100 faithful replica of Apple s own documentation style then AppleDoc is a better choice in that respect . With doxygen you ll have a hard time to get that exact same look so I would not recommend to try . With respect to Xcode docsets Apple provides instructions http : developer.apple.com library ios featuredarticles DoxygenXcode index.html how to set that up with doxygen written in the time Xcode 3 was released . For Xcode 4 there is also a nice guide http : www.duckrowing.com 2010 03 18 documenting-objective-c-with-doxygen-part-ii how to integrate doxygen . As of version 1.8.0 doxygen supports Markdown markup http : www.stack.nl dimitri doxygen markdown.html as well a large number of additional markup http : www.stack.nl dimitri doxygen commands.html commands . With doxygen you can include documentation on the main page @mainpage as well as on subpages using @subpage or @page . Inside a page you can create sections and subsections . In fact doxygen s user-manual was completely written using doxygen . Besides that you can group classes or functions together using @defgroup and @ingroup and inside a class make custom sections using @name . Doxygen uses a configuration file as input . You can generate a template with default values using doxygen -g or use a graphical editor http : www.stack.nl dimitri doxygen doxywizard usage.html to create and edit one . You can also pipe options through doxygen via a script using doxygen - see question 17 of the FAQ http : www.stack.nl dimitri doxygen faq.html for an example .. . .. . Doxygen is not limited to Objective-C it supports a large range of languages including C C++ and Java . Doxygen is also not limited to the Mac platform e.g . it runs on Windows and Linux too . Doxygen s output also supports more than just HTML you can generate PDF output via LaTeX or RTF and man pages . Doxygen also goes beyond pure documentation doxygen can create various graphs and diagrams from the source code see the dot http : www.stack.nl dimitri doxygen config.html config dot related options . Doxygen can also create a browsable and syntax highlighted version of your code and cross-reference that with the documentation see the source browser http : www.stack.nl dimitri doxygen config.html sourcebrowser index related options . Doxygen is very fast for small to medium sized projects the diagram generation can be slow though but nowadays runs on multiple CPU cores in parallel and graphs from one run are reused in the next run . For very large projects e.g . millions of lines-of-code doxygen allows the projects to be split into multiple parts and can then link the parts together as I explained here http : stackoverflow.com questions 8247189 doxygen-is-slow . A nice real-life example of using doxygen for Objective-C can be found here http : dl.dropbox.com u 2601212 NanoStore 202.0 html index.html . The development of doxygen highly depends on user feedback . We have an active mailing list http : sourceforge.net mail group id 5971 for questions and discussions and a bug tracker https : bugzilla.gnome.org enter bug.cgi product doxygen for both bugs and feature requests . Most users of doxygen use it for C and C++ code so naturally these languages have the most mature support and the output is more tuned towards the features and needs for these languages . That said also wishes for and issues with other languages are taken seriously . Note that I do nearly all doxygen development and most testing on a Mac myself . Comment : Layout not like Apple s however I was pretty happy with the results that I got here : jasperblues.github.io Typhoon api http : jasperblues.github.io Typhoon api interface typhoon definition.html Comment : Any plans for Swift as in Apple s new language support in Doxygen Comment : No concrete plans yet but it is surely an interesting language to look at once it is publicly available .", "Question : I have a project written in C++ where I m using swig to generate some C wrappers as well . The C++ code uses Doxygen style comments to annotate the classes and functions . Is it possible to get Swig to take those doxygen comments and produce doxygen comments for the C wrapper classes and functions Comment : There exists a doxy2swig.py scripts which generates a file that you can include in your interface .i file . It is pretty neat Comment : I m having trouble getting doxy2swig.py to work with C . It looks like it s designed to work with Python and a cursory google-search didn t yield any results . Any ideas Comment : It should work just fine . It generates a DesiredName.i file which can be included using include DesiredName.i . Do you get an output Comment : Yeah I get an output.i filled with Python docstrings . Including those in a C file doesn t seem to do anything . I ve added a bounty to this question if you can show me how to make it work it s yours : Comment : Sorry just erased my last Windows partition - without any possibility for returning . .. . Answer : Currently SWIG does not parse code comments including Doxygen documentation at all . There is a SWIG branch in development since a couple of years to enable SWIG to deal with Doxygen comments but even that currently AFAIK only maps them to Java and Python documentation . The best option currently is therefore to extract the Doxygen documentation from the C++ source code and insert it into the SWIG generated wrapper . To understand how this can be done here is a brief explanation of what doxy2swig.py does and this is indeed meant for python docstrings : .. . .. . 1 . Let Doxygen extract the documentation into its XML format .. . 2 . Parse the XML and reformat into suitable Python docstrings .. . 3 . Write feature docstring SWIG directives to tell SWIG to attach the docstrings to the wrapped classes and methods . Basically something similar can be done for C as well . I do not know how to do 2 for C i.e . how to translate the Doxygen XML output into suitable C documentation this you may need to implement yourself perhaps by modifying the doxy2swig.py script . For 3 there is a neat trick that is sort of documented here http : www.swig.org Doc3.0 SWIGDocumentation.html Java javadoc comments noting that the same can also be done for C using the csclassmodifiers and csmethodmodifiers . These SWIG feature directives are AFAIK used to prepend either public or protected to C methods or classes . But they can be hijacked to prepend the extracted documentation + the public keyword not to forget . So they effectively allow the same functionality as the feature docstring directive for Python . Finally I don t know C but what is the point of having the Doxygen comments included in the C wrapper If you only want to use Doxygen to generate documentation you can do this from the C++ sources directly so you don t gain anything . In Python the docstrings can be displayed as help at runtime and are used by some IDEs . Does C have this too Comment : This is pretty much the path I ve been going down so I guess it s nice to have my suspicions confirmed . As for your question : Finally I don t know C but what is the point of having the Doxygen comments included in the C wrapper I guess I should have been clearer in my question . I m not so much interested in the comments for C as I am in the documentation pages they re used to produce . Using the C++ doc strings directly doesn t quite work because many times comments will refer to other functions and those references and the hyperlinks need to point at the appropriate C functions .", "Question : I like doxygen to create documentation of C or PHP code . I have an upcoming Python project and I think I remember that Python doesn t have . . comments and also has its own self-documentation facility which seems to be the pythonic way to document . Can I just use doxygen Anything particular to be aware of I have done some coding in Python but so far only on small projects where I was to lazy to document at all yeah I know .. . but let s just pretend that s OK for now . .. . Answer : An other very good documentation tool is sphinx http : sphinx.pocoo.org . It will be used for the upcoming python-2.6 documentation http : docs.python.org dev and is used by django http : docs.djangoproject.com en dev and a lot of other python projects . From the sphinx website : .. . .. . Output formats : HTML including Windows HTML Help and LaTeX for printable PDF versions .. . Extensive cross-references : semantic-markup and automatic links for functions classes glossary terms and similar pieces of information .. . Hierarchical structure : easy definition of a document tree with automatic links to siblings parents and children .. . Automatic indices : general index as well as a module index .. . Code handling : automatic highlighting using the Pygments highlighter .. . Extensions : automatic testing of code-snippets inclusion of docstrings from Python modules and more Comment : Have tried it . While sphinx in itself is a very interesting tool it was not what I expected coming from doxygen . More a tool for really good end customer doc doxygen is much better for a SW designer who just would like to see an API overview in a nice printable format . Comment : @Zane I do agree . As a Doxygen lover I missed way too much the fully automatic API reference guide generation . Check my answer as some other option is now available .", "Question : I m working on a project where a c++-cli library is being used primarily from a c application . Is there any way to make the code comments in c++-cli visible to c intellisence within visual-studio Assuming there isn t what would be the best way to document the c++-cli code to enable its easier use from c and within c++-cli of course What is you opinion on XML comments vs doxygen vs other tools which .. . Answer : Interesting . After trying several methods it s looking like the intellisense between a Managed C++ project and C doesn t work . The following example will give you proper intellisense in the C++ environment where it is declared but referencing the object in C shows nothing : .. . .. . XML comments don t work either . I would guess that this is either a bug or requires something I can t figure out . Judging from the lack of answers on this question perhaps a bug . As far as documentation-generation I d recommend going the path of XML documentation . Doxygen supports reading XML documentation http : www.stack.nl dimitri doxygen xmlcmds.html which is mostly identical to the standard XML documentation for C . It does tend to add extra lines just for tag openings and closings but is much more readable in my opinion than the following doxygen alternative :", "Question : I like doxygen to create documentation of C or PHP code . I have an upcoming Python project and I think I remember that Python doesn t have . . comments and also has its own self-documentation facility which seems to be the pythonic way to document . Can I just use doxygen Anything particular to be aware of I have done some coding in Python but so far only on small projects where I was to lazy to document at all yeah I know .. . but let s just pretend that s OK for now . .. . Answer : This is documented on the doxygen website http : www.stack.nl dimitri doxygen docblocks.html pythonblocks but to summarize here : .. . .. . You can use doxygen to document your Python code . You can either use the Python documentation string syntax : .. . .. . In which case the comments will be extracted by doxygen but you won t be able to use any of the special doxygen commands http : www.stack.nl dimitri doxygen commands.html cmd intro . Or you can similar to C-style languages under doxygen double up the comment marker on the first line before the member : .. . .. . In that case you can use the special doxygen commands . There s no particular Python output mode but you can apparently improve the results by setting OPTMIZE OUTPUT JAVA to YES . Honestly I m a little surprised at the difference - it seems like once doxygen can detect the comments in blocks or blocks most of the work would be done and you d be able to use the special commands in either case . Maybe they expect people using to adhere to more Pythonic documentation practices and that would interfere with the special doxygen commands Comment : Comments as documentation in Python is bad . Comments are for a module maintainer why and how implemented . All documentation should be in docstrings how to use . Comment : Python will pull in the comments and use them as docstrings so the two formats both work with pydoc . Comment : Have a look at doxypy http : code.foosel.org doxypy which makes it possible to use the special commands inside normal docstrings .", "Question : I want Doxygen to document the code written in C-like language PARI GP but having slightly different syntax . I believe Doxygen can document the entities those do not exist . It seems to be the simplest way to do the job while the programming language is not Doxygen-supported . I want something like this : .. . .. . Unfortunately Doxygen generates the warning documented symbol foo was not declared or defined and does not list the foo in an output HTML . Is there any way to force the Doxygen to produce the proper HTML using only the documentation blocks but not the code .. . Answer : There are various options .. . .. . 1 . You could write an input filter that translates your code into something that looks enough like C for doxygen to parse it see also FILTER PATTERNS http : www.stack.nl dimitri doxygen manual config.html cfg filter patterns and EXTENSION MAPPING http : www.stack.nl dimitri doxygen manual config.html cfg extension mapping . 2 . You could create a dummy C file with the function-prototypes and document those instead . You could put the documentation in the C file or in your programming language if you use the approach you mentioned in the question . 3 . If your language supports a C preprocessor you could use doxygen s C preprocessor to hide parts of the file from doxygen i.e . if DOXYGEN ONLY .. . .. . brief some brief description here .. . param in param mandatory parameter description .. . param in option optional parameter description .. . .. . void foo param option .. . endif .. . foo param option .. . .. . .. . .. . and then define the following in the config file : .. . .. . PREDEFINED DOXYGEN ONLY Comment : FILTER PATTERNS works for me . As for me it takes a small effort to write a Perl translator of the PARI GP user-defined functions to their C prototypes .", "Question : null .. . Answer : There is a header file that contains a typedef enum . I cannot modify this header . The enum is used within my project and I need to document the enum . I do this by adding a @enum doxygen command to a .dox file thus : .. . .. . This creates an entry in the modules section of the documentation for INT VALS with each enum value listed as a sub-entry . Each enum value is also listed in the module as a separate entry . The enum table is created correctly in the documentation . I want to have just the INT VALS entry and its child entries in the modules index not the extra individual duplicate entries . Output is html . Link to image of example output http : i.stack.imgur.com ac7q2.png Comment : This is for C C++ code - all in headers except the .dox described above . Comment : Which version of doxygen are you using Comment : I m using doxygen 1.8.9.1 . Comment : Current version is 1.8.11 but with the 1.8.9.1 version I didn t see the problem you mentioned either . Please try to create a small example and post it either here or in the doxygen forum including used stripped i.e . doxygen -s generated . Doxyfile . Comment : I have created a small example . Three files : Doxygen my.h sdk.dox . Content of these files is at pastebin.com 7jn2papC http : pastebin.com 7jn2papC .", "Question : I m working on a project where a c++-cli library is being used primarily from a c application . Is there any way to make the code comments in c++-cli visible to c intellisence within visual-studio Assuming there isn t what would be the best way to document the c++-cli code to enable its easier use from c and within c++-cli of course What is you opinion on XML comments vs doxygen vs other tools which .. . Answer : DocXml has the major advantage of being supported by VS syntax colouring intellisense automatic export to the XML files . The Doxygen tools can read DocXml format so you can still use them with this format too . To help you generate tidy and accurate Doc comments with a minimum of effort you might like to check out my addin AtomineerUtils http : www.atomineerutils.com . This takes most of the work out of creating and updating DocXml Doxygen JavaDoc or Qt format comments and it supports C C++ C++ CLI C Java JavaScript TypeScript JScript UnrealScript PHP and Visual Basic code .", "Question : I like doxygen to create documentation of C or PHP code . I have an upcoming Python project and I think I remember that Python doesn t have . . comments and also has its own self-documentation facility which seems to be the pythonic way to document . Can I just use doxygen Anything particular to be aware of I have done some coding in Python but so far only on small projects where I was to lazy to document at all yeah I know .. . but let s just pretend that s OK for now . .. . Answer : In the end you only have two options : .. . .. . You generate your content using Doxygen or you generate your content using Sphinx . 1 . Doxygen : It is not the tool of choice for most Python projects . But if you have to deal with other related projects written in C or C++ it could make sense . For this you can improve the integration between Doxygen and Python using doxypypy https : github.com Feneric doxypypy . 2 . Sphinx : The defacto tool for documenting a Python project . You have three options here : manual semi-automatic stub generation and fully automatic Doxygen like . 1 . For manual API documentation you have Sphinx autodoc http : www.sphinx-doc.org en stable ext autodoc.html . This is great to write a user guide with embedded API generated elements . 2 . For semi-automatic you have Sphinx autosummary http : www.sphinx-doc.org en stable ext autosummary.html . You can either setup your build-system to call sphinx-autogen or setup your Sphinx with the autosummary generate config . You will require to setup a page with the autosummaries and then manually edit the pages . You have options but my experience with this approach is that it requires way too much configuration and at the end even after creating new templates I found bugs and the impossibility to determine exactly what was exposed as public API and what not . My opinion is this tool is good for stub generation that will require manual editing and nothing more . Is like a shortcut to end up in manual . 3 . Fully automatic . This have been criticized many times and for long we didn t have a good fully automatic Python API generator integrated with Sphinx until AutoAPI http : autoapi.readthedocs.org came which is a new kid in the block . This is by far the best for automatic API generation in Python note : shameless self-promotion . There are other options to note : .. . .. . Breathe https : breathe.readthedocs.org : this started as a very good idea and makes sense when you work with several related project in other languages that use Doxygen . The idea is to use Doxygen XML output and feed it to Sphinx to generate your API . So you can keep all the goodness of Doxygen and unify the documentation system in Sphinx . Awesome in theory . Now in practice the last time I checked the project wasn t ready for production . pydoctor https : github.com twisted pydoctor : Very particular . Generates its own output . It has some basic integration with Sphinx and some nice features .", "Question : I m using Doxygen to document a project . In one file I have a bunch of public functions that I want to put in a group . I do this as follows : .. . .. . The issue is that the LaTeX output contains all of the documentation here twice once in the Module Documentation section and again in the File Documentation section . This amounts to maybe 25 pages of purely duplicate stuff in my end PDF file generated from LaTeX . An ideal fix would be to have the File Documentation for myFile.c say See @ref my group or something like that . Is there a way to accomplish this in Doxygen .. . Answer : Acceptable solution found : .. . .. . 1 . Create a Doxygen layout XML file and configure Doxygen to use it instructions http : www.stack.nl dimitri doxygen manual customize.html .. . 2 . Open the XML file find the group tag comment out the detaileddescription and memberdef sections .. . .. . This resulted in only the list of members being produced in the Module Documentation with hyperlinks to the full member documentation within the File Documentation section in the LaTeX PDF output . The HTML output already functioned this way so it was not significantly changed .", "Question : Does anyone know how to edit the style used for Doxygen comments in Eclipse CDT In other words type and pressing enter on a line before a function currently gives me something like : .. . .. . and I want it to give me something like : .. . .. . Also plus one if anyone knows how to bind this to a keyboard shortcut like alt-shift-j for Eclipse JDT . Also FYI the fact that Eclipse CDT supports Doxygen now seems to be a little known fact based on Google . See here https : bugs.eclipse.org bugs show bug.cgi id 178386 for details . Doxygen can be enabled under the project properties by selecting Enable project specific settings in the C C++ General tab and selecting Doxygen . My CDT version is 7.0.1 but I think this became available in 5.0 . Lastly the comments section under code templates in preferences doesn t accomplish this based on my testing . EDIT : See here http : www.eclipse.org forums index.php t msg goto 535875 . It seems like the comment style is hard coded . If anyone finds otherwise I d love to know about it . I guess templates will be the best thing for now unless the Javadoc style is okay for you . .. . Answer : A Doxygen tag uses this basic format . It absolutely must have the around the whole Doxygen comment . If you modify the Code Templates it will do what you want . The proposed comment style is wrong though . This below is standard for most companies who code in JAVA and eclipse . Since Doxygen is valid for multiple-languages this is valid for C C++ too . If you want to use the xml style tags.. . .. . .. . You re also going to want to make sure eclipse isn t inserting other comment styles too otherwise you can end up with comments inserted inside other comments . Also generally it is a bad rule to mix comment styles like and . Finally if you select auto-generate comments when you create classes and such those comments will automatically be put in . And you can have eclipse auto-generate method headers as you type though I forget how I did this . Comment : Doxygen supports a number of formats . See stack.nl dimitri doxygen docblocks.html http : www.stack.nl dimitri doxygen docblocks.html . The format you referenced is the Javadoc format and is just one of many supported formats . The format I gave as example is unconventional but not wrong just different . Also you did not answer the question . As I already mentioned in one of my edits this is an eclipse bug which is now addressed here bugs.eclipse.org bugs show bug.cgi id 333134 https : bugs.eclipse.org bugs show bug.cgi id 333134 . Thanks for trying to help though .", "Question : I m trying to create some documentation for some Python scripts included in my project the rest is Fortran C . I managed to include a brief and a detailed description for the files but all the variables defined in the script are being listed in the documentation . How do I avoid them from being listed Which variable in the Doxyfile controls the inclusion of all the variables of a file Comment : How are you setting up Doxygen for your Python files What are the specifics for your Python files Are all your variables global Are you using a Doxygen filter for Python like doxypypy Comment : My Python files are just scripts supposed to be launched interactively from the command-line with dynamic declaration of global-variables as a consequence in my doxygen documentation I get all the lines where a variable is declared for the first time . And yes I m using doxypy . .. . Answer : I had this similar problem while working with python-Doxygen . What worked for me is to enclose your variables between cond and endcond . For example .. . .. . They won t show up in your documentation :", "Question : I m not sure if I should use Epydoc or doxygen for documenting my Python code . Currently I would prefer Epydoc since it s specialized to Python and it s syntax is not too different from doxygen s which I have used for documenting my C C++ code so far . Any argument against Epydoc or for using doxygen http : epydoc.sourceforge.net .. . http : www.doxygen.org .. . http : sphinx.pocoo.org .. . Answer : Epydoc had been the classic tool for document generation . However everyone lately is moving to sphinx . You should use epydoc or you could try using sphinx . Python s documentation is itself done using sphinx . Sphinx can provide you more control and a better looking documentation . http : sphinx-doc.org .. . .. . There is nothing wrong with doxygen but it provides a great deal of benefit for c c++ programs . Since there are specialized doc tools for python code they can provide you better control over document generation . Comment : Thank you very much . This is exactly the outcome I was looking for . : -", "Question : We all have the good habit of documenting our code right Nowadays in-code documentation itself has a syntax . It s almost like a programming language onto itself . The questions are : .. . .. . What How many documentation syntax specifications exist Is there a standard documentation syntax Who is defining this standard Is there an official committee or body like there is one for defining C++ standards Or has doxygen become the de-facto standard It s difficult not to have heard about doxygen . It is mentioned in every open-source software project I have taken part in . Yet looking at the official doxygen web site it is far from obvious that doxygen is defining any kind of specification The impression I get when I read the ways it can help me is that doxygen is simply a software to extract in-code documentation and present it in beautiful HTML pages . Looking at the doxygen front page I could even think that doxygen could use any documentation syntax defined in 3rd party specifications and extract it and output it as HTML . Also it is interesting to note that the doxygen web site does not capitalize the word doxygen as-if it were not the brand of their software but a common noun well is it What is doxygen really a parsing engine an HTML rendering engine a library that can be used by 3rd party software to render their own docs a documentation syntax de facto specification all of the above I am particularly confused as to the relationship between doxygen and other code parsers like ANTLR http : www.antlr.org boost-spirit http : boost-spirit.com distrib spirit 1 8 5 libs spirit index.html Ragel http : www.complang.org ragel .. . .. . .. . For example what is it that doxygen can do that ANTLR cannot and that ANTLR can that doxygen cannot Also looking at the Drupal project . They have : .. . .. . their own API module http : drupal.org project api which is an implementation of a subset of the Doxygen documentation generator specification . their own grammar parser module http : drupal.org project grammar parser to add to the list above alongside doxygen itself ANTLR et all . their own API web site http : api.drupal.org running the two aforementioned modules presenting the Drupal in-code doxygen documentation . So to take a C++ analogy it seems that the word doxygen is overloaded and means different things in different contexts . Within the Drupal project doxygen does not refer to a software but simply a standard specification for documentation syntax even though as I said above the front page of the doxygen web site itself does not claim to be such a thing So my parting question is : .. . .. . Is there any other documentation syntax specification Comment : You ask a lot of questions . Is the last one the most important Comment : They are all related . Maybe I could have split this into more questions.. . to the risk that others flag them as duplicates . People will answer according to their knowledge . .. . Answer : You are right - Doxygen is more of a documentation extraction application than a commenting standard per se . It supports many different documentation styles - JavaDoc with @ introducing a command a Doxygen variant with introducing the same commands Documentation XML and many variations on the comment block format that is allowed . It is also able to use the formatting of comments to indicate what content is e.g . brief descriptions need not be tagged as such and can be taken from the first sentence or paragraph of the text etc . As such it is highly configurable but allows almost every programmer to have their own style which leads to a nonstandard mess from one project to another and often between different comments within a single project - even when they are written by a single programmer The plus side is that as long as the comment stays within the basic style Doxygen will correctly extract the docs for you and format them all into a consistent external document . The minus side is that although many programmers use doxygen comments which sounds standardised their comment formats can often be totally dissimilar . One solution for Visual Studio that can at least help with this disparity of styles within your own project team company is an addin I ve written AtomineerUtils http : www.atomineerutils.com . This helps you to author and update Doxygen JavaDoc and XML documentation format comments - it auto-generates documentation to save lots of time and updates comments to keep them in sync with changes to the code . During this process it can reformat the comment to achieve a very consistent and readable style order the entries in a standard format enforce blank lines between comments and code and between entries word-wrap the text in entries etc . The user can set up templates that control exactly how all of this works so it s easy to achieve precisely the style you want but make it consistent across all your projects . This improves consistency a lot when you have more than one programmer working on a body of code . If you are documenting in Visual Studio I would recommend the XML documentation format . It s not as human-readable as Doxygen JavaDoc styles can be but it s used by the IDE to provide live intellisense data on code as you type and is exported to XML files that any application can easily process which gives you a lot more flexibility . Doxygen can build docs from this format so you can stil use the Doxygen tools with XML source comments too . Comment : +1 Thank you for the additional information .", "Question : The Doxygen image tag documentation specifies that both height and width attributes can be given yet only the first attribute is accepted . The second attribute is output to the resultant XML as descriptive text . I would like to specify both image attributes as : .. . .. . image rtf myimage.png width 100px height 250px .. . .. . The link-to the documentation where it states that both attributes are permitted is : http : www.stack.nl dimitri doxygen manual commands.html cmdimage .. . .. . Note the relevant section says : The sizeindication can specify the width or height to be used or a combination . What I want to know is : what is the correct syntax Or is the documentation in error .. . Answer : I think the .. . .. . This can be useful for LaTeX or docbook output i.e . format latex or format docbook . statement might actually mean that it is only useful with those formats . I am unable to get the width height working myself and even though it seems to parse the first sizeindicator argument it does not actually use it . Theres some old documentation available here https : www.star.bnl.gov public comp sofi doxygen commands.html cmdimage that seems to imply that it used to only work for Latex .. . .. . This is only useful for LaTeX output i.e . format latex . The sizeindication can be either width or height . The size should be a valid size specifier in LaTeX for example 10cm or 6in or a symbolic width like textwidth . Also the few posts online I could find regarding this : .. . .. . Here http : doxygen.10944.n7.nabble.com specify-image-size-td2827.html .. . .. . and here http : doxygen.10944.n7.nabble.com Feature-enhancement-to-image-tag-td5404.html .. . .. . lead me to believe this is not working outside Latex formats . I think this answer http : stackoverflow.com questions 15975262 how-to-specify-image-size-in-html-doxygen might be the only working way to achieve what you want . Edit : .. . .. . After looking into the parser code within defaultHandleTitleAndSize in docparser.cpp https : github.com doxygen doxygen blob master src docparser.cpp which is called for image it will in fact only handle the first width or height attribute after which it will stop .", "Question : I am trying to include a .ini file in the doxygen documentation of a C++ class using include . This works fine but for some reason doxygen treats the contents of the file as C code which leads to strange formatting . I know include surrounds the included file with a code block and that you can pass specific language information to the code block by using e.g . code .unparsed . Is there a way to do the same with include include .unparsed does not work.. . Comment : Can you use verbinclude Comment : That would work for my purpose . But if there is a way to pass on parameters to the code block I would still be interested to know how . Comment : include takes the file name and determines the language based on the extension and settings in EXTENSION MAPPING . The fallback for unknown extensions is C . In case of code the language of the block is unknown and doesn t have to match language of the file e.g . a Fortran or C code block in a markdown descriptive text block therefore the .. . can be specified with code . .. . Answer : Seems the answer to the question is no : you cannot indicate a language when using include since doxygen tries to determine the language based on the extension . If it fails to do so it reverts to C . If you do not want C formatting for unsupported file extensions you can use verbinclude instead of include .", "Question : Roxygen is inspired by the Doxygen documentation system that is used by C C++ programmers . I have used Doxygen and I find it real easy to document any program as long as you have the doxygen comment . It also generate call graphs for functinos and classes . I thought roxygen will work the same way but when I search for roxygen help I only find solution to documenting R packages . I have check Hadley Wickham s online roxygen2 help https : cran.r-project.org web packages roxygen2 vignettes rd.html but that does not describe anything about the R script documentation . My scripts some times become 500-1000 lines and has several functions which I always document with the comments . I want to generate PDF or HTML documentation with graph-viz diagrams . Can Roxygen capable of making call-graph and document stand alone R scripts Comment : Checkout knitr : : spin http : yihui.name knitr demo stitch I have used it before and might be what you re looking for . The examples in the doc will give you a flavour of what to expect . Comment : Thanks I think I will use it . .. . Answer : No roxygen2 will work only for writing package documentation . Sounds to me you re after a report generating tool . You can use knitr for that . You can include code comments text MathJax or even use LaTeX . It also supports table of contents and references . This is by no means an exhaustive list of functionality . With some logical limitations you can produce pdf and html documents among others . Comment : I tried knittr : : spin . It works like a report generation tool . As I have mentioned in my question I am looking for a tool that will generate documentation from the program structure and comments in my script . Such a document includes the function definitions call-graphs the argument and the return values of the functions and a table of contents . I am really not looking for generating a report with plots or values from the output of the script . I am looking for a tool to generate a help file for understanding my program for others and myself after a year from now . Comment : @Xtrim-a ok however I don t think such a tool exists . If you are willing to bite the bullet and convert your comments into markdown you can document your script that way . Comment : I am using knittr with some options and it is doing a good job for now . Thank you all for your replies I hope doxygen will extend its support for R someday ." ] }
[ "yes-answer-long" ]
rtf
UNK_RELATION
android-glide@decoding@102
android-glide -- a fast and efficient open-source image loading library for android that wraps media @placeholder memory and disk caching and resource pooling into a simple and easy to use interface .
{ "confidence": [ 48.71562576293945, 43.94492721557617, 42.7017822265625, 41.38383483886719, 40.607582092285156, 39.25454330444336, 38.997684478759766, 37.70866394042969, 36.854896545410156, 36.25893783569336, 36.05335235595703, 35.46903991699219, 35.308494567871094, 34.796051025390625, 34.10157775878906, 33.59469223022461, 33.495635986328125, 33.495635986328125, 33.45769500732422, 33.44628143310547, 33.110939025878906, 33.009483337402344, 32.83794403076172, 32.62468719482422, 32.279327392578125, 32.11011505126953, 31.8536376953125, 31.70246696472168, 31.411746978759766, 31.38530731201172, 31.311737060546875, 31.04966926574707, 30.925579071044922, 30.879928588867188, 30.879928588867188, 30.81285858154297, 30.80224609375, 30.741952896118164, 30.685670852661133, 30.602975845336914, 30.560218811035156, 30.462825775146484, 30.364110946655273, 30.170663833618164, 30.15923500061035, 30.119592666625977, 30.09511375427246, 30.045923233032227, 30.04557991027832, 30.020366668701172, 29.7728328704834, 29.711313247680664, 29.664791107177734, 29.53805160522461, 29.42636489868164, 29.42611312866211, 29.33683204650879, 29.261367797851562, 29.208045959472656, 28.92815589904785, 28.92815589904785, 28.900819778442383, 28.879417419433594, 28.864261627197266, 28.864261627197266, 28.864261627197266, 28.836868286132812, 28.77521324157715, 28.772502899169922, 28.680252075195312, 28.654476165771484, 28.654476165771484, 28.590486526489258, 28.49393081665039, 28.35481834411621, 28.244007110595703, 28.198978424072266, 28.04218292236328, 28.038524627685547, 28.033842086791992, 27.923233032226562, 27.898136138916016, 27.782005310058594, 27.774831771850586, 27.774831771850586, 27.585594177246094, 27.566078186035156, 27.560516357421875, 27.560516357421875, 27.560516357421875, 27.560516357421875, 27.560516357421875, 27.52590560913086, 27.52590560913086, 27.421058654785156, 27.344921112060547, 27.2945613861084, 27.197715759277344 ], "content": [ "I use Glide library for Android .", "How to create image slider of multiple images using glide library in android", "I use Glide https : github.com bumptech glide for loading Images in my android application .", "How does Glide caching work with android M .", "How to encrypt and decrypt disk cache images in android using Glide", "See the ListView RecyclerView section here : Loading an image http : stackoverflow.com documentation android 1091 glide 3504 loading-an-image t 20160808140301791573 .", "I am using glide for image loading in my android app to avoid any crashes I am loading images with application context .", "Scenario : .. . .. . I have a large GIF image which I want to cache the first time user opens the app using Glide https : github.com bumptech glide - Image Loading and Caching library .", "I m looking to adopt the Glide library https : github.com bumptech glide in-place of Universal Image Loader https : github.com nostra13 Android-Universal-Image-Loader but I m running into a problem with regards to shared element transitions .", "I am using Android glide library https : github.com bumptech glide to fetch image from internet and show in a ImageView within Framelayout .", "I am using glide library to load the image .", "I am using a Glide https : github.com bumptech glide library for loading remote URLs into ImageView s .", "I am loading an image with Glide but I don t know how to pass rounded params to this library .", ".. . .. . build.gradle : .. . .. . .. . .. . Android Manifest : .. . .. . .. . GlideConfig.java : .. . .. . .. . proguard-rules.pro : .. . .. . .. . Glide using :", "But I don t know how to use it with Glide library .", "The way Glide loads an image to memory and do the caching is better than Picasso which let an image loaded far faster .", "Using Glide Library... .", "Glide is a very cool library", "I am using Glide to download and cache images on Android .", "Dou you know how to rounded image with Glide library", "Or does Glide image Loader library solve this issue", "Glide includes a memory cache .", "Check this post glide vs picasso http : vardhan-justlikethat.blogspot.in 2014 09 android-image-loading-libraries-picasso.html .. . .. . Edit : the linked post doesn t call out an important difference in the libraries .", "See github.com bumptech glide wiki https : github.com bumptech glide wiki Caching-and-Cache-Invalidation cache-keys", "I am trying to use the Glide Image Library to load images in a gridview an using REccycler View .", "A will start B B having some image loading stuff using Glide image library .", "I am using bumptech glide in an Android project and it works perfectly .", "Possible duplicate of How does one use glide to download an image into a bitmap", "Am using glide for displaying and caching images .", "I try to show a GIF image as loading placeholder in image view - with Glide Library https : github.com bumptech glide : .. . .. . I try to show this file .. . .. . loading2.gif .. . .. . but get this error : .. . .. . Error : 54 86 error : cannot find symbol method asGif .. . .. . How can I show GIF file with Glide in a imageView", "my main question is that I use the Glide library for image caching and the Android download-manager to download a file which will be stored in my app s external directory so how do I handle the external storage permission for these components and do I need to if i am just using my app s private directory", "Also you can check this post http : thedeveloperworldisyours.com android rounded-coners-with-glide .", "I am also using Glide Transformation library https : github.com wasabeef glide-transformations to apply some image transformatins .", "@ikhsan complete the code with Glide to set the image attribute", "I am using Glide to show the image .", "I would like to set the value of an image attribute in an object class as you would below but using Glide .. . .. . I guess this is how you fetch the image from the url source using Glide as Bitmap", "I am using Glide in my project for loading images .", "You have to use CircularImageView https : github.com lopspower CircularImageView to Display that type of Image.. . .. . .. . You are using Glide library https : github.com bumptech glide which used to load images. .", "You are now going to just give the glide library the direct path of your file and leave the caching and showing of image in your view to the glide which is does very efficiently .", "https : github.com bumptech glide wiki Caching-and-Cache-Invalidation .. . .. . Thank in advance :", "Also I m using Glide library for loading pictures from Uri to ImageView .", "The actual problem in if an image is in Screenshots folder then Glide is showing error image .", "I have tried to use Glide to load an Captcha image into a ImageView .", "Glide Version : Glide version : 3.7.0 .. . .. . Integration libraries : okhttp : 2.7.0 .. . .. . Device Android Version : All Devices .. . .. . Issue details Repro steps Use case background : When Image is loaded for the first time it shows compressed with less height .", "I m using Glide https : github.com bumptech glide to handle that image loading for me on my CardViews and Fresco http : frescolib.org on my image slider And this question on SO http : stackoverflow.com questions 33863792 getting-black-imageview-using-picasso-and-glide explains why I m using two image libs .", "I have used glide for one image but not able to use for creating image slider .can anyone help me in this", "For glide library look here https : futurestud.io blog glide-module-example-accepting-self-signed-https-certificates .", "Normally I would use the default cache method used by Glide but in this particular case I need the image to be loaded into memory before being displayed so that it ll apear immediatly no loading no white screen .", "Documentation on how to cache images on background-thread can be found here https : github.com bumptech glide wiki Loading-and-Caching-on-Background-Threads .", "Glide use less memory by default with RGB 565 .", ".. . .. . To apply this in practice try to use with this when possible but when it s not like in an adapter or a centralized image loading method pass in a RequestManager glide as an argument and use glide.load .. . for example : .. . .. . or in adapter : .. . .. . and use these from Activity Fragment :", "Device : Xiaomi Redmi 1S Android version : 4.4.4 Glide version : 3.7.0 .. . .. . Thanks for any help", "I would like to use Glide to load these bitmaps but I can t figure out how to use a LayerDrawable with Glide .", "its very simple i have seen Glide library its very good library and essay base on volley Google s library .. . .. . usethis library for rounded image view .. . .. . https : github.com hdodenhof CircleImageView .. . .. . now .. . .. . For a simple view : .. . .. . For a list : .. . .. . and in XML", "Fresco .. . - .. . - Huge size of library .. . - App freeze while loading big images from internet into ListView .. . - Huge size of cache .. . + .. . - Pretty fast image loader .. . - A lot of functionality .. . .. . .. . .. . Picasso .. . - .. . - Slow loading big images from internet into ListView .. . + .. . - Tinny size of library .. . - Small size of cache .. . - Simple in use .. . - UI is not freeze .. . .. . .. . .. . Glide .. . - .. . - .. . .. . + .. . - Small size of library .. . - Tinny size of cache .. . - Simple in use .. . - GIF animated image support .. . - Fast loading big images from internet into ListView .. . - UI is not freeze .. . .. . .. . .. . Tested by me on SGS2 Android 4.1 WiFi 8.43 Mbps .. . .. . For now I am using Glide . .. . Read more here http : inthecheesefactory.com blog get-to-know-glide-recommended-by-google en .", "Glide loads the image asynchronously so your test on the bitmap right after initiating that loading operation will return null as the image has not yet been loaded .", "Given a scenario if we fast scroll through a list glide should cancels the image request for views which are too far from focus .", "After 3.5 update developers provided GlideModule http : bumptech.github.io glide javadocs 360 index.html com bumptech glide module GlideModule.html interface .", "http : frescolib.org index.html It uses native memory and has a much better bitmap resource management especially for pre-5.0 Android devices .", "You can use RoundedBitmapDrawable for circular Images with Glide .", "Just use .asBitmap in Glide call and it will work fine .", "This is related to Glide image loading with application context http : stackoverflow.com questions 31964737 glide-image-loading-with-application-context 32887693 32887693 .. . .. . I have several Fragments hosted in an Activity with a Fragment being replaced by another as the user navigates through the app .", "Code for Picasso Library .. . .. . Now How Can I do this with Glide", "The problem is Glide is not showing any png image present in the phone .", "In its onCreateView method it starts a Glide load of a 3MB image .", "So anybody know how to display an image with rounded-corners with Glide", "Feel free to open a new issue on GitHub : github.com bumptech glide issues new https : github.com bumptech glide issues new", "How can i use Glide library to load Bitmap into my ImageView", "See TWiStErRob s comment http : vardhan-justlikethat.blogspot.hu 2014 09 android-image-loading-libraries-picasso.html showComment 1429294826669 c5507604261259603599 for more .", "Glide was only downsampling the image first step in the sizing image flow as explained by R bert which gives an image with approximated dimensions .", "Try to use Glide s GlideDrawableImageViewTarget http : bumptech.github.io glide javadocs 340 com bumptech glide request target GlideDrawableImageViewTarget.html .", "I know how to use Glide lib with CircleImageView but I search possible way do this with only Glide lib .", "With glide or not", "http : stackoverflow.com questions 27394016 how-does-one-use-glide-to-download-an-image-into-a-bitmap", "I try to load a big images 671kb and 1.17Mb with glide Util.loadImage just contains some general Glide methods : .. . .. . .. . .. . But Bitmap resource depends by device .", "GIF Animation loading is a killing feature provided by Glide .", "Are you sure that your memory cache is being recognized by Glide", "I want load image from server with json and show this into ImageView with Glide library i write below codes but not show me any image in imageView", "use BitmapFactory.Options.inSamleSize https : developer.android.com reference android graphics BitmapFactory.Options.html inSampleSize to load a downsampled version of the image .", "What I tried : .. . .. . I went through Caching and Cache Invalidation https : github.com bumptech glide wiki Caching-and-Cache-Invalidation on Glide s github page .", "Info about the library GLIDE here .. . https : github.com bumptech glide .. . 3 .", "Is there a simple way to check if glide is following my fragments lifecycles", "I m using glide to load an image using its resource ID into a bitmap and I want to pass the bitmap to a member function of a custom view class .", "in default the image that is cropped by glide has no border I need to have a border in the circle image .", "Glide and other image loaders put image-cache to data data com.package cache Internal storage by default .", "Use this instead of that : .. . .. . Bitmap bmp GlideBitmapDrawable holder.wallPaperImageView.getDrawable .getCurrent .getBitmap .. . .. . or .. . .. . Glide .with this .load a.getAlbum artwork .asBitmap .into new SimpleTarget 300 300 @Override public void onResourceReady Bitmap resource GlideAnimation glideAnimation setBackgroundImage resource", "EDIT : My original code without Glide : .. . .. . And with Glide I only used some basic code like : .. . .. . But you have to use some kind of model since Glide doesn t understand the LayerDrawable .", "How does glide does that", "I m using Glide 3.7.0 .", "I am new to Glide .", "The glide drawables are not BitmapDrawables .", "Glide does the recycling automatically .", "Another thing the sizeOf String key Bitmap image method is unknown to glide .", "There are some URLs when I hit them with Glide then it didn t show the image .", "Or .. . .. . Https Connection Android http : stackoverflow.com questions 995514 https-connection-android", "Yeah but i have a Listview with a lot of images so i want to use Glide for fast scroll", "Glide creates cached images per size while Picasso saves the full image and process it so on load it shows faster with Glide but uses more memory .", "Downloading a URL into an ImageView is very easy using Glide : .. . .. . I m wondering if I can download into a Bitmap as well" ] }
{ "confidence": [ 56.38158416748047, 52.898773193359375, 51.29584503173828, 51.0890007019043, 49.83104705810547, 49.579917907714844, 49.355812072753906, 48.22972106933594, 47.91444396972656, 47.54161071777344, 47.52137756347656, 47.510597229003906, 47.330909729003906, 46.97351837158203, 46.973384857177734, 46.62294006347656, 46.425270080566406, 45.85829162597656, 45.85114288330078, 44.98078918457031 ], "content": [ "Question : So anybody know how to display an image with rounded-corners with Glide I am loading an image with Glide but I don t know how to pass rounded params to this library . I need display image like following example : .. . .. . enter image description here http : i.stack.imgur.com x8PhM.png Comment : whats problem you face Comment : Dou you know how to rounded image with Glide library Comment : i have use github.com hdodenhof CircleImageView https : github.com hdodenhof CircleImageView for ronded image view Comment : I know how to use Glide lib with CircleImageView but I search possible way do this with only Glide lib . Have a any method in Glide lib to do this or it is not supported .. . Answer : Check this post glide vs picasso http : vardhan-justlikethat.blogspot.in 2014 09 android-image-loading-libraries-picasso.html .. . .. . Edit : the linked post doesn t call out an important difference in the libraries . Glide does the recycling automatically . See TWiStErRob s comment http : vardhan-justlikethat.blogspot.hu 2014 09 android-image-loading-libraries-picasso.html showComment 1429294826669 c5507604261259603599 for more . Comment : sounds interesting . Does it work well with API 21 s Outline Comment : Yes it works . I have tested in emulator Comment : hmm I might use this then . I will try to simply use a custom view though I would like not to have to create a second bitmap : . Also you should always use the bitmap pool in order to try to get a bitmap from there : Comment : Stan only requirement for Transformation ids is that they are unique among all Transformations so the usage here is correct . Cache keys will include both the source id and the transformation id so the transformation id is a mixin rather than a replacement . See github.com bumptech glide wiki https : github.com bumptech glide wiki Caching-and-Cache-Invalidation cache-keys Comment : Is there a way to apply transformation to placeholder", "Question : I use Glide https : github.com bumptech glide for loading Images in my android application . After 3.5 update developers provided GlideModule http : bumptech.github.io glide javadocs 360 index.html com bumptech glide module GlideModule.html interface . According to this article https : github.com bumptech glide wiki Configuration disk-cache Disk Cache I can set cache directory using setDiskCache method and ExternalCacheDiskCacheFactory . But I doesn t see any difference . All cache still on the Internal storage in default cache directory . .. . .. . build.gradle : .. . .. . .. . .. . Android Manifest : .. . .. . .. . GlideConfig.java : .. . .. . .. . proguard-rules.pro : .. . .. . .. . Glide using : Comment : What do you consider to be the internal-storage default cache directory The code looks OK to me so I m wondering if this is just a matter of confusion over what Android considers to be internal external storage. . Comment : @TimMalseed there are no confusion . Glide and other image loaders put image-cache to data data com.package cache Internal storage by default . But GlideModule feature should do the trick . Maybe I m missing something . Comment : What device ROM are you testing this on You cannot say there is no confusion . When it comes to internal external storage on Android even Google are confused . Comment : @TimMalseed Samsung Galaxy S2 . Comment : If you put a log statement in applyOptions in your GlideModule is anything printed Can you narrow down the problem to your Factory or the GlideModule .. . Answer : To setup GlideBuilder with value of setDiskCache You can set your ExternalStorageDirectory as a cache directory . Check Can t set GlideBuilder http : stackoverflow.com questions 28540216 cant-set-glidebuilder .. . .. . Hope its help you .", "Question : So anybody know how to display an image with rounded-corners with Glide I am loading an image with Glide but I don t know how to pass rounded params to this library . I need display image like following example : .. . .. . enter image description here http : i.stack.imgur.com x8PhM.png Comment : whats problem you face Comment : Dou you know how to rounded image with Glide library Comment : i have use github.com hdodenhof CircleImageView https : github.com hdodenhof CircleImageView for ronded image view Comment : I know how to use Glide lib with CircleImageView but I search possible way do this with only Glide lib . Have a any method in Glide lib to do this or it is not supported .. . Answer : its very simple i have seen Glide library its very good library and essay base on volley Google s library .. . .. . usethis library for rounded image view .. . .. . https : github.com hdodenhof CircleImageView .. . .. . now .. . .. . For a simple view : .. . .. . For a list : .. . .. . and in XML Comment : Like mentioned in previous answer comment this way doesn t work well either . At least for de.hdodenhof : circleimageview : 1.2.2 + com.github.bumptech.glide : glide : 3.5.2 . Checked and double checked . Also the same issue with glide 3.4.+ and circleimageview 1.2.1 Comment : very easy to use . thank you very much . Comment : +1 for the .centerCrop . Worked for me with the DiamondImageView https : github.com siyamed android-shape-imageview plus .asBitmap . Comment : Requires calling .dontAnimate on glide which is not acceptable", "Question : Findings : .. . .. . 1 . Difference between Picasso v s ImageLoader here .. . http : stackoverflow.com q 19995007 1083093 .. . 2 . Info about the library GLIDE here .. . https : github.com bumptech glide .. . 3 . Now recently Facebook released new image library called Fresco https : github.com facebook fresco .. . .. . .. . .. . Questions : .. . .. . 1 . What is the difference between Picasso v s Imageloader v s Fresco .. . 2 . When can we use Glide .. . 3 . Which is the best library to use . 4 . If Each libraries have their own significance what are they Comment : i am interest in fresco also . anyone can explain the difference Comment : twitter.com jessewilson status 581235604740042752 https : twitter.com jessewilson status 581235604740042752 Comment : This is not the place to ask opinion based questions Comment : @danny117 so what we can do here if we have no any idea about it Comment : @ShobhitPuri this tool https : github.com mihaip dex-method-counts will help you check method count .. . Answer : Fresco .. . - .. . - Huge size of library .. . - App freeze while loading big images from internet into ListView .. . - Huge size of cache .. . + .. . - Pretty fast image loader .. . - A lot of functionality .. . .. . .. . .. . Picasso .. . - .. . - Slow loading big images from internet into ListView .. . + .. . - Tinny size of library .. . - Small size of cache .. . - Simple in use .. . - UI is not freeze .. . .. . .. . .. . Glide .. . - .. . - .. . .. . + .. . - Small size of library .. . - Tinny size of cache .. . - Simple in use .. . - GIF animated image support .. . - Fast loading big images from internet into ListView .. . - UI is not freeze .. . .. . .. . .. . Tested by me on SGS2 Android 4.1 WiFi 8.43 Mbps .. . .. . For now I am using Glide . .. . Read more here http : inthecheesefactory.com blog get-to-know-glide-recommended-by-google en . .. . .. . You can write cache to External Storage SD Card http : stackoverflow.com questions 34253434 glide-cache-to-external-storage-sd-card noredirect 1 comment56499906 34253434 with Glide . Comment : Pretty fast image loader seems to contradict App freeze for Fresco .", "Question : I am trying to load images from my server but when image is loading I am getting : .. . .. . Are there any configurations to set trust certificate for Glide or other settings to avoid this error .. . Answer : You can accept self-signed https URL . For glide library look here https : futurestud.io blog glide-module-example-accepting-self-signed-https-certificates . Or .. . .. . Https Connection Android http : stackoverflow.com questions 995514 https-connection-android", "Question : How can i use Glide library to load Bitmap into my ImageView I want to create a custom image with text and load it into imageview using Glide . This is my method to create custom bitmap with text .. . .. . But when i try to load this bitmap using glide i m getting error .. . Answer : According to the documentation I don t think the load method can take a Bitmap as parameter . The image source i.e . the parameter could be a URL drawable resource and file . However if you want to load a Bitmap into an ImageView you don t need to use the Glide library . Just use the below statement Comment : Yeah but i have a Listview with a lot of images so i want to use Glide for fast scroll Comment : There s an open issue for load Bitmap : 122 https : github.com bumptech glide issues 122 but Bitmap generation may take a long time resulting in blocking the UI thread .", "Question : So anybody know how to display an image with rounded-corners with Glide I am loading an image with Glide but I don t know how to pass rounded params to this library . I need display image like following example : .. . .. . enter image description here http : i.stack.imgur.com x8PhM.png Comment : whats problem you face Comment : Dou you know how to rounded image with Glide library Comment : i have use github.com hdodenhof CircleImageView https : github.com hdodenhof CircleImageView for ronded image view Comment : I know how to use Glide lib with CircleImageView but I search possible way do this with only Glide lib . Have a any method in Glide lib to do this or it is not supported .. . Answer : I found one easy and simple solution for add border over imageview in which color want to set or add gradient over image . STEPS : .. . .. . 1 . Take one frame layout and add two images.You can set size as per your requirement . For imgPlaceHolder you need one white image or color which you want to set . 2 . After placing this code on xml file put below line in java file . Glide.with this .load R.drawable.image01 .asBitmap .centerCrop .into new BitmapImageViewTarget imgPic .. . @Override .. . protected void setResource Bitmap resource .. . RoundedBitmapDrawable circularBitmapDrawable .. . RoundedBitmapDrawableFactory.create getResources resource .. . circularBitmapDrawable.setCircular true .. . imageView.setImageDrawable circularBitmapDrawable .. . .. . .. . .. . Glide.with this .load R.drawable.white bg .asBitmap .centerCrop .into new BitmapImageViewTarget imgPlaceHolder .. . @Override .. . protected void setResource Bitmap resource .. . RoundedBitmapDrawable circularBitmapDrawable .. . RoundedBitmapDrawableFactory.create getResources resource .. . circularBitmapDrawable.setCircular true .. . imgTemp2.setImageDrawable circularBitmapDrawable .. . .. . .. . .. . .. . This will make border of imageview simply with out any extra padding and margin . NOTE : White image is compulsory for border otherwise it will not work . Happy codding :", "Question : I want to load and cache images only in memory and not pass them to a view and later on when I need them to be loaded on the UI to get them from memory cache if they existed in memory . I tried : .. . .. . But when later on I make the call to load that uri in an ImageView it will still load it from the path and not memory . Is there another way to have images cached in memory without loading them on the UI .. . Answer : Documentation on how to cache images on background-thread can be found here https : github.com bumptech glide wiki Loading-and-Caching-on-Background-Threads . Here is some example code from the page showing how a file would be downloaded to cache without displaying the image in the UI : .. . .. . However make sure you have configured Glide such that caching is enabled : https : github.com bumptech glide wiki Configuration", "Question : I am hitting a server that has already thumbnailed images . To get a thumbnail of an image you just set a size attribute in the URL for the image resource . I am using bumptech glide in an Android project and it works perfectly . IE for glide you implement a method that is passed the width and height of the view calculated by glide and you can use that to determine how to make the request for an image that size or close to the server ie : .. . .. . Is there something like this for iOS I am using FastImageCache from some of the caching but I don t think it has this type of support . Worst I guess would be to just roll my own maybe a category that calculates what size image to request based on the image view size . If I do that its probably pretty easy to grab the height and width or the imageview but do I need to factor in the size scale of the device 1x 2x or 3x .. . Answer : All you need to do is to build the appropriate URL . But it s not clear from your question what the URL looks like but it s just one line of code using string interpolation for Swift or stringWithFormat in Objective-C . .. . .. . And yes you do want to factor in the scale when building the appropriate URL for the image view of a particular size e.g . a 44 x 44 point image view on device with scale of 3 should be requesting an image that is 132 x 132 pixels . Regarding requesting the image and caching it you can write your own as it s trivial . When you request images via NSURLSession it seamlessly caches it behind the scenes with NSURLCache with a few caveats . If you need something a little more advanced e.g . you re updating images in table view or collection view and want to perform lazy-loading you might consider one of the many UIImageView extensions for asynchronous fetching of images e.g . in Objective-C I d consider AFNetworking s UIKit categories or maybe use SDWebImage in Swift I d consider AlamofireImage DFImageManager or Kingfisher .", "Question : How to create image slider of multiple images using glide library in android I have used glide for one image but not able to use for creating image slider .can anyone help me in this .. . Answer : You can use android viewflipper .It is simple to use and as you have told you were able to use it for one image i hope you will figure out for multiple images and rest of your work can be completed using viewflippper . Comment : let me try viewflipper hope it will work which i am expecting", "Question : So anybody know how to display an image with rounded-corners with Glide I am loading an image with Glide but I don t know how to pass rounded params to this library . I need display image like following example : .. . .. . enter image description here http : i.stack.imgur.com x8PhM.png Comment : whats problem you face Comment : Dou you know how to rounded image with Glide library Comment : i have use github.com hdodenhof CircleImageView https : github.com hdodenhof CircleImageView for ronded image view Comment : I know how to use Glide lib with CircleImageView but I search possible way do this with only Glide lib . Have a any method in Glide lib to do this or it is not supported .. . Answer : The other solutions did not work for me . I found they all have significant drawbacks : .. . .. . Solutions using glide transformations do not work with placeholders .. . Solutions using rounded image views do not work with animations i.e . crossfade .. . Solutions using a generic method of a parent that clips its children i.e . the accepted answer here http : stackoverflow.com questions 26074784 how-to-make-a-view-in-android-with-rounded-corners do not work well with glide .. . .. . It is really interesting that after fumbling around with this I found the Fresco library page about rounded-corners and circles http : frescolib.org docs rounded-corners-and-circles.html in which they list basically the same limitations and conclude with the statement : .. . .. . there is no really good solution for rounding corners on Android and one has to choose between the aforementioned trade-offs .. . .. . Unbelievable that at this time we still dont have a real solution . I have an alternate solution based on the link I put above . The drawback with this approach is that it assumes your background is a solid color the corners aren t really transparent . You would use it like this : .. . .. . The gist is here https : gist.github.com grennis da9f86870c45f3b8ae00912edb72e868 and full code here : Comment : Thanks @Greg for great solution", "Question : null .. . Answer : I m using a GestureImageView to display a map with a custom layer for the selected theme . Depending on the theme I m loading a LayerDrawable in the GestureImageView . The way I use it the Bitmaps are killing my memory and will throw a OutOfMemoryException . I would like to use Glide to load these bitmaps but I can t figure out how to use a LayerDrawable with Glide . EDIT : My original code without Glide : .. . .. . And with Glide I only used some basic code like : .. . .. . But you have to use some kind of model since Glide doesn t understand the LayerDrawable . Comment : please add some code...what did you try until now Comment : added some code Comment : You should look into Google Maps API s Tiles https : developers.google.com maps documentation android tileoverlay and loading parts of a large image http : stackoverflow.com q 2546193 253468 . Comment : github.com bumptech glide issues 525 https : github.com bumptech glide issues 525", "Question : I am using Glide to download and cache images on Android . Everything works well except the fact that I don t want to load the bitmaps directly into the ImageView I don t want to have the fade animation neither image placeholders . All I want is to create a global method which will help me to download the image all over the application . The problem is that I don t know how to implement the listener . RequestListener isn t called at all . Comment : Try referring to this : linK http : android-developers.blogspot.in 2010 07 multithreading-for-performance.html . .. . Answer : Loads in Glide don t start until you make a call to into http : bumptech.github.io glide javadocs 340 com bumptech glide GenericRequestBuilder.html into Y . The RequestListener interface observes requests but isn t typically meant for handling results . Instead of using RequestListener consider having your callback implement the Target http : bumptech.github.io glide javadocs 340 com bumptech glide request target Target.html interface and pass it in using into http : bumptech.github.io glide javadocs 340 com bumptech glide GenericRequestBuilder.html into Y . Alternatively you could just extend SimpleTarget http : bumptech.github.io glide javadocs 340 com bumptech glide request target SimpleTarget.html and pass it in to each request in the same way you re trying to use RequestListener : .. . .. . You will want to provide a width and a height so that Glide can downsample and transform images appropriately . You may also run in to issues with cancellation if you re displaying these Bitmaps in views in which case I d strongly recommend making the view available to your loading API and passing the view to into http : bumptech.github.io glide javadocs 340 com bumptech glide DrawableRequestBuilder.html into android.widget.ImageView which will handle sizing and cancellation for you . Comment : You can also call preload instead of into if you don t need the image immediately or if you d rather use a RequestListener for the callback .", "Question : Hi I want to have a progress-bar for image which will shown while image loading but when image loading will be completed I want to set it to gone . Earlier I was using Picasso library for this . But I don t know how to use it with Glide library . I have idea that some resource ready function is there but I don t know how to use it . Can anyone help me Code for Picasso Library .. . .. . Now How Can I do this with Glide I am able to load image by this with Glide but how can I write progressBar.setVisibility View.GONE somewhere in code if image get loaded Comment : Why did you change your library Picasso is great . Comment : I would also recommend sticking with Picasso unless you have good reason to change libraries .. . Answer : The above solution works pretty well for me too but when i use asBitmap to download the image . It does not work . We need to use BitmapImageViewTarget Comment : See my comment : stackoverflow.com questions 26054420 http : stackoverflow.com questions 26054420 set-visibility-of-progress-bar-gone-on-completion-of-image-loading-using-glide-l comment54315331 26066582 . This answer is a good demonstration of what I said there .", "Question : Findings : .. . .. . 1 . Difference between Picasso v s ImageLoader here .. . http : stackoverflow.com q 19995007 1083093 .. . 2 . Info about the library GLIDE here .. . https : github.com bumptech glide .. . 3 . Now recently Facebook released new image library called Fresco https : github.com facebook fresco .. . .. . .. . .. . Questions : .. . .. . 1 . What is the difference between Picasso v s Imageloader v s Fresco .. . 2 . When can we use Glide .. . 3 . Which is the best library to use . 4 . If Each libraries have their own significance what are they Comment : i am interest in fresco also . anyone can explain the difference Comment : twitter.com jessewilson status 581235604740042752 https : twitter.com jessewilson status 581235604740042752 Comment : This is not the place to ask opinion based questions Comment : @danny117 so what we can do here if we have no any idea about it Comment : @ShobhitPuri this tool https : github.com mihaip dex-method-counts will help you check method count .. . Answer : These answers are totally my opinion .. . .. . Answers .. . .. . 1 . Picasso is an easy to use image loader same goes for Imageloader . Fresco uses a different approach to image loading i haven t used it yet but it looks too me more like a solution for getting image from network and caching them then showing the images . then the other way around like Picasso Imageloader Glide which to me are more Showing image on screen that also does getting images from network and caching them . 2 . Glide tries to be somewhat interchangeable with Picasso.I think when they were created Picasso s mind set was follow HTTP spec s and let the server decide the caching policies and cache full sized and resize on demand . Glide is the same with following the HTTP spec but tries to have a smaller memory-footprint by making some different assumptions like cache the resized images instead of the fullsized images and show images with RGB 565 instead of RGB 8888 . Both libraries offer full customization of the default settings . 3 . As to which library is the best to use is really hard to say . Picasso Glide and Imageloader are well respected and well tested libraries which all are easy to use with the default settings . Both Picasso and Glide require only 1 line of code to load an image and have a placeholder and error image . Customizing the behaviour also doesn t require that much work . Same goes for Imageloader which is also an older library then Picasso and Glide however I haven t used it so can t say much about performance memory usage customizations but looking at the readme on github gives me the impression that it is also relatively easy to use and setup . So in choosing any of these 3 libraries you can t make the wrong decision its more a matter of personal taste . For fresco my opinion is that its another facebook library so we have to see how that is going to work out for them so far there track record isn t that good . strike Like the facebook SDK is still isn t officially released on mavenCentral strike I have not used to facebook sdk since sept 2014 and it seems they have put the first version online on mavenCentral in oct 2014 . So it will take some time before we can get any good opinion about it . 4 . between the 3 big name libraries I think there are no significant differences . The only one that stand out is fresco but that is because it has a different approach and is new and not battle tested . Comment : Minor nit : it seems that the Facebook SDK has been officially available as an AAR on Maven Central for a while . developers.facebook.com docs android https : developers.facebook.com docs android getting-started androidstudio Comment : thx for the correction It has been awhile since I used the facebook SDK so I had not checked that . Still it took them too long to put in on there . Comment : A year down the line after reading this I am still wondering if I should use Frescoe and I still can t see why I should . While Glide and Picasso work out of the box Frescoe just needs you to do so many things that it doesn t look like it is worth it and the size... . Comment : I want to point out that fresco has memory-issues : github.com facebook react-native issues 8711 https : github.com facebook react-native issues 8711", "Question : Scenario : .. . .. . I have a large GIF image which I want to cache the first time user opens the app using Glide https : github.com bumptech glide - Image Loading and Caching library . After that whenever user opens the app I want to show the cached version if present . This GIF URL will expire after a given interval . When it expires I fetch the new GIF URL and display cache that for future use . What I tried : .. . .. . I went through Caching and Cache Invalidation https : github.com bumptech glide wiki Caching-and-Cache-Invalidation on Glide s github page . I also went though the Google Group thread Ensuring That Images Loaded Only Come From Disk Cache https : groups.google.com forum topic glidelibrary TcFOy0tcxXA which shows how to get the image form cache . I also went through How to invalidate Glide cache for some specific images http : stackoverflow.com questions 31537669 how-to-invalidate-glide-cache-for-some-specific-images question . From the links above I see the following code sniplet which shows how to load the image from cache . However this only tries to get the image from cache . If its not present in cache it doesn t try to get from the network and fails : .. . .. . Questions : .. . .. . 1 . Is there a cleaner way to achieve the following : Show the GIF image from the cache if present else download the GIF cache it for later use and show it in the ImageView . 2 . The caching article above mentions the following : .. . .. . In practice the best way to invalidate a cache file is to change your identifier when the content changes url uri file path etc .. . .. . The server sends a different URL to the app when the previous one expires . In this case I believe the old image will eventually be Garbage Collected Is there a way to force remove the image from the cache 3 . On a similar note is there a way to prevent the Garbage Collection of an image with specific key to prevent downloading the large file again and then later instruct to delete the old image from cache when the URL changes .. . Answer : 1 . You don t need a custom ModelLoader to show the GIF from cache if present and fetch it otherwise that s actually Glide s default behavior . Just using a standard load line should work fine : .. . .. . Glide.with TheActivity.this .. . .load http : sampleurl.com sample.gif .. . .diskCacheStrategy DiskCacheStrategy.SOURCE .. . .into theImageView .. . .. . .. . Your code will prevent Glide from downloading the GIF and will only show the GIF if it is already cached which it sounds like you don t want . 2 . Yes the old image will eventually be removed . By default Glide uses an LRU cache so when the cache is full the least recently used image will be removed . You can easily customize the size of the cache to help this along if you want . See the Configuration https : github.com bumptech glide wiki Configuration size wiki page for how to change the cache size . 3 . Unfortunately there isn t any way to influence the contents of the cache directly . You cannot either remove an item explicitly or force one to be kept . In practice with an appropriate disk cache size you usually don t need to worry about doing either . If you display your image often enough it won t be evicted . If you try to cache additional items and run out of space in the cache older items will be evicted automatically to make space . Comment : Thanks so much for taking time to answer . Actually that does clear lots of thing . For your first point that s something I want to do . I just wasn t sure if it was the default behaviour . However what made me think that the standard code isn t using the cached image was that when this code executes for first time I assume Glide caches the image . Now I close the app and switch off the internet . Now when I open the app the image doesn t show when device is offline . However when I use StreamModelLoader as mentioned in the question it does display it I appreciate your help . Comment : I think you were right . Now sure why it was not happening before . Thanks again Comment : Glad it worked out if you do see the behavior where you need that custom ModelLoader to get it to load the GIF offline please open an issue on GitHub github.com bumptech glide issues new https : github.com bumptech glide issues new so we can look into it it definitely shouldn t be necessary . Comment : @Sam Judd Is it possible that copying cached image to my device folder from Glide s cache memory folder", "Question : I have tried to use Glide to load an Captcha image into a ImageView . The first time loading is fine . However when I reload the Captcha image into the same ImageView the ImageView does not refresh to new image . Does anyone have idea how to solve this issue Comment : add source code .. . Answer : You can always use Glide.clear http : bumptech.github.io glide javadocs latest com bumptech glide Glide.html clear com.bumptech.glide.request.target.Target and then call Glide.with .. . .load again . If your url doesn t change when the image changes you may also need to add .skipMemoryCache true http : bumptech.github.io glide javadocs latest com bumptech glide DrawableRequestBuilder.html skipMemoryCache boolean to your load call . For more control check out the .signature http : bumptech.github.io glide javadocs latest com bumptech glide DrawableRequestBuilder.html signature com.bumptech.glide.load.Key API . You can always do something like : Comment : I try use Glide.clear imageView . ImageView method imageView.getTag include tag TAG com.bumptech.glide.request.GenericRequest@425455e0 but Glide don t clear view and don t update image url the same . Add signature - work fine . Thanks . Comment : Monkeyless you are right . I have used .skipMemoryCache true and it worked fine . However I am facing another issue . When I load the captcha image sometimes it can show on ImageView . Sometimes it cannot but without any exception . Any idea Comment : Check out the debugging page on the project wiki and consider creating an issue if you can reproduce this reliably : github.com bumptech glide wiki Debugging-and-Error-Handling https : github.com bumptech glide wiki Debugging-and-Error-Handling Comment : .signature worked fine but what s the impact of using it and what does it actually do Comment : Signature changes the in memory and disk cache key . So using a new random signature each time effectively disables both the disk cache and the memory cache . You could use DiskCacheStrategy.NONE but that s not sufficient because the memory cache key may still match . skipMemoryCache will only skip checking the memory cache not checking active resources so it s not sufficient either even when paired with DiskCacheStrategy.NONE .", "Question : I am using glide for image loading in my android app to avoid any crashes I am loading images with application context . What will be effect of this on performance of application and memory .. . Answer : What will be effect of this on performance of application and memory Glide provides so many .with methods for a reason : it follows lifecycle . Imagine a Fragment that is dynamically added to an Activity . In its onCreateView method it starts a Glide load of a 3MB image . Now what if the user presses the back button and the Fragment is removed or the whole activity is closed If you use with getActivity .getApplicationContext nothing will happen all 3MBs of data is downloaded and then decoded cached probably even set to the ImageView which is then garbage collected because the only reference to it was from Glide internals . If you use with Fragment this Glide subscribes to the Fragment s lifecycle events and as soon as the Fragment is stopped the any outstanding request should be paused and when destroyed all pending requests be cleared . This means that the image download will stop midway and no more resources will be used by that dead Fragment . If you use with getActivity Glide subscribes to the Activity s lifecycle events and the same thing happens as above but only when the Activity is stopped or destroyed . So the best practice is to use the closest possible context fragment to avoid unused request completions There s also a manual way to stop a load : Glide.clear ImageView Target . .. . .. . To apply this in practice try to use with this when possible but when it s not like in an adapter or a centralized image loading method pass in a RequestManager glide as an argument and use glide.load .. . for example : .. . .. . or in adapter : .. . .. . and use these from Activity Fragment : Comment : Awesome explanation It saved me a lot of time to investigate what was the main reason for often OOM exception . Thank you Comment : Could I pass in the fragment s context to an adapter as mContext and use Glide.with mContext .. . in the adapter Comment : @Terence Of course but that s the same as getActivity so if you replace the fragment with a transaction the resources won t be released until the user fully leaves the activity . If you need an mContext for other reasons e.g . getString you can just use anyView.getContext . Comment : @TWiStErRob That explains why my app memory usage can go up to 100MB at times.. . will be doing quite a bit of refactoring now . Thanks Comment : Note : calling Glide.with view.getContext is effectively equivalent to Glide.with this for any view appearing on that activity because RequestManagerRetriever.get Context context checks whether the context is an instanceof Activity and casts it appropriately e.g . get Activity context . So it will end up using the same get Activity method either way .", "Question : The problem .. . .. . I m writing an Android app that s supposed to have a Slideshow feature on it . I ve found this nice library https : github.com daimajia AndroidImageSlider based on Picasso that does exactly what I wanted and it worked just fine most of the times . Problem is sometimes my images are not loaded into the slide ImageView .. . It only shows a black canvas as you can see on the screenshot below . enter image description here http : i.stack.imgur.com Cp5M8.png .. . .. . I am loading the image from a local resource from my drawables . Sometimes it happens on Portrait mode sometimes on Landscape mode . It doesn t matter which image I use sometimes that blackness happens . EDIT : I m using Android 5.0.2 and 4.4.2 - It doesn t seem to happen on 4.4.2 . Only on 5.0.2 . .. . .. . Second edit : It happened on a Moto X 2014 with android 5.1 . Third edit : The images I m trying to load have 45KB on disk with a resolution of 900x445 . Yet another edit : I ve turned on the layout rects as suggested and these were the results : .. . .. . Single slide http : i.stack.imgur.com og1Pk.png .. . .. . And it keep like that on scroll . enter image description here http : i.stack.imgur.com ld7Uq.png .. . .. . And sometimes it gets white instead of black Or white then black . enter image description here http : i.stack.imgur.com UVlnK.png .. . .. . Something else I tried : My drawables were located on the res drawable folder when I ve changed the files from that folder to the res drawable-xxxhdpi the slider worked on the 5.0.2 device . del wtf del .. . .. . What have I tried so far .. . .. . I ve tried different images to load multiple images on the slide and even this pull request https : github.com daimajia AndroidImageSlider pull 170 that changes Picasso to Glide on the lib . Nothing seems to work and the error seems random . Once I ve tried to use URLs from the web instead of the actual drawables on the local-storage it worked . With the exact same images . .. . .. . Here s how I m loading the images : .. . .. . Fragment.java .. . .. . fragment.xml .. . .. . I m following the tutorial https : github.com daimajia AndroidImageSlider wiki Start-Using from the libs wiki page https : github.com daimajia AndroidImageSlider wiki . And no errors are being thrown on the LogCat which is making this a lot harder to solve . Any ideas Comment : maybe you are getting an OutOfMemoryError . Have your turned on debugging for picasso or glide How big is the drawable Comment : i d try enabling displaying of layout rects in developer settings then go and make sure there actually is a black imageview because I m guessing the view is width and or height 0.. . Comment : I had the same problem when i was using exact same library then I changed my testing device and it was working fine on other devices . Previously I tested on Moto G which didn t work then I tested on Nexus 5 and Note 3 it worked fine . Don t know the reason though : just try another device . Comment : Is your background by default black I know that picasso prefers weak-references to images so perhaps this could be an issue . Comment : See related issue in Glide : github.com bumptech glide issues 738 https : github.com bumptech glide issues 738 there s a fix for a specific device but more can be added if there s enough info . .. . Answer : Create A Resource Folder Named drawable-nodpi in that folder put your images instead of different folders or drawable folder . Comment : That doesn t solve the problem . But it was a mistake to place the images in the drawable folder yeah . Thanks :", "Question : This is related to Glide image loading with application context http : stackoverflow.com questions 31964737 glide-image-loading-with-application-context 32887693 32887693 .. . .. . I have several Fragments hosted in an Activity with a Fragment being replaced by another as the user navigates through the app . I m passing a RequestManager into my MyFragment s RecyclerView adapter like so : .. . .. . My adapter : .. . .. . When I debug my app here s what I see in the object mGlide : .. . .. . Debug information in mGlide object http : i.stack.imgur.com bIhy6.png .. . .. . The context seems to be my project s ApplicationContext . Now I m not very familiar with Android contexts but is this right I assumed it will be something like com.MyFragment.... . .. . .. . Also is there a simple way to check if glide is following my fragments lifecycles .. . Answer : This question would ve been better suited for Glide s Google Group https : groups.google.com forum forum glidelibrary linked from the Readme https : github.com bumptech glide getting-help . .. . .. . Your usage looks clean and performant and that s the way I suggest to go with . The context seems to be my project s ApplicationContext . Glide is a singleton and hence it wouldn t make any sense to initialize it with the first Activity it sees see Glide.get . If you check how RequestManager actually uses that Context you ll see it is passed all around the place which again wouldn t be useful and would leak . It is mostly used for .getContentResolver and to acquire the Glide singleton via Glide.get context in those other classes . I assumed it will be something like com.MyFragment.. . .. . .. . What you re looking for can be found in the following fields of RequestManager : .. . .. . See all child classes implementations of those types . Also check the Context.mActivityLifecycleCallbacks I think those are the same objects . Is there a simple way to check if glide is following my fragments lifecycles You can put breakpoints in the above mentioned classes and or check if the resources are freed via a heap-dump this last one may be tricky because of caching . If you want more insight you can try enabling logging as said on the Wiki : Debugging and Error Handling wiki https : github.com bumptech glide wiki Debugging-and-Error-Handling and also write your own loggers for listener target like I did in glide-support ...utils https : github.com TWiStErRob glide-support tree master src glide3 java com bumptech glide supportapp utils ." ] }
[ "yes-answer-long", "yes-answer-short" ]
decoding
UNK_RELATION
background@web@113
background -- background typically refers to the rendering behind a container element s contents - usually on a @placeholder page windows form or other ui presentation medium .
{ "confidence": [ 40.801578521728516, 37.12968826293945, 31.639297485351562, 31.444721221923828, 31.336875915527344, 31.112003326416016, 30.792312622070312, 30.619617462158203, 30.53135871887207, 30.09302520751953, 28.95315933227539, 28.881999969482422, 28.79871940612793, 28.74883270263672, 28.488183975219727, 28.433916091918945, 28.4079647064209, 28.358978271484375, 28.240615844726562, 27.98273468017578, 27.98273468017578, 27.880586624145508, 27.56850814819336, 27.453828811645508, 27.440431594848633, 27.26093292236328, 27.22248077392578, 27.186180114746094, 27.169036865234375, 27.155481338500977, 27.155481338500977, 27.14776611328125, 27.080413818359375, 27.04376792907715, 27.02049446105957, 26.99181365966797, 26.974023818969727, 26.894882202148438, 26.88994598388672, 26.810222625732422, 26.779932022094727, 26.71373176574707, 26.6837215423584, 26.6837215423584, 26.643341064453125, 26.45543670654297, 26.42694091796875, 26.412282943725586, 26.412282943725586, 26.407371520996094, 26.40338134765625, 26.319652557373047, 26.319652557373047, 26.278011322021484, 26.26901626586914, 26.23065185546875, 26.2275390625, 26.206287384033203, 26.15713882446289, 26.145639419555664, 26.135547637939453, 26.12941551208496, 26.04056167602539, 26.04056167602539, 25.994342803955078, 25.89915657043457, 25.88294792175293, 25.862110137939453, 25.84940528869629, 25.841949462890625, 25.813426971435547, 25.7764949798584, 25.76015281677246, 25.758808135986328, 25.716405868530273, 25.711105346679688, 25.671966552734375, 25.651521682739258, 25.611509323120117, 25.602645874023438, 25.598876953125, 25.57006072998047, 25.534107208251953, 25.51704216003418, 25.493324279785156, 25.448806762695312, 25.448806762695312, 25.396808624267578, 25.37803840637207, 25.37643051147461, 25.3724308013916, 25.285297393798828, 25.285297393798828, 25.285297393798828, 25.283367156982422, 25.275854110717773, 25.27340316772461, 25.271900177001953, 25.200716018676758, 25.174436569213867 ], "content": [ "and i have also an other Background called apc-container behind this Background .", "I need the background-image to remain into its container so that I don t see the background-color behind the element .", "it is not a image as transparent background it is a image ON the transparent windows form .", "background-attachment : fixed seems to make the background-size : cover covering the whole page no matter which element the background is applied to .", "Secondary div .. . .. . Add another div element to the container to hold the background .", "You need to change the background-image property not the background property which refers to the background-color of the page .", "Add it body and give .ui-page a transparent background .", "The difference between background-attachment : scroll and background-attachment : fixed is that .. . .. . .. . scroll means that the background is fixed with regard to the element itself and does not scroll with its contents .", "CSS background properties are used to define the background effects of an element .", "The css property background refers to an html elements background-color .", "Yep loved not blocking my page rendering with the css and background .", "I need to have other content inside the container above the background .", "This works perfectly when I use no background for the parent container but the hover effect goes behind the parent container when a background-image is used .", "I don t know how to put the chart over the background or the background behind the entire page while both being visible .", "Now when background-repeat is uncommented element disappear .", "Change the background of the Container in your DataTemplate .", "Apply the background-image to another page element that is already in use but doesn t have a background-image .", "Create a container with a background-image and include the property above .", "That being said cached background processes usually refers to processes that do not have a foreground activity and do not have a running service .", "It will make the background cover the element completely .", "And second Cover is background-size for the element", "For sure you can connect background audio and your main UI that main UI downloads in background files and updates the playlist .", "Premising that those are two distinct properties in your specific example there s no difference in the result since background actually is a shortcut for .. . .. . background-color .. . background-image .. . background-position .. . background-repeat .. . background-attachment .. . background-clip .. . background-origin .. . background-size .. . .. . Thus besides the background-color using the background shortcut you could also add one or more values without repeating any other background- property more than once .", "I d like to crop background-image and then to use cropped image as background for a bigger in size element .", "It could be done with a dummy element that effectively combines the images as its background then using the now mostly unsupported element dummy function as the background with a repeat .", ".. . CSS properties used for background effects : .. . .. . background-color .. . background-image .. . background-repeat .. . background-attachment .. . background-position .. . .. . Background property includes all of this properties and you can just write them in one line .", "You want the after background-color to be behind the default h3 background-color", "If background-size : 100 100 isn t working then perhaps your div or container element is not as large as you think it is .", "Background images are by default fixed to the element they are attached to .", "What s the difference between specifying a background-color using background and background-color", "background will supercede all previous background-color background-image etc .", "A background-thread isn t the same that executing code while the app is in background a background-thread is used to don t block the UI while you execute a long task .", "a why put the code to access the UI in a background worker", "Preferably in background sprite form-for optimization .", "About CSS performance : .. . .. . Background vs background-color : .. . .. . Comparison of 18 color swatches rendered 100 times on a page as small rectangles once with background and once with background-color .", "So I have an image and I want it to be as a background-image ONLY on the top of the page in the body element .", "I need to process the contents of the clipboard in the background application .", "With background you can set all background properties like : .. . .. . background-color .. . background-image .. . .. . background-repeat .. . .. . background-position .. . etc . .. . .. . .. . .. . With background-color you can just specify the color of the background .. . .. . VS . .. . .. . .. . .. . More info http : www.w3schools.com css css background.asp .. . .. . See Caption : Background - Shorthand property", "I am using CSS3 background-position to position a background-image 3 from the right edge of the container .", "The fixed in .. . background : blue url http : i.imgur.com BsTVroc.jpg fixed center top .. . Is the shorthand for background-attachment : fixed .. . That is why the background-image is fixed to the top the page .", "As soon as you change the background-image of the element the previous background-image disappears .", "I ended up just rendering the background on a polygon behind everything else. . thanks for the tip", "Give your child the same background as the container .. . 4 .", "Change to background of the container to the target color .. . 5 .", "Other than that src is a foreground image and background is a background-image .", "In windows-10 Background Agent has been replaced with Background Task https : msdn.microsoft.com en-us windows uwp launch-resume guidelines-for-background-tasks .", "Are you using an background-position property for your background or an image tag behind everything", "NEVER update UI from a background-thread", "It runs on a background-thread and is not affected by UI lifecycles .", "No this is not possible SVG elements do not have background-.. . presentation attributes https : developer.mozilla.org en-US docs SVG Attribute Presentation .", "Example : http : jsfiddle.net v14m59pq 2 .. . .. . Multiple Backgrounds with background-size : .. . .. . You can apply a background-color to the html element and then apply a background-image to the body element and use the background-size property to set it to 50 of the page width .", "First and second values are background positions for element .", "background-blend-mode applies to backgrounds in the same element .", "My problem is that the before Element is also behind the acp-container .", "The reason that transform runs smoothly while background-position does not is that transform can utilize the phone s hardware-acceleration while background-position must rely on the browser software s re-rendering of the element .", "I have a background-image which changes size to the windows size and I need to position an element on it so that it is always in the same place relative to the background-image .", "If you look at the blog I am trying to make it so that the only background for the header is the page background NOT the white post background .", "As for background processes on Windows Phone you can achieve that by using Background Agents .", "I want to change TextView s background-color .", "When scaling there is sometimes a 1pixel difference but this doesn t matter as the background will get assigned to some container element which acts as mask .", "All I wanted to do is to have the windows form transparent so I could use a background-image that would act as-if it was my windows form .", "Typically you would go for a sprite here a combined background-image and just shift the background-position .", "Use the background properties of your body or of some helper container and make use of the background-size property and the required prefixes .", "When you assign background-size : cover to a background-attachment : fixed item its container will be the actual view port the item is sitting in .", "Even if an element has a scrolling mechanism a fixed background doesn t move with the element .", "If you don t WPF will merge the default windows background-color with your windows background .", "Set the fallback image as the background-image of the container .", "The background div has to use background-size : cover because it s an elastic page .", "But then the problem arises that I can t really position the background in regards to the container div as fixed positions an background-image in regard to the viewport .", "Are you sure the background of the image is really white in the UI and that it s not just that the image is on top of a white background", "If I give the root element of the activity a background-color that isn t completely transparent then the edge glow is visible over the background too but I want the background to be transparent .", "We can replace a background of an element by an inner absolutely positioned element with the same background .", "background-color background-image background-position and you can access them either through the simpler background selector or the more specific one .", "If you want a background-color behind it then set the background-color on its parent control which in your case is the Grid that contains it .", "SitePoint notes the following http : www.sitepoint.com web-foundations background-position-css-property regarding the behavior of the CSS background-position property : .. . .. . Note that when the background-position is defined with a percentage value that position refers to both the element itself and the corresponding point on the background-image .", "Background Services Windows Run-time Application .. . .. . MainProject references both Common and Background Services and Background Services references Common .", "Reading up on background-agents in Windows Phone .", "Poster wanted an opaque background not an opaque element .", "It is about accessing UI elements from a background-thread .", "It is also worth noting that on Firefox and possibly other browsers that the default behaviour of background-attachment is NOT retained I found that even with adding important that when a later element was setting a basic simple background-color : that this was unsetting all other background properties including background-attachment .", "Presentation .. . .. . Disclaimer : the support is Chrome 25+ Firefox 13+ IE9+ Safari 7+ .. . .. . In your case .. . .. . So you can position your background to bottom minus 100px : .. . .. . Example : .. . .. . .. . .container .. . height : 190px .. . padding : 1em .. . margin : 0 auto 1em .. . border : 1px solid 333 .. . text-align : center .. . .. . background-image : url http : lorempixel.com 200 140 city 4 .. . background-repeat : no-repeat .. . background-position : center bottom .. . .. . .plus .. . background-position : center bottom 20px .. . .. . .minus .. . background-position : center bottom -20px .. . .. . .. . .. . div class container .. . background-position : br .. . center bottom .. . div .. . div class container plus .. . background-position : br .. . center bottom 20px .. . div .. . div class container minus .. . background-position : br .. . center bottom -20px .. . div .. . .. . See the MDN documentation https : developer.mozilla.org en-US docs Web CSS background-position", "I have a button on my page with this XAML : .. . .. . But when I put mouse over my button button s background changes to default windows gray background .", "Also for SEO http : en.wikipedia.org wiki Search engine optimization I would put the background-image at the bottom of the page but if the background-image takes too long to load that is with a white background initially you could move to the top of the page .", "If the height and width of the element are the same as the picture setting background-size to background-size : 100 100 However if they are different your image will have the wrong aspect-ratio .", "I typically just use an alpha png background-image in such cases but today i m wondering if there s a better way to make a background of a div semi-transparent without affecting the contents .", "You can only have block colours background-color behind text .", "I m trying to make a character moving with an image behind it as the background .", "Do you mean that the background-image will be drawn on some other window that is placed behind your window", "You can t paint the JFrame s background Color but you can do this for the JFrame s contentPane usually a JPanel .", "bodyContent .. . background-image : url images Letter.png .. . background-repeat : no-repeat .. . .. . .. . gives good result : sharp image on printed page .", "You explicitly skew .navbar .container in your example and then unskew the background.. . do you want to unskew the background and the content", "This applies whether the intrinsic dimensions of the background-image match the dimensions of the element or you explicitly set background-size : 100 .", "Your background is contained inside a DOM element so when you move a div you moved the background contained in it .", "This means that the two colors are purely that just background colors of ONE ELEMENT not the background-color of two .", "I have added background music to the menu page .", "While using background-attachment : fixed I am finding issues with how Chrome is rendering the background-image on retina screens only .", "The background disappears when the background-repeat : no-repeat setting is added because of the position that is assigned to the background .", "To make it scroll along the element you can use background-attachment : local instead but looks like we can t cover it over the element with background-size : cover .", "If the intensities of foreground and background are additive which is what I usually work with then background is subtracted from the entire image .", "In all other cases you should set the background to the default background-color ." ] }
{ "confidence": [ 38.865638732910156, 38.23402786254883, 36.57504653930664, 35.65522003173828, 34.71392822265625, 34.44438552856445, 34.369510650634766, 33.4625244140625, 33.412841796875, 33.41059112548828, 33.014556884765625, 32.97016143798828, 32.95325469970703, 32.915313720703125, 32.877105712890625, 32.772220611572266, 32.701515197753906, 32.69593048095703, 32.53081130981445, 32.427486419677734 ], "content": [ "Question : null .. . Answer : I m trying to parallax horizontally a background-image using Parallaxify plugin with this inline attribute .. . .. . and this is my js call .. . .. . When I move the mouse around the background-image starts from a background-position of 35px and it looks really bad . I need the background-image to remain into its container so that I don t see the background-color behind the element . Ideally the background-image should move a certain amount starting from 50 horizontally . It should start with : .. . .. . And then when moving the mouse for example to the right it should move to : .. . .. . And when moving to the left : .. . .. . Without exceeding its container boundaries . An example of the issue would be on this page http : dev.thinktravellive.com en thoughts", "Question : Hey i want to fade in a new background-image let s say every 60 seconds . I ve set the background-image like this : .. . .. . Now i want to change it so after 60seconds it changes to background2.jpg then after 60 seconds to background3.jpg and so on. . .. . .. . I ve found a lot of stuff without changing it in the body but just as an image.. . any quick solutions Thank you Comment : Did you try using a JS slider for this This is doable using css3 transform and transition delays but it wont be as reliable as a jquery-slider Basically you can have a jquery-slider with the images inside position it fixed on the body tag then add z-index : -1 on the slider container and it should stay behind the page content You can set the height and width of the slider container by using jquery windowHeight and windowWidth . .. . Answer : https : github.com srobbin jquery-backstretch Backstretch is a simple jQuery plugin that allows you to add a dynamically-resized slideshow-capable background-image to any page or element . The image will stretch to fit the page element and will automatically resize as the window element size changes .", "Question : I use mutiple Background . I use a before Element in the back of an multibackground with Css3 code and a background-image . and i have also an other Background called apc-container behind this Background . My problem is that the before Element is also behind the acp-container . in the pseudo-element before i use the z-index . i try to use this also in the acp-container but it does not work . So how i bring the before pseudo Element in front of the apc-container and in the back of the subfilter a BG you can check it out with this code and you see the problem easy . streams-container .. . acp-container .. . border-radius : 10px .. . background-color : f8f8f8 .. . min-height : 500px .. . .. . .subfilter .. . margin-top : 160px .. . .. . .subfilter a .. . margin-right : 130px .. . margin-left : 130px .. . width : 145px .. . height : 145px .. . display : inline-block .. . position : relative .. . line-height : 145px .. . background-size : auto auto auto auto .. . background-color : eaeaea .. . background-image : url images Eye.png -webkit-gradient linear left top left bottom from f6f6f6 to eaeaea .. . background-image : url images Eye.png -webkit-linear-gradient top f6f6f6 eaeaea .. . background-image : url images Eye.png -moz-linear-gradient top f6f6f6 eaeaea .. . background-image : url images Eye.png -ms-linear-gradient top f6f6f6 eaeaea .. . background-image : url images Eye.png -o-linear-gradient top f6f6f6 eaeaea .. . background-image : url images Eye.png linear-gradient top f6f6f6 eaeaea .. . -moz-border-radius : 5px .. . -webkit-border-radius : 5px .. . border-radius : 5px .. . -moz-box-shadow : 0 1px 1px rgba 0 0 0 .25 0 2px 3px rgba 0 0 0 .1 .. . -webkit-box-shadow : 0 1px 1px rgba 0 0 0 .25 0 2px 3px rgba 0 0 0 .1 .. . box-shadow : 0 1px 1px rgba 0 0 0 .25 0 2px 3px rgba 0 0 0 .1 .. . .. . .subfilter a.finiwatch .. . background-position : 0px -172px 0 0 .. . .. . .subfilter a : active .. . top : 1px .. . .. . .subfilter a : : before .. . content : .. . position : absolute .. . z-index : -1 .. . top : -8px .. . right : -8px .. . bottom : -8px .. . left : -8px .. . background-color : eaeaea .. . -moz-border-radius : 5px .. . -webkit-border-radius : 5px .. . border-radius : 5px .. . opacity : 0.5 .. . .. . .subfilter a : active : : before .. . top : -9px .. . .. . .subfilter a : hover : : before .. . opacity : 1 .. . .. . .subfilter a.finiwatch : hover : : before .. . background-color : B3F390 .. . .. . .subfilter a : hover .. . top : 0px 1px .. . .. . .subfilter a.finiwatch : hover .. . background-position : -160px -158px 0 0 .. . .. . .subfilter a : active .. . background : url images Eye.png -moz-linear-gradient top eaeaea f6f6f6 .. . background-image : url images Eye.png -webkit-gradient linear left top left bottom from eaeaea to f6f6f6 .. . background-image : url images Eye.png -webkit-linear-gradient top eaeaea f6f6f6 .. . background-image : url images Eye.png -moz-linear-gradient top eaeaea f6f6f6 .. . background-image : url images Eye.png -ms-linear-gradient top eaeaea f6f6f6 .. . background-image : url images Eye.png -o-linear-gradient top eaeaea f6f6f6 .. . background-image : url images Eye.png linear-gradient top eaeaea f6f6f6 .. . .. . .subfilter a.finiwatch : active .. . background-position : -318px -158px 0 0 .. . .. . .subfilter a.finiwatch : selected .. . background-position : -318px -158px 0 0 .. . .. . .. . .. . div id streams-container .. . div class subfilter .. . a class finiwatch href a .. . div .. . Answer : Found a way .. . .. . give apc-container a relative position and a z-index of 1 and teh before element a z-index of -10 .", "Question : I need to position my background at the bottom of the screen . But on mobile device resolution I want to display it 100px lower than that like bottom minus 100px . Is it possible to achieve such a thing in CSS Comment : Are you using an background-position property for your background or an image tag behind everything Need to see your code . Comment : You should add your HTML Markup with other CSS dependencies it s more guessing than answering without it . .. . Answer : Yes with the four-value syntax of the background-position property . Presentation .. . .. . Disclaimer : the support is Chrome 25+ Firefox 13+ IE9+ Safari 7+ .. . .. . In your case .. . .. . So you can position your background to bottom minus 100px : .. . .. . Example : .. . .. . .. . .container .. . height : 190px .. . padding : 1em .. . margin : 0 auto 1em .. . border : 1px solid 333 .. . text-align : center .. . .. . background-image : url http : lorempixel.com 200 140 city 4 .. . background-repeat : no-repeat .. . background-position : center bottom .. . .. . .plus .. . background-position : center bottom 20px .. . .. . .minus .. . background-position : center bottom -20px .. . .. . .. . .. . div class container .. . background-position : br .. . center bottom .. . div .. . div class container plus .. . background-position : br .. . center bottom 20px .. . div .. . div class container minus .. . background-position : br .. . center bottom -20px .. . div .. . .. . See the MDN documentation https : developer.mozilla.org en-US docs Web CSS background-position Comment : You must be meaning : background-position : center bottom -100px codepen.io anon pen LGyLGN http : codepen.io anon pen LGyLGN Comment : It depends in which way way you want to move background . Comment : well he was asking for bottom minus 100px .. . Comment : You re right . So I changed . Thanks . I found it confusing We generally refer the position from the top of the screen . He could have mean 100vh - 100px", "Question : This question already has an answer here : .. . .. . SVG : draw text with solid background-color questions 31010029 svg-draw-text-with-solid-background-color 1 answer .. . .. . I want to color the background of svg text similar to background-color in css .. . .. . I was only able to find documentation on fill which colors the text itself .. . .. . Is it even possible Comment : Can you share your code so far Comment : These also might help stackoverflow.com questions 6725288 svg-text-inside-rect http : stackoverflow.com questions 6725288 svg-text-inside-rect and stackoverflow.com questions 8675223 http : stackoverflow.com questions 8675223 background-color-of-tspan-element Comment : stackoverflow.com questions 12260370 http : stackoverflow.com questions 12260370 draw-text-in-svg-but-remove-background 12263962 12263962 also shows how to do this using filters . .. . Answer : No this is not possible SVG elements do not have background-.. . presentation attributes https : developer.mozilla.org en-US docs SVG Attribute Presentation . To simulate this effect you could draw a rectangle behind the text attribute with fill green or something similar filters . Using JavaScript you could do the following : Comment : That or use an svg filter feFlood + feComposite on the text . See slightly similar question stackoverflow.com questions 12260370 http : stackoverflow.com questions 12260370 draw-text-in-svg-but-remove-background .", "Question : I m trying to get a background-image of a HTML element body div etc . to stretch its entire width and height . Not having much luck . Is it even possible or do I have to do it some other way besides it being a background-image My current css is : .. . .. . Thanks in advance . Edit : I m not keen on maintaining the CSS in Gabriel s suggestion so I m changing the layout of the page instead . But that seems like the best answer so I m marking it as such . Comment : Of course you could use JavaScript to do this dynamically but that would be probably worse than the CSS hacks suggested by gabriel1836 s link . Comment : To preserve the aspect-ratio of the image you should use background-size : cover or background-size : contain . I ve built a polyfill that implements those values in IE8 : github.com louisremi background-size-polyfill http : github.com louisremi background-size-polyfill .. . Answer : You cannot in pure CSS . Having an image covering the whole page behind all other components is probably your best bet looks like that s the solution given above . Anyway chances are it will look awful anyway . I would try either an image big enough to cover most screen resolutions say up to 1600x1200 above it is scarcer to limit the width of the page or just to use an image that tile .", "Question : I am trying to create a page using JQuery mobile I used Themeroller to make it look as I want . The background I used is a gradient but it doesn t go fullscreen unless there s enough content on the page to fill the whole screen . See image below : .. . .. . enter image description here http : i.stack.imgur.com lBoXV.png .. . .. . See how the gradient doesn t go to the bottom of the page That s what I ve been stuck on.. . I use the CSS files generated by Themeroller . I tried editing it but it s massive and I have got no clue where and what to change . .. . Answer : It looks like the background is being applied to the .ui-content element which is not 100 of its container s height . You could either : .. . .. . 1 . make the .ui-content element 100 height or .. . .. . 2 . you can set the gradient on the .ui-page element rather than the .ui-content element s . I would set the gradient as the .ui-page background like so : .. . .. . Those rules should be specific enough to override the jQuery Mobile stylesheet . Here is a demo : http : jsfiddle.net YeTdT .. . .. . If you need help creating a cross-browser css gradient see ColorZilla : http : www.colorzilla.com gradient-editor", "Question : I am a little confused with background tasks . I ve finished making one with the help of this tutorial https : msdn.microsoft.com en-us windows uwp launch-resume guidelines-for-background-tasks . The tutorial says this : .. . .. . Create a background task class and register it to run when your app is not in the foreground .. . .. . However my background task runs even if it is in the foreground . Is this intended behavior that it runs whether or not the app is in the foreground Is the presentation just not clear .. . Answer : a background-thread is drawn from the thread pool and it meant to run in the background . your UI thread is the main thread likely it is run on the foreground .", "Question : I d like to be able to click hold my mouse inside a div and move it s background . Searched a lot on google and didn t found what I wanted . Here s the target the map displayed is the object to drag : http : pontografico.net pvt gamemap .. . .. . Any tips Cheers Comment : Just sketching something out I would onmousedown set a onmousemove handler to detect and register movement and reset the div s background-image-position settings and then unbind the mousemove onmouseup . Seems reasonable Comment : That s what I m doing since I wrote the question : Comment : If you get something working post it as an answer . I d be interested to see a jsfiddle.net http : jsfiddle.net working demo . : Comment : It s done you can check the question link . I have one problem now though how to convert mouse axys to a reasonable mousemove simulation Probably calculate the position of the map container and subtract the values Comment : Register the position before you set the mousemove and use that as your origin . I think too it s possible to mark the position relevant to the element but I d have to look into that . .. . Answer : From the ui draggable demo : .. . .. . Dragging DOM elements are simple no need to reinvent the wheel . http : jqueryui.com demos draggable .. . .. . EDIT : Draggable background inside a div is also possible . See fiddle here : http : jsfiddle.net FyFZA Comment : That s for objects not css backgrounds . Comment : @yoda those are for all DOM elements may it be div p span or whatever . Your background is contained inside a DOM element so when you move a div you moved the background contained in it . Comment : You re not following what Yoda is doing he s manipulating a property of the element background-image not the element itself . Comment : Despite not answering it this post made me realize that probably I need to set a inner container inside gamemap z-index it and make it the navigation controller . . how does it sound Comment : @yoda is this what you wanted to achieve see fiddle : jsfiddle.net FyFZA http : jsfiddle.net FyFZA", "Question : Hey i want to fade in a new background-image let s say every 60 seconds . I ve set the background-image like this : .. . .. . Now i want to change it so after 60seconds it changes to background2.jpg then after 60 seconds to background3.jpg and so on. . .. . .. . I ve found a lot of stuff without changing it in the body but just as an image.. . any quick solutions Thank you Comment : Did you try using a JS slider for this This is doable using css3 transform and transition delays but it wont be as reliable as a jquery-slider Basically you can have a jquery-slider with the images inside position it fixed on the body tag then add z-index : -1 on the slider container and it should stay behind the page content You can set the height and width of the slider container by using jquery windowHeight and windowWidth . .. . Answer :", "Question : Why is background-size : cover different if background-attachment : scroll or background-attachment : fixed used Example : .. . .. . http : jsfiddle.net enriqg9 Yn43U Comment : background-attachment : fixed seems to make the background-size : cover covering the whole page no matter which element the background is applied to . The element just becomes a small window helping us see a part of the large background-image . In fact the background-attachment : scroll makes the bg image scroll along the scrolling thumb of the page not of the element it s in fact fixed to the element . To make it scroll along the element you can use background-attachment : local instead but looks like we can t cover it over the element with background-size : cover . .. . Answer : When you assign background-size : cover to a background-attachment : fixed item its container will be the actual view port the item is sitting in . In your case the cat image is stretched to fit the total width of the fiddle result box . The reason why it is this way might be because since it applies position absolutely to the viewport it also gathers the size required from the viewport .", "Question : I m trying to play around with colors in WPF and the form s background-color . Without doing ANYTHING ELSE no code-behind deriving from another class etc I create a brand new default Windows Form . I change the background to some light blue color . Save the form . Run the program and open that form. . The form shows up in some other much darker color like it s not even respecting the XAML of .. . .. . Additionally if I try to take this same background value of 4800A8A6 and try to create a brush and do a BrushConverter.ConvertFrom 4800A8A6 and run the form I STILL get the incorrect color as displayed via the designer.. . what gives.. . Comment : change the tilt of your monitor : P Comment : @the ajp.. . cute.. . or as my wife might say.. . are your glasses clean But they are only for reading things within 10 and my monitor is 2+ ft away.. . : .. . Answer : That s probably because of the alpha component in your color . If you are trying to make your windows transparent you have to use AllowsTransparency True . If you don t WPF will merge the default windows background-color with your windows background .", "Question : I wanted to make my windows form transparent so removed the borders controls and everything leaving only the forms box then I tried to the BackColor and TransparencyKey to transparent but it didnt work out as BackColor would not accept transparent color . After searching around I found this at msdn : .. . .. . Unhappyly it did not work either . I still get the grey or any other selected color background . All I wanted to do is to have the windows form transparent so I could use a background-image that would act as-if it was my windows form . I searched around here and saw many topics in regards opacity which is not what I am looking for and also saw some in regards this method I was trying but have not found an answer yet . Hope anyone can light my path . UPDATE : .. . .. . image removed as problem is solved Comment : Can you please clarify a little what you want to do I didn t understand what you are trying to achieve with the background-image . Comment : I want to make my own custom application window in a simple way so instead of using the winforms default window I am trying to make it transparent to use my background-image instead . Comment : Do you mean that the background-image will be drawn on some other window that is placed behind your window I don t understand why you can t just override OnPaint and draw the background-image there.. . Comment : @Ran I have updated with an example the green part is remaints of the windows form which i want to make completely transparent . Comment : I see . So 2 more questions.. . : Did you set the image file as the Form s BackgroundImage property What is the image s format .. . Answer : A simple solution to get a transparent background in a windows form is to overwrite the OnPaintBackground method like this : .. . .. . Notice that the base.OnpaintBackground e is removed from the function Comment : I noticed that the accepted answer flashed the default background-color sometimes before the transparency kicked in . This seems to work reliably for my purposes . Thanks Comment : This works well . I d like this on Control like TabControl .", "Question : Is there a CSS way to stop a repeating background-image at a specific position HTML : .. . .. . CSS : .. . .. . I want to repeat the image horizontally and vertically at position 0 and stop repeating when the repeating image is reaching vertical height : 400px like a max-height but only for the background and without shrinking the .container DIV . I know how this can be done with gradient backgrounds but is there also a solution for repeating image backgrounds when the .container DIV is even higher than 400px Example CSS Gradient : .. . .. . .. . .. . .. . Now I want to do the same with an image and stop it at 400px . Comment : Please provide a not working sample : D -- My sample works : jsfiddle.net JYxB6 http : jsfiddle.net JYxB6 Comment : I have created a fiddle.Is this what you want : - jsfiddle.net jpLUR 1 http : jsfiddle.net jpLUR 1 Comment : The DIV has a height : 100 but I want only the background-image stop repeating at height 400px . .. . Answer : Although I don t know if what you re asking for is possible I have a solution that may work for what you need . What you can do is create a div outside of your container div that will serve as your 400px high repeated background . HTML : .. . .. . CSS : .. . .. . Here is a preview of the the code does : .. . .. . http : jsfiddle.net Ember Hawk WP5Zu 1 .. . .. . Essentially you create a div that appears behind all other elements and does not affect their positioning . If you need the background to start where the container div starts with respect to its position on the y-axis you just change the top attribute of the tile-background class . If you have an element with dynamically changing height that lies above your container then this really wouldn t work without some help . Hope I helped Good luck", "Question : I wanted to make my windows form transparent so removed the borders controls and everything leaving only the forms box then I tried to the BackColor and TransparencyKey to transparent but it didnt work out as BackColor would not accept transparent color . After searching around I found this at msdn : .. . .. . Unhappyly it did not work either . I still get the grey or any other selected color background . All I wanted to do is to have the windows form transparent so I could use a background-image that would act as-if it was my windows form . I searched around here and saw many topics in regards opacity which is not what I am looking for and also saw some in regards this method I was trying but have not found an answer yet . Hope anyone can light my path . UPDATE : .. . .. . image removed as problem is solved Comment : Can you please clarify a little what you want to do I didn t understand what you are trying to achieve with the background-image . Comment : I want to make my own custom application window in a simple way so instead of using the winforms default window I am trying to make it transparent to use my background-image instead . Comment : Do you mean that the background-image will be drawn on some other window that is placed behind your window I don t understand why you can t just override OnPaint and draw the background-image there.. . Comment : @Ran I have updated with an example the green part is remaints of the windows form which i want to make completely transparent . Comment : I see . So 2 more questions.. . : Did you set the image file as the Form s BackgroundImage property What is the image s format .. . Answer : I ve tried the solutions above and also many other solutions from other posts . In my case I did it with the following setup : .. . .. . As you can see this is a mix of previously given answers . Comment : Using this I had problems with the background becoming completely white if I updated the text of a label on the form i.e . it loses it s transparency .", "Question : I m wondering if there is any way in CSS to fit a background-image s parent div to the image-size For some reason when I use : .. . .. . background-size : cover .. . .. . My image becomes blurry because it is being scaled somehow.. . Comment : I would be tempted to do it in javascript . You could resize the div on the page load . Comment : You mean like background-size : contain There is no CSS way to set an element to the size of it s background image...none at all . .. . Answer : Funny . I started writing an article about a related idea the other day . You can do it fairly easily but it s counter-intuitive . I just threw together a codepen demo http : codepen.io denmch pen mVgXKW . Here s the relevant CSS : .. . .. . You can tweak that as you need to . I set it up for absolutely centered content . Padding and margins need a common reference to maintain consistency and that reference is the width of the parent element . First there s the viewport then the body and so on . Each element refers to its parent s width to determine its own margins and padding . You can use this to your advantage if you know the aspect-ratio of your background-image by doing a little math or you could use calc if you want to and don t need to support Opera Mini . Divide the height by the width of the image . In my example the image s height is 56.75 of the width . We can then take that number and apply it either to padding-top or padding-bottom and as the parent scales the padding in the child will scale with it maintaining the aspect-ratio . If you want to put things in that div you either have to do some annoying math subtracting the height of the children from the padding -- blech or you can instead absolutely position a child div to hold the contents . At this point there s a lot of playing around and customization depending on your needs and goals . One caveat is that the content can easily overflow so you want to plan well and possibly set a min-height to mitigate that .", "Question : I wanted to make my windows form transparent so removed the borders controls and everything leaving only the forms box then I tried to the BackColor and TransparencyKey to transparent but it didnt work out as BackColor would not accept transparent color . After searching around I found this at msdn : .. . .. . Unhappyly it did not work either . I still get the grey or any other selected color background . All I wanted to do is to have the windows form transparent so I could use a background-image that would act as-if it was my windows form . I searched around here and saw many topics in regards opacity which is not what I am looking for and also saw some in regards this method I was trying but have not found an answer yet . Hope anyone can light my path . UPDATE : .. . .. . image removed as problem is solved Comment : Can you please clarify a little what you want to do I didn t understand what you are trying to achieve with the background-image . Comment : I want to make my own custom application window in a simple way so instead of using the winforms default window I am trying to make it transparent to use my background-image instead . Comment : Do you mean that the background-image will be drawn on some other window that is placed behind your window I don t understand why you can t just override OnPaint and draw the background-image there.. . Comment : @Ran I have updated with an example the green part is remaints of the windows form which i want to make completely transparent . Comment : I see . So 2 more questions.. . : Did you set the image file as the Form s BackgroundImage property What is the image s format .. . Answer : My solution was extremely close to Joel s Not Etherton just plain Joel : Comment : This did not work for me . Other controls which I had on the form became semi-transparent also rather than just the background .", "Question : I have a background-image which changes size to the windows size and I need to position an element on it so that it is always in the same place relative to the background-image . HOW CSS .. . .. . The background-image covers the entire background and changes size with the window but keeps proportions by having some overlay . Comment : have you tried positioning it with javascript jquery Comment : If I am reading this right why not absoute position the element relative to body If the bg img takes up the entire viewport then absolute positioning relative to the body should do the trick . Comment : On which element is your bg image attached to body some container div Can you post some of the HTML that you are working with Comment : growingwiththeweb.com 2013 04 http : www.growingwiththeweb.com 2013 04 aligning-and-element-with-background.html .. . Answer : Add a centering container : .. . .. . And then add position : relative elements inside .", "Question : I wanted to make my windows form transparent so removed the borders controls and everything leaving only the forms box then I tried to the BackColor and TransparencyKey to transparent but it didnt work out as BackColor would not accept transparent color . After searching around I found this at msdn : .. . .. . Unhappyly it did not work either . I still get the grey or any other selected color background . All I wanted to do is to have the windows form transparent so I could use a background-image that would act as-if it was my windows form . I searched around here and saw many topics in regards opacity which is not what I am looking for and also saw some in regards this method I was trying but have not found an answer yet . Hope anyone can light my path . UPDATE : .. . .. . image removed as problem is solved Comment : Can you please clarify a little what you want to do I didn t understand what you are trying to achieve with the background-image . Comment : I want to make my own custom application window in a simple way so instead of using the winforms default window I am trying to make it transparent to use my background-image instead . Comment : Do you mean that the background-image will be drawn on some other window that is placed behind your window I don t understand why you can t just override OnPaint and draw the background-image there.. . Comment : @Ran I have updated with an example the green part is remaints of the windows form which i want to make completely transparent . Comment : I see . So 2 more questions.. . : Did you set the image file as the Form s BackgroundImage property What is the image s format .. . Answer : Here was my solution : .. . .. . In the constructors add these two lines : .. . .. . In your form add this method : .. . .. . Be warned not only is this form fully transparent inside the frame but you can also click through it . However it might be cool to draw an image onto it and make the form able to be dragged everywhere to create a custom shaped form .", "Question : I wanted to make my windows form transparent so removed the borders controls and everything leaving only the forms box then I tried to the BackColor and TransparencyKey to transparent but it didnt work out as BackColor would not accept transparent color . After searching around I found this at msdn : .. . .. . Unhappyly it did not work either . I still get the grey or any other selected color background . All I wanted to do is to have the windows form transparent so I could use a background-image that would act as-if it was my windows form . I searched around here and saw many topics in regards opacity which is not what I am looking for and also saw some in regards this method I was trying but have not found an answer yet . Hope anyone can light my path . UPDATE : .. . .. . image removed as problem is solved Comment : Can you please clarify a little what you want to do I didn t understand what you are trying to achieve with the background-image . Comment : I want to make my own custom application window in a simple way so instead of using the winforms default window I am trying to make it transparent to use my background-image instead . Comment : Do you mean that the background-image will be drawn on some other window that is placed behind your window I don t understand why you can t just override OnPaint and draw the background-image there.. . Comment : @Ran I have updated with an example the green part is remaints of the windows form which i want to make completely transparent . Comment : I see . So 2 more questions.. . : Did you set the image file as the Form s BackgroundImage property What is the image s format .. . Answer : I had drawn a splash-screen 32bpp BGRA with transparent background-color in VS2013 and put a pictureBox in a form-for display . For me a combination of above answers worked : .. . .. . So make sure you use the same BackColor everywhere and set that color as the TransparencyKey ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
kiss-mvc@web-applications@113
kiss-mvc -- kissmvc is a simple and minimalist php model-view-controller mvc framework for rapid development of @placeholder .
{ "confidence": [ 41.604766845703125, 37.69597625732422, 36.338775634765625, 29.951580047607422, 26.1029052734375, 24.373937606811523, 23.063386917114258, 22.972360610961914, 22.389001846313477, 22.389001846313477, 21.995519638061523, 21.82671356201172, 21.82671356201172, 20.868398666381836, 20.868398666381836, 20.281888961791992, 20.281888961791992, 20.281888961791992, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 18.148096084594727, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547, 16.314647674560547 ], "content": [ "I am using KISSMVC framework for this project if that matters .", "I am unaware of the KISSMVC .", "I have a KISSMVC php based site with the following .htaccess to allow only authenticated users to see the site .. . .. . This works with no problem .", "Yet another thing : KISSMVC uses views so you should not use echo in your function .", "I am thinking of KISS MVC framework cause it declares to be easy for framework beginers .", "That echo calls up a bar at the top that can display a confirmation msg within a view should I have some where-in the view store the confirmation call and then use that in my controller", "All that can be done in php MySQL .", "That pattern is known as front-controller - it gets all requests and routes them internally not based on file loaded .", "I have no experience with frameworks and I am concerned about all this I can t wait for the day I will feel like home with using a framework .", "The best way to know what does and doesn t work with a framework is to try and get familiar with a popular one such as Zend Kohana Yii etc .", "I am considering to use a php framework never used one before I know I have to abandon the way I am used to work I can deal with this among many concerns a first thing that comes in my mind is this : .. . .. . I have two techniques I like to use have used them for years . . .. . .. . 1 .", "But I am aware of how PHP and browser-server interactions happen .", "This is my first experience with PHP so any knowledge is useful .", "You should remove the echo before the redirect http : stackoverflow.com questions 8028957 headers-already-sent-by-php .", "Just remember that after a redirect to use die or exit to prevent the PHP page carrying on execution after the redirect .", "Having said that you should read about SQL injection http : stackoverflow.com questions 60174 best-way-to-stop-sql-injection-in-php .", "Yes I am not in the stage of learning PHP to deal with SQL injections I will be tackling those issues after I get this basic functionality down .", "Without Output Buffering .. . .. . You must NOT print anything to the browser including whitespace otherwise the headers have already been sent and can no longer be modified by PHP .", "I always use index.php somePage.php as href so never loads another page other that index.php then index.php includes the somePage.php .. . .. . 2 .", "I always used to store all texts any text titles button names link names stories articles anything in a single or more files or in GLOBALS array depending on size .", "I want to ask is this aproach wrong is there any better way", "Second from what I have read freamworks have some rules does my approach create some conflict", "Thank you all in advance", "Hello Old School", "1 .", "That pattern is fine it should look like index.php whatever to which you can then patch over with .htaccess to make whatever Examine SERVER REQUEST URI .", "2 .", "Database is a good place to store large amounts of text .", "Files you create rarely are - they offer none of the advantages of using a database .", "GLOBALS rarely is a good place to store data .", "You generally should keep as little as possible available globally .", "You can make a registry class to store global stuff if you need .", "The problem is that I want to allow clients to retrieve a value from the site with no authentication .", "This value is obtained through the index.php function because it is calculated per client plus there is no folder structure where these values are stored .", "as an example this URL should not prompt : .. . .. . but this one should still be prompting : .. . .. . If I could somehow specify in the .htaccess file to bypass or satisfy the authentication when the requested URL contains index.php inventory hash that would be perfect .", "I have looked at some of the other posts made on similar topics but I cannot follow what they are instructing .", "Basically my problem is this I want to redirect to the main log in page of my website after a successful password reset has happened .", "Here is what I have so far : .. . .. . This is all within a function the commented out part is where I want to redirect to my webpage .", "So to wrap it up can I force the function to redirect to the start page after a function finishes .", "Please stop writing new code with the ancient mysql functions .", "They are no longer maintained and community has begun the deprecation process http : news.php.net php.internals 53799 .", "Instead you should learn about prepared statements and use either PDO http : php.net pdo or MySQLi http : php.net mysqli .", "If you care to learn here is a quite good PDO-related tutorial http : wiki.hashphp.org PDO Tutorial for MySQL Developers .", "As long as there is no output before the function is called there is no problem with doing what you want i.e .", "remove the echo .", "Oh no SQL Injection", "At least use mysql-real-escape-string or even better switch to PDO as others suggested .", "Your code is insecure and fragile right now .", "First I hope I don t need to go into depth about sanitizing your inputs before accessing the database with them .", "So I ll approach your question from that format .", "I see two things here .", "One is that you want to give the user an alert when a transaction has successfully happened .", "That can be done dynamically with a redirect but it depends on where you send them .", "If you send the user to a location that you have no control over your example cited google.com then you will have to deliver your alert and your input with javascript and ajax .", "The reason for this is because header redirects won t function if you sent some output to the user s browser already .", "So you will need to implement some .js into your code that makes an AJAX call to a script that executes your code and returns a success failure flag which then triggers a message of success failure .", "If you do have control of the content you are redirecting to and you do not wish to touch any .js you can redirect to an intermediary page that uses a variable that you created to hold the success failure message output it to the browser and a button that links to your next page after that with the data appended to the query-string .", "Thanks for the insight .", "thumbsup Upvotes are another good way of showing appreciation", "What you have commented out should work if you use the full path e.g .", ": http : google.com .", "Another thing : you should really drop the use of mysql functions it will be deprecated in the future http : us.php.net manual en mysqlinfo.api.choosing.php and use either mysqli or PDO .", "Yet another thing : you re application is vulnerable to SQL injection http : en.wikipedia.org wiki SQL injection .", "Thank you for the quick response .", "I will be looking into this PDO in the near future as well .", "Yes just get rid of the echo statement before it .", "You cannot echo anything to the screen before a header call .", "You might also want to add some error-handling so that you are really sure it was successful and switch to prepared statements to avoid sql-injection .", "Output Buffering .. . .. . Everyone else here has said you can t echo anything before the header call including whitespace .", "But that is fact incorrect .", "If you use output buffering in the php.ini file for example to output buffer the entire page - then you are free to use header ANYWHERE in the script so long as the code does not manually flush it .", "http : php.net manual en outcontrol.configuration.php .. . .. . You want to set this in php.ini .. . .. . output buffering On .. . .. . And then you can use header anywhere in your code .", "Output buffering stops this as the entire generated page is sent in one go at the end of the script meaning headers are free to be changed anywhere in the script .", "P.S .", ".. . .. . As others have mentioned your SQL is vulnerable to SQL injection http : en.wikipedia.org wiki SQL injection and you should no longer be using mysql but instead switch to pdo or mysqli due to mysql being depretiated ." ] }
{ "confidence": [ 42.64305877685547, 38.72711944580078, 34.94122314453125, 32.76025390625, 32.429603576660156, 29.119735717773438 ], "content": [ "Question : I have looked at some of the other posts made on similar topics but I cannot follow what they are instructing . Basically my problem is this I want to redirect to the main log in page of my website after a successful password reset has happened . Here is what I have so far : .. . .. . This is all within a function the commented out part is where I want to redirect to my webpage . So to wrap it up can I force the function to redirect to the start page after a function finishes . I am using KISSMVC framework for this project if that matters . Comment : Please stop writing new code with the ancient mysql functions . They are no longer maintained and community has begun the deprecation process http : news.php.net php.internals 53799 . Instead you should learn about prepared statements and use either PDO http : php.net pdo or MySQLi http : php.net mysqli . If you care to learn here is a quite good PDO-related tutorial http : wiki.hashphp.org PDO Tutorial for MySQL Developers . Comment : As long as there is no output before the function is called there is no problem with doing what you want i.e . remove the echo . Having said that you should read about SQL injection http : stackoverflow.com questions 60174 best-way-to-stop-sql-injection-in-php . Comment : Oh no SQL Injection At least use mysql-real-escape-string or even better switch to PDO as others suggested . Your code is insecure and fragile right now . .. . Answer : You should remove the echo before the redirect http : stackoverflow.com questions 8028957 headers-already-sent-by-php . What you have commented out should work if you use the full path e.g . : http : google.com . Another thing : you should really drop the use of mysql functions it will be deprecated in the future http : us.php.net manual en mysqlinfo.api.choosing.php and use either mysqli or PDO . Yet another thing : you re application is vulnerable to SQL injection http : en.wikipedia.org wiki SQL injection . Comment : Yes I am not in the stage of learning PHP to deal with SQL injections I will be tackling those issues after I get this basic functionality down . Thank you for the quick response . I will be looking into this PDO in the near future as well . Comment : Yet another thing : KISSMVC uses views so you should not use echo in your function . Comment : That echo calls up a bar at the top that can display a confirmation msg within a view should I have some where-in the view store the confirmation call and then use that in my controller", "Question : null .. . Answer : I have a KISSMVC php based site with the following .htaccess to allow only authenticated users to see the site .. . .. . This works with no problem . The problem is that I want to allow clients to retrieve a value from the site with no authentication . This value is obtained through the index.php function because it is calculated per client plus there is no folder structure where these values are stored . as an example this URL should not prompt : .. . .. . but this one should still be prompting : .. . .. . If I could somehow specify in the .htaccess file to bypass or satisfy the authentication when the requested URL contains index.php inventory hash that would be perfect .", "Question : I have looked at some of the other posts made on similar topics but I cannot follow what they are instructing . Basically my problem is this I want to redirect to the main log in page of my website after a successful password reset has happened . Here is what I have so far : .. . .. . This is all within a function the commented out part is where I want to redirect to my webpage . So to wrap it up can I force the function to redirect to the start page after a function finishes . I am using KISSMVC framework for this project if that matters . Comment : Please stop writing new code with the ancient mysql functions . They are no longer maintained and community has begun the deprecation process http : news.php.net php.internals 53799 . Instead you should learn about prepared statements and use either PDO http : php.net pdo or MySQLi http : php.net mysqli . If you care to learn here is a quite good PDO-related tutorial http : wiki.hashphp.org PDO Tutorial for MySQL Developers . Comment : As long as there is no output before the function is called there is no problem with doing what you want i.e . remove the echo . Having said that you should read about SQL injection http : stackoverflow.com questions 60174 best-way-to-stop-sql-injection-in-php . Comment : Oh no SQL Injection At least use mysql-real-escape-string or even better switch to PDO as others suggested . Your code is insecure and fragile right now . .. . Answer : First I hope I don t need to go into depth about sanitizing your inputs before accessing the database with them . I am unaware of the KISSMVC . But I am aware of how PHP and browser-server interactions happen . So I ll approach your question from that format . I see two things here . One is that you want to give the user an alert when a transaction has successfully happened . That can be done dynamically with a redirect but it depends on where you send them . If you send the user to a location that you have no control over your example cited google.com then you will have to deliver your alert and your input with javascript and ajax . The reason for this is because header redirects won t function if you sent some output to the user s browser already . So you will need to implement some .js into your code that makes an AJAX call to a script that executes your code and returns a success failure flag which then triggers a message of success failure . If you do have control of the content you are redirecting to and you do not wish to touch any .js you can redirect to an intermediary page that uses a variable that you created to hold the success failure message output it to the browser and a button that links to your next page after that with the data appended to the query-string . All that can be done in php MySQL . Comment : Thanks for the insight . This is my first experience with PHP so any knowledge is useful . Comment : thumbsup Upvotes are another good way of showing appreciation", "Question : I have looked at some of the other posts made on similar topics but I cannot follow what they are instructing . Basically my problem is this I want to redirect to the main log in page of my website after a successful password reset has happened . Here is what I have so far : .. . .. . This is all within a function the commented out part is where I want to redirect to my webpage . So to wrap it up can I force the function to redirect to the start page after a function finishes . I am using KISSMVC framework for this project if that matters . Comment : Please stop writing new code with the ancient mysql functions . They are no longer maintained and community has begun the deprecation process http : news.php.net php.internals 53799 . Instead you should learn about prepared statements and use either PDO http : php.net pdo or MySQLi http : php.net mysqli . If you care to learn here is a quite good PDO-related tutorial http : wiki.hashphp.org PDO Tutorial for MySQL Developers . Comment : As long as there is no output before the function is called there is no problem with doing what you want i.e . remove the echo . Having said that you should read about SQL injection http : stackoverflow.com questions 60174 best-way-to-stop-sql-injection-in-php . Comment : Oh no SQL Injection At least use mysql-real-escape-string or even better switch to PDO as others suggested . Your code is insecure and fragile right now . .. . Answer : Yes just get rid of the echo statement before it . You cannot echo anything to the screen before a header call . You might also want to add some error-handling so that you are really sure it was successful and switch to prepared statements to avoid sql-injection .", "Question : I have looked at some of the other posts made on similar topics but I cannot follow what they are instructing . Basically my problem is this I want to redirect to the main log in page of my website after a successful password reset has happened . Here is what I have so far : .. . .. . This is all within a function the commented out part is where I want to redirect to my webpage . So to wrap it up can I force the function to redirect to the start page after a function finishes . I am using KISSMVC framework for this project if that matters . Comment : Please stop writing new code with the ancient mysql functions . They are no longer maintained and community has begun the deprecation process http : news.php.net php.internals 53799 . Instead you should learn about prepared statements and use either PDO http : php.net pdo or MySQLi http : php.net mysqli . If you care to learn here is a quite good PDO-related tutorial http : wiki.hashphp.org PDO Tutorial for MySQL Developers . Comment : As long as there is no output before the function is called there is no problem with doing what you want i.e . remove the echo . Having said that you should read about SQL injection http : stackoverflow.com questions 60174 best-way-to-stop-sql-injection-in-php . Comment : Oh no SQL Injection At least use mysql-real-escape-string or even better switch to PDO as others suggested . Your code is insecure and fragile right now . .. . Answer : Output Buffering .. . .. . Everyone else here has said you can t echo anything before the header call including whitespace . But that is fact incorrect . If you use output buffering in the php.ini file for example to output buffer the entire page - then you are free to use header ANYWHERE in the script so long as the code does not manually flush it . http : php.net manual en outcontrol.configuration.php .. . .. . You want to set this in php.ini .. . .. . output buffering On .. . .. . And then you can use header anywhere in your code . Just remember that after a redirect to use die or exit to prevent the PHP page carrying on execution after the redirect . Without Output Buffering .. . .. . You must NOT print anything to the browser including whitespace otherwise the headers have already been sent and can no longer be modified by PHP . Output buffering stops this as the entire generated page is sent in one go at the end of the script meaning headers are free to be changed anywhere in the script . P.S . .. . .. . As others have mentioned your SQL is vulnerable to SQL injection http : en.wikipedia.org wiki SQL injection and you should no longer be using mysql but instead switch to pdo or mysqli due to mysql being depretiated .", "Question : I am considering to use a php framework never used one before I know I have to abandon the way I am used to work I can deal with this among many concerns a first thing that comes in my mind is this : .. . .. . I have two techniques I like to use have used them for years . . .. . .. . 1 . I always use index.php somePage.php as href so never loads another page other that index.php then index.php includes the somePage.php .. . .. . 2 . I always used to store all texts any text titles button names link names stories articles anything in a single or more files or in GLOBALS array depending on size . I want to ask is this aproach wrong is there any better way Second from what I have read freamworks have some rules does my approach create some conflict I am thinking of KISS MVC framework cause it declares to be easy for framework beginers . I have no experience with frameworks and I am concerned about all this I can t wait for the day I will feel like home with using a framework . Thank you all in advance Comment : Hello Old School .. . Answer : 1 . That pattern is known as front-controller - it gets all requests and routes them internally not based on file loaded . That pattern is fine it should look like index.php whatever to which you can then patch over with .htaccess to make whatever Examine SERVER REQUEST URI . 2 . Database is a good place to store large amounts of text . Files you create rarely are - they offer none of the advantages of using a database . GLOBALS rarely is a good place to store data . You generally should keep as little as possible available globally . You can make a registry class to store global stuff if you need . The best way to know what does and doesn t work with a framework is to try and get familiar with a popular one such as Zend Kohana Yii etc ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web-applications
UNK_RELATION
proguard@java@75
proguard -- proguard is a tool to shrink optimize obfuscate and preverify @placeholder classes .
{ "confidence": [ 55.05647659301758, 50.72283935546875, 46.79402542114258, 45.26087951660156, 44.53657913208008, 44.14860916137695, 43.2291145324707, 43.2291145324707, 42.39643096923828, 42.311492919921875, 42.311492919921875, 42.311492919921875, 42.311492919921875, 42.13119125366211, 41.96571350097656, 41.50046157836914, 41.21169662475586, 40.39485168457031, 40.140045166015625, 40.140045166015625, 40.140045166015625, 39.860721588134766, 39.628456115722656, 39.325660705566406, 39.325660705566406, 39.325660705566406, 38.52865982055664, 38.429771423339844, 38.40803909301758, 38.40803909301758, 38.38924026489258, 38.12262725830078, 37.80017852783203, 37.80017852783203, 37.563011169433594, 37.27112579345703, 37.22404861450195, 37.088531494140625, 36.87049865722656, 36.693878173828125, 36.630653381347656, 36.412353515625, 36.12425231933594, 35.99567413330078, 35.97880554199219, 35.907081604003906, 35.77625274658203, 35.582550048828125, 35.181060791015625, 35.066734313964844, 34.98172378540039, 34.98172378540039, 34.98172378540039, 34.977943420410156, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.81224822998047, 34.74052810668945, 34.74052810668945, 34.74052810668945, 34.74052810668945, 34.74052810668945, 34.74052810668945, 34.74052810668945, 34.74052810668945, 34.676456451416016, 34.635440826416016, 34.62592315673828, 34.48447799682617, 34.45445251464844, 34.06773376464844, 34.06773376464844, 34.06773376464844, 34.06773376464844, 33.89462661743164, 33.89462661743164, 33.89462661743164, 33.89462661743164, 33.89462661743164, 33.89462661743164, 33.89462661743164, 33.881927490234375, 33.881927490234375, 33.822906494140625 ], "content": [ "Proguard must not shrink the code of your modules classes .", "Default Proguard configuration will obfuscate shrink and optimize everything your entire application with all dependencies except some classes you explicitly exclude .", "You do want ProGuard to preverify the code .", "You should avoid preverify optimize and shrink .", "As per Proguard documentation the tool can t obfuscate components mentioned in the Manifest file .", "It seems some essential classes are stripped by proguard .", "I m trying to use Proguard to obfuscate my code .", "Will proguard work to obfuscate static string constants", "Here is my Proguard config for such cases : .. . .. . Add the above rules to your app s proguard-rules.pro they will shrink only classes of your app and all your dependencies that you explicitly allow to shrink .", "Use ProGuard to obfuscate application code .. . .. . 2 .", "ProGuard properly configured will obfuscate your code .", "We used proguard to obfuscate the jar files .", "I want to obfuscate JAXB code with proguard .", "Proguard will kept all facebook classes also such as for e.g .", "Dex does not like code run through the ProGuard optimize and preverify steps and performs some of these optimizations on its own .", "I ve read on android.developer that proguard is used to shrink the code .", "Proguard wont obfuscate the actual key though. .", "The problem appears only when using tools proguard proguard-android-optimize.txt instead of tools proguard proguard-android.txt", "Adobe change the Classes and Packages and the old Proguard from the Aviary website is not working .", "If I configure dontwarn for this proguard strips some essential classes .", "Since it works without proguard I assume it is removing some required classes .", "This makes the code difficult to shrink optimize obfuscate .", "This is the proguard.cfg we used : .. . .. . We used the default proguard-project.txt and merge with our current configuration where we want to obfuscate all classes except : .. . .. . The exception reported when executing proguard based on custom rules.xml :", "From the answer I understand that proguard is not designed to obfuscate library-project .", "I have a jar file and I would like to obfuscate it with ProGuard .", "The case that you obfuscate the app with Proguard again that is double-obfuscated .", "I use proguard support in mtj plugin to obfuscate a project that has some third party jars but it gives me errors : .. . .. . It seems that proguard look for the classes in JavaSE not JavaME .", "It could be a bug either in ProGuard or in the dex tool .", "It gives me Exception : .. . .. . I used ProGuard with just obfuscate option .", "I ve just finished my application so I wanted to obfuscate it with ProGuard .", "All your injections must be produced using @Provides annotated methods since ProGuard will shrink classes due to the fact their constructors are not explictely called .", "Looks like Proguard is removing a constructor from one of your classes .", "You can keep methods in some classes with : .. . .. . As you are using wire form these indications http : github.com square-wire generating-code-with-wire proguard recommended is : .. . .. . If the problem is coming from retrofit here is a proguard example https : github.com krschultz android-proguard-snippets blob master libraries proguard-square-retrofit.pro :", "adamw xsbt-proguard-plugin https : github.com adamw xsbt-proguard-plugin which is the successor of siasia xsbt-proguard-plugin seems to have the very option : .. . .. . By default Proguard will be instructed to include everything except classes from the Java runtime .", "These lines can be found in the default ProGuard config file sdk.dir tools proguard proguard-android.txt : .. . .. . I m not using the Google Licensing Service so the classes are indeed unknown .", "That s to say this code is valid and will work after ProGuard obfuscation .. . .. . while this code won t work .. . .. . Furthermore Proguard will shrink uncalled methods and constructor .", "https : sourceforge.net projects proguard files proguard 20beta .", "Try add : .. . .. . to proguard .", "By adding that line to the proguard config file proguard will not obfuscate those class files but I don t think you are concerned about that since they are third-party libraries .", "in proguard rules", "As with any other class you need to -keep the class if you re accessing it indirectly via reflection so ProGuard won t obfuscate it or optimize it away as unused .", "I think that the class was removed by the Proguard Shrinking tool .", "android-proguard : .. . .. . project proguard : .. . .. . ERROR LOG :", "So - does proguard only shrink my application code or does it shrink the code of my dependencies too", "Hers s my proguard file .", "I tried this : .. . .. . Then I found myself having to do --keep on all my classes in proguard .", "Proguard Parameter", "For other proguard rule snippet you can visit android-proguard-snippets https : github.com krschultz android-proguard-snippets for more information .", "most android specific rules like -keep public class extends android.app.Activity should come from Android .. . tools proguard proguard-android -optimize .txt", "You have to prevent ProGuard DexGuard from stripping needed classes within the new com.google.android.gms.auth package by adding : .. . .. . to your proguard-project.txt or dexguard-project.txt file .", "after editing proguard-project.txt and before enabling proguard in project.properties .", "Integrated ProGuard support : ProGuard is now packaged with the SDK Tools .", "I already have ProGuard running successfully with proguard-rules.pro .", "The telltale sign is this line : .. . .. . Looks like some Apache logging s classes have been renamed by Proguard and from the Proguard config file you have .. . .. . marked as comment with prefix therefore I d remove in the above line thus telling Proguard to not rename classes within package org.apache.commons and try again .", "in proguard-project.txt gives no effect .", "Where proguard is obfuscating it .", "Proguard is telling me NOTHING .", "This is my proguard-rules.pro file :", "These are the proguard rules that got it working .", "My proguard configuration is as below .", "This is not a proguard issue at all .", "I am the developer of ProGuard", "Are you using Proguard and Crashlytics", "This causes an ambiguity to proguard .", "This is tested with proguard DNSJava .", "The resources ARE NOT stripped away by ProGuard .", "Maybe Proguard itself", "Does this disable ProGuard completely", "Exclude Saripaar classes from obfuscation by adding the following line to your proguard-rules.pro file .", "As a first resort global one you could forbid proguard cutting out all third-party classes .", "However if such 3rd party classes are used then we should use -keep class for them otherwise proguard will cutoff them .", "I have modified proguard : .. . .. . But I have different classes to process JSON like that : .. . .. . Without obfuscating the application work perfect .", "You can then switch off the warnings : .. . .. . ProGuard will no longer complain about these missing classes and proceed with processing the code .", "This information seems to be erased by the transformation step that proguard does even when the relevant classes are excluded from the obfuscation .", "You are right the default ProGuard and DexGuard config excludes classes that extend BroadcastReceiver so just move to another class .", "ProGuard http : proguard.sourceforge.net provides name obfuscation : it can replace the original names of classes methods and fields by short meaningless names .", "It is ProGuard indeed .", "My crash report is a little bit useless if I use Proguard minifyEnabled true and shrinkResources true .. . .. . This is the report with Proguard : .. . .. . And this is the normal report without Proguard : .. . .. . Is there something I can do to get line numbers with Proguard", "I notice on Proguard s page that DexGuard doesn t preverify classes .", "my default proguard file name was proguard-android.txt and I was writing rules in proguard-rules.pro .", "Use well known Proguard rules which are from the kind obfuscate all privates .. . .. . These with other known library Proguard rules http : stackoverflow.com questions 23120565 obfuscating-android-library-project-source-code-with-proguard will ensure usually a desired result .", "It appears that the answer is No : Proguard will obfuscate code from the libraries too http : groups.google.com group android-developers browse thread thread 86482d656a5894a5 .", "ProGuard doesn t obfuscate string constants as mentioned in its FAQ http : proguard.sourceforge.net FAQ.html encrypt .", "i am trying to obfuscate a java app with ProGuard but i have a problem with one particular topic here it is .", "When i obfuscate the code with ProGuard 5.1 spring is having problems to instantiate beans .", "Is there a way to specify Proguard file", "to my proguard config file .", "Use tools like ProGuard .", "to avoid proguard errors .", "Anyone able to use this with proguard on", "BUT ProGuard complains these class are Unknown.. .", "This is my proguard config-file .", "1 Download latest proguard from http : sourceforge.net projects proguard files .", "The official Proguard doc shows how you can point to proguard in the build.gradle .", "I think the issue is that the SDK has it s own proguard and relies on it s public classes to not be proguarded by the developer ." ] }
{ "confidence": [ 63.95826721191406, 56.197696685791016, 55.64909362792969, 55.63813018798828, 54.1141471862793, 53.72597122192383, 53.60916519165039, 53.608055114746094, 53.406707763671875, 53.13937759399414, 52.85121154785156, 52.83380889892578, 52.70568084716797, 52.4562873840332, 52.424800872802734, 52.004737854003906, 51.51042175292969, 51.12025451660156, 51.12025451660156, 50.987388610839844 ], "content": [ "Question : Has anyone ever tried to combine the use of google guice with obfuscation in particular proguard The obfuscated version of my code does not work with google guice as guice complains about missing type parameters . This information seems to be erased by the transformation step that proguard does even when the relevant classes are excluded from the obfuscation . The stack-trace looks like this : .. . .. . I tried to create a small example without using guice that seems to reproduce the problem : .. . .. . If you run this code unsbfuscated the output looks like this : .. . .. . But running the version obfuscated with proguard yields : .. . .. . These are the options I used for obfuscation : .. . .. . Does anyone have an idea of how to solve this apart from the obvious workaround to put the relevant files into a seperate jar and not obfuscate it Best regards .. . Stefan .. . Answer : Having used proguard for a good amount of time here is how I decided to solve the issues regarding reflection and Guice is only a use-case of it . Reflection can be used with Proguard as long as NO class or methods name are entered as Strings . That s to say this code is valid and will work after ProGuard obfuscation .. . .. . while this code won t work .. . .. . Furthermore Proguard will shrink uncalled methods and constructor . As a consequence the Class.newInstance http : java.sun.com j2se 1.4.2 docs api java lang Class.html newInstance 28 29 method won t work . Unfortunatly usual Guice bindings works using this method . This has some consequences on Guice code . All your injections must be produced using @Provides annotated methods since ProGuard will shrink classes due to the fact their constructors are not explictely called . Proguard must not shrink the code of your modules classes . ProGuard must not shrink annotations whichever and wherever they are this can be configured but I cannot remember where . Comment : Wow this is awful news that you have to use @Provides methods just to stop ProGuard from stripping the dependencies . This begs for a tool to help . I assume it would also work almost equally annoyingly to stick a bunch of -keep lines in the proguard config Comment : Maybe because adding the -keep annotation will make refactorings less effective as we ll have to ensure in output jar that classes names are valid . To my mind operating on a pure Java level makes our code more refactoring-compliant if such a thing exists", "Question : After I Obfuscate my jar file I can install my jar file on the cell phone but it does not run It gives me Exception : .. . .. . I used ProGuard with just obfuscate option . Do you have any idea about what is the cause of the problem This is what Sony Erricson sdk gives me after unsuccessful execution of my program : Comment : what is the exception Comment : possibly related stackoverflow.com q 5701126 250725 http : stackoverflow.com q 5701126 250725 Comment : on my nokia e66 it gives me unhandled-exception on sony erricson wtk emulator there is no any identified error but it does not run .. . Answer : Inconsistent or missing stackmap at target means that the preverification information inside a class file is incorrect . Make sure that you specify -microedition so ProGuard preverifies the code for JME not JSE . Don t specify -dontpreverify . You do want ProGuard to preverify the code . Alternatively you could apply the external JME preverifier but that is less efficient . Cfr . ProGuard manual Troubleshooting Verification error http : proguard.sourceforge.net manual troubleshooting.html invalidclassexception2 Comment : You are compeletly right thanks for your help .", "Question : I want to check how DexGuard works but it seems that it doesn t have a free trial version . Can DexGuard encrypt an Android application Or does it simply obfuscate the code How does DexGuard encryption work If you could provide code from a sample application run with DexGuard before and after decompilation it would be great . .. . Answer : ProGuard http : proguard.sourceforge.net provides name obfuscation : it can replace the original names of classes methods and fields by short meaningless names . DexGuard http : www.saikoa.com dexguard additionally provides string encryption and class encryption . The term encryption may be confusing in this context since these are basically more aggressive types of obfuscation . Designated strings and classes are stored in some intentionally complex encrypted form and decrypted at runtime with keys and algorithms that are necessarily available to the application . In some ways similarly the Google Play market can encrypt entire applications for Android 4.1 . The runtime environment then decrypts the application before it is executed in a controlled fashion . I am the developer of ProGuard and DexGuard -- feel free to get in touch if you re interested Comment : Hi Thanks for your reply Yes I got confused with the definition of encryption in DexGuard . Basically my understanding is that encryption transforms data with the use of a secret-key . However if an Android application is encrypted Dalvik won t be able to understand the encrypted application as Dalvik does not contain a decryptor for the application . Unless of course a decryptor is attached inside the application together with the key . In this way the class will be decrypted by the application itself before being run by Dalvik . Is that how DexGuard works Comment : Can I used DexGuard together with Google Play s encyption for Android 4.1 Also is it recommended to use DexGuard together with Proguard I notice on Proguard s page that DexGuard doesn t preverify classes . How can I prevify the classes if I m going to use DexGuard Thank you : D Comment : Correct . Yes from the outside a processed application still looks like any other application Google Play can still encrypt it . No you don t need to combine ProGuard and DexGuard since DexGuard already provides the functionality of ProGuard . Preverification is only required for Java Micro Edition and Java 6 not for Android . Comment : The virtual machines and the bytecode for Android and for Java are quite different . Dalvik bytecode doesn t have preverification information while Java bytecode may have preverfication information . The Java virtual-machine uses the information to check that the program is well-constructed . The Android developers didn t consider this necessary due to the different way in which applications are run . So DexGuard which writes out Dalvik bytecode doesn t need it . Comment : @EricLafortune how does DexGuard play with if at all the new ART experimental runtime for Android", "Question : We have updated to Playscape SDK 1.14 when we try to build a release APK it crashes when trying to obfuscate our libraries with proguard . This is the proguard.cfg we used : .. . .. . We used the default proguard-project.txt and merge with our current configuration where we want to obfuscate all classes except : .. . .. . The exception reported when executing proguard based on custom rules.xml : .. . Answer : Your proguard configs file should contain these flags : .. . .. . -keepattributes Signature .. . -dontwarn . Specifies not to warn about unresolved references and other important problems at all .. . -dontnote . Specifies not to print notes about potential mistakes or omissions in the configuration . Also just add -keep class for your classes you want to keep without obfuscation . You can familiarize here http : proguard.sourceforge.net", "Question : Since I am using many dependencies in my app I am reaching the 65k Method Limit I am reaching 76k methods . I ve read on android.developer that proguard is used to shrink the code . So - does proguard only shrink my application code or does it shrink the code of my dependencies too Do I need to be wary of something when shrinking code with proguard How do I do that My Gradle Build : Comment : im reaching the 65k Methode Limit . Please post your build.gradle . .. . Answer : TL DR : invert your -keep option unless you love troubles .. . .. . .. . .. . Firstly : I believe that you are making right choice by using Proguard to overcome the dex limitation . I would not recommend using multidex support library under any circumstances : it introduces problem of multiple classloaders in your application and that may backfire in many non-obvious ways . Here is my personal approach to shrinking the app efficiently : .. . .. . Pick a couple of hugest third-party dependencies you have .. . Check if those really support Proguard .. . If they do shrink them with Proguard .. . If you still don t fit in maximum method count do steps above for some of remaining dependencies .. . If you still don t fit possibly reevaluate some that do not support Proguard possibly read their source code to get better idea why they don t and apply Proguard to them yourself .. . In the worst case apply Proguard to your own code .. . If absolutely nothing of above helps use multidex . Picking dependencies for shrinking .. . .. . In your case there aren t many direct dependencies in the first place . You may want to look at output of gradlew dependencies to get better idea of your indirect dependencies some of which may be biggest contributors to total app size . Then you may proceed to use some of tools listed in Dex section of Android Arsenal https : android-arsenal.com free to learn which libraries contribute most to dex method count . You seem to already have a general idea of it so I won t dwell much on this part . Remember : shrinking executable code is somewhat non-trivial intervention in library internals so you d rather shrink less to avoid mysterious problems in future . If in doubt start from libraries that openly declare that they do support Proguard officially in your case that would be Android Support libraries . Note that supporting Proguard may mean different things for different developers . You can expect Android Support Library developers to be at least basically competent but many others will ship with consumer Proguard rules like this : .. . .. . In case you wander the above config is based upon many real-life configs such as Square s Leak Canary https : github.com square leakcanary blob c1d512f9dbff60ff6cb9821a95727ee0cb05f5c9 leakcanary-android consumer-proguard-rules.pro Proguard configuration . It does not say anything about overall competency of developers in question just reminder that using Proguard can be hard . And yes this kind of configuration will completely prevent shrinking and obfuscation of the library unless you build it s local copy from source code and remove such helpful consumer-proguard-rules.pro from there . Evaluating dependencies for Proguard .. . .. . As shown above even experienced developers sometimes choose to ignore Proguard . If Google searches regarding the library and it s compatibility with Proguard return nothing and even if they do return some results you may have to make your own judgement regarding usage of Proguard . Here is how I personally do : .. . .. . If there are words framework enterprise reflection anywhere on the library site it is likely to be poorly compatible with Proguard .. . If the library has anything to do with compile-time code generation a-la Butterknife Dagger etc . think twice before using Proguard .. . If the library messes with JNI think a couple more times before using Proguard on it and Google for it s effects on Proguard even if you don t shrink the library itself .. . If in doubt Google for it and or read library source code : usage of Class.forName as well as Proxy.getInvocationHandler and similar reflection code are usual bad signs . Libraries that offer Android UI components such as MPAndroidChart are usually ok to shrink at least if you keep getDefaultProguardFile proguard-android.txt in your Gradle config . The most important part .. . .. . A lot of developers including Proguard developers themselves will offer you a misguided recommendation to start from empty Proguard config + default Android Proguard configuration and eventually add -keep rules when necessary . DO NOT DO THAT .. . .. . Those advices come from people who are either too badass to understand problem of average developer read : the Proguard developer himself or don t have a clue about using Proguard properly . In fact these kind of misguided practices are the very reason why many answers to this question warn you against using Proguard : it s default behavior is like suggesting someone to start mountaineering from scaling the Everest . Default Proguard configuration will obfuscate shrink and optimize everything your entire application with all dependencies except some classes you explicitly exclude . You don t want that unless you have absolute understanding of every library and line of code in your projects : how they work and interact with each other which techniques they internally use etc . Instead you want to do the minimal necessary intervention shrinking the code to reduce dex method count in the minimal possible range few hugest libraries with minimal consequences only where Proguard is known to work for sure . Here is my Proguard config for such cases : .. . .. . Add the above rules to your app s proguard-rules.pro they will shrink only classes of your app and all your dependencies that you explicitly allow to shrink . Append wildcards for other safely shrinkable packages exactly as above with and . parts to beginning of the -keep line . Comment : This looks like a good extensive guideline . I will follow it while working with proguard Thank you very much", "Question : Warning : I removed a lot of old text to keep the question more clean . Just check the history if needed . I m using proguard to both shrink and obfuscate an app that uses the facebook-sdk-3.0 https : developers.facebook.com android I m using the sdk-version-3.0.2.b tag https : github.com facebook facebook-android-sdk tree sdk-version-3.0.2.b . I m not using a JAR file . Instead I imported the sdk inside my workspace as taught by the documentation https : developers.facebook.com docs getting-started facebook-sdk-for-android 3.0 . At a certain point in the execution the app loads a PlacePickerFragment https : developers.facebook.com docs reference android 3.0 PlacePickerFragment to let the user choose the place where he is . To code this I follow exactly the Scrumptious tutorial https : developers.facebook.com docs tutorials androidsdk 3.0 scrumptious show-nearby-places . When I generate the debug apk without using proguard everything works as expected . But when I generate the signed apk using proguard it crashes when the PlacePickerFragment loads nearby places with the following trace : .. . .. . Trying to avoid this error I kept all facebook classes untouched but didn t work . My current proguard-project.txt file : .. . .. . My current projet.properties file excerpt : .. . .. . As you can see my proguard configuration is a specialization of this file https : gist.github.com 4148345 . If I put -dontobfuscate in proguard-project.txt file it will work . But what I don t understand is that the keep class com.facebook . should already prevent classes related to facebook to be obfuscated . Which suggests that the problem is not directly related to the facebook classes . The excerpt of code https : github.com facebook facebook-android-sdk blob sdk-version-3.0.2.b facebook src com facebook model GraphObject.java L278 that throws com.facebook.FacebookGraphObjectException is : .. . .. . Clearly expectedTypeAsParameterizedType is null in release build . But in both builds debug and release expectedType is a com.facebook.model.GraphObjectList interface . Unfortunately I don t understand almost nothing about Java reflection concepts . How can I fix this problem .. . Answer : This may work untested Comment : It worked partially please see my edit .", "Question : I m struggling with the setup of Dagger 1.0.1 in a existing application . It was configured to use ProGuard but I disabled it for this test with -dontobfuscate . When I enable dagger-compiler it s able to successfully generate a dot file with the dependencies graph but when I remove the compiler and build the app in Release mode it crashes during startup complaining that it s unable to create the object graph . I see MyAppBaseActivity and it s dependencies with CroutonManager or ConnectionMonitor being displayed in the generated dot file so according to this comment https : github.com square dagger issues 228 issuecomment-17621260 I expected this to work . AFAIK if there was something wrong it should be detected by the compiler-enabled build that I used to generate the dot file . .. . .. . UPDATE : .. . .. . I previously stated that .. . .. . In Debug mode it never fails .. . .. . but it s not really true after further testing : In Debug mode it doesn t fail because ProGuard is disabled whereas in Release mode it is enabled by default . If I build the app in Release mode but skip ProGuard I don t get the errors either and the app successfully starts . So the problem is definitely related to my ProGuard configuration . Comment : Why do you remove the compiler for release-mode The compiler is meant to be used to speed up things since no annotation processing has to take place at runtime . For me it makes no sense to make the app run slower in release by removing the dagger-compiler . Comment : Yeah I know the compiler is there for providing such performance improvement besides graph validation at compile-time . I disabled it because I m also using ProGuard and according to Square guys the way to avoid problems was to disable the compiler and let Dagger generate all the required code at runtime . .. . Answer : Dagger relies a lot on reflection and class names that are hard-coded and manipulated as strings . This makes the code difficult to shrink optimize obfuscate . The following configuration works for the sample dagger examples simple in Dagger 1.1.0 https : github.com square dagger tree dagger-parent-1.1.0 examples simple : .. . .. . The configuration keeps all fields and methods with javax.inject or dagger annotations and all parameterless constructors . ProGuard might otherwise remove them if they appear unused but Dagger is actually injecting accessing them through reflection . This is similar to RoboGuice . It also has to keep all adapter classes generated by Dagger . It also has to keep all class names related to these adapter classes so the names still match . In this sample those are almost all classes in the package coffee so the easiest way is to use a wild-card . This line will be different for other applications . Finally it also has to keep the name of the class dagger.Lazy since its name is hard-coded as a string in the generated code . Comment : Thanks for your thorough response Eric Comment : Regarding the keepnames entry for your own application classes I ve reduced them to two possible scenarios so far : 1 whenever you add any binding to a Dagger module for a new dependency via the corresponding provideXXX method the returned type has to be added to the config . 2 If you have a class with an @Inject annotated constructor that extends another class not already filtered in the ProGuard configuration that base-class has to be added to the config . Comment : David If I use dagger-compiler I m under the impression it should not use reflection . in this case which configurations should I implement in my proguard file Comment : If like me you don t know ProGuard well and tried to copy the above adding a second to coffee . will cause it to work recursively coffee . will match coffee.gui.whatever . Took me a bit to figure out .", "Question : I am using proguard with eclipse to obfuscate a android proyect which has nineoldandroid library and switch backport I get the following warnings : .. . .. . How could I fix this issue How does the configuration file should be set .. . Answer : This is happening because Proguard is detecting a conflict between your project directory structure and the fully qualified class names of those classes that are part of android-switch-backport and nineoldandroids . Proguard documentation http : stuff.mit.edu afs sipb project android sdk android-sdk-linux tools proguard docs index.html manual troubleshooting.html explains this error . The easiest way to get rid of this is to add a line a line with -ignorewarnings in the proguard configuration file . By adding that line to the proguard config file proguard will not obfuscate those class files but I don t think you are concerned about that since they are third-party libraries . Adding that line will get rid of the warning messages but Proguard should work on your own class files even if you don t add that line . Comment : -ignorewarnings was the way to go", "Question : I have a android-library with one class and I want to make it an .aar library . When I set minifyEnabled to true another android project cannot use the library It is fine if minifyEnabled is set to false . I would like to ask what is the correct configuration of proguard with AAR library .. . .. . HelloWorld.java .. . .. . build.grandle .. . .. . proguard-rules.pro Comment : Can you try changing the last line in proguard-rules to -keep class com.example.hello . public Comment : @basilisk It seems to work but is it normal that it can still be decompiled by android-studio Also is that the correct way to handle dependencies library Comment : @Joshua Any APK can be decompiled . Proguard does not protect an APK or library in any way . It performs just a little bit obfuscation for classes that don t belong to the API . .. . Answer : Try changing the last line in proguard-rules to .. . .. . As for Android Studio being able to decompile you can t prevent that . If you want to protect your code I suppose the best you can do is to obfuscate most of it and then extend the desired functionality through interfaces that you do not obfuscate by adding the relevant proguard rules .", "Question : In my application I enabled progurad by minifyEnabled true and progurad rules I didn t added I build the signed in apk then it is crashing in the lauching only then I thought that I have to add the classes which has not to be minfied . then I added progurd rules like -keep public class extends android.app.Activity then also it is not working I don t know why becuase it depends on other files like views and R files all . So my doubt is When I enabled progurad I have to add all my classes and libraries in progurad rules or it will minify other classes and made as will not work.So how can I add all the classes without crashing app when it build signed in apk After adding in proguard rules also it is crashing the app Add project specific ProGuard rules here . .. . .. . How can I test an app with proguard release build is there anything to check direclty signed in apk or I have to add any mapping files .How can I test direct release apk or If that apk upload into playstore then it will work based on mapping files Comment : this question has the answers you need : stackoverflow.com questions 18259632 should-i-use-proguard http : stackoverflow.com questions 18259632 should-i-use-proguard .. . Answer : This is what documentation https : developer.android.com studio build shrink-code.html simply said about Proguard . To make your APK file as small as possible you should enable shrinking to remove unused code and resources in your release build . This page describes how to do that and how to specify what code and resources to keep or discard during the build . .. . .. . Code shrinking is available with ProGuard which detects and removes unused classes fields methods and attributes from your packaged app including those from included code libraries making it a valuable tool for working around the 64k reference limit . ProGuard also optimizes the bytecode removes unused code instructions and obfuscates the remaining classes fields and methods with short names . .. . .. . I have read a nice post about it so you should also read it from here http : omgitsmgp.com 2013 09 09 a-conservative-guide-to-proguard-for-android .. . .. . If you want to know about how practically use it then this http : stackoverflow.com questions 20885725 how-to-use-the-proguard-in-android-studio answer may be helpful to you and if you want suggestion about when to use it then see this http : stackoverflow.com a 18259813 5476209 answer .", "Question : I have an android app which has dnsjava.jar in the libs directory of the project . Everything built fine and can be packaged into APK without proguard . However when i introduced proguard into the project.properties in eclipse i get the following warnings : .. . .. . Using -keep class org.xbill . in proguard-project.txt does not seem to solve this . Comment : Hi how you enable proguard settings to your App in eclipse....... . Comment : Hmm reading around and found that adding a -dontwarn org.xbill . seems to solve the problem . Heck.. . Comment : Try adding the -dontwarn tag in your proguard.config file . Comment : Also do not obfuscate the classes in which you are using library dnsjava.jar just keep it as it is like -keep class sun.net.spi.nameservice.NameService .. . Answer : This is tested with proguard DNSJava . Hope it helps . Copied from asmack readme", "Question : I ve met several proguard examples with these lines : .. . .. . I ve run app with and without this line of course with my package and haven t found any differences . I ve also looked in generated .. . BuildConfig.java and there are no changes too . What for do I need to keep my BuildConfig in ProGuard Thanks .. . Answer : As with any other class you need to -keep the class if you re accessing it indirectly via reflection so ProGuard won t obfuscate it or optimize it away as unused . Most often the access patterns with BuildConfig are direct without reflection so in those cases it s fine to have ProGuard process your BuildConfig too .", "Question : This may sound suspicious but I need to deobfuscate my own app . Some time ago I published my app that I obfuscated with Proguard . Unfortunately I did not save that version of the app and changed the code a lot . Now I need the code of that older version . I still have mapping.txt file generated by Proguard . I have converted the classes.dex file to jar using dex2jar tool now I need to deobfuscate it according to mapping.txt . Are there any tools that can help me Maybe Proguard itself UPD . I need a tool that can automatically rename all the classes functions etc so I dont have to do it manually . Thank you Comment : It is probably not possible . Once you compile the app the code is already obfuscated by the compiler . The case that you obfuscate the app with Proguard again that is double-obfuscated . There might a way to deobfuscate and decompile the app . I recommend you to save and backup anything before you code next time . Comment : This doesn t help you now but to prevent such problems in the future use a version-control system VCS . .. . Answer : I suggest to use proguard tool as suggested in above answer http : stackoverflow.com questions 36245737 how-to-deobfuscate-jar-file-using-mapping-txt-generated-by-proguard answertab oldest tab-top along with Enigma http : www.minecraftforum.net forums mapping-and-modding minecraft-tools 2162136-enigma-a-tool-for-deobfuscation-of-java-bytecode . The solution for your problem can t be very straightforward and you need to use a combination of available tools to resolve it . Comment : In addition to Proguard I ve also made it work with Engima mappings . However I have not compiled a version with the Enigma GUI active . Source is on the repo however : github.com LPK-Matt SkidSuite2 blob master SkidReob src me lpk https : github.com LPK-Matt SkidSuite2 blob master SkidReob src me lpk gui windows mapping WindowEnigma.java", "Question : null .. . Answer : Now I build and proguard a jar in a gradle task . I do not want to shrink a specific class but expect to shrink others because the class will be loaded dynamically namely it s a entry . I know a item dontshrink which will not shrink all . But how to process a single or some classes Is it possible Thanks . Comment : Did you check the proguard documentation This is answered in detail .", "Question : I use proguard support in mtj plugin to obfuscate a project that has some third party jars but it gives me errors : .. . .. . It seems that proguard look for the classes in JavaSE not JavaME . It only happens with projects that use third party jars . .. . Answer : One thing that I saw is when I used third party API provided by OEMs like LG etc I needed to set the proguard obfuscation level to 8 when compared to 9 which is the maximum level . Hope this wells .", "Question : I have to validate whether the obfuscation is done properly for all the jars in an automated way . If i give the input obfuscated jar it has to validate class names methods and variables and give the result . We used proguard to obfuscate the jar files . Please let me know if anyone knows any automated tool to check it or any other way to check it . Comment : What do you mean by properly Comment : Well you could just use a hash to check if proguard changed the file but I guess that is not enough for your properly requirement .. . Comment : properly means i want to check whether all the classes including its methods variables are obfuscated and not even a single class missed from this . .. . Answer : There is no existing tool as far as I can tell however you can do this really easily by loading the target jar as a JarFile and checking if any of the original names exist in the new JarFile .", "Question : It so fell out that I use jacorb.jar and CORBA interfaces in my android app . And when I try obfuscate code using Proguard I get a lot of warnings like this one : .. . .. . And as the result : .. . .. . My proguard.cfg : .. . .. . How to correct these warnings and build working apk file .. . Answer : Cfr . ProGuard manual Troubleshooting Warning : can t find superclass or interface . http : proguard.sourceforge.net manual troubleshooting.html unresolvedclass .. . .. . Jacorb appears to depend on JGSS which is not part of the Android runtime . In theory JGSS should be specified as a library package . However since your app already runs fine without JGSS it s fair to assume that this part of the code is never used . You can then switch off the warnings : .. . .. . ProGuard will no longer complain about these missing classes and proceed with processing the code . The summary in your console output suggests that there are many classes that are probably similar . Comment : I added -dontwarn option for all classes that I don t actually use in my app . But another sort of warnings is still there : proguard Warning : org.jacorb.imr.util.AddServerWindow : can t find referenced method void pack in class org.jacorb.imr.util.AddServerWindow These classes are kept in libs jacorb.jar . I use -keepclasseswithmembers class org.jacorb . but it makes no effect . Comment : Cfr . ProGuard manual Troubleshooting Warning : can t find referenced field method . Did you try -dontskipnonpubliclibraryclasses in older version of ProGuard and maybe -dontskipnonpubliclibraryclassmembers Comment : I tried to use this options both separately and together I wrote about it in a question . If I just ignore these warnings with -ignorewarnings -dontshrink -dontoptimize options apps services could n start . Comment : Thank you Eric Problem is solved . These warnings were unimportant . I used -ignorewarnings and -keep option for all classes that use corba interfaces . And obfuscated application works fine .", "Question : Warning : I removed a lot of old text to keep the question more clean . Just check the history if needed . I m using proguard to both shrink and obfuscate an app that uses the facebook-sdk-3.0 https : developers.facebook.com android I m using the sdk-version-3.0.2.b tag https : github.com facebook facebook-android-sdk tree sdk-version-3.0.2.b . I m not using a JAR file . Instead I imported the sdk inside my workspace as taught by the documentation https : developers.facebook.com docs getting-started facebook-sdk-for-android 3.0 . At a certain point in the execution the app loads a PlacePickerFragment https : developers.facebook.com docs reference android 3.0 PlacePickerFragment to let the user choose the place where he is . To code this I follow exactly the Scrumptious tutorial https : developers.facebook.com docs tutorials androidsdk 3.0 scrumptious show-nearby-places . When I generate the debug apk without using proguard everything works as expected . But when I generate the signed apk using proguard it crashes when the PlacePickerFragment loads nearby places with the following trace : .. . .. . Trying to avoid this error I kept all facebook classes untouched but didn t work . My current proguard-project.txt file : .. . .. . My current projet.properties file excerpt : .. . .. . As you can see my proguard configuration is a specialization of this file https : gist.github.com 4148345 . If I put -dontobfuscate in proguard-project.txt file it will work . But what I don t understand is that the keep class com.facebook . should already prevent classes related to facebook to be obfuscated . Which suggests that the problem is not directly related to the facebook classes . The excerpt of code https : github.com facebook facebook-android-sdk blob sdk-version-3.0.2.b facebook src com facebook model GraphObject.java L278 that throws com.facebook.FacebookGraphObjectException is : .. . .. . Clearly expectedTypeAsParameterizedType is null in release build . But in both builds debug and release expectedType is a com.facebook.model.GraphObjectList interface . Unfortunately I don t understand almost nothing about Java reflection concepts . How can I fix this problem .. . Answer : This will solve your problem i hope : .. . .. . .. . And the winner is .... . .. . .. . .. . From Proguard Homepage : .. . .. . The Signature attribute is required to be able to access generic types when compiling in JDK 5.0 and higher . Comment : Thank you very much", "Question : Warning : I removed a lot of old text to keep the question more clean . Just check the history if needed . I m using proguard to both shrink and obfuscate an app that uses the facebook-sdk-3.0 https : developers.facebook.com android I m using the sdk-version-3.0.2.b tag https : github.com facebook facebook-android-sdk tree sdk-version-3.0.2.b . I m not using a JAR file . Instead I imported the sdk inside my workspace as taught by the documentation https : developers.facebook.com docs getting-started facebook-sdk-for-android 3.0 . At a certain point in the execution the app loads a PlacePickerFragment https : developers.facebook.com docs reference android 3.0 PlacePickerFragment to let the user choose the place where he is . To code this I follow exactly the Scrumptious tutorial https : developers.facebook.com docs tutorials androidsdk 3.0 scrumptious show-nearby-places . When I generate the debug apk without using proguard everything works as expected . But when I generate the signed apk using proguard it crashes when the PlacePickerFragment loads nearby places with the following trace : .. . .. . Trying to avoid this error I kept all facebook classes untouched but didn t work . My current proguard-project.txt file : .. . .. . My current projet.properties file excerpt : .. . .. . As you can see my proguard configuration is a specialization of this file https : gist.github.com 4148345 . If I put -dontobfuscate in proguard-project.txt file it will work . But what I don t understand is that the keep class com.facebook . should already prevent classes related to facebook to be obfuscated . Which suggests that the problem is not directly related to the facebook classes . The excerpt of code https : github.com facebook facebook-android-sdk blob sdk-version-3.0.2.b facebook src com facebook model GraphObject.java L278 that throws com.facebook.FacebookGraphObjectException is : .. . .. . Clearly expectedTypeAsParameterizedType is null in release build . But in both builds debug and release expectedType is a com.facebook.model.GraphObjectList interface . Unfortunately I don t understand almost nothing about Java reflection concepts . How can I fix this problem .. . Answer : if you want to proguard Facebook the config below is working for me Comment : only this full solution work for me -keepattributes Signature didn t solved the problem", "Question : I am developing an app and I use several third party APIs and SDKs such as Dropbox and Google Drive . These libraries requiers API keys . A private and a public one . Currently I have sth like this : .. . .. . The App-Secret key should be kept private - but when releasing the app they can be reversed by some guys . I want to know what is the best thing to encrypt obfuscate or whatever to make this secure . I thought about using ProGuard but setting up ProGuard for the whole project would take me some weeks . Thats why I wanted only to use ProGuard for these important classes storing private keys and other sensitible data . Is this ok or are there other ways What do you think Comment : rammic.github.io 2015 07 28 hiding-secrets-in-android-apps https : rammic.github.io 2015 07 28 hiding-secrets-in-android-apps .. . Answer : 1 . As it is your compiled application contains the key strings but also the constant names APP KEY and APP SECRET . Extracting keys from such self-documenting code is trivial for instance with the standard Android tool dx . 2 . You can apply ProGuard . It will leave the key strings untouched but it will remove the constant names . It will also rename classes and methods with short meaningless names where ever possible . Extracting the keys then takes some more time for figuring out which string serves which purpose . Note that setting up ProGuard shouldn t be as difficult as you fear . To begin with you only need to enable ProGuard as documented in project.properties . If there are any problems with third-party libraries you may need to suppress some warnings and or prevent them from being obfuscated in proguard-project.txt . For instance : .. . .. . -dontwarn com.dropbox . .. . -keep class com.dropbox . .. . .. . .. . This is a brute-force approach you can refine such configuration once the processed application works . .. . .. . 3 . You can obfuscate the strings manually in your code for instance with a Base64 encoding or preferably with something more complicated maybe even native-code . A hacker will then have to statically reverse-engineer your encoding or dynamically intercept the decoding in the proper place . 4 . You can apply a commercial obfuscator like ProGuard s specialized sibling DexGuard http : www.saikoa.com dexguard . It can additionally encrypt obfuscate the strings and classes for you . Extracting the keys then takes even more time and expertise . 5 . You might be able to run parts of your application on your own server . If you can keep the keys there they are safe . In the end it s an economic trade-off that you have to make : how important are the keys how much time or software can you afford how sophisticated are the hackers who are interested in the keys how much time will they want to spend how much worth is a delay before the keys are hacked on what scale will any successful hackers distribute the keys etc . Small pieces of information like keys are more difficult to protect than entire applications . Intrinsically nothing on the client-side is unbreakable but you can certainly raise the bar . I am the developer of ProGuard and DexGuard Comment : Is this a local server being talked about in the fifth point Wouldn t this need a computer that requires to stay on always Sorry I m a newbie . Can I use something like Parse Comment : @EricLafortune does it not make a difference if the private key string is stored in the Java class vs in the String resource XML Comment : @EricLafortune Is it now possible to use the Android Keystore system to securely store the keys developer.android.com training articles keystore.html http : developer.android.com training articles keystore.html Comment : @DavidThomas : Did you tried using keystore . I want to obfuscate a API key written in Java class . Please reply Comment : @SagarTrehan no I haven t tried the keystore approach yet . There is a popular utility called dexguard that may be of interest to you there ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
defaultdict@subclass@57
defaultdict -- defaultdict collections.defaultdict is a @placeholder of the python built-in dict class that greatly simplifies the creation of dictionaries of python objects .
{ "confidence": [ 57.04981231689453, 49.17292404174805, 47.79050827026367, 47.79050827026367, 46.937557220458984, 44.266029357910156, 43.99713134765625, 43.945533752441406, 43.945533752441406, 43.945533752441406, 43.81324768066406, 43.72661590576172, 43.72661590576172, 42.37916564941406, 42.10886764526367, 41.65629196166992, 41.37419891357422, 41.29095458984375, 41.21208190917969, 41.09648132324219, 41.077857971191406, 40.71418762207031, 40.377254486083984, 40.20848083496094, 40.20848083496094, 40.1787223815918, 40.12759780883789, 40.12759780883789, 40.12759780883789, 40.12759780883789, 39.95922088623047, 39.749359130859375, 39.73453140258789, 39.16697692871094, 39.13525390625, 39.05437469482422, 38.97736740112305, 38.88148498535156, 38.88148498535156, 38.51150131225586, 38.25257873535156, 38.25257873535156, 37.96541976928711, 37.95881652832031, 37.928585052490234, 37.76808547973633, 37.557796478271484, 37.54922866821289, 37.54922866821289, 37.50581359863281, 37.075504302978516, 36.62541961669922, 36.47600555419922, 36.39797592163086, 36.341068267822266, 36.341068267822266, 36.341068267822266, 36.341068267822266, 36.32624816894531, 36.12014389038086, 35.82549285888672, 35.01884460449219, 35.01884460449219, 35.01884460449219, 34.97368621826172, 34.97368621826172, 34.97368621826172, 34.27532196044922, 34.27532196044922, 34.27532196044922, 34.265907287597656, 34.00952911376953, 33.98155975341797, 33.98155975341797, 33.98155975341797, 33.98155975341797, 33.747825622558594, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.40109634399414, 33.284603118896484, 33.07843017578125, 32.771644592285156, 32.771644592285156, 32.41593933105469, 32.32787322998047, 32.32787322998047, 32.32787322998047 ], "content": [ "Can I convert a defaultdict or dict to an ordereddict in Python", "How about using defaultdict dict :", "When you initialize a defaultdict you re initializing a dict .", "How can i convert a defaultdict .. . .. . to be a common dict", "This enables the leaf of the defaultdict to be something other than a dictionary e.g . : defaultdict lambda : defaultdict list or defaultdict lambda : defaultdict set", "defaultdict s - like normal dictionaries - don t have order .", "I recommend reading : docs.python.org 2 library collections.html defaultdict-objects http : docs.python.org 2 library collections.html defaultdict-objects", "It s a defaultdict instance and you can t call a defaultdict .", "Is there a way to make a defaultdict also be the default for the defaultdict", "defaultdict lambda : defaultdict list The correct form", "@IndifferentPotato I ve added the equivalent using a defaultdict dict", "The defaultdict constructor works like the dict constructor with a mandatory default factory argument in front .", "What you re apparently missing is that defaultdict is a straightforward not especially magical subclass of dict .", "EDIT : .. . .. . Also using a dict is faster than a defaultdict int : .. . .. . this last version is faster than the defaultdict int meaning that unless you care more about readability you should use the dict rather than the defaultdict .", "@AChampion wouldnt defaultdict list give me a dict with string list", "This is noted in the docs docs.python.org 2 library http : docs.python.org 2 library collections.html collections.defaultdict but not in help defaultdict at least in my Python 2.7 install", "I m trying to create a defaultdict within a defaultdict based on a key-value .", "@user2988464 : you ve already used default factory -- that s the function that you passed when you made the defaultdict in the first place like defaultdict int or defaultdict list .", "Using defaultdict :", "Unfortunately not directly as defaultdict specifies that default factory must be called with no arguments : .. . .. . http : docs.python.org 2 library collections.html collections.defaultdict .. . .. . But it is possible to use defaultdict as a base-class that has the behavior you want : .. . .. . This works for me :", "If your defaultdict is recursively defined for example : .. . .. . yet another simple way to convert defaultdict back to dict is to use json module .. . .. . and of course the values contented in your defaultdict need to be confined to json supported data types but it shouldn t be a problem if you don t intent to store classes or functions in the dict .", "defaultdict is built around adding a value for a single missing key if you want something else you might as well start from class MyThing dict .", "My algorithm to achieve this involves a defaultdict list .. .", "I am wondering if defaultdict http : docs.python.org 2 library collections.html collections.defaultdict is thread-safe .", "Defaultdict documentation : docs.python.org 2 library https : docs.python.org 2 library collections.html collections.defaultdict", "Also helpful to note that pickle for saving python objects to a file can t handle defaultdict s in many circumstances http : stackoverflow.com a 16439720 420867 .", "You want to use defaultdict :", "d is your defaultdict .", "Shouldn t that be defaultdict record without the", "list is such a callable but defaultdict list is not .", "It looks like the defaultdict bit is working just fine.. . dict record hello key2 is a defaultdict second record so dict record hello key2 another hello is a return-value from second record a dict and you can t add 1 to a dict .", "by a constant resulting in another defaultdict or even a regular nested dict would be fine .", "To work around the printing issue it is easy and quick to convert a defaultdict back to a regular dict by using dict dict name .", "But in a defaultdict it instead calls the default factory function to make a new default-value that s the default in defaultdict for you .", "missing http : docs.python.org 2 library collections.html collections.defaultdict . missing of defaultdict does not pass key to factory function .", "That is the whole point of a defaultdict isn t it", "You can use following : .. . .. . defaultdict https : docs.python.org 2 library collections.html collections.defaultdict constructor takes default factory as a first argument which can be followed by the same arguments as in normal dict .", "If you re actually looking for the first 20 items in a defaultdict that s meaningless the items in a defaultdict as with a normal dict are in arbitrary order so there are no firsts .", "Any arguments to defaultdict after the default factory are treated just like arguments to dict : .. . .. . Just pass the comprehension to defaultdict and let it do the work : .. . .. . Or use functools.partial :", "The parameter to defaultdict is the default item to construct .", "so that you could just as easily feed the output from the groupby to a regular dict instead of a defaultdict", "If you even want a recursive version for converting a recursive defaultdict to a dict you can try the following :", "But even if TableEntry was given arguments in the defaultdict call you would probably get a TypeError because defaultdict needs to be called with a callable and not an instance of a class as it would be .", "jonalv might not need the defaultdict functionality here .", "Dictionaries in python are not ordered .", "Note that defaultdict is necessary in this part .", "Just to make it clear : defaultdict is instantiated with a certain class in this case int .", "Essentially defaultdict list is going to be evaluated before your defaultdict is instantiated and you want to defer that until a missing key is encountered .", "Ooops yes the lambda form is correct--because the defaultdict something returns a dictionary-like object but defaultdict expects a callable", "As an aside you can use defaultdict int instead of defaultdict lambda : 0 .", "Given a defaultdict dict with both the keys as strings and their value is float then how do I find the k keys based on descending order of the value from the entire defaultdict .", "My thinking may be completely wrong here but here s the code for a basic defaultdict .. . .. . But what if I want to add a key as a defaultdict like this .. . .. . In the above how could I make key2 a defaultdict", "i have the following defaultdict .. . .. . is there a way such that my values per key will be sorted and have the new defaultdict as :", "So the defaultdict documentation http : docs.python.org 2 library collections.html collections.defaultdict mentions that if an item is missing the value returned by default factory is inserted in the dictionary for the key and returned .", "Pickle was used just to save this defaultdict to file .", "Try def dtree : return defaultdict dtree maybe", "It seems that the default factory will create a defaultdict with default 0 .", "I.e . y is a kind of two-tiered defaultdict .", "@AndrewMartin defaultdict extends dict thus you re able to use it exactly the same way as a standard dict as shown in the answer to the linked question .", "This uses a defaultdict of defaultdict of int so the result looks a bit weird but it s essentially just what you wanted : defaultdict function lambda at 0x7fd297740840 T : defaultdict class int t : 2 UH : defaultdict class int oo : 1 or without all that defaultdict boilerplate T : t : 2 UH : oo : 1 .", "If you do your tests like below you see that defaultdict operations are indeed faster : .. . .. . Python 2.7.3 on Win7 x64 .", "@1 CR : I would say that defaultdict list is super-common .", "the behavior you describe would not be consistent with the defaultdict s other behaviors .", "But I gave you a defaultdict because you asked for one .", "I have the following pickled defaultdict : .. . .. . When using Hadoop the input is always read in using : .. . .. . I tried reading the pickled defaultdict using this : .. . .. . But to no avail .", "Related info can be found here : stackoverflow.com questions 16439301 cant-pickle-defaultdict http : stackoverflow.com questions 16439301 cant-pickle-defaultdict", "The docs https : docs.python.org 3 library collections.html defaultdict-examples do say using defaultdict is simpler and faster than an equivalent technique using dict.setdefault .", "I have done another test and using a dict is faster than a defaultdict will update the question", "There is no such thing as first N elements in a defaultdict because as with a plain dict the elements are in arbitrary order .", "Can the defaultdict be deconstructed somehow back into a nested dict in order to allow the transformation to be possible", "I ve tried to use defaultdict questions tagged defaultdict to create a defaultdict in main to pass along as well as a few other iterations but I can t seem to get it right getting key errors pickle errors etc . .", "It would make sense that defaultdict is faster that dict.setdefault since the former sets its default for the entire dict at creation time whereas setdefault does it per element when it is read .", "The defaultdict use cases go way beyond counting .", "Yep surprisingly missing from the docstring of defaultdict .", "And here I first want to check if it is in the defaultdict already .", "Then switch back to returning the defaultdict with the computed results .", "Since json doesn t support this datastructure I would like to convert the datastructure into a defaultdict list but when I try : .. . .. . I get : TypeError : collections.defaultdict object is not callable how should I do the conversion", "What exactly does the TYPE lambda do when used with defaultdict", "Looks defaultdict dictionary does not care about the what TYPE of argument is passed in .", "The default-value factory the first argument to defaultdict is not a type declaration .", "I want to use defaultdict TableEntry to make a string TableEntry custom dictionary .", "If I cannot do defaultdict TableEntry how else could I accomplish this", "Tree lambda : defaultdict Tree is all the setup you need for that kind of structure .", "How do I create pickle file of function defaultDict", "@Merlin : If you try to unpickle this defaultdict in an environment with no definition of tree it won t work .", "I am wondering why defaultdict seems to be faster then setdefault .", "especially after I ve discovered the incredible ease of using defaultdict .. .", "I figured I could probably subclass defaultdict and override.. .", "I ll probably go with the defaultdict route to get the copy support .", "The value associated with it becomes a defaultdict in which spam is automatically inserted with a value of 0 .", "Or in other words how come defaultdict int always returns 0 for the value", "But can it be done simply just using the normal defaultdict arguments", "Default dict expects a zero parameter function for creating it s default-value so you can t actually do defaultdict TableEntry .", "Consider the following example : .. . .. . To create an equivalent nested dictionary structure without defaultdict you would need to create an inner dict for y k1 and then set y k1 k2 to 0 but defaultdict does all of this behind the scenes when it encounters keys it hasn t seen : .. . .. . The following function may help for playing around with this on an interpreter to better your understanding : .. . .. . This will return the dict equivalent of a nested defaultdict which is a lot easier to read for example :", "Through some research I think what I need to do is use defaultdict as the type of the outer defaultdict like so : .. . .. . which throws errors because defaultdict returns a function so I need to use lambda yes", "The other answers here tell you how to create a defaultdict which contains infinitely many defaultdict but they fail to address what I think may have been your initial need which was to simply have a two-depth defaultdict .", "A defaultdict configured with list as the default-value factory handles the dict . getitem method entirely in C and the GIL is never unlocked making dict key lookups thread safe .", "I m trying to write a defaultdict variable to a document in my MongoDB .", "How might defaultdict be used to make solving this more simple", "Is it possible to use defaultdict in a way that I can access the key in the factory" ] }
{ "confidence": [ 71.91527557373047, 65.83474731445312, 64.92736053466797, 63.99699020385742, 63.775482177734375, 61.94373321533203, 61.4621467590332, 61.40087127685547, 61.33406448364258, 61.17401885986328, 60.572811126708984, 59.70426559448242, 58.857486724853516, 58.857486724853516, 58.621768951416016, 58.42267608642578, 58.270999908447266, 57.84904479980469, 57.74530029296875, 57.47551345825195 ], "content": [ "Question : I have a defaultdict Set : .. . .. . I want the Set functionality when building it up in order to remove duplicates . Next step I want to store this as json . Since json doesn t support this datastructure I would like to convert the datastructure into a defaultdict list but when I try : .. . .. . I get : TypeError : collections.defaultdict object is not callable how should I do the conversion Comment : from sets import Set - Python has an improved set type now that you don t need to import . You should stop using the old sets.Set . .. . Answer : You can use following : .. . .. . defaultdict https : docs.python.org 2 library collections.html collections.defaultdict constructor takes default factory as a first argument which can be followed by the same arguments as in normal dict . In this case the second argument is a generator-expression that returns tuples consisting key and value . Note that if you only need to store it as a JSON normal dict will do just fine : Comment : jonalv might not need the defaultdict functionality here . You could use an even simpler dict comprehension : new values k : list v for k v in values.items Comment : @LeviNoecker Good point added that to answer Comment : Yea that was very smart", "Question : I ve seen other Python programmers use defaultdict from the collections module for the following use-case : .. . .. . I ve typically approached this problem by using setdefault instead : .. . .. . The docs do in fact claim that using defaultdict is faster http : docs.python.org library collections.html collections.defaultdict but I ve seen the opposite to be true when testing myself : .. . .. . Is there something wrong with how I ve set up the tests For reference I m using Python 2.7.3 GCC 4.2.1 Apple Inc . build 5666 Comment : did one test file contain s yellow 1 blue 2 yellow 3 blue 4 red 1 where the other didn t Comment : @Claudiu : read the timeit lines carefully . Comment : You need to use much larger test sets where there is more than 2 values per key . Comment : @MartijnPieters : i did . i don t know what is in withsetdefault.py and withdefaultdict.py . if one of them contains that line and the other doesn t that could account for the difference .. . Answer : Yes there is something wrong : .. . .. . You have put the creation of the default dict into the statement instead of the setup . Constructing a new defaultdict is more expensive than a normal dict and usually that s not the bottleneck you should be profiling in a program - after all you build your data-structures once but you use them many times . If you do your tests like below you see that defaultdict operations are indeed faster : .. . .. . Python 2.7.3 on Win7 x64 . Comment : Thanks Tim When I remove the defaultdict constructor from the test statement it s definitely faster that using setdefault...regardless of the data size .", "Question : I have a defaultdict Set : .. . .. . I want the Set functionality when building it up in order to remove duplicates . Next step I want to store this as json . Since json doesn t support this datastructure I would like to convert the datastructure into a defaultdict list but when I try : .. . .. . I get : TypeError : collections.defaultdict object is not callable how should I do the conversion Comment : from sets import Set - Python has an improved set type now that you don t need to import . You should stop using the old sets.Set . .. . Answer : The defaultdict constructor works like the dict constructor with a mandatory default factory argument in front . However this won t convert any existing values from Sets to lists . If you want to do that you need to do it manually : .. . .. . You might not even want a defaultdict at all at that point though : Comment : This will leave the each existing entry as a set . Comment : @JaredGoguen : Yeah I was in the middle of editing to address that .", "Question : I obtained very surprising results with timeit can someone tell me if I am doing something wrong I am using Python 2.7 . This is the contents of file speedtest init.py : .. . .. . These are the contents of speedtest.py : .. . .. . The console output is : .. . .. . I think by default timeit runs 1000000 times the code so I need to divide the times by 1000000 but what is surprising is that the Counter is slower than the defaultdict . Is that expected EDIT : .. . .. . Also using a dict is faster than a defaultdict int : .. . .. . this last version is faster than the defaultdict int meaning that unless you care more about readability you should use the dict rather than the defaultdict . .. . Answer : Yes this is expected the Counter constructor uses Counter.update which uses self.get to load initial values rather than rely on missing . Moreover the defaultdict missing factory is handled entirely in C code especially when using another type like int that is itself implemented in C . The Counter source is pure Python and as such the Counter . missing method requires a Python frame to execute . Because dict.get is still handled in C the constructor approach is the faster approach for a Counter provided you use the same trick Counter.update uses and alias the self.get lookup as a local first : .. . .. . Both defaultdict and Counter are helpful classes built for their functionality not their performance not relying on the missing hook can be faster still : .. . .. . That s a regular dictionary using an aliased dict.get method for maximum speed . But then you ll also have to re-implement the bag behaviour of Counter or the Counter.most common method . The defaultdict use cases go way beyond counting . In Python 3.2 updating a Counter got a speed boost by adding a C library that handles this case see issue 10667 http : bugs.python.org issue10667 . Testing on Python 3.4 the Counter constructor now beats the aliased dict.get case : Comment : I have done another test and using a dict is faster than a defaultdict will update the question Comment : This is indeed surprising you d expect a purpose-built class to be the fastest implementation . Why doesn t Counter use defaultdict for its implementation if it s faster Comment : @MarkRansom : Counter does much more than defaultdict does . But if we can create a Counter as a defaultdict subclass that is faster then perhaps you can propose a patch . : - Comment : No need for a patch Python 3 I don t remember what minor version already speeds this up so calling Counter is faster than even your final code block . Comment : @Veedrac : ah indeed thanks for the pointer . Found the changeset and the original bug report http : bugs.python.org issue10667 .", "Question : How can i convert a defaultdict .. . .. . to be a common dict Comment : dict number to letter Comment : @TimPeters since this is actually a nicely written question with an obvious title and should show up easily in searches for future reference it d be worth putting that as an answer if we can t find a dupe that s better.. . Comment : This answer should help : stackoverflow.com a 3031915 1628832 http : stackoverflow.com a 3031915 1628832 Comment : @JonClements good point but DSM already did - I hope his answer is accepted : - Comment : @TimPeters congrats on the 10k btw.. . I had a feeling it wouldn t take you long - you should shameless plug pop by chat.stackoverflow.com rooms 6 python http : chat.stackoverflow.com rooms 6 python at some point : .. . Answer : You can simply call dict : .. . .. . but remember that a defaultdict is a dict : .. . .. . just with slightly different behaviour in that when you try access a key which is missing -- which would ordinarily raise a KeyError -- the default factory is called instead : .. . .. . That s what you see when you print a before the data side of the dictionary appears . So another trick to get more dictlike behaviour back without actually making a new object is to reset default factory : .. . .. . but most of the time this isn t worth the trouble . Comment : i just start to learn programming with Python . Can you explain more about how to use default factory I just have no clue on what s going on . Sorry . Comment : And what s KeyError Comment : @user2988464 : you ve already used default factory -- that s the function that you passed when you made the defaultdict in the first place like defaultdict int or defaultdict list . Whenever you try to look up a key in the dictionary like a 3 for example in a usual dictionary you either get the value or it raises a KeyError exception like an error telling you it couldn t find that key . But in a defaultdict it instead calls the default factory function to make a new default-value that s the default in defaultdict for you . Comment : Helpful to note that Django s .items template property won t work with defaultdict which is why I ended up here So there s one good reason for the conversion Comment : Also helpful to note that pickle for saving python objects to a file can t handle defaultdict s in many circumstances http : stackoverflow.com a 16439720 420867 .", "Question : So the defaultdict documentation http : docs.python.org 2 library collections.html collections.defaultdict mentions that if an item is missing the value returned by default factory is inserted in the dictionary for the key and returned . That s great most of the time but what I actually want in this case is for the value to be returned but not inserted into the defaultdict . I figured I could probably subclass defaultdict and override.. . I guess missing Not sure . What s the best way to go about this Thanks in advance . .. . Answer : You can subclass dict and implement missing : .. . .. . Demo : .. . .. . You could subclass defaultdict too you d get the factory handling plus copy and pickle support thrown in : .. . .. . Demo : .. . .. . but as you can see the repr does lie about its name . Comment : That s perfect . I ll probably go with the defaultdict route to get the copy support . Thanks", "Question : How do I create pickle file of function defaultDict The error I get is can t pickle function objects .. . .. . StackTrace : Comment : Where is tree coming from You only define dtree . Comment : In Python 3 pickling functions works if they re defined using a def statement but not if they re defined with a lambda even if the lambda is assigned to a variable . Try def dtree : return defaultdict dtree maybe Comment : @Blckknght using Python 2 . Comment : @user2357112 Weird does not throw an error Comment : I hadn t checked when I wrote the comment above but the behavior is the same in Python 2 it just has less clear error messages . .. . Answer : A simple workaround would be to implement your tree data-structure differently without defaultdict : Comment : what would be the benefits of this Comment : It s arguably a better way to do it . An important one is that it prints and pretty-prints pprint like a normal dictionary . See What is the best way to implement nested dictionaries in Python http : stackoverflow.com questions 635483 what-is-the-best-way-to-implement-nested-dictionaries-in-python 19829714 19829714", "Question : I am trying to do something similar to this : .. . .. . actually the reason why I need access to the key in the factory is not to compute an md5 but for other reasons this is just an example .. . .. . As you can see in the factory I have no access to the key : I am just forcing it which makes no sense whatsoever . Is it possible to use defaultdict in a way that I can access the key in the factory Comment : Out of curiosity why do you need defaultdict is it only for correcting missing values Because that s all it does aside from just returning Comment : Yes it is to provide values for missing keys in the dictionary . That is the whole point of a defaultdict isn t it The problem is that my real data structure which I am storing in the defaultdict has fields depending on the key . So whenever I am trying to access a non-existing element I need to create it in the factory using as a parameter the key of the defaultdict . Comment : Was afraid of you doing something a little more over the ordinary . See @falsetru s solution because that was what i was going to suggest to you in case of custom building usage of dictionaries : .. . Answer : Unfortunately not directly as defaultdict specifies that default factory must be called with no arguments : .. . .. . http : docs.python.org 2 library collections.html collections.defaultdict .. . .. . But it is possible to use defaultdict as a base-class that has the behavior you want : .. . .. . This works for me :", "Question : I have a list of tuples as shown below . I want to create a nested dictionary where the first element in the tuple is key and the values with the same keys should be grouped into the same key as a dictionary . This is what I tried but it doesn t give me the nested dictionary I wanted . Desired result : .. . Answer : How about using defaultdict dict : Comment : Defaultdict documentation : docs.python.org 2 library https : docs.python.org 2 library collections.html collections.defaultdict", "Question : How can i convert a defaultdict .. . .. . to be a common dict Comment : dict number to letter Comment : @TimPeters since this is actually a nicely written question with an obvious title and should show up easily in searches for future reference it d be worth putting that as an answer if we can t find a dupe that s better.. . Comment : This answer should help : stackoverflow.com a 3031915 1628832 http : stackoverflow.com a 3031915 1628832 Comment : @JonClements good point but DSM already did - I hope his answer is accepted : - Comment : @TimPeters congrats on the 10k btw.. . I had a feeling it wouldn t take you long - you should shameless plug pop by chat.stackoverflow.com rooms 6 python http : chat.stackoverflow.com rooms 6 python at some point : .. . Answer : If your defaultdict is recursively defined for example : .. . .. . yet another simple way to convert defaultdict back to dict is to use json module .. . .. . and of course the values contented in your defaultdict need to be confined to json supported data types but it shouldn t be a problem if you don t intent to store classes or functions in the dict . Comment : Good idea too bad my data won t serialize to JSON :", "Question : How can I get a callable factory for a defaultdict to allow populating it with a comprehension I think it s probably not possible but I can t think of a good reason why Comment : I don t understand what you are trying to do . What are thing and foo and why should thing return 0 Comment : To clarify : thing i i i for i in range 3 should return a defaultdict instance . I will edit the question to make that clearer Comment : Oh ok the -1 made me think it was a list rather than a missing index . If you wanted a default factory that would do this I don t think it could be done because from the docs The default factory is called without arguments to produce a new value when a key is not present in getitem only . .. . Answer : Any arguments to defaultdict after the default factory are treated just like arguments to dict : .. . .. . Just pass the comprehension to defaultdict and let it do the work : .. . .. . Or use functools.partial : Comment : Very nice This is noted in the docs docs.python.org 2 library http : docs.python.org 2 library collections.html collections.defaultdict but not in help defaultdict at least in my Python 2.7 install Comment : Yep surprisingly missing from the docstring of defaultdict . I wonder how many other little python secrets are hiding out there .. . Comment : If this is still missing from the docstring in 3.4b2 someone should submit a bug report . I m assuming defaultdict is being affected by the argument clinic derby so you can t just check the latest 3.3 release . Comment : It s still missing in the latest trunk so I filed bugs.python.org issue20250 http : bugs.python.org issue20250 Comment : As a side note the OP is using a genexpr which you ve converted to a listcomp and there s no obvious reason to do so .", "Question : I have not worked with threading in Python at all and asking this question as a complete stranger . I am wondering if defaultdict http : docs.python.org 2 library collections.html collections.defaultdict is thread-safe . Let me explain it : .. . .. . I have .. . .. . which creates list for missing keys by default . Let s say I have multiple threads started doing this at the same time : .. . .. . at the end I m supposed to end up with value value however if the defaultdict is not thread-safe if the thread 1 yields to thread 2 after checking if key in dict and before d key default factory it will cause interleaving and the other thread will create list in d key and append value maybe . Then when thread 1 is executing again it will continue from d key default factory which will destroy the existing list and value and we will end up in key . I looked at CPython source code for defaultdict http : hg.python.org cpython file 7272ef213b7c Modules collectionsmodule.c l1484 however I could not find any locks or mutexes . I guess it is not thread-safe as long as it is documented so . Some guys last night on IRC said that there is GIL on Python so it is conceptually thread-safe some said threading should not be done in Python . I m pretty confused . Ideas Comment : groups.google.com forum topic comp.lang.python 9ZnBQrYun1w https : groups.google.com forum topic comp.lang.python 9ZnBQrYun1w may help .. . Answer : It is thread safe in this specific case . To know why it is important to understand when Python switches threads . CPython only allows switching between threads between Python bytecode steps . This is where the GIL comes in every N byte code instructions the lock is released and a thread switch can take place . The d key code is handled by one bytecode BINARY SUBSCR that triggers the . getitem method to be called on the dictionary . A defaultdict configured with list as the default-value factory handles the dict . getitem method entirely in C and the GIL is never unlocked making dict key lookups thread safe . Note the qualification there if you create a defaultdict instance with a different default-value factory one that uses Python code lambda : 1 2 3 for example all bets are off as that means the C code calls back into Python code and the GIL can be released again while executing the bytecode for the lambda function . Similarly if the factory is written in C code that explicitly releases the GIL a thread switch can take place and thread-safety is out the window . Comment : This is only true for CPython . It could be wrong for other python implementations . Comment : @hivert : Sure added a C at the start of my answer to make that clearer . Comment : Since it s apparently not in the documentation this sounds like just a CPython implementation detail -- still useful to know though . Comment : +1 for mentioning that Python-written factories can trigger release of GIL . Unfortunately it gets even hairier : GIL can potentially trigger on any Py DECREF if the object is freed and has a del . This way even pure C code can unwittingly cause a release of the GIL admittedly pathological but it can happen . Comment : Pretty interesting that developer should be aware of GIL releases between C Python code execution back and forth . Thanks .", "Question : This question is an extension of a previous question : rebuild python array based on common elements http : stackoverflow.com questions 34503916 rebuild-python-array-based-on-common-elements - but different enough to warrant a new question : .. . .. . I ve been struggling with this for a bit now . My data is an array of dictionaries from an sql query . Each element in the array represents a shipment and there are common values based on the keys . The output I want is grouped according to specific keys .. . .. . I can get the grouping with a single level using defaultdict and list-comprehension as provided by the previous question and modified slightly .. . .. . But I can t seem to get the second level in the output array - the grouping b the PartNum key . Through some research I think what I need to do is use defaultdict as the type of the outer defaultdict like so : .. . .. . which throws errors because defaultdict returns a function so I need to use lambda yes My question is how to access the second level array in the loop and tell the inner defaultdict what to group on PartNum The data comes to me from the database programmer and the project keeps evolving to add more and more data keys so I d like this solution to be as general as possible in case more data gets thrown my way . I was hoping to be able to chain the defaultdicts depending on how many levels I need to go . I m learning as I m going so I m struggling trying to understand the lambda and the basics of the defaultdict type and where to go from here . Comment : Sort the dict then apply groupby https : docs.python.org 3 library itertools.html itertools.groupby . Or do it beforehand with SQL if you can . I cannot help you more now I am on a mobile phone.. . Comment : Can there be two delKey s with the same number value for a PartNum Comment : How many items in your actual data Comment : Potentially tens of thousands in the original data set . Comment : Do you care about the order of the values in the lists in your output If not you could easily get rid of those levels and make your structure just a nested set of dictionaries . Tree lambda : defaultdict Tree is all the setup you need for that kind of structure . .. . Answer : Using groupby as suggested by @Pynchia and using sorted for unordered data as suggested by @hege hegedus : .. . .. . If you look at the second for-loop this will hopefully answer your question about accessing the second level array in the loop . Comment : This method seemed to work the best for me to get the desired output . I wanted to use the tree method but . I was not able to get lists inside the tree .", "Question : This question is an extension of a previous question : rebuild python array based on common elements http : stackoverflow.com questions 34503916 rebuild-python-array-based-on-common-elements - but different enough to warrant a new question : .. . .. . I ve been struggling with this for a bit now . My data is an array of dictionaries from an sql query . Each element in the array represents a shipment and there are common values based on the keys . The output I want is grouped according to specific keys .. . .. . I can get the grouping with a single level using defaultdict and list-comprehension as provided by the previous question and modified slightly .. . .. . But I can t seem to get the second level in the output array - the grouping b the PartNum key . Through some research I think what I need to do is use defaultdict as the type of the outer defaultdict like so : .. . .. . which throws errors because defaultdict returns a function so I need to use lambda yes My question is how to access the second level array in the loop and tell the inner defaultdict what to group on PartNum The data comes to me from the database programmer and the project keeps evolving to add more and more data keys so I d like this solution to be as general as possible in case more data gets thrown my way . I was hoping to be able to chain the defaultdicts depending on how many levels I need to go . I m learning as I m going so I m struggling trying to understand the lambda and the basics of the defaultdict type and where to go from here . Comment : Sort the dict then apply groupby https : docs.python.org 3 library itertools.html itertools.groupby . Or do it beforehand with SQL if you can . I cannot help you more now I am on a mobile phone.. . Comment : Can there be two delKey s with the same number value for a PartNum Comment : How many items in your actual data Comment : Potentially tens of thousands in the original data set . Comment : Do you care about the order of the values in the lists in your output If not you could easily get rid of those levels and make your structure just a nested set of dictionaries . Tree lambda : defaultdict Tree is all the setup you need for that kind of structure . .. . Answer : Sort by CustName PartNum delKey . Iterate over the delivery items for each part for each customer and accumulate to match your output spec . I like to use operator.itemgetter - for me it makes things clearer . This clearly iterates over the items in the original data multiple times which may be a performance hit -- but I don t see a way around multiple iteration for what you need to do .", "Question : null .. . Answer : I am writing code for an application where performance is important . I am wondering why defaultdict seems to be faster then setdefault . I would like to be able to use setdefault mostly because i do not like the print output of the nested defaultdict see implementation below . In my code i need to test if element id is already a key of the dict . Here are the two functions that i am testing : .. . .. . IPython input and output : .. . .. . Why is setdefaultfunc slower . I thought the underlying code would be the same . Is there a way to improve its speed Thanks Comment : The docs https : docs.python.org 3 library collections.html defaultdict-examples do say using defaultdict is simpler and faster than an equivalent technique using dict.setdefault . To work around the printing issue it is easy and quick to convert a defaultdict back to a regular dict by using dict dict name . Comment : It would make sense that defaultdict is faster that dict.setdefault since the former sets its default for the entire dict at creation time whereas setdefault does it per element when it is read . One reason to use setdefault is when the default you assign is based on the key or something rather than a generic default for the entire dict . Comment : Thanks guys makes perfect sense now .", "Question : How can i convert a defaultdict .. . .. . to be a common dict Comment : dict number to letter Comment : @TimPeters since this is actually a nicely written question with an obvious title and should show up easily in searches for future reference it d be worth putting that as an answer if we can t find a dupe that s better.. . Comment : This answer should help : stackoverflow.com a 3031915 1628832 http : stackoverflow.com a 3031915 1628832 Comment : @JonClements good point but DSM already did - I hope his answer is accepted : - Comment : @TimPeters congrats on the 10k btw.. . I had a feeling it wouldn t take you long - you should shameless plug pop by chat.stackoverflow.com rooms 6 python http : chat.stackoverflow.com rooms 6 python at some point : .. . Answer : If you even want a recursive version for converting a recursive defaultdict to a dict you can try the following : Comment : That s exactly what I needed Unfortunately my defaultdict has some keys that aren t JSON serializable without a custom encoder the keys are tuples -- not my choice just my problem", "Question : I have created the following class . Package website and comments are all strings and distroDict is a string list dictionary . I want to use defaultdict TableEntry to make a string TableEntry custom dictionary . I want the package to be the key and the entry object to be the value . I can use values within the entry object but if I try to append it to tableDict I receive the following error . I have also tried the following : .. . .. . And receive the same error essentially : Comment : Isn t this a list of table entries so don t you want of defaultdict list that you are append ing TableEntry s to Default dict expects a zero parameter function for creating it s default-value so you can t actually do defaultdict TableEntry . Comment : @AChampion wouldnt defaultdict list give me a dict with string list Whereas I am looking for a dict with string TableEntry . I need to map a String to an object than can hold multiple pieces of information and a string list dict will not suffice . If I cannot do defaultdict TableEntry how else could I accomplish this Comment : defaultdist list will give you a a string : dictionary but as you are appending a TableEntry s you needed a collection e.g . a dictionary of string : TableEntry TableEntry .. . . However if you just want a dictionary of string : TableEntry why do you need a defaultdict wouldn t tableDict tableDict package TableEntry .. . not work .. . Answer : When you try to get something from a defaultdict it returns an instance of the default factory https : docs.python.org 2 library collections.html collections.defaultdict.default factory you instantiated it with which in your case is TableEntry that has no method append . But that s actually not why you are getting the error . This happens because when an instance is returned it is also evaluated and since TableEntry doesn t have the arguments it needs the Python interpreter will complain . But even if TableEntry was given arguments in the defaultdict call you would probably get a TypeError because defaultdict needs to be called with a callable and not an instance of a class as it would be . In summary you cant instantiate a defaultdict with an non-callable unless you use subclassing http : stackoverflow.com questions 2912231 is-there-a-clever-way-to-pass-the-key-to-defaultdicts-default-factory . Instead you should do something like this : .. . .. . Then you can do e.g . tableDict package website to get the string you wrote to self.website .", "Question : In someone else s code I read the following two lines : .. . .. . As the argument of defaultdict is a default factory I think the first line means that when I call x k for a nonexistent key k such as a statement like v x k the key-value pair k 0 will be automatically added to the dictionary as-if the statement x k 0 is first executed . Am I correct And what about y It seems that the default factory will create a defaultdict with default 0 . But what does that mean concretely I tried to play around with it in Python shell but couldn t figure out what it is exactly . .. . Answer : You are correct for what the first one does . As for y it will create a defaultdict with default 0 when a key doesn t exist in y so you can think of this as a nested dictionary . Consider the following example : .. . .. . To create an equivalent nested dictionary structure without defaultdict you would need to create an inner dict for y k1 and then set y k1 k2 to 0 but defaultdict does all of this behind the scenes when it encounters keys it hasn t seen : .. . .. . The following function may help for playing around with this on an interpreter to better your understanding : .. . .. . This will return the dict equivalent of a nested defaultdict which is a lot easier to read for example : Comment : Thanks a lot for the answer .", "Question : Text read from file and cleaned up : .. . .. . The challenge is to return a dict with each word as the value and the words that can follow it as the key and a count for the number of times it follows it : .. . .. . Collections.counter will count the frequency of each unique value . However my algorithm to solve this challenge is long and unwieldy . How might defaultdict be used to make solving this more simple EDIT : here is my code to bruise through this problem . A flaw is that the values in the nested dict are the total number of times a word appears in the text not how many times it actually follows that particular word . Comment : Do you have working code that does this If so your question may not be suitable for SO but another site . Comment : Show us your long code . Counter is the way to go . Comment : please provide an input that causes a count higher than 1 Comment : If possible for your use-case Consider using a simpler data structure like the cat : 1 the dog : 1 chased the : 1 . Then all you need to do is get a list of consecutive word pairs http : stackoverflow.com questions 5764782 iterate-through-pairs-of-items-in-a-python-list and pass it to Counter . Comment : I don t have a choice regarding data structure . Obviously I am a total newb at Python sorry for the wall of code . I really want to be a good member of the SO community and I greatly appreciate any help given .. . Answer : It is not necessary to use the collections module to implement a working solution : .. . .. . Example 1 .. . .. . .. . .. . The following code shows how you can use collections.defaultdict to do as you asked : .. . .. . Example 2 .. . .. . .. . .. . You may also use functools.partial instead of a lambda when creating the defaultdict . Example 3", "Question : This question is an extension of a previous question : rebuild python array based on common elements http : stackoverflow.com questions 34503916 rebuild-python-array-based-on-common-elements - but different enough to warrant a new question : .. . .. . I ve been struggling with this for a bit now . My data is an array of dictionaries from an sql query . Each element in the array represents a shipment and there are common values based on the keys . The output I want is grouped according to specific keys .. . .. . I can get the grouping with a single level using defaultdict and list-comprehension as provided by the previous question and modified slightly .. . .. . But I can t seem to get the second level in the output array - the grouping b the PartNum key . Through some research I think what I need to do is use defaultdict as the type of the outer defaultdict like so : .. . .. . which throws errors because defaultdict returns a function so I need to use lambda yes My question is how to access the second level array in the loop and tell the inner defaultdict what to group on PartNum The data comes to me from the database programmer and the project keeps evolving to add more and more data keys so I d like this solution to be as general as possible in case more data gets thrown my way . I was hoping to be able to chain the defaultdicts depending on how many levels I need to go . I m learning as I m going so I m struggling trying to understand the lambda and the basics of the defaultdict type and where to go from here . Comment : Sort the dict then apply groupby https : docs.python.org 3 library itertools.html itertools.groupby . Or do it beforehand with SQL if you can . I cannot help you more now I am on a mobile phone.. . Comment : Can there be two delKey s with the same number value for a PartNum Comment : How many items in your actual data Comment : Potentially tens of thousands in the original data set . Comment : Do you care about the order of the values in the lists in your output If not you could easily get rid of those levels and make your structure just a nested set of dictionaries . Tree lambda : defaultdict Tree is all the setup you need for that kind of structure . .. . Answer : This is the prettiest way I could do it . It uses the same defaultdict idea to implement proper grouping as python s builtin groupby function only works on ordered data . Note that this version will mutate the items in the input dataset so the leaf items in the result are the same dict instances as the input but with CustName and PartNum entries deleted . .. . .. . EDIT : .. . .. . Just in the case somebody needs it in the future here is a version that does not mutate the original data : Comment : Could there be consequences to mutating the original data Is the function groupby mutate accomplishing its task through a side affect Comment : Yes it is . The groupby mutate function is not really reusable it is designed specially to fit in this situation I hardly doubt it could be used elsewhere . Comment : @wwii : If it has consequences depends on the context . For data directly coming from a service it should be fine if the original data instance is not used by another component of the software Comment : I did not want to mutate the data . I would have to add some tests to verify the data hasn t been corrupted ." ] }
[ "yes-answer-long", "yes-answer-short" ]
subclass
UNK_RELATION
xsd-1.1@xsd@51
xsd-1 .1 -- use this tag for questions specific to @placeholder version 1.1 the successor to xsd-1 .0 .
{ "confidence": [ 52.21148681640625, 50.523887634277344, 49.774024963378906, 49.47273254394531, 48.72046661376953, 47.74567794799805, 47.74567794799805, 47.65472412109375, 47.48991012573242, 46.08805847167969, 46.08805847167969, 45.80048751831055, 44.46725845336914, 44.27070236206055, 44.27070236206055, 44.121917724609375, 43.8919677734375, 43.730934143066406, 43.08149337768555, 42.20983123779297, 42.20983123779297, 42.20983123779297, 42.20983123779297, 41.91357421875, 41.82997131347656, 41.82997131347656, 41.82997131347656, 41.82997131347656, 41.82997131347656, 41.42163848876953, 41.3620719909668, 41.3620719909668, 41.3620719909668, 41.25745391845703, 40.602325439453125, 40.28120422363281, 40.28120422363281, 40.28120422363281, 40.101287841796875, 40.101287841796875, 39.92671203613281, 39.50947570800781, 39.50947570800781, 39.47284698486328, 39.43504333496094, 38.92129135131836, 38.83642578125, 38.7451057434082, 38.523868560791016, 38.523868560791016, 38.523868560791016, 38.523868560791016, 38.523868560791016, 38.523868560791016, 38.523868560791016, 38.523868560791016, 38.523868560791016, 38.523868560791016, 38.16855239868164, 37.956695556640625, 37.835811614990234, 37.756526947021484, 37.756526947021484, 37.537071228027344, 37.43936538696289, 37.26847457885742, 37.20331954956055, 36.88051223754883, 36.84075927734375, 36.6944694519043, 36.6944694519043, 36.43317413330078, 36.415321350097656, 36.415321350097656, 36.332645416259766, 36.294219970703125, 36.21733093261719, 36.07588195800781, 35.49555587768555, 35.031009674072266, 34.76394271850586, 34.62533950805664, 34.270729064941406, 34.070560455322266, 34.070560455322266, 34.070560455322266, 34.070255279541016, 34.058197021484375, 34.04230499267578, 33.38780975341797, 33.19454574584961, 32.667091369628906, 32.60825729370117, 32.60825729370117, 32.60825729370117, 32.60747528076172, 32.58390808105469, 32.26029968261719, 31.97833251953125, 31.913604736328125 ], "content": [ "My XSD is : .. . .. . Requirement is : .. . .. . 1 .", "XSD 1.1", "This is about XSD 1.1 .", "In XSD 1.1 though I would probably use an assertion : assert test value 1 9 to 12 15 to 20", "You will need XSD 1.1 use an assertion .", "Can you use XSD 1.1", "Are you able to use XSD 1.1", "Any solution in XSD 1.1 or XSD 1.0 is welcomed .", "To process an XSD 1.1 schema you need an XSD 1.1 schema processor .", "Is that possible with xsd-1.1", "@kjhughes XSD 1.1 is no problem", "Appendix G.1 https : www.w3.org TR xmlschema11-1 changes of the XSD v1.1 Recommendation https : www.w3.org TR xmlschema11-1 summarizes the changes compared to XSD v1.0 .", "https : stackoverflow.com questions 20807066 how-to-validate-xml-against-xsd-1-1-in-java 31889170 31889170", "libxml2 does not support XSD 1.1 .", "This can be done using XSD 1.1 .", "How can I convert an XSD 1.1 schema to an XSD 1.0 schema automatically by stripping out all the 1.1 features and leaving only the subset that is compatible with XSD 1.0", "XSD 1.1 is required for xs : assert but JAXB only supports XSD 1.0 not XSD 1.1 https : java.net jira browse JAXB-994 .", "Is XSD 1.1 an option for you", "I am not sure if the latest version of libxml2 supports XSD 1.1 or not .", "Using XSD 1.1 is it possible to assert that an attribute exists somewhere else .", "I want to write an XML schema xsd-1.1 for a document containing options .", "@JeremyThompson Visual Studio does not support xsd-1.1 which is needed for this structure .", "I am creating a schema in XSD 1.1 for crossword puzzles .", "Is there a java library that supports XSD 1.1 .", "Is it possbile to solve this problem with assertion of xsd-1.1", "It works only with XSD 1.1 due to the assert tests .", "There is also a commercial XSD 1.1 implementation from Altova .", "Are there any 1.1 XSD compatible editors for linux", "value holds the value in an XSD 1.1 assertion .", "We can use this to mark the xs : assert in an example from the XSD 1.1 spec as a 1.1-only feature : .. . .. . Any XSD 1.1 processor is required to understand the vc : namespace and filter the schema document accordingly accepting things with vc : minVersion less than or equal to 1.1 or vc : maxVersion greater than 1.1 and so on .", "I can also use XSD 1.1 but how do I do it there", "If you can use XSD 1.1 as @lexicore suggested it would work .", "The sample shows a pretty natural use of inheritance in XSD 1.1 .", "xsd :", "I realize that this would impose restrictions on how many XSD 1.1 features you could take advantage of but the use-case I m imagining is a schema where you publish both an XSD 1.1 version and a more compatible XSD 1.0 version with both describing the same data structure but with the 1.1 version having a few additional assert data integrity checks .", "But those libraries do not understand XSD 1.1 so you would have to have an XSD 1.0 document to feed them .", "Could you transform an XSD 1.1 schema into an XSD 1.0 schema for your purpose", "Your error indicates that you re trying to parse a 1.1 XSD using a 1.0 XSD processor .", "In order to make it work in a XSD 1.1 assert you can use axe descendant-or-self .", "Note that I ve already shown you an example of how to use XSD 1.1 assertions http : stackoverflow.com a 37129215 290085 .", "If you are imagining the publication of both a 1.1 schema and a related 1.0 schema then probably the simplest and best way is to use the vc : namespace described in the XSD 1.1 specification .", "I could not get a clear answer from the W3C recommendation for XSD 1.1 http : www.w3.org TR 2012 REC-xmlschema11-1-20120405 .", "You can do this using XSD 1.1 s Conditional Type Assignment http : www.w3.org TR xmlschema11-1 cTypeAlternative :", "It supports both XSD 1.1 validation and XSL transformation .", "The simplest way to handle this is probably to use XSD 1.1 and use an assertion on the parent to specify that there must be exactly or at most four children .", "Property saxon.sf.net feature xsd-version http : saxon.sf.net feature xsd-version is not recognized .", "I have reviewed posts regarding assertion and alternatives available in xsd-1.1 but I can t see how to apply it to my specific need .", "I tried to generate the XSD in XSD schema generator http : www.freeformatter.com xsd-generator.html but it made the surname and id element minOccurs 0 .", "How can I write an XSD 1.1 syntax for this simple problem", "This is the sort of case covered by conditional type assignment in XSD 1.1 .", "I have to transform an XSD 1.1 schema to an c class .", "You can create your own XSD 1.1 parsing support .", "And I m not aware of any other XSD 1.1 implementations available on the .NET platform .", "Does libxml2 latest release supports XSD 1.1 for XML validation", "See also Is it possible to validate an XML file against XSD 1.1 in Python", "What to do : .. . .. . Vote for support to be added to JAXB for XSD 1.1 .", "For XSD 1.1 your choices at present appear to be Saxon and Xerces J .", "Load Saxon or Xerces in the normal way and then enable XSD 1.1 processing .", "Maybe you know whats wrong for me : stackoverflow.com questions 35941613 https : stackoverflow.com questions 35941613 example-to-validate-a-xml-file-against-an-xsd-v1-1-schema-in-java-1-8", "I have to validate an XML with an XSD .", "There is a version of Apache Xerces that supports XSD 1.1 but I can t give you any help with it I m afraid .", "I am trying to write an XSD 1.1 -file matching a pretty simple XML .", "I am having difficulty writing an XSD I m working on using XML Schema 1.1 .", "Two xsd file was created qrda.xsd and qrda1.xsd and the following command was used to generated the c class xsd qrda.xsd qrda1.xsd c", "Parse the XSD with validation turned off so that you re reading it as a raw XML file then it won t matter whether it s a 1.0 or 1.1 XSD .", "possible duplicate of Conditional on value in xsd http : stackoverflow.com questions 25658953 conditional-on-value-in-xsd", "You won t be able to enforce such a constraint using XSD 1.0 alone would need to use optionality in XSD 1.0 and then tie things down outside of XSD .", "To validate these XMLs in an XSD I decided to use groups within a choice .", "Saxon-EE 9.7 offers .. . As well as a fully conformant XSD 1.0 and XSD 1.1 schema processor and ... . Since I dont want to spend money for a XSD1.1 validator added to post 1 I quess I cannot use Saxon that s correct", "For example your XSD would allow x 1 x 2 x 3 x 4 .", "line 77 of file : C : Users .. . ICSv1.01.xsd .. . .. . ERROR s4s-elt-invalid-content.1 : The content of ICSDocBody is invalid .", "Document test.xml has not been parsed correctly : Property saxon.sf.net feature xsd-version http : saxon.sf.net feature xsd-version is not recognized .", "Suppose that your schemas are unknown in advance and or making heavy use of new XSD 1.1 features .", "I don t think you can use the JAXP service mechanism to search for an XSD 1.1 processor .", "But I m not able to parse the XSD in to XSModel with the assert tag present .", "So how should I correct the XSD code", "Unfortunately neither the JDK bundled version as of Java 8 nor the latest official version from maven-central 2.11.0 contains XSD 1.1 implementation .", "complete XSD .. . .. . How to write restriction or OR conduction in XSD .", "If you stay clear of all changes other than the use of xsd : assert that you mentioned you could use a simple XSLT transformation to maintain the mapping from your v1.0 XSD to your v1.1 XSD :", "The thing is there is nothing to add to this question in my opinion than what Glenn already put in : he wants an XSD 1.1 solution for co-constraints period .", "In XSD 1.1 assertions can only look down into the subtree not up or over so if you want to use assertions here you will want to put them not in the type for state but in the type for address : .. . .. . A different approach also in XSD 1.1 is to use conditional type assignment .", "Not sure if this is possible but I would like to validate with xsd version 1.1 that variables used in an xml document are specified in a different section of the same document .", "But I it does not support XSD v1.1 .", "As far as I am aware the only XSD 1.1 processor available on the .NET platform is Saxonica s .", "The problem I am having is that I want to validate against XSD 1.1 and not 1.0", "I am trying to create a schema definition using XSD 1.1 in which outcome of one element is dependent on other .", ".. . .. . .. . .. . .. . So as I understand in XSD 1.1 XPath compatibilty mode is false so an assertion result is implementation-dependant so a XML document shoud be valid against the same XSD depending on validator implementation .", "XSD 1.1 .. . .. . Here s how use xs : assert to make IBAN be mandatory when TYPE INTERNATIONAL :", "However given that you re in control of the v1.1 XSD there s hope .", "You can use xs : assert in XSD 1.1 : .. . .. . Then this XML document will be valid : .. . .. . And this XML document will be invalid : .. . .. . Just change the 12 to 120 after testing .", "You could use xs : uniqe which is also valid in XSD 1.0 .", "stackoverflow.com questions 2396903 http : stackoverflow.com questions 2396903 java-xml-validation-against-xsd-schema", "You most probably can t with XSD 1.0 .", "XSD 1.0 just isn t expressive enough .", "I will load the class and xsd file soon .", "Use case 1 .. . .. . Here is a valid document for this schema. .", "I don t really care about the tool as long is it is a free linux tool supporting xsd-1.1 statements like assert .. . .. . So far I have found tried : .. . .. . xmllint seems it does not support XSD 1.1 Schema", "i.e i was looking for parser API to get values of tag so that solution is generic to any XSD .", "I am using XSD 1.1 but I can t parameterize the schema to require exactly 21 rows cells because it needs to accommodate puzzles with different sized grids e.g . 15x15 .", "XSD Or conduction does not make sense ." ] }
{ "confidence": [ 62.84870910644531, 58.46807861328125, 53.837921142578125, 53.68931579589844, 53.05915451049805, 52.16484451293945, 51.38262176513672, 51.17621612548828, 51.119388580322266, 51.11491012573242, 50.922760009765625, 49.53428649902344, 49.46969223022461, 48.85565948486328, 48.20335388183594, 48.095481872558594, 47.53742980957031, 47.07853317260742, 46.63762283325195, 46.21210861206055 ], "content": [ "Question : How can I convert an XSD 1.1 schema to an XSD 1.0 schema automatically by stripping out all the 1.1 features and leaving only the subset that is compatible with XSD 1.0 I realize that this would impose restrictions on how many XSD 1.1 features you could take advantage of but the use-case I m imagining is a schema where you publish both an XSD 1.1 version and a more compatible XSD 1.0 version with both describing the same data structure but with the 1.1 version having a few additional assert data integrity checks . .. . Answer : As you anticipate no general case conversion is possible . However given that you re in control of the v1.1 XSD there s hope . Appendix G.1 https : www.w3.org TR xmlschema11-1 changes of the XSD v1.1 Recommendation https : www.w3.org TR xmlschema11-1 summarizes the changes compared to XSD v1.0 . In short don t rely upon any new constructs or behaviors described in Appendix G.1 . If you stay clear of all changes other than the use of xsd : assert that you mentioned you could use a simple XSLT transformation to maintain the mapping from your v1.0 XSD to your v1.1 XSD :", "Question : I have an XML file like this .. . .. . I d like to make an XSD so that if the value of the attribute type is 1 the name and surname elements must be present and when it s 2 name and id must be there . I tried to generate the XSD in XSD schema generator http : www.freeformatter.com xsd-generator.html but it made the surname and id element minOccurs 0 . How could I make it work Comment : This is the sort of case covered by conditional type assignment in XSD 1.1 . Are you able to use XSD 1.1 You won t be able to enforce such a constraint using XSD 1.0 alone would need to use optionality in XSD 1.0 and then tie things down outside of XSD . Comment : @kjhughes XSD 1.1 is no problem .. . Answer : You can do this using XSD 1.1 s Conditional Type Assignment http : www.w3.org TR xmlschema11-1 cTypeAlternative :", "Question : I have installed Xerces through Maven : .. . .. . I then tried the code given in this example from the Xerces FAQ http : xerces.apache.org xerces2-j faq-pcfp.html faq-4 to validate a XML file against a schema in version 1.1 . This is my code : .. . .. . The code only yields this exception : .. . .. . Seems like I failed to configure install Xerces correctly . Please help me get this working the XML files force me to use the schema in 1.1 I got a normal validator for 1.0 running but I have huge problems with this . I appreciate every hint Comment : stackoverflow.com questions 2396903 http : stackoverflow.com questions 2396903 java-xml-validation-against-xsd-schema Comment : That didn t help . The problem I am having is that I want to validate against XSD 1.1 and not 1.0 Comment : check my edited answer . .. . Answer : I think they have added version 2.11 to maven now . The following dependency in Maven works out-of-the-box : Comment : Out of the box is different . Maybe you know whats wrong for me : stackoverflow.com questions 35941613 https : stackoverflow.com questions 35941613 example-to-validate-a-xml-file-against-an-xsd-v1-1-schema-in-java-1-8", "Question : How can I convert an XSD 1.1 schema to an XSD 1.0 schema automatically by stripping out all the 1.1 features and leaving only the subset that is compatible with XSD 1.0 I realize that this would impose restrictions on how many XSD 1.1 features you could take advantage of but the use-case I m imagining is a schema where you publish both an XSD 1.1 version and a more compatible XSD 1.0 version with both describing the same data structure but with the 1.1 version having a few additional assert data integrity checks . .. . Answer : If you are imagining the publication of both a 1.1 schema and a related 1.0 schema then probably the simplest and best way is to use the vc : namespace described in the XSD 1.1 specification . You can use the vc : namespace to mark 1.1 features like the assertions you mention or the declarations containing them and to supply 1.0 equivalents or near-equivalents . We can use this to mark the xs : assert in an example from the XSD 1.1 spec as a 1.1-only feature : .. . .. . Any XSD 1.1 processor is required to understand the vc : namespace and filter the schema document accordingly accepting things with vc : minVersion less than or equal to 1.1 or vc : maxVersion greater than 1.1 and so on . So the schema document with the vc : attributes can be shipped as a 1.1 schema . A conforming 1.0 processor could be updated to understand the vc : namespace but I don t know of any that have been . So for use by 1.0 processors the schema document needs to be filtered before they see it . Like kjhughes I think an XSLT stylesheet is probably your best bet for that filtering . But using the vc : namespace makes it easy to do reliably and does not require that the schema author minimize the use of 1.1 features in order to simplify the transformation . It s easy enough to write a stylesheet to perform the necessary filtering but in fact you don t have to : There is an XSLT 1.0 stylesheet http : www.blackmesatech.com 2009 04 xsd.vc.xsl that does the job full disclosure I wrote it . There used to be a working online demo http : www.blackmesatech.com 2009 04 vc.html as well but I see that bit rot has set in and it doesn t seem to work in current browsers I ll fix it when I have time . The documentation http : www.blackmesatech.com 2009 04 vcdoc.html may still be useful .", "Question : I have XML that I want to validate using an XSD . It s actually a simple scenario but I could not find the right answer . This is the XML : .. . .. . I want to make sure that the data element contains 4 point elements and that there is only one with x element count only one with x maxtime .. . .. . .. . What I have now is the following : .. . .. . This validates correctly but it does not guarantee that there is only 1 count only 1 maxtime Comment : You most probably can t with XSD 1.0 . Can you use XSD 1.1 Comment : I can also use XSD 1.1 but how do I do it there Comment : If I have understand your problem right its also possible in XSD 1.0 using xs : unique see my answer . .. . Answer : This constraint you can do simply with XSD 1.0 s minOccurs 4 and maxOccurs 4 . .. . .. . and that there is only one with x element count only one with x maxtime.. . .. . .. . This constraint would have to be done out-of-band in code if you re stuck with XSD 1.0 . .. . .. . Update : However see @sergioFC s good XSD 1.0 idea about xs : unique http : stackoverflow.com a 27317740 290085 if the intent is simply to have all x values be unique within data . If you can use XSD 1.1 as @lexicore suggested it would work . Use xs : assert :", "Question : I have installed Xerces through Maven : .. . .. . I then tried the code given in this example from the Xerces FAQ http : xerces.apache.org xerces2-j faq-pcfp.html faq-4 to validate a XML file against a schema in version 1.1 . This is my code : .. . .. . The code only yields this exception : .. . .. . Seems like I failed to configure install Xerces correctly . Please help me get this working the XML files force me to use the schema in 1.1 I got a normal validator for 1.0 running but I have huge problems with this . I appreciate every hint Comment : stackoverflow.com questions 2396903 http : stackoverflow.com questions 2396903 java-xml-validation-against-xsd-schema Comment : That didn t help . The problem I am having is that I want to validate against XSD 1.1 and not 1.0 Comment : check my edited answer . .. . Answer : I will add another answer because for me this dependency did not work same error as described by OP : .. . .. . I quess 2.11.0 should be newer than 2.11.0.beta but it seems like xsd1.1 is not supported in that version Instead only the following dependency lead to a working XSD1.1 validation for me : .. . .. . Found in this SO thread : How to validate XML against XSD 1.1 in Java https : stackoverflow.com questions 20807066 how-to-validate-xml-against-xsd-1-1-in-java 31889170 31889170 Comment : Thank you that works for me as well . Do you have any information who develops this version 2.12 or if it is official I could not find any information about 2.12 on the official Apache Xerces website . Comment : Me neither I just struggled over the linked Stack Overflow thread from where I got the working dependency . Maybe the author of the post knows more .", "Question : What is the best way to validate XML files against XML Schema 1.1 in Java I took the code from this tutorial http : www.ibm.com developerworks xml library x-javaxmlvalidapi index.html and changed the line where it looks up the factory to use XML Schema 1.1 as I have seen in this code example from the Xerces FAQ http : xerces.apache.org xerces2-j faq-pcfp.html faq-4 . This is my code : .. . .. . The code throws this exception : .. . .. . As I see it I have exactly the same imports as the code snippet in the Xerces FAQ . I even tried to add Xerces to my Maven dependencies but that didn t help either . Cheers : Comment : Where http : www.w3.org XML XMLSchema v1.1 came from Comment : @PM77-1 w3.org TR xmlschema11-1 langids http : www.w3.org TR xmlschema11-1 langids Comment : It seems that javax.xml uses W3C XML SCHEMA NS URI http : docs.oracle.com javase 7 docs api javax xml XMLConstants.html W3C XML SCHEMA NS URI for this purpose . Comment : If I use that it s the 1.0 schema . .. . Answer : I don t think you can use the JAXP service mechanism to search for an XSD 1.1 processor . Load Saxon or Xerces in the normal way and then enable XSD 1.1 processing . For Saxon this is done using Comment : I meant use SchemaFactory.newInstance after putting Xerces or Saxon on the classpath and or setting the appropriate system property to determine which processor you want to load . Comment : Its not working for i have set class both of both jar . Comment : Then raise a new question and say exactly what you did and exactly how it failed . We can t help you on the basis of one ungrammatical sentence . Comment : Does not work for me . Whats the minimum Java Saxon version I need Document test.xml has not been parsed correctly : Property saxon.sf.net feature xsd-version http : saxon.sf.net feature xsd-version is not recognized . Property saxon.sf.net feature xsd-version http : saxon.sf.net feature xsd-version is not recognized . Stacktrace : .... . Comment : It would be nice to have the full code . . I dont know what is the normal way to load Saxon or Xerces and I have to google to figure out how to set the appropiate system-properties", "Question : Does libxml2 latest release supports XSD 1.1 for XML validation I am using libxml2 v2.6.30 for XML validation with XSD schema 1.0 . But I it does not support XSD v1.1 . I am not sure if the latest version of libxml2 supports XSD 1.1 or not . Any idea Comment : Not likely . It s a lot of work and I ve not heard about any such effort even beginning . See also Is it possible to validate an XML file against XSD 1.1 in Python http : stackoverflow.com q 19809141 290085 and How to use libxml2 validate a xml with a schema in version 1.1 http : stackoverflow.com q 26668140 290085 . Comment : Thank you . It seems a lot of work . .. . Answer : libxml2 does not support XSD 1.1 . I found it ultimately after working with libxml2 extensively .", "Question : I have to transform an XSD 1.1 schema to an c class . The problem is that xsd.exe does not support XSD 1.1 in fact if I try to create an c class from that schema I get this error : .. . .. . Notice validation scheme : Element http : www.w3.org 2001 XMLSchema : assert not supported in this context . .. . .. . How can I get around this .. . Answer : There is no easy way around this . Customizing xsd.exe behavior is generally possible even easy . It is just a thin layer atop .NET libraries System.Xml . But those libraries do not understand XSD 1.1 so you would have to have an XSD 1.0 document to feed them . And if you can convert your schemas into the older specification language then you can use the unmodified xsd.exe as well . Could you transform an XSD 1.1 schema into an XSD 1.0 schema for your purpose In some instances it might be easy . For example a very simple XSLT transform can filter out asserts replace the new datatypes by suitable XSD 1.0 datatypes and the like . However the general case is somewhere between hard and unsolvable . Let s see where XSD 1.1 adds features that you can t just ignore : .. . .. . Sample taken from here http : www.ibm.com developerworks library x-xml11pt1 index.html . That s a great starting point for estimating whether your particular schemas could be expressed in or converted to XSD 1.0 . The sample shows a pretty natural use of inheritance in XSD 1.1 . All that the derived type really does is banning the member tns : a . To do the same thing in XSD 1.0 the type would need to list tns : a with maxOccurs 0 and the corresponding C class will contain the a member whether you want it or not . Such a downgrade transformation from XSD 1.1 to XSD 1.0 is still relatively easy to put together to serve this simple example but basically impossible when you need to map particles across a whole inheritance hierarchy with such restricted optional members and or wildcards . XSD 1.0 just isn t expressive enough . Now to the general question . Suppose that your schemas are unknown in advance and or making heavy use of new XSD 1.1 features . You won t be able to convert them to XSD 1.0 and so the .NET base-class library won t help you generate C classes from them . You have two or three options left : .. . .. . You can create the deserialization classes manually . You won t be able to validate and deserialize but you will be able to deserialize a valid document including enforcing proper attribute defaults a typical side effect of validation that you will want to keep . You can create your own XSD 1.1 parsing support . A very big project although you can ignore a lot of the schema such as the whole XSLT 2.0 spec for asserts and still be able to end up with somewhat natural C classes . You can take an existing third party library with this feature . An empty set to choose from at the moment I suspect . Saxon s API does not generate deserialization classes from the schema . And I m not aware of any other XSD 1.1 implementations available on the .NET platform . Comment : Thanks Jirka your answer is very comprehensive unfortunately I was in a hurry to achieve integration and so I used a trick : I removed the 1.1 tag that fortunately was only assert : Comment : @user3568107 - Feel free to expand your experience into a parallel answer or I can edit mine to make this more obvious to the large crowd of people who nearly only need 1.0 schemas .", "Question : I have XML that I want to validate using an XSD . It s actually a simple scenario but I could not find the right answer . This is the XML : .. . .. . I want to make sure that the data element contains 4 point elements and that there is only one with x element count only one with x maxtime .. . .. . .. . What I have now is the following : .. . .. . This validates correctly but it does not guarantee that there is only 1 count only 1 maxtime Comment : You most probably can t with XSD 1.0 . Can you use XSD 1.1 Comment : I can also use XSD 1.1 but how do I do it there Comment : If I have understand your problem right its also possible in XSD 1.0 using xs : unique see my answer . .. . Answer : You could use xs : uniqe which is also valid in XSD 1.0 . In addition in order to do that I think you should change minOccurs as user kjhughes has said in his answer . Comment : This is a good idea and may help OP however note that ensuring that all x elements are unique is not the same as requiring there be only one of x elements with certain string values . For example your XSD would allow x 1 x 2 x 3 x 4 . It would also disallow x count x maxtime x 1 x 1 . Comment : @kjhughes I think that this is correct because the values of x are restricted in the OP enumeration . Comment : Ok you re right about x 1 x 2 x 3 x 4 because of the enumeration restriction which I forgot was there . However your XSD would still disallow x count x maxtime x mean x mean for example . ...But now that I re-read OP s requirement there is a .. . after his only one with constraint so there s a good chance you re right that all are supposed to be unique . Ok you ve got my +1 . - Comment : Thank you : I had also given you +1 because of the correct assertions approach and the occurs info .", "Question : Given XSD : .. . .. . How would I write an assertion so that .. . .. . 1 . if color has @type white or black it cannot also have the @number attribute and .. . 2 . if color has @type red or green it must also have the @number attribute . .. . Answer : XSD 1.1", "Question : I am creating a schema in XSD 1.1 for crossword puzzles . One of my elements is dimensions . Example : .. . .. . The resulting XML would look like dimensions 21x21 dimensions meaning that the puzzle grid is 21 squares by 21 squares . I also have a cell element for every square in the puzzle . So for a puzzle with dimensions of 21x21 I would have 441 instances of cell . Each cell has a coordinates element describing its position in the grid : .. . .. . So the position of the square in the bottom left corner of the grid would be represented by coordinates 21 1 coordinates indicating that it is in the 21st row 1st column . I want to do the following : .. . .. . 1 . Require that there is one cell for every square based on the dimensions . For instance if the dimensions are 21x21 there must be 441 instances of cell --no more no fewer . 2 . Require that the coordinates for each cell are unique and fall within the parameters of the dimensions . In other words for a 21x21 grid each axis of the coordinates must be represented by a number between 1 and 21 and each of the 441 combinations can only be used once . .. . Answer : You will need XSD 1.1 use an assertion . Or you will need to parameterize your schema and probably reorganize your XML a bit to enforce the constraint in a different way e.g . by having the schema require exactly 21 rows each with exactly 21 cells . Comment : I am using XSD 1.1 but I can t parameterize the schema to require exactly 21 rows cells because it needs to accommodate puzzles with different sized grids e.g . 15x15 . So how would I write an assertion that can make the parameters dependent on the dimensions Comment : If you MUST use exactly the same schema for all puzzles then of course parameterizing it won t work . But needing to accommodate puzzles of different sizes is a reason to parameterize it not a reason you cannot do so . On how to use assertions -- what have you tried so far Comment : I guess I could create a set of schemas for common grid types and dimensions but that s probably outside the scope of this project which is for school I m trying to create a TEI-derived TEI-inspired schema for encoding unconventional texts with lots of structure like word puzzles . I barely understand assertions I just learned what they are yesterday when I posted this related question : stackoverflow.com questions 37127791 http : stackoverflow.com questions 37127791 control-element-cardinality-based-on-an-attribute-enumeration-in-xsd so I haven t attempted one yet .", "Question : I have been using XSOM parser xsom-20140925.jar for parsing XSD 1.0 and able to achieve parsing all xs : elements and restrictions like pattern minOccurs etc. . . Lately our XSD1.0 been upgraded to version XSD1.1 where new assert tag been included . My XSOM parser fails to identify this assert tag and throws the following exception . Could not parse the inputstream : org.xml.sax.SAXParseException : Unexpected xsd : assert appears at line . java.lang.NullPointerException .. . .. . Basically my need is to automate all restrictions in XSD to JavaScript Functions so that client-side UI can be validated . I have done Googling and understand that Xerces-j can only validate an XML against XSD1.1 . But my requirement is to parse assert values and convert in to JavaScript functions . Consider the following assert example : Here I need to parse the value between double quotes and arrive an JavaScript function according to the conditions . Is there a way to achieve the above requirement Any help or suggestions would help me a lot . ............................................................................. . Thanks for your answer . By turning off the sax validaiton would allow me to parse the assert tag value . But my requirement is to convert those assert values show below which is XSD1.1 feature in to a Java Regular expression or any expression which could be evaluated and also I should have the proper links i.e to which element this assert tag pertains to . I understand xercesImpl-xsd11-2.12-beta has Xpath2.0 processor which can be used . But I m not able to parse the XSD in to XSModel with the assert tag present . XSD FILE USED : .. . .. . Java Code to parse : .. . .. . System.setProperty DOMImplementationRegistry.PROPERTY org.apache.xerces.dom.DOMXSImplementationSourceImpl .. . .. . On executing the following error is shown in console : Error testxsdassert.xsd : 17 : 65 : s4s-elt-invalid-content.1 : The content of NodeType is invalid . Element assert is invalid misplaced or occurs too often . Any leads or suggestion would help me . Thanks . ............................................................................... . Sorry for not being clear on the requirement . Let me try it again . 1 . Existing XSOM parser see below code will parse any XSD and retrieve all restriction like MINLENGTH MAXLENGTH PATTERN ENUMERATION against any element present in XSD . This parser intention is to just parse these values and store against its element name . For the below example parser.xsd this structure is derived- allowedMonths JAN FEB .. . .. . After parsing i would convert the parsed structure allowedMonths JAN FEB in to JavaScript function where this function is called in UI validation to check the user entered value is accordance to XSD dynamically . This was working fine till now . This solution was to automate such that on any new additions in XSD this parser shall take care the JS code generation . 2 . Requirement : Now XSD had been enhanced to include to have cross field validations . So eventually i had to enhance my parser to capture these assert for each element and arrive JavaScript functions for each element of XSD . SO I need to find a way to parse these assert values present in any simple and complex type elements . Your suggestion of parsing as raw type XML doesn t seem to fit in to my existing XSOM parser . i.e i was looking for parser API to get values of tag so that solution is generic to any XSD . Any suggestions on this approach would help to solve the issue . Comment : Your edit hasn t helped to explain your goal . Your error indicates that you re trying to parse a 1.1 XSD using a 1.0 XSD processor . Since you say that all you really want is to get at the xs : assert @test value I suggested http : stackoverflow.com a 33151415 290085 that you just parse the XSD as a raw XML file without validation but you ve not explained why that doesn t meet your needs . Comment : Your stated goal has to do with generating JavaScript from the results of your parsing of xs : assert elements and I suspect there may be a bit of a XY problem http : meta.stackexchange.com questions 66377 what-is-the-xy-problem going on here . Sorry but it s too unclear what your real end goal is . Good luck with your project . Comment : @kjhughes I had edited again to explain my goal . .. . Answer : Parse the XSD with validation turned off so that you re reading it as a raw XML file then it won t matter whether it s a 1.0 or 1.1 XSD . Set https : xerces.apache.org xerces2-j features.html the http : xml.org sax features validation https : xerces.apache.org xerces2-j features.html validation feature to false : Comment : I had edit my question to elaborate . Comment : i had edited again to elaborate Comment : I think DocumentBuilderFactory cant be used with XSOM parser . I tried using SAXParserFactory like this SAXParserFactory saxFactory SAXParserFactory.newInstance saxFactory.setValidating false saxfactory.setfeature xml.org sax features validation quot http : xml.org sax features validation quot false Then passing the factory while initializing the XSOM Parser XSOMParser parser new XSOMParser saxfactory Even by then i m getting the same SAXException . Could you please suggest on this", "Question : We were provided a set of schemas from a vendor we have alerted them to the error as well . When I try to generate the Java classes using xjc it fails with the error below .. . .. . parsing a schema.. . .. . .. . ERROR s4s-elt-invalid-content.1 : The content of ICSBatchV01 is invalid . Element assert is invalid misplaced or occurs too often . line 77 of file : C : Users .. . ICSv1.01.xsd .. . .. . ERROR s4s-elt-invalid-content.1 : The content of ICSDocBody is invalid . Element assert is invalid misplaced or occurs too often . line 215 of file : C : Users .. . ICSv1.01.xsd .. . .. . Failed to parse a schema . I also tried java-8 and the latest and greatest jaxb outside of java dist .. . .. . However it does work with Altova s xmlspy software but trying to avoid vendor lock-in non standard stuff . I did some searching here and the web mostly here .. . .. . Here is the header . Here is the relevant snippet . Starting at line 44 and ending at line 77 where the xjc convert reported the first error .. . Answer : XSD 1.1 is required for xs : assert but JAXB only supports XSD 1.0 not XSD 1.1 https : java.net jira browse JAXB-994 . What to do : .. . .. . Vote for support to be added to JAXB for XSD 1.1 . https : java.net jira browse JAXB-994 .. . In the meantime analyse the XSDs for 1.1 dependencies . If mild such as only use of xs : assert write a simple XSLT transformation to strip xs : assert validations so that you can still generate classes . See XSLT below . Optionally as needed implement the xs : assert checks in Java code manually . XSLT to strip xs : assert : Comment : Thank you kjhughes I manually removed the xs : asserts and got some other errors which I unfortunately dont have handy Comment : I found the scratchpad of the errors after manually removing the asserts After removing all asserts C : perforce COMMON ICSv1.01 C : Program Files x86 Java jdk1.7.0 80 bin xjc.exe -d src main java -p com.netdeposit.ics src main resources ICSv1.01.xsd parsing a schema.. . ERROR Property Any is already defined . Use lt jaxb : property to resolve thi s conflict . line 177 of file : C : perforce COMMON ICSv1.01 src main resources ICSv1.01.xsd ERROR The following location is relevant to the above error line 178 of file : C : perforce COMMON ICSv1.01 src main resources ICSv1.01.xsd Comment : @unsavorycoder : You re welcome . If these new errors are still a problem please post a new question you might want to link-to it here .", "Question : I have been trying for several days now to get a linux command-line validation of XML against an 1.1 Schema XSD to work . I don t really care about the tool as long is it is a free linux tool supporting xsd-1.1 statements like assert .. . .. . So far I have found tried : .. . .. . xmllint seems it does not support XSD 1.1 Schema I have used xmllint in the past for xsd-1.0 very successfully .. . .. . Newest Version of Saxon only supports XSD validation with Enterprise Edition EE - which I don t have . numerous threads here on stackoverflow including a tool one of them provided .. . .. . Supposedly it is as easy as calling java com.saxonica.Validate options source.xml.. . .. . .. . I have to use -xsdversion : 1.1 when calling the validator .. . .. . Many people claiming it works with Saxon-B but no concrete example .. . .. . I have downloaded the source for Saxon-B saxon 9.1.0.8 from SF but to no avail in finding the com.saxonica.Validate class shouldn t it be net.sf.saxon . .. . .. . .. . Calling for example : .. . .. . . java -cp path to saxon libs lib saxon-9.1.0.8.jar com.saxonica.Validate home myuser test.xml Fehler : Hauptklasse com.saxonica.Validate konnte nicht gefunden oder geladen werden .. . .. . Main Class could not be found Oviously I need to provide more options to validate against a schema but since the class can not be found .. . .. . .. . Running Java 1.7 build 71 .. . .. . bin . java -version java version 1.7.0 71 Java TM SE Runtime Environment build 1.7.0 71-b14 Java HotSpot TM 64-Bit Server VM build 24.71-b01 mixed-mode .. . .. . Has anyone got a working example of a tool preferably saxon-B where I can validate XML against XSD 1.1 on linux command Line Thank you .. . .. . e .. . Answer : To use the Saxon schema validator you need Saxon Enterprise Edition the minimum license needed is EEV which costs 90 . You can get a free 30-day evaluation license from www.saxonica.com . Schema processing is not available in the open-source versions of Saxon Saxon-B Saxon-HE and never has been . There is a version of Apache Xerces that supports XSD 1.1 but I can t give you any help with it I m afraid . There is also a commercial XSD 1.1 implementation from Altova . Comment : Thank you Michael I am evaluating the Saxon-EE at the moment so far looking good . Now I just need to get the XPATH-2.0 expression to what I want it to do.. .", "Question : I need a required attribute or element only if a specific value of an enumeration is chosen . Example below : Comment : Aside from some structural issues with your XSD fragment the type of the constraint you request typically requires XSD 1.1 s conditional type assignment or assertion constructs . Is XSD 1.1 an option for you Comment : Thanks for the answer . Yes it is an Option for me . How does this constraint look like .. . Answer : XSD 1.1 .. . .. . Here s how use xs : assert to make IBAN be mandatory when TYPE INTERNATIONAL : Comment : Hey there.. . I like that and it works . Time to get into Schema 1.1 Trank you very much.. .", "Question : I m trying to create an XSD which is supposed to validate the integer value of an XML element . What I want to achieve is to be able to limit this value to both multiple ranges so min maxInclusive won t do and some specific values . Let s give an example . I want the element to be valid if it contains a 1 a number between 9 and 12 or a number between 15 and 20 . I tried to come up with a pattern .. . .. . but that doesn t work because as I understand it the 9-12 part does something like 9 0 1... . because it interprets the 12 not as a whole . With single-digit numbers like .. . .. . it does work . I tried to enclose the multidigit numbers in more parentheses like 9- 12 but to no avail . I could try to use enumerations for this in a way like this : .. . .. . but that s incredibly impractical especially for large ranges . The same goes for the same thing in pattern form : .. . .. . So I see two paths right now : either there is a pattern that I m not able to come up with by myself which allows me to use multiple single numbers and ranges including multidigit numbers or there is a way to somehow do something like .. . .. . It seems to be pretty hard to create such a regex generically as far as I can tell from what my colleagues with more experience with regexes say . Coming up with localized solutions for my exact example here isn t too hard but I m looking for a generic solution with which it is easy to just get an arbitrary list like 1 3-5 9-12 99-999 and make an XSD restriction out of it without too much hassle . From what I see the enumeration approach with splitting the ranges into all the numbers contained seems to be the most likely approach to be actually possible but it would still be incredibly ugly . This is about XSD 1.1 . Maybe there is a completely different approach that I have not stumbled upon yet EDIT : Even though I just self-answered I will leave the question open for today in case someone can come up with something more elegant than the...thing I created . I m not sure about deleting the question - if you think this is not helpful please flag it or something like that . Thank you . .. . Answer : Self-answer : .. . .. . Think the whole morning about it and you have no idea post the question and your brain immediately comes up with a solution afterwards.. . It didn t occur to me that it is possible to actually use multiple min maxInclusives because I thought from the names and such that they would be pretty much unique . Well that s not the case so I came up with this beautiful abomination : .. . .. . Which is exactly the type of generic approach I wanted . Comment : Indeed that is the approach I was going to suggest . There are some people who like to use regular expressions for everything but I m not one of them . In XSD 1.1 though I would probably use an assertion : assert test value 1 9 to 12 15 to 20 Comment : I feel honored by your comment . Interesting possibility which I hadn t considered but what we re trying is to put as much of the structural stuff minInclusive length all that into the Types to keep the assert part as short as possible for multiple reasons . But thanks for teaching me something for potential future applications .", "Question : I am trying to create a schema definition using XSD 1.1 in which outcome of one element is dependent on other . For example I have drop-down for list of countries and list of states for each country . When a person selects a country only the states of that country can be selected . The pseudo-code of what I am trying to attain looks something like this . Please suggest me whether I am following the right approach If I am following the right approach can anyone give me the code of how this restriction can be attained Thanks in Advance.. . Comment : This question may be of help stackoverflow.com questions 13308585 http : stackoverflow.com questions 13308585 xsd-schemas-enumeration-based-on-value-in-document 13313354 13313354 Comment : That solution was using schematron and was using comma separated values in-place of enumeration . Can you please provide a solution which uses the features added in XSD 1.1 like assert test without using schematron and takes enumeration instead of comma separated values . Thank you . Comment : Sorry missed the 1.1 part I haven t used 1.1 yet but from reading spec http : www.w3.org TR xmlschema11-1 cAssertions it looks like you can t use assertions and enumerations together like that @test is simply an XPATH 2.0 that is evaluated in the context of the element being tested . .. . Answer : You re getting close . In XSD 1.1 assertions can only look down into the subtree not up or over so if you want to use assertions here you will want to put them not in the type for state but in the type for address : .. . .. . A different approach also in XSD 1.1 is to use conditional type assignment . This allows an element to be assigned different types based on XPath expressions which can refer to its elements but not its children . If we move country and state to attributes and then for consistency move street and city to attributes as well we could use conditional type assignment this way . First define the various simple types we want for state : .. . .. . Then define three different complex types for the three different kinds of addresses we want . I m assuming for illustration that UK addresses don t get a state attribute . Now we bind the address element to the correct one of these based on the value of country : .. . .. . The alternatives are tested in order and the first one whose test evaluates to true assigns the type . The last alternative without a test attribute provides a default which in this case is the error type no elements or attributes are valid against the error type . Comment : If you want to constrain not just country state value pairs but country state city value triples it s easier to extend the assertion-based solution than the conditional-type-assignment solution . The extension of the assertion to checking city values should be obvious : in addition to the constraint already expressed you want to check that for a given country state pair the city values are drawn from a particular set . You can do that by rewriting the disjuncts : country US and state MA and city Boston Worcester Pittsfield Northhampton Springfield or .. . Comment : Thank you very much C . M . Sperberg-McQueen Comment : I have one last question for you do you know of any java libraries that do XSD 1.1 validation other than Saxon very expensive I am looking for a free one and the only free implementation is xercesImpl-2.11.0.jar which is still in its beta stage . Comment : For XSD 1.1 your choices at present appear to be Saxon and Xerces J .", "Question : I am trying to use the following in an XSD .. . .. . I know assert assertion are part of XML Schema 1.1 but not 1.0 . However everything I have read indicates the namespace is the same for both : http : www.w3.org 2001 XMLSchema .. . .. . A minor problem is that the program I am using to write the Schema Microsoft Visual Studio does not recognize the assert element saying the the element complexType in namespace .. . has invalid child element assert . The main problem is that when I actually try to validate an XML against this schema using xmllint it throws up an error saying .. . .. . Is 1.1 simply not recognized by xmllint visual-studio despite being pointed to the 1.1 namespaces .. . Answer : To process an XSD 1.1 schema you need an XSD 1.1 schema processor . Microsoft does not supply one they seem to have given up implementing new W3C XML specifications . As far as I am aware the only XSD 1.1 processor available on the .NET platform is Saxonica s . Comment : Thank you I am new to xml schema but would have thought the processor would just pull down the latest definition from the namespace you point it to . Are there any 1.1 XSD compatible editors for linux Comment : No you can t expect a processor developed in 1994 to implement a specification published in 2013 . oXygen is an editor that runs on linux and supports XSD 1.1", "Question : Hi is there any way to add conditions on a tag value For example my xml looks like this : .. . .. . I need a XSD Schem that allow not allows these conditions in my xml .. . .. . Thanks Comment : possible duplicate of Conditional on value in xsd http : stackoverflow.com questions 25658953 conditional-on-value-in-xsd Comment : when trying to use xs : assertion I am getting a message : The w3.org 2001 XMLSchema : assertion http : www.w3.org 2001 XMLSchema : assertion element is not supported in this context . .. . Answer : Here is an answer that uses the tags used by the OP . It works only with XSD 1.1 due to the assert tests . While the enumeration of the DateTimeType wasn t part of the question I would use it to limit the values . Without it values such as day or even dAY wouldn t be checked . If they should be allowed the assert statements would have to be expanded . It would be possible to write one long very complex assert statement instead of 4 but with individual statements the error message is more helpful as it is easier which part of the test failed ." ] }
[ "yes-answer-long", "yes-answer-short" ]
xsd
UNK_RELATION
uibarmetrics@metrics@59
uibarmetrics -- uibarmetrics are the constants to specify @placeholder to use for appearance of uibarbuttonitem in ios sdk .
{ "confidence": [ 48.16638946533203, 42.41338348388672, 42.41338348388672, 23.089195251464844, 23.057252883911133, 22.235010147094727, 21.696868896484375, 21.069869995117188, 21.069869995117188, 21.03103256225586, 19.51943588256836, 19.51943588256836, 18.06240463256836, 18.06240463256836, 17.497230529785156, 17.198640823364258, 16.93399429321289, 14.951766967773438, 14.763580322265625, 14.458322525024414, 13.721939086914062, 13.686508178710938, 12.82673454284668, 12.186488151550293, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289 ], "content": [ "BarMetrics is an UIBarMetrics type you cannot pass it as an int .", "Is there anyway to have the UIBarMetrics of a custom UIToolbar change when the device is rotated", "The UINavigationController must be doing something with the UIBarMetrics that is not happening automatically with a stand-alone toolbar .", "It basically set the same appearance again .", "UIBarButtonItem customization of back button background-image for UIBarMetricsDefaultPrompt or UIBarMetricsLandscapePhonePrompt is ignored", "Customise the navigation bar background via the appearance proxy .", "UINavigationBar appearance setBackgroundImage : UIImage imageWithColor : UIColor redColor forBarMetrics : UIBarMetricsDefault .. . UINavigationBar appearance setBackgroundImage : UIImage imageWithColor : UIColor blueColor forBarMetrics : UIBarMetricsCompact .. . .. . return YES .. . .. . .. . .. . 4 .", "I ran into this issue in iOS 8 where the wrong background-image for the navigation bar is displayed in any of these situations : .. . .. . the view controller-based status bar appearance is set to YES default and the navigation controller is presented modally .", "Yes I have been struggling with this after I add View controller-based status bar appearance in target s plist file it is working again on iOS 8 remember to set it to NO .", "This issue isn t reproducible when using new beta iOS SDK so seems like this bug was fixed and you don t have to worry about it anymore .", "the view controller-based status bar appearance is set to NO and the status bar is initially hidden .", "This almost solves the problem if you are willing to give up on the view controller-based status bar appearance .", "I m not currently using the iOS 7.1 betas but I trust you re correct .", "You have my word tested on both device with 7.1b3 iOS and Simulator .", "To isolate the problem where the view controller-based status bar appearance is set to YES default and the navigation controller is presented modally I created a test project from scratch following these steps : .. . .. . 1 .", "I am using swift to make an IOS application .", "I think you need .. . .. . UIToolbar toolbar UIToolbar appearance .. . .. . toolbar setBackgroundImage : UIImage imageNamed : @ toolbarLandscapePhone forToolbarPosition : UIToolbarPositionBottom barMetrics : UIBarMetricsLandscapePhone .. . .. . You can simple to setBarMetrics to UIBarMetricsLandscapePhone", "Use two different images for portrait UIBarMetricsDefault and landscape UIBarMetricsCompact .", "So I did a search and found this https : developer.apple.com library prerelease ios documentation UIKit Reference UIBarPositioning Protocol index.html apple ref c tdef UIBarPosition documentation .", "To get rid of the warning use .. . .. . or .. . .. . because metrics is an NSInteger and numberWithInt accepts int not NSInteger .", "I use the following code in Objective-C to do that : .. . .. . Now when I rewrote the code in swift it looks like this : .. . .. . And this showed the errors that Use of unresolved type UIBarMetricsDefault and Use of unresolved type UIToolbarPositionAny .", "It only changes if I use the toolbar from a UINavigationController .", "I would like to use UIAppearance so manually adjusting the height of the bar won t work .", "So your code should look like this : .. . .. . I recommend you look at the Introduction to Swift document on http : developer.apple.com for more info on how to write use enums .", "The problem is the navigation bar s image sits below the status bar .", "Navigation bar sits below status bar http : i.stack.imgur.com VooyE.png .. . .. . I had this previously working by adding a subview to the navigation bar but it seems stupid to do that when I only want an image .", "I subclassed UINavigationController to deliver this behaviour for me .", "From reading the docs the UIBarPositioning.TopAttached enum should allow this .", "The code is below .", "Thanks for the help .", "I have a simple storyboard with a table view inside a navigation view controller that pushes from the table view to another view controller that has a full screen image view .", "The table view has a prompt text in it s navigation bar .", "When I tap on the table view cell in the table view I receive the warning below .", "I m not customizing the back button at all .", "I created a sample project showing the issue .", "https : github.com stevemoser UIBarButtonItemCustomizationWarningExampleProject .. . .. . Anyone have an idea why I m receiving this warning", "I ve tried your code in a lot of combinations : Xcode 5.0.2 beta one iPhone 5 iPhone 5s and various Simulators .", "Excellent .", "I ll award the bounty in the 22 hours .", "Glad to help", "How can I solve this warning", "enter image description here http : i.stack.imgur.com ECxNC.png", "But what you really want is", "Technically you ll also want to cast the item in the array as a UIImage since objects in NSArray are id : UIImage image UIImage self background NSNumber numberWithInteger : metrics", "@richarddas A cast there would serve no purpose .", "You try to pass NSNumber as a index to your array but you should pass int instead : .. . .. . I assume backgroundImages is array .", "You can do something like that :", "In this case the navigation controller does not need to be presented modally to display the wrong image .", "Create a new project with the Master-Detail Application template .", "2 .", "Open Main.storyboard and add a Navigation Controller to it .", "Remove its root view controller and connect the Master View Controller with a modal segue .", "Then connect the Detail View Controller as its root view controller .", "You should end up with something like this : .. . .. .", "enter image description here http : i.stack.imgur.com Gj1Xz.png .. . .. . 3 .", "I used a category on UIImage to create the images from solid colors .", "- BOOL application : UIApplication application didFinishLaunchingWithOptions : NSDictionary launchOptions .. . Override point for customization after application launch .", "Run the app .", "The Master view controller displays the right navigation bar background images for portrait and landscape orientations : .. . .. .", "enter image description here http : i.stack.imgur.com UecAK.png .. . .. .", "enter image description here http : i.stack.imgur.com y1CNn.png .. . .. . 5 .", "Now present the Detail view controller modally .", "To do so tap on the Add button and then select the newly created row .", "The Detail view controller displays the right navigation bar background-image .", "6 .", "Rotate the interface .", "The Detail view controller will not change the navigation bar background-image wrong : .. . .. .", "enter image description here http : i.stack.imgur.com XZoTQ.png .. . .. . 7 .", "Rotate the interface back to its original orientation .", "The Detail view controller will-change the navigation bar background-image wrong : .. . .. .", "enter image description here http : i.stack.imgur.com GsPjU.png .. . .. . Has anyone else struggled with this", "In MasterViewController add this to avoid wrong background-image when detailViewController is dismissed .", "+1 .", "Now when the Detail view controller is rotated the right navigation bar background-image is displayed .", "However when the Detail view controller is dismissed after at least one rotation the Master view controller displays the wrong navigation bar background-image until the interface is rotated again .", "Does the same happen to you", "Yes It happened to me too please see the edit .", "Thanks for sharing your knowledge with me .", "This fixes the issue if the status bar is not initially hidden .", "I m accepting your answer although it s more a hacky workaround for a nasty bug than a clean solution .", "Yes there are problems when status bar is initially hidden more work need to be done to fix all issues .", "I would prefer it happen automatically but if there is something I can do during rotation that would also be ok .", "Yes I am setting the background-image for UIBarMetricsLandscapePhone but the bar is not changing when I rotate it .", "I have a UIToolBar in my application and I need to change its background .", "According to the documentation I changed the code like this : .. . .. . But it still shows the same error .", "Anyone got any idea what is wrong here", "Enums are done a little differently in Swift .", "For example instead of saying : UIBarMetricsDefault you say .Default .", "Exactly. . You said it. . : D" ] }
{ "confidence": [ 57.82661437988281, 46.925682067871094, 30.02016830444336, 26.092262268066406, 16.432846069335938, 12.898694038391113, 12.049238204956055 ], "content": [ "Question : Is there anyway to have the UIBarMetrics of a custom UIToolbar change when the device is rotated I would prefer it happen automatically but if there is something I can do during rotation that would also be ok . I would like to use UIAppearance so manually adjusting the height of the bar won t work . .. . Answer : I think you need .. . .. . UIToolbar toolbar UIToolbar appearance .. . .. . toolbar setBackgroundImage : UIImage imageNamed : @ toolbarLandscapePhone forToolbarPosition : UIToolbarPositionBottom barMetrics : UIBarMetricsLandscapePhone .. . .. . You can simple to setBarMetrics to UIBarMetricsLandscapePhone Comment : Yes I am setting the background-image for UIBarMetricsLandscapePhone but the bar is not changing when I rotate it . It only changes if I use the toolbar from a UINavigationController . The UINavigationController must be doing something with the UIBarMetrics that is not happening automatically with a stand-alone toolbar .", "Question : How can I solve this warning enter image description here http : i.stack.imgur.com ECxNC.png .. . Answer : You try to pass NSNumber as a index to your array but you should pass int instead : .. . .. . I assume backgroundImages is array . BarMetrics is an UIBarMetrics type you cannot pass it as an int . You can do something like that :", "Question : I have a simple storyboard with a table view inside a navigation view controller that pushes from the table view to another view controller that has a full screen image view . The table view has a prompt text in it s navigation bar . When I tap on the table view cell in the table view I receive the warning below . I m not customizing the back button at all . I created a sample project showing the issue . https : github.com stevemoser UIBarButtonItemCustomizationWarningExampleProject .. . .. . Anyone have an idea why I m receiving this warning UIBarButtonItem customization of back button background-image for UIBarMetricsDefaultPrompt or UIBarMetricsLandscapePhonePrompt is ignored .. . Answer : I ve tried your code in a lot of combinations : Xcode 5.0.2 beta one iPhone 5 iPhone 5s and various Simulators . This issue isn t reproducible when using new beta iOS SDK so seems like this bug was fixed and you don t have to worry about it anymore . Comment : Excellent . I m not currently using the iOS 7.1 betas but I trust you re correct . I ll award the bounty in the 22 hours . Comment : You have my word tested on both device with 7.1b3 iOS and Simulator . Glad to help", "Question : I ran into this issue in iOS 8 where the wrong background-image for the navigation bar is displayed in any of these situations : .. . .. . the view controller-based status bar appearance is set to YES default and the navigation controller is presented modally . the view controller-based status bar appearance is set to NO and the status bar is initially hidden . In this case the navigation controller does not need to be presented modally to display the wrong image . To isolate the problem where the view controller-based status bar appearance is set to YES default and the navigation controller is presented modally I created a test project from scratch following these steps : .. . .. . 1 . Create a new project with the Master-Detail Application template . 2 . Open Main.storyboard and add a Navigation Controller to it . Remove its root view controller and connect the Master View Controller with a modal segue . Then connect the Detail View Controller as its root view controller . You should end up with something like this : .. . .. . enter image description here http : i.stack.imgur.com Gj1Xz.png .. . .. . 3 . Customise the navigation bar background via the appearance proxy . Use two different images for portrait UIBarMetricsDefault and landscape UIBarMetricsCompact . I used a category on UIImage to create the images from solid colors . - BOOL application : UIApplication application didFinishLaunchingWithOptions : NSDictionary launchOptions .. . Override point for customization after application launch . UINavigationBar appearance setBackgroundImage : UIImage imageWithColor : UIColor redColor forBarMetrics : UIBarMetricsDefault .. . UINavigationBar appearance setBackgroundImage : UIImage imageWithColor : UIColor blueColor forBarMetrics : UIBarMetricsCompact .. . .. . return YES .. . .. . .. . .. . 4 . Run the app . The Master view controller displays the right navigation bar background images for portrait and landscape orientations : .. . .. . enter image description here http : i.stack.imgur.com UecAK.png .. . .. . enter image description here http : i.stack.imgur.com y1CNn.png .. . .. . 5 . Now present the Detail view controller modally . To do so tap on the Add button and then select the newly created row . The Detail view controller displays the right navigation bar background-image . 6 . Rotate the interface . The Detail view controller will not change the navigation bar background-image wrong : .. . .. . enter image description here http : i.stack.imgur.com XZoTQ.png .. . .. . 7 . Rotate the interface back to its original orientation . The Detail view controller will-change the navigation bar background-image wrong : .. . .. . enter image description here http : i.stack.imgur.com GsPjU.png .. . .. . Has anyone else struggled with this .. . Answer : Yes I have been struggling with this after I add View controller-based status bar appearance in target s plist file it is working again on iOS 8 remember to set it to NO . In MasterViewController add this to avoid wrong background-image when detailViewController is dismissed . It basically set the same appearance again . Comment : +1 . This almost solves the problem if you are willing to give up on the view controller-based status bar appearance . Now when the Detail view controller is rotated the right navigation bar background-image is displayed . However when the Detail view controller is dismissed after at least one rotation the Master view controller displays the wrong navigation bar background-image until the interface is rotated again . Does the same happen to you Comment : Yes It happened to me too please see the edit . Comment : Thanks for sharing your knowledge with me . This fixes the issue if the status bar is not initially hidden . I m accepting your answer although it s more a hacky workaround for a nasty bug than a clean solution . Comment : Yes there are problems when status bar is initially hidden more work need to be done to fix all issues .", "Question : I am using swift to make an IOS application . I have a UIToolBar in my application and I need to change its background . I use the following code in Objective-C to do that : .. . .. . Now when I rewrote the code in swift it looks like this : .. . .. . And this showed the errors that Use of unresolved type UIBarMetricsDefault and Use of unresolved type UIToolbarPositionAny . So I did a search and found this https : developer.apple.com library prerelease ios documentation UIKit Reference UIBarPositioning Protocol index.html apple ref c tdef UIBarPosition documentation . According to the documentation I changed the code like this : .. . .. . But it still shows the same error . Anyone got any idea what is wrong here .. . Answer : Enums are done a little differently in Swift . For example instead of saying : UIBarMetricsDefault you say .Default . So your code should look like this : .. . .. . I recommend you look at the Introduction to Swift document on http : developer.apple.com for more info on how to write use enums . Comment : Exactly. . You said it. . : D", "Question : How can I solve this warning enter image description here http : i.stack.imgur.com ECxNC.png .. . Answer : To get rid of the warning use .. . .. . or .. . .. . because metrics is an NSInteger and numberWithInt accepts int not NSInteger . But what you really want is Comment : Technically you ll also want to cast the item in the array as a UIImage since objects in NSArray are id : UIImage image UIImage self background NSNumber numberWithInteger : metrics Comment : @richarddas A cast there would serve no purpose .", "Question : null .. . Answer : The problem is the navigation bar s image sits below the status bar . Navigation bar sits below status bar http : i.stack.imgur.com VooyE.png .. . .. . I had this previously working by adding a subview to the navigation bar but it seems stupid to do that when I only want an image . I subclassed UINavigationController to deliver this behaviour for me . From reading the docs the UIBarPositioning.TopAttached enum should allow this . The code is below . Thanks for the help ." ] }
[ "yes-answer-long", "yes-answer-short" ]
metrics
UNK_RELATION
tempo@templates@79
tempo -- tempo is a tiny json rendering engine that enables you to craft data @placeholder in pure html .
{ "confidence": [ 49.867515563964844, 44.983612060546875, 41.49666213989258, 40.12186050415039, 39.270076751708984, 39.270076751708984, 39.202518463134766, 39.128875732421875, 38.97587966918945, 38.97587966918945, 38.79020690917969, 38.175575256347656, 38.175575256347656, 37.88214874267578, 37.88214874267578, 37.88214874267578, 37.88214874267578, 37.70185089111328, 37.70185089111328, 36.73617172241211, 36.60940933227539, 36.55830383300781, 36.55830383300781, 36.47112274169922, 35.8460693359375, 35.32514190673828, 34.84833526611328, 34.84833526611328, 34.8367805480957, 34.03883743286133, 34.03883743286133, 33.702354431152344, 33.702354431152344, 33.702354431152344, 33.702354431152344, 33.702354431152344, 33.702354431152344, 33.702354431152344, 33.702354431152344, 33.702354431152344, 33.4693603515625, 33.24355697631836, 33.24355697631836, 32.48922348022461, 32.3288688659668, 32.3288688659668, 32.17448043823242, 32.17448043823242, 31.524417877197266, 31.028499603271484, 31.028499603271484, 31.028499603271484, 30.761802673339844, 30.761802673339844, 30.761802673339844, 30.761802673339844, 30.761802673339844, 30.761802673339844, 30.761802673339844, 30.263710021972656, 30.263710021972656, 30.08878517150879, 29.988178253173828, 29.655014038085938, 29.615821838378906, 29.615821838378906, 29.615821838378906, 29.615821838378906, 28.260759353637695, 28.260759353637695, 28.260759353637695, 28.260759353637695, 28.260759353637695, 28.24233627319336, 28.24233627319336, 28.24233627319336, 28.24233627319336, 28.19155502319336, 27.74907684326172, 27.186918258666992, 27.186918258666992, 27.11478042602539, 27.11478042602539, 26.486438751220703, 25.741291046142578, 25.45949935913086, 25.45949935913086, 24.98681640625, 24.951282501220703, 24.313518524169922, 24.313518524169922, 23.562950134277344, 22.418176651000977, 22.077884674072266, 22.031532287597656, 21.494022369384766, 21.272197723388672, 20.172327041625977, 19.89870834350586, 19.609176635742188 ], "content": [ "Just getting started with Tempo http : twigkit.github.com tempo javascript templating-engine .", "Have you check this urls : tempoplugin.jira.com wiki dishttps : tempoplugin.jira.com wiki https : tempoplugin.jira.com wiki dishttps : tempoplugin.jira.com wiki display TEMPO Tempo+API+Guideplay JTS Tempo+REST+APIs and tempoplugin.jira.com wiki display TEMPO Tempo+API+Guide https : tempoplugin.jira.com wiki display TEMPO Tempo+API+Guide", "But no knowledge of tempo .", "We have Tempo plugin installed .", "I read the documentation on Tempo .", "Or how this tempo exactly working", "From the Tempo docs http : tempojs.com advanced : .. . .. . In order to make it easier to use Tempo with other frameworks such as Django you can configure Tempo to use surrounding braces other than the default .. . and .. . .", "I need something to visualize a certain tempo metronome .. . .. . how can i make a sound or image appear on a certain tempo", "By changing the pitch rate tempo etc", "I want to get midi tempo .", "I have some issues using the Twig engine and the Tempo engine together in a project .", "It gives examples of using the SoundTouch library to change the tempo without changing the pitch as well as changing the pitch without changing tempo and playback rate change both pitch and tempo .", "I am using midi library for as3 and receive these values as tempo to the left the timeline and to the right the tempo .. . .. . 1712 11424264 .. . .. . 3632 11424264 .. . .. . 3670 2325000 .. . .. . 3708 1417992 .. . .. . Assuming that at time 0 the tempo 500000 .", "Is there a way to use REST with Tempo to log work", "I ve given up on Tempo JS and moved to Angular .", "Tempo detection is a pretty hard problem to solve .", "must be rendered by Tempo and is filled by an async ajax call .", "Since Tempo just utilizes the standard work log you should be able to use the REST api to log work and that should show up in tempo .", "Changing tempo .. . .. . Finally to change the tempo in your setup where playing the notes is driven by the timer you obviously need to change the timer interval .", "But in this case I want to receive tempo from host .", "Is it possible to use field as a parameter of a javascript function using Tempo http : twigkit.github.com tempo", "So maybe with fade or toggle but then with a tempo wich you can adjust in a inputfield .", "To have a smooth change in tempo you change the timer in the TimeCallBack .", "Right now I m just trying to solve the audio portion so I need to write something that identifies the tempo of incoming audio and is able to follow that tempo .", "I would suppose you have something like this : .. . .. . Just assign the options array to the data method after prepare in Tempo : .. . .. . And in the HTML :", "possible duplicate of Identify TEMPO of a music file in c http : stackoverflow.com questions 31151807 identify-tempo-of-a-music-file-in-c-sharp", "Or should I just use the Tempo API to log work", "Here s what I got so far : .. . .. . I ve used tempo before .", "Either you are asking the wrong question ie you are not receiving actual MIDI tempo events but something else which is not a tempo change event or the MIDI files are really crazy .", "How were you planning on getting tempo of incoming audio signal", "By pitch tempo do you mean the frequency itself or really the speed of the samples", "Tempo 1.x could not handle multiple levels of nested templates .", "I dont know tempo I use underscore.js instead .", "Believe it or not there isn t some MIDI message that says the current tempo is 120BPM .", "I need to modify pitch or tempo of an audio but need to do them separately .", "does anyone know how to identify tempo of a music track in c", "actually I feel like tempo identification is very hard .", "Can anyone one help me to identify Detect TEMPO", "I have tried several times but still I can not get TEMPO .", "Turns out that calling start resets the sequencer s tempo to the default of 500000 mpq .", "Here s a sample of the data structure : .. . .. . And that I would like to transform into a nested HTML list like this : .. . .. . Any Ideas how this could be done using Tempo", "That s cool but what I need is to be able to manage it programmatically embed in an app randomize the initial tempo and record the users selected tempo so I need to know how to get at it via WMP s API .", "Below Tempo rest API is use for posting work log for specific issue ISSUE-911 for logged in user for Given range date .. . .. . https : 0.0.0.0 jira rest tempo-rest 1.0 worklogs issue-911", "This translation obviously depends on knowing the tempo and time signature which are MIDI meta events .", "I thought on solution like Tap-Tempo-2 + lowpass + threshhold", "Is there any way to change the Pitch and or Tempo of the audio stream before it is saved to file", "The tempo isn t a value in beats per minute like 120 BPM which I have a feeling you are expecting to get .", "With Tempo http : tempojs.com 1.8+ you can refer to the object being iterated using : .. . .. . For example :", "I m trying to use the API for JIRA s Tempo : .. . .. . https : tempoplugin.jira.com wiki display TEMPO Tempo+Servlet+Manual TempoServletManual-WorklogReport .. . .. . specifically trying to get worklogs through the url : .. . .. . http s : yourserver.yourdomain plugins servlet tempo-getWorklog dateFrom 2011-01-01 dateTo 2011-01-31 format xml diffOnly false tempoApiToken my-token .. . .. . What should be the values for yourserver and yourdomain .", "What you have to do is calculate the current tempo based on the timing of the MIDI clock messages .", "Beats per minute do define the music tempo assuming you calculate the BPM correctly .", "Make sure you enter the right tempoApiToken value tempo administrator has this value .", "When I try to calculate the real-time of notes using that tempo I get high values which are probably incorrect .", "MIDI tempo http : home.roadrunner.com jgglatt tech midifile tempo.htm is given in microseconds per quarter note .", "I am building a piano application which lets user modify the tempo this is the situation I am in at the moment .", "The server we re using has Tempo and that seems to be the way that management wants to log time .", "In our instance of Jira we are required to use the Work Type drop down before we log time with Tempo .", "The application here would be for live karaoke so there would be a video screen with the lyrics that would follow the tempo as well .", "I want to build a application which can change tempo pitch .. . of exist audio file and export them to new file .", "If you need getAge called you have to do it before running the template in tempo .", "Keep in mind that you also need to modify the timestamps if you change the tempo of the stream .", "Once you can make a assumption that some interval between volume jumps is a beat bar - you can count tempo inversely to bar length", "This works : .. . .. . Anyone know how I can interrogate some value in the DOM or Tempo so I can remove my global variable", "To modify the pitch tempo of the audio stream you ll have to resample it yourself before you encode it using the codec .", "This kind of message wouldn t be very useful anyway as in most cases the reason for knowing the current tempo is to synchronize devices yes", "What I want to do is to make this timer repaint the panel based on the tempo of the music .", "I m curious what is the easiest way to play a sound file or some frequency with given tempo .", "In order to finish my project I have to take the TEMPO of a music file WAVE FILE .", "I need to whip up a quickie app something quick and dirty on windows that lets a user control the tempo of a playing mp3 file with a slider .", "I m loading tempo for Emacs : .. . .. . I can expand templates just fine however not when the cursor is position on the beginning of the first line in the buffer .", "I am involved in a project which requires me to extract song features like beats per minute BPM tempo etc .", "In Matlab I do know of a project called Mirtoolbox which can give the BPM and tempo information after processing the local mp3 file .", "I m trying to build an app that takes an audio signal someone playing piano NOT from a .wav or .mp3 then would follow the player s tempo .", "My real purpose was to be able to look at the files in my android music library and classify them by tempo .", "I m trying to do exactly that - listen to the tempo of music to do something else in my app .", "How would I go about changing the tempo of a loaded audio file without changing the pitch and then playing it back", "i need a bpm counter witch send a message if a tempo of incoming Audiosignal changes .", "You can find an example of a tap tempo at this link : https : cycling74.com forums topic tap-tempo-2 .. . .. . Another option is to use the beat object found here : http : web.media.mit.edu tristan maxmsp.html .. . .. . For the message sending side of things who are you sending a message to", "It looks like your formula is assuming data coming from a standard midi file where tempo is expressed in terms of ticks where there are 24 ticks per quarter note .", "var template null .. . .. . The only thing I can think of is using jQuery and testing if tempo el type expressions exists someValue .. . .. . I tried reading the code and I don t understand javascript enough .", "On my machine Windows 8 x64 Java 1.7.0 40 I hear the output of 2 measures of 2 voices playing good so far but they are at the same tempo 60bpm .", "I ve downloaded a program that calculates beats per minute but only to find out that beats per minute do not determine the music tempo .", "They key event-handling works just fine however I m getting a very bizarre error where pausing the sequencer with : .. . .. . resets the sequencer s tempo .", "I have no clue what the purpose of the various Panelxx.caption are but basically you should only need to check whether the metronome should run or not and change the tempo I ll return to this shortly .", "For reference please check below code .. . .. . This is working fine .. . .. . Now I want to apply tempo for generated audio between 0 to 240 as shown in below image .", "I was asked to whip something up for a researcher to let people estimate the tempo of something they heard by listening to a file and adjusting it so my guess is that the pitch would have to be constant or it would be another cue .", "I m trying to make a winform app in C VS2008 that can load an mp3 other formats would be nice but mp3 at a minimum and be able to adjust the playback speed tempo without affecting pitch .", "We want to consume below tempo API POST request for validating whether time sheet period is closed or not however we are unable to find document talk about required parameter for this API .. . .. . any help regarding API documentation or parameter will be useful .. . .. . https : myserver jira rest tempo-rest 1.0 worklogs validation date .. . .. . Thanks", "More information about parsing those can be found here : .. . .. . http : www.sonicspot.com guide midifiles.html .. . .. . Basically you take the PPQ to find the number of milliseconds per tick then use the time signature and tempo to find the length of a quarter note in milliseconds .", "I want to know how I can receive MIDI tempo bpm from host running on my computer it is simple Ableton Live or Logic Pro using CoreMidi", "private void button1 Click object sender EventArgs e OpenFileDialog fileDlg new OpenFileDialog if fileDlg.ShowDialog DialogResult.OK waveControl1.Filename fileDlg.FileName waveControl1.Read I want to take the tempo of this opened wave file .", "Having said above I ve fixed your HTML markup to render your JSON data using tempo.js .", "I know how to generate sounds and percussion on midi but I am needing to increase the tempo up and down how I am not knowing how to do that I am using multimedia timer but the problem is that I am having the thread error when using two or more voices at the same time .", "For a tone rather than a click and in both channels one simple way is .. . .. . bpm 120 x SinOsc.ar.dup Pulse.ar bpm 60 0.01 .lag .play .. . .. . To play back a WAV file you can simply use a PlayBuf unit and retrigger it at the right tempo .", "Getting the tempo BPM of a music file can be achived using bass.net s BPMCounter class .. . .. . Here s the link-to the documentation of the class : http : bass.radio42.com help html 0833aa5a-3be9-037c-66f2-9adfd42a8512.htm .. . .. . If you wanna do live BPM calculation you can also find some code here : http : www.bass.radio42.com help html bf47db8a-599c-cf4f-b13b-da17f10a7a54.htm", "eg - .. . .. . https : companyname.jira.com plugins servlet tempo-getWorklog dateFrom 2014-04-21 dateTo 2014-04-27 format xml tempoApiToken e4cd79c4-0457-42f3-bf29-6f3f0f5c8bcf projectKey project addUserDetails true addIssueDetails true addWorklogDetails true addIssueSummary true addIssueDescription false https : companyname.jira.com plugins servlet tempo-getWorklog dateFrom 2014-04-21 dateTo 2014-04-27 format xml tempoApiToken e4cd79c4-0457-42f3-bf29-6f3f0f5c8bcf projectKey project addUserDetails true addIssueDetails true addWorklogDetails true addIssueSummary true addIssueDescription false .. . .. . The above url returns the result in xml format .", "Some issues that I face are : .. . .. . the app doesn t really keep time although it sounds like it does i can t do much on the main thread while the sound thread is running as it gets really sluggish if I press the lock button or volume buttons on the device the tempo goes haywire .", "To render hierarchical-data tempo.js requires that the HTML elements also exists in a hierarchy .", "The simplest would be to put a low pass filter on your track if you re measuring against the kick drum and then get the level of the signal then set a numeric threshold that triggers when the level goes over a certain value and have that connected to a bang that is connected to a tap tempo calculation .", "As far as i can tell you cannot put anything inside the data-template as these are not even called if there are no items in the JSON array to loop through ." ] }
{ "confidence": [ 52.18573760986328, 50.40245819091797, 48.974220275878906, 48.31049346923828, 48.305206298828125, 47.565757751464844, 47.12342834472656, 46.58845520019531, 45.696372985839844, 45.050140380859375, 44.819114685058594, 44.49079132080078, 44.29261779785156, 43.24822998046875, 42.83135986328125, 42.4427490234375, 42.37300109863281, 41.9774169921875, 41.55298614501953, 40.91126251220703 ], "content": [ "Question : I have some issues using the Twig engine and the Tempo engine together in a project . the author e.g . must be rendered by Tempo and is filled by an async ajax call . When Twig renders the PHP it fills the bracket tags with empty strings because the tags are unknown or null at this time . Both engines have the same syntax . Any ideas Thx in advise . Comment : My first idea would be to use just one templating-engine . I guess you ve thought of that though Comment : sure...but thats the very last option . .. . Answer : From the Tempo docs http : tempojs.com advanced : .. . .. . In order to make it easier to use Tempo with other frameworks such as Django you can configure Tempo to use surrounding braces other than the default .. . and .. . . .. . To do this you pass the var braces and tag braces parameters to the Tempo.prepare function . These will be split down the middle to form the left and right braces .", "Question : I have started on using JSON data-structures instead of XML in a little Web project . I need to do some transformation of the data like you normally do with XSLT on XML and then I stumpled upon the cool library http : tempojs.com . But the real problem appeared when I realized that my data is a tree structure and I guess some recursion in the transformation is needed . Here s a sample of the data structure : .. . .. . And that I would like to transform into a nested HTML list like this : .. . .. . Any Ideas how this could be done using Tempo .. . Answer : I dont know tempo I use underscore.js instead . it will be something like this :", "Question : Just getting started with Tempo http : twigkit.github.com tempo javascript templating-engine . In all examples in the documentation the collection you are iterating over is an array of objects or arrays and in the templates you refer to property names i.e . name or array indexes i.e . 0 . But what if I m iterating over an array of simple types like strings Is there a way to refer to the the object itself in the template something like this For example : .. . .. . Now I want to render my data to a list in a template : .. . .. . How do I refer to an individual array item in the example above .. . Answer : Thanks for pointing this out Todd . With Tempo http : tempojs.com 1.8+ you can refer to the object being iterated using : .. . .. . For example : Comment : Thanks Great library", "Question : I have started on using JSON data-structures instead of XML in a little Web project . I need to do some transformation of the data like you normally do with XSLT on XML and then I stumpled upon the cool library http : tempojs.com . But the real problem appeared when I realized that my data is a tree structure and I guess some recursion in the transformation is needed . Here s a sample of the data structure : .. . .. . And that I would like to transform into a nested HTML list like this : .. . .. . Any Ideas how this could be done using Tempo .. . Answer : Tempo 1.x could not handle multiple levels of nested templates . However the 2.0-dev branch supports this and seems to me to render your data correctly : http : jsfiddle.net mr olafsson wLEQs .. . .. . Note that the example does imply a fixed and equal number of levels nested templates . Let me know how you get on Sorry for the late reply .", "Question : Is it possible to use field as a parameter of a javascript function using Tempo http : twigkit.github.com tempo Something like .. . Answer : I read the documentation on Tempo . There is nothing there that suggests it can call a function while populating a template . If you need getAge called you have to do it before running the template in tempo . Comment : That s true I misunderstood the tag blocks . What JavaScript template would you recommend to use with JSON Comment : use jQuery s tmpl plugin .", "Question : I have some issues using the Twig engine and the Tempo engine together in a project . the author e.g . must be rendered by Tempo and is filled by an async ajax call . When Twig renders the PHP it fills the bracket tags with empty strings because the tags are unknown or null at this time . Both engines have the same syntax . Any ideas Thx in advise . Comment : My first idea would be to use just one templating-engine . I guess you ve thought of that though Comment : sure...but thats the very last option . .. . Answer : Ugly but it should work : .. . .. . Twig will now render author . Comment : ...jap . It s working but really ugly o", "Question : For my University Project I am developing a music comparison c Application . In order to finish my project I have to take the TEMPO of a music file WAVE FILE . Also I am getting help of the NAUDIO Library for my project . Can anyone one help me to identify Detect TEMPO I have tried several times but still I can not get TEMPO . Comment : possible duplicate of Identify TEMPO of a music file in c http : stackoverflow.com questions 31151807 identify-tempo-of-a-music-file-in-c-sharp .. . Answer : Getting the tempo BPM of a music file can be achived using bass.net s BPMCounter class .. . .. . Here s the link-to the documentation of the class : http : bass.radio42.com help html 0833aa5a-3be9-037c-66f2-9adfd42a8512.htm .. . .. . If you wanna do live BPM calculation you can also find some code here : http : www.bass.radio42.com help html bf47db8a-599c-cf4f-b13b-da17f10a7a54.htm", "Question : We want to consume below tempo API POST request for validating whether time sheet period is closed or not however we are unable to find document talk about required parameter for this API .. . .. . any help regarding API documentation or parameter will be useful .. . .. . https : myserver jira rest tempo-rest 1.0 worklogs validation date .. . .. . Thanks Comment : Hi . Have you check this urls : tempoplugin.jira.com wiki dishttps : tempoplugin.jira.com wiki https : tempoplugin.jira.com wiki dishttps : tempoplugin.jira.com wiki display TEMPO Tempo+API+Guideplay JTS Tempo+REST+APIs and tempoplugin.jira.com wiki display TEMPO Tempo+API+Guide https : tempoplugin.jira.com wiki display TEMPO Tempo+API+Guide Comment : Thanks for the link however we are unable to find the documentation for the specific API : - .. . Answer : You could try passing the following x-www-form-urlencoded parameters in the body of the api- .. . .. . ansidate - 2016-04-24 .. . .. . formFieldId - date .. . .. . user - abc .. . .. . planning - false .. . .. . Hope this helps : Comment : worked like a charm..Thanks a lot : - Comment : glad to be of help . :", "Question : Working on a small multi-platform python program for displaying issues assigned to the user whom logs into this application and gives that user the ability to log work against that issue . The server we re using has Tempo and that seems to be the way that management wants to log time . Is there a way to use REST with Tempo to log work Or should I just use the Tempo API to log work .. . Answer : Below Tempo rest API is use for posting work log for specific issue ISSUE-911 for logged in user for Given range date .. . .. . https : 0.0.0.0 jira rest tempo-rest 1.0 worklogs issue-911", "Question : null .. . Answer : Using Tempo.js I would like to be able to render a message if there are no items in the JSON array . As far as i can tell you cannot put anything inside the data-template as these are not even called if there are no items in the JSON array to loop through . I would imagine this should work something like the example below a magical command to display if no rows exist : .. . .. . I cannot find way to do this all through the Tempo.js docs . Have i missed this Or is there another way to achieve this I know i could do this is JS before rendering the template but that kind of defeats the point of keeping the JS and HTML template code seperate so would like to do this completely within the template if possible . Any ideas would be greatly appreciated . Comment : Yeah I can t figure out how to do it either . I suppose after your render call introspect the json array to see if there were any messages then .show an inline div with your messaging . Comment : Yeah I could not find any documentation on this . Comment : I ve given up on Tempo JS and moved to Angular . Its the bomb .", "Question : Working on a small multi-platform python program for displaying issues assigned to the user whom logs into this application and gives that user the ability to log work against that issue . The server we re using has Tempo and that seems to be the way that management wants to log time . Is there a way to use REST with Tempo to log work Or should I just use the Tempo API to log work .. . Answer : Since Tempo just utilizes the standard work log you should be able to use the REST api to log work and that should show up in tempo . The API for logging time in JIRA using REST can be found here : .. . .. . http : docs.atlassian.com jira REST latest id123143 Comment : Thanks Also would you know if that would support the Work Type field In our instance of Jira we are required to use the Work Type drop down before we log time with Tempo . Edit : Or just a Custom field . Comment : I can t find any reference to that in the API no but you could make that change in the database if you have a trigger that checks the work log table which ever it is and look for unclassified work logs and change the work type from there every time an entry is made .", "Question : I am involved in a project which requires me to extract song features like beats per minute BPM tempo etc . However I have not found a suitable Python library that can accurately detect these features . Does anyone have any advice In Matlab I do know of a project called Mirtoolbox which can give the BPM and tempo information after processing the local mp3 file . Comment : What is the encoding format I have never heard of a python sound library.. . Then again I m far from omnipotent and all-knowing . Go crank start your google machine and feed it python sound library .. . Answer : Well i recently came across Vampy http : www.vamp-plugins.org vampy.html which is wrapper plugin that enables you to use Vamp plugins written in Python in any Vamp host . Vamp is an audio processing plugin system for plugins that extract descriptive information from audio data . Hope it helps . Comment : The Vamp website it rather unclear on how to install Vampy they suggest using a tool such as SonicAnnotator but the website appears to be down.. . omras2.org SonicAnnotator http : www.omras2.org SonicAnnotator Far more useful would be if Vampy were a python package that could be easily installed with pip conda or cloned via git with a simple way of using it as a command-line tool .", "Question : This doesn t have to be with a clicking sound . I need something to visualize a certain tempo metronome .. . .. . how can i make a sound or image appear on a certain tempo So maybe with fade or toggle but then with a tempo wich you can adjust in a inputfield . Any ideas .. . Answer : I guess you should look at some animation extensions and parameters for easing . you can start here http : api.jquery.com animate and maybe you can grab some code from this example : http : www.irengba.com codewell loop.html", "Question : I am using midi library for as3 and receive these values as tempo to the left the timeline and to the right the tempo .. . .. . 1712 11424264 .. . .. . 3632 11424264 .. . .. . 3670 2325000 .. . .. . 3708 1417992 .. . .. . Assuming that at time 0 the tempo 500000 . The first valus is 200 times higher how come it is too high Perhaps I am reading it wrong When I try to calculate the real-time of notes using that tempo I get high values which are probably incorrect . Comment : Are you reading a MIDI file or off the wire If file can you post the entire header chunk in hex If off the wire can you post the messages in question Comment : the problem was that I didn t read the hex file correctly . now it is okay and the timing sync great .. . Answer : The tempo isn t a value in beats per minute like 120 BPM which I have a feeling you are expecting to get . MIDI tempo http : home.roadrunner.com jgglatt tech midifile tempo.htm is given in microseconds per quarter note . As for the values being 200 times higher yes that probably is a bit suspicious . Either you are asking the wrong question ie you are not receiving actual MIDI tempo events but something else which is not a tempo change event or the MIDI files are really crazy . The best way to confirm that is to simply load them in a sequencer and see the events there . Comment : thanks for your help . I should have written that these values 11424264 etc.. . are microseconds per quarter note that I already know . I will recheck things . perhaps I am reading the hex wrong though it seems okay . Do you have a name of a midi sequencer I can get if there is a free-simple one just for the check then it could be better.. . Comment : Perhaps I read the hex file wrong - here is the value I wrote : 0xAE5208 11 424 264 but perhaps I should read it in opposite direction and get : 0x0852AE 545 454 Comment : I was right all I needed to do is read the hex file in the opposite direction . the values are correct - the timing sync perfectly . Comment : Glad that worked for you Be sure to mark the answer as correct if you think that it is right that way other people stumbling across this question from google can benefit from your knowledge .", "Question : This question already has an answer here : .. . .. . How to detect the BPM of a song in php closed questions 657073 how-to-detect-the-bpm-of-a-song-in-php 12 answers .. . .. . I haven t been able to find an adequate answer yet so I figured I would ask . I m trying to build an app that takes an audio signal someone playing piano NOT from a .wav or .mp3 then would follow the player s tempo . The application here would be for live karaoke so there would be a video screen with the lyrics that would follow the tempo as well . Right now I m just trying to solve the audio portion so I need to write something that identifies the tempo of incoming audio and is able to follow that tempo . Are there any libraries or resources that directly relate to this problem I was thinking about coding it in Python since that s what I m most familiar with then wrapping it in ObjC but I m still a neophyte with programming so I m open to learning whatever I need to . Any help is greatly appreciated Comment : As a side note why code it in Python and wrap it in ObjC Why not just code it in Python all the way through If you want a native Cocoa GUI you can use PyObjC for that . Comment : @KenK : Don t just add that as a comment click the close button and mark it a duplicate . Comment : Tempo detection is a pretty hard problem to solve . If you really want a go at it do a google-search for onset detection - which is the term-of-art used in academia . .. . Answer : Unfortunately I cannot tell you any way to do it with some prepared solutions . I think you should just listen every byte of discret audio signal . Any music has a rythm periodical pulsation of audio signal amplitude . I recommend you to check level of signal and analyze for pulsations . Once you can make a assumption that some interval between volume jumps is a beat bar - you can count tempo inversely to bar length", "Question : I m trying to use the API for JIRA s Tempo : .. . .. . https : tempoplugin.jira.com wiki display TEMPO Tempo+Servlet+Manual TempoServletManual-WorklogReport .. . .. . specifically trying to get worklogs through the url : .. . .. . http s : yourserver.yourdomain plugins servlet tempo-getWorklog dateFrom 2011-01-01 dateTo 2011-01-31 format xml diffOnly false tempoApiToken my-token .. . .. . What should be the values for yourserver and yourdomain . if im testing on a localhost is it localhost : port or is it the actual url for my account on jira example : jira.companyname.com I m using RestClient to make the request in my app . .. . Answer : It will be actual url for your account on jira . eg - .. . .. . https : companyname.jira.com plugins servlet tempo-getWorklog dateFrom 2014-04-21 dateTo 2014-04-27 format xml tempoApiToken e4cd79c4-0457-42f3-bf29-6f3f0f5c8bcf projectKey project addUserDetails true addIssueDetails true addWorklogDetails true addIssueSummary true addIssueDescription false https : companyname.jira.com plugins servlet tempo-getWorklog dateFrom 2014-04-21 dateTo 2014-04-27 format xml tempoApiToken e4cd79c4-0457-42f3-bf29-6f3f0f5c8bcf projectKey project addUserDetails true addIssueDetails true addWorklogDetails true addIssueSummary true addIssueDescription false .. . .. . The above url returns the result in xml format . Change the appended parameters according to your need . Make sure you enter the right tempoApiToken value tempo administrator has this value .", "Question : i need a bpm counter witch send a message if a tempo of incoming Audiosignal changes . Have anyone an idee Comment : How were you planning on getting tempo of incoming audio signal Analysis or separate input data Comment : Analysis will make sence . Countin the pics of frequency . wich opotunitys do i have another solution would make me happy too .. . Answer : It sounds like you re really new to Max MSP and audio processing in general so I really can t stress the importance of understanding how audio processing works in general and how much you ll learn just going through all the built-in tutorials in Max . Beat detection is a pretty complex thing though take a look at how even pro softwares like Ableton and Traktor have trouble tracking beats sometimes and they have people who ve worked on their algorithms for years . There are a number of ways you can do an implementation in Max it really depends how much time you want to spend and how complex you want to make it . The simplest would be to put a low pass filter on your track if you re measuring against the kick drum and then get the level of the signal then set a numeric threshold that triggers when the level goes over a certain value and have that connected to a bang that is connected to a tap tempo calculation . You can find an example of a tap tempo at this link : https : cycling74.com forums topic tap-tempo-2 .. . .. . Another option is to use the beat object found here : http : web.media.mit.edu tristan maxmsp.html .. . .. . For the message sending side of things who are you sending a message to You can use udpsend to send messages over the network you can send midi out values or just use the built-in send and receive objects if you re just sending data around in Max . Comment : Yes you re right . I m new to MAX MSP . I thought on solution like Tap-Tempo-2 + lowpass + threshhold It s just like i need Thank you very much", "Question : Been searching all day and still stuck on trying to access data from array object using Tempo.Tried using a variety of processes but not getting anywhere . The array object that I m trying to access is called options and the key is name . p options : name p .. . Answer : It s kind of difficult to answer this without at least on instance of the array object . I would suppose you have something like this : .. . .. . Just assign the options array to the data method after prepare in Tempo : .. . .. . And in the HTML :", "Question : This problem s been haunting me for days.. . I have the following JSON that I m trying to render as a table using Tempo.js but keep getting nothing rendered : .. . .. . The table is supposed to look like this : .. . .. . Please notice how the family cell stretches to house more than one parent rows and the parent cell streches to house more than one children rows . I prepare the JSON in js in a variable called familyTree and then call Tempo.prepare family-list .render familyTree No I ve read all of the documentation for tempo.js which wasn t too long but I still haven t found a way of rendering the table properly . Here s what I got so far : .. . .. . I ve used tempo before . I ve even mixed it with wkhtmltopdf to render some nice-looking pdf files . But I just cannot solve this . If any of you out there has been through anything similar..would you please share your experience Thanks so much in advance . .. . Answer : Using tempo.js is not ideal to render hierarchical-data in a table . To render hierarchical-data tempo.js requires that the HTML elements also exists in a hierarchy . This is not ideal when dealing with tables because creatign a table inside a table cell will eventually lead to column alignment issues . You can take care of alignment issues to a certain degree by fixing the width of each column but this will not be a perfect solution . Having said above I ve fixed your HTML markup to render your JSON data using tempo.js . See the changes below jsfiddle here http : jsfiddle.net qdrq6d0e : Comment : It worked You sir have a great heart and mad coding skills . Thanks a lot for helping a stranger out I hope I can help you back some time in the future . Take care", "Question : I m using AudioRecord http : developer.android.com reference android media AudioRecord.html to get audio in real-time from the device microphone and encoding saving it to file in the background using the MediaCodec http : developer.android.com reference android media MediaCodec.html and MediaMuxer https : developer.android.com reference android media MediaMuxer.html classes . Is there any way to change the Pitch and or Tempo of the audio stream before it is saved to file .. . Answer : To modify the pitch tempo of the audio stream you ll have to resample it yourself before you encode it using the codec . Keep in mind that you also need to modify the timestamps if you change the tempo of the stream ." ] }
[ "yes-answer-long", "yes-answer-short" ]
templates
UNK_RELATION
jawin@object-model@136
jawin -- jawin is a free open-source architecture for interoperation between java and components exposed through microsoft s component @placeholder .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
object-model
UNK_RELATION
flac@lossless@37
flac -- flac is an acronym for free @placeholder audio codec .
{ "confidence": [ 63.37226867675781, 63.37226867675781, 49.02113342285156, 48.650352478027344, 46.39038848876953, 45.812660217285156, 45.371978759765625, 45.18229675292969, 44.74491882324219, 40.86506271362305, 40.68573760986328, 40.52178955078125, 40.52178955078125, 40.45401382446289, 40.07333755493164, 39.7734489440918, 39.7734489440918, 39.7734489440918, 39.7734489440918, 39.7734489440918, 39.57035446166992, 38.89406967163086, 38.89406967163086, 38.89406967163086, 38.81276321411133, 38.465118408203125, 38.35350799560547, 38.1009521484375, 38.04969024658203, 37.92488098144531, 37.92488098144531, 37.80245590209961, 37.80245590209961, 37.284393310546875, 37.284393310546875, 36.83326721191406, 36.83326721191406, 36.83326721191406, 36.70803451538086, 36.70803451538086, 36.70803451538086, 36.70803451538086, 36.70803451538086, 36.70803451538086, 36.58711242675781, 36.306610107421875, 36.306610107421875, 35.638919830322266, 35.638919830322266, 35.638919830322266, 35.638919830322266, 35.616416931152344, 35.616416931152344, 35.616416931152344, 35.52493667602539, 35.33081817626953, 35.33081817626953, 35.33081817626953, 35.33081817626953, 35.33081817626953, 34.547306060791016, 34.547306060791016, 34.30809020996094, 34.30809020996094, 34.23920440673828, 33.89427185058594, 33.835174560546875, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.746925354003906, 33.238975524902344, 33.11294174194336, 33.11294174194336, 32.80265808105469, 32.77335739135742, 32.655311584472656, 32.655311584472656, 32.655311584472656, 32.655311584472656, 32.655311584472656, 32.655311584472656, 32.655311584472656, 32.655311584472656, 32.655311584472656, 32.655311584472656, 32.655311584472656, 32.44041061401367, 32.44041061401367, 32.44041061401367, 32.021324157714844 ], "content": [ "And any iOS framework SDK to stream .wav and FLAC Free Lossless Audio Codec audio files", "I have a FLAC Free Lossless Audio Codec audio file that I need to play in my iOS application .", "The recording works fine but I need to encode the input audio into the FLAC codec .", "Flac is audio compression .", "So can a WebM video contain FLAC audio", "I use Audio Record to record audio and Media Codec to convert raw .WAV data buffer to Flac buffer .", "if .flac or .FLAC in Song evaluates to if .flac True or .FLAC in Song hence the condition is always True .", "From the Demuxer and Muxer Guidelines : .. . .. . Audio codec SHOULD be Vorbis .", "What format will the audio file be .. . wav .. . FLAC .. . is there option", "Is there python library or script to record audio in FLAC format directly", "iTunes does not like flac so I have to convert the flac files .", "I have a flac file .", "But it does not support flac file .", ".. . .. . Decoding offline : Flac to Wave .. . .. . My solution was to decode the Flac to raw 16bit PCM audio using a stripped down Aurora.js Assset class + dependencies .", "BTW SoX can read native FLAC files .flac but not Ogg FLAC files .ogg .", "The answer therefore depends on if there is a service registered for the mime type audio flac .", "In addition it adds a audio stream from a already existing .flac file .", "I need to use either a FLAC or PCM audio type .", "Or is it possible to convert the audio Output a .caf file to a .flac file", "Now I want convert audio raw file to flac format .", "My goal is to implement the C++ version of the FLAC decoder by providing the necessary callbacks methods needed by FLAC .", "Is it not included in flac already installed on the Mac", "Support for FLAC landed in chrome recently .", "Seeking Flac in Aurora was never implemented .", "Basically you d have to read in FLAC parse its container format decode the FLAC audio into some intermediate form encode it into Apple Lossless and put that inside a MPEG4 audio container because that s what ALAC uses .", "plz check sox --help and the flac is included in AUDIO FILE FORMATS .", "The error message returned by FLAC to the error callback is FLAC STREAM DECODER ERROR STATUS LOST SYNC .", "Below is sample code which inherits the FLAC decoder stream : .. . .. . Upon running the test method above FLAC will decode the SampleA.flac and upon listening to the audio the decoded data is correct .", "Considering : .. . http : www.commandlinefu.com commands view 4045 convert-wav-files-to-flac .. . and .. . ffmpeg to convert from flac to wav http : stackoverflow.com questions 23333678 ffmpeg-to-convert-from-flac-to-wav .. . .. . Out of ffmpeg and flac which should be used to convert wav files to flac", "but currently the android don t have a encoder for FLAC only decoder for FLAC in 3+ ICS4+", "I m study FLAC decode problem but can t figure out how to get FLAC frame length .", "flac files does support Pictures", "The link-to your FLAC files is broken .", "I splitted an audio FLAC file into segments of 10 seconds and encoded each one of them with Base64 .", "Also if I send base64 encoded string of FLAC audio file greater than 60 seconds the api returns an error .", "Make FLAC from WAV : .. . .. . ffmpeg -i input.wav ffmpeg.flac .. . flac -o flac.flac input.wav .. . .. . .. . 2 .", "Initially I was trying to record from microphone save it to WAV then convert WAV to FLAC and using GoogleSpeechAPI convert FLAC to text .", "The same applies to FLAC we can simply read in the first 4 bytes which will be fLaC .", "I want it to support .flac format as well .", "This Flac buffers are then written to a file which is not playable .", "I am able to successfully create flac in android .", "This code is used to convert .wav file to .flac file .", "Original Flac data can likely be discarded too .", "FLAC decoding is relatively simple as far as DSP goes .", "Why is FLAC acting this way", "I m studying how FLAC works although my question is valid for any lossless codec .", "Additionally I suspect that the FLAC codec is not picking the best order again based on MATLAB simulations .", "However most FLAC files are just 16-bit 44.1 kHz audio files so this shouldn t be an issue .", "Saving audio record to WAV file and encoding it to FLAC is not an option because of limitation of space and possible big sizes of records .", "Maybe who knows how i can save audio from microphone to flac file emmidiatly", "I ve read Mutagen could be good for this but so far failed to find any function that outputs the audio encoding as MP3 or FLAC", "Sorry - why would flac rely on a FFT at all", "My purpose is to decode flac data for testing purposes .", "I think there is no provider within the API for FLAC files .", "when I try to work on flac files I got .. . .. . no handler for file extension flac .. . .. . error .", "Simply enough I went ahead and added if .flac or .FLAC in Song : before the Try this way easily enough it would only process the correct filetype .", "As I looked at Flac file-format https : xiph.org flac developers.html it requires file header and frame header footer in order to be playable .", "From http : lists.xiph.org pipermail flac-dev 2016-February 005845.html .. . .. . The frame length you calculated 8192 bytes is that of the decoded frame not of the FLAC frame .", "I have a FLAC file which I need to split into several distinct FLAC files each of which must be below 100 MB in size .", "I m thinking about writing a FLAC to ALAC and or FLAC to AAC converter probably in C . Is it as simple as reading in one format and outputting another according to format specs", "So I have 2 audio flac files converted from mp4 files .", "First I decompressed the audio to a wav file then re-sampled the wav file to 8kHz and compressed to a flac file again .", "But I also need to do the same for flac files .", "If you encapsulte FLAC in Ogg this problem goes away .", "Could anyone guide me either to a FLAC recorder or how to convert the recorded wav file to a FLAC file on client-side or server-side linux server .", "1 Convert existing FLAC audio file to some other format like wav .. . .. . Using pydub you can read FLAC audio format and then convert to wav as below .. . .. . 2 Split converted wav file into chunk of specific size . .. . .. . Again there are various ways to do this .", "I am recording audio in wav format using recorder.js https : github.com mattdiamond Recorderjs but google s speech API accept only FLAC format of audio .", "How can I convert them to .flac preserving that metadata", "Then write script that pass metadata and wave to some wav-to-flac converter e.g .", "Anyway it s nicer to do something like if .flac in Song.lower : .", "I can only find that ICS 4.0 support decoding of FLAC but encode .", "Is there a simple implementation maybe with example that works to convert WAV to FLAC", "Temple Thanks for the post and the response with the attached code for FLAC conversion .", "It even outputs flac file but recorded voice is hard to identify because of noise .", "I did not want flac and alac files in the same directory .", "Anyway my understanding of it is that compilation fails because it cannot find the FLAC library .", "I am stuck on the second step : convert WAV file to FLAC .", "It s likely that flac is decoding to a bit depth higher than 8-bits .", "I am developing an iOS app that needs to play flac file .", "The only way to determine native FLAC frame size is to decode the audio which is impractical and slow on the streaming server .", "Here s a FLAC library in C with makefile for Android : github.com pelya commandergenius tree sdl android project jni http : github.com pelya commandergenius tree sdl android project jni flac You can easily compile a flac commandline tool for Android using this lib", "I have also used the default build as such : . configure --prefix base flac more --exec-prefix base flac main --disable-asm-optimizations make make install .. . .. . Now after adding the paths for FLAC headers and the libs into a brand new project .", "I thought i got the formatting wrong in the code so i tried .. . .. . HWR SpeechToText.ContentType audio 116 rate 16000 .. . .. . instead of .. . .. . HWR SpeechToText.ContentType audio x-flac rate 44100 .. . .. . Here is my google speech API code that turns FLAC files into TEXT i don t think it is necessary but whatever :", "Can encode any Flac file to MP3 .", "The code does not contain any attempts to convert it to a .flac file yet .", "Please note : this is a modified version of the Flac Encoder sample from their git-repo .", "Since you mentioned FLAC I had a look at how they do it .", "Differences .. . .. . flac was slightly faster in my single lazyass test but not significantly .", "Even though I know that the flac file contains an image .", "I m using this code : .. . .. . The code works with mp3 files but not with flac .", "int16 or int24 for the WAV to work with the WAV to FLAC convertion method .", "I want to convert a given flac file to a wav file .", "You need an encoder to convert pcm data to flac format .", "You cannot just change the header and expect the content to work as flac .", "I just check the signature like in your existing wave and flac test .", "Addressing your concerns about keeping the resulting audio intact FLAC is a lossless format and decoding it to raw PCM stored in a WAV file will keep perfect fidelity .", "Convert existing FLAC audio file to some other format like wav .. . Split converted wav file into chunk of specific size .", "I am attempting to decode and load FLAC audio into system memory using libFLAC under the example code which was bundled with libFLAC .", "I have spent a considerable amount of time trying to figure out how to convert this raw data into FLAC https : en.wikipedia.org wiki FLAC but I keep coming up with examples of how to convert .wav files into .flac files ." ] }
{ "confidence": [ 75.71815490722656, 69.18042755126953, 65.66035461425781, 61.64592742919922, 54.185516357421875, 53.7645263671875, 53.66228103637695, 53.40434265136719, 52.893287658691406, 52.28022766113281, 51.87294006347656, 51.38373565673828, 50.93854522705078, 50.871543884277344, 50.637306213378906, 50.26816177368164, 50.0363883972168, 49.79555892944336, 49.36539840698242, 49.21674728393555 ], "content": [ "Question : I have a FLAC Free Lossless Audio Codec audio file that I need to play in my iOS application . I m totally new in this area and know next to nothing about any audio frameworks or APIs for playing audio . I ve looked at Origami Engine https : github.com ap4y OrigamiEngine but i m not entirely sure if that s what I need . .. . Answer : No built-in facility of iOS allows for FLAC playing so either convert to AAC or ALAC or else use whatever third-party code you like .", "Question : Just would like to know : is there any iOS native framework SDK supports the streaming of HE-AAC AAC+ audio files And any iOS framework SDK to stream .wav and FLAC Free Lossless Audio Codec audio files Thanks a lot in advance . .. . Answer : You could use AVAudioPlayer . https : developer.apple.com library ios documentation AVFoundation Reference AVAudioPlayerClassReference Chapters Reference.html .. . .. . Check the supported formats in Apple docs : .. . .. . https : developer.apple.com library ios documentation AudioVideo Conceptual MultimediaPG UsingAudio UsingAudio.html apple ref doc uid TP40009767-CH2", "Question : So can a WebM video contain FLAC audio .. . Answer : No it has been proposed discussed https : groups.google.com a webmproject.org forum topic webm-discuss Qv1TxxsrzHQ but currently webm http : www.webmproject.org only support Vorbis http : www.webmproject.org docs container for audio . From the Demuxer and Muxer Guidelines : .. . .. . Audio codec SHOULD be Vorbis . .. . .. . .. . More details can be found here http : www.webmproject.org . Comment : Ok so VP9 video can be lossless as shown here http : www.webmproject.org docs encoder-parameters vp9-specific-options . Can Vorbis be lossless According to the faq http : www.webmproject.org about faq audio can also be Opus . So can Opus be lossless Or is there any other way to get lossless audio in a WebM Comment : @Brandon Opus seem to supported with vp9 . Opus https : en.wikipedia.org wiki Opus 28audio format 29 is lossy though as is Vorbis . Comment : @Brandon you can embed Flac with Matroska webm is based on this container but I am unsure of the support of it . Comment : Ok I ll just use Matroska for now then", "Question : null .. . Answer : I use Audio Record to record audio and Media Codec to convert raw .WAV data buffer to Flac buffer . This Flac buffers are then written to a file which is not playable . As I looked at Flac file-format https : xiph.org flac developers.html it requires file header and frame header footer in order to be playable . This is also the issue with other formats such as audio mp4a-latm audio 3gpp audio amr-wb which are Android already support encoders .. . .. . For audio mp4a-latm I successfully add file header frame header footer by follow this SO http : stackoverflow.com questions 18862715 how-to-generate-the-aac-adts-elementary-stream-with-android-mediacodec . For Flac and other format is there any wrapper library to do this rather than read long complicated file-format document Comment : Recently I used javaFlacEncoder and followed stackoverflow.com questions 9733064 http : stackoverflow.com questions 9733064 how-to-convert-the-wav-ogg-file-to-flac-file-in-android . I am able to successfully create flac in android . The file size is down to half from wav . Comment : This code is used to convert .wav file to .flac file . I m looking for frame based converter .", "Question : I m thinking about writing a FLAC to ALAC and or FLAC to AAC converter probably in C . Is it as simple as reading in one format and outputting another according to format specs Any tips on method language etc would be great Thanks .. . Answer : No it s not simple at all . FLAC decoding is relatively simple as far as DSP goes . But it s still about 3 000 lines-of-code in libav which doesn t include a bunch of support code located elsewhere in the library which it uses . AAC encoding is extremely complicated as it s a lossy codec as such encoding to AAC involves a lot of highly subjective psychoacoustic decisions . The AAC codec in libav is nearly 12 000 lines-of-code again not including code to generate the MPEG4 container and its results aren t even particularly high quality . If you are not already intimately familiar with MDCT https : en.wikipedia.org wiki Modified discrete cosine transform audio encoding attempting to write an encoder from scratch will be futile . You re probably best off using a library like libav which is already able to perform this conversion . Do not attempt to write it from scratch . The picky will note that lines-of-code isn t a great measure of complexity . I m aware of this -- I m just using it as a ballpark figure here . Comment : Thanks for the reply between your answer and cha0site s I ll definitely look into the libraries", "Question : EDIT : I ve updated the code below to resemble the progress I have made . I m trying to write the .wav header myself . The code does not work properly as of now the audio is not being written to the file properly . The code does not contain any attempts to convert it to a .flac file yet . .. . .. . I am using a Raspberry Pi Debian Linux http : www.raspbian.org to record audio with the ALSA library http : www.alsa-project.org main index.php Main Page . The recording works fine but I need to encode the input audio into the FLAC codec . This is where I get lost . I have spent a considerable amount of time trying to figure out how to convert this raw data into FLAC https : en.wikipedia.org wiki FLAC but I keep coming up with examples of how to convert .wav files into .flac files . Here is the current updated code I have for recording audio with ALSA it may be a bit rough I m still picking up C++ : .. . .. . How would I go about converting the PCM data into the FLAC and save it to disk for later use I have downloaded libflac-dev already and just need an example to go off of . .. . .. . The way I am doing it right now : .. . .. . The way it should be program does everything for me : Comment : You may have to use C++ and stream buffers for that . I just looked around the libflac interface a bit and found this : flac.sourceforge.net api group flac stream encoder.html ga56 http : flac.sourceforge.net api group flac stream encoder.html ga56 This would start encoding from a stream source as you want to do it but it requires providing a seek callback . That could be tricky in your case unless you buffer your stream first . Maybe the C++ API is for you : flac.sourceforge.net api group flacpp encoder.html http : flac.sourceforge.net api group flacpp encoder.html Comment : I would recommend you test absolutely all the calls to alsa for errors . It s total PITA but totally necessary . .. . Answer : Please refer to the below code : .. . .. . FLAC Encoder Test Code https : git.xiph.org p flac.git a blob f examples c encode file main.c h dab772606898f5ccd569d64ce1d6ed6e4e138537 hb HEAD .. . .. . This example is using a wav file as an input and then encodes it into FLAC . As I understand there is no major difference b w WAV file and your RAW data I think you can modify this code to directly read the buffer and convert it . You already have all the related information Channel Bitrate etc so it should not be much of a problem to remove the WAV header reading code . Comment : Just to be clear.. . I haven t tried implementing it : : P Comment : I ended up using the code from your link-to make my encoder work so I ll mark this as the accepted answer .", "Question : null .. . Answer : My goal is to implement the C++ version of the FLAC decoder by providing the necessary callbacks methods needed by FLAC . Below is sample code which inherits the FLAC decoder stream : .. . .. . Upon running the test method above FLAC will decode the SampleA.flac and upon listening to the audio the decoded data is correct . However decoding fails upon additional decoding requests as in SampleB.flac . The error message returned by FLAC to the error callback is FLAC STREAM DECODER ERROR STATUS LOST SYNC . My attempts were unsuccessful at restarting the decoder by calling Decoder : : Stream : : reset Decoder : : Stream : : flush and even the Decoder : : Stream : : finish . The offical documentation on FLAC writes that Stream : : reset sets the state FLAC STREAM DECODER SEARCH FOR METADATA and Stream : : flush sets FLAC STREAM DECODER SEARCH FOR FRAME SYNC . However no callback is made by the FLAC decoder to metadata callback upon starting to decode SampleB.flac the decoder appears to start decoding without the new metadata giving me the .. . LOST SYNC . Why What is the correctly way to reset the decoder in this situation Thank you .", "Question : EDIT : I ve updated the code below to resemble the progress I have made . I m trying to write the .wav header myself . The code does not work properly as of now the audio is not being written to the file properly . The code does not contain any attempts to convert it to a .flac file yet . .. . .. . I am using a Raspberry Pi Debian Linux http : www.raspbian.org to record audio with the ALSA library http : www.alsa-project.org main index.php Main Page . The recording works fine but I need to encode the input audio into the FLAC codec . This is where I get lost . I have spent a considerable amount of time trying to figure out how to convert this raw data into FLAC https : en.wikipedia.org wiki FLAC but I keep coming up with examples of how to convert .wav files into .flac files . Here is the current updated code I have for recording audio with ALSA it may be a bit rough I m still picking up C++ : .. . .. . How would I go about converting the PCM data into the FLAC and save it to disk for later use I have downloaded libflac-dev already and just need an example to go off of . .. . .. . The way I am doing it right now : .. . .. . The way it should be program does everything for me : Comment : You may have to use C++ and stream buffers for that . I just looked around the libflac interface a bit and found this : flac.sourceforge.net api group flac stream encoder.html ga56 http : flac.sourceforge.net api group flac stream encoder.html ga56 This would start encoding from a stream source as you want to do it but it requires providing a seek callback . That could be tricky in your case unless you buffer your stream first . Maybe the C++ API is for you : flac.sourceforge.net api group flacpp encoder.html http : flac.sourceforge.net api group flacpp encoder.html Comment : I would recommend you test absolutely all the calls to alsa for errors . It s total PITA but totally necessary . .. . Answer : If I understand the FLAC : : Encoder : : File http : flac.sourceforge.net api classFLAC 1 1Encoder 1 1File.html documentation you can do something like .. . .. . where buffer is an array of size samples of 32-bit integer pointers . Unfortunately I know next to nothing about audio encoding so I can t speak for any other options . Good luck", "Question : EDIT : I ve updated the code below to resemble the progress I have made . I m trying to write the .wav header myself . The code does not work properly as of now the audio is not being written to the file properly . The code does not contain any attempts to convert it to a .flac file yet . .. . .. . I am using a Raspberry Pi Debian Linux http : www.raspbian.org to record audio with the ALSA library http : www.alsa-project.org main index.php Main Page . The recording works fine but I need to encode the input audio into the FLAC codec . This is where I get lost . I have spent a considerable amount of time trying to figure out how to convert this raw data into FLAC https : en.wikipedia.org wiki FLAC but I keep coming up with examples of how to convert .wav files into .flac files . Here is the current updated code I have for recording audio with ALSA it may be a bit rough I m still picking up C++ : .. . .. . How would I go about converting the PCM data into the FLAC and save it to disk for later use I have downloaded libflac-dev already and just need an example to go off of . .. . .. . The way I am doing it right now : .. . .. . The way it should be program does everything for me : Comment : You may have to use C++ and stream buffers for that . I just looked around the libflac interface a bit and found this : flac.sourceforge.net api group flac stream encoder.html ga56 http : flac.sourceforge.net api group flac stream encoder.html ga56 This would start encoding from a stream source as you want to do it but it requires providing a seek callback . That could be tricky in your case unless you buffer your stream first . Maybe the C++ API is for you : flac.sourceforge.net api group flacpp encoder.html http : flac.sourceforge.net api group flacpp encoder.html Comment : I would recommend you test absolutely all the calls to alsa for errors . It s total PITA but totally necessary . .. . Answer : Please note : this is a modified version of the Flac Encoder sample from their git-repo . It includes some comments and hints on how to change it to OP s requirements entire source for this will be a little bit long . And do note that this is the C API which tends to be a bit more complex than the C++ one . But it is fairly easy to convert between the two once you get the idea .", "Question : I want to convert a given flac file to a wav file . Most of the questions on StackOverflow are the opposite of my question . Have anyone an idea how to solve this problem I heard something about JavaFlacEncoder link http : sourceforge.net projects javaflacencoder but I could not find a method to convert flac to wave . .. . Answer : Use flac -d to from the man page .. . .. . .. . Decode the default behavior is to encode .. . .. . .. . Another option would be the JustFLAC https : github.com drogatkin JustFLAC library again you need to decode from FLAC . WAV is uncompressed audio . Comment : I give it a try Thanks : And Thanks for the explanation . : Comment : it worked great Thanks : Comment : Hi @ElliottFrisch is there a possibility to set the Sample Rate of a given Flac file using the JustFlac library I need to convert a given FLAC file with more than 8000Hz Sample Rate to 8000HZ Sample Rate . . thanks Comment : Probably not . Resampling audio decompressing audio . Flac is audio compression . You can probably do it with the java sound API . Comment : Thx I ve tried it with the Java Sound API but for FLAC files I get an UnsupportedAudioFileException file is not a supported file-type . I think there is no provider within the API for FLAC files . So I tried an ugly workaround . First I decompressed the audio to a wav file then re-sampled the wav file to 8kHz and compressed to a flac file again . Until there is no other way or a better solution I use this for my purpose . Anyways thanks for your answer . :", "Question : Not interested in silverlight . Flash javascript html5 solutions are acceptable . If you do not know such solutions could you please say is it possible to make such that or not Comment : Support for FLAC landed in chrome recently . The only way to know where it works is by checking manually . Here s a site to help with that . http : hpr.dogphilosophy.net test .. . Answer : When I had to play FLAC in-browser my starting point was also the Aurora framework https : github.com audiocogs aurora.js . However the Aurora player is geared around using ScriptProcessorNode https : developer.mozilla.org en-US docs Web API ScriptProcessorNode to decode chunks of audio on the fly . This didn t pan out for many reasons . 1 . Seeking Flac in Aurora was never implemented . 2 . Stuttering and unacceptable performance in Firefox even on a mid-range 2014 desktop . 3 . Not feasable to offload decoding to a WebWorker . 4 . Doesn t inter-operate with audio formats the browser does support . 5 . I didn t want to be responsible for re-sampling the sample-rate seeking and other low-level audio tasks that Aurora necessarily assimilates . .. . .. . Decoding offline : Flac to Wave .. . .. . My solution was to decode the Flac to raw 16bit PCM audio using a stripped down Aurora.js Assset class + dependencies . Look in the source for Asset.get format callback Asset.fromFile and Asset.prototype.decodeToBuffer . Next take the audio data along with extracted values for sample-rate and channel count and build a WAVE file . This can be played using an HTML5 audio element sent though an audio graph using createMediaElementSource https : developer.mozilla.org en-US docs Web API AudioContext.createMediaElementSource or absolutely anything you can do with natively supported audio formats . Note : Replace clz function in decoder.js https : github.com audiocogs flac.js blob master src decoder.js with the native Math.clz32 https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Math clz32 to boost performance and polyfill clz32 for old browsers . Disadvantage .. . .. . The decoding time . Around 5 seconds at 100 CPU for an average 4min song . Advantages .. . .. . 1 . Blob opposed to arraybuffer isn t constrained by RAM and the browser can swap it to disk . Original Flac data can likely be discarded too . 2 . You get seeking for free . 3 . You get sample-rate re-sampling for free . 4 . CPU activity paid for upfront in WebWorker . 5 . Should browsers EVER gain native Flac support very easy to rip out . It doesn t create a strong dependency on Aurora . Here s the function to build the WAVE header and turn the raw PCM data into something the browser can natively play . Comment : Do you have a working demo to show with this : Comment : codepen.io enjikaka pen avVKGz http : codepen.io enjikaka pen avVKGz - I get alot of white noise . Do you know why Comment : Sorry it s been a year since I touched this and I no longer have samples . Needless to say the audio data has to be raw 16bit PCM data with accurate sample rate and channel count . It s quite brittle . Anything slightly wrong and you ll hear corrupted audio .", "Question : I am recording audio in wav format using recorder.js https : github.com mattdiamond Recorderjs but google s speech API accept only FLAC format of audio . Could anyone guide me either to a FLAC recorder or how to convert the recorded wav file to a FLAC file on client-side or server-side linux server . .. . Answer : WAV files can simply converted to FLAC via ffmpeg with this command : .. . .. . You can find more documents about ffmpeg in the official site https : www.ffmpeg.org ffmpeg.html Also there is a php wrapper for the ffmpeg binary on github https : github.com PHP-FFMpeg PHP-FFMpeg . Comment : problem solved using SOX on server :", "Question : I recording audio with class audoiRecord . Now I want convert audio raw file to flac format . I convert raw file to wav next way : .. . .. . This piece of code is responsible for the file header .. . .. . I do not understand what should be the parameters of the flac file Comment : hello user if you are able to convert raw file to flac then please share your way so that i could help myself . I am stuck in this problem from 1 week . A little help would be appreciated . .. . Answer : You need an encoder to convert pcm data to flac format . You cannot just change the header and expect the content to work as flac . Android at least till 4.1 does not include a FLAC encoder although there is a decoder supported from 3.1 onwards Source : http : developer.android.com guide appendix media-formats.html . s I do not have direct experience but have seen people use ffmpeg as a flac encoder . This project audioboo-android https : github.com Audioboo audioboo-android which contains the native libFLAC libFLAC++ encoder looks interesting . s Comment : Hi can you please update the link for audioboo-android because it is dead .", "Question : null .. . Answer : Is there python library or script to record audio in FLAC format directly Most of the time I find is first files are recorded in wav than converted to FLAC . I googled but couldn t find any solution .", "Question : I m writing a C++ library for decoding and encoding audio between different formats codecs . I have a routine for quickly detecting the format before loading the required codec library . For WAV files one can simple look for the ASCII values RIFF and WAVE at the start of the file . The same applies to FLAC we can simply read in the first 4 bytes which will be fLaC . But how can I quickly detect if a file is MP3 I can t rely on the file extension . I also can t try to decode the first MP3 frame since there might be additional data at the start of the file eg : ID3 cover image etc . .. . Answer : I just check the signature like in your existing wave and flac test . An mp3 file should have this in hex http : www.garykessler.net library file sigs.html : .. . 0x49 0x44 0x33 .. . It works for some of the files I had . I m not sure if it works in all circumstances so a more complex solution like Oak Bytes s answer may be required . Comment : The byte sequence you suggest I D 3 is part of the header for an ID3 v2 metadata tag but not all MP3 files will have ID3v2 tags and a ID3v2.4 tag could be at the end of the file rather than the beginning .", "Question : I m thinking about writing a FLAC to ALAC and or FLAC to AAC converter probably in C . Is it as simple as reading in one format and outputting another according to format specs Any tips on method language etc would be great Thanks .. . Answer : Do it yourself all the way Sounds difficult . It is as simple as reading in one format and outputting another but the little details are actually huge behemoths with a lot of rather complex math . Basically you d have to read in FLAC parse its container format decode the FLAC audio into some intermediate form encode it into Apple Lossless and put that inside a MPEG4 audio container because that s what ALAC uses . If you gave up on doing it all on your own and used libraries for decoding FLAC and encoding ALAC it wouldn t be at all difficult mind you - it s just that encoders and decoders are not simple to write . Look into libflac and libavcodec for encoders decoders then writing your program around them shouldn t be too difficult . Comment : Thanks for the reply I will look into using the libraries instead . Didn t realize how tough it would be", "Question : when I try to work on flac files I got .. . .. . no handler for file extension flac .. . .. . error . is there any way to solve this problem in windows . Comment : plz check sox --help and the flac is included in AUDIO FILE FORMATS . BTW SoX can read native FLAC files .flac but not Ogg FLAC files .ogg . Comment : I have complated 86 pages of sox help file . I think because it is originally written for linux it is not easy to understand it Comment : The second thing some other says I need to compile sox.exe with flac support it is linux process not windows and I have no idea what to do.. . .. . Answer : This answer may be a bit late but you want version 14.4.1a available here http : sourceforge.net projects sox files sox 14.4.1 sox-14.4.1a-win32.exe download . FLAC was disabled accidentally in 14.4.1 which is still the default on SourceForge .", "Question : I need to convert a flac file to a wav file without changing sample rate and bit depth . As far as I know changing these properties may distort the audio so how do i specify them not to be changed Also is there any way to prevent metadata to be written to the output file Comment : ffmpeg -i input output.wav may work for you .. . Answer : As rogerdpack commented the command-line : .. . .. . should do exactly what you want . Addressing your concerns about keeping the resulting audio intact FLAC is a lossless format and decoding it to raw PCM stored in a WAV file will keep perfect fidelity . The only thing you might have to be concerned about is if your FLAC file is a higher than normal bit depth like 24 32 or 64 bits per sample or has a crazy multichannel configuration . I haven t kept up on whether FFmpeg supports all those combinations . However most FLAC files are just 16-bit 44.1 kHz audio files so this shouldn t be an issue . About scrubbing metadata check this Superuser question http : superuser.com questions 441361 strip-metadata-from-all-formats-with-ffmpeg . Comment : Thanks for the answer but i have already figured out that bit depth converts to 16bit from higher so I need to set it manually .", "Question : I can only find that ICS 4.0 support decoding of FLAC but encode . I need some encoder to convert wav to flac but currenty I can t find it . I find there is a jFlac avaible but I don t know how to use this library just simply convert the files . Could anyone give me a hand on it Today I just some idea by myself with using the JavaFlacEncoder . and it works for certain bitrates of WAV . I changed the value into a hard coding value in which it is working now . Comment : I don t quite understand your question do you want to encode a audio file using your android or do you want to playback some previously encoded file Comment : I want to use ASR from google and wish to use android to record the sound to wav and using some encoder to convert from wav to flac and upload to google and get the recognized text back . but currently the android don t have a encoder for FLAC only decoder for FLAC in 3+ ICS4+ Comment : Here s a FLAC library in C with makefile for Android : github.com pelya commandergenius tree sdl android project jni http : github.com pelya commandergenius tree sdl android project jni flac You can easily compile a flac commandline tool for Android using this lib Comment : It looks like javax.sound which is required for this code is not usable in Android . Is there a simple implementation maybe with example that works to convert WAV to FLAC Comment : Nevermind . I got this to work by downloading the entire JavaFlacEncoder project and copying the source files into my project and replaced FLAC FileEncoder.java with the code above . .. . Answer : Temple Thanks for the post and the response with the attached code for FLAC conversion . It works as you described with one minor issue . The FLACFileOutputStream fout and the FileInputStream sin are not closed at the end of the function . Please update your post code so others can benefit as well . PS : FLACFileOutputStream fout will need to be promoted to a class variable for this to work .", "Question : I want to check if a audio file to see if its MP3 or FLAC the checks only have to be basic but I want to go beyond simply checking the file extensions .. . .. . Works okay but no good if the file doesn t have an extensions written in or someone passes a file with a fake extension .. . .. . I ve tried but it just returns None .. . .. . I ve also tried using magic but it returns application octet-stream which isn t much use . I ve read Mutagen could be good for this but so far failed to find any function that outputs the audio encoding as MP3 or FLAC .. . Answer : You can read file specifications of mp3 and flac and then can implement a checker that reads and parses mp3 as a binary file.A modifiable example with a similar goal is here http : blog.eringal.com python verifying-that-an-mp3-file-is-valid-in-python" ] }
[ "yes-answer-long", "yes-answer-short" ]
lossless
UNK_RELATION
python-jira@jira@111
python-jira -- actually called jira-python this is a python library created to use with rest apis provided by @placeholder .
{ "confidence": [ 56.31026077270508, 53.50889205932617, 52.680118560791016, 52.11505126953125, 52.11505126953125, 51.485687255859375, 51.142494201660156, 50.61118698120117, 50.11433410644531, 48.80500030517578, 48.61091613769531, 47.969783782958984, 47.88420486450195, 47.61458969116211, 47.5441780090332, 46.79734420776367, 46.57594299316406, 46.43043899536133, 45.55984115600586, 45.55984115600586, 45.05445861816406, 45.036598205566406, 44.83201599121094, 44.83201599121094, 44.30280685424805, 44.0355339050293, 43.66905975341797, 43.4783935546875, 43.4783935546875, 42.69183349609375, 42.27522277832031, 41.923828125, 41.52964401245117, 41.42427444458008, 41.056800842285156, 40.79197692871094, 40.64018630981445, 40.64018630981445, 40.42390060424805, 40.09593963623047, 39.23922348022461, 39.038963317871094, 39.038963317871094, 39.038963317871094, 39.038963317871094, 38.456817626953125, 38.38484191894531, 38.368927001953125, 38.11150360107422, 37.87600326538086, 37.840003967285156, 37.83795928955078, 37.586875915527344, 37.521575927734375, 36.4821662902832, 36.1364631652832, 35.493492126464844, 35.41999053955078, 35.18030548095703, 35.18030548095703, 35.18030548095703, 34.97945785522461, 34.972408294677734, 34.16679763793945, 34.04816436767578, 33.82252883911133, 33.409767150878906, 33.03429412841797, 32.93669509887695, 32.90353775024414, 32.685768127441406, 32.58827209472656, 32.505126953125, 32.4814453125, 32.13258743286133, 32.12111282348633, 31.840625762939453, 31.70657730102539, 31.5504207611084, 31.5504207611084, 31.52243423461914, 31.455102920532227, 31.358562469482422, 31.074981689453125, 30.913036346435547, 30.913036346435547, 30.63507080078125, 30.63100814819336, 30.312740325927734, 30.312740325927734, 30.27248764038086, 30.184375762939453, 30.160118103027344, 30.04436492919922, 29.89590072631836, 29.89590072631836, 29.689403533935547, 29.536327362060547, 29.475296020507812, 29.23716926574707 ], "content": [ "PS : I should use JIRA python API", "I m new to jira-python .", "I m trying to update an existing JIRA using the jira-python module http : jira-python.readthedocs.org en latest .", "Also there is something python-jira .", "The problem is with python-jira .", "The question is really about the Jira REST API itself not the python client since it is a very thin layer https : bitbucket.org bspeakmon jira-python src 2145ac8dccc44868c6ea3df21b662574435a7c87 jira client.py at master cl-563 .", "I am trying to invalidate the session using jira-python rest-client .", "I want to create a jira issue in python .", "I am using jira python library .", "Is there an easy way to retrieve what component was set as the default in the jira-python api", "I m trying to connect via python-jira using a proxy : .. . .. . Traceback error : .. . .. . Any idea how to allow jira-python to connect with proxy", "Additionally is there an easy way in Python to get the JIRA keywords", "Bit surprised really since Ben Speakmon jira-python author thought verbs like add weren t supported yet in the issue at bitbucket.org bspeakmon jira-python issue 10 https : bitbucket.org bspeakmon jira-python issue 10 verbs-not-working-with-update-function", "I am trying to upload a file to JIRA via its REST API using the python lib found here : jira python documentation http : jira-python.readthedocs.org en latest .. . .. . It seems pretty straight forward I wrote a method that allows me to pass an issue and then it attaches a filename .", "Okay so now I ve discovered jira python jira-python.readthedocs.org en latest https : jira-python.readthedocs.org en latest .. .", "Code snipped in the original question is ok error reporting from the jira-python library however leaves a lot to be desired.. .", "i am using JIRA-python 1.0.7 .", "I want to use the offical Jira client for Python which is available here https : github.com pycontribs jira .", "Here is the add attachment method from the source https : bitbucket.org bspeakmon jira-python src 6897f63cf459eeb98c80638273ffa3ba8f99bd70 jira client.py at master cl-323 code :", "I meant to say my code was valid for the jira-python plugin but the problem was that the JIRA issue had some required fields unset .", "Hello i am using the following python-jira client .. . .. . https : pythonhosted.org jira .. . .. . My question is is there a way to get all the issues and its corresponding labels in the projects using the python-jira API", "I m trying to use http : jira.readthedocs.org en latest python-jira as jira API .", "I am new to jira-python and have run into an issue with using jirashell .", "I am using python-jira to add watchers to an issue .", "This sounds like a bug to me raise a bug in jira-python library with an example that can reproduce it and I will fix it asap .", "https : answers.atlassian.com questions 226857 using-python-jira-through-a-proxy-server continue https 3A 2F 2Fanswers.atlassian.com 2Fquestions 2F226857 2Fusing-python-jira-through-a-proxy-server application acac .. . .. . Here s code :", "I am just a beginner with jira-python any help is appreciated thanks .", "I wanted to use Python-Jira but cannot install it properly .", "Is there a way to install use python-jira without the pip installation process", "Are you pointing to your pip install in your python Lib site-packages folder or the jira-master jira", "For my current python instance I just used pip install jira .", "I m trying to update the reporter of an issue using the JIRA Python API version 1.0.3 .", "I am using Jira library with Python to create Jira-issue but getting below error : .. . .. . jira.exceptions.JIRAError : JiraError HTTP 400 .. . .. . text : Field Component s cannot be set .", "How to assign project category to a project using JIRA rest apis .", "I am using JIRA python API to create JIRA tickets from my code .", "I m new in jira python and I want to have a list with tickets obtained with an existing filter .", "I am writing a python tool that should get information from Jira .", "I am trying to authenticate to jira by google sign-in using a python script .", "I am trying to automate a bit on jira management blocked on creating issue for a long time going along with the jira-python official documents .", "The search issues https : pythonhosted.org jira searching method uses the JIRA REST API to run the JQL query so you can also look at the JIRA REST API documentation https : docs.atlassian.com jira REST latest api 2 search-search to understand the startAt and maxResults parameters : .. . .. .", "There is no way to modify the meta data from the JIRA REST API .", "Found the answer here - https : answers.atlassian.com questions 15277569 python-jira-client-destroy-session", "I am using python-jira package installed using PIP in a virtual environment .", "As Cory and Miles pointed below a workaround is possible until Jira Python team solves this once and for all .", "After install 1.0.6 as you suggested above the error continues as : .. . You are running an outdated version of JIRA Python 1.0.6 .", "Using Python 2.7 and jira-python package version 1.0.4 .. . .. . I tried this code : .. . .. . I get the error : File Library Python 2.7 site-packages jira client.py line 2357 in create project for template in j projectTemplates : KeyError : u projectTemplates .. . .. . When I look at the source : https : pythonhosted.org jira modules jira client.html JIRA.create project .. . .. . It seems like my project template is empty .", "I use jira 1.0.3 as PyCharm states", "questions 1900189 how-to-access-a-standard-library-module-in-python-when-there-is-a-local-module-w 2 answers .. . .. . I m working on a Python project where I ve to communicate with the Jira API .", "I execute the following command .. . .. . pip install jira python .. . .. . as per the documentation here - http : jira-python.readthedocs.org en latest .. . .. . I get an error - .. . .. . Could not find a version that satisfies the requirement jira-python from versions : No matching distribution found for jira-python", "I have a python script set up to send attachments to our JIRA server .", "This is a JIRA global configuration it needs to be set in jira-config.properties for the JIRA installation .", "I m actually missing Jira there .", "For JIRA Cloud you cannot change this value : confluence.atlassian.com jirakb https : confluence.atlassian.com jirakb changing-maxresults-parameter-for-jira-rest-api-779160706.html", "I am trying to get the Sprint Information for a Burndown chart from JIRA via its REST API using the python lib found here : jira python documentation .. . .. . It seems I cannot get the chart itself back via the API so I d like to get all information to draw it myself .", "I upgraded to the development version using the following command : .. . .. . After upgrading I was able to create a project using python-jira", "I am trying to create a JIRA using jira-python SOAP the issue dict looks like : .. . .. . fails with below stack-trace : .. . .. . Is there anything wrong with the way I pass-in fixVersions", "Using curl works fine but I wanted to see the objects that are getting returned and get help as I develop by python-jira integration .", "However if you wish to get into JIRA Plugin development you could look to create a plugin that creates a REST API that could modify the Attachments Meta Data and adds a downloaded property on the Attachment https : docs.atlassian.com jira 6.2.1 com atlassian jira issue attachment Attachment.html object .", "For reference : .. . .. . https : jira-python.readthedocs.org en latest", "and one that lets me retrieve an issue from JIRA .", "what version of jira module are you using", "I also have no problem doing this directly through the API but we are re-writing everything to go through jira-python for cleanliness ease of use .", "And there is no project update method at github.com pycontribs jira blob master jira resources.py https : github.com pycontribs jira blob master jira resources.py", "This question already has an answer here : .. . .. . OSX El Capitan : sudo pip install OSError : Errno : 1 Operation not permitted questions 33004708 osx-el-capitan-sudo-pip-install-oserror-errno-1-operation-not-permitted 10 answers .. . .. . With the documentation at : https : pythonhosted.org jira installation .. . .. . It says : The easiest and best way to install jira-python is through pip : .. . .. . pip install jira This will handle the client itself as well as the requirements .", "According to the Issue Fields in JIRA REST APIs https : developer.atlassian.com display JIRADEV Issue+Fields+in+JIRA+REST+APIs priority can be set this way : .. . .. . As for the other fields use the REST API Browser RAB https : developer.atlassian.com display DOCS Using+the+REST+API+Browser to inspect what other fields are available for filtering issues in a particular project as you may know fields can vary from project to project .", "I am 100 JIRA is a component since I manually created a test issue and selected JIRA as a component .", "Resolved by reinstalling python-requests via yum .", "I m trying to keep a Pyton JIRA https : pythonhosted.org jira s JIRA object in Django s session .", "I don t get any error and my json matches what should be correct both on Jira s docs and jira-python questions online .", "from jira.client import JIRA import cgi cgitb options server : jira.server.com http : jira.server.com jira JIRA options basic auth username Password root dict project : key : ABC summary : Test description : Ignore this .", "Jira is complaining about the unexpected backslash in Component s .", "Install Virtualenv https : virtualenv.pypa.io en latest and you will have your own version of Python and Pip so you should be able to install jira-python properly .", "I have limited experience with Jira and Jira query language .", "Yesterday it took me 2 hours to figure out how to construct the REST URL so I get a coherent response from Jira today I get to the same point in about 20 minutes with jira-rest .", "It should be fixed soon github.com pycontribs jira issues 66 https : github.com pycontribs jira issues 66", "Please read the Python documentation for your version of Python .", "From the docs at https : pythonhosted.org jira : .. . .. . Note the maxResults argument .", "My Jira server version is 6.3.13", "This is regarding JIRA Query language .", "create the filter in JIRA 1 .", "I am able to display the attachment from jira using python using issue.fields.attachment .. . .. . .. . attach list issue.fields.attachment .. . print attach list .. . print attach list 0 .. . print attach list 1 .. . .. . .. . Output : .. . .. . how to retrieve the id from that list .", "Take a look at the example of add set and remove for components in https : developer.atlassian.com display JIRADEV JIRA+REST+API+Example+-+Edit+issues You can use the name instead of the id which is helpful e.g .", "If you run your own JIRA you can take a look at this article about how to configure your JIRA to change the max number of results : confluence.atlassian.com jirakb https : confluence.atlassian.com jirakb how-to-increase-the-jira-search-results-limit-on-the-issue-navigator-357696242.html .", "In jirashell.py go to line 250 and change the line from : jira JIRA options options basic auth basic auth oauth oauth to jira JIRA options options basic auth basic auth oauth None I did not have IPython installed either .", "I m completely new to Python .", "All the following is using python", "Maybe it will help to mention that my intent is to write a python script that will use REST to do issue searches like this so I can store it in a Python dict and do further processing on it .", "The package introduces a global namespace jira meaning you have to .. . .. . to use the API .", "My versions are valid Jira versions .", "What version is your JIRA server", "However when I run it with python I get around 50 issues .", "Looking at the documentation for python-jira s add watcher https : jira.readthedocs.io en latest api.html jira.JIRA.add watcher and JIRA s API documentation for adding a watcher https : docs.atlassian.com jira REST latest api 2 issue-addWatcher I cannot see what I am missing .", "It appears it is doing a string-comparison within client.py L321 https : github.com pycontribs jira blob develop jira client.py L321 and therefore 1.0.6.dev20160420173258 1.0.6 .", "Yeah guess I ll go to the JIRA site .", "I have been trying to programatically retrieve the default component set for a JIRA project with little success .", "It is mentioned in documentation http : jira-python.readthedocs.org en latest jira.client.JIRA.add attachment that as a argument they expect file-like object .", ".. . Spyder IDE in Anaconda latest version with Python 3.5 installed .. . .. . jira-python 1.0.7 .. . .. . There are several projects on the customized JIRA deployed and I m interested on the project- ZXQ in which I create an issue manually with Project Issue Type Summary and Priority required This is my first post on stackoverflow and I don t have permission to upload pic . .", "I want to integrate jira to smartsheet I use zapier for Added new row but when Jira update that time smartsheet row is not updated so I need to work on smartsheet data tracker but problem is I am not familiar with python and linux .", "For calculations there are examples in this post http : stackoverflow.com questions 1750644 how-to-use-python-to-calculate-time and there s detailed documentation here https : docs.python.org 2 library datetime.html .", "You can use .search issues https : pythonhosted.org jira searching method :" ] }
{ "confidence": [ 63.28494644165039, 61.04338836669922, 59.719451904296875, 58.57561111450195, 56.987152099609375, 56.987152099609375, 56.49671173095703, 54.08970642089844, 53.193763732910156, 52.38914489746094, 52.16153335571289, 49.811214447021484, 49.67345428466797, 49.65184783935547, 49.539306640625, 49.4995231628418, 49.125755310058594, 48.99323654174805, 48.82638168334961, 48.485694885253906 ], "content": [ "Question : I want to create a jira issue in python . I know how to set the summary issue type description and project name but I can t find how to set priority due date environment and other fields . This is what I know : .. . .. . How can I set the other fields Comment : Please make sure to mark the answer as accepted if it helped you to solve the problem . stackoverflow.com help someone-answers http : stackoverflow.com help someone-answers . Thanks . .. . Answer : The question is really about the Jira REST API itself not the python client since it is a very thin layer https : bitbucket.org bspeakmon jira-python src 2145ac8dccc44868c6ea3df21b662574435a7c87 jira client.py at master cl-563 . According to the Issue Fields in JIRA REST APIs https : developer.atlassian.com display JIRADEV Issue+Fields+in+JIRA+REST+APIs priority can be set this way : .. . .. . As for the other fields use the REST API Browser RAB https : developer.atlassian.com display DOCS Using+the+REST+API+Browser to inspect what other fields are available for filtering issues in a particular project as you may know fields can vary from project to project .", "Question : I am trying to invalidate the session using jira-python rest-client . How can I achieve this feature is it built-in or needs to be implemented I tried looking at all the APIs available in client.py and there seems to be no way to destroy or invalidate a session . Another question that follow is do I have to authenticate on every REST call made by the client Currently that is what I am doing . Comment : I usually create one jira client at the beginning of program and then just use reference to it . .. . Answer : JIRA invalidates session after 5 hours from version 4.3 onwards . Found the answer here - https : answers.atlassian.com questions 15277569 python-jira-client-destroy-session", "Question : I m trying to update an existing JIRA using the jira-python module http : jira-python.readthedocs.org en latest . Specifically I m trying to set the fixesVersion list of an issue . I ve been trying for a while with no luck . What am I missing Returned stackTrace : .. . Answer : Take a look at the example of add set and remove for components in https : developer.atlassian.com display JIRADEV JIRA+REST+API+Example+-+Edit+issues You can use the name instead of the id which is helpful e.g . Comment : Thanks for the link - needed to tweak the json above a little but put me on the right path . Correction was : fixVersions : add : name : version-name Comment : Glad it worked . Bit surprised really since Ben Speakmon jira-python author thought verbs like add weren t supported yet in the issue at bitbucket.org bspeakmon jira-python issue 10 https : bitbucket.org bspeakmon jira-python issue 10 verbs-not-working-with-update-function Comment : Whoops - sorry I wasn t clear . I meant to say my code was valid for the jira-python plugin but the problem was that the JIRA issue had some required fields unset . The only way I could debug this was by using curl and following the instructions given in the link you posted .", "Question : I am trying to invalidate the session using jira-python rest-client . How can I achieve this feature is it built-in or needs to be implemented I tried looking at all the APIs available in client.py and there seems to be no way to destroy or invalidate a session . Another question that follow is do I have to authenticate on every REST call made by the client Currently that is what I am doing . Comment : I usually create one jira client at the beginning of program and then just use reference to it . .. . Answer : Just to be clear one of the reasons why is called REST api is because you do not have to do anything with the session .", "Question : I am trying to upload a file to JIRA via its REST API using the python lib found here : jira python documentation http : jira-python.readthedocs.org en latest .. . .. . It seems pretty straight forward I wrote a method that allows me to pass an issue and then it attaches a filename . and one that lets me retrieve an issue from JIRA . then in my main script I am getting the issue and attaching the file to an issue I retrieved from JIRA .. . .. . I am able to get the issue create issues if needed but when using the self.jira.add attachment method I am getting 405 Method Not Allowed . The file-exists and is able to be opened . Here is the add attachment method from the source https : bitbucket.org bspeakmon jira-python src 6897f63cf459eeb98c80638273ffa3ba8f99bd70 jira client.py at master cl-323 code : .. . Answer : It is mentioned in documentation http : jira-python.readthedocs.org en latest jira.client.JIRA.add attachment that as a argument they expect file-like object . Try to do something like : Comment : it also says in the second half of the sentence also works if it is a string with the filename Thanks for your input though .", "Question : I am trying to upload a file to JIRA via its REST API using the python lib found here : jira python documentation http : jira-python.readthedocs.org en latest .. . .. . It seems pretty straight forward I wrote a method that allows me to pass an issue and then it attaches a filename . and one that lets me retrieve an issue from JIRA . then in my main script I am getting the issue and attaching the file to an issue I retrieved from JIRA .. . .. . I am able to get the issue create issues if needed but when using the self.jira.add attachment method I am getting 405 Method Not Allowed . The file-exists and is able to be opened . Here is the add attachment method from the source https : bitbucket.org bspeakmon jira-python src 6897f63cf459eeb98c80638273ffa3ba8f99bd70 jira client.py at master cl-323 code : .. . Answer : Check that the URL that you are specifying for JIRA if using the on-demand service is https : instance.atlassian.net . .. . .. . I just hit this as well and it sends a POST request to http : instance.atlassian.net and gets redirected to https : instance.atlassian.net but the client sends a GET request to the redirected address see : http : programmers.stackexchange.com questions 99894 why-doesnt-http-have-post-redirect for more information", "Question : I m trying to update an existing JIRA using the jira-python module http : jira-python.readthedocs.org en latest . Specifically I m trying to set the fixesVersion list of an issue . I ve been trying for a while with no luck . What am I missing Returned stackTrace : .. . Answer : Played around more with it realized the error . It was failing due to some required fields being unset . Code snipped in the original question is ok error reporting from the jira-python library however leaves a lot to be desired.. . Comment : what was missing", "Question : I m trying to create an inproc hook written in Python for Hg TortoiseHg . It supposed to parse the commit-message and do custom operations on JIRA based on it . I m trying to use http : jira.readthedocs.org en latest python-jira as jira API . It works great when I test my script with python myscript .py . But I have problems installing jira api into TortoiseHg . For my current python instance I just used pip install jira . But it seems like TortoiseHg has its own python instance . How can I install jira into TortoiseHg I ve tried sys.path.append myfolder then adding myfolder into my project and copying sources of jira module there . Then I do from client import JIRA and looks like JIRA tries to load but it seems that its dependency fails I see No module named six.moves.urllib.parse error . So it doesn t seem like a way . I have very little python experience so I might miss something obvious . Are there any other options .. . Answer : In short : Check to make sure that you import all needed libs that are not jira . .. . .. . Long Awnser : From my understanding your program works fine when running the script through python this means that your script works . The problem that I could see happening is that you do not have the correct library s imported into TortoiseHg . If you look at the python doc there is a requirements section look to see if you are using any of those libraries if you are include those . I also read somewhere that the HTTP management is handled by some of pythons own built-in libraries . Comment : I know that I m missing libraries . I m actually missing Jira there . The problem is that I have no idea how to install it there . For now I solved the problem by running second instance of python which is my python so it runs ok but this is not a long-term solution . Comment : In that case check the version of python that TortoiseHg uses as you probably know anything below python-2.7 wont work . You probably should check your Mercurial version as well because from my understanding that also runs python . Also check this link out and see if it works for you : stackoverflow.com questions 13685159 http : stackoverflow.com questions 13685159 make-tortoisehg-use-my-python-installation Comment : I m using TurtoiseHg that has both hg and python-2.7 embedded . I have no idea why did they do this but they did . That s where the problem is coming from . I ve tried solutions from the answer you provided unfortunately it doesn t work . Putting sys.path.append to the local Python libraries folder is a nice idea but for some reason it keeps complaining that it misses utils library which I am sure I have Comment : Overall I starting to feel like my idea with running local python as separate process and then piping output back is the only workable solution Comment : When you use sys.path.append which location are you pointing too Are you pointing to your pip install in your python Lib site-packages folder or the jira-master jira Also if you know that TurtoiseHg is using python-2.7 you might want to try running your py script with the same version externally as your script might run in 3.5 but not in 2.7 .", "Question : I m trying to connect via python-jira using a proxy : .. . .. . Traceback error : .. . .. . Any idea how to allow jira-python to connect with proxy .. . Answer : It seems like it requires bit of a magic . Have a look here at this answer . https : answers.atlassian.com questions 226857 using-python-jira-through-a-proxy-server continue https 3A 2F 2Fanswers.atlassian.com 2Fquestions 2F226857 2Fusing-python-jira-through-a-proxy-server application acac .. . .. . Here s code :", "Question : Using Python 2.7 and jira-python package version 1.0.4 .. . .. . I tried this code : .. . .. . I get the error : File Library Python 2.7 site-packages jira client.py line 2357 in create project for template in j projectTemplates : KeyError : u projectTemplates .. . .. . When I look at the source : https : pythonhosted.org jira modules jira client.html JIRA.create project .. . .. . It seems like my project template is empty . My Jira user can create projects and programmatically I can add issues . Comment : What version is your JIRA server I suspect that the API has changed . .. . Answer : The problem is with python-jira . Version 1.0.3 is failing . I upgraded to the development version using the following command : .. . .. . After upgrading I was able to create a project using python-jira", "Question : I am using python-jira package installed using PIP in a virtual environment . Recently my script started to complain about jira package version : .. . .. . I tried upgrade using pip like : .. . .. . I tried to remove installed jira package and install it freshly with same result . Pip always installs only version 1.0.3 but scripts complain about newer version . My assumption is that 1.0.6 is marked as released the check is inside the package itself but not published I don t know if this is the right word for pip to download . Any clue Regards JrBenito Comment : the same is now happening with 1.0.7.devxxxxxxx . As Cory and Miles pointed below a workaround is possible until Jira Python team solves this once and for all . .. . Answer : It appears there is a 1.0.6.dev20160420173258 version but this isn t being downloaded when using pip install jira . It can be installed by using the workaround found on the issue 156 https : github.com pycontribs jira issues 156 for this new version . pip install https : pypi.python.org packages f6 ea 2535e412ff76d85da20d2be6d1eaf9aa5de49481da94f2fe7e8830eedd35 jira-1.0.6.dev20160420173258-py2.py3-none-any.whl Which it appears you have already commented on so hopefully they resolve the issue permanently . Comment : In fact this forces install of 1.0.6 but the problem is really related to python package . After install 1.0.6 as you suggested above the error continues as : .. . You are running an outdated version of JIRA Python 1.0.6 . Current version is 1.0.6.dev20160420173258 . .. . Comment : I filed a new issue 193 https : github.com pycontribs jira issues 193 Comment : It appears it is doing a string-comparison within client.py L321 https : github.com pycontribs jira blob develop jira client.py L321 and therefore 1.0.6.dev20160420173258 1.0.6 . You could modify the VERSION in version.py https : github.com pycontribs jira blob develop jira version.py L10 to be the same as the dev if this doesn t allow you to continue with your application . You would then need to reinstall using python setup.py install . Comment : Actually this is only an annoying warning . But thanks anyway .", "Question : null .. . Answer : Hello i am using the following python-jira client .. . .. . https : pythonhosted.org jira .. . .. . My question is is there a way to get all the issues and its corresponding labels in the projects using the python-jira API", "Question : null .. . Answer : I am new to jira-python and have run into an issue with using jirashell . jira-python was installed from documentation given here : http : jira.readthedocs.org en latest .. . .. . When I try to start jirashell using : .. . .. . I get the following error : .. . .. . I have also tried to get to a server using basic auth but that returns the same error . Using curl works fine but I wanted to see the objects that are getting returned and get help as I develop by python-jira integration . Thank you for any insight . Comment : It should be fixed soon github.com pycontribs jira issues 66 https : github.com pycontribs jira issues 66 Comment : Thank you for the information @ThePavolC . In the meantime I found a workaround that might help if you are using basic auth . In jirashell.py go to line 250 and change the line from : jira JIRA options options basic auth basic auth oauth oauth to jira JIRA options options basic auth basic auth oauth None I did not have IPython installed either . Install that with pip and you should be good to go .", "Question : This question already has an answer here : .. . .. . How to access a standard-library module in Python when there is a local module with the same name questions 1900189 how-to-access-a-standard-library-module-in-python-when-there-is-a-local-module-w 2 answers .. . .. . I m working on a Python project where I ve to communicate with the Jira API . I want to use the offical Jira client for Python which is available here https : github.com pycontribs jira . The package introduces a global namespace jira meaning you have to .. . .. . to use the API . How can I create a sub-package .. . .. . without shadowing the global jira package .. . .. . Let me add a few steps to reproduce my problem and to show what I have in mind : .. . .. . This is my directory layout : .. . .. . company project datasources jira.py .. . .. . test.py .. . .. . When I try : .. . .. . I get the following error : .. . .. . The init .py are currently all empty files . I ve tried a lot with them but it doesn t worked for me . Probably these files are they key to my problem Comment : @davidism Thanks for the effort to show a duplicate I know that this requires effort I really searched a lot - since weeks - but I couldn t manage to find an answer . I m completely new to Python . Looks like you used the right search terms The answer is accepted now so I ll keep it as it is I hope this is ok . .. . Answer : You re using Python 2 which has some issues with how it resolves imports . It thinks jira refers to the jira module relative to the current module in this case they refer to the same thing but this would also happen if you also tried to do this import from another module next to jira.py . You need to enable Python 3 s import behavior . Add the following import before anything else in jira.py or anything else at the same level that would see the shadowed package : .. . .. . See PEP 328 https : www.python.org dev peps pep-0328 for more information . The abstract describes the general problem : .. . .. . Imports can be ambiguous in the face of packages within a package it s not clear whether import foo refers to a module within the package or some module outside the package . More precisely a local module or package can shadow another hanging directly off sys.path . .. . It is proposed that all import statements be absolute by default searching sys.path only with special syntax leading dots for accessing package-relative imports . Comment : Thank you so much : I screwed my head about this since weeks .", "Question : I want to mark attachments that have already been downloaded to differentiate them with the one attached later on . Is it possible to set something like metadata of the attached files Or any other ways PS : I should use JIRA python API Comment : Can you give attachments different names when you download them Comment : I don t think you can tell from REST API if attachment was downloaded or not . And to rename attachment as mentioned by @m170897017 you can download attachment and attach it again with modified name . Comment : @m170897017 Renaming the attachments is an excellent solution . However I m not familiar with REST API and didn t find a way to remove rename the attachment . Do you know where I can find an simple example of this . Thanks .. . Answer : There is no way to modify the meta data from the JIRA REST API . A solution would be to store the downloaded attachments ID s locally and then when downloading later exclude the attachments that are already present in your local list . However if you wish to get into JIRA Plugin development you could look to create a plugin that creates a REST API that could modify the Attachments Meta Data and adds a downloaded property on the Attachment https : docs.atlassian.com jira 6.2.1 com atlassian jira issue attachment Attachment.html object . Not 100 sure it is possible but could be Comment : Thanks Welsh . Your answer helps .", "Question : I am trying to list all isues in a project with status Done or Closed . When I run a JQL-query with advanced-search I get : 3096 issues in the project . However when I run it with python I get around 50 issues . I am only getting 50 or so issues even though there is more than 3000 issues with the status Done or Closed with a JQL query . Is there maybe a limit Comment : How many projects do you have As you currently have it issues will contain the issues for the last project even if that has no issues match project JA . Do you mean to embed the for issue loop inside the for project loop In fact why do you have the for project loop at all Comment : I tried to embeded the for issue into the for project loop however I was seeing the same issues over and over again . Do you have any suggestion on how I could do it Comment : You don t need the for poject loop at all . You are already telling search issues which project you are interested in . .. . Answer : The answer of Martin Bonner is ok but I m just posting an answer to add more clarification . The search issues https : pythonhosted.org jira searching method uses the JIRA REST API to run the JQL query so you can also look at the JIRA REST API documentation https : docs.atlassian.com jira REST latest api 2 search-search to understand the startAt and maxResults parameters : .. . .. . enter image description here http : i.stack.imgur.com YoXsw.png .. . .. . From this documentation I assume that maxResults only accepts an int as value . Comment : How do I define unlimit results Is this correct issues jira.search issues project JA maxResults 500000 Comment : By default the number of issues returned is limited to 1000 . For JIRA Cloud you cannot change this value : confluence.atlassian.com jirakb https : confluence.atlassian.com jirakb changing-maxresults-parameter-for-jira-rest-api-779160706.html Comment : If you run your own JIRA you can take a look at this article about how to configure your JIRA to change the max number of results : confluence.atlassian.com jirakb https : confluence.atlassian.com jirakb how-to-increase-the-jira-search-results-limit-on-the-issue-navigator-357696242.html . Although you should be aware that the limit is intentional and aimed to avoid performance and memory problems . The recommended approach is to retrieve results in batches using the maxResults and startAt parameters . Comment : I managed to get more results than 50 by changing the StartAt and MaxResults but how can I sort them by the key And how can I list all issues which was created in may for instance Comment : Those are different questions . Just read some of the JQL documentation . To add ordering you use a clause like ORDER BY key DESC . To only get the issues created at some point you query on the created field . For more info look here : confluence.atlassian.com jirasoftwarecloud https : confluence.atlassian.com jirasoftwarecloud advanced-searching-fields-reference-764478339.html Advancedsearching-fieldsreference-CreatedCreatedDatecreatedDateCreated and here : confluence.atlassian.com jira https : confluence.atlassian.com jira advanced-searching-179442050.html AdvancedSearching-ORDER BY", "Question : I ve been building my REST query by using this reference : https : docs.atlassian.com jira REST latest d2e2713 .. . .. . What I ve managed so far : I get it to return JSON for me based on the JQL in the URL . The problem I get : When I tell it what specific fields I want using the fields parameter it seems to choke on the first custom field in the list which also happens to have a space in its name . The question : Does anyone know which of these two things is causing a problem and how to solve it Specific detail : .. . .. . Here s the URL I throw at Jira : .. . .. . https : jira.mycorp.com rest api latest search jql project PDEV+AND+type+in+ 22IA E 22 +AND+createdDate+ 3E +2015-03-15 fields assignee status resolution https : jira.mycorp.com rest api latest search jql project PDEV+AND+type+in+ 22IA E 22 +AND+createdDate+ 3E +2015-03-15 fields assignee status resolution 22DM 20Number 22 22salesforce 20dd 20id 22 .. . .. . The response I get from Jira starts out like the below and continues for about a whole screen.. . but only returns the first three fields assignee status resolution . I ve figured out that the field names are case sensitive so I ve tried different case schemes for the first custom field the one you see in my example is how Jira renders the field name when you browse to the issue . Maybe it will help to mention that my intent is to write a python script that will use REST to do issue searches like this so I can store it in a Python dict and do further processing on it . For now I m just telling Chrome to take me to the URL and reading the JSON it gets back . Comment : Okay so now I ve discovered jira python jira-python.readthedocs.org en latest https : jira-python.readthedocs.org en latest .. . Yesterday it took me 2 hours to figure out how to construct the REST URL so I get a coherent response from Jira today I get to the same point in about 20 minutes with jira-rest . So far so awesome . But I m stuck at the same point - how do I make it give me custom-fields where my field names contain spaces .. . Answer : I found the last part of this puzzle here : https : answers.atlassian.com questions 102822 how-can-i-find-the-id-of-a-custom-field-in-jira-5 .. . .. . Essentially in the REST API you need to refer to custom-fields by their ID not their name - since the name is not necessarily unique in the Jira instance . To get a list of field names execute http : localhost rest api 2 field and it will come back with a full list of custom-fields including their IDs . The IDs take the form : customfield 16090 . So your fields parameter might take this form : fields assignee status resolution customfield 16090 customfield 16001", "Question : null .. . Answer : I am trying to create a JIRA using jira-python SOAP the issue dict looks like : .. . .. . fails with below stack-trace : .. . .. . Is there anything wrong with the way I pass-in fixVersions I am just a beginner with jira-python any help is appreciated thanks .", "Question : I am writing a python tool that should get information from Jira . I wanted to use Python-Jira but cannot install it properly . I am using have to use python-2.7 which doesn t come with pip and I cannot install pip because I do not have local admin rights and won t get them without hassle . Is there a way to install use python-jira without the pip installation process I tried copying the jira package to the site-packages folder but it seems I run into dependency problems ImportError : No module named six.moves when I try import Jira from jira which to resolve it seems I have to follow the pip installation process . Thanks for your help . .. . Answer : Install Virtualenv https : virtualenv.pypa.io en latest and you will have your own version of Python and Pip so you should be able to install jira-python properly . There is a lot of guides how to do it . For Linux I recommend this one . http : askubuntu.com questions 244641 how-to-set-up-and-use-a-virtual-python-environment-in-ubuntu .. . .. . General Python Guide http : docs.python-guide.org en latest dev virtualenvs", "Question : I have been trying to programatically retrieve the default component set for a JIRA project with little success . Currently I have tried .. . .. . and .. . .. . Trying to understand the API output is troubling . I believe it might not be possible but I atleast want to confirm this before making this final assumption . Is there an easy way to retrieve what component was set as the default in the jira-python api For reference : .. . .. . https : jira-python.readthedocs.org en latest .. . Answer : As far as I know - and I am pretty sure about that it is not possible to define a default component for a project . Maybe there are workarounds with post transition functions but this is not an out-of-the-box feature . Hence it s not possible to get this information through any API" ] }
[ "yes-answer-long", "yes-answer-short" ]
jira
UNK_RELATION
sdwebimage@caching@75
sdwebimage -- sdwebimage is a simple image library for ios which provides @placeholder and an easy way to load remote images asynchronously into uiimageviews .
{ "confidence": [ 50.17316436767578, 47.07252883911133, 44.07402038574219, 43.954322814941406, 43.56293487548828, 43.410186767578125, 43.3026237487793, 43.30056381225586, 43.262393951416016, 43.234153747558594, 42.83507537841797, 42.83507537841797, 42.71427917480469, 42.58518981933594, 42.541786193847656, 42.430763244628906, 42.38157653808594, 42.38157653808594, 42.33207702636719, 42.25800323486328, 42.25761795043945, 42.25165557861328, 41.95136260986328, 41.95136260986328, 41.93977355957031, 41.916221618652344, 41.685001373291016, 41.685001373291016, 41.3708381652832, 41.309661865234375, 41.276771545410156, 41.13602066040039, 41.09392547607422, 40.953311920166016, 40.88547134399414, 40.87040710449219, 40.74557113647461, 40.723045349121094, 39.87678146362305, 39.79954147338867, 39.734832763671875, 39.683998107910156, 39.515281677246094, 39.4993782043457, 39.4993782043457, 39.4993782043457, 39.4993782043457, 39.4993782043457, 39.43424606323242, 39.045135498046875, 38.94051742553711, 38.94051742553711, 38.86551284790039, 38.86551284790039, 38.72393798828125, 38.68037414550781, 38.68037414550781, 38.68037414550781, 38.68037414550781, 38.5234375, 38.44541931152344, 38.44541931152344, 38.22071838378906, 37.88381576538086, 37.669639587402344, 37.59872817993164, 37.59453201293945, 37.34195327758789, 37.34195327758789, 37.34195327758789, 37.34195327758789, 37.34195327758789, 37.277244567871094, 37.277244567871094, 37.23765563964844, 37.11456298828125, 36.99333190917969, 36.92185974121094, 36.92185974121094, 36.92185974121094, 36.873077392578125, 36.722572326660156, 36.4582405090332, 36.406639099121094, 36.37454605102539, 36.11650848388672, 35.91112518310547, 35.91112518310547, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.71409606933594, 35.66168212890625, 35.66168212890625 ], "content": [ "To do that I use SDWebImage to asynchronously download the images .", "One of my programs is to load webp image with SDWebImage .", "SDWebImage : https : github.com rs SDWebImage", "Using SDWebImage 3 in an iOS 5.1 project iPad .", "@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", "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 .", "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 .", "I am using SDWebImage for my iOS project .", "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 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 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 .", "SDWebImage is based out of NSUrlConnection which is deprecated starting iOS 9 .", "And so first load thumbnail using SDWebImage .", "https : github.com rs SDWebImage .. . .. . 1 .", "So nice of the SDWebImage readme to say this :", "I have used sdwebimage for caching images .", "https : github.com rs SDWebImage .. . .. . SDWebImage not able update the cached image when image updated on server with the same url .", "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 .", "I am using MWPhotoBrowser which uses SDWebImage for downloading caching of images .", "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 .", "@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 .", "It uses Realm https : realm.io docs swift latest for the database and also SDWebImage https : github.com rs SDWebImage for image caching .", "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 .", "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 am using SDWebImage in my pictures ios app .", "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 .", "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 UICollectionView with SDWebImage .", "So SDWebImage can t know that images was changed on the server-side .", "I am using SDWebImage for fetching images from server to my table view app in IOS .", "@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", "SDWebImage has proven to be a really solid implementation of async image fetching and caching .", "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 .", "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 .", "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 trying to use SDWebImage framework for asynchronous loading and caching images .", "platform : ios 7.0 .. . .. . source https : github.com CocoaPods Specs.git .. . .. . pod SDWebImage 3.7.1 .. . .. . pod UIActivityIndicator-for-SDWebImage .. . .. . And then you can import the following file .", "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", "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 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 .", "SDWebImage is not using the Etag to detect changes ." ] }
{ "confidence": [ 61.983924865722656, 59.36592102050781, 59.32879638671875, 59.06035614013672, 59.051292419433594, 57.693843841552734, 57.54949188232422, 56.89456558227539, 56.26143264770508, 56.06550216674805, 55.579044342041016, 55.30613708496094, 54.67336654663086, 54.65007019042969, 54.61528015136719, 54.453155517578125, 54.14777374267578, 54.024234771728516, 53.70347213745117, 53.70347213745117 ], "content": [ "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 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 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 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 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 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 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 : 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 : 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 : 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 : Give this a try.. . .. . .. . https : github.com rs SDWebImage", "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 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 : In my iOS Application I want to show a Gif image in my tableViewCell . Download this Gif image by SDWebImage and use FLAnimatedImageView to show this image . But now I have a problem SDWebImage return a images but the FLAnimatedImageView want a NSData . How to convert images of gif to NSData .. . .. . Forgive my poor English . Comment : You can directly use gif image by using SDwebimage lib Comment : I found that UIImage+GIF.h has a method : + UIImage sd animatedGIFWithData : NSData data how to get a reversed method convert gif image to NSData . Comment : @Jigar Tarsariya I have already used SDwebimage to display gif picture but it has huge memory-leaks two 2M gif pictures can bring 200M memory-leaks online application crash easily I think my happy life will not be longer my boss will punish me . o Comment : Ohhhk.. . Then you have to find that way to convert your gif image to NSData. . : Comment : @Jigar Tarsariya yes I was tortured for a day . .. . Answer : If you have the URL of the image you can directly use the following to convert it to NSData Comment : dataWithContentsOfURL will block the thread on which it is called as this is a synchronous method . You should not call this on the main thread as it will block the app for tens of seconds on a slow network .", "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 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 need to be able to get a path to images that cached . While I am wondering if there is a way to do this using SDWebImage I could probably get away with just having the knowledge to return a path to an image stored in the cache so I can display it within a uiwebview inside an image tag . Comment : : - Can you please post the solution how you have done with SDwebimage in webview .. . Answer : According to this https : github.com rs SDWebImage issues 25 it would seem you can simply refer to the image by it s original url and it will be correctly picked up from cache . Comment : Now that s cool I would have never suspected it to be that easy . Comment : no. . it doesn t work and the post you linked doesn t say that it does Comment : This way UIWebView and all other components using NSURLConnection will automatically benefits from SDURLCache s store .", "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 : There are private SDImageCache methods to get filesystem path to cached image . We can make these methods public with a category . Just put the code below into the say SDImageCache+Private.h and add it to your project : Comment : Great Answer thanks I also needed to turn use those two functions like below to get my file url : SDImageCache imageCache SDImageCache sharedImageCache NSArray arrayOfPathComponents NSArray arrayWithObjects : imageCache defaultCachePathForKey : imageUrlString imageCache cachedFileNameForKey : imageUrlString nil NSString path NSString pathWithComponents : arrayOfPathComponents NSURL urlOfTheLocalFile NSURL fileURLWithPath : path Comment : Not sure but as I remember in modern versions of SDWebImage these methods are already public . Just did not check this out . Anyway glad it helps .", "Question : In my iOS Application I want to show a Gif image in my tableViewCell . Download this Gif image by SDWebImage and use FLAnimatedImageView to show this image . But now I have a problem SDWebImage return a images but the FLAnimatedImageView want a NSData . How to convert images of gif to NSData .. . .. . Forgive my poor English . Comment : You can directly use gif image by using SDwebimage lib Comment : I found that UIImage+GIF.h has a method : + UIImage sd animatedGIFWithData : NSData data how to get a reversed method convert gif image to NSData . Comment : @Jigar Tarsariya I have already used SDwebimage to display gif picture but it has huge memory-leaks two 2M gif pictures can bring 200M memory-leaks online application crash easily I think my happy life will not be longer my boss will punish me . o Comment : Ohhhk.. . Then you have to find that way to convert your gif image to NSData. . : Comment : @Jigar Tarsariya yes I was tortured for a day . .. . Answer : You can simply use .. . .. . Compression quality can be between 0.0 high compression low quality and 1.0 low compression high quality", "Question : In my iOS Application I want to show a Gif image in my tableViewCell . Download this Gif image by SDWebImage and use FLAnimatedImageView to show this image . But now I have a problem SDWebImage return a images but the FLAnimatedImageView want a NSData . How to convert images of gif to NSData .. . .. . Forgive my poor English . Comment : You can directly use gif image by using SDwebimage lib Comment : I found that UIImage+GIF.h has a method : + UIImage sd animatedGIFWithData : NSData data how to get a reversed method convert gif image to NSData . Comment : @Jigar Tarsariya I have already used SDwebimage to display gif picture but it has huge memory-leaks two 2M gif pictures can bring 200M memory-leaks online application crash easily I think my happy life will not be longer my boss will punish me . o Comment : Ohhhk.. . Then you have to find that way to convert your gif image to NSData. . : Comment : @Jigar Tarsariya yes I was tortured for a day . .. . Answer : You can do something like below :" ] }
[ "yes-answer-long", "yes-answer-short" ]
caching
UNK_RELATION
firefox@mozilla@84
firefox -- firefox is a free open-source and cross-platform web browser created by @placeholder .
{ "confidence": [ 38.681854248046875, 38.227256774902344, 36.52842712402344, 36.35063934326172, 35.64066696166992, 34.30381393432617, 33.83552169799805, 33.37146759033203, 33.078208923339844, 33.078208923339844, 32.97740936279297, 32.83685302734375, 32.764652252197266, 32.70425033569336, 32.37931442260742, 32.37417984008789, 32.165504455566406, 31.97292709350586, 31.4786434173584, 31.359012603759766, 31.108821868896484, 31.104480743408203, 31.088777542114258, 31.044086456298828, 31.004369735717773, 30.92376708984375, 30.870929718017578, 30.46078109741211, 30.350765228271484, 30.32927894592285, 30.32927894592285, 30.221403121948242, 30.175159454345703, 30.104019165039062, 30.104019165039062, 30.104019165039062, 30.104019165039062, 30.060983657836914, 29.887104034423828, 29.857454299926758, 29.831554412841797, 29.627113342285156, 29.58670997619629, 29.58670997619629, 29.459196090698242, 29.459196090698242, 29.424880981445312, 29.41766357421875, 29.39495277404785, 29.371919631958008, 29.336137771606445, 29.336137771606445, 29.270912170410156, 29.229877471923828, 29.229877471923828, 29.14828109741211, 29.077640533447266, 28.99163818359375, 28.982290267944336, 28.924541473388672, 28.87860870361328, 28.862449645996094, 28.790088653564453, 28.790088653564453, 28.72140884399414, 28.686359405517578, 28.686359405517578, 28.682971954345703, 28.682971954345703, 28.68013572692871, 28.65192413330078, 28.572956085205078, 28.533878326416016, 28.387290954589844, 28.26091194152832, 28.260040283203125, 28.257890701293945, 28.257890701293945, 28.257890701293945, 28.257890701293945, 28.257890701293945, 28.257890701293945, 28.257890701293945, 28.257890701293945, 28.257890701293945, 28.251033782958984, 28.246713638305664, 28.237590789794922, 28.198837280273438, 28.14236068725586, 28.139928817749023, 28.098793029785156, 28.098793029785156, 28.098793029785156, 28.07964515686035, 28.073402404785156, 28.073402404785156, 28.073402404785156, 28.073402404785156, 28.02179718017578 ], "content": [ "jQuery is meant for cross-browser scripting and ease for the web pages not for the Firefox scope .", "As I understand the Firefox browser is written in XUL and the code is open-source .", "The Firefox browser is already open and .. . 2 .", "I use the excellent and free Firefox tool SQLite Manager https : addons.mozilla.org en-US firefox-addon sqlite-manager which is cross-platform .", "The Firefox browser that comes with Firefox OS is still an infant .", "Possible duplicate of Can t open browser with selenium after firefox update http : stackoverflow.com questions 37761668 cant-open-browser-with-selenium-after-firefox-update", "I m working on a snippet for check if the browser is Firefox Firefox OS Firefox for Android .", "This is the way the new Web Console in Firefox 4 is created .", "The firefox browser version is 47+ .", "This works on firefox browser on Linux .", "When i first open TestComplete Firefox shows as a browser in the object browser .", "Is this truly a bug in firefox and if so is there a cross-browser hack that might do the trick", "Open a Firefox browser load Tamper Data .. . 2 .", "Possible duplicate of Can t open browser with Selenium after Firefox update http : stackoverflow.com questions 37761668 cant-open-browser-with-selenium-after-firefox-update", "open mozilla firefox then drag the .xpi file and drop it in mozilla firefox window .", "Well there is a surprisingly easy and cross-platform way to retrieve the default icon of Firefox .", "Does WebIDL play different rules in Firefox browser and b2g Firefox OS", "I created a Firefox add-on .", "My browser is Firefox 14.0.1 .", "I d like to figure out how to fix this problem in Firefox as we use this app cross-platform browser .", "Open this web-page from Firefox : https : addons.mozilla.org en-US firefox-addon tiddlyfox src search .. . .. . 2 .", "The open-source Firefox ActiveX version seems to be a dead project development wise and based on an old Firefox version .", "Is Firefox OS considered as a supported platform for it", "It is a free JavaScript based framework to quickly and easily develop cross-browser extensions for IE Firefox Chrome and Safari .", "I don t think you want to open firefox but the user s browser .", "I m creating an extension for the Firefox browser .", "Firefox doesn t have a built-in DRM engine nor does any other open-source browser .", "Just update your browser using the about Firefox .", "Restart Firefox just to be sure that the scratchpad is in the browser context .", "Open Firefox .. . 2 .", "I tested it with Firefox open .", ": - I don t use Firefox except to test cross-browser compatibility so I wasn t sure if Firefox is just buggy in general buggy with FileReader or what .", "Firefox OS is simple web activity .", "That is not Firefox or any other browser feature .", "I use the Firefox browser by the way .", "No Firefox browser i am using", "I have a problem with the Firefox browser .", "But not on the Firefox OS browser .", "Firefox has an extremely tight Cross-Domain policy .", "FirefoxDriver is working again with Firefox 47.0.1 as browser .", "The SDK you are looking for is probably the Firefox OS Simulator Addon https : addons.mozilla.org hu firefox-addon firefox-os-simulator for the Mozilla Firefox browser .", "Open Firefox Tools Options Applications .. . .. .", "To open a new tab in the existing Firefox browser using Selenium WebDriver", "Is that anyway to Modify firefox or other browser element with Watin VB.Net after it open", "It works perfectly in every browser but Firefox .", "why is firefox the only browser to do this", "I created a new Firefox profile by running firefox -ProfileManager .", "I have ZTE Open with Firefox OS .", "How to change my firefox browser language", "It would be difficult to write a separate desktop application to modify the HTML code of a site within the Firefox browser and only within Firefox .", "Also what version of Firefox on which platform", "all firefox OS phones are a dead platform .", "Source : http : www.firefoxanswer.com firefox 672-firefoxanswer.html Archived Version http : web.archive.org web 20100428053932 http : www.firefoxanswer.com firefox 672-firefoxanswer.html", "I just downloaded the IndexedDB Browser add-on for Firefox .", "A browser crash is a Firefox issue not a Firebug issue .", "Firefox offerer DataChannel establishment with another Firefox answerer browser does not work .", "@Gio OS : Windows 7 Browser : Firefox 29.0.1", "I have implemented sample mozilla firefox extension to display firefox icon action-button on toolbar and it will open http : www.mozilla.org .", "Open the link in Firefox and no icon is displayed .", "I have built that plugin for android platform by using gecko sdk and firefox OS source .", "i m using Firepath https : addons.mozilla.org en-US firefox-addon firepath a firebug extension for Firefox browser .", "I am unable to get a source code modification reflected in the firefox extension without restarting firefox .", "Open Firefox and type about : config in the addressbar and press Enter .", "Firefox will open the page in a new tab by default .", "Firefox .", "Why is Firefox the only browser with this vulnerability", "browser is firefox 3.6.8 on Lucid Lynx .", "@Makyen You mean on Firefox for Android or just Firefox", "Firefox uses Gecko that in Firefox is embedded inside xulrunner .", "We have done this to open the default browser which is Chrome or Firefox .", "It does not run in parallel with a normal Firefox instead create an alternate profile to be able to run and restart a Firefox while keeping your regular Firefox open .", "I m creating a Firefox add-on with the Firefox Add-on SDK .", "XUL panels in a Firefox extension overlay always come with a shadow for free .", "I need to make use of Firefox for web-scraping .", "If they would do that they could no longer distribute Firefox for free .", "Since Firefox 17 is now available and Google does not completely support Firefox 16 for this feature I added a warning for users with Firefox 16 to upgrade to Firefox 17 or use a different browser .", "FirefoxDriver is working again with Firefox 47.0.1 as browser .", "Only Opus to Firefox played by browser is garbled .", "My favorite browser for doing Javascript is Firefox .", "On every browser except Firefox this works as desired .", "Could it be related to my Firefox main browser", "Firefox won t be able to capture anything except the browser .", "Note that Firefox is the only browser that is compliant here .", "Note that Firefox is not the only browser that implements DNT .", "The only browser that is giving me problems is Firefox PC .", "Flowplayer version : 3.1.4 Firefox version : 3.5.5 Firefox extensions : Java Quick starter RealPlayer Browser record plugin .", "I have developed some Firefox add-ons extensions already for Desktop and Mobile Firefox but now I can t install the add-on extension into the browser running in Firefox OS I m using the Simulator add-on .", "This works fine cross-browser and device except on firefox im using the latest version .", "connection and battery exist in all the Firefox Firefox OS Firefox for Android : -", "When I use Firefox 42 I can install the Firefox extension into Firefox from command-line .", "I am trying to move into the upgraded firefox web browser automation using selenium .", "Like wise Is there any API in Mozilla Firefox to get the stream of the tab in Firefox browser .", "This problem is only with Firefox browser as Firefox does not have codec for mp3 but work fine with Chrome .", "So what to do to play .mp3 in Firefox browser more interested to implement in Firefox OS simulator device .", "Install the xpi-file-firefox-extension then in firefox .. . .. . 6 .", "Can Firefox Browser Extensions interact with service workers", "Restart Mozilla Firefox browser to activate the addon .", "Firefox Chrome uses entirely different browser engines .", "Firefox add-ons run with the privileges of the browser .", "I have created a Twist project by following combination : .. . .. . Driver : Sahi for web apps .. . Language : Java .. . Browser : Firefox .. . .. . I have created Scenario ." ] }
{ "confidence": [ 39.04035186767578, 36.64714813232422, 36.54535675048828, 35.98068618774414, 35.789573669433594, 35.40488052368164, 35.37746810913086, 35.26862335205078, 35.26729965209961, 35.23042678833008, 35.15964126586914, 34.817527770996094, 34.723114013671875, 34.67813491821289, 34.51848220825195, 34.41761779785156, 34.24441146850586, 34.21807098388672, 34.1865234375, 34.00471115112305 ], "content": [ "Question : From what I had heard of Firefox OS one big advantage was that you could build an offline locally-stored app that works on Firefox OS Android and Windows Mac others with one code-base . However after looking at the MDN Howtos https : developer.mozilla.org en-US Marketplace Publishing Publish options I can t seem to find the instructions on cross-compiling for other platforms . With the Firefox OS simulator installed I was able to install Firefox OS apps like-native with Windows and Ubuntu but is there a guide to creating installers for non-FirefoxOS devices or is this just a technology preview Are there any good examples of cross-platform apps written in Firefox and compiled for multiple platforms Ubuntu store Windows store and or Android Market .. . Answer : For Windows Mac Linux Android that Firefox Browser is reached you can put your webapp in Marketplace http : marketplace.firefox.com and chooce your app to support all platform . Then you could browse Marketplace and install your webapp in Windows Mac Linux Android . Your webapp will be shown in launch menu and appear in application folder in windows mac linux android . The webapp will have a standalone window just like native application and can be uninstalled as the native application . That s what Mozilla called cross-platform . With web technology you could adopt Apache Cordova http : cordova.apache.org for the platform that Firefox not reached out yet though your app performance will be constrained by the supported browser engine webview per target system . Comment : Are you sure In desktop Firefox without Firefox-os simulator it always says This app is unavailable for your platform . Having to go install that addon and then go back and try Firefox market doesn t seem like an end-user-friendly process . Comment : It because the webapp developer did not select to support the desktop version when they put their app on to marketplace so the marketplace could not provide a desktop version for user . I totally agree its not a good user-experience for desktop user . Comment : Why is it not a good experience for desktop user Can you point to specific limitations of the Firefox API Comment : Its nothing about Firefox-os simulator or API . For some app that support Firefox Desktop version you can install and launch it without any extra settings ex : marketplace.firefox.com app ui-demos https : marketplace.firefox.com app ui-demos", "Question : From what I had heard of Firefox OS one big advantage was that you could build an offline locally-stored app that works on Firefox OS Android and Windows Mac others with one code-base . However after looking at the MDN Howtos https : developer.mozilla.org en-US Marketplace Publishing Publish options I can t seem to find the instructions on cross-compiling for other platforms . With the Firefox OS simulator installed I was able to install Firefox OS apps like-native with Windows and Ubuntu but is there a guide to creating installers for non-FirefoxOS devices or is this just a technology preview Are there any good examples of cross-platform apps written in Firefox and compiled for multiple platforms Ubuntu store Windows store and or Android Market .. . Answer : If you develop a FirefoxOS app it will be relatively simple to port that into various different mobile platforms because FirefoxOS apps are mostly standard web technologies . However currently FirefosOS API s https : developer.mozilla.org en-US Apps Reference include some new and not yet standard API s as well that are available only in FirefoxOS for example SystemXHR . If you want to write an app for FirefoxOS and want to be able to compile the same codebase for Android iOS Blackberry etc . your best bet right now is to use Apache Cordova http : cordova.apache.org project . They have a nice set of command-line tools that make building for various mobile platforms slightly less painful . But you should keep in mind that developing hybrid apps in this way can be pretty daunting process each native platform has their own quirks and pain points and needs some configuration . FirefoxOS support in Cordova is pretty new but I am sure it is already better than many native platforms . That being said if you are just getting started with mobile web app development I highly recommend using FirefoxOS as a target-platform . They have excellent tools that help you test and develop your app and focus on the open web technologies . FirefoxOS community support is really strong too which I find very helpful .", "Question : Question .. . .. . I want to start the Firefox web browser as process to visit a specific website then wait until it is closed . A special situation is that the browser may already be open and running as the user may have visited some website already . In that case the browser would probably open a new tab in an existing window and the newly launched process will be terminated immediately . This should not confuse my waiting process : Either I want a new browser window if that can somehow be enforced maybe via command-line-arguments and wait until that is closed or keep the existing browser window and wait until all the tabs resulting from my process are closed . Environment .. . .. . I think it doesn t matter but my programming environment is Java and you can assume that I know the path of the browser . Example .. . .. . The only browser for which I can obtain the expected behavior is Internet Explorer http : stackoverflow.com questions 3349922 sigh . . Here I need to basically create a new batch script in a temp folder with something like .. . .. . I then run the batch script instead of directly the browser and delete it once I am finished with waiting . Intended Process .. . .. . To make the intended process clearer : .. . .. . 1 . My program starts . 2 . My program launches the Firefox browser as separate process and provides an URL to visit as argument to that process . 3 . The Firefox browser runs asynchronously as a new process and visits the provided URL . So far this is easy . 4 . After launching the new process the Firefox browser my own program should wait for the said process to terminate . This is the hard part as .. . 1 . Many modern browsers start multiple processes . I would need to wait for all of them . 2 . Many modern browsers may somehow detach themselves from the process that I launched . Sorry I don t know a better word what I mean is : I start a process which then starts another process and terminates immediately while the other process keeps running . If I wait for the browser process originally started by my program the waiting will be finished while the browser is still open . 3 . A special case of the above is tabbed browsing as realized in many browsers : If the browser is already open in a separate process started by the user when I launch it my newly started browser process may simple communicate the URL to visit to the existing process and terminate . The user is still on my provided URL while my program thinks she has closed the browser . This issue can maybe be forbidden by specifying a special command-line argument like noframemerging for the IE . 5 . Once the browser has terminated or all tabs related to the URL I provide have been closed my program will cease to wait and instead continue doing its business . The use-case is that I have a web application which can either run locally or on a server . If it is run locally it launches a web server then opens the browser to visit the entry page . Once the browser is closed that web application should shut down as well . This works reliable for Internet Explorer for all other cases the user has to close the browser and then explicitly the web application . Thus if I could wait reliably for Firefox to finish this would make the user-experience much better . Solution Preferences : .. . .. . Solutions are prefered in the following order .. . .. . 1 . Anything which ships with the pure Java JRE . This includes special command-line-arguments to the browser . 2 . Things that require me to e.g . create a batch script such as in the IE case . 3 . Anything that requires 3rd party open-source libraries . 4 . Anything that requires 3rth party closed source libraries . Any platform independent answer working both Windows and Linux is prefered over platform-dependent ones . Reason : In the ideal case I would like to know what exactly is done and include it into my own code . As I want to support different browsers see PS below I would like to avoid having to include one library per browser . Finally I cannot use commercial or closed source libraries but if no better answer turns up of course I will honor any working solution with an accept . I will accept the first reasonably nice working answer of type 1 . If answers of lower preference turn up I will wait a few days before accepting the best one among them . PS .. . .. . I will launch a couple of similar questions for other browsers . Since I believe that browsers are quite different in the command-line-arguments they digest the way the launch threads and sub-processes I think this makes sense . Similar question regarding Chrome : Launch Chrome and Wait Until it is Closed http : stackoverflow.com questions 31911440 .. . Similar question regarding Opera : Launch Opera and Wait Until it is Closed http : stackoverflow.com questions 31916896 .. . Similar question regarding Chromium : Launch Chromium and Wait Until it is Closed http : stackoverflow.com questions 31919123 .. . Similar question regarding Edge : Launch Edge Browser and Wait Until it is Closed http : stackoverflow.com questions 31921095 .. . Similar question regarding Safari : Launch Safari and Wait Until it is Closed http : stackoverflow.com questions 31928891 Comment : I m confuse what does Wait until it is closed mean . Who what is waiting firefox Who is being closed firefox What does firefox waits for Waiting to be closed Comment : No my program is waiting . I write a program . The program starts firefox and provides a certain URL to visit . starting here means it launches firefox as new separate process . It is then supposed to wait until that new process has terminated . terminated means that the user has closed the new browser window or as mentioned special case all the tabs resulting from my invocation of the Firefox . Comment : Ok so the program shall wait for firefox to be closed and then after firefox closes the program shall also exit. . thanks . .. . Answer : Here is a sample program that may somehow manages to demonstrate the capability of a selenium library to fulfill what you want . You need to download the selenium library and set it to your IDE first before you can run this program . The program allows you to click a button . Then the firefox browser automatically opens and launch a website in a few seconds . Please wait while the website is loading . After that you may close the Firefox browser . The program shall also automatically close after 2 seconds . Selenium is primarily used for testing automation of web-applications . It can directly open browsers and read the html contents in it . See http : www.seleniumhq.org for additional information . Comment : When will driver.get baseUrl return Immediately after Firefox starts Or after the newly-launched Firefox was closed Comment : As extension to my previous comment : If the above code has this feature I will wait some time say a few days to see whether a non-library based solution shows up i.e . one working purely with stuff Java ships with plus command-line-arguments etc . If the Selenium library is open-source and no such answer shows up I will accept your answer . If the Selenium library is closed source cannot check right now I will prefer an open-source solution . Otherwise I will accept your answer . Comment : @ThomasWeise I updated my answer .", "Question : I ve been playing around with firefox but haven t found a way to view the XSLT source . If I go to view-source then it only shows the XML source and if I go to inspector it only shows the result-of the transform . Is there a way to view the XSLT source Comment : The XSLT transformation is an XML file too . If you transform XML with the browser there is usually a processing instruction at the beginning that tells you which file contains the XSLT code . Open this file with the browser to look at the XSLT source . Comment : @MathiasM ller Oh I didn t explain the problem well enough it seems . I know the XSLT code I ve written it myself What I want is to see that firefox has downloaded it and not cached an old version and also to see how it parses it with warnings and error messages . It would be progress if I could open the XML source and click on the xml-stylesheet link-to get at the downloaded XSLT file but firefox doesn t allow this . I would like a list of all the secondary files that have been downloaded based on the XML file and have the opportunity to click on them to view the source . Comment : @Henrik i don t think firefox allows you to do that . it s just that XSLT in the browser never caught on as much as initially hoped expected to the functionality in browsers often is limited . what i d recommend is to use firebug or some other general browser debugging tool which will allow you to better understand how the browser handles all web resources including XSLT . Comment : @dret Thanks for the info and advice . Yes I know that XSLT never caught on how foolish people are and that the project was left in limbo but to view a source file seems like a very modest demand . .. . Answer : I found out how thanks to Martin above : .. . .. . 1 . Ctrl shift Q goes straight to the network in the inspector . 2 . Click reload . 3 . You will now get a list of all the files loaded under the present doc . 4 . Click once on the XSLT doc . 5 . Click once on the response tab to the right . And there you are :", "Question : I am developing a mozilla addon and now I have to record the browser session for a specific time as a video and sent it to the server . The recording of the web session will be triggered and stopped from my addon . How would I record the web session Whether any jquery-plugins are need to be added to my addon or is there any other source that addon sdk provides Comment : This is a great idea . I created a cross-platform screenshot addon : addons.mozilla.org en-US firefox-addon nativeshot https : addons.mozilla.org en-US firefox-addon nativeshot but recording video is different you dont want to take a bunch of screenshots every few ms there are better alternatives . I hear this can be accomplished with webrtc though so no need for platform api s as i did in my screenshot addon . Comment : @Noitidart I surfed theough webrtc but they provide screen sharing only and also they ask permission everytime to record the screen . This has to be automated since the scripts inside a page can t wait till the user approve Comment : @Noitidart I discussed with Muaz-Khan disqus.com home discussion recordrtc class canvasrecorder https : disqus.com home discussion recordrtc class canvasrecorder comment-2354723672 and I just want to inform you and it may help you in any case Comment : @Noitidart Do you know why the screen capturing API works only on HTTPs webpage not on HTTP webpage Explain Please . Mauz-Khan said this in the discussion disqus.com home discussion recordrtc class canvasrecorder https : disqus.com home discussion recordrtc class canvasrecorder comment-2354723672 Comment : @Noitidart The above CanvasRecording is supported in Firefox Developer Edition V44 . and Firefox would release offically by 9 to 10 weeks . Hope U could use this for your voice to text addon . In FF v44 they support CanvasCaptureMediaStream Object in MediaRecorder API .. . Answer : I got this working in an addon with about : pages but I had to trick it into thinking it was https . The addon is a 27mb due to the inclusion of ffmpeg.js for converting video to different formats . So right now to download it you have to from my dropbox - https : www.dropbox.com s soemrqn2smmcge2 dist.xpi dl 0 .. . .. . The code is here on github - https : github.com Noitidart Screencastify .. . .. . I used webrtc .", "Question : I m trying to create a Object URL from an audio blob created from getUserMedia . The code works within Chrome but there are problems in Firefox . The error : .. . .. . When I call stopAudioRecorder it stops at audio player.src URL.createObjectURL audio blob .. . .. . TypeError : Argument 1 is not valid for any of the 2-argument overloads of URL.createObjectURL . .. . .. . Code : .. . .. . I attempted to provide some cross-browser compatibility by adding a wrapper function .. . .. . from Javascript newbie how to choose between window.URL.createObjectURL and window.webkitURL.createObjectURL based on browser http : stackoverflow.com questions 11277677 javascript-newbie-how-to-choose-between-window-url-createobjecturl-and-window but that didn t work Comment : try audio player.mozSrcObject audio blob .. . Answer : In Firefox you can directly give the media stream created by getUserMedia to the mozSrcObject attribute of the audio element . So the following code should work : .. . .. . You should consider using the adapter.js https : github.com GoogleChrome webrtc tree master samples web js file to account for browser differences . Comment : What about if you need the URL Comment : works for me just check browser : navigator.userAgent.indexOf Firefox -1", "Question : I ve been playing around with firefox but haven t found a way to view the XSLT source . If I go to view-source then it only shows the XML source and if I go to inspector it only shows the result-of the transform . Is there a way to view the XSLT source Comment : The XSLT transformation is an XML file too . If you transform XML with the browser there is usually a processing instruction at the beginning that tells you which file contains the XSLT code . Open this file with the browser to look at the XSLT source . Comment : @MathiasM ller Oh I didn t explain the problem well enough it seems . I know the XSLT code I ve written it myself What I want is to see that firefox has downloaded it and not cached an old version and also to see how it parses it with warnings and error messages . It would be progress if I could open the XML source and click on the xml-stylesheet link-to get at the downloaded XSLT file but firefox doesn t allow this . I would like a list of all the secondary files that have been downloaded based on the XML file and have the opportunity to click on them to view the source . Comment : @Henrik i don t think firefox allows you to do that . it s just that XSLT in the browser never caught on as much as initially hoped expected to the functionality in browsers often is limited . what i d recommend is to use firebug or some other general browser debugging tool which will allow you to better understand how the browser handles all web resources including XSLT . Comment : @dret Thanks for the info and advice . Yes I know that XSLT never caught on how foolish people are and that the project was left in limbo but to view a source file seems like a very modest demand . .. . Answer : Inspect any element in the document you view right click- inspect element open the network tab in the developer tools you might need to reload to see requests then you see the requested resources right-click the request for your XSLT stylesheet you can then open it open in new tab and view its source . So I think it is possible although it is a bit complicated . Comment : Yes it worked : Thanks . Now I only need somebody to suggest a shortcut to get there because there was a lot to do .", "Question : I have the following HTML5 video code on my homepage and it acts strange in Firefox 11 . When the homepage on my site loads I see in the place of the video the following error message : No video with supported format and MIME type found . .. . .. . However when I open up the media path http : www.mysite.com MovieClip.webm directly in a new tab it loads the media just fine using the internal Firefox HTML5 video-player Then right afterwards when I go back to my homepage and refresh the page it now loads the video just fine Any ideas on why this is happening and how to fix Thanks in advance .. . Answer : Be certain that your web server is configured to deliver WebM video as MIME type video webm . You can quickly and manually check if this is the case by telnetting to your web server and issuing a HEAD request : .. . .. . after connection.. . .. . .. . And finish the request with 2 carriage returns . The HTTP response header should contain a Content-Type : line . If it doesn t say video webm Firefox won t accept your WebM file . Comment : It does show it as video webm . I also noticed that in the Firefox Net tab the first time when it has trouble loading it it shows up as Content-Type : application octet-stream and then I also see another strange line called Working-Content-Type : video webm . But once I open the video in another tab and then go back to the site and refresh it it then works and shows the Content-Type as video webm as expected . Strange Comment : I d suggest flushing out your browser caches shutting down the browser and trying again though I suspect you have already tried this once or twice . Comment : Yup tried that already multiple times . Comment : What happens when you eliminate the MP4 source from the HTML text I wonder if Firefox is getting confused by that . Also what version of Firefox on which platform Comment : Also what web server is delivering this And are you certain that the Working-Content-Type : header is delivered over the wire Your comment about the Firefox Net tab I m not familiar with that facility makes it sound like maybe Firefox injected that header .", "Question : I ve an iMac with OS X Yosemite v.10.10.3 . I use Firefox Developer Edition 40.0a2 . I ve a ZTE Open C FR version with Firefox OS Boot2Gecko 2.1.0.0-prerelease B2G OS . What I d like to do is the following : I ve a basic webpage mostyl HTML CSS and JS opened in my browser on my Firefox OS phone . I d like to get the devtools Cmd+Shift+i and be able to edit that webpage with my Firefox Developer Edition browser on my iMac . I ve already tried these things : .. . .. . Use webIDE https : developer.mozilla.org en-US docs Tools WebIDE . Follow this potential solution http : stackoverflow.com a 27842167 3344621 . Connecting a Firefox OS device https : developer.mozilla.org en-US docs Tools WebIDE Setting up runtimes Connecting a Firefox OS device . WebIDE Troubleshooting https : developer.mozilla.org en-US docs Tools WebIDE Troubleshooting . Comment d boguer facilement du web y compris sur tablettes et t l phones french article http : putaindecode.fr posts frontend comment-deboguer-du-web-sur-tablettes-et-telephones . With webIDE I can build a new app for Firefox OS with or without a base theme and I can use the devtools to inspect the DOM and stuff like that . I just want to achieve the exact same thing but directly on my desktop computer . Do you have any clue Feel free to ask me if you need more piece of informations . .. . .. . Current status .. . .. . When I launch the Firefox OS browser app I can inspect via the devtools the homepage DOM stuff etc . . But when I load another webpage Google for example I can t inspect the DOM . Any idea about that I often get this message : http : puu.sh ir2Ju 32563e51bc.png when I switch to several apps I want to debug . Comment : Could you please clarify your question Where do you want the page to be running and what is an example of the kind of editing you want to do Comment : Hello and thanks for your answer Consider this pen http : codepen.io jQzz full KpvqNE I d like to browse it via my Firefox OS and get those devtools http : puu.sh iqj7f 2126c38a7e.png with my Firefox OS native browser and not with Firefox Developer Edition or the last screenshot . Comment : What does it tell you when you do adb root in a terminal Comment : Here is what I ve I ve run this command while my Firefox OS is plugged into my iMac via an USB port : puu.sh iqX5U 3df59dd02a.png http : puu.sh iqX5U 3df59dd02a.png Comment : I ve unplugged plugged again my Firefox OS and now when I run adb root it returns : adbd is already running as root . .. . Answer : If I understand correctly you re trying to connect the Firefox Developer Edition WebIDE on your desktop to a tab that is open on your Firefox OS phone . Something like this Screenshot of Firefox DevEdition s WebIDE debugging a webpage in Firefox OS http : i.stack.imgur.com nLwwy.png .. . .. . If that s right once you connect to your phone in the WebIDE you should see a list of open browser tabs at the bottom of the Open App menu which is in the top left of the WebIDE panel . Comment : Thanks for your answer You ve understood the problem . I m trying what you said . When I plug my Firefox OS on my iMac on a USB port Firefox WebIDE detects my Firefox OS : puu.sh iqToG 9e1661b702.png http : puu.sh iqToG 9e1661b702.png On my phone I ve a notification telling me : An incoming request to permit remote debugging connection was detected . Allow connection I answer OK . Under the Open App menu I ve just these options : puu.sh iqTwM 91490d3140.png http : puu.sh iqTwM 91490d3140.png test-form is just a basic test for an app . Any idea Comment : That looks correct but under Runtime Apps should be another section for Tabs .. . are you sure you have the tab that you want to debug open in your phone s browser", "Question : This is my first time on this site . I have a HTML CSS JS application . For that application to work we also have a browser npapi plugin .so file that is installed in plugins dir of firefox . This works on firefox browser on Linux . Now I want my application to run on Firefox OS B2G . How do I port that .so plugin to firefox OS . What I have done is I have built B2G and flashed it on my test device . I have built that plugin for android platform by using gecko sdk and firefox OS source . I have pushed my .so file in FFOS phone in system lib as well as system b2g the folders where I can see other .so files . . Is that the correct approach What else do I need to do to make it work . Currently my application is unable to load that plugin I checked using . run-gdb . Any pointers would be helpful . I have gone through the documentation on mozilla website and also googled it alot but couldn t find the solution . Thanks . Comment : A bit more search revealed to me that NPAPI is not supported on firefox OS : . My bad . But I do see a lot of source and compiled files for npapi within firefox OS source code tree under gecko dom plugins base and objdir-gecko dom plugins base . What are these about . .. . Answer : Mozilla use single gecko engine to support all platform browsers . Those plugins are only used by desktop browsers . Comment : On Firefox for Android plugin code is used to support Flash as well .", "Question : Google Cloud Messaging GCM is a service that enables developers to send data from servers to both Android applications or Chrome apps and extensions . I am developing a chrome and a firefox extension add-on . I am using the Web Extension APIs for Firefox extension . Now Web Extension APIs don t support chrome.gcm . APIs yet . Essentially a firefox extension cannot talk to GCM . Is there something else like GCM to which a firefox extension can talk to Something provided by the Firefox just like GCM provided by Google for its browser Chrome If not can someone please explain how to achieve this in a Firefox Extension Update : Even for web apps firefox doesn t use something similar to GCM . They use service workers . Can Firefox Browser Extensions interact with service workers .. . Answer : Firefox extensions currently can t use service workers directly according to an implementor who worked on service-workers support in Firefox http : logs.glob.uno c freenode 23whatwg s 1 20Feb 202016 e 1 20Feb 202016 c983254 . Is there something else like GCM to which a firefox extension can talk to Something provided by the Firefox just like GCM provided by Google for its browser Chrome Yes there s a Firefox equivalent of GCM . All Web apps a Firefox user accesses that receive push notifications get them from a server given by the dom.push.serverURL user preference . If you check dom.push.serverURL in about : config you ll see wss : push.services.mozilla.com which is the Mozilla Push Service https : mozilla-push-service.readthedocs.org en latest essentially Mozilla s equivalent of GCM . The backend of that runs AutoPush a Python-based open-source Push Server software project https : autopush.readthedocs.org en latest and the client-side of it is as noted in the question exposed to Web apps through service workers . So while there may be an alternative way Firefox extensions can connect with Mozilla Push Service the only publicly-documented way is through the standard Web Push API https : developer.mozilla.org en-US docs Web API Push API Using the Push API that relies on service workers which are not available yet for use in Firefox extensions . Comment : So do you know of any alternatives using which Firefox extensions can connect with Mozilla Push Service Comment : You might be able to use one of the Firefox modules that implement Web Push mxr.mozilla.org mozilla-central source dom push http : mxr.mozilla.org mozilla-central source dom push . Comment : @Marco How I think this also is for web apps only . Comment : @ankitG those modules are internal they can t be used by web content but can be used by addons . I m not sure about the how you have to investigate by looking at their source code . Comment : There s also something else that you could do . Create a web page that uses service workers and the standard Push API and somehow communicate data between the addon and the web page .", "Question : I ve been playing around with firefox but haven t found a way to view the XSLT source . If I go to view-source then it only shows the XML source and if I go to inspector it only shows the result-of the transform . Is there a way to view the XSLT source Comment : The XSLT transformation is an XML file too . If you transform XML with the browser there is usually a processing instruction at the beginning that tells you which file contains the XSLT code . Open this file with the browser to look at the XSLT source . Comment : @MathiasM ller Oh I didn t explain the problem well enough it seems . I know the XSLT code I ve written it myself What I want is to see that firefox has downloaded it and not cached an old version and also to see how it parses it with warnings and error messages . It would be progress if I could open the XML source and click on the xml-stylesheet link-to get at the downloaded XSLT file but firefox doesn t allow this . I would like a list of all the secondary files that have been downloaded based on the XML file and have the opportunity to click on them to view the source . Comment : @Henrik i don t think firefox allows you to do that . it s just that XSLT in the browser never caught on as much as initially hoped expected to the functionality in browsers often is limited . what i d recommend is to use firebug or some other general browser debugging tool which will allow you to better understand how the browser handles all web resources including XSLT . Comment : @dret Thanks for the info and advice . Yes I know that XSLT never caught on how foolish people are and that the project was left in limbo but to view a source file seems like a very modest demand . .. . Answer : In the XML source at the start of the file there will be a line such as this formally referred to as an XML Processing Instruction : .. . .. . xml-stylesheet type text xsl href .. . .. . .. . This line instructs the browser in fact any client interested in transforming the XML where to find the XSLT . If you follow the link given in the href attribute it s not in fact an actual XML attribute but let s leave this aside for now then you will find the XSLT source . This is exactly what your browser does and you can do the same and then you can view the XSLT in the browser or do whatever else you d like to do with it .", "Question : I am using Twist for Test Automation . I have created a Twist project by following combination : .. . .. . Driver : Sahi for web apps .. . Language : Java .. . Browser : Firefox .. . .. . I have created Scenario . During recording Firefox is opened . In Firefox Enter start URL text field is present only . But when I used Sahi Pro 5 there was also Use with Resolution check box and text field in browser during recording in which one could enter browser resolution . Is there any way to use Use with Resolution check box and text field option in Sahi with Twist during recording the tests Comment : It is Twist 13.1 developed by ThoughtWorks . I have downloaded it from thoughtworks-studios.com register destination node 226 http : www.thoughtworks-studios.com register destination node 226 .. . Answer : By the help of ThoughtWorks Support the following is the answer : .. . .. . Twist comes bundled with Sahi open-source Sahi OS version . This feature is not available in the OS version . You will have to set the resolution manually before executing on the browser .", "Question : The Mozilla documentation is silent on this issue . Is there anyone in the know that can answer and explain why or why not If not I d like to know the policy reasons and architectural decisions why not . Edit : This question is limited to extensions that cannot use the Add-on SDK and instead use the traditional overlay pattern . Comment : Have you tried What happened Comment : @JanDvorak Yes jQuery doesn t seem to be supported directly but there may be some workarounds but that troubles me since I don t know the intentions of the designers and whether a hack to make it work would break in the future . Not enough room to get into details here for now . Comment : You can inject it into any page that loads in Firefox . You can create your own html page and use it there . Mozilla docs don t mention it because it is an unrelated thing . All the docs are about the javascript used to control Firefox itself . jQuery is meant for cross-browser scripting and ease for the web pages not for the Firefox scope . Comment : @Noitidart and the8472 jQuery is more than just a cross-browser API It s tremendously convenient Ever hear of code-reuse Again the Chrome browser supports 3rd party scripts in their content scripts out-of-the-box . Why do I have to explain the obvious Comment : AlJo @the8472 and I have stated the scope is different . Firefox also has out of the box content scripts and you can freely user jQuery there . Google Chrome does not allow customization of the browser Firefox does and in this scope jQuery not only is useless but it cannot be used . Because it is a different kind of DOM . Again though you are free to use jQuery or whatever else in your content scripts . The docs you read are regarding Firefox internals not the internals of a content-script . .. . Answer : See my comments to your OP . The docs you read are not about content scripts . It is about framescripts and other elevated scopes . Google chrome does not have these elevated scopes . They ONLY have content-script . This is why we were all confused . This is how you use jQuery in your content scripts with jpm addon sdk . Download the jquery lib into your data folder . This inserts jQuery into all websites . tabs.open pageUrl .. . .. . If you use webextensions its the same exact way as google-chrome : https : developer.mozilla.org en-US Add-ons WebExtensions", "Question : This is my first time on this site . I have a HTML CSS JS application . For that application to work we also have a browser npapi plugin .so file that is installed in plugins dir of firefox . This works on firefox browser on Linux . Now I want my application to run on Firefox OS B2G . How do I port that .so plugin to firefox OS . What I have done is I have built B2G and flashed it on my test device . I have built that plugin for android platform by using gecko sdk and firefox OS source . I have pushed my .so file in FFOS phone in system lib as well as system b2g the folders where I can see other .so files . . Is that the correct approach What else do I need to do to make it work . Currently my application is unable to load that plugin I checked using . run-gdb . Any pointers would be helpful . I have gone through the documentation on mozilla website and also googled it alot but couldn t find the solution . Thanks . Comment : A bit more search revealed to me that NPAPI is not supported on firefox OS : . My bad . But I do see a lot of source and compiled files for npapi within firefox OS source code tree under gecko dom plugins base and objdir-gecko dom plugins base . What are these about . .. . Answer : You are right NPAPI is not supported on Firefox OS B2G . You do see code for it in the tree and maybe even in the object directories because much of the code is actually being used over different products desktop Firefox mobile Firefox Firefox OS .. . .", "Question : I m trying to serve dynamically generated xml pages from a web server and provide a custom static xslt from the same web server that will offload the processing into the client web browser . Until recently I had this working fine in Firefox 2 3 IE5 6 and Chrome . Recently though something has changed and Firefox 3 now displays just the text elements in the source . The page source starts like this : .. . .. . Firebug shows that the Root.xsl file is being loaded and the response headers for it include the line .. . .. . I ve also tried it with application xml as the content-type but it makes no difference : - .. . .. . The Web Developer Extension shows the correct generated source too and if you save this and load the page in Firefox it displays correctly . The version of Firefox displaying the problem is 3.0.3 .. . .. . Any ideas what I might be doing wrong .. . Answer : Answering my own question in the light of subsequent investigation . ddaa http : stackoverflow.com questions 221434 how-can-i-get-firefox-3-to-display-a-page-after-performing-the-xsl-stylesheet-p 231522 lead me in the right direction . .. . .. . Firefox seems to be pretty fussy with xslt conversions . Double-check your xslt to ensure it has no errors that IE and Chrome are masking . XML Spy is a good though not cheap product that will highlight a range of errors in the xslt . It seems to pick up at least as many issues as the Firefox renderer does . It seems you can t rely on the Web Developer extension to pick up the problem unfortunately . Comment : So was that indeed a kind of namespace matching problem Comment : No . I had an xpath problem . string-length on IE and Chrome doesn t mind if the argument is a node list but XML Spy complains that there are Too many items and changing the expression made Firefox spring back to life . Comment : Is there a way to get an error message from firefox I have the same problem and XML Spy does not complain . 8-", "Question : I switched from Google Chrome to Firefox Developer s Edition because of memory leak issues and moving towards truly open-source solution . I want to debug the payload of my request which is JSON but Firefox does not show the user-friendly tree structure of JSON data . Is there any plugin How can I improve the Network Monitor Firefox Developer Edition Network monitor Params http : i.stack.imgur.com xnSvv.png .. . Answer : It has been fixed and is now available . Just update your browser using the about Firefox . The bug report : https : bugzilla.mozilla.org show bug.cgi id 1122102 .. . .. . enter image description here http : i.stack.imgur.com melBK.png Comment : Now it s more like Developer s Browser +1", "Question : I m trying to serve dynamically generated xml pages from a web server and provide a custom static xslt from the same web server that will offload the processing into the client web browser . Until recently I had this working fine in Firefox 2 3 IE5 6 and Chrome . Recently though something has changed and Firefox 3 now displays just the text elements in the source . The page source starts like this : .. . .. . Firebug shows that the Root.xsl file is being loaded and the response headers for it include the line .. . .. . I ve also tried it with application xml as the content-type but it makes no difference : - .. . .. . The Web Developer Extension shows the correct generated source too and if you save this and load the page in Firefox it displays correctly . The version of Firefox displaying the problem is 3.0.3 .. . .. . Any ideas what I might be doing wrong .. . Answer : try serving it as application xml instead of text xml Comment : That doesn t help . Comment : Sometimes it does for other browsers so not a bad guess .", "Question : I m trying to serve dynamically generated xml pages from a web server and provide a custom static xslt from the same web server that will offload the processing into the client web browser . Until recently I had this working fine in Firefox 2 3 IE5 6 and Chrome . Recently though something has changed and Firefox 3 now displays just the text elements in the source . The page source starts like this : .. . .. . Firebug shows that the Root.xsl file is being loaded and the response headers for it include the line .. . .. . I ve also tried it with application xml as the content-type but it makes no difference : - .. . .. . The Web Developer Extension shows the correct generated source too and if you save this and load the page in Firefox it displays correctly . The version of Firefox displaying the problem is 3.0.3 .. . .. . Any ideas what I might be doing wrong .. . Answer : Displaying just the text elements is the behavior you would get out of an empty XSL stylesheet . To me that suggests that something fishy is going on with your xpath expressions and that the xsl : template @match attributes do not match the source document . You do not provide enough information to diagnose further so this blind guess is all I can offer . EDIT : It turned out the problem was that IE and Chrome silently accept a nodeset as argument to string-length http : www.w3.org TR xpath function-string-length while FF3 does not . Note that the specification mandates an optional string argument and does not specify behavior with a nodeset argument . Comment : I ll take a look and double-check . Both IE and Chrome seem to be doing the transformation OK though and the Web Developer extension in Firefox is displaying html that looks valid for the generated source . How accurate is the generated source window Does it show the exact source used to render Comment : If you generalise your answer I ll be happy to accept it . I can t accept my own answer.. . Comment : Also do not use underscore in the name of the XSLT file . I had this and when I changed to a filename without underscore it worked fine in Firefox .", "Question : I m trying to debug a Firefox extension using Firefox 28.0 . I have set up the dev environment as suggested in https : developer.mozilla.org en-US Add-ons Setting up extension development-environment actually I just took the lazy way out and installed the DevPrefs extension to set all the necessary about : configs .. . .. . I then open Firefox and go into the debugging environment Tools Web Developer Browser Toolbox . I then go to the Debugger tab . However under the Sources pane under my extension e.g . chrome : myextension I only see some of the JS and XUL files that are contained in my extension XPI . How can I manually load files in the debugger so that I can set a breakpoint and trace the runtime of my extension .. . Answer : The debugger doesn t have any functionality that would allow loading files manually instead it will show you every file that is currently loaded by the JavaScript engine . If you dig into details this means that whenever the JavaScript engine compiles a new script the debugger is notified and adds the corresponding file to its list . So normally all you need to do is open a page or dialog that uses that script and it will become visible in the debugger . I say normally because in my tests this didn t seem to work reliably - there appears to be some bug which makes the debugger miss out some scripts maybe that s what prompted your question . Now of course you can consider faking the notification to force the debugger to load a particular file - e.g . if you want to set breakpoints before the file actually loads . I tried it and it is indeed possible but it requires you to mess with Firefox internals and it relies on a number of implementation details that might change in future Firefox versions . In particular you need to get the DebuggerServer instance used to communicate with the debugger . While the in-process debugger always uses the same instance which is trivial to get a new instance is created for each remote debugger . From what I can tell getting to that instance is only possible with the changes implemented in bug 993029 https : bugzilla.mozilla.org show bug.cgi id 993029 which means that it will only work with Firefox 32 currently available from the Firefox Aurora channel https : www.mozilla.org firefox channel aurora and above . The problem is that the DebuggerServer instance is being created by the BrowserToolboxProcess class declared in ToolboxProcess.jsm http : hg.mozilla.org mozilla-central file a74600665875 browser devtools framework ToolboxProcess.jsm . Before the changes introduced by bug 993029 a BrowserToolboxProcess object would be created and no reference to it kept - meaning that it would be impossible to access it and the corresponding connection after the fact . Starting with Firefox 32 all created BrowserToolboxProcess objects are stored in the processes set https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Set and can be enumerated . This code can be used to fake a Debugger.onNewScript call https : developer.mozilla.org en-US docs Mozilla Projects SpiderMonkey JS Debugger API Reference Debugger onNewScript 28 29 that will be forwarded to the remote debugger : .. . .. . As mentioned above this code should only work starting with Firefox 32 I tested it on Firefox 33.0a1 . You can run it from Scratchpad make sure to switch environment to Browser https : developer.mozilla.org en docs Tools Scratchpad Running Scratchpad in the browser context . There is no guarantee whatsoever that it will continue working in future Firefox versions there are several implementation details used here that can change at any time . Comment : not the definite answer that I d hoped for but does tell me the technical details that I need to know and why the debugger behaves in that way . And I think it deserves the bounty ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mozilla
UNK_RELATION
pythonbrew@python@84
pythonbrew -- pythonbrew is a program to automate the building and installation of @placeholder in the users home .
{ "confidence": [ 51.74897003173828, 50.5880126953125, 47.78321075439453, 46.39366912841797, 45.72949981689453, 45.688697814941406, 45.12446975708008, 45.08600616455078, 44.85143280029297, 43.80493927001953, 43.5826416015625, 43.20361328125, 43.11704635620117, 42.80253982543945, 42.614280700683594, 42.53166580200195, 42.53166580200195, 42.46272277832031, 41.84825134277344, 41.84825134277344, 41.212135314941406, 40.59394836425781, 39.906471252441406, 39.64667510986328, 39.477745056152344, 39.477745056152344, 39.477745056152344, 39.477745056152344, 39.477745056152344, 39.477745056152344, 39.477745056152344, 39.406795501708984, 39.27235412597656, 38.84771728515625, 38.73426818847656, 38.327144622802734, 38.13840866088867, 38.00114822387695, 38.00114822387695, 38.00114822387695, 37.7513313293457, 37.537967681884766, 37.537967681884766, 36.948116302490234, 36.83371353149414, 36.83371353149414, 36.268768310546875, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 36.26675796508789, 35.57927703857422, 35.45468521118164, 35.11615753173828, 35.11615753173828, 35.11615753173828, 35.11615753173828, 34.72117233276367, 34.56826400756836, 34.56826400756836, 34.287193298339844, 34.287193298339844, 34.170066833496094, 33.73712921142578, 33.675968170166016, 33.675968170166016, 33.675968170166016, 33.675968170166016, 33.675968170166016, 33.675968170166016, 33.621665954589844, 33.621665954589844, 33.621665954589844, 33.41766357421875, 33.019466400146484, 31.941577911376953, 31.941577911376953, 31.941577911376953, 31.941577911376953, 31.941577911376953, 31.941577911376953, 31.941577911376953, 31.941577911376953, 31.941577911376953, 31.941577911376953 ], "content": [ "HOME .pythonbrew etc bashrc .. . .. . ok and now pythonbrew is back and running .", "I recently came across this in a cron script at my place of work : .. . .. . bin bash -c -s HOME .pythonbrew etc bashrc source HOME .pythonbrew etc bashrc pythonbrew use 2.6.7 pythonbrew venv use someapp python opt someapp bin someapp.py .. . .. . This is for a system-wide multi-user installation of Pythonbrew .", "PythonBrew Readme https : github.com utahta pythonbrew readme", "Try this in command-line : .. . .. . Make sure you changed path home user .pythonbrew to your pythonbrew path .", "sayth@sayth-TravelMate-5740G 9 : 04 : pythonbrew list zsh : correct pythonbrew to .pythonbrew nyae", "I m trying to create a playbook with Ansible v 1.3.3 to install Pythonbrew system-wide on a Debian server following the instructions in the Pythonbrew readme file https : github.com utahta pythonbrew installation .", "After some more reading I executed the script correctly as root user and it installed pythonbrew to usr local pythonbrew yay .", "pythonbrew isn t getting picked up by by mod-wsgi file config follows : .. . .. . and the pythonbrew version of python i want to use is situated here : .. . .. . home bharal .pythonbrew pythons Python-2.7.2 lib python2.7 site-packages .. . .. . and my pythonbrew install is here : .. . .. . home bharal .pythonbrew .. . .. . How do i tell mod-wsgi to use this version 2.7.2 and not the default python version that shipped with ubuntu 2.6", "By peeking at the PythonBrew install script https : github.com utahta pythonbrew blob master pythonbrew installer pythonbrewinstaller.py L91 I was able to figure this out .", "I m new to both python pythonbrew and ubuntu .", "I installed pythonbrew and then switch to python3.2 .", "Out of curiosity did your installation targets get thrown into .pythonbrew by mistake", "I build it in opt sw-python extra pythonbrew directory and on install pythonbrew is placed to the same opt sw-python extra pythonbrew directory .", "More details about pythonbrew and usage from my perspective of view : .. . .. . The installation guide I mentioned explains step by step how to install pythonbrew in your home-directory e.g .", "127 : failed to patch -p0 home thilina .pythonbrew patches all python25 patch-setup.py.diff home thilina .pythonbrew log build.log 2 1 .. . .. . Can anyone lend me a hand here", "Now I ran pythonbrew cleanup and it failed : .. . .. . Why did pythonbrew install files under my account with user root", "And just in time for the deprecation of PythonBrew https : github.com utahta pythonbrew commit e8823c5494a26e2c91aa516eac80b748474ba129 diff-88b99bb28683bd5b7e3a204826ead112", "I am using pythonbrew .", "I installed pythonbrew virtualenv and virtualenvwrapper .", "n zsh : command not found : pythonbrew", "Here s the playbook that installs PythonBrew without manual intervention .", "I downloaded the pythonbrew bits manually and then used python setup.py install to install it .", "I tried installing pythonbrew but the curl install curl -kL https : raw.githubusercontent.com utahta pythonbrew master pythonbrew-install bash did not work for me : it was not picking up my http-proxy from env and then not passing it to the install script once I provided it on the command-line .", "You will see what I mean here github.com utahta pythonbrew https : github.com utahta pythonbrew look for usage", "The tutorial says that the virtualenv will use the version pythonbrew uses .", "I m trying to deactivate pythonbrew from a bash script .", "In my bash script pythonbrew off is just ignored .", "adding that to .zshrc still results in zsh not seeing pythonbrew .", "I installed pythonbrew on an ubuntu precise system .", "I ll see about adding this as a patch to pythonbrew as well .", "It s look pythonbrew no longer in active development .", "I followed the installation instructions but when I try to install a python version pythonbrew downloads the source package and start installing it .", "Patching Python-2.5 ERROR : Failed to patch home thilina .pythonbrew build Python-2.5 .", "According installation guide for pythonbrew see : https : pypi.python.org pypi pythonbrew the following line should be used to run a script : .. . .. . However I can run my script by using python instead of pythonbrew py : .. . .. . I cannot give an explanation for that sorry .", "I have seen issues where something failed to compile in the installation of a Python Version from pythonbrew that can kill the rest of the install process and pip doesn t get installed in the pythonbrew python version .", "I use Pythonbrew and virtualenv together all the time .", "I know pythonbrew https : github.com utahta pythonbrew is a mimic of RVM http : beginrescueend.com but I thought virtualenv http : pypi.python.org pypi virtualenv is already doing what RVM does or vice versa that pythonbrew https : github.com utahta pythonbrew is already doing what RVM does .", "I am using pythonbrew to install 2.7.2 on my CentOS .", "Finally I just ditched pythonbrew and did a multi install of python .", "This may be of interest to anyone trying to script PythonBrew to install automatically .", "UPDATE i installed pythonbrew as per this SO item : Python 2.7 on Ubuntu http : stackoverflow.com questions 5233536 python-2-7-on-ubuntu .. . .. . UPDATE2 ok so i reinstalled pythonbrew as per that so link ie i ran curl -kL http : github.com utahta pythonbrew raw master pythonbrew-install bash from my directory .. . .. . that went and told me it had installed pythonbrew to the home loginname .pythonbrew directory .. . .. . so i went there and then i ran the other line in that so link i have nfi what this line does but run it", "HOME .pythonbrew etc bashrc .. . .. . any ideas if ubuntu can do the above two steps on startup login", "For me the easiest and perfectly working solution to that problems was to use pythonbrew and install it at my home-directory on the server", "Forget pythonbrew even the author deems it deprecated .", "Attention Googlers : pythonbrew is now deprecated https : github.com utahta pythonbrew deprecated check out pyenv https : github.com yyuu pyenv instead .", "Since Pythonbrew compiles Python from scratch to create one of its environments creating a Pythonbrew Python environment takes some time .", "In the end i didn t compile against 2.7 my 2.6 was fine and it was too hard to get the pythonbrew compile working", "Maybe you should look http : pypi.python.org pypi pythonbrew instead .", "If you ve read my entire question I did use pythonbrew .", "Thanks Mark I figured that from the : pythonbrew venv use proj command .", "When inside the shell typing pythonbrew off works correctly .", "I have started using pythonbrew to manage different Python installs .", "How can I use pip to install to my pythonbrew installs", "My current pythonbrew Python version is 3.3.0 Am I missing something", "@JayAtkinson I thought it came packaged with pythonbrew like you said .", "You may want to check your build log inside .pythonbrew directory .", "I uninstalled my Python 3.3.0 by issuing pythonbrew uninstall 3.3.0 .", "Then I installed it again with pythonbrew install --configure --with-zlib 3.3.0 .", "The trick turned out to be locating the pythonbrew virtualenv s python binary .", "So I switched off pythonbrew and then ran python and then import django and it worked .", "I ve tried to install python from pythonbrew as the tutorial for SublimeClang told me .", "I have installed multiple python versions using pythonbrew install .", "It should be something like : .. . .. . pythonbrew install 3.3.1 which is the latest available version .", "I recently upgraded my FreeBSD box and now pythonbrew seems to be broken .", "But since pythonbrew has been deprecated I am trying to migrate to pyenv .", "I found out myself how to run a python script with pythonbrew properly", "I wanted to use pythonbrew since at the server I have only Python 2.7.6 installed but I need hdf5-package running .. . OK .. . .. . I installed pythonbrew according to https : pypi.python.org pypi pythonbrew and switched to version 2.7.10 as I use on my local computer .", "There are some major differences between pythonbrew and virtualenv which deem it necessary for me to use pythonbrew otherwise I would use virtualenv exclusively .", "One advantage to Pythonbrew is that the Python environments it creates are truly and completely self-contained .", "If pythonbrew allows multiple installations of the same python version then I think they are the same .", "I need pythonbrew to install and use the misopy package on my iMac .", "If this information helps others installing pythonbrew and python-2.7 in mac .", "Following the which pythonbrew and doing some guessing the following solved my problem : I changed the curl.py file under usr local pythonbrew scripts pythonbrew adding proxy setting to read readheader and fetch functions as follows : .. . .. . before modification : .. . .. . after modification : .. . .. . I am not sure why there was no output without the proxy setting but now the install works", "I followed this tutorial : http : technomilk.wordpress.com 2011 07 27 setting-up-our-django-site-environment-with-pythonbrew-and-virtualenv .. . .. . Which essentially runs pythonbrew use 3.3.0 and then create a virtualenv .", "Where before i would switch to 2.7.2 now all my requests for pythonbrew end in errors - .. . .. . What did i do wrong and where is my pythonbrew", "Any assistance will be greatly appreciated also this isn t a unique problem as I expect many others to face this installation issue with pythonbrew and django .", "Further instructions of how to use pythonbrew installing or switching between different version etc . see the link-to the installation guide I posted above", "i don t know what is going on but apparently every time i log in i need to .. . .. . 1 . go to home loginname .pythonbrew directory .. . .. . 2 . run .", "The winning answer is to erase your .pythonbrew folder and build again .", "Install this package with the following command before using pythonbrew : .. . .. . Everything should now install correctly .", "pythonbrew failed some months ago to install 2.7.3 due to a weird compiler error that was never resolved .", "Ha I see pythonbrew was updated to be deprecated so I quit using this approach .", "I am able to get Pythonbrew installed but I cannot install the specific version of Python that I want with it .", "I want to keep my virtual environments with their associated projects not all together under the .pythonbrew directory .", "I m aware of pyenv and plan to go that route at some point but am still using pythonbrew for the moment .", "I ve kicked off pythonbrew so when i type in python i can see the version is 2.7.2 and all the settings and packages i need are importable", "Searching online revealed that I should not try to uninstall 2.7 as that would pretty much destroy the OS but get pythonbrew instead that manages multiple python installations .", "I did it as root and it seemed to work installing under root .pythonbrew which was not the best however I could not use it as a different user on the system permission problems .", "I had a bit of experience with ruby not rails and I am familiar with RVM http : beginrescueend.com however I don t understand the difference between pythonbrew https : github.com utahta pythonbrew and virtualenv http : pypi.python.org pypi virtualenv .", "In such a case you could use Pythonbrew to install a base Python 2.7 under your home-directory where it doesn t conflict with anything installed elsewhere .", "When I do pythonbrew use 3.3.0 it leaves the virtualenv and it applies to the system instead of the environment .", "When I did it I used pythonbrew to create the venv .. . .. . Worked like a champ .", "Might be that pythonbrew use is for the current command similar to LD LIBRARY foo runsomething and switch is more like export LI LIBRARY foo .", "I do not use pip or pythonbrew but here is my experience hope it can help and maybe put you on the good path", "I m using Pythonbrew but have also disabled this and tried using the stock python install -- still no success .", "To my understanding brew installs to your local user copy in .pythonbrew by default unless you tell it otherwise .", "so i installed pythonbrew on my ubuntuo 11.04 the other day - yesterday actually - and now i cannot find it .", "doesn t return anything.. . was i meant to make pythonbrew some sort of startup thing", "even better virtualenv which i d installed via pip after installing pythonbrew is also back .", "I am trying to create a debian package containing customly built python using pythonbrew ." ] }
{ "confidence": [ 61.920745849609375, 61.920745849609375, 61.90312194824219, 60.70023727416992, 60.14732360839844, 58.960723876953125, 58.92765426635742, 58.897037506103516, 57.80046844482422, 57.56383514404297, 56.201622009277344, 55.62904357910156, 53.746280670166016, 53.555362701416016, 53.31800842285156, 52.285491943359375, 52.04872512817383, 51.36812210083008, 51.26152801513672, 50.436824798583984 ], "content": [ "Question : I recently came across this in a cron script at my place of work : .. . .. . bin bash -c -s HOME .pythonbrew etc bashrc source HOME .pythonbrew etc bashrc pythonbrew use 2.6.7 pythonbrew venv use someapp python opt someapp bin someapp.py .. . .. . This is for a system-wide multi-user installation of Pythonbrew . It works . But please tell me there s a better way . Addendum .. . .. . To clarify what I m looking for : I d like a one-line command to run my script though a virtualenv tied to pythonbrew . With virtualenv alone I could do something like this : .. . .. . What I don t want is another script to run my script like that cron command above . .. . Answer : I believe it can be done by using the python binary directly from you pythonbrew virtual environment . By default its in .pythonbrew venvs Python- version name of venv bin python But I think you can change the path with an environmental variable . So just change the first half of the line you added to reference the pythonbrew virtual environment python binary and it should work . Comment : In my case python binary turned out to be located at : usr local pythonbrew venvs Python- version name of venv bin python", "Question : I recently came across this in a cron script at my place of work : .. . .. . bin bash -c -s HOME .pythonbrew etc bashrc source HOME .pythonbrew etc bashrc pythonbrew use 2.6.7 pythonbrew venv use someapp python opt someapp bin someapp.py .. . .. . This is for a system-wide multi-user installation of Pythonbrew . It works . But please tell me there s a better way . Addendum .. . .. . To clarify what I m looking for : I d like a one-line command to run my script though a virtualenv tied to pythonbrew . With virtualenv alone I could do something like this : .. . .. . What I don t want is another script to run my script like that cron command above . .. . Answer : The trick turned out to be locating the pythonbrew virtualenv s python binary . Mark s answer http : stackoverflow.com a 16594390 1093087 pointed me in the right direction . But here s a complete rundown for future reference : .. . .. . With pythonbrew installed https : github.com utahta pythonbrew I did the following as root on the server : .. . .. . I had a pip freeze file so I set up my virtualenv using that : .. . .. . Now my python binary can be found at usr local pythonbrew venvs Python-2.6.6 myapp bin python . So to run my script :", "Question : I would like to install several python versions to build SymPy with Sympy-bot in my fedora 18 . I came to know that pythonbrew can be used to do that from here http : www.howopensource.com 2011 05 how-to-install-and-manage-different-versions-of-python-in-linux . I followed the installation instructions but when I try to install a python version pythonbrew downloads the source package and start installing it . Before the completion it exits with the below error message . Patching Python-2.5 ERROR : Failed to patch home thilina .pythonbrew build Python-2.5 . 127 : failed to patch -p0 home thilina .pythonbrew patches all python25 patch-setup.py.diff home thilina .pythonbrew log build.log 2 1 .. . .. . Can anyone lend me a hand here Thanks in advance . .. . Answer : Your error refers to the GNU patch command . This issue probably arises from not having patch installed or it not being in your path . Install this package with the following command before using pythonbrew : .. . .. . Everything should now install correctly .", "Question : I have some pyhton-scripts which are working perfectly on my local computer but as you would guess not so good on the server I wanted to use pythonbrew since at the server I have only Python 2.7.6 installed but I need hdf5-package running .. . OK .. . .. . I installed pythonbrew according to https : pypi.python.org pypi pythonbrew and switched to version 2.7.10 as I use on my local computer . Now I got some numpy-issues . So I installed numpy with pip successfully according to How do you install numpy when you re not a superuser http : stackoverflow.com questions 14364203 how-do-you-install-numpy-when-youre-not-a-superuser and https : gist.github.com audy 4012573 however when I am running the programme : .. . .. . I got the error message saying numpy was not found .. . I really have no clue what I am missing here I appreciate any help Comment : It s look pythonbrew no longer in active development . They are suggesting to use github.com yyuu pyenv https : github.com yyuu pyenv . However if you are going to use numpy heavily in the production environment I suggest you to use continuum.io why-anaconda https : www.continuum.io why-anaconda distribution . It can install without affecting to the system python installation . You can use conda package manager that comes with Anaconda to install numpy .. . Answer : I found out myself how to run a python script with pythonbrew properly According installation guide for pythonbrew see : https : pypi.python.org pypi pythonbrew the following line should be used to run a script : .. . .. . However I can run my script by using python instead of pythonbrew py : .. . .. . I cannot give an explanation for that sorry . But maybe other people can . It is just working very well like this and I can use python and all packages normally Further instructions of how to use pythonbrew installing or switching between different version etc . see the link-to the installation guide I posted above More details about pythonbrew and usage from my perspective of view : .. . .. . The installation guide I mentioned explains step by step how to install pythonbrew in your home-directory e.g . on a server and helps to set up python on a system where you are not superuser e.g . a server where you are allowed to run scripts but not to execute any further installations . I had the problem that I needed a more up to-date python-version and the server where the data is located is equipped with an older version . The other half of the story is that I also needed some packages e.g . h5py or cosmolopy which are also not installed at the server . For me the easiest and perfectly working solution to that problems was to use pythonbrew and install it at my home-directory on the server", "Question : I recently came across this in a cron script at my place of work : .. . .. . bin bash -c -s HOME .pythonbrew etc bashrc source HOME .pythonbrew etc bashrc pythonbrew use 2.6.7 pythonbrew venv use someapp python opt someapp bin someapp.py .. . .. . This is for a system-wide multi-user installation of Pythonbrew . It works . But please tell me there s a better way . Addendum .. . .. . To clarify what I m looking for : I d like a one-line command to run my script though a virtualenv tied to pythonbrew . With virtualenv alone I could do something like this : .. . .. . What I don t want is another script to run my script like that cron command above . .. . Answer : On the first line on your python script add a shebang followed by a path to your target python . Then make the python script executable . It can then be executed directly from the command-line crontab another bash script whatever . make a virtual env in your temp dir : .. . .. . the path to your python in that venv is tmp venv bin python .. . .. . Using an editor create a simple script containing all of the following : .. . .. . Save it in your home-directory as mypyscript.py .. . .. . make it executable : .. . .. . Now you should be able to execute it using the filename directly on the command-line : .. . .. . Do this to your someapp.py substituting the relevant path to your python and that should work .", "Question : I m trying to create a playbook with Ansible v 1.3.3 to install Pythonbrew system-wide on a Debian server following the instructions in the Pythonbrew readme file https : github.com utahta pythonbrew installation . I am able to get Pythonbrew installed but I cannot install the specific version of Python that I want with it . I suspect the issue has to do with the shell environment Ansible is running under . Here s my playbook script : .. . .. . When I run this playbook it fails with the following output .. . .. . failed : devserver changed : true cmd : pythonbrew install -v 2.7.3 delta : 0 : 00 : 00.016639 end : 2013-10-11 15 : 21 : 40.989677 rc : 127 start : 2013-10-11 15 : 21 : 40.973038 stderr : bin bash : pythonbrew : command not found .. . .. . I ve been tweaking things for the last hour or so to no avail . Does anybody have any suggestions for fixing this .. . Answer : By peeking at the PythonBrew install script https : github.com utahta pythonbrew blob master pythonbrew installer pythonbrewinstaller.py L91 I was able to figure this out . And just in time for the deprecation of PythonBrew https : github.com utahta pythonbrew commit e8823c5494a26e2c91aa516eac80b748474ba129 diff-88b99bb28683bd5b7e3a204826ead112 Here s the playbook that installs PythonBrew without manual intervention . This may be of interest to anyone trying to script PythonBrew to install automatically . vars.yml .. . .. . pythonbrew.yml", "Question : pythonbrew isn t getting picked up by by mod-wsgi file config follows : .. . .. . and the pythonbrew version of python i want to use is situated here : .. . .. . home bharal .pythonbrew pythons Python-2.7.2 lib python2.7 site-packages .. . .. . and my pythonbrew install is here : .. . .. . home bharal .pythonbrew .. . .. . How do i tell mod-wsgi to use this version 2.7.2 and not the default python version that shipped with ubuntu 2.6 When i run my server i get errors like so : .. . .. . as you can see from the logs the server is still looking at python-2.6 Why I ve kicked off pythonbrew so when i type in python i can see the version is 2.7.2 and all the settings and packages i need are importable UPDATE as indicated in the answer below the mod-wsgi doesn t care which python i tell it to use - in fact i cannot tell it to use any particular python . The only way to do so is to download an uncompiled wsgi file compile with the particular python version i want and use the compiled wsgi . See my other question Error : Command failed with rc 65536 python and mod-wsgi http : stackoverflow.com q 11332717 1061426 for some of the steps and links to tutes if you like . In the end i didn t compile against 2.7 my 2.6 was fine and it was too hard to get the pythonbrew compile working .. . Answer : That particular error has nothing to do with the version of Python used . Use : .. . .. . sys.path.append home bharal public html sys.path.append home bharal public html dumpstown .. . .. . To get mod-wsgi to use a specific version compile it from source code against that version or find a binary package for mod-wsgi compiled against the correct version .", "Question : so i installed pythonbrew on my ubuntuo 11.04 the other day - yesterday actually - and now i cannot find it . Where before i would switch to 2.7.2 now all my requests for pythonbrew end in errors - .. . .. . What did i do wrong and where is my pythonbrew doesn t return anything.. . was i meant to make pythonbrew some sort of startup thing ps if you haven t guessed already I am not very familiar with unixy things sorry if this is an obvi question . UPDATE i installed pythonbrew as per this SO item : Python 2.7 on Ubuntu http : stackoverflow.com questions 5233536 python-2-7-on-ubuntu .. . .. . UPDATE2 ok so i reinstalled pythonbrew as per that so link ie i ran curl -kL http : github.com utahta pythonbrew raw master pythonbrew-install bash from my directory .. . .. . that went and told me it had installed pythonbrew to the home loginname .pythonbrew directory .. . .. . so i went there and then i ran the other line in that so link i have nfi what this line does but run it . HOME .pythonbrew etc bashrc .. . .. . ok and now pythonbrew is back and running . even better virtualenv which i d installed via pip after installing pythonbrew is also back . i don t know what is going on but apparently every time i log in i need to .. . .. . 1 . go to home loginname .pythonbrew directory .. . .. . 2 . run . HOME .pythonbrew etc bashrc .. . .. . any ideas if ubuntu can do the above two steps on startup login .. . Answer : If you add .. . .. . to the end of the .bashrc file in your home loginname directory Linux will automatically source pythonbrew s bashrc assuming your permissions are all correct . After adding the new line to your .bashrc either run .. . .. . or fire up a new terminal", "Question : I have started using pythonbrew to manage different Python installs . The main reason I wanted to do this is to install third party modules without affecting my system s Python install . Fore example I thought I would install the requests library using : .. . .. . pip install requests .. . .. . However this causes an error saying : .. . .. . error : could not create usr local lib python2.7 dist-packages requests : Permission denied .. . .. . Obviously I don t want to install it to the system s Python which is Python 2.7.3 . I did have to install pip with my package manager and the resultant path is usr bin pip . How can I use pip to install to my pythonbrew installs My current pythonbrew Python version is 3.3.0 Am I missing something Comment : have you run pythonbrew switch 3.3.0 for your session before running pip install requests Comment : @JayAtkinson Yes I have . python -V prints Python 3.3.0 . : Comment : Normally when I use pip it s used with the pythonbrew installed version of Python . I wonder if that may be the problem or if you PYTHONBREWHOME is not setup properly . I don t normally us a pip located in usr bin pip . Comment : @JayAtkinson I thought it came packaged with pythonbrew like you said . I thought the pip install would be my home-directory somewhere . Comment : I have seen issues where something failed to compile in the installation of a Python Version from pythonbrew that can kill the rest of the install process and pip doesn t get installed in the pythonbrew python version . You may want to check your build log inside .pythonbrew directory . .. . Answer : I found a solution . I uninstalled my Python 3.3.0 by issuing pythonbrew uninstall 3.3.0 . Then I installed it again with pythonbrew install --configure --with-zlib 3.3.0 . This allowed pip to install and thus now I can use it to install to this Python version . Maybe somebody else can find this helpful cheers Comment : someone did Comment : +1 worked for me too .", "Question : I m trying to deactivate pythonbrew from a bash script . When inside the shell typing pythonbrew off works correctly . In my bash script pythonbrew off is just ignored . when using echo I get : .. . .. . Calling the function causes the program to exit without printing the failure message . Here s the function : .. . Answer : It turns out that I had to source HOME .bashrc etc bashrc since functions are not imported to the script . I have source HOME .bashrc etc bashrc in my .bashrc file but as far as I understand the functions are not imported to a sub process .", "Question : null .. . Answer : pythonbrew failed some months ago to install 2.7.3 due to a weird compiler error that was never resolved . Now I ran pythonbrew cleanup and it failed : .. . .. . Why did pythonbrew install files under my account with user root I manually deleted the Python-2.7.3 directory . Now I m trying to install the latest 2.7 release using Python s brew but : .. . .. . tail -f Users Ceti .pythonbrew log build.log .. . .. . How can I install the latest release Comment : Ha I see pythonbrew was updated to be deprecated so I quit using this approach . Comment : It does install 2.7.5 comfortably now .", "Question : I m new to both python pythonbrew and ubuntu . I need python-2.6 and currently have 2.7 on my ubuntu precise system . Searching online revealed that I should not try to uninstall 2.7 as that would pretty much destroy the OS but get pythonbrew instead that manages multiple python installations . I tried installing pythonbrew but the curl install curl -kL https : raw.githubusercontent.com utahta pythonbrew master pythonbrew-install bash did not work for me : it was not picking up my http-proxy from env and then not passing it to the install script once I provided it on the command-line . I downloaded the pythonbrew bits manually and then used python setup.py install to install it . I did it as root and it seemed to work installing under root .pythonbrew which was not the best however I could not use it as a different user on the system permission problems . After some more reading I executed the script correctly as root user and it installed pythonbrew to usr local pythonbrew yay . Now when I execute the following as root or non root user it waits for a while and then the prompt comes back with no error or any other information --verbose makes no difference : .. . .. . Any ideas I m guessing this has something to do with the proxy again but I m completely new to python so any pointers are welcome . .. . Answer : Following the which pythonbrew and doing some guessing the following solved my problem : I changed the curl.py file under usr local pythonbrew scripts pythonbrew adding proxy setting to read readheader and fetch functions as follows : .. . .. . before modification : .. . .. . after modification : .. . .. . I am not sure why there was no output without the proxy setting but now the install works", "Question : I am currently facing an issue when trying to install Django using pythonbrew . My system is running ubuntu-12.04 LTS and I am following these instructions to get django running : .. . .. . http : www.tangowithdjango.com book chapters requirements.html installing-software .. . .. . I have followed everything exactly as specified by the book but when it comes time to use Django on my pythonbrew version of Python I get this error : .. . .. . Traceback most recent call last : File line 1 in ImportError : No module named django .. . .. . So I decided to do some investigating and I went into the folder that is now specified as my PYTHONPATH for adding additional libraries which is : .. . .. . . .pythonbrew pythons Python-2.7.5 lib python2.7 site-packages I ve left out the above 2 folder levels but my PYTHONPATH is correct confirmed by echo PYTHONPATH .. . .. . In the site-packages folder there is nothing there which explains the Django error . So I switched off pythonbrew and then ran python and then import django and it worked . This likely means that when trying to install stuff to Python it is probably not using the PYTHONPATH for some reason or maybe something else . I have taken a look here : .. . .. . 1 Error after installing Django supposed PATH or PYTHONPATH error http : stackoverflow.com questions 2935723 error-after-installing-django-supposed-path-or-pythonpath-error the solution and question seems very different to mine with slight similarities .. . .. . 2 how to install additional python packages with pythonbrew http : stackoverflow.com questions 9217687 how-to-install-additional-python-packages-with-pythonbrew the guy didn t get a response and did a hack .. . .. . 3 http : suvashthapaliya.com blog 2012 01 sandboxed-python-virtual-environments this guy recommends using virtualenv to create a virtual environment before installing packages .. . .. . I m not sure what to do now and I suspect the error is either with my PYTHONPATH or there s some permission error that is causing all my installed packages to go to the root python installation instead of the pythonbrew package . Any assistance will be greatly appreciated also this isn t a unique problem as I expect many others to face this installation issue with pythonbrew and django . Comment : I don t know if this is an advisable solution but what I did was I went to the local python add-on path : usr local lib python2.7 dist-packages and simply copied all the files folders in there and pasted them into my PYTHONPATH now when I run import django it works . I would assume this isn t a good fix as everything I try to install in future will still go to root but this does get it working . .. . Answer : Try this in command-line : .. . .. . Make sure you changed path home user .pythonbrew to your pythonbrew path . Then ensure you have the right pip : .. . .. . an output should be something like that : .. . .. . then install Django with .. . .. . First command make pip work only for current terminal . If you want to make usage of pythonbrew s pip persistent you can add this line to your .bashrc : Comment : I m getting this as an output : pip 1.4.1 from usr local lib python2.7 dist-packages python-2.7 .", "Question : I am new to python and I am planning to learn django . I had a bit of experience with ruby not rails and I am familiar with RVM http : beginrescueend.com however I don t understand the difference between pythonbrew https : github.com utahta pythonbrew and virtualenv http : pypi.python.org pypi virtualenv . I know pythonbrew https : github.com utahta pythonbrew is a mimic of RVM http : beginrescueend.com but I thought virtualenv http : pypi.python.org pypi virtualenv is already doing what RVM does or vice versa that pythonbrew https : github.com utahta pythonbrew is already doing what RVM does . Can someone please explain and perhaps provide some concrete examples usages to help me understand it . Thanks very much Comment : Related : stacktoheap.com blog 2013 03 11 http : stacktoheap.com blog 2013 03 11 why-use-virtualenv-when-there-is-pythonbrew Comment : Attention Googlers : pythonbrew is now deprecated https : github.com utahta pythonbrew deprecated check out pyenv https : github.com yyuu pyenv instead . Comment : Sorry for resurrecting an old thread but I came with the same question and the answers below were not clear obsolete since 2011 . So I added another answer based on my understanding below - please check correct as needed . .. . Answer : Python brew is for building and install maybe like some buildbot . I m not so familiar . Virtualenv is mainly for when you got different version of python or you wan to try some package without disturbing on-system version . .. . .. . Ok this revels something .. . .. . Create isolated python environments uses virtualenv : .. . .. . From http : pypi.python.org pypi pythonbrew Comment : but pythonbrew can also install different versions of python and switch between the installed versions . You will see what I mean here github.com utahta pythonbrew https : github.com utahta pythonbrew look for usage Comment : @Jeff I think the switch command is based on virtualenv . Comment : @wliao why do you think that", "Question : I am trying to create a debian package containing customly built python using pythonbrew . The compilation and debian construction is successfull . The problem is that when I install the package on other machine some modules does not work . For example hashlib or even os.getcwd is not working . Whereas on build machine everything works . Is it possible to relocate python installation What might be the problem I build it in opt sw-python extra pythonbrew directory and on install pythonbrew is placed to the same opt sw-python extra pythonbrew directory . Target machine : .. . .. . Build machine : .. . Answer : Finally I installed my debian package on a different Debian machine similar to build machine . And it worked I don t know what exactly caused the problem but I guess it s a difference in kernel or compiler .", "Question : I am new to python and I am planning to learn django . I had a bit of experience with ruby not rails and I am familiar with RVM http : beginrescueend.com however I don t understand the difference between pythonbrew https : github.com utahta pythonbrew and virtualenv http : pypi.python.org pypi virtualenv . I know pythonbrew https : github.com utahta pythonbrew is a mimic of RVM http : beginrescueend.com but I thought virtualenv http : pypi.python.org pypi virtualenv is already doing what RVM does or vice versa that pythonbrew https : github.com utahta pythonbrew is already doing what RVM does . Can someone please explain and perhaps provide some concrete examples usages to help me understand it . Thanks very much Comment : Related : stacktoheap.com blog 2013 03 11 http : stacktoheap.com blog 2013 03 11 why-use-virtualenv-when-there-is-pythonbrew Comment : Attention Googlers : pythonbrew is now deprecated https : github.com utahta pythonbrew deprecated check out pyenv https : github.com yyuu pyenv instead . Comment : Sorry for resurrecting an old thread but I came with the same question and the answers below were not clear obsolete since 2011 . So I added another answer based on my understanding below - please check correct as needed . .. . Answer : Pythonbrew is akin to Ruby s rvm : It s a shell function that allows you to : .. . .. . Build one or more complete self-contained versions of Python each stored locally under your home-directory . You can build multiple versions of Python this way . Switch between the versions of Python easily . The Pythons you build are completely isolated from each other and from whatever version s of Python are installed system-wide . Virtualenv is similar but not quite the same . It creates a Python virtual environment that conceptually sits on top of some existing Python installation usually the system-wide one but not always . By default on Unix platforms and the Mac it creates symbolic links to the various Python library modules so you re literally sharing those modules with the real underlying Python implementation . But virtualenv has its own bin directory and site-packages directory . Anything extra you install in the Python virtual environment is only available within that environment . One advantage to Pythonbrew is that the Python environments it creates are truly and completely self-contained . They cannot be contaminated by anything that gets screwed up in an underlying base Python install because there isn t an underlying base install . This is not true of virtualenv environments . If you create a virtualenv Python and then you somehow screw up the base Python instance it sits above e.g . accidentally deleting part of the base Python s site directory while logged in as root you ll screw up any virtualenv environment based on that Python too . However virtualenv has its own advantages . Probably the biggest advantage is that it is lightweight . Since Pythonbrew compiles Python from scratch to create one of its environments creating a Pythonbrew Python environment takes some time . By comparison creating a virtualenv Python environment is really fast . You can in fact use them together . Here s one situation where you might want to do that . Your base system uses Python 2.6 . You need to install Python 2.7 . For whatever reason you can t or don t want to install Python 2.7 system wide side-by-side with Python 2.6 . In such a case you could use Pythonbrew to install a base Python 2.7 under your home-directory where it doesn t conflict with anything installed elsewhere . Then you can create one or more lightweight virtualenv Python environments that are based on your Pythonbrew-installed 2.7 Python . For instance you could use virtualenv to spin up short-lived test-environments for Python 2.7 that way . I doubt most people actually do that . I don t . But there s no reason you can t . Comment : Agree with everything but curious about your last remark . I use Pythonbrew and virtualenv together all the time . It seems like the only sane way to keep my development and production environments in sync . Comment : As I said I don t generally do that . I suspect most people don t . But there are perfectly good reasons to do that and clearly you ve found one .", "Question : Can anyone shed any light on how to have pythonbrew pythonz install when my shell is ZSH . I am on ubuntu-12.04 . I have followed the standard install of curl and then adding the line to .bashrc but it will return an unknown command in a new zsh terminal . PythonBrew Readme https : github.com utahta pythonbrew readme .. . Answer : zsh does not read .bashrc - try putting the same code in .zshrc Comment : adding that to .zshrc still results in zsh not seeing pythonbrew . sayth@sayth-TravelMate-5740G 9 : 04 : pythonbrew list zsh : correct pythonbrew to .pythonbrew nyae n zsh : command not found : pythonbrew Comment : Also tried altering the initial command to curl -kL xrl.us pythonbrewinstall http : xrl.us pythonbrewinstall zsh but also no go .", "Question : I installed pythonbrew on an ubuntu precise system . Had some issues using proxy during the installation see an earlier post http : stackoverflow.com questions 18969343 pythonbrew-does-not-install-python-with-no-output-on-command-line . Now I m able to install different versions of python and switch between them however setuptools is not installed during python installation : .. . .. . The build.log contains : .. . .. . Looks to me like the issue is with the proxy again and I m not sure what script to modify so that the setuptools installation uses my proxy . I modified distribute setup.py and added proxy information there based on this post http : stackoverflow.com questions 34079 how-to-specify-an-authenticated-proxy-for-a-python-http-connection but it looks like this file is overwritten each time pythonbrew install is called . I am new to python and can t find where this file is generated from . Any pointers as to how I can pass proxy to the setuptools part of the installation will be greatly appreciated . .. . Answer : Setting HTTP PROXY and HTTPS PROXY in the env solved this particular problem after that the error changed from 110 to 113 for a follow up see this other question http : stackoverflow.com questions 18990935 urlopen-error-errno-110-with-https-and-python-2-7-on-ubuntu-12-10 .", "Question : I am currently facing an issue when trying to install Django using pythonbrew . My system is running ubuntu-12.04 LTS and I am following these instructions to get django running : .. . .. . http : www.tangowithdjango.com book chapters requirements.html installing-software .. . .. . I have followed everything exactly as specified by the book but when it comes time to use Django on my pythonbrew version of Python I get this error : .. . .. . Traceback most recent call last : File line 1 in ImportError : No module named django .. . .. . So I decided to do some investigating and I went into the folder that is now specified as my PYTHONPATH for adding additional libraries which is : .. . .. . . .pythonbrew pythons Python-2.7.5 lib python2.7 site-packages I ve left out the above 2 folder levels but my PYTHONPATH is correct confirmed by echo PYTHONPATH .. . .. . In the site-packages folder there is nothing there which explains the Django error . So I switched off pythonbrew and then ran python and then import django and it worked . This likely means that when trying to install stuff to Python it is probably not using the PYTHONPATH for some reason or maybe something else . I have taken a look here : .. . .. . 1 Error after installing Django supposed PATH or PYTHONPATH error http : stackoverflow.com questions 2935723 error-after-installing-django-supposed-path-or-pythonpath-error the solution and question seems very different to mine with slight similarities .. . .. . 2 how to install additional python packages with pythonbrew http : stackoverflow.com questions 9217687 how-to-install-additional-python-packages-with-pythonbrew the guy didn t get a response and did a hack .. . .. . 3 http : suvashthapaliya.com blog 2012 01 sandboxed-python-virtual-environments this guy recommends using virtualenv to create a virtual environment before installing packages .. . .. . I m not sure what to do now and I suspect the error is either with my PYTHONPATH or there s some permission error that is causing all my installed packages to go to the root python installation instead of the pythonbrew package . Any assistance will be greatly appreciated also this isn t a unique problem as I expect many others to face this installation issue with pythonbrew and django . Comment : I don t know if this is an advisable solution but what I did was I went to the local python add-on path : usr local lib python2.7 dist-packages and simply copied all the files folders in there and pasted them into my PYTHONPATH now when I run import django it works . I would assume this isn t a good fix as everything I try to install in future will still go to root but this does get it working . .. . Answer : I m new in Stack Overflow so I couldn t comment on your answer above about what you got when running .. . .. . I had the same issue but I fix it by doing what this post says : .. . .. . Using pip in pythonbrew http : stackoverflow.com questions 15096306 using-pip-in-pythonbrew .. . .. . Hope this helps Comment : Brilliant What I did was remove django from the usr local lib python2.7 dist-packages and re-installed using pip again . It is now appearing in the correct path . Voting this as the solution .", "Question : I am new to python and I am planning to learn django . I had a bit of experience with ruby not rails and I am familiar with RVM http : beginrescueend.com however I don t understand the difference between pythonbrew https : github.com utahta pythonbrew and virtualenv http : pypi.python.org pypi virtualenv . I know pythonbrew https : github.com utahta pythonbrew is a mimic of RVM http : beginrescueend.com but I thought virtualenv http : pypi.python.org pypi virtualenv is already doing what RVM does or vice versa that pythonbrew https : github.com utahta pythonbrew is already doing what RVM does . Can someone please explain and perhaps provide some concrete examples usages to help me understand it . Thanks very much Comment : Related : stacktoheap.com blog 2013 03 11 http : stacktoheap.com blog 2013 03 11 why-use-virtualenv-when-there-is-pythonbrew Comment : Attention Googlers : pythonbrew is now deprecated https : github.com utahta pythonbrew deprecated check out pyenv https : github.com yyuu pyenv instead . Comment : Sorry for resurrecting an old thread but I came with the same question and the answers below were not clear obsolete since 2011 . So I added another answer based on my understanding below - please check correct as needed . .. . Answer : For what its worth I ve never heard of PythonBrew before but I know and love virtualenv . Virtualenv is used to create separate environments based on the python install you have on your machine . That is if I have python-2.7 I can create a number of isolated python-2.7 environments but I can t create python2.6 environments . According to this http : apartm.net hackernews index.php id 2794473 which I found via google Pythonbrew seems to be focussed on installing other python versions . So I guess you would use brew to install py2.6 and 2.7 and then virtualenv to create environments for each . Or it seems brew can create the environments too using virtualenv . Why a different python interpreter is not really an isolated environment . .. . .. . Each python installation has a set of packages placed in site-packages I think . If you install a new package it is added to this set and available for all your python code . This can be a problem if you have one project that you build on Django0.96 and you want to start a new project using Django1.3 . If you just update your system version of Django that would affect you old project too . With virtualenvs you could create one environment with Django1.3 and another with Django0.96 both being python2.7 . If you were OK with running your old project in python2.6 and the new one in python2.7 you could do that too but what about your next two projects using diffenret versions from Django-Trunk then Comment : So if I install different versions of python using pythonbrew wouldn t I have already created isolated python environments I guess what I am missing is the understandings between different versions of python installed on the same machine versus isolated environments . Comment : If pythonbrew allows multiple installations of the same python version then I think they are the same . I ve added some info to the answer . Comment : Thanks . When you mentioned install same version of python multiple times then my mind clicked . I guess ruby rvm cannot do this that s why rails now has Bundler to address this issue . But I might be wrong having limited knowledge ." ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
smtp@smtp@39
smtp -- simple mail transfer protocol @placeholder is an internet standard for electronic mail e-mail transmission across internet protocol ip networks .
{ "confidence": [ 66.29739379882812, 61.82579803466797, 61.74011993408203, 61.01609802246094, 58.23081970214844, 57.06074523925781, 52.65507507324219, 49.99149703979492, 49.674842834472656, 48.92359161376953, 48.85453414916992, 48.200599670410156, 48.0210075378418, 47.65850830078125, 45.63702392578125, 45.3316764831543, 45.26048278808594, 44.85287857055664, 44.85287857055664, 44.76776123046875, 44.76776123046875, 44.76776123046875, 44.477142333984375, 44.461063385009766, 44.37971496582031, 44.03507995605469, 43.49817657470703, 43.40299606323242, 43.058597564697266, 42.40715026855469, 42.40715026855469, 42.40715026855469, 42.40715026855469, 42.3366813659668, 42.31622314453125, 42.296627044677734, 42.2413215637207, 42.21363830566406, 42.134910583496094, 42.037445068359375, 42.037445068359375, 41.921348571777344, 41.69839859008789, 41.623809814453125, 41.623809814453125, 41.61082458496094, 41.445064544677734, 41.35132598876953, 41.288429260253906, 41.241912841796875, 41.13605880737305, 40.95050048828125, 40.91389846801758, 40.91389846801758, 40.827484130859375, 40.827484130859375, 40.72667694091797, 40.68495178222656, 40.68495178222656, 40.68495178222656, 40.68495178222656, 40.68495178222656, 40.68495178222656, 40.68495178222656, 40.60234451293945, 40.477989196777344, 40.38890075683594, 40.30305480957031, 40.30305480957031, 40.13055419921875, 39.95995330810547, 39.82663345336914, 39.82663345336914, 39.781341552734375, 39.705284118652344, 39.62650680541992, 39.55580520629883, 39.5531120300293, 39.50874328613281, 39.441566467285156, 39.441566467285156, 39.441566467285156, 39.19169998168945, 39.097862243652344, 38.951393127441406, 38.92194366455078, 38.746246337890625, 38.65916442871094, 38.65916442871094, 38.65916442871094, 38.65916442871094, 38.550933837890625, 38.53251266479492, 38.45072555541992, 38.445716857910156, 38.445716857910156, 38.445716857910156, 38.445716857910156, 38.445716857910156 ], "content": [ "SMTP is the protocol that is used by nearly all Internet hosts to send mail .", "Mail protocol : SMTP+SSL .. . 4 .", "Your question is incorrect - SMTP stands for Simple Mail Transfer Protocol whereas sendmail is the software piece to send the mail using this protocol .", "SMTP is a mail transfert protocol as the name implies .", "SMTP is for mail relay although it is the defacto protocol for mail clients to send mail due to the Unix heritage of every box running an SMTP mail relay .", "Mail protocol :", "Sender-client sends e-mail to SMTP server host A using SMTP-protocol .. . 2 .", "Settings Protocols SMTP Delivery of e-mail .. . 6 .", "Maybe by connecting to the mail-server and signing in with a mail account credentials this information is available through mail-server api or protocol .", "SMTP server host A does a lookup as to where the e-mail is supposed to go and communicates to SMTP server host B using SMTP-protocol .. . 3 .", "And there s a race-condition between sending the e-mail over SMTP and successfully saving the e-mail to the IMAP Sent folder .", "SMTP is a transmission protocol with the sole focus on transmission only .", "Looking at the hostname it seems that the mail-server is in the internet .", "At the beginning of line and is followed by a new line character then the SMTP protocol will consider it as mail termination and hence only a part of mail would be delivered .", "Gmail s for consumer e-mail in consumer e-mail style sending patterns .", "Here is a sample SMTP mail script :", "The SMTP already send my mail to the destiny the problem it s that in the mail recibered appear the origin mail changed .", "no e-Mail-Title .", "Parsing the e-mail .", "OR .. . .. . b . Connect to mail-server using smtp protocol and host port username pass from php.ini and try to send email .", "I don t know if this is possible through pop3 imap smtp protocol or specific mail-server api .", "SMTP as a protocol is concerned only with a return path the MAIL request a list of recipients the RCPT request and the data to be transferred the DATA request .", "When you send test mail via WP Mail SMTP Plugin did you getting that mail in your inbox", "With SMTP almost every email is using MIME Multipurpose Internet Mail Extensions RFC2045 https : tools.ietf.org html rfc2045 .", "@stark but how does the e-mail go from the SMTP-server to the MDA", "Just i used smtp server for the authenticated mail.In the django mail api How it is supposed to send an mail with the local smtp", "UPDATE : I sent the E-mail to a non-Evernote E-mail address so I could see the raw E-mail message .", "Just with SMTP I can t send mail .", "The ip of mail-server is 192.168.1.1 .", "PHP s mail function does not have support for SMTP .", "But mail function requires SMTP server for sending emails .", "mail uses SMTP server on your system .", "In order to send mail you must use SMTP .", "I ve tried WP-Mail-SMTP and SendGrid both of which when sending a test e-mail come to my inbox perfectly .", "Part of your problem is that you are sending SMTP commands when the mail-server MTA - mail transfer agent is expecting you to be negotiating an SSL session .", ".. . .. . Your ISP may provide SMTP relays which will accept mail from your IP and these servers should be authorized to send mail .", "This is because mail providers of the Internet gmail yahoo etc.. . do block any e-mails that come from an unkown IP adresses on Internet by default this include your new server IP adress of course .", "Since your mail-server is not in their list of mail servers IPs nor are the messages signed with Yahoo s DKIM key a substantial and growing portion of the mail servers on the internet are going to reject it or deliver it to the Spam folder Gmail .", "Google may firewall out at it s MX servers IP addresses networks very unlikely to host legitimate mail SMTP servers .", "They don t call it e- mail for nothing .", "get the e-mail to that server .. . 4 .", "hi i wanted to send mail via smtp protocol to one of my gmail s accounts.. . .. . .. . i tried but finally it occurred and error : .. . .. . so now how can i send mail without having this problem", "Symantec Endpoint Protection blocks email sent by Java mail client .. . .. . Fix ID : 3399185 .. . .. . Symptom : The Internet Email Auto-Protect feature of Symantec Endpoint Protection blocks SMTP email sent by a Java mail client .", "check first your configured smtp mail details .", "if so should I use a mail not smtp", "If it does why haven t I received the test e-mail to my domain e-mail yet", "For example note the angle brackets are retained for the e-mail address : .. . .. . Lastly make the notify script executable as follows : .. . .. . Send E-mail .. . .. . Send an e-mail from the command-line as follows :", "However From : is specifically targeted by DMARC a very strict spam prevention protocol implemented by most major e-mail providers .", "What you ve written is a Mail Transfer Agent MTA .", "If you are using this from your own personal connection to an external mailbox many ISPs will block outgoing mail SMTP ports and the mail will mail will not be sent .", "you can directly send mail from php mail function if you specified the smtp server and smtp port in php.ini first ask the SMTP server credential to your ISP .", "Did not work for me on PHP 5.6.20 : Warning : mail : SMTP server response : 530 5.7.57 SMTP Client was not authenticated to send anonymous mail during MAIL FROM", "Some mail programs most today will connect directly to a mail-server and speak SMTP to it .", "I am using a mail plugin to reconfigure the mail functionaity to use an external SMTP service .", "I am using python 3.4.3 to send e-mail and at this time I will be needing the e-mail to be sent under an alias .", "If the recipient of the e-mail has a client which honors this header then a return receipt will be sent to you when the e-mail is opened .", "Outlook 2010 Outlook Web App Internet Explorer 11 Firefox Chrome Outlook using Apple s native app Email going through Gmail - Browser mail client Internet Explorer 11 Firefox Chrome Android default mail client osx IPhone default mail client Gmail mail client on Android Gmail mail client on IPhone Email going through Yahoo - Browser mail client Internet Explorer 11 Firefox Chrome Android default mail client osx IPhone default mail client .", "I m using Gmail SMTP and Zend Mail Messsage .", "Then I installed EASY WP MAIL SMTP .", "I configured smtp settings for yandex mail .", "The SMTP verb which caused the error is MAIL .", "@AgataCieplik a plugin like WP-SMTP-MAIL", "I did with same database-mail smtp configuration .", "Actually I m using Mail Enable SMTP Server .", "Try to send an e-mail through that SMTP server manually from an interactive mailer e.g .", "Postfix has to handle that mail not as an outgoing mail but as a new mail delivered to that adress .", "I am working on oracle 11g UTL SMTP mail processing .", "The authors argue that SMTP was not meant to be used by a mail client MUA Message User Agent but only by mail servers routing a mail to its destination .", "The recipient s mail-server inserts the Return-Path header into the message by copying the value supplied by the sender s mail-server in the SMTP MAIL FROM command .", "I have smtp mail and i am sending verification mail of account at webproject .", "You need turn on the POP mail and IMAP mail feature in setting of the email you are using to send mail .", "POP3 and IMAP provide mail clients access to mail .", "Use Mail : : factory in the Mail PEAR package .", "Not really no : the mail needs to go through SMTP anyway so you re just changing how it gets there on some hosts mail uses SMTP internally anyway .", "More info is needed : if possible a transcript of the SMTP session up until the DATA line what e-mail client is sending the e-mail what is mentioned in the MDaemon logs etc .", "I m using the following method to send mail from Python using SMTP .", "br .. . .. . .. . require phpmailer class.phpmailer.php include phpmailer class .. . .. . Instantiate Class .. . mail new PHPMailer .. . .. . Set up SMTP .. . mail- IsSMTP Sets up a SMTP connection .. . mail- SMTPAuth true Connection with the SMTP does require authorization .. . mail- SMTPSecure ssl Connect using a TLS connection .. . mail- Host smtp.gmail.com Gmail SMTP server address .. . mail- Port 465 Gmail SMTP port .. . mail- Encoding 7bit .. . .. . Authentication .. . mail- Username [email protected] Your full Gmail address .. . mail- Password xxxxxxxxxx Your Gmail password .. . .. . Compose .. . .. . mail- Subject New Admission Enquiry Form Subject which isn t required .. . mail- MsgHTML message .. . .. . Send To .. . .. . mail- AddAddress [email protected] Recipient Name Where to send it - Recipient .. . .. . .. . .. . .. . .. . .. . result mail- Send\t\tSend", "When talking about a web form-for submitting an e-mail the Sender is the person who submitted the web form and the From is the server that sent out the e-mail", "Using simple-java-mail https : github.com bbottema simple-java-mail GitHub it should be straightforward .", "mail- IsMail That way you don t need to use smtp and gmail .", "Try to send mail from window server using SMTP .", "To send mail using Gmail SMTP need to change your account setting .", "I mean sending mail using PHP through authenticated SMTP for example by using the PEAR Mail-package .", ".. . mail function .. . For Win32 only .", "To set the sender of an e-mail I use the Client.Mail http : golang.org pkg net smtp Client.Mail funtion : .. . .. . When the recipient gets the e-mail he sees the sender as plaintext e-mail address : [email protected] .. . .. . I want the sender to be displayed like : Sandy Sender [email protected] .", "You can try creating a test Gmail account for your company and try sending out and e-mail from your server using that Gmail account with SMTP and see if the e-mail gets delivered .", "I m using the same e-mail service BlueBottle to send e-mails .", "whenever I try to send e-mail using Gmail s SMTP server in my C code .", "Disable the External to external e-mail addresses checkbox in the Require SMTP authentication group .", "If you want to send E-Mail to an arbitrary SMTP server on the net consider using a library like SwiftMailer http : swiftmailer.org .", "If I want to send an invitation e-mail to a user my SMTP-server doesn t accept the given recipient address .", "When you send too many e-mails or more often - a certain number of e-mails where a recipient does not exist a destination mail-server does not black list you but instead they temporarily block access from your mail-server essentially the IP address of your mail-server .", "Is this error 452 from our mail-server or sprint s mail-server", "The rely server simply don t have the username and password necessary to transfer that mail .", "We simply block SMTP at the firewall except for know good mail servers .", "Since Java Mail 1.4.4 CRAM-MD5 is supported for use with smtp .", "In my aplication I am sending mail using smtp server .", "I need an alternative that allows me to specify the SMTP MAIL FROM .", "I am using java mail to send emails over smtp ." ] }
{ "confidence": [ 71.81367492675781, 70.33248901367188, 69.62559509277344, 67.77671813964844, 63.33002853393555, 60.053836822509766, 59.53013610839844, 59.31555938720703, 58.874141693115234, 57.95089340209961, 57.83770751953125, 57.32906723022461, 57.18355941772461, 57.136783599853516, 56.85429382324219, 56.1949348449707, 55.99979019165039, 55.65447235107422, 55.63298797607422, 55.518280029296875 ], "content": [ "Question : A rails application in production should use smtp or sendmail to send mails Comment : smtp is a protocol not a program . .. . Answer : Your question is incorrect - SMTP stands for Simple Mail Transfer Protocol whereas sendmail is the software piece to send the mail using this protocol . Use sendmail .", "Question : These ports 465 and 587 are both used for sending mail submitting mail but what is the real difference between them Comment : en.wikipedia.org wiki Simple Mail Transfer Protocol http : en.wikipedia.org wiki Simple Mail Transfer Protocol Comment : The only difference is formalized standards and 465 port is for legacy support Comment : iana s Service Name and Transport Protocol Port Number Registry http : www.iana.org assignments service-names-port-numbers service-names-port-numbers.xhtml is the formal guide to the recommended use of ports the use of 465 for SMTP over SSL is unofficial . Read about Ports in SMTP http : en.wikipedia.org wiki Simple Mail Transfer Protocol . iana s official usage is not always the same for both the TCP and UDP transport protocols . N.B . : if you are the SMTP server administrator YOU control which port s are used if you are the client you get only ports made available to you . Comment : related : stackoverflow.com questions 3484947 http : stackoverflow.com questions 3484947 why-should-i-convince-developers-to-use-port-587-for-all-smtp-communication .. . Answer : These port assignments are specified by the Internet Assigned Numbers Authority IANA : .. . .. . Port 587 : SMTP Message submission SMTP-MSA a service that accepts submission of email from email clients MUAs . Described in RFC 6409 . Port 465 : URL Rendesvous Directory for SSM sic entirely unrelated to email .. . .. . Historically port 465 was initially planned for the SMTPS encryption and authentication wrapper over SMTP but it was quickly deprecated within months and over 15 years ago in favor of STARTTLS over SMTP RFC 3207 . Despite that fact there are probably many servers that support the deprecated protocol wrapper primarily to support older clients that implemented SMTPS . Unless you need to support such older clients SMTPS and its use on port 465 should remain nothing more than an historical footnote . The hopelessly confusing and imprecise term SSL has often been used to indicate the SMTPS wrapper and TLS to indicate the STARTTLS protocol extension . For completeness : .. . .. . Port 25 : Simple Mail Transfer SMTP-MTA a service that accepts submission of email from other servers MTAs or MSAs . Described in RFC 5321 . Sources : .. . .. . IANA Service Name and Transport Protocol Port Number Registry http : www.iana.org assignments service-names-port-numbers service-names-port-numbers.txt .. . Revoking the smtps TCP port http : www.imc.org ietf-apps-tls mail-archive msg00204.html - Email from Internet Mail Consortium director Paul Hoffman 12 Nov 1998 . RFC 6409 - Message Submission for Mail http : www.rfc-editor.org rfc rfc6409.txt .. . RFC 5321 - Simple Mail Transfer Protocol http : www.rfc-editor.org rfc rfc5321.txt .. . RFC 3207 - SMTP Service Extension for Secure SMTP over Transport Layer Security http : www.rfc-editor.org rfc rfc3207.txt .. . RFC 4607 - Source-Specific Multicast for IP http : www.rfc-editor.org rfc rfc4607.txt Comment : nice technical explanation was looking for SSL vs TLS . Comment : SMTPS and its use on port 465 should remain nothing more than an historical footnote . Except that Gmail and most other email providers use Port 465 for SSL aka SMTPS . It is a reality that s not going anywhere no matter what IANA specifies . Comment : @EricJ . ...But gmail also supports port 587 . Do you know which port Google uses internally Otherwise the fact that they support 465 doesn t really count as evidence it s preferred or even particularly commonly used .", "Question : I m working on programming an IMAP-server but running into one question : where do the emails come from .. . .. . I always thought the basic course of events was this : .. . .. . 1 . Sender-client sends e-mail to SMTP server host A using SMTP-protocol .. . 2 . SMTP server host A does a lookup as to where the e-mail is supposed to go and communicates to SMTP server host B using SMTP-protocol .. . 3 . SMTP-server host B then accepts the e-mail and communicates with the IMAP-server host B to magically get the e-mail to that server .. . 4 . The receiver-client asks the IMAP server host B for new e-mails using the IMAP protocol . And that made me wonder : how do the e-mails get from the accepting SMTP-server to the serving IMAP-server Do they have a protocol for that Do they just drop it inside a directory My own attempt to find an answer.. . I have seen usages of the var mail directory - with one file per user - which does not seem like it is intended for a large userbase . Wouldn t it also cause issues when two processes read-write from this at the same time I have also seen the Postfix main.cf file possibly contain mailbox transport lmtp : unix : var imap socket lmtp which looks like the LMTP protocol being used to communicate to the IMAP server using a unix-socket . Which would indicate the IMAP-server also speaking LMTP Are there any other methods being used Or other protocols Comment : That s done by the MDA message delivery agent according to RFC 5598 . Comment : Typically it s stored in a database or the filesystem . For Unix systems this is typically home user mail or older var mail . For something like Exchange it ll be a proprietary database . Comment : @stark but how does the e-mail go from the SMTP-server to the MDA And how does it go from the MDA to the IMAP server Comment : On unix the MTA execs an MTA and gives it the message on stdin see the procmail man page for details . On other OSes they do exist and sometimes on unix the MDA is part of the same software package as the SMTP server . .. . Answer : The most common methods of transfer from MTA SMTP server and IMAP server : .. . .. . 1 . SMTP and IMAP are server by the same server or servers from the same vendor - any proprietary secret undocumented protocol method may be used .. . AFAIK it is not common linux unix solution .. . .. . 2 . LMTP protocol slight modification of SMTP - modern recomendation .. . .. . 3 . MTA executes custom program provided by IMAP server and typically feeds message into standard input of the program .. . .. . 4 . MTA puts message into per user Maildir https : en.wikipedia.org wiki Maildir e.g . .maildir IMAP uses the same shared maildir .. . .. . 5 . MTA puts incoming messages into standard unix per user mailbox file var mail username and IMAP server uses the file as INBOX folder .. . .. . The tricky part is making MTA reject non existing virtual IMAP users email account without per email account OS account in reply to RCPT TO : in SMTP session . MTA must know valid virtual mailboxes .", "Question : A rails application in production should use smtp or sendmail to send mails Comment : smtp is a protocol not a program . .. . Answer : SMTP is the protocol that is used by nearly all Internet hosts to send mail . This protocol is spoken by sendmail . Sendmail determines where to send your message and how . Some mail programs most today will connect directly to a mail-server and speak SMTP to it . However the traditional method - and arguable the better method - is to let sendmail do it . There are two reasons for this : 1 nearly every program in UNIX that does what sendmail does is designed to be a drop-in replacement this includes Postfix http : www.postfix.org and Exim http : www.exim.org for instance and 2 sendmail or its replacement was designed to handle mail and nothing else - by using sendmail you don t have to design a SMTP client . The Mutt email-client for UNIX is one email-client that still refuses to talk SMTP directly to a mail-server a good technical description is on the wiki http : wiki.mutt.org MuttGuide Send . If you have a choice on UNIX anyway of talking SMTP directly or using sendmail use sendmail - especially on servers . Comment : there s no sendmail in windows though...hmm.. .", "Question : i was wondering . Suppose i have an exchange-server the domain can be [email protected] also i have a relay server that accepts requests to internet domains gmail yahoo etc . suppose i send a mail to : [email protected] [email protected] - from a user in the domain [email protected] .. . .. . The mail is sent to the exchange-server then the exchange groups the domains company.com and gmail.com it puts the mail into [email protected] mailbox . then the exchange sees that it needs to send into [email protected] so it will send it to the relay server . the relay server will get the SMTP request : .. . .. . from : [email protected] .. . .. . to : [email protected] [email protected] .. . .. . .. . .. . the question is - how does the smtp relay server knows not to send it to [email protected] - thus causing duplicate mails received also how does the gmail server knows not to try to send the mails it receives again because they only get smtp requests similar to a client that sends the mail .. . .. . thanks in advanced .. . Answer : The content of the mail is not parsed by either exchange or the relay for determining where the mail should go . Everyone in this context is talking SMTP with one another and specify recipients with the RCPT protocol message . So your mail client tells exchange two RCPT exchange decides one of them is remote then says one RCPT to the relay and so on and so forth . This document ftp : ftp.rfc-editor.org in-notes rfc5321.txt specifies the SMTP protocol where you may read about the RCPT verb . Comment : does it mean that the relay get [email protected] but the to field will contain both mails Comment : yes the mail relay or transport agent must not mess with the To message header . it is only allowed to add certain headers of it s own for accounting purposes as indicated by other commentaries in this question .", "Question : hi i wanted to send mail via smtp protocol to one of my gmail s accounts.. . .. . .. . i tried but finally it occurred and error : .. . .. . so now how can i send mail without having this problem .. . Answer : You can find the answer at the link http : support.google.com mail bin answer.py answer 10336 in the last line of the Google mail served response : .. . .. . The IP you re using to send email is not authorized.. . .. . .. . In order to prevent spam Gmail refuses mail from IP addresses that are not authorized to send mail . The determination of whether or not an IP address is authorized to send mail is made by the ISP that provides you with the IP address . This list typically contains consumer IP ranges offered for dialup DSL or other broadband access . .. . What can I do to fix this .. . .. . Your ISP may provide SMTP relays which will accept mail from your IP and these servers should be authorized to send mail . Some ISPs may provide a way to get an IP that is authorized either by upgrading to business class service or static IP service . You should reach out to your ISP to see what options are available . .. . Another alternative is to send mail through your own domain s servers either by configuring them to allow relay from your IP address or by using MSA mail submission agent . Learn how to use Gmail to send mail from a different address . .. . Please note that we are unable to whitelist IP addresses or otherwise make exceptions . In other words mail cannot be sent directly from users to the recipient mail servers . Mail conventions require that you have to send your mail to your provider mail-server .", "Question : Youtrack allow to send email through 3rd party SMTP server . Fields are as follows : .. . .. . 1 . SMTP host : 2 . SMTP port : 3 . Mail protocol : 4 . SMTP login : 5 . SMTP password : 6 . Select SSL key : 7 . Server from email : Could you provide an example of Gmail or Google apps config .. . Answer : Here is what I finally did : .. . .. . 1 . SMTP host : smtp.gmail.com .. . 2 . SMTP port : 465 .. . 3 . Mail protocol : SMTP+SSL .. . 4 . SMTP login : [email protected] or [email protected] .. . 5 . SMTP password : .. . 6 . Select SSL key : No key .. . 7 . Server from email : [email protected] . Gmail will ignore the from parameter so I put the same . References .. . .. . Enable IMAP in your Gmail settings Gmail doc https : support.google.com mail troubleshooter 1668960 rd 1 ts 1665018 1665144 .. . How to use Gmail as your SMTP server http : lifehacker.com 111166 how-to-use-gmail-as-your-smtp-server . Comment : this doesn t work if that email has never logged to GMail from that IP .", "Question : I have found conflicting information about dot stuffing when transmitting an email . 1 . stuff a dot if the line contains a single dot to avoid premature termination .. . 2 . stuff a dot to every line stat starts with a dot .. . 3 . stuff a dot to 1 and to every line part of a quoted-printable message part only .. . .. . Can anyone clarify .. . Answer : In SMTP protocol the mail is terminated by a single dot and a newline character s .. . .. . In simple terms something like : .. . .. . r n . r n .. . .. . The characters : .. . .. . CR LF DOT CR LF .. . .. . Which corresponds to a single dot at the beginning of a line . In case the mail data contains a single . At the beginning of line and is followed by a new line character then the SMTP protocol will consider it as mail termination and hence only a part of mail would be delivered . So the whole idea is to avoid these type of situation by padding an extra dot . Comment : This does not answer my question .", "Question : I keep getting this error when I try to send an e-mail in PHP : .. . .. . my php.ini looks like this : .. . .. . I m using my laptop as a server. . What am I doing wrong Thanks . Comment : Do you have a SMTP server setup Comment : No..That s probably why : Comment : Some questions 1 . have you restarted your server 2 . do you have a mail-server running on the laptop 3 . us the SMTP Listening cmd netstat -aon Comment : No I didn t have a mail-server running I m on Windows 7 have to find a mail-server and try. . Thanks . .. . Answer : PHP mail function can send email in 2 scenarios : .. . .. . a . Try to send email via unix sendmail program At linux it will exec program sendmail put all params to sendmail and that all . OR .. . .. . b . Connect to mail-server using smtp protocol and host port username pass from php.ini and try to send email . If php unable to connect to email server it will give warning and you see such workning in your logs To solve it install smtp server on your local machine or use any available server . How to setup configure smtp you can find on php.net", "Question : I m venturing in unknown territory here.. . I am trying to work out how hard it could be to implement an Email client using Python : .. . .. . Email retrieval .. . Email sending .. . Email formatting .. . Email rendering .. . .. . Also I m wondering if all protocols are easy hard to support e.g . SMTP IMAP POP3 .. . .. . .. . .. . .. . Hopefully someone could point me in the right direction : Comment : I removed the C++ tag-it doesn t seem C++ related at all Comment : Python : Batteries included : smtp imap pop3 - Internet Protocols http : docs.python.org library internet.html Internet Data Handling http : docs.python.org library netdata.html Comment : Do you want to build something with a UI or not If so and it s the UI that is the thing you want to play with just build a frontend to an existing email-client . Decide what you want to learn the details of : headers protocols and bytes or buttons and notifications .. . Answer : The Python language does offer raw support for the needed protocols in its standard-library . Properly using then and properly parsing and assembling a modern day e-mail message however can be tough to do . Also you didn t say if you want to create a graphical interface for your e-mail client -- if you want to have a proper graphical interface -- up to the point of being usable it is quite a lot of work . Local e-mail storage would be the easier part - unless you want to properly implement an mbox file-format RFC-4155 http : tools.ietf.org html rfc4155 so that other software can easily read-write the messgaes you have fetched you can store them in as Python Objects using an ORM or an Object Oriented database such as ZODB or MongoDB . If you want more than a toy e-mail app you will have a lot of work - properly encoding e-mail headers for example server authentication and secure authentication and transport layers decoding of the e-mail text body itself for non ASCII messages . Although the modules on the Python standard-library do implement a lot of that their documentation falls short on examples - and a complete e-mail client would have to use all of then . Certainly the place to start an e-mail client even a toy one would be taking a look on the most recent RFC s for e-mail and you will have to pick then from here http : www.ietf.org rfc rfc-index since just looking for email rfc on google gives a poor result . Comment : amazing reply thanks :", "Question : When setting-up my mobile email-client I usually need to enter the SMTP relay server domain-name but why my email-client need a SMTP relay server at all I think it can directly talk to the smtpd server e.g . postfix from which domain the destination Email address is by looking up the DNS MX records . And send directly to it why not .. . .. . Actually I have another confusion if a smtpd server use SMTP AUTH then how can a rely server elsewhere rely a mail to it The rely server simply don t have the username and password necessary to transfer that mail . .. . Answer : Email clients use SMTP relay server to .. . .. . simplify email sending e.g . to avoid repeating delivery attempts by email-client .. . avoid being mistaken for spammers . Direct email sending might be a reasonably simple option in ancient pre spam https : en.wikipedia.org wiki Email spam past . SMTP AUTH is used mainly with email-client to email server communication . SMTP server to SMTP server communication could not require SMTP AUTH without prohibiting email from strangers . SMTP AUTH allows to accept messages from trusted clients customers even from IP addresses that otherwise would be blocked by DNSBL https : en.wikipedia.org wiki Dnsbl e.g . DUL https : en.wikipedia.org wiki Dialup Users List ranges . Comment : Thanks for your answer I agree that avoiding spammers and allowing machanizm like SPF is the big reason . Another question is when I telnet a gmail MTA according to MX record I choose aspmx3.googlemail.com whose IPv4 is 74.125.24.26 on my Linode VPS I am successful while when I telnet using the laptop in my home the telnet times out . But I can ping that address so is there some firewall detecting my destination port and filtering messages with port 25 Comment : Most likely yes as spam prevention . Google may firewall out at it s MX servers IP addresses networks very unlikely to host legitimate mail SMTP servers .", "Question : hi i wanted to send mail via smtp protocol to one of my gmail s accounts.. . .. . .. . i tried but finally it occurred and error : .. . .. . so now how can i send mail without having this problem .. . Answer : This is because Google by default will refuse any emails sent by IP in the spamhaus database . For more information you can read here : http : productforums.google.com forum topic gmail Hus4RxoVTr0 .. . .. . What you need to do is go to http : www.spamhaus.org lookup and follow the instruction there to remove your server ip from spamhaus database .", "Question : These ports 465 and 587 are both used for sending mail submitting mail but what is the real difference between them Comment : en.wikipedia.org wiki Simple Mail Transfer Protocol http : en.wikipedia.org wiki Simple Mail Transfer Protocol Comment : The only difference is formalized standards and 465 port is for legacy support Comment : iana s Service Name and Transport Protocol Port Number Registry http : www.iana.org assignments service-names-port-numbers service-names-port-numbers.xhtml is the formal guide to the recommended use of ports the use of 465 for SMTP over SSL is unofficial . Read about Ports in SMTP http : en.wikipedia.org wiki Simple Mail Transfer Protocol . iana s official usage is not always the same for both the TCP and UDP transport protocols . N.B . : if you are the SMTP server administrator YOU control which port s are used if you are the client you get only ports made available to you . Comment : related : stackoverflow.com questions 3484947 http : stackoverflow.com questions 3484947 why-should-i-convince-developers-to-use-port-587-for-all-smtp-communication .. . Answer : SMTP protocol : smtps port 465 v . msa port 587 .. . .. . Ports 465 and 587 are intended for email-client to email server communication sending email . Port 465 is for smtps https : en.wikipedia.org wiki Smtps .. . SSL encryption is started automatically before any SMTP level communication . Port 587 is for msa https : en.wikipedia.org wiki Mail submission agent .. . It is almost like standard SMTP port . MSA should accept email after authentication https : en.wikipedia.org wiki Mail submission agent Mandatory authentication e.g . after SMTP AUTH . It helps to stop outgoing spam when netmasters of DUL https : en.wikipedia.org wiki Dialup Users List ranges can block outgoing connections to SMTP port port 25 . SSL encryption may be started by STARTTLS https : en.wikipedia.org wiki Starttls command at SMTP level if server supports it and your ISP does not filter server s EHLO reply reported 2014 Nov http : it.slashdot.org story 14 11 11 2349244 isps-removing-their-customers-email-encryption . .. . .. . Port 25 is used by MTA to MTA communication mail-server to mail-server . It may be used for client to server communication but it is not currently the most recommended . Standard SMTP https : en.wikipedia.org wiki Smtp port accepts email from other mail servers to its internal mailboxes without authentication . Comment : Standard SMTP port accepts email from other mail-server without authentication - is not actually technically correct . Standard 25 port can transfer mail both using authentication and not depending on the configuration of MTA . Comment : @Ilia standard SMTP port of normal MTA can not reject all unauthenticated SMTP connections . Comment : How about Postfix It doesn t let relaying mail by default but only for connections from same network Comment : @Ilia There is also incoming mail to local email domains .", "Question : I have a doubt regarding mail servers and mail accounts . I am wondering whether it is possible to ask a mail-server for the number of messages a mail account has sent or has received in its inbox . I don t know if this is possible through pop3 imap smtp protocol or specific mail-server api . Maybe by connecting to the mail-server and signing in with a mail account credentials this information is available through mail-server api or protocol . Any idea .. . Answer : I dont think you re able to see how many messages has been sent received during the lifetime of the account . What I do know is that you can connect to your inbox and get the amount of messages inside the inbox .", "Question : This question http : stackoverflow.com questions 5022605 why-php-mail-require-mail-program-like-sendmail-postfix-etc-for-sending-email got me thinking and I now realize that I don t know anything about the internals of MTAs . What exactly does an MTA do Everything after the SMTP protocol seems like dark magic to me . Let s say that I wanted to code a minimalistic MTA or MDA http : en.wikipedia.org wiki Mail delivery agent just for sending emails what would I need to learn do Edit : I don t actually plan on writing an MTA I just want to understand how it works internally . .. . Answer : Here ya go : http : en.wikipedia.org wiki Message transfer agent .. . .. . Quickly the MTA receives the raw message decides where it s ultimate destination is and then forwards the message on to that destination . A very simple MTA can be written the delivers only to local inboxes . The MTA is an easier part of the system to write because you can behave badly but still be functional so your interoperability with other systems is less of an issue that s where much of the complexities of email lie nowadays that and spam virus checking . The real contract of an MTA is simply that if you accept the message from the system sending it to you you accept responsibility to deliver that message . Thus when that socket closes with an acknowledgement of acceptance the delivering systems job is done and it s all in your hands . If you happen to do a crummy job mail is lost and it s your problem . But it s still fun to play around with . Comment : What I m trying to figure out is how it forwards the message to the destination.. . Surely there must be some kind of protocol involved no Comment : All depends on the destination no The MTA is what listens to the SMTP port on the server so it accepts the request from the client an email program or another mail-server . If the final destination for the message is simply a local inbox then the protocol can be as simple as appending the message to an mbox . If the final destination is somewhere else i.e . another mail-server then it s likely going to be using SMTP to xfer the message . Comment : I tried connecting to Google MX and SMTP servers directly on port 25 and 587 then I sent some data according to the SMTP protocol without authentication which should be the way my local MTA does and the message was not delivered . Using the MTA it does but why Comment : Works for me sorrry - connecting to gmail-smtp-in.l.google.com port 25 . I can HELO test and MAIL FROM : [email protected] and get a positive response . Comment : Ah right - yes I think the SSL SMTP on 587 is for sending email out not in . So that would need authentication yes . For SSL in I think you make a plain connection on port 25 then request an upgrade to TLS on the same connection with STARTTLS", "Question : I want to send a html-email with smtp account My Smtp Information is like that : .. . .. . SMTP Hostname .. . Default SMTP Login .. . password .. . port 587 .. . .. . And How can I modified this code to use It .. . Answer : There is a standard SmtpClient in C . Comment : How can I add host and port help Comment : host and port are given from your e-mail server . I know that G-Mail and Outlook live hotmail outlook msn have information about this in mail settings . Try looking through settings as-if you were trying to setup IMAP e-mail configuration .", "Question : is there a library class code-snippet etc . that allows me to directly receive mail in php So that I don t have to run an additional sever in an other process and then have to somehow send the mails to the already-running php-process . I ve been looking around for a while but results for php and mail or mta smtp on google focus mostly on sending mail or retrieving it using pop3 or imap.. . .. . .. . EDIT .. . .. . What I m trying to do is forward the messages to an IRC-channel so obviously when the IRC-bot in PHP isn t running loosing the mails is not a big deal . However having a low-latency between receiving the mail and posting it on IRC is . .. . Answer : Try this : http : www.php.net manual en refs.remote.mail.php .. . .. . 10 seconds of googling . SMTP is for mail relay although it is the defacto protocol for mail clients to send mail due to the Unix heritage of every box running an SMTP mail relay . POP3 and IMAP provide mail clients access to mail . Comment : This is something for interacting with an existing MTA.. . it s not a replacement for one . Comment : That s what SMTP specifies : how to interact with other STMP servers . Comment : There is nothing in there for receiving mails .", "Question : I have below code using codeigniter .. . .. . In above code it sent an email . But it removes the return path that I have set and it just replace it with the from address . I have read some articles that says SMTP sets return path when it delivers . How can I set Return Path when I use SMTP authentication SMTP not allowed to set custom return path for bounced emails . It automatically sets return path with from address when delivered . .. . Answer : Read Manual CL Email Class http : www.codeigniter.com user guide libraries email.html setting-email-preferences-in-a-config-file .. . .. . Parameters : .. . from string From e-mail address name string From display name return path string Optional email-address to redirect undelivered e-mail to Returns : .. . CI Email instance method-chaining Comment : The code I have given is working properly . If I do not use the Protocol SMTP then the return path worked that I have set . But when I use the Protocol SMTP then it sets the return path to from address not to my given return path address .", "Question : I d like to send mail without bothering with the SMTP-Server which is used for delivery . So JavaMail API http : java.sun.com products javamail doesn t work for me because I have to specify a SMTP server to connect to . I d like the library to find out on its own which SMTP server is responsible for which email-address by querying the MX record of the mail address domain . I m looking for something like Aspirin https : aspirin.dev.java.net . Unfortunately I can t use Aspirin itself because the development stopped 2004 and the library fails to communicate with modern spam hardened servers correctly . An embeddable version of James http : james.apache.org would do the task . But I haven t found documentation concerning whether this is possible . Or does anyone know about other libraries I could use Comment : I m curious why would you not want to use your own mail-server to handle the messages and offload the work from you Comment : The application is installed for different customers in different environments . They re gonna send report mails to their own email-address . I don t want them to use our email server to deliver their emails . Comment : Note that work on Aspirin seems to have restarted . It was moved to GitHub in 2009 github.com masukomi aspirin http : github.com masukomi aspirin and a release made in September . .. . Answer : This is completely the wrong way to handle this . Anyone connected to the internet will have some kind of legit SMTP server available to them to take the submission of email -- your ISP your office etc . You WANT to leverage because they do several things for you . 1 they take your message and the responsibility to handle that message . After you drop it off it s not your problem anymore . 2 Any mail de-spamming technologies are handled by the server . Even better when if those technologies change Domain keys anyone the server handles it not your code . 3 You as a client of that sending mail system already have whatever credentials you need to talk to that server . Main SMTP servers are locked down via authentication IP range etc . 4 You re not reinventing the wheel . Leverage the infrastructure you have . Are you writing an application or a mail-server Setting up mail-server is an every day task that is typically simple to do . All of those casual dumb users on the internet have managed to get email set up .", "Question : Is there any options to search the mail inbox by date using libcurl in c++ Or if this is not possible is there an option to fetch the mail date or at the least the complete mail header . Any protocol among IMAP POP3 SMTP is fine . Presently my program can fetch a particular mail by its id : .. . Answer : I found that using the string imaps : imap.gmail.com INBOX UID 1 SECTION HEADER 2EFIELDS 20 28DATE 29 the date of a mail with a particular uid in the mailbox can be retrieved using IMAP . The code snippet is :" ] }
[ "yes-answer-long", "yes-answer-short" ]
smtp
UNK_RELATION
dollar.swift@functional-programming@70
dollar.swift -- dollar.swift is a swift library that provides useful @placeholder helper methods without extending any built-in objects .
{ "confidence": [ 43.630733489990234, 38.415531158447266, 21.517271041870117, 21.517271041870117, 20.25750160217285, 20.25750160217285, 18.09734535217285, 16.340394973754883, 15.09183120727539, 15.02734375, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637, 11.101489067077637 ], "content": [ "Here s a function from the Dollar https : github.com ankurp Dollar.swift framework for Swift : .. . .. . In the line with the typealias I get the Cannot create a variadic tuple error .", "I ve been using a method from https : github.com ankurp Dollar.swift .. . .. . Which works great but my app will only be usable on iOS8", "This might be what you are looking for : How to implement Haskell s splitEvery in Swift", "Swift code can run on iOS 7 and iOS 8 .", "http : stackoverflow.com questions 26691123 how-to-implement-haskells-splitevery-in-swift 26691258 26691258 .", "And why can t you use the Swift code from the github project that you linked to", "The code works but linked binaries don t work i might try and use it without linking it if not i ll give that method a crack .", "This probably has a simple answer but i just cant seem to find it Basically i want to be able to split an array up into blocks of six arrays i can t seem to find any easy way to do it .", "from an array called array based on the submission id using the swift library Dollar https : github.com ankurp Dollar s find method so that I can later make a POST request Eventually I hope to be able to replace the hardcoded values in my parameter with the pulled array variables with them but my results from find all return nil .", "When you call .find on self.array the array contains JSON objects not sure what the object exactly is but I assume it s Dictionary .", "When I remove the braces around T.. . then I receive the Consecutive statements on a line must be separated by error .", "So this is not a solution .", "Does anyone know a workaround to get the error away", "This happens since XCode 6 Beta 6 which was really released today .", "This is fixed in the Dollar project now .", "But for someone who encounters this issue in another project the way to solve it is by doing a unsafeBitCast on the function itself as such which will resolve the compile issue .", "paste code here", "what you have done", "Updated .", "@AshishKakkad", "Thanks :", "I am trying to pull out variables safety rating id score etc .", "These are the inner arrays I want where the submission id is 27 from this array https : codeshare.io zr1pw lines 22- 36 : .. . .. . Code : .. . .. . UPDATE .. . .. . I m able to obtain the array with submission id 27 BUT I want to remove name and task id from the two submission id : 27 arrays AND add an schedule job id that I got from elsewhere .", "I ve tried using a for in loop to create my own array from the variables that I want but I keep getting a nil crash .", "This is what the new array looks like https : codeshare.io 3VJSo .. . .. .", "for in loop error http : i.stack.imgur.com 6TQNt.png .. . .. . Eventually I want to do a ratings : chosenArray", "Why are you calling .validate twice", "oh I didnt notice that thanks for pointing out", "you have another similar question that I have answered : stackoverflow.com questions 37540689 http : stackoverflow.com questions 37540689 how-to-identify-specific-values-in-json-response", "So what gets passed inside of the callback is each element in the array so you will get passed the dictionary object .", "So if you want to find a specific item in the array you should do .. . .. . If you want all elements in array that have submission id as 27 then use filter .. . .. . To remove properties from a dictionary object you need to call removeValueForKey method on each item on the array .", "Your dic in your for-loop must be type of NSMutableDictionary .", "Because you can t manipulate NSDictionary .", "Second thing there is no method like removeValueForKey .", "You should use removeObjectForKey or removeObjectsForKeys .", "In removeObjectsForKeys you have to pass array of parameters keys as parameter .", "In removeObjectForKey you can pass one string key as parameter .", "I think you are using wrong .", "So I think you should do something like : .. . .. . Then I would avoid that force unwrap on the dictionary .", "It was just for you to understand my point in one line of code .", "Edit : .. . .. . Then you can iterate over the array and extract your fields like this :", "Hi do you know how I can remove the name and task id from each of the arrays generated see updated post", "See my edit on the original post if it solved your problem please consider accepting that answer" ] }
{ "confidence": [ 54.384883880615234, 52.80564498901367, 19.051380157470703, 16.543968200683594, 16.543968200683594 ], "content": [ "Question : Here s a function from the Dollar https : github.com ankurp Dollar.swift framework for Swift : .. . .. . In the line with the typealias I get the Cannot create a variadic tuple error . When I remove the braces around T.. . then I receive the Consecutive statements on a line must be separated by error . So this is not a solution . Does anyone know a workaround to get the error away This happens since XCode 6 Beta 6 which was really released today . .. . Answer : This is fixed in the Dollar project now . But for someone who encounters this issue in another project the way to solve it is by doing a unsafeBitCast on the function itself as such which will resolve the compile issue .", "Question : null .. . Answer : This probably has a simple answer but i just cant seem to find it Basically i want to be able to split an array up into blocks of six arrays i can t seem to find any easy way to do it . I ve been using a method from https : github.com ankurp Dollar.swift .. . .. . Which works great but my app will only be usable on iOS8 Comment : paste code here what you have done Comment : Updated . @AshishKakkad Comment : This might be what you are looking for : How to implement Haskell s splitEvery in Swift http : stackoverflow.com questions 26691123 how-to-implement-haskells-splitevery-in-swift 26691258 26691258 . Comment : And why can t you use the Swift code from the github project that you linked to Swift code can run on iOS 7 and iOS 8 . Comment : The code works but linked binaries don t work i might try and use it without linking it if not i ll give that method a crack . Thanks :", "Question : I am trying to pull out variables safety rating id score etc . from an array called array based on the submission id using the swift library Dollar https : github.com ankurp Dollar s find method so that I can later make a POST request Eventually I hope to be able to replace the hardcoded values in my parameter with the pulled array variables with them but my results from find all return nil . These are the inner arrays I want where the submission id is 27 from this array https : codeshare.io zr1pw lines 22- 36 : .. . .. . Code : .. . .. . UPDATE .. . .. . I m able to obtain the array with submission id 27 BUT I want to remove name and task id from the two submission id : 27 arrays AND add an schedule job id that I got from elsewhere . I ve tried using a for in loop to create my own array from the variables that I want but I keep getting a nil crash . This is what the new array looks like https : codeshare.io 3VJSo .. . .. . for in loop error http : i.stack.imgur.com 6TQNt.png .. . .. . Eventually I want to do a ratings : chosenArray Comment : Why are you calling .validate twice Comment : oh I didnt notice that thanks for pointing out Comment : you have another similar question that I have answered : stackoverflow.com questions 37540689 http : stackoverflow.com questions 37540689 how-to-identify-specific-values-in-json-response .. . Answer : I think you are using wrong . When you call .find on self.array the array contains JSON objects not sure what the object exactly is but I assume it s Dictionary . So I think you should do something like : .. . .. . Then I would avoid that force unwrap on the dictionary . It was just for you to understand my point in one line of code . Edit : .. . .. . Then you can iterate over the array and extract your fields like this : Comment : Hi do you know how I can remove the name and task id from each of the arrays generated see updated post Comment : See my edit on the original post if it solved your problem please consider accepting that answer", "Question : I am trying to pull out variables safety rating id score etc . from an array called array based on the submission id using the swift library Dollar https : github.com ankurp Dollar s find method so that I can later make a POST request Eventually I hope to be able to replace the hardcoded values in my parameter with the pulled array variables with them but my results from find all return nil . These are the inner arrays I want where the submission id is 27 from this array https : codeshare.io zr1pw lines 22- 36 : .. . .. . Code : .. . .. . UPDATE .. . .. . I m able to obtain the array with submission id 27 BUT I want to remove name and task id from the two submission id : 27 arrays AND add an schedule job id that I got from elsewhere . I ve tried using a for in loop to create my own array from the variables that I want but I keep getting a nil crash . This is what the new array looks like https : codeshare.io 3VJSo .. . .. . for in loop error http : i.stack.imgur.com 6TQNt.png .. . .. . Eventually I want to do a ratings : chosenArray Comment : Why are you calling .validate twice Comment : oh I didnt notice that thanks for pointing out Comment : you have another similar question that I have answered : stackoverflow.com questions 37540689 http : stackoverflow.com questions 37540689 how-to-identify-specific-values-in-json-response .. . Answer : So what gets passed inside of the callback is each element in the array so you will get passed the dictionary object . So if you want to find a specific item in the array you should do .. . .. . If you want all elements in array that have submission id as 27 then use filter .. . .. . To remove properties from a dictionary object you need to call removeValueForKey method on each item on the array .", "Question : I am trying to pull out variables safety rating id score etc . from an array called array based on the submission id using the swift library Dollar https : github.com ankurp Dollar s find method so that I can later make a POST request Eventually I hope to be able to replace the hardcoded values in my parameter with the pulled array variables with them but my results from find all return nil . These are the inner arrays I want where the submission id is 27 from this array https : codeshare.io zr1pw lines 22- 36 : .. . .. . Code : .. . .. . UPDATE .. . .. . I m able to obtain the array with submission id 27 BUT I want to remove name and task id from the two submission id : 27 arrays AND add an schedule job id that I got from elsewhere . I ve tried using a for in loop to create my own array from the variables that I want but I keep getting a nil crash . This is what the new array looks like https : codeshare.io 3VJSo .. . .. . for in loop error http : i.stack.imgur.com 6TQNt.png .. . .. . Eventually I want to do a ratings : chosenArray Comment : Why are you calling .validate twice Comment : oh I didnt notice that thanks for pointing out Comment : you have another similar question that I have answered : stackoverflow.com questions 37540689 http : stackoverflow.com questions 37540689 how-to-identify-specific-values-in-json-response .. . Answer : Your dic in your for-loop must be type of NSMutableDictionary . Because you can t manipulate NSDictionary . Second thing there is no method like removeValueForKey . You should use removeObjectForKey or removeObjectsForKeys . In removeObjectsForKeys you have to pass array of parameters keys as parameter . In removeObjectForKey you can pass one string key as parameter ." ] }
[ "yes-answer-long", "yes-answer-short" ]
functional-programming
UNK_RELATION
jms2@java@26
jms2 -- version 2 of the @placeholder messaging service and component of java-ee-7 .
{ "confidence": [ 20.466333389282227, 17.15311622619629, 17.15311622619629, 17.15311622619629, 17.15311622619629, 17.15311622619629, 15.663822174072266, 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, 13.382264137268066, 13.382264137268066 ], "content": [ "This is with the 6.3.0 version of the TIBCO EMS product .", "I understand that a JMS Publisher most of times if not all the times is meant to be @Stateless .", "But when I have a Queue Subscriber the thing changes a little bit .", "If I have a Queue with redeliver policy set for 3 times before sending to DLQ what should be the behavior of JMSSubscriber", "@Stateful or @Stateless", "Should I care about writing manually the logic for the redeliver and DLQ postage", "Is there an equivalent to Shared Subscriptions of JMS 2.0 http : www.oracle.com technetwork articles java jms2messaging-1954190.html in AMQP to ensure message delivery to subscribers of Topic or fan-out in AMQP running in Distributed application Clustered happens only once per listener configured .", "Given a scenario where there are multiple consumers of a queue with each consumer filtering for a different value of the JMSType field : this sort of works to distribute messages to intended consumers by setting the JMSType header field appropriately on the producer side .", "Sort of works because if we start a consumer of that queue without a filter at all then this consumer receives all the messages while none of the filtering consumers receive any .", "This bogotic behavior obviously has serious implications for the performance and robustness of a distributed application .", "Somewhat more interestingly if we use a topic instead of a queue to pass messages we see the same or arguably even more bizarre behavior : the moment we start a non-filtering consumer the filtering consumers all get shut out .", "They don t get a copy either .", "Is this a bug in TIBCO s implementation", "The workaround seems to be using a custom application-specfic header field for such filtering instead .", "The problem occurs for the JMSType header-only .", "I am following a tutorial about JMS .", "Maven Dependency list : .. . .. . But it fails with below exception : .. . .. . If I add jms.jar and imq.jar from OpenMQ distribution this example works without any problem .", "But with maven it doesn t .", "I think problem should be caused by Maven .", "Do you really want to use JMS 2.0 standalone", "have a look at this post : xenonique.co.uk blog p 1333 http : www.xenonique.co.uk blog p 1333", "I was just trying to redo the samples .", ": I talked to the author and he told that OpenMQ 5.0 or later is not available on a maven repository .", "Thank you ill read the article" ] }
{ "confidence": [ 16.142372131347656, 16.132373809814453, 16.096036911010742, 12.534907341003418 ], "content": [ "Question : null .. . Answer : I understand that a JMS Publisher most of times if not all the times is meant to be @Stateless . But when I have a Queue Subscriber the thing changes a little bit . If I have a Queue with redeliver policy set for 3 times before sending to DLQ what should be the behavior of JMSSubscriber @Stateful or @Stateless Should I care about writing manually the logic for the redeliver and DLQ postage", "Question : null .. . Answer : This is with the 6.3.0 version of the TIBCO EMS product . Given a scenario where there are multiple consumers of a queue with each consumer filtering for a different value of the JMSType field : this sort of works to distribute messages to intended consumers by setting the JMSType header field appropriately on the producer side . Sort of works because if we start a consumer of that queue without a filter at all then this consumer receives all the messages while none of the filtering consumers receive any . This bogotic behavior obviously has serious implications for the performance and robustness of a distributed application . Somewhat more interestingly if we use a topic instead of a queue to pass messages we see the same or arguably even more bizarre behavior : the moment we start a non-filtering consumer the filtering consumers all get shut out . They don t get a copy either . Is this a bug in TIBCO s implementation The workaround seems to be using a custom application-specfic header field for such filtering instead . The problem occurs for the JMSType header-only .", "Question : null .. . Answer : Is there an equivalent to Shared Subscriptions of JMS 2.0 http : www.oracle.com technetwork articles java jms2messaging-1954190.html in AMQP to ensure message delivery to subscribers of Topic or fan-out in AMQP running in Distributed application Clustered happens only once per listener configured .", "Question : null .. . Answer : I am following a tutorial about JMS . Maven Dependency list : .. . .. . But it fails with below exception : .. . .. . If I add jms.jar and imq.jar from OpenMQ distribution this example works without any problem . But with maven it doesn t . I think problem should be caused by Maven . Comment : Do you really want to use JMS 2.0 standalone have a look at this post : xenonique.co.uk blog p 1333 http : www.xenonique.co.uk blog p 1333 Comment : I was just trying to redo the samples . : I talked to the author and he told that OpenMQ 5.0 or later is not available on a maven repository . Thank you ill read the article" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
mean.io@angularjs@63
mean.io -- mean - full-stack javascript using mongodb express @placeholder and node.js .
{ "confidence": [ 33.596649169921875, 32.364501953125, 30.202228546142578, 30.202228546142578, 30.202228546142578, 30.140233993530273, 28.190731048583984, 27.948823928833008, 27.642436981201172, 27.169540405273438, 26.98809051513672, 26.96355628967285, 26.861106872558594, 26.57793617248535, 26.373132705688477, 26.261972427368164, 26.033588409423828, 25.963584899902344, 25.963584899902344, 25.930130004882812, 25.930130004882812, 25.930130004882812, 25.930130004882812, 25.820682525634766, 24.971168518066406, 24.845117568969727, 24.764785766601562, 24.553997039794922, 24.502758026123047, 24.4451904296875, 24.435609817504883, 24.251277923583984, 23.785354614257812, 23.77638816833496, 23.702178955078125, 23.43270492553711, 23.309236526489258, 23.115324020385742, 23.115324020385742, 22.649093627929688, 22.641841888427734, 22.641841888427734, 22.547344207763672, 22.368404388427734, 22.31814956665039, 22.09151840209961, 21.989871978759766, 21.989871978759766, 21.938316345214844, 21.644775390625, 21.636062622070312, 21.519376754760742, 21.453720092773438, 20.96637725830078, 20.93215560913086, 20.886402130126953, 20.853919982910156, 20.853919982910156, 20.853919982910156, 20.853919982910156, 20.853919982910156, 20.853919982910156, 20.660247802734375, 20.60584259033203, 20.22589683532715, 20.205604553222656, 20.14441680908203, 20.13597869873047, 20.13597869873047, 19.989187240600586, 19.989187240600586, 19.989187240600586, 19.88471221923828, 19.88471221923828, 19.822235107421875, 19.718639373779297, 19.704612731933594, 19.492446899414062, 19.484764099121094, 19.469890594482422, 19.413074493408203, 19.069557189941406, 19.055681228637695, 18.947738647460938, 18.841293334960938, 18.806291580200195, 18.750816345214844, 18.750816345214844, 18.749860763549805, 18.717872619628906, 18.547348022460938, 18.37071990966797, 18.37071990966797, 18.162824630737305, 18.08911895751953, 18.007455825805664, 17.782949447631836, 17.750286102294922, 17.64443016052246, 17.6385555267334 ], "content": [ "Mean.IO is not bad .", "I am new to mean.io .", "I am confused how to achieve it in mean.io .", "If so then what about the menu provided by mean.io", "I have installed mean.io as per the documentation on mac .", "I have an issue using the mean.io tutorial to create the default mean app .", "however I would like my overall application to be based on mean.io express and nodejs .", "I already created a MEAN project with mean.io .", "I m fairly new to mean.io and the concept of Circles .", "Starting with a fresh mean.io app i.e .", "I m new to mean-stack world I installed mongoDB and nodejs .. . .. . then followed MEAN installation guide https : github.com linnovate mean wiki Installation to install it .", "I am trying to transition to javascript development and am starting with the MEAN stack .", "I know express is part of this but I have not seen how exactly with mean-stack you access these services .", "From the looks of the directory structure and based on the mean.io tag I m assuming you are using meanjs.org or mean.io .", "A good starting point is using Bitnami MEAN https : bitnami.com stack mean .", "I am building a web app with mean.io consisting of 6 different interfaces for 6 different users .", "I am working on a mean.io application .", "Mean.io comes with a built-in user model within the user package .", "The mean.io pattern is to implement any and all extensions as a custom package .", "I created a custom package with my mean.io setup .", "I m trying MEAN.IO and trying to get used to the structure .", "With mean.io or mean.js do you get these services for free", "Any ideas as to why Mean.Io is not working on Windows", "Whether you are new to mean.io stack or an experienced user this tutorial series will help you learn how to use mean.io .. . .. . through them you will develop an application that will allow us to manage our goals : .. . .. . 1 .", "I am building app using MEAN STACK .", "Now I m trying to do mean install upload as per http : mean.io packages 53ccd40e56eac633a3eee335 I installed meanio using npm-install meanio@latest but when I try to run mean install upload at the root of my mean app I get the error Invalid MEAN app or not in app root .", "I am new few hours into it to mean-stack development.I was starting up with documentation in mean.io website .Here I am confused how where to run helloworld.js from", "I m developing a webapp using stack MEAN.io and for now I have got the frontend part with HTML CSS and AngularJS with some logic in it .", "I have mean.io droplet on digitalocean I want to know how to check which web server s use default mean droplet", "I am creating a web app using one of mean.io or mean.js for a mobile web site .", "I have installed mean.io stack from http : learn.mean.io and everything installed successfully .", "Ok after some debugging I found that this is a bug in the mean.io source .", "Tried installing latest Mean.Io on 2 separate Windows machines Windows 10 7 with the following commands : .. . .. . Both are running latest version of Node v4.4.4 and both have latest version of MongoDb installed .", "I have been gluing myself to my computer and internet for last couple of days for a proper solution on how to use socket.io in Mean.io stack .", "In the mean.io documentation http : learn.mean.io it states the developer shouldn t alter any core packages including the user package .", "How does dpendency injection in mean.io work .", "Normally all the dependencies for mean.io are installed using bower adding the dependency to bower.json and then declaring the required module in app.js as a dependency i.e .", "I am working on a calendar app built on top of the mean.io framework .", "Is anyone familiar with installing external libraries in a mean.io project without bower npm", "https : restcountries.eu rest v1 alpha co .. . .. . I use a MEAN.IO stack and this is my code : .. . .. . test.html .. . .. . test.js .. . .. . When I refresh the page the code is executed until before controller console.log .", "I am pretty new to mean-stack development but would like to learn .", "I am new in mean-stack and i am creating module .", "I am trying to setup a MEAN project using mean.io and i have followed all the steps that are required for setting up an application as mentioned on their website learn.mean.io .", "i have also posted this issue on github within the mean.io community https : github.com linnovate mean issues 1554 .", "i just want to make a simple Mean.io project running and i am beginner to this so any one know what could be the problem", "I want to access the mongodb with crud operations using restful api .", "In particular how can I load images to folder belonging to a particular user in mean.io application", "Also is there difference between mean.io and mean.js in terms of rest services available by default and adding more rest services", "Is there any reason you are not using an Express Router for this", "mean.io fails to listen on localhost : 3000 following steps in documentation .. . .. . It stops with the messages below : .. . .. . I followed steps from learn.mean.io : .. . .. . It was working in version .. . .. . Now I am trying with version .. . .. . If any body know why it is getting stuck please let me know .", "I am trying to create new Mean.io application i followed the tutorial on http : learn.mean.io but after i will run command gulp or npm server on the cmd : Mean app started on port 3000 undefined cluster.worker.id : 2 .. . .. . and from the broweser if i will try to access http : localhost : 3000 it will keep on loading forever .", "I am using MEAN stack to develop my application .", "http : code.runnable.com U108R8ihwn4m4TM5 user-creation-signup-and-login-with-express-4-and-mongodb-for-node-js", "multer is a body parser for express .", "EDIT 1 : here are the helping functions I am using generated by the angular full-stack plugin .", "It looks like MongoDB isn t running .", "note the it is bad form to install mean.io as root and as a result run bower or npm as root .", "I have found few solutions but not quite working. . .. . .. . First of all Mean.io changes their folder structure very regularly. .", "If some one could help me to understand the proper way of defining socket.io in mean.io framework it would be a huge help. .", "The only solution that I found that keeps mean.io packageination without editing other modules and very easy to implement .", "I understand that this solution will work this chat module with future version of mean.io as they keep available http object of meanio module .", "Yes this solution is non-invasive and should work in future versions of mean.io as long as http object is available .", "I am building a mean-stack app allowing people to read and write reviews about products .", "Getting this every time I try to install mean.io application have tried npm cache clean tried total reinstall going mad at the moment .", "I know more that I mean it s not the javascript itself that is async in this case but the ajax call", "ECONNREFUSED 127.0.0.1 : 27017 means that PencilBlue is trying to access MongoDB on localhost using port 27017 .", "MEAN Stack SPA - have only one single page .", "It looks like your MongoDB server isn t running .", "Ensure that MongoDB is running on that port and restart PencilBlue .", "However when I try to mean init myApp I am presented with init : is an unrecognised token .", "I just think you ll do yourself a big favour if you also have a look at some of the other mean-stacks .", "Search for mean generators at yeoman http : yeoman.io and try the top ones out if you have the time .", "Trying to get a chatbox working using the sample code given via mean install socket .", "To implement a profile package follow the below steps : .. . .. . 1 Create a custom package called profile using mean package profile .", "It was due to using Redistore with express parameter .. . .. . finally I fixed it using a session as parameter .", "You express code should look like :", "I am trying to create an application for sports event management system using MEAN.io Since it uses the modular approach there are different packages that comes in skeleton application like system users access .", "I followed the tutorial to start Todo MVC .. . .. . I just did a fresh install of the mean.io framework .", "I have followed the steps to install http : mean.io docs mean.io but when I browse the localhost : 3000 I get a blank page and when I open the console I get a list of files pointing to the same error : .. . .. . Uncaught ReferenceError : angular is not defined .. . .. . my issue is something similar to this https : github.com linnovate mean issues 331 but I re-installed bower and it didn t work I m still getting the error .", "And why is not mean.io keeping the users and access package in published package I think keeping these packages at the node-modules would be better instead of including in default skeleton app .", "Embarrassingly enough mean was already pointing to a command in another library which I do not use often enough to have made the connection initially .", "What would you name your mean app", "Assuming basic add remove user is provided with mean.io or mean.js I would still like to know how to add more rest accessible services like say inventory etc that is linked to the user .", "And stored to MongoDB of course .", "I am following the installation instructions found here : https : github.com linnovate mean installation .. . .. . Also I was taking a MEAN Stack development course on Udemy .", "Secondly it s missing krb5-devel package which I install via config file below : .. . .. . Lastly I find it s still now working because the default Node.js environment does not include Node and npm in the default search path .", "Try to use full-fledged version - it should show more information .", "I have used the full-fledged version but stills the same error .", "fs.createReadStream file : .. . .. . res.download file : .. . .. . use Express res.download to make life easier", "I installed MEAN via npm-install mean-cli then created my project via mean init projectname .", "Which PaaS platform as a service to consider for auto-scaling MEAN stack .", "I have deployed the mean app on azure ubuntu box .", "I m not sure qm69 s solution would be the best for future compatibility with mean .", "It is my first day with mean-stack but they are working in different other objects I have for my project .", "did you check this : headspring.com blog 2014-12-08 http : www.headspring.com blog 2014-12-08 delivering-mean-stack-applications-grunt-jenkins-aws-elastic-beanstalk-part-1", "Here is the lecture : https : www.udemy.com mean-stack-for-beginners lecture 2697540 .. . .. . So far I have installed both prerequisite packages Gulp and Bower : .. . .. . Firstly I tried installing by using npm-install -g mean-cli but that threw permission errors without using sudo .", "UPDATE .. . .. . Using [email protected] https : www.npmjs.com package mean-cli to scaffold a new mean project the default top-level page is located under packages custom meanStarter public views system where you will find two files : .. . .. . header.html - which describes the layout of the default navbar .. . index.html - which lays out the content of the default page .. . .. . Now having said that it should be noted that the proper way of configuring a mean server to display your own top-level homepage is to create a new mean package .", "Over- Embedding is the root of all evil http : blog.mahlberg.io blog 2015 11 05 data-modelling-for-mongodb", "Try installing mean-cli bower and gulp globally like so : .. . .. . npm-install -g mean-cli bower gulp", "You need the mongodb server to be running to be able to use it ." ] }
{ "confidence": [ 49.69401168823242, 36.3475456237793, 36.21162414550781, 35.97602081298828, 35.96847152709961, 34.781375885009766, 34.019657135009766, 33.73779296875, 33.35627746582031, 32.506866455078125, 31.906883239746094, 31.601844787597656, 31.348304748535156, 31.11353874206543, 30.822566986083984, 30.575159072875977, 30.48776626586914, 30.355106353759766, 30.068050384521484, 29.85857391357422 ], "content": [ "Question : I am creating a web app using one of mean.io or mean.js for a mobile web site . From my mobile apps I want to be able to create users of this app using rest web-services . I want to access the mongodb with crud operations using restful api . With mean.io or mean.js do you get these services for free or how would you implement them I know express is part of this but I have not seen how exactly with mean-stack you access these services . Assuming basic add remove user is provided with mean.io or mean.js I would still like to know how to add more rest accessible services like say inventory etc that is linked to the user . Could someone point me in the right direction on this Also is there difference between mean.io and mean.js in terms of rest services available by default and adding more rest services .. . Answer : Don t bother just use strongloop.io", "Question : I have been gluing myself to my computer and internet for last couple of days for a proper solution on how to use socket.io in Mean.io stack . I have found few solutions but not quite working. . .. . .. . First of all Mean.io changes their folder structure very regularly. . So my question is where is the best place to configure socket.io or is it better to use express.io Second I am still not quite sure where to look for to find code that tells mean.io to listen for port I have found a port is defined in config folder in all.js file but real problem is as soon as I define server.listen port app doesn t load . and if I don t app loads but socket.io doesn t work . Also I have another question about socket.io socket-io.js file I have copied that in index folder but my app can t find it or says 404 error . I know it s not an actual file sitting on any such location as far as I have understood also people suggested to put that line as 127.0.0.1 socket.io socket-io.js but none made the js file available for the app to be able to run socket.io . If some one could help me to understand the proper way of defining socket.io in mean.io framework it would be a huge help. . I desperately need an answer . Thanks .. . Answer : I also faced the same issue and took me about a week to finally get it right . I ll try to explain what I did : .. . .. . app.js .. . .. . In this file I just invoke the code that creates and sets up a socket.io object for me which is then passed to the routes module . server config socketio.js .. . .. . This file simply configures the socket.io object . Please note that I had to upgrade meanio module to version 0.5.26 for this work as http object express server is not available in older meanio versions . Moreover in case you want to use ssl you can inject https instead of http . routes chat.js .. . .. . Finally use the routes file to define the socket events etc . Hope this helps Comment : It has helped me a lot The only solution that I found that keeps mean.io packageination without editing other modules and very easy to implement . I understand that this solution will work this chat module with future version of mean.io as they keep available http object of meanio module . Thanks a lot Comment : @adri14 I m glad this helped you . Yes this solution is non-invasive and should work in future versions of mean.io as long as http object is available . Comment : Just wanted to add that this code has finally made into the official mean-socket implementation . So do check it out And it also resolves the issue of deploying meanio and mean-socket behind a single port which was not supported earlier .", "Question : null .. . Answer : Tried installing latest Mean.Io on 2 separate Windows machines Windows 10 7 with the following commands : .. . .. . Both are running latest version of Node v4.4.4 and both have latest version of MongoDb installed . After running npm update and attempting to run the mean app it complains that Mongoose is not found so in both instances had to manually do an npm-install on Mongoose . Afterwards when trying to start the app again it shows that MeanApp started on port 3000 however when opening localhost : 3000 it just hangs there with no actual response or timeouts . It outputs GET - - - - ms in the terminal . Any ideas as to why Mean.Io is not working on Windows Comment : Did you check your npm-install logs Did anything fail to install", "Question : I am new few hours into it to mean-stack development.I was starting up with documentation in mean.io website .Here I am confused how where to run helloworld.js from localhost : 3000 gives mean home page I have just a static html page with alert box showing hello world how to run this For Example in case of wamp inside of www folder .So from where or how a application can be run .. . Answer : Whether you are new to mean.io stack or an experienced user this tutorial series will help you learn how to use mean.io .. . .. . through them you will develop an application that will allow us to manage our goals : .. . .. . 1 . Part-1 https : codewithintent.com mean-io-tutorial-building-goals-application-from-scratch-part-1 .. . 2 . Part-2 https : codewithintent.com mean-io-tutorial-building-goals-application-from-scratch-part-2 .. . 3 . Part-3 https : codewithintent.com mean-io-tutorial-building-goals-application-from-scratch-part-3 .. . 4 . Part-4 https : codewithintent.com mean-io-tutorial-building-a-goals-application-from-scratch-part-4 .. . 5 . Part-5 https : codewithintent.com mean-io-tutorial-part-5-integrating-ghost-with-mean", "Question : mean.io fails to listen on localhost : 3000 following steps in documentation .. . .. . It stops with the messages below : .. . .. . I followed steps from learn.mean.io : .. . .. . It was working in version .. . .. . Now I am trying with version .. . .. . If any body know why it is getting stuck please let me know . Comment : Ahh I ll redact my comment . Mean.IO is not bad . I just think you ll do yourself a big favour if you also have a look at some of the other mean-stacks . Search for mean generators at yeoman http : yeoman.io and try the top ones out if you have the time . .. . Answer : instead of npm test start your dev server with gulp", "Question : null .. . Answer : I am new to mean.io . I am building a web app with mean.io consisting of 6 different interfaces for 6 different users . I am confused how to achieve it in mean.io . Will building multiple local strategies in passport.js lead to the same result If so then what about the menu provided by mean.io That would differ right", "Question : I am new few hours into it to mean-stack development.I was starting up with documentation in mean.io website .Here I am confused how where to run helloworld.js from localhost : 3000 gives mean home page I have just a static html page with alert box showing hello world how to run this For Example in case of wamp inside of www folder .So from where or how a application can be run .. . Answer : A good starting point is using Bitnami MEAN https : bitnami.com stack mean . Gives you an environment where you can start with . Comment : I want to know how to set up the environment from scratch", "Question : I have an issue using the mean.io tutorial to create the default mean app . i have mongodb install what could be ths issue this is the error.That is the error below . Thanks . Comment : Have you tried connecting to the mongo-shell from command-line Please do try and share the response as well . Comment : Is your mongo server running before executing above commands .. . Answer : in your terminal type mongod to start mongodb and leave it running . Then open a new terminal tab or window and try running your application again . You need the mongodb server to be running to be able to use it . It looks like you re not running it . You can also access the mongo-shell by running mongo in your terminal to look at the server collections perform queries etc .", "Question : null .. . Answer : I am trying to create new Mean.io application i followed the tutorial on http : learn.mean.io but after i will run command gulp or npm server on the cmd : Mean app started on port 3000 undefined cluster.worker.id : 2 .. . .. . and from the broweser if i will try to access http : localhost : 3000 it will keep on loading forever . i just want to make a simple Mean.io project running and i am beginner to this so any one know what could be the problem", "Question : I have installed mean.io as per the documentation on mac . However when I try to mean init myApp I am presented with init : is an unrecognised token . I have cleared my bower and npm caches as well as updated bower npm and gulp . What am I doing wrong .. . Answer : Embarrassingly enough mean was already pointing to a command in another library which I do not use often enough to have made the connection initially . Comment : I recommend marking your own answer as accepted . Comment : Marked as accepted apologies for the delay .", "Question : I have head that nodejs is not optimal for long running operations . however I would like my overall application to be based on mean.io express and nodejs . Even though node is not ideal for this operation since its long running I would still like to use a nodejs module for uploading the image and serving it so i don t have multiple service technologies . I don t want to switch to Java or .net for this operation just because its not an ideal nodejs task . Is there any reason node would not work for this In particular how can I load images to folder belonging to a particular user in mean.io application thanks Comment : what are you using on the frontend part I use express and node to upload multiple images in one go in specific folder for a user . Multer module of node might help you there are other equally good modules as well out there . Comment : Did you use Multer for this Also will it work for all types of images jpeg gif etc Comment : Please tell me what are you using for the frontend part . I used angularjs on frontend part and therefore I sent the files in an array format and the request was then made to Multer all the images were uploaded in one go . Image formats wont be a problem and in fact you can upload other types of files as well Multer doesn t care about your file-type . .. . Answer : User multer https : github.com expressjs multer . multer is a body parser for express . To upload multiple-files user multer.any . You express code should look like : Comment : Seems like general purpose Asymc.. . Anything for uploading binary files in there", "Question : Mean.io comes with a built-in user model within the user package . What is the best practice for extending that user model if I want to attach additional data to it My experience with Django had me creating a profile that had a foreign key pointing towards the user object it belonged to . I like this approach because I don t touch the user package that way . But is this a best practice If this is how can I ensure the creation of a profile doc at the creation of a user doc If not what is .. . Answer : I m not sure qm69 s solution would be the best for future compatibility with mean . In the mean.io documentation http : learn.mean.io it states the developer shouldn t alter any core packages including the user package . The mean.io pattern is to implement any and all extensions as a custom package . And override default views using the viewPathProvider.override method . Secondly the User package is fundamentally a security authentication feature and not a profile implementation which regularly receives updates . Altering this will most likely break future fixes and risk introducing security bugs . My advice would be to implement a profile using means package system and add a service dependency for the User service . I ve done this in previous projects and it works well . To implement a profile package follow the below steps : .. . .. . 1 Create a custom package called profile using mean package profile . 2 Implement model-view control for all profile requirements in the custom package . DONT ALTER ANYTHING IN THE USER package . 2 Use dependency-injection to include the Global service service . This will give you access to Global.user data so you most likely don t even need to use the User services . 3 Override any User views using the override method mentioned in the above doco . Hope this helps", "Question : This is my route file xx.js .. . .. . Below is what I got from terminal : .. . .. . mimetype image png .. . .. . Sat 13 Feb 2016 04 : 00 : 52 GMT express deprecated res.sendfile : Use res.sendFile instead at packages custom xx server routes xx.js : 32 : 13 Error : ENOENT : no such file or directory stat xx assets data demo.png at Error native .. . .. . But I can access this file by link : http : localhost : 3000 xx assets data demo.png .. . .. . I am using MAC OS X EI Captian 10.11.2 My MEAN.IO version is 0.5.5 .. . Answer : I find an way to download file without res.sendFile you can using fs.createReadStream file or res.download file both can fix this problem . fs.createReadStream file : .. . .. . res.download file : .. . .. . use Express res.download to make life easier", "Question : I have been gluing myself to my computer and internet for last couple of days for a proper solution on how to use socket.io in Mean.io stack . I have found few solutions but not quite working. . .. . .. . First of all Mean.io changes their folder structure very regularly. . So my question is where is the best place to configure socket.io or is it better to use express.io Second I am still not quite sure where to look for to find code that tells mean.io to listen for port I have found a port is defined in config folder in all.js file but real problem is as soon as I define server.listen port app doesn t load . and if I don t app loads but socket.io doesn t work . Also I have another question about socket.io socket-io.js file I have copied that in index folder but my app can t find it or says 404 error . I know it s not an actual file sitting on any such location as far as I have understood also people suggested to put that line as 127.0.0.1 socket.io socket-io.js but none made the js file available for the app to be able to run socket.io . If some one could help me to understand the proper way of defining socket.io in mean.io framework it would be a huge help. . I desperately need an answer . Thanks .. . Answer : The simplest way would be to install the socket package.. . Comment : I tried this but it crashes the app . ... . iso node-modules cookie-parser lib parse.js : 44 return str.substr 0 2 s : TypeError : Cannot read property substr of undefined Comment : I installed socket module and it broke the cookie-parser . I started a discussion for this : stackoverflow.com questions 31103128 http : stackoverflow.com questions 31103128 installing-socket-module-in-mean-io-broke-cookie-parser", "Question : null .. . Answer : I used yeoman to generate my mean app . Now I m trying to do mean install upload as per http : mean.io packages 53ccd40e56eac633a3eee335 I installed meanio using npm-install meanio@latest but when I try to run mean install upload at the root of my mean app I get the error Invalid MEAN app or not in app root . How can I make mean recognize my folder as the root There is already a package.json in the folder .", "Question : I have Server.js file where we can write server connection and Post and get methods . I am facing the issue that i want to include other js files in server.js .. . .. . here alluser.js file .. . .. . Server.js file .. . .. . I have tried to get those alluser.js content replaced into require . alluser.js .Even i have tried to get this using FileSystem of node.js .. . .. . Can you please help me out of this problem .. . Answer : Is there any reason you are not using an Express Router for this Maybe change your alluser.js file to something like this . and your server.js to .", "Question : null .. . Answer : I have mean.io droplet on digitalocean I want to know how to check which web server s use default mean droplet e.g Apache IIS and Nginx .", "Question : null .. . Answer : I m trying MEAN.IO and trying to get used to the structure . I have a small problem which is to show an image . I m getting the error the image doesn t exist . Already used the full path as shown below : .. . .. . I already tried to agreggate the asset : .. . .. . Thanks In Advance", "Question : null .. . Answer : I m fairly new to mean.io and the concept of Circles . It s my understanding that this can be used for authorization all deny access to a resource . However I am lost at how to tie to into my custom packages . I see this in the comments of the circles app.js : .. . .. . Y Override queries to check user permisisons .. . .. . What s the best way to approach this If there are any examples documentation please send me in that direction . The only thing I could find was this https : github.com linnovate mean wiki Circles .. . .. . Thanks", "Question : I am pretty new to mean-stack development but would like to learn . While trying to run pencilblue using pbctrl start I get following error : .. . .. . Error message .. . .. . Can you please suggest what has been done wrong Comment : It looks like your MongoDB server isn t running . Also this isn t a programming question so it doesn t belong on this site . .. . Answer : It looks like MongoDB isn t running . ECONNREFUSED 127.0.0.1 : 27017 means that PencilBlue is trying to access MongoDB on localhost using port 27017 . Ensure that MongoDB is running on that port and restart PencilBlue ." ] }
[ "yes-answer-long", "yes-answer-short" ]
angularjs
UNK_RELATION
uiviewcontroller@ios@69
uiviewcontroller -- the uiviewcontroller class manages the views in @placeholder apps and mediates the interaction between an app s views its underlying model objects and the overall workflow .
{ "confidence": [ 41.10047912597656, 39.129364013671875, 38.16532897949219, 37.25672912597656, 37.1448860168457, 36.396263122558594, 36.27632141113281, 35.312286376953125, 35.039432525634766, 34.702877044677734, 34.599273681640625, 34.52493667602539, 34.42851257324219, 33.94007110595703, 33.912567138671875, 33.912567138671875, 33.912567138671875, 33.912567138671875, 33.47755432128906, 33.47755432128906, 33.47755432128906, 33.2349739074707, 33.02582931518555, 33.02476501464844, 32.71474838256836, 32.59912872314453, 32.59912872314453, 32.589725494384766, 32.589725494384766, 32.589725494384766, 32.30039978027344, 32.28634262084961, 32.274044036865234, 32.23551940917969, 32.11075210571289, 32.10158157348633, 31.87833023071289, 31.87833023071289, 31.87833023071289, 31.87833023071289, 31.87833023071289, 31.826919555664062, 31.826919555664062, 31.826919555664062, 31.800504684448242, 31.771026611328125, 31.662158966064453, 31.656095504760742, 31.523536682128906, 31.250917434692383, 31.196510314941406, 31.163070678710938, 31.115524291992188, 31.115524291992188, 30.933080673217773, 30.933080673217773, 30.912675857543945, 30.912675857543945, 30.89211654663086, 30.89211654663086, 30.89211654663086, 30.89211654663086, 30.89211654663086, 30.89211654663086, 30.89211654663086, 30.89211654663086, 30.89211654663086, 30.89211654663086, 30.74315643310547, 30.609294891357422, 30.609294891357422, 30.21476173400879, 30.129310607910156, 30.129310607910156, 30.129310607910156, 30.129310607910156, 30.129310607910156, 30.129310607910156, 30.026914596557617, 30.026914596557617, 29.978727340698242, 29.968910217285156, 29.799325942993164, 29.727340698242188, 29.727340698242188, 29.727340698242188, 29.694692611694336, 29.613588333129883, 29.613588333129883, 29.613588333129883, 29.613588333129883, 29.613588333129883, 29.613588333129883, 29.613588333129883, 29.613588333129883, 29.613588333129883, 29.375423431396484, 29.264110565185547, 29.264110565185547, 29.256032943725586 ], "content": [ "I have a UINavagationController NC that displays numerous UIViewController VC Views for an array of Items and I have a UINavigationController that displays numerous UIViewController Views for an array of owners .", "I want to know A single UIViewController can have Max of views inside UIViewController .", "I have two UIViewController s in my app .", "When you want to change views in a UIViewController just just use this code :", "I have a UIViewController subclass whose view has a complex hierarchy of descendant views including UIButton s and a UISlider .", "I have a UIViewController subclass that has a panGesture added onto one of its views .", "UIViewController Class Reference is for you .", "I have an UIViewcontroller A and UIViewController B .", "A UIViewController of class B Let s call it b is called from a method inside of a UIViewController of A a .", "The second class is a UIViewController that will have mediaPickers in .", "is a method of UIViewController class not UIView s .", "It is essentially managing the synchronisation between your views and model .", "Rather than put all the UITableView s into a single UIViewController create one UIViewController and 3 UITableViewController s .", "This code is called from a UIViewController class :", "From UIViewController 1 to UIViewController 2 .. . 2 .", "From UIViewController 2 to UIViewController 3 .. . 3 .", "From UIViewController 3 to UIViewController 4 .. . 4 .", "I have a UIViewController presenting another UIViewController .", "With this in mind what is the best practice for creating views and what is the best combination so to speak of UIViewController and SKView", "For the views that aren t managed by a nib you ll need to adjust them manually to the orientation that UIViewController interfaceOrientation returns .", "I tried using the MainWindow as a way to do this with a PreviewView on that window and a UIViewController above that to handle rotation for the other views on top .", "Given that iOS6 no longer unloads views and hence no longer calls UIViewController s viewDidUnload I was wondering if there is a reliable way to cause this same behaviour on iOS5", "The disconnect function in the class not extend uiviewcontroller .", "why didn t you directly use UIViewController toVC UIViewController transitionContext viewControllerForKey : UITransitionContextToViewControllerKey UIViewController fromVC UIViewController transitionContext viewControllerForKey : UITransitionContextFromViewControllerKey", "On a tap of each tap I have a function with loads of 5 views one per tab from UIViewController xib combo .", "I m On UIViewController A .", "on the target UIViewController .", "All changes are directly written into this class and displayed by the UIViewController .", "Because this method related to UITableViewCell class not to UIViewController .", "For example this is a UIButton class : .. . .. . This is one of my UIViewController classes :", "Shouldn t it be the extension of the UIView class insted of UIViewController class", "for UIViewController aViewController in allViewControllers if aViewController isKindOfClass : messageViewController class UIViewController myViewController self.storyboard instantiateViewControllerWithIdentifier : @ messageview self.navigationController popToViewController : myViewController animated : YES", "Is it the lastly added subview in the UIViewController s view", "The same thing with UIViewController newView UIViewController alloc init .", "In my swift app I have a UIViewController with a button .", "Apple s documentation of - UIResponder nextResponder : .. . .. . UIView implements this method by returning the UIViewController object that manages it if it has one or its superview if it doesn t", "I have the code below to transition from one UIViewController to a UIViewController with a Storyboard .", "Is there a way to know if a particular UIViewController is currently visible from within the UIViewController", "For instance a UINavigationController is a subclass of UIViewController that stacks UIViewController in order to deal with the navigation .", "From UIViewController 4 back to UIViewController 2 .. . .. . I am using UINavigationController .", "https : gist.github.com scottvrosenthal 4945884 .. . .. . ExampleViewController.m .. . .. . UIViewController+AppCategories.h .. . .. . UIViewController+AppCategories.m", "It s a default Cocoa Touch class that extends UIViewController .", "I have a UIViewController class called AppController.h AppController.m .", "I have a UIViewController class called AppController.h AppController.m .", "I have many places in my code where I need to do stuff based upon the layout of the views in a UIViewController .", "My main scene shows a child UIViewController by putting a Child Container in its View and embedding a child UIViewController in that Child Container .", "Therefore implement Custom UIViewController as rootViewController with preferStatusBarHidden method as .. . .. . instread of using default UIViewController instance UIViewController new .", "Init call at use for initialize your ViewController and Initialize only for UIViewController and not it s views .. . .. . ViewDidLoad call at use for load view This method gest called after the nib is loaded .. . .. . system can unload views to save memory it will leave the UIViewController alone .", "This class even though a subclass of UIViewController does not really use much of the UIViewController infrastructure .", "Is there a built-in way to get from a UIView to its UIViewController", "I have multiple subclasses of UIViewController in my app .", "I have a UIViewController contained within another UIViewController .", "I have a parent UIViewController and a child UIViewController running on the stack .", "I have a Settings UIViewController with a UISegmentedControl with two containers and two UIViewController .", "It s important to note that these methods are attached to UIViewController and not to UIView s themselves .", "This involves re-wrapping the UIViewController s view into a property called originalContentView .", "import UIKit import SpriteKit .. . .. . class ViewController : UIViewController .. . .. .", "You re adding a property to the UIViewController class itself in a category", "viewDidLoad is a UIViewController method .", "I have a UIViewController with a button .", "Notice it says UIViewController .. . .. .", "A UIViewController is set as a root of an UIWindow .", "UIViewController - This will be your main view .", ".. . .. . Here is a Screenshot of the UIViewController .", "UIViewController although the cast is unnecessary .", "on the target UIViewController .. . .. . .. . .. . 2 .", "The UIViewController or UIView subclass", "I have UIViewController subclass .", "You could look at CoreData as your model and the UIViewController gets the data from there and passes the data which the UIViewController has received from the View back to it .", "I am using a segue to present a modal view of a UIViewController that has the same UIViewController swift class .", "Therefore your UITableViewController which inherits from UIViewController will answer YES to isKindOfClass : UIViewController class will your if-statement to act unexpectedly .", "Some pointers regarding the lifecycle of views and the order in which messages are sent : .. . .. . Not an official Apple document but I find this diagram http : rdkw.wordpress.com 2013 02 24 ios-uiviewcontroller-lifecycle really useful because it includes pretty much all of UIViewController s lifecycle overrides .", "They all are simply subclasses of UIViewController .", "The UIViewController that s resizing himself", "One UIViewController per page .", "How to show this in UiViewController", "This is my appDelegate : .. . .. . And my UIViewController :", "The MainViewController is a custom UIViewController .", "I have a UIViewController its my main view controller .", "The designated-initializer for UIViewController and in turn its subclasses is init nibName : bundle : .", "Im trying to implement add TTThumbsViewController as a subview of UIViewController but the app is crashing .", "For now I created a function and call it through protocol : .. . .. . UIViewController number 2 : .. . .. . UIViewController number 3 : .. . .. . But with that solution when user presses the button - the UIViewController number 3 disappears and UIViewController number 2 appears for a second and disappears then .", "It s important to note that the views know nothing of your model your data and the model knows nothing about your views .", "I have one MainStoryBoard and connected with class ViewController that use UIViewController .. . 2 .", "Try subclassing the UIViewController class and make your own one with the button", "The other option I tried was implementing the IUITableViewDelegate and the IUITableViewDataSource in my UIViewController class .", "When a button on the UIView is tapped I want to push a new UIViewController onto the underlying NavigationController .. . .. . This all works but how can I make the UIView animate off the screen to the left with the underlying UIViewController", "Then on the blank fields of the storyboard make a UIViewController .", "Click on the UINavigationItem on the top of your UIViewController .", "The intent of the UIViewController is to drive the entire screen .", "Here s @progrmr s solution as a UIViewController category :", ".. . Short version : delete the unwanted UIViewController .", "I have a tableview inside a UIViewController .", "Every single UIViewController is full screen .", "I am building a UIViewController with a XIB .", "When the UIViewController loads no iAd is visible .", "I have an .xib file with two views and I want my UIViewController subclass that owns the .xib file to decide which UIView to use at runtime .", "Its view controller is a subclass of UIViewController and conforms to the UIPageViewControllerDataSource protocol .", "However it seems like if it s not connected at all to its UIViewController : EditTopicAlertViewController .", "I also have an extension that extends all UIViewController s that conform to NakedNavigationBar ." ] }
{ "confidence": [ 49.66167449951172, 49.328094482421875, 47.32155990600586, 46.355350494384766, 46.318138122558594, 46.318138122558594, 46.02151870727539, 45.61357879638672, 45.00100326538086, 44.54685592651367, 44.46958923339844, 43.93545150756836, 43.38603591918945, 43.2938346862793, 43.1761589050293, 42.9788932800293, 42.60197830200195, 42.444271087646484, 42.28704833984375, 42.04027557373047 ], "content": [ "Question : For instance : .. . .. . 1 . Create a new UIVC using initWithNibName using nib-v1 .. . 2 . Display it e.g . using UINavigationController nav pushViewController : myVC .. . 3 . Change the NIB that myVC is using to nib-v2 .. . .. . So far as I can see this is the correct approach to app-design for a lot of apps when paging through information where you need two slightly different UI screens for the info being displayed . For instance most of your pages are text but some of them have an image too think of an RSS reader where some RSS entries have text + image some are text only . I ve dealt with this previously by having one NIB file with a second invisible named UIView instance that I layered over the top of the first one and switched on off depending on on context using the hidden flag . But this is clearly wrong and wastes memory . However I cannot see an obvious way to reload the view from the NIB file . I m guessing I want to somehow reproduce the magic that initWithNibName does I suspect this is possible but I m sure that if you do it the wrong way then the app will simply crash horribly . Comment : Question is not clear . Comment : Please explain what you are trying to achieve what what problems you are running into . That will help us greatly to give you answers . Comment : Switching views from nib files can be heavy . I d suggest loading one nib file and switching between views already loaded in that nib . .. . Answer : You shouldn t change what NIB file a UIViewController uses . Attaching the NIB to the UIViewController should be a one-time event . The hidden views are fine they re certainly not clearly wrong . You can also programmatically add view elements after loading . If you re doing a lot of that you can skip the NIB entirely and programmatically build the view in -loadView . Any of these are fine but don t switch the NIB after initialization . I don t even recommend having multiple NIBs that you choose between for a given UIViewController class it s just too confusing . Generally each NIB should map to a dedicated UIViewController class with a very similar or identical name . In a related note I recommend moving the name of the NIB into the UIViewController as described in an earlier posting http : stackoverflow.com questions 1509617 objective-c-elegant-solution-to-conditional-creation-of-objects . Comment : Thanks but loadView defeats the purpose of using NIB files so that doesn t help here . I work with teams of non-programmers who need to edit GUI s so that we have to use NIB files for everything . which works well most of the time until you run into situations like this where Apple s lack of foresight kicks in . Sadly these situations are a bit more common than I d hoped : .", "Question : I need a detailed explanation on the following : .. . .. . What do we use a UIViewController for What is the use of it I have a class that looks like the following : .. . .. . How can I use secondObject in the class one What is the class hierarchical start from the window .. . Answer : The UIViewController is the controller part in the MVC design pattern . Model ------- Controller ------- View .. . .. . The controller s task is to handle navigation between different views key presses and screen touches etc .", "Question : I ve got a question regarding the two mentioned methods since in my tests I don t make clear the order they are called . I thought that firstly viewDidLoad is called when the viewController is loaded for first time as the name indicates and inmediately after the init method . Then I thought that once viewDidLoad returns viewWillAppear is called . If you display another viewController and then you return to this one then it should be already loaded and only viewWillAppear will be called . However while developing I make the impression that there is no order when calling viewDidLoad and viewWillAppear .. . I couldn t find a clear description of this lifecycle in Apple s documentation how does this actually work Thanks Comment : viewDidLoad is called when the viewController is loaded for first time as the name indicates - It confused me for a long time too . The view controller and its view are different things . This is one of the most important and fundamental things you have to understand about view controllers . .. . Answer : I would like to add to Caleb s answer : Don t confuse the view controller and the view The name viewDidLoad clearly indicates that the method is invoked after the view has been loaded . It is the view controller that does the loading . Some pointers regarding the lifecycle of views and the order in which messages are sent : .. . .. . Not an official Apple document but I find this diagram http : rdkw.wordpress.com 2013 02 24 ios-uiviewcontroller-lifecycle really useful because it includes pretty much all of UIViewController s lifecycle overrides . In the section Resource Management in View Controllers http : developer.apple.com library ios featuredarticles ViewControllerPGforiPhoneOS ViewLoadingandUnloading ViewLoadingandUnloading.html from Apple s View Controller Programming Guide there is a flowchart that depicts how views are initially loaded . It explains loadView and viewDidLoad also in conjunction with storyboards . The section Responding to Display-Related Notifications http : developer.apple.com library ios featuredarticles ViewControllerPGforiPhoneOS RespondingtoDisplay-Notifications RespondingtoDisplay-Notifications.html from Apple s View Controller Programming Guide explains how to respond to views appearing and disappearing viewWillAppear : et al .. . If you are planning on implementing a container view controller : The UIViewController class reference http : developer.apple.com library ios documentation UIKit Reference UIViewController Class Reference Reference.html has a good overview of how messages need to be sent by your subclass . I m stopping here . You can find more stuff yourself by googling for uiviewcontroller life cycle . Comment : That UIViewController lifecycle diagram http : rdkw.wordpress.com 2013 02 24 ios-uiviewcontroller-lifecycle is superb . Thanks for the link . Comment : It s worth noting that viewWillUnload is deprecated in iOS 6 views are no longer purged under low-memory conditions and so this method is never called . The bottom-left part of the Lifecycle Diagram doesn t apply to modern iOS apps . The rest of the diagram is very useful though thanks", "Question : I was using Apple s Instruments Allocations tool and noticed that when I went back and forth between two views the allocation always grows . Investigating I found that all of the memory is from objects that are subviews of my UIViewController s UIView . I checked and my UIViewController is being dealloced but apparently the UIView is not I m not retaining the UIView sepparately from the UIView controller . Anyone have any ideas Here s the code I wrote to switch between views . Thank you - Kevin .. . .. . Ok because there was concern that I was just using a ViewController s View and then releasing the ViewController I tried an experiment where I made a new class that is the File s Owner in the NIB but inherits from NSObject . the code now looks like this : .. . .. . MyView s initializer looks like : .. . .. . I am still seeing the memory leak of the view each time I swap in and out new views . Any new thoughts Thanks - Kevin Comment : What is UIViewControllerFactory and how is it creating Views From nib files Comment : Yes UIViewControllerFactory simply maps the viewControllerID with the correct string for initWithNibName then returns the viewController . .. . Answer : Did you release your every IBOutlets correctly in your UIViewController dealloc Comment : Yes I am releasing all IBOutlets and calling super dealloc . But I don t explicitly release the view .", "Question : I have a UIViewController subclass whose view has a complex hierarchy of descendant views including UIButton s and a UISlider . I want to hide the controls after 5 seconds have passed without any user interaction . The 5 seconds part is easy : use a timer . I don t know of a general way to detect user interaction though . My first thought was to override UIResponder s touchesBegan : withEvent : and touchesMoved : withEvent : in the UIViewController subclass but those don t get called when the user taps a UIButton or drags the knob on the UISlider . What I don t want to do is register for notifications from every control if I can help it . I also don t want to mess with the UIWindow . Any other ideas .. . Answer : I ended up creating a continuous gesture recognizer that recognizes when there is at least one touch . I added it to the UIViewController subclass s view and it works great It took me a long time to realize that it needed both cancelsTouchesInView and delaysTouchesEnded set to false or else it would fail one way or another .", "Question : I have a UIViewController subclass whose view has a complex hierarchy of descendant views including UIButton s and a UISlider . I want to hide the controls after 5 seconds have passed without any user interaction . The 5 seconds part is easy : use a timer . I don t know of a general way to detect user interaction though . My first thought was to override UIResponder s touchesBegan : withEvent : and touchesMoved : withEvent : in the UIViewController subclass but those don t get called when the user taps a UIButton or drags the knob on the UISlider . What I don t want to do is register for notifications from every control if I can help it . I also don t want to mess with the UIWindow . Any other ideas .. . Answer : Add a UIGestureRecognizer to your UIViewController by calling setupTapGesture in viewDidLoad .. . .. . And then use this callback to detect touches from button sliders UIControl Comment : Thanks this put me on the right road . I never did get it working with just gestureRecognizer : shouldReceiveTouch : but a custom gesture recognizer did the trick .", "Question : I have a tabbar application with many views . Is there a way to know if a particular UIViewController is currently visible from within the UIViewController looking for a property Comment : Related : Getting the top most UIViewController http : stackoverflow.com questions 4067692 getting-the-top-most-uiviewcontroller .. . Answer : if you re utilizing a UINavigationController and also want to handle modal views the following is what i use : Comment : I have found this way to be more reliable than the accepted answer when a navigation controller is available . This can be shortened to : if self.navigationController.visibleViewController isKindOfClass : self class", "Question : I am currently making an app that will have multiple timers which are basically all the same . I want to create a custom class that uses all of the code for the timers as well as the layout animations so I can have 5 identical timers that operate independently of each other . I created the layout using IB xcode 4.2 and all the code for the timers is currently just in the viewcontroller class . I am having difficulty wrapping my brain around how to encapsulate everything into a custom class and then add it to the viewcontroller any help would be much appreciated . Comment : could you be more specific about what difficulties are you finding possibly showing some code would help.. . Comment : For anyone googling to here .. . it s now five years on from container views coming to iOS Container views are the basic central idea of how you do everything in iOS now . They are incredibly simple to use and there are any number of excellent five year old tutorials on container views around example http : stackoverflow.com questions 23399061 objective-c-how-to-add-a-subview-that-has-its-own-uiviewcontroller 23403979 23403979 example https : www.raywenderlich.com 86521 how-to-make-a-view-controller-transition-animation-like-in-the-ping-app .. . Answer : Answer for view controllers not views : .. . .. . There is an easier way to load a xib from a storyboard . Say your controller is of MyClassController type which inherit from UIViewController . You add a UIViewController using IB in your storyboard change the class type to be MyClassController . Delete the view that had been automatically added in the storyboard . Make sure the XIB you want called is called MyClassController.xib . When the class will be instantiated during the storyboard loading the xib will be automatically loaded . The reason for this is due to default implementation of UIViewController which calls the XIB named with the class name . Comment : Wow. . this is most definitely the best answer . Thanks Comment : i inflate custom views all the time but never knew this little trick to load it in to the storyboard . MUCH appreciated Comment : The question is about views not about view controllers . Comment : Added title for clarification Answer for view controllers not views : Comment : Does not appear to be working in iOS 9.1 . If I remove the auto-created default view it crashes after returning from the VC s viewDidLoad . I don t think the view in the XIB gets connected in-place of the default view .", "Question : I have a UIViewController subclass whose view has a complex hierarchy of descendant views including UIButton s and a UISlider . I want to hide the controls after 5 seconds have passed without any user interaction . The 5 seconds part is easy : use a timer . I don t know of a general way to detect user interaction though . My first thought was to override UIResponder s touchesBegan : withEvent : and touchesMoved : withEvent : in the UIViewController subclass but those don t get called when the user taps a UIButton or drags the knob on the UISlider . What I don t want to do is register for notifications from every control if I can help it . I also don t want to mess with the UIWindow . Any other ideas .. . Answer : Why not use UIGestureRecognizer . You might have to set up a few different ones for different possible interaction types like holds and swipes but then you could have all of them call the same function that keeps the screen on and resets the timer .", "Question : I have a tabbar application with many views . Is there a way to know if a particular UIViewController is currently visible from within the UIViewController looking for a property Comment : Related : Getting the top most UIViewController http : stackoverflow.com questions 4067692 getting-the-top-most-uiviewcontroller .. . Answer : The approach that I used for a modal presented view controller was to check the class of the presented controller . If the presented view controller was ViewController2 then I would execute some code .", "Question : I have a really strange problem with a view in my iPhone App . I have two UIViewController subclasses A and B . A UIViewController of class B Let s call it b is called from a method inside of a UIViewController of A a . But when b is displayed the frame and the bounds of the root view of b changed magically between the calls of viewDidLoad and viewWillAppear . I have no idea why this happens . As far as I know all my other views do not have this problem . These are the frames and bounds : .. . .. . in viewDidLoad : .. . .. . in viewWillAppear : : .. . .. . I made a screenshot to demonstrate the problem . The yellow area is the self.view of b . the red and green ones are subviews of self.view . They are just there for my layouting . I don t think they have any effects on the self.view frame or bounds . Does anyone have an idea what causes this problem UIViews in b http : i.stack.imgur.com FDQKA.png Comment : There is no problem . The view s frame isn t finalized yet in viewDidLoad . This is normal . Don t rely on it . Comment : You have to do all your view position related code in viewWillAppear or later . viewDidLoad only indicates the views have loaded but the views are not in their final positions yet . Comment : Okay but why does this not happen in other view controllers Or is that just a coincidence that it works in the other ones Comment : @RoryMcKinnel It s quite possible to do all the view position related code in viewDidLoad . I do it all of the time . But it requires the proper setting of the frames and the autoreszingMask of the subviews . Comment : @rmaddy Yes . Should have been You are safer to rather than You have to . As you say its ok if you have have everything locked down . .. . Answer : Okay after hours literally of debugging I found my error : I forgot to call self super init in my custom init method . That caused some weird behaviour . Thanks for your helpful comments", "Question : I have a tabbar application with many views . Is there a way to know if a particular UIViewController is currently visible from within the UIViewController looking for a property Comment : Related : Getting the top most UIViewController http : stackoverflow.com questions 4067692 getting-the-top-most-uiviewcontroller .. . Answer : Here s @progrmr s solution as a UIViewController category :", "Question : I have a tabbar application with many views . Is there a way to know if a particular UIViewController is currently visible from within the UIViewController looking for a property Comment : Related : Getting the top most UIViewController http : stackoverflow.com questions 4067692 getting-the-top-most-uiviewcontroller .. . Answer : you can check it by window property", "Question : I have a view controller with a child view controller . A should be forced to stay portrait at all times but B should be allowed to rotate freely . I know shouldAutorotate applies to any view controllers and its children but is there any way to get around this It seems like I could use shouldAutorotateToInterfaceOrientation but this is blocked in iOS 8 . I d like to keep a video-player static so horizontal videos are always horizontal regardless of device orientation while the controls layer subview overlay is allowed to freely rotate . I m using Swift . Comment : Are you pushing ViewControllerB from ViewControllerA Comment : I m adding it as a subview . self.view.addSubview viewController.view .. . Answer : Short answer : No all visible controllers and views rotate or don t rotate together . Long answer : .. . .. . First you must implement autorotate decision functions in the root controller that may mean making a nav controller subclass . You can hack your desired behavior by having the parent view autorotate -- but have it manually rotate itself back to appear un-rotated . Or you can NOT autorotate but listen for notifications that the physical device rotated and manually rotate whatever views you want to eg : Replicate camera app rotation to landscape IOS 6 iPhone http : stackoverflow.com questions 15886418 replicate-camera-app-rotation-to-landscape-ios-6-iphone .. . .. . Also see fyi : .. . .. . How to force a UIViewController to Portait orientation in iOS 6 http : stackoverflow.com questions 12520030 how-to-force-a-uiviewcontroller-to-portait-orientation-in-ios-6 .. . .. . shouldAutoRotate Method Not Called in iOS6 http : stackoverflow.com questions 13588325 shouldautorotate-method-not-called-in-ios6 .. . .. . iOS6 : supportedInterfaceOrientations not working is invoked but the interface still rotates http : stackoverflow.com questions 12447552 ios6-supportedinterfaceorientations-not-working-is-invoked-but-the-interface-s .. . .. . How to implement UIViewController rotation in response to orientation-changes http : stackoverflow.com questions 2838281 how-to-implement-uiviewcontroller-rotation-in-response-to-orientation-changes", "Question : I am making a class for sharing . This class will be used many times in my project . So I have defined many methods there with a parameter that specify refrence UIViewcontroller on which i want to present something like SLComposeViewController . I just want to ask one thing that is it normal to pass a UIVIewcontroller as parameter or it is not recommended to pass UIVIewController as parameter . Comment : Show the code which explains what you re doing and why you re passing it . Is it a controller passing itself so something can be presented from it Comment : do you want to create base-class for application which can be useful for calling same method in different controller . like that .. . Answer : I don t see any issues with sending your view or viewController as a parameter for this use but it might be cleaner to add those methods as extensions to UIViewController and then the you can just act on self instead of the parameter . One thing to consider might be the memory-management if you keep a reference to the view controller . That might screw a bit with the load and unload of the views that are often relied upon to setup the views . Comment : Yes adding extension will be cleaner . Thanks :", "Question : I have a login page named LoginViewController . I have an info button in this page . If I click on it I want to show some information about my application . Also I want to present that information page using flip animation . The code for creating info button is .. . .. . If I click on the info button the displayInfoView method will be called . There I can show a UIView to display some information . Am I right For flip animation I used this code.. . Here loginPageView is the login view that contains the info button . infoView is the view that contains the information about application . mainView is the common view that holds the present view . Now my problem is instead of showing a UIView can I show an another view controller class while clicking the info button Remember the flip action works fine with UIView . But when I try with a UIViewController this makes trouble . Can someone suggest me how to show an UIViewController in my app I need to show AboutViewController while clicking the info button with the flip effect .. . Answer : There is a fundamental flaw in your understanding of the MVC structure in Cocoa Touch which is View Controllers and Views are comparable and similar . The truth is they are Not . Back to your specific question yes animations are based on views not on view controllers . But each view should be controlled by one of your view controllers . And this which-view-belongs-to-which-controller thing is totally up to you . In your case animation could happen between 2 views with 2 different controllers or they could also happen between 2 views of the same controller . As for code samples I suggest you take a look at one of Xcode s default templates the Utility Application which has implemented this click-and-flip animation in a succinct and standardized way . Comment : Thank you for your reply.. . I m trying to do the animation between two view controllers . Not views Comment : It works fine with a viewcontroller and a view . But did not work with two viewcontrollers Comment : Can you edit your code format so I can take a look at it Now the format is just so messy that I don t even know where to start .", "Question : I have a tabbar application with many views . Is there a way to know if a particular UIViewController is currently visible from within the UIViewController looking for a property Comment : Related : Getting the top most UIViewController http : stackoverflow.com questions 4067692 getting-the-top-most-uiviewcontroller .. . Answer : I made a swift extension based on @progrmr s answer . It allows you to easily check if a UIViewController is on screen like so : .. . .. . The extension :", "Question : I have a tabbar application with many views . Is there a way to know if a particular UIViewController is currently visible from within the UIViewController looking for a property Comment : Related : Getting the top most UIViewController http : stackoverflow.com questions 4067692 getting-the-top-most-uiviewcontroller .. . Answer : You want to use the UITabBarController s selectedViewController property . All view controllers attached to a tab bar controller have a tabBarController property set so you can from within any of the view controllers code : Comment : This doesn t work if the view controller is contained inside a navigation controller and that controller is added to the tab bar controller . The call to selectedViewController will return the navigation controller and not the current view controller . Comment : @AntonHolmberg in that case get the visible view controller like this : UINavigationController self.tabBarController.selectedViewController .visibleViewController Comment : Or even use self.tabBarController.selectedIndex property if we ve gone this far .", "Question : I ve got a really strange bug in my project . I ve got a UIScrollView as my main big view . Inside of it I have a UIViewController not UITableViewController which has a UITableView instance variable as well as some miscellaneous UIButtons . I have set the view controller s view frame to CGRectMake 0 64 320 388 as I have a tab bar above it this is not functional yet . At first it works great and looks great but once I present and dismiss a modalViewController thus reloading the UIViewController I believe it pushes the UIViewController s view to the top of the screen by default setting it to CGRectMake 0 0 320 460 but since I ve set wantsFullScreenLayout to NO it now sets it to CGRectMake 0 0 320 388 . I ve tracked this problem to somewhere between viewWillAppear and viewDidAppear . Here are my exact logs after dismissing the modalViewController : .. . .. . 2011-05-06 11 : 08 : 39.974 Campus 1570 : 207 Frame is 0.000000 64.000000 320.000000 388.000000 viewWillAppear .. . 2011-05-06 11 : 08 : 40.378 Campus 1570 : 207 Frame is 0.000000 0.000000 320.000000 388.000000 viewDidAppear .. . .. . As you can see the frame is fine in viewWillAppear but not in viewDidAppear . I ve done the following things to try to fix it : .. . - Set the desired frame in loadView viewDidLoad viewWillAppear and viewDidAppear . - Set my wantsFullScreenLayout to NO . - Killed my super viewWillAppear : and super viewDidAppear : calls in my method overrides . What should I do Comment : Who is presenting the modal view controller Comment : The UIViewController that s resizing himself .. . Answer : My problem here was that as of iOS 4 Apple only supported 1 view controller per window . However as of iOS 5 Apple has added support for container view controllers and has added methods to UIViewController such as addChildViewController : . Using the container view controller algorithm solved my problem . Visit the UIViewController Class Reference http : developer.apple.com library ios documentation uikit reference UIViewController Class Reference Reference.html for more info . EDIT : for those of you too lazy to search container view controller in the class reference here s the gist of the related section in the class reference : .. . .. . A custom UIViewController subclass can also act as a container view controller . A container view controller manages the presentation of content of other view controllers it owns also known as its child view controllers . A child s view can be presented as-is or in conjunction with views owned by the container view controller . .. . Your container view controller subclass should declare a public interface to associate its children . The nature of these methods is up to you and depends on the semantics of the container you are creating . You need to decide how many children can be displayed by your view controller at once when those children are displayed and where they appear in your view controller s view-hierarchy . Your view controller class defines what relationships if any are shared by the children . By establishing a clean public interface for your container you ensure that children use its capabilities logically without accessing too many private details about how your container implements the behavior . .. . Your container view controller must associate a child view controller with itself before adding the child s root view to the view-hierarchy . This allows iOS to properly route events to child view controllers and the views those controllers manage . Likewise after it removes a child s root view from its view-hierarchy it should disconnect that child view controller from itself . To make or break these associations your container calls specific methods defined by the base-class . These methods are not intended to be called by clients of your container class they are to be used only by your container s implementation to provide the expected containment behavior . Comment : how can you fix this problems can you post some example Comment : Please provide a code sample with the answer Linking to the vast UIViewController Class reference doesn t help anybody else . Comment : @TRedman My code has changed so much since a year ago that I don t think I could possibly give a useful code sample . I ve quoted part of the class reference in an edit", "Question : null .. . Answer : I have a UIViewController A current root viewController and other UIViewController B embedded in the first one . I create UIViewController B using a xif file and classes UIViewController as follow : .. . .. . MyComponent.xib .. . .. . In xib file I set Custom Class to B ViewController.m . Next I drop IBActions on this class specifically a button that I would try and UILabels UIImages.. . that later I will associate with Gestures Reconizers . B ViewController.m child and embedded viewController .. . .. . A ViewController.m parent and rootviewController .. . .. . The behavior that I hope is illustrating by the image right but A ViewControler and B ViewController never receive the events . I checked that all views in hierarchy have UserInteractionEnabled as follows : .. . .. . Event Handling Guide for iOS http : i.stack.imgur.com 9fNPM.png .. . .. . I also checked that none of the messages of UIGestureRecognizerDelegate are being called in parent-child relationship : .. . .. . Following the recommendation of iOS Developer Library : .. . .. . Design the view controller first as a content view controller using regular views owned by the container . This allows you to focus on getting layout and animation transitions correct without simultaneously needing to manage parent-child relationships . I could check it out as I hope when A ViewController and B ViewController don t manage parent-child relationships . I miss something" ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
rooted-device@unix@99
rooted-device -- rooting is the process of attaining privileged control known as root access on a @placeholder based device .
{ "confidence": [ 43.4084587097168, 39.837520599365234, 39.837520599365234, 39.80971145629883, 38.3403205871582, 38.13139724731445, 37.06494140625, 34.70399856567383, 34.70399856567383, 34.538482666015625, 33.330291748046875, 33.330291748046875, 31.585952758789062, 30.578367233276367, 30.48479652404785, 28.65401268005371, 28.413972854614258, 28.21637725830078, 27.959095001220703, 27.159887313842773, 27.159887313842773, 27.159887313842773, 27.159887313842773, 27.159887313842773, 27.159887313842773, 26.192598342895508, 25.644794464111328, 25.488937377929688, 25.488937377929688, 25.147308349609375, 25.147308349609375, 25.147308349609375, 25.147308349609375, 24.98927879333496, 24.857961654663086, 24.479276657104492, 24.191390991210938, 23.76686668395996, 23.76686668395996, 23.76686668395996, 23.191986083984375, 23.116641998291016, 23.116641998291016, 22.563547134399414, 22.535974502563477, 21.123966217041016, 21.070072174072266, 21.038150787353516, 20.921369552612305, 20.2508487701416, 20.03354263305664, 20.03354263305664, 20.033140182495117, 19.90351676940918, 19.90351676940918, 19.3160343170166, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 18.009613037109375, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828, 15.583881378173828 ], "content": [ "On a device yes rooted or not .", "This code is working fine on Emulator and rooted Device .", "Linux top and ps are available even if the device is not rooted .", "I ve created a system application on a rooted-device and was wondering : is there a way to access methods in ActivityManagerService from that application", "My android is rooted device.I want to store file in root directory data logs .How will I give path of the file in code.I m writing Environment.getExternalStorageDirectory data logs then It is saving in internal memory of device not the root directory.My app will be the system app in device so I have all the permissions .", "you don t need a rooted-device for android.intent.action.BOOT COMPLETED if you do have a rooted-device there are easier ways .", "Also trying to get this working on a non-rooted 4.4 device .", "stackoverflow.com questions 2079766 http : stackoverflow.com questions 2079766 how-to-create-write-file-in-the-root-of-the-android-device", "@JaiprakashSoni this will store the logs in internal memory I want to store it in android device root directory", "Yesterday i rooted the device which gives me full access but i don t know how to go on .", "Why terminal IDE a terminal-emulator for Android doesn t execute some .sh files on my rooted Android device", "My question is how does one adjust the gps IE latitude and longitude of a rooted Android device programatically", "As said they require root access for doing that .", "It also requires the device to be rooted .", ".. . .. . As you have rooted the device so you can create system app that can be recognised by the reboot event .", "But doesn t device need it to create and read sqlite3 databases", "Any possibility for rooted devices", "This will be used on a system app rooted phone Android 5+ I ve read it s not possible on non rooted devices but couldn t find a sample code for rooted ones .", "How rndis0 device is created http : stackoverflow.com questions 14202233 how-rndis0-device-is-created .. . .. . Is there a way to check whether tethering is active", "I am trying to copy DB from assets folder to device .", "I am not sure but this works on every device I have tested on .", "@Julian : But doesn t device need it to create and read sqlite3 databases", "where do you find that sqlite3 command build for your device", "The key is you need to mount to get writing permission in the device via adb .", "I know how to work with the GPS of a standard Android device .", "How can I make my Bluestacks 0.9.30 for Mac OS X Rooted", "Making adb writable .. . .. . Android Emulator sdcard push error : Read-only file system http : stackoverflow.com questions 2083709 android-emulator-sdcard-push-error-read-only-file-system .. . .. . Copying files from adb to local device machine .. . .. . How to copy selected files from Android with adb pull http : stackoverflow.com questions 8650407 how-to-copy-selected-files-from-android-with-adb-pull .. . .. . On a rooted-device nexus 4 these links with the instruction on this page worked .", "If you can do that from other app there is no possibility also for rooted devices .", "Note : I have rooted phone so some limits are removed .", "I just want to know is it create any problem on unrooted device or it will work same .", "My code is also working fine I just want to know is it create any problem on unrooted device", "So my assumption is if the device has rndis0 enabled it means USB tethering is enabled .", "Make sure to pull it from an emulator with the same architecture as your target device as Jeremy wrote in first line comment .", "I know that it is not possible without root permissions .", "To send something through WhatsApi the app secret must be known .", "I know results of top ps commands can help me however I don t know how to call them or do I have access these commands on a rooted phone", "I will take a look at retrieving the app secret through the root permissions .", "For development you can pull the database off your rooted phone and examine it on your development-machine .", "I seem to recall they had an integrated SQLite editor for on-emulator databases and that might work with your rooted phone .", "To install sqlite3 on NON-ROOTED devices here is a way that has been proved working on my Galaxy S3 FYR .", "In this thread I found the right Solution answer of Kila : How can I install sqlite3 on rooted NexusOne runs Gingerbread http : stackoverflow.com questions 5250400 how-can-i-install-sqlite3-on-rooted-nexusone-runs-gingerbread .. . .. . It works on my Samsung Galaxy S II with 2.3.3 .", "As I m not that familiar with programming root enabled android apps I have no clue how it works .", "Maybe we are able to retrieve this secret through the root permission and can then use the api to send the message .", "This will work for sure in all devices and emulator no need to root .", "http : stackoverflow.com questions 30405740 android-studio-how-can-i-make-an-avd-with-arm-instead-of-haxm .. . .. . .. . Then use the notes below to move files between your machine and back to the android device .", "App already has super user access", "I want to capture the pointer locations in whole android device by providing a service to develop something like Pointer Location in Developer options .", "Checking which version is your android device .. . .. . https : www.quora.com How-can-I-check-whether-my-Android-phone-is-32-bit-or-64-bit .. . .. . Building ARM in android-studio .. . .. . Android Studio - How Can I Make an AVD With ARM Instead of HAXM", "At last I found that for rooted devices we can get touch-events but I don t know how .", "Works on rooted Nexus-S running Android ICS 4.0.4 using the sqlite3 binary from SuperOneClick shortfuse.org page id 2 http : shortfuse.org page id 2 download.cnet.com SuperOneClick 3000-2094 4-75447027.html http : download.cnet.com SuperOneClick 3000-2094 4-75447027.html", "try using data logs insted of getExternalStorageDirectory data logs", "@JaiprakashSoni I tried data logs it is working thanks .Problem is with the permission inlogs folder i have gave it 777 permission to this directory.now it worked", "Also if your app has root permissions it can examine the proc filesystem http : www.tldp.org LDP Linux-Filesystem-Hierarchy html proc.html Linux style .", "In order to achieve this I want to have detailed statistics about process running on my phone .", "So here is my question how can I collect process information in detail dynamically", "You must before check if your build is based on 86 64 or ARM and replicate this image or you may get an incompatible version that will cause an err .", "I ve tried using the ActivityManager object but not all methods also exist in ActivityManagerService .", "Thanx", "I m wondering how some apps manage to send whatsapp messages fully programmatically .", "Example apps that accomplished this are Whatsremote and the SeeBye Scheduler for example .", "Does anyone of you know how it works", "In particular they send receive messages without opening whatsapp .", "So a simple intent that is sent to whatsapp will not work .", "Just as-if you were to send out an eMail.. . using a share intent .", "there is a php api for whatsapp you can use this api for sending whatsapp messages github.com venomous0x WhatsAPI https : github.com venomous0x WhatsAPI", "Sending an intens does not work that way as it only opens whatsapp but does not allow one to send it directly .", "Maybe it will work that way .", "Actually I m pretty sure that apps like SeeBye Scheduler send Whatsapp messages by inserting values directly into one or more of the Whatsapp databases located in data data com.whatsapp databases directory .", "I Try a lot of videos tutorial on youtube but all is old and nor work for newest version of Bluestacks .", "Yes your code snippet works perfectly on unrooted devices too :", "No for sure .", "above code will work fine and yours too .", "NEVER HARDCODE PATHS .", "The outFileName value will be wrong on many Android environments such as secondary accounts .", "Use getDatabasePath to derive the path for a database file .", "Thanks @CommonsWare .", "I will-change it to String outFileName getDatabasePath + dbname", "Should this not be myContext.getDatabasePath dbname", "Also getDatabasePath dbName returns a file object not a String .", "I stole this method from somewhere here and made it generic for both backing up and restoring : .. . .. . Then I just back it up by calling : .. . .. . Where getDatabasePath and getDatabaseBackupPath are just string values", "I gave a +1 because the combination of getDatabasePath method of the context object and outputFile.getParentFile .mkdirs of your code solved my problem in which the database copying was failing when I used the hard-coded directory path that other examples show .", "I want to replace the directory which is present in another application package folder data data com .", "directory to be replaced", "You can t do this .", "Only app from package can modify it s packages folders .", "Only from console .", "I was able to make such things but it was on my custom Android image .", "There I was able to create low-level service which made what i want", "Though I created link-to sd successfully.. . the app link2sd create links there is no change in internal-storage the files occupies the same space in there and creates same sized duplicates in sd card. . What to do", "I m developing an app that requires USB tethering to function correctly .", "I want to warn users if USB tethering is not enabled checked in the Settings but I don t know how I can see if that option is checked .", "For Android 2.2 there was method that could actually check that but now targeting a very specific version 4.4 Kitkat I m unable to do that .", "This is when I didn t have USB tethering enabled .", "enter image description here http : i.stack.imgur.com Wj318.png .. . .. . And this is when I have USB tethering enabled .", "enter image description here http : i.stack.imgur.com PkByV.png .. . .. . As you can see rndis0 configuration is UP now .", "Is there any way to detect this", "It doesn t have to have a listener attached ." ] }
{ "confidence": [ 46.660484313964844, 43.512550354003906, 42.25535202026367, 40.834449768066406, 39.97265625, 38.55919647216797, 36.21389389038086, 36.17249298095703, 35.0733528137207, 34.650699615478516, 34.622589111328125, 31.43952178955078, 30.647079467773438, 28.28878402709961, 28.214433670043945, 26.724449157714844, 26.463348388671875, 26.352710723876953, 25.96472930908203, 21.038917541503906 ], "content": [ "Question : null .. . Answer : My android is rooted device.I want to store file in root directory data logs .How will I give path of the file in code.I m writing Environment.getExternalStorageDirectory data logs then It is saving in internal memory of device not the root directory.My app will be the system app in device so I have all the permissions . Comment : stackoverflow.com questions 2079766 http : stackoverflow.com questions 2079766 how-to-create-write-file-in-the-root-of-the-android-device Comment : try using data logs insted of getExternalStorageDirectory data logs Comment : @JaiprakashSoni this will store the logs in internal memory I want to store it in android device root directory Comment : @JaiprakashSoni I tried data logs it is working thanks .Problem is with the permission inlogs folder i have gave it 777 permission to this directory.now it worked", "Question : I m going to write an app to do dynamic-analysis of processes . In order to achieve this I want to have detailed statistics about process running on my phone . Note : I have rooted phone so some limits are removed . So here is my question how can I collect process information in detail dynamically I know results of top ps commands can help me however I don t know how to call them or do I have access these commands on a rooted phone As I searched around the web ActivityManager.RunningAppProcessInfo is no longer useful since It provide limited information since Lolipop . .. . Answer : Linux top and ps are available even if the device is not rooted . You can run them from your app with Runtime.getRuntime .exec . If you need to run a command elevated check this answer : http : stackoverflow.com a 6953432 192373 . Also if your app has root permissions it can examine the proc filesystem http : www.tldp.org LDP Linux-Filesystem-Hierarchy html proc.html Linux style . Comment : May i ask you to help me and have a look at my other question related to this over here : stackoverflow.com q 31246218 1080355 http : stackoverflow.com q 31246218 1080355", "Question : null .. . Answer : I ve created a system application on a rooted-device and was wondering : is there a way to access methods in ActivityManagerService from that application I ve tried using the ActivityManager object but not all methods also exist in ActivityManagerService . Thanx", "Question : null .. . Answer : I know how to work with the GPS of a standard Android device . My question is how does one adjust the gps IE latitude and longitude of a rooted Android device programatically App already has super user access", "Question : I am trying to copy DB from assets folder to device . This code is working fine on Emulator and rooted Device . I just want to know is it create any problem on unrooted device or it will work same . Comment : Yes your code snippet works perfectly on unrooted devices too : .. . Answer : This will work for sure in all devices and emulator no need to root . Comment : My code is also working fine I just want to know is it create any problem on unrooted device Comment : No for sure . above code will work fine and yours too . Comment : NEVER HARDCODE PATHS . The outFileName value will be wrong on many Android environments such as secondary accounts . Use getDatabasePath to derive the path for a database file . Comment : Thanks @CommonsWare . I will-change it to String outFileName getDatabasePath + dbname Comment : Should this not be myContext.getDatabasePath dbname Also getDatabasePath dbName returns a file object not a String .", "Question : I just received a new google-glass from a company which wants it to support their employees while picking and packing goods in their warehouse . For this reason they need a Server Client application which really isn t the problem . I never did something with the Glass before and i want to know if it is possible to run a custom Application on boot and to jail the user into it . Yesterday i rooted the device which gives me full access but i don t know how to go on . Thank you .. . Answer : Yes it is possible . .. . .. . As you have rooted the device so you can create system app that can be recognised by the reboot event . Rest of the steps are totally similar to android mobile . How to do it : .. . .. . If you need to know the steps you can search on the web or you can try the following : .. . .. . First you need the permission in your AndroidManifest.xml : .. . .. . Also in your AndroidManifest.xml define your service and listen for the BOOT COMPLETED action : .. . .. . Then you need to define the receiver that will get the BOOT COMPLETED action and start your service . And now your service should be running when the phone starts up . Comment : you don t need a rooted-device for android.intent.action.BOOT COMPLETED if you do have a rooted-device there are easier ways .", "Question : I am trying to copy DB from assets folder to device . This code is working fine on Emulator and rooted Device . I just want to know is it create any problem on unrooted device or it will work same . Comment : Yes your code snippet works perfectly on unrooted devices too : .. . Answer : Comment : I gave a +1 because the combination of getDatabasePath method of the context object and outputFile.getParentFile .mkdirs of your code solved my problem in which the database copying was failing when I used the hard-coded directory path that other examples show .", "Question : I am trying to copy DB from assets folder to device . This code is working fine on Emulator and rooted Device . I just want to know is it create any problem on unrooted device or it will work same . Comment : Yes your code snippet works perfectly on unrooted devices too : .. . Answer : I am not sure but this works on every device I have tested on . I stole this method from somewhere here and made it generic for both backing up and restoring : .. . .. . Then I just back it up by calling : .. . .. . Where getDatabasePath and getDatabaseBackupPath are just string values Comment : My code is also working fine I just want to know is it create any problem on unrooted device", "Question : null .. . Answer : On the Android emulator sqlite3 is in system xbin . There is no system xbin on a Nexus One Android 2.2 . Hence I suspect that sqlite3 is not installed on the Nexus One . Comment : If you install cyanogenmod it has sqlite3 working in the shell . Comment : But doesn t device need it to create and read sqlite3 databases Also if it s not on the Nexus One is there a way to get it on there Comment : @Julian : But doesn t device need it to create and read sqlite3 databases -- Why would it SQLite is a library attached to an Android app via JNI . sqlite3 is a command-line executable . Also if it s not on the Nexus One is there a way to get it on there -- you re welcome to try to find an ARM port and see if you can get it working . I m dubious that it s really the solution for whatever problem you think you have though . Android apps don t need it . For development you can pull the database off your rooted phone and examine it on your development-machine . Comment : Ah . Ok . Thanks for explaining . There wasn t really a problem as such . I was just exploring whether it was necessary to always have to pull the database to examine it . Comment : @Julian : On the emulator no . On a device yes rooted or not . Also if you re an Eclipse user you might want to peek at MOTODEV Studio for Android . I seem to recall they had an integrated SQLite editor for on-emulator databases and that might work with your rooted phone . Behind the scenes it probably just does a pull but it might be more convenient .", "Question : null .. . Answer : To install sqlite3 on NON-ROOTED devices here is a way that has been proved working on my Galaxy S3 FYR . Comment : I got permission-denied Comment : Also trying to get this working on a non-rooted 4.4 device . Your steps almost work except that after using run-as the app user account doesn t have permission to mnt sdcard anymore used to work in older Android versions must be a recent change . I worked around that part by putting the sqlite3 binary in the app assets folder and then extracting it to the databases folder on the first app run . Comment : I got when using . sqlite3 sh : . sqlite3 : not executable : magic 7F45 Comment : How to resolve issue for magic 7545 Comment : @AndroidDeveloper Sounds like the sqlite3 you put on there is for a different architecture . Make sure to pull it from an emulator with the same architecture as your target device as Jeremy wrote in first line comment .", "Question : null .. . Answer : Some more information that may help someone about this issue .. . .. . For the people who wonder where to get a working sqilte3 file binary to copy : .. . .. . You can use the emulator to get a working binary . You must before check if your build is based on 86 64 or ARM and replicate this image or you may get an incompatible version that will cause an err . Checking which version is your android device .. . .. . https : www.quora.com How-can-I-check-whether-my-Android-phone-is-32-bit-or-64-bit .. . .. . Building ARM in android-studio .. . .. . Android Studio - How Can I Make an AVD With ARM Instead of HAXM http : stackoverflow.com questions 30405740 android-studio-how-can-i-make-an-avd-with-arm-instead-of-haxm .. . .. . .. . Then use the notes below to move files between your machine and back to the android device . Making adb writable .. . .. . Android Emulator sdcard push error : Read-only file system http : stackoverflow.com questions 2083709 android-emulator-sdcard-push-error-read-only-file-system .. . .. . Copying files from adb to local device machine .. . .. . How to copy selected files from Android with adb pull http : stackoverflow.com questions 8650407 how-to-copy-selected-files-from-android-with-adb-pull .. . .. . On a rooted-device nexus 4 these links with the instruction on this page worked . Hope it helps someone . The key is you need to mount to get writing permission in the device via adb .", "Question : Why terminal IDE a terminal-emulator for Android doesn t execute some .sh files on my rooted Android device the error is : permission-denied I have typed this code in terminal : .. . .. . and dprompt.sh contains this code : .. . Answer : Maybe the script does not have the executable permission set Aside from that you cannot execute it in a subshell using the sh command because you are exporting the variable to shells created from that subshell but that subshell is going to die immediately and you are going to return to the parent shell the interactive one with the PS1 variable unchanged . To fix it you must source the script executing it with : .. . .. . That way the script is execute in the current shell without issuing a new one so the variable is changed for the current shell .", "Question : I m wondering how some apps manage to send whatsapp messages fully programmatically . I know that it is not possible without root permissions . As I m not that familiar with programming root enabled android apps I have no clue how it works . Example apps that accomplished this are Whatsremote and the SeeBye Scheduler for example . Does anyone of you know how it works In particular they send receive messages without opening whatsapp . So a simple intent that is sent to whatsapp will not work . Comment : Just as-if you were to send out an eMail.. . using a share intent . Comment : there is a php api for whatsapp you can use this api for sending whatsapp messages github.com venomous0x WhatsAPI https : github.com venomous0x WhatsAPI Comment : Sending an intens does not work that way as it only opens whatsapp but does not allow one to send it directly . To send something through WhatsApi the app secret must be known . Maybe we are able to retrieve this secret through the root permission and can then use the api to send the message . I will take a look at retrieving the app secret through the root permissions . Maybe it will work that way . .. . Answer : Actually I m pretty sure that apps like SeeBye Scheduler send Whatsapp messages by inserting values directly into one or more of the Whatsapp databases located in data data com.whatsapp databases directory . As said they require root access for doing that .", "Question : null .. . Answer : I want to send DTMF during a phone call . This will be used on a system app rooted phone Android 5+ I ve read it s not possible on non rooted devices but couldn t find a sample code for rooted ones . Can t find anything usefull in Itelephony either . Any help will be great", "Question : null .. . Answer : How can I make my Bluestacks 0.9.30 for Mac OS X Rooted I Try a lot of videos tutorial on youtube but all is old and nor work for newest version of Bluestacks .", "Question : I want to capture the pointer locations in whole android device by providing a service to develop something like Pointer Location in Developer options . First I have tried adding overlay view which is always-on-top to capture the coordinates . but this method didn t let me to get touch-events in move actions . So I decided to try another way . At last I found that for rooted devices we can get touch-events but I don t know how . Could you please give some suggestions thanks in advance .. . Answer : I have been looking for this answer as well . Can you specify how you did the overlay view and captured the coordinates I was able to do the overlay as well with some other answers from here on stackOverFlow but if I capture the Overlay coordinates it renders the background OS useless . Its one or the other not an actual service in the background running or an overlay recording coords . Its one or the other . I have read that this goes against the Android security-framework since it would be a really big flaw when exploited . Although everything that I have read is from 2012 at the earliest . This is the newest post in 3 years . Any insight", "Question : I want to replace the directory which is present in another application package folder data data com . directory to be replaced .. . Answer : You can t do this . Only app from package can modify it s packages folders . Comment : Any possibility for rooted devices Comment : Only from console . If you can do that from other app there is no possibility also for rooted devices . I was able to make such things but it was on my custom Android image . There I was able to create low-level service which made what i want", "Question : null .. . Answer : From the answer of evelio I had problem to push the sqlite3 file to system bin . So instead I have pushed it to the sdcard . In this thread I found the right Solution answer of Kila : How can I install sqlite3 on rooted NexusOne runs Gingerbread http : stackoverflow.com questions 5250400 how-can-i-install-sqlite3-on-rooted-nexusone-runs-gingerbread .. . .. . It works on my Samsung Galaxy S II with 2.3.3 . Comment : Works on rooted Nexus-S running Android ICS 4.0.4 using the sqlite3 binary from SuperOneClick shortfuse.org page id 2 http : shortfuse.org page id 2 download.cnet.com SuperOneClick 3000-2094 4-75447027.html http : download.cnet.com SuperOneClick 3000-2094 4-75447027.html Comment : Thank you works on LG P500 Android 2.3.3 Comment : Works on GT-i9100 4.03 ICS by pulling sqlite3 from emulator and then pushing up as instructed . Comment : It worked on my galaxy s II with ICS but with the update to 4.1 JB I have the following error cannot locate sqlite3 enable load extension .. . CANNOT LINK EXECUTABLE Comment : By downloading bit.ly sqlite3-for-jb http : bit.ly sqlite3-for-jb it s cool for me : . Thx", "Question : null .. . Answer : I m developing an app that requires USB tethering to function correctly . It also requires the device to be rooted . I want to warn users if USB tethering is not enabled checked in the Settings but I don t know how I can see if that option is checked . For Android 2.2 there was method that could actually check that but now targeting a very specific version 4.4 Kitkat I m unable to do that . So my assumption is if the device has rndis0 enabled it means USB tethering is enabled . This is when I didn t have USB tethering enabled . enter image description here http : i.stack.imgur.com Wj318.png .. . .. . And this is when I have USB tethering enabled . enter image description here http : i.stack.imgur.com PkByV.png .. . .. . As you can see rndis0 configuration is UP now . Is there any way to detect this It doesn t have to have a listener attached . I can probably check when user pushes a button to start the service . By the way I read these threads but could not figure out how to do so . How rndis0 device is created http : stackoverflow.com questions 14202233 how-rndis0-device-is-created .. . .. . Is there a way to check whether tethering is active http : stackoverflow.com questions 8007361 is-there-a-way-to-check-whether-tethering-is-active .. . .. . Enable Disable USB or Wifi tethering programmatically on android http : stackoverflow.com questions 3531801 enable-disable-usb-or-wifi-tethering-programmatically-on-android .. . .. . Start stop built-in Wi-Fi USB tethering from code http : stackoverflow.com questions 3436280 start-stop-built-in-wi-fi-usb-tethering-from-code .. . .. . EDIT : I tried Methods class but I can t get it to work. . any suggestion", "Question : null .. . Answer : As an alternative may not be secure or even good idea though you can always upload the sqlite3 binary to system bin this worked for me : .. . .. . First lets mount system to allow read-write rw .. . .. . in another terminal change directory cd to where sqlite3 is and lets push it .. . .. . Now back to the other shell lets copy and change permissions of the binary .. . .. . Now lets mount back system as read only ro .. . .. . And now we can use sqlite3 from shell : .. . .. . Note : strike I m using the sqlite3 binary that comes with SuperOneClickv1.6.5-ShortFuse strike .. . .. . You can always pull sqlite3 binary from emulator : .. . .. . Start an emulator and then from a terminal .. . .. . If you are lazy like me you can download one right here for ICS or before http : dev.evelio.info sqlite3 or for Jelly Bean and later here http : dev.evelio.info sqlite3-4.1 .. . .. . Make sure to use the proper one for your Android version as you may get eloc library 1306 : 14446 cannot locate sqlite3 enable load extension .. . or similar errors on execute Comment : Can you please tell me where I can find sqlite3 for NexusOne on Gingerbread Thank you . Comment : That was a really great solution - thanks Comment : Would be grat if we could do that inside an application to fix the issue for our users Comment : where do you find that sqlite3 command build for your device or you build it by yourself Comment : and this is a link-to SQLite SQLite version 3.8.6 2014-08-15 s000.tinyupload.com index.php file id 52096553461674354126 http : s000.tinyupload.com index.php file id 52096553461674354126 in case you get SQLite header and source version mismatch error for recent OS I got this error for Android L" ] }
[ "yes-answer-long", "yes-answer-short" ]
unix
UNK_RELATION
db2i@s@62
db2i -- db2 for ibm i is the flavour of db2 that runs on ibm @placeholder power systems hardware under the ibm i operating-system .
{ "confidence": [ 54.015621185302734, 52.7368049621582, 52.484840393066406, 50.400413513183594, 49.8161506652832, 48.6999397277832, 46.413909912109375, 46.32811737060547, 45.18712615966797, 45.17990493774414, 44.14353561401367, 42.86204528808594, 42.80543899536133, 42.368988037109375, 41.80433654785156, 41.11157989501953, 40.65480422973633, 40.492462158203125, 40.35141372680664, 39.17512893676758, 39.17512893676758, 38.7699089050293, 38.74094009399414, 37.657012939453125, 37.64836120605469, 36.77649688720703, 36.77649688720703, 36.54241180419922, 35.75712585449219, 35.39973449707031, 35.24710464477539, 35.24710464477539, 35.0379753112793, 34.95426940917969, 34.83527374267578, 34.800804138183594, 33.957130432128906, 32.954158782958984, 32.945709228515625, 32.7930793762207, 32.11012649536133, 31.61188507080078, 31.61188507080078, 31.61188507080078, 31.14603042602539, 30.817691802978516, 30.70473861694336, 29.84811782836914, 29.84811782836914, 29.820552825927734, 29.65610122680664, 29.397476196289062, 28.754688262939453, 28.754688262939453, 28.754688262939453, 28.754688262939453, 28.262237548828125, 27.940311431884766, 27.940311431884766, 27.691688537597656, 27.691688537597656, 27.448394775390625, 26.97277069091797, 26.579687118530273, 26.300662994384766, 26.110580444335938, 25.82477569580078, 25.82477569580078, 25.82477569580078, 25.60253143310547, 25.46347427368164, 25.24390411376953, 25.05675506591797, 24.93979263305664, 24.93979263305664, 24.791847229003906, 24.57933807373047, 24.125661849975586, 24.125661849975586, 24.125661849975586, 24.020179748535156, 23.919981002807617, 23.90218734741211, 23.463125228881836, 23.463125228881836, 22.803768157958984, 22.33887481689453, 22.33887481689453, 22.33887481689453, 22.33887481689453, 21.928607940673828, 21.588958740234375, 21.46595573425293, 21.2226619720459, 19.906408309936523, 19.89664077758789, 19.884849548339844, 19.884849548339844, 19.884849548339844 ], "content": [ "failed with the following error : IBM System i Access ODBC Driver DB2 for i5 OS CEE9901 - Application error .", "I am trying to get Django-pyodbc to work with DB2 on IBM i using the standard IBM i Access ODBC driver .", "This question is for DB2 running on IBM i which has somewhat different features than DB2 LUW .", "@gwc iSeries is the former name for a hardware product line which is has been incorporated into Power Systems running an OS now called IBM i . DB2 is tightly integrated into the OS such that the DB2 version numbers reflect the OS and are totally unrelated to DB2 LUW or z OS release numbers .", "Enviroment : .. . .. . Windows 7 VS2010 .Net 4.0 framework .. . IBM DB2 for i .NET Provider 13.0.0.2 - V7R1M0 .. . .. . Regards", "Or this http : www-01.ibm.com support knowledgecenter ssw ibm i 72 sqlp rbafyjoin.htm for your iSeries IBM i edition of DB2 .", "Reference Sites : .. . .. . TechTip : More-Flexible SQL Triggers http : www.mcpressonline.com sql techtip-more-flexible-sql-triggers.html cm mc uid 12840944491714412830229 cm mc sid 50200000 1449818534 .. . Multiple event triggers support on IBM DB2 for i http : www.ibm.com developerworks ibmi library i-event triggers support .. . IBM Redbook : Stored Procedures Triggers and User-Defined Functions on DB2 Universal Database for iSeries http : www.redbooks.ibm.com redbooks pdfs sg246503.pdf .. . IBM Knowledge Center : CREATE TRIGGER http : www.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzhctrigger.htm", "The way that source members are stored is unique to IBM i and they aren t really a DB2 construct as such although DB2 for i does keep limited information about source members modelled as partitions .", "In addition to the SEQUENCE noted by @X-Zero the IBM DB2 admin can put an auto-incrementing column called an IDENTITY in the database .", "I am working with IBM System i Version 7.1 .", "Given the issue is clearly DB2 for i vs generic DB2 I will-change to add the DB2i tag and DB2400 tag since the system may be ancient per use of the iSeries AS400 monikers .", "Concerning DB2 for i http : www-03.ibm.com systems power software i db2 are timestamp columns converted to UTC 0000 from the timezone specified in system setting QTIMZON", "Also what version of IBM i are you on", "When trying to Deploy a Stored Procedure for DB2 on IBM i an iSeries through Data Studio it says No Build Services found for routine .", "You should also mention the version of your IBM i system .", "This is DB2 .", "I have an existing query we use to pull data from DB2 for IBM i AS400 and I want to modify it so it just pulls the last 6 months of data rather than constantly changing the range .", "I am new to db2 .", "That setting is for deploying to z OS not IBM i .", "The current name is IBM i and that will help when searching for current information .", "If so you are looking at IBM i internal-storage for spooled printer reports .", "I read recently in the Memo To Users MTU ibm.com support knowledgecenter ssw ibm i 72 rzaq9 rzaq9.pdf http : www.ibm.com support knowledgecenter ssw ibm i 72 rzaq9 rzaq9.pdf that the POSITION scalar will be corrected with the DB2 for IBM i SQL in IBM i 7.2 to effect DB2 parity for the comma-delimited-arguments syntax the search-string and source-string will switch to be in that order a reverse from prior releases .", "The IBM i Knowledge Center is at www-01.ibm.com support knowledgecenter ssw ibm i welcome http : www-01.ibm.com support knowledgecenter ssw ibm i welcome Here is the 7.2 SQL Reference : www-01.ibm.com support knowledgecenter ssw ibm i 72 db2 http : www-01.ibm.com support knowledgecenter ssw ibm i 72 db2 rbafzintro.htm", ".. . .. . I suppose the issue may be specific to the DB2 for Z or the DB2 LUW and perhaps this topic was incorrectly tagged with DB2 for i", "Generally speaking an External SQL routine on IBM i is an HLL like RPG or Cobol that you d create separately and then issue the SQL CREATE PROCEDURE statement to register the program as a stored procedure to DB2 for i .", "I know there is a Django DB implementation supported by IBM but that requires the DB2 Connect product which is for us prohibitively expensive whereas the included Access ODBC driver comes no-charge with the OS .", "assuming datefield is a actual date data type .. . .. . Then all you need to do is use an ISO formatted date string .. . .. . DB2 for IBM i will always recognize 2014-01-01 as a date .", "I ve asked IBM to comment on this thread so we don t have to guess .", "so I m using the DB2 scripting from IBM i System i and old version where Collection is used instead of Schema .. . .. . and I noticed that its becoming tedious to having to keep typing .. . .. . select from mycollectionName.whatever for each table .", "I m new to DB2 .", "James I have a copy of DB2 v7 for the PC .", "How would you do this on DB2 for i", "The article you reference is for DB2 LUW and is not always accurate for DB2 for i .", "you tagged this as oracle but you want DB2 my solution was for oracle however you can replicate a KEEP in DB2 .", "DB2 for i is the database on the iSeries .", "IBM i comes with several tools you can use STRSQL on the green screen and IBM i Navigator on the PC as well as 3rd party tools like SQuirreL .", "Is there a query to check whether a table is journaled in DB2 or not .", "I use INavigor system for ad-hoc data-extraction from the DB2 database .", "NB iSeries DB2 SQL", "I did not research a DB2 for Z doc link .", "You might check with whoever bought your licenses you may have something from IBM already .", "DB2 would require a different solution .", "Search this forum for DB2 GROUP CONCAT alternatives .", "what version of DB2 are you running", "No idea why there are no change-flags : for 7.2 http : www.ibm.com support knowledgecenter ssw ibm i 72 db2 rbafzscaposition.htm for 7.1 http : www.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzscaposition.htm", "possible duplicate of Converting a string to a date in DB2 http : stackoverflow.com questions 4852139 converting-a-string-to-a-date-in-db2", "You may view the list of functions on the IBM i Information Center v6.1 http : pic.dhe.ibm.com infocenter iseries v6r1m0 index.jsp topic db2 rbafzintro.htm or the current v7.1 http : pic.dhe.ibm.com infocenter iseries v7r1m0 index.jsp topic 2Fdb2 2Frbafzintro.htm .", "SC41-3701 DB2 400 Programming is the book you need to get the details .", "@HappyCoding...note that that site caters to MS SQL Server not DB2 .", "You re on an iSeries - are you running over DB2", "Those who are familiar with the IBM-midrange environment tagged as such probably can read the code fine anyway .", "IBM added a Run SQL Statements RUNSQL https : www.ibm.com support knowledgecenter ssw ibm i 71 sqlp rbafyrunsql.htm lang en CL command at v7.1 .", "The thing that threw me was that I could find no evidence of DB2 on this box while looking through the licensed program screens .", "I ve never worked with DB2 on the PC so I can t offer any advice there .", "Can anyone help me out with an UPDATE SELECT statement on DB2 for i formerly known as the AS400", "Lastly DB2 for i allows Row-Value-Expressions so the following is also valid :", "Googling I ve found this DB2 Function declaration : .. . .. . Whats means @ symbol before the Variable Name", "I was able to locate an IBM Redbook Fast Path to iSeries Client Server Using iSeries OLE DB Support : SG24-5183 http : www.redbooks.ibm.com abstracts sg245183.html about using the OLEDB driver with V3R1 .", "The IBM i way to get access to that information is through the RTVMBRD http : www-01.ibm.com support knowledgecenter ssw ibm i 72 cl rtvmbrd.htm lang en CL command or equivalent API .", "select identity val local .. . from insert into .. . publib.boulder.ibm.com infocenter iseries v6r1m0 topic db2 http : publib.boulder.ibm.com infocenter iseries v6r1m0 topic db2 rbafztabref.htm I am not suggesting that IDENTITY VAL LOCAL is the best solution only one possible solution .", "For omission of the decimal point the DB2 for i SQL is probably the most like what is expressed as desired but then the leading zeroes are always trimmed http : www.ibm.com support knowledgecenter ssw ibm i 72 db2 rbafzscachar.htm .. . .. . .. .", "Maybe publib.boulder.ibm.com html as400 v4r4 ic2924 info db2 http : publib.boulder.ibm.com html as400 v4r4 ic2924 info db2 rbafomst111.htm you should tell us if you are using jdbc or jt400", "I m trying to access system tables so that I can get table structure data and I ve tried various commands that all seem to be written for later versions of DB2 .", "Although in this particular instance the article is more applicable to DB2 since MS SQL Server doesn t have the RVC support .", "Thus the DB2 for i SQL would have obtained a result-of the string 10000010 rather than either of 0010000010 .", "DB2 which is standard on an iSeries usually has something called a SEQUENCE http : publib.boulder.ibm.com infocenter iseries v6r1m0 index.jsp topic db2 rbafzcsequence.htm which you could query to generate your ids .", "working on a DB2 database using SQL in VBA to make some custom reports .", "DB2 has utilities to convert CYMD dates to other formats .", "DB2 can often automatically convert one type to another compatible type .", "The db is db2-400 in the following I need to add this part WHERE T01.OTTRNC IN 001 CQU RQU .. . .. . it should check against table Codes if ottrnc being read is in this table codes rather than this hard coding .", "Discussion here : dbforums.com http : www.dbforums.com showthread.php 1698118-DB2-SELECT-for-UPDATE-because-of-concurrency-issue", "It is part of the operating-system .", "I have seen a question asked regarding django-pyodbc with iSeries ODBC suggesting that it is possible but I have found no way to get it to work : Django inspectdb on DB2 database http : stackoverflow.com questions 25066866 django-inspectdb-on-db2-database .. . .. . My first question therefore is has anybody succeeded in getting this setup to work", "Thanks this helped me i was able to remove junk chracters coming in the output wher i query using DB2 client from unix .", "What i want is that is there a query in db2 using which i can get ouput as string or character for any field using the field name only .", "I am aware of the CURRENT TIMEZONE http : pic.dhe.ibm.com infocenter iseries v6r1m0 index.jsp topic db2 rbafzc2curtz.htm special register which leads me to believe no conversion is done automatically but I wanted to be sure .", "Most of what you want is available in SYSPARTITIONSTAT http : www-01.ibm.com support knowledgecenter ssw ibm i 72 db2 rbafzcatsyspstat.htm lang en .", "2 if you don t have ROW NUMBER available it can be simulated in DB2 using recursive SQL .", "Reference here : .. . .. . http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzdtstrng.htm", "Or perhaps there may be a n unstated concern about an apparent incompatibility betwixt the DB2 variants", "If DB2 for i doesn t like a VALUES expression as the seed for a recursive CTE you could also SELECT the seed value from SYSIBM.SYSDUMMY1 .", "It d be easier to help if we knew what you needed that isn t already included in the DB2 for i documentation http : www-01.ibm.com support knowledgecenter ssw ibm i 71 sqlp rbafyexsub4.htm lang en on the subject .", "The operating-system allocates these members as needed and clears them when done .", "But yeah scratch that idea the database doesn t even support HH12 in TIMESTAMP FORMAT http : www-01.ibm.com support knowledgecenter api content ssw ibm i 71 db2 rbafzscatsformat.htm .", "I m trying to lock db2 as400 record from java after retrieve the value.I want to block the record from other users .", "I need a iSeries DB2 SQL query which can transform this timestamp 1 1 1900 12 : 00 : 00 AM into 00 : 00 : 00 handling the 12h to 24h time convertion .", "Instead using only a space in the LOCATE function http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzscalocate.htm lang en you could use g .", "It might be a good idea to read about the correct syntax of compound statements in the manual http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzcompoundstmt.htm lang en .", "The docs also say this http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzdeclvar.htm lang en about DECLARE VARIABLE : Invocation This statement can only be embedded in an application program .", "QM manual is here https : www.ibm.com support knowledgecenter ssw ibm i 61 rzatc sc415212.pdf .. . .. . One last option is the db2 utility https : www.ibm.com support knowledgecenter ssw ibm i 71 rzahz rzahzdb2utility.htm available via QShell .", "I searched Stackoverflow for db2 number to-date and came up with convert decimal to-date during where clause http : stackoverflow.com questions 8606476 convert-decimal-to-date-during-where-clause 8607127 8607127 and How can I calculate the difference in days between two days stored as YYYYMMDD in a query", "http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzcatalog.htm .. . .. . The journal information is available in the Retrieve Object Description QUSROBJD API http : www-01.ibm.com support knowledgecenter ssw ibm i 71 apis qusrobjd.htm .. . .. . You could wrap that API in a UDF .", "In the Getting Started with DB2 Web Query for i Redbook found here : .. . http : www.redbooks.ibm.com abstracts sg247214.html .. . .. . Appendix B - Date and time functionality - has a section Using date conversion table to convert to dates .", "The REPLACE https : www-01.ibm.com support knowledgecenter mobile ssw ibm i 71 db2 rbafzscareplace.htm function can search for all occurrences of some string and substitute another in its place .", "For data-extraction you d want INSERT INTO tbl SELECT .. . FROM .. . .. . .. . For reporting SELECTs your best bet is to create a Query Manager query QMQRY object and form QMFORM object via Start DB2 UDB Query Manager STRQM which can then be run by the Start Query Management Query STRQMQRY command .", "This looks like it s DB2 for i....you might want to tag-it appropriately .. . .. . Assuming it is have you used the Run Explain option in iNav s Run SQL scripts to see if the DB recommends any new indexes", "If you have the DB2 LISTAGG function available you could try something like sorry don t have a way to test it so it may not be perfect : .. . .. . Notes : .. . .. . 1 There are alternatives to using LISTAGG like XMLAGG .", "DB2 and many other DBMSes allow recursive SQL http : it.toolbox.com blogs db2luw using-values-to-build-a-recursive-query-12601 through common table expressions CTEs .", "This was done as the ZS For IBMi default because many IBMi libraries are created with CRTLIB which does not enable the journaling needed for commit processing Which results in ALL PHP db2 scripts failing if i5 allow commit 1 ." ] }
{ "confidence": [ 69.68199157714844, 69.53962707519531, 64.67282104492188, 63.60658264160156, 62.200599670410156, 58.639583587646484, 57.04910659790039, 54.988990783691406, 54.94865417480469, 51.730438232421875, 50.20768737792969, 49.920570373535156, 48.24433135986328, 47.77427673339844, 47.76458740234375, 47.74887466430664, 46.47013854980469, 43.36901092529297, 41.600372314453125, 41.59232711791992 ], "content": [ "Question : Concerning DB2 for i http : www-03.ibm.com systems power software i db2 are timestamp columns converted to UTC 0000 from the timezone specified in system setting QTIMZON For example if QTIMZON is set to UTC -0400 does any conversion to UTC 0000 take place before inserting a row I ask because MySQL https : dev.mysql.com doc refman 5.5 en time-zone-support.html and PostgreSQL http : www.postgresql.org docs 9.1 static datatype-datetime.html both convert to from UTC to the operating-system-specified timezone . I am aware of the CURRENT TIMEZONE http : pic.dhe.ibm.com infocenter iseries v6r1m0 index.jsp topic db2 rbafzc2curtz.htm special register which leads me to believe no conversion is done automatically but I wanted to be sure . .. . Answer : DB 2 for i does not appear to perform any timezone conversion according to the following test : Comment : James what version on you on IIRC there s improved timezone support in later versions.. . Comment : @Charles That test was performed on V7R1 . Comment : note that there is a CURRENT TIMEZONE special register that allows you to convert to UTC . Comment : @JamesA yes it appears that is the case . I ve done similar tests but was hoping for a definitive answer . I ve asked IBM to comment on this thread so we don t have to guess .", "Question : I have a simple table with data as below : .. . .. . I want to select the data such that I can output it in 5 columns : .. . .. . Is there a nice way to do this NB iSeries DB2 SQL Comment : How do you propose to decide which values go into which columns What will determine which values go together in the same result row Comment : Arrival sequence . First 5 in first row second 5 in second row etc . Comment : There s no first or second or any other th row in a table unless you order them by something explicitly . Comment : What version of iSeries System i by the way Comment : Why do you want to output in 5 columns Is this something that could be solved in display-layer code especially if result order is unimportant .. . Answer : Do you actually want seperate COLUMNS or do you just want the data to be a single column that contains the values of five rows . If you want the later try something like : .. . .. . If you want the former tyy something like : .. . .. . See SQLFiddle at http : sqlfiddle.com 2 7dc42 9 .. . .. . Sorry just noticed you were looking for a solution for iSeries DB2 SQL not MySQL . DB2 would require a different solution . If you have the DB2 LISTAGG function available you could try something like sorry don t have a way to test it so it may not be perfect : .. . .. . Notes : .. . .. . 1 There are alternatives to using LISTAGG like XMLAGG . Search this forum for DB2 GROUP CONCAT alternatives . There are many examples . 2 if you don t have ROW NUMBER available it can be simulated in DB2 using recursive SQL . Comment : Yes no fancy GROUP CONCAT functions on iSeries : - Comment : what version of DB2 are you running Do you have you LISTAGG function available Comment : Operating on V6R1M0 Comment : @gwc iSeries is the former name for a hardware product line which is has been incorporated into Power Systems running an OS now called IBM i . DB2 is tightly integrated into the OS such that the DB2 version numbers reflect the OS and are totally unrelated to DB2 LUW or z OS release numbers . You may view the list of functions on the IBM i Information Center v6.1 http : pic.dhe.ibm.com infocenter iseries v6r1m0 index.jsp topic db2 rbafzintro.htm or the current v7.1 http : pic.dhe.ibm.com infocenter iseries v7r1m0 index.jsp topic 2Fdb2 2Frbafzintro.htm . Comment : @gwc I m not a MySQL expert but I don t see how this makes sense in that environment either . Remember Peter asked for 5 separate result columns so why would you be trying to concatenate anything", "Question : I m new to DB2 . Is there a way to query the tables to it will display the same data that STRPDM displays for a printed report i.e . : Member Type Creation Date Last Changed Date Time Records Deleted Records Text I m not a DBA but I have access to the SYSIBM schema since I m on the data team . I poked around the site and couldn t find a similar question . .. . Answer : Most of what you want is available in SYSPARTITIONSTAT http : www-01.ibm.com support knowledgecenter ssw ibm i 72 db2 rbafzcatsyspstat.htm lang en . The way that source members are stored is unique to IBM i and they aren t really a DB2 construct as such although DB2 for i does keep limited information about source members modelled as partitions . The IBM i way to get access to that information is through the RTVMBRD http : www-01.ibm.com support knowledgecenter ssw ibm i 72 cl rtvmbrd.htm lang en CL command or equivalent API . You can also see that via the DSPFD TYPE MBRLIST command which you can dump to a file via the OUTFILE parameter and then query via SQL.. . Comment : Thanks so much Buck that was extremely helpful Now that I can see this information it opens up another plethora of questions . One odd result from running this . There is a table listed multiple times over 100+ with no rows never used . Just running a simple select on SYSPARTITIONSTAT . Any thoughts Comment : Well without seeing what table you re talking about I can only guess . Is the library schema QSYS And the file table something like Q04079N223 If so you are looking at IBM i internal-storage for spooled printer reports . The operating-system allocates these members as needed and clears them when done . Clearing a member sets NUMBER ROWS to zero . Comment : No . The name was actually kind of normal . I grabbed a senior developer and asked if he recognized the tables . He told me they re member tables . Learning something every day . : - Thanks again", "Question : null .. . Answer : I am trying to get Django-pyodbc to work with DB2 on IBM i using the standard IBM i Access ODBC driver . I know there is a Django DB implementation supported by IBM but that requires the DB2 Connect product which is for us prohibitively expensive whereas the included Access ODBC driver comes no-charge with the OS . I have seen a question asked regarding django-pyodbc with iSeries ODBC suggesting that it is possible but I have found no way to get it to work : Django inspectdb on DB2 database http : stackoverflow.com questions 25066866 django-inspectdb-on-db2-database .. . .. . My first question therefore is has anybody succeeded in getting this setup to work And if yes can you share information on how you did it Thanks Richard", "Question : When trying to Deploy a Stored Procedure for DB2 on IBM i an iSeries through Data Studio it says No Build Services found for routine . in the status window . I see options in preferences- Data Management- SQL Development- Routines- Deploy Options- SQL - External . By default this is populated with Build utility name : DSNTPSMP in SYSPROC schema but that is not something that exists in iSeries . Does anyone know the equivalent schema and program for that on an iSeries .. . Answer : That setting is for deploying to z OS not IBM i . Generally speaking an External SQL routine on IBM i is an HLL like RPG or Cobol that you d create separately and then issue the SQL CREATE PROCEDURE statement to register the program as a stored procedure to DB2 for i .", "Question : Request : .. . .. . Please explain why the CREATE TRIGGER statement throws .. . .. . SQL0206 - Column or global variable PACKED FLD not found .. . .. . Sample Code : .. . .. . Complete Error Message : .. . .. . Message ID . . . . . . : SQL0206 Severity . . . . . . . : 30 Message type . . . . . : Diagnostic .. . .. . Message . . . . : Column or global variable PACKED FLD not found . Cause . . . . . : PACKED FLD was not found as a column of table N in N and was not found as a global variable in N . If the table is N PACKED FLD is not a column of any table or view that can be referenced . .. . Recovery . . . : Do one of the following and try the request again : .. . - Ensure that the column and table names are specified correctly in the statement . - If this is a SELECT statement ensure that all the required tables were named in the FROM clause . - If the column was intended to be a correlated reference qualify the column with the correct table designator . - If the column was intended to be a global variable qualify the name with the schema where the global variable exists or ensure the schema is in the path . Reference Sites : .. . .. . TechTip : More-Flexible SQL Triggers http : www.mcpressonline.com sql techtip-more-flexible-sql-triggers.html cm mc uid 12840944491714412830229 cm mc sid 50200000 1449818534 .. . Multiple event triggers support on IBM DB2 for i http : www.ibm.com developerworks ibmi library i-event triggers support .. . IBM Redbook : Stored Procedures Triggers and User-Defined Functions on DB2 Universal Database for iSeries http : www.redbooks.ibm.com redbooks pdfs sg246503.pdf .. . IBM Knowledge Center : CREATE TRIGGER http : www.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzhctrigger.htm .. . Answer : please try the long name and not the short name as far as I can re-call it references the long name COLUMN NAME in the SYSCOLUMNS table . Regards Roland Comment : The Shame The Shame is unbearable . Comment : @ZS6JCE don t feel bad . It s strange that an SQL trigger requires the use of the long name . I suppose it kind of makes sense . Inside the trigger you re not dealing with a table . You re dealing with a buffer of data . The system only generates one name for the elements .", "Question : I have 48 50 g in a as400 database and I want to query substr before the and before the space between 50 and g . .. . .. . Result I should get is 50 .. . .. . I m searching for hours now and try and try but no luck . any help is welcome . Thanks Comment : Use POSITION to find the and space characters . e.g . POSITION FIELDA will return the position of the character . You can then use these positions to build the appropriate SUBSTRING statement . Comment : AS 400 is an obsolete name . The current name is IBM i and that will help when searching for current information . The IBM i Knowledge Center is at www-01.ibm.com support knowledgecenter ssw ibm i welcome http : www-01.ibm.com support knowledgecenter ssw ibm i welcome Here is the 7.2 SQL Reference : www-01.ibm.com support knowledgecenter ssw ibm i 72 db2 http : www-01.ibm.com support knowledgecenter ssw ibm i 72 db2 rbafzintro.htm Comment : Thank you Buck you absolutly right I m so old school Comment : I read recently in the Memo To Users MTU ibm.com support knowledgecenter ssw ibm i 72 rzaq9 rzaq9.pdf http : www.ibm.com support knowledgecenter ssw ibm i 72 rzaq9 rzaq9.pdf that the POSITION scalar will be corrected with the DB2 for IBM i SQL in IBM i 7.2 to effect DB2 parity for the comma-delimited-arguments syntax the search-string and source-string will switch to be in that order a reverse from prior releases . No idea why there are no change-flags : for 7.2 http : www.ibm.com support knowledgecenter ssw ibm i 72 db2 rbafzscaposition.htm for 7.1 http : www.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzscaposition.htm .. . Answer : You want to use the LOCATE function.. . Assuming that the first space is the one you want the following will work : .. . .. . However if this is an often needed function . Consider creating a user defined function UDF that will parse and split the string in this manner . Comment : A minor edit adding - 1 after the last LOCATE might be needed . As coded the result is three characters 50 including trailing blank . Otherwise this is good . Comment : @user2338816 you are correct I edited my answer . Comment : I just realize that I have two space in the string one at the beginning and the one between after 50 and G . How can I remove the first space so the locate and substring will work Comment : Instead using only a space in the LOCATE function http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzscalocate.htm lang en you could use g . Adding the g to the search-substring might be enough to make it recognize which space you want . Or you could use the start-position parameter to tell LOCATE where to start searching . You d copy the LOCATE .. . function to that parameter because that s where you want it to begin searching . Comment : @user2844413 Since you re new here don t forget to mark the answer accepted whenever it helped most in understanding and solving the problem . See also How does accepting an answer work http : meta.stackexchange.com questions 5234 how-does-accepting-an-answer-work 5235 5235", "Question : null .. . Answer : In an SSIS package I am developing I have an execute SQL task which uses an ODBC Connect to a database on iSeries AS400 the task calls a stored procedure : .. . .. . The stored procedure takes 4 parameters the first 2 input and last 2 output . The Data types of the parameters are char 8 integer decimal 7 0 and char 80 respectively . The parameters are mapped to the variables in the package that match the data types . When I run the package I get the following error message on the Execute SQL Task : .. . .. . Execute SQL Task Error : Executing the query CALL DOCTRACK.CORRFEED failed with the following error : IBM System i Access ODBC Driver DB2 for i5 OS CEE9901 - Application error . MCH1202 unmonitored by CORRFEED at statement 0000000020 instruction X 0000 . . Possible failure reasons : Problems with the query ResultSet property not set correctly parameters not set correctly or connection not established correctly . Does anyone have any ideas what may be causing the error Comment : At statement 20 of the stored procedure an attempt to refer to a BCD data type detected the value is not valid . We do not know the DDL to CREATE PROCEDURE nor do we know what is stmt 20 not even if the procedure is SQL or EXTERNAL . Given the issue is clearly DB2 for i vs generic DB2 I will-change to add the DB2i tag and DB2400 tag since the system may be ancient per use of the iSeries AS400 monikers . ref : msg MCH1202 Decimal data error . Cause : The sign or the digit codes of the packed or the zoned decimal operand is in error . Valid signs are hex A-F valid digit range is hex 0-9 . Comment : The stored procedure works fine when run in the iseries with values for the parameters provided . I have the definition of the stored procedure in front of me . I am not sure which one is statement 20 . the problem is running from my sisis package created using SqlServer 2012 data tools application . I tried changing the connection-manager to an ADO.NET connection using ODBC Dataprovider . Still got the same error . As I recall for ado.net connections I have to change the s to named parameters . Comment : I also do not have the stored procedure in front of me so clearly I will not know what is stmt 20 either . Obviously the problem relates to the data passed for the third parameter marker for the decimal 7 0 argument and likely the stmt 20 is effectively 20 CORRFEED.P3 decimal 7 0 argv 3 . So irrespective the ability to CALL with literals constants the data from the client is conspicuously problematic . Why not try a local CALL with parameter markers using embedded SQL if everything could be shared vs kept secret other easier or better suggestions might be forthcoming .", "Question : I use INavigor system for ad-hoc data-extraction from the DB2 database . Only issue is that when it comes to automation . Is there a way I could automate the SQL code to be run on a specific time I know there is Advance Job Sheduler but I m not sure how the SQL can be added to the Sheduler . Any one who can help Comment : ...there are both paid and free reporting tools from a number of vendors that will work with almost any database and have scheduling capabilities you re not necessarily locked to just the on-the-box utilities . You might check with whoever bought your licenses you may have something from IBM already . .. . Answer : IBM added a Run SQL Statements RUNSQL https : www.ibm.com support knowledgecenter ssw ibm i 71 sqlp rbafyrunsql.htm lang en CL command at v7.1 . Prior to that you could store SQL statements in source files and run them with the Run SQL Statements RUNSQLSTM https : www.ibm.com support knowledgecenter ssw ibm i 71 cl runsqlstm.htm lang en command . Neither of the above allow an SQL Select to be run by itself . For data-extraction you d want INSERT INTO tbl SELECT .. . FROM .. . .. . .. . For reporting SELECTs your best bet is to create a Query Manager query QMQRY object and form QMFORM object via Start DB2 UDB Query Manager STRQM which can then be run by the Start Query Management Query STRQMQRY command . Query Manager QM is SQL based unlike the older Query 400 product . QM manual is here https : www.ibm.com support knowledgecenter ssw ibm i 61 rzatc sc415212.pdf .. . .. . One last option is the db2 utility https : www.ibm.com support knowledgecenter ssw ibm i 71 rzahz rzahzdb2utility.htm available via QShell . Comment : don t enable the user . This is not how business works . Comment : @danny117 It s how many most good businesses work . It s the users data and they should be able to access it however their job requires .", "Question : Can anyone help me out with an UPDATE SELECT statement on DB2 for i formerly known as the AS400 I am trying to update one table based upon the info . in another table . Thank you Comment : I think you need to be a bit more detailed in your question . Do you know how to do this with a different flavor of SQL Comment : Please post the code you tried and a description of the columns in the various tables you want to use . Just click edit to edit the text of your question thanks Also what version of IBM i are you on Comment : It d be easier to help if we knew what you needed that isn t already included in the DB2 for i documentation http : www-01.ibm.com support knowledgecenter ssw ibm i 71 sqlp rbafyexsub4.htm lang en on the subject . Can you clarify .. . Answer : The above assumes that either - There s a row in tblb for every key in tbla - or cola allows NULL values .. . .. . If the assumption is false you ll get an error about cola not allowing NULL . You ll need to either use COALESCE to provide for a default or not attempt to update rows in tbla that don t have a match in tblb . Lastly DB2 for i allows Row-Value-Expressions so the following is also valid :", "Question : Crazy question . I know . Here s the scenario : .. . .. . My client has several ColdFusion websites that all hit the same library on the same iSeries database . Let s say for argument s sake the following SQL query can be run from any of these websites : .. . .. . I know there s no CFQUERYPARAMs etc . let s just assume for simplicity s sake that the above query is A-Ok .. . .. . I could generate the Id by querying the table prior to the insert to get the maximum value then incrementing it like so : .. . .. . But I worry about two users hitting the table at the same exact time and both getting the same new Id . Any thoughts Comment : You re on an iSeries - are you running over DB2 Comment : DB2 for i is the database on the iSeries . It is part of the operating-system . Why is this question tagged tsql It seems to have drawn a SQL Server answer from @KM . .. . Answer : In addition to the SEQUENCE noted by @X-Zero the IBM DB2 admin can put an auto-incrementing column called an IDENTITY in the database . Comment : Unfortuanately I have a feeling that the OP needs the value of the id genereated in his application to reference for further INSERT s in the transaction . If you don t have a unique natural-key available a data-change-table-reference should be used . Since having the table manage its own ids is usually a good idea can you supply the necessary retrieval syntax for the OP to use Comment : Right so after doing an INSERT INTO one would test SQLSTATE and if normal one would use VALUES IDENTITY VAL LOCAL INTO : generatedID publib.boulder.ibm.com infocenter iseries v6r1m0 http : publib.boulder.ibm.com infocenter iseries v6r1m0 index.jsp topic db2 rbafzscaidentity.htm Comment : I m a little twitchy about that function given that it may not be the id you expect - say if the table you re inserting into is actually a view with INSTEAD OF triggers to several tables . Comment : I am at v5.4 and cannot test it but at v6.1 I d use a data change table reference . select identity val local .. . from insert into .. . publib.boulder.ibm.com infocenter iseries v6r1m0 topic db2 http : publib.boulder.ibm.com infocenter iseries v6r1m0 topic db2 rbafztabref.htm I am not suggesting that IDENTITY VAL LOCAL is the best solution only one possible solution . I wish the OP would come back and add to the discussion .", "Question : We have a VERY old 400 on the order of 10-15 years old and I need to migrate the data out of it so it can be retired . I have ODBC connectivity to it through a program called QTODBC that is reporting that the host that I m connecting to is version 03.01.0000 . I m trying to access system tables so that I can get table structure data and I ve tried various commands that all seem to be written for later versions of DB2 . What were the system tables back way back then And how would I pull up schema names assuming they had them with this old of a version .. . Answer : Your best bet for V3R1 will be to use the DSPFFD FILE .. . OUTPUT OUTPUT OUTFILE LIB FILE command from a terminal session to create a file of field definitions . There s a high chance with a system that old that the files may not even be externally described . This means that the file layout is hardcoded in each program that access the file . You can recognize this situation if you only find a few fields named F00001 K00001 etc . Comment : Thank you James . I was hoping I could do something at the ODBC level I ll fire up a 5250 session and see what I can get . The tables all 1600 of them fortunately not all populated seem to be descriptive there are also views . The thing that threw me was that I could find no evidence of DB2 on this box while looking through the licensed program screens . Comment : Sorry I couldn t provide more information . I found the jewel case for my old V3R1 softcopy library but the discs are missing . SC41-3701 DB2 400 Programming is the book you need to get the details . I assume you couldn t retrieve the information from SYSIBM TABLES SYSIBM COLUMNS etc Comment : James I have a copy of DB2 v7 for the PC . Do you think it could directly access the 400 v3 The technique that I m using is very clunky : import tables in to Microsoft Access then export them up to SQL Server . It wouldn t be bad except there s 1600 tables in the 400 system . Comment : I ve never worked with DB2 on the PC so I can t offer any advice there . I was able to locate an IBM Redbook Fast Path to iSeries Client Server Using iSeries OLE DB Support : SG24-5183 http : www.redbooks.ibm.com abstracts sg245183.html about using the OLEDB driver with V3R1 . You can use the AS 400 OLEDB driver with DTS SSIS to drive your transfers directly from SQL Server . Comment : Thank you I ll check it out .", "Question : null .. . Answer : I m getting a conversion problem using the euro symbol in a input parameter from a stored procedure . This is the code I m using : .. . .. . The detailed error is : .. . .. . The SQL code is blank exception occurs before executing command . Enviroment : .. . .. . Windows 7 VS2010 .Net 4.0 framework .. . IBM DB2 for i .NET Provider 13.0.0.2 - V7R1M0 .. . .. . Regards Comment : It is probably an encoding problem.. . Probaby the parameter is defined as ASCII or ASCII is defined as the default encoding . Comment : The parameter for the stored procedure on the server is probably defined using the default EBCDIC encoding but with an older CCSID that does not have Euro support . The SYSPARMS data should show the definition of the including CCSID of the character string parameter number four . However by explicitly specifying for example a CCSID 1144 instead of a likely CCSID 280 as default EBCDIC encoding on the CREATE PROCEDURE then I expect the conversion error should be resolved .", "Question : I am writing to you because I can t use the operator to-date on an AS400 database . With Oracle database I use : .. . .. . But with AS400 I get an error : .. . .. . Incompatible operator .. . .. . Is there another function I may use to replace to-date Comment : possible duplicate of Converting a string to a date in DB2 http : stackoverflow.com questions 4852139 converting-a-string-to-a-date-in-db2 Comment : I want to specify that I want to put it in a where condition. . Comment : In your WHERE condition are you trying to convert a database value stored as dd mm yyyy into a date for the comparison or do you plan to compare against a specific date such as dates less than 06 30 2014 .. . Answer : assuming datefield is a actual date data type .. . .. . Then all you need to do is use an ISO formatted date string .. . .. . DB2 for IBM i will always recognize 2014-01-01 as a date . But if you really want to explicitly convert it yourself then there s two functions .. . .. . CAST is prefered for portability . I recommend sticking with ISO format though the system will recognize USA mm dd yyyy and EUR dd.mm.yyyy . Reference here : .. . .. . http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzdtstrng.htm Comment : Hello thanks for your response . Can you tell me how to use CAST Because I have not been able to use it . I put it in the WHERE condition like CAST 2014-01-01 to DATE or CAST datefield to DATE but it doesn t work . Thanks lot Comment : @Olivierm67 are you sure that the date field you re comparing is truly a date field Old-school AS 400 programmers liked to store dates as numeric fields . Comment : What does doesn t work mean exactly Do you get an error Comment : @Olivierm67 It would help if you 1 gave us the database definition of datefield 2 told us precisely what you want to accomplish and 3 included any error message IDs and or SQLSTATE SQLCODE if some error was returned . Otherwise we re mostly in the dark .", "Question : so I m using the DB2 scripting from IBM i System i and old version where Collection is used instead of Schema .. . .. . and I noticed that its becoming tedious to having to keep typing .. . .. . select from mycollectionName.whatever for each table . is there anyway I can select from multiple tables and have it display all the information in one big table example : .. . .. . I have these two tables and I ve created my Insert statement for them . Now I want to select them and view them across a big table instead of having to switch tabs in Run Script from System i Navigator . Is this possible Is it better to make individual select statement for each table i create Would I do something along the lines of this EDIT .. . .. . Okay so I kinda got lucky and tried this .. . .. . AND it almost worked...it shows me all the tables and all the columns in each tab EXCEPT what was inserted the record . All help is greatly appreciated Comment : What happens when you try that Comment : It gives me an error WHERE umalik8.Adults and I m assuming its the same case with Employee because it stops at adults error number sql0206 column or global variable ADULTS not found . wasn t found as a column of any table . I read the error-code online but just confused me more lol . Because if i did Select From umalik8.adults the table will be displayed . However if I do it like this nothing happens : .. . Answer : Am not sure this is possible but this http : publib.boulder.ibm.com infocenter dzichelp v2r2 index.jsp topic com.ibm.db2z10.doc.intro src tpc db2z joindatafromtables.htm tutorial about joins could be a good read . Or this http : www-01.ibm.com support knowledgecenter ssw ibm i 72 sqlp rbafyjoin.htm for your iSeries IBM i edition of DB2 . Comment : had no idea about Joins this looks like what I m trying to do i ll try it out thanks Comment : You are welcome . Comment : Alright so I ve come to the conclusion with some trial and errors looks like this is the best way to do it using the Join methods inner and outer but of course logically we should join tables with other tables that make sense LOL....joining registered adults with employees for a daycare was odd... . thanks FranklySpeaking Comment : I would think that what you have is an ancillary relationship here . Presumably all employees are considered adults so an employees address could be found in the adults table where the adult num emp num . You might have other adult records for parents or guardians of the children in the daycare .", "Question : Morning all Trying to create a table of dates for my iSeries . Need only a column with a row for each date starting at 1 1 2014 and going until 12 31 2115 so I have about a hundred more years . I would like to use SQL and have the date in CYYDDMM format . I ve tried to modify several posts from here and some other sites but had no luck . It appears the SQL required to get what I need is past my limited knowledge . The table has been created with one column shift date that is an integer . Any assistance is greatly appreciated Thanks in advance Matt Comment : show us what you have tried . Comment : Tried : the comment from marc s at stackoverflow.com questions 4737378 http : stackoverflow.com questions 4737378 generate-sql-temp-table-of-sequential-dates-to-left-outer-join-to and changed the date formats to what I needed . No luck.. . my visual query-builder didn t like the post from Gilm at stackoverflow.com questions 7812986 http : stackoverflow.com questions 7812986 easiest-way-to-populate-a-temp-table-with-dates-between-and-including-2-date-par as it appears it doen st work well with CTE . Comment : Then stop using the tool that prevents you from doing what you need to do instead of helping . You should also mention the version of your IBM i system . Comment : You re going to want an actual DATE column plus a whole bunch of other stuff like extracting year month and day-of-month . A prime benefit of a date table is the other columns which make certain types of analysis really easy . .. . Answer : Based on the links provided by @Fred and @Charles here is an SQL statement that worked on my V7.2 machine : .. . .. . You don t need to execute this from within a Microsoft tool . IBM i comes with several tools you can use STRSQL on the green screen and IBM i Navigator on the PC as well as 3rd party tools like SQuirreL . Basically anything that will directly execute an SQL statement will work including writing your own .NET program . You could even have the RPG programmers embed this into a program and run it from there . Comment : Most efficient answer of the three given and clearly the easiest . An elegant example of the power of recursive CTEs . Comment : I even tried changing your CASE expression to use a simple-when-clause http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzcaseexp.htm as CASE substr char dt 2 1 WHEN 0 THEN 1 .. . but that only slowed it down .", "Question : working on a DB2 database using SQL in VBA to make some custom reports . I came up with the below query but it took like 45-minutes to run with 80 000 results.. . the table BILLPRC probably has twice that in total before the WHERE clause . Just wondering if there is a better way to write the query to speed it up . This might be a pretty ambiguous question so I can explain further if you need more info . I have a feeling there isn t given the amount of records and CASEs being checked . Comment : Can you use an indexed view Comment : Best first thing to do might be to move the files out of QS36F and create actual relational tables . The System 36 environment isn t really appropriate for high-performing SQL maybe not even for medium-performing . Take a good close look at the actual file definitions . Comment : Stuff like b.BLREC b.BLPPGM p.PPREC p.PPPGM means you have a multi-part key which violates good normalization practices . It also means you can t use indices so the query will be slow . Can you just compare columns against each other Your SELECT CASE doesn t explicitly list the case-when p is null . DB2 has utilities to convert CYMD dates to other formats . Your ON CASE works out to be an OR condition which will help some . Comment : Access paths indices can be used they just need to be matching expression and matching typed derived-key AccPth and querying on a release TR-level of the system where the SQL Query Engine enables join implementations using such derived keys . The missing ELSE on the CASE expression means when P IS NULL the effect is the NULL value . I would not be surprised if ON b.BLRECT IN I P AND b.BLRECT I AND b.BLREC i.IMFGR i.ICOLOR i.IPATT OR b.BLRECT P AND b.BLREC i.IPRCCD was able to be optimized better than the ON CASE .. . . .. . Answer : For reporting purposes use a materialized query table http : www.ibm.com developerworks data library techarticle dm-0509melnyk unless if you can t really afford the CPU time . I know it s a bit lazy but MQTs are meant for when you are okay with getting for instance hourly updated results and don t want to start normalizing and optimizing your database . You have a working logic and you apparently understand it so go with it . Comment : In what way do you suggest would an MQT be easked or more efficient in a case like this The article you reference is for DB2 LUW and is not always accurate for DB2 for i . This question is for DB2 running on IBM i which has somewhat different features than DB2 LUW . For example MQT s must be MAINTAINED BY USER so there is no automatic refresh by the system .", "Question : I m not the best at SQL so I need some help . I have an existing query we use to pull data from DB2 for IBM i AS400 and I want to modify it so it just pulls the last 6 months of data rather than constantly changing the range . I believe the OHSTDT field is saved on the server as YYYYMMDD . Thanks for your help Comment : possible duplicate of How to select last 6 months from news table using MySQL http : stackoverflow.com questions 8941377 how-to-select-last-6-months-from-news-table-using-mysql Comment : I searched Stackoverflow for db2 number to-date and came up with convert decimal to-date during where clause http : stackoverflow.com questions 8606476 convert-decimal-to-date-during-where-clause 8607127 8607127 and How can I calculate the difference in days between two days stored as YYYYMMDD in a query http : stackoverflow.com questions 10522232 how-can-i-calculate-the-difference-in-days-between-two-days-stored-as-yyyymmdd-i 10522735 10522735 .. . Answer : Build or download a function that converts Date types to Numeric . iDate is the one I use : .. . www.think400.dk downloads.htm .. . .. . Then your query becomes : .. . .. . Note that the alternate form : .. . .. . which uses the iDate function to convert from a numeric date to a date date is not the prefered method . It will work and you ll find lots of examples that do this . But it performs poorly for two reasons . more conversions .. . indexes over OHSTDT can not be used . Both the iDate function and the ConvertToIDate function are available in the iDate library you can download at the link above .", "Question : Forum . I am working with IBM System i Version 7.1 . I am having issues in the source code with the following merge statement so I copied it over to the database client to utilize the Run SQL Scripts functionality . Rather than replacing the coded in @Variables in the statement I wanted to declare local-variables so that I could test the statement as is . The added the following declare and set lines and I get the following error : .. . .. . declare @groupId smallint .. . .. . SQL State : 42601 .. . Vendor Code : -104 .. . Message : SQL0104 Token SMALLINT was not valid . Valid tokens : DYNAMIC SENSITIVE ASENSITIVE INSENSITIVE . Cause . . . . . : A syntax-error was detected at token SMALLINT . Token SMALLINT is not a valid token . A partial list of valid tokens is DYNAMIC SENSITIVE ASENSITIVE INSENSITIVE . This list assumes that the statement is correct up to the token . The error may be earlier in the statement but the syntax of the statement appears to be valid up to this point . Recovery . . . : Do one or more of the following and try the request again : -- Verify the SQL statement in the area of the token SMALLINT . Correct the statement . The error could be a missing comma or quotation mark it could be a misspelled word or it could be related to the order of clauses . -- If the error token is correct the SQL statement because it does not end with a valid clause . .. . Processing ended because the highlighted statement did not complete successfully .. . .. . I have tried adding semicolons to the end of each line and begin and end statements and still no success . Below is the whole statement I am trying to execute : .. . .. . Any help is appreciated . Please let me know if I may provide anymore information . Comment : It might be a good idea to read about the correct syntax of compound statements in the manual http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzcompoundstmt.htm lang en . Comment : Not only syntax . The docs also say this http : www-01.ibm.com support knowledgecenter ssw ibm i 71 db2 rbafzdeclvar.htm lang en about DECLARE VARIABLE : Invocation This statement can only be embedded in an application program . .. . Answer : I may have found an answer here : http : stackoverflow.com a 4451159 2272357 .. . .. . I have yet to verify it works successfully . I believe it may be a local issue though .", "Question : Forum . I am working with IBM System i Version 7.1 . I am running into a issue when updating more than one column in a merge statement . The following statement works when setting one column : .. . .. . The same statement no longer works when I add an additional set line : .. . .. . I get the following error message : .. . .. . merge into database.table as t using values cast 99 as smallint cast dave as varchar 40 cast 1 as smallint as caz .. . group id group name queued calls above tasa .. . on t.group id caz.group id when matched then update set t.group name caz.group name set t.queued calls above tasa caz.queued calls above tasa .. . when not matched then insert group id group name queued calls above tasa .. . values caz.group id caz.group name caz.queued calls above tasa .. . .. . SQL State : 42601 .. . Vendor Code : -104 .. . Message : SQL0104 Token T was not valid . Valid tokens : . Cause . . . . . : A syntax-error was detected at token T . Token T is not a valid token . A partial list of valid tokens is . This list assumes that the statement is correct up to the token . The error may be earlier in the statement but the syntax of the statement appears to be valid up to this point . Recovery . . . : Do one or more of the following and try the request again : -- Verify the SQL statement in the area of the token T . Correct the statement . The error could be a missing comma or quotation mark it could be a misspelled word or it could be related to the order of clauses . -- If the error token is correct the SQL statement because it does not end with a valid clause . .. . Processing ended because the highlighted statement did not complete successfully .. . .. . Any help is appreciated . Please let me know if I may provide more information . Comment : What do you mean by no longer works Do you get an error or you don t get the expected result Comment : Thanks for that I edited the question to include the error message details I had received . .. . Answer : @HappyCoding is correct you only need one SET statement . Another alternative for the WHEN MATCHED : Comment : Thank you for your input . Regarding our answers and software best practices do you know if one format is preferred more than the other Comment : The alternative format is newer and known as a Row Value Constructor RVC or Row Value Expression https : stackoverflow.com tags row-value-expression info Support might be a bit hit or miss if you re trying to write code that uses multiple DBs Comment : Thanks for the info @Charles . I also found the following article as a good reference : sqlmag.com sql-server row-value-constructor http : sqlmag.com sql-server row-value-constructor Comment : @HappyCoding...note that that site caters to MS SQL Server not DB2 . Although in this particular instance the article is more applicable to DB2 since MS SQL Server doesn t have the RVC support ." ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION
xmlnode@s@97
xmlnode -- xml document unit element entity attribute text comment notation even document or it @placeholder fragment .
{ "confidence": [ 38.208152770996094, 37.1561164855957, 34.87009048461914, 34.265106201171875, 33.64562225341797, 31.234960556030273, 30.82819366455078, 30.372039794921875, 30.306293487548828, 29.785144805908203, 29.68820571899414, 29.285295486450195, 28.810813903808594, 28.227609634399414, 28.227609634399414, 28.09615707397461, 28.09615707397461, 27.51593780517578, 27.46010971069336, 26.894100189208984, 26.28435707092285, 26.16048812866211, 26.087461471557617, 26.01003646850586, 25.84644889831543, 25.829593658447266, 25.592506408691406, 25.300683975219727, 25.23418426513672, 25.139739990234375, 25.139739990234375, 25.139156341552734, 25.139156341552734, 25.103408813476562, 25.030559539794922, 25.030559539794922, 25.030559539794922, 25.030559539794922, 25.030559539794922, 25.030559539794922, 24.92506217956543, 24.78873062133789, 24.787254333496094, 24.282936096191406, 24.145957946777344, 24.145957946777344, 24.145957946777344, 24.069353103637695, 23.997539520263672, 23.997539520263672, 23.997539520263672, 23.997539520263672, 23.997539520263672, 23.97347640991211, 23.97347640991211, 23.97347640991211, 23.900272369384766, 23.836467742919922, 23.770755767822266, 23.248958587646484, 23.054004669189453, 22.976661682128906, 22.976661682128906, 22.7065372467041, 22.581817626953125, 22.581817626953125, 22.581817626953125, 22.581817626953125, 22.450366973876953, 22.450366973876953, 22.450366973876953, 22.450366973876953, 22.450366973876953, 22.450366973876953, 22.097265243530273, 22.068347930908203, 22.068347930908203, 21.996923446655273, 21.979110717773438, 21.821937561035156, 21.821937561035156, 21.754444122314453, 21.73563575744629, 21.631969451904297, 21.615524291992188, 21.524738311767578, 21.277666091918945, 21.270050048828125, 21.270050048828125, 21.266437530517578, 21.186622619628906, 21.131866455078125, 21.131866455078125, 21.061443328857422, 20.924938201904297, 20.830326080322266, 20.627906799316406, 20.539886474609375, 20.490278244018555, 20.474929809570312 ], "content": [ "Thus the DOM spec http : www.w3.org TR 1998 REC-DOM-Level-1-19981001 level-one-core.html ID-1590626202 defines the following types of nodes : .. . .. . Document -- Element maximum of one ProcessingInstruction Comment DocumentType .. . DocumentFragment -- Element ProcessingInstruction Comment Text CDATASection EntityReference .. . DocumentType -- no children .. . EntityReference -- Element ProcessingInstruction Comment Text CDATASection EntityReference .. . Element -- Element Text Comment ProcessingInstruction CDATASection EntityReference .. . Attr -- Text EntityReference .. . ProcessingInstruction -- no children .. . Comment -- no children .. . Text -- no children .. . CDATASection -- no children .. . Entity -- Element ProcessingInstruction Comment Text CDATASection EntityReference .. . Notation -- no children .. . .. . The XML Infoset http : www.w3.org TR xml-infoset infoitem used by XPath has a smaller set of nodes : .. . .. . The Document Information Item .. . Element Information Items .. . Attribute Information Items .. . Processing Instruction Information Items .. . Unexpanded Entity Reference Information Items .. . Character Information Items .. . Comment Information Items .. . The Document Type Declaration Information Item .. . Unparsed Entity Information Items .. . Notation Information Items .. . Namespace Information Items .. . .. . XPath has the following Node types : .. . .. . root nodes .. . element nodes .. . text nodes .. . attribute nodes .. . namespace nodes .. . processing instruction nodes .. . comment nodes .. . .. . The answer to your question What is the difference between an element and a node is : .. . .. . An element is a type of node .", "How do I go about getting an XmlNode instance from that kind of XML fragment", "An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents .", "Possibly attributes is an unfortunate element name in an XML document", "An xml document is made of nested elements .", "The result-of a web method is included in the SOAP document which is a XML Document .", "A node can be a number of different kinds of things : some text a comment an element an entity etc .", "To better illustrate here s a sample xml document .", "Your comment .. . comment ends up in a special XmlNode type called an XmlElement .", "Every XmlElement is XmlNode but not every XmlNode is XmlElement .", "Here is the simplified version of my xml file : .. . .. . I want to add the following xmlNode to Space node after Name element .", "Example .. . Here s an example fragment I m trying to make an XMLNode out of : .. . .. . When I try to load it into an XmlDocument http : msdn.microsoft.com en-us library system.xml.xmldocument.aspx instance that s my attempt to get an XmlNode I get the following XML Exception : .. . .. . st1 is an undeclared namespace .", "Did you try the obvious XmlNode node xmlDoc.SelectSingleNode StatusDescription text and XmlNode node xmlDoc.SelectSingleNode ResourceSets ResourceSet", "I am using XmlDocument and XmlNode to manipulate a xml file .", "As the InnerXml also contains XML you can access it using the methods of XmlNode .", "I m inserting an image into an Xml document such that it can be opened with Microsoft Word .", "I have following scenario : I have a XML-Document e.g .", "Based on the XML posted Location is an element not attribute.. .", "A node is defined http : www-01.ibm.com software globalization terminology n.html as : .. . .. . the smallest unit of a valid complete structure in a document .", "XmlElement is just one kind of XmlNode .", "I was wondering if loading the string buffer in a separate in-memory XML document and then getting the node pointer from there will work on my original document .", "i have an xmlnode node2 .", "But if you want to add an XML fragment anyways you should stick with InnerXml or ImportNode .", "Such as ID attribute of AID element and ID attribute of Variable element .", "This strong dependency between the tree view and the list display should be eliminated by binding nodes in the treeview to nodes of the XML document so that the raw Xml data can be used to display text in the list.What should i write here", "@jdweng if the conformance level is set to fragment it is then it will work fine .", "A node can be an element node an attribute node a text node or any other of the node types explained in the Node types chapter .", "Is there a similar way to construct a XmlNode object", "I have a string which contains the XML representation of an XML node which I intend to insert in a XML document loaded in memory .", "Are there going to be multiple GroupNode nodes in the document", "This way will keep the document consistent and valid .", "Purpose : I plan to Create a XML file with XmlTextWriter and Modify Update some Existing Content with XmlNode SelectSingleNode node.ChildNode", "I need to somehow restructure the XML using XmlDocument and XmlNode so that it matches the below .", "I m working with XmlDocument and XmlNode .", "I have an XML Document that stores all sorts of information about users of a system .", "I want all the blank lines to be removed in the XML below before writing it to document .", "You re missing xmlns : ener declaration on your XML document : .. . .. . Fix that and you ll be able to use something like this :", "For this I have tried xsl : variable name LookUpXml select document sample2.xml xsl : value-of select LookUpXml saxon : evaluate nodePath .", "Example : .. . .. . I am using a Serializer to get the data from XML document to store it in an object .", "Why don t you just have an XML template with no Items and add the Items dynamically in the document as needed", "If i do what you wrote i got each time i update the file with new content xml version 1.0 and more than one xml version 1.0 in a xml document is not valid xml .", "The xmlNode respresent an object and I am trying to work out the best way to Deserialize the xmlNode in the object", "Attributes in XML is used to reference something else i.e bar is the name of the attribute which value is baz in the following XML element foo bar baz .", "I have an xsd-generated class from a rich-text field as follows : .. . .. . Note that the class is generated as an array of XMLNode not sure why .", "I wanted to add a xmlNode in a parent but at the top beginning .", "The usual solution is to store the XmlNode in the Tag property : .. . .. . and in the AfterSelect", "Now you need to convert a XmlNode to your class .", "I solved this myself using the 2nd approach : .. . .. . 1 Create an in-memory xml document based on IXMLDOMDocument3 interface and load the xml string in there .", "This is sufficient for Word to believe that the document is corrupt and refuse to open .", "How are you adding the node to your document", "We need to see an instanceof your document .", "I m trying to get specific nodes in the document .", "I have a Node from one Document .", "The prefix name you use in your code and the one in the XML document do not have to match e.g .", "The main propose of XmlDocument is to provide an easy way to work with XML documents while making sure the outcome is a well formed document .", "You definitely should be away from treating that XML document as a string by trying Replace things stick with the framework and you ll be ok .", "foo This is Text foo .. . .. . You have a foo Element which is also a Node as Element inherits from Node and a Text Node This is Text that is a child of the foo Element Node", "You should not use XMLNode .", "An element is a type of node as are attributes text etc .", "While using the XDocument system for XML is preferred over XmlDocument here is one way to do it using the XmlNode object you asked about .", "In summary : the document isn t corrupt because of the string xmlns it is corrupt because a Relationship element must have a namespace of http : schemas.openxmlformats.org package 2006 relationships .", "XMLNode works only with the old flash.xml.XMLDocument .", "XMLNode is depricated in AS3 and for usage with XMLDocument .", "The creates absolute pathing in the XML document so it somehow or another retrieves the first node every time .", "Message is a class that get populated from the XmlNode sent to the constructor .", "I have an XmlNode and its OuterXml is the next code I have posted .", "The reason is because I need to pass an XMLNode instance to a method .", "I am trying to append an xmlNode in different places of xmlDocument .", "What are differences between importNode and adoptNode on Document object in JavaScript", "w3schools importNode reference : .. . .. . Note : The original node is not removed from the other document .", "Also the mapping has the Documento namespace but there is no trace of that in your document .", "@MartinMorgan - I didn t realize it was possible to use XPath on a document by treating it as an index .", "I want to take that Node and turn it into the root node of a new Document .", "You need to save the document in RAM somewhere to see the effect .", "3 Now go back to your orinial xml document where you want the node placed and load it again as a IXMLDOMDocument3 interface .", "I have a xmlnode list where I want to remove elements after is the list is filled with all the information .", "You need to do this : rej.Any new XmlNode doc.CreateTextNode where doc is an XmlDocument you ve created somewhere else .", "The issue is that your document already has root level element Servers and it cannot add another one so you get an exception .", "There is no need to copy the children around the name attribute of an element is a mutable field .", "Didn t know the XMLNode has been deprecated .", "The returned object of the web service call is of type XMLNode .", "I want to add an XmlNode to another XmlNode if it doesn t contain this node the comparison should be based on the node name and its contents .. . .. . How can I check this existence", "You need to use systemNode.SelectNodes Items Item as you want to select the Items child element of the context node your systemNode variable and not the Items child element of the document node .", "Here is an example for adding elements to a document : .. . .. . http : msdn.microsoft.com en-us library system.xml.linq.xdocument.add.aspx .. . .. . You can use XDocument.Parse to initialize the document from a string or XDocument.Load to initialize from a file there are other overloads too .", "I want to delete the empty nodes from an XML element .", "@ManfredRadlwimmer I m not accessing that from XMLNode but instead its a string", "i need to get the value xml and text alone .", "I m working in Java with XML and I m wondering what s the difference between an element and a node", "An XML element is everything from including the element s start tag to including the element s end tag .", "Now i know the element is one of node .. . .. . All node types in here http : www.w3schools.com dom dom nodetype.asp .. . .. . Element is between the start tag and end in the end tag .. . .. . So text node is a node but not a element .", "Hope this helps you solve your problem stackoverflow.com questions 1600065 http : stackoverflow.com questions 1600065 how-to-read-attribute-value-from-xmlnode-in-c", "in c and I made the connection and returns an object of type XmlNode .. . .. . I need to extract these values primarily TIME PERIOD 2010 OBS VALUE 4796580 I would appreciate help me .. . .. . This is the XML", "You ll have to do something like this : .. . .. . You need to write the XML representation property .OuterXml of the XmlNode to a stream here a MemoryStream and then use the XmlSerializer to serialize back the object from that stream .", "Hence how to escape only the attribute value and note the XML structure s .", "I am trying to store a string and xml node within a .NET Generic Dictionary in Unity3D and then print to screen a child node of the XMLNode stored as the Dictionary TValue .", "I ve used XSD2Code to create a set of C classes representing an XML document I m currently retrieving from a web service call .", "Document also has child nodes BUT .. . no attributes no text exactly one child element .", "If you mean element say element .", "You can do it with the generic method and call .. . .. . or you could even turn that code into either an extension method on the XmlNode class so you could write : .. . .. . Marc", "I am not clear about the concepts and usage of both XmlTextWriter and XmlNode in the same project ." ] }
{ "confidence": [ 67.31124877929688, 59.75684356689453, 57.571712493896484, 54.742042541503906, 54.43801498413086, 53.562747955322266, 53.31423568725586, 52.35997009277344, 52.12514114379883, 52.05594253540039, 51.29474639892578, 49.98363494873047, 48.51348114013672, 46.077606201171875, 45.84910583496094, 41.430419921875, 40.13887405395508, 39.50685501098633, 38.51611328125, 36.426795959472656 ], "content": [ "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : Different W3C specifications define different sets of Node types . Thus the DOM spec http : www.w3.org TR 1998 REC-DOM-Level-1-19981001 level-one-core.html ID-1590626202 defines the following types of nodes : .. . .. . Document -- Element maximum of one ProcessingInstruction Comment DocumentType .. . DocumentFragment -- Element ProcessingInstruction Comment Text CDATASection EntityReference .. . DocumentType -- no children .. . EntityReference -- Element ProcessingInstruction Comment Text CDATASection EntityReference .. . Element -- Element Text Comment ProcessingInstruction CDATASection EntityReference .. . Attr -- Text EntityReference .. . ProcessingInstruction -- no children .. . Comment -- no children .. . Text -- no children .. . CDATASection -- no children .. . Entity -- Element ProcessingInstruction Comment Text CDATASection EntityReference .. . Notation -- no children .. . .. . The XML Infoset http : www.w3.org TR xml-infoset infoitem used by XPath has a smaller set of nodes : .. . .. . The Document Information Item .. . Element Information Items .. . Attribute Information Items .. . Processing Instruction Information Items .. . Unexpanded Entity Reference Information Items .. . Character Information Items .. . Comment Information Items .. . The Document Type Declaration Information Item .. . Unparsed Entity Information Items .. . Notation Information Items .. . Namespace Information Items .. . .. . XPath has the following Node types : .. . .. . root nodes .. . element nodes .. . text nodes .. . attribute nodes .. . namespace nodes .. . processing instruction nodes .. . comment nodes .. . .. . The answer to your question What is the difference between an element and a node is : .. . .. . An element is a type of node . Many other types of nodes exist and serve different purposes .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : A node can be a number of different kinds of things : some text a comment an element an entity etc . An element is a particular kind of node .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : A node is defined http : www-01.ibm.com software globalization terminology n.html as : .. . .. . the smallest unit of a valid complete structure in a document . or as : .. . .. . An object in the tree view that serves as a container to hold related objects . Now their are many different kinds of nodes as an elements node an attribute node etc .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : Element is the only kind of node that can have child nodes and attributes . Document also has child nodes BUT .. . no attributes no text exactly one child element .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : An element is a type of node as are attributes text etc .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : A Node is a part of the DOM tree an Element is a particular type of Node .. . .. . e.g . foo This is Text foo .. . .. . You have a foo Element which is also a Node as Element inherits from Node and a Text Node This is Text that is a child of the foo Element Node", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : An xml document is made of nested elements . An element begins at its opening tag and ends at its closing tag . You re probably seen body and body in html . Everything between the opening and closing tags is the element s content . If an element is defined by a self-closing tag eg . br then its content is empty . Opening tags can also specify attributes eg . p class rant . In this example the attribute name is class and its value rant . The XML language has no such thing as a node . Read the spec http : www.w3.org TR REC-xml the word doesn t occur . Some people use the word node informally to mean element which is confusing because some parsers also give the word a technical meaning identifying text nodes and element nodes . The exact meaning depends on the parser so the word is ill-defined unless you state what parser you are using . If you mean element say element .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : node element are same . Every element is a node but it s not that every node must be an element . Comment : As it s not that every node must be an element the claim node element are same is wrong .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : the same difference between Fruit node Apple element . Every element is a node but it s not that every node must be an element . Comment : Nice job copying @atconway s comment from above . -1 .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : Now i know the element is one of node .. . .. . All node types in here http : www.w3schools.com dom dom nodetype.asp .. . .. . Element is between the start tag and end in the end tag .. . .. . So text node is a node but not a element . Comment : We don t like w3schools around these parts so I m told . w3fools.com http : www.w3fools.com", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : A node is the base-class for both elements and attributes and basically all other XML representations too .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : As described in the various XML specifications http : www.w3.org TR 2006 REC-xml11-20060816 sec-logical-struct an element is that which consists of a start tag and end tag and the content in between or alternately an empty element tag which has no content or end tag . In other words these are all elements : .. . .. . Though you hear node used with roughly the same meaning it has no precise definition per XML specs . It s usually used to refer to nodes of things like DOMs which may be closely related to XML or use XML for their representation .", "Question : I m working in Java with XML and I m wondering what s the difference between an element and a node Comment : Sure take a look at w3c http : www.w3.org XML Datamodel.html . The datamodel is easy to understand - even for me Comment : Great comment from forums.asp.net t 443912.aspx 1 443940 http : forums.asp.net t 443912.aspx 1 443940 : The same as between fruit and apple . Every XmlElement is XmlNode but not every XmlNode is XmlElement . XmlElement is just one kind of XmlNode . Others are XmlAttribute XmlText etc . Comment : An Element is part of the formal definition of a well-formed XML document whereas a node is defined as part of the Document Object Model for processing XML documents . .. . Answer : The Node object is the primary data type for the entire DOM . A node can be an element node an attribute node a text node or any other of the node types explained in the Node types chapter . An XML element is everything from including the element s start tag to including the element s end tag . Comment : Now that I understand the answer...The convention is stupid . The words should be the other way around . In natural English language an element is something which is the most basic building block out of which everything else is built . i.e . an element in natural English is more general.. . Comment : you mean a node is more general Comment : @Juan Mendes : That s what they are according to the DOM but Sam s point is that the DOM considers nodes more basic primitive than elements when element actually refers to the most basic building block in English . Comment : @SamSvenbjorgchristiensensen that s not quite accurate . Elements can be broken down further into constituent parts like protons neutrons and electrons which in turn can be broken into quarks neutrinos etc . It s better to understand what a node means in graph-theory http : en.wikipedia.org wiki Graph theory and then you ll understand why the XML designers chose that name the DOM is just a hierarchical graph . Comment : @LesHazlewood Actually the word element was used to describe physical elements hydrogen helium etc because they did think those things were indivisible . It was only much later they found out they were wrong - far too late to change the name I agree with Sam the way they named and differentiated dom elements vs nodes is confusing and poorly thought through as much of the html spec is .", "Question : I want to load up an XmlNode http : msdn.microsoft.com en-us library system.xml.xmlnode.aspx without getting an XmlException http : msdn.microsoft.com en-us library system.xml.xmlexception.aspx when an unrecognized namespace is present . The reason is because I need to pass an XMLNode instance to a method . I m loading up arbitrary XML fragments having namespaces out of their original context e.g . MSWord formatting and other software products with various schemas that pollute the content with their namespace prefixes . The namespaces are not important to me or to the target method to which it s passed . This is because the target method uses it as HTML for rendering and namespaces will be ignored or suppressed naturally . Example .. . Here s an example fragment I m trying to make an XMLNode out of : .. . .. . When I try to load it into an XmlDocument http : msdn.microsoft.com en-us library system.xml.xmldocument.aspx instance that s my attempt to get an XmlNode I get the following XML Exception : .. . .. . st1 is an undeclared namespace . Line 3 position 251 . How do I go about getting an XmlNode instance from that kind of XML fragment .. . Answer : XmlTextReader has a Namespaces property you can turn off : Comment : Thank you . That meets the need and is very simple .", "Question : I m freaking out with C and XmlDocuments right now . I need to parse XML data into another XML but I can t get special-characters to work . I m working with XmlDocument and XmlNode . What I tried so far : .. . - XmlDocument.CreateXmlDeclaration 1.0 UTF-8 yes .. . - XmlTextWriter writer new XmlTextWriter outputDir + systems.xml Encoding.UTF8 .. . .. . What I know for sure : .. . - The input XML is also UTF-8 .. . - The InnerText value is encoded without replacing the characters .. . .. . Here is some code not all.. . way to much code : .. . .. . But what I get is this as an example : .. . .. . Instead of this : .. . .. . .. . I do have other non-html tags in the XML so please don t provide HTML-parsing solutions : .. . I know I could replace the characters with String.Replace but that s dirty and unsafe and slow with around 20K lines . I hope there is a simpler way of doing this . Kind regards .. . Eriwas Comment : Please provide a Minimal Complete and Verifiable example http : stackoverflow.com help mcve . Your code contains lots of things that aren t relevant and it s not clear where the issue is . As a possible hint you will get this issue if you set InnerText with XML content it s nothing to do with text encoding . If you want a simpler way I d strongly suggest ditching XmlDocument for LINQ to XML . Comment : Have you tried InnerXml instead of InnerText .. . Answer : The main propose of XmlDocument is to provide an easy way to work with XML documents while making sure the outcome is a well formed document . So using InnerText as in your example you let the framework encode the string and properly insert it into that document . Whenever you read that same value it will be decoded and returned to you exactly as your original string . But if you want to add an XML fragment anyways you should stick with InnerXml or ImportNode . You must be aware that could lead to a more complex document structure and you probably would like to avoid that . As a third possibility you can use the CreateCDataSection to add a CDATA and add your text there . You definitely should be away from treating that XML document as a string by trying Replace things stick with the framework and you ll be ok .", "Question : I have a Treeview where on selecting a node the attributes and values has to be displayed in listbox . In treeView1 AfterSelect the text-parsing code depends on the textual representation for a node in the tree view which can be changed at any time and break the entire logic of list display . This strong dependency between the tree view and the list display should be eliminated by binding nodes in the treeview to nodes of the XML document so that the raw Xml data can be used to display text in the list.What should i write here Thanks... . .. . Answer : If I understand the question correctly you want to get back to the XmlNode when a TreeNode is selected . The usual solution is to store the XmlNode in the Tag property : .. . .. . and in the AfterSelect Comment : Please look at the answer to what you have given me the syntax . Comment : Can you tell me where i got wrong", "Question : I seem to always have problems with converting data to and from XML in C . It always wants you to create a full XMLDocument object even when you think you shouldn t have to . In this case I have a SQLXML column in a MS SQL 2005 server that I am trying to pull out and push into a function that requires an XMLNode as a parameter . You would think this would be easy but outside of converting it to a string and creating a new XMLNode object I cannot figure out the right way to do it . I can use an SqlDataReader the sqlComm.ExecuteReader to load the reader and sqlReader.GetSqlXml 0 to get the SQLXML object but then how do I convert it to an XmlNode Conversely I can use the sqlComm.ExecuteXmlReader to get an XmlReader but how do I extract a XmlNode from the reader http : bytes.com forum thread177004.html says it cannot be done with a XmlTextReader should I use a XmlNodeReader Help please .. . Answer : I ended up not having to use it but I found what I think is the best answer . Basically you load an XmlReader create an XmlDocument from the reader then select a list of nodes from the document into an XmnLodeList which you can use in a ForEach statement . Here is some sample code : .. . .. . Still convoluted as hell but at least there are no xml to string to xml conversions .", "Question : In my application I m converting from one web service to another . I get an XML response as an XmlDocument . I m trying to get specific nodes in the document . I know there will only ever be one instance of the node I m looking for . The previous implementer was able to get exactly what he wants with : .. . .. . I m trying to do the same with my response but always get null back . I know vaguely what his XML response looked like and know mine . But I can t use his syntax . I get null no matter what . I m using a more complex statement : .. . .. . But as you can see it s ugly . And--worse--whenever I try to go more than one node deep I get null back : .. . .. . I ve tried inserting and removing slashes in several places but to no avail . The XML the previous implementer got back isn t anything special it s just XML . But he can jump all over the place with ease . Here s a snippet of his XML response : .. . .. . Here s a snippet of mine : .. . .. . Any idea how I can traverse the XML as easy as him Comment : Did you try the obvious XmlNode node xmlDoc.SelectSingleNode StatusDescription text and XmlNode node xmlDoc.SelectSingleNode ResourceSets ResourceSet Comment : Yes I did . : .. . Answer : The fundamental difference here is that his XML doesn t have default namespace while yours has default namespace declared here : .. . .. . By the way this topic XPath query against XML with default namespace has been asked a lot previously in various forms here in SO . Notice that the element where a default namespace is declared and all of its descendants without a prefix and without a different default namespace declaration are considered to be in that aforementioned default namespace . And one possible way to query an element in a namespace is by mapping a prefix to the namespace uri using a namespace manager and then using the mapped prefix properly in the XPath for example : Comment : Thanks har07 . The did the trick I did search for the answer first but didn t find it . I guess I didn t know what precisely to search for . :", "Question : I ve come across a bizarre situation and I m hoping that someone who understands better than I do can help me to resolve it . I m inserting an image into an Xml document such that it can be opened with Microsoft Word . As part of this I need to add an Xml Relationship which maps to the element containing the image . Straightforward enough . I m adding the node that should look like this : .. . .. . However in the final .doc file the same line appears as this : .. . .. . i.e . it now has an empty xmlns attribute . This is sufficient for Word to believe that the document is corrupt and refuse to open . If I manually open the file and delete that attribute the file opens . Clearly I want to remove it programmatically : - So I found the parent node . This is where my understanding is a little hazy . I believed that the OuterXml element contains the node the contents of all it s children while the InnerXml simply contains the children . Here s what I m seeing note that the escape characters are because I ve cut from the text viewer in Visual Studio . OuterXml : .. . .. . InnerXml : .. . .. . Note how the 6th and final element has the erroneous xmlns in the OuterXml but not within the InnerXml . I can easily change the InnerXml but not the OuterXml . So my ultimate question is how do I get rid of this added attribute but I m also hoping someone can explain why there is a difference between the Xml of the inner and outer aside from the container . .. . Answer : How are you adding the node to your document It looks like this is happening because that element has no namespace unlike the other elements which have a namespace of http : schemas.openxmlformats.org package 2006 relationships . Keep in mind that namespaces aren t like normal attributes and are essential to the identity of a tag . In the OuterXml example the first 5 Relationship nodes all have the same namespace as the parent element so it doesn t need to be explicitly defined . The 6th node has no namespace hence xmlns .. . .. . In the InnerXml example the first 5 nodes all have the same namespace but with no parent to inherit from they each define it explicitly . The 6th node still has the blank namespace . In summary : the document isn t corrupt because of the string xmlns it is corrupt because a Relationship element must have a namespace of http : schemas.openxmlformats.org package 2006 relationships . To better illustrate here s a sample xml document . The namespace of the root element is urn : foo : bar .. . The namespace of the 1st item element is urn : foo : bar .. . The namespace of the 2nd item element is urn : baz .. . The namespace of the 3rd item element is .. . .. . If you were to get the inner xml of the root tag-it might look something like this : .. . .. . As mentioned above the namespace is an integral part of a tag s identity or whatever you want to call it . The following documents are all functionally identical : Comment : You superstar . I d overlooked this . I added the relationships namespace and it worked immediately . Thanks so much", "Question : I already implemented to create the XML file below with XmlTextWriter when application initialization . And know I don t know how to update the childNode id value with XmlDocument XmlNode . Is there some property to update the id value I tried InnerText but failed . thank you . Comment : Reading and Writing XML using c http : www.java2s.com Code CSharp XML XML-Write.htm Why not try out and come here with a specific question also show us what have you done so far . Comment : Acturally I also seeked a lot of MSDN library article and did some practice But I still didn t find the way to modify the Attribute of the related element . Such as ID attribute of AID element and ID attribute of Variable element . I can t find SetAttribute for ChildNode . Thanks . Comment : nitpicking : the AID id 100 should have a AID closing tag - not a RPTID - that won t work this is not valid XML as is Comment : Corrected . Thank you . .. . Answer : You need to do something like this : Comment : It works fine Thank you so much ." ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION
environments@server@47
environments -- an environment consist of the @placeholder operating-system settings and software that a program runs in .
{ "confidence": [ 23.559123992919922, 22.736095428466797, 22.25666046142578, 22.25666046142578, 21.199020385742188, 21.003524780273438, 20.90612030029297, 20.51009178161621, 20.494850158691406, 20.315914154052734, 20.315914154052734, 20.00646209716797, 19.776830673217773, 19.726314544677734, 19.67165756225586, 19.47134780883789, 19.334278106689453, 19.23043441772461, 19.23043441772461, 18.952598571777344, 18.94098663330078, 18.778759002685547, 18.778759002685547, 18.778759002685547, 18.655921936035156, 18.546123504638672, 18.542354583740234, 18.524898529052734, 18.49976348876953, 18.49976348876953, 18.44957733154297, 18.44957733154297, 18.44957733154297, 18.44957733154297, 18.400402069091797, 18.340435028076172, 18.340435028076172, 18.15674591064453, 18.15674591064453, 18.15674591064453, 18.132957458496094, 18.00763702392578, 18.00763702392578, 18.00763702392578, 18.00763702392578, 18.00228500366211, 17.924556732177734, 17.881633758544922, 17.75525665283203, 17.75525665283203, 17.754697799682617, 17.754697799682617, 17.754697799682617, 17.714292526245117, 17.576194763183594, 17.426074981689453, 17.426074981689453, 17.33953094482422, 17.319303512573242, 17.319303512573242, 17.319303512573242, 17.319303512573242, 17.319303512573242, 17.319303512573242, 17.283363342285156, 17.283363342285156, 17.27661895751953, 17.273067474365234, 17.273067474365234, 17.135469436645508, 17.10395622253418, 17.00332260131836, 17.00332260131836, 17.00332260131836, 17.00332260131836, 16.99676513671875, 16.99676513671875, 16.99676513671875, 16.99676513671875, 16.99676513671875, 16.99352264404297, 16.915603637695312, 16.876981735229492, 16.805683135986328, 16.69748306274414, 16.69748306274414, 16.69748306274414, 16.69748306274414, 16.69748306274414, 16.631723403930664, 16.631723403930664, 16.608089447021484, 16.599321365356445, 16.520519256591797, 16.338891983032227, 16.295801162719727, 16.295801162719727, 16.295801162719727, 16.295801162719727, 16.295801162719727 ], "content": [ "However running python after activating this environment runs what I believe is the system python .", "Test would perform integration and system-testing in this environment .", "There you can change your project settings to your py34 environment .", "You could create a settings recordType and add an environment variable .", "We write and test the code locally and manually move each point from one environment to other using merging software and test at each environment .", "You should set up separate environments all together and use environment-variables", "There are three environments .. . .. . 1 .", "I m using a shared machine and I m trying to create a few different Conda environments that serve as a base environment that can then be cloned by the other users on the machine to their local environments .", "At the moment I m debugging an issue with our Symfony 2 application which doesn t occur on the development-environment but does on the staging and production environments .", "What is the best practice about environments", "There is different code already existing on these environments .", "This shell script can should configure the complete environment with all settings .", "Are the server responses identical on all three environments or is it possible that they have some environment-specific parts thereby differing in length", "At the beginning I first installed JDK 7 on my Windows 7 operating-system .", "Check this also a better explanation teotti.com use-of-rails-environments http : teotti.com use-of-rails-environments", "My environment.conf contains the following line : .. . .. . modulepath confdir environments production modules .. . .. . I created a module named sample inside the modules directory of the environment .", "Here are some good reads about Rails Environments .. . .. . http : teotti.com use-of-rails-environments .. . .. . and .. . .. . https : signalvnoise.com posts 3535-beyond-the-default-rails-environments .. . .. . good luck", ".. . .. . Rails comes packages with 3 types of environments .", "Included environments .. . .. . test is designed for running tests specs .", "Obviously we need all services working in all these environments to check that the system is working as a whole .", "The problem I have is that my site has-many different environments and some of these environments are anonymous authentication and others are windows-authentication .", "I know that funs - lapply c love cherry what is love can be written out more fully : .. . .. . But when I browse in I see that both functions have their own environment : .. . .. . But in each of those environments f is the same.. .", "We already have 3-4 environments setup on our Windows servers without Git and each environment already has code which is different from each other .", "Nuget can use a file share as a repository as well so for the test beta environments you could use a file share and then use a proper NuGet server for the production environment .", "Few words about the environments .", "I want to set an alias for a service in order to be able use different services in different environments .", "Our current approach for this is getting snapshots of all DBs from the live environment making some transformations to shrink and protect data privacy and propagating it to all environments before testing in a particular environment .", "using environment is a slightly prettier in my opinion way to get at the environment that an object is assigned to compared to attr x .Environment .", "Your environments should not even be aware of their existence .", "This would allow me to change environments in the build .", "In the company I work we have 2 environments : test and production .", "I am trying to run my acceptance tests in multiple environments ex .", "The problem I foresee is that it doesn t look like it is made to support multiple environments .", "We have three environments for our app - DEV QA and PROD .", "The solution is to place C : Program Files Java jdk1.6.0 37 bin before C : WINDOWS System32 in PATH environment variable .", "Create a copy your production environment on your development-environment .", "When I deployed development-environment records were not moved into production environment .", "Can someone explain to me what the Rails environments are and what they do", "From what I gather the environments are : .. . .. . Development .. . Productions .. . Test", "@apark Do you need additional explanation still on the different environments", "Reinstalling the app from App Store or Testflight works like a charm but of course runs towards to Prod environment .", "Ain t this a production environment", "My new environment is singleserverintegration .", "Databags are not limited to an environment but are global .", "Assuming that PreProd is the next environment .", "I am working on a prototype for an asp.net 5 site and I see that Microsoft pushes us to use the Hosting : Environment environment variable https : docs.asp.net en latest fundamentals environments.html to determine what environment Development Stage Production the application is in as well as other environment-variables and what authentication type the site runs .", "What I understand about the working of environments in Laravel is that you have different environments for different well environments .", "While working on a project to establish environments for proper release management the question of who should have access to the environments and what level of access should each have has come up .", "Am I missing a way to transform the launchSettings.json file or is there another way to accomplish this without having to hand type the environment and select the auth type each time I want to change environments", "IOS devices like iPhones iPads and iPods are highly portable lower power devices designed to work in WiFi environments definitely not the right environment device to create a web server on .", "That doesn t mean you assign the elements of the list to independent objects in the global environment .", "A function should not use variables in the global environment in the way you do .", "It s not a good idea to modify the global environment directly from within a function .", "1 How does a normal standard devtest process work in these environments like when testing patch business environments etc .", "how to switch to production environment in Xcode", "I am working on 3 environments : Development Staging and Production .", "How do you get configuration data for other environments", "Now every time you use foo a value will be added to the collection and the whole collection is returned : .. . .. . fruitslist is stored in the parent environment of foo so not in the global environment where you can accidentally delete it .", "I am trying to setup a unique environment but effectively a new development-environment so that various global parameters can be different .", "It seems that you can assign to new environment and remove from current environment and as long as you don t evaluate you are good .", "A copy will be made if you change an object in the new environment before you ve deleted it from the old environment .", "A copy will be made however if you change an object in the new environment before you delete it from the old environment .", "When some task is verified in a lower environment it needs to be verified in then next upper environment .", "2 Having a basic workflow that does NOT include the environment in it and including the environment that represents the actual status in a dropdown menu inside the ticket .", "Each environment is really just a config .", "These groups correspond to the environment currently set .", "It works even if your app runs on multiple-domains .", "My requirement : Different data for different environments .", "We are using the puppets to deploy the services on the different environments .", "This is obviously a tremendous overhead both organizationally and in computational resources : we have ten continuous-integration environments ten integration environments and one acceptance test environment that all need to be refreshed with this shared data from live and the latest version of the code frequently .", "If they provide you with a test environment at all what you ll get is a their production system from before the last server refresh .", "Publishing these images to our private registry and pulling them all environments becoming a time taken process .", "The only potential problem I can foresee with this approach is that any relationships between parent-child environments will be lost .", "I have different environments 2 3 or even 4 depending on the task that will be done .", "Is there built-in functionally around the idea of promoting packages through multiple environments Test Beta Production", "We are not currently starting a new environment because of cost .", "Sharing the same environment to avoid the copy is not an option .", "Testing the code on each environment using the web server .", "Build for each environment using ANT or Gradle .", "By default anaconda is using my root environment .", "I m developing a system in CakePHP using Git as the version-control system .", ".. . .. . My main concern is that we update a package and utilize it for our test environment but we don t want our beta or production environments to fail if it is buggy.. . we want to wait until the update is approved before it is made available for Beta and then a second approval to make it available for Production .", "The class is used to install a small software .", "That s what happens in the Environment class Plugin Environments Lib Environment.php : .. . .. . Is there anyone who has the same problem as I have with this plugin", "I have a list and would like to break the elements of the list into seperate objects in the global environment .", "There is special function for mapping list to environment : .. . .. . P . S . It is my comment provided as an answer", "attach allows you to pretend like they re a part of the global environment at least in simple cases with very little work .", "So here is the services.yaml .. . .. . and in my development-environment the parameters.yml looks like : .. . .. . But it does not work", "I m having trouble understanding how to bind values from within a function to an environment outside of the function .", "The thing is that my production environment is an ongoing blog were I want to use the posts thats on my blog and not the fake posts on my development-environment .", "I know I can look at the com.apple.developer.icloud-container-environment key in Entitlements.plist to make an intelligent guess but that doesn t really -prove- which environment I m using .", "Simply include the gem in your gemfile bundle install and then store any environment variable settings in a top level file called .env .", "Another solution is the one that we are currently using : in order to maintain this system consistency we get the data for all services from the live environment and copy it into the appropriate integration test environment .", "So we either have to make our recipes toggle on environments and pick different databags or we d need to encrypt a part of the databag : only certain entries http : docs.opscode.com essentials 5fdata 5fbags.html with-environments : .. . .. . How do you manage your encrypted data-bags", "Setting up the environment .. . .. . To set your Rails environment you will want to enter in command-line : .. . .. . Where env can be test development or production .", "How can I prevent this so the cloned environment actually behaves the same as the original base environment", "Is there anything in particular that must be done in order to have the process environment-variables be passed through to the test VM s environment-variables", "This environment should only be used by me to test the application in a production-like environment and should not be accessible by other people .", "2 Pushing code changes to environment servers - in SVN we set up branches per environment for each project .", "In the past I would create a build configuration for each environment and then use tranforms on the config files for each environment ." ] }
{ "confidence": [ 32.13026809692383, 28.388526916503906, 27.142059326171875, 27.021785736083984, 26.292274475097656, 25.8712100982666, 25.855010986328125, 25.220348358154297, 25.17682647705078, 25.077299118041992, 24.826587677001953, 24.28179931640625, 24.07787322998047, 23.95086097717285, 23.89748764038086, 23.800464630126953, 23.737001419067383, 23.6549072265625, 23.18206024169922, 23.055545806884766 ], "content": [ "Question : At the beginning I first installed JDK 7 on my Windows 7 operating-system . As usual I added the following path of my newly installed Java Development Kit to the system variable PATH . When running javac and java commands in Command Prompt they have both pointed to the same environment . So far so good . .. . .. . For the purposes of Java application development at our enterprise I was forced to install an older instance of JDK thus installing JDK 6 . Below is the printout of my PATH system variable at the moment . But now I faced the situation where javac and java versions are different therefore pointing to different environments . .. . .. . Does anybody have any suggestions and ideas for this situation How could I achieve that both javac and java are pointing to JDK 6 I deep appreciate your advices and help . .. . Answer : When you installed public JRE java.exe was put into C : WINDOWS system32 . But javac is not a part of JRE so it is can be found only in C : Program Files Java jdk1.6.0 37 bin . The solution is to place C : Program Files Java jdk1.6.0 37 bin before C : WINDOWS System32 in PATH environment variable . Comment : You are right @apangin . Thank you for you answer .", "Question : null .. . Answer : I am working on a prototype for an asp.net 5 site and I see that Microsoft pushes us to use the Hosting : Environment environment variable https : docs.asp.net en latest fundamentals environments.html to determine what environment Development Stage Production the application is in as well as other environment-variables and what authentication type the site runs . These values are then stored in the launchSettings.json file in the properties folder . You can then grab the environment from the startup class using . The problem I have is that my site has-many different environments and some of these environments are anonymous authentication and others are windows-authentication . I would prefer not to have to go in to the debug section of the site properties and change the Hosting : Environment and authentication type everytime I am switching to a different environment . In the past I would create a build configuration for each environment and then use tranforms on the config files for each environment . This would allow me to change environments in the build . Unfortunatly launchSettings.json does not appear to allow me to transform it based on the selected build configuration . Am I missing a way to transform the launchSettings.json file or is there another way to accomplish this without having to hand type the environment and select the auth type each time I want to change environments I know I can run them from the command-line and put the variables in there but I am trying to run this and publish from VS .", "Question : I am kind of new to Git and I have a question regarding using Git for a website . I have searched a lot but haven t found a solution yet . We already have 3-4 environments setup on our Windows servers without Git and each environment already has code which is different from each other . There are three environments .. . .. . 1 . Live .. . 2 . UAT .. . 3 . Test has the latest code .. . .. . And then developers have their local copies . We write and test the code locally and manually move each point from one environment to other using merging software and test at each environment . Now we want to use git because manually moving the code is a lengthy process . Also as the developers have local copies it is very difficult to manage code . Code is written locally by the team and then after testing locally it is first merged with Test environment code then UAT and then finally with Live . So we have two concerns : .. . .. . 1 . There is different code already existing on these environments . 2 . Testing the code on each environment using the web server . What is the best way to go about it As I am new to git more details will be helpful like commands to use . Thanks .. . Answer : These are different . Don t mix them up . 1 . Source control . Git SVN . Maintain code and changes to the code . It has nothing to do with where you are deploying it . 2 . Build . compile and package . Build for each environment using ANT or Gradle . Change files i.e config files for specific environment then package them . 3 . Deployment . Deploy packaged build into each environment using ANT or Gradle .", "Question : null .. . Answer : I m running Ubuntu 16.04 with Anaconda 4.1.1 64-bit installed . I m using a shared machine and I m trying to create a few different Conda environments that serve as a base environment that can then be cloned by the other users on the machine to their local environments . To do this I have anaconda installed at : usr share anaconda2 .. . .. . For my test user my .condarc file looks like : .. . .. . envs dirs : - home user1 .conda envs - usr share anaconda2 envs .. . .. . I created a conda environment using : conda create --name test base python 2 numpy scipy .. . .. . Then using sudo I copied test base from home user1 .conda envs to usr share anaconda2 envs . Running conda info --envs finds the original and copied environments so I delete the copy in the user folder . I am then able to source activate test base and running python gives the standard Anaconda heading with the correct version of python . This is what I would expect . Now when I do conda create --name test --clone test base I now have an env called test in home user1 .conda envs . However running python after activating this environment runs what I believe is the system python . The header says nothing about being anaconda . To make certain my copying of the environment to usr share anaconda2 didn t cause the issue I get the same thing if I just create a base environment in the home-directory then clone it from there . Also when running python --version in root I get : Python 2.7.12 : : Anaconda 4.1.1 64-bit in the test base environment I get : Python 2.7.12 : : Continuum Analytics Inc . and in the cloned environment test I only get : Python 2.7.12 .. . .. . Any ideas on why cloning a conda environment is loosing information contained in the original environment How can I prevent this so the cloned environment actually behaves the same as the original base environment Edit : This problem does not exist when I installed Anaconda directly to anaconda2 and tried the same process from there . I know I m not doing anything wrong steps-wise . Ultimately I can just create steps for every user on the machine to individually install Anaconda and create the base environment for themselves . However I m curious to know why this problem existed from a shared install of Anaconda in usr share anaconda2", "Question : It seems that the company that I work for is always struggling with our customers server environments . Specifically we almost always encounter problems with testing servers and production servers and the fact that they always seem to be configured differently . When we test the applications that we develop the testing servers behave in one way and thus we tweak and configure our applications to fit that particular behavior . But when we install the same application on the production servers we observe another behavior that is not consistent with the testing servers thus rendering our tweaks and configurations useless . The most frustrating part is that this happens all the time and that no one seem to know what to do about it . Of course we have a general idea of why this happens . Every cloned environment starts out the same and works the same the first couple of days but sooner or later someone reconfigure something in only one of the server environments be it a database update an update of a component library a web file update or other configurations thereby leading to discrepancy . And as time goes by more and more discrepancies builds up . But the question is : what can we do about it I ve tried searching the web but can t find any good answers on what to do . I ve also tried to figure out some solutions on my own but most of my ideas seem to be problematic in some way . New routines no matter how rigorous can be circumvented . Regular cloning of the production servers to create testing servers is a tedious and often very slow process . Automatic replication is not always reliable or even possible . So what on Earth should we do about this problem How can we guarantee that the experience when testing will match the experience when going live I imagine that others have this very problem as well . Or do they Maybe it s just my particular company that is incompetent Have any of you encountered the problem If so what did you do about it Sincerely .. . .. . Linus Swedish systems developer Comment : Linus this refers specifically to shipping code to your customers environments right How much control can you realistically exert over those environments . Comment : Also could you list what environments you support for your customers Windows Linux Mac What sort of requirements do you have in-place now .. . Answer : Your problems are quite normal . There are at least two strategies I know work fairly well : .. . .. . If you re distributing on linux you can build rpms debs from your development-process and use the package management function . I know lots of projects do this with great success for inhouse projects . Another alternative is to package the whole environment as some kind of shell script . This shell script can should configure the complete environment with all settings . Normally this script is maintained by develeopment and this script overwrites any modifications that have been made manually . A script like this is usually maintained by development kept under version-control and sent to deployment as a full distribution . We use cygwin for this . Normally the script reads some kind of configuration that may be administered by operations . I ve had scripts that d actually set up the entire system from scratch as-if installing on a totally blank freshly installed machine . Both of these strategies should preferably include automated production of these artifacts all the way from your build script build-system . The smoother this process runs the better for all involved parties .", "Question : We re currently setting up Lab managed environments using TFS 2012 Lab Management at my company . In the Microsoft Test Manager you need to define environments in which tests can be run . In each environment you must have one or more machines specified to run tests . Each machine can be assigned a role within the environment . Is there any way to assign multiple roles to a single machine within an environment e.g . I d like to be able to define multiple UI test runs but have a single machine perform multiple roles within our application ecosystem . .. . Answer : It is not currently possible to assign multiple roles to the same machine . Most folks create another role that means two together .", "Question : null .. . Answer : I have built a CloudKit app with a rather complex record graph to prove our MVP with our customers . Development has been next to flawless and every problem could easily be derived to crappy code . Now we ve deployed our first version of the app . The review process was Kafka like with the review team being unable to login to cloudkit . I had to use the life line of one of our AppleTS questions to get a checklist for the review team to follow which basically said - log out and login with another iCloud account if the one you are using doesn t work . We got through the review process and the app is live on the AppStore . But now the real mess starts on my part . I need to fix a couple of bugs but now I cannot access the app if it is built with my debug settings . As a matter of fact there doesn t seem to be any way I can build and run and get access aka login to CloudKit dev environment . I ve found some obscure references on the net talking about setting up my dev and prod environments correctly but as far as I know I ve simply followed the book and the Apple Docs on Design Tips for CloudKit simply doesn t solve the problem . In short How do I manage a Dev environment and a Prod environment in CloudKit after release and how do I access Dev environment from a build by XCode sent to my device to continue development after release .. . .. . Edit : Realizing that my Question was not clear enough here comes an attempt to clairify .. . .. . I can build and run from XCode . When trying to login to iCloud using .. . .. . self.container.requestApplicationPermission CKApplicationPermissions.UserDiscoverability .. . .. . .. . I get a .. . .. . CKApplicationPermissionStatus.Denied .. . .. . status back . No error just simply a denied state back . Looking at Settings- iCloud- iCloud Drive- Look me up by Email I sometimes find my switch for my app enabled and sometimes disabled . Trying to switch the switch crashes the Settings app . Even going to www.icloud.com and setting my discoverability settings for my app does not remedy the problem . Reinstalling the app from App Store or Testflight works like a charm but of course runs towards to Prod environment . So the question remains How do I manage my Dev and Prod environments in such a way that I can access login to if you like my Dev environment when developing while I have an app for sale in the AppStore or production builds in TestFlight for beta-testing . Comment : Presumably you are not running the app directly from Xcode on your device if you are then it accesses the dev CloudKit environment . If a developer is sending you an ad-hoc build to install on your device then when they package the build they are asked if it should access the production or development CloudKit environment Comment : Oh yes I m running it directly from XCode . Comment : Then it will be accessing the development CloudKit environment Comment : That might be so but your comments still does not solve my problem . I ll rephrase the question see if it helps : myContainer.requestApplicationPermission CKApplicationPermissions.UserDiscoverab ility allways return a CKApplicationPermissionStatus.Denied state when running from XCode ever since I released the app . Whether this is trying to access the Dev environment or the Prod environment the result is the same . The expected behavior would be to login to the Dev environment . Comment : See stackoverflow.com questions 26487535 http : stackoverflow.com questions 26487535 how-to-prompt-for-ckapplicationpermissionuserdiscoverability-again", "Question : null .. . Answer : I am learning puppet but I stuck with one problem . I have a Puppet installation with one Puppet master and one Puppet agent and I am using open-source Puppet . I to set up a environment named Test . The directory is as follows etc puppet environments Test its having modules and manifests directories . And environment.conf file . My environment.conf contains the following line : .. . .. . modulepath confdir environments production modules .. . .. . I created a module named sample inside the modules directory of the environment . Described one class called sample inside the init.pp of the sample module s manifests directory . The class is used to install a small software . In the the manifests directory of the environment Test I created a file site.pp which will implement the class sample defined inside the module . My puppet.conf contains this following lines : .. . .. . main logdir var log puppet vardir var lib puppet ssldir var lib puppet ssl rundir var run puppet factpath vardir lib facter prerun command etc puppet etckeeper-commit-pre postrun command etc puppet etckeeper-commit-post server puppet.master .. . .. . master ssl client header SSL CLIENT S DN ssl client verify header SSL CLIENT VERIFY .. . .. . But whenever I tried to implement the manifests in the Puppet agent It is using the default site.pp and not using the environments site.pp .. . .. . Can anyone tell me where I am doing the mistake . Comment : In Puppet 3.x you need to specify the environmentpath option to make environment directories work . Also using an absolute path as modulepath in an environment.conf is self-defeating consider changing that to modules or just skipping it as that s the default .", "Question : Can someone explain to me what the Rails environments are and what they do I have tried researching myself but could not find anything . From what I gather the environments are : .. . .. . Development .. . Productions .. . Test Comment : Welcome to SE . It s not very clear what you are asking here . Although you might find some answers in the rails configuration guide . guides.rubyonrails.org configuring.html http : guides.rubyonrails.org configuring.html Comment : Check this also a better explanation teotti.com use-of-rails-environments http : teotti.com use-of-rails-environments Comment : @apark Do you need additional explanation still on the different environments Comment : If you could yes please .. . Answer : Each environment is really just a config . You can launch your app in various different modes and the modes are called environments because they affect the app s behaviour in lots of different ways . Ultimately though they are just configs . BTW you can t have looked very hard when you looked everywhere because i just googled rails environment and the top result was this .. . .. . http : guides.rubyonrails.org configuring.html .. . .. . which is the official explanation of configuring the rails environment .", "Question : I know similar questions have been asked before but I haven t found any really specific answers for my situation . I have an ExpressionEngine site running on multiple environments local dev production and each of those environments needs different .htaccess rules : .. . .. . All Environments .. . .. . Remove index.php http : expressionengine.com user guide general remove index.php.html .. . Set a 404 file .. . Set 301 Redirects .. . .. . Development .. . .. . Password Protect with .htpasswd .. . Force HTTPS protocol .. . Prevent search-engine indexing with X-Robots-Tag http : yoast.com prevent-site-being-indexed .. . .. . Production .. . .. . Force HTTPS protocol .. . Redirect non-www subdomains to www .. . .. . Local .. . .. . No unique rules . I ve seen a lot of examples of how you can set specific environments per-module . Like RewriteCond REQUEST HOST dev.myurl.com for the mod-rewrite module and tricks like this http : css-tricks.com snippets htaccess allow-single-url for .htpasswd requirements . But what I would really prefer is some way to set global environment-variables then re-use those variables in the .htaccess file per-environment . To use pseudo-javascript as an example something like : .. . .. . This way all of the environment-specific rules are all grouped together making a really clean file and only one variable needs to be changed if an environment is changed . I ve seen a few references to altering settings in Apache s config files but obviously that s not a viable option if I m dealing with 3rd-party hosts . So is this pie-in-the-sky wishful thinking or can it be done Comment : I came across this article http : www.thenerdary.net post 20965499862 htaccess-environments which I haven t tried yet but looks promising . .. . Answer : Jon s answer is a good one . Unfortunately not all web hosts will allow you to control that -D parameter for starting Apache . Here s a way to use a single htaccess file on dev and production but only have the dev site password protected :", "Question : null .. . Answer : While working on a project to establish environments for proper release management the question of who should have access to the environments and what level of access should each have has come up . Our current thought is the following : .. . .. . DEV Environment - DEV Team Full QA Team Restricted UAT Team None .. . .. . QA Environment - DEV Team Restricted QA Team Restricted UAT Team None .. . .. . UAT Environment - DEV Team None QA Team Restricted UAT Team Restricted .. . .. . Restricted access means they can execute test cases but cannot install or make configuration changes . Look forward to seeing thoughts on this question .", "Question : In the company I work we have 2 environments : test and production . We are not currently starting a new environment because of cost . Here is the procedure we follow : business makes a feature request development makes it happen and deploy on test environment . Then business tests it UAT and if it s OK the feature will be included into next production deployment . The problem reveals on test DB . Developers treat test environment as their playground and sometimes they rest the DB to initial state for testing purposes . On the other hand business people think that test DB must be stable and should not be reseted . We would like to resolve this issue and decide if test environment should belong to development team or business team . Developers don t want business to put their nose in test env . but business team is paying for servers . What is the best practice about environments Can you recommend an article about this .. . Answer : I believe in order to establish an environment strategy that supports all ALM SDLC activities 4 requirements should exist : .. . .. . 1 Development environment : to allow Dev to play around with new code concepts and typically unit test with some basic integration-testing using stubs and drivers . This environment should have loose change control procedures and would typically not be anywhere near the same scale as production . This is where the Dev team can build and tear down setups as required . 2 Interop environment : where integration of systems can be further tested and increased capability for non-functional testing I.e might be a resilient env with greater scalability than Dev . I d see this environment having tighter change control and management . Test would perform integration and system-testing in this environment . 3 Reference Architecture : This is what some might call pre-prod but is essentially the same as production in terms of scale and resilience . This would have change control and management procedures akin to prod . This env would support further test activities especially full scale performance-testing failover as well as operational fault triage and maintenance activities once a product is launched to customers . 4 Poduction : This environment will support live customers and so test activities will be limited once this is the case . This will be fully managed and have strict change-management and config management processes . Hope this helps", "Question : I want to set an alias for a service in order to be able use different services in different environments . So here is the services.yaml .. . .. . and in my development-environment the parameters.yml looks like : .. . .. . But it does not work when I use clear : cache i says : .. . .. . Any Idea about what I m missing .. . Answer : Elnur answer works but I decided to fix the problem this way : .. . .. . I have created a services config file for dev environment services dev.yml and did override the service in it . So the services.yml looks like : .. . .. . and the services dev.yml looks like : .. . .. . Then I have imported the services dev.yml in in config dev.yml .. . .. . This way the application setup process does not need the extra information about those classes name .", "Question : In our company we are transitioning from a huge monolithic application to a micro-service architecture . The main technical drivers for this decision were the need to be able to scale services independently and the scalability of development - we ve got ten scrum teams working in different projects or micro-services . The transition process is being smooth and we ve already started to benefit from the advantages of this new technical and organizational structures . Now on the other hand there is a main point of pain that we are struggling with : how to manage the state of the dependencies between these micro-services . Let s put an example : one of the micro-services deals with users and registrations . This service let s call it X is responsible for maintaining identity information and thus is the main provider for user ids . The rest of the micro-services have a strong dependency on this one . For example there are some services responsible for user-profile information A user-permissions B user groups C etc . that rely on those user ids and thus there is a need for maintaining some data sync between these services i.e . service A should not have info for a userId not registered in service X . We currently maintain this sync by notifying changes of state new registrations for example using RabbitMQ . As you can imagine there are many Xs : many main services and many more complicated dependencies between them . The main issue comes when managing the different dev testing environments . Every team and thus every service needs to go through several environments in order to put some code live : continuous-integration team integration acceptance test and live environments . Obviously we need all services working in all these environments to check that the system is working as a whole . Now this means that in order to test dependent services A B C .. . we must not only rely on service X but also on its state . Thus we need somehow to maintain system integrity and store a global coherent state . Our current approach for this is getting snapshots of all DBs from the live environment making some transformations to shrink and protect data privacy and propagating it to all environments before testing in a particular environment . This is obviously a tremendous overhead both organizationally and in computational resources : we have ten continuous-integration environments ten integration environments and one acceptance test environment that all need to be refreshed with this shared data from live and the latest version of the code frequently . We are struggling to find a better way to ease this pain . Currently we are evaluating two options : .. . .. . 1 . using docker-like containers for all these services .. . 2 . having two versions of each service one intended for development of that service and one another as a sandbox to be used by the rest of the teams in their development integration-testing .. . .. . None of these solutions ease the pain of shared data between services . We d like to know how some other companies developers are addressing this problem as we think this must be common in a micro services architecture . How are you guys doing it Do you also have this problem Any recommendation Sorry for the long explanation and thanks a lot Comment : When you say store a global coherent state do you mean the same state as live system or some synthetic state As I can see you have several levels of integration environments where each one is focused on particular micro service . Comment : Ideally microservice should not depend on other one as well as on its state same as @Eugene stated but on well-defined communication contract only . Main benefit of such decomposition is independent delivery . Each service can be deployed independently and this is true for any environment level per-team staging or live . From this perspective each environment can maintain its own implementation of the contract s . For dev and team environments this may be service-emulatiors X emulator in your example . It may be similar to your sandbox Im not sure . Comment : To summarize . The idea is that you dont have to maintain live state to all of your environments because most of them dont need it . The only exception is staging . Comment : Thanks for your comments neleus . Please read my clarifications to Eugene s answer . Comment : all teams agreeing on a master set of test data for the overall system So did you consider to deliver that data states to staging only rather than all teams For each team It would take less effort setting up partial emulator of X that covers well defined set of test cases . .. . Answer : From my perspective only the objects uses the services should have the state . Let s consider your example : service X responsible for the user Id service A responsible for the profile information etc . Lets assume the user Y that has some security token that may be created for example by using it s user name and password - should be unique entries to the system . Then the client contains the user information sends the security token to the service X . The service X contains info about user ID linked to such token . In case the new user the service X creates the new ID and stores it s token . Then the service X returns ID to the user object . The user object asks service A about the user-profile by providing user ID . Service A takes the ID and asks service X if that ID exists . Service X sends the positive answer then service A may search the profile information by user ID or ask the user to provide such information in order to create it . The same logic should work with the B and C services . They have to talk each with other but they don t need to know about the user state . Few words about the environments . I would suggest to use puppets https : puppetlabs.com . This is the way to automate the service deploy process . We are using the puppets to deploy the services on the different environments . The puppet script is reach and allows flexible configuration . Comment : Thank you for your answer and for your suggestion about Puppet looks really interesting . Regarding the services let me elaborate a little bit more . Following with the example already set service X would be responsible for userIds that means it somehow stores userId accountStatus pairs . Service A is responsible for user profiles and thus it needs to store userId profileInfo data . Comment : As you mentioned when retrieving a userProfile given a userId service A communicates with Service X to check if that account is active . With this approach service X and service A are logically independent and their code can thus be evolved and deployed independently no problem with that . Comment : In order to further explain the shared state problem let s assume that we use docker-like containers for our services . When creating a new test integration etc environment containers for both service X and service A can be deployed into a machine environment . Now what happens with the data both services rely on In order for the overall system to be consistent data stored by service X and data stored by service A need to be coherent . This means that even if the code of the services can be deployed independently the data they use cannot . Comment : One possible solution to this problem would be all teams agreeing on a master set of test data for the overall system all services should have information about a canonical set of userIds . This is really cumbersome when the number of services is high and there are lots of dependencies between them . Comment : Another solution is the one that we are currently using : in order to maintain this system consistency we get the data for all services from the live environment and copy it into the appropriate integration test environment . This solution works for a small number of environments and services but requires a lot of movement for the data takes a lot of time and is not scalable . That s why we are looking for a better way to do it . I hope to have better explained the problem now :", "Question : Can someone explain to me what the Rails environments are and what they do I have tried researching myself but could not find anything . From what I gather the environments are : .. . .. . Development .. . Productions .. . Test Comment : Welcome to SE . It s not very clear what you are asking here . Although you might find some answers in the rails configuration guide . guides.rubyonrails.org configuring.html http : guides.rubyonrails.org configuring.html Comment : Check this also a better explanation teotti.com use-of-rails-environments http : teotti.com use-of-rails-environments Comment : @apark Do you need additional explanation still on the different environments Comment : If you could yes please .. . Answer : From what you have provided in your question it seems that you are asking : .. . .. . What are the difference between each environment configuration in Rails .. . .. . Rails comes packages with 3 types of environments . Each have its own server database and configuration . See Rails Guides : Configuration http : guides.rubyonrails.org configuring.html for more information on options available to you . Setting up the environment .. . .. . To set your Rails environment you will want to enter in command-line : .. . .. . Where env can be test development or production . Setting this environment variable is crucial as it will determine what gems are installed or what env is touched when running rails console or rails server . Included in configuration is the gemset used for the app . When you run rails new you will find a Gemfile with groups test development and production . These groups correspond to the environment currently set . When the environment is set to one of those running bundle install installs all gems related to that group and gems not listed in a group . Included environments .. . .. . test is designed for running tests specs . This database will likely be bare bones except for seeds you may call before running the suite . After each test is complete the database will rollback to its state before the test began . I do not recommend launching rails server as running tests via MiniTest or RSpec will do this for you and close the server once the suite is finished . development allows you to test your app with a larger database typically a clone of production . This allows you to test actual real-world data without breaking production the version that customers or end-users will experience . To view the development-environment in action change the RAILS ENV and launch rails server . This is good for deciding how you want your pages to look CSS HTML . It is also good practice to briefly test your app yourself clicking around making sure everything looks good and the JavaScript works . production is reserved for the customer and end-user . Configuration includes the actual domain of the app which ports to use and initializers or tasks to run . You do not want to play around with your database as it may be customer-impacting . Ideally the app should work as best as it can since this is considered your final product .", "Question : In the company I work we have 2 environments : test and production . We are not currently starting a new environment because of cost . Here is the procedure we follow : business makes a feature request development makes it happen and deploy on test environment . Then business tests it UAT and if it s OK the feature will be included into next production deployment . The problem reveals on test DB . Developers treat test environment as their playground and sometimes they rest the DB to initial state for testing purposes . On the other hand business people think that test DB must be stable and should not be reseted . We would like to resolve this issue and decide if test environment should belong to development team or business team . Developers don t want business to put their nose in test env . but business team is paying for servers . What is the best practice about environments Can you recommend an article about this .. . Answer : If possible give each developer her own database on her local machine . That way she can do whatever she wants with it without affecting anyone else . This should significantly decrease her desire to play with the test database providing a more stable environment for business UAT .", "Question : We have a GWT Application that has to link another Application . This link is different in all stages of my application local test staging prod . What options are there to configure a GWT app Currently we re using properties files for every environment . The problem with this solution is that we have to create different packages for all the environments . That s bad and we want to build one single package that is deployable to all environments . But how can we tell the application which configuration to use .. . Answer : If you want to know weather the application is running in which mode there are some static-methods in GWT class http : google-web-toolkit.googlecode.com svn javadoc latest com google gwt core client GWT.html . isClient http : google-web-toolkit.googlecode.com svn javadoc latest com google gwt core client GWT.html isClient 28 29 .. . .. . Returns true when running inside the normal GWT environment either in Development Mode or Production Mode . Returns false if this code is running in a plain JVM . This might happen when running shared code on the server or during the bootstrap sequence of a GWTTestCase test . isProdMode http : google-web-toolkit.googlecode.com svn javadoc latest com google gwt core client GWT.html isProdMode 28 29 .. . .. . Returns true when running in production mode . Returns false when running either in development mode or when running in a plain JVM . isScript http : google-web-toolkit.googlecode.com svn javadoc latest com google gwt core client GWT.html isScript 28 29 .. . .. . Determines whether or not the running program is script or bytecode . etc... . .. . .. . Based upon tha flags you can configure the folder name of the properties Comment : I know these functions . But in my eyes it s only possible to know if the app runs in development mode or not or in other words local vs . test staging production . But also I want to configure the app differently in test vs staging vs production .", "Question : Is there a programmatic way to discover whether my app is talking to the CloudKit Development or Production environment I know I can look at the com.apple.developer.icloud-container-environment key in Entitlements.plist to make an intelligent guess but that doesn t really -prove- which environment I m using . .. . Answer : I can think of 2 ways to do that : .. . .. . 1 . You could create a settings recordType and add an environment variable . Then make sure there is only 1 record in it both on production and development . On development set the environment variable to development and on production set that variable to production . Then in your app just read that record to see what environment you are in . 2 . There is a way that does not rely on data-manipulation and that is this : Try to create a new random field name in a dummy recordType . On development that will just work . On production you will get an error . Comment : like first workaround still strange that no system method exist for it", "Question : I have different environments 2 3 or even 4 depending on the task that will be done . I have a few status like : in progress resolved . When some task is verified in a lower environment it needs to be verified in then next upper environment . I think about two ways to handle this on Jira : .. . .. . 1 Setting the workflow with both the status of the ticket and the environment in a way that when you approve a ticket it automatically changes to the next environment in the proper status . Example : .. . .. . You had the ticket in the status Resolved-DEV and it changes to In Progress-PreProd . Assuming that PreProd is the next environment . And so on.. . .. . .. . My concern is that this approach is too rigid and not necessary . 2 Having a basic workflow that does NOT include the environment in it and including the environment that represents the actual status in a dropdown menu inside the ticket . Example : .. . .. . You have a ticket on Resolved status and the dropdown reads : DEV . You test it you approve it so it goes to the next environment . The status changes to In progress and you have to manually change the environment dropdown to PreProd . Or the dropdown environment can be changed automatically with a post-function which can be configured if you use Jira . My concern is that this approach is too flexible and requires more concentration . But I don t see a problem using it . What do you think is the best approach did you think about a different way to handle this problem .. . Answer : If every ticket have to solve the different environments it should be covered by your workflow because it is you workflow .. . .. . Also inside a more fancy workflow you can handle the situation when a ticket need to drop-down to a lower env because of some tests are failing.. .", "Question : In laravel configuration variables can be accessed like this .. . .. . By default it returns the configuration values for the current environment . How do you get configuration data for other environments .. . Answer : A call to Config : : get will already get you information of your current environment if you are in dev it will be dev if you are in production it will be the production data . If you need to get a configuration information about another environment you can do by : .. . .. . Example : .. . .. . If you need to get things from your production environment while being in any other one I m afraid you ll have to create a production folder inside your config folder and put those things there : .. . .. . Add to that particular file only what you need to read outside from your environment : .. . .. . And then you ll have access to it : Comment : Config : : get environment config.name seems to work for everything except production . How do I get a production-value when I m in local environment Comment : I won t judge what you are doing but your question already started to look wrong but now it s getting worse to me looking from the outside . Why would you have to access production information from your testing development-environment Your environments should not even be aware of their existence . If it s something that is available to both environments somehow is this really the right place to put them Anyway I m just answering and I just edited to show a way to access it ." ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
portable-class-library -- the portable-class-library project enables you to write and build managed assemblies that work on more than one @placeholder framework platform silverlight wp7 or xna .
{ "confidence": [ 93.33450317382812, 64.4921646118164, 64.21571350097656, 61.784217834472656, 61.409149169921875, 60.17198181152344, 59.34921646118164, 59.34921646118164, 58.20679473876953, 57.059471130371094, 56.49284362792969, 56.49284362792969, 56.105567932128906, 56.089088439941406, 56.00148010253906, 55.97673416137695, 55.97673416137695, 55.56169891357422, 55.50279235839844, 55.27736282348633, 55.222625732421875, 54.76057434082031, 54.60812759399414, 54.304176330566406, 54.098876953125, 53.99534606933594, 53.74012756347656, 53.73354721069336, 53.703704833984375, 53.02468490600586, 52.853363037109375, 52.59280776977539, 52.59064483642578, 52.3275146484375, 52.175254821777344, 52.175254821777344, 52.00846481323242, 51.820068359375, 51.820068359375, 51.69332504272461, 51.67726516723633, 51.67194366455078, 51.53710174560547, 51.14963150024414, 51.138973236083984, 50.944801330566406, 50.88375473022461, 50.88375473022461, 50.88375473022461, 50.87709045410156, 50.8214111328125, 50.51266860961914, 50.405113220214844, 50.25389099121094, 50.187217712402344, 49.83027648925781, 49.80548095703125, 49.762569427490234, 49.74025344848633, 49.73643493652344, 49.59876251220703, 49.56305694580078, 49.39816665649414, 49.385066986083984, 49.385066986083984, 49.385066986083984, 49.385066986083984, 49.30837631225586, 49.22739791870117, 49.176448822021484, 48.9659423828125, 48.956485748291016, 48.92532730102539, 48.85821533203125, 48.848289489746094, 48.580806732177734, 48.28621292114258, 48.188297271728516, 48.13481140136719, 47.98548889160156, 47.98548889160156, 47.98548889160156, 47.89228439331055, 47.89081573486328, 47.75221633911133, 47.75221633911133, 47.74867630004883, 47.71341323852539, 47.6917610168457, 47.59624099731445, 47.552921295166016, 47.40525436401367, 47.392601013183594, 47.37799835205078, 47.32756805419922, 47.32756805419922, 47.314537048339844, 47.31450653076172, 47.173622131347656, 47.13090896606445 ], "content": [ "The Portable Class Library project enables you to write and build managed assemblies that work on more than one .NET Framework platform .", ".. . .. . The following assemblies are available within a Portable Class Library project : .. . .. . mscorlib.dll .. . System.dll .. . System.Core.dll .. . System.Xml.dll .. . System.ComponentModel.Composition.dll .. . System.Net.dll .. . System.Runtime.Serialization.dll .. . System.ServiceModel.dll .. . System.Xml.Serialization.dll .. . System.Windows.dll from Silverlight .. . .. . .. . .. . You can find which members are supported by the Portable Class Library project in the reference topics for the .NET Framework Class Library .", "From this perspective a Portable Class Library is simply a library that is compiled against a set of portable reference assemblies instead of the implementation or reference assemblies for a specific framework .", "Portable class-library", "Icon for Portable Class library http : i.stack.imgur.com Gyx8R.png Icon for the Portable Class Library which you will see in MSDN Docs .", ".. . .. . To create a Portable Class Library Project you need to have : .. . .. . 1 .", "are in a Portable class-library .", "Prism.Core is a portable-class-library .", "Icon For Portable Class Library http : i.stack.imgur.com Gyx8R.png .", "the PRISM library by Microsoft can call Delegate.CreateDelegate from a Portable Class Library .", "Is it impossible for Portable Class Library", "Class Library Portable .. . 6 .", "As I said my dev machine presents more portable profiles than the ones Portable Class Library Tools installs .", "SQLite can t be used in a Portable Class Library project .", "It s used for creating a Class Library that targets multiple platforms esp Silverlight variants such as WP7 and SL4 but including XNA on Xbox at one time .", "Is there a way to read and validate signed XML files on the portable-class-library platform", "The problem is that ScrollChangedEventArgs is platform specific and this code simply will not compile in a portable-class-library .", "You can check it out and see what is supported in Portable Class Library", "I am porting an existing .NET class-library to a Portable Class Library .", "What framework and compiler directive to use for portable-class-library in ASP.NET5", "I am trying to build a portable library for all platform .", "I have a portable-class-library project that I have just moved out of a totally portable solution into one where only certain projects are portable .", "I am porting a .NET Framework C class-library to a Portable Class Library .", "It s called Portable Rest .. . .. . https : github.com advancedrei PortableRest .. . .. . PortableRest is a Portable Class Library for implementing REST API clients in other Portable Class Libraries .", "PCL means Portable Class Library .", "What is the exact difference between xamarin shared-project and portable-class-library", "Is Portable Class Library Tools up to-date", "Here are some blog posts you may want to refer to for how to approach platform-specific functionality in PCLs : .. . .. . How to Make Portable Class Libraries Work for You http : blogs.msdn.com b dsplaisted archive 2012 08 27 how-to-make-portable-class-libraries-work-for-you.aspx .. . Portable Class Library Enlightenment Adaptation http : blog.stephencleary.com 2012 11 portable-class-library-enlightenment.html .. . Using Target-Specific Code in a Portable Library http : www.cognitiveinheritance.com post Using-Target-Specific-Code-in-a-Portable-Library.aspx", "Does anyone know a way to get the current domain assemblies on portable library", "Is there an equivalent common collections library to PowerCollections https : powercollections.codeplex.com compatible with Portable Class Library project", "To run a Portable Class Library application an update for the .NET Framework 4 must be installed on your machine .", "When to use shared library and when to use portable-class-library", "Portable Library Tools http : visualstudiogallery.msdn.microsoft.com b0e0b5e9-e138-410b-ad10-00cb3caf4981 CTP 1.38MB .. . .. . After Installing Above updates you will get a new Project Template for Portable Class Library : .. . .. .", "I m wondering if the Portable Class Library is even more restricted in functionality than the Compact Framework .", "I added the portable-class-library to the solution fine and I made the existing class-library reference it .", "I currently have a Portable Class Library whose code is entirely compatible with a regular Class Library without any modification .", "Of course you will also reference the common portable-class-library from both applications as well as the correct platform specific class-library in each application .", "I have created portable-class-library with following configuration :", "How can I use FsCheck with a portable-class-library", "Supported in : Portable Class Library means - there is some combination of targets that you can select when building a Portable Class Library where this type will be available - but it does not mean For any combination of targets in a Portable Class Library this type will be available .", "The error message indicates that you do not have the Portable Class Library reference assemblies installed .", "I m looking for a way to get the current app s assemblies inside a portable library-project .", "You can use platform hooks : .. . .. . In your portable library : .. . .. . and you can access them in your portable library like : .. . .. . In your platform-dependent application you ll need to implement it : .. . .. . and bootstrap it", "This class-library using OAuth has to be a portable-class-library so it can work with different versions of a DropBox API I m building .", "this makes us think that it is not possible to use SQLite in Portable class-library project .", "In the members table for a class the following Portable Class Library icon appears next to supported members .", "My thought was to create a Portable Class Library .", "Common code is inside separate portable-class-library .", "Class Library Portable for Universal Apps .. . 5 .", "First define a IDispatcher interface in your portable-class-library : .. . .. . Then in the project who has access to the dispatcher implement the interface : .. . .. . Then you can just pass this object as a IDispatcher instance to your portable-class-library .", "Depending on the selected platforms Portable Class Libraries expose different assemblies .", "See my answer here for a bit more on this : Is there any way I can implement IValidatableObject on Portable Class Library Project", "after I got a project that wouldn t work .. . .. . I compared it with a new Portable Class Library and the problems is solved .", "Is there a way to get wcf duplex channel work in a portable-class-library", "I m trying to build a portable-class-library that generates OAuth urls for other classes applications to use .", "XmlSerializer https : msdn.microsoft.com en-us library system.xml.serialization.xmlserializer v vs.110 .aspx .. . .. . Portable Class Library Supported in : Portable Class Library Supported in : Windows Phone 8.1 Supported in : Windows Phone Silverlight 8.1 Supported in : Windows Phone Silverlight 8", "Also see the Deploying A .NET Framework App section of the MSDN Portable Class Library Documentation http : msdn.microsoft.com en-us library vstudio gg597391.aspx .", "It has the portable-class-library that VS created for me when I created the project .", "We have tried Portable Class Library and Class Library Android both of which do not include System.Data .", "Should I use Shared Library or Portable Class Library for this type of development", "One for full framework which just type forwards to System.Data and one that is a self-contained implementation in a portable-class-library .", ".. . .. . See Portable Library Tools anouncement blog post http : blogs.msdn.com b bclteam archive 2011 01 19 announcing-portable-library-tools-ctp-justin-van-patten.aspx which starts : - .. . .. . The Portable Library Tools CTP adds a new Portable Class Library project template to Visual Studio that can be used to create class libraries in C and VB that run on the various .NET platforms without recompiling .", "You can create your own interface in a Portable Class Library with the same functionality .", "Can we compile portable-class-library using nant", "As answered here : .. . Visual Studio 2012 Express with Portable Class Library", "Just copy the whole folder after installing the Portable Class Library Tools", "I m creating in a Portable Library Class my domain objects .", "Apparently the Portable Class Library as it is now does not include the most up to-date portable profiles .", "Class Library Portable .. . .. . A Portable Class Library that targets .NET 4.5 with support for Windows 8 Windows Phone 8.1 Windows Phone Silverlight 8 Xamarin.Android Xamarin.iOS and Xamarin.iOS classic .", "I ve done some fairly basic tests and found that a Portable Library Class project and a normal Class Library for the tests work well .", "However I am trying to add a 2nd portable class library--one that sometday will be used by other projects solutions as well thus it is seperate from the class-library created with the project .", "As a workaround can you change the portable-class-library to target Silverlight 5 in addition to .NET 4.5 and Metro style", "3 Have the platform-specific projects ie .NET Framework 4.0 or Silverlight 4 projects create the ValidationContext themselves and have it injected into the portable library .", "Class Library Portable for Universal Apps .. . .. . A Portable Class Library that targets .NET 4.5 including support for Windows 8 Xamarin.Android Xamarin.iOS and Xamarin.iOS classic .", "The client is WP7.1 the portable library is .NET4+ SL4+ WP7+ and the service is .NET 4.5 .", "The portable library requires it -", "The view models are within the portable-class-library and one of them exposes a property which enables and disables a PerformanceProgressBar from the Silverlight for WP toolkit through data-binding .", "In classic library-project the code line below do the job : .. . .. . But seems that System.AppDomain is not available to portable library .", "If Silverlight is also targeted then APIs that are not available in Windows 8 Phone 8 will be mapped and this explains why I can suddenly call Delegate.CreateDelegate when I add Silverlight as a target of the Portable Class Library .", "On MSDN I noticed a section about a Portable Class Library under Version Information .", "As a heads up - we added additional Portable Class Library support in Visual Studio 11 Beta that comes next week .", "I would like to ask about a doubt I have concerning to Portable Class Library .", "Create a Portable Class Library named Repro.Portable which has a single interface : .. . .. . Then create a .NET 4.5 Class Library named Repro which references the Portable Class Library and declare the following two interfaces .", "You can achieve this as follows : .. . .. . Create an interface for the proxy class in a common portable-class-library for UWP and .NET 4.6 .", "I have the following line of code in .NET 4.5 that I am trying to build as Portable Class Library .", "I ve recently added some custom Portable Class Library projects to an application that is built-in an build-server .", "Typically I am faced with class definitions like this in the .NET class-library : .. . .. . What can I do to successfully port this code to a Portable Class Library", "When I try to add RestSharp to a portable-class-library project using nuget I get the following : .. . .. . Could not install package RestSharp 104.1 .", "The PRISM portable-class-library targets .NET 4.0 Windows 8 Store Apps Windows Phone 8 and Silverlight 5 and thusly an even more restrictive set .", "http : msdn.microsoft.com en-us library system.object.aspx .. . .. . I did a brief Google search and couldn t find anything about the Portable Class Library .", "The project references another project in the solution a portable-class-library with a pre-release portable version of Mvvm Light along with the Silverlight async library Microsoft.bcl.async and the PCL Contrib .", "You can now write business logic in the common portable-class-library and only ever work with proxies using the common interface .", "Whether something is available to a portable-class-library depends a bit on exactly which frameworks you selected for the library - you get the strict intersection only .", "http : stackoverflow.com questions 10261604 how-can-i-build-a-targetting-pack-for-portable-class-libraries and the advice in http : jpobst.blogspot.com 2012 04 mono-for-android-portable-libraries-in.html I ve managed to build some monodroid example programs which use Portable Class Libraries .", "I m attempting to convert some existing C code into a Portable Class Library project profile 111 .", "Add a new Portable Class Library project targeting .NET 4.6 and UWP 10 .. . 3 .", "This is the reason for the behavior that you are seeing : you can create a proxy both in a .NET 4.6 class-library and in a UWP class-library but you can t create it in a portable-class-library targeting both of them .", "How does one go about and create a NuGet package for a Xamarin Portable Class Library Project .", "How do i store the static-class members of a portable-class-library in deactivated event and restore to the current instance of the non-static class inside the portable-class-library .. .", "So it seems the targeting pack my app uses is newer than the version available of Portable Class Library Tools ." ] }
{ "confidence": [ 94.44482421875, 79.68115997314453, 77.7702865600586, 73.3476333618164, 71.46880340576172, 71.125244140625, 69.94361114501953, 69.29620361328125, 69.19927978515625, 67.72004699707031, 67.2503433227539, 65.49604797363281, 64.96390533447266, 64.67314147949219, 64.65797424316406, 64.4161376953125, 64.38549041748047, 64.32557678222656, 63.5123291015625, 63.502784729003906 ], "content": [ "Question : On MSDN I noticed a section about a Portable Class Library under Version Information . See System.Object for an example . http : msdn.microsoft.com en-us library system.object.aspx .. . .. . I did a brief Google search and couldn t find anything about the Portable Class Library . Does anyone here know what it is or where I could find more information about it Comment : As a heads up - we added additional Portable Class Library support in Visual Studio 11 Beta that comes next week . .. . Answer : The Portable Class Library project enables you to write and build managed assemblies that work on more than one .NET Framework platform . You can create classes that contain code you wish to share across many projects such as shared business logic and then reference those classes from different types of projects . .. . Portable Library Tools is a new Visual Studio add-in from Microsoft that enables you to create C and Visual Basic libraries that run on a variety of .NET-based platforms without recompilation . MSDN now has a nice article documentation on it http : msdn.microsoft.com en-us library gg597391.aspx . You can check it out and see what is supported in Portable Class Library Icon For Portable Class Library http : i.stack.imgur.com Gyx8R.png . .. . .. . The following assemblies are available within a Portable Class Library project : .. . .. . mscorlib.dll .. . System.dll .. . System.Core.dll .. . System.Xml.dll .. . System.ComponentModel.Composition.dll .. . System.Net.dll .. . System.Runtime.Serialization.dll .. . System.ServiceModel.dll .. . System.Xml.Serialization.dll .. . System.Windows.dll from Silverlight .. . .. . .. . .. . You can find which members are supported by the Portable Class Library project in the reference topics for the .NET Framework Class Library . In the members table for a class the following Portable Class Library icon appears next to supported members . Icon for Portable Class library http : i.stack.imgur.com Gyx8R.png Icon for the Portable Class Library which you will see in MSDN Docs . .. . .. . To create a Portable Class Library Project you need to have : .. . .. . 1 . Visual Studio 2010 Service Pack 1 SP1 http : www.microsoft.com downloads en details.aspx FamilyID 75568aa6-8107-475d-948a-ef22627e57a5 displaylang en 795KB Installer 1.48GB ISO http : go.microsoft.com fwlink LinkId 210710 .. . .. . 2 . Portable Library Tools http : visualstudiogallery.msdn.microsoft.com b0e0b5e9-e138-410b-ad10-00cb3caf4981 CTP 1.38MB .. . .. . After Installing Above updates you will get a new Project Template for Portable Class Library : .. . .. . enter image description here http : i.stack.imgur.com PfDBk.png .. . .. . Above Contents taken from MSDN .. . .. . UPDATE 2014 : .. . .. . Class Library Portable is part of Visual Studio 2014 . Comment : Regarding the latest update I don t think there is a Visual Studio 2014 but PCL seems to be included in Visual Studio 2013 . At least the community edition I have", "Question : Object browser in Visual Studio 2012 offers two different component sets for Portable class libraries : .. . .. . .NET Portable Subset .. . .NET Portable Subset Legacy .. . .. . When I create Portable Class Library it uses .NET Portable Subset . What is the second set and how can I use it It contains MEF which is not available in .NET Portable Subset http : stackoverflow.com questions 12483686 how-to-use-mef-in-portable-class-library . .. . Answer : This was so much simpler in the olden days when it was just .NET Framework vs .NET Compact Framework but Microsoft just had to add XNA 360 Silverlight and Windows Phone in to the mix . I can t find any official description of Portable Subset Legacy but the documentation about the Portable Subset excludes mentions of the Compact Framework so my guess is that the Legacy subset refers to the Compact Framework if it s the case that the non-Legacy subset refers to XNA SL and WP7 .", "Question : I m looking for a way to get the current app s assemblies inside a portable library-project . In classic library-project the code line below do the job : .. . .. . But seems that System.AppDomain is not available to portable library . Does anyone know a way to get the current domain assemblies on portable library Comment : You ll need to work with the fact that if a class or method isn t available in PCL then it is very unlikely that there is a portable alternative . AppDomain isn t available in Silverlight and WinRT apps for example . You forgot to mention the targets you want to support . But clearly you can t wring water out of stone if the target you want doesn t support it then you have a library that cannot work . Comment : May I ask why you need to get the list of all assemblies in the current AppDomain from a PCL in the first place Comment : Can you provide more information From the usage I ve seen pulling the current assemblies from the current AppDomain makes the assumption that all assemblies in a given application have already been loaded . Comment : For Silverlight this is a duplicate of stackoverflow.com questions 6962981 http : stackoverflow.com questions 6962981 use-reflection-to-iterate-types-in-all-referenced-assemblies-in-silverlight .. . Answer : You can use platform hooks : .. . .. . In your portable library : .. . .. . and you can access them in your portable library like : .. . .. . In your platform-dependent application you ll need to implement it : .. . .. . and bootstrap it Comment : doesn t work on UWP or Xamarin :", "Question : I ve recently added some custom Portable Class Library projects to an application that is built-in an build-server . The build was working fine but after that it stopped working and shows me the following messages : .. . .. . C : Windows Microsoft.NET Framework64 v4.0.30319 Microsoft.Common.targets 983 5 : warning MSB3644 : The reference assemblies for framework .NETPortable Version v4.0 Profile Profile136 were not found . .. . C : Windows Microsoft.NET Framework64 v4.0.30319 Microsoft.Common.targets 1578 5 : warning MSB3270 : There was a mismatch between the processor architecture of the project being built MSIL and the processor architecture of the reference C : Windows Microsoft.NET Framework64 v4.0.30319 mscorlib.dll AMD64 . .. . error CS0234 : The type or namespace name Linq does not exist in the namespace System are you missing an assembly reference The build-server specs : .. . .. . Windows Server 2008 R2 Standard .. . TeamCity 8.0.4 .. . .NET 4.5 .. . Portable Class Library Tools http : visualstudiogallery.msdn.microsoft.com b0e0b5e9-e138-410b-ad10-00cb3caf4981 as advised here http : msdn.microsoft.com en-us library gg597391 28v vs.110 29.aspx .. . Silverlight 5 SDK http : www.microsoft.com en-us download details.aspx id 28359 .. . .. . The solution is a .NET 4.0 application and the portable projects target .NET4.0+ e Silverlight 5 only . portable targets http : i.stack.imgur.com EoUq2.png .. . .. . I have checked my development-machine Windows 8 Visual Studio 2012 . There is indeed a folder C : Program Files x86 Reference Assemblies Microsoft Framework.NETPortable v4.0 Profile Profile136 in fact the profiles for .NET 4.0 go up to 158 . In the build machine however there are only folders for profiles up to 131 . Is Portable Class Library Tools up to-date It seems it miss installing profiles for the most recent platforms . UPDATE .. . .. . I copied the .NETPortable v4.0 Profile Profile136 of my development-machine to the build-server and now the application builds successfully . I still would like to know why installing the Portable Class Library Tools does not work out of the box . .. . Answer : Profile136 came with the version of the portable library targeting pack that was part of the Phone SDK 8.0 or a later VS Update for VS 2012 . The version of the targeting pack you were using is older . Comment : My dev machine has VS 2012 Update 3 and builds the app fine . As I said my dev machine presents more portable profiles than the ones Portable Class Library Tools installs . So it seems the targeting pack my app uses is newer than the version available of Portable Class Library Tools .", "Question : I would like to ask about a doubt I have concerning to Portable Class Library . I m developing a DAL Layer and I m using Portable project for my business-objects this project is target to .Net Framework 4.03 and higher SilverLight 4 and higher and .Net for Windows Store Apps . I would like to implement IValidatableObject interface on each of my business-objects but even when System.ComponentModel.DataAnnotations is available for the frameworks this project is targeted to I haven t access to IValidatableObject interface is not available on the .net portable framework neither MetadataType attribute exists on it . Is there any solution to achieve this approach .. . Answer : There s probably not an easy solution for this . You can create your own interface in a Portable Class Library with the same functionality . However that would be a different interface so other frameworks that use DataAnnotations ASP.NET MVC and Entity Framework I think wouldn t use your version . To get around that problem you could create a PCL with the interface with the exact same name and APIs as exist on the different platforms . Then create class libraries for .NET 4.0.3 SL4 and Windows Store with the exact same assembly identity name version and strong name key and in those assemblies just put a assembly : TypeForwardedToAttribute typeof IValidatableObject attribute . Then your PCLs can reference the PCL library with the interface and in any apps that use the PCLs reference the type-forwarding assembly for that platform which will redirect the reference to the PCL version of the interface to the one that comes in the platform . Comment : Thanks a lot it seems a nice solution .", "Question : I ve recently added some custom Portable Class Library projects to an application that is built-in an build-server . The build was working fine but after that it stopped working and shows me the following messages : .. . .. . C : Windows Microsoft.NET Framework64 v4.0.30319 Microsoft.Common.targets 983 5 : warning MSB3644 : The reference assemblies for framework .NETPortable Version v4.0 Profile Profile136 were not found . .. . C : Windows Microsoft.NET Framework64 v4.0.30319 Microsoft.Common.targets 1578 5 : warning MSB3270 : There was a mismatch between the processor architecture of the project being built MSIL and the processor architecture of the reference C : Windows Microsoft.NET Framework64 v4.0.30319 mscorlib.dll AMD64 . .. . error CS0234 : The type or namespace name Linq does not exist in the namespace System are you missing an assembly reference The build-server specs : .. . .. . Windows Server 2008 R2 Standard .. . TeamCity 8.0.4 .. . .NET 4.5 .. . Portable Class Library Tools http : visualstudiogallery.msdn.microsoft.com b0e0b5e9-e138-410b-ad10-00cb3caf4981 as advised here http : msdn.microsoft.com en-us library gg597391 28v vs.110 29.aspx .. . Silverlight 5 SDK http : www.microsoft.com en-us download details.aspx id 28359 .. . .. . The solution is a .NET 4.0 application and the portable projects target .NET4.0+ e Silverlight 5 only . portable targets http : i.stack.imgur.com EoUq2.png .. . .. . I have checked my development-machine Windows 8 Visual Studio 2012 . There is indeed a folder C : Program Files x86 Reference Assemblies Microsoft Framework.NETPortable v4.0 Profile Profile136 in fact the profiles for .NET 4.0 go up to 158 . In the build machine however there are only folders for profiles up to 131 . Is Portable Class Library Tools up to-date It seems it miss installing profiles for the most recent platforms . UPDATE .. . .. . I copied the .NETPortable v4.0 Profile Profile136 of my development-machine to the build-server and now the application builds successfully . I still would like to know why installing the Portable Class Library Tools does not work out of the box . .. . Answer : A more general and elegant solution is to install the latest Microsoft .NET Portable Library Reference Assemblies . This will install profile138 among many others . The standalone installer s can be found at : .. . .. . 4.6 June 2014 http : www.microsoft.com en-us download details.aspx id 40727 : Comment : Yeah I see Microsoft has released an updated installer of PCL assemblies . That was what I was looking for but it wasn t available by the time I was setting up my build machine . Comment : How can we find the latest version of PCL Does Microsoft has a page where we can find latest PCL that s install-able on build servers Comment : @kape123 I guess that is the latest version.. . are you experiencing any specific issues Comment : Yeah - installing did nothing for me - only when I copied all assemblies C : Program Files x86 Reference Assemblies Microsoft Framework .NETPortable from my dev machine to build-server did it start working . Guess you need to pay attention to profiles in .csproj file.. . could be something worth adding to your answer . In any case - thanks - this question and posts helped guide me to solution . Comment : Please note that the installer does not actually install the files but puts a ZIP file somewhere off the main hard drive probably C : Program Files x86 Microsoft .NET Portable Library Reference Assemblies 4.6 . You ll have to unzip the file and then copy it to the proper location on the server . For me this was : C : Program Files x86 Reference Assemblies Microsoft Framework .NETPortable . Handy tip to create the folder name it like .NETPortable . with the period at the end - Windows will strip the ending period and allow you to create the folder .", "Question : On MSDN I noticed a section about a Portable Class Library under Version Information . See System.Object for an example . http : msdn.microsoft.com en-us library system.object.aspx .. . .. . I did a brief Google search and couldn t find anything about the Portable Class Library . Does anyone here know what it is or where I could find more information about it Comment : As a heads up - we added additional Portable Class Library support in Visual Studio 11 Beta that comes next week . .. . Answer : UPDATE Jun 6 2016 : This article explains well how the .NETStandard library mechanism supersedes much of PCL https : blogs.infosupport.com net-platform-standard-and-the-magic-of-imports .. . .. . UPDATE Jul 10 2013 : Excellent state of the PCL union summary blogpost from @shanselman http : www.hanselman.com blog CrossPlatformPortableClassLibrariesWithNETAreHappening.aspx with lots of concrete examples screenshots and links . Puts any other answer here in the shade . UPDATE May 20 2013 : .. . .. . Very practical coverage of practical application and implications of this for cross-device stuff think Xamarin Studio in Tablet Show podcast with Atley Hunter http : thetabletshow.com ShowNum 84 . Key takeaway : - PCLs are a very useful constraint to impose on onself in cross-device scenarios . .. . One of the libraries mentioned wrt that is the excellent MvvmCross which is discussed in a separate Tablet Show Episode 71 http : www.thetabletshow.com default.aspx ShowNum 71 with it s author @Stuart Lodge http : stackoverflow.com users 373321 stuart . Only minor tweaking as described by Stuart here http : slodge.blogspot.co.uk 2013 04 my-current-pcl-setup-in-visual-studio.html to environment setup is necessary to leverage PCLs for such purposes . UPDATE Apr 19 2013 : Excellent dense summary of how it all hangs together from Intellisense through to run time in a blog post by Simon Cooper https : www.simple-talk.com blogs 2013 04 19 inside-portable-class-libraries .. . .. . .. . .. . Video : Channel 9 Visual Studio Toolbox show episode 14 June 2012 http : channel9.msdn.com Shows Visual-Studio-Toolbox Visual-Studio-ToolboxPortable-Class-Libraries .. . .. . Video : Channel 9 Going Deep Show episode 27 Sep 2011 http : channel9.msdn.com Shows Going+Deep NET-45-David-Kean-and-Marcea-Trofin-Portable-Libraries .. . .. . .. . .. . UPDATE Sep 11 2012 : Good high level blog post with pictures diagrams and motivating examples showing how MVVM Light and RX use it http : blogs.msdn.com b dsplaisted archive 2012 08 27 how-to-make-portable-class-libraries-work-for-you.aspx .. . .. . UPDATE Apr 11 2012 : Very good end-to-end piece by Scott Hanselman that gets to the point in dev speak very quickly including screenshots here http : feedproxy.google.com r ScottHanselman 3 wqDMRn q6KA HiddenGemsInVisualStudio11BetaNETPortableClassLibraries.aspx also contains very insightful how to think of it information and links to samples . Also includes a resources section at the end that pretty much duplicates this entire post : D .. . .. . UPDATE Jul 9 2012 : This blog series by Mircea Trofin of the dev team one part so far is the most complete http : blogs.msdn.com b dotnet archive 2012 07 06 targeting-multiple-platforms-with-portable-code-overview.aspx coverage yet including screenshots and detailed matrices showing available features across your selections if you re into that sort of thing . .. . .. . See Portable Library Tools anouncement blog post http : blogs.msdn.com b bclteam archive 2011 01 19 announcing-portable-library-tools-ctp-justin-van-patten.aspx which starts : - .. . .. . The Portable Library Tools CTP adds a new Portable Class Library project template to Visual Studio that can be used to create class libraries in C and VB that run on the various .NET platforms without recompiling . It s used for creating a Class Library that targets multiple platforms esp Silverlight variants such as WP7 and SL4 but including XNA on Xbox at one time . See also this InfoQ summary article http : www.infoq.com news 2011 05 Cross-Platform-Tools .. . .. . See also this release notice http : blogs.msdn.com b kcwalina archive 2011 06 15 10174954.aspx . For down and dirty details see Multi-Targeting Guidelines for Tools for Managed Code http : blogs.msdn.com b bclteam archive 2012 04 11 multi-targeting-guidelines-for-tools-for-managed-code-mirceat.aspx Comment : beat me by 27 seconds p Comment : @Marc Gravell : Doesnt happen often phew - but you did beat @Darin if that s any help.. . Comment : Lots of great details but I think this could benefit from a simple explanation for someone who s completely new to this . Comment : @Lucas Well my attempts to keep it up to-date have made it community wiki so feel free to edit in anything you feel will explain it in the manner you feel helpful I found the InfoQ article good thought the ones at the top are probably the most well-rounded", "Question : I ve recently added some custom Portable Class Library projects to an application that is built-in an build-server . The build was working fine but after that it stopped working and shows me the following messages : .. . .. . C : Windows Microsoft.NET Framework64 v4.0.30319 Microsoft.Common.targets 983 5 : warning MSB3644 : The reference assemblies for framework .NETPortable Version v4.0 Profile Profile136 were not found . .. . C : Windows Microsoft.NET Framework64 v4.0.30319 Microsoft.Common.targets 1578 5 : warning MSB3270 : There was a mismatch between the processor architecture of the project being built MSIL and the processor architecture of the reference C : Windows Microsoft.NET Framework64 v4.0.30319 mscorlib.dll AMD64 . .. . error CS0234 : The type or namespace name Linq does not exist in the namespace System are you missing an assembly reference The build-server specs : .. . .. . Windows Server 2008 R2 Standard .. . TeamCity 8.0.4 .. . .NET 4.5 .. . Portable Class Library Tools http : visualstudiogallery.msdn.microsoft.com b0e0b5e9-e138-410b-ad10-00cb3caf4981 as advised here http : msdn.microsoft.com en-us library gg597391 28v vs.110 29.aspx .. . Silverlight 5 SDK http : www.microsoft.com en-us download details.aspx id 28359 .. . .. . The solution is a .NET 4.0 application and the portable projects target .NET4.0+ e Silverlight 5 only . portable targets http : i.stack.imgur.com EoUq2.png .. . .. . I have checked my development-machine Windows 8 Visual Studio 2012 . There is indeed a folder C : Program Files x86 Reference Assemblies Microsoft Framework.NETPortable v4.0 Profile Profile136 in fact the profiles for .NET 4.0 go up to 158 . In the build machine however there are only folders for profiles up to 131 . Is Portable Class Library Tools up to-date It seems it miss installing profiles for the most recent platforms . UPDATE .. . .. . I copied the .NETPortable v4.0 Profile Profile136 of my development-machine to the build-server and now the application builds successfully . I still would like to know why installing the Portable Class Library Tools does not work out of the box . .. . Answer : Copying the desired profile it is explicit in the error message from the dev machine to the build-server after installing Portable Class Library Tools http : visualstudiogallery.msdn.microsoft.com b0e0b5e9-e138-410b-ad10-00cb3caf4981 allowed my build to work . Apparently the Portable Class Library as it is now does not include the most up to-date portable profiles . If anyone knows of a more up to-date way to get portable profiles on a build-server other than installing VS or copying them manually I really would like to know . UPDATE .. . .. . Path on my dev machine for the folder to be copied to the server machine the path in the server was the same : Comment : if you know how we can copy them manually pleaaaaase tell us Comment : @RaduSimionescu see the updated answer . Just copy the whole folder after installing the Portable Class Library Tools Comment : my problem was copying profiles installed by Xamarin on a mac - I couldn t find them . Anyway I solved it and posted an answer with my solution . Thanks for the update", "Question : I have the following problem : I want to call Delegate.CreateDelegate from within my Portable Class Library targeting .NET 4.5 Windows Phone 8 and Windows 8 Store Apps but my code does not compile . The compiler says that it cannot find the method on the Delegate type . The funny thing is that e.g . the PRISM library by Microsoft can call Delegate.CreateDelegate from a Portable Class Library . It does so in the DelegateReference class . The PRISM portable-class-library targets .NET 4.0 Windows 8 Store Apps Windows Phone 8 and Silverlight 5 and thusly an even more restrictive set . The code that does not compile looks like this : .. . .. . An example can be downloaded here : https : dl.dropboxusercontent.com u 14810011 PortableClassLibraryReferenceProblem.zip .. . .. . It contains my library-project and a very stripped version of the PRISM PubSubEvents project containing only the DelegateReference class and its interface . The complete source code of the latter can be found here : http : prismwindowsruntime.codeplex.com SourceControl latest .. . .. . What can I do to use all Delegate members Thank you in advance for your help EDIT after Henk Holterman s answer : .. . .. . GetMethodInfo is an extension method that is supported by the PCL subset . Anyway that is not related to the problem that I cannot call Delegate.CreateDelegate while PRISM s PCL project can . Picture of code that does not compile http : i.stack.imgur.com 6Af6F.png .. . .. . EDIT 2 after Hans Passants comment : .. . .. . I just played around and found out that when I activate Silverlight 5 as a target of the portable library then Delegate.CreateDelegate is indeed accessible and the GetMethodInfo Extension Method no longer is . Is Delegate.CreateDelegate then maybe mapped to another API for Windows 8 Store and Phone apps internally It s the only way I could think of how this method would be suddenly accessible just because I added Silverlight 5 as a valid target . You can reproduce this by right-clicking on the MyPortableClassLibrary project click Properties and in the Library tab click change to select the frameworks that are targeted by the portable library . Also earlier today I created an Windows Store App project and saw that there was no CreateDelegate method defined on the Delegate class in .NET for Windows Runtime . In my actual project I do not want to target Silverlight 5 as I use IObservable T and IObserver T heavily using Rx and these interfaces are not defined in Silverlight . Comment : Works just fine on my machine . Comment : @Hans I recognize you did not download the sample code Because it s not working there . Anyway I updated my question to my recent findings . Comment : This is a problem with portable libraries some subsets give different APIs it happened me with some reflection types that were not available on Windows 8 Phone subsets until I targeted Silverlight . .. . Answer : What you are seeing when you add remove Silverlight is portable flipping between two different .NET API surface areas . I cover these two different surface areas here : What is .NET Portable Subset Legacy http : stackoverflow.com questions 12483951 what-is-net-portable-subset-legacy 12538648 12538648 . In what we call the legacy surface area this method lives on Delegate . In the new surface area this method has been moved to MethodInfo . Why did we do this .. . .. . For layering reasons . In the new surface reflection types ie Assembly MemberInfo MethodInfo etc are considered as living in a higher layer than the core primitives which includes Delegate . Unlike the legacy surface area where they all live in mscorlib these types in different assemblies System.Reflection.dll and System.Runtime.dll respectively . This method a few others were causing something at a lower layer System.Runtime.dll to depend on something at a higher layer System.Reflection.dll . To prevent that the dependency was reversed . Comment : Thank you for the additional insights David .", "Question : I testing an UWP application and I want to use a proxy to consume a WCF service . I have a proxy that is a library for .net-4.6 but I can t add this project as reference in the project of universal application . It is normal because is a library for .net-4.6 . So I am trying to create a portable library and I have two options to create a portable library . This option let me say what targets can I use . I select .net-4.6 and windows-universal 10.0 . The problem is that I can t add a reference to the System.ServiceModel that I need to use the proxy . The other option is portable library for windows-universal . In this cases I can t select the target projects it has sense because it is only for universal applications . In this case I can add the reference to the System.ServiceModel . I know that in a portable library I only can use the libraries of the target project more restrictive in this case I guess that is windows-universal no .net-4.6 . But then why do I can add the reference in the portable library for universal applications and not in the portable library in which I am using .net I would like to have a generic portable library to be able to use the proxy in WPF applications and universal windows-applications . Thanks . .. . Answer : Unfortunately there isn t a simple subset relationship between different target frameworks i.e . in your case UWP is not a subset of .NET 4.6 therefore when you create a portable-class-library targeting both you don t simply have all the APIs from the smaller framework available . When dealing with clientside System.ServiceModel code the situation is even more confusing : although both target platforms include basic support for WCF proxies the APIs are different enough that there is no portable equivalent that would be available when creating a PCL . This is the reason for the behavior that you are seeing : you can create a proxy both in a .NET 4.6 class-library and in a UWP class-library but you can t create it in a portable-class-library targeting both of them . You will need to create 2 separate libraries . If you re only going to call the proxies from the platform specific WPF an UWP code then this shouldn t really be a problem but I suspect that you would like to call them from the business logic code which you would prefer to implement in a portable-class-library . You can achieve this as follows : .. . .. . Create an interface for the proxy class in a common portable-class-library for UWP and .NET 4.6 . Reference this common library from both platform specific class libraries : UWP and .NET 4.6 . The proxies in these 2 libraries should implement the common portable interface . I haven t tried it but if you configure the service references to reuse the types from your portable-class-library the generated proxies should already implement your interfaces . This way you could avoid create wrappers around your proxies in each of the platform specific class libraries . You can now write business logic in the common portable-class-library and only ever work with proxies using the common interface . To get concrete instances of this interface on each platform use a portable dependency-injection framework such as Ninject http : www.ninject.org . In application code for each platform you will then initialize the dependency-injection framework by registering the correct proxy implementation of the interface either UWP one or .NET 4.6 one . Of course you will also reference the common portable-class-library from both applications as well as the correct platform specific class-library in each application .", "Question : I have a C project that relegates code to Portable Libraries projects so they can be reused in .Net and Silverlight environments seamlessly . The PCLs target .Net45 and Silverlight 5 . Now I want to use the same PCLs in .Net Core environment . If possible I want to keep my solution with .Net and Silverlight environments and reuse the Portable projects in a new .Net Core solution . When I try to add a reference to a regular PCL project from a .Net Core Library it fails to read the dependency . NU1001 The dependency could not be resolved . If I attempt to add a reference to the PCL assembly I get an error : .. . .. . .NET Core projects only support referencing .NET framework assemblies in this release . To reference other assemblies they need to be included in a NuGet package and reference that package . Is it possible to use regular PCLs on .Net Core environment Or I need to create new .Net Core libraries If I need to create new projects how can I avoid duplicated code Comment : It is possible to use PCLs in a .NET Core project using the import keyword see docs https : github.com dotnet corefx blob master Documentation architecture net-platform-standard.md portable-profiles . The easiest way to test this would be to create a Nuget package of your PCL library and attempt to reference it in project.json . Comment : Thanks @NateBarbettini but I m already targeting the same PCL moniker and doesn t allow me to reference a PCL project importing the same moniker would be pointless doesn t it . Creating a NuGet package would remove the reference to the projects itself . Comment : I has the same problem . This link http : stackoverflow.com questions 31900713 how-do-i-use-a-standard-class-library-in-mvc6 will help you . .. . Answer : 1 . Go to add reference .. . 2 . Browse the project which you want to refer . 3 . Select the .dll of the project instead of the project itself . 4 . Add .dll reference and build . Comment : Thanks but when I attempt to do that in a .Net Core project I get the error described in the post .NET Core projects only support referencing .NET framework assemblies in this release.. .", "Question : I am porting a .NET Framework C class-library to a Portable Class Library . One recurring problem is how to deal with classes decorated with the Serializable attribute since this attribute is not part of the Portable Class Library subset . Serialization functionality in the Portable Class Library subset instead appears to be covered by DataContractAttribute http : msdn.microsoft.com en-us library system.runtime.serialization.datacontractattribute.aspx . To preserve as much of functionality as possible in the Portable Class Library is it sufficient to replace Serializable with the DataContract attribute with the implication that all fields and properties subject to serialization would need to be decorated with DataMember as well What if anything will I not be able to do with this approach that I can do with Serializable applied Is there a less intrusive approach Given that DataContract and DataMember are used I am considering to change the code along the following lines . Are there any obvious flaws with this approach Is there any way to formulate the same thing less verbose .. . Answer : Portable Class Library PCL now available on all platforms 14 Oct 2013 .. . .. . Prior to today s release there was a license restriction with the PCL reference assemblies which meant they could only be used on Windows . With today s release we are announcing a new standalone release of the PCL reference assemblies with a license that allows it to be used on any platform including non-Microsoft ones . This enables developers even more flexibility and to do great things with .NET . Source : Portable Class Library PCL now available on all platforms http : blogs.msdn.com b dotnet archive 2013 10 14 portable-class-library-pcl-now-available-on-all-platforms.aspx .. . .. . Download : Microsoft .NET Portable Library Reference Assemblies 4.6 RC http : www.microsoft.com en-us download details.aspx id 40727 .. . .. . Just for the reference the allowed set of assemblies are : .. . .. . mscorlib.dll .. . .. . System.dll .. . .. . System.Core.dll .. . .. . System.Xml.dll .. . .. . System.ComponentModel.Composition.dll MEF .. . .. . System.Net.dll .. . .. . System.Runtime.Serialization.dll .. . .. . System.ServiceModel.dll .. . .. . System.Xml.Serialization.dll .. . .. . System.Windows.dll from Silverlight .. . .. . As far as I know you need to mark the fields with DataMember attribute and add the DataContract attribute . UPDATE .. . .. . Yes . You can look how Json.NET http : json.codeplex.com portable-class-library solution is implemented . You can find the solution in the Source Src Newtonsoft.Json.Portable when you download the project from here Json.NET 4.5 Release 10 source + binary http : json.codeplex.com downloads get 501717 . Basically they are using an approach with a custom attribute provider .. . .. . don t use Serializable .. . .. . use custom provider .. . .. . And if project is PORTABLE .. . .. . where OptIn description is : .. . .. . Hope it helps . UPDATE 2 .. . .. . Am I losing any abilities using DataContract instead of Serializable or will I still be able to do everything that Serializable supports You can do everything that Serializable supports except control over how the object is serialized outside of setting the name and the order . Using DataContractSerializer http : msdn.microsoft.com en-us library system.runtime.serialization.datacontractserializer.aspx has several benefits : .. . .. . serialize anything decorated with a DataMember even if it s not public visible .. . .. . can t serialize anything unless you specifically tell it to opt-in .. . .. . you can define the order in which the elements are serialized using the Order attribute on the DataMember .. . .. . doesn t require a parameterless constructor for deserialization .. . .. . is 10 faster than XmlSerializer . Read more here : XmlSerializer vs DataContractSerializer http : www.danrigsby.com blog index.php 2008 03 07 xmlserializer-vs-datacontractserializer-serialization-in-wcf .. . .. . Also for the reference : .. . .. . DataContract supports serialization of the following kinds of types in the default mode : CLR built-in types .. . .. . Byte array DateTime TimeSpan GUID Uri XmlQualifiedName XmlElement and XmlNode array .. . .. . Enums .. . .. . Types marked with DataContract or CollectionDataContract attribute .. . .. . Types that implement IXmlSerializable .. . .. . Arrays and Collection classes including List Dictionary and Hashtable .. . .. . Types marked with Serializable attribute including those that implement ISerializable .. . .. . Types with none of the above attributes POCO but with a default constructor Comment : My main concern is would decoration with DataContract and DataMember be sufficient replacements for Serializable Comment : See the updated answer . Comment : Many thanks for the informative update I ll have a closer look at JSON . Am I losing any abilities using DataContract instead of Serializable or will I still be able to do everything that Serializable supports Comment : See the update 2 . Comment : Thanks very informative", "Question : I have the following problem : I want to call Delegate.CreateDelegate from within my Portable Class Library targeting .NET 4.5 Windows Phone 8 and Windows 8 Store Apps but my code does not compile . The compiler says that it cannot find the method on the Delegate type . The funny thing is that e.g . the PRISM library by Microsoft can call Delegate.CreateDelegate from a Portable Class Library . It does so in the DelegateReference class . The PRISM portable-class-library targets .NET 4.0 Windows 8 Store Apps Windows Phone 8 and Silverlight 5 and thusly an even more restrictive set . The code that does not compile looks like this : .. . .. . An example can be downloaded here : https : dl.dropboxusercontent.com u 14810011 PortableClassLibraryReferenceProblem.zip .. . .. . It contains my library-project and a very stripped version of the PRISM PubSubEvents project containing only the DelegateReference class and its interface . The complete source code of the latter can be found here : http : prismwindowsruntime.codeplex.com SourceControl latest .. . .. . What can I do to use all Delegate members Thank you in advance for your help EDIT after Henk Holterman s answer : .. . .. . GetMethodInfo is an extension method that is supported by the PCL subset . Anyway that is not related to the problem that I cannot call Delegate.CreateDelegate while PRISM s PCL project can . Picture of code that does not compile http : i.stack.imgur.com 6Af6F.png .. . .. . EDIT 2 after Hans Passants comment : .. . .. . I just played around and found out that when I activate Silverlight 5 as a target of the portable library then Delegate.CreateDelegate is indeed accessible and the GetMethodInfo Extension Method no longer is . Is Delegate.CreateDelegate then maybe mapped to another API for Windows 8 Store and Phone apps internally It s the only way I could think of how this method would be suddenly accessible just because I added Silverlight 5 as a valid target . You can reproduce this by right-clicking on the MyPortableClassLibrary project click Properties and in the Library tab click change to select the frameworks that are targeted by the portable library . Also earlier today I created an Windows Store App project and saw that there was no CreateDelegate method defined on the Delegate class in .NET for Windows Runtime . In my actual project I do not want to target Silverlight 5 as I use IObservable T and IObserver T heavily using Rx and these interfaces are not defined in Silverlight . Comment : Works just fine on my machine . Comment : @Hans I recognize you did not download the sample code Because it s not working there . Anyway I updated my question to my recent findings . Comment : This is a problem with portable libraries some subsets give different APIs it happened me with some reflection types that were not available on Windows 8 Phone subsets until I targeted Silverlight . .. . Answer : OK after a night of sleeping I recognized that my question actually should be How do I dynamically create delegates in the new API introduced with the Windows Runtime . As Rafael indicated in the comments of my question different APIs are provided when Windows 8 Phone 8 is targeted in addition to .NET . If Silverlight is also targeted then APIs that are not available in Windows 8 Phone 8 will be mapped and this explains why I can suddenly call Delegate.CreateDelegate when I add Silverlight as a target of the Portable Class Library . In .NET the new APIs for Reflection were introduced with .NET 4.5 . Anyway to create a delegate in Windows 8 Windows Phone 8 one has to use the MethodInfo.CreateDelegate method just like this :", "Question : When I try to add RestSharp to a portable-class-library project using nuget I get the following : .. . .. . Could not install package RestSharp 104.1 . You are trying to install this package into a project that targets .NETPortable Version v4.0 Profile Profile104 but the package does not contain any assembly references or content files that are compatible with that framework . For more information contact the package author . I assume then it is not supported If that be the case anyone have any suggestions on how to get this to work Comment : See stackoverflow.com questions 13547479 http : stackoverflow.com questions 13547479 are-there-any-rest-libraries-out-there-that-work-with-portable-class-libraries .. . Answer : You may also want to look at PortableRest https : github.com advancedrei PortableRest . Again provides similar capabilities and adheres closely to the API style to RestSharp for .NET 4.5 Silverlight 5 Windows Phone 8.x and Windows 8.x as well as iOS and Android through Xamarin .", "Question : I m needing to parse a path into parts from within a portable-class-library and get things like the filename extension just directory name etc . All of these methods are fairly easy to access from within System.IO.Path however this doesn t seem to exist within portable class libraries . Is there an open-source replacement for this or some other API that would give me the same functionality Comment : You haven t mentioned the required target platforms of your PCL . Just in case you don t need to target Silverlight and WP7 8 System.IO.Path would be available if you restrict the target platforms of your PCL to .NET Framework and .NET for Windows Store apps . .. . Answer : I would use Uri class .. . .. . which is supported by PCL .. . .. . http : msdn.microsoft.com en-us library system.uri.aspx", "Question : since working with Visual Studio 2012 RC we get an HttpCompileException when using a class out of an portable-class-library .net-4.5 metro profile within a razor view . Exception : german to english translated on google sorry .. . .. . Solution structure : .. . .. . Portable Class Library .net-4.5 metro profile .. . public class User .. . .. . MVC 4 .net-4.5 .. . Reference to Portable Class Library .. . Razor-View .. . @model User .. . .. . Since Visual Studio 2012 RC adding reference System.Runtime is not possible any more . Comment : As a workaround can you change the portable-class-library to target Silverlight 5 in addition to .NET 4.5 and Metro style .. . Answer : In the Views Web.config file add the following code under the system.web section : .. . .. . There are a bunch of other assemblies you may also need to reference depending on what types your portable code is using . You can either add each one as you encounter the error or add the full list of assemblies in C : Program Files x86 Reference Assemblies Microsoft Framework .NETFramework v4.5 Facades . Comment : Why does this work Comment : This solved a similar issue for me using System.Collections.Immutable Comment : Depending on what you are doing in your project you may also need to add the very same line to the root Web.Config Comment : @LukePuplett kind of late but here s a good explanation lyalin.com 2014 04 25 http : www.lyalin.com 2014 04 25 the-type-system-object-is-defined-in-an-assembly-that-is-not-reference-mvc-pcl-issue Comment : @WetNoodles Thanks . Funny if you follow the link in the blog back to SO its my question .", "Question : I m using a licensing tool Rhino.Licensing that uses signed XML files as licenses . Since the System.Security.Cryptography.Xml namespace is not available on varios platforms like MonoTouch and Mono for Android etc its not possible to validate a license and its signature . Is there a way to read and validate signed XML files on the portable-class-library platform I currently need this feature on .NET Mono MonoTouch Mono for Android WinRT Silverlight MonoGame .. . Answer : AFAIK there s too many profile in PCL 2.0 System.Security.dll is not part of any portable library profile . .NET : part of the framework .. . Mono : part of the framework .. . MonoTouch : not part of the profile .. . Mono for Android : not part of the profile .. . WinRT : not sure .. . Silverlight : not part of the profile .. . MonoGame : not a profile - it will depend on which profile it is used .. . .. . The good news is that you could build your own using Mono s source code . That should be pretty easy for MonoTouch and Mono for Android . The only problem I can foresee is Silverlight since it did not last time I checked support RSA and Mono s BigInteger implementation requires unsafe code which was also not allowed under most circumstances . OTOH and with a bit more work you could re-implement RSA using SL s System.Numerics.dll . Comment : Thanks for your suggestions . But i simply ported BouncyCastle to the PCL profile and wrote my own Portable.Licensing https : github.com dnauck Portable.Licensing framework .", "Question : I m trying to build a portable-class-library that generates OAuth urls for other classes applications to use . This class-library using OAuth has to be a portable-class-library so it can work with different versions of a DropBox API I m building . Part of this class needs to generate an SHA1 hash to generate the oauth signature with . I m aware that portable-class-library doesn t support System.Security.Cryptography so is there anyway that this class can generate an SHA1 hash without that class Comment : You could copy over some code from Mono.Security . Comment : I don t see any troublesome dependencies in the SHA1Managed class . Portable strikes me as just unfinished whenever I take a look . Comment : That would be an issue but its a pretty simple string building class with a couple of methods so as long as they do their job being unfinished isn t a problem . .. . Answer : I have used this BouncyCastle Nuget package : https : www.nuget.org packages BouncyCastle-PCL and it works just fine for me cross platforms Windows Store App .Net Framework 4.5 Silverlight 5 Windows Phone 8 Xamarin.Android Xamarin.iOS .. . .. . Use HMACSHA1 to generate signature like this :", "Question : I have an MVVM Cross application running on Windows Phone 8 which I recently ported across to using Portable Class Libraries . The view models are within the portable-class-library and one of them exposes a property which enables and disables a PerformanceProgressBar from the Silverlight for WP toolkit through data-binding . When the user presses a button a RelayCommand kicks off a background-process which sets the property to true which should enable the progress-bar and does the background processing . Before I ported it to a PCL I was able to invoke the change from the UI thread to ensure the progress-bar got enabled but the Dispatcher object isn t available in a PCL . How can I work around this Thanks .. . .. . Dan Comment : I m not entirely sure in win-phone but can you use the Application.Current.Dispatcher to invoke the update Or would it be Deployment.Current.Dispatcher .. . Answer : If you don t have access to the Dispatcher you can just pass a delegate of the BeginInvoke method to your class : .. . .. . Then to instanciate it from a class that has access to the dispatcher : .. . .. . .. . .. . Or you can also create a wrapper around your dispatcher . First define a IDispatcher interface in your portable-class-library : .. . .. . Then in the project who has access to the dispatcher implement the interface : .. . .. . Then you can just pass this object as a IDispatcher instance to your portable-class-library . Comment : This is a feasible approach - and it s basically exactly what MvvmCross does - only it does it using IoC at a platform setup level Comment : Thanks - that worked for me Comment : Your call.. . But if you are using MvvmCross then you ll probably find dev easier using InvokeOnMainThread action - as that will provide you with pre-built implementations on each platform and it includes things like CheckAccess calls before each Invoke", "Question : I am trying to implement IConvertible for custom transform . I am using .NET portable and it seems that it is not available there . But the MSDN documentation http : msdn.microsoft.com en-us library system.iconvertible 28v vs.110 29.aspx says : .. . .. . Portable Class Library .. . Supported in : Portable Class Library .. . .. . I am a bit worried by this which also appears : .. . .. . This API is not CLS-compliant . Is this the reason why it might not be getting resolved As per the documentation it should be a part of System namespace . I am trying to implement the interface in a structure . Something on the lines of : .. . .. . I have a feeling I am am missing out on something really small . More information : I am targeting .NET Framework 4.5 and Windows 8 . Comment : Supported in : Portable Class Library means - there is some combination of targets that you can select when building a Portable Class Library where this type will be available - but it does not mean For any combination of targets in a Portable Class Library this type will be available . So what targets do you have selected in your PCL Comment : Right now I have got .NET Framework 4.5 and Windows 8 selected in Properties- Library- Targeting Comment : Yeah it s not supported in Windows Store apps . Comment : @Damien The Unbeliever Kindly put that as an answer so that I can mark it as answered . Comment : This API is not CLS-compliant . should not be significant . That has more to do with whether names are upper-lower-case significant or not which can be a problem for VB.Net . .. . Answer : Supported in : Portable Class Library is merely the start of working out whether it s supported in your scenario . You also have to look at the further information about support to see whether your PCL targets are supported . You ve said you re targeting .NET Framework 4.5 and Windows 8 . Let s compare the support information for IConvertible and say IComparable : .. . .. . IConvertible http : msdn.microsoft.com en-us library system.iconvertible 28v vs.110 29.aspx : .. . .. . .NET Framework .. . Supported in : 4.5.2 4.5.1 4.5 4 3.5 3.0 2.0 1.1 1.0 .. . .NET Framework Client Profile .. . Supported in : 4 3.5 SP1 .. . Portable Class Library .. . Supported in : Portable Class Library .. . .NET for Windows Phone apps .. . Supported in : Windows Phone 8.1 Windows Phone 8 Silverlight 8.1 .. . .. . And IComparable http : msdn.microsoft.com en-us library system.icomparable v vs.110 .aspx : .. . .. . .NET Framework .. . Supported in : 4.5.2 4.5.1 4.5 4 3.5 3.0 2.0 1.1 1.0 .. . .NET Framework Client Profile .. . Supported in : 4 3.5 SP1 .. . Portable Class Library .. . Supported in : Portable Class Library .. . .NET for Windows Store apps .. . Supported in : Windows 8 .. . .NET for Windows Phone apps .. . Supported in : Windows Phone 8.1 Windows Phone 8 Silverlight 8.1 .. . .. . .. . So after we ve established it s supported in a PCL you then need to look at the other sections and compare that to your set of targets . If any of your targets isn t also listed as supported then you ll not be able to use that type in your current PCL without removing the targets that aren t supported" ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
staf@staf@51
staf -- the software testing automation framework @placeholder is an open-source epl eclipse public license project that enables users to create cross-platform distributed software test-environments .
{ "confidence": [ 51.125, 47.68117141723633, 36.408634185791016, 33.78294372558594, 33.674537658691406, 32.232913970947266, 31.938568115234375, 31.938568115234375, 30.981922149658203, 30.871299743652344, 30.276273727416992, 30.01348114013672, 29.031047821044922, 29.02692222595215, 28.923633575439453, 28.723735809326172, 27.933712005615234, 27.647003173828125, 27.63153839111328, 27.63153839111328, 27.63153839111328, 27.150936126708984, 27.148269653320312, 26.54255485534668, 26.54255485534668, 26.082927703857422, 25.923595428466797, 25.787158966064453, 25.47100067138672, 25.02206802368164, 24.790725708007812, 24.665077209472656, 24.594886779785156, 24.594886779785156, 23.6048583984375, 23.357234954833984, 23.302791595458984, 23.302791595458984, 23.302791595458984, 23.302791595458984, 23.219398498535156, 23.074399948120117, 23.074399948120117, 23.074399948120117, 23.005935668945312, 22.67073631286621, 21.951536178588867, 21.390079498291016, 21.323143005371094, 21.11711883544922, 20.951736450195312, 20.862043380737305, 20.62955665588379, 20.46038818359375, 20.264034271240234, 19.9129581451416, 19.797203063964844, 19.60513687133789, 19.60513687133789, 19.578704833984375, 19.284400939941406, 18.736984252929688, 18.736984252929688, 18.736984252929688, 18.736984252929688, 18.736984252929688, 18.221832275390625, 17.648906707763672, 17.648906707763672, 17.648906707763672, 17.648906707763672, 17.648906707763672, 17.64484214782715, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762 ], "content": [ "Can anyone please explain me the difference between a Framework like STAF software testing automation framework and Tool like selenium .", "Of course you can either build a test automation framework and use it for your own application or create a generic test automation framework and make it available to the testing community for everyone to use which is what STAF is .", "In case of test automation tools are software that let you automate your tests on an application .", "How run remote python script with STAF", "I am trying to ping STAF using local host .. . .. . Command is .. . .. . it shows the below error .. . .. . Error registering with STAF RC : 21 .. . .. . I have already executed startSTAFProc.sh to start STAF it is showing output .. . .. . Library staf startSTAFProc.sh .. . exit .. . logout Process completed .. . .. . How to fix this error", "By default STAF is getting started at Logon .", "the python script is in usr local staf services wbxtf wbxtf python TeleLogAgent.py .", "I don t think you can run STAF from a python script .", "For doing this I am using staf which gets invoked in one php script but getting below error even if I run staf command like below .. . .. . At the time of starting staf it says staf initialized .. . .. . Ping test also gives same error .. . .. . I am running staf version 3.4.11 on RHEL 6.3", "I did it in windows way not STAF : 1 .", "Tool : .. . .. . Simply put a tool is a software .", "Hi I have installed STAF http : prdownloads.sourceforge.net staf STAF3419-setup-winamd64.exe download on my windows 2008 server machine .", "Does the project software not have a more inert descriptive page that you could link-to", "I want to start STAF as soon as I boot may machine .", "staf is running on remoteVM with correct trust levels .", "Framework : .. . .. . The most popular test automation tools like Selenium and Visual Studio provide all the basic features you require to build your own tests .", "In one remote-server has one python script I want to send one staf command to the remote-server to run the python script .", "These frameworks are used in long-term test automation projects which require scripting of thousands of test cases .", "I have been working on STAF STAX .", "I have little idea about STAF STAX .", "All these three machines are interconnected using STAF .", "Simply put a framework is what you create with a tool or a collection of tools to test your application .", "in my head a framework is a platform made for developers so you use a framework to build other tools .", "I added 1 config file at etc ld.so.conf.d staf.conf Content : usr local staf lib and then did ldconfig .", "I did following : .. . .. . Basically adding STAF library path in etc ld.so.conf.d staf.conf", "I have been working on STAF STAX .", "There are myriads of test automation tools that one can choose from depending on one s requirements .", "I tried updating my staf to latest version with latest python version .", "A typical framework consists of two parts : test scripts and function libraries .", "From the error codes list http : staf.sourceforge.net current2x STAFRC.htm RC : 10 means that the OS returned an error so the problem is not with STAF .", "Things to consider when we design the framework including : .. . Maintainability .. . Reusability .. . Data Driven .. . Reporting .. . Schedule running through CI tools like Jenkins .. . Example : We design a Test Automation Framework by using WebDriver + Java + TestNG + ANT to meet the objective to identify our current code base stability and the test will be trigger and run by jenkins in a daily basis SSRS report will captured in a daily basis as well each time the test finished .", "This requires the creation of a Framework which is nothing but a collection of code written using a tool of one s choice that makes testing an application easy .", "I have a STAF job which kicks off an Ant script all run under a functional ID .", "I want to run python script test.py using STAF using below command but getting Retrun code 1", "A framework is normally just wrapping a tool to make it easier to make a test by imparting knowledge of your application a standard example is login .", "FRAMEWORK .. . .. . We DESIGN a framework to meet the organization mission .", "My objective is to read a JSON file using STAF STAX Return Testcase PASS or FAIL .", "Python Version Detail .. . .. . Here is my Code : .. . .. . It is giving error given below .. . .. . What s the process to include JSON in STAF Module .", "I have a STAX Job new15.xml inside home dharm staf services stax samples location .", "Using STAF command from machine C I am starting FTP program TCL script on machine B .", "If you are short on budget you will prefer open-source tools over commercial tools and so on .", "STAF launches this script : .. . .. . I would understand if Ant would fail on any of these tasks with a permissions error but I cannot understand why it would hang .", "This is how I run the command via staf but it doesn t seem to list the files and folders under C : Program Files .. . Even though the folder actually exists . .", "Environment variable points to C : STAF32 bin Pythonpath C : STAF bin .. . .. . Pycharm environment vairble PYTHONCASEOK .. . .. . Stuck on this one for a long time .", "Application Testing is a huge industry now and there is no dearth of testing tools available in the market .", "I am new to testing .", "framework is a tool to build other tools .", "Also how to select a tool for a particular framework .", "However some testing tools like Telerik Test Studio let you write script-less tests where your tests will consist a bunch of easily understandable keywords not code .", "A tool like selenium is what actually does the automation it has an API that will work for pretty much anything it covers in this case websites but it knows nothing about how the website you want to test works this means it deals with low-level constructs such as elements on a page and clicks .", "Tools things for developers Apps things for users .", "Selection of testing tools : .. . .. . To address your second question there is no straight-forward answer to it .", "The commonly used terms like Framework and tool confuses me a lot .", "Test Scripts are the pieces of code that need to be executed to perform actions on the application under test AUT .", "You can also use an external database to pass test data to your test scripts during run-time instead of hard-coding it in your test scripts .", "Some examples are Selenium UFT Visual Studio CUIT Jamo Solutions Meux Test T-Plan Robot Telerik Test Studio etc .", "However they do not provide ready-made features like Reporting and Exception Handling for testing purposes .", "see stackoverflow.com questions 1415592 http : stackoverflow.com questions 1415592 what-is-the-major-difference-between-a-framework-and-a-toolkit", "This is where a framework comes into play normally with selenium it will be page objects see here http : code.google.com p selenium wiki PageObjects", "Function Libraries are classes consisting of important functions that are called by your test scripts .", "Clear the Users must enter a user name and password to use this computer check box and then click Apply .", "Say you want a test that checks when you enter a correct username and password in you get access to application .", "The main objective of these frameworks is to reduce the time required to script a test case by reusing code that has already been written .", "They often include very strong function libraries which enable scripting of test cases using just predefined keywords .", "If it is a Web application you can use Selenium UFT Visual Studio or Test Studio .", "If it is a mobile app you can use Appium Meux Test or T-Plan Robot .", "Example : We use Selenium IDE as a tools helps us to automate some repetitive steps to do certain verification during our smoke test .", "Resolved this issue by setting Host name using command scutil --set HostName name .. . .. . Then restarted machine and started startSTAFProc.sh from terminal", "How to run the command", "Thanks", "It must be either C++ Java or Perl .", "Use the developer guide here : http : staf.sourceforge.net current stafsdg.html .. . .. . Although using Java Runtime.Exec if the path doesn t change you could run the .py program from java code .", "If you want to test your mobile app over a large number of devices and platforms you will prefer cloud-based tools like Sauce Labs Perfecto Mobile or Device Anywhere .", "I want to copy a file from one directory to another directory .", "After you get this error what is the result-of echo", "Hi Burhan .. . output is 0", "There is even a faq entry http : staf.sourceforge.net current STAFFAQ.htm d0e1786 specifically for RC 10 .", "Yes i checked it but not getting any clue on this .", "All files are present at respective paths also .", "@Burhan . . the problem is solved .", "Thanks for your help :", "What are the criterias used for selection", "Brief explanations are welcomed", "@Leo Can u please elaborate your comment as a answer", "I will try to answer what I believe people normally use these terms to mean lets start with the simpler term : A tool .", "Using just selenium it would something like : .. . .. . driver.findElement By.id username .sendKeys MyUsername driver.findElement By.id password .sendKeys password123 driver.findElement By.id login .click .. . .. . Thats pretty simple but as you can guess login is going to be used a lot across your tests and so it makes sense to move this into a place that makes it easier to reuse both from a less code stand point and maintainability .", "Thanks Harris .", "But I am expecting an in-depth answer which can explain the difference even more .", "en.wikipedia.org wiki http : en.wikipedia.org wiki Test automation Defining boundaries between automation framework and a testing tool", "Base on my understanding : .. . .. . TOOLS .. . .. . We USE tools to meet our objective can be own self or your small groups of team .", "Stakeholders can review the daily code stability report anytime he she needed .", "Hope that can help you : D", "Often one has to write tests in the tools using a supported programming language .", "For instance testers using UFT need to code in VB while those using Visual Studio can code in both VB and C .", "These can include timing functions reporting logging functions exception-handling functions data communication functions etc .", "Frameworks that employ external databases are called data-driven frameworks .", "The external database can be of your choice be it a SQL Server an XML file or a simple Excel spreadsheet .", "Data-driven frameworks make use of APIs or include custom-made classes that let you communicate with the database to transfer data .", "Another type of frameworks are the keyword-driven frameworks ." ] }
{ "confidence": [ 61.58576202392578, 57.25446319580078, 52.36882019042969, 47.386993408203125, 38.86054992675781, 38.76726531982422, 38.41291046142578, 33.01572799682617, 32.547119140625, 30.199724197387695, 29.73580551147461, 29.548370361328125, 29.08380126953125, 29.017274856567383, 29.017274856567383, 26.574054718017578, 26.414644241333008, 26.385711669921875, 14.227483749389648, 12.312459945678711 ], "content": [ "Question : I am new to testing . The commonly used terms like Framework and tool confuses me a lot . Can anyone please explain me the difference between a Framework like STAF software testing automation framework and Tool like selenium . Also how to select a tool for a particular framework . What are the criterias used for selection Brief explanations are welcomed Comment : framework is a tool to build other tools . Comment : @Leo Can u please elaborate your comment as a answer Comment : in my head a framework is a platform made for developers so you use a framework to build other tools . Tools things for developers Apps things for users . see stackoverflow.com questions 1415592 http : stackoverflow.com questions 1415592 what-is-the-major-difference-between-a-framework-and-a-toolkit .. . Answer : Tool : .. . .. . Simply put a tool is a software . In case of test automation tools are software that let you automate your tests on an application . There are myriads of test automation tools that one can choose from depending on one s requirements . Some examples are Selenium UFT Visual Studio CUIT Jamo Solutions Meux Test T-Plan Robot Telerik Test Studio etc . Often one has to write tests in the tools using a supported programming language . For instance testers using UFT need to code in VB while those using Visual Studio can code in both VB and C . However some testing tools like Telerik Test Studio let you write script-less tests where your tests will consist a bunch of easily understandable keywords not code . Framework : .. . .. . The most popular test automation tools like Selenium and Visual Studio provide all the basic features you require to build your own tests . However they do not provide ready-made features like Reporting and Exception Handling for testing purposes . This requires the creation of a Framework which is nothing but a collection of code written using a tool of one s choice that makes testing an application easy . Simply put a framework is what you create with a tool or a collection of tools to test your application . A typical framework consists of two parts : test scripts and function libraries . Test Scripts are the pieces of code that need to be executed to perform actions on the application under test AUT . Function Libraries are classes consisting of important functions that are called by your test scripts . These can include timing functions reporting logging functions exception-handling functions data communication functions etc . You can also use an external database to pass test data to your test scripts during run-time instead of hard-coding it in your test scripts . Frameworks that employ external databases are called data-driven frameworks . The external database can be of your choice be it a SQL Server an XML file or a simple Excel spreadsheet . Data-driven frameworks make use of APIs or include custom-made classes that let you communicate with the database to transfer data . Another type of frameworks are the keyword-driven frameworks . These frameworks are used in long-term test automation projects which require scripting of thousands of test cases . The main objective of these frameworks is to reduce the time required to script a test case by reusing code that has already been written . They often include very strong function libraries which enable scripting of test cases using just predefined keywords . For example common actions on an application like login and logout are performed by single line codes like : .. . .. . and .. . .. . where Actions is a Function Library which consists of the Login and Logout functions . This massively reduces the script size and the long-term maintenance requirements of the script among other benefits . Of course you can either build a test automation framework and use it for your own application or create a generic test automation framework and make it available to the testing community for everyone to use which is what STAF is . Selection of testing tools : .. . .. . To address your second question there is no straight-forward answer to it . There are a number of criteria that can affect your decision . But in the end it is all about your requirements and the requirements of your AUT . If it is a Windows desktop app you have to use Coded UI Tests in Visual Studio . If it is a Web application you can use Selenium UFT Visual Studio or Test Studio . If it is a mobile app you can use Appium Meux Test or T-Plan Robot . If you want to test your mobile app over a large number of devices and platforms you will prefer cloud-based tools like Sauce Labs Perfecto Mobile or Device Anywhere . If you are short on budget you will prefer open-source tools over commercial tools and so on . Application Testing is a huge industry now and there is no dearth of testing tools available in the market . You will find the perfect tool for you if you know what you want and do some research on Google .", "Question : I am new to testing . The commonly used terms like Framework and tool confuses me a lot . Can anyone please explain me the difference between a Framework like STAF software testing automation framework and Tool like selenium . Also how to select a tool for a particular framework . What are the criterias used for selection Brief explanations are welcomed Comment : framework is a tool to build other tools . Comment : @Leo Can u please elaborate your comment as a answer Comment : in my head a framework is a platform made for developers so you use a framework to build other tools . Tools things for developers Apps things for users . see stackoverflow.com questions 1415592 http : stackoverflow.com questions 1415592 what-is-the-major-difference-between-a-framework-and-a-toolkit .. . Answer : Base on my understanding : .. . .. . TOOLS .. . .. . We USE tools to meet our objective can be own self or your small groups of team . Example : We use Selenium IDE as a tools helps us to automate some repetitive steps to do certain verification during our smoke test . FRAMEWORK .. . .. . We DESIGN a framework to meet the organization mission . Things to consider when we design the framework including : .. . Maintainability .. . Reusability .. . Data Driven .. . Reporting .. . Schedule running through CI tools like Jenkins .. . Example : We design a Test Automation Framework by using WebDriver + Java + TestNG + ANT to meet the objective to identify our current code base stability and the test will be trigger and run by jenkins in a daily basis SSRS report will captured in a daily basis as well each time the test finished . Stakeholders can review the daily code stability report anytime he she needed . Hope that can help you : D", "Question : I am new to testing . The commonly used terms like Framework and tool confuses me a lot . Can anyone please explain me the difference between a Framework like STAF software testing automation framework and Tool like selenium . Also how to select a tool for a particular framework . What are the criterias used for selection Brief explanations are welcomed Comment : framework is a tool to build other tools . Comment : @Leo Can u please elaborate your comment as a answer Comment : in my head a framework is a platform made for developers so you use a framework to build other tools . Tools things for developers Apps things for users . see stackoverflow.com questions 1415592 http : stackoverflow.com questions 1415592 what-is-the-major-difference-between-a-framework-and-a-toolkit .. . Answer : I will try to answer what I believe people normally use these terms to mean lets start with the simpler term : A tool . A tool like selenium is what actually does the automation it has an API that will work for pretty much anything it covers in this case websites but it knows nothing about how the website you want to test works this means it deals with low-level constructs such as elements on a page and clicks . A framework is normally just wrapping a tool to make it easier to make a test by imparting knowledge of your application a standard example is login . Say you want a test that checks when you enter a correct username and password in you get access to application . Using just selenium it would something like : .. . .. . driver.findElement By.id username .sendKeys MyUsername driver.findElement By.id password .sendKeys password123 driver.findElement By.id login .click .. . .. . Thats pretty simple but as you can guess login is going to be used a lot across your tests and so it makes sense to move this into a place that makes it easier to reuse both from a less code stand point and maintainability . This is where a framework comes into play normally with selenium it will be page objects see here http : code.google.com p selenium wiki PageObjects Comment : Thanks Harris . But I am expecting an in-depth answer which can explain the difference even more . Comment : en.wikipedia.org wiki http : en.wikipedia.org wiki Test automation Defining boundaries between automation framework and a testing tool", "Question : Hi I have installed STAF http : prdownloads.sourceforge.net staf STAF3419-setup-winamd64.exe download on my windows 2008 server machine . By default STAF is getting started at Logon . I want to start STAF as soon as I boot may machine . How can I change this setting Comment : Providing a link-to a download page isn t the most friendly of actions . Does the project software not have a more inert descriptive page that you could link-to .. . Answer : I did it in windows way not STAF : 1 . In the Search box type control userpasswords2 and then press ENTER . Administrator permission required If you are prompted for an administrator password or confirmation type the password or provide confirmation . 2 . Clear the Users must enter a user name and password to use this computer check box and then click Apply . 3 . In the Automatically Log On dialog box type your password and then click OK . 4 . In the User Accounts dialog box click OK .", "Question : I am trying to ping STAF using local host .. . .. . Command is .. . .. . it shows the below error .. . .. . Error registering with STAF RC : 21 .. . .. . I have already executed startSTAFProc.sh to start STAF it is showing output .. . .. . Library staf startSTAFProc.sh .. . exit .. . logout Process completed .. . .. . How to fix this error .. . Answer : Resolved this issue by setting Host name using command scutil --set HostName name .. . .. . Then restarted machine and started startSTAFProc.sh from terminal", "Question : I want to copy a file from one directory to another directory . For doing this I am using staf which gets invoked in one php script but getting below error even if I run staf command like below .. . .. . At the time of starting staf it says staf initialized .. . .. . Ping test also gives same error .. . .. . I am running staf version 3.4.11 on RHEL 6.3 Comment : After you get this error what is the result-of echo Comment : Hi Burhan .. . output is 0 Comment : From the error codes list http : staf.sourceforge.net current2x STAFRC.htm RC : 10 means that the OS returned an error so the problem is not with STAF . There is even a faq entry http : staf.sourceforge.net current STAFFAQ.htm d0e1786 specifically for RC 10 . Comment : Yes i checked it but not getting any clue on this . All files are present at respective paths also . Comment : @Burhan . . the problem is solved . I added 1 config file at etc ld.so.conf.d staf.conf Content : usr local staf lib and then did ldconfig . Thanks for your help : .. . Answer : I did following : .. . .. . Basically adding STAF library path in etc ld.so.conf.d staf.conf", "Question : How run remote python script with STAF In one remote-server has one python script I want to send one staf command to the remote-server to run the python script . the python script is in usr local staf services wbxtf wbxtf python TeleLogAgent.py . How to run the command Thanks .. . Answer : I don t think you can run STAF from a python script . It must be either C++ Java or Perl . Use the developer guide here : http : staf.sourceforge.net current stafsdg.html .. . .. . Although using Java Runtime.Exec if the path doesn t change you could run the .py program from java code .", "Question : I have been working on STAF STAX . My objective is to read a JSON file using STAF STAX Return Testcase PASS or FAIL . I tried updating my staf to latest version with latest python version . Python Version Detail .. . .. . Here is my Code : .. . .. . It is giving error given below .. . .. . What s the process to include JSON in STAF Module . .. . Answer : I have little idea about STAF STAX . But going by what the error says it seems simplejson module is not available . Rewrite the import line as following : .. . .. . You can fallback to json module in case import fails Python 2.6+ .", "Question : I have 3 machines A B C connected to a Router . A B C are in same subnet . All these three machines are interconnected using STAF . I am using machine A as an FTP server machine B as an FTP client . Using STAF command from machine C I am starting FTP program TCL script on machine B . Now the question is How C will know whether FTP traffic is flowing between A B .. . Answer : The ftp package http : core.tcl.tk tcllib doc trunk embedded www tcllib files modules ftp ftp.html allows you to specify a progress monitor callback in the ftp : : Open command : .. . .. . This will print a message every time a chunk is transferred the chunk size is configurable in the options to ftp : : Open via the -blocksize option it s 4096 by default . On modern networks this is probably going to write messages very rapidly", "Question : Why do I not get a proper list of processes below staf is running on remoteVM with correct trust levels . .. . Answer : Went with this workaround . .", "Question : null .. . Answer : Environment variable points to C : STAF32 bin Pythonpath C : STAF bin .. . .. . Pycharm environment vairble PYTHONCASEOK .. . .. . Stuck on this one for a long time .", "Question : I have 3 machines A B C connected to a Router . A B C are in same subnet . All these three machines are interconnected using STAF . I am using machine A as an FTP server machine B as an FTP client . Using STAF command from machine C I am starting FTP program TCL script on machine B . Now the question is How C will know whether FTP traffic is flowing between A B .. . Answer : Comment : Mere code is not an answer and this code doesn t detect whether FTP traffic is flowing between A and B . -1", "Question : I have been working on STAF STAX . My objective is to read a JSON file using STAF STAX Return Testcase PASS or FAIL . I tried updating my staf to latest version with latest python version . Python Version Detail .. . .. . Here is my Code : .. . .. . It is giving error given below .. . .. . What s the process to include JSON in STAF Module . .. . Answer : STAX uses Jython a version of Python written in Java not Python to execute code within a element in a STAX job . As i said i was using the latest version of STAX v3.5.4 then it provides an embedded Jython 2.5.2 which implements the same set of language features as Python 2.5 to execute code within a element . .. . Note : Jython 2.5.2 does not include simplejson since simplejson is included in Python 2.6 or later . .. . Appendix F : Jython and CPython Differences in the STAX User s Guide at http : staf.sourceforge.net current STAX staxug.html Header CPythonDiffs talks about some differences between Jython and Python aka CPython . Installing Python 2.7 or later in system will have no effect on the fact that STAX uses Jython 2.5.2 to execute code within a element in a STAX job . However simplejson can be run via Jython . I added the directory containing the simplejson module to the sys.path within my STAX job and then import simplejson . For example : .. . .. . Or if you want to use Python 2.7 or later that you installed on your system that includes simplejson you can run a Python script that uses json via your STAX job using a element . .. . For example to use Python 2.7 if installed in C : Python2.7 to run a Python script named YourPythonScript.py in C : tests .", "Question : I want to run python script test.py using STAF using below command but getting Retrun code 1 .. . Answer : Check that the remote machine is on trust list then try it without PARAMS or hardcode the value inside your python script .", "Question : This is how I run the command via staf but it doesn t seem to list the files and folders under C : Program Files .. . Even though the folder actually exists . . enter image description here http : i.stack.imgur.com iGGgK.png .. . Answer : Surrounding path with double quotes directly in command worked . .", "Question : null .. . Answer : I have a STAX Job new15.xml inside home dharm staf services stax samples location . new15.xml have two function main and readFile .. . .. . Required Argument for readFile is file name . .. . I want to execute this command using command-line but i also want to give required parameter to readFile function . What are the modification i should do in command to make it work . What I have Trierd .. . .. . FIRST .. . .. . 2ND Command", "Question : null .. . Answer : I have been working on STAF STAX . I have created a STAX job using some modules of python and multiple functions but all of them are in the same file . Now I want to create a big STAX job using multiple python programs and different functions from each program . How can I import or include multiple functions from different programs stored in different files in a single STAX JOB Ex : .. . .. . Any help How can I use the Conditional Import of a function in a STAX job", "Question : I have a STAF job which kicks off an Ant script all run under a functional ID . The ant script does basic init tasks which work fine and then hangs on one of the following tasks : delete mkdir or junit depending on how much muddling I do in the file system . I am able to sudo to this functional ID and run the corresponding commands from a shell just fine ex : rm -rf path results latestDate . Clearly something is different about running in the Ant environment under the functional id . In fact I can run the script just fine with my own id .. . .. . path results has 777 permissions before my script runs and when path results latestDate exists it is owned by the same functional id w 777 permissions . STAF launches this script : .. . .. . I would understand if Ant would fail on any of these tasks with a permissions error but I cannot understand why it would hang . I would like help either a determining why there is a hang or b how to convert the hang to a hard failure Comment : It would probably help debugging to have the current stack when Ant is hanging . To get stack use jstack or send a kill -3 to the process running Ant and look into its standard output . .. . Answer : Solved the Ant script was hanging on an exec command that was waiting for input from STDIN . Execution had continued past that point because it was launched with spawn attribute . When I removed this exec task from my init target the Ant script ran as expected .", "Question : Considering the following : .. . .. . I can t find the way to copy the jpg file 2.jpg on the remote machine 192.168.1.139 . From CMD I use the following : .. . .. . and it s working but nothing happens when I run the script . The file is not copied on the remote machine . No errors are thrown . I use : .. . .. . to start a windows service and it s working . .. . Answer : This should work to COPY to C : Temp dir of remote : .. . .. . result.result will print the error in case there is any .", "Question : Assumming the following error is because the same path on local system does not exist on the remote system . Is there a way to specify an alternative path to save on remote system Error information : .. . Answer : Found correct command :" ] }
[ "yes-answer-long", "yes-answer-short" ]
staf
UNK_RELATION
bluetooth-keyboard@bluetooth@152
bluetooth-keyboard -- the core-bluetooth cb framework provides the necessary resources for ios apps to communicate with devices that are equipped with @placeholder low energy technology btle .
{ "confidence": [ 46.167747497558594, 39.54174041748047, 39.45246124267578, 37.806907653808594, 35.47002410888672, 33.51335906982422, 33.51335906982422, 33.51335906982422, 32.885311126708984, 32.14152908325195, 32.14152908325195, 31.295425415039062, 30.715286254882812, 30.497352600097656, 29.574024200439453, 27.52360725402832, 27.52360725402832, 26.151775360107422, 26.151775360107422, 26.151775360107422, 25.054149627685547, 24.35573387145996, 23.893457412719727, 23.475770950317383, 23.111366271972656, 23.07874870300293, 22.57415771484375, 22.215072631835938, 21.32967758178711, 21.083938598632812, 20.777645111083984, 20.29595947265625, 19.47784423828125, 19.45728874206543, 19.45728874206543, 18.797142028808594, 18.797142028808594, 18.797142028808594, 18.196773529052734, 18.196773529052734, 18.196773529052734, 18.196773529052734, 17.933076858520508, 17.933076858520508, 17.86046028137207, 17.619665145874023, 17.121614456176758, 16.561246871948242, 16.561246871948242, 15.322834014892578, 15.322834014892578, 15.322834014892578, 15.322834014892578, 15.322834014892578, 15.322834014892578, 14.917070388793945, 14.19487190246582, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 13.578853607177734, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152, 12.207022666931152 ], "content": [ "An iOS device cannot act as a Bluetooth keyboard directly .", "Most modern Android phones supports Bluetooth low energy since Bluetooth 4.0 so you could use the HID Over GATT Profile https : developer.bluetooth.org TechnologyOverview Pages HOGP.aspx .", "I just got belkin qode bluetooth-keyboard for ipad-mini but it is in french .", "My application works with remote Bluetooth keyboard .", "for the section 2 if you can sniff the Bluetooth air trace you may find a real Bluetooth keyboard and find out the descriptor then copy reuse it .", "Is there any way to receive return press event of external bluetooth-keyboard for number pad textfield", "I purchased a selfie stick remote that uses Bluetooth to connect to my android device under an HID profile as a keyboard .", "While doing research for this I came across this forum post http : stackoverflow.com questions 4263101 how-to-talk-to-a-bluetooth-keyboard .", "There is a 100 supported way to handle keyboard-shortcuts on a Bluetooth keyboard in iOS 7 using the new UIKeyCommand https : developer.apple.com library ios documentation UIKit Reference UIKeyCommand class Reference Reference.html apple ref occ cl UIKeyCommand class and the UIResponder https : developer.apple.com library ios documentation EventHandling Conceptual EventHandlingiPhoneOS event delivery responder chain event delivery responder chain.html chain .", "I want to use my iPad as a keyboard for my Mac-Mini MacBook using Bluetooth .", "you should add a long string to see points in the center .. . Connect bluetooth-keyboard to device .", "The bluetooth related part of the ExternalAccessory framework allows you to connect to devices that are MFi https : en.wikipedia.org wiki MFi Program approved and use iAP Apple s proprietary substitute for SPP https : en.wikipedia.org wiki List of Bluetooth profiles Serial Port Profile .28SPP.29 .", "Due to the iOS version issue some of the old device may not support Bluetooth advertisement function hence your app could no run on such iOS version .", "I am getting some issue with using a bluetooth-keyboard to UIPanGestureRecognizer which is used for scrolling a textview .", "I made a calculator app swift and I set up some UIKeyCommands so that if the user has a bluetooth-keyboard they can type numbers symbols into the calculator .", "The post states that All normal Bluetooth keyboards implement the HID profile which requires an L2CAP connection .", "The post is five years old now and my question is : Is it now possible to intercept Bluetooth HID communications without using NDK .", "I m developing an application that lets the user scan barcodes using an external barcode scanner connected via bluetooth .", "for this case you may need refer HOGP which defined on Bluetooth SIG website .", "https : www.bluetooth.org docman handlers downloaddoc.ashx doc id 245141 3 Normal Bluetooth actions such as advertisement connection handler .", "I am facing issue while pressing the tab key on a bluetooth-keyboard does not take cursor to next textbox it goes to the next tab space within the current textbox .", "It s not obvious why this would only happen for bluetooth keyboards but there are plenty of edge cases that can creep in when you start introducing wireless technologies .", "When switched to english keyboard on iPad and M is pressed it types .. . Is there any chance on reprogramming the keyboard itself or remapping it in iPad", "In IOS 6 I had overridden the .. . .. . function in the UIApplication https : developer.apple.com library ios documentation UIKit Reference UIApplication Class subclass to get the key pressed combinations on external keyboard .", "The app on iOS would send data to the OS X app and this would then need to provide the keyboard input simulation on OS X .", "Without any additional UISupportedExternalAccessoryProtocols supported external-accessory protocols in info.plist connecting a BT keyboard to iOS works fine with interacting with UI controls .", "Maybe I m expecting too much here but is it possible that iOS considers the app unable to actually interact with the BT keyboard since it s not listed in info.plist and therefore won t publish it via EAAccessoryManager yet since the UI framework is privileged it will still be aware that it s there and use it for text field interaction", "a virtual input keyboard just like the original input keyboard on iPad needed to collect keyboard event .", "Now the problem is when hardware keyboard is attached I am not able to handle the return key press on hardware keyboard in case of Number pad .", "The barcode scanner acts as a keyboard i.e .", "2 A descriptor which describe your virtual keyboard event is needed used for your MAC to parse your keyboard event .", "Android so far only provides the ability to use RFCOMM connections .", "I did blog about this http : blog.swilliams.me words 2013 09 19 handling-keyboard-events-with-modifier-keys-in-ios-7 but here s the gist : .. . .. . Somewhere in your Responder chain add a method for keyCommands https : developer.apple.com library ios documentation UIKit Reference UIResponder Class Reference Reference.html apple ref occ instp UIResponder keyCommands that returns an array of UIKeyCommand objects : .. . .. . Then when F is pressed in a text input view the Responder chain will look for that handleCommandF method .", "Android thinks that the scanned barcodes have been typed on a keyboard .", "If the user has not typed anything with the BT keyboard yet i.e .", "If you are using a UITextField for input you can implement it s delegate method which should work for hardware and software keyboard return key.. .", "I need to support external keyboard functionality in my app and need key combinations like Alt+Tab Tab to be detected in the app to trigger some event .", "You would need to use the Native Development Kit and write your keyboard code in C to using bluez to achieve your goal .", "Is there a way to allow input from an external keyboard to the app although the screen has been turned off", "I don t have access to what the barcode scanner actually read in the first place just what it returns as the keyboard .", "Their are several things need to be done on your iPad : 1 An app which collect the keyboard event i.e .", "not activating the key commands I guess then they can type with the BT keyboard as normal into a text field .", "However when it s connected I don t see anything in EAAccessoryManager : : connectedAccessories the array itself is nil and therefore do not receive notifications of external-accessory connection disconnection with the BT keyboard is powered on off .", "The keyboard probably uses the HID https : en.wikipedia.org wiki List of Bluetooth profiles Human Interface Device Profile .28HID.29 profile which means that you won t be able to connect to it from your application .", "But now I am testing my app in IOS 7 and the sendEvent doesn t even seem to get called for any hardware key pressed event .", "When I press the button on the selfie stick my android devices registers keycode 66 enter down and up and keycode 24 volume down down and up .", "Tested on : .. . .. . iPad 4 iOS 8.3 12F69 .. . iPad mini 9 betta 3 13A4293g .. . .. .", "UPDATE .. . .. . I ve made a small step in the right direction by using : .. . .. . This will show the app without the non-secure lock screen when a new input from the keyboard is processed .", "However : I also have a couple of standard text fields and I want the UIKeyCommands to stop when the user goes into one of those text fields so they can type regularly with the BT keyboard again .", "Layout of the keys is ok I remember where which letter is but when I press M it types in my language - czech letter .", "Thanks", "This is not a programming question .", "Have you checked the product s User Manual or the manufacturer s support website", "Yes nothing helpful is there .", "Thats why I need to reprogram the keyboards firmware if possible .", "If you re wanting to scroll a text view the text view already has a built-in gesture that listens for keyboard-events or any other UIPress event you just need to enable it .", "@Baz it won t affect in my case you can try it out sstn explanation to your prob : my solutions might not sounds bulletproof but android devloper WS it self stated it use those flag instead of Wakeup lock and i dnt think Wakeup lock required in this situation another case android framework have highest right for phone call if any call arrive during any process e.g Payment on Amazon and if user uses mobile data then", "In the app I am performing some action on custom done button that is added on the Number pad as number pad does not have return key .", "you can use this code .", "this works for general textfield not for NumberPad", "Any Solutions. .", "If there are multiple definitions it ll use the most tightly scoped one eg .", "the View itself takes precedence over a ViewController .", "Do note that this will only work when an input such as UITextField or UITextView is the first responder .", "If you want global shortcuts in your app you can do the trick where you hide a UITextField offscreen and focus on that .", "There is a missing closing square-bracket in the last line .", "Thanks", "padding for SO", "You don t need a UITextField necessarily .", "You can create a custom UIView subclass that returns YES for canBecomeFirstResponder : and then put that custom view in your view-hierarchy and set it as the first responder .", "My goal is to create a background service that listens for the selfie stick button to be pressed and launch the app .", "It uses GATT rather than RFCOMM .", "Has been supported since KitKat https : developer.android.com about versions kitkat.html .", "The app is working fine as it is as long as the screen stays on .", "Once the screen turns off I can continue scanning barcodes but the scanned text doesn t reach the app anymore but rather invokes actions on the lock screen .", "Alternatively I will have to force the screen to stay turned on but this isn t bullet-proof as the user might accidentally lock the screen .", "Unfortunately the first letter is missing .", "This has to be caused by the first letter waking the screen and the rest of the input actually reaching the EditText .", "add this code to your scanner activity getWindow .addFlags WindowManager.LayoutParams.FLAG KEEP SCREEN ON and add this permission in manifest uses-permission android : name android.permission.WAKE LOCK .", "you are done .", "Depending on the version you might developp a widget to add-on the lock screen .", "This could listen to the keyboad BT scanner and send the data to your activity .", "This works for me in a similar situation .", "Just keep screen on while your application in foreground .", "When the user accidentally presses the power button of his device will this still forward the input events to the app", "I guess there won t be a bullet-proof approach .", "What happens if another activity places itself in the foreground", "Wouldn t it be enough to echo a confirmation if a valid code was received", "@sstn The app already does that the user can disable this feature though .", "The difference between locking the screen and switching to another app is that locking the screen happens more easily because it s a hardware button that is clicked easily .", "I guess I m out of luck here.. .", "we just can hope for best and in this case i found it most useful solution by adding those flag anyways thanks for surfacing your view i try to find better one next time .", "@AparAmin Since this answer was the most helpful so far you get the bounty congrats .", "if you are only losing the first number then you can.. . recover that using the Check Digit http : en.wikipedia.org wiki Check digit .", "I know it is a hack but it should solve this problem .", "I m missing the first character of the decoded barcode the final string .", "I also don t know what kind of barcode it is that I receive .", "So I m afraid this is not an option .", "So please suggest me how can I do this .", "Please provide me the any link that help me regarding this ." ] }
{ "confidence": [ 64.14144134521484, 48.913429260253906, 48.35186767578125, 39.527469635009766, 38.9805908203125, 38.47343444824219, 38.22667694091797, 36.44370651245117, 33.7427864074707, 32.350643157958984, 30.719406127929688, 30.657947540283203, 30.646636962890625, 27.444087982177734 ], "content": [ "Question : I purchased a selfie stick remote that uses Bluetooth to connect to my android device under an HID profile as a keyboard . When I press the button on the selfie stick my android devices registers keycode 66 enter down and up and keycode 24 volume down down and up . My goal is to create a background service that listens for the selfie stick button to be pressed and launch the app . While doing research for this I came across this forum post http : stackoverflow.com questions 4263101 how-to-talk-to-a-bluetooth-keyboard . The post states that All normal Bluetooth keyboards implement the HID profile which requires an L2CAP connection . Android so far only provides the ability to use RFCOMM connections . You would need to use the Native Development Kit and write your keyboard code in C to using bluez to achieve your goal . The post is five years old now and my question is : Is it now possible to intercept Bluetooth HID communications without using NDK . .. . Answer : Most modern Android phones supports Bluetooth low energy since Bluetooth 4.0 so you could use the HID Over GATT Profile https : developer.bluetooth.org TechnologyOverview Pages HOGP.aspx . It uses GATT rather than RFCOMM . Has been supported since KitKat https : developer.android.com about versions kitkat.html .", "Question : I want to use my iPad as a keyboard for my Mac-Mini MacBook using Bluetooth . So please suggest me how can I do this . Please provide me the any link that help me regarding this . Thanks Comment : You would need to write an app for the iPad and a companion app for OS X . The app on iOS would send data to the OS X app and this would then need to provide the keyboard input simulation on OS X . An iOS device cannot act as a Bluetooth keyboard directly . .. . Answer : One option is that you take your iPad as an peripheral and Mac-Mini MacBook as central and implement HOGP Hid Over Gatt Profile . Their are several things need to be done on your iPad : 1 An app which collect the keyboard event i.e . a virtual input keyboard just like the original input keyboard on iPad needed to collect keyboard event . 2 A descriptor which describe your virtual keyboard event is needed used for your MAC to parse your keyboard event . for this case you may need refer HOGP which defined on Bluetooth SIG website . https : www.bluetooth.org docman handlers downloaddoc.ashx doc id 245141 3 Normal Bluetooth actions such as advertisement connection handler . basically you need to nothing on you MAC but purely app development on your iPad . for the section 2 if you can sniff the Bluetooth air trace you may find a real Bluetooth keyboard and find out the descriptor then copy reuse it . Due to the iOS version issue some of the old device may not support Bluetooth advertisement function hence your app could no run on such iOS version .", "Question : Without any additional UISupportedExternalAccessoryProtocols supported external-accessory protocols in info.plist connecting a BT keyboard to iOS works fine with interacting with UI controls . However when it s connected I don t see anything in EAAccessoryManager : : connectedAccessories the array itself is nil and therefore do not receive notifications of external-accessory connection disconnection with the BT keyboard is powered on off . Maybe I m expecting too much here but is it possible that iOS considers the app unable to actually interact with the BT keyboard since it s not listed in info.plist and therefore won t publish it via EAAccessoryManager yet since the UI framework is privileged it will still be aware that it s there and use it for text field interaction .. . Answer : The bluetooth related part of the ExternalAccessory framework allows you to connect to devices that are MFi https : en.wikipedia.org wiki MFi Program approved and use iAP Apple s proprietary substitute for SPP https : en.wikipedia.org wiki List of Bluetooth profiles Serial Port Profile .28SPP.29 . The keyboard probably uses the HID https : en.wikipedia.org wiki List of Bluetooth profiles Human Interface Device Profile .28HID.29 profile which means that you won t be able to connect to it from your application .", "Question : null .. . Answer : I just got belkin qode bluetooth-keyboard for ipad-mini but it is in french . Layout of the keys is ok I remember where which letter is but when I press M it types in my language - czech letter . When switched to english keyboard on iPad and M is pressed it types .. . Is there any chance on reprogramming the keyboard itself or remapping it in iPad Thanks Comment : This is not a programming question . Have you checked the product s User Manual or the manufacturer s support website Comment : Yes nothing helpful is there . Thats why I need to reprogram the keyboards firmware if possible .", "Question : In the app I am performing some action on custom done button that is added on the Number pad as number pad does not have return key . Now the problem is when hardware keyboard is attached I am not able to handle the return key press on hardware keyboard in case of Number pad . Is there any way to receive return press event of external bluetooth-keyboard for number pad textfield .. . Answer : you can use this code .", "Question : I need to support external keyboard functionality in my app and need key combinations like Alt+Tab Tab to be detected in the app to trigger some event . In IOS 6 I had overridden the .. . .. . function in the UIApplication https : developer.apple.com library ios documentation UIKit Reference UIApplication Class subclass to get the key pressed combinations on external keyboard . But now I am testing my app in IOS 7 and the sendEvent doesn t even seem to get called for any hardware key pressed event . Any Solutions. . .. . Answer : There is a 100 supported way to handle keyboard-shortcuts on a Bluetooth keyboard in iOS 7 using the new UIKeyCommand https : developer.apple.com library ios documentation UIKit Reference UIKeyCommand class Reference Reference.html apple ref occ cl UIKeyCommand class and the UIResponder https : developer.apple.com library ios documentation EventHandling Conceptual EventHandlingiPhoneOS event delivery responder chain event delivery responder chain.html chain . I did blog about this http : blog.swilliams.me words 2013 09 19 handling-keyboard-events-with-modifier-keys-in-ios-7 but here s the gist : .. . .. . Somewhere in your Responder chain add a method for keyCommands https : developer.apple.com library ios documentation UIKit Reference UIResponder Class Reference Reference.html apple ref occ instp UIResponder keyCommands that returns an array of UIKeyCommand objects : .. . .. . Then when F is pressed in a text input view the Responder chain will look for that handleCommandF method . If there are multiple definitions it ll use the most tightly scoped one eg . the View itself takes precedence over a ViewController . Do note that this will only work when an input such as UITextField or UITextView is the first responder . If you want global shortcuts in your app you can do the trick where you hide a UITextField offscreen and focus on that . Comment : There is a missing closing square-bracket in the last line . Comment : Thanks padding for SO Comment : You don t need a UITextField necessarily . You can create a custom UIView subclass that returns YES for canBecomeFirstResponder : and then put that custom view in your view-hierarchy and set it as the first responder .", "Question : In the app I am performing some action on custom done button that is added on the Number pad as number pad does not have return key . Now the problem is when hardware keyboard is attached I am not able to handle the return key press on hardware keyboard in case of Number pad . Is there any way to receive return press event of external bluetooth-keyboard for number pad textfield .. . Answer : If you are using a UITextField for input you can implement it s delegate method which should work for hardware and software keyboard return key.. . Comment : this works for general textfield not for NumberPad", "Question : null .. . Answer : Steps to Crash : .. . .. . reate simple view application . Add textView and set some for it properties you can see it in code bellow . Cursor should be between points in the center of the field . you should add a long string to see points in the center .. . Connect bluetooth-keyboard to device . Move cursor to the center of the field .. . Press Cmd+Left Right .. . Always crash .. . .. . It is all code which I rote : .. . .. . Crash info : Nothing in logs just : in UITextView error : memory read failed for 0x0 .. . .. . I can t find anything about this problem on stackoverflow or in the internet . Does anyone has a any ideas about it Or just report to apple Tested on : .. . .. . iPad 4 iOS 8.3 12F69 .. . iPad mini 9 betta 3 13A4293g .. . .. . coursor should be between points in the center of the field http : i.stack.imgur.com XBnNn.png Comment : It s already fixed by apple .", "Question : null .. . Answer : I have created application in Xamarin for Android . I am facing issue while pressing the tab key on a bluetooth-keyboard does not take cursor to next textbox it goes to the next tab space within the current textbox . Can anyone please help me to identify the root cause Thanks Brijesh Pandya", "Question : I am getting some issue with using a bluetooth-keyboard to UIPanGestureRecognizer which is used for scrolling a textview . Do I need a different recognizer to detect up and down arrows .. . Answer : If you re wanting to scroll a text view the text view already has a built-in gesture that listens for keyboard-events or any other UIPress event you just need to enable it . Same thing for using touches to scroll it : the text view s built-in pan gesture can recognize those touches but it doesn t by default on tvOS . That s because the normal use-case on TV is for touches to move focus not scroll the scroll view . You can get the pan gesture to listen to touches by changing it s allowedTouchTypes like so : Comment : thanks this lead me to this forums.developer.apple.com thread 19184 https : forums.developer.apple.com thread 19184 which solved my problem by adding the directionalPressGestureRecognizer to the parent view .", "Question : I m developing an application that lets the user scan barcodes using an external barcode scanner connected via bluetooth . The barcode scanner acts as a keyboard i.e . Android thinks that the scanned barcodes have been typed on a keyboard . The app is working fine as it is as long as the screen stays on . Once the screen turns off I can continue scanning barcodes but the scanned text doesn t reach the app anymore but rather invokes actions on the lock screen . Is there a way to allow input from an external keyboard to the app although the screen has been turned off Alternatively I will have to force the screen to stay turned on but this isn t bullet-proof as the user might accidentally lock the screen . UPDATE .. . .. . I ve made a small step in the right direction by using : .. . .. . This will show the app without the non-secure lock screen when a new input from the keyboard is processed . Unfortunately the first letter is missing . This has to be caused by the first letter waking the screen and the rest of the input actually reaching the EditText . Comment : add this code to your scanner activity getWindow .addFlags WindowManager.LayoutParams.FLAG KEEP SCREEN ON and add this permission in manifest uses-permission android : name android.permission.WAKE LOCK . you are done . Comment : Depending on the version you might developp a widget to add-on the lock screen . This could listen to the keyboad BT scanner and send the data to your activity . .. . Answer : This works for me in a similar situation . Just keep screen on while your application in foreground . Comment : When the user accidentally presses the power button of his device will this still forward the input events to the app Comment : I guess there won t be a bullet-proof approach . What happens if another activity places itself in the foreground Wouldn t it be enough to echo a confirmation if a valid code was received Comment : @sstn The app already does that the user can disable this feature though . The difference between locking the screen and switching to another app is that locking the screen happens more easily because it s a hardware button that is clicked easily . I guess I m out of luck here.. . Comment : @Baz it won t affect in my case you can try it out sstn explanation to your prob : my solutions might not sounds bulletproof but android devloper WS it self stated it use those flag instead of Wakeup lock and i dnt think Wakeup lock required in this situation another case android framework have highest right for phone call if any call arrive during any process e.g Payment on Amazon and if user uses mobile data then we just can hope for best and in this case i found it most useful solution by adding those flag anyways thanks for surfacing your view i try to find better one next time . Comment : @AparAmin Since this answer was the most helpful so far you get the bounty congrats .", "Question : My application works with remote Bluetooth keyboard . I have defined some predefined custom implementation on arrow keys and enter key . I want to perform only those actions whenever user press arrow key or Enter Key in my application . But sometimes it is still showing default behavior of keys . My Current Code is as follows .. . .. . any idea how I can restrict default behavior of arrow keys and enter key Thanks .. . Answer : Use below code : Comment : there is no such event as VK UP Comment : @Uzair check my edited answer Comment : this is exactly what I am doing but it is still accepting enter and arrow keys with its default behavior Comment : @Uzair return false in if-statement Comment : but according to documentation developer.android.com reference android-view http : developer.android.com reference android-view KeyEvent.Callback.html onKeyDown int android.view.KeyEvent we return false only when we are not handling event .", "Question : I m developing an application that lets the user scan barcodes using an external barcode scanner connected via bluetooth . The barcode scanner acts as a keyboard i.e . Android thinks that the scanned barcodes have been typed on a keyboard . The app is working fine as it is as long as the screen stays on . Once the screen turns off I can continue scanning barcodes but the scanned text doesn t reach the app anymore but rather invokes actions on the lock screen . Is there a way to allow input from an external keyboard to the app although the screen has been turned off Alternatively I will have to force the screen to stay turned on but this isn t bullet-proof as the user might accidentally lock the screen . UPDATE .. . .. . I ve made a small step in the right direction by using : .. . .. . This will show the app without the non-secure lock screen when a new input from the keyboard is processed . Unfortunately the first letter is missing . This has to be caused by the first letter waking the screen and the rest of the input actually reaching the EditText . Comment : add this code to your scanner activity getWindow .addFlags WindowManager.LayoutParams.FLAG KEEP SCREEN ON and add this permission in manifest uses-permission android : name android.permission.WAKE LOCK . you are done . Comment : Depending on the version you might developp a widget to add-on the lock screen . This could listen to the keyboad BT scanner and send the data to your activity . .. . Answer : if you are only losing the first number then you can.. . recover that using the Check Digit http : en.wikipedia.org wiki Check digit . I know it is a hack but it should solve this problem . Comment : I m missing the first character of the decoded barcode the final string . I don t have access to what the barcode scanner actually read in the first place just what it returns as the keyboard . I also don t know what kind of barcode it is that I receive . So I m afraid this is not an option .", "Question : I made a calculator app swift and I set up some UIKeyCommands so that if the user has a bluetooth-keyboard they can type numbers symbols into the calculator . They work like so : .. . .. . That all worked well adding a four into the calculator when the user pressed the four key even though the calculator itself has no text field . However : I also have a couple of standard text fields and I want the UIKeyCommands to stop when the user goes into one of those text fields so they can type regularly with the BT keyboard again . Without disabling the UIKeyCommands typing results in calculator functions and no input into the text field . So I tried this in an attempt to disable UIKeyCommands when the text field becomes the first responder : .. . .. . This works occasionally but yet often doesn t work . If the user has not typed anything with the BT keyboard yet i.e . not activating the key commands I guess then they can type with the BT keyboard as normal into a text field . But if they have already been typing numbers into the calculator via UIKeyCommand they can not type into the text field well sometimes it works with normal behavior sometimes it fails like it did before I added that preventative code . Typed text just doesn t appear in that text field and instead it just calls the calculator command . So what can I do to disable these UIKeyCommands when the user starts typing in a normal text field Comment : I d use some logging to see when keyCommands is being queried to make sure it s actually being updated when you think it is being updated . Comment : The answer below was really helpful so thanks Chris . If anyone stopping by here needs any help just comment below and I can assist you . .. . Answer : Instead of making keyCommands a computed property you can use addKeyCommand : and removeKeyCommand : methods for UIViewController s . Subclass your text field like this : .. . .. . Then in your UIViewController : .. . .. . Instead of an optional stored procedure that gets configured by the UIViewController you could setup a delegate protocol for the UITextField that the UIViewController will adopt . Also if you need to stop these key commands when a UIAlertController pops up you can make a subclass of UIAlertController that implements the viewWillAppear : and viewWillDisappear : event methods similar to how you implemented becomeFirstResponder and resignFirstResponder by calling an enableKeyCommands : optional stored procedure that s configured by your main view controller during its viewDidLoad . As for the explanation of why this is happening perhaps the most likely explanation is that it s a bug . I m not sure why this is irregular in your testing though . I think you could try to isolate under what conditions it works or doesn t . It s not obvious why this would only happen for bluetooth keyboards but there are plenty of edge cases that can creep in when you start introducing wireless technologies . Comment : Where do I put that second block of code If I just put it alone anywhere in my UIViewController it says Error : Expected Declaration . Comment : @JohnRamos there are multiple places you can put it that could make sense depending on your app but I m guessing you probably should put it in viewDidLoad Comment : Ok so I put the first block of code right at the bottom of my calculator view controller file inside my UIViewController class but not inside anything else and the second block of code inside viewdidload and all my other UIKeyCommand code inside viewdidload and my project build failed with the error Segmentation Fault 11 . Comment : @JohnRamos the first block of code is part of the text field s class declaration . If you already had a subclass for it add the code there . If not make a separate file for declaring this subclass . Make sure you use this subclass either where you instantiate your text field in code or in Interface Builder . The second block of code goes in viewDidLoad . Think of this as configuring your custom text field with a callback . In viewDidLoad you ll also want to add all of your key commands to the view controller so that they re on by default . Comment : When I put that first block of code in a new file the second block of code can t read it . There s an error on the first line of the second block : Value of type UITextView has no member enableKeyCommands" ] }
[ "yes-answer-long", "yes-answer-short" ]
bluetooth
UNK_RELATION
nant -- nant is a build tool for .net aiming to support all the various versions of the @placeholder framework including all versions of microsoft .net compact-framework and silverlight mono and moonlight.additionally there is a contribution project called nantcontrib adding support for additional .net tools fxcop ngen gacutil wsdl xsd msbuild and systems like pvcs starteam visual-sourcesafe surround scm and microsoft biztalk .
{ "confidence": [ 65.87608337402344, 65.05398559570312, 61.64052963256836, 58.765403747558594, 58.41474914550781, 57.844268798828125, 56.861228942871094, 56.29352569580078, 56.100914001464844, 55.63670349121094, 54.53702163696289, 54.49972915649414, 54.49388885498047, 54.42144775390625, 53.202796936035156, 53.175270080566406, 52.82810592651367, 52.558631896972656, 52.41588592529297, 52.17387771606445, 52.131988525390625, 51.91632080078125, 51.233917236328125, 51.21276092529297, 51.12964630126953, 50.958595275878906, 50.568687438964844, 50.41417694091797, 50.21370315551758, 49.71518325805664, 49.56821823120117, 49.378028869628906, 48.965431213378906, 48.743499755859375, 48.72943115234375, 48.61701202392578, 48.602176666259766, 48.584922790527344, 48.584922790527344, 48.51103210449219, 48.36530685424805, 48.215728759765625, 48.19347381591797, 47.715065002441406, 47.67943572998047, 47.101661682128906, 46.89361572265625, 46.3606071472168, 46.144500732421875, 46.088470458984375, 45.92781448364258, 45.731563568115234, 45.712249755859375, 45.60519790649414, 45.525455474853516, 45.32414627075195, 45.21763610839844, 45.094078063964844, 44.93880844116211, 44.87797927856445, 44.695457458496094, 44.65011978149414, 44.55708312988281, 44.469024658203125, 44.28248596191406, 44.259490966796875, 44.25373840332031, 44.2459831237793, 44.07000732421875, 44.017242431640625, 44.017242431640625, 43.802669525146484, 43.7519416809082, 43.47062683105469, 43.45048904418945, 43.29864501953125, 43.29864501953125, 43.162479400634766, 43.093162536621094, 43.02850341796875, 42.88387680053711, 42.82215118408203, 42.794517517089844, 42.55858612060547, 42.44643020629883, 42.44081115722656, 42.36735153198242, 42.33106231689453, 42.096763610839844, 42.09103012084961, 42.04874038696289, 41.871551513671875, 41.83344650268555, 41.829227447509766, 41.829227447509766, 41.829227447509766, 41.50574493408203, 41.4981689453125, 41.4981689453125 ], "content": [ "Duplicates finder .NET Duplicates finder Java FxCop Inspections Ipr Maven2 MSBuild NAnt Rake Command Line sln2003 sln2005 sln2008 .. . .. . Available Buildrunners after the upgrade : .. . Ant Duplicates finder .NET Duplicates finder Java FxCop Inspections Ipr Maven2 Rake Command Line .. . .. . Edit2 : .. . An excerpt from the agent-log : .. . INFO - gent.msBuild.MSBuildRunnerBase - Runner MSBuild is not registered : Microsoft .Net Framework 2.0 3.5 4.0 or Mono are required .. . INFO - ver.agent.nant.NAntBuildRunner - Runner NAnt is not registered : Mono or Microsoft .Net Framework 1.1 or 2.0 is required .. . INFO - ver.agent.nant.NAntBuildRunner - Runner sln2003 is not registered : Mono or Microsoft .Net Framework 1.1 or 2.0 is required .. . INFO - gent.msBuild.MSBuildRunnerBase - Runner sln2005 is not registered : Microsoft .Net Framework 2.0 3.5 4.0 or Mono are required .. . INFO - gent.msBuild.MSBuildRunnerBase - Runner sln2008 is not registered : Microsoft .Net Framework 2.0 3.5 4.0 or Mono are required .. . .. . Somewho he cannot recognize the .net-framework anymore .", "I ran Nant locally and although it s succeeding it says Target framework : Microsoft .NET Framework 2.0 and then property Target framework changed to Microsoft .NET Framework 3.5 .", "The NAntContrib assumes .NET Framework V2.0 .", "The same has to be done for .NET 4 support even in the current NAnt .", "NAnt can call MSBuild very easily with NAntContrib .", "http : paigecsharp.blogspot.com 2009 08 nant-net-framework-40-configuration.html is a full code for .config file for NAnt .", "NANT does build .net-3.5 applications now .", "It is also worth adding that MSBuild is pretty much guaranteed to work with all new versions of .NET http : en.wikipedia.org wiki .NET Framework and Visual Studio as soon as they are released whereas NAnt may have some lag .", "I recall that NAnt 0.85 didn t ship with .NET 3.5 support you had to add that support by editing a NAnt config file .", "nAnt is a great framework and MSBuild is almost as capable .", "VM 2 BuildMaster is running NAnt with NAntContrib and has VB 6.0 and the 1.0 1.1 2.0 3.5 .Net Framework SDKs installed .", "How do I get nant to build projects that target the .NET 4.0 Framework", "I have NAnt and NAntContrib .", "I m trying to move .NET CI from Nant to MSBuild to bypass the Nant Solution task limitations but I m not able to reproduce the Nant assembly reference behavior .", "Info : Using NAnt 0.91 with net-4.0", "Using .NET Framework 3.5 I have nant -0.91-alpha2 which has support for framework 3.5 but I am getting the following error when I try to build the documentation .", "Also the .85 version of NAnt only supports framework versions up to 2.0 .", "I think the latest NAnt NAntContrib defaults to .NET 3.5 so you ll have to change that to 4.0 .", "The NAnt team has just release NAnt 0.91 Alpha 1 https : sourceforge.net news group id 31650 with .NET 4.0 support experimental .", "I then updated my nant script to .. . .. . this so my project nant script uses the .net 4 compiler .. . .. . And this got me a nant build with .net 4 binary ... . .. . .. . Update 2010-06-14 : The above was answered with nant-0.85 I upgraded to nant-0.90 and had to add vendor Microsoft to framework attribute that is added to nants config .", "Modified my nAnt script to run the MSBuild task more details here : Build and publish .Net 2.0 projects with NAnt and the MSBuild task http : codebetter.com blogs jeffrey.palermo archive 2006 08 12 148248.aspx", "While you could do all this with regular scripts using NAnt or MSBuild give you a solid framework for doing all this .", "paigecsharp.blogspot.com 2009 08 http : paigecsharp.blogspot.com 2009 08 nant-net-framework-40-configuration.html", "Edit : @ChanChan - @Jon mentions that Nant doesn t build .NET 3.5 applications .", "I ve looked in Nant and Nantcontrib docs but no mention of encryption .", "NAnt does not support remote operations .", "Make sure You have the latest nightlies of NAnt and NAntContrib tested NAnt Nightly 20090130 and NAntContrib Nightly 20090201 .", "Available tools are the latest stable release of nant and nantcontrib msbuild and latest command-line svn .", "Incidentally the NAnt team are working on a .90 update release and are looking to have .NET 4 support in 0.91 .", "We are building .Net application using NANT script .", "UppercuT uses NAnt to build and it is the insanely easy to use Build Framework .", "I have used NANT and NantContrib to automate the build on development-machine .", "Nant or MSBuild", "We are facing a problem with nant 0.92 and pvcs 8.4 .", "I have an NAnt NAntContrib script e.g .", "I have no idea how to do that in any of the build tools NAnt MSBuild .", "I use MSBuild alongside Nant because the current version of Nant can t as yet compile .NET 3.5 applications same was true when .NET 2.0 first came out .", "How do I need to indicate to the msbuild-task in my nant script that it should use .net-4.0 rc", "Unfortunately the last release of NAnt was in December 8 2007 while MSBuild 4.0 .NET 4.0 isn t far off .", "There is a NAnt property to handle that property name nant.settings.currentframework value net-4.0 which should go near the top of your NAnt build file .", "Also both NAnt and MSBuild can be customized to the heart s content through custom MSBuild tasks and through NantContrib extensions .", "+1 for pointing out lag between .net releases and nant releases .", "It looks like 2.0 is just the version of the framework that generated the NAnt script .", "If you want to use nant to build projects targeting .NET 4.0 you ll have to modify NAnt.exe.config and add the net-4.0 target framework and add a supportedRuntime .. . line to the startup section .", "Oh yes and you can call MSBuild from NAnt OK from NAntContrib : - .. . .. . On the negative side NAnt and its sister project NAntContrib do seem to have stagnated with the most recent update being late 2007 .", "This leads me to wonder if there are any deployment tools nant msbuild or other that support this idea of rolling forward and back .", "It s a bit simpler to invoke FxCop directly from NAnt without using the NAntContrib task by using NAnt s exec task .", "It ll find vb6.exe by looking up SOFTWARE Microsoft VisualStudio 6.0 Setup Microsoft Visual Basic ProductDir refer the source code https : github.com nant nantcontrib blob master src Tasks Vb6Task.cs .", "When MSBuild arrived NAnt died .", "Edit : It appears Nant now builds .NET 3.5 Applications .", "I would stick with Nant and in nant call msbuild to compile your solution .", "Pick some projects that use .NET and NAnt download source and look at their build files and how they organize them .", "Does NAnt or NAntContrib have a way to get the size of a file", "I get The SDK for the net-2.0 framework is not available or not configured error when I try ty run NAnt 0.92 even though I have installed the .NET SDK v2.0 no key in register with sdkInstallRoot .", "However the source code for this project is not available and it s referencing some types which are not available in the latest version of NAnt 0.91 which we require for .NET 4.0 support .", "The build itself is pretty simple it s just a Nantcontrib msbuild element that builds a .Net 3.5 .sln file .", "Hmm don t know how to do it with MSBuild in Nant but using NAnt I ve done it previously like this : .. . .. . But then you re using the NAnt solution task offcourse instead of using MSBuild directly .", "For what it s worth I was able to get NAnt 0.86 working with .NET 3.5 by adding the following to NAnt.exe.config .", "The purest way to get things working against the 3.5 framework is to use the .86-beta1 http : nant.sourceforge.net versions of NAnt .", "I have custom NAnt task for test purposes and I would like to cancel NAnt build-process if the task is failed .", "I created an Issue github.com nant nantcontrib issues 34 https : github.com nant nantcontrib issues 34 and submitted a fix that will have nantcontrib check for the x86 and x64 paths .", "An alternative approach if you want to keep your existing build scripts msbuild-task : We re actually still running NAnt 0.85 but building directly with .Net 4 .", "You will probably find better support with nant .", "The CIFactory NAnt variant has this as well ifthenelse but is extremely outdated and does not support .NET 4.0 - nevertheless updating your NAnt version from CIFactory to an official build complicates your build scripts needlessly because you now need two if tasks one with the original condition one with negation .", "I m trying to use NAnt NAntContrib build script to build a web application on Windows 2008 IIS 7.0 .", "This is all being called via our build-process using NAnt .", "Is it possible with NAnt http : nant.sourceforge.net or NAntContrib http : nantcontrib.sourceforge.net out of the box", "Also it looks like nant0.9 finds the .net libraries differently as I had to add something like this to my nant build.xml .. . .. . .. . and", "Thanks but this is a .NET 3.5 project and I don t think the solution tag support .NET 3.5 .", "I switched from NANT to MSBuild .", "Nant works with Net1.1 MsBuild doesn t .", "If I recall correctly msbuild is installed as part of the .NET framework - it certainly used to be .", "I m using an Nant build script which builds my project using msbuild .", "1 CustomTasks in NANT as simple as it gets - a subclass of Task 2 NANT has NANTContrib as well as a lot more community support than MSBuild 3 I integrate NANT into my MS projects writing a batch-file to run NANT.exe .", "Check this article : .. . .. . Upgrade NAnt for use with VS2008 solutions and .Net 3.5 http : codebetter.com blogs jeffrey.palermo archive 2007 11 28 upgrade-nant-for-use-with-vs2008-solutions-and-net-3-5.aspx", "why is there an msbuild-task in your nant script", "When should one choose NAnt over MSBuild", "MSBuild : .. . .. . Built-in to .NET .", "Could someone explain to me how to use the Microsoft Ajax Minifier http : aspnet.codeplex.com Release ProjectReleases.aspx ReleaseId 34488 from a nant-script as a nant-task .", "NAnt is not built-in to Visual Studio and has to be added either with an Add-In or as an External Tool .", "The main advantages that I see of MSBuild is that it ships with the .NET Framework so it s one less product to install and there is more active development going on albeit in places to catch up with the older NAnt .", "Preferably a NAnt build script .", "The production version seems to be v4.30319 ie C : WINDOWS Microsoft.NET Framework v4.0.30319 .. . .. . After reviewing http : paigecsharp.blogspot.com 2009 08 nant-net-framework-40-configuration.html .. .", "For implementation details have a look at an article I wrote http : grantpalin.com 2008 01 21 net-projects-analyzing-code-with-fxcop about integrating NAnt and FxCop .", "The reason for switching from NAnt to MSBuild is because MSBuild is more current .", "I trying to use nant to build a solution via msbuild .", "It looks like the NAnt project has died .", "What would be reasons to use nAnt over MSBuild", "I would like to do something like using NAnt 0.92 syntax in NAnt 0.91 .", "Logically i have tried with CF 2.0 afterwards : .. . .. . property name nant.settings.currentframework value netcf-2.0 .. . .. . and then i receive an error .. . .. . Failed to initialize the Microsoft .NET Compact Framework 2.0 netcf-2.0 target framework .", "command-line - location of csproj or solution file additional properties .. . .. . This way we control which version of MSBUILD we use and does not depend on NANT supporting the latest framework .", "Using MSBuild beats the purpose of using NAnt NAnt is something that replaces MSBuild use the below to do a clean NAnt compilation of Web Application Projects as in VS 2003 2005 2008 .", "In order to support newer framework versions you need to do two things : .. . .. . Firstly edit nant.exe.config .", "So using NAnt or MSBuild really comes down to familiarity : .. . .. . If you are already familiar with Ant use NAnt .", "I use both in that my NAnt http : en.wikipedia.org wiki NAnt scripts call MSBuild .", "You can use NAnt contrib http : nantcontrib.sourceforge.net and use msbuild within your NAnt script .", "We actually use a combination of NAnt http : en.wikipedia.org wiki NAnt and MSBuild http : en.wikipedia.org wiki MSBuild with CruiseControl http : en.wikipedia.org wiki CruiseControl .", "Any ideas on how to fix the .NET SDK directory in order to get NAnt working", "As of June 2012 version 0.92 of NAnt is available from the website : nant.sourceforge.net http : nant.sourceforge.net AND it supports .Net 4.0 ." ] }
{ "confidence": [ 117.81936645507812, 101.60652160644531, 96.88072967529297, 94.98986053466797, 93.84449005126953, 91.1614761352539, 91.0145263671875, 88.34718322753906, 88.06979370117188, 87.87477111816406, 86.51168823242188, 85.96256256103516, 85.58609771728516, 85.46467590332031, 85.20448303222656, 84.23434448242188, 83.30088806152344, 83.14189147949219, 82.66378021240234, 81.5119857788086 ], "content": [ "Question : i ve recently updated one of my TeamCity Agents to Visual Studio 2010 SP1 . Since then several Buildrunner are not supported on this Agent anymore esp . NAnt-Runner I could reproduce this behavior on another agent . This happens after the installation of the service pack 1 . I ve upgraded an agent to visual-studio-2010 without sp1 and all buildrunners are still available . I compared the enviroment-varibles of the agents but i couldn t find any significant differences . Hope you ve got some answers for me Edit : Agent without VS2010 SP1 has following Build-Runners : .. . Ant . Duplicates finder .NET Duplicates finder Java FxCop Inspections Ipr Maven2 MSBuild NAnt Rake Command Line sln2003 sln2005 sln2008 .. . .. . Available Buildrunners after the upgrade : .. . Ant Duplicates finder .NET Duplicates finder Java FxCop Inspections Ipr Maven2 Rake Command Line .. . .. . Edit2 : .. . An excerpt from the agent-log : .. . INFO - gent.msBuild.MSBuildRunnerBase - Runner MSBuild is not registered : Microsoft .Net Framework 2.0 3.5 4.0 or Mono are required .. . INFO - ver.agent.nant.NAntBuildRunner - Runner NAnt is not registered : Mono or Microsoft .Net Framework 1.1 or 2.0 is required .. . INFO - ver.agent.nant.NAntBuildRunner - Runner sln2003 is not registered : Mono or Microsoft .Net Framework 1.1 or 2.0 is required .. . INFO - gent.msBuild.MSBuildRunnerBase - Runner sln2005 is not registered : Microsoft .Net Framework 2.0 3.5 4.0 or Mono are required .. . INFO - gent.msBuild.MSBuildRunnerBase - Runner sln2008 is not registered : Microsoft .Net Framework 2.0 3.5 4.0 or Mono are required .. . .. . Somewho he cannot recognize the .net-framework anymore . I checked which Versions are installed : .Net 2.0 SP2 .Net 3.0 SP2 .Net 3.5 SP1 and .Net 4 Client Extended .. . Answer : I think i solved my problem by adding the following lines to the agent.properties : .. . .. . Now my agent has the same build-runners available as before the upgrade : Seems as-if the autodetection of teamcity 5.0-agents cannot handle visual-studio-2010 Sp1", "Question : I am aware there are other NAnt http : en.wikipedia.org wiki NAnt and MSBuild http : en.wikipedia.org wiki MSBuild related questions on Stack Overflow but I could not find a direct comparison between the two and so here is the question . When should one choose NAnt over MSBuild Which one is better for what Is NAnt more suitable for home open-source projects and MSBuild for work projects What is the experience with any of the two .. . Answer : One thing I noticed several posters mention was having to hand edit the .csproj or .vbproj etc . files . MSBuild allows customization of these . proj files through the use of .user files . If I have a project named MyCreativelyNamedProject.csproj and want to customize the MSBuild tasks inside of it I can create a file named MyCreativelyNamedProject.csproj.user and use the CustomBeforeMicrosoftCommonTargets and CustomAfterMicrosoftCommonTargets to customize those files . Also both NAnt and MSBuild can be customized to the heart s content through custom MSBuild tasks and through NantContrib extensions . So using NAnt or MSBuild really comes down to familiarity : .. . .. . If you are already familiar with Ant use NAnt . The learning curve will be very easy . If you are not familiar with either tool MSBuild is integrated with Visual Studio already and requires no additional tools . It is also worth adding that MSBuild is pretty much guaranteed to work with all new versions of .NET http : en.wikipedia.org wiki .NET Framework and Visual Studio as soon as they are released whereas NAnt may have some lag . Comment : +1 for pointing out lag between .net releases and nant releases . I remember when .net-3.5 came out and having to use a hacked nant.exe.config from out on nets to get things working . Not fun . Comment : According to lots of posts around here those .USER files contain +user specific info+ that shouldn t get checked in so that d be the last place I d want to put build customizations.. . Any build customizations by definition shouldn t be user specific and so shouldn t go in those .user files.. . Comment : Agree with drventure .user-files are as the name suggest pr user and they shouldn t even be checked in to your source control repository . This is NOT the place to automate the build .", "Question : I upgraded my project from .NET 3.5 to 4.5 . It s working locally but not building on the server and the problem is that Nant is trying to use MSBuild 3.5 . I ran Nant locally and although it s succeeding it says Target framework : Microsoft .NET Framework 2.0 and then property Target framework changed to Microsoft .NET Framework 3.5 . What do I need to change in the nant.exe.config file to make it run the right version .. . Answer : In case you or anyone else for that matter are still looking for an answer check https : alastaircrabtree.com how-to-build-a-visual-studio-2013-or-2015-solution-on-a-build-server-using-nant", "Question : It looks like there are at least two options for getting nant to use csproj files : using the task of NAntContrib http : nantcontrib.sourceforge.net release latest help tasks msbuild.html or using msbuild.exe directly e.g . codecampserver http : codecampserver.googlecode.com svn-trunk . Am I reading this right and if so what is the advantage of using msbuild.exe over the NAntContrib task .. . Answer : The NAntContrib assumes .NET Framework V2.0 . If you want to use .NET 3.5 you ll need to call MsBuild.exe directly . As you upgrade to new versions of .NET you need only modify the MSBuildPath property . Here s an example : .. . .. . The value MSBuildPath for different versions of .NET are .. . .. . 2.0 3.0 C : Windows Microsoft.NET Framework64 v2.0.50727 MSBuild.exe .. . 3.5 C : Windows Microsoft.NET Framework64 v3.5 MSBuild.exe .. . 4 4.5 4.5.1 4.5.2 C : Windows Microsoft.NET Framework64 v4.0.30319 MSBuild.exe .. . .. . For a 32-bit build change Framework64 to Framework .. . .. . Update Following up on some of the comments the value attribute is used for parameters that have no spaces . line is used for parameters that need to be delimited due to spaces . Otherwise the application would use the space as an end of input . Comment : Wow thanks . I never imagined that NAntContrib was so far behind . Comment : -1 You can use msbuild with .NET 3.5 . Make sure You have the latest nightlies of NAnt and NAntContrib tested NAnt Nightly 20090130 and NAntContrib Nightly 20090201 . Comment : I am new to NAnt and am a little confused about the meaning of the arg line arg value when dealing with msbuild . Can someone explain to me the difference as the documentation still did not clear things up for me . Comment : value is used for parameters that have no spaces . line is used for parameters that need to be delimited due to spaces . Otherwise the application would use the space as an end of input .", "Question : I currently use nant ccnet cruise control svn mbunit . I use msbuild to do my sln build just because it was simpler to shell out . Are there any merits to switching my whole build script to MSBuild I need to be able to run tests watir style tests xcopy deploy . Is this easier Update : Any compelling features that would cause me to shift from nant to msbuild Comment : stackoverflow.com questions 476163 http : stackoverflow.com questions 476163 nant-or-msbuild-which-one-to-choose-and-when Comment : webwesen has discovered a recursive hole in this universe siting a reference to a question that hadn t existed shouldn t it be the other way .. . Answer : NAnt has been around longer and is a considerably more mature product and also IMO easier to use . There is a lot of community know-how out there to tap into and it is also cross-platform should you be interested in building apps that can run under Mono as well as .NET and Silverlight . Out of the box it does a whole lot more than MSBuild does . Oh yes and you can call MSBuild from NAnt OK from NAntContrib : - .. . .. . On the negative side NAnt and its sister project NAntContrib do seem to have stagnated with the most recent update being late 2007 . The main advantages that I see of MSBuild is that it ships with the .NET Framework so it s one less product to install and there is more active development going on albeit in places to catch up with the older NAnt . Personally I find its syntax a little more difficult to pick up but then I m sure continued exposure to ti would make things easier . Conclusion If you re working with existing NAnt scripts stick with them it s not worth the hassle of porting . If you re starting a new project and you re feeling adventurous then give MSBuild a go .", "Question : Possible Duplicate : .. . NAnt or MSBuild which one to choose and when http : stackoverflow.com questions 476163 .. . .. . What is the best build tool for .NET http : en.wikipedia.org wiki .NET Framework I currently use NAnt http : en.wikipedia.org wiki NAnt but only because I have experience with Ant http : en.wikipedia.org wiki Apache Ant . Is MSBuild http : en.wikipedia.org wiki MSBuild preferred .. . Answer : We use MSBuild because we started with Visual Studio 2005 now Visual Studio 2008 and MSBuild was already built-in to the SDK - there is less maintenance on the build-server . It s a NAnt clone really - both tools are infinitely flexible in that they let you create custom build tasks in code and both have a decent set of community build tasks already created . MSBuild Community Tasks http : msbuildtasks.tigris.org .. . NAntContrib http : nantcontrib.sourceforge.net", "Question : We have just updated a project from 4.0 to 4.5.1 and we are having problems building it on NAnt . I just checked and it looks like it is dead . Is there a way to build it using framework 4.5.1 The last version just supports up to framework 4 . .. . Answer : An alternative approach if you want to keep your existing build scripts msbuild-task : We re actually still running NAnt 0.85 but building directly with .Net 4 . In order to support newer framework versions you need to do two things : .. . .. . Firstly edit nant.exe.config . There is a section dealing with the frameworks - you ll see entries for net-2.0 net-4.0 etc . Find the one for net-4.0 and duplicate it . Then go through and update the paths .Net version numbers as needed . Secondly at the start of your build script specify which framework you want to use : .. . .. . You can switch between frameworks as you wish during the build - parts of our legacy system switch between .Net 2 and .Net 4 as needed . Comment : I ve used this technique to add net-4.5 and net-4.5.1 .", "Question : How do I need to indicate to the msbuild-task in my nant script that it should use .net-4.0 rc Comment : why is there an msbuild-task in your nant script Is you are using msbuild why would you do it that way around Comment : You can use NAnt to handle the overall project automation tasks e.g . running tests running analyses versioning packaging.. . and delegating to MSBuild for compilation . Comment : Grant is correct Nant is doing the build running the test running ncover and then handling some database scripting . .. . Answer : I think the latest NAnt NAntContrib defaults to .NET 3.5 so you ll have to change that to 4.0 . There is a NAnt property to handle that property name nant.settings.currentframework value net-4.0 which should go near the top of your NAnt build file . Next you ll need to go into your NAnt s configuration file and add the 4.0 node so that NAnt and by extension NantContrib are aware of the new CLR version . Comment : This appears to have solved it . Just wanted to attached a link-to a blog where I found the actual nant config section . Just had to update the version number to the release candidate and add a line to the startup section . paigecsharp.blogspot.com 2009 08 http : paigecsharp.blogspot.com 2009 08 nant-net-framework-40-configuration.html Comment : That is essentially what I had to do when trying my automated builds with VS 2010 .NET 4 . Sorry I couldn t paste the solution here but I didn t have the code handy . Glad I was able to help you towards the solution though .", "Question : Possible Duplicate : .. . NAnt or MSBuild which one to choose and when http : stackoverflow.com questions 476163 .. . .. . What is the best build tool for .NET http : en.wikipedia.org wiki .NET Framework I currently use NAnt http : en.wikipedia.org wiki NAnt but only because I have experience with Ant http : en.wikipedia.org wiki Apache Ant . Is MSBuild http : en.wikipedia.org wiki MSBuild preferred .. . Answer : It also depends on what you re building . The MSBuild SDC Task library http : www.codeplex.com sdctasks has a couple of special tasks . For example for AD http : en.wikipedia.org wiki Active Directory BizTalk https : en.wikipedia.org wiki Microsoft BizTalk Server etc . There are over 300 tasks included in this library including tasks for : creating websites creating application pools creating ActiveDirectory users running FxCop http : en.wikipedia.org wiki FxCop configuring virtual servers creating zip files configuring COM+ https : en.wikipedia.org wiki Component Object Model COM.2B and DCOM creating folder shares installing into the GAC http : en.wikipedia.org wiki Global Assembly Cache configuring SQL Server http : en.wikipedia.org wiki Microsoft SQL Server configuring BizTalk 2004 and BizTalk 2006 etc .", "Question : I m trying to get NAnt 0.86b1 running with VS2008 SP1 and x64 XP . I have a basic build file below which gives the error Solution format of file Solution.sln is not supported . Has anyone else experienced this problem I can t find anything useful out there about this . .. . Answer : You ll notice that the docs indicate that NAnt s solution http : nant.sourceforge.net release 0.85 help tasks solution.html task doesn t support solution files newer than VS2003 . I recommend using the msbuild-task from nantcontrib http : nantcontrib.sourceforge.net release 0.85 help tasks msbuild.html for all projects newer than VS2003 . Also the .85 version of NAnt only supports framework versions up to 2.0 . The purest way to get things working against the 3.5 framework is to use the .86-beta1 http : nant.sourceforge.net versions of NAnt . You ll then be able to use the msbuild-task against the 3.5 solution .", "Question : I need to run FxCop attribute which I have implemented in NAnt build file . I have NAnt and NAntContrib . I have copied the contents of nantcontrib bin to nant bin folder and have set environment variable to FxCopCmd.exe . Then I m getting the error when I run NAnt script : .. . .. . invalid attribute fxcop .. . .. . What could be the problem .. . Answer : It s a bit simpler to invoke FxCop directly from NAnt without using the NAntContrib task by using NAnt s exec task . For implementation details have a look at an article I wrote http : grantpalin.com 2008 01 21 net-projects-analyzing-code-with-fxcop about integrating NAnt and FxCop . Here s the code :", "Question : Possible Duplicate : .. . NAnt or MSBuild which one to choose and when http : stackoverflow.com questions 476163 .. . .. . What is the best build tool for .NET http : en.wikipedia.org wiki .NET Framework I currently use NAnt http : en.wikipedia.org wiki NAnt but only because I have experience with Ant http : en.wikipedia.org wiki Apache Ant . Is MSBuild http : en.wikipedia.org wiki MSBuild preferred .. . Answer : There is another new build tool a very intelligent wrapper called NUBuild . It s lightweight open-source and extremely easy to setup and provides almost no-touch maintenance . I really like this new tool and we have made it a standard tool for our continuous build and integration of our projects we have about 400 projects across 75 developers . Try it out . http : nubuild.codeplex.com .. . .. . Easy to use command-line interface .. . Ability to target all .NET http : en.wikipedia.org wiki .NET Framework Framework versions that is 1.1 2.0 3.0 and 3.5 .. . Supports XML based configuration .. . Supports both project and file references .. . Automatically generates the complete ordered build list for a given project No touch maintenance . Ability to detect and display circular dependencies .. . Perform parallel build - automatically decides which of the projects in the generated build list can be built independently . Ability to handle proxy assemblies .. . Provides a visual clue to the build-process for example showing completed current status etc . Generates detailed execution log both in XML and text format .. . Easily integrated with CruiseControl.NET http : en.wikipedia.org wiki CruiseControl continuous-integration system .. . Can use custom logger like XMLLogger when targeting 2.0 + version .. . Ability to parse-error logs .. . Ability to deploy built assemblies to user specified location .. . Ability to synchronize source code with source-control system .. . Version management capability Comment : very good info thank you : Comment : It looks interesting . But now is .NET 4.5 it doesn t seem to update .", "Question : How do I get nant to build projects that target the .NET 4.0 Framework .. . Answer : 2010 April 15 .. . Update to above correct answer from Eugene after .net 4 and vs2010 was released . I downloaded vs2010 and .net 4 runtime . The production version seems to be v4.30319 ie C : WINDOWS Microsoft.NET Framework v4.0.30319 .. . .. . After reviewing http : paigecsharp.blogspot.com 2009 08 nant-net-framework-40-configuration.html .. . I pasted in the text and changed all text from v4.0.20506 to v4.30319 an added text to NAnt.exe.config . I then updated my nant script to .. . .. . this so my project nant script uses the .net 4 compiler .. . .. . And this got me a nant build with .net 4 binary ... . .. . .. . Update 2010-06-14 : The above was answered with nant-0.85 I upgraded to nant-0.90 and had to add vendor Microsoft to framework attribute that is added to nants config . Also it looks like nant0.9 finds the .net libraries differently as I had to add something like this to my nant build.xml .. . .. . .. . and Comment : Updating the version of NAnt to the latest available version currently 0.91 Alpha 2 was necessary for me to get this to work in addition to the build and config changes . btw did not need the last include .", "Question : I m trying to migrate us from an old CruiseControl based build-server to a new TeamCity one and having trouble with the old VB6 based components we still have . We are using Nant scripts which is making the task easier but I ve hit a roadblock with the vb6 nant task . I ve installed nant.contrib.tasks so that the tag is now being recognised but I m still getting an error.. . I understand that this error vb6 failed to start . generally means it cannot find the vb6.exe but I cannot see how to specify it in the script . According to the doco . exename is The name of the executable that should be used to launch the external program . but is specified as a Framework-configurable parameter . I ve tried adding it to the vb6 tag as an attribute but that gave an Unexpected attribute error . I just can t seem to find an example of how to specify the vb6.exe path as a Framework-configurable parameter anywhere.. . help please . .. . Answer : You don t need to set and aren t meant to set the exename parameter the NAnt task will find the VB compiler for you . The exename framework configurable parameter is actually defined in the abstract-class ExternalProgramBase which the vb6 task inherits from . The vb6 task requires that the Visual Basic IDE is installed so it can use vb6.exe . It ll find vb6.exe by looking up SOFTWARE Microsoft VisualStudio 6.0 Setup Microsoft Visual Basic ProductDir refer the source code https : github.com nant nantcontrib blob master src Tasks Vb6Task.cs . Since you indicated that this is a new build machine and you are reinstalling software e.g . NAnt Contrib it is likely you haven t reinstalled Visual Basic on this new build machine . If you have installed it check the registry key and follow the path you might need to reinstall Visual Basic to repair the registry key . Comment : Thanks for the info . I ll have to check that in the morning but at least I now know why I couldn t find out how to set it . VB6 is fully installed and works fine via the IDE building the projects in question as are the other versions of studio that was one of the first things I checked so it may be that the reg . key has become corrupt . Other than that I may simply convert the scripts to use the exec tag to run the builds directly which would be a shame as I had hoped not to have to change them too much between servers . I ll report back with my findings thanks again . Comment : Seems that despite VB6 being installed and working on the box that reg . key doesn t exist so that would explain the problem I m having . Thanks for your help mate much appreciated . Comment : Just to add to this : The above key will exist on an x64 system under SOFTWARE Wow6432Node Microsoft VisualStudio 6.0 Setup Microsoft Visual Basic ProductDir . Comparing behavior between nantcontrib 0.91 and 0.92 it appears that 0.92 on an x64 system reads from SOFTWARE Microsoft VisualStudio 6.0 Setup Microsoft Visual Basic ProductDir and not from Wow6432Node . Copying from Wow6432Node to the x64 registry hive seems to have caused nantcontrib 0.92 to find vb6.exe . I believe the version of nantcontrib to be the only difference in my test . Comment : I created an Issue github.com nant nantcontrib issues 34 https : github.com nant nantcontrib issues 34 and submitted a fix that will have nantcontrib check for the x86 and x64 paths . Thanks to Jonathon Rossi for providing a link-to the code file and Zeinrich for providing the x64 path .", "Question : Can anyone explain what advantages there are to using a tool like MSBuild or NAnt to build a collection of projects versus running DevEnv.exe from the command-line A colleague I had worked with in the past had explained that at least with older versions of Visual Studio using DevEnv.exe was much slower than the other techniques but I haven t read any evidence of that or if that is now a moot point now that starting with 2005 Visual Studio uses MSBuild under the hood . I know one advantage of using MSBuild allows you to build your projects without requiring Visual Studio to be installed on the build machines but I wasn t sure if there were others . .. . Answer : One reason is because there s much more to building a product than just compiling it . Tasks such as creating installs updating version numbers creating escrows distributing the final packages etc . can be much easier because of what these tools and their extensions provide . While you could do all this with regular scripts using NAnt or MSBuild give you a solid framework for doing all this . There s a lot of community support for both including additional tasks that can be downloaded such as the MSBuild Community Tasks Project http : msbuildtasks.tigris.org . Plus there s support for them in numerous third party and open-source products . If you re just interested in compiling and not the entire build-process you may find one time saving benefit of MSBuild is the support for building with multiple processors http : blogs.msdn.com msbuild archive 2007 10 22 enabling-multiprocessor-support-in-an-msbuild-host.aspx .", "Question : I am aware there are other NAnt http : en.wikipedia.org wiki NAnt and MSBuild http : en.wikipedia.org wiki MSBuild related questions on Stack Overflow but I could not find a direct comparison between the two and so here is the question . When should one choose NAnt over MSBuild Which one is better for what Is NAnt more suitable for home open-source projects and MSBuild for work projects What is the experience with any of the two .. . Answer : One of the major draws of MSBuild for me on Windows platforms is that it comes as part of .NET itself . That means that any Windows machine that is up-to-date with Windows Update will have MSBuild available . Add to this the fact that C compiler is also part of .NET itself and you have a platform that can build projects on clean machines . No need to install Visual Studio behemoth . NAnt on the other hand has to be explicitly installed before a build can be triggered . Just for the record I ve used NMake Make Ant Rake NAnt and MSBuild on non-trivial builds in the past in that order . My favourite is MSBuild hands down and I do not favour it because that s what Visual Studio uses . IMHO it is a very under-appreciated build tool . I would compare NAnt vs . MSBuild to the difference between procedural and functional-programming . NAnt is quite straightforward and you-get-what-you-see . MSBuild on the other hand requires a bit more thought . The learning curve is steeper . But once you get it you can do some amazing things with it . So I would recommend looking at MSBuild if you also gravitate towards functional or logical style programming - if you are willing to invest a bit of time and effort before seeing tangible results of course I also strongly believe that the investment eventually pays off and you can do more powerful things more efficiently . Comment : Wow Didn t know that MSBuild came shipped with the runtime . That s pretty cool and I can definitely see benefits there . However I don t understand the comparison between functional procedural . It would be interesting to hear what make MSBuild so much more powerful once one gets it . Comment : Msbuild actually has a number of dependencies on files from various sdks which only become apparent during the invocation of certain targets . So although msbuild is available out of the box it may not run . Comment : one thing that should be added : not only is it possible to call into .NET assemblies from within msbuild which gives one access to a whole lot of very handy functions eg everything in Systme.IO.Path can come in handy in build scripts it is also possible to write plain C code within msbuild files and have it executed . Which is simply aswesome . msdn.microsoft.com en-us library dd722601.aspx http : msdn.microsoft.com en-us library dd722601.aspx And if things get too complicated writing custom tasks is a breeze as well . Comment : From Wikipedia : MSBuild https : en.wikipedia.org wiki MSBuild Overview was previously bundled with .NET Framework starting with Visual Studio 2013 however it is bundled with Visual Studio instead . Comment : MSBuild Microsoft Build Tools 2013 can also be downloaded independently of Visual Studio 2013 here http : www.microsoft.com en-us download details.aspx id 40760 .", "Question : I am aware there are other NAnt http : en.wikipedia.org wiki NAnt and MSBuild http : en.wikipedia.org wiki MSBuild related questions on Stack Overflow but I could not find a direct comparison between the two and so here is the question . When should one choose NAnt over MSBuild Which one is better for what Is NAnt more suitable for home open-source projects and MSBuild for work projects What is the experience with any of the two .. . Answer : Personally I use both - for the same project . MSBuild is great at building Visual Studio solutions and projects - that s what it s made for . NAnt is more easily hand-editable in my opinion - particularly if you already know Ant . NAnt can call MSBuild very easily with NAntContrib . So I hand-craft a NAnt script to do things like copying built files cleaning up etc - and call MSBuild to do the actual turn my C source code into assemblies part . If you want an example of that look at my Protocol Buffers build file http : github.com jskeet dotnet-protobufs blob 7d9553b46ea9e1bd56e17dc74498d2150e20b043 ProtocolBuffers.build . I wouldn t claim it s a fabulous NAnt script but it does the job . Comment : And it does support Mono . Mono s MSBuild support is crappy . Comment : @Mehrdad : good point I never thought about that . Comment : @Mehrdad : Yes at some point I really must try to get Protocol Buffers to compile on Mono.. . currently there s a gmcs bug which stops it from working : The idea was always that it would eventually work on Mono though . Comment : +1 for the helpful example script . Comment : Guys mono uses XBuild and it s easy to port MSBuild to XBuild . Check this out : mono-project.com Porting MSBuild Projects To XBuild http : www.mono-project.com Porting MSBuild Projects To XBuild .", "Question : How do I need to indicate to the msbuild-task in my nant script that it should use .net-4.0 rc Comment : why is there an msbuild-task in your nant script Is you are using msbuild why would you do it that way around Comment : You can use NAnt to handle the overall project automation tasks e.g . running tests running analyses versioning packaging.. . and delegating to MSBuild for compilation . Comment : Grant is correct Nant is doing the build running the test running ncover and then handling some database scripting . .. . Answer : The first option is to change the executable that MSBuild task uses . According to the doco http : nantcontrib.sourceforge.net release 0.85-rc4 help tasks msbuild.html this is a framework property so you would need to change it in the main nant config file rather than in you re individual script and you would have to do it on every machine you plan on building the script on . The other option is to use the exec task instead . This http : stackoverflow.com questions 1291221 going-from-solution-to-exec-programmsbuild-in-nant question and answer should help with that . EDIT : Forgot to mention the directories MSBuild is in . To change versions just use a different MSBuild . 2.0 : windir Microsoft.NET Framework v2.0.50727 MSBuild.exe .. . 3.5 : windir Microsoft.NET Framework v3.5 MSBuild.exe .. . 4.0b2 : windir Microsoft.NET Framework v4.0.21006 MSBuild.exe", "Question : I ve converted my app from .NET 1.1 to .NET 3.5 and unfortunately NAnt s tag does not support .NET 3.5 . So I am trying to use the tag to kick off msbuild directly . Here is what I have for .NET 1.1 : .. . .. . I converted it to .. . .. . So everything is working fine except that I can t figure out how to replicate the really convinient tag which gives the compiler a hint as to where to look for dependecies . What do i pass to msbuild to replicate the functionality .. . Answer : I have doing configuration-management with Nant and CC.Net for a while now . I my experience I would not recommed using the Nant MSBuild task instead the easiest way is creating and task create a .bat file that the task executes . There are several reasons that would recommend using the command-line Visual Studio for one MSI packages are not easily build with Nant even if you use contrib . Its just way easier and a lot faster this way . ---------2.0 ------------- C : Program Files Microsoft Visual Studio 8 Common7 IDE devenv C : YourProject YourSoultion.sln Rebuild release .. . .. . ----------3.5-------------- C : Program Files Microsoft Visual Studio 9.0 Common7 IDE devenv C : YourProject YourSoultion.sln Rebuild release Comment : Wouldn t it be better to call MSBuild in the batch-file Comment : Devenv does reference MSBuild to build the sln files . There are some subtle difference between just invoking MSbuild Vs going with Devenv . Our dev team is on VS 2008 and invoking Devenv command-line basically produces the exact same output that our dev team would produce . That is my reason for choosing it over just invoking MSbuild that way if something breaks we know we are comparing apples to apples and can at least eliminate build environment . Devenv would be a little slower though compare to just invoking Msbuild but usually not by much . Comment : Devenv requires an install of Visual Studio on the build-server however . For licence reasons and simplicity a lot of build servers just have the Framework installed which is all that is needed to build the projects . Assuming you avoid Setup and Web Deployment projects which should be avoided for many reasons anyway and use alternatives that don t depend on Visual Studio to build .", "Question : Could someone explain to me how to use the Microsoft Ajax Minifier http : aspnet.codeplex.com Release ProjectReleases.aspx ReleaseId 34488 from a nant-script as a nant-task . I ve seen examples of how to use it in Visual Studio but I would like the minification to be done on our CI-server . .. . Answer : I m not sure specifically about the MS Ajax Minifier but here s what I did to get the Yahoo UI Library : YUI Compressor for .Net http : www.codeplex.com YUICompressor working . 1 . Downloaded the YUI Compressor assemblies for .NET .. . 2 . Modified their Sample MSBuild.xml File http : yuicompressor.codeplex.com wikipage title Sample 20MSBuild.xml 20File ProjectName yuicompressor .. . 3 . Modified my nAnt script to run the MSBuild task more details here : Build and publish .Net 2.0 projects with NAnt and the MSBuild task http : codebetter.com blogs jeffrey.palermo archive 2006 08 12 148248.aspx" ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
crysis@crysis@44
crysis -- lua scripting and extensions for @placeholder and other crytek games .
{ "confidence": [ 25.941131591796875, 25.941131591796875, 25.892879486083984, 25.79373550415039, 25.468231201171875, 24.13138771057129, 24.13138771057129, 24.13138771057129, 23.05291748046875, 22.570484161376953, 22.570484161376953, 22.088088989257812, 21.635990142822266, 20.535846710205078, 20.535846710205078, 20.013198852539062, 19.95391082763672, 19.053958892822266, 19.053958892822266, 18.924121856689453, 18.147010803222656, 16.95979118347168, 16.41665267944336, 15.234963417053223, 15.234963417053223, 15.234963417053223, 14.819891929626465, 14.819891929626465, 13.850259780883789, 13.606328010559082, 12.151838302612305, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363, 12.012280464172363 ], "content": [ "This code is part of a server mod for Crysis Wars see the whole function below but has the entire Lua library at hand so don t worry if you don t think your answer won t solve the problem .", "I am making my first public server modification for Crysis Wars and to ensure nobody steals my code I m putting as much as possible within the C++ based DLL the alternative is Lua .", "If the game uses Lua for scripting why would you care if anyone tried to steal your code", "I program for a PC game called Crysis Wars and lately players have been constantly asking for a new game update a community patch to fix problems including a rather ironic scripting error .", "I am programming a new server-client network for the game Crysis Wars .", "I have the following code to send a block of text to a users game console Crysis Wars : .. . .. . But I get this result : .. . .. .", "I m coding a restart feature into my newest Crysis Wars server modification that remotely reboots the server .", "It is Crysis Wars Dedicated Server V1.5 and the server basically looks for a custom game DLL in Mods modname Bin 32 or 64 .", "Caller from Lua : .. . .. .", "Wrong Text http : i.stack.imgur.com oc6QB.jpg .. . .. . This problem has practically plagued the Crysis Wars developer community and there have been no real solutions to this .", "If you provide a working solution you ll be pretty famous within the Crysis Wars developer community as you would have solved a pretty annoying bug : .", "The code formats fine if I do it straight from C++ as opposed to Lua to C++ so this must be a problem Lua-side .", "There s already a function in the Lua that stops this from happening .", "I thought the Script.LoadScript was a global Lua fucntion I ve been proved wrong : .", "the problem is not in lua is on c++ side.. . use a debugger to see where and why it is crashing", "I would rather assume CryTek used the typedef CryString string on purpose to exploit that bad practice : the interface of CryString looks very similar to std : : string I bet they tried to make it compatible .", "In Lua this will be done with a simple string.match I suppose I could always do the message sorting in Lua then get it to send back to C++ but this could cause the whole chatcommand system to be dis-organised .", "I m having a huge problem when I ve added content to a table Lua where all content in the table suddenly disappears .", "In this game there are certain people who basically steal as much Lua code as possible and claim that they created it .", "So now the problem is that the LoadScript function isn t doing what you expect : .. . .. . Because I m psychic i have divined that you re writing a Crysis http : www.crydev.net index.php plugin and are attempting to use it s LoadScript API call http : www.crydev.net wiki index.php Lua API Script LoadScript .", "I have told the host Lua function to close the backup.lua file so why isn t it letting me modify the file at will after it has been closed", "You can create a simple Lua function that takes an array of strings and broadcasts them in reverse order : .. . .. . You can augment this to take the strings as either an array or a variadic series of strings building the array in-situ : .. . .. . You can even create a simple Lua object that is given strings to be sent and then call it to send all of the stored strings .", "If the other solutions don t work I ll use this : .", "The problem is that the program writes the backup.lua file completely fine first-time round but any other times it refuses to write to the file .", "You need to write a n after the comment and I d recommend in other places too to make it like this .", "As for the other image the only thing I can see offhand is that the bottom line isn t centered .", "If you look at your input carefully you will notice that your second to last content line is one character longer than your other lines .", "In the latter case you must connect to other SMTP servers convince them you are not a spammer and still deliver a number of emails which are automatically generated .", "Please Note : I have removed my other related question since apparently closing program ports is impossible without telling it to do so when it it assigned the port which is something I cannot do since I don t have access to the sourcecode of the code that binds to the port . .. . .. . The code if it s required", "CryString https : github.com adithedude007 alecmercer-origins blob master Code CryEngine CryCommon CryString.h on the other hand first takes the character to repeat then the amount of repetition .", "I have had a brief look at Google and I ve only found how to put CLI inside a GUI window and not the other way round .", "I have a file called backup.lua which the program should write to every so often in order to backup its status in case of a failure .", "I tried removing the file while the program was still open but Windows told me that the file was in use by CrysisWarsDedicatedServer.exe which is the program .", "I can t find anything on the internet Google actually tried to correct my search and the secondary programmer on the project doesn t know either .", "So I m wondering if any of you folks know what we are doing wrong here", "Host function code : .. . .. . Thanks all : .", "Edit : .. . .. . Although the file is now written to the disk fine the system fails to read the dumped file .", "Please don t assume everyone here would guess this or be bothered to look for it .", "It s vital information that must form part of your questions .. . .. . The script you re writing attempts to set Backup - but your script as written - does not separate lines with newline characters .", "As the first line is a comment the entire script will be ignored .", "Basicallty the script you ve written looks like this which is all treated as a comment .", "In fact you don t really need block comments at all .", "This worked- I can t award the bounty now because I have to wait 24 hours but I ll award it when I can do so : .", "I have tried timing the messages to 1ms apart and this resulted in some messages going missing probably because recent messages override the old ones .", "Do you guys have any suggestions or solutions to this issue", "I would offer some of my reputation but unfortunately I awarded the bounty this morning to someone for solving another issue .", "Function code for sending the messages : .. . .. . If this helps for anything here s the C++ SendConsoleMessage code : .. . .. . Edit : .. . .. . Please note that this isn t to do with the text used to center and that the image and text block below is only provided as an example this issue occurs on every piece of code that is sent .", "enter image description here http : i.stack.imgur.com k0jY8.jpg .. . .. .", "Msg1 http : i.stack.imgur.com 2zlKM.jpg", "I had a problem like this using MFC text widget .", "It seems MFC does did not align the output .", "Could this be the same Issue your having", "Could be .", "If it is watch this space", ":", "Could you paste or link-to the CentreTextForConsole function", "@EtanReisner : As said before this is not to do with this function and is not about the centering of the text .", "It is about the inverted text .", "@AlexanderStopher : OK let me explain how Stack Overflow doesn t work .", "It doesn t work by you editing your question to put the solution in the question .", "SO is a Q A site not a forum .", "Questions go at the top answers at the bottom .", "You don t put answers in questions .", "If an answer solves your problem you accept it and upvote it .", "So you re saying that a sequence of these functions always results in output that is the exact opposite of the function order .", "So.. . just send the data in the reverse order .", "This will therefore double the reversal and submit the data in the expected order .", "There are numerous ways of doing this .", "You ve made it here : online-gaming-world.de http : online-gaming-world.de index.php page Thread postID 2914 post2914 .", "@AlexanderStopher : It actually says that you can create a new topic on your problem as long as you edit it sufficiently which I did . That rather depends on who you ask .", "http : meta.stackexchange.com questions 189732 There seems to be some disagreement about how that s supposed to work .", "Also your edits were in no way sufficient to make the new question different .", "As evidenced by the fact that I provided this answer to your old question without ever having read it in any detail .", "That output is inverted from your input .", "That will cause it to be centered on screen differently .", "Try removing that extra space and seeing if that fixes the problem .", "No this doesn t fix the problem and is not to do with the code used to center .", "The image and text code is just an example this happens in almost every text block that is sent .", "Can you give us an example pair that doesn t have that bug and still displays your incorrect output", "Because in the code snippet and image above that extra space is almost certainly the bug .", "Updated the initial post with more images and their code .", "Is something wrong in that commands image", "Is that the issue", "Does it happen with lines that don t have fancy formatting", "Is the issue the inversion of contents as compared to the function-call order", "The table in question holds the data for a banlist 608 entries at present and is placed within the table by using table.insert however the lead entry for the user is done as Umbra.Banlist profileId .", "The Umbra.Banlist profileId table alone should mean that there s content within the Umbra.Banlist table .", "I get no errors when running the code and when using .. . .. . I get this : .. . .. .", "1 http : i.stack.imgur.com rjMwh.jpg .. . .. . I ve looked on the web and on this site but there doesn t seem to be any related questions so I m posting it here .", "The Code : .. . .. . Edit : .. . .. . I don t get the message that the code below should print if their profile doesn t exist in the table so their profile does actually exist .", "Another Edit : .. . .. . Proof that the system can in fact get the ID variable : .. . .. .", "enter image description here http : i.stack.imgur.com mD5cu.jpg", "Yes I do apologise for some of the names visible in the screenshot- I can t help this and I m not editing the banlist just for a screenshot on here .", "You could edit the screenshot to redact the names .", "Just try to use this function to get count of items in table : .. . .. . The thing is that counts an array table with number indexes but you have table with string indexes .", "is same like when you would replace pairs with ipairs in that count function .", "So and when you do Umbra.Banlist where all indexes are strings it returns 0 because there are 0 integer indexes but it does not mean that table is empty .", "Upon using a tostring for the profile I can access the table for the profile properly ." ] }
{ "confidence": [ 34.78681945800781, 34.266571044921875, 33.121002197265625, 31.47011375427246, 29.873275756835938, 27.84914207458496, 25.673084259033203, 23.132099151611328, 20.768753051757812, 20.451610565185547, 20.43680763244629, 20.036502838134766, 13.91187858581543, 13.581061363220215, 12.471694946289062, 11.102147102355957, 10.625679016113281, 10.463531494140625 ], "content": [ "Question : I am making my first public server modification for Crysis Wars and to ensure nobody steals my code I m putting as much as possible within the C++ based DLL the alternative is Lua . To do this I have to put commands in the DLL some of which require additional variables . Here s an example : .. . .. . ban playername time reason .. . .. . How would I go about retrieving variables playername time and reason all of which have different character lengths The reason variable may also have more than one word such as offensive messages and cheating that will need to be picked up . In Lua this will be done with a simple string.match I suppose I could always do the message sorting in Lua then get it to send back to C++ but this could cause the whole chatcommand system to be dis-organised . It would need to extract the variables from the const char msg which is analysed by the system on every message sent . I already analyse it for command messages those which begin with . What is the best way to do this Examples : ban Con 5 spam - This will kick the player Confl ct I already have the partial scan code to identify partial names for five minutes .. . .. . ban Con spam - This will permanently ban the player Confl ct Comment : How would I go about retrieving variables playername time and reason I don t get it . Please ask it again in different words . Comment : How would I use string : : match or similar to extract these variables from a chatmessage . I ll update the original post now with the info . Thanks for pointing that out : Comment : If the game uses Lua for scripting why would you care if anyone tried to steal your code All you re doing is making a wrapper for console commands from what I could see . Comment : @AlexanderStopher : use boost : : regex or std : : regex if you have a compiler with c++11 support Comment : In this game there are certain people who basically steal as much Lua code as possible and claim that they created it . If I put the commands within the DLL they will not be able to access it without the sourcecode which I will not be releasing . .. . Answer : The way to go here is to use Regular Expressions aka regex . As I was going through my old questions smartening them up I quickly used txt2re http : txt2re.com index-c++.php3 s ban 20command 20variables 5 3 1 to cook up a quick regex recipe as seen below : .. . .. . This code requires these libraries as C++ does not include a regular expressions function by default : .. . .. . PCRE http : www.pcre.org .. . PME ftp : ftp.csx.cam.ac.uk pub software programming pcre Contrib", "Question : I have the following code to send a block of text to a users game console Crysis Wars : .. . .. . But I get this result : .. . .. . Wrong Text http : i.stack.imgur.com oc6QB.jpg .. . .. . This problem has practically plagued the Crysis Wars developer community and there have been no real solutions to this . The code formats fine if I do it straight from C++ as opposed to Lua to C++ so this must be a problem Lua-side . I have tried timing the messages to 1ms apart and this resulted in some messages going missing probably because recent messages override the old ones . Do you guys have any suggestions or solutions to this issue If you provide a working solution you ll be pretty famous within the Crysis Wars developer community as you would have solved a pretty annoying bug : . I would offer some of my reputation but unfortunately I awarded the bounty this morning to someone for solving another issue . Function code for sending the messages : .. . .. . If this helps for anything here s the C++ SendConsoleMessage code : .. . .. . Edit : .. . .. . Please note that this isn t to do with the text used to center and that the image and text block below is only provided as an example this issue occurs on every piece of code that is sent . enter image description here http : i.stack.imgur.com k0jY8.jpg .. . .. . Msg1 http : i.stack.imgur.com 2zlKM.jpg Comment : I had a problem like this using MFC text widget . It seems MFC does did not align the output . Could this be the same Issue your having Comment : Could be . If it is watch this space : Comment : Could you paste or link-to the CentreTextForConsole function Comment : @EtanReisner : As said before this is not to do with this function and is not about the centering of the text . It is about the inverted text . Comment : @AlexanderStopher : OK let me explain how Stack Overflow doesn t work . It doesn t work by you editing your question to put the solution in the question . SO is a Q A site not a forum . Questions go at the top answers at the bottom . You don t put answers in questions . If an answer solves your problem you accept it and upvote it . .. . Answer : So you re saying that a sequence of these functions always results in output that is the exact opposite of the function order . So.. . just send the data in the reverse order . This will therefore double the reversal and submit the data in the expected order . There are numerous ways of doing this . You can create a simple Lua function that takes an array of strings and broadcasts them in reverse order : .. . .. . You can augment this to take the strings as either an array or a variadic series of strings building the array in-situ : .. . .. . You can even create a simple Lua object that is given strings to be sent and then call it to send all of the stored strings . Comment : You ve made it here : online-gaming-world.de http : online-gaming-world.de index.php page Thread postID 2914 post2914 . : Comment : @AlexanderStopher : It actually says that you can create a new topic on your problem as long as you edit it sufficiently which I did . That rather depends on who you ask . http : meta.stackexchange.com questions 189732 There seems to be some disagreement about how that s supposed to work . Also your edits were in no way sufficient to make the new question different . As evidenced by the fact that I provided this answer to your old question without ever having read it in any detail .", "Question : I have the following code to send a block of text to a users game console Crysis Wars : .. . .. . But I get this result : .. . .. . Wrong Text http : i.stack.imgur.com oc6QB.jpg .. . .. . This problem has practically plagued the Crysis Wars developer community and there have been no real solutions to this . The code formats fine if I do it straight from C++ as opposed to Lua to C++ so this must be a problem Lua-side . I have tried timing the messages to 1ms apart and this resulted in some messages going missing probably because recent messages override the old ones . Do you guys have any suggestions or solutions to this issue If you provide a working solution you ll be pretty famous within the Crysis Wars developer community as you would have solved a pretty annoying bug : . I would offer some of my reputation but unfortunately I awarded the bounty this morning to someone for solving another issue . Function code for sending the messages : .. . .. . If this helps for anything here s the C++ SendConsoleMessage code : .. . .. . Edit : .. . .. . Please note that this isn t to do with the text used to center and that the image and text block below is only provided as an example this issue occurs on every piece of code that is sent . enter image description here http : i.stack.imgur.com k0jY8.jpg .. . .. . Msg1 http : i.stack.imgur.com 2zlKM.jpg Comment : I had a problem like this using MFC text widget . It seems MFC does did not align the output . Could this be the same Issue your having Comment : Could be . If it is watch this space : Comment : Could you paste or link-to the CentreTextForConsole function Comment : @EtanReisner : As said before this is not to do with this function and is not about the centering of the text . It is about the inverted text . Comment : @AlexanderStopher : OK let me explain how Stack Overflow doesn t work . It doesn t work by you editing your question to put the solution in the question . SO is a Q A site not a forum . Questions go at the top answers at the bottom . You don t put answers in questions . If an answer solves your problem you accept it and upvote it . .. . Answer : That output is inverted from your input . If you look at your input carefully you will notice that your second to last content line is one character longer than your other lines . That will cause it to be centered on screen differently . Try removing that extra space and seeing if that fixes the problem . Comment : No this doesn t fix the problem and is not to do with the code used to center . The image and text code is just an example this happens in almost every text block that is sent . Comment : Can you give us an example pair that doesn t have that bug and still displays your incorrect output Because in the code snippet and image above that extra space is almost certainly the bug . Comment : Updated the initial post with more images and their code . Comment : Is something wrong in that commands image As for the other image the only thing I can see offhand is that the bottom line isn t centered . Is that the issue Does it happen with lines that don t have fancy formatting Comment : Is the issue the inversion of contents as compared to the function-call order", "Question : I have a file called backup.lua which the program should write to every so often in order to backup its status in case of a failure . The problem is that the program writes the backup.lua file completely fine first-time round but any other times it refuses to write to the file . I tried removing the file while the program was still open but Windows told me that the file was in use by CrysisWarsDedicatedServer.exe which is the program . I have told the host Lua function to close the backup.lua file so why isn t it letting me modify the file at will after it has been closed I can t find anything on the internet Google actually tried to correct my search and the secondary programmer on the project doesn t know either . So I m wondering if any of you folks know what we are doing wrong here Host function code : .. . .. . Thanks all : . Edit : .. . .. . Although the file is now written to the disk fine the system fails to read the dumped file . .. . Answer : So now the problem is that the LoadScript function isn t doing what you expect : .. . .. . Because I m psychic i have divined that you re writing a Crysis http : www.crydev.net index.php plugin and are attempting to use it s LoadScript API call http : www.crydev.net wiki index.php Lua API Script LoadScript . Please don t assume everyone here would guess this or be bothered to look for it . It s vital information that must form part of your questions .. . .. . The script you re writing attempts to set Backup - but your script as written - does not separate lines with newline characters . As the first line is a comment the entire script will be ignored . Basicallty the script you ve written looks like this which is all treated as a comment . You need to write a n after the comment and I d recommend in other places too to make it like this . In fact you don t really need block comments at all . Comment : I thought the Script.LoadScript was a global Lua fucntion I ve been proved wrong : . This worked- I can t award the bounty now because I have to wait 24 hours but I ll award it when I can do so : .", "Question : I m having a huge problem when I ve added content to a table Lua where all content in the table suddenly disappears . The table in question holds the data for a banlist 608 entries at present and is placed within the table by using table.insert however the lead entry for the user is done as Umbra.Banlist profileId . The Umbra.Banlist profileId table alone should mean that there s content within the Umbra.Banlist table . I get no errors when running the code and when using .. . .. . I get this : .. . .. . 1 http : i.stack.imgur.com rjMwh.jpg .. . .. . I ve looked on the web and on this site but there doesn t seem to be any related questions so I m posting it here . This code is part of a server mod for Crysis Wars see the whole function below but has the entire Lua library at hand so don t worry if you don t think your answer won t solve the problem . The Code : .. . .. . Edit : .. . .. . I don t get the message that the code below should print if their profile doesn t exist in the table so their profile does actually exist . Another Edit : .. . .. . Proof that the system can in fact get the ID variable : .. . .. . enter image description here http : i.stack.imgur.com mD5cu.jpg Comment : Yes I do apologise for some of the names visible in the screenshot- I can t help this and I m not editing the banlist just for a screenshot on here . Comment : You could edit the screenshot to redact the names . .. . Answer : Just try to use this function to get count of items in table : .. . .. . The thing is that counts an array table with number indexes but you have table with string indexes . is same like when you would replace pairs with ipairs in that count function . So and when you do Umbra.Banlist where all indexes are strings it returns 0 because there are 0 integer indexes but it does not mean that table is empty . Comment : Upon using a tostring for the profile I can access the table for the profile properly . Thanks :", "Question : I m having a huge problem when I ve added content to a table Lua where all content in the table suddenly disappears . The table in question holds the data for a banlist 608 entries at present and is placed within the table by using table.insert however the lead entry for the user is done as Umbra.Banlist profileId . The Umbra.Banlist profileId table alone should mean that there s content within the Umbra.Banlist table . I get no errors when running the code and when using .. . .. . I get this : .. . .. . 1 http : i.stack.imgur.com rjMwh.jpg .. . .. . I ve looked on the web and on this site but there doesn t seem to be any related questions so I m posting it here . This code is part of a server mod for Crysis Wars see the whole function below but has the entire Lua library at hand so don t worry if you don t think your answer won t solve the problem . The Code : .. . .. . Edit : .. . .. . I don t get the message that the code below should print if their profile doesn t exist in the table so their profile does actually exist . Another Edit : .. . .. . Proof that the system can in fact get the ID variable : .. . .. . enter image description here http : i.stack.imgur.com mD5cu.jpg Comment : Yes I do apologise for some of the names visible in the screenshot- I can t help this and I m not editing the banlist just for a screenshot on here . Comment : You could edit the screenshot to redact the names . .. . Answer : Near the end of your code you have Umbra.Banlist 0 but I don t see any item insertions into it by numeric keys . Here are some things to check to see if you re assumptions matches up with reality . Check that profile isn t nil . It looks like in your use-case you re assuming it s a number . You can check this easily with : .. . .. . If profile is actually not a number type then checking Umbra.Banlist with operator is faulty . Note does not count the associative part of the table . If you only care whether Umbra.Banlist is empty or not you can use if next Umbra.Banlist then to check for it . Comment : Yes Umbra.Banlist is a number 9 digit . Using the if next Umbra.Banlist yields the same result . Perhaps I m reading the file wrong Comment : @AlexanderStopher The captures are going to be in string form . Try tonumber profile to convert it into a number assuming profile is really that . Comment : @AlexanderStopher to help debugging you can also log and print out name profile ip domain etc.. . to confirm it s capturing what you expect . Comment : See the screenshot this is what is happening in it . Comment : @AlexanderStopher I don t see profile variable printed out anywhere in that screenshot .", "Question : I am programming a new server-client network for the game Crysis Wars . I have a function that centers a string to the amount of characters supported per-line in the console window . The window fits 113 characters but I have set the maximum character width in my function to 111 as to fit text nicely . This is my function : .. . .. . This function is from a question I asked last year http : stackoverflow.com questions 17512825 align-text-to-center-in-string-c but I however am not sure whether I ended up using it or not in past projects . I am attempting to use this function in this context the CryLogAlways function simply logs the string to the game server logfile and prints it : .. . .. . However the output is : .. . .. . enter image description here http : puu.sh cZEqo f39462446e.png .. . .. . Likewise as @deW1 requested I have a similar output with CryLogAlways CenterText X .c str : .. . .. . enter image description here http : puu.sh cZEG8 7921d3bc39.png .. . .. . Why am I getting this output and how can I fix this Comment : What is the output if you do CryLogAlways CenterText X .c str Comment : If that s a CryString they ve inverted the order of parameters for construction of a string : First the value then the amount as opposed to std : : string . The character is 32 decimal which corresponds to the amount of characters in your output . Comment : @cybermonkey Well your function uses a type named string as both its parameter and return-type and within this function you re constructing a string - here the order of parameters matters . Comment : Can you clarify what exactly string is Comment : @cybermonkey Yes as we ve all been saying all along : P .. . Answer : You re using the type string unqualified . I was assuming you have using namespace std somewhere against best practice http : stackoverflow.com q 1452721 1782465 which would make string refer to std : : string . But apparently that is not the case and you have the non-qualified name string defined to something the question doesn t show what which behaves similarly to a std : : string i.e . it has .length and .c str . However the constructor arguments of this something seem to be in reversed order to those of std : : string . If you want your function to work with standard-library strings say so eplicitly : .. . .. . This is a prime example of why it s an extremely good idea to use explicit qualification for std types . Comment : This is a prime example of why it s an extremely good idea to use explicit qualification for std types . I would rather assume CryTek used the typedef CryString string on purpose to exploit that bad practice : the interface of CryString looks very similar to std : : string I bet they tried to make it compatible . Comment : I keep referring back to this excellent answer so I m awarding a bounty . Will award in 23 hours . Comment : @ uo q Thanks I m happy it s been helpful .", "Question : I m coding a restart feature into my newest Crysis Wars server modification that remotely reboots the server . This is useful if the server has a problem and a simple system reload does not fix it also is useful to tell the server to restart at a specified time in order to free up memory . I have coded the required functions in order to achieve this and the application itself has no problem restarting . The issue is that the port is not closed quickly enough resulting in a new instance of the application that cannot function properly . I am looking for an ideal solution to this that the program is shut down and launches two seconds later instead of immediately . Doing this will give Windows enough time to free the port that the server was using and clean up any existing memory . Please Note : I have removed my other related question since apparently closing program ports is impossible without telling it to do so when it it assigned the port which is something I cannot do since I don t have access to the sourcecode of the code that binds to the port . .. . .. . The code if it s required .. . Answer : What I usually do is add a command-line parameter StartupDelay . When the server whatever starts up before attempting to run the listener etc it checks for that parameter . If no param it runs up normally if it finds StartupDelay 2000 it sleeps for 2 seconds before attempting to start the listener etc . Result - if started from desktop icon it starts immediately . If it needs to restart itself it sets the parameter to instruct the new instance of itself to wait as directed . Comment : Although this wasn t the exact answer it did help me to find the solution . In the end I just made it execute a batch-file which had a delay to execute the code to start the server application up again .", "Question : I would like to obtain the current network transfer rate of download upload . This is for a C++ gameserver DLL and the primary objective of this is to best predict the upper-latency limit to kick players from the server when their latency is too high . Basically a players ping influences the fluency of their movements and higher latency leads to more delayed movement meaning that we need to get rid of the player if it becomes too high . This is to mainly keep players happy . Via the internal functions of the gameserver I can get the internal process upload download rates but I cannot get Windows . I ve looked pretty much everywhere and have done so on-and-off for quite a few months . The only solutions I can find don t work and the rest are specific to Linux . The supported platforms if it matters are Windows Server 2008 R2 and Windows 7 . The compiler is Microsoft Visual Studio Ultimate 2013 s default compiler . Edit .. . .. . Forgot to mention that my gameserver DLL will eventually be running on a dedicated-server with no less than four IPs so it needs to be able to measure the connection upload download at the current rate for all the IPs collectively . Comment : Are you allowed to use .net or only win-api Comment : I think so . I don t have access to the schematics but I think the application is .net based . It is Crysis Wars Dedicated Server V1.5 and the server basically looks for a custom game DLL in Mods modname Bin 32 or 64 . I m currently using a multimedia library called SFML which allows me to have naive FTP functions . Not sure if this library covers inbound outbound connection usage though . Comment : Did you try this : msdn.microsoft.com en-us library http : msdn.microsoft.com en-us library system.net.networkinformation.networkinterface.speed 28v vs.110 29.aspx cs-save-lang 1 cs-lang cpp code-snippet-2 Comment : No I haven t since it only measures the speed of the networking interface and not the actual amount of data currently going through . Comment : Am I wrong I looked at the solution in more detail and it measures in bits per second but it also has stats- OutputQueueLength . Any idea what stats- OutputQueueLength does .. . Answer : I found a GUI application that offers the same functionality : .. . .. . GUI Application http : i.stack.imgur.com vEVMA.png .. . .. . GUI Application Source http : www.codeproject.com Articles 6259 Monitoring-network-speed .. . .. . I guess that I should be able to extract the necessary libraries from this project then use them in my own project . As my IPs all use the same 1GBPS network-interface it should be able to work to my requirements fine .", "Question : I am programming a new server-client network for the game Crysis Wars . I have a function that centers a string to the amount of characters supported per-line in the console window . The window fits 113 characters but I have set the maximum character width in my function to 111 as to fit text nicely . This is my function : .. . .. . This function is from a question I asked last year http : stackoverflow.com questions 17512825 align-text-to-center-in-string-c but I however am not sure whether I ended up using it or not in past projects . I am attempting to use this function in this context the CryLogAlways function simply logs the string to the game server logfile and prints it : .. . .. . However the output is : .. . .. . enter image description here http : puu.sh cZEqo f39462446e.png .. . .. . Likewise as @deW1 requested I have a similar output with CryLogAlways CenterText X .c str : .. . .. . enter image description here http : puu.sh cZEG8 7921d3bc39.png .. . .. . Why am I getting this output and how can I fix this Comment : What is the output if you do CryLogAlways CenterText X .c str Comment : If that s a CryString they ve inverted the order of parameters for construction of a string : First the value then the amount as opposed to std : : string . The character is 32 decimal which corresponds to the amount of characters in your output . Comment : @cybermonkey Well your function uses a type named string as both its parameter and return-type and within this function you re constructing a string - here the order of parameters matters . Comment : Can you clarify what exactly string is Comment : @cybermonkey Yes as we ve all been saying all along : P .. . Answer : According to C++ Reference http : www.cplusplus.com reference string string string you are right . As pointed out in the comments for the string implementation you use the arguments are switched . For the second example you print the sign 111-1 2 55 7 for 32 times . Swap the arguments to .. . .. . and it should work better . Comment : This is on the right track though . The compiler is clearly not matching this code to the std : : string constructor for string size-t n char c But the OP tested using a string constant X and got the same result so how can it not be std : : string Comment : @RichardSchwartz std : : string http : en.cppreference.com w cpp string basic string basic string has a constructor that takes the amount of repetition first then the character to repeat . CryString https : github.com adithedude007 alecmercer-origins blob master Code CryEngine CryCommon CryString.h on the other hand first takes the character to repeat then the amount of repetition . So Martze has it backwards . Comment : So i made the same error as in the question but with the reference version . Wow . Fixed it though .", "Question : I program for a PC game called Crysis Wars and lately players have been constantly asking for a new game update a community patch to fix problems including a rather ironic scripting error . There are several game hacks known as Infinium Gamg Annihilator Longpoke which rely on DLL injection methods to place hacks cheats within the game without the internal anticheat system noticing . These hacks are quite simple and exploit the main game DLL s code through hex value modifications and some like Gamg are made with the game-engine s own SDK I know the creator of this hack . Like others I have access to the CryEngine 2 the game-engine SDK includes the source code to the main game dll and I propose to modify the name location of all game functions for both client and server so the existing hacks will not work anymore . Would this work to stop hacks made with modifying the hex values of the main game dll I confirm that hacks made with the SDK will no longer function but I want to check with others before attempting this since it will require a lot of work . Basically what I am asking : .. . .. . Hackers are exploiting a DLL in a game by changing the source code if I change all functions in the source code and issue a community update for the game without releasing the new source code would the hackers be able to use the same hacks without any problems I apologise if this seems confusing- please do say if I need to be clearer . Comment : Answer : Depends . See : stackoverflow.com questions 3784389 http : stackoverflow.com questions 3784389 difference-between-api-and-abi Comment : I m a bit naive on this . Are they changing the addresses of function-calls Would ASLR help Comment : Going to do some testing- I ll answer my own question when I gather the results . @Simple Yes they are changing the addresses of function-calls . ASLR looks interesting- I ll give it a go . Comment : I think you can do something akin to ASLR pretty trivially by creating a fixed address memory mapping address with a not-so-fixed fixed address somewhere in the 0x400k-0x600k range before loading the game DLL . That will force the OS to relocate the DLL and consequentially all functions . Legitimate users of the DLL should not be affected since they use GetProcAddress and don t tamper with hex values at known addresses . Same for non-static in-game variables . Do a new int rand 0xffff as the first thing . That will practically guarantee that .. . Comment : .. . the otherwise more or less deterministic allocator produces random addresses . Of course many addresses such as a loaded asset will be random anyway since objects are unpredictably created and deleted throughout the game on an as-needed base but some main structures which are created in a well-defined order at startup might still be exactly predictable . They re not if you allocate a random amount of scratch first . .. . Answer : You ll break everything legal and illegal mods . The illegal mods will probably be fixed quite soon it s quite trivial to reverse-engineer your proposed changes . A better method is to turn on Data Execution Prevention and hook the VirtualProtect function which is needed to bypass DEP . You ll then be able to catch attempts to install a later hook . Of course do check that there s no existing hook for VirtualProtect nor any known DLL hack already present . Comment : Yeah but it ll take a lot of work do reverse-engineer the changes . As well as this hackers cannot touch the functions what the client uses to send data to the server . This means that if they do end up reverse-engineering it they won t actually be able to do any harm with their changes . I ll have a look at VirtualProtect . Comment : @zyboxenterprises : I expect it takes hackers about 2 hours to reverse-engineer a name change how much time will it cost you And of course hackers can t touch your server code but that s already a given now . You don t need to do anything for that . Comment : One single name change all the hacks need at least three changes in the default code in order to actually work and they can be found and changed quite easily via a hex editor . If the function names are changed and also the content of the functions the hex value will be changed making it almost impossible to find the correct function . Comment : @zyboxenterprises : You re not experienced enough in thinking like a hacker . Besides the exact hex signature functions can also be effectively identified by their place in the call-graph as well as their run-time call order . To give you an idea : I once reverse-engineered a similar DLL without using names at all and I didn t have the old hex values to compare with either . Comment : @zyboxenterprises I m pretty sure that any hack that is being maintained will be back up and working within at most few weeks and if someone takes this as a challenge within days . Sure it would break no longer developed hacks and temporarily active ones but not for long . And if you do it again they will be more experienced and faster at working around it every time . I m not sure it s worth it .", "Question : See the first image below for the problem . You can see that the first line of text correctly aligns but the second does not . .. . .. . A few months ago I wrote some code that centers the text in a string in order to process it nicely onto a console for a gameserver modification . This code works really nicely but has two major problems : .. . .. . The gameserver crashes if we go over the 112 character limit of the actual console this problem doesn t occur in a normal console message .. . .. . Use of colours in the text causes the string to shift to the right by two characters for each colour code .. . .. . I am looking to solve the second problem although solving the first would be a massive benefit but do not have a clue how to do this . I cannot simply take the colour coding out since this is needed to colour the text . This code might be simple if I didn t have 9 colour types to choose from : .. . .. . I don t want to simply look for the either since this is used as a normal character in some cases . Is ignoring the 1- 9 when inserting the spaces possible If so how would I approach this The Code .. . .. . Example .. . .. . I can t get to my development PC right now as I m as work- I ll post a screenshot in a few hours when I get back if this issue hasn t been resolved . Caller from Lua : .. . .. . desc http : i.stack.imgur.com tan6S.png .. . .. . This shows what it should look like . The message only works properly if it is less than 80 characters long . enter image description here http : i.stack.imgur.com 8DaBA.jpg Comment : Can you show an example what what you start with what you re getting and what the result is suppose to be please Comment : Updated question . Comment : Does your msg contain the two characters of color code Comment : Yes it does . I also don t know where the colour is actually added since its in an external DLL for which I do not have the source for . Comment : What is the 4+ in the startpos calculation for .. . Answer : Your program crashes because of the defined length of your arrays . Resize newmsg appropriately .. . .. . Also check that startpos + i 0 length of array .. . .. . .. . .. . .. . As for your second question : .. . .. . As you said : .. . .. . Use of colours in the text causes the string to shift to the right by two characters for each colour code .. . .. . Seems that colour codes are being removed before printed and your problems arises because you are taking into account a length of a message which includes color codes.. . .. . .. . If so how would I approach this .. . .. . Maybe adding 2 less spaces for each color code found on the msg for example . Comment : Changed in the example . Comment : it will still crash if the msg passed to your function is long enough.. . Comment : There s already a function in the Lua that stops this from happening . Comment : wanna bet the problem is not in lua is on c++ side.. . use a debugger to see where and why it is crashing Comment : @AlexanderStopher You have to check for string termination and count how many possible characters can be in the new string rather than having a 200 for your line length .", "Question : This question already has an answer here : .. . .. . How to send emails using yahoo or gmail in c++ questions 5926294 how-to-send-emails-using-yahoo-or-gmail-in-c 3 answers .. . .. . I am trying to build an automated email sender that sends ms statistics of a gameserver and also used for notifying the server administrators about potential cheaters and problems . The server modification is currently a C++ DLL although at some later time when I m more experienced I intend to make a GUI dedicated-server application . The emails will be sent once every 5 hours server administrator can change this through the configuration settings and when a player is reported and a member is added to gain privileges within the server . I ve had a brief look on Google and all I can find are external libraries for this . Is it possible to send the emails without additional third-party libraries Also would would the requirements be The application that will be using the DLL runs on Windows Server 2008 or Windows 7 or later and can run on a variety of internet types . Can this be done without an SMTP server installed Comment : stackoverflow.com questions 5926294 http : stackoverflow.com questions 5926294 how-to-send-emails-using-yahoo-or-gmail-in-c Comment : @piotru This is with an email account on a third-party site . I need to send an email without an actual account I know it s possible because I use it for a couple of my PHP sites . The reason for this is because many people are going to use it and don t want to give them access to an email account they can easily lock out from others . Comment : no . there is example how to connect to smtp server you just need to talk to it Comment : Yeah I just read that : . If the other solutions don t work I ll use this : . Thanks : . .. . Answer : The emails must be sent to an SMTP server namely the SMTP server of the receiver . There are two ways to achieve this : by talking to a local SMTP server or by acting as an SMTP server yourself . In the latter case you must connect to other SMTP servers convince them you are not a spammer and still deliver a number of emails which are automatically generated . The challenge in that should be clear Comment : Would it work if I was to create a private account on my own domain and send the email via this account Comment : Yup because that own domain implies local SMTP server installed . It will talk on your behalf to the remote SMTP server .", "Question : This question already has an answer here : .. . .. . How to send emails using yahoo or gmail in c++ questions 5926294 how-to-send-emails-using-yahoo-or-gmail-in-c 3 answers .. . .. . I am trying to build an automated email sender that sends ms statistics of a gameserver and also used for notifying the server administrators about potential cheaters and problems . The server modification is currently a C++ DLL although at some later time when I m more experienced I intend to make a GUI dedicated-server application . The emails will be sent once every 5 hours server administrator can change this through the configuration settings and when a player is reported and a member is added to gain privileges within the server . I ve had a brief look on Google and all I can find are external libraries for this . Is it possible to send the emails without additional third-party libraries Also would would the requirements be The application that will be using the DLL runs on Windows Server 2008 or Windows 7 or later and can run on a variety of internet types . Can this be done without an SMTP server installed Comment : stackoverflow.com questions 5926294 http : stackoverflow.com questions 5926294 how-to-send-emails-using-yahoo-or-gmail-in-c Comment : @piotru This is with an email account on a third-party site . I need to send an email without an actual account I know it s possible because I use it for a couple of my PHP sites . The reason for this is because many people are going to use it and don t want to give them access to an email account they can easily lock out from others . Comment : no . there is example how to connect to smtp server you just need to talk to it Comment : Yeah I just read that : . If the other solutions don t work I ll use this : . Thanks : . .. . Answer : one of examples :", "Question : So I ve been trying to fix a weird bug in a game-engine SDK where the Windows loading cursor is used instead of the game s own cursor . The fix for this is here : http : www.crydev.net wiki index.php Use Custom Cursor Step 1 : Fixing The Cursor Bug http : www.crydev.net wiki index.php Use Custom Cursor Step 1 3a Fixing The Cursor Bug . I have followed the fix but I keep getting these when building the game DLL : .. . .. . Yeah normally I can fix this issue quite easily by defining the class properly but it hasn t worked in this case . What can I be doing wrong The files are as they are in the guide for the fix so there isn t really any point in posting the files here since they would be a waste of space on here . If the files are really needed to investigate this issue I ll upload them if anyone requests them . Perhaps there s an error within the fix itself One possible difference from the fix to my build is that the fix is using Visual Studio 2008 I am using Visual Studio 2013 . Comment : MODCursor.cpp isn t getting compiled . Is it in the solution Comment : Yes both MODCursor.cpp MODCursor.h are in the solution . Comment : If you write some gibberish in the cpp do you get an error . I still think it isn t getting compiled . .. . Answer : Maybe try to put it all inside .h file :", "Question : I have a server application that runs on commandline but am wanting to create a GUI frontend to it to make it easier for users to interact with the server program . Since I do not have the source code of the actual main application .exe file my only option is via a server DLL this is for a gameserver - this DLL is supported by the host application . The GUI that I am thinking of will show diagnostic messages player names and stats and server memory usage . Many users are finding it much too hard to host servers using this gameserver application since they say that CLI is too difficult . Is it possible to create an interactive frontend for the CLI server application just from the DLL Or would I need to create a brand new program that somehow reads stats from the server application I have had a brief look at Google and I ve only found how to put CLI inside a GUI window and not the other way round . Just to be clear I want to spawn a second window to control the server application from I do not want to completely get rid of the CLI . Comment : I don t understand your mix of words : difficult CLI DLL gameserver.. . How CLI is related to GUI If you want to pick some information from thirdparty application - you should use API of this application . Or try to do reverse enginering of it . Could you explain what you want more exactly Comment : basically users don t want to deal command-line and want GUI . He only have the executable at hand but want to provide the underlying program functionality via a GUI interface . Comment : Is it possible to create an interactive frontend for the CLI server application just from the DLL We can t answer that that depends on what the DLL contains . .. . Answer : I think some good starting points are : .. . .. . Using Named Pipes to Connect a GUI to a Console App in Windows http : www.drdobbs.com windows using-named-pipes-to-connect-a-gui-to-a 231903148 .. . Turn a console-application into a Windows Program http : www.codeproject.com Articles 777 QuickWin-Turn-a-console-application-into-a-Windows this is based on the pipe redirection technique .. . Redirecting an arbitrary Console s Input Output http : www.codeproject.com Articles 5531 Redirecting-an-arbitrary-Console-s-Input-Output .. . .. . Other techniques are based on DDE or shared-memory but it seems they aren t applicable to your case . Comment : Exactly what I was looking for . Thanks .", "Question : I use a function that I found in this question http : stackoverflow.com questions 5252612 replace-space-with-an-underscore adapted to replace all spaces with 20 probably could be done far more efficiently : .. . .. . However when I try to use it for a string such as Local Live Test Server the output is this : .. . .. . enter image description here http : puu.sh d1fqJ f6e555e123.png .. . .. . My last question dealt with string issues and found out that string is typedef ed to point to the internal CryString type in the game SDK I am using CryEngine2 . I am now using std : : string in order to counter this . This issue is also reflected in the database I use after this conversion happens and the data is sent to the database : .. . .. . enter image description here http : i.stack.imgur.com O0s25.png .. . .. . Why can t I use 20 and perhaps other URL encoding symbols in this way and how can I get this to work I attempted to do some research on this in order to fix the issue myself but however nothing relevant came up . I have tried using it char 20 in-place of it char 20 but however this actually removes the 0 that is appearing in the string instead of replacing the spaces with 20 . Comment : You need 20 three characters not 20 one character . And since the length of that does not match the length of a simple replacement of the type you re doing now just isn t going to work . Comment : Please fix your question and the title to be clear whether you re talking about 20 or 20 you keep flipping between them . Comment : @JonathanWakely Fixed . I don t do much web programming and this shows Comment : I use a HTML POST method for getting the gameservers information to the database via a PHP script and for this reason any spaces in the variables must be replaced with 20 . Hang on. . what Comment : @LightnessRacesinOrbit Edited . .. . Answer : Because C++ language knows nothing about any URL encoding . From the point if view of C++ language your 20 is a multi-character constant that designates some implementation-defined value of type char multi-character constants is an obscure feature of C and C++ languages . If you want to or have to use 20 in your string for passing to some URL-aware recipient you will have to insert 20 as a substring three characters into your string . Your attempts to convert string literal 20 to character type will achieve nothing . It is not possible to squeeze three characters into the place of one . You will have to shift the tail portion of your string in order to provide space for three characters where one used to reside . Under the circumstances it might make more sense to generate the new result in a separate string .. . .. . Although with some careful programming it is possible to do it directly in the original string .", "Question : I use a function that I found in this question http : stackoverflow.com questions 5252612 replace-space-with-an-underscore adapted to replace all spaces with 20 probably could be done far more efficiently : .. . .. . However when I try to use it for a string such as Local Live Test Server the output is this : .. . .. . enter image description here http : puu.sh d1fqJ f6e555e123.png .. . .. . My last question dealt with string issues and found out that string is typedef ed to point to the internal CryString type in the game SDK I am using CryEngine2 . I am now using std : : string in order to counter this . This issue is also reflected in the database I use after this conversion happens and the data is sent to the database : .. . .. . enter image description here http : i.stack.imgur.com O0s25.png .. . .. . Why can t I use 20 and perhaps other URL encoding symbols in this way and how can I get this to work I attempted to do some research on this in order to fix the issue myself but however nothing relevant came up . I have tried using it char 20 in-place of it char 20 but however this actually removes the 0 that is appearing in the string instead of replacing the spaces with 20 . Comment : You need 20 three characters not 20 one character . And since the length of that does not match the length of a simple replacement of the type you re doing now just isn t going to work . Comment : Please fix your question and the title to be clear whether you re talking about 20 or 20 you keep flipping between them . Comment : @JonathanWakely Fixed . I don t do much web programming and this shows Comment : I use a HTML POST method for getting the gameservers information to the database via a PHP script and for this reason any spaces in the variables must be replaced with 20 . Hang on. . what Comment : @LightnessRacesinOrbit Edited . .. . Answer : I have tried using it char 20 in-place of it char 20 but however this actually removes the 0 that is appearing in the string instead of replacing the spaces with 20 . Please don t apply whacky PHP habits to C++ you can t just say pretend this string is a single character and expect anything sensible . 20 is an array casting it to-char takes the address of the first element which is a 32-bit or 64-bit pointer value and then truncates it to the size of a char probably 8-bits and that is going to give you garbage . is a character and 2 is a character but 20 is not a character so you cannot sensibly assign it to a char . Technically 20 is a multi-character constant with an implementation-defined value which with my compiler is 0x253230 which is clearly too large to fit into my compiler s 8-bit characters .. . .. . 2.13.3 lex.ccon says : .. . .. . An ordinary character literal that contains more than one c-char is a multicharacter literal . A multicharacterliteral or an ordinary character literal containing a single c-char not representable in the execution character set is conditionally-supported has type int and has an implementation-defined value . There are several ways to replace single characters with strings AndreyT s answer shows a nice simple approach but just trying to smash something that isn t a char into the byte of memory holding a single char is never going to work ." ] }
[ "yes-answer-long", "yes-answer-short" ]
crysis
UNK_RELATION
diffie-hellman@shared-secret@144
diffie-hellman -- diffie-hellman commonly abbreviated dh refers to a public-key cryptographic protocol used by two parties to produce a common @placeholder .
{ "confidence": [ 81.4383773803711, 79.63133239746094, 77.58409118652344, 71.5673828125, 69.90137481689453, 66.41085052490234, 66.33845520019531, 66.33845520019531, 65.34170532226562, 64.97915649414062, 61.78073501586914, 60.18840026855469, 57.78666687011719, 57.78666687011719, 57.78666687011719, 57.78666687011719, 57.78666687011719, 57.76387023925781, 57.653724670410156, 57.44963836669922, 54.93181228637695, 54.835418701171875, 53.70726013183594, 53.559906005859375, 53.184783935546875, 52.552791595458984, 52.552791595458984, 52.552791595458984, 52.50046920776367, 50.92805480957031, 49.83095169067383, 49.83095169067383, 49.83095169067383, 46.6906623840332, 46.6906623840332, 46.6906623840332, 45.71543502807617, 42.58396911621094, 38.307865142822266, 37.19469451904297, 36.24528121948242, 36.122352600097656, 36.04582214355469, 35.567955017089844, 35.494991302490234, 34.95317840576172, 34.06239318847656, 33.83837127685547, 33.661624908447266, 33.33611297607422, 33.23107147216797, 32.80998992919922, 32.42409133911133, 31.965843200683594, 31.965843200683594, 31.92035484313965, 31.740459442138672, 31.707786560058594, 31.505802154541016, 31.496356964111328, 31.454721450805664, 31.21114730834961, 31.201820373535156, 30.96114730834961, 30.930923461914062, 30.555185317993164, 30.418415069580078, 30.341449737548828, 29.976451873779297, 29.951637268066406, 29.517627716064453, 29.47172737121582, 29.47172737121582, 29.377784729003906, 29.291011810302734, 29.269025802612305, 29.106136322021484, 29.106136322021484, 29.102622985839844, 28.79087257385254, 28.588102340698242, 28.460845947265625, 28.460845947265625, 28.228073120117188, 28.035789489746094, 27.9127197265625, 27.739355087280273, 27.27582550048828, 27.27582550048828, 26.962604522705078, 26.802209854125977, 26.802209854125977, 26.761478424072266, 26.59950828552246, 26.59950828552246, 26.59950828552246, 26.59950828552246, 26.59950828552246, 26.59950828552246, 26.459394454956055 ], "content": [ "Call the CryptAcquireContext function to get a handle to the Microsoft Diffie-Hellman Cryptographic Provider .", "To import the Diffie-Hellman public-key into the CSP call the CryptImportKey function passing a pointer to the public-key BLOB in the pbData parameter the length of the BLOB in the dwDataLen parameter and the handle to the Diffie-Hellman key in the hPubKey parameter .", "At this point the imported Diffie-Hellman is of type CALG AGREEDKEY ANY .", "In Ephemeral Diffie-Hellman the key pair is generated every time .", "Create a Diffie-Hellman key by calling the CryptGenKey function to create a new key or by calling the CryptGetUserKey function to retrieve an existing key .", "The parameters p and g are completely public in Diffie-Hellman they are used to generate private information in the call to generateKeyPair .", "You re probably better off by trying the Diffie-Hellman primitives .", "Is there a workaround or a solution to allow diffie-hellman-group-exchange-sha1 to be enabled", "In my android application I would like to implement the Diffie-Hellman protocol in order to generate a common secret between two users .", "diffie-hellman-group-exchange-sha1 diffie-hellman-group14-sha1 diffie-hellman-group-exchange-sha256 .. . .. . I don t have the option of changing the SSH client so I am trying to solve the problem on the SSH server which is utilizing Twisted .", "I see that Twisted supports diffie-hellman-group-exchange-sha1 and diffie-hellman-group1-sha1 in line 221 here : https : github.com twisted twisted blob 38421d6fcffa1ddb590e51df0e1c6cba6f29d052 twisted conch ssh transport.py .. . .. . I see that diffie-hellman-group-exchange-sha1 is being disabled in line 60 here : https : github.com twisted twisted blob 38421d6fcffa1ddb590e51df0e1c6cba6f29d052 twisted conch ssh factory.py .. . .. . The diffie-hellman-group-exchange-sha1 supported but then later disabled .", "This looks like what you need.. . from : http : msdn.microsoft.com en-us library aa381969 VS.85 .aspx .. . .. . .. . .. . To import a Diffie-Hellman public-key and calculate the secret session key .. . .. . 1 .", "Modular exponentiation for Diffie-Hellman is much less likely to be hampered by additional constraints than modular exponentiation for RSA .", "I am looking for the methods in CommonCrypto to generate the shared-secret based on ECDH Elliptic curve Diffie Hellman .", "I m trying to get Elliptic Curve Diffie Hellman to work on a JavaCard version 2.2.1 .", "The OpenSSL wiki has an example at Elliptic Curve Diffie-Hellman http : wiki.openssl.org index.php Elliptic Curve Diffie Hellman .", "For me it worked after adding a list of allowed ciphers to the Tomcat configuration in conf server.xml to disable the weak Diffie-Hellman ciphers :", "I have this diffie-hellman https : en.wikipedia.org wiki Diffie E2 80 93Hellman key exchange key exchange program written in python 3 : .. . .. . What you have to do is run this program on two different computers type the same modulus and base then exchange the random keys and then the two computers have the same key .", "I believe that this is causing Server A to give a Server has a weak ephemeral Diffie-Hellman public-key error when visiting the application .", "OK-- thanks to Mike http : stackoverflow.com users 6970 mike-dimmick I was able to get Wincrypt to generate a Diffie-Hellman keypair .", "I see this note in the code prior to disabling it log.msg disabling diffie-hellman-group-exchange because we cannot find moduli file If I try to force Twisted to use diffie-hellman-group-exchange-sha1 I get the following error .", ".. . .. . If you need to modify compression then you can : .. . .. . .. . .. . I ll get this added to Crypto++ s Elliptic Curve Diffie-Hellman https : cryptopp.com wiki Elliptic Curve Diffie-Hellman wiki page so others don t have to go rummaging for it .", "here is short and good explanation how DH works and why : crypto.stackexchange.com questions 3163 http : crypto.stackexchange.com questions 3163 why-do-we-need-diffie-hellman", "Look at CommonCrypto function from CommonECCryptor.h .. . .. . CCECCryptorComputeSharedSecret CCECCryptorRef privateKey CCECCryptorRef publicKey void out size-t outLen .. . .. . It constructs a Diffie-Hellman shared-secret with a private and public ECC key .", "Here s a simpler model : .. . .. . I m planning to put 3 VM on VirtualBox - Alice Bob and an intermediate node and implement Diffie Hellman key exchange between the three .", "Can someone send a link-to the right documentation or to an example that uses CommonCrypto for generating the shared-secret based on Elliptic curve Diffie Hellman", "Update 1 .. . .. . The spec says User Agents that enforce encryption MUST expose an elliptic-curve Diffie-Hellman share on the P-256 curve .", ".. . .. . My attempt .. . .. . Looking through the test cases I can generate diffie-hellman parameters as such : .. . .. . I cannot however generate a .pem representation of these params .", "The server will receive a Diffie Hellman P256 Curve Generated in JS using var key subscription.getKey p256dh .. . .. . An example of this when converted to a .NET base64 is .. . .. . BOAiqZO6ucAzDlZKKhF1aLjNpU8+R2Pfsz4bQzNpV145D+agNxvLqyu5Q2tLalK2w31RpoDHE8Sipo0m2jiX4WA .. . .. . However I ran into issues generating the Derived Material .", "My idea is to use the Diffie Hellman protocol each user will generate a number and keep it in the localstorage then makes the calculation mod etc and sends the result to the server which will add it to the db .", "I m using OpenSSL s c library to generate an elliptic-curve Diffie-Hellman ECDH key pair following the first code sample here http : wiki.openssl.org index.php Elliptic Curve Diffie Hellman .", "Is it expected that that daemon would pass 2047-bit primes as part of the Diffie-Hellman key exchange and is there anything that can be done to get it to send 2048-bit primes instead", "I am using this site s http : www-cs-students.stanford.edu tjw jsbn ecdh.html Javascript library and OpenSSL Ruby to compute the symmetric key of Elliptic Curve Diffie Hellman .", "We got an error message that reads prime size must be multiple of 64 and can only range from 512 to 2048 and that originates from a call to DHGEX.java Diffie-Hellman Group EXchange .", "I know nothing about Diffie-Hellman group exchange besides what I ve read since I started investigating last week so maybe this is just how it works but it seems strange to me .", "I know this is a very specific question but I tried to exchange keys between php and a client using the Elliptic Curve Diffie-Hellman algorithm ECDH based on 2 libraries that seem sound : .. . .. . 1 .", "I followed exactly the same procedure with Centos 6 but I m getting this when I m trying to connect to the Server using Opera : .. . .. . Server has a weak ephemeral Diffie-Hellman public-key .. . .. . The connector is the following and there are no errors in catalina.log : .. . .. . With Firefox I get the untrusted communication error .", "I was wondering if there was and I hope there is a standard for public-key size for ECDH Elliptic Curve Diffie-Hellman and ECDSA Elliptic Curve Digital Signature Algorithm for every curve type over prime fields 192 224 256 384 and 521 .", "+1 for suggesting using DH protocol to do that .", "in this link : http : docstore.mik.ua orelly java-ent security ch13 07.htm I found the implementation of Diffie Hellman exchange but I don t undersand why it use X509EncodedKeySpec object Morover how can I modify the program to avoid the man-in-the-middle attack", "There is no workaround to the fact that DH key exchange requires moduli .", "Thus in practices DH is used for key generation but the certificate is still used to make sure we talk to the right peer identification .", "Your suggestion will solve key agreement scheme but if i am interested in key transport using DH how can i accomplish this task for a PKI", "I figured out out to export the public-key and how to import the other party s public-key .", "Is it the temporary ephemeral key used for the ECDH protocol or is it a long term static key", "DH-SHA256 and HMAC-SHA1", "However now I m trying to use this with the DH Key Exchange Algorithm .", "Now what i did to calculate shared-secret key is assigning B the public-key of A and assigning A the public-key of B .At this point the key exchange is done .", "This will also depend on the agreement between the two communicating parties .", "Before the key can be used it must be converted into a session key type .", "Each run of the protocol will produce different results .", "I don t think these mixed combinations are explicitly forbidden by the spec but section 8.2.3 describes the process of encrypting the MAC key for transport as follows : .. . .. . Does this imply that the MAC key length must be 20 bytes for session type DH-SHA1 and 32 byte for session type DH-SHA256", "I ve also posted this question to the JSCH mailing list : https : sourceforge.net p jsch mailman message 35042955 .. . .. . UPDATE : .. . .. . After further reading I believe that Diffie-Hellman s forward secrecy characteristic means that different primes often from a pre-generated set stored somewhere like etc ssl moduli would be used for each session source : https : en.wikipedia.org wiki Diffie E2 80 93Hellman key exchange Forward secrecy and that the prime used is not actually the RSA key source : http : stackoverflow.com a 23346185 1247705 so the fact that many different p values are seen no longer seems like a concern .", "To serialize the public-key : .. . .. . 1 .", "To deserialize the public-key : .. . .. . 1 .", "You can see this at Wikipedia http : en.wikipedia.org wiki Diffie E2 80 93Hellman key exchange Public Key and also in the lists of well-known groups which are recommended values for p and g given in e.g .", "Then it fetches the public-key of the first user from the remote db converts it back to PublicKey and generate the common secret .", "pkey contains the public-key private key and params generated earlier and the return-value only contains the peer s public-key .", "The secret session key is now ready to be used for encryption or decryption .", "According to the docs upon import of the other party s public-key the shared-secret has been computed .", "I can use anonymous DH", "However to actually exchange the public-key I need it as a byte or at least anything I can turn into raw data since the protocol I m using to transport the keys between the parties wont take any BouncyCastle object .", "so make dhparm.key and setting smtpd tls dh1024 param file etc postfix dhparam.key in main.cf postfix .. . .. . finally client run this command and. . .. . openssl s client -starttls smtp -crlf -connect server : port .. . .. . Then server run tcpdump to pcap and look at wireshark server key exchange has Diffie-Hellamn Server Params .", "You could use DH without certificate anonymous DH but than the connection would be open to man-in-the-middle attacks .", "I m trying to implement RC4 and DH key exchange in python .", "If you can show me how to produce X Y from a public-key and how to use them my main objective it will be great .", "I have the other party s public-key and my private key .. . 2 .", "Any idea how to plug this into the DH exchange", "Another data point : the OpenId provider at https : me.yahoo.com seems to accept association requests with session type DH-SHA1 and association type HMAC-SHA256 returning a 20 byte MAC key .", "What I tried : .. . .. . a . produce Alice public-key in php .. . .. . b . take x- and y-values from a and put in js demo page at stanford in-place of Alice fields .. . .. . c . produce from page b Bob s public point and private key .. . .. . d . re-run php in a but now reset Alice s properties to previous run I had to add some setters in Mattias Danter classes and then used Bob s public values and secret-key to reset Bob to javascript s values .. . .. . e . import keys and compare .. . .. . but php catches an error : .. . .. . searching my code I found what caused the error : it was during the calculation of the common key by Alice : .. . .. . Bob s public-key from javascript was stored in EcDH : : receivedPubPoint and generates error", "But when I m trying to implement ECDH shared key generation by importing other side public-key I m getting improper result shared key differs with other side .", "My questions : 1 Is a combination of session type DH-SHA1 and association type HMAC-SHA256 valid", "Section 6.2 of the spec states .. . .. . Does this then imply that DH-SHA1 always must be paired with HMAC-SHA1 and the same for the ...256 versions", "Given that for public-key I have only X and Y coordinates.. . - Forgive my ignorance and so I am clear.. . which public-key is it", "Once you have the Base64 encoded public-key read it into a Org.BouncyCastle.Crypto.Parameters.ECPublicKeyParameters object like so : .. . .. . STEP 2 : Read your private-key .. . .. . This would most-commonly involve reading the private key from a PFX P12 certificate .", "The node code simply generates the local public-key and the Shared secret and returns those values to me .", "The key must be converted before using the shared key in the CryptEncrypt or CryptDecrypt function .", "When the key is no longer needed destroy the key handle by calling the CryptDestroyKey function .", "So the protocol is defined for me and the other party is not giving me HCRYPTKEYs .", "Thanks for your answer I believe you are right and DH would also do the job but I managed to power two numbers using RSA implementation .", "Given that for public-key I have only X and Y coordinates .", "To answer my own question there s a different path for the private key and the public-key .", "I m using crypto++ for ECDH key agreement .. . .. . Given that for public-key I have only X and Y coordinates .", "This causes the calculation Y X mod P to be performed thus creating the shared-secret key and completing the key exchange .", "Java JCE apparently applies to DH parameters the DSA constraint on group size because it re uses its DSS parameter generation logic for DH parameters but there is no good reason to apply this constraint to externally generated received parameters .", "Solution might be a certain combination of prepend and append as the key sometimes needs more than one derivation to produce a key with the expected length .", "Update 2 .. . .. . The actual encryption key is derived from the salt randomly generated and the shared-secret agreed by the DH key exchange using the HMAC-based key derivation function HKDF described in section 3.2 of Encrypted Content-Encoding for HTTP https : tools.ietf.org html draft-thomson-http-encryption-01 section-3.2 .", "This function-call returns a handle to the new secret session key in the hKey parameter .", "Calls made to either of these functions prior to converting the key type will fail .", "Public key sizes further depend on whether the uncompressed representation or the compressed representation is used .", "This is the code that I m using to generate a DH keypair : .. . .. . without the needed try-catch of course .", "I m trying to do KeyPairGenerator bobKpairGen KeyPairGenerator.getInstance DH bobKpairGen.initialize params but those params are not compatible with the EC params you mentioned .", "Now after this key generation process i set B instance s values P and G of A instance via CryptGetKeyParam CryptSetKeyParam .. . .. . At this point B instance has it s own public and private key and shares the same P and G of A instance .", "How would get peerkey actually extract just the public-key from pkey for sending to the peer", "How would get peerkey generate a new EVP PKEY structure from the peer s raw public-key", "And I haven t found any equivalent for converting a human-readable public-key back into an EVP PKEY structure .", "Right now the code that sends the public-key tries to encode it in X9.62 encoding uncompressed as specified by the JavaCard docs .", "There is no default elliptic-curve so you should fill the parameters to both private and public-key before generating a new keypair .", "That is the a in g a is random and different for each run so the public-key A g a is different for each run .", "They will always produce different results ." ] }
{ "confidence": [ 115.72410583496094, 100.3774642944336, 98.1724624633789, 82.3067398071289, 80.20060729980469, 79.61698913574219, 78.80882263183594, 78.41604614257812, 78.13818359375, 77.53767395019531, 75.32813262939453, 72.07717895507812, 71.52294158935547, 70.67504119873047, 69.70940399169922, 68.17235565185547, 66.86660766601562, 65.50515747070312, 65.12413787841797, 65.04931640625 ], "content": [ "Question : OK-- thanks to Mike http : stackoverflow.com users 6970 mike-dimmick I was able to get Wincrypt to generate a Diffie-Hellman keypair . I figured out out to export the public-key and how to import the other party s public-key . According to the docs upon import of the other party s public-key the shared-secret has been computed . Great . I now need to get ahold of that shared-secret but I don t think its possible . Simply calling CryptExportKey with a type of PLAINTEXTKEYBLOB fails unless I call CryptSetKeyParam to change the algorithm id from CALG AGREEDKEY ANY to something.. . else . But I don t want something else I want the shared-secret . The API however seems designed to discourage this . Any ideas out there I should note that the problem here is that I m only writing one side of an implementation of WiFi Protected Setup . So the protocol is defined for me and the other party is not giving me HCRYPTKEYs . Comment : Was there ever a resolution to this Running into a similar issue.. . .. . Answer : This looks like what you need.. . from : http : msdn.microsoft.com en-us library aa381969 VS.85 .aspx .. . .. . .. . .. . To import a Diffie-Hellman public-key and calculate the secret session key .. . .. . 1 . Call the CryptAcquireContext function to get a handle to the Microsoft Diffie-Hellman Cryptographic Provider . 2 . Create a Diffie-Hellman key by calling the CryptGenKey function to create a new key or by calling the CryptGetUserKey function to retrieve an existing key . 3 . To import the Diffie-Hellman public-key into the CSP call the CryptImportKey function passing a pointer to the public-key BLOB in the pbData parameter the length of the BLOB in the dwDataLen parameter and the handle to the Diffie-Hellman key in the hPubKey parameter . This causes the calculation Y X mod P to be performed thus creating the shared-secret key and completing the key exchange . This function-call returns a handle to the new secret session key in the hKey parameter . 4 . At this point the imported Diffie-Hellman is of type CALG AGREEDKEY ANY . Before the key can be used it must be converted into a session key type . This is accomplished by calling the CryptSetKeyParam function with dwParam set to KP ALGID and with pbData set to a pointer to a ALG ID value that represents a session key such as CALG RC4 . The key must be converted before using the shared key in the CryptEncrypt or CryptDecrypt function . Calls made to either of these functions prior to converting the key type will fail . 5 . The secret session key is now ready to be used for encryption or decryption . 6 . When the key is no longer needed destroy the key handle by calling the CryptDestroyKey function . Comment : +1 @Richard Neat explanation . Your suggestion will solve key agreement scheme but if i am interested in key transport using DH how can i accomplish this task for a PKI", "Question : I have an application that is an SSH client that supports the following key algorithms for negotiation . diffie-hellman-group-exchange-sha1 diffie-hellman-group14-sha1 diffie-hellman-group-exchange-sha256 .. . .. . I don t have the option of changing the SSH client so I am trying to solve the problem on the SSH server which is utilizing Twisted . The SSH server is actually implemented in the Kippo Honeypot but the underlying problem is with Twisted . I see that Twisted supports diffie-hellman-group-exchange-sha1 and diffie-hellman-group1-sha1 in line 221 here : https : github.com twisted twisted blob 38421d6fcffa1ddb590e51df0e1c6cba6f29d052 twisted conch ssh transport.py .. . .. . I see that diffie-hellman-group-exchange-sha1 is being disabled in line 60 here : https : github.com twisted twisted blob 38421d6fcffa1ddb590e51df0e1c6cba6f29d052 twisted conch ssh factory.py .. . .. . The diffie-hellman-group-exchange-sha1 supported but then later disabled . My application s SSH client cannot negotiate a key to establish an SSH connection to the SSH server that is utilizing Twisted . I see this note in the code prior to disabling it log.msg disabling diffie-hellman-group-exchange because we cannot find moduli file If I try to force Twisted to use diffie-hellman-group-exchange-sha1 I get the following error . Is there a workaround or a solution to allow diffie-hellman-group-exchange-sha1 to be enabled .. . Answer : There is no workaround to the fact that DH key exchange requires moduli . That s how the math works . If you look in openssh compat.py you will see that the getPrimes has a parser for openssh s primes format and if you have moduli at path to moduli then twistd -n conch --data path to will parse them . You can generate these with ssh-keygen -G . You need to implement something similar on HoneyPotSSHFactory implemented here : https : github.com desaster kippo blob master kippo core ssh.py L53 .. . .. . Remember that generating moduli takes a while so you will want to do it in advance .", "Question : In Ephemeral Diffie-Hellman the key pair is generated every time . In practice does this mean I never need a certificate Or that means I need a new cert every single time Comment : here is short and good explanation how DH works and why : crypto.stackexchange.com questions 3163 http : crypto.stackexchange.com questions 3163 why-do-we-need-diffie-hellman .. . Answer : In practice does this mean I never need a certificate Or that means I need a new cert every single time It means that the generation of the key is independent of the certificate . You could use DH without certificate anonymous DH but than the connection would be open to man-in-the-middle attacks . Thus in practices DH is used for key generation but the certificate is still used to make sure we talk to the right peer identification . Comment : Thanks for your response . Does that mean if I can authenticate the user in the first place e.g . by using OAuth token . I can use anonymous DH Comment : You need an authentication method which itself is safe against man-in-the-middle attacks i.e . could be used safely without SSL . I don t think OAuth provides the necessary protection by itself . Comment : Right...thats why STS protocol come into play...still need the other party s certificate to verify the signature...um...what a shame", "Question : I am kind of new in Java Card development and I try to implement NAXOS protocol on JavaCard and my problem is to power to variables . My JavaCard version is 2.2.1 I use such code to do that : .. . .. . The output I get is .. . .. . Can you suggest any other way to power two numbers on Java Card Comment : Calls to setModulus and setExponent use invalid length maxL is 256 and the arrays have length 1 . Consider using G P x with 128 bytes -- and use a very large modulus to get correct results your G x would be modulo 5 which you probably don t want ...good luck Comment : Thank you for your response I changed the maxL variable to 1 and tried compute simple numbers i.e . 2 to power of 3 and it still doesn t work Comment : Did you try 128 byte long G P x arrays Comment : Thank you it worked I managed to sucessfully raise one number to another thanks to RSA implementation . You can post taht as an answer so I can accept that . Comment : Btw . I noticed that it doesn t work when base is different than 2 . Any suggestions .. . Answer : You re probably better off by trying the Diffie-Hellman primitives . Modular exponentiation for Diffie-Hellman is much less likely to be hampered by additional constraints than modular exponentiation for RSA . In both cases you d of course be constrained to modular-arithmetic - for obvious reasons . Comment : Thanks for your answer I believe you are right and DH would also do the job but I managed to power two numbers using RSA implementation . +1 for suggesting using DH protocol to do that . Comment : Great glad you got this solved . Be sure to share your answer too", "Question : I am looking for the methods in CommonCrypto to generate the shared-secret based on ECDH Elliptic curve Diffie Hellman . I can find proprietary implementations like this one https : github.com surespot surespot-ios blob master surespot encryption EncryptionController.mm but this one is not using CommonCrypto . The method to calculate the shared-secret is called sometimes Key Exchange and includes the calculation of the shared-secret . Can someone send a link-to the right documentation or to an example that uses CommonCrypto for generating the shared-secret based on Elliptic curve Diffie Hellman .. . Answer : Look at CommonCrypto function from CommonECCryptor.h .. . .. . CCECCryptorComputeSharedSecret CCECCryptorRef privateKey CCECCryptorRef publicKey void out size-t outLen .. . .. . It constructs a Diffie-Hellman shared-secret with a private and public ECC key . Most information they provide are in the header file s commence lines . Header of CCECCryptorComputeSharedSecret is here http : www.opensource.apple.com source CommonCrypto CommonCrypto-60061 include CommonECCryptor.h Comment : That is nice but do you have an include path import CommonCrypto CommonECCryptor.h does not work . Is this in the Security Framework Is it a public API Comment : import My answer s URL links to C C++ header . C includes headers with include . Comment : I m not so modern as you : I use old C . The test that in particular invokes this function is here http : www.opensource.apple.com source CommonCrypto CommonCrypto-60026 CCRegression CommonCrypto CommonEC.c Comment : The issue is iOS that can only use public APIs . Comment : The author of question was looking for the methods in CommonCrypto to generate the shared-secret based on ECDH . I pointed to the function . The question does not contain any restrictions App store language etc . . Author should decide if his environment allows such method .", "Question : I successfully set up two Ubuntu machines with Tomcat and SSL certificates . I followed exactly the same procedure with Centos 6 but I m getting this when I m trying to connect to the Server using Opera : .. . .. . Server has a weak ephemeral Diffie-Hellman public-key .. . .. . The connector is the following and there are no errors in catalina.log : .. . .. . With Firefox I get the untrusted communication error . .. . Answer : Add this into the server.xml file and restart the server .. . .. . Try to browse with https : localhost : 8443", "Question : null .. . Answer : I have this diffie-hellman https : en.wikipedia.org wiki Diffie E2 80 93Hellman key exchange key exchange program written in python 3 : .. . .. . What you have to do is run this program on two different computers type the same modulus and base then exchange the random keys and then the two computers have the same key . It takes quite some time even on an Asus ROG Gaming laptop just for one key exchange . How can I run all the math on the GPU or with hardware accelerator so that I can use more secure keys and it doesn t take forever try to avoid 3rd party modules but you can use them if there is no other option . Comment : This calculation would not be faster on a GPU .", "Question : null .. . Answer : In my android application I would like to implement the Diffie-Hellman protocol in order to generate a common secret between two users . What I do is the following : when the first user sends a friendship request to the second one the app generates a key pair storing the public one in a remote database and the private in a local database . Here is the code for this first part : .. . .. . The generateKeys method is the following : .. . .. . When the second user accepts the request another key pair is generated once again storing the private key in the local db and the public in the remote . Then it fetches the public-key of the first user from the remote db converts it back to PublicKey and generate the common secret . Here is the code for the second part : .. . .. . The stringToPublicKey is the following : .. . .. . And the generataCommonSecret : .. . .. . Also when storing the keys I convert them into String with the following : .. . .. . When executing the following line in generateCommonSecret .. . .. . I get this exception .. . .. . Can someone help me finding the problem What is weird is that if I try to do this in a single java class without storing and retrieving keys it works fine .", "Question : I successfully set up two Ubuntu machines with Tomcat and SSL certificates . I followed exactly the same procedure with Centos 6 but I m getting this when I m trying to connect to the Server using Opera : .. . .. . Server has a weak ephemeral Diffie-Hellman public-key .. . .. . The connector is the following and there are no errors in catalina.log : .. . .. . With Firefox I get the untrusted communication error . .. . Answer : For me It was the issue of java version being used by tomcat . I changed the version from JDK 6 to JDK 1.7 080 and the error vanished . When I said I changed the JAVA version I meant I modified the environment variable JAVA HOME .", "Question : I m trying to make use of elliptic-curve crypto . I need two implementations of the same thing one in Java and one in C . I m testing them using two key pairs which were generated using the curve secp256k1 . When I generate the derived secret in Java I always get a different number from what I get from OpenSSL . Java code : .. . .. . C code .. . .. . I m sure that the keys are valid and that they are the same both in C and in Java code but I don t understand why the derived secret is different . Am I missing something Thanks Comment : When I generate the derived secret in Java I always get a different number from what I get from OpenSSL . - what precisely do you mean Does each execution of the protocol result in different secrets Or is it the case that an execution of the protocol between an OpenSSL client and BC client does not arrive at a shared-secret .. . Answer : This code looks like its missing a few steps . For example EVP PKEY paramgen init is not present . The OpenSSL wiki has an example at Elliptic Curve Diffie-Hellman http : wiki.openssl.org index.php Elliptic Curve Diffie Hellman . I m going to copy-paste it below to avoid the link-only answer but I believe its the work of Matt Caswell . .. . .. . When I generate the derived secret in Java I always get a different number from what I get from OpenSSL . Each run of the protocol will produce different results . That s because each party picks a random value for each run of the protocol . That is the a in g a is random and different for each run so the public-key A g a is different for each run . If everything is working correctly you ll never see the parties use the same values or one party to reuse a past value . Independent executions will never produce the same result . It does not matter if its OpenSSL OpenSSL OpenSSL Java or Java Java . They will always produce different results .", "Question : null .. . Answer : I m trying to get Elliptic Curve Diffie Hellman to work on a JavaCard version 2.2.1 . On the JavaCard I have the following code right now : .. . .. . And I initialize dh as follows : .. . .. . All of this seems to work except for the dh.generateSecret call where the applet simply seems to crash . If I leave the call out and return other data that works nicely . In which I import the data that is sent by the terminal . In the terminal I have the following : .. . .. . I have tried several things . Right now the code that sends the public-key tries to encode it in X9.62 encoding uncompressed as specified by the JavaCard docs . However I ve also tried the default encode method which gives exactly the same result . I don t seem to be able to get any error out of the JavaCard about what is going wrong . Does anyone know what is going wrong Or does anyone have a working example on how to do a key-exchange on a JavaCard Comment : Do you have any APDU logs Comment : Just a few notes : KeyPair.ALG EC FP KeyBuilder.LENGTH EC F2M 163 - algorithm and length do not match . Do you specify elliptic-curve domain parameters somewhere in your code There is no default elliptic-curve so you should fill the parameters to both private and public-key before generating a new keypair .", "Question : null .. . Answer : What is the M2Crypto equivalent of this openssl cli command .. . .. . My attempt .. . .. . Looking through the test cases I can generate diffie-hellman parameters as such : .. . .. . I cannot however generate a .pem representation of these params . There doesn t appear to be a method to do so on the DH object : .. . .. . print params looks promising but it s not what I m looking for : .. . .. . .. . .. . Related functionality .. . .. . To prove that I m not insane the RSA module has what I need to make .pem files like so : .. . .. . .. . .. . Version info Comment : After some research this doesn t seem possible . I have created a pull request that fixes my issue : github.com martinpaljak M2Crypto pull 53 https : github.com martinpaljak M2Crypto pull 53 I don t know what the proper SO etiquette is for this situation .", "Question : This is the code that I m using to generate a DH keypair : .. . .. . without the needed try-catch of course . I ve done some tests running such code iteratively and varying the key size in particular ramping up from 128 with a 128 step up to 1024 . 1024 would be the desired size . First of all running each size generation 10 times to have some minimal std deviation on the results gives HIGH fluctuation of results on average anyway the time needed for creating the keys 1024 bit is : 683027ms which rounds up to around 11 minutes for creating a key . The questions are : .. . .. . 1 . Is anyone else getting the same results 2 . Is there some optimization to be run in order to achieve lower times 3 . What is the high fluctuation dependent of i.e . for generating a 1024bit key it can take from 18 seconds to 30 minutes.. . .. . .. . Tests have been run on a Nexus-One phone .. . .. . Thanks in advance for shedding some light on the issue .. . .. . Regards .. . Answer : I did some further coding research and apparently the call that s the most time battery consuming is : .. . .. . In particular though since for DH the parameters g p l can be pre-computed and hard-coded it s a wise suggestion to do so beforehand and use the generated values to generate the key pair which will be almost instantaneous . Example code : .. . .. . Where p g and l are : .. . .. . And X and Y can be generated offline with : Comment : If you generate keys like this It wont make your data any more secure than plain text . Comment : I know its a bit late but one downvote from me for the reason Behrooz pointed out . The randomness is crucial for security re-use is not an option if you want to be secure . The actual issue with the timing may point to some issue with how your Android device collects entropy it sounds like an issue with the platform to me . Comment : I think the previous two comments are incorrect . The parameters p and g are completely public in Diffie-Hellman they are used to generate private information in the call to generateKeyPair . You can see this at Wikipedia http : en.wikipedia.org wiki Diffie E2 80 93Hellman key exchange Public Key and also in the lists of well-known groups which are recommended values for p and g given in e.g . RFC2539 http : tools.ietf.org html rfc2539 appendix-A and RFC3526 http : tools.ietf.org html rfc3526 .", "Question : I successfully set up two Ubuntu machines with Tomcat and SSL certificates . I followed exactly the same procedure with Centos 6 but I m getting this when I m trying to connect to the Server using Opera : .. . .. . Server has a weak ephemeral Diffie-Hellman public-key .. . .. . The connector is the following and there are no errors in catalina.log : .. . .. . With Firefox I get the untrusted communication error . .. . Answer : For me it worked after adding a list of allowed ciphers to the Tomcat configuration in conf server.xml to disable the weak Diffie-Hellman ciphers : Comment : Do we know if this list is definitive Where how do we conform that list for each version of Tomcat Comment : I did not find one and it is likely hard to provide a generic list as some ciphers are deemed save by some and unsafe by others . So it largely depends on yourenvironment if you control the client you can even narrow it down to only one that you would like to use . Comment : here are some further links that explain this with some more detail blog.eveoh.nl 2014 02 tls-ssl-ciphers-pfs-tomcat https : blog.eveoh.nl 2014 02 tls-ssl-ciphers-pfs-tomcat devtidbits.com 2015 05 13 http : devtidbits.com 2015 05 13 secure-and-harden-apache-tomcats-ssltls security.stackexchange.com questions 89689 http : security.stackexchange.com questions 89689 what-is-logjam-and-how-do-i-prevent-it Comment : For all them poor bastards running Tomcat 5.5 Java 6 : APR connector is a way to do it Comment : Fantastic . I was following tutorials to get an existing wildcard cert running on a new Tomcat instance and this was the last hurdle . Thanks", "Question : I know this is a very specific question but I tried to exchange keys between php and a client using the Elliptic Curve Diffie-Hellman algorithm ECDH based on 2 libraries that seem sound : .. . .. . 1 . https : github.com mdanter phpecc for the php part and .. . .. . 2 . http : www-cs-students.stanford.edu tjw jsbn ecdh.html for the js part . It seems that the parameters as can be seen at the second demo just aren t right for the Mattias Danter library in 1 What I tried : .. . .. . a . produce Alice public-key in php .. . .. . b . take x- and y-values from a and put in js demo page at stanford in-place of Alice fields .. . .. . c . produce from page b Bob s public point and private key .. . .. . d . re-run php in a but now reset Alice s properties to previous run I had to add some setters in Mattias Danter classes and then used Bob s public values and secret-key to reset Bob to javascript s values .. . .. . e . import keys and compare .. . .. . but php catches an error : .. . .. . searching my code I found what caused the error : it was during the calculation of the common key by Alice : .. . .. . Bob s public-key from javascript was stored in EcDH : : receivedPubPoint and generates error Here is object Alice with some identation EcDH class : .. . .. . My opinion is that the javascript public values are not correct due to the way fields under Elliptic Curve parameters are implemented in http : www-cs-students.stanford.edu tjw jsbn ecdh.html . By searching more I found that this js blocks of Stanford s code are problematic compared with the php version : .. . .. . Are there any suggestions .. . .. . Thanks . .. . Answer : You should make sure that JS and PHP libraries use the same curve . Do they Comment : As it seems certainly not How can I correct this though", "Question : I have 2 seemingly identical glassfish installations installed using the same installer same OS - SLES 11 SP2 - with the same installed packages and updates same JRE JDK same web-applications deployed in the same way similar keystores - different PKs same method of getting signing etc . however the two installations have 2 different sets of available ciphersuites . I believe that this is causing Server A to give a Server has a weak ephemeral Diffie-Hellman public-key error when visiting the application . Server A : .. . .. . Server B : .. . .. . What could be causing this difference in available ciphersuites .. . Answer : It turns out that asenv.conf glassfish installation config asenv.conf was defining AS JAVA .. . and glassfish was using this instead of the version of java defined in the path and JAVA HOME . Pointing AS JAVA to the correct jre solved the issue .", "Question : I m using crypto++ for ECDH key agreement .. . .. . Given that for public-key I have only X and Y coordinates . How to generate publicKey from this values Thanks in advance Comment : Given that for public-key I have only X and Y coordinates.. . - Forgive my ignorance and so I am clear.. . which public-key is it Is it the temporary ephemeral key used for the ECDH protocol or is it a long term static key Comment : ephemeral one at each key establishment i send X Y coordinate to this function to generate a new session key Comment : If you can show me how to produce X Y from a public-key and how to use them my main objective it will be great . Thanks .. . Answer : Given that for public-key I have only X and Y coordinates . How to generate publicKey from this values ECDH.Agree key privateKey getPublicKey X Y .. . .. . x y is a point on the curve but its never been easy to work with it directly . This is all we really want to do but it does not work . The problem is ECDH : : Domain are only domain parameters . The public point and the private exponent are layered on top . To further complicate matters the keys produced by the ECDH protocol are temporary or ephemeral . They are not meant to be persisted rather they are meant to be used once and discarded . So Crypto++ does not make it easy to persist them by say providing a DEREncode . Analysis .. . .. . To use the x y coordinate we need to figure out how the library is using it . The ephemeral public and private keys are created in pubkey.h http : www.cryptopp.com docs ref pubkey 8h source.html l01380 around line 1380 . The code for them is below : .. . .. . The line of interest above is the params.EncodeElement true y publicKey . To see what s going on there we need to look at eccrypto.h http : www.cryptopp.com docs ref eccrypto 8h source.html l00061 around line 70 and note that reversible is true : .. . .. . params.EncodeElement calls ECP : : EncodePoint . To see what that does we can examine ecp.cpp http : www.cryptopp.com docs ref ecp 8cpp source.html l00118 around line 120 . The routine writes a uncompressed point but blocks x and y on the maximum size of the public element which should be the field size or the subgroup order . Don t worry too much about the BufferedTransformation . There are ways to turn a byte into one and it happened before the code shown above . If you trace the code you will see its transformed via an ArraySource : .. . .. . Above as is a BufferedTransformation that wraps the byte you passed into the function . The final open question is the maximum size of the field element . That appears to be the modulus size less one in bytes : .. . .. . Agreement .. . .. . Given the above information here s what you should do . You need to supply the values for x and y in ECP : : Point q x y . They are just Crypto++ Integers . Then you can call : .. . .. . One note : params.GetEncodedElementSize true should equal PublicEphemeralKeyLength . If they are not equal then something is wrong . .. . .. . If you need to modify compression then you can : .. . .. . .. . .. . I ll get this added to Crypto++ s Elliptic Curve Diffie-Hellman https : cryptopp.com wiki Elliptic Curve Diffie-Hellman wiki page so others don t have to go rummaging for it . Comment : good and clear answer thank you so much Comment : I take benefit from your knowledge and ask you when I use GenerateKeyPair how to get X Y coordinates from generated public-key Comment : @Singa - Ask a new question . I don t mind answering them but we should keep the Questions Answers targeted and focused .", "Question : null .. . Answer : I m using JSCH 0.1.53 to connect to a remote SSH server which uses a 1024-bit RSA key . We are able to connect successfully to the remote-server when we also use a 1024-bit RSA key but when we generated stronger 2048-bit keys we stopped being able to connect . We got an error message that reads prime size must be multiple of 64 and can only range from 512 to 2048 and that originates from a call to DHGEX.java Diffie-Hellman Group EXchange . We re running Java 1.8 and the error message correctly specifies a max bit size of 2048 so the problem is not the JCE key limitation of 1024 bits in Java 1.6 and 1.7 . And we ve confirmed that both our private and our public-key are in fact 2048 bits via openssl rsa -text -noout -in id rsa and ssh-keygen -lf id rsa.pub . Since everything looked fine on our end I started adding debugging lines to the JSCH code and recompiling the JAR and I was eventually able to determine that the modulus being passed to us during the key exchange was in fact 2047 bits long . Now 2047 bits in length doesn t inherently mean that you didn t generate a 2048-bit key or that it s any less strong than a key that actually contains 2048 bits it just means that you happened to get two primes that multiplied together to something whose first bit was a 0 . So it s expected behavior some of the time and the JCE check should probably be n 64 0 n 64 63 . But JCE is a stickler on the point so it rejects this key for not being of a length it considers valid . Based on that I thought I d found the problem : the remote-server had generated a 2048-bit key that only contained 2047 bits so they just needed to generate a new one and keep doing it till they got one that really was 2048 bits . But when I asked their administrators about it they were insistent that they were using a 1024-bit key and indeed that s what you get in the known hosts-file when you SSH over . So that doesn t appear to be the cause after all . So I started logging the contents of the buffer that contained what they sent us and pulling out the p and g values modulus and group and I discovered that in just a few short periods of testing over a couple of days there were 33 different modulus values and all of them differed by only the last few characters when encoded in either base 64 or base 10 . Modulii values were reused sometimes only once and sometimes a dozen times but there were lots of distinct values so the keys are neither generated for one-time use nor generated once and reused forever . Is this having the server send many different keys that are very close numerically with some reuse but many unique values expected behavior under any conditions and especially is this expected behavior when the client uses a 2048-bit key but the server uses a 1024-bit key I know nothing about Diffie-Hellman group exchange besides what I ve read since I started investigating last week so maybe this is just how it works but it seems strange to me . Also does the SSH standard specify anything about how keys should be generated in cases like these I haven t yet found out what SSH server the far side is using I suspect OpenSSH but don t know for sure and don t know what version but I m hopeful that there might be some standard that forces the use of keys that are of the same size as was requested between 1 n-1 and 1 n - 1 and that the remote-server might have an option to force this or that I can submit a bug against them to get them to change the behavior . I ll probably also submit a bug against the JDK to allow keys of n-1 bits with 0-padding for the first bit . Any guidance that anyone can give would be greatly appreciated . I ve also posted this question to the JSCH mailing list : https : sourceforge.net p jsch mailman message 35042955 .. . .. . UPDATE : .. . .. . After further reading I believe that Diffie-Hellman s forward secrecy characteristic means that different primes often from a pre-generated set stored somewhere like etc ssl moduli would be used for each session source : https : en.wikipedia.org wiki Diffie E2 80 93Hellman key exchange Forward secrecy and that the prime used is not actually the RSA key source : http : stackoverflow.com a 23346185 1247705 so the fact that many different p values are seen no longer seems like a concern . I m still surprised that they re so close in value but maybe that s expected as well . The far side is using Solaris SSH 1.1.4 which as I understand it is based on OpenSSH as the SSH daemon . Is it expected that that daemon would pass 2047-bit primes as part of the Diffie-Hellman key exchange and is there anything that can be done to get it to send 2048-bit primes instead Comment : Do you have the Unlimited Strength Policy for Java 8 http : www.oracle.com technetwork java javase downloads jce8-download-2133166.html files installed Comment : I don t and I haven t seen anything that makes me believe that s necessary . Using a JUnit test I m able to run the code that throws the exception populating p and g on a com.jcraft.jsch.jce.DH object and then calling getE on it using our 2048-bit key and it runs without issue but it fails when I run with a 2047-bit key received from the remote-server . If the Unlimited Strength Policy was needed I would expect that call to fail for our 2048-bit key . But if you have information that indicates that it would help in my specific scenario please share . Comment : As you updated DHgex modulus a prime has nothing to do with any RSA modulus a product of two primes . Java JCE apparently applies to DH parameters the DSA constraint on group size because it re uses its DSS parameter generation logic for DH parameters but there is no good reason to apply this constraint to externally generated received parameters . OpenSSH sshd does definitely use DHgex moduli from a file if generated with ssh-keygen that file does include a bunch of primes from a limited range high bits the same and unexplainedly one bit smaller than specified... . Comment : .. . As a workaround at least temporarily could you specify negotiation of only grp14 or grp1 although some people now consider 1024 bits in grp1 too small Those should be acceptable to both unfixed Java and OpenSSH . And you re right JCE unlimited policy is irrelevant to this . Comment : That s good info thank you . I ll try working around the problem by limiting which key exchange algorithms I use and I ll see what comes out of my email to the JSCH users mailing list . Maybe JSCH can implement the relevant parts without using the JCE code that s re-using the DSA constraint . Or maybe the right solution is a bug fix in the JRE itself I ll have to see whether the JSCH list thinks that the fix should be theirs or the JRE s to do . i.e . is the JRE wrong or is JSCH using it wrong", "Question : null .. . Answer : in this link : http : docstore.mik.ua orelly java-ent security ch13 07.htm I found the implementation of Diffie Hellman exchange but I don t undersand why it use X509EncodedKeySpec object Morover how can I modify the program to avoid the man-in-the-middle attack Thanks . Comment : Add digital signatures . Comment : How can i do this However in the program uses X509EncodedKeySpec object for certification .", "Question : I successfully set up two Ubuntu machines with Tomcat and SSL certificates . I followed exactly the same procedure with Centos 6 but I m getting this when I m trying to connect to the Server using Opera : .. . .. . Server has a weak ephemeral Diffie-Hellman public-key .. . .. . The connector is the following and there are no errors in catalina.log : .. . .. . With Firefox I get the untrusted communication error . .. . Answer : It works with Google Chrome ver.44 and Thanks to Jason Scroggins for suggesting : .. . .. . 1 . In a new tab type or paste about : config in the address-bar and press Enter . Click the button promising to be careful . 2 . In the search-box above the list type or paste dhe and pause while the list is filtered . 3 . Double-click the security.ssl3.dhe rsa aes 128 sha preference to switch it from true to false disable Firefox from using this cipher . 4 . Double-click the security.ssl3.dhe rsa aes 256 sha preference to switch it from true to false disable Firefox from using this cipher . Comment : Please don t add thank you as an answer . Once you have sufficient reputation http : stackoverflow.com help whats-reputation you will be able to vote up questions and answers http : stackoverflow.com help privileges vote-up that you found helpful ." ] }
[ "yes-answer-long", "yes-answer-short" ]
shared-secret
UNK_RELATION
xmlrpclib@standard-library@38
xmlrpclib -- xmlrpclib is the python @placeholder module for transparently handling xml remote procedure call .
{ "confidence": [ 49.33964538574219, 47.165321350097656, 46.14632797241211, 44.811424255371094, 43.47152328491211, 42.31583023071289, 42.00403594970703, 41.28497314453125, 41.126434326171875, 41.03630828857422, 40.297359466552734, 39.421993255615234, 38.83628845214844, 38.83628845214844, 38.59170913696289, 38.59170913696289, 38.59170913696289, 37.94381332397461, 37.82573318481445, 37.538169860839844, 37.538169860839844, 37.538169860839844, 37.2703857421875, 36.973304748535156, 35.80220031738281, 35.73810577392578, 35.377044677734375, 35.377044677734375, 35.08948516845703, 34.667877197265625, 34.41849899291992, 34.41849899291992, 33.16615676879883, 33.16615676879883, 33.16615676879883, 32.0523681640625, 31.674619674682617, 31.674619674682617, 30.71746826171875, 30.71746826171875, 30.71746826171875, 30.71746826171875, 30.314395904541016, 30.298534393310547, 30.10871696472168, 29.602405548095703, 29.587013244628906, 29.042842864990234, 28.062271118164062, 27.865707397460938, 27.252927780151367, 27.120319366455078, 26.442407608032227, 25.97475242614746, 25.80809783935547, 23.105728149414062, 21.313220977783203, 20.830913543701172, 19.89077377319336, 19.60944366455078, 19.513824462890625, 19.270864486694336, 19.25043487548828, 19.233051300048828, 19.09768295288086, 19.060523986816406, 19.060523986816406, 18.97574234008789, 18.672998428344727, 18.56722068786621, 18.371070861816406, 18.337671279907227, 17.99561309814453, 17.814327239990234, 17.675952911376953, 17.59197235107422, 17.504039764404297, 17.48118782043457, 17.47552490234375, 17.41048812866211, 17.280471801757812, 17.22388458251953, 17.055355072021484, 16.999774932861328, 16.999774932861328, 16.82331657409668, 16.740873336791992, 16.670427322387695, 16.584806442260742, 16.390254974365234, 16.316722869873047, 16.316722869873047, 16.316722869873047, 16.316722869873047, 16.316722869873047, 16.17662811279297, 16.16668701171875, 16.16668701171875, 16.047439575195312, 15.952054023742676 ], "content": [ "stackoverflow.com questions 32134362 python-install-xmlrpclib http : stackoverflow.com questions 32134362 python-install-xmlrpclib stackoverflow.com questions 25676943 http : stackoverflow.com questions 25676943 how-to-install-xmlrpclib-in-python-3-4", "Using xmlrpclib .", "If yes how can I do it in python and xmlrpclib", "xmlrpclib is part of the standard-library in Python 2.x .", "I run xmlrpclib with verbose 1 mode and the XML is the same .", "My issue : I m trying to use this webservice with Python 2 with xmlrpclib module : .. . .. . And I have a protocol error-code 405 .", "In particular I am looking for interface of xmlrpc implemented using xmlrpclib in python .", "Is it possible to use python s standard libs xmlrpclib with gevent", "When I am trying to install xmlrpclib I am getting following error in python version 3.4 .. . .. . Downloading unpacking xmlrpclib Could not find any downloads that satisfy the requirement xmlrpclib Some externally hosted files were ignored use --allow-external xmlrpclib to allow .", "Cleaning up.. . No distributions at all found for xmlrpclib Storing debug log for failure in home shiva .pip pip.log .. . .. . How to install xmlrpclib in python-3.4", "I am using a Python script which uses xmlrpclib : .. . .. . I want to make a similar XML-RPC call using Ruby .", "I m working with Python using the standard xmlrpclib library communicating between a JavaServer that host xmlrpc server and my python client .", "So xmlrpclib just can t have this functionality .", "I am using openerp webservice using xmlrpclib .", "I am using xmlrpclib to interactively remote control some lab equipment with IPython .", "First it makes changes to local database then makes changes on remote using xmlrpclib with erppeek wrapper .", "I have a xmlrpclib server that provides a remote storage functionality with the conventional put key-value and get key interfaces exposed .", "There is no option for this in module xmlrpclib but you can create your own by modifying the original version .", "I try to print invoice based on Webkit model with xmlrpclib .", "This is the real answer to the question : .. . .. . Python 3.4 brings the library xmlrpc which replaces old xmlrpclib .", "When I run from python interpreter series of commands with xmlrpclib as a client everything works Python2.7 .", "I know that the instance are impossible to manage by xmlrpclib library in Python but this is what I need .", "xmlrpclib requires that the url passed start with http or https .", "And here s a question http : stackoverflow.com questions 4065079 using-gevent-with-python-xmlrpclib about how to use XMLRPC in python with gevent .", "I need to change headers in my transport client like in this example How to send custom http-headers for RPC calls using python xmlrpclib", "I m new to XMLRPC but I need to use it xmlrpclib in Python 2.7 to communicate with a server www.neos-server.org which accepts xml files .", "I know that I can do it with twisted but is it possible to do it with standard xmlrpclib", "First of all it must be implemented on server-side not in client xmlrpclib .", "How can I send custom HTTP Headers using python xmlrpclib library", "http : stackoverflow.com questions 4624085 how-to-send-custom-http-headers-for-rpc-calls-using-python-xmlrpclib But I want to call putheader method without need to reload my server with new Transport instance .", "What I mean by chain is the following : .. . .. . I have a client script which uses xmlrpclib to call a function on a SimpleXMLRPCServer .", "Yes you can call function using xmlrpclib . .. . .. . try this .. . .. . Hope this will help you .", "I love IPython s autocompletion features and I would also like to have it via xmlrpclib .", "I use my own class X that has api attribute which is ServerProxy from xmlrpclib .", "But I don t know how to develop or implement something within the xmlrpclib in order to avoid the marshalling problem .", "I m using python s xmlrpclib library and didn t intentionally set buffer to 1 char .", "For example : .. . .. . For more details you can read the official Python documentation of xmlrpclib https : docs.python.org 2 library xmlrpclib.html datetime-objects .", "Messages exchanged between a client and a server using the xmlrpclib using Python 2.6.x creates a type of instance on server-side instead of type datetime .", "To solve the cannot marshal type datetime.date objects error first convert the date into ISO 8601 format and then pass it as an object to xmlrpclib .", "Or if the data gets large you may have more luck wrapping it as an xmlrpclib Binary object and passing that .", "This controller is outside so I had to use openerplib xmlrpclib is also valid to get data from the models .", "I m working on an application in which a server and client are being created the ServerAPI is using SimpleXMLRPCServer and the ClientAPI is using xmlrpclib .", "I tried to execute the following code but xmlrpclib is raising an exception : .. . .. . If I replace int by int int the error is the same but with int 0 int no exception is raised .", "So if you have installed Python 3.4 on Windows and you want to use xmlrpclib probably as a client-side don t write anymore this : .. . .. . Replace that with this line : .. . .. . And replace every match of xmlrpc in the rest of your code with client .", "Well I need to retract some of that I developed my implementation to xmlrpclib circa Python 2.4 and 2.7 has changed things .", "I have an XMLRPC server written in Python using xmlrpclib that has the following method defined : .. . .. . If I m using a Python client to connect and send the file everything works ok file is transferred : .. . .. . But.. .", "I am trying to use a custom Transport class with xmlrpclib in Python but when I specify a custom Transport I do get an exception at the first call : .. . .. . Sample code : .. . .. . The original connection is made but the first call to RPC method will fail with the above error .", "I used python xmlrpc to call the function on remote xmlrpc server .", "For XML-RPC there is following code : http : twistedmatrix.com documents 13.0.0 web howto xmlrpc.html A simple example : .. . .. . Benchmarking : .. . .. . Straight use of xmlrpclib for comparison : .. . .. . Benchmarking : .. . .. . Much worse .", "I ve tried googling but I can t get a clear sense of what changes I need to make to xmlrpclib so that I can make these calls asynchronous .", "1.Yes it will block tornado since xmlrpclib uses blocking python sockets as it is .. . .. . 2.Not that I m aware of but I ll provide a solution where you can keep xmlrpclib but have it async .. . .. . 3.My solution doesn t use tornado gen . .. . .. . Ok so one useful library to have at mind whenever you re doing networking and need to write async code is gevent it s a really good high quality library that I would recommend to everyone .", "Thanks for getting back I ve worked it out : from xmlrpclib import ServerProxy url username : password@server : port xplrpc quot https : username : password@server : port xplrpc quot s ServerProxy url print s.ContentAPI.queryResult 1376", "What is the preferred way to call decorated functions using XML RPC in python .", "I need to make asynchronous XML-RPC client call to a Cobbler server in Tornado for example something like this : .. . .. . Right now I am using xmlrpclib which does not seem to make async client calls so it ends up blocking Tornado or so I hear .", "I am not able to use this as I am getting an exception af the first method call see stackoverflow.com questions 17569519 http : stackoverflow.com questions 17569519 unable-to-use-custom-transport-class-with-python-xmlrpclib-due-to-typeerror-unb", "Here s an updated example for using xmlrpclib to talk to supervisor : .. . .. . As has already been mentioned we have to specify a dummy url with http : or https : and then specify a custom transport to handle the domain socket", "We found the cause for the problem : In python-2.6 a TCP connection is created on every XML RPC method call .", "I built an xml-rpc server in Python using SimpleXMLRPCServer according to the example in the Python documentation .", "But if something goes wrong on remote then local database changes are committed but remote is not .", "python-multiprocessing https : docs.python.org 2 library multiprocessing.html .. . .. . Is the built-in python-module for running stuff in parallel .", "Is there a way to invoke XML-RPC methods by name as strings in Python", "I have a system where the code sits on a driver accessing a remote system .", "When I run it as ansible module 2 out of 3 commands work however the last one with more complicated XML co-incidence", "In particular id like to register the os module .", "On the client-side I have a custom class that abstracts this service and exposes a python dictionary type interface lets call it remote HT .", "I need to run a daemon process from a python django module which will be running an xmlrpc server .", "commands.py is already used by python meaning I was importing the wrong module all along .", "Basically the idea is that a remote client client.py can call tasks via xmlrpc.client to the server server.py which includes functions registered as Celery tasks runnable.py .", "So i m guessing it might be related to the TCL vs . Python different ways of handling binary-data .", "I am running ejabberd and ejabberd xmlrpc module - https : www.ejabberd.im ejabberd xmlrpc In the link I can see python php and xmlrpc client module with access-control .", "The multiprocessing module is designed as a drop-in replacement for the threading module .", "It send a good xml response .", "It works if I run python via python2.7 command so :", "Haven t used the library but the documentation says that you can pass a parameter indicating the number of posts you want : python-wordpress-xmlrpc.readthedocs.org en latest ref https : python-wordpress-xmlrpc.readthedocs.org en latest ref methods.html highlight get 20post module-wordpress xmlrpc.methods.posts", "I tend to think that python inspect module https : docs.python.org 2 library inspect.html classes-and-functions can help it provides the basics you can use for your desired features", "If it goes without any issues on remote then it synchronizes on both sides .", "Is this behaviour a bug from the Python implementation", "One approach would be to iterate over the methods in the module and register each of them with register instance .", "I m using XML-RPC server on slow connection so I would like to call few functions at once because each call costs me 700ms .", "The general idea is : .. . .. . Begin your local and remote changes .. . Do the required work on each .. . On the remote side PREPARE TRANSACTION and take note of the returned ID in persistent-storage .. . On the local side COMMIT the changes .. . On the remote side COMMIT PREPARED with the returned ID or if the local commit failed for some reason ROLLBACK PREPARED instead .", "I have installed Python 3.4 in C : Python34 and I have my Python script in E : solidworks xmlrpc .", "XML RPC is not self-describing .", "The python-daemon library is designed to daemonize the currently running Python process .", "And i need some python sample code of translation .", "I m trying to workout how to use org.apache.xmlrpc.client.XmlRpcClient in python .", "It does not like the XML string tag .", "Let s assume that my code looks like that : .. . .. . Now let s assume that I have many clients calls so are there many listing processes of XML-RPC server or clients requests are queued one request must be ended to serve another .. . .. . Is there a possibility to deal with multicall client requests using Python XML-RPC server", "The WP API has docs http : codex.wordpress.org XML-RPC WordPress API for all of this .", "The xml-rpc protocol can use any character XML allows you to use .", "I m creating a python web interface .", "I got this simple xmlrpc server script written in python .", "I want to pass some data using Python RPC .", "I am using python wordpress xmlrpc library for extracting wordpress blog data .", "This is one of my first projects in Python and I am encountering this issue .", "Providing a parameter source address to HTTPConnection is supported by httplib not before Python version 2.7 .", "For example using this SimpleXMLRPCServer example as a starting point http : pymotw.com 2 SimpleXMLRPCServer and this Stackoverflow answer for iterating over functions in a module http : stackoverflow.com a 21885920 4486839 : .. . .. . Server .. . .. . Client", "My connect URI is : .. . .. . I m running Python 2.7 x64 on Windows 7 but it works the same for 32-bit Python 2.7 .", "http : bugs.python.org issue6907 .. . .. . Strangely this code does not crash for me on python-2.6 2.7 on OSX or on python-2.6 under linux .", "According to the documentation https : python-wordpress-xmlrpc.readthedocs.org en latest ref methods.html highlight get 20post module-wordpress xmlrpc.methods.posts you can pass a parameter indicating how many posts you want to retrieve as : .. . .. . client.call GetPosts number : 100 .. . .. . Alternatively if you want to get all the posts check this out : https : python-wordpress-xmlrpc.readthedocs.org en latest examples posts.html result-paging", "I have seen two libraries the standard python-multiprocessing and another python-daemon https : pypi.python.org pypi python-daemon 1.6 but not quite understanding which would be effective in my case ." ] }
{ "confidence": [ 57.60639572143555, 57.35055923461914, 54.43731689453125, 52.75722122192383, 52.6721076965332, 50.417049407958984, 49.098876953125, 48.759666442871094, 48.630889892578125, 47.781551361083984, 47.151039123535156, 46.6569709777832, 46.1746940612793, 45.990997314453125, 45.98575210571289, 45.71479415893555, 45.48186492919922, 44.98223876953125, 44.23542785644531, 43.98976516723633 ], "content": [ "Question : When I am trying to install xmlrpclib I am getting following error in python version 3.4 .. . .. . Downloading unpacking xmlrpclib Could not find any downloads that satisfy the requirement xmlrpclib Some externally hosted files were ignored use --allow-external xmlrpclib to allow . Cleaning up.. . No distributions at all found for xmlrpclib Storing debug log for failure in home shiva .pip pip.log .. . .. . How to install xmlrpclib in python-3.4 .. . Answer : xmlrpclib is part of the standard-library in Python 2.x . It s not a package that you need to install . In Python 3.x you can import it from xmlrpc instead : https : docs.python.org 3 library xmlrpc.html . You can import the client from xmlrpc.client : https : docs.python.org 3 library xmlrpc.client.html module-xmlrpc.client .", "Question : null .. . Answer : When I run from python interpreter series of commands with xmlrpclib as a client everything works Python2.7 . All three commands work fine . When I run it as ansible module 2 out of 3 commands work however the last one with more complicated XML co-incidence fails . The properly decoded response holds a string . The failing one holds an array . I run xmlrpclib with verbose 1 mode and the XML is the same . What I do wrong in ansible Comment : could you include your full code it will help in getting a response Comment : unfortunately it holds proprietary data and I cannot do it", "Question : null .. . Answer : I need to change headers in my transport client like in this example How to send custom http-headers for RPC calls using python xmlrpclib http : stackoverflow.com questions 4624085 how-to-send-custom-http-headers-for-rpc-calls-using-python-xmlrpclib But I want to call putheader method without need to reload my server with new Transport instance . Is there a way", "Question : null .. . Answer : I have a webservice coding with Java . It have a local access from http : localhost : 8080 rest service get valid tickets I m testing it with Advanced Rest Client chrome module and it works . It send a good xml response . My issue : I m trying to use this webservice with Python 2 with xmlrpclib module : .. . .. . And I have a protocol error-code 405 . Method not allowed . Do you have an idea Thanks .", "Question : I recently set up Cuckoo environment on Arch Linux host with WXPSP3 guest . When I try to upload file for analysis using submit.py I get the following error : .. . .. . I run out of ideas . Could you help J Comment : stackoverflow.com questions 32134362 python-install-xmlrpclib http : stackoverflow.com questions 32134362 python-install-xmlrpclib stackoverflow.com questions 25676943 http : stackoverflow.com questions 25676943 how-to-install-xmlrpclib-in-python-3-4 Comment : Thanks . I have seen that before but I solved it different way . Just goto app main dir opt cuckoo and run submit.py using python2.7 command : .. . Answer : It works if I run python via python2.7 command so : Comment : Exactly thanks", "Question : I am using xmlrpclib to interactively remote control some lab equipment with IPython . I love IPython s autocompletion features and I would also like to have it via xmlrpclib . So far I managed to accomplish method name completion and method help with the following approach . A little test server simulating a motorized stage this is only useful if you want to test my client code : .. . .. . My client instantiates an object in which all known methods are registered : .. . .. . In addition to the method name completion I would also like to have parameter name completion as in S.move goal TAB . An approach would be to utilize xmlrpc.ServerProxy.system.methodSignature but system methodSignature is not supported by SimpleXMLRPCServer . Does anybody have an idea how to retrieve the signatures of the server methods .. . Answer : I tend to think that python inspect module https : docs.python.org 2 library inspect.html classes-and-functions can help it provides the basics you can use for your desired features Comment : Thanks I seems sufficient to expand my server .", "Question : Can I ask for few question in one post to XML-RPC server If yes how can I do it in python and xmlrpclib I m using XML-RPC server on slow connection so I would like to call few functions at once because each call costs me 700ms . .. . Answer : Whether or not possible support of multicall makes any difference to you depends on where the 700ms is going . How did you measure your 700ms Run a packet-capture of a query and analyse the results . It should be possible to infer roughly round-trip-time bandwidth constraints whether it s the application layer of the server or even the name resolution of your client machine . Comment : I traced my script and found that it read 1 char at time . Maybe thats why result is so slow . I m using python s xmlrpclib library and didn t intentionally set buffer to 1 char . Must find where this can be changed .", "Question : How can I send custom HTTP Headers using python xmlrpclib library I need to send some special custom http-headers at the time of calling RPC methods . .. . Answer : You can subclass xmlrpclib.Transport and pass that as an argument to ServerProxy . Pick a method to override I chose send content and you re set . Comment : I am not able to use this as I am getting an exception af the first method call see stackoverflow.com questions 17569519 http : stackoverflow.com questions 17569519 unable-to-use-custom-transport-class-with-python-xmlrpclib-due-to-typeerror-unb", "Question : null .. . Answer : I m working with Python using the standard xmlrpclib library communicating between a JavaServer that host xmlrpc server and my python client . I have a problem and I hope that you should solve my issue . I want to send a DOM instance through xmlrpc protocol . I know that the instance are impossible to manage by xmlrpclib library in Python but this is what I need . I m trying to understand why is not possible to marshal the class Nodelist and I recognize that the target function is dumps self values in class Marshaller because she couldn t find this type of Python Object . For Instance the Fault code is this : .. . .. . Now I would want to solve this problem and for sure there are many solutions . But I don t know how to develop or implement something within the xmlrpclib in order to avoid the marshalling problem . Keep in mind that the file object must be a DOM is aim unchangeable . For Instance I m developing the following : .. . .. . Might you help me Comment : Nobody can help me", "Question : I need to make asynchronous XML-RPC client call to a Cobbler server in Tornado for example something like this : .. . .. . Right now I am using xmlrpclib which does not seem to make async client calls so it ends up blocking Tornado or so I hear . I m a newb when it comes to Tornado and asynchronous programming in general but please don t give me any links to some instructions or beginner s guide . I ve tried googling but I can t get a clear sense of what changes I need to make to xmlrpclib so that I can make these calls asynchronous . Any pointers will be greatly appreciated . Thanks in advance . .. . Answer : It s usually a good idea to check if Twisted http : twistedmatrix.com trac has support for various operations since it can be combined with Tornado using tornado.platform.twisted . For XML-RPC there is following code : http : twistedmatrix.com documents 13.0.0 web howto xmlrpc.html A simple example : .. . .. . Benchmarking : .. . .. . Straight use of xmlrpclib for comparison : .. . .. . Benchmarking : .. . .. . Much worse .", "Question : Is it possible to set the clientport for the xmlrpc-connection I want to say : .. . .. . Client should make a ServerProxy-object to over a specific client port .. . .. . or pseudocode something like this : .. . Answer : There is no option for this in module xmlrpclib but you can create your own by modifying the original version . Assuming you use Linux fetch usr lib python2.7 xmlrpclib.py . Modify the method make connection accordingly . Providing a parameter source address to HTTPConnection is supported by httplib not before Python version 2.7 . Have fun", "Question : I am trying save record from django front-end to openerp back-end . I am using openerp webservice using xmlrpclib . It works well with normal string and number data but when i tried to pass date field it throws error . cannot marshal type datetime.date objects .. . .. . Please help me. . Comment : It looks like it cannot be done by xmlrpc . You should try to pickle it or convert to string . Comment : convert the date into string and then pass the value Comment : Thanks to all for your support . I got solution First I have to covert date into ISO 8601 format to pass as xmlrpc object . .. . Answer : To solve the cannot marshal type datetime.date objects error first convert the date into ISO 8601 format and then pass it as an object to xmlrpclib . For example : .. . .. . For more details you can read the official Python documentation of xmlrpclib https : docs.python.org 2 library xmlrpclib.html datetime-objects .", "Question : I m trying to call a function declared in the class res.partner from a controller . This controller is outside so I had to use openerplib xmlrpclib is also valid to get data from the models . For example : .. . .. . Now I have the model and I can use search read or search read methods to get data from the res.partner model . But how can I call a function declared in that class Is it possible .. . Answer : Yes you can call function using xmlrpclib . .. . .. . try this .. . .. . Hope this will help you .", "Question : Can I ask for few question in one post to XML-RPC server If yes how can I do it in python and xmlrpclib I m using XML-RPC server on slow connection so I would like to call few functions at once because each call costs me 700ms . .. . Answer : http : docs.python.org library xmlrpclib.html multicall-objects Comment : Thanks for the link . Unfortunately Bugzilla xml-rpc server doesn t support muticalling . Comment : For this I can t provide any help - 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 : How to find out xmlrpc interface of any webservice For example in case of SOAP webservices you can just have a look at WSDL and findout the interface . In particular I am looking for interface of xmlrpc implemented using xmlrpclib in python . I have souce code of server available which file should I look for .. . Answer : There is no way to do this . XML RPC is not self-describing .", "Question : Is it possible to somehow cancel xmlrpc client request Let say that in one thread I have code like : .. . .. . I don t mean some kind of TimeOut.. . Sometimes from another thread I can get event to cancel my work . And then I need to cancel this request . I know that I can do it with twisted but is it possible to do it with standard xmlrpclib .. . Answer : First of all it must be implemented on server-side not in client xmlrpclib . If you simply interrupt your HTTP request to XML-RPC server it s not guaranteed that long process running on the server will be interrupted at all . So xmlrpclib just can t have this functionality . If you want to implement this behaviour you need to create two type of requests . A request of first type will tell your server to start some long process . It must be executed in background in another thread or process and your XML-RPC server must send the response Process started to the client immediately . When you want to stop the process client must send another request that will tell your server to stop executing of process . Comment : Yes you are right . :", "Question : null .. . Answer : I have a xmlrpclib server that provides a remote storage functionality with the conventional put key-value and get key interfaces exposed . On the client-side I have a custom class that abstracts this service and exposes a python dictionary type interface lets call it remote HT . Than I go on to define other classes say Node which contain objects of the type remote HT and here is where the problem with pickling manifests itself when I try to pickle the Node objects . On digging deeper I realized that the the real issue is with pickling of xmlrpclib.Server objects . I am wondering if there is some way I can get it to work with not so much effort or I should rethink my design . below is the code snippet . I get it from the log that the xmlrpc class is missing the getinitargs method which is required for pickling protocol to work but is the effort warranted as I suspect this error might just be the tip of a Iceberg .", "Question : I have been using Linux to programm Python scripts but now I have to make one of them work on Windows XP and here I am a beginner . I have installed Python 3.4 in C : Python34 and I have my Python script in E : solidworks xmlrpc . This script works perfectly on Linux but on Windows I get this error message : .. . .. . I checked if there was an xmlrpc folder in C : Python34 Lib and there is . I also defined PYTHONPATH and PYTHONHOME in system variables . Anyone knows how to solve this please Thank you so much . EDIT .. . .. . I deleted the content of the programm only a moment to proof : .. . .. . And the cmd returned this : Comment : can you please update answer with this import sys print sys.path .. . Answer : This is the real answer to the question : .. . .. . Python 3.4 brings the library xmlrpc which replaces old xmlrpclib . So if you have installed Python 3.4 on Windows and you want to use xmlrpclib probably as a client-side don t write anymore this : .. . .. . Replace that with this line : .. . .. . And replace every match of xmlrpc in the rest of your code with client .", "Question : I am using a Python script which uses xmlrpclib : .. . .. . I want to make a similar XML-RPC call using Ruby . For this purpose I have used the following code : .. . .. . When I run this Ruby script I get the following error : .. . .. . What can I do to fix this error Comment : full backtrace you could also try using wireshark to look for differences in the packets produced.. . Comment : what was your fix Comment : @rogerdpack : this is the full error I get : Users rahmanm .rvm rubies ruby-1.9.3-p194 lib ruby-1.9.1 xmlrpc client.rb : 414 : i n call : error XMLRPC : : FaultException from xmlrpc.rb : 17 : in main .. . Answer : The Error was in the conversion . Instead of list inside list I used dictionary . I solved it :", "Question : I am trying to use a custom Transport class with xmlrpclib in Python but when I specify a custom Transport I do get an exception at the first call : .. . .. . Sample code : .. . .. . The original connection is made but the first call to RPC method will fail with the above error . Removing the transport MyTransport solves the problem . Note : I tried the same with SafeTransport and same result . I do need a custom transport in order to inject some headers . How do I fix this .. . Answer : change to transport MyTransport not the type but an instance of this type ." ] }
[ "yes-answer-long", "yes-answer-short" ]
standard-library
UNK_RELATION
jetty-8@http@62
jetty-8 -- version 8 of jetty a widely used async java based @placeholder server and servlet engine supporting websockets and spdy protocols .
{ "confidence": [ 50.08612060546875, 49.07801055908203, 48.47911834716797, 47.640953063964844, 46.095741271972656, 44.6502571105957, 44.488670349121094, 44.07957077026367, 44.07957077026367, 42.023193359375, 41.835174560546875, 41.43372344970703, 41.43372344970703, 41.43372344970703, 41.0973014831543, 40.835426330566406, 40.329139709472656, 40.04924011230469, 39.88372802734375, 39.80793762207031, 39.80793762207031, 39.80793762207031, 39.616241455078125, 38.94552230834961, 38.70355224609375, 38.366947174072266, 38.226654052734375, 38.1112174987793, 38.01838302612305, 37.900814056396484, 37.881629943847656, 37.819664001464844, 37.6851806640625, 37.6851806640625, 37.6780891418457, 37.510398864746094, 37.21092987060547, 37.01020050048828, 37.01020050048828, 36.770896911621094, 36.694984436035156, 36.535091400146484, 36.35082244873047, 36.336639404296875, 36.193443298339844, 36.11125946044922, 35.89607238769531, 35.872440338134766, 35.854103088378906, 35.71996307373047, 35.69346237182617, 35.69346237182617, 35.585147857666016, 35.361698150634766, 35.330142974853516, 35.27185821533203, 35.240726470947266, 34.876121520996094, 34.82561111450195, 34.70290756225586, 34.70290756225586, 34.69581985473633, 34.66161346435547, 34.356258392333984, 34.299800872802734, 34.027931213378906, 33.89407730102539, 33.71271514892578, 33.71271514892578, 33.708824157714844, 33.708824157714844, 33.708824157714844, 33.411102294921875, 33.40537643432617, 33.35405731201172, 33.30513000488281, 33.250335693359375, 32.7111930847168, 32.7111930847168, 32.63180160522461, 32.630470275878906, 32.6052360534668, 32.595951080322266, 32.25733184814453, 32.249916076660156, 31.974679946899414, 31.95980453491211, 31.805591583251953, 31.75649642944336, 31.71682357788086, 31.679344177246094, 31.679344177246094, 31.679344177246094, 31.57852554321289, 31.57852554321289, 31.39028549194336, 31.39028549194336, 31.39028549194336, 30.72655487060547, 30.72655487060547 ], "content": [ "Jetty 8 Without WebApp http : i.stack.imgur.com tjr3s.png .. . .. . Jetty 8 With WebApp", "I also tried jetty-9 with jetty-ant 8 but got this :", "how to config jetty-8", "At this point Jetty 7 and Jetty 8 are both EOL so just use Jetty 9 .", "Jetty 8 With WebApp http : i.stack.imgur.com 45jST.png .. . .. . Jetty 9 Without WebApp", "I m trying to embed Jetty 8 8.1.18.v20150929 into a Java jdk1.7.0 67 application .", "This works in Tomcat 7 but not in Jetty 8 .", "http : wiki.eclipse.org Jetty Feature Hot Deployment .. . .. . The ContextDeployer was replaced with a ContextProvider and a more powerful deployment lifecycle in Jetty 7 8 .", "Jetty 9 has a refactored IO layer over Jetty 8 which should garner you improvements in that area .", "In eclipse it identifiesthe jetty server version as the 8.1.14 v232 .But above its identifying as 8.y.z SNAPSHOT .", "However the distribution of Jetty 8 http : download.eclipse.org jetty stable-8 dist does not seem to contain any classes related to JASPI .", "I am using Jetty 8 stable JDK 1.7 .", "How to enable logging the stacktrace of all exceptions in Jetty 8", "What can I do in such case with Jetty v.8+", "First and most important Jetty 8 is EOL End of Life https : dev.eclipse.org mhonarc lists jetty-announce msg00069.html .", "Either use Jetty 9.0.5 for your container as well or use a clean classloader separation to allow Jetty 8 and 9 coexisting friendly with each other .", "Stuck using Java 6 due to some things out of my control so I m kind of stuck with Jetty 8 .", "I tried version 9 of jetty with version 9 of jetty-ant and the target jetty.run worked as expected .", "Your problem is that you only can have one handler in Jetty 8 Server Class becouse there is not addHandler .", "I am using jetty-8 to serve all the http requests .", "How to deploy spring-boot war to prodaction debian jetty-8", "I am using Jetty 8 and trying to connect from Eclipse .", "What version of Jetty", "In case you want to develop a custom solution based on jetty-xml you should check how jetty-boot does it .", "Jetty 8 out of the box provides a default 404 error page : when visiting a Jetty-hosted website and providing a URL path that is not handled by any servlet e.g .", "Jetty uses the SSL defaults in Java .", "Next please use a more recent version of Jetty Jetty 8.0.1 is currently about 110 releases behind the current stable version of Jetty .", "Try upgrading to GWT 2.6 it comes with Jetty 8.1 and servlet-3.0 vs . Jetty 6 in previous versions of GWT", "sorry forgot to mention the version of jetty .", "The constructor for ClassInheritanceHandler takes ConcurrentHashMap String ConcurrentHashSet String in Jetty 8 and 9", "That is called from DefaultJettyAtJettyHomeHelper.startJettyAtJettyHome .. . https : github.com eclipse jetty.project blob jetty-9.2.9.v20150224 jetty-osgi jetty-osgi-boot src main java org eclipse jetty osgi boot internal serverfactory DefaultJettyAtJettyHomeHelper.java L161 .. . There you will find the trick that the Thread Context Classloader is overridden until the Server is configured from the XML .", "Jetty doesn t support Java 6 either .", "We are currently using Jetty 8 for a production environment serving low-latency traffic .", "I am using Jetty 8 and trying to connect from Eclipse Remote Debugging .", "And in the step to start the jetty service : sudo service jetty start .", "Embedded Jetty https : wiki.eclipse.org Jetty Tutorial Embedding Jetty .. . .. . Jetty Realms https : wiki.eclipse.org Jetty Tutorial Realms", "I use embedded Jetty to host a WEB server .", "Your tagging indicates that you are using Jetty 8 but your example references org.mortbay classes which would be coming from Jetty 6 prior to our move to eclipse several years ago .", "Since you wanna run Neo4j inside a Jetty8 via WrappingNeoServerBootstrapper you most likely have both jetty-8 and jetty-9 jars on your classpath .", "as client and trying to send 1000 messages to remote jetty server having a delay of 20 seconds in sending back response I observe that Camel jetty http client version 8.x is only able to send 250 messages at a time .", "Jetty is running on port 8080 .", "jetty-run output : .. . .. . Though the Jetty 9 docs http : www.eclipse.org jetty documentation 9.2.10.v20150310 ant-and-jetty.html use jetty.run and jetty.stop this guide http : wiki.eclipse.org Jetty Howto Use Jetty with Ant does not .", "I m trying to create a simple webapp without any XML configuration using Spring 3.1 and an embedded Jetty 8 server .", "You can find more information about its usage in the documentation of Jetty http : www.eclipse.org jetty documentation current framework-jetty-osgi.html .", "How do I tell Jetty to start the new Servlet", "Jetty 9 version of magomarcelo answer :", "This is the resulting exception when deploying in Jetty 8 : .. . .. . java.util.MissingResourceException : Can t find bundle for base name com.foo.whatever.i18n locale en US .. . .. . Is there a way to get Jetty 8 to honor the web fragment s classpath contribution", "I ll have to get and post the Jetty version .", "Some tips : .. . .. . The configuration is read from the XML file in the end of ServerInstanceWrapper.configure https : github.com eclipse jetty.project blob jetty-9.2.9.v20150224 jetty-osgi jetty-osgi-boot src main java org eclipse jetty osgi boot internal serverfactory ServerInstanceWrapper.java L161 function .", "The reason why jetty.run is not working in this case whereas jetty-run is because the task jetty.run .. . which the target jetty.run uses was added in version 9 of the jetty-ant task as stated by the dev who added it see this jetty-dev mailing list msg http : dev.eclipse.org mhonarc lists jetty-dev msg02407.html .", "I am using standalone jetty server in my application .", "Neo4j s server component internally uses Jetty 9.0.5 by itself .", "Is this because of jetty server or any other reason", "Camel version 2.12 Spring : 3.4 jetty server : 9", "If you want to use Jetty in the way that .. . .. . Jetty is initialized based on XML configuration .. . It is used within an OSGi environment .. . .. . I recommend that you should use jetty-osgi-boot http : search.maven.org search 7Cga 7C1 7Ca 3A 22jetty-osgi-boot 22 bundle .", "I m using jetty-all-server-8.1.3 and servlet api 3.0 .. . .. . Thanks in advance for your help hints", "Here is how it is done : .. . .. . Jetty Documentation http : docs.codehaus.org display JETTY How+to+Configure+Security+with+Embedded+Jetty", "I am using emmedded jetty in my java project .", "web.xml .. . .. . i have configured dispatcher-servlet.xml for Spring MVC restful .. . .. . I am using jetty server version : 8 .I think after 2 days if there is no hit in server .", "Now we need to migrate the application to jetty-8 Server.and i am getting this exception at run-time .", "Anyone know how I can tackle this problem using embedded Jetty 8", "Jetty 9 Without WebApp http : i.stack.imgur.com XJdMz.png .. . .. . Jetty 9 With WebApp", "https : webtide.com jetty-in-techempower-benchmarks .. . .. . Specifically look down for the latency tests where Jetty easily came out on top .", "After some Googling I found JavaDocs on the Eclipse site http : download.eclipse.org jetty stable-8 apidocs org eclipse jetty security jaspi package-summary.html and discovered there should be a jetty-jaspi-8.1.8.v20121106.jar http : repo2.maven.org maven2 org eclipse jetty jetty-jaspi 8.1.8.v20121106 somewhere http : grepcode.com snapshot repo1.maven.org maven2 org.eclipse.jetty jetty-jaspi 8.1.7.v20120910 .", "See here for an example : .. . .. . https : github.com outbrain ob1k blob master ob1k-jetty src main java com outbrain ob1k server jetty handler RequestTimeoutHandler.java", "And i find that with Jetty 9 the number of classes loaded into memory are a lot more than the number of classes loaded by Jetty 8 especially after the web app has been deployed .", "download.eclipse.org jetty stable-9 apidocs org eclipse jetty http : download.eclipse.org jetty stable-9 apidocs org eclipse jetty annotations ClassInheritanceHandler.html", "Its Jetty v8.1.11", "Jetty 8.0.1.v20110908", "Is it possible in jetty to use war + additional classpath lib", "Why is jetty.run not working where as jetty-run is", "Tried using Jetty 9.2 and it works fine .", "Can t get your exact question.. . but hey if you want to switch boot from Jetty 9 to Jetty 8 here are the docs : .. . .. . http : docs.spring.io spring-boot docs current reference html howto-embedded-servlet-containers.html howto-use-jetty-8 .. . .. . This will just swap the container at build time no code or annotation changes are necessary .", "I m not super-familiar with the Jetty codebase but I ve used it in a few projects and from what I know and it even shows a bit just reading some of their main pages : eclipse.org jetty about.php http : www.eclipse.org jetty about.php they ve done quite a bit of refactoring from version to version .", "I want to keep config like abc.xml etc files separately on staging server jetty server .", "At least the versions of Jetty that are stable mature and not expired or end of life d https : dev.eclipse.org mhonarc lists jetty-announce msg00069.html .", "I added the Jetty and Java JDK versions to the original post .", "I create a jetty server and want to programmatically and dynamically add servlets .", "The time-out may indicate that the Jetty server is unable to reach the end-point .", "It seems as though the jetty-jaspi module is not one of the standard start options http : wiki.eclipse.org Jetty Reference Start Options but could be added to the jetty.home lib ext directory see Jetty classloading http : www.eclipse.org jetty documentation 9.0.0.M3 jetty-classloading.html adding-extra-classpaths .", "In Jetty 9 we merged the ContextProvider and WebappProvider into one with the same deployment lifecycle setup .. . .. . http : www.eclipse.org jetty documentation current configuring-deployment.html", "The only difference between the log files comparing to eclipse log is regarding the version of jetty-server .", "Using Neo4j 2.1.7 .. . .. . But when changed to deploy my application into Jetty 8 actually in solr s Jetty 8.1.10 everything worked fine my web application can get data from embedded neo4j database correctly except accessing browser and webadmin .", "I m trying to upgrade Jetty version from 7.4 to one compliant with servlet-3.0 specification like 8.1.4 as well as GWT from 2.3 to 2.5 .", "Namely a Server with exactly 1 and only 1 Servlet no filters no security no session handling etc.. . .. . .. . Use the ServletContextHandler http : archive.eclipse.org jetty 8.0.1.v20110908 apidocs org eclipse jetty servlet ServletContextHandler.html and add your servlets and filters to it .", "ClassLoader contextCl Thread.currentThread .getContextClassLoader .. . try .. . .. . Thread.currentThread .setContextClassLoader JettyBootstrapActivator.class.getClassLoader .. . .. . .. . .. . .. . Server server ServerInstanceWrapper.configure null configURLs properties .. . .. . .. . .. . .. . return server .. . .. . .. . .. . finally .. . .. . Thread.currentThread .setContextClassLoader contextCl .. . .. . .. . .. . Please note that the links and example is from Jetty 9.2.9 as the code is a bit nicer there but you can find the same or similar logic in the jetty-osgi-boot of your Jetty version .", "I run into problem that can be indirectly traced back to the fact that org.eclipse.equinox.http.jetty bundle is creating Jetty SSL connector based on blocking I O see HttpServerManager.createHttpsConnector http : grepcode.com file repository.grepcode.com java eclipse.org 4.3 org.eclipse.equinox.http jetty 3.0.100 org eclipse equinox http jetty internal HttpServerManager.java HttpServerManager.createHttpsConnector 28java.util.Dictionary 29 .. . .. . Is there a reason why SslSelectChannelConnector cannot be used", "Project is running in Jetty 9 .", "Example this is done from memory as Jetty 8.0.1 is so old this may need some tweaking to work properly on your ancient version of Jetty : .. . .. . Of note : .. . .. . If you have static resources to serve html javascript css images etc. . then set the base resource path with .setResourceBase String http : archive.eclipse.org jetty 8.0.1.v20110908 apidocs org eclipse jetty server handler ContextHandler.html setResourceBase java.lang.String a new and better .setBaseResource Resource was added in Jetty 9 .. . If you want to serve static resources or get error-handling don t forget to call context.addServlet DefaultServlet.class .. . .. . If you want custom error-handling use the ServletContextHandler ErrorHandler features like this .. . .. . Also of note Jetty ships with a RequestLogHandler http : archive.eclipse.org jetty 8.0.1.v20110908 apidocs org eclipse jetty server handler RequestLogHandler.html which does the same end goal but using a Jetty Handler not via a Filter .", "However it turned out that filters only do see raw data produced by servlet or in case of static content and jetty - handler .", "I was configuring my Jetty ssl using this link http : wiki.eclipse.org Jetty Howto Configure SSL .", "I am running jetty-distribution-8.1.5.v20120716 and jetty-distribution-9.1.2.v20140210 on a windows-7 machine .", "I cannot bring up two jetty instances from serverModuleB as jetty-maven-plugin does not support it .", "It all worked fine with Jetty 8 but when I try and run it with Tomcat 6 I can t even get the WSDL from the request .", "There s a CXF 2.7.11 webservice published via JaxWsServerFactoryBean to an embedded Jetty 8.1.15.v20140411 in a standalone application on Linux with JDK 8 64 bit .", "See this blog for information on how and why Jetty is a best of breed in this area .", "The best would be if the XMLConfiguration class of Jetty accepted a ClassLoader as a parameter .", "I am using Camel jetty Component 2.14.2 both as producer and consumer .", "But didn t found any similar functionality of jetty .", "Without modifying the web.xml which works fine with Jetty ." ] }
{ "confidence": [ 56.40856170654297, 55.58053970336914, 53.90563201904297, 53.44413757324219, 52.4311408996582, 52.38068389892578, 52.31997299194336, 52.06389617919922, 51.858917236328125, 51.59043884277344, 51.46843719482422, 50.46723175048828, 50.291194915771484, 49.826271057128906, 49.705169677734375, 49.59491729736328, 49.49461364746094, 49.262779235839844, 48.97563171386719, 48.38197326660156 ], "content": [ "Question : How to deploy spring-boot war to prodaction debian jetty-8 Fast develop and test with spring-boot and javasonfig like with .. . .. . https : github.com spring-projects spring-boot tree master spring-boot-samples spring-boot-sample-jetty8 .. . .. . how to deploy war to jetty-8 version 8.1.3-4 how to config jetty-8 annotations jsp spring-security and etc . no web.xml in war . no xml config and etc . .. . Answer : Can t get your exact question.. . but hey if you want to switch boot from Jetty 9 to Jetty 8 here are the docs : .. . .. . http : docs.spring.io spring-boot docs current reference html howto-embedded-servlet-containers.html howto-use-jetty-8 .. . .. . This will just swap the container at build time no code or annotation changes are necessary . Everything should work out of the box .", "Question : Here is how I setup my Jetty server : .. . .. . However when it starts I got the following exception : .. . .. . What am I missing Jetty 8.0.1.v20110908 .. . Answer : First and most important Jetty 8 is EOL End of Life https : dev.eclipse.org mhonarc lists jetty-announce msg00069.html . Next please use a more recent version of Jetty Jetty 8.0.1 is currently about 110 releases behind the current stable version of Jetty . Now to explain what s going on . You are using ServletHandler directly that s an internal class not meant to be instantiated and accessed directly but under the most simplistic and naive of situations . Namely a Server with exactly 1 and only 1 Servlet no filters no security no session handling etc.. . .. . .. . Use the ServletContextHandler http : archive.eclipse.org jetty 8.0.1.v20110908 apidocs org eclipse jetty servlet ServletContextHandler.html and add your servlets and filters to it . This is the proper way as it establishes a ServletContext that all of your related Servlets and Filters use to coordinate with . Example this is done from memory as Jetty 8.0.1 is so old this may need some tweaking to work properly on your ancient version of Jetty : .. . .. . Of note : .. . .. . If you have static resources to serve html javascript css images etc. . then set the base resource path with .setResourceBase String http : archive.eclipse.org jetty 8.0.1.v20110908 apidocs org eclipse jetty server handler ContextHandler.html setResourceBase java.lang.String a new and better .setBaseResource Resource was added in Jetty 9 .. . If you want to serve static resources or get error-handling don t forget to call context.addServlet DefaultServlet.class .. . .. . If you want custom error-handling use the ServletContextHandler ErrorHandler features like this .. . .. . Also of note Jetty ships with a RequestLogHandler http : archive.eclipse.org jetty 8.0.1.v20110908 apidocs org eclipse jetty server handler RequestLogHandler.html which does the same end goal but using a Jetty Handler not via a Filter .", "Question : null .. . Answer : I am running jetty-distribution-8.1.5.v20120716 and jetty-distribution-9.1.2.v20140210 on a windows-7 machine . And i find that with Jetty 9 the number of classes loaded into memory are a lot more than the number of classes loaded by Jetty 8 especially after the web app has been deployed . The web application is developed using Spring 3.X and Hibernate 4.1.X just in case that could have a effect on things .. . .. . Below are the numbers i have observed this causes my first request to be responded slowly and more over i am just curious to know why this happens .. . .. . In case you are not able to download Jetty 8 you can download it from here https : www.dropbox.com sh w3nlsmypq5n61ps bJCC5WrtjG .. . .. . PFA images of my JConsole showing the number of classes loaded in each case .. . .. . Jetty 8 .. . .. . Without web app -- 1630 .. . .. . With web app after login -- 1632 .. . .. . .. . .. . .. . .. . Jetty 9 .. . .. . Without web app -- 2107 classes .. . .. . With web app -- 8700 classes to begin with and once i access the web application it increases to around 9600 on first request subsequent requests do not see a spike .. . .. . Jetty 8 Without WebApp Jetty 8 Without WebApp http : i.stack.imgur.com tjr3s.png .. . .. . Jetty 8 With WebApp Jetty 8 With WebApp http : i.stack.imgur.com 45jST.png .. . .. . Jetty 9 Without WebApp Jetty 9 Without WebApp http : i.stack.imgur.com XJdMz.png .. . .. . Jetty 9 With WebApp Jetty 9 With WebApp http : i.stack.imgur.com RImkM.png Comment : I m not super-familiar with the Jetty codebase but I ve used it in a few projects and from what I know and it even shows a bit just reading some of their main pages : eclipse.org jetty about.php http : www.eclipse.org jetty about.php they ve done quite a bit of refactoring from version to version . So my guess on this would be the obvious answer : Jetty 9 has a lot more classes . Comment : One other note : Below are the numbers i have observed this causes my first request to be responded slowly.. . It s not a given that the proliferation of classes is your problem - it might just be that Jetty 9 in your particular configuration has performance behavior that causes it to be slower on the first request and then after that things are cached etc . The Java JIT in general has this characteristic - that s kinda the way Java is . Comment : I agree the reason i say that my first request is slower because of the class loading is that .. . i enabled classloading trace and saw that around a 1000 classes get loaded on first request Second request onwards no classes are loaded and response time is better .. . JIT optimization should take a lot longer", "Question : I want to provide a custom 404 error page in my Spring 3.1 web application but I cannot deactivate Jetty 8 s default 404 error page . Jetty 8 out of the box provides a default 404 error page : when visiting a Jetty-hosted website and providing a URL path that is not handled by any servlet e.g . by visiting http : www.example.com nonexisting Jetty responses with its own default HTML error page : .. . .. . To replace this default behavior .. . .. . I ve removed the DefaultHandler from my Jetty XML file http : stackoverflow.com a 4756211 923560 .. . I ve edited my web.xml to include both Servlet 2.5 and Servlet 3.0 error handler locations pointing to error http : stackoverflow.com a 7066536 923560 .. . I ve set up a dedicated @Controller for handling the request to error http : stackoverflow.com a 1252763 923560 .. . .. . but my website still returns Jetty s own default HTML error page . Jetty 8 s official documentation talks about setting up a custom error pages http : wiki.eclipse.org Jetty Howto Custom Error Pages but the suggestions there say .. . .. . to configure a custom Jetty error handler I don t want to do this I want to do it inside my own Spring @Controller as mentioned above .. . to create a catch all context and create a root web app mapped to the URI . I don t want to do this as inside my web.xml I have already mapped Spring MVC s DispatcherServlet to . How can I turn off Jetty s default error handler and have the error-handling be done as pointed out above .. . Answer : The solution to my problem was to add a custom org.eclipse.jetty.server.handler.ErrorHandler . If a user doesn t explicitly specify some ErrorHandler the Jetty server instance seems to register a default ErrorHandler . As outlined on http : www.eclipse.org jetty documentation current custom-error-pages.html to register a custom ErrorHandler you can follow the following steps . 1 . Implement some org.eclipse.jetty.server.handler.ErrorHandler subclass e.g . com.example.CustomErrorHandler . 2 . Make this subclass available to your Eclipse server instance e.g . by bundling CustomErrorHandler in a jar file and then copying that jar file into the jetty.base lib ext directory . 3 . Configure your Jetty server instance to have this custom ErrorHandler registered as a bean : .. . .. . file jetty.xml :", "Question : null .. . Answer : I am using Camel jetty Component 2.14.2 both as producer and consumer . When I am using it as consumer i.e . as client and trying to send 1000 messages to remote jetty server having a delay of 20 seconds in sending back response I observe that Camel jetty http client version 8.x is only able to send 250 messages at a time . I tried to increase the httpClientMinThreads and httpClientMaxThreads by setting in jettyhttpcomponent i observe that number of camel jetty client threads is increased but still jetty client is able to send max 250 messages at time . I believe that since jetty client is using nio so it will not get blocked till it get response from server but in my case i am not able to validate it . Can any one please explain me why jetty client is only able to send 250 messages at a time and how to increase this count", "Question : When a servlet throws a NullPointerException only the name of the exception is logged on the stderr . When it s a ServerletException the stacktrace is logged . How to enable logging the stacktrace of all exceptions in Jetty 8 I m using Debian s jetty8 package . .. . Answer : See STACKS property in the logging config : https : wiki.eclipse.org Jetty Feature Jetty Logging", "Question : Everything works fine when I deployed using Tomcat 7 . http : localhost : 7474 browser can be showed successfully also webadmin . Using Neo4j 2.1.7 .. . .. . But when changed to deploy my application into Jetty 8 actually in solr s Jetty 8.1.10 everything worked fine my web application can get data from embedded neo4j database correctly except accessing browser and webadmin . error below was showed instead : .. . .. . By the way I unpacked neo4j-browser-2.1.7.jar and neo4j-server-2.1.7-static-web.jar and when I started jetty I saw the message which showed everything seemed ok : .. . .. . UPDATE Test in pure jetty 8.1 but failed as the same . full debug log when accessing browser : Comment : I think you should detail how you run neo4j from within your tomcat jetty deployment if it is a version conflict there is little that we can do . What do you need use browser for Comment : @MichaelHunger Using WrappingNeoServerBootstrapper in class Neo4jDbConfig which extends Neo4jConfigration just like this neoServerBootstrapper new WrappingNeoServerBootstrapper api config neoServerBootstrapper.start And using browser webAdmin for viewing data stored as data manager . .. . Answer : Neo4j s server component internally uses Jetty 9.0.5 by itself . Since you wanna run Neo4j inside a Jetty8 via WrappingNeoServerBootstrapper you most likely have both jetty-8 and jetty-9 jars on your classpath . In this case class loading order is not deterministic and this might be the root cause for the issue you re seeing . Either use Jetty 9.0.5 for your container as well or use a clean classloader separation to allow Jetty 8 and 9 coexisting friendly with each other . Comment : Thanks a lot . Tried using Jetty 9.2 and it works fine .", "Question : I want to provide a custom 404 error page in my Spring 3.1 web application but I cannot deactivate Jetty 8 s default 404 error page . Jetty 8 out of the box provides a default 404 error page : when visiting a Jetty-hosted website and providing a URL path that is not handled by any servlet e.g . by visiting http : www.example.com nonexisting Jetty responses with its own default HTML error page : .. . .. . To replace this default behavior .. . .. . I ve removed the DefaultHandler from my Jetty XML file http : stackoverflow.com a 4756211 923560 .. . I ve edited my web.xml to include both Servlet 2.5 and Servlet 3.0 error handler locations pointing to error http : stackoverflow.com a 7066536 923560 .. . I ve set up a dedicated @Controller for handling the request to error http : stackoverflow.com a 1252763 923560 .. . .. . but my website still returns Jetty s own default HTML error page . Jetty 8 s official documentation talks about setting up a custom error pages http : wiki.eclipse.org Jetty Howto Custom Error Pages but the suggestions there say .. . .. . to configure a custom Jetty error handler I don t want to do this I want to do it inside my own Spring @Controller as mentioned above .. . to create a catch all context and create a root web app mapped to the URI . I don t want to do this as inside my web.xml I have already mapped Spring MVC s DispatcherServlet to . How can I turn off Jetty s default error handler and have the error-handling be done as pointed out above .. . Answer : Here s how to define custom error pages - .. . .. . http : wiki.eclipse.org Jetty Howto Custom Error Pages", "Question : We are currently using Jetty 8 for a production environment serving low-latency traffic . We were wondering what would be the advantages to move to jetty-9 given that we have a very low-latency requirement . Thanks .. . Answer : Jetty 9 has a refactored IO layer over Jetty 8 which should garner you improvements in that area . See this blog for information on how and why Jetty is a best of breed in this area . https : webtide.com jetty-in-techempower-benchmarks .. . .. . Specifically look down for the latency tests where Jetty easily came out on top . edit I should note that this is perhaps not an appropriate question for this forum since it is outside of the intent of stack-overflow and more inline with server fault...just fair warning . Comment : Link is broken 404 . Comment : not sure why the month got tweaked there but I updated to a valid link Comment : At this point Jetty 7 and Jetty 8 are both EOL so just use Jetty 9 .", "Question : I m trying to create a simple webapp without any XML configuration using Spring 3.1 and an embedded Jetty 8 server . However I m struggling to get Jetty to recognise my implementaton of the Spring WebApplicationInitializer interface . Project structure : .. . .. . The Initializer class above is a simple implementation of WebApplicationInitializer : .. . .. . Likewise JettyServer is a simple implementation of an embedded Jetty server : .. . .. . My understanding is that on startup Jetty will use AnnotationConfiguration to scan for annotated implementations of ServletContainerInitializer it should find Initializer and wire it in.. . However when I start the Jetty server from within Eclipse I see the following on the command-line : .. . .. . The important bit is this : .. . .. . Note that src main java is defined as a source folder in Eclipse so should be on the classpath . Also note that the Dynamic Web Module Facet is set to 3.0 . I m sure there s a simple explanation but I m struggling to see the wood for the trees I suspect the key is with the following line : .. . .. . This makes sense with a 2.5 servlet using web.xml see below but what should it be when using AnnotationConfiguration NB : Everything fires up correctly if I change the Configurations to the following : .. . .. . In this case it finds the web.xml under src main webapp and uses it to wire the servlet using DispatcherServlet and AnnotationConfigWebApplicationContext in the usual way completely bypassing the WebApplicationInitializer implementation above . This feels very much like a classpath problem but I m struggling to understand quite how Jetty associates itself with implementations of WebApplicationInitializer - any suggestions would be most appreciated For info I m using the following : .. . .. . Spring 3.1.1 Jetty 8.1.7 STS 3.1.0 .. . Answer : Based on my testing and this thread http : forum.springsource.org showthread.php 127152-WebApplicationInitializer-not-loaded-with-embedded-Jetty I don t think it works at the moment . If you look in AnnotationConfiguration.configure : .. . .. . it seems coupled to a war-like deployment rather than embedded . Here is an example using Spring MVC and embedded Jetty that might be more useful : .. . .. . http : www.jamesward.com 2012 08 13 containerless-spring-mvc .. . .. . It creates the Spring servlet directly rather then relying on annotations . Comment : Thanks for the jamesward link - good to know how to construct things directly manually not knowing this was causing part of my confusion .", "Question : I m using the class org.eclipse.jetty.server.Server in XML file to intialize it with various parameters Please note this is an OSGi environment . However my bundle which is using the class org.eclipse.jetty.server.Server is not starting and throwing the following exception : .. . .. . I ve made sure that the jetty server bundle is up and running and also I ve made sure that I ve given proper version in the Imported-Packages section of my manifest file . Please help . .. . Answer : If you want to use Jetty in the way that .. . .. . Jetty is initialized based on XML configuration .. . It is used within an OSGi environment .. . .. . I recommend that you should use jetty-osgi-boot http : search.maven.org search 7Cga 7C1 7Ca 3A 22jetty-osgi-boot 22 bundle . You can find more information about its usage in the documentation of Jetty http : www.eclipse.org jetty documentation current framework-jetty-osgi.html . In case you want to develop a custom solution based on jetty-xml you should check how jetty-boot does it . Some tips : .. . .. . The configuration is read from the XML file in the end of ServerInstanceWrapper.configure https : github.com eclipse jetty.project blob jetty-9.2.9.v20150224 jetty-osgi jetty-osgi-boot src main java org eclipse jetty osgi boot internal serverfactory ServerInstanceWrapper.java L161 function . That is called from DefaultJettyAtJettyHomeHelper.startJettyAtJettyHome .. . https : github.com eclipse jetty.project blob jetty-9.2.9.v20150224 jetty-osgi jetty-osgi-boot src main java org eclipse jetty osgi boot internal serverfactory DefaultJettyAtJettyHomeHelper.java L161 .. . There you will find the trick that the Thread Context Classloader is overridden until the Server is configured from the XML . ClassLoader contextCl Thread.currentThread .getContextClassLoader .. . try .. . .. . Thread.currentThread .setContextClassLoader JettyBootstrapActivator.class.getClassLoader .. . .. . .. . .. . .. . Server server ServerInstanceWrapper.configure null configURLs properties .. . .. . .. . .. . .. . return server .. . .. . .. . .. . finally .. . .. . Thread.currentThread .setContextClassLoader contextCl .. . .. . .. . .. . Please note that the links and example is from Jetty 9.2.9 as the code is a bit nicer there but you can find the same or similar logic in the jetty-osgi-boot of your Jetty version . It is not a good thing to play around with the Thread Context ClassLoader but sometimes it is necessary when code is called that use TCL . The best would be if the XMLConfiguration class of Jetty accepted a ClassLoader as a parameter . Comment : Yes i m using a custom solution based on jetty.xml . I tried the same approach jetty-osgi-boot is using Changing the contextclassloader to point to activator s classloader but it didn t work . Not sure if i m missing something . Comment : Changing the contextclassloader to point to activator s classloader : I guess you changed to the classLoader of your Activator that is the classloader of your bundle . Does that classloader see the class org.eclipse.jetty.server.Server I mean does the bundle import the org.eclipse.jetty.server package If you check the source of org.eclipse.jetty.util.Loader.loadClass Loader.java : 92 you will see that the context classloader is used . So either you made a mistake during setting the classloader or the classloader you passed does not see that class . Comment : I got it working finally . Thanks a lot for your help . You are awesome :", "Question : I receive the following error : .. . .. . when running ant jetty.run in this : .. . .. . The above target jetty.run is identical in syntax to the documentation here http : www.eclipse.org jetty documentation 9.2.10.v20150310 ant-and-jetty.html see search for stopping . Why is jetty.run not working where as jetty-run is jetty-run output : .. . .. . Though the Jetty 9 docs http : www.eclipse.org jetty documentation 9.2.10.v20150310 ant-and-jetty.html use jetty.run and jetty.stop this guide http : wiki.eclipse.org Jetty Howto Use Jetty with Ant does not . It is clear that it has to do with jetty.run .. . vs jetty .. . but I m currently at a loss to explain why and unable to get jetty.run .. . and jetty.stop .. . to work . The classpath : .. . Answer : The reason why jetty.run is not working in this case whereas jetty-run is because the task jetty.run .. . which the target jetty.run uses was added in version 9 of the jetty-ant task as stated by the dev who added it see this jetty-dev mailing list msg http : dev.eclipse.org mhonarc lists jetty-dev msg02407.html . I tried version 9 of jetty with version 9 of jetty-ant and the target jetty.run worked as expected . I also tried jetty-9 with jetty-ant 8 but got this :", "Question : I m running an embedded Jetty 8 server that loads a few .war files at startup : .. . .. . These war-files have some dependencies on a few classes that may or may not exist in the classpath . Right now if one of my servlets is missing a dependency my entire embedded Jetty service fails . Because of NoClassDefFoundExceptions .. . .. . I need a method that allows me to catch exceptions for failing servlets and simply doesn t activate them . I m looking for the same thing that TomCat does when a servlet fails to load : It still loads the rest . I haven t found any solutions after some time searching on Google . Anyone know how I can tackle this problem using embedded Jetty 8 .. . Answer : If anyone is curious how I fixed this I simply made sure that all my servlets have a wrapper servlet that basically has no dependencies . The wrapper tries to initialize a delegate with dependencies and explicitly checks for NoClassDefFountException . If this happens the delegate is set to null and all calls to the wrapper interface will result in an exception . So on a high level : .. . .. . It s simple enough and it works .", "Question : I m trying to create a simple webapp without any XML configuration using Spring 3.1 and an embedded Jetty 8 server . However I m struggling to get Jetty to recognise my implementaton of the Spring WebApplicationInitializer interface . Project structure : .. . .. . The Initializer class above is a simple implementation of WebApplicationInitializer : .. . .. . Likewise JettyServer is a simple implementation of an embedded Jetty server : .. . .. . My understanding is that on startup Jetty will use AnnotationConfiguration to scan for annotated implementations of ServletContainerInitializer it should find Initializer and wire it in.. . However when I start the Jetty server from within Eclipse I see the following on the command-line : .. . .. . The important bit is this : .. . .. . Note that src main java is defined as a source folder in Eclipse so should be on the classpath . Also note that the Dynamic Web Module Facet is set to 3.0 . I m sure there s a simple explanation but I m struggling to see the wood for the trees I suspect the key is with the following line : .. . .. . This makes sense with a 2.5 servlet using web.xml see below but what should it be when using AnnotationConfiguration NB : Everything fires up correctly if I change the Configurations to the following : .. . .. . In this case it finds the web.xml under src main webapp and uses it to wire the servlet using DispatcherServlet and AnnotationConfigWebApplicationContext in the usual way completely bypassing the WebApplicationInitializer implementation above . This feels very much like a classpath problem but I m struggling to understand quite how Jetty associates itself with implementations of WebApplicationInitializer - any suggestions would be most appreciated For info I m using the following : .. . .. . Spring 3.1.1 Jetty 8.1.7 STS 3.1.0 .. . Answer : I was able to resolve in an easier but more limited way by just providing explicitly to the AnnotationConfiguration the implementation class MyWebApplicationInitializerImpl in this example that I want to be loaded like this : Comment : it works thank you Comment : In order to get Jersey class scanning to work I also overrode WebAppContext.getWebInf to always return newResource target instead of resourceBase WEB-INF classes . Comment : It took me a while to figure out that WebXmlConfiguration is necessary to allow Jetty to serve resources like HTML and CSS in src main webapp . See also WebAppContext setResourceBase . Comment : The constructor for ClassInheritanceHandler takes ConcurrentHashMap String ConcurrentHashSet String in Jetty 8 and 9 What s required to build this map now download.eclipse.org jetty stable-9 apidocs org eclipse jetty http : download.eclipse.org jetty stable-9 apidocs org eclipse jetty annotations ClassInheritanceHandler.html Comment : In Jetty 9 you can use ClassInheritanceMap instead of MultiMap .", "Question : I m trying to create a simple webapp without any XML configuration using Spring 3.1 and an embedded Jetty 8 server . However I m struggling to get Jetty to recognise my implementaton of the Spring WebApplicationInitializer interface . Project structure : .. . .. . The Initializer class above is a simple implementation of WebApplicationInitializer : .. . .. . Likewise JettyServer is a simple implementation of an embedded Jetty server : .. . .. . My understanding is that on startup Jetty will use AnnotationConfiguration to scan for annotated implementations of ServletContainerInitializer it should find Initializer and wire it in.. . However when I start the Jetty server from within Eclipse I see the following on the command-line : .. . .. . The important bit is this : .. . .. . Note that src main java is defined as a source folder in Eclipse so should be on the classpath . Also note that the Dynamic Web Module Facet is set to 3.0 . I m sure there s a simple explanation but I m struggling to see the wood for the trees I suspect the key is with the following line : .. . .. . This makes sense with a 2.5 servlet using web.xml see below but what should it be when using AnnotationConfiguration NB : Everything fires up correctly if I change the Configurations to the following : .. . .. . In this case it finds the web.xml under src main webapp and uses it to wire the servlet using DispatcherServlet and AnnotationConfigWebApplicationContext in the usual way completely bypassing the WebApplicationInitializer implementation above . This feels very much like a classpath problem but I m struggling to understand quite how Jetty associates itself with implementations of WebApplicationInitializer - any suggestions would be most appreciated For info I m using the following : .. . .. . Spring 3.1.1 Jetty 8.1.7 STS 3.1.0 .. . Answer : Jetty 9 version of magomarcelo answer :", "Question : I am using standalone jetty server in my application . I want to do a hot deployment for a jar . When I browsed through net I found the below settings in jetty.xml .. . .. . The ContextDeployer will scan the configurationDir directory at intervals of scanInterval seconds for xml descriptors that define contexts . .. . .. . In my case I have to do a hot deployment for a jar . Using the above configuration how can I specify to hot deploy for a jar file . It is specified that it will look for changes in context files . So to redeploy should we need to make change to the context file Please help me in understanding . .. . Answer : Your tagging indicates that you are using Jetty 8 but your example references org.mortbay classes which would be coming from Jetty 6 prior to our move to eclipse several years ago . http : wiki.eclipse.org Jetty Feature Hot Deployment .. . .. . The ContextDeployer was replaced with a ContextProvider and a more powerful deployment lifecycle in Jetty 7 8 . In Jetty 9 we merged the ContextProvider and WebappProvider into one with the same deployment lifecycle setup .. . .. . http : www.eclipse.org jetty documentation current configuring-deployment.html", "Question : On Jetty s main project page http : eclipse.org jetty compatibility with JASPI JASPIC JSR 196 is mentioned . However the distribution of Jetty 8 http : download.eclipse.org jetty stable-8 dist does not seem to contain any classes related to JASPI . There s a jetty-security-8.1.8.v20121106.jar jar in jetty home lib but this one does not contain any of the JASPIC JASPI types . The documentation about JASPIC JASPI http : wiki.eclipse.org Jetty Feature JASPI on the Jetty wiki is only a placeholder and does not contain any information . After some Googling I found JavaDocs on the Eclipse site http : download.eclipse.org jetty stable-8 apidocs org eclipse jetty security jaspi package-summary.html and discovered there should be a jetty-jaspi-8.1.8.v20121106.jar http : repo2.maven.org maven2 org eclipse jetty jetty-jaspi 8.1.8.v20121106 somewhere http : grepcode.com snapshot repo1.maven.org maven2 org.eclipse.jetty jetty-jaspi 8.1.7.v20120910 . Those JavaDocs are included in the distribution as well . Finally a jetty-jaspi repo https : github.com eclipse jetty.project appears at Github . Obviously there is some amount of support available but why are those classes seemingly not present in the Jetty distribution and where is the documentation on how to configure this What am I missing .. . Answer : This project https : github.com guofengzh jaspi-on-jetty https : github.com guofengzh jaspi-on-jetty is a working example of the JASPI API in jetty that uses geronimo-jaspi https : github.com apache geronimo-jaspi which in turn calls back to the jetty-jaspi modules for the authentication . Geronimo seems to be providing the configuration mechanism and jetty the authentication modules themselves in this example . It seems as though you can select a form digest or basic-authentication methods . A quick test of the form based login has shown it appears to function . The Jaspi authentication factory is setup in jetty-web.xml like so : .. . .. . And the jaspi configuration file is referenced via a system property in the pom.xml file : .. . .. . Additionally the jaspi library you mentioned is added as a dependency in the pom along with the geronimo jaspi implementation : .. . .. . I have also been unable to find documenation on the topic . It seems as though the jetty-jaspi module is not one of the standard start options http : wiki.eclipse.org Jetty Reference Start Options but could be added to the jetty.home lib ext directory see Jetty classloading http : www.eclipse.org jetty documentation 9.0.0.M3 jetty-classloading.html adding-extra-classpaths . Comment : Looks like a good answer : I m still a bit in the dark on why the jaspi javadocs are in the distribution but not the actual code . Requiring two external libs also makes the claim of supporting jaspi on the homepage questionable . By the same token Tomcat could claim to be JSF compatible : But alas I ll try your example Comment : I quite the like the modular nature of jetty you can enable only the features you need and have a lightweight runtime . I take your point about the javadocs + external lib though it s not clear from the documentation how jetty supports this feature . Comment : yeah it is supported in jetty for years now but something I personally hear so little about I haven t thought much about in terms of enabling it was largely work of another committer David Jencks from geronimo . We need to get it into the new docbook documentation though would love to see a pull request in the docs for it", "Question : I am creating a java API using spark-cassandra-connector.When it is running on eclipse it is working fine . Then i created a runnable jar file and executed it through the command-line its giving me following error . The only difference between the log files comparing to eclipse log is regarding the version of jetty-server . In eclipse it identifiesthe jetty server version as the 8.1.14 v232 .But above its identifying as 8.y.z SNAPSHOT . Is this because of jetty server or any other reason I am totally stuck here . My sparkContext configuration is follows Comment : Check your spark installation Comment : Reposted for new user @BhargaviSriram http : stackoverflow.com users 4792540 bhargavi-sriram wrote : I am facing the exact same error and I don t have an answer yet . Were you able to resolve this If yes can you please share your solution TIA Comment : It was because i used multiple streaming contexts in a single application and my master was running and i used local to execute this . .. . Answer : Spark uses getResource to read files that are packaged with it . Here it tries to read some static files for the Web UI which apparently does not work if the files are packaged into the jar . Instead they must be extracted into the jar which Eclipse offers as the first option : 1 http : i.stack.imgur.com 6U2ml.jpg", "Question : I am using emmedded jetty in my java project . For some reason the path I am sending into resourceHandler is c : lower case and it is being aliased to C : upper case . Because of this my static content is not being served . I read some docs that indicated that jetty compares the absolute path and canonical path to detect aliases . In the log I see : .. . .. . qtp15485575-19 INFO org.eclipse.jetty.server.handler.ResourceHandler - file : c : filepath aliased to file : C : filepath .. . .. . Anyone have any ideas on how to resolve Update : logged bug to eclipse for this : https : bugs.eclipse.org bugs show bug.cgi id 471526 .. . .. . Here s their response : it is indeed very annoying but is forced on us by the poor security model of the servlet spec . IF the spec had said that all URIs were denied unless explicitly allowed we would not need to check for aliases . But instead it has a model where it allows all URIs except those that are specifically denied . Thus if a security-constraint is put on secretfile.txt we have to make sure that any aliases of that file are also constrained.. . and do so in an FS independent way . That means on various operating systems we might need to block : .. . .. . etc . etc . etc . So to be sure we have implemented the alias system . Normally we don t get problems with c : and C : because that should be normalized when configuring the context so the correct one should be used . But filesystems do change their behaviour between releases so it can be very annoying . I think this is handled somewhat better in jetty 9.3 where we can use the Path classes to better examine parts of the path . So probably the best bet is to use Jetty 9 if you can and use Joakin s fix if it is still an issue . .. . Answer : Give your ResourceHandler a full absolute and real path . And btw DefaultServlet is still a better choice for static file serving http : stackoverflow.com a 20223103 775715 . Comment : Java 6 doesn t support toPath unfortunately . Comment : Jetty doesn t support Java 6 either . At least the versions of Jetty that are stable mature and not expired or end of life d https : dev.eclipse.org mhonarc lists jetty-announce msg00069.html . Comment : Stuck using Java 6 due to some things out of my control so I m kind of stuck with Jetty 8 . Going to mark your response as an answer any way .", "Question : I m trying to create a simple webapp without any XML configuration using Spring 3.1 and an embedded Jetty 8 server . However I m struggling to get Jetty to recognise my implementaton of the Spring WebApplicationInitializer interface . Project structure : .. . .. . The Initializer class above is a simple implementation of WebApplicationInitializer : .. . .. . Likewise JettyServer is a simple implementation of an embedded Jetty server : .. . .. . My understanding is that on startup Jetty will use AnnotationConfiguration to scan for annotated implementations of ServletContainerInitializer it should find Initializer and wire it in.. . However when I start the Jetty server from within Eclipse I see the following on the command-line : .. . .. . The important bit is this : .. . .. . Note that src main java is defined as a source folder in Eclipse so should be on the classpath . Also note that the Dynamic Web Module Facet is set to 3.0 . I m sure there s a simple explanation but I m struggling to see the wood for the trees I suspect the key is with the following line : .. . .. . This makes sense with a 2.5 servlet using web.xml see below but what should it be when using AnnotationConfiguration NB : Everything fires up correctly if I change the Configurations to the following : .. . .. . In this case it finds the web.xml under src main webapp and uses it to wire the servlet using DispatcherServlet and AnnotationConfigWebApplicationContext in the usual way completely bypassing the WebApplicationInitializer implementation above . This feels very much like a classpath problem but I m struggling to understand quite how Jetty associates itself with implementations of WebApplicationInitializer - any suggestions would be most appreciated For info I m using the following : .. . .. . Spring 3.1.1 Jetty 8.1.7 STS 3.1.0 .. . Answer : Jetty 9.0.1 contains an enhancement which allows for scanning of annotations of non-jar resources ie classes on the container classpath . See comment 5 on the following issue for how to use it : .. . .. . https : bugs.eclipse.org bugs show bug.cgi id 404176 c5 .. . .. . Jan Comment : Is there an example using a war file Using . and . classes . didn t work : And I don t really have a jetty home since this is embedded-jetty ." ] }
[ "yes-answer-long", "yes-answer-short" ]
http
UNK_RELATION
tipfy@google-app-engine@72
tipfy -- tipfy is a small but powerful framework made specifically for @placeholder .
{ "confidence": [ 47.4146614074707, 47.4146614074707, 44.78232955932617, 42.82444763183594, 42.753787994384766, 42.653602600097656, 42.03206253051758, 42.03206253051758, 42.03206253051758, 41.87615966796875, 40.46326446533203, 40.46326446533203, 40.44712448120117, 40.44712448120117, 40.44712448120117, 40.44712448120117, 40.30057144165039, 40.20038604736328, 39.1097526550293, 39.077796936035156, 37.74042892456055, 37.74042892456055, 37.74042892456055, 37.74042892456055, 37.74042892456055, 36.86149215698242, 36.86149215698242, 36.82633590698242, 36.19063949584961, 36.171630859375, 36.171630859375, 36.171630859375, 36.171630859375, 36.125125885009766, 35.745643615722656, 35.745643615722656, 35.745643615722656, 35.745643615722656, 35.745643615722656, 35.745643615722656, 35.09890365600586, 34.989418029785156, 34.78775405883789, 34.40827560424805, 34.40827560424805, 33.372310638427734, 33.218955993652344, 32.8394775390625, 32.8394775390625, 32.8394775390625, 32.8394775390625, 32.8394775390625, 32.8394775390625, 32.8394775390625, 32.645687103271484, 32.645687103271484, 31.257251739501953, 31.257251739501953, 31.257251739501953, 31.257251739501953, 31.257251739501953, 31.257251739501953, 31.257251739501953, 31.257251739501953, 31.257251739501953, 31.072675704956055, 29.919879913330078, 29.919879913330078, 29.919879913330078, 29.919879913330078, 29.919879913330078, 29.919879913330078, 29.919879913330078, 29.919879913330078, 29.919879913330078, 29.919879913330078, 29.919879913330078, 29.65125846862793, 28.972209930419922, 28.51026153564453, 28.51026153564453, 28.35108184814453, 28.35108184814453, 28.35108184814453, 28.35108184814453, 28.35108184814453, 28.35108184814453, 28.35108184814453, 28.35108184814453, 28.35108184814453, 27.172889709472656, 27.172889709472656, 27.172889709472656, 27.172889709472656, 27.172889709472656, 26.745088577270508, 26.58428192138672, 26.0660400390625, 25.60409164428711, 25.433530807495117 ], "content": [ "The Tipfy framework looks very good .", "Edit : .. . .. . Tipfy is a framework using in Gae .", "In the newest tipfy version 1.0b1 the jinja2 extension is now bundled with tipfy .", "I think tipfy is a great little framework .", "I am using the Tipfy framework tipfy.org on the Google App Engine .", "To try the example I installed Tipfy .", "Try checking tipfy . path .", "What Tipfy is missing", "What Tipfy really offers", "Finally tipfy has an excellent support community http : groups.google.com group tipfy .", "this works for me tipfy 0.6 :", "The session for this site implemented by tipfy .", "I m trying to get tipfy http : code.google.com p tipfy working on Google App Engine GAE .", "Simply speaking tipfy-ext-auth is updated to work with tipfy 0.7 and you are using 0.6.3 .", "Hi i want to store an object as a secure cookie in tipfy and want to retrieve the object from the tipfy .", "I m trying to implement stay signed in options using tipfy though I mm not allowed to use the default Tipfy mechanism .", "I m uploading files both in scribd store and blobstore using tipfy as framework .", ".. . .. . Tipfy does not allow the point b .", "@Daniel Ozean : Yes when I try to install tipfy via pip install tipfy my virtualenv is active .", "Presumably tipfy is not using the same templating language as webapp .", "Does Tipfy allow any OpenID authentication", "EDIT : I am using the method in a tipfy application .", "They are both easier to get started with than tipfy .", "I use tipfy gae for my project .", "However I based this project mainly in the ACL for tipfy .", "For instance I m using tipfy with zc.buildout and I ve added in the paypal package .", "I would like to extend the multi-auth example http : tipfy-auth.appspot.com .", "Appologies I was not 100 sure what to call it as I didn t think too many people would know of tipfy specifically .", "code.google.com p tipfy source browse source lib wtforms http : code.google.com p tipfy source browse source lib wtforms fields.py r d5bfbedf3a33f23da014db73a41c82fbf4b10393", "However I m not sure what to check for in tipfy .", "What s the best way to accomplish multiple forms in tipfy", "I m creating an API using Tipfy http : www.tipfy.org .", "Is there another decorator from Tipfy that fulfills this purpose", "I m working with the tipfy framework tipfy.org on app engine and am having some real problems .", "Ok so I m playing around with tipfy making a simple photo-gallery .", "I cant find examples of templates that use tipfy forms extended wtforms .", "I have a BaseHandler class that subclasses the Tipfy RequestHandler in my AppEngine site .", "I concatenated a string and append it to a session created by tipfy for each and every request .", "I am not sure if you should be using tipfy unless it is a requirement .", "Hi um having a problem of create a cookie not secured by using tipfy .", "I ve been playing with Tipfy http : code.google.com p tipfy for some weeks now just getting by with workarounds and now I d like to fix a few major issues with my workarounds .", "I created a Python 2.5 based virtualenv http : virtualenv.openplans.org and then installed werkzeug http : werkzeug.pocoo.org and tipfy http : www.tipfy.org as follows : .. . .. . However when I run the Python interpreter and import tipfy and then introspect tipfy http : www.tipfy.org with dir tipfy all I receive is : .. . .. . Surely that s not everything from a fully installed tipfy http : www.tipfy.org .", "I find out some code of the framework project called tipfy that do this with ACL access-control list .", "Is it possible to install tipfy http : www.tipfy.org using pip http : pip.openplans.org", "I don t know what tipfy is can you explain", "You might find a mix of very small webapp or tipfy services and a Django project in the middle might be a nice mix .", "I m still investigating but I think webapp and tipfy will be a lighter framework than django .", "I want to use tipfy for sessions and keep everything else in webapp .", "To access the Request object simply import the request variable from tipfy :", "I m using a PersonEditHandler class in tipfy to edit a Person entity .", "What call to the Tipfy library will return the WSGI application itself", "Use easy install to install wsgi intercept then get hold of the Tipfy app via make wsgi app .", "I am using Google App Engine for Python and Tipfy .", "I m a huge fan of Tipfy http : www.tipfy.org but it s no longer being maintained .", "I m trying to mimic the login page from the example http : tipfy-auth.appspot.com source http : code.google.com p tipfy source browse examples auth app without success .", "This is the code of the ACL module : .. . .. . https : github.com moraes tipfy blob master tipfy appengine acl.py .. . .. . But I don t see how to use this code inside a handler in webapp2 .", "There s now an example showing several authentication methods used at the same time here http : tipfy-auth.appspot.com .", "Source code is available here http : code.google.com p tipfy-ext-auth source browse hg examples multi-auth .", "I got same problem like you but with gae-auth and I think tipfy-ext-auth also suffers from it .", "So one option is to start using 0.7 directly from hg repository http : code.google.com p tipfy source checkout .", "Now trying to use tipfy i do : .. . .. . Now this last example does not work perfectly .", "The advantage is that the beaker library seems to be getting updated while last I looked at tipfy it was not getting updated .", "All I have to do was change the tipfy session management from cookies to memcache .", "I am trying to set up Tipfy extensions on a Python Google App Engine project that I ve been brought in on .", "The tipfy class .. . .. . implements the securecookie and i cannot use this implementation for creating a cookie to work in http handlers .", "Alternatively is there a graceful way to handle 404 in Tipfy that I m missing", "Given is on gae using tipfy http : www.tipfy.org python the following model : .. . .. . What is the template-tag to display a blob here image", "What else do I need to install to get tipfy http : www.tipfy.org working in a virtualenv http : virtualenv.openplans.org", "try to install tipfy by following the Do-it-yourself installation http : goo.gl x4Xh5 in your virtualenv", "I ve looked at the Tipfy example code but it seems written under the assumption that the OpenID provider is hard-coded to google .", ".. . .. . If you want to authenticate any OpenID Url with Tipfy you can t do it out of the box .", "What do you need to support any OpenID url in your application using Tipfy", "I would like to know how to configure the flex crossdomain.xml in tipfy with the Google app engine skd .", "I have tried and it do not work for me using the static file handler in both tipfy and webapp .", "I am using it in tipfy-wtforms form-for selectfield - product SelectField Product choices get activeproducts", "Example from the wtforms which IIRC is what tipfy is using docs will need to be adjusted for App Engine queries :", ".. . .. . I m using tipfy jinja which doesn t seem to support this as far as I can tell .", "Heres a link-to the multi auth plugin : http : tipfy-auth.appspot.com http : code.google.com p tipfy-ext-auth source browse hg examples multi-auth .. . .. . All I need is the login-system above integrated which according to the tipfy docs should be pretty straight forward but for some reason. . it s bundled in a way that isn t straight out of the box use .", "Aloha .. . .. . having some spare time and trying out python on app engine as it is much more flexible than java I wanted to use Tipfy as my webapp framework .", "have a look here stackoverflow.com questions 4851536 http : stackoverflow.com questions 4851536 authentication-using-any-openid-with-tipfy 4851820 4851820", "sure tipfy uses jinja and webapp uses django - but i still dont get why it represents all the other fields e.g .", "Tipfy .. . .. . It s developed as an extension to webapp so it s just one abstracted layer .", "Tipfy sounds a good idea hopefully a case of App Engine maturing as a platform although I have no personal experience with it at this stage .", "Your pretty much left on your own on how to use tipfy and how to structure the application .", "What is the best way to edit a retrieved record in tipfy without creating a new one", "I haven t been able to find an example of using multiple forms on one page or one Handler for tipfy .", "There s an example at http : ivory.idyll.org articles twill-and-wsgi intercept.html but I m not sure how to do it with Tipfy .", "Tipfy has this built-in to it s WTForms extension http : www.tipfy.org wiki extensions wtforms but it s not AJAX .", "On a related note do you recommend that people now use webapp2 instead of tipfy", "check the Tipfy session configuration attributes Check the path attribute you need to do some modification their", "When installing tipfy http : www.tipfy.org using pip http : pip.openplans.org can I still use the GoogleAppEngineLauncher http : code.google.com appengine downloads.html Google App Engine SDK for Python", "have you tried to install tipfy http : www.tipfy.org wiki guide installation do-it-yourself-installation after you actived your virtualenv", "One main reason is because Tipfy does not have any discovery mechanism to retrieve the OpenID Endpoint from a given OpenID user url .", "An example is here stackoverflow.com questions 4763715 http : stackoverflow.com questions 4763715 tipfy-how-to-display-blob-in-template 4767873 4767873 but it didn t work for me .", "I Finally end up coding a RBAC for google-app-engine as I find ACL from tipfy to broad and difficult to use .", "I m currently playing around with tipfy http : code.google.com p tipfy on Google s Appengine and just recently ran into a problem : I can t for the life of me find any documentation on how to use GET variables in my application I ve tried sifting through both tipfy http : docs.tipfy.org and Werkzeug s http : werkzeug.pocoo.org documentation 0.6 documentations with no success .", "Using tipfy how does one express a catch-all route in urls.py if more specific routes do not match", "I am using to twill to do integration-testing for an AppEngine using tipfy micro framework application but unfortunately twill is not maintained and I cannot test PUT and DELETE requests .", "I use webapp2 which is a derivative of tipfy in fact the functions and docs are in many cases identical and takes ideas from other frameworks too .", "I m trying to use the multi-auth example http : code.google.com p tipfy-ext-auth source browse hg examples multi-auth without much success ." ] }
{ "confidence": [ 50.02655792236328, 49.91818618774414, 49.29061508178711, 48.96976852416992, 47.76853942871094, 47.403751373291016, 47.403751373291016, 47.13477325439453, 46.818382263183594, 46.46697235107422, 46.46697235107422, 46.0729866027832, 45.795379638671875, 45.42685317993164, 45.047119140625, 44.55854797363281, 44.49022674560547, 43.24856185913086, 42.42974853515625, 42.42974853515625 ], "content": [ "Question : I am developing the authentication part of my app and I ve run into issues with coding authentication using OpenID . I ve looked at the Tipfy example code but it seems written under the assumption that the OpenID provider is hard-coded to google . I would like the user to be able to provide any OpenID they desire isn t that the point . Does anyone have any example code that shows a user logging in using a user-supplied OpenID Comment : What example code are you looking at Comment : @Gareth : tipfy.org wiki extensions auth openid http : www.tipfy.org wiki extensions auth openid .. . Answer : Does Tipfy allow any OpenID authentication .. . .. . If you want to authenticate any OpenID Url with Tipfy you can t do it out of the box . One main reason is because Tipfy does not have any discovery mechanism to retrieve the OpenID Endpoint from a given OpenID user url . What Tipfy is missing .. . .. . Tipfy does not allow the point b . of the following workflow : .. . a . user submits foo.blogspot.com .. . b . the framework retrieves foo.blogspot.com getting the OpenId endpoint from the html page : .. . .. . c . the framework redirects the user to the remote login page . What Tipfy really offers .. . .. . The Tipfy openid http : www.tipfy.org wiki extensions auth openid extension simply offers the OpenIdMixin that is just a base-class useful for building OpenID support to a specific platform Google for example . Indeed GoogleMixin class extends OpenIdMixin : .. . .. . and it has the Google OpenID endpoint hard-corded : .. . .. . The name OpenIdMixin is a little bit misleading near other classes names like GoogleMixin FriendFeedMixin FaceBookMixin etc . etc the docstring should be more clear to specify that the class should just be extended as a base-class and not used directly . What do you need to support any OpenID url in your application using Tipfy .. . .. . You should use the same consumer userland library that Google App Engine has adopted to offer OpenID support here http : code.google.com p google-app-engine-samples downloads detail name openid-consumer 20080704.tar.gz can 2 q the source code and here http : openid-consumer.appspot.com a live example . In the specific have a closer look to openid.consumer.consumer.py file and how the XRDS OpenID discovery happens I think that with some work you should be able to integrate this part into Tipfy OpenIdMixin . the OpenID code is ported from tornado.auth http : github.com facebook tornado blob master tornado auth.py Comment : thanks it seems like a great explanation", "Question : null .. . Answer : I m working with the tipfy framework tipfy.org on app engine and am having some real problems . I ve been trying to get an extention auth-extention to work all night . It allows users to sign in via facebook twitter openid etc. . The extention can be found at the link below the code looks like pretty straight forward if your python ninja but I m new to all this and frankly its baffaling I ve spent the last 24hours try to work it out but I keep getting errors . There seems to be around 1k downloads of the mod I m trying to integrate and not many complaints so It must be something simple I m doing wrong . Heres a link-to the multi auth plugin : http : tipfy-auth.appspot.com http : code.google.com p tipfy-ext-auth source browse hg examples multi-auth .. . .. . All I need is the login-system above integrated which according to the tipfy docs should be pretty straight forward but for some reason. . it s bundled in a way that isn t straight out of the box use . What I was really getting at was. . to ask if anyone could attach a working app with the login-system above the actual source of it seems to be provided so I can try and understand where I ve gone wrong. . it would be greatly appreciated andI d be happy to send you a small reward . Comment : A better title for your question would help you get answers faster . The tags are enough to indicate to others that it involves app-engine . Comment : Appologies I was not 100 sure what to call it as I didn t think too many people would know of tipfy specifically . But if people have had app engine experience this should be a walk in the park really just installing an extention . Cheers Comment : What errors are you getting Can you show some code that s producing errors Comment : @Wooble isn t 1 hour too short a time to close a question . We could wait for some clarification from the poster . Comment : @Wooble sorry for taking so long to reply . It s a missing modual error but when I think I ve fixed that the actual file goes astray and the url defined in url.py you have no idea how much stress this has caused me do you mind if I post this again And perhaps advise a more suitable title Thanks .", "Question : I installed the Google App Engine SDK for Python http : code.google.com appengine downloads.html Google App Engine SDK for Python on OS X using the GoogleAppEngineLauncher-1.4.1.dmg package . I created a Python 2.5 based virtualenv http : virtualenv.openplans.org and then installed werkzeug http : werkzeug.pocoo.org and tipfy http : www.tipfy.org as follows : .. . .. . However when I run the Python interpreter and import tipfy and then introspect tipfy http : www.tipfy.org with dir tipfy all I receive is : .. . .. . Surely that s not everything from a fully installed tipfy http : www.tipfy.org . 1 . Is it possible to install tipfy http : www.tipfy.org using pip http : pip.openplans.org 2 . What else do I need to install to get tipfy http : www.tipfy.org working in a virtualenv http : virtualenv.openplans.org 3 . When installing tipfy http : www.tipfy.org using pip http : pip.openplans.org can I still use the GoogleAppEngineLauncher http : code.google.com appengine downloads.html Google App Engine SDK for Python Do I have to use the GoogleAppEngineLauncher http : code.google.com appengine downloads.html Google App Engine SDK for Python Configuration .. . .. . I m using the OS X installed Python 2.5.4 .. . virtualenv http : virtualenv.openplans.org 1.5.1 .. . pip http : pip.openplans.org 0.8.1 Comment : Did you ever solve this Try checking tipfy . path . Comment : No I haven t solved this yet . Comment : have you tried to install tipfy http : www.tipfy.org wiki guide installation do-it-yourself-installation after you actived your virtualenv Comment : @Daniel Ozean : Yes when I try to install tipfy via pip install tipfy my virtualenv is active . Comment : try to install tipfy by following the Do-it-yourself installation http : goo.gl x4Xh5 in your virtualenv .. . Answer : The recomendend way to use tipfy is via buildout with the recipe provided in .. . .. . http : www.tipfy.org wiki guide installation .. . .. . you can try to use virtualenv and run the buildout inside this one i use this one and works but without sense buildout 1.5.x give the same isolation-level than buildout now", "Question : I m trying to implement an RBAC in webapp2 . I find out some code of the framework project called tipfy that do this with ACL access-control list . This is the code of the ACL module : .. . .. . https : github.com moraes tipfy blob master tipfy appengine acl.py .. . .. . But I don t see how to use this code inside a handler in webapp2 . The documentation there says : .. . .. . This requires the handler to have the area and current user attributes . What s an Area and how do I use this inside a handler Thanks .. . Answer : At the end I find out that area can be anything you want and it s up to you what meaning it has . Just define a property in your handler that return some string .. . and that s the area . Also .. . I Finally end up coding a RBAC for google-app-engine as I find ACL from tipfy to broad and difficult to use . However I based this project mainly in the ACL for tipfy . You can find my approach here : .. . .. . https : github.com janscas gae-rbac", "Question : I m trying to get tipfy http : code.google.com p tipfy working on Google App Engine GAE . I m using Windows XP . The hello world example is working fine . What I m don t understand is how to correctly install extensions . I m trying to use the multi-auth example http : code.google.com p tipfy-ext-auth source browse hg examples multi-auth without much success . I m receiving the following error : .. . .. . I ve tried installing the extension as per the documentation http : www.tipfy.org wiki guide extensions adding-or-removing-extensions which says to run : .. . .. . bootstrap.py --distribute .. . .. . Which returns : .. . .. . Downloading http : pypi.python.org packages source d distribute distribute-0.6.14.tar.gz .. . .. . Extracting in d : temp tmp2frf61 .. . .. . Now working in d : temp tmp2frf61 distribute-0.6.14 .. . .. . Building a Distribute egg in d : temp tmpq4-j v .. . .. . warning : no files found matching Makefile under directory docs .. . .. . warning : no files found matching indexsidebar.html under directory docs .. . .. . d : temp tmpq4-j v distribute-0.6.14-py2.5.egg .. . .. . install dir d : temp tmpq4-j v .. . .. . I then run : .. . .. . bin buildout .. . .. . and get the following : .. . .. . While : Initializing . Error : Couldn t open D : downloads tipfy.0.6.3.build project bin buildout.cfg .. . .. . Because that file doesn t exist in the bin directory which I m assuming should have been placed there after I ve ran : .. . .. . bootstrap.py --distribute .. . Answer : bootstrap and buildout problems are caused by broken distribution in version 0.6.3 IMHO . It is better to use all-in-one http : www.tipfy.org tipfy.build.zip package . Another issue is are missing wtforms . I got same problem like you but with gae-auth and I think tipfy-ext-auth also suffers from it . Simply speaking tipfy-ext-auth is updated to work with tipfy 0.7 and you are using 0.6.3 . Version 0.7 is development version and is not released to public yet . So one option is to start using 0.7 directly from hg repository http : code.google.com p tipfy source checkout . But be careful : 0.7 is not compatible with 0.6.3 . Another option is to just download wtforms modules http : code.google.com p tipfy source browse hg tipfyext wtforms from latest version and put them under app lib directory . I did this for my project and it worked . Comment : Just one quick note because I just ran into this issue : tipfy.ext.wtforms is only a wrapper around wtforms not wtforms itself so the extension goes in distlib tipfy ext and wtforms goes in lib", "Question : I am using the Tipfy framework tipfy.org on the Google App Engine . I would like to extend the multi-auth example http : tipfy-auth.appspot.com . To try the example I installed Tipfy . The hello world app is accessible through the browser if I run the local server . Then I added the multi-auth app in a second directory called multi auth added it in the config.py apps installed list removed hello world and reloaded the page . I get the following output : .. . .. . Obviously the handler is not found but why Where can I set which app should be loaded I would be glad about a hint . Comment : have you resolved it .. . Answer : I just did the same process last night succesfully : .. . .. . 1 . Be sure to have downloaded all the extensions needed by the example using buildout .. . 2 . Copy the multi-auth config.py file to the app root overwriting the original one . 3 . Copy all the files from multi-auth static and templates folders to the app root static and templates folders .. . 4 . Be sure that config.py has apps.multi-auth in the apps installed list", "Question : I am using the Tipfy framework tipfy.org on the Google App Engine . I would like to extend the multi-auth example http : tipfy-auth.appspot.com . To try the example I installed Tipfy . The hello world app is accessible through the browser if I run the local server . Then I added the multi-auth app in a second directory called multi auth added it in the config.py apps installed list removed hello world and reloaded the page . I get the following output : .. . .. . Obviously the handler is not found but why Where can I set which app should be loaded I would be glad about a hint . Comment : have you resolved it .. . Answer : Did you define the rules for the request handlers as described in the documentation http : www.tipfy.org wiki extensions auth authentication-endpoints Comment : Thank you for your quick answer . The rules are defined . For instance Rule endpoint home handler handlers.HomeHandler Comment : can you share more of your source code maybe in a public repository or a gist Comment : Of course . This points to the example s source code : code.google.com p ideabox-test source browse http : code.google.com p ideabox-test source browse svn 2Ftrunk 2Fproject 2Fmultiauthapp", "Question : Ok so I m playing around with tipfy making a simple photo-gallery . I have a working solution using webbapp this is my template browse.htm which stays the same in both examples : .. . .. . and this is my databsemodel which also satys the same .. . .. . So using webapp my script is : .. . .. . So this works perfectly . Now trying to use tipfy i do : .. . .. . Now this last example does not work perfectly . It does fetch all the comments and dates and displays them correctly but no pictures . I m so stuck on this any input is welcome . .. . Answer : So I managed to get it to work the solution was to change the template from .. . .. . To .. . .. . Anoyone care to comment on why this is the solution is very welcome Comment : Presumably tipfy is not using the same templating language as webapp . Comment : sure tipfy uses jinja and webapp uses django - but i still dont get why it represents all the other fields e.g . pic.date correctly but not pic.key", "Question : Using tipfy how does one express a catch-all route in urls.py if more specific routes do not match Tipfy uses Werkzeug-like routing so there s this in urls.py : .. . .. . This will match most random entry points into the application app.example.com foo app.example.com 20 etc but does not cover the app.example.com foo bar case which results in a 404 . Alternatively is there a graceful way to handle 404 in Tipfy that I m missing .. . Answer : Maybe you could write custom middle ware : .. . .. . To enable it add somewhere to tipfy config : .. . .. . It gives you quite a flexibility - you could for example send mail somewhere to inform that there was a problem . This will intercept all exceptions in your application Comment : This is a nice idea actually . I m only accepting the other answer because it more specifically addresses the question of matching the URL but your point is well-taken . Thanks", "Question : I concatenated a string and append it to a session created by tipfy for each and every request . But the session does not get updated . This is how I call the session in another handler : .. . .. . Can anyone help me Comment : The session management library I could get to work with GAE was beaker . It has the disadvantage that the session variables cannot be passed via a redirect so I write values to the request instead . The advantage is that the beaker library seems to be getting updated while last I looked at tipfy it was not getting updated . Comment : okay how to overcome this problem .. . Answer : All I have to do was change the tipfy session management from cookies to memcache . After that it works fine", "Question : Hi um having a problem of create a cookie not secured by using tipfy . The tipfy class .. . .. . implements the securecookie and i cannot use this implementation for creating a cookie to work in http handlers . Can any one give me a solution for this Thank you in advance .. . Answer : Reading the docs for Tipfy securecookie seems to only mean that the cookie is validated to not have been altered client-side and nothing to do with HTTP vs HTTPS : .. . .. . Secure cookies are cookies that are not alterable from the client-side because they add a checksum that is validated in the server when read .. . .. . Take a look at the docs here for more info : http : www.tipfy.org wiki extensions session", "Question : null .. . Answer : Hi i want to store an object as a secure cookie in tipfy and want to retrieve the object from the tipfy . How to do this this is what i have done so for . this code segment is inside a handler extends from Request handler .. . .. . i do not know a way to save the cookie mentioned in the documentation werkzeug.contrib.securecookie.SecureCookie.save cookie :", "Question : I m a huge fan of Tipfy http : www.tipfy.org but it s no longer being maintained . Webapp2 http : webapp-improved.appspot.com index.html seems to have take its place so I was wondering : how do I use access-control lists http : www.tipfy.org docs api tipfy.ext.acl.html if I m using webapp2 instead of Tipfy .. . Answer : You d need to port it to webapp2 . It should not be hard . Here re a few tips : .. . .. . cached property is available in webapp2.cached property they are equivalent .. . the call to get request should use webapp2.get request .. . You can simply copy PickleProperty to use in your port . CURRENT VERSION ID is available in os.environ it is the app version . Everything else should work as it is after taking a quick look . There are few dependencies in that module it is mostly some datastore models . Comment : Thanks @moraes . On a related note do you recommend that people now use webapp2 instead of tipfy I think tipfy is a great little framework . Comment : I do and posted an explanation here : stackoverflow.com questions 6774371 http : stackoverflow.com questions 6774371 flask-vs-webapp2-for-google-app-engine 6786745 6786745", "Question : I m currently playing around with tipfy http : code.google.com p tipfy on Google s Appengine and just recently ran into a problem : I can t for the life of me find any documentation on how to use GET variables in my application I ve tried sifting through both tipfy http : docs.tipfy.org and Werkzeug s http : werkzeug.pocoo.org documentation 0.6 documentations with no success . I know that I can use request.form.get variable to get POST variables and kwargs in my handlers for URL variables but that s as much as the documentation will tell me . Any ideas Comment : What are you considering the difference between URL variables and GET variables .. . Answer : this works for me tipfy 0.6 :", "Question : Tipfy s user-authentication tutorial http : www.tipfy.org wiki tutorials auth advertises its unified system that accepts all of Google own-auth OpenID OAuth and Facebook authentication but the examples so far show exclusively Google auth and exclusively own-auth . How do I make the other authentication options available Comment : have a look here stackoverflow.com questions 4851536 http : stackoverflow.com questions 4851536 authentication-using-any-openid-with-tipfy 4851820 4851820 Comment : @system Thanks .. . Answer : There s now an example showing several authentication methods used at the same time here http : tipfy-auth.appspot.com . Source code is available here http : code.google.com p tipfy-ext-auth source browse hg examples multi-auth .", "Question : null .. . Answer : I haven t been able to find an example of using multiple forms on one page or one Handler for tipfy . I m trying to allow users to both answer form 1 and comment on an item form 2 from the same page . One approach to doing this in PHP http : bavotasan.com tutorials processing-multiple-forms-on-one-page-with-php is submitting a hidden form and checking for it before processing . However I m not sure what to check for in tipfy . What s the best way to accomplish multiple forms in tipfy", "Question : null .. . Answer : I m trying to implement stay signed in options using tipfy though I mm not allowed to use the default Tipfy mechanism . This is what I have tried so far .. . .. . I m having a problem of instantiating the SecureCookieStore Object . what argument should I need to pass for its constructor . Please note that i wrote this code segment inside a handler implemented by the request handler . I will be thankful if anyone provide me a proper answer .", "Question : I would like to know how to configure the flex crossdomain.xml in tipfy with the Google app engine skd . Please advice . Thanks . Edit : .. . .. . Tipfy is a framework using in Gae . I would like to know : .. . .. . 1 . where I can place the crossdomain.xml in the root or other place .. . 2 . do I need script to redirect to the xml .. . 3 . what files that I need to modify eg . app.yaml . 4 . any other things or file I need to modify or create to make it work . Thanks . Comment : what do you need in particular Comment : I don t know what tipfy is can you explain Comment : Please see the update . Thanks . Comment : possible duplicate of How to configure the flex crossdomain.xml in Python Google App Engine Sdk . http : stackoverflow.com questions 4993157 how-to-configure-the-flex-crossdomain-xml-in-python-google-app-engine-sdk Comment : I feel sorry If I waste anyone s time . The first question is using the webapp with the Gae . All the settings seen to be Ok but it do now work . I have tried to solve it for several days but I cannot fix it . That s why I tried to use the framework to solve . I am not sure url.py in tifpy can solve the problems so I post this question . Nick please give some hints for the above question . Thanks . .. . Answer : Place the crossdomain.xml anywhere in your app eg the root of the app then use a static file handler http : code.google.com appengine docs python-config appconfig.html Static File Handlers to configure it in app.yaml . You don t need to touch any framework code at all . Comment : Hi Nick thanks for answer . Actually I do not use any framwork for the moment but it do not work . Please refer to my another question : stackoverflow.com questions 4993157 http : stackoverflow.com questions 4993157 how-to-configure-the-flex-crossdomain-xml-in-python-google-app-engine-sdk . Comment : @michael Please don t post duplicate questions - you waste my time your time and that of anyone else who reads the duplicate . Comment : I have tried and it do not work for me using the static file handler in both tipfy and webapp .", "Question : I m currently playing around with tipfy http : code.google.com p tipfy on Google s Appengine and just recently ran into a problem : I can t for the life of me find any documentation on how to use GET variables in my application I ve tried sifting through both tipfy http : docs.tipfy.org and Werkzeug s http : werkzeug.pocoo.org documentation 0.6 documentations with no success . I know that I can use request.form.get variable to get POST variables and kwargs in my handlers for URL variables but that s as much as the documentation will tell me . Any ideas Comment : What are you considering the difference between URL variables and GET variables .. . Answer : Source : http : www.tipfy.org wiki guide request .. . .. . The Request object contains all the information transmitted by the client of the application . You will retrieve from it GET and POST values uploaded files cookies and header information and more . All these things are so common that you will be very used to it . To access the Request object simply import the request variable from tipfy :", "Question : I m creating an API using Tipfy http : www.tipfy.org . I have an existing suite that tests some methods I will expose via URL but what I d like to do is see exactly how these functions will work once they re exposed . I d like to test the URL params directly for example . I think what I need is something like wsgi intercept http : code.google.com p wsgi-intercept . It uses a function that returns a WSGI app to run its tests so you don t have to run a web server in parallel it bootstraps it for you in the setUp function . There s an example at http : ivory.idyll.org articles twill-and-wsgi intercept.html but I m not sure how to do it with Tipfy . What call to the Tipfy library will return the WSGI application itself Tipfy.wsgi app If there is another testing strategy or tool that you can suggest I d also appreciate that . Thanks .. . Answer : Use easy install to install wsgi intercept then get hold of the Tipfy app via make wsgi app ." ] }
[ "yes-answer-long", "yes-answer-short" ]
google-app-engine
UNK_RELATION
library-interposition@implementation@116
library-interposition -- this is a practice to override a call to the function from library by the developer s own @placeholder .
{ "confidence": [ 43.451194763183594, 39.63837432861328, 28.937416076660156, 28.012435913085938, 27.385805130004883, 27.147109985351562, 26.066089630126953, 25.54133415222168, 25.388580322265625, 25.08868408203125, 25.08868408203125, 24.26129150390625, 23.72119903564453, 23.178733825683594, 22.389209747314453, 21.445533752441406, 21.38389778137207, 21.366621017456055, 21.312671661376953, 21.017187118530273, 21.017187118530273, 20.768205642700195, 20.60879135131836, 20.585512161254883, 20.585512161254883, 20.585512161254883, 20.46306610107422, 20.433691024780273, 19.78392219543457, 19.78392219543457, 19.78392219543457, 19.78392219543457, 19.232486724853516, 18.738203048706055, 18.087539672851562, 17.79880142211914, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.665590286254883, 17.093473434448242, 17.093473434448242, 17.093473434448242, 16.685077667236328, 16.66179847717285, 16.173377990722656, 16.173377990722656, 15.880889892578125, 15.880889892578125, 15.880889892578125, 15.880889892578125, 15.880889892578125, 15.860208511352539, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852, 13.741876602172852 ], "content": [ "The magic words are library-interposition .", "It covers the topic of library-interposition with more technical details .", "I need to interpose on a method call in a C++ program the class resides in a separate shared library .", "I m fine with just hooking shared library functions .", "It is a library with simple replacements for the system call functions that is used with LD PRELOAD .", "You ll find from one of ltrace developer a way to do this .", "But in case you were really just asking this is how you do function interposition non-dynamically : stackoverflow.com questions 426230 what-is-the-ld-preload-trick http : stackoverflow.com questions 426230 what-is-the-ld-preload-trick and yes I ve applied this many a time before", "I thought I could use LD PRELOAD but i am not sure how this would work i only found examples of C functions : is there a way to setup interposition for a single method without copying over any code from the interposed class implementation", "By the way neither my technique nor Tony s will work with virtual-functions but if this were a virtual function you could just override it in a subclass ne", "by the way how do i call the original method from this new method", "In order to call it from python you ll probably need to make a C module .", "See this post http : timetobleed.com extending-ltrace-to-make-your-rubypythonperlphp-apps-faster which includes a full patch in order to catch dynamically loaded library .", "code.google.com codesearch BGeH2W13jNw trunk src windows http : code.google.com codesearch BGeH2W13jNw trunk src windows preamble patcher.cc q preamble patcher 20package : http : gperftools 5C.googlecode 5C.com win32 function-calls leave a few instructions at the start of every function-call that can be changed into a jump to whatever function you want .", "I shouldn t override it because i shouldn t touch the client code which instantiates the object either .", "You should not call printf in your function since printf is very complicated and may itself call memcpy again .", "It s not about creating the VM instance it s about calling into it you can t point the PLT at a Python function after all you need to point it at native-code that calls the Python runtime and runs the function you want .", "google-perftools has their own implementation of Detour under src windows preamble patcher https : code.google.com p gperftools source browse src windows preamble patcher.cc .", "i have the same question for you : how do i call the original C++ method", "To find all library calls that your executable makes you can use ltrace http : en.wikipedia.org wiki Ltrace .", "It wouldn t be very portable but you could write your interposing function in C and give it the mangled name of the C++ method .", "How do I at run-time no LD PRELOAD intercept hook a C function like fopen on Linux a la Detours for Windows", "One idea is to roll my own tool based on ptrace or on rewriting code found with dlsym or in the PLT and targeting ctypes -generated C-callable functions but I thought I d ask here first .", "Manipulating the PLT from Python is precisely what I was getting at with my strawman .", "Just create a file for the interposed code making sure the implementation is out of line .. . the namespaces class name and function should be the same as for the method you want to intercept .", "In Linux only you can use dlsym RTLD NEXT name - this explicitly says don t match the searching function and find one in a later-loaded object .", "A quick scan of the code and I see these win32 functions used all of which have linux versions : .. . .. . GetModuleHandle GetProcAddress : get the function address .", "Here s some links that for the time being are functional : .. . .. . This is the original article as published in 2001 : Building Library Interposers for Fun and Profit http : www.drdobbs.com building-library-interposers-for-fun-and 184404926 Dr . Dobbs .. . The developers.sun.com link was a repost by the original author possibly with changes from the 2001 article this is the repost : Debugging and Performance Tuning with Library Interposers https : web.archive.org web 20120626005255 http : developers.sun.com solaris articles lib interposers.html Wayback Machine .. . The Linker Libraries Guide http : docs.oracle.com cd E19120-01 open.solaris 819-0690 chapter3-26 index.html for Sun Studio Oracle Solaris Studio .", "+1 for finding it on your own", "For other OS I m not sure but there s got to be some web pages talking about portability from Linux so a RTLD NEXT search s a good bet .", "I d like to do this from Python hence I m assuming that the program is already running a CPython VM and also reroute to Python code .", "Even if you manage to access and modify the PLT from Python which is probably possible you ll need code to launch the Python VM .", "@Glenn Maynard : Sorry if my question wasn t clear - I mentioned I d like to do this from Python so the assumption is that the VM is already running .", "I am working on a project where I need to change the behaviour of the XOpenDisplay function defined in X11 Xlib.h .", "Here s a good tutorial : s http : developers.sun.com solaris articles lib interposers.html s .. . .. . .. . .. . When Oracle purchased sun a lot of articles seem to have disappeared and or aren t accessible through Oracle s website .", "Example : .. . .. . But instead is it possible to have FILE fp my fopen .. . .. . .. . Where my own function would open a file on disk mmap it maybe change contents and then pass back the FILE without the program seeing anything different except the new my fopen and my fclose .", "Considering that he is interposing the standard memcpy function this will slow down a system a lot .", "You would have to handle the this parameter explicitly of course but I think all ELF ABIs just treat it as an invisible first argument .", "it seems like this method hides its name.. .", "dlsym RTLD NEXT mangled name of function .", "The method is not virtual but apparently neither method works for me : -", "Can you be specific about what happens instead of its working", "I don t think I can deduce what s wrong without more information .", "i got it to work it was a bug", "dlsym works as well .", "thank you", "In your class definition don t mention the other methods you don t want to intercept .", "Remember that LD PRELOAD needs a full path to the intercepting shared object .", "For example to intercept void X : : fn1 create a file libx2.cc with : .. . .. . Then compile it up : .. . .. . Then run ala .. . .. . Cheers", "this seems less hacky .", "i ll try it", "Yikes - only just noticed your question .", "Doh - Zack covered all thank years ago.. . : - .", "I d also like to do this without having to change the way the program is run .", "Thanks .", "How would you do it with LD PRELOAD", "You ll need to write a native module to do the low-level work for you .", "@Matt Joiner : By the way you re asking your question I take it you don t like something I said in which case it would be productive constructive if you could be more specific .", "But anyway I tweaked the question to clarify this .", "Fantastic link thanks .", "This is windows-only at the moment but I don t see any reason it wouldn t work on any x86 machine except for the fact that it uses win32 functions to look up symbol addresses .", "dlsym can do this .", "VirtualProtect : to allow modification of the assembly .", "mprotect .", "GetCurrentProcess : getpid .. . FlushInstructionCache apparently a nop according to the comments .. . .. . It doesn t seem too hard to get this compiled and linked into python but I d send a message to the perftools devs and see what they think .", "Care to explain what assembly is modified", "Please link-to the mentioned source file .", "If it s open for writing it s most likely going through the creat function I m guessing fopen would be redirecting you there .", "The code is : .. . .. . The function gets called succesfully but the first parameter can be whatever and I only want to trace it if the result is a string or array .", "For example it fails for the following pattern : .. . .. . If you want to catch that too you will have to change the above function .", "No you cannot figure this out from a pointer of void type .", "I am interposing the memcpy function in C because the target application uses it to concatenate strings and I want to find out which strings are being created .", "Have you tried stracing the binary to see which file-descriptor the writes are to and where that fd is coming from", "If so you could find where your string-literals are placed and have some info from that .", "I have found an example http : developers.sun.com solaris articles lib interposers code.html XOpenDisplay interpose.c which should do exactly what I am looking for but when I compile it I get the following error messages : .. . .. . XOpenDisplay interpose.c : 14 : Error : conflicting types for XOpenDisplay usr include X11 Xlib.h : 1507 : Error : previous declaration of XOpenDisplay was here .. . .. . Can anyone help me with that problem", "What am I missing", "My program code so far - based on the example mentioned above : .. . .. . Regards Andy .", "The declaration reads like this : .. . .. . Display XOpenDisplay Xconst char display name .. . .. . So just adding a const should suffice .", "Thanks for your help", "I was playing around with memory-mapped files in C and was wondering if there is a way to replace the FILE from fopen with a memory mapped file transparently .", "Is this possible to do without having to rewrite the way the operations are done in the program", "These answers are for ix systems answer for Windows is here : stackoverflow.com questions 7369445 http : stackoverflow.com questions 7369445 is-there-a-windows-equivalent-to-fdopen-for-handles", "Great link thank you", "The purpose of memory-mapped file IO is not to go through system calls for reads and writes but rely on VM buffer cache to do the work .", "If you hide the fact that the file has been memory mapped what is the advantage here", "How would you know at what address the file is mapped", "The perceived advantage for me was the ability to modify existing calls to do what I wish .", "Maybe inserting custom actions before a file is read or change the way it is read in without having to alter existing code .", "I don t understand .", "You can use read-write on a file you have mmaped so your my fopen would look like this", "I am trying to write a program that allows a binary to be run substituting a certain file when requested with another .", "The problem is that it catches opens for reading the substitute file is read instead but writes always go back to the actual specified file .", "Are there any other open system calls I should know about", "Nevermind -- stupid mistake .", "Wasn t checking both absolute and relative paths.. .", "I am not sure what the cause of your problem is but using strace http : sourceforge.net projects strace on your program might give some insight .", "It should be part of any sane Linux distribution .", "Check your fcntl.h for a complete list .", "substituting a certain file when requested with another .. . .. . Sounds like you check only for the input file do you check by filename .", "You need to check and substitute the output file too .", "If you output goes to one of the standard outputs then you need to close and reopen them with your output substitute before you fork into the executable ." ] }
{ "confidence": [ 41.64331817626953, 40.56910705566406, 40.07026672363281, 36.079742431640625, 34.34539794921875, 25.535785675048828, 23.855499267578125, 22.349994659423828, 21.741374969482422, 20.05324935913086, 19.695480346679688, 19.534788131713867, 19.423494338989258, 18.748977661132812, 18.136211395263672, 17.95745277404785 ], "content": [ "Question : I was playing around with memory-mapped files in C and was wondering if there is a way to replace the FILE from fopen with a memory mapped file transparently . Example : .. . .. . But instead is it possible to have FILE fp my fopen .. . .. . .. . Where my own function would open a file on disk mmap it maybe change contents and then pass back the FILE without the program seeing anything different except the new my fopen and my fclose . Is this possible to do without having to rewrite the way the operations are done in the program Comment : These answers are for ix systems answer for Windows is here : stackoverflow.com questions 7369445 http : stackoverflow.com questions 7369445 is-there-a-windows-equivalent-to-fdopen-for-handles .. . Answer : The magic words are library-interposition . Here s a good tutorial : s http : developers.sun.com solaris articles lib interposers.html s .. . .. . .. . .. . When Oracle purchased sun a lot of articles seem to have disappeared and or aren t accessible through Oracle s website . Here s some links that for the time being are functional : .. . .. . This is the original article as published in 2001 : Building Library Interposers for Fun and Profit http : www.drdobbs.com building-library-interposers-for-fun-and 184404926 Dr . Dobbs .. . The developers.sun.com link was a repost by the original author possibly with changes from the 2001 article this is the repost : Debugging and Performance Tuning with Library Interposers https : web.archive.org web 20120626005255 http : developers.sun.com solaris articles lib interposers.html Wayback Machine .. . The Linker Libraries Guide http : docs.oracle.com cd E19120-01 open.solaris 819-0690 chapter3-26 index.html for Sun Studio Oracle Solaris Studio . It covers the topic of library-interposition with more technical details . Comment : Great link thank you", "Question : I need to interpose on a method call in a C++ program the class resides in a separate shared library . I thought I could use LD PRELOAD but i am not sure how this would work i only found examples of C functions : is there a way to setup interposition for a single method without copying over any code from the interposed class implementation .. . Answer : It wouldn t be very portable but you could write your interposing function in C and give it the mangled name of the C++ method . You would have to handle the this parameter explicitly of course but I think all ELF ABIs just treat it as an invisible first argument . Comment : i have the same question for you : how do i call the original C++ method it seems like this method hides its name.. . Comment : dlsym RTLD NEXT mangled name of function . By the way neither my technique nor Tony s will work with virtual-functions but if this were a virtual function you could just override it in a subclass ne Comment : I shouldn t override it because i shouldn t touch the client code which instantiates the object either . The method is not virtual but apparently neither method works for me : - Comment : Can you be specific about what happens instead of its working I don t think I can deduce what s wrong without more information . Comment : i got it to work it was a bug dlsym works as well . thank you", "Question : How do I at run-time no LD PRELOAD intercept hook a C function like fopen on Linux a la Detours for Windows I d like to do this from Python hence I m assuming that the program is already running a CPython VM and also reroute to Python code . I m fine with just hooking shared library functions . I d also like to do this without having to change the way the program is run . One idea is to roll my own tool based on ptrace or on rewriting code found with dlsym or in the PLT and targeting ctypes -generated C-callable functions but I thought I d ask here first . Thanks . Comment : How would you do it with LD PRELOAD Comment : You ll need to write a native module to do the low-level work for you . Even if you manage to access and modify the PLT from Python which is probably possible you ll need code to launch the Python VM . Comment : @Matt Joiner : By the way you re asking your question I take it you don t like something I said in which case it would be productive constructive if you could be more specific . But in case you were really just asking this is how you do function interposition non-dynamically : stackoverflow.com questions 426230 what-is-the-ld-preload-trick http : stackoverflow.com questions 426230 what-is-the-ld-preload-trick and yes I ve applied this many a time before Comment : @Glenn Maynard : Sorry if my question wasn t clear - I mentioned I d like to do this from Python so the assumption is that the VM is already running . But anyway I tweaked the question to clarify this . Manipulating the PLT from Python is precisely what I was getting at with my strawman . Comment : It s not about creating the VM instance it s about calling into it you can t point the PLT at a Python function after all you need to point it at native-code that calls the Python runtime and runs the function you want . .. . Answer : You ll find from one of ltrace developer a way to do this . See this post http : timetobleed.com extending-ltrace-to-make-your-rubypythonperlphp-apps-faster which includes a full patch in order to catch dynamically loaded library . In order to call it from python you ll probably need to make a C module . Comment : Fantastic link thanks .", "Question : I need to interpose on a method call in a C++ program the class resides in a separate shared library . I thought I could use LD PRELOAD but i am not sure how this would work i only found examples of C functions : is there a way to setup interposition for a single method without copying over any code from the interposed class implementation .. . Answer : Just create a file for the interposed code making sure the implementation is out of line .. . the namespaces class name and function should be the same as for the method you want to intercept . In your class definition don t mention the other methods you don t want to intercept . Remember that LD PRELOAD needs a full path to the intercepting shared object . For example to intercept void X : : fn1 create a file libx2.cc with : .. . .. . Then compile it up : .. . .. . Then run ala .. . .. . Cheers Comment : this seems less hacky . i ll try it Comment : by the way how do i call the original method from this new method Comment : Yikes - only just noticed your question . In Linux only you can use dlsym RTLD NEXT name - this explicitly says don t match the searching function and find one in a later-loaded object . For other OS I m not sure but there s got to be some web pages talking about portability from Linux so a RTLD NEXT search s a good bet . Doh - Zack covered all thank years ago.. . : - .", "Question : How do I at run-time no LD PRELOAD intercept hook a C function like fopen on Linux a la Detours for Windows I d like to do this from Python hence I m assuming that the program is already running a CPython VM and also reroute to Python code . I m fine with just hooking shared library functions . I d also like to do this without having to change the way the program is run . One idea is to roll my own tool based on ptrace or on rewriting code found with dlsym or in the PLT and targeting ctypes -generated C-callable functions but I thought I d ask here first . Thanks . Comment : How would you do it with LD PRELOAD Comment : You ll need to write a native module to do the low-level work for you . Even if you manage to access and modify the PLT from Python which is probably possible you ll need code to launch the Python VM . Comment : @Matt Joiner : By the way you re asking your question I take it you don t like something I said in which case it would be productive constructive if you could be more specific . But in case you were really just asking this is how you do function interposition non-dynamically : stackoverflow.com questions 426230 what-is-the-ld-preload-trick http : stackoverflow.com questions 426230 what-is-the-ld-preload-trick and yes I ve applied this many a time before Comment : @Glenn Maynard : Sorry if my question wasn t clear - I mentioned I d like to do this from Python so the assumption is that the VM is already running . But anyway I tweaked the question to clarify this . Manipulating the PLT from Python is precisely what I was getting at with my strawman . Comment : It s not about creating the VM instance it s about calling into it you can t point the PLT at a Python function after all you need to point it at native-code that calls the Python runtime and runs the function you want . .. . Answer : google-perftools has their own implementation of Detour under src windows preamble patcher https : code.google.com p gperftools source browse src windows preamble patcher.cc . This is windows-only at the moment but I don t see any reason it wouldn t work on any x86 machine except for the fact that it uses win32 functions to look up symbol addresses . A quick scan of the code and I see these win32 functions used all of which have linux versions : .. . .. . GetModuleHandle GetProcAddress : get the function address . dlsym can do this . VirtualProtect : to allow modification of the assembly . mprotect . GetCurrentProcess : getpid .. . FlushInstructionCache apparently a nop according to the comments .. . .. . It doesn t seem too hard to get this compiled and linked into python but I d send a message to the perftools devs and see what they think . Comment : Care to explain what assembly is modified Comment : Please link-to the mentioned source file . Comment : code.google.com codesearch BGeH2W13jNw trunk src windows http : code.google.com codesearch BGeH2W13jNw trunk src windows preamble patcher.cc q preamble patcher 20package : http : gperftools 5C.googlecode 5C.com win32 function-calls leave a few instructions at the start of every function-call that can be changed into a jump to whatever function you want .", "Question : I am trying to write a program that allows a binary to be run substituting a certain file when requested with another . It is a library with simple replacements for the system call functions that is used with LD PRELOAD . The problem is that it catches opens for reading the substitute file is read instead but writes always go back to the actual specified file . Are there any other open system calls I should know about Comment : Have you tried stracing the binary to see which file-descriptor the writes are to and where that fd is coming from .. . Answer : Nevermind -- stupid mistake . Wasn t checking both absolute and relative paths.. . Comment : +1 for finding it on your own", "Question : I am trying to write a program that allows a binary to be run substituting a certain file when requested with another . It is a library with simple replacements for the system call functions that is used with LD PRELOAD . The problem is that it catches opens for reading the substitute file is read instead but writes always go back to the actual specified file . Are there any other open system calls I should know about Comment : Have you tried stracing the binary to see which file-descriptor the writes are to and where that fd is coming from .. . Answer : If it s open for writing it s most likely going through the creat function I m guessing fopen would be redirecting you there . Check your fcntl.h for a complete list .", "Question : I am trying to write a program that allows a binary to be run substituting a certain file when requested with another . It is a library with simple replacements for the system call functions that is used with LD PRELOAD . The problem is that it catches opens for reading the substitute file is read instead but writes always go back to the actual specified file . Are there any other open system calls I should know about Comment : Have you tried stracing the binary to see which file-descriptor the writes are to and where that fd is coming from .. . Answer : substituting a certain file when requested with another .. . .. . Sounds like you check only for the input file do you check by filename . You need to check and substitute the output file too . If you output goes to one of the standard outputs then you need to close and reopen them with your output substitute before you fork into the executable . To find all system calls that your executable makes you can use strace http : en.wikipedia.org wiki Strace . To find all library calls that your executable makes you can use ltrace http : en.wikipedia.org wiki Ltrace .", "Question : I am trying to write a program that allows a binary to be run substituting a certain file when requested with another . It is a library with simple replacements for the system call functions that is used with LD PRELOAD . The problem is that it catches opens for reading the substitute file is read instead but writes always go back to the actual specified file . Are there any other open system calls I should know about Comment : Have you tried stracing the binary to see which file-descriptor the writes are to and where that fd is coming from .. . Answer : I am not sure what the cause of your problem is but using strace http : sourceforge.net projects strace on your program might give some insight . It should be part of any sane Linux distribution .", "Question : I am interposing the memcpy function in C because the target application uses it to concatenate strings and I want to find out which strings are being created . The code is : .. . .. . The function gets called succesfully but the first parameter can be whatever and I only want to trace it if the result is a string or array . I would have to ask if it is array or string . I know this can t be done straightforward : is there anyway to find out what RET points to I am working under MACOSX and interpositioning with DYLD . Thank you very much . Comment : Do you have access to a map file If so you could find where your string-literals are placed and have some info from that . Same for global arrays . Comment : You should not call printf in your function since printf is very complicated and may itself call memcpy again . Instead I would go for a simple write or writev . Or you may add some thread-safe activation counter that only does the printf part if isn t already active . .. . Answer : ret is equal to the destination pointer . But it s not possible to determine whether it s an array or a string unless you know more information about the array or string for instance that the string is of a certain length and is null-terminated .", "Question : I am interposing the memcpy function in C because the target application uses it to concatenate strings and I want to find out which strings are being created . The code is : .. . .. . The function gets called succesfully but the first parameter can be whatever and I only want to trace it if the result is a string or array . I would have to ask if it is array or string . I know this can t be done straightforward : is there anyway to find out what RET points to I am working under MACOSX and interpositioning with DYLD . Thank you very much . Comment : Do you have access to a map file If so you could find where your string-literals are placed and have some info from that . Same for global arrays . Comment : You should not call printf in your function since printf is very complicated and may itself call memcpy again . Instead I would go for a simple write or writev . Or you may add some thread-safe activation counter that only does the printf part if isn t already active . .. . Answer : You can first apply some heuristics to the copied memory and based on that you can decide whether you want to print it . This heuristic is not perfect . For example it fails for the following pattern : .. . .. . If you want to catch that too you will have to change the above function . Comment : Considering that he is interposing the standard memcpy function this will slow down a system a lot . Not to mention that memory can contain any binary-data including all bytes in ASCII range which does not mean it is string . Comment : You re right : When every byte is in ASCII range and not 0 the memory doesn t contain a string . That s what the return 0 in the last line is for . But otherwise the original poster sounded more like doing this out of curiosity and not for production use so the slowdown is probably acceptable . I don t think printing a few extra strings hurts I just wanted to make sure the terminal doesn t get confused by accidental control-characters . Therefore the check for unusual ASCII control-characters .", "Question : I am interposing the memcpy function in C because the target application uses it to concatenate strings and I want to find out which strings are being created . The code is : .. . .. . The function gets called succesfully but the first parameter can be whatever and I only want to trace it if the result is a string or array . I would have to ask if it is array or string . I know this can t be done straightforward : is there anyway to find out what RET points to I am working under MACOSX and interpositioning with DYLD . Thank you very much . Comment : Do you have access to a map file If so you could find where your string-literals are placed and have some info from that . Same for global arrays . Comment : You should not call printf in your function since printf is very complicated and may itself call memcpy again . Instead I would go for a simple write or writev . Or you may add some thread-safe activation counter that only does the printf part if isn t already active . .. . Answer : No you cannot figure this out from a pointer of void type . Plus you don t know the size of source or destination so the heuristic approach will not work . It will not work due to other reasons as well for example binary-data stored in memory region pointed by void can really have zero byte at the end but that doesn t mean that it is string .", "Question : I was playing around with memory-mapped files in C and was wondering if there is a way to replace the FILE from fopen with a memory mapped file transparently . Example : .. . .. . But instead is it possible to have FILE fp my fopen .. . .. . .. . Where my own function would open a file on disk mmap it maybe change contents and then pass back the FILE without the program seeing anything different except the new my fopen and my fclose . Is this possible to do without having to rewrite the way the operations are done in the program Comment : These answers are for ix systems answer for Windows is here : stackoverflow.com questions 7369445 http : stackoverflow.com questions 7369445 is-there-a-windows-equivalent-to-fdopen-for-handles .. . Answer : I don t understand . You can use read-write on a file you have mmaped so your my fopen would look like this", "Question : I was playing around with memory-mapped files in C and was wondering if there is a way to replace the FILE from fopen with a memory mapped file transparently . Example : .. . .. . But instead is it possible to have FILE fp my fopen .. . .. . .. . Where my own function would open a file on disk mmap it maybe change contents and then pass back the FILE without the program seeing anything different except the new my fopen and my fclose . Is this possible to do without having to rewrite the way the operations are done in the program Comment : These answers are for ix systems answer for Windows is here : stackoverflow.com questions 7369445 http : stackoverflow.com questions 7369445 is-there-a-windows-equivalent-to-fdopen-for-handles .. . Answer : The purpose of memory-mapped file IO is not to go through system calls for reads and writes but rely on VM buffer cache to do the work . If you hide the fact that the file has been memory mapped what is the advantage here How would you know at what address the file is mapped Comment : The perceived advantage for me was the ability to modify existing calls to do what I wish . Maybe inserting custom actions before a file is read or change the way it is read in without having to alter existing code .", "Question : I am interposing the memcpy function in C because the target application uses it to concatenate strings and I want to find out which strings are being created . The code is : .. . .. . The function gets called succesfully but the first parameter can be whatever and I only want to trace it if the result is a string or array . I would have to ask if it is array or string . I know this can t be done straightforward : is there anyway to find out what RET points to I am working under MACOSX and interpositioning with DYLD . Thank you very much . Comment : Do you have access to a map file If so you could find where your string-literals are placed and have some info from that . Same for global arrays . Comment : You should not call printf in your function since printf is very complicated and may itself call memcpy again . Instead I would go for a simple write or writev . Or you may add some thread-safe activation counter that only does the printf part if isn t already active . .. . Answer : As void represents a raw block of memory there is no way to determine what actual data lies there . However you can make a string-like memory-dump on every operation just give the resulting output some sort of the upper output limit . This could be implemented the following way : .. . .. . For non-string like data the output would be hardly interpretable but otherwise you d get what you were searching for . .. . .. . You could attempt to apply some guess-based approach like iterating through reinterpret-cast void memory and making is alphanumeric is space checks to every symbol but this approach doesn t seem very stable who knows what could actually lie in that void .. . . Anyway for some situations that might be fine . Comment : What if memory region is less than 32 bytes Or less than 5 How do you know what upper limit to use Well at least you can use num for that but this number might be less than actual memory region size . Comment : @Vlad Ok we ll have a dump of 5 actual bytes and everything that goes after it . I m almost sure this can t lead to access faults in debug mode and so on . It s also obvious that you can t have a good-enough approach if you only have void pointer and nothing else but why not give it a try.. . Comment : @HardCoder1986 : Oh yes it can SEGFAULT your program easily due to accessing protected memory . Comment : @Vlad Oh I doubt that . Speaking this way debuggers that receive pointer to non-null-terminated char sequence should also segfault . Comment : You can try peeking into the heap to find the size of the allocated block . Try checking long source -1 and see what the value is .", "Question : I am working on a project where I need to change the behaviour of the XOpenDisplay function defined in X11 Xlib.h . I have found an example http : developers.sun.com solaris articles lib interposers code.html XOpenDisplay interpose.c which should do exactly what I am looking for but when I compile it I get the following error messages : .. . .. . XOpenDisplay interpose.c : 14 : Error : conflicting types for XOpenDisplay usr include X11 Xlib.h : 1507 : Error : previous declaration of XOpenDisplay was here .. . .. . Can anyone help me with that problem What am I missing My program code so far - based on the example mentioned above : .. . .. . Regards Andy . .. . Answer : The declaration reads like this : .. . .. . Display XOpenDisplay Xconst char display name .. . .. . So just adding a const should suffice . Comment : Thanks for your help" ] }
[ "yes-answer-long", "yes-answer-short" ]
implementation
UNK_RELATION
scalacheck@java@85
scalacheck -- scalacheck is a powerful tool for automatic unit-testing of scala and @placeholder programs .
{ "confidence": [ 53.97490692138672, 51.26580047607422, 47.458534240722656, 46.436954498291016, 44.14132308959961, 44.1141357421875, 42.62531280517578, 42.31180191040039, 41.622196197509766, 41.59831619262695, 41.59831619262695, 41.23863983154297, 41.23863983154297, 40.871498107910156, 40.871498107910156, 40.07335662841797, 40.07335662841797, 40.07335662841797, 39.89125442504883, 39.89125442504883, 39.89125442504883, 39.89125442504883, 39.89125442504883, 39.89125442504883, 39.822025299072266, 38.7587776184082, 38.748863220214844, 38.528018951416016, 38.528018951416016, 38.4158935546875, 38.366294860839844, 38.31954574584961, 38.31954574584961, 38.31954574584961, 38.31954574584961, 37.283416748046875, 36.612483978271484, 36.612483978271484, 36.612483978271484, 36.612483978271484, 36.45501708984375, 35.926116943359375, 35.608314514160156, 34.878135681152344, 34.878135681152344, 34.12270736694336, 33.90306091308594, 33.90306091308594, 33.90306091308594, 33.90306091308594, 33.90306091308594, 33.90306091308594, 33.90125274658203, 33.75203323364258, 33.75203323364258, 32.75370788574219, 32.4286994934082, 32.19599914550781, 32.19599914550781, 32.19599914550781, 32.19599914550781, 32.19599914550781, 32.19599914550781, 32.19599914550781, 32.19599914550781, 32.19599914550781, 32.19599914550781, 31.20008087158203, 31.20008087158203, 31.20008087158203, 31.063526153564453, 30.724594116210938, 30.721637725830078, 29.706222534179688, 29.706222534179688, 29.706222534179688, 29.706222534179688, 29.706222534179688, 29.58916473388672, 29.493019104003906, 29.493019104003906, 29.493019104003906, 29.493019104003906, 28.47940444946289, 28.114046096801758, 27.437713623046875, 27.437713623046875, 27.36221694946289, 27.00324249267578, 26.726062774658203 ], "content": [ "What is the standard approach to deal with this kind of programs in ScalaCheck", "With ScalaCheck.. .", "ScalaCheck generators work with the syntactic-sugar in Scala s for expressions : .. . .. . I d like to be able to mix traditional Scala for expressions with ScalaCheck expressions .", "The actual implementation https : github.com rickynils scalacheck blob master src main scala org scalacheck Gen.scala L376 of Gen.option is the one-line version of my answer so I ll let it for the sake of learning scalacheck .", "I d like to be able to mix traditional Scala for expressions with ScalaCheck expressions .", "Downgrading to scalacheck 1.12.5 helps .", "When I use Shrink in my scalacheck test scalacheck only print arguments after shrink that failed my test case .", "ScalaTest 2.2.6 is incompatible with ScalaCheck 1.13.0 .", "I m trying to replace some old unit tests with property based testing PBT concreteley with scala and scalatest - scalacheck but I think the problem is more general .", "Is there a way to generate human-readable strings with Scalacheck", "How to use ScalaCheck to get this for-comprehension or mapOfN", "There is a shapeless based Scalacheck library https : github.com alexarchambault scalacheck-shapeless what you might be looking for", "github.com alexarchambault scalacheck-shapeless issues 1 https : github.com alexarchambault scalacheck-shapeless issues 1 yup I d like that .", "Is there any way to make scalacheck also print the original arguments before shrink", "Is there a way to generate random dates for property tests using Scalacheck .", "I just went to Ricky Nils code github.com rickynils scalacheck https : github.com rickynils scalacheck and I am afraid you are right .", "This is a question related to question StackOverflowError to check expression with signal in ScalaCheck http : stackoverflow.com questions 37886990 stackoverflowerror-to-check-expression-with-signal-in-scalacheck noredirect 1 comment63229751 37886990 .", "I just found out that Gen option T was introduced with version 1.11.5 of scalacheck - see here https : github.com rickynils scalacheck commit 35c8309e7b52eff910dbc6bb1bc727c31ffed07d .", "I m trying to generate random data with Scalacheck .", "Hi so im completely new to scalacheck .", "Im working with scalatest and scalacheck alsso working with FeatureSpec .", "I use scalacheck with sbt on my project .", "In one of the assignments I need to use a scalacheck class .", "This was reported as https : github.com rickynils scalacheck issues 217 .", "I think the same is true for ScalaCheck .", "I want to test a generic stack with scalatest and scalacheck .", "To verify I ran an intentionally false ScalaCheck Prop in a small application with 33 FlatSpec tests and 2 ScalaCheck Props and got", "The function could be trivially fixed by making sure it always returns a Boolean as follows : .. . .. . This results in the implicit Boolean Prop https : github.com rickynils scalacheck blob 148eaad7706cebcc520e3c1289ff7b4447efa4e8 src main scala org scalacheck Prop.scala L345 function being applied and the code compiles .", "You could just simplify your property to : .. . .. . As this isn t a scalacheck-specific problem but rather a general Scala one it isn t specifically covered in the scalacheck documentation you can read up on implicit views http : www.scala-lang.org old node 130 for more background .", "I m new into Scala Scalacheck and specs2 so bear with me if maybe question is kind of obvious .", "I m finding using specs2 with scalacheck to verify the Monoid laws a bit ugly when trying to make use of the scalaz scalacheck-binding library .", "I want to simulate device readings using a ScalaCheck generators .", "The flame graph indicate that the time is spent in lambdas in the Scalacheck implementation .", "Postgres doesn t accept all kind of symbols that Scalacheck arbString generates .", "I am trying to generate optional-parameters in ScalaCheck without success .", "I have a scala project which contains specs2 scalacheck specifications for a java project .", "Im using scalacheck so I will be able to use Generators .", "I am trying to get PlaySpec and Scalacheck to play nicely together .", "I m trying to generate a list of arbitrary UUIDs using scalacheck version 1.12.2 .", "This is a known issue https : github.com rickynils scalacheck issues 129 .", "The problem is that the second version is simply declaring a val that holds a reference to the property in question but that isn t enough to get scalacheck to evaluate it .", "I am trying to write a generic law for Functors in scala in a format that I could reuse for many functors in scalacheck tests .", "I would like to capture Ranges with a given size and testing elements within that range - the idea being that I want ScalaCheck to generate the Range boundaries for me .", "If you define your own shapeless.Generic instances for your Java classes shapeless-scalacheck https : github.com alexarchambault scalacheck-shapeless can derive the Arbitrary instances for you .", "Eventually I had to put in a hard block to the depth of the recursion and this is what I guess I ll be doing when using scalacheck on recursive data-structures in the future : .. . .. . With this change scalacheck never runs into a StackOverflowError .", "I m trying to use the scalacheck property generators in a scalatest.FlatSpec test file .", "Every constraint you put on a ScalaCheck generator means more potential inputs that aren t being checked .", "Taking this example right from the User Guide of Scalacheck : .. . .. . I d like to see the actual value that caused the test to fail .", "In this case no value caused the test to fail but ScalaCheck gave up because it could not find enough values to try .", "I m using ScalaCheck within ScalaTest and ScalaTest must think that this is an error when in fact it is not... .", "The preferred generator is @stholzm solution : .. . .. . it is simpler the numbers fed to ScalaCheck will be more evenly distributed it is faster and it passes the tests .", "In ScalaCheck it seems that a mapped flatMapped Gen will fail as soon as any inner gen has a value filtered out .", "I really appreciate working with scalacheck when testing either services where a single instance implementing the tested trait is associated with a suite or non-polymorphic types .", "I have 2 questions .. . .. . I am trying to learn scalacheck .. . .. . Question 1 .. . .. . Here is the test I am writing which is throwing the error .", "The official scalacheck documentation gives the following example : .. . .. . I read that this can also be written as : .. . .. . How can I run the second form of test code", "The signature of Prop.forAll https : github.com rickynils scalacheck blob 148eaad7706cebcc520e3c1289ff7b4447efa4e8 src main scala org scalacheck Prop.scala L882-L890 being called requires a function returning Prop or at least something that can be implicitly converted to Prop but as written the function : .. . .. . has an inferred signature of String Int Int Int AnyVal and there does not exist an implicit-conversion into a property .", "This is what I came up with : .. . .. . As noted Scalacheck number generator between 0 x 2 64 http : stackoverflow.com questions 37898802 scalacheck-number-generator-between-0-x-264 37901215 comment63495039 37901215 the distribution of the BigInts generated is not even .", "I have a Java class MyClass and I want to create an Arbitrary MyClass in Scalacheck .", "This uglyness makes me think I m missing something or mis-using Specs2 or scalacheck-binding API s .", "I get no output like I would if using Scalacheck directly telling me which laws it ran and passed .", "This program fails with a StackOverflowError before scalacheck takes over while constructing the Arbitrary value .", "Why does it seem that scalacheck generators are so sensitive to minor changes that shouldn t affect the control-flow of the generators", "When ScalaCheck finds some data falsifying a property it will then try to shrink the data to find a smaller counter-example .", "Another solution is to specify a postcondition on the generator with suchThat https : github.com rickynils scalacheck commit 2d92eb6 .", "I m facing a nasty exception when trying to write a test using ScalaCheck and ScalaTest .", "Therefore there are no guarantees that you can simply swap out ScalaCheck 1.12.x for 1.13.y .", "ScalaCheck only maintains binary compatibility within the same minor version series 1.12.1 1.12.2 1.12.3 etc .", "I want to create a generator in ScalaCheck that generates numbers between say 1 and 100 but with a bell-like bias towards numbers closer to 1 .", "I need to generate a random list of numbers of a given size whose total is less than a given fixed threshold using ScalaCheck .", "Generate a Long as BigInt and shift left arbitrarily to make an UINT64 .. . .. . Works : Taking Rickard Nilsson s ScalaCheck code as a guide this passed the test .", "You should instead read up on how to test stateful systems with ScalaCheck : .. . .. . http : www.scalacheck.org files scaladays2014 index.html", "I split off the second half of the original into a separate StackOverflow question : stackoverflow.com questions 38284055 http : stackoverflow.com questions 38284055 why-does-a-scalacheck-prop-value-not-get-evaluated", "This is what i ve done : - .. . .. . I m using specs2 3.7 with scalaz 2.7.0 .. . .. . Reading the user guide at http : etorreborre.github.io specs2 guide SPECS2-3.0 org.specs2.guide.UseScalaCheck.html I have extended my spec with the Scalacheck trait and I have an Arbitrary MyType in scope so I should be able to use scalacheck OK .", "I have read that ScalaCheck is now starting to include generation of events to test a statefull system .", "It seems to me that what the ScalaCheck library does it somehow the opposite of Parser Combinators in that it combines generators instead of parsers .", "Is there already a way to generate strings using the Parser Combinators or ScalaCheck or is there a straightforward way of transforming a Parser Combinator into a generator", "UPDATE : it seems something to do with scalacheck because following not-property-based test is also green :", "For example : .. . .. . I should not need to tell scalacheck how to build lists of int I think .", "I discovered an issue in Scalacheck https : github.com rickynils scalacheck issues 124 whereby arbitrary BigDecimal would generate BigDecimal s which could not be converted to String s and then back into BigDecimal s and I m trying to work with the creator to find a fix for it but I m unsure of how the MathContext s come into play .", "Is there a better way to test using Specs2 and the scalaz scalacheck-bindings that is less ugly and outputs info that give me confidence that Laws were tried and tested", "I m seeing what seems to be a very obvious bug with scalacheck such that if it s really there I can t see how people use it for recursive data-structures .", "My reading of that is that you might need to have multiple instances of Gen so Arbitrary is used to flag the one that you want ScalaCheck to use", "I m implementing Shrink instances https : github.com rickynils scalacheck wiki User-Guide test-case-minimisation for my case classes .", "I m testing my own home-brewed Monoid classes in scala using the ScalaCheck library and ScalaTest .. . .. . when attempting to implement DRY tests I get the implicit error in the title : .. . .. . here is the implementation of intAddition Monoid : .. . .. . And the test suite : .. . .. . This code compiles but fails at runtime runtime type-erasure .", "I m specifically trying to define Semigroup and a Sum type which is a Semigroup and check the Associative property of Semigroup generically using ScalaCheck .", "A more idiomatic fix would be to rewrite the property using the implication operator : .. . .. . However it is not a good idea to reject too much of the generated input and since the very first value that scalacheck generates is in fact null the property ends up as undecided so the test still fails .", "This was originally asked under stackoverflow.com questions 35886206 http : stackoverflow.com questions 35886206 no-implicit-view-available-from-anyval-org-scalacheck-prop-error-property 38283963 but I split off the second question here as it was not directly related to the first problem .", "The original generator https : github.com rickynils scalacheck blob f1e0206d7d2fa5a5b8d2137c0f6c5c462ebd1eab src main scala org scalacheck Arbitrary.scala L185-L202 looks like this : .. . .. . The problem lies within the fact that the BigDecimal constructor used http : docs.oracle.com javase 7 docs api java math BigDecimal.html BigDecimal 28java.math.BigInteger 20int 20java.math.MathContext 29 inverts the sign of the scale argument thereby making Int.MinValue turn into a scale bigger than 2 32 -1 .", "However I have seen some issues where the most recent versions of ScalaCheck and ScalaTest are not fully integrated and maybe you want some new feature .", "As Jubobs already explained you cannot .. . .. . mix traditional Scala for expressions with ScalaCheck expressions .. . .. . However you could achieve the described result with a somewhat less idiomatic approach using an index : .. . .. . Though you would have to be cautious about when and where to instantiate a Generator like this as the count var will not be reset for every property check ." ] }
{ "confidence": [ 60.56617736816406, 52.518646240234375, 52.33833312988281, 51.907447814941406, 51.593833923339844, 51.38486099243164, 51.11214828491211, 50.52028274536133, 50.368106842041016, 49.96464538574219, 49.52141571044922, 49.51720428466797, 48.965179443359375, 48.36431121826172, 48.11626434326172, 47.81768798828125, 47.639583587646484 ], "content": [ "Question : I have 2 questions .. . .. . I am trying to learn scalacheck .. . .. . Question 1 .. . .. . Here is the test I am writing which is throwing the error . Can you please point to which page from docmentation i should read to understand reason behind this error . Test is .. . .. . Error is .. . .. . Question 2 .. . .. . The official documentation gives one example test class as .. . .. . I also read that it can be written as .. . .. . How can i run the second form of test code as when i run sbt test nothing happens for second version . Both of the above snippets are in Comment : I split off the second half of the original into a separate StackOverflow question : stackoverflow.com questions 38284055 http : stackoverflow.com questions 38284055 why-does-a-scalacheck-prop-value-not-get-evaluated .. . Answer : The signature of Prop.forAll https : github.com rickynils scalacheck blob 148eaad7706cebcc520e3c1289ff7b4447efa4e8 src main scala org scalacheck Prop.scala L882-L890 being called requires a function returning Prop or at least something that can be implicitly converted to Prop but as written the function : .. . .. . has an inferred signature of String Int Int Int AnyVal and there does not exist an implicit-conversion into a property . Hence the compilation error . The function could be trivially fixed by making sure it always returns a Boolean as follows : .. . .. . This results in the implicit Boolean Prop https : github.com rickynils scalacheck blob 148eaad7706cebcc520e3c1289ff7b4447efa4e8 src main scala org scalacheck Prop.scala L345 function being applied and the code compiles . A more idiomatic fix would be to rewrite the property using the implication operator : .. . .. . However it is not a good idea to reject too much of the generated input and since the very first value that scalacheck generates is in fact null the property ends up as undecided so the test still fails . You could just simplify your property to : .. . .. . As this isn t a scalacheck-specific problem but rather a general Scala one it isn t specifically covered in the scalacheck documentation you can read up on implicit views http : www.scala-lang.org old node 130 for more background .", "Question : null .. . Answer : I ve just started toying with ScalaCheck and wanted to test some monadic code . I ve been reading the user guide https : github.com rickynils scalacheck wiki User-Guide and some documentation from other sources but couldn t find something equivalent to pre assert monadic etc . Test.QuickCheck.Monadic.PropertyM https : hackage.haskell.org package QuickCheck-2.8.1 docs Test-QuickCheck-Monadic.html from Haskell s QuickCheck . I find that module very useful to improve monadic property composition and readability of properties . What is the standard approach to deal with this kind of programs in ScalaCheck", "Question : I am trying to generate optional-parameters in ScalaCheck without success . There seems to be no direct mechanism for this . Gen.containerOf Option Thing thingGenerator fails because it cannot find an implicit Buildable Thing Option . I tried .. . .. . But this doesn t work because listOfN produces a list that is always of length N . As a result I always get a Some Thing . Similarly listOf1 does not work because a it doesn t produce empty lists but also b it is inefficient because I can t set a max limit on the number of elements . How can I generate Option Thing that includes Nones EDIT : I have found a solution but it is not succinct . Is there a better way than this EDIT 2 : I generalised this to .. . .. . So I don t have to write it more than once . But surely this is in the library already and I just missed it Comment : About EDIT 2 . I just found out that Gen option T was introduced with version 1.11.5 of scalacheck - see here https : github.com rickynils scalacheck commit 35c8309e7b52eff910dbc6bb1bc727c31ffed07d . The method will return either an instance of Some T or None with equal probability . .. . Answer : You can use pick to randomly choose between a Some and a None generator : Comment : See new solution using Gen.option Comment : @douglaz Nice update . The actual implementation https : github.com rickynils scalacheck blob master src main scala org scalacheck Gen.scala L376 of Gen.option is the one-line version of my answer so I ll let it for the sake of learning scalacheck . However your answer is certainly better .", "Question : null .. . Answer : I have a method that is able to persist any type as long as that type has a io.circe.Encoder A instance something like this : .. . .. . def persist A a : A implicit ea : Encoder A : Boolean .. . .. . Now while testing this I can create any old case class or set of case classes under a sealed trait creating an ADT and use automatic typeclass derivation to create the Encoder and also to create the ScalaCheck Arbitrary instance making this very nice to test . Is it possible perhaps to use Shapeless in some way to create arbitrary families of case classes and therefore automatically derive Encoder and Arbitrary instances so that I can be sure my persist method works with any type I have no idea where to even start with this one let alone try and describe a type for this . Comment : Parametricity says that this shouldn t be necessary but in practice I agree that it would be kind of handy sometimes . Comment : github.com alexarchambault scalacheck-shapeless issues 1 https : github.com alexarchambault scalacheck-shapeless issues 1 yup I d like that . Comment : It s on my TODO list .", "Question : null .. . Answer : I have a Java class MyClass and I want to create an Arbitrary MyClass in Scalacheck . An implementation of Arbitrary for MyClass will just call arbitrary T for each of the constructor arguments and then do new MyClass with all the args : .. . .. . The constructor takes many fields and I expect to have to do this for other classes in the future . How can I avoid a giant for-comprehension Is there a way to derive an Arbitrary MyClass It looks like the Shapeless library can derive these type classes for Scala case classes but as far as I can tell it doesn t work for Java classes . Comment : If you define your own shapeless.Generic instances for your Java classes shapeless-scalacheck https : github.com alexarchambault scalacheck-shapeless can derive the Arbitrary instances for you . This doesn t necessarily help you in terms of boilerplate line count though .", "Question : I m seeing what seems to be a very obvious bug with scalacheck such that if it s really there I can t see how people use it for recursive data-structures . This program fails with a StackOverflowError before scalacheck takes over while constructing the Arbitrary value . Note that the Tree type and the generator for Tree s is taken verbatim from this scalacheck tutorial http : lamp.epfl.ch files content sites lamp files teaching progfun ScalacheckTutorial.html . What s stranger is that changes that shouldn t affect anything seem to alter the program so that it works . For example if you change the definition of trees to this it passes without any problem : .. . .. . Even stranger if you alter the binary-tree structure so that the value is stored on Node s and not on Leaf s and alter the leafs and nodes definition to be : .. . .. . It also then works fine . What s going on here Why is constructing the Arbitrary value initially causing a stack-overflow Why does it seem that scalacheck generators are so sensitive to minor changes that shouldn t affect the control-flow of the generators Why isn t my expression above with the oneOf 0 1 exactly equivalent to the original oneOf leafs nodes Comment : Speculation : could it be that your first trees always evaluates both arguments while the one using if doesn t Comment : It s a shame oneOf is indeed strict : scalacheck.googlecode.com svn artifacts 1.7 doc api org http : scalacheck.googlecode.com svn artifacts 1.7 doc api org scalacheck Gen 24.html .. . Answer : The problem is that when Scala evaluates trees it ends up in an endless recursion since trees is defined in terms of itself via nodes . However when you put some other expression than trees as the first part of your for-expression in nodes Scala will delay the evaluation of the rest of the for-expression wrapped up in chains of map and flatMap calls and the infinite recursion will not happen . Just as pedrofurla says if oneOf was non-strict this would probably not happen since Scala wouldn t evaluate the arguments immediately . However you can use Gen.lzy to be explicit about the lazyness . lzy takes any generator and delays the evaluation of that generator until it is really used . So the following change solves your problem : Comment : This still fails about one third of the time inside the scalacheck code but it does answer my question as asked and does move the StackOverflowError out of the creation of the Arbitrary object and into where it s being evaluated . Accepting this answer but I ll post what I eventually had to do separately to help people who find this by web search .", "Question : null .. . Answer : When I use Shrink in my scalacheck test scalacheck only print arguments after shrink that failed my test case . Is there any way to make scalacheck also print the original arguments before shrink Thanks Comment : I think in most cases you would fix the test case for the shrunk arguments and then run it again . This will either fix the more complicated case or the more complicated case will not be able to be shrunk and those arguments will be printed . Is there a reason that this workflow doesn t work for you Comment : The problem is : I wrote a custom Shrink and wanna check if it works properly", "Question : I m facing a nasty exception when trying to write a test using ScalaCheck and ScalaTest . Here s my dependencies : .. . .. . Here s my test : .. . .. . When I try to run this I m getting : .. . .. . What am I missing here .. . Answer : ScalaTest 2.2.6 is incompatible with ScalaCheck 1.13.0 . Downgrading to scalacheck 1.12.5 helps . This was reported as https : github.com rickynils scalacheck issues 217 . The issue is closed with following resolution : .. . .. . All current releases of ScalaTest 2.2.6 3.0.0 etc are built against ScalaCheck 1.12.1 see https : github.com scalatest scalatest blob master project scalatest.scala L134 . Therefore there are no guarantees that you can simply swap out ScalaCheck 1.12.x for 1.13.y . ScalaCheck only maintains binary compatibility within the same minor version series 1.12.1 1.12.2 1.12.3 etc . Comment : Thanks a lot marking this as an answer Comment : Thanks . This saved me lots of painful time .", "Question : I m implementing Shrink instances https : github.com rickynils scalacheck wiki User-Guide test-case-minimisation for my case classes . It seems to me that a macro could do the job . Has someone implemented one yet .. . Answer : Yes they have shapeless-contrib https : github.com typelevel shapeless-contrib has an instance https : github.com typelevel shapeless-contrib blob v0.3 scalacheck main scala package.scala L43 of Shapeless https : github.com milessabin shapeless s TypeClass for Shrink : .. . .. . This is supported by macros but only the ones that Shapeless uses for its Generic machinery . Comment : Thanks It can even generate Arbitrary s .", "Question : null .. . Answer : I discovered an issue in Scalacheck https : github.com rickynils scalacheck issues 124 whereby arbitrary BigDecimal would generate BigDecimal s which could not be converted to String s and then back into BigDecimal s and I m trying to work with the creator to find a fix for it but I m unsure of how the MathContext s come into play . The original generator https : github.com rickynils scalacheck blob f1e0206d7d2fa5a5b8d2137c0f6c5c462ebd1eab src main scala org scalacheck Arbitrary.scala L185-L202 looks like this : .. . .. . The problem lies within the fact that the BigDecimal constructor used http : docs.oracle.com javase 7 docs api java math BigDecimal.html BigDecimal 28java.math.BigInteger 20int 20java.math.MathContext 29 inverts the sign of the scale argument thereby making Int.MinValue turn into a scale bigger than 2 32 -1 . The core of the fix is to increase the lower-bound by the number of digits in the unscaledVal but I only thought of a way to do it with only MathContext.UNLIMITED . I fear we miss out on generator robustness if we do that : .. . .. . So if we want to keep using the other MathContext s what do we have to do to ensure we use them correctly Comment : If you believe this to be a bug in the Scala library you should file it at issues.scala-lang.org and have the discussion about fixes there . Comment : @RexKerr It s not a Scala bug . You can reproduce this in Java : ideone.com ZNOQ1Q http : ideone.com ZNOQ1Q Comment : Sure but it could be interpreted as a bug that Scala doesn t work around it . If we re happy to say it s Java s fault and leave it at that then don t file a bug report or maybe if you do it will be closed as wontfix reason--Java should fix it on their end .", "Question : null .. . Answer : In Scala I have a grammar implemented using the Parser Combinators library . Now what I want to do is generate random strings given a grammar from the parser-combinators library . It seems to me that what the ScalaCheck library does it somehow the opposite of Parser Combinators in that it combines generators instead of parsers . Is there already a way to generate strings using the Parser Combinators or ScalaCheck or is there a straightforward way of transforming a Parser Combinator into a generator", "Question : null .. . Answer : This is a question related to question StackOverflowError to check expression with signal in ScalaCheck http : stackoverflow.com questions 37886990 stackoverflowerror-to-check-expression-with-signal-in-scalacheck noredirect 1 comment63229751 37886990 . I need to generate a map of String - Expression . The map should be self-explained kind of closure i.e . any string in expression should have an item in the map . How to use ScalaCheck to get this for-comprehension or mapOfN", "Question : I m trying to right a good number generator that covers uint64 t in C . Here is what I have so far . It is a good start but it only generates numbers 2 n - 1 . Is there a more effective way to generate random BigInts while preserving the number range 0 n 2 64 .. . Answer : With ScalaCheck.. . Generating a number from 0..Long.MaxValue is easy . Generating an unsigned long from 0..Long.MaxValue..2 64-1 is not so easy . Tried : .. . .. . Gen.chooseNum BigInt 0 BigInt 2 .pow 64 -1 .. . .. . Does not work : At this time there is not an implicit defined for BigInt . Arbitrary.arbBigInt.arbitrary .. . .. . Does not work : It s type BigInt but still limited to the range of signed Long . Generate a Long as BigInt and shift left arbitrarily to make an UINT64 .. . .. . Works : Taking Rickard Nilsson s ScalaCheck code as a guide this passed the test . This is what I came up with : .. . .. . As noted Scalacheck number generator between 0 x 2 64 http : stackoverflow.com questions 37898802 scalacheck-number-generator-between-0-x-264 37901215 comment63495039 37901215 the distribution of the BigInts generated is not even . The preferred generator is @stholzm solution : .. . .. . it is simpler the numbers fed to ScalaCheck will be more evenly distributed it is faster and it passes the tests . Comment : For readability i.e . as to the significance of the 18.. . number why not write BigInt 2 .pow 64 rather than a String Comment : So I copied your code verbatim and I got this error : could not find implicit value for parameter num : Numeric Any Comment : If I change the 0 to BigInt 0 I get could not find implicit value for parameter c : org.scalacheck.Gen.Choose scala.math.BigInt Comment : I just went to Ricky Nils code github.com rickynils scalacheck https : github.com rickynils scalacheck and I am afraid you are right . ChooseNum doesn t take a BigInt so it won t work . However there is a chooseBigInt ahah . I ll change my answer in just a bit . : Comment : Gen.chooseReallyBigInt needs to be changed to Arbitrary.arbBigInt.arbitrary that seems to work . When you change that I ll award you the answer", "Question : I m trying to use the scalacheck property generators in a scalatest.FlatSpec test file . The test should fail and be reported by junit framework and eclipse in my case but the test pass and error is just displayed in console . The output is the following .. . .. . I was expecting that the error is bubbled up to the junit framework . I m having the following dependencies : .. . Answer : For many people raisercostin s answer should be good enough . However I have seen some issues where the most recent versions of ScalaCheck and ScalaTest are not fully integrated and maybe you want some new feature . However one of the nice things about using a tool like sbt is that you can run both side-by-side . This may not be the best way to do it but you can have your FlatSpec tests in one file and your ScalaCheck Props in another one say like SetsTest2 and SetsProps2 . Then when you run sbt test it should just run all your tests and return correctly To verify I ran an intentionally false ScalaCheck Prop in a small application with 33 FlatSpec tests and 2 ScalaCheck Props and got", "Question : I m seeing what seems to be a very obvious bug with scalacheck such that if it s really there I can t see how people use it for recursive data-structures . This program fails with a StackOverflowError before scalacheck takes over while constructing the Arbitrary value . Note that the Tree type and the generator for Tree s is taken verbatim from this scalacheck tutorial http : lamp.epfl.ch files content sites lamp files teaching progfun ScalacheckTutorial.html . What s stranger is that changes that shouldn t affect anything seem to alter the program so that it works . For example if you change the definition of trees to this it passes without any problem : .. . .. . Even stranger if you alter the binary-tree structure so that the value is stored on Node s and not on Leaf s and alter the leafs and nodes definition to be : .. . .. . It also then works fine . What s going on here Why is constructing the Arbitrary value initially causing a stack-overflow Why does it seem that scalacheck generators are so sensitive to minor changes that shouldn t affect the control-flow of the generators Why isn t my expression above with the oneOf 0 1 exactly equivalent to the original oneOf leafs nodes Comment : Speculation : could it be that your first trees always evaluates both arguments while the one using if doesn t Comment : It s a shame oneOf is indeed strict : scalacheck.googlecode.com svn artifacts 1.7 doc api org http : scalacheck.googlecode.com svn artifacts 1.7 doc api org scalacheck Gen 24.html .. . Answer : Even though following Rickard Nilsson http : stackoverflow.com users 410926 rickard-nilsson s answer above got rid of the constant StackOverflowError on program startup I d still hit a StackOverflowError about one time out of three once I actually asked scalacheck to check the properties . I changed Main above to run .check 40 times and would see it succeed twice then fail with a stack-overflow then succeed twice etc . Eventually I had to put in a hard block to the depth of the recursion and this is what I guess I ll be doing when using scalacheck on recursive data-structures in the future : .. . .. . With this change scalacheck never runs into a StackOverflowError .", "Question : I m trying to generate random data with Scalacheck . I have a hierarchy of case classes with many properties . The only way I ve found so far to populate the case classes is like this : .. . .. . For a case class with 10-20 properties it s pretty tedious . I was wondering if there was a way to automate it somehow.. . .. . Answer : There is a shapeless based Scalacheck library https : github.com alexarchambault scalacheck-shapeless what you might be looking for", "Question : The official scalacheck documentation gives the following example : .. . .. . I read that this can also be written as : .. . .. . How can I run the second form of test code When I execute sbt test nothing happens with the second version . Comment : This was originally asked under stackoverflow.com questions 35886206 http : stackoverflow.com questions 35886206 no-implicit-view-available-from-anyval-org-scalacheck-prop-error-property 38283963 but I split off the second question here as it was not directly related to the first problem . .. . Answer : The problem is that the second version is simply declaring a val that holds a reference to the property in question but that isn t enough to get scalacheck to evaluate it . This style of declaring a property is useful for example if you want to compose a new property out of other basic properties . You can check it directly or to assign it the special property setter in order to get it to be evaluated as part of the test run : .. . .. . This isn t very useful by itself the way it is meant to be used is perhaps something like this :" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
gsp@web-applications@63
gsp -- groovy server pages gsp is a presentation language for @placeholder similar to jsp .
{ "confidence": [ 50.43379592895508, 45.870582580566406, 45.24278259277344, 44.813751220703125, 43.26148986816406, 42.021575927734375, 41.792076110839844, 41.792076110839844, 41.40479278564453, 39.78020477294922, 39.78020477294922, 39.602962493896484, 38.89359664916992, 38.89359664916992, 38.82275390625, 38.81288146972656, 38.81288146972656, 38.368743896484375, 38.22794723510742, 38.22794723510742, 38.22794723510742, 37.850608825683594, 37.59837341308594, 37.59837341308594, 37.59837341308594, 37.59837341308594, 37.59837341308594, 37.19816970825195, 37.19816970825195, 36.23084259033203, 36.22380828857422, 36.22380828857422, 36.04611587524414, 36.04611587524414, 36.04611587524414, 36.04611587524414, 36.04611587524414, 36.04611587524414, 36.04611587524414, 36.04611587524414, 36.04611587524414, 36.04611587524414, 35.963951110839844, 35.774169921875, 35.1298828125, 35.01633834838867, 35.01633834838867, 35.01633834838867, 34.67155075073242, 34.67155075073242, 34.67155075073242, 34.64295959472656, 34.64295959472656, 33.78211975097656, 33.78211975097656, 33.78211975097656, 33.78211975097656, 33.51017761230469, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 33.090702056884766, 32.0609245300293, 32.0609245300293, 32.0609245300293, 32.0609245300293, 32.0609245300293, 32.0609245300293, 32.0609245300293, 31.824989318847656, 31.527395248413086, 31.393556594848633, 31.291461944580078, 30.84581184387207, 30.82670783996582, 30.82670783996582, 30.690685272216797, 30.66203498840332, 30.66203498840332, 30.66203498840332, 30.66203498840332, 30.66203498840332, 30.66203498840332, 30.66203498840332, 30.66203498840332, 30.66203498840332, 30.66203498840332 ], "content": [ "I am new to groovy and gsp .", "The operator allows null values in Groovy and thusly GSP .", "In a GSP is it possible to create a direct link-to another GSP", "For how long are gsp pages cached by default", "I saw this in my generated GSP pages .", "Add this GSP .", "I am trying to use a groovy function inside a GSP .", "One other possibility is to view the source of the Groovy code generated for your GSP .", "I try this in my gsp .", "the gsp is under view leader tool preview.gsp .", "My thanks in advance .. . .. . GSP : .. . .. . Controller :", "That s why we created Rabbtor http : knowledgebase.rabbytes.com display rabbtordoc GSP+ 28+Groovy+Server+Pages+ 29+Template+Engine .", "I d like to use GSP templates instead of JSP JSTL .", "This provides the ability to use GSP instead of JSP in a regular Spring web application .", "The current directory of the gsp", "How to customize error message for required field in gsp file to not show bean field name but field label in gsp", "how can I pass an array from controller to gsp and view it by index in that gsp", "Please see our tool Rabbtor http : knowledgebase.rabbytes.com display rabbtordoc GSP+ 28+Groovy+Server+Pages+ 29+Template+Engine .", "My service is this : .. . .. . my controller is this : .. . .. . and gsp", "controller code : .. . .. . GSP not actual code", "But this class is actually a gsp compiled file .", "@Arthur How should I iterate a map in gsp-land w o embedding groovy Java code", "I have a gsp file called tool.gsp .", "did you try flag 1 in your gsp", "your GSP code was missing the opening ol tag", "I would like the options to be sorted in the GSP .", "Or is there a better way to get information printed via gsp", "I have a GSP with the below code. .", "Can it be done from gsp itself", "GSP Spring Boot does not support the Form tag library and many other GSP features and is not actively maintained .", "Lets say in controller : .. . .. . and in gsp how can i call let say index 1 value B specifically in the gsp without any looping possibly", "For displaying images in GSP .. . .. . Example .. . .. . First Use FileUploadSevices file .. . .. . Domain : .. . .. . Controller save action : .. . .. . DB file storage path : .. . .. . In avatar file : .. . .. . List GSP :", "Is it possible to create custom GSP tag without Grails", "this would be a tag lib which suits for asp not gsp .", "It only recognizes gsp code in your situation", "I would like to it be done from gsp .", "I m adding the g : javascript inside of the body tag in the gsp", "Just like Spring Security is not bind with GSP .", "I have a GSP page which contents modal .", "Setting a value in params in a GSP won t do anything .", "Why do not use the javascript GSP-tag", "For example normally in gsp .. . .. . If priceDetails is null this will throw a NullPointerException .", "Then access the image in your gsp as under .", "@mlathe custom tags works in jsp not in gsp sorry of the typo - now I believe it makes sense", "When this happens the server has already finished processing the GSP and sent it to the browser .", "Use html-files instead of gsp template-files", "The controller returns this list using the withFormat clause to the GSP .", "I m writing a website using Springboot java and GSP .", "You are passing result3 under name key to GSP so in your GSP you should have API Results result3 replaced by API Results name .", "The view files GSP source code for precompiled GSP classes are under WEB-INF grails-app views directory in the exploded deployment directory .", "My solution is now inside a GSP : .. . .. . and then I have javascript block inside my GSP with jQuery Stuff and so on there I need this value .", "I m trying to format a string in a gsp in grails but in not getting the result that I want .", "There is one caveat : When a GSP view is compiled it uses up permgen .", "gsp is below .. . .. . and then the jrxml looks like the below .. . .. . ideas", "However in the GSP editor when I type model .", "Is code assist for models not yet supported in the GSP editor", "Today GSP for Spring Boot was just released .", "I would like to use GSP views instead of JSP JSTL views in a plain old Spring MVC application .", "But on the GSP side .. . .. . Notice how I lose the prefix between mysite and the controller .", "We can use GSP without Grails just mapping servlet groovy.servlet.TemplateServlet .", "Any help is appreciated : .. . .. . g : select gsp code : .. . .. . Javascript Code : .. . .. . Controller Code : .. . .. .", "Assume the value for kbd comes from a javascript.Possibly done in gsp itself .", "GSP is evaluated before and have access only to model passed from controller", "I am trying to send the output to a different GSP and not index .", "@ironmantis7x you don t need a domain class to get controller to display gsp .", "But Then I try to use on GSP for example : .. . .. . sec : ifNotLoggedIn NOT LOGGED sec : ifNotLoggedIn .. . .. . It shows NOT LOGGED .", "in layouts main gsp the javascript files must be defined via asset : src", "Also keep your modal in the same gsp as your links .", "I thought of passing a params variable between GSP and the controller .", "So the question is : where GSP files .class stay in a war", "I m editing my post now to add an example .. . .. . Then use in your GSP", "For the googlers looking for an answer to the original poster s question there isn t a break command in gsp .", "Below is my code : .. . .. . From the GSP page : .. . .. . From the controller : .. . .. . The output : .. . .. .", "You return the parameters in the closure of the controller that has the same name as the gsp .", "I m using a GSP for sending out emails based on the MailService plug-in .", "Sounds like exactly what I was looking for but it returns null in my GSP .", "However using pageScope.item0 I definitively get the variable in the same GSP .", "I just am confused on how to pass the out put to a gsp .", "The hasErrors as a method call in GSP works a bit differently than as a tag g : hasErrors .", "I m trying to evaluate a GSP file without a real http-request .", "Below is the solution which I have written for my question : .. . .. . GSP : .. . .. . jQuery :", "I want to show message to user No matter in which GSP page currently user is when server went down at the top of the GSP whenever my service encounters that server is Down .", "At the top of my GSP i have @ page import company.ConstantsFile .. . .. . Inside my GSP I have .. . .. . and my ConstantsFile.groovy .. . .. . I have also tried changing renter to puts system.out etc but that isn t my main problem .", "This may not be the direct answer for this question but since you seem to pay attention to designers role in a project you may also check my designer friendly GSP implementation http : knowledgebase.rabbytes.com display rabbtordoc Designer+Friendly+GSP+Tags+Using+Attributes which enables designers to view GSP pages even with custom tags thanks to the tag declaration via attributes feature .", "I read in various similar questions that we do not have to explicitly specify the taglibs at the top of each GSP page .", "EDIT : based on feedback erased original Q . completely and reposting in better language .. . .. . I wish to access a request or params variable and pass it between the controller and the gsp .", "And how I need to use this images and other resources on GSP page .", "I want to get current user in my view gsp file .", "I ve tried with netbeans and eclipse with no luck.. . coudn t try IntelliJ idea .. . .. . I gave a quick look ant the code .. . .. . http : kickjava.com src groovy servlet TemplateServlet.java.htm .. . .. . and it gives me the impression that .gsp pages are translated to .groovy servlets groovlets in memory I might be wrong .. . .. . .. . so perhaps it s not so easy to debug gsp as I though.. . .. . .. . so can anybody tell me how to do it", "I just look at this answer here How to show String new lines on gsp grails file", "http : stackoverflow.com questions 33320165 how-to-show-string-new-lines-on-gsp-grails-file but is not working.. .", "In a gsp file there is line like below .. . .. . and when i debug it shows value like below .. . .. .", "May I know how can I find where is this tools declared and being called from to this GSP", "What I want to do is pass values from a gsp datepicker and textfield to the controller when upon Submit button press .", "While I tried debug after this function run through the allData being populated to a gsp file called tool preview.gsp .", "Just add a GSP called grails-app views domain-class action property displayWidget.gsp .", "Does anyone know how to test for the first member and last member in a gsp loop", "In a Grails app I am trying to figure out when to use a view and when to use a template for a gsp .", "So you have to use a controller for each .gsp site if you want to get model objects" ] }
{ "confidence": [ 60.560855865478516, 59.01872634887695, 56.81842041015625, 56.35786819458008, 54.068965911865234, 50.73286437988281, 50.147972106933594, 49.99012756347656, 49.57182693481445, 49.288818359375, 48.91172409057617, 48.16334915161133, 47.73704147338867, 47.223209381103516, 47.223209381103516, 47.066139221191406, 46.779354095458984, 46.164119720458984, 44.584476470947266, 44.584476470947266 ], "content": [ "Question : We can use GSP without Grails just mapping servlet groovy.servlet.TemplateServlet . And what about TagLibs Here are http : grails.org doc latest guide single.html 6.3 20Tag 20Libraries docs about using TagLibs with Grails - we should just add class to grails-app taglib folder . Is it possible to create custom GSP tag without Grails And if it possible even more important question how exactly can it be done UPDATE : it looks like there is a separate Grails Plugin for it - https : github.com houbie gsp-taglib . So the question actually boils down to how we can use code from this plugin I guess . Comment : Can t you just build a regular jsp tag lib but just write it in groovy : ie java.sun.com j2ee tutorial 1 3-fcs doc JSPTags5.html 74701 http : java.sun.com j2ee tutorial 1 3-fcs doc JSPTags5.html 74701 Comment : this would be a tag lib which suits for asp not gsp . Comment : That doesn t make sense . Are you saying you want to use a groovy java taglib in a Microsoft ASP Active Server Pages site That seems difficult impossible or at least more trouble than it s worth . Maybe I m missing something . Comment : @mlathe custom tags works in jsp not in gsp sorry of the typo - now I believe it makes sense Comment : hmm.. . Are you sure that s not supported I don t see why that wouldn t work : grails.1312388.n4.nabble.com http : grails.1312388.n4.nabble.com Using-a-JSP-tag-from-GSP-td1351642.html .. . Answer : According to http : jira.grails.org browse GRAILS-5657 full GSPs independent of Grails is as of September 2012 a feature yet to come . Some minimal versions have been done though", "Question : I would like to use GSP views instead of JSP JSTL views in a plain old Spring MVC application . I have added a groovy.servlet.TemplateServlet to web.xml like this : .. . .. . And setup a Spring InternalResourceViewResolver to load the GPS files . Upto this point it all works fine but to expose the values in the Model to the template I had to do some tricks subclassing TemplateServlet and adding them to the ServletBinding . Now my next obstacle is that JSTL by default escapes XML when using the c : out tag and Grails has the notion of codecs to automatically escape values used in a GSP . The template method described above does not escape by default which requires the developers to be very careful to avoid XSS vulnerabilities . Is there another better way to use GSP including automatic escaping in a plain Spring MVC application without using Grails Comment : I m working on an identical task . I d like to use GSP templates instead of JSP JSTL . What dependencies should I add to my gradle build file .. . Answer : We have extracted GSP from Grails customized it for Spring MVC applications and improved configuration support . Please see our tool Rabbtor http : knowledgebase.rabbytes.com display rabbtordoc GSP+ 28+Groovy+Server+Pages+ 29+Template+Engine . We don t provide it open-source but usage is free of charge and we have been using it in our own applications . GSP for Spring Boot depends on Spring boot it is not maintained and some tag libraries depend on Grails . We removed these dependencies created our own custom tag libraries which better suit Spring MVC apps.Most tag libraries are supported and have similar implemantations to Spring JSP tags.A data-bound form tag library is provided and also you can register your tag libs or packages .", "Question : I saw this in my generated GSP pages . What does the mean .. . Answer : The operator allows null values in Groovy and thusly GSP . For example normally in gsp .. . .. . If priceDetails is null this will throw a NullPointerException . If we use the operator instead .. . .. . .. . now the value of priceDetails .amount is null instead of throwing a null-pointer exception .", "Question : I m writing a website using Springboot java and GSP . I ve managed to get GSP working for the most part dependencies installing fine layouts templates working etc .. . .. . However when I try and use the g : form tag I get an error : .. . .. . Tag form does not exist . No tag library found for namespace : g .. . .. . The code I m using : .. . .. . To eliminate the possibility that it s a problem with running gsp entirely I ve tried using the g : each ... . g : each tag and that worked perfectly well . The grails dependency version I have is 2.5.2 The groovy dependency version I have is 2.4.4 .. . .. . Thanks for any help . .. . Answer : GSP Spring Boot does not support the Form tag library and many other GSP features and is not actively maintained . There are many things to be changed and configured to get the same experience as you get when you use GSP with Grails . That s why we created Rabbtor http : knowledgebase.rabbytes.com display rabbtordoc GSP+ 28+Groovy+Server+Pages+ 29+Template+Engine . Please see the link for the documentation on what we did why and how you can use it .", "Question : I ve tried with netbeans and eclipse with no luck.. . coudn t try IntelliJ idea .. . .. . I gave a quick look ant the code .. . .. . http : kickjava.com src groovy servlet TemplateServlet.java.htm .. . .. . and it gives me the impression that .gsp pages are translated to .groovy servlets groovlets in memory I might be wrong .. . .. . .. . so perhaps it s not so easy to debug gsp as I though.. . .. . .. . so can anybody tell me how to do it pd : By debugging I mean things like browsing the code step-by-step inspecting variables adding watches and all those sort of things obviously . Not the not so good old printf approach.. . .. . Answer : Most of the logic in your GSPs should be encapsulated in TagLibs and you can debug them with IntelliJ at least just as easily as any other Groovy code . If you do have a lot of scriptlet code in your GSPs which you shouldn t and you want to debug into it you can t do much more than println . One other possibility is to view the source of the Groovy code generated for your GSP . This can be done by appending a showSource parameter to the URL as described here http : www.piragua.com 2008 03 15 viewing-the-source-of-a-compiled-gsp-in-grails . Comment : good point about the tag libs had no idea they could be debugged.. .", "Question : Does anyone know how to test for the first member and last member in a gsp loop Here s my jsp code : .. . .. . I know you can test for status in a g : each statement but that s just an integer . Is there anything to access the first and last element If not is there another way to do what I m doing Any help appreciated . .. . Answer : This question is a bit old but another way to perform this check is to use Groovy List s first method . You can also do the same thing for the last element using Groovy List s last method . list.first .. . .. . list.last", "Question : I ve tried with netbeans and eclipse with no luck.. . coudn t try IntelliJ idea .. . .. . I gave a quick look ant the code .. . .. . http : kickjava.com src groovy servlet TemplateServlet.java.htm .. . .. . and it gives me the impression that .gsp pages are translated to .groovy servlets groovlets in memory I might be wrong .. . .. . .. . so perhaps it s not so easy to debug gsp as I though.. . .. . .. . so can anybody tell me how to do it pd : By debugging I mean things like browsing the code step-by-step inspecting variables adding watches and all those sort of things obviously . Not the not so good old printf approach.. . .. . Answer : I use a hack : add a method to any controller like static def debugme def param def a param and call it from gsp code : ThisController.debugme this or ThisController.debugme params .. . .. . you do know you don t have to restart application after editing a controller or view right I also don t think that all the logic should be in taglibs : page-specific logic should be clearly visible in a controller or a view . We have most of the logic in controllers or domain classes .", "Question : I have a gsp file called tool.gsp . I wanted to do loop to get some items value from tools and store possibly in an array . I am new to groovy and gsp . I did a code portion as below to first try display those values but it failed.Can anyone help how I can implement looping in gsp and keep the looping result in an array Comment : Define failed What is the error Comment : you may want to use var tool instead of var listed . .. . Answer : There is no tool object try renaming listed to tool eg :", "Question : I saw this in my generated GSP pages . What does the mean .. . Answer : This is very important feature in Groovy . If the object is null ie phoneInstance is null then it s provide null value . This feature is called Safe Navigation Operator . Simply when we use this feature No need of checking the object phoneInstance is null or not .", "Question : I would like to use GSP views instead of JSP JSTL views in a plain old Spring MVC application . I have added a groovy.servlet.TemplateServlet to web.xml like this : .. . .. . And setup a Spring InternalResourceViewResolver to load the GPS files . Upto this point it all works fine but to expose the values in the Model to the template I had to do some tricks subclassing TemplateServlet and adding them to the ServletBinding . Now my next obstacle is that JSTL by default escapes XML when using the c : out tag and Grails has the notion of codecs to automatically escape values used in a GSP . The template method described above does not escape by default which requires the developers to be very careful to avoid XSS vulnerabilities . Is there another better way to use GSP including automatic escaping in a plain Spring MVC application without using Grails Comment : I m working on an identical task . I d like to use GSP templates instead of JSP JSTL . What dependencies should I add to my gradle build file .. . Answer : Today GSP for Spring Boot was just released . This provides the ability to use GSP instead of JSP in a regular Spring web application . You can see an example here : https : github.com grails grails-boot blob master sample-apps gsp script templates index.gsp", "Question : null .. . Answer : Before I ask this question I will provide some info on what I am actually trying to do : .. . .. . I need to refactor a large amount of GSP files in my grails project . After I tried writing my own groovy script for that -- and realizing that it is way too much for my current skill level in any language -- I found this article http : www.frommknecht.net 2010 02 robust-html-parsing-the-groovy-way which helped me a lot with parsing html content . After a while I had put together my own script to parse an html file serialize it again and save it to a new file . This is my script : .. . .. . Note that I do not want an XML prolog in my GSP files therefore I remove it using regex that is not my question but if anybody knows a more groovy way to do this please let me know Also I set namespacesFeature to false since namespaces are useless for my purpose . Because that worked like a charm with HTML files I thought I am ready to loop over my folder recursively and find all GSP files with the name list.gsp and refactor them automatically . But when I tried to test it with one list.gsp the serialization fails because of the unbound prefix g for the element g : set : .. . .. . The prefix g for element g : set is not bound . .. . .. . Now I kind of understand that what I am trying to do is not the regular purpose of XML parsing and serializing . But in my case I do not only want the to disable the namespaces feature but also want the parser to ignore all GSP tags and treat them as regular opening and closing tags in other words ignore the double dots in any tag . The other thing I am concerned of is expression language such as @ page import class . Right now I m just getting the exception mentioned earlier but this will probably need to be resolved as well . Any help is highly apreciated .", "Question : In a GSP is it possible to create a direct link-to another GSP I know I can use : .. . .. . and in UserController define the foo action to just show the corresponding GSP .. . .. . But is there any way I can achieve the same result without having to create the empty foo action Thanks Don .. . Answer : There s a uri attribute that s undocumented http : grails.org doc latest ref Tags createLink.html but you can see it in the source http : github.com grails grails blob master grails src java org codehaus groovy grails plugins web taglib ApplicationTagLib.groovy : .. . .. . HTH Comment : Hey Dave what should the path be I tried views p.gsp and grails-app views p.gsp Neither worked . Comment : Remove the views out of your path just do p instead of p.gsp and it should resolve .", "Question : I ve tried with netbeans and eclipse with no luck.. . coudn t try IntelliJ idea .. . .. . I gave a quick look ant the code .. . .. . http : kickjava.com src groovy servlet TemplateServlet.java.htm .. . .. . and it gives me the impression that .gsp pages are translated to .groovy servlets groovlets in memory I might be wrong .. . .. . .. . so perhaps it s not so easy to debug gsp as I though.. . .. . .. . so can anybody tell me how to do it pd : By debugging I mean things like browsing the code step-by-step inspecting variables adding watches and all those sort of things obviously . Not the not so good old printf approach.. . .. . Answer : Add a setting to Config.groovy and the generated gsp-files will be written to a directory : grails.views.gsp.keepgenerateddir some existing directory the target directory has to exists and be writable .. . .. . More information : http : jira.codehaus.org browse GRAILS-4422 .. . .. . It should be possible to debug the generated groovy code with a standard Java debugger . It was a long time ago when I did that when I created the patch to grails and I think I used jswat http : code.google.com p jswat to debug gsps . I couldn t get eclipse to find the source files but that s probably working in Spring Tool Suite Eclipse nowadays . You have to debug groovy code step-by-step step-into and use filters otherwise you might lose the step point because of closures . That s already another story.. .", "Question : how can i pass parameters to a groovy server page via a controller that are not an instance of a domain class Comment : May be related to stackoverflow.com q 2063220 6509 http : stackoverflow.com q 2063220 6509 .. . Answer : You can do it like this : .. . .. . In the controller : .. . .. . In the gsp page you can view the name like so :", "Question : how can i pass parameters to a groovy server page via a controller that are not an instance of a domain class Comment : May be related to stackoverflow.com q 2063220 6509 http : stackoverflow.com q 2063220 6509 .. . Answer : You return the parameters in the closure of the controller that has the same name as the gsp .", "Question : I would like to use GSP views instead of JSP JSTL views in a plain old Spring MVC application . I have added a groovy.servlet.TemplateServlet to web.xml like this : .. . .. . And setup a Spring InternalResourceViewResolver to load the GPS files . Upto this point it all works fine but to expose the values in the Model to the template I had to do some tricks subclassing TemplateServlet and adding them to the ServletBinding . Now my next obstacle is that JSTL by default escapes XML when using the c : out tag and Grails has the notion of codecs to automatically escape values used in a GSP . The template method described above does not escape by default which requires the developers to be very careful to avoid XSS vulnerabilities . Is there another better way to use GSP including automatic escaping in a plain Spring MVC application without using Grails Comment : I m working on an identical task . I d like to use GSP templates instead of JSP JSTL . What dependencies should I add to my gradle build file .. . Answer : Instead of using a TemplateServlet you could have also used a GroovyPagesServlet for that purpose I haven t tested that just looked at Grails web.xml and the class code . The latter requires a Spring bean to be setup named groovyPagesTemplateEngine and typed GroovyPagesTemplateEngine GStringTemplateEngine in this case . Configuring the view layer with an InternalResourceViewResolver is correct . You ll have assigned a GroovyPageView . GSPs by default are not configured to perform HTML output escaping . To configure that change grails.views.default.codec from none to html in Config.groovy . See this article http : alwaysthecritic.typepad.com atc 2010 06 grails-gsp-html-escaping-confusion.html for more information . Comment : I picked TemplateServlet because that is part of Groovy itself the GroovyPagesServlet seems like a part of Grails The same goes for GroovyPageView it requires setting up Grails filters . One of my requirements is to not include Grails so I m looking for the most lean solution for including just GSP support Comment : Next time please phrase your requirements in the original question and not in a later comment . This will save us lots of efforts . - Thanks . - After all you ve found your solution which appears to work fine except of being mistaken on your most central point of GSP HTML escaping . - This has been addressed in my answer as well . - Thanks again . Comment : Sorry . - In your original question you ve mentioned in the question title without Grails and I had not recognized that . - However your remaining question on GSP HTML escaping should now have been solved . Comment : Well sorry you missed the title . But the grails.views.default.codec setting you mention is also Grails specific as far as I can tell from looking at the source of GStringTemplateEngine . So to clarify : I am looking for a way to use GSP with automatic escaping as in the original question : Is there another better way to use GSP including automatic escaping in a plain Spring MVC application and thus as mentioned in the title : without Grails Comment : @page defaultCodec html", "Question : I saw this in my generated GSP pages . What does the mean .. . Answer : It s the Safe Navigation Operator which is a Groovy feature that concisely avoids null-pointer exceptions . See http : docs.groovy-lang.org latest html documentation index.html safe navigation operator .. . .. . In this case if phoneInstance is null then it doesn t try to get the name property and cause a NPE - it just sets the value of the field tag to null . Comment : Thank you I had been googling it for a while but didn t find an answer . Comment : The url 404s now Comment : For extra coolness you can also add a sensible default with the Elvis operator eg : phoneInstance .number : +44 Rock groovy with the king baby", "Question : null .. . Answer : I m trying to convert a Grails 2 app into a couple of Spring Boot apps with the re-use for now with all the GSPs . Nice boot plugin created by Lari Hotari Graeme Rocher .. . .. . https : github.com grails grails-boot .. . .. . I m trying to see a way that I can use content negoeation I followed a useful spring blog on the topic and I ve been looking into the GspAutoConfiguration See link for more info https : github.com grails grails-boot blob master grails-gsp-spring-boot src main groovy grails gsp boot GspAutoConfiguration.java .. . .. . Doesn t appear to be a simple way that I can see to still use the GSP Template Engine from the GSP configuration to confgure content negotiation in the MvcConfig in the configureContentNegotiation bean .. . .. . Gradle.build .. . .. . Spring MVC Configuration", "Question : how can i pass parameters to a groovy server page via a controller that are not an instance of a domain class Comment : May be related to stackoverflow.com q 2063220 6509 http : stackoverflow.com q 2063220 6509 .. . Answer : You put your parameters into the model object map returned to your GSP for example : .. . .. . Then you get those values accessing them by the name you use in your model map for example : .. . .. . That should display the following :", "Question : how can i pass parameters to a groovy server page via a controller that are not an instance of a domain class Comment : May be related to stackoverflow.com q 2063220 6509 http : stackoverflow.com q 2063220 6509 .. . Answer : The clearest way is probably to return a map from your controller action : .. . .. . Now you can access that parameter in your GSP page by default myAction.gsp : .. . .. . More details here : http : grails.org doc latest guide 6 . 20The 20Web 20Layer.html 6.1.3 20Models 20and 20Views" ] }
[ "yes-answer-long", "yes-answer-short" ]
web-applications
UNK_RELATION
cortana@windows-10@97
cortana -- cortana is an intelligent personal assistant on windows-phone-8 .1 microsoft-band and @placeholder .
{ "confidence": [ 47.634918212890625, 46.377262115478516, 45.296531677246094, 44.850345611572266, 44.29443359375, 43.70584487915039, 43.5861701965332, 42.98430252075195, 42.98430252075195, 42.74159240722656, 42.56777572631836, 41.71142578125, 41.422279357910156, 41.1090087890625, 40.39211654663086, 40.00315475463867, 39.71192169189453, 39.71192169189453, 39.71192169189453, 39.23617935180664, 39.15743637084961, 39.055484771728516, 38.97620391845703, 38.967742919921875, 38.967742919921875, 38.68175506591797, 38.65747833251953, 38.177696228027344, 37.7158317565918, 37.70909881591797, 37.70909881591797, 37.70909881591797, 37.41489791870117, 37.41489791870117, 37.41489791870117, 37.35973358154297, 37.25318908691406, 37.13331604003906, 36.6856689453125, 36.53185272216797, 36.384735107421875, 36.384735107421875, 35.998741149902344, 35.96775817871094, 35.94243240356445, 35.856292724609375, 35.856292724609375, 35.856292724609375, 35.856292724609375, 35.856292724609375, 35.80485153198242, 35.613075256347656, 35.45098876953125, 35.150054931640625, 35.150054931640625, 35.150054931640625, 34.9803466796875, 34.9803466796875, 34.93964385986328, 34.93126678466797, 34.911624908447266, 34.30344772338867, 34.30344772338867, 34.30344772338867, 34.30344772338867, 34.30344772338867, 34.30344772338867, 33.701717376708984, 33.701717376708984, 33.701717376708984, 33.701717376708984, 33.701717376708984, 33.701717376708984, 33.596580505371094, 33.273284912109375, 33.273284912109375, 33.273284912109375, 32.6576042175293, 32.6576042175293, 32.6576042175293, 32.650413513183594, 32.41953659057617, 32.25457763671875, 32.038604736328125, 32.038604736328125, 32.038604736328125, 32.038604736328125, 32.038604736328125, 32.038604736328125, 32.038604736328125, 32.038604736328125, 32.038604736328125, 32.038604736328125, 32.038604736328125, 32.038604736328125, 31.922636032104492, 31.665185928344727, 31.665185928344727, 31.665185928344727, 31.665185928344727 ], "content": [ "I have it working when you use Cortana on the phone BUT when using Cortana on the band it does try to launch the app but it hangs on Starting app name with your app icon basically Cortana trying to start the app .", "Second way Cortana : Let s say I have the program installed on my home PC and I have Cortana enabled on Windows 10 and a Windows Phone with Cortana .", "using Cortana voice command .", "Theory : Use Cortana on the band to launch your application on the phone and that application will communicate with the band allowing your band custom tile buttons to work .", "I d like to change the Cortana system settings specifically the Hey Cortana setting .", "This is not possible in Cortana .", "Yes it is possible but it is not exactly supported by Cortana .", "The integration between Windows 10 and Cortana is automatic .", "Man I m just starting development for windows and Cortana .", "I am writing a Cortana background app and trying to call it from Cortana .", "Use Case .. . .. . I to Cortana : launch www.xyz.com .. . Cortana in Response : launches home page of www.xyz.com in my default browser .", "So any apps that integrate with Cortana seems to now be unable to integrate with Cortana .", "Is it possible to increase the Cortana timeout", "Check here : http : www.cnet.com how-to the-complete-list-of-cortana-commands and here http : www.howtogeek.com 225458 15-things-you-can-do-with-cortana-on-windows-10 .. . .. . Voice : Cortana Start Skype .. . .. . On build 9926 Cortana does not have the ability to launch programs with your voice .", "How does this relate to Cortana", "I am looking for Cortana api which will enable my asp.net-mvc web application to implement cortana search feature .", "And I am trying to use Cortana in it .", "How do I interact it with Cortana", "I ll forward the request to Cortana how", "I wish to use Windows cortana or Apple siri in my application .", "Cortana uses them of course .", "To integrate with Cortana you need to develop a Universal Windows Platform UWP app which exposes an App Service that integrates with Cortana .", "github.com Windows-XAML Template10 blob master Samples Cortana https : github.com Windows-XAML Template10 blob master Samples Cortana Cortana.xml", "What part of Hey Cortana are you trying to change", "try to set language of cortana to Uk English in setting", "Cortana and Sirir work very different .", "This information is based on an e-mail exchange I had with the Cortana devs at Microsoft .", "Then you can say Cortana start open xyz about .", "Cortana background apps provide deep-linking capabilities https : msdn.microsoft.com en-us cortana voicecommands deep-link-into-your-app-from-cortana which allow the developer to link-to a specific page within her app .", "And what is the cortana canvas", "Inside of the application cortana will not work .", "It s hard for Cortana to recognize it .", "Doesn t this work when you use cortana", "Cortana knows how to answer that in Cortana s system commands .", "You can t do that with Cortana as of right now .", "I trying to enable Cortana in my Win8 phone app .", "So I m trying to integrate Cortana in my Universal Windows app using Background task because I need to build conversation with Cortana .", "I actually got support from Microsoft and they say it is not possible for third-party applications to get the Cortana state .", "Also if you are interested in responding to the user through Cortana window check this post regarding Cortana in background http : talkitbr.com 2015 08 24 usando-cortana-em-background .", "Now Supoose www.xyz.com has three page Home About and Contact us .. . I to Cortana : navigate to About Page .. . Cortana in Response : navigates me to the About page of the site .", "Is there a way to set up a predefined custom commands for Cortana", "You can create commands for Cortana to listen for .", "Javascript code .. . .. . What Cortana displays : .. . .. .", "If you install an app named Star Wars you can call Cortana Hey Cortana start Star Wars and the app is launched .", "Answer based on this Cortana sample https : github.com Microsoft Windows-universal-samples tree master Samples CortanaVoiceCommand js .", "Also does anyone have a date we can expect Cortana in Canada", "I want to be able to know exactly when I say Hey cortana", "I want to get a callback of when cortana is actually listening to me .", "I have the problem only when I ask Cortana for an album or a singer .", "We are writing some custom Cortana commands and have some basics working .", "Unfortunately all the documentation pertaining to Cortana apps https : msdn.microsoft.com en-us windows uwp input-and-devices cortana-interactions is written for C XAML .", "Sample web page to implement Cortana feature http : i.stack.imgur.com U2h2P.jpg", "I use the following code to install my VCD file grammar into Cortana : .. . .. . Success is reported but when I write a query into Cortana the changes I ve made to my VCD file aren t reflected in Cortana .", "Cortana Bug repro screenshot http : i.stack.imgur.com TRhIX.png", "Cortana works fine without a microphone .. . 2 .", "Typing to Cortana has the same rules .. . 3 .", "As there is no app registered in Cortana whose name is eat or eat everyday Cortana will bring Bing Search to search it .", "The app is registering great with Cortana I can say : Grocery show the CostCo list and Cortana recognizes it and shows the app .", "I want to develop a mobile app which will use Cortana for Windows phone and Siri for iPhone but dont want to develop 2 different apps for them .", "For example when trying to launch a foreground app with Cortana https : msdn.microsoft.com en-us windows uwp input-and-devices launch-a-foreground-app-with-voice-commands-in-cortana you are providing a local VCD Voice Command Definition file that defines the commands that Cortana can respond to .", "As We know When Cortana does not a have well defined answer for a query or voice commands she launches bing in edge browser in windows-10 PC .So I guess Cortana is able to launch bing in a web browser .", "Note I m not asking Cortana to launch any apps or looking for a special VCD .", "The problem is I have two ways of informing the user : Email or Cortana .", "I saw an API on github that can t do this and Cortana for developers .", "I am trying to use Cortana in my small C project .", "Is it actually possible to use Cortana if you do not use a Xaml project", "That s why I was not sure if I could use Cortana with it .", "I am attempting to integrate Cortana into my UWP .", "I have the application which embedded cortana .", "I m working on creating custom Cortana commands .", "Can a Cortana background Task open the Browser", "But I want to navigate after launching the app with Cortana .", "Cortana screen shot http : i.stack.imgur.com uIsk0.png", "Sample is Cortana voice command sample https : github.com Microsoft Windows-universal-samples tree master Samples CortanaVoiceCommand as you see in that blog .", "I am using Cortana for my UWP app and it works fine .", "I d like to set up Cortana to have custom commands .", "Make sure that Cortana only listens to you to not get pranked .", "What I would like for a start is to have Cortana start my app when I say : Hey Cortana start myAppName It looks like this is not working by default and I could not find any tutorial about that .", "I am developing a Cortana App and I want to test my app using text queries and also voice queries but Cortana only activates my app when I use voice commands .", "API Access to Cortana System Commands https : social.msdn.microsoft.com Forums en-US 44aa1b39-b319-418a-832f-8cb5db09f2a5 uwpapi-access-to-cortana-system-commands forum wpdevelop .", "Make sure you have Windows Search turned on restart your computer with cortana turned off and turn her back on once the PC has booted .", "If my home PC s public IP address changed Cortana will show a notification on my phone including my new IP address .", "What I find weird is that I can find my commands inside Cortana but Cortana doesn t seem to trigger them inside my app .", "I guess Cortana is getting confused because of only one ListenFor .", "How can I force Cortana to actually use my updated grammar", "Cortana will only refresh its cache of grammars at the end of a voice interaction .", "Click on Cortana s microphone button and then immediately dismiss the Cortana box .", "This copy is refreshed every time the user completes a voice interaction with Cortana .", "Your BackgroundTask MUST NOT contain constructor - otherwise cortana will bail on it .", "Remember Cortana requires the moniker you selected for your app .", "I want to make an online media search application with cortana integration .", "I m trying to add cortana voice commands to my app .", "I agree it would be great to have some APIs to talk to Cortana :", "Is it posible to read any value from Cortana voice command", "I currently have Cortana implemented into my Silverlight app .", "While deep-linking Windows UWP apps with cortana I m unable to fetch the text spoken .", "Does Cortana have a uri I can call to open it programmatically from my software in iOS", "Perhaps I haven t looked at SystemParametersInfo hard enough or it doesn t support Cortana settings .", "I m working on a desktop application that focuses on listening to Cortana states but I don t want to intercept a specific question and treat that response .", "When I say hey cortana i want to receive a callback saying it activated listening mode for example ." ] }
{ "confidence": [ 70.53863525390625, 62.17939376831055, 58.361087799072266, 57.88483428955078, 56.00893020629883, 55.716217041015625, 55.13834762573242, 55.115516662597656, 53.67085266113281, 53.11092758178711, 52.83151626586914, 52.26262664794922, 52.088138580322266, 52.00453567504883, 50.98280334472656, 50.82872772216797, 50.817100524902344, 50.26299285888672, 50.11481475830078, 49.9959831237793 ], "content": [ "Question : null .. . Answer : Theory : Use Cortana on the band to launch your application on the phone and that application will communicate with the band allowing your band custom tile buttons to work . I have it working when you use Cortana on the phone BUT when using Cortana on the band it does try to launch the app but it hangs on Starting app name with your app icon basically Cortana trying to start the app . I don t even think it makes it to the app.xaml. . This is where I need help.. . .. . .. . Use this page to get Cortana to launch your simple application.. . https : msdn.microsoft.com en-us library windows apps mt185609.aspx f 255 MSPPError -2147217396 https : msdn.microsoft.com en-us library windows apps mt185609.aspx f 255 MSPPError -2147217396 .. . .. . You have to put code in your app.xaml.cs as well to navigate to the main page when coming in via voice commands .", "Question : As We know When Cortana does not a have well defined answer for a query or voice commands she launches bing in edge browser in windows-10 PC .So I guess Cortana is able to launch bing in a web browser . Now my question is .. . is it possible to launch any website say www.xyz.com in a web browser chrome edge etc . using Cortana voice command . Use Case .. . .. . I to Cortana : launch www.xyz.com .. . Cortana in Response : launches home page of www.xyz.com in my default browser . Now Supoose www.xyz.com has three page Home About and Contact us .. . I to Cortana : navigate to About Page .. . Cortana in Response : navigates me to the About page of the site . Is this possible . Thanks in advance . .. . Answer : Yes it is possible but it is not exactly supported by Cortana . 1 . Create a shortcut for the link you want to go to . 2 . Name it xyz.com about page .. . 3 . Move the shortcut in the Folder C : ProgramData Microsoft Windows Start Menu Programs .. . 4 . I would recommend creating a folder in that folder otherwise it will quickly clutter your program list . Then you can say Cortana start open xyz about . Note : it will only work for xyz.com", "Question : How can I make Cortana listen for further commands from my VCD like navigating to other pages after the app was started with Hey Cortana - App name - Command . Thank you for your help . Comment : If you have already launched your app from Cortana and handle the navigation in the OnActivated method then I agree with @stefan.s . But if you want to navigate to specific page through vcd command when cortana launching your app I can give you a sample . Comment : Thank you . But I want to navigate after launching the app with Cortana . .. . Answer : Inside of the application cortana will not work . But you can use the SpeechRecognizer class I would imagine that this triggers the same cloud services in the background as cortana . There is a blog series about how to do that on the Building apps for windows blog at : https : blogs.windows.com buildingapps 2016 05 16 using-speech-in-your-uwp-apps-its-good-to-talk .. . .. . In Windows 10 speech is front-and-center with the Cortana personal assistant and the Universal Windows Platform UWP gives us several ways to plug into that Hey Cortana experience . But there s much more that we can do when working with speech from a UWP app and that s true whether working locally on the device or remotely via the cloud . .. . In this 3-part series we will dig in to some of those speech capabilities and show that speech can be both a powerful and a relatively easy addition to an app . This series will look at .. . .. . the basics of getting speech recognized how speech-recognition can be .. . guided how we can synthesize speech additional capabilities in the .. . cloud for our UWP apps .. . .. . Read more at https : blogs.windows.com buildingapps 2016 05 16 using-speech-in-your-uwp-apps-its-good-to-talk w3HXZcpS9M4UVm8S.99 Comment : Thanks for your answer . Seems that I have to check the SpeechRecognizer class .", "Question : null .. . Answer : I m working on a desktop application that focuses on listening to Cortana states but I don t want to intercept a specific question and treat that response . I want to be able to know exactly when I say Hey cortana and it starts listening and then I want to know exactly when it stops listening and processes an answer . Is that possible Does anyone have an idea on how it could be achieved Comment : Perhaps this might be what you are looking for github.com Microsoft Windows-universal-samples tree master https : github.com Microsoft Windows-universal-samples tree master Samples CortanaVoiceCommand Comment : Not really I believe . I want to get a callback of when cortana is actually listening to me . When I say hey cortana i want to receive a callback saying it activated listening mode for example . Comment : desktop application are you talking about a Universal Windows Platform UWP App or a bit 32 Program Comment : A UWP though I m not worrying about other platforms . I actually got support from Microsoft and they say it is not possible for third-party applications to get the Cortana state . So I guess this question is closed for now", "Question : I understand that Cortana needs to be able to connect to the MS services to process natural language spoken to her . However is a connection required when trying to get your UWP app to interact https : msdn.microsoft.com en-us windows uwp input-and-devices cortana-interactions with her For example when trying to launch a foreground app with Cortana https : msdn.microsoft.com en-us windows uwp input-and-devices launch-a-foreground-app-with-voice-commands-in-cortana you are providing a local VCD Voice Command Definition file that defines the commands that Cortana can respond to . Does this then require the device to be connected and online My confusion stems from using the Windows.Media.SpeechRecognition https : msdn.microsoft.com en-us windows uwp input-and-devices speech-recognition Recognize speech input API where depending on the grammar and constraints used determines whether you need a network connection or not . How does this relate to Cortana .. . Answer : Well after scouring the Cortana API docs and still not being able to find concrete documentation on an answer I finally stumbled upon the Cortana Extensibility in Universal Windows Apps https : channel9.msdn.com Events Build 2015 2-691 video and around the 12 : 20 mark the presenters flow diagram suggests that even Voice Commands are routed to the Microsoft Speech Platform Service cloud .", "Question : null .. . Answer : I d like to change the Cortana system settings specifically the Hey Cortana setting . However the two most relevant resources Windows universal samples https : github.com Microsoft Windows-universal-samples and WinAPI function for system settings https : msdn.microsoft.com en-us library windows desktop ms724947 28v vs.85 29.aspx f 255 MSPPError -2147217396 don t appear to show any way to change these settings . Perhaps I haven t looked at SystemParametersInfo hard enough or it doesn t support Cortana settings . So I wonder is there any way to programmatically change these settings Comment : What part of Hey Cortana are you trying to change Are you trying to disable it change the trigger phrase etc Comment : A handy image http : cnet2.cbsistatic.com hub i r 2015 07 30 cd108e2d-4bce-4794-a3f0-211c0955ecb8 resize 770x578 95ecaa71aec7aae28982927c51c3fda7 cortana-enable.jpg highlighting the specific setting I m looking to toggle .", "Question : I would like to develop a Cortana application in HTML JavaScript CSS . Unfortunately all the documentation pertaining to Cortana apps https : msdn.microsoft.com en-us windows uwp input-and-devices cortana-interactions is written for C XAML . .. . Answer : To integrate with Cortana you need to develop a Universal Windows Platform UWP app which exposes an App Service that integrates with Cortana . In Visual Studio 2015 or Visual Studio 15 create a new project using the JavaScript project template Blank App Universal Windows . Find the element with tag Application and add the following as a child element : .. . .. . The file voiceCommandService.js will then serve as an entry-point for Cortana . It will be executed whenever Cortana hands off a request to your app and you ll be able to get the task details from Windows.UI.WebUI.WebUIBackgroundTaskInstance.current . For the rest just follow the C documentation . Answer based on this Cortana sample https : github.com Microsoft Windows-universal-samples tree master Samples CortanaVoiceCommand js .", "Question : I m writing a program in C to get the system s public IP and inform the user of the new one if it changes . The problem is I have two ways of informing the user : Email or Cortana . For the first one Email I need an anonymous email sender that I don t have or ask the user to provide his her credentials most people won t . Second way Cortana : Let s say I have the program installed on my home PC and I have Cortana enabled on Windows 10 and a Windows Phone with Cortana . If my home PC s public IP address changed Cortana will show a notification on my phone including my new IP address . I saw an API on github that can t do this and Cortana for developers . I thought actions can do the job but after reading the descriptions I m somehow sure that it can t . How can I do that What I did : I wrote a little program for Windows 10 .. . .. . https : www.microsoft.com en-us store apps remotecmd 9nblggh4vr31 .. . .. . and the server-side app .. . .. . http : naryhd.com RemoteCMDServerBETA.zip .. . .. . This app lets you have your PC s cmd on your windows-phone . locally .. . .. . Now I want to add access from internet to it I did that but for security reasons I disabled it now I got a more secure solution for it .. . .. . There are 3 things that I do for accessing it from the internet .. . .. . Command 1 : .. . .. . Command 2 : .. . .. . Forwarding that port : .. . .. . I used open.nat from nuget to do port forwarding . I use this code to get the PC s public IP : .. . .. . I save that IP in a text file and repeat checking it every minute and if it changes it will save that IP and send that IP to the user currently via email but I would like to send it with Cortana . Comment : You should rephrase your question to be more specific and include anything that you have done already . Otherwise people will flag this as too broad and that you want us to do the work for you . You should phrase it more like How do I send notifications to Cortana when X happens or something . Comment : hi there thanks ok i will edit my question now Comment : @user3475113 And this time please use proper capitalization and punctuation . Poorly formatted questions are not only hard to read but will also lead to fewer answers . Comment : thank you for edit : D .. . Answer : You can t do that with Cortana as of right now . You can have a App on the Phone that displays a push Notification in the Action Center or on a Live Tile . Here is some hopefully useful links : .. . .. . Toast Notification and Action Center Overview for Windows 10 https : blogs.msdn.microsoft.com tiles and toasts 2015 07 08 toast-notification-and-action-center-overview-for-windows-10 .. . .. . Inside Windows Platform How to Add Push Notifications to Your App https : channel9.msdn.com Shows Inside-Windows-Platform Inside-Windows-Platform-How-to-Add-Push-Notifications-to-Your-App", "Question : We are writing some custom Cortana commands and have some basics working . Now we d like to open a specific program from our command . The program we re trying to open is a .NET framework application we cannot convert it .NET Core . We were hoping for some convenient equivalent to System.Diagnostics.Process.Start but that doesn t seem to work here . Any ideas on how we could kick off a program from our Cortana command Thanks in advance for any ideas . .. . Answer : Check here : http : www.cnet.com how-to the-complete-list-of-cortana-commands and here http : www.howtogeek.com 225458 15-things-you-can-do-with-cortana-on-windows-10 .. . .. . Voice : Cortana Start Skype .. . .. . On build 9926 Cortana does not have the ability to launch programs with your voice . Trouble Make sure you have Windows Search turned on restart your computer with cortana turned off and turn her back on once the PC has booted . Its a service called Windows Search . Lastly : Reinstall program .", "Question : null .. . Answer : I want to develop a mobile app which will use Cortana for Windows phone and Siri for iPhone but dont want to develop 2 different apps for them . Apache Cordova allows the functionality to develop cross-platform apps but did not find any way to utilize the speech to text engines like Cortana and Siri from it . Any pointers Comment : What interaction are you Planning Cortana and Sirir work very different . Comment : you can t make use of siri on ios apps Comment : Well you can send small things like make a appointment from what I read but surly not in the same way than you can use Cortana .", "Question : This may be a little early to ask this but I m running Windows 10 Technical Preview Build 10122 . I d like to set up Cortana to have custom commands . Here s how she works : .. . .. . Microsoft will process the command and if there isn t anything for it she ll just search the input on bing . However I d like to be able to say something like just for example .. . .. . And have the input I m going to bed now trigger run a batch script a VBScript a command or any some sort some of custom response that basically does the following . Is there a way to set up a predefined custom commands for Cortana Update : .. . .. . I created this basic YouTube tutorial https : youtu.be GICF03UAOcQ and this more advanced one https : youtu.be GICF03UAOcQ with a corresponding GitHub repo https : github.com crclayton custom-cortana-commands-template based on talkitbr s excellent and very helpful answer below http : stackoverflow.com a 31387719 2374028 . At first his answer was beyond my understanding so I decided to break it down in a bit more detail for future users like myself . Comment : Where is your code what have you allready trying to do Comment : Just have a look at this https : msdn.microsoft.com en-us library dn630430.aspx page . You re going to need to know some .NET language and have a small bit of XML skills . Doing this all from batch isn t going to work and I don t think VBScript has a cortana api yet . Refer to stackoverflow.com questions 27670696 http : stackoverflow.com questions 27670696 how-to-modify-cortana-voice-activation-commands-xml-in-c for a similiar answer . .. . Answer : What you can do is write a .bat file and add a shortcut to the file to the Folder : C : ProgramData Microsoft Windows Start Menu Programs you can name the shortcut whatever you want and trigger the shutdown by saying : Hey Cortana open start shortcut name . Make sure that Cortana only listens to you to not get pranked .", "Question : I just started developing a small app for Windows 10 universal . And I am trying to use Cortana in it . What I would like for a start is to have Cortana start my app when I say : Hey Cortana start myAppName It looks like this is not working by default and I could not find any tutorial about that . Any ideas what I should do .. . Answer : I did a tutorial on this with the Quick Start for UWP guide . You can take a look at it here : .. . .. . http : microsoft.github.io UWPQuickStart docs challenges cortana-integration.html .. . .. . If that s not enough to get you rolling please let me know where you re running into issues and I ll see if I can help further . Comment : Do you know a way to do this with a C app not a XAML . My project is a Universal Holographic DirectX 11 App . and by default it does not contain any XAML . Comment : The integration between Windows 10 and Cortana is automatic . If you install an app named Star Wars you can call Cortana Hey Cortana start Star Wars and the app is launched . I think that Cortana recognizes your app based on the display name declared in the manifest file . You don t need to write any XAML or C to obtain this .", "Question : I am trying to develop windows-10 app using existing website . Here is I have followed link http : microsoftedge.github.io WebAppsDocs en-US win10 CreateHWA.htm .. . .. . I am able to view my website in Windows 10 app but I don t know how can I integrate Cortana into my web page I have checked this link also WebApp : Cortana loads app but how can I deep link into the web app with javascript http : stackoverflow.com questions 31912247 webapp-cortana-loads-app-but-how-can-i-deep-link-into-the-web-app-with-javascr .. . .. . but it didn t help me . .. . Answer : I found solution for this . Based on this link WebApp : Cortana loads app but how can I deep link into the web app with javascript http : stackoverflow.com questions 31912247 webapp-cortana-loads-app-but-how-can-i-deep-link-into-the-web-app-with-javascr I did write code in my application .. . .. . The reason cortana was not working because I need to first run windows-universal application manually so it will download vcd file from home page of website . After running application manually first time and second time I did try to give command to cortana to open my application it works", "Question : I use the following code to install my VCD file grammar into Cortana : .. . .. . Success is reported but when I write a query into Cortana the changes I ve made to my VCD file aren t reflected in Cortana . How can I force Cortana to actually use my updated grammar .. . Answer : Cortana will only refresh its cache of grammars at the end of a voice interaction . Click on Cortana s microphone button and then immediately dismiss the Cortana box . You should see your grammar changes reflected within seconds . Installed grammars are stored under LOCALAPPDATA Packages Microsoft.Windows.Cortana cw5n1h2txyewy LocalState Grammars VoiceCommands.Components.0409.cfg . Live i.e . cached grammars are stored under LOCALAPPDATA Packages Microsoft.Windows.Cortana cw5n1h2txyewy LocalState Grammars ReadOnlyGrammars VoiceCommands.Components.0409.cfg . This copy is refreshed every time the user completes a voice interaction with Cortana . No source sorry . This information is based on an e-mail exchange I had with the Cortana devs at Microsoft .", "Question : null .. . Answer : So I m trying to integrate Cortana in my Universal Windows app using Background task because I need to build conversation with Cortana . I was following samples from here https : github.com Microsoft Windows-universal-samples tree master Samples CortanaVoiceCommand cs .. . .. . The sample above is using IBackgroundTask to build conversation and disambiguous trip name matching in AdventureWorksVoiceCommandService .. . .. . So I m trying to do the same on a really basic sample : .. . .. . And I updated Package manifest in this way : .. . .. . And My VCD file contains following : .. . .. . Running that in AdventureWorks smaple app works just fine randomly actually but id does not gives me the error running the same freaking code in my Universal Windows App when asking Cortana 1-to-1 matched string she always says : .. . .. . Something went wrong . Try again later .. . .. . So I assume she does recognizes the command-pattern Hey How Lets Go but some freaking reason she s not able to lunch or run BackgroundTask .. . .. . The biggest point of frustration is that THERE S NO FREAKING WAY TO DEBUG CORTANA MESSAGES If I want to know WHAT EXACTLY WENT WRONG - there s no way for me to do that . The only possible Output that I was able to get from that thing when the error occurs is this : .. . .. . Please If anyone has any ideas experience with that peace of software - don t pass by without answering . I m sitting on this thing for more than a day now without any movement . And yes - I added the Project with BackgroundTask as reference in startup project - did not helped .. . .. . UPDATE1 : .. . .. . 1 . So I managed to run a test BackgroundTask by copying the exact VoiceCommandService project from sample app in to my App and adding that and it is important as a Reference Click on your startup project In toolBar in header got to Project - Add Reference - add your project there .. . .. . 2 . adding it as Project Dependencies or Reference Path - has 0 effect it s sooo Microsoft sorry .. . .. . 3 . My testService in another linked to startup project as Reference still gives same shitty response from awesome Cortana .. . .. . UPDATE2 : .. . .. . Ok so I managed to force her to start talking to my tasks 1 . In order to have those BackgroundTask s working you need to have them in separate project .. . 2 . That project MUST be included as Reference in your Statup Project .. . 3 . That project MUST be of type : Windows Runtime Component .. . 4 . Your BackgroundTask MUST NOT contain constructor - otherwise cortana will bail on it . Do your initialization and other stuff through Run method .. . .. . This can be considered as SOLVED .", "Question : I modified my Windows Phone 8.1 application universal app with just the Windows Phone project live yet to have a VoiceCommandDefinition VCD file in-place and this works fine to start my app in foreground mode and handle parameters . But I want to let my app quickly answer some app specific questions like it is described in this blog https : msdn.microsoft.com en-us windows uwp input-and-devices launch-a-background-app-with-voice-commands-in-cortana for Windows 10 . I have tried to apply this blog but the app manifest modification fails . It does not know the : .. . .. . uap : AppService .. . .. . When I looked it up it seems to be available for Windows 10 only . So I searched up the internet mainly MSDN and stack-overflow but I could only find examples that run the app in foreground . Does anyone know an example how to provide answers to the Cortana content page with a background service .. . Answer : Only App service can meet your requirements . But App service is new in Windows 10 so you cannot use uap : appservice in Windows Phone 8.1 application . You can see App to app communication https : channel9.msdn.com Events Build 2015 3-765 video from 26th minutes which introduce the app service . So you can use universe windows app to develop . Sample is Cortana voice command sample https : github.com Microsoft Windows-universal-samples tree master Samples CortanaVoiceCommand as you see in that blog . Comment : That was I was afraid of . That I can only start my app to then respond with voice and have to wait for Windows 10 Mobile .", "Question : null .. . Answer : I ve had a tough time getting across what I am trying to accomplish as I keep getting notes back about creating VCDs and launching my app from Cortana . I have to guess that I have just failed to describe my task properly so I have crafted the following use-case in hopes that it better describes the task at hand . App BLG is a private app created by a c developer . BLG has a conversation with the USER could be speech could be text however BLG knows without Microsoft how to have a conversation with USER and knows how to turn speech into text . USER asks could be text could be speech hey what s the weather like in Boston today BLG application says hmm...that is a question about weather conditions . Cortana knows how to answer that in Cortana s system commands . I ll forward the request to Cortana how and Cortana will execute and will send back the response to BLG so that BLG can forward that response in BLG s conversation with USER . Note I m not asking Cortana to launch any apps or looking for a special VCD . I m merely asking Cortana to pretend that my question in text at this point was typed into the text window of Cortana s Ask me anything and respond with the answer as text json or xml . Comment : As we ve discussed on MSDN forum what you need is an app service cortana can t do this work for an user app . API Access to Cortana System Commands https : social.msdn.microsoft.com Forums en-US 44aa1b39-b319-418a-832f-8cb5db09f2a5 uwpapi-access-to-cortana-system-commands forum wpdevelop .", "Question : In WP8.1 the MS maps app has favorite places like Home and Work . Cortana uses them of course . Is there a public API to get access to those information and even set new places .. . Answer : Not at the moment . The only thing you can ask Cortana right now is to fire up your app with the argument you told her . There s no way to get to her notebook that s where all that info is stored . Not sure if I d want third party apps getting into that info . That s what Cortana uses to give you accurate answers if third party apps can get in there it could trick her into giving you wrong info answers directions . Comment : Ok but at least the calendar app and Microsoft maps app uses the same places . So I thought there yould something . A task like in new Appointment would be nice to set a new place . Comment : I agree it would be great to have some APIs to talk to Cortana : Comment : For any who are interested in upvoting I ve posted a feature request : Windows-Feedback : contextid 383 feedbackid 6b72a2e1-cf5e-45f8-bf84-85aea5c570ec form 1 src 2", "Question : This may be a little early to ask this but I m running Windows 10 Technical Preview Build 10122 . I d like to set up Cortana to have custom commands . Here s how she works : .. . .. . Microsoft will process the command and if there isn t anything for it she ll just search the input on bing . However I d like to be able to say something like just for example .. . .. . And have the input I m going to bed now trigger run a batch script a VBScript a command or any some sort some of custom response that basically does the following . Is there a way to set up a predefined custom commands for Cortana Update : .. . .. . I created this basic YouTube tutorial https : youtu.be GICF03UAOcQ and this more advanced one https : youtu.be GICF03UAOcQ with a corresponding GitHub repo https : github.com crclayton custom-cortana-commands-template based on talkitbr s excellent and very helpful answer below http : stackoverflow.com a 31387719 2374028 . At first his answer was beyond my understanding so I decided to break it down in a bit more detail for future users like myself . Comment : Where is your code what have you allready trying to do Comment : Just have a look at this https : msdn.microsoft.com en-us library dn630430.aspx page . You re going to need to know some .NET language and have a small bit of XML skills . Doing this all from batch isn t going to work and I don t think VBScript has a cortana api yet . Refer to stackoverflow.com questions 27670696 http : stackoverflow.com questions 27670696 how-to-modify-cortana-voice-activation-commands-xml-in-c for a similiar answer . .. . Answer : You can create commands for Cortana to listen for . These commands need to be described in a XML file called Voice Command Definitions https : msdn.microsoft.com en-us library windows apps dn706593.aspx or VCD . Here s an example : .. . .. . After create this definition you need to register it at App Startup : .. . .. . An then override the App.OnActivated method to handle when the events are triggered : .. . .. . The tutorial shows the complete code http : talkitbr.com 2015 07 13 integrando-a-cortana-em-seu-aplicativo-windows-10 . After you do all of this you can call your batch scripts using ProcessStartInfo or System.Diagnostics.Process.Start . Also if you are interested in responding to the user through Cortana window check this post regarding Cortana in background http : talkitbr.com 2015 08 24 usando-cortana-em-background . Comment : Your tutorial is great Thank you One question I m trying to modify the commands but any updates I make to the VCD xml file do not get updated in Cortana . Any suggestions Comment : @Shmuel After you modify the VCD file are you recompiling deploying and opening the app again The App.OnLaunched need to be called because it s responsible for InstallCommandDefinitionsFromStorageFileAsync . Let me known if it works Comment : Yah that works . I realized that I have made a mistake in the xml config . Thanks", "Question : null .. . Answer : Is it possible to use the Cortana Voice Commands functionality in a generic javascript based web application able to run in any webbrowser platform e.g . through a html5 voice input and webservice of some kind or does the webpage have to be loaded on a windows based computer with Cortana client installed I came across this example but it appears to expect Cortana installed on the device running the page : https : gist.github.com seksenov 17032e9a6eb9c17f88b5" ] }
[ "yes-answer-long", "yes-answer-short" ]
windows-10
UNK_RELATION
jcurses@java@111
jcurses -- the java curses library jcurses is a library for developing text terminal based applications using @placeholder programming language .
{ "confidence": [ 54.23716735839844, 52.6910514831543, 50.70063781738281, 50.70063781738281, 47.39193344116211, 46.72065353393555, 44.1583137512207, 44.1583137512207, 43.890323638916016, 43.52701950073242, 43.50191879272461, 40.972896575927734, 39.593101501464844, 39.034183502197266, 37.722381591796875, 36.58751678466797, 35.548980712890625, 33.55856704711914, 33.1195182800293, 32.200923919677734, 30.166034698486328, 30.166034698486328, 29.635433197021484, 26.373018264770508, 25.80862045288086, 24.290340423583984, 23.417133331298828, 22.867008209228516, 22.23432159423828, 22.23432159423828, 22.12165641784668, 21.332996368408203, 21.10540771484375, 20.641084671020508, 20.641084671020508, 20.641084671020508, 20.528026580810547, 20.528026580810547, 20.08445930480957, 19.66598892211914, 19.66598892211914, 18.94959259033203, 18.537612915039062, 17.938798904418945, 17.62914276123047, 17.62914276123047, 17.092370986938477, 17.07073402404785, 17.07073402404785, 16.919979095458984, 16.042316436767578, 15.593391418457031, 15.36418628692627, 15.351846694946289, 15.06070327758789, 15.06070327758789, 15.06070327758789, 15.06070327758789, 15.06070327758789, 15.06070327758789, 15.06070327758789, 15.06070327758789, 15.06070327758789, 14.721864700317383, 14.721864700317383, 13.888916969299316, 13.534719467163086, 13.534719467163086, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209, 13.07028865814209 ], "content": [ "I have read that JCurses library could help .", "JCurses is likely not finding the library since the stack-trace shows a failure in getLibraryPath .", "If it s not there you ll get : .. . .. . java.lang.RuntimeException : couldn t find jcurses library", "I am trying to use the Jcurses library for coding a Rougelike .", "I m just getting started developing my first console-application with JCurses .", "PS : I found that a similar question had been asked but it appeared to offer an alternative to Jcurses not how to use Jcurses .", "After a lot of searching I ve found a library called JCurses that can do the task .", "i ve try to setup the Jcurses Library but the result-of it was just starting the cmd.exe without any content there was only the path of the workspace .", "This is completely a JCurses sourceforge.net projects javacurses issue .", "I want to use Jcurses with Scala on a 64-bit Ubuntu .", "Make sure you have the Jcurses for your platform available here http : sourceforge.net projects javacurses files javacurses 0.9.5b that is jcurses-windows-0.9.5b.zip .", "I agree that JCurses could be used but I don t think that using an external library to implement a single piece of functionality is the best solution .", "I also tried with the original tutorial of Jcurses : .. . .. . .. . .. . How to run a JCurses application .. . .. . To work around the above mentioned problem you first need to determine the command being used to start your program .", "Also you shouldn t need the source directory software Java jcurses src in your classpath since source files aren t needed to run the program .", "I really appreciate any help using JCurses or any other way would do .", "I was wondering how specifically I should set up Jcurses so that I can compile and write classes that access it .", "By the way your sample code runs fine on my machine although it took some effor to fix the JCurses makefile to build on OS X .", "The root problem is most likely that jcurses.jar was not being found on your classpath causing ClassLoader.getSystemClassLoader .getResource jcurses system Toolkit.class to return null .", "Can anyone who has used JCurses either tell me what I need to do in my app to enable colors or confirm that this is a terminal emulation problem", "I just tried to use JCurses from within Groovy but I always get the following exception : .. . .. . Toolkit.java : 37 : .. . .. . Google told me that it could have to do with spaces within the classpath windows but moving the library and even using the classes instead of the .jar file was not successful .", "It seems to be possible - pleac for groovy references JCurses : http : pleac.sourceforge.net pleac groovy userinterfaces.html .. . .. . Another way to clear the screen from within a Groovy shell script would also solve my problem .", "What should my directories look like in relation to where the Jcurses folder is stored and where my project is stored when everything is set up and which paths do I need to set", "Java Curses has a couple of specific keystroke recognition methods but tying yourself down to an external library for a single function may not be the best solution .", "Managed to run that with the following arguments : .. . .. . c start C : Windows System32 cmd.exe k C : Program Files Java jdk1.7.0 25 bin java -Dfile.encoding Cp1251 -classpath C : Users username workspace JCurses Example bin C : Users username.m2 repository jcurses lib jcurses.jar Testwin .. . .. . Note that there is no spaces between quotes .. . k C : Progr.. . and my java execution file is java.exe and not .. . bin javaw.exe as stated in your arguments .", "Link with that library .", "It will generate a Borland compatible import library .", "I would personally suggest this library here .", "These are the same errors I get if I don t add the library at all so I m thinking the linker doesn t likes the IMPLIB generated library that much .", "Edit : Another option is to use Borland s COFF2OMF tool on the Microsoft import library .", "Those errors appear if I don t include the library in my project at all .", "enter image description here http : i.stack.imgur.com 3jWdh.jpg .. . .. . Position : C : Windows System32 cmd.exe .. . .. . Workspace : workspace loc : Azubi Storys .. . .. . Arguments : c start C : Windows System32 cmd.exe k C : Program Files Java jre1.8.0 25 bin javaw.exe -Dfile.encoding Cp1252 -classpath C : Users YAlSabiry Desktop Android Eclipse Projekte Azubi Storys bin C : Users YAlSabiry Desktop Android jcurses lib jcurses.jar Testwin .. . .. . and i used this code to run the console .. . .. . If you need more informations please let me know i will answer quickly", "with java the Program works fine .", "I m trying to develop a program that simulates the Terminal in Linux .", "I ve added the library pdcurses.lib to my project and I ve added the pdcurses.dll in the deployment section .", "So I m thinking the linker doesn t reads the newly generated library or something like this .", "So far I have tried including the library in Eclipse but following the normal process for including libraries resulted in errors .", "What happens if you do the same thing in Java", "I used java long time ago .", "What you are after could be achieved by creating a terminal-style Swing application and using a KeyListener to detect keystroke events .", "I ve did that and now I ve got 3 link32 errors after I ve added the library generated by IMPLIB from the .dll file .", "There s a related problem you can run into if it can t find the C library containing the native-code libjcurses.so or libjcurses64.so on linux .", "Assuming of course you re not on a different OS with a terminal containing more than 80 lines.. .", "I have used an external Java console .", "Your color example just produces Some 31mRed 0m text .", "Where component is any JComponent object assumably a terminal display and yourAction is any Swing action .", "I have used colors successfully in the same terminal by printing the escape codes from a perl program .", "And if you want different coloured text you can see my updated answer.. .", "Step 1 Run Java app as usual it does not matter if it fails and switch to the debug view .", "Instructions : .. . .. . Step 1 Run Java app as usual it does not matter if it fails and switch to the debug view .", "I m using Windows .", "Does it means that you are only using theses 2 functions", "So if you want to trace specific keystrokes or want to affect program behaviour based on different user inputs I would recommend using key-bindings http : docs.oracle.com javase tutorial uiswing misc keybinding.html eg which are implemented as part of Swing .", "As jline is bundled with Groovy can t you use the class jline.ANSIBuffer.ANSICodes http : jline.sourceforge.net apidocs jline ANSIBuffer.ANSICodes.html as is shows in the page you linked to .. . .. . You might also need to do : .. . .. . If you want the cursor to go back to the top of the screen .. . .. . To draw coloured text you can do :", "For Example : c start C : WINXP system32 cmd.exe k C : Programme Java jre6 bin java.exe -Dfile.encoding Cp1252 -classpath C : Dokumente und Einstellungen mccae Eigene Dateien javawork TWCC+ bin at.co.lipski.twcc2.console.TWCCDaemon .. . .. . Please note that you need to wrap paths containing whitespace with quotes .", "Unfortunately i didn t find any tutorial about this subject .", "Can anybody help me", "My test program testjcurses.scala .. . .. . I processed it the following way : .. . .. . The result is : .. . .. . Can anybody help me", "It will take some time to perform this task .", "There s just something wrong with your setup .", "Below my best guess .", "Unfortunately you can t use in bash like that is expanded to your home dir only right after an unquoted space technically at the beginning of a bash word but after a space is the simple version .", "Look how your command-line is expanded : .. . .. . As you can see the is there in the expanded version and will arrive unchanged to your program which will be unable to interpret it as anything since tilde-expansion is a job for the shell .", "So try :", "I forgot to mention i am using netbeans 7.0", "Especially when the same can be achieved using native functions .", "I tried using Toolkit.readCharacter like this : .. . .. . But the problem was that the readCharacter method does not end execution no matter how many characters you input .", "Using the paramaterised form of getInputMap as shown here is preferable for a console-application as the user will necessarily making keystrokes within the top level window and therefore component focus is irrelevant .", "It appears from the source that the focused buttons should have different colors out of the box and I ve also tried explicitly setting different colors for focused buttons using Button.setFocusedButtonColors with no effect .", "Anybody knows how to integrate Pdcurses with Embarcadero C++ Builder", "but whatever I might do I still got a link32 error .", "But why don t you show us the error", "It s ilink32 Error Error : C : USERS RADU DESKTOP FOTBAL ASCII PDCURSES.LIB contains invalid OMF record type 0x21 possibly COFF", "first edit your question with the errors do not add a comment .", "Some people will skip right over the question if it does not contain all the information needed .", "Second try building pdcurses from source and create a builder compatible DLL yourself .", "Thank s @GregorBrandt for reminding me about the sources .", "So here s a small tutorial for those who are in a hurry and need to use pdcurses with C++ Builder :", "Googled it for you .", "The lib file is not compatible with Borland s OMF file-format .", "Use the Borland s IMPLIB tool passing the DLL as argument .", "Here are the errors : ilink32 Error Error : Unresolved external stdscr referenced from C : USERS RADU DESKTOP FOTBAL ASCII WIN32 DEBUG OBIECTE.OBJ ilink32 Error Error : Unresolved external wgetch referenced from C : USERS RADU DESKTOP FOTBAL ASCII WIN32 DEBUG OBIECTE.OBJ ilink32 Error Error : Unable to perform link", "Same errors as-if you don t use the lib", "Do you also got a H header with the lib and the DLL", "Here s a small how to for those who need it in a hurry : .. . .. . Go to http : sourceforge.net projects pdcurses files pdcurses 3.4 and download the pdc34dllw.zip and the pdcurs34.zip that contains the source files .", "Extract the files from pdc34dllw.zip and keep only these ones : curses.h pdcurses.dll and optionally panel.h .. . .. . After that extract the other archive pdcurs34.zip and go to win32 folder .", "There in your windows console do : .. . .. . From all those files generated after the build search for pdcurses.lib as you will only need that .", "Copy the files curses.h pdcurses.dll from the first archive and the newly generated pdcurses.lib in your C++ Builder project folder .", "Add the pdcurses.lib to your project include the curses.h header file hit F9 and it should work fine .", "My problem is that I can t clear the screen in the default Eclipse console .", "But I can t get it working in Eclipse .", "I ve searched for a tutorial but it seems there is not .", "Can any one help me how to use it", "OK I found it .", "It s called Eric : .. . http : cs.roosevelt.edu eric console.html .. . .. . It s very easy to use .", "It could be run flawlessly on Eclipse although it s said to be for Netbeans only .", "Thanks guys very much", "This didn t work for me in Windows but another SO answer http : stackoverflow.com a 20452886 511976 did .", ": -", "hm .", "both powershell and cmd.exe seem not to support ANSI codes ." ] }
{ "confidence": [ 72.28665161132812, 63.58022689819336, 63.0793342590332, 62.683815002441406, 59.78083801269531, 59.30204772949219, 53.57986831665039, 53.298973083496094, 49.35939407348633, 20.99468994140625, 16.555818557739258 ], "content": [ "Question : I am writing an application that requires me to read a key from console without having to wait for the user to hit enter . I have read that JCurses library could help . I tried using Toolkit.readCharacter like this : .. . .. . But the problem was that the readCharacter method does not end execution no matter how many characters you input . Even if you press enter it still seems that it is waiting for you to enter a character . I really appreciate any help using JCurses or any other way would do . Comment : I forgot to mention i am using netbeans 7.0 .. . Answer : Java Curses has a couple of specific keystroke recognition methods but tying yourself down to an external library for a single function may not be the best solution . What you are after could be achieved by creating a terminal-style Swing application and using a KeyListener to detect keystroke events . However MadProgrammer notes in How to make esc stop a method http : stackoverflow.com questions 17078336 how-to-make-esc-stop-a-method 17078531 17078531 that such a solution may have focus issues . So if you want to trace specific keystrokes or want to affect program behaviour based on different user inputs I would recommend using key-bindings http : docs.oracle.com javase tutorial uiswing misc keybinding.html eg which are implemented as part of Swing . e.g . Where component is any JComponent object assumably a terminal display and yourAction is any Swing action . Using the paramaterised form of getInputMap as shown here is preferable for a console-application as the user will necessarily making keystrokes within the top level window and therefore component focus is irrelevant . Comment : i don t think he s referring to Swing AWT . This is completely a JCurses sourceforge.net projects javacurses issue . Comment : @GaryTsui The question states that any other way would do . I agree that JCurses could be used but I don t think that using an external library to implement a single piece of functionality is the best solution . Especially when the same can be achieved using native functions .", "Question : I am trying to use the Jcurses library for coding a Rougelike . I was wondering how specifically I should set up Jcurses so that I can compile and write classes that access it . I m using Windows . So far I have tried including the library in Eclipse but following the normal process for including libraries resulted in errors . What should my directories look like in relation to where the Jcurses folder is stored and where my project is stored when everything is set up and which paths do I need to set PS : I found that a similar question had been asked but it appeared to offer an alternative to Jcurses not how to use Jcurses . Comment : I would personally suggest this library here . One simple jar file import it into Eclipse and you re done . github.com trystan AsciiPanel https : github.com trystan AsciiPanel .. . Answer : Make sure you have the Jcurses for your platform available here http : sourceforge.net projects javacurses files javacurses 0.9.5b that is jcurses-windows-0.9.5b.zip . Next to install do these steps from ECLIPSE JCURSES HOWTO.txt http : downloads.sourceforge.net project javacurses ECLIPSE JCURSES HOWTO.txt r http 3A 2F 2Fsourceforge.net 2Fprojects 2Fjavacurses 2Ffiles 2FECLIPSE JCURSES HOWTO.txt 2Fdownload ts 1386501782 use mirror softlayer-dal - .. . .. . If you know which command Eclipse uses to launch your program start at step 4 . Step 1 Run Java app as usual it does not matter if it fails and switch to the debug view . Step 2 Right click on the process and open the property window by selecting Properties . Step 3 Select and copy the command-line parameter used to launch the program . Step 4 Hit the arrow-button next to External Tools The play icon with a small red toolbox and hit External Tools Configuration .. . .. . Step 5 Create a new configuration with the following data :", "Question : I just tried to use JCurses from within Groovy but I always get the following exception : .. . .. . Toolkit.java : 37 : .. . .. . Google told me that it could have to do with spaces within the classpath windows but moving the library and even using the classes instead of the .jar file was not successful . It seems to be possible - pleac for groovy references JCurses : http : pleac.sourceforge.net pleac groovy userinterfaces.html .. . .. . Another way to clear the screen from within a Groovy shell script would also solve my problem . : - .. . Answer : The root problem is most likely that jcurses.jar was not being found on your classpath causing ClassLoader.getSystemClassLoader .getResource jcurses system Toolkit.class to return null . There s a related problem you can run into if it can t find the C library containing the native-code libjcurses.so or libjcurses64.so on linux . It expects the C libary to be in the same folder where it found jcurses.jar . If it s not there you ll get : .. . .. . java.lang.RuntimeException : couldn t find jcurses library", "Question : I just tried to use JCurses from within Groovy but I always get the following exception : .. . .. . Toolkit.java : 37 : .. . .. . Google told me that it could have to do with spaces within the classpath windows but moving the library and even using the classes instead of the .jar file was not successful . It seems to be possible - pleac for groovy references JCurses : http : pleac.sourceforge.net pleac groovy userinterfaces.html .. . .. . Another way to clear the screen from within a Groovy shell script would also solve my problem . : - .. . Answer : found another trivial way to clear the screen : - Comment : Assuming of course you re not on a different OS with a terminal containing more than 80 lines.. .", "Question : null .. . Answer : I m just getting started developing my first console-application with JCurses . So far I can get a window to display with a couple buttons but there is no visual differentiation between the focused and unfocused buttons . It appears from the source that the focused buttons should have different colors out of the box and I ve also tried explicitly setting different colors for focused buttons using Button.setFocusedButtonColors with no effect . Can anyone who has used JCurses either tell me what I need to do in my app to enable colors or confirm that this is a terminal emulation problem I have used colors successfully in the same terminal by printing the escape codes from a perl program .", "Question : I want to use Jcurses with Scala on a 64-bit Ubuntu . Unfortunately i didn t find any tutorial about this subject . Can anybody help me My test program testjcurses.scala .. . .. . I processed it the following way : .. . .. . The result is : .. . .. . Can anybody help me Comment : What happens if you do the same thing in Java Comment : I used java long time ago . It will take some time to perform this task . Comment : By the way your sample code runs fine on my machine although it took some effor to fix the JCurses makefile to build on OS X . There s just something wrong with your setup . Comment : with java the Program works fine . Comment : JCurses is likely not finding the library since the stack-trace shows a failure in getLibraryPath . Below my best guess . .. . Answer : Unfortunately you can t use in bash like that is expanded to your home dir only right after an unquoted space technically at the beginning of a bash word but after a space is the simple version . Look how your command-line is expanded : .. . .. . As you can see the is there in the expanded version and will arrive unchanged to your program which will be unable to interpret it as anything since tilde-expansion is a job for the shell . Also you shouldn t need the source directory software Java jcurses src in your classpath since source files aren t needed to run the program . So try :", "Question : I m trying to develop a program that simulates the Terminal in Linux . My problem is that I can t clear the screen in the default Eclipse console . After a lot of searching I ve found a library called JCurses that can do the task . But I can t get it working in Eclipse . I ve searched for a tutorial but it seems there is not . Can any one help me how to use it .. . Answer : OK I found it . I have used an external Java console . It s called Eric : .. . http : cs.roosevelt.edu eric console.html .. . .. . It s very easy to use . It could be run flawlessly on Eclipse although it s said to be for Netbeans only . Thanks guys very much Comment : This didn t work for me in Windows but another SO answer http : stackoverflow.com a 20452886 511976 did .", "Question : Greatings .. . .. . i hope you guys outthere can help me to solve my problem . i ve try to setup the Jcurses Library but the result-of it was just starting the cmd.exe without any content there was only the path of the workspace . I readed a lot of howtos but non of this did work . I also tried with the original tutorial of Jcurses : .. . .. . .. . .. . How to run a JCurses application .. . .. . To work around the above mentioned problem you first need to determine the command being used to start your program . Instructions : .. . .. . Step 1 Run Java app as usual it does not matter if it fails and switch to the debug view . .. . Step 2 Right click on the process and open the property window by selecting Properties . .. . Step 3 Select and copy the command-line parameter used to launch the program . .. . Step 4 Hit the arrow-button next to External Tools The play icon with a small red toolbox and hit External Tools Configuration .. . .. . Step 5 Create a new configuration with the following data : Location : The path to the cmd.exe of your Windows OS . For Example : C : WINXP system32 cmd.exe Working Directory : Whatever working directory you want . Arguments : c start C : WINXP system32 cmd.exe k followed by the previously copied command . For Example : c start C : WINXP system32 cmd.exe k C : Programme Java jre6 bin java.exe -Dfile.encoding Cp1252 -classpath C : Dokumente und Einstellungen mccae Eigene Dateien javawork TWCC+ bin at.co.lipski.twcc2.console.TWCCDaemon .. . .. . Please note that you need to wrap paths containing whitespace with quotes . The above command will start your application in a new detached console window which will stay open until you manually close it . Now you can launch your newly created configuration and enjoy your application from inside Eclipse . My external-tools-config looks like this .. . .. . enter image description here http : i.stack.imgur.com 3jWdh.jpg .. . .. . Position : C : Windows System32 cmd.exe .. . .. . Workspace : workspace loc : Azubi Storys .. . .. . Arguments : c start C : Windows System32 cmd.exe k C : Program Files Java jre1.8.0 25 bin javaw.exe -Dfile.encoding Cp1252 -classpath C : Users YAlSabiry Desktop Android Eclipse Projekte Azubi Storys bin C : Users YAlSabiry Desktop Android jcurses lib jcurses.jar Testwin .. . .. . and i used this code to run the console .. . .. . If you need more informations please let me know i will answer quickly .. . Answer : Managed to run that with the following arguments : .. . .. . c start C : Windows System32 cmd.exe k C : Program Files Java jdk1.7.0 25 bin java -Dfile.encoding Cp1251 -classpath C : Users username workspace JCurses Example bin C : Users username.m2 repository jcurses lib jcurses.jar Testwin .. . .. . Note that there is no spaces between quotes .. . k C : Progr.. . and my java execution file is java.exe and not .. . bin javaw.exe as stated in your arguments . Comment : sorry but i ve tried yours and bevor that i ve tried many other ways to type it but non of them worked .", "Question : I just tried to use JCurses from within Groovy but I always get the following exception : .. . .. . Toolkit.java : 37 : .. . .. . Google told me that it could have to do with spaces within the classpath windows but moving the library and even using the classes instead of the .jar file was not successful . It seems to be possible - pleac for groovy references JCurses : http : pleac.sourceforge.net pleac groovy userinterfaces.html .. . .. . Another way to clear the screen from within a Groovy shell script would also solve my problem . : - .. . Answer : As jline is bundled with Groovy can t you use the class jline.ANSIBuffer.ANSICodes http : jline.sourceforge.net apidocs jline ANSIBuffer.ANSICodes.html as is shows in the page you linked to .. . .. . You might also need to do : .. . .. . If you want the cursor to go back to the top of the screen .. . .. . To draw coloured text you can do : Comment : hm . both powershell and cmd.exe seem not to support ANSI codes . But somehow it seems to be possible to clear the screen from your program - grails does it in interactive mode.. . Comment : When does grails clear the screen in interactive mode Comment : ok . got me . but grails does a lot of other magic like changing the font color and replacing the current line.. . Comment : Ahhh.. . it s a known bug of jLine http : jline.sourceforge.net known bugs that Clearing the screen CTRL-L doesn t currently work on Windows . And if you want different coloured text you can see my updated answer.. . Comment : Unfortunately it seems to be not only the Clearing the screen which does not work on windows . Your color example just produces Some 31mRed 0m text . All control-characters are ignored with only a few exceptions n t r b seem to be ignored .", "Question : Anybody knows how to integrate Pdcurses with Embarcadero C++ Builder I ve added the library pdcurses.lib to my project and I ve added the pdcurses.dll in the deployment section . but whatever I might do I still got a link32 error . Comment : But why don t you show us the error Comment : It s ilink32 Error Error : C : USERS RADU DESKTOP FOTBAL ASCII PDCURSES.LIB contains invalid OMF record type 0x21 possibly COFF Comment : first edit your question with the errors do not add a comment . Some people will skip right over the question if it does not contain all the information needed . Second try building pdcurses from source and create a builder compatible DLL yourself . Comment : Thank s @GregorBrandt for reminding me about the sources . So here s a small tutorial for those who are in a hurry and need to use pdcurses with C++ Builder : .. . Answer : Googled it for you . The lib file is not compatible with Borland s OMF file-format . Use the Borland s IMPLIB tool passing the DLL as argument . It will generate a Borland compatible import library . Link with that library . Edit : Another option is to use Borland s COFF2OMF tool on the Microsoft import library . Comment : I ve did that and now I ve got 3 link32 errors after I ve added the library generated by IMPLIB from the .dll file . These are the same errors I get if I don t add the library at all so I m thinking the linker doesn t likes the IMPLIB generated library that much . Comment : Here are the errors : ilink32 Error Error : Unresolved external stdscr referenced from C : USERS RADU DESKTOP FOTBAL ASCII WIN32 DEBUG OBIECTE.OBJ ilink32 Error Error : Unresolved external wgetch referenced from C : USERS RADU DESKTOP FOTBAL ASCII WIN32 DEBUG OBIECTE.OBJ ilink32 Error Error : Unable to perform link Comment : Same errors as-if you don t use the lib Does it means that you are only using theses 2 functions Comment : Those errors appear if I don t include the library in my project at all . So I m thinking the linker doesn t reads the newly generated library or something like this . Comment : Do you also got a H header with the lib and the DLL", "Question : Anybody knows how to integrate Pdcurses with Embarcadero C++ Builder I ve added the library pdcurses.lib to my project and I ve added the pdcurses.dll in the deployment section . but whatever I might do I still got a link32 error . Comment : But why don t you show us the error Comment : It s ilink32 Error Error : C : USERS RADU DESKTOP FOTBAL ASCII PDCURSES.LIB contains invalid OMF record type 0x21 possibly COFF Comment : first edit your question with the errors do not add a comment . Some people will skip right over the question if it does not contain all the information needed . Second try building pdcurses from source and create a builder compatible DLL yourself . Comment : Thank s @GregorBrandt for reminding me about the sources . So here s a small tutorial for those who are in a hurry and need to use pdcurses with C++ Builder : .. . Answer : Here s a small how to for those who need it in a hurry : .. . .. . Go to http : sourceforge.net projects pdcurses files pdcurses 3.4 and download the pdc34dllw.zip and the pdcurs34.zip that contains the source files . Extract the files from pdc34dllw.zip and keep only these ones : curses.h pdcurses.dll and optionally panel.h .. . .. . After that extract the other archive pdcurs34.zip and go to win32 folder . There in your windows console do : .. . .. . From all those files generated after the build search for pdcurses.lib as you will only need that . Copy the files curses.h pdcurses.dll from the first archive and the newly generated pdcurses.lib in your C++ Builder project folder . Add the pdcurses.lib to your project include the curses.h header file hit F9 and it should work fine ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
gorilla-toolkit@toolkit@37
gorilla-toolkit -- gorilla is a web @placeholder for the go programming language .
{ "confidence": [ 59.352806091308594, 54.32818603515625, 51.42307662963867, 51.42307662963867, 51.178890228271484, 49.67426681518555, 49.651275634765625, 48.443321228027344, 47.02783966064453, 47.02783966064453, 47.02783966064453, 46.05014419555664, 45.749210357666016, 45.749210357666016, 45.749210357666016, 45.749210357666016, 45.749210357666016, 45.64265441894531, 45.64060974121094, 45.49970245361328, 44.30207061767578, 43.24518966674805, 42.637760162353516, 42.59770584106445, 42.42991638183594, 42.42991638183594, 41.63322448730469, 41.527122497558594, 41.450340270996094, 41.24272537231445, 41.15381622314453, 41.15381622314453, 40.99191665649414, 40.76560592651367, 40.76560592651367, 40.18608856201172, 39.1197624206543, 38.52177429199219, 38.52177429199219, 38.481719970703125, 38.4466552734375, 38.4466552734375, 38.4466552734375, 38.4466552734375, 38.4466552734375, 38.4466552734375, 38.4466552734375, 38.4466552734375, 38.4466552734375, 38.4466552734375, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.574501037597656, 36.27980041503906, 36.02625274658203, 35.88160705566406, 35.88160705566406, 35.88160705566406, 35.88160705566406, 35.88160705566406, 35.88160705566406, 35.88160705566406, 34.33067321777344, 34.33067321777344, 34.33067321777344, 34.33067321777344, 34.33067321777344, 34.33067321777344, 34.15447998046875, 34.00945281982422, 34.00945281982422, 34.00945281982422, 34.00945281982422, 33.91204833984375, 33.0086669921875, 33.0086669921875, 33.0086669921875, 33.0086669921875, 33.0086669921875, 33.0086669921875, 32.25696563720703, 31.91027069091797, 31.91027069091797, 31.765625, 31.765625, 31.765625, 30.74981689453125, 29.889514923095703, 29.889514923095703 ], "content": [ "The server-side is Go and uses Gorilla Web Toolkit mux and sessions packages .", "Am trying to implement Gorilla Web Toolkit sessions against a memcached cluster .", "I m using gorilla web tool kit .", "I m using gorilla context in a web app .", "Above code is from gorilla documenation as-is used and I did run go get github.com gorilla handlers .", "Possible duplicate of Gorilla web toolikit : len session.Flashes is 0 http : stackoverflow.com questions 32219364 gorilla-web-toolikit-lensession-flashes-is-0", "Session Variables are not maintained across request while using gorilla sessions web toolkit .", "The gorilla sessions https : godoc.org github.com gorilla sessions package uses gorilla context https : godoc.org github.com gorilla context in its implementation .", "The same with gorilla sessions .. . .. . Now I don t get what the point of gorilla context is .", "Could you perhaps show an example of how a gorilla sessions could be used with gorilla context", "I ve fixed the example in the docs : github.com gorilla handlers pull 55 https : github.com gorilla handlers pull 55", "Reading through the Gorilla WebSocket Documentation https : godoc.org github.com gorilla websocket indicates that when a nil value is provided for the CheckOrigin field of an Upgrader https : godoc.org github.com gorilla websocket Upgrader type a safe default is used .", "I m using gorilla mux to get pattern values .", "It works with http.ServeMux Gorilla mux and other routers .", "that s not how you define variable paths in gorilla .", "How do I use RecoveryHandler of Gorilla", "But getting a subrouter is all we have from gorilla .", "I was building and running GO code smoothly on my local server until I had to use some of the packages from Gorilla toolkit .", "I added the gorilla route .", "I m already familiar with gorilla-toolkit and other net http based frameworks like gin-gonic goji and gocraft .", "You can see exactly how this is done in the source code https : github.com gorilla websocket blob master server.go L61 for the Gorilla library .", "So I just started learning the Go programming language and have spent hours on end looking at examples references and so forth .", "Use securecookie.GenerateRandomKey https : godoc.org github.com gorilla securecookie GenerateRandomKey", "I never had this problem until I ran go get github.com gorilla mux though .", "The gorilla handlers https : github.com gorilla handlers library doesn t provide a way to do this by default : the logging functions there log in Apache formats which don t provide for this .", "I need to build a route which matches two subdomains prefix.api.example.com and prefix.api.sandbox.example.com using gorilla mux https : godoc.org github.com gorilla mux Router.Host router .", "Show the code used to create the Gorilla route .", "I built an RESTful API using Gorilla web toolkit which works great when only few requests are being sent over to the server .", "Gorilla sessions really has nothing to do with Redis but knowing this you can easily use your own session-storage with Gorilla provided you build a RedisStore that adheres to the Gorilla sessions Store interface https : github.com gorilla sessions blob master store.go L21 .", "I m trying to use both ways to create a user session for my Go web application but I m not sure if Gorilla sessions will be a good package to use .", "I am using gorilla web toolkit and golang and have the following code .. . .. . My server will serve a html-document with a form that will do a get-request and send a id something .", "I m using Gorilla Toolkit http : www.gorillatoolkit.org pkg http for golang to request a web resource GET and I want to process the response body but don t know how to access it .", "As mentioned in route.go https : github.com gorilla mux blob 8a875a034c69b940914d83ea03d3f1299b4d094b route.go L302-L303 : .. . .. . If you are using PathPrefix as in those tests https : github.com gorilla mux blob 8096f47503459bcc74d1f4c487b7e6e42e5746b5 mux test.go L261 use it for a specific path not for the generic .", "I want to use Gorilla mux to handle api requests .", "Does gorilla mux add its own flavour on top of the std regex", "gorilla context stores values shared during a request lifetime whereas gorilla session data persists across multiple requests through secure cookie .", "last only as long as the tab browser session by setting session.Options.MaxAge 0 as per this part of the gorilla sessions docs https : github.com gorilla sessions blob master sessions.go L24-L32 .", "link-to the Gorilla session package : http : www.gorillatoolkit.org pkg sessions", "I am using gorilla mux package in golang but there are some problems .", "I am having a problem to go to a particular document in this case an event using gorilla and mgo .", "As the person who asked that other question : .. . .. . gorilla context allows you to store data in the request .", "The default MaxAge is 86400 30 https : github.com gorilla securecookie blob master securecookie.go L50 one month .", "I guess gorilla-toolkit s session ought to return an error when calling Save if the response has already been written to .", "possible duplicate of How to create a route with optional url var using gorilla mux", "http : stackoverflow.com questions 18503189 how-to-create-a-route-with-optional-url-var-using-gorilla-mux", "Add : .. . .. . I am pretty sure Gorilla will route s the longest match s in order of registration .", "The HandlerFunc method on Route http : godoc.org github.com gorilla mux Route.HandlerFunc expects to be passed a function as the error message indicates .", "In Gorilla using RecoveryHandler http : www.gorillatoolkit.org pkg handlers RecoveryHandler we could suppress the panics .", "As the readme states the package is still under construction https : github.com gorilla http image-of-an-under-construction-gif .", "In gorilla sessions http : www.gorillatoolkit.org pkg sessions NewCookieStore func NewCookieStore keyPairs .. . byte CookieStore is a used to create a new CookieStore .", "The Gorilla site lists this as the memcache support : https : github.com hnakamur gaesessions but it requires the appengine package .", "Couldn t find anything so I went ahead and put this together : .. . .. . https : github.com bradleypeabody gorilla-sessions-memcache", "Coming from a PHP background I m a little confuse about Gorilla sessions package .", "Does Gorilla act similar to SESSION name or does it act similar to COOKIE name from PHP", "So would Gorilla sessions be able to handle both scenarios or should I use something else in this case", "The gorilla sessions http : www.gorillatoolkit.org pkg sessions package has built-in cookie filesystem based stores .", "Also how do I make AngularJS CSRF protection work with Gorilla CSRF", "gorilla probably isn t going to come with JavaScript for your client since it s an API library .", "Gorilla is automatically going to set your cookie and do your server-side check for you if you use csrf.Protect .", "If you send the value along with all your requests Gorilla will most likely cover the rest for you .", "The chat example https : github.com gorilla websocket tree master examples chat shows how to do this .", "Send pings https : github.com gorilla websocket blob a68708917c6a4f06314ab4e52493cc61359c9d42 examples chat conn.go L111 on a regular interval .", "Reset the read deadline https : github.com gorilla websocket blob a68708917c6a4f06314ab4e52493cc61359c9d42 examples chat conn.go L57 when a pong is received .", "This is the directory structure : .. . .. . Previous Question : .. . .. . I am using the Gorilla mux toolkit to handle http requests in a web server app : .. . .. . I want to add a handler for invalid URLS but it is never called : .. . .. . If I remove the static handler the not found handler is called .", "In an HTTP server written in go I use gorilla mux http : www.gorillatoolkit.org pkg mux for routing .. . I want to use http.TimeoutHandler and or other middleware but I can t understand where I can fit them .", "Now I have a gorilla mux router that serves different content for the main domain and another router that serves different content filtered by subdomain.domain.tld .", "You could set the router s strict slash http : godoc.org github.com gorilla mux Router.StrictSlash to true so that domain user redirects to domain user .", "I making the following call using Restangular : .. . .. . I have a ReST service defined using gorilla : .. . .. . Note that the service requires a trailing-slash .", "Is it possible using the net http package and or any of the gorilla libraries to make some code execute on EVERY URL before going to the handler", "The documentation and source indicate an Upgrade https : godoc.org github.com gorilla websocket Upgrade function in the websocket package that acts as a factory for your example code above .", "The factory function https : github.com gorilla websocket blob master server.go L223 takes a custom buffer size and overrides the CheckOrigin to always return true .", "Apparently that library doesn t support https lol .. . .. . https : github.com gorilla http issues 8 .. . .. . So just use the stdlib http module :", "Gorilla sessions provides a means to wire up a storage system for session management provided you adhere to the interface provided .", "Gorilla basically gives you two options out of the box with an option for providing your own that suits your app .", "I am having a hard time understanding Gorilla mux s session name .", "Or the gorilla session handles by itself that each user gets its own session and values", "If the application uses session data to store id of the authenticated user then the application does not need use the gorilla context package directly .", "So gorilla sessions persists data into securecookie but also keeps copy in context for access", "I m trying to get AngularJS to work with Gorilla CSRF for my web applciation but there aren t many documentation around that I can find so I m not sure where exactly to start .", "storing large values in the session pick from the available implementations https : github.com gorilla sessions store-implementations - Redis BoltDB mySQL Postgres etc .", "How do we get the thread id or any other unique Id of the http-request being handled by the handler in logging inside Gorilla Handlers", "Given a Rest API developed using Gorilla library how do I track all log statements of specific http-request inside a handler processing", "Set read deadline https : github.com gorilla websocket blob a68708917c6a4f06314ab4e52493cc61359c9d42 examples chat conn.go L56 to a time less than next expected pong .", "I am using the gorilla-toolkit mux to route requests i have a couple of subroutes using path prefix problem is i want to get the full request path but req.URL.path only has the part of the url after the path prefix so how do i get a path including the path prefix", "Another question here on stackoverflow said that simply using gorilla context should suffice in the context of Writing Per-Handler Middleware http : stackoverflow.com questions 19784687 writing-per-handler-middleware .", "So request comes in middleware sets temporary keyword value handler reads value from gorilla context.. . but in 6 . you write that it persists in the session do you store the token in the session", "If instead you have an http.Handler call Handler http : godoc.org github.com gorilla mux Route.Handler instead : .. . .. . Or alternatively have your MyHandler function return the handler function directly rather than wrapping it as an http.Handler .", "When using .Queries you need to give it both a key and a value like : .. . .. . You can also use a pattern as the value like : .. . .. . See here for details : http : godoc.org github.com gorilla mux Route.Queries", "My question is : Is it possible to mix net http framework toolkits with fasthttp for example I would like to use some gorilla packages with echo iris fasthttp frameworks", "Use ioutil.ReadAll https : godoc.org io ioutil ReadAll to read the entire response body as a byte : .. . .. . I suggest that you use the net http client https : godoc.org net http Client instead of the Gorilla client .", "I ve been playing around with gorilla-websocket in Go and as I implemented the basic echo example I logged an error after deploying the server .. . .. . Origin is not found Websocket version 13 .. . .. . I found a way to bypass this by making the function that checks the origin always return true .. . .. . But it doesn t feel right .", "Also if you do get around to building a RedisStore that can work with Gorilla Sessions consider making it open-source since it would be a great addition to the Go community .", "The event model : .. . .. . The event handler .. . .. . Gorilla route in main .. . .. . The View html .. . .. . The Error .. . .. . What I want is to go to the route event view Id and show the particular page of the event .", "But I can t figure out what the advantage is of using Redis as a custom back-end for Gorilla sessions package over using it directly", "One is a FilesystemStore https : github.com gorilla sessions blob master store.go L144 that adheres to the interface that simply stores and retrieves session based data on the server s filesystem .", "The advantage to Gorilla Sessions is the core functionality of session management is nicely abstracted away in a library that has pluggable back-end storage solutions .", "Perhaps go creators are more influenced by C language .", "The gorilla context documentation explains it well http : www.gorillatoolkit.org pkg context top : .. . .. . .. . a router can set variables extracted from the URL and later application handlers can access those values or it can be used to store sessions values to be saved at the end of a request .", "I recently asked about serving static content and handling 404 with Gorilla mux when using Handle instead of PathPrefix the app can serve the root page http : localhost : 8888 : .. . .. . However requests for pages within the root page e.g ." ] }
{ "confidence": [ 63.112762451171875, 56.79383850097656, 56.17015075683594, 55.71239471435547, 54.977142333984375, 54.66041564941406, 53.84666442871094, 53.375457763671875, 53.16828155517578, 53.14302062988281, 52.9730224609375, 52.97229766845703, 52.735435485839844, 51.61406707763672, 50.837196350097656, 50.637237548828125, 50.40647888183594, 49.78813171386719, 49.651939392089844, 49.22743606567383 ], "content": [ "Question : Am trying to implement Gorilla Web Toolkit sessions against a memcached cluster . The Gorilla site lists this as the memcache support : https : github.com hnakamur gaesessions but it requires the appengine package . Does anyone know of a simple memcache session-storage backend in pure Go that doesn t require the appengine package .. . .. . Would be easy to write using something like https : github.com bradfitz gomemcache to do the actual memcache work but didn t want to bother if there s one out there that I somehow missed in my googling . .. . Answer : Couldn t find anything so I went ahead and put this together : .. . .. . https : github.com bradleypeabody gorilla-sessions-memcache", "Question : I m using Gorilla Toolkit http : www.gorillatoolkit.org pkg http for golang to request a web resource GET and I want to process the response body but don t know how to access it . Here is my main.go .. . .. . Gorillas response object is of the type io.ReadCloser and I can t wrap my head around how to access it . Any help is appreciated . .. . Answer : Use ioutil.ReadAll https : godoc.org io ioutil ReadAll to read the entire response body as a byte : .. . .. . I suggest that you use the net http client https : godoc.org net http Client instead of the Gorilla client . There are more examples of how use the net http client and the net http client better maintained .", "Question : Trying to use RecoverHandler http : www.gorillatoolkit.org pkg handlers RecoveryHandler compile from Intellij fails . I get below errors . Above code is from gorilla documenation as-is used and I did run go get github.com gorilla handlers . How do I use RecoveryHandler of Gorilla .. . Answer : It seems the documentation is incorrect . handlers.RecoveryHandler can not be used as a http handler middleware itself it returns one . Looking at the signature .. . .. . we can see that it takes 0 or more handlers.RecoveryOption s and returns a func http.Handler http.Handler . That func that it returns is what we actually want to wrap around our router . We can write it as .. . .. . Or you could do it all in one line Comment : I ve fixed the example in the docs : github.com gorilla handlers pull 55 https : github.com gorilla handlers pull 55", "Question : I am using gorilla web toolkit and golang and have the following code .. . .. . My server will serve a html-document with a form that will do a get-request and send a id something . How can I set up a pattern in the mx.HandleFunc to match the query so that test is called I have tried : .. . .. . the last one I changed the corresponding page code so that form makes a post instead . .. . Answer : When using .Queries you need to give it both a key and a value like : .. . .. . You can also use a pattern as the value like : .. . .. . See here for details : http : godoc.org github.com gorilla mux Route.Queries Comment : I have read the godoc and tried this : mx.HandleFunc test .Queries id bar . I print the r.URL.String from the request and get id bar but it only goes to frontPage-func mx.HandleFunc frontPage . I expected it to go call test since it was a query or both test a frontPage since it fits both patterns. . Comment : Ahhh I think I know what is happening . It is a ordering of the handleFuncs that is the problem . I have the default case first which also matches and catches id so by changing the order it works anyway thank you .", "Question : I recently asked about serving static content and handling 404 with Gorilla mux when using Handle instead of PathPrefix the app can serve the root page http : localhost : 8888 : .. . .. . However requests for pages within the root page e.g . http : localhost : 8888 demo page1.html get intercepted by the 404 handler . Is there any way to prevent this while catching requests for non-existent pages or services This is the directory structure : .. . .. . Previous Question : .. . .. . I am using the Gorilla mux toolkit to handle http requests in a web server app : .. . .. . I want to add a handler for invalid URLS but it is never called : .. . .. . If I remove the static handler the not found handler is called . However the app needs to serve the static content from a non-absolute path . Is there a way to combine that with 404 handling Comment : What is your directory structure Comment : Added to the question .. . Answer : I suspect r.PathPrefix .Handler would match any path making the notfound handler useless . As mentioned in route.go https : github.com gorilla mux blob 8a875a034c69b940914d83ea03d3f1299b4d094b route.go L302-L303 : .. . .. . If you are using PathPrefix as in those tests https : github.com gorilla mux blob 8096f47503459bcc74d1f4c487b7e6e42e5746b5 mux test.go L261 use it for a specific path not for the generic . Comment : Thanks Von I suspected that too . We want to serve a root index.html page so entering localhost : 8888 quot http : localhost : 8888 quot in a browser gives the user the static content . Hence r.PathPrefix .Handler . Is there an alternative to that would permit 404 handling and serving the static content Comment : @CloomMagoo yes but the side effect is that the NotFoundHandler would never be called . Comment : @CloomMagoo for use mux.HandleFunc .. . not PathPrefix Comment : to use HandleFunc instead of PathPrefix what would the actual handler func for serving the static directory look like I ll investigate but if you have an example I d appreciate it . Thanks . Comment : @CloomMagoo like any other httpHandler function .", "Question : I m writing a chat program with Golang and Gorilla s Websocket toolkit . I m wondering if there is a way to run a function whenever a user disconnects or a ping pong message fails . I need this to remove them from variables and such . Is there any easy way to do this .. . Answer : The application should close the connection and cleanup variables and such when the read methods NextReader ReadMessage return an error . Use ping pong to detect disconnects . The chat example https : github.com gorilla websocket tree master examples chat shows how to do this . Send pings https : github.com gorilla websocket blob a68708917c6a4f06314ab4e52493cc61359c9d42 examples chat conn.go L111 on a regular interval . Set read deadline https : github.com gorilla websocket blob a68708917c6a4f06314ab4e52493cc61359c9d42 examples chat conn.go L56 to a time less than next expected pong . Reset the read deadline https : github.com gorilla websocket blob a68708917c6a4f06314ab4e52493cc61359c9d42 examples chat conn.go L57 when a pong is received . If a pong goes missing the read methods will return with the read past deadline error .", "Question : Coming from a PHP background I m a little confuse about Gorilla sessions package . Does Gorilla act similar to SESSION name or does it act similar to COOKIE name from PHP I m trying to use both ways to create a user session for my Go web application but I m not sure if Gorilla sessions will be a good package to use . I want the users who didn t click on the remember-me button on the login form to have their session erased after closing their browser whereas everyone else will have a cookie associated with them . So would Gorilla sessions be able to handle both scenarios or should I use something else in this case .. . Answer : It entirely depends on which storage back-end you use . The gorilla sessions http : www.gorillatoolkit.org pkg sessions package has built-in cookie filesystem based stores . There is no memory-based store which is roughly what PHP s SESSION is . My recommendation : .. . .. . Use the built-in cookie store which uses signed cookies . It is well suited for most purposes and is the easiest to implement . If you have a need for server-side sessions i.e . storing large values in the session pick from the available implementations https : github.com gorilla sessions store-implementations - Redis BoltDB mySQL Postgres etc . I have first-hand experience with the Redis backed store redistore https : github.com boj redistore which has been great . The BoltDB a file-based key store and Postgres stores are also solid if you have a preference for those . I want the users who didn t click on the remember-me button on the login form to have their session erased after closing their browser whereas everyone else will have a cookie associated with them . So would Gorilla sessions be able to handle both scenarios or should I use something else in this case Note that all implementations require a cookie - it s just whether the cookie is the self-contained store or whether it just holds an identifier referring to a row value in the back-end store . You can set session-cookies i.e . last only as long as the tab browser session by setting session.Options.MaxAge 0 as per this part of the gorilla sessions docs https : github.com gorilla sessions blob master sessions.go L24-L32 . e.g . Hope that helps .", "Question : Session Variables are not maintained across request while using gorilla sessions web toolkit . When I start the server and type localhost : 8100 page is directed to login.html since session values do not exist.After I login I set the session variable in the store and the page is redirected to home.html . But when I open a new tab and type localhost : 8100 the page should be directed to home.html using already stored session variables but the page is instead redirected to login.html . Following is the code . Can somebody tell me what I am doing wrong . Thanks in advance . .. . Answer : The problem is you re writing to the response before calling session.Save . That prevents the headers from being written and thus your cookie from being sent to the client . In the code after session.Query you re calling Fprintf on the response as soon as this code executes calling sessionNew.Save essentially does nothing . Remove any code that writes to the response and try again . I guess gorilla-toolkit s session ought to return an error when calling Save if the response has already been written to .", "Question : I ve been playing around with gorilla-websocket in Go and as I implemented the basic echo example I logged an error after deploying the server .. . .. . Origin is not found Websocket version 13 .. . .. . I found a way to bypass this by making the function that checks the origin always return true .. . .. . But it doesn t feel right . Therefore I am looking for a way to fix that issue . Update : After having another look at the issue it seems like I m actually looking to add the origin header to the client implementation which is the javascript websocket implementation .. . .. . @benjic Im connecting to the websocket via a javascript html5 application that isn t hosted on the same server but is run locally by me via chrome .. . .. . So how do I do that . .. . Answer : Reading through the Gorilla WebSocket Documentation https : godoc.org github.com gorilla websocket indicates that when a nil value is provided for the CheckOrigin field of an Upgrader https : godoc.org github.com gorilla websocket Upgrader type a safe default is used . The default checks the Origin field of the incoming request with the Host header value to confirm they are equal before allowing the request . The documentation indicates that browsers do not enforce cross origin validity and it is the responsibility of the server application to enforce . You can see exactly how this is done in the source code https : github.com gorilla websocket blob master server.go L61 for the Gorilla library . The documentation and source indicate an Upgrade https : godoc.org github.com gorilla websocket Upgrade function in the websocket package that acts as a factory for your example code above . The factory function https : github.com gorilla websocket blob master server.go L223 takes a custom buffer size and overrides the CheckOrigin to always return true . Instead of creating a custom Upgrader you can use this factory function in the HttpHandler to upgrade your connections . Comment : Check the Origin header of the WebSocket handshake request on the server since that header was designed to protect the server against attacker-initiated cross-site connections of victim browsers Use session-individual random tokens like CSRF-Tokens on the handshake request and verify them on the server.that is a quote from a websocket security blog i was reading.And so doesn t the empty CheckOrigin function cause any security vulnerabilities @CodingPickle Comment : @Whiteclaws If you want to use the default CheckOrigin function you need to ensure that your client library includes the Origin header with it s request . If you update the question to include your architecture I can update my answer to reflect the update .", "Question : I was looking for a fast framework for go and I stumbled upon fasthttp https : github.com valyala fasthttp which is according to the developer and the benchmark is 10x faster than Golang net http package . I m already familiar with gorilla-toolkit and other net http based frameworks like gin-gonic goji and gocraft . My question is : Is it possible to mix net http framework toolkits with fasthttp for example I would like to use some gorilla packages with echo iris fasthttp frameworks Comment : Probably not but you d have to show a specific example . For example the signature for an http.Handler contains the concrete type http.Request which won t be the same as a fasthttp.Request .. . Answer : I was checking the Iris framework and I saw in the documentation https : kataras.gitbooks.io iris content using-native-httphandler.html that it s possible use net http with the framework . The framework is using https : github.com valyala fasthttp fasthttpadaptor to convert native net http handler to fasthttp handler .", "Question : I m using gorilla mux to get pattern values . How do I handle an empty variable like so : .. . .. . Go : .. . .. . When I type the url www.example.com products or www.example.com products I get a 404 page not found error . How do i handle an empty variable in ProductHandler http : www.gorillatoolkit.org pkg mux Comment : possible duplicate of How to create a route with optional url var using gorilla mux http : stackoverflow.com questions 18503189 how-to-create-a-route-with-optional-url-var-using-gorilla-mux Comment : @SvenGrosen you re not supposed to write that by hand . When you cast a close-vote because of duplication it s automatically posted for you : P Comment : @tomwilde I didn t write it by hand just flagged it . Comment : Weird . Maybe they changed the system but I can only see one my own vote . I ll post on meta . .. . Answer : Simplest solution Add : .. . .. . I am pretty sure Gorilla will route s the longest match s in order of registration . This is also the way the documentation s overview page http : www.gorillatoolkit.org pkg mux overview suggest it be used : .. . .. . Then register routes in the subrouter : .. . .. . .. . s.HandleFunc products ProductsHandler .. . s.HandleFunc products key ProductHandler .. . s.HandleFunc articles category id : 0-9 + ArticleHandler .. .", "Question : I get sessions coming from PHP I used to .. . .. . Set one or more keys and their values serverside and be able to retrieve or overwrite it until the session expires . The same with gorilla sessions .. . .. . Now I don t get what the point of gorilla context is . I know what a context is but.. . I don t know how it fits in the big picture . It says that it s bound to the current request . Another question here on stackoverflow said that simply using gorilla context should suffice in the context of Writing Per-Handler Middleware http : stackoverflow.com questions 19784687 writing-per-handler-middleware . But if it s request bound.. . err. . syntax-error does not compute . If a duck floats on water then witches are made from wood . And because ducks also float on water if her weight is the same as that of a duck she must be a witch . Or something like that .. . .. . And how could this be useful as a middleware manager when it s request-bound I can t set it globally . Could you perhaps show an example of how a gorilla sessions could be used with gorilla context Comment : If you look at Be ego another web framework for Go . The context is pretty much a wrapper for everything request details response parameter values header values etc. . and basically everything you might need to know about the request issuer . Comment : thank you I ll check it out .. . Answer : An example . I m writing this multi-community-forum software . Now I have a gorilla mux router that serves different content for the main domain and another router that serves different content filtered by subdomain.domain.tld . Context is very useful here else you would repeat yourself over and over again . So if I know that for the subdomain router every request would do string operations to find out the subdomain name and check if it exists in the database I could just do this here in context for every request and then store the subdomain name in a context variable . And likewise if a forum s category slug or forum slug or a thread slug is set pass it to the handler keep the processing that needs to be done in context and have less code in your handlers . So the advantage of context is essentially to keep code DRY . Like elihrar wrote his example of a CSRF token . If you know that you need to check for the CSRF token on each request - don t duplicate this check in every handler that needs to do this instead write a context wrapper http.Handler and do this for every request .", "Question : There seem to be all sorts of examples of using a HandlerFunc closure similar to this one : http : codegangsta.gitbooks.io building-web-apps-with-go content controllers README.html .. . .. . However I can t get it to work with a subrouter . Example : .. . .. . Gives me this error : .. . .. . Any insights into what I m doing wrong .. . Answer : The HandlerFunc method on Route http : godoc.org github.com gorilla mux Route.HandlerFunc expects to be passed a function as the error message indicates . If instead you have an http.Handler call Handler http : godoc.org github.com gorilla mux Route.Handler instead : .. . .. . Or alternatively have your MyHandler function return the handler function directly rather than wrapping it as an http.Handler . Which option you choose is going to be a matter of style and depend on the rest of your program . Comment : Perfect I didn t know about .Handler . Thank you", "Question : I am using the gorilla-toolkit mux to route requests i have a couple of subroutes using path prefix problem is i want to get the full request path but req.URL.path only has the part of the url after the path prefix so how do i get a path including the path prefix thanks in advance .. . Answer : Try req.Referer http : godoc.org net http Request.Referer .. . .. . It is retrieved from an header value and you are not guaranteed that it is not spoofed .", "Question : I want to use Redis for session management . But I can t figure out what the advantage is of using Redis as a custom back-end for Gorilla sessions package over using it directly link-to the Gorilla session package : http : www.gorillatoolkit.org pkg sessions .. . Answer : Gorilla sessions provides a means to wire up a storage system for session management provided you adhere to the interface provided . Currently they give you two stores out of the box . One is a FilesystemStore https : github.com gorilla sessions blob master store.go L144 that adheres to the interface that simply stores and retrieves session based data on the server s filesystem . The CookieStore https : github.com gorilla sessions blob master store.go L52 as another option reads and writes to the browsers built-in cookie system to accomplish the same thing using another means . Gorilla sessions really has nothing to do with Redis but knowing this you can easily use your own session-storage with Gorilla provided you build a RedisStore that adheres to the Gorilla sessions Store interface https : github.com gorilla sessions blob master store.go L21 . It really all depends on your capability and what you are looking for in a session store system . Gorilla basically gives you two options out of the box with an option for providing your own that suits your app . Also if you do get around to building a RedisStore that can work with Gorilla Sessions consider making it open-source since it would be a great addition to the Go community . You have to evaluate the needs and performance requirements of your app to figure out which storage system to use . Why does Redis possibly make sense Well if you are building an app that does heavy writes modifications and this data needs to persist Redis is well known to help you scale your app so long as you utilize it properly . A Redis backed session will perform really well if you know what you are doing . Last point should you get Redis involved consider using this wonderful Go package : Redigo https : github.com garyburd redigo as your Redis client library . Comment : there is one already and i think it is good github.com boj redistore https : github.com boj redistore just to make sure i got this right the advantage of using gorilla sessions is the ability to use several ways together Comment : The advantage to Gorilla Sessions is the core functionality of session management is nicely abstracted away in a library that has pluggable back-end storage solutions . As for Redis really what it boils down to is Redis is known for speed . That coupled with it s pretty robust persistence model means it will handle a ton of concurrent read-write operations . But it does add complexity to your application because now you have an additional component that needs to be maintained tuned etc . Comment : You can very well do that but then you are also having to roll your own session and state management which includes figuring out how to deal with login logout matching sessions to users and persisting sessions should a user return . Comment : i got it thanks very much", "Question : I am new to SO and a relatively new beginner to GO . I was building and running GO code smoothly on my local server until I had to use some of the packages from Gorilla toolkit . What I ran in the command-line : .. . .. . I did this based on the example from here : http : golang.org doc articles go command.html . Under gettng started with the Go Command and here http : www.gorillatoolkit.org . After this I imported my main.go code into the mygo folder . My directory folder looks like this : .. . .. . However when I ran go build main.go and tried to run . main I got .. . .. . What is happening Please help . Thanks Comment : Go source code is not executable on its own . You need to compile it . Start here : golang.org doc code.html http : golang.org doc code.html Comment : I never had this problem until I ran go get github.com gorilla mux though . I don t understand what is happening . Comment : I guarantee that didn t work before . For one thing you can t execute go source code nor can the shell interpret it . The message you have is the exact output from bash if you try to execute a non-executable file named mycode.go . Comment : I would run go build main.go and later . main.go . That compiled and worked . Please see the second last line in my question . Comment : If you run go build main.go it outputs a binary called main and nothing else and you can run it via . main .. . Answer : First I highly recommend reading http : linuxcommand.org learning the shell.php then going through the Go tour http : tour.golang.org . Second like @JimB mentioned you can t execute main.go directly like that you can use binfmt misc http : en.wikipedia.org wiki Binfmt misc but I m not gonna explain that here . So the steps to run your executable are : .. . .. . Or directly :", "Question : I understand the difference between context and session in golang . gorilla context stores values shared during a request lifetime whereas gorilla session data persists across multiple requests through secure cookie . Some blogs claim that context is required to pass user data from one middleware to another . For user authentication you would have to store user data in session anyways and why would you store user data into context as well I suppose it is so that you don t have to get user data from session cookie again but it seems redundant . .. . Answer : The gorilla sessions https : godoc.org github.com gorilla sessions package uses gorilla context https : godoc.org github.com gorilla context in its implementation . If the application uses session data to store id of the authenticated user then the application does not need use the gorilla context package directly . Comment : So gorilla sessions persists data into securecookie but also keeps copy in context for access Looks like it caches session into context upon Save", "Question : How do we get the thread id or any other unique Id of the http-request being handled by the handler in logging inside Gorilla Handlers In Java when Tomcat or other container handles multiple http requests thread id helps to track all the log messages for respective http-request handling . What is the equivalent in Go Given a Rest API developed using Gorilla library how do I track all log statements of specific http-request inside a handler processing .. . Answer : The gorilla handlers https : github.com gorilla handlers library doesn t provide a way to do this by default : the logging functions there log in Apache formats which don t provide for this . Also keep in mind that a thread ID doesn t make sense here - you want a request ID that is associated with a http.Request . You could write your own RequestID middleware that creates an ID and stores in the request context for other middleware handlers to retrieve as-needed : .. . .. . Keep in mind that the code above is not tested . Written off the top of my head in the Playground so please let me know if there s a bug . Improvements you could consider beyond this basic example : .. . .. . Prefix the ID with the hostname - helpful if you are aggregating logs from multiple processes machines .. . Provide a timestamp or incrementing integer as part of the final ID to help trace requests over time .. . Benchmark it . Note that under extremely high loads e.g . tens of thousands of req s - tens of millions of hits per day this may not be performant but is unlikely to be a bottleneck for 99 of users . PS : I may look at providing a handlers.RequestID implementation in the gorilla handlers library at some point - if you d like to see it raise an issue on the repo and I ll see if I can find time to implement a more complete take on the above . Comment : With this every where we need logging we need to pass around request instance to retrieve the ID . This is painful . From handlers we may call many functions which could be utility functions database methods etc . All these methods can be modified to accept Request instance .", "Question : I am having a problem to go to a particular document in this case an event using gorilla and mgo . The event model : .. . .. . The event handler .. . .. . Gorilla route in main .. . .. . The View html .. . .. . The Error .. . .. . What I want is to go to the route event view Id and show the particular page of the event . My guess is that there is probably a data type parsing problem but still tried a few ways and failed . Comment : Show the code used to create the Gorilla route . Also to prevent panic in ObjectIdHex check for valid input by calling godoc.org gopkg.in mgo.v2 bson IsObjectIdHex https : godoc.org gopkg.in mgo.v2 bson IsObjectIdHex . Comment : I added the gorilla route . I dont quite understand where should I check if for ObjectIdHex Comment : I prevented the panic but the new page shows nothing about the event.. . It seems the data from the server is lost . Comment : My suggestion to call IsObjectIdHex is to prevent malformed user input from causing your app to panic . It s not fix the problem . .. . Answer : Try to remove spaces from your router as eventId eventId", "Question : I get sessions coming from PHP I used to .. . .. . Set one or more keys and their values serverside and be able to retrieve or overwrite it until the session expires . The same with gorilla sessions .. . .. . Now I don t get what the point of gorilla context is . I know what a context is but.. . I don t know how it fits in the big picture . It says that it s bound to the current request . Another question here on stackoverflow said that simply using gorilla context should suffice in the context of Writing Per-Handler Middleware http : stackoverflow.com questions 19784687 writing-per-handler-middleware . But if it s request bound.. . err. . syntax-error does not compute . If a duck floats on water then witches are made from wood . And because ducks also float on water if her weight is the same as that of a duck she must be a witch . Or something like that .. . .. . And how could this be useful as a middleware manager when it s request-bound I can t set it globally . Could you perhaps show an example of how a gorilla sessions could be used with gorilla context Comment : If you look at Be ego another web framework for Go . The context is pretty much a wrapper for everything request details response parameter values header values etc. . and basically everything you might need to know about the request issuer . Comment : thank you I ll check it out .. . Answer : As the person who asked that other question : .. . .. . gorilla context allows you to store data in the request . If you have some middleware that does some pre-processing on a request before deciding to continue i.e . anti-CSRF you might want to store a token in the request so your handler can pass it to the template . The gorilla context documentation explains it well http : www.gorillatoolkit.org pkg context top : .. . .. . .. . a router can set variables extracted from the URL and later application handlers can access those values or it can be used to store sessions values to be saved at the end of a request . There are several others common uses . You may also want to store data in the session : error messages from form submissions a user ID or the canonical version of the CSRF token for that visitor will likely be stored here . If you try to store an error message in the request context and then re-direct the user you ll lose it that s a new request . So why would you use context over sessions It s lighter and allows you to de-couple parts of your application often HTTP middleware from each other . Example : .. . .. . 1 . Request comes in .. . 2 . CSRF middleware checks the session for an existing CSRF token . Does not exist so it sets one . 3 . It also passes this new token via the request context to the handler that renders your form so it can render it in the template otherwise you would have to pull the token from the session again which is wasted effort .. . 4 . Request is done . 5 . New request on form submission .. . 6 . The token still persists in the session so we can compare it to the submitted token from the form . 7 . If it checks out we proceed to process the form .. . 8 . If not we can save an error in the session a flash message i.e . one that is erased after reading and re-direct . 9 . This re-direction is a new request and therefore we can t pass the error message via the request context here . Comment : Aah in the scope of the requests s context 3 . . So request comes in middleware sets temporary keyword value handler reads value from gorilla context.. . but in 6 . you write that it persists in the session do you store the token in the session .. . I forgot to mention that I m not doing server-side template rendering but RESTful JSON requests angular . I d like to write an auth middleware for starters that checks if the user is set or valid on every request that is not serving static files and then the handler should decide if it returns success or error . Comment : Storing things in the request context can exist entirely independent of session-storage . Your auth middleware might check a header and or make a DB call to see if that user is valid and you might save their ID in the context so your handler can send it back in the response or something like that . Comment : thank you . I know we shouldn t post thank yous but I don t care . Thanks for taking the time to explain it" ] }
[ "yes-answer-long", "yes-answer-short" ]
toolkit
UNK_RELATION
elk-stack@kibana@60
elk-stack -- elk-stack combines the elasticsearch logstash @placeholder to provide realtime insights of any type of structured unstructured data .
{ "confidence": [ 69.9566650390625, 67.92366027832031, 61.493431091308594, 59.88890075683594, 59.0833740234375, 58.18357467651367, 57.32390594482422, 57.32390594482422, 56.82088088989258, 55.91210174560547, 55.91210174560547, 55.4381103515625, 53.87910079956055, 53.48130416870117, 52.942169189453125, 51.49429702758789, 51.49429702758789, 51.24591827392578, 51.24591827392578, 51.24591827392578, 51.24591827392578, 51.216392517089844, 50.03131866455078, 49.821205139160156, 49.47227096557617, 49.31220245361328, 49.21291732788086, 48.50334930419922, 48.11018371582031, 47.81200408935547, 47.256832122802734, 46.99116897583008, 46.8281135559082, 46.65684509277344, 46.65684509277344, 46.65684509277344, 46.65684509277344, 46.59619903564453, 46.009273529052734, 45.967674255371094, 45.05931854248047, 44.960594177246094, 44.960594177246094, 44.960594177246094, 44.960594177246094, 44.8943977355957, 44.527095794677734, 43.93946075439453, 43.363067626953125, 43.22666931152344, 42.92759323120117, 42.92759323120117, 42.92759323120117, 42.92759323120117, 42.92759323120117, 42.92759323120117, 42.810089111328125, 42.810089111328125, 42.79658508300781, 42.40067672729492, 41.41831970214844, 41.3300666809082, 40.975311279296875, 40.79784393310547, 40.669593811035156, 40.669593811035156, 40.542789459228516, 40.542789459228516, 40.52404022216797, 40.43787384033203, 40.36767578125, 40.36767578125, 40.316795349121094, 39.983768463134766, 39.92010498046875, 39.69869613647461, 39.2790641784668, 39.2790641784668, 39.2790641784668, 39.2790641784668, 38.22385787963867, 37.982872009277344, 37.91581726074219, 37.74631881713867, 37.340274810791016, 37.246063232421875, 36.93838882446289, 36.93365478515625, 36.85492706298828, 36.80533981323242, 36.80533981323242, 36.7705192565918, 36.7705192565918, 36.7705192565918, 36.7705192565918, 36.69603729248047, 36.531005859375, 36.525753021240234, 36.42539978027344, 36.219566345214844 ], "content": [ "I have an ELK stack with log entries coming from Logstash into Elasticsearch .", "I m centralizing logs with ELK Stack Elasticsearch Logstash and Kibana .", "template elk logstash current elasticsearch-template.json", "I ve setup ELK Stack. .", "With ELK Elasticsearch-Logstash-Kibana stack I collect syslog logs from nix boxes to Logstash and send it to Kibana via Elasticsearch .", "Now I want to feed this data to the ELK stack .", "I am new to elk-stack .", "I am new to ELK stack .", "Earlier It was working as expected but after upgrading my ELK stack it s breaking : - .. . .. . my logstash filter : .. . .. . logstash logs :", "I am a little new to the ELK stack .", "I am using ELK stack with filebeat .", "Disclaimer : I am very new to ELK Stack so this question can be very basic . .. . .. . I am setting up ELK stack now .", "I am using the ELK stack for shipping logs .", "Now we are looking into the ELK stack and would like the dashboards of Kibana display realtime data so I was thinking of logging using syslog to logstash .", "I ve set up a basic ELK stack to prase and display apache logs .", "I m totally new with ELK stack and especially with ES .", "There are a lot of ELK stack install guides available .", "I am using ELK stack to monitor some changes in a csv file .", "In our project we re using an ELK stack for storing logs in a centralized place .", "Setting up a logging system for a Drupal 8 installation using the ELK stack .", "ELK stack is heavily used but cAdvisor only support influxdb .", "I have the ELK stack with logstash-forwarder setup and it appears to be working for JBoss logs .", "I am trying to process old log files on my local ELK stack macOs but I can t get Logstash to read my files .", "Installed an ELK server via : https : www.digitalocean.com community tutorials how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-centos-7 .. . .. . It seems to work except for the filebeat connection filebeat does not appear to be forwarding anything or at least I can t find anything in the logs to indicate anything is happening .", "In the context of ELK Elasticsearch Logstash Kibana I learnt that Logstash has FILTER to make use of grok to divide log messages into different fields .", "can we run both filebeat and logstash-forwarder for same ELK server", "All the Docker container logs on that machine will be forwarded to your ELK stack automatically .", "I have set up ELK stack and following type of JSON is getting stored in elasticsearch following JSON is copied from Kibana UI .", "I would like to use an ELK stack to catch logs apply filters and show data .", "I am trying to set up ELK Stack following this tutorial : https : www.digitalocean.com community tutorials how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04 .. . .. . However there is a problem with Logstash : the service is stopping if there is a pattern in the output section for example index @metadata beat - +YYYY.MM.dd .. . .. . With constant strings however it works just fine : index nginx web .. . .. . Is there a way to trace data incoming from filebeat in order to check a problematic portion", "Logstash conf file : .. . .. . Logstash Docker file : .. . .. . docker compose for ELK : .. . .. . Note : My spring-boot application and elk are on different networks .", "ELK-Cookbook - CloudFormation Script https : github.com hautelook elk-cookbooks blob master cloudformation.json .. . .. . ELK-Stack with Google OAuth in Private VPC https : github.com guardian elk-stack blob master cloudformation ELK Stack Multi AZ in Private VPC.json .. . .. . Comment below if this doesn t solves your problem .", "I am currently working on setting up ELK stack on Bluemix containers .", "I am trying to use nsq as a broker for the ELK stack http : www.elasticsearch.org overview elkdownloads .", "I have instead moved to Centos7 using the latest version of the ELK stack using Filbeats as the forwarder .", "In our production environment we have an ELK stack which we are using for monitoring our own log files .", "I know about COMBINEDAPACHELOG but I still wanted to parse it this way for my own experience and to understand ELK stack batter .", "I me trying to parse some Apache access logs using ELK stack but I m having issues with logstash not applying the Apache filter i created on any Apache logs .", "I originally followed the tutorial from https : www.digitalocean.com community tutorials how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04 .. . .. . I ve made some changes but it s mostly the same .", "I Installed ELK Elasticsearch Logstash and Kibana with YUM onto our centos based system and set them as start at boot time .", "I m using ELK and using filebeat to forward log of file mnt log app.log to logstash .", "I am looking to set up an ELK stack and have three servers to do so .", "I m trying to deploy an ELK stack with docker-py on a VirtualBox VM running Ubuntu 14.04 .", "I m sorry probably the question seems stupid but in all tutorials I ve seen they use Hadoop or Kafka in front of ELK stack .", "I am very new to the ELK stack and I am having some difficulty wrapping my head around it .", "I am new to logstash and desparate to setup ELK for one of the usecase .", "Redis or Kafka or XYZ can be used as buffer in the ELK stack https : www.elastic.co guide en logstash current deploying-and-scaling.html deploying-message-queueing as you ve rightly noticed .", "In your title the logs are the logs from Elasticsearch or logs received when using ELK for logs centralisation", "You can also try to run ELK with basic settings for logstash and check if that works", "I configured ELK server on ubuntu and installed logstash-forwarder in client machines ubuntu Redhat Linux and getting Logs successfully to Logstash .", "Recently I am trying to find out best Docker logging mechanism using ELK stack .", "With ELK stack what is the best methodology to do the log forwarding - Should I use Lumberjack .", "Then in the filebeat.yml configuration file put : .. . .. . Then config Filebeat to forward to the rest of your ELK stack and start the container .", "Here s one way to forward docker logs to the ELK stack requires docker 1.8 for the gelf log driver : .. . .. . 1 .", "I also saw a series of tutorials on the Logz.io blog http : logz.io blog infrastructure-monitoring-topbeat-elk-stack .", "I have just started exploring the ELK stack and this might be a completely wrong way to do this kind of analysis .", "I have been working with ELK stack for a while now and after setting it up I am trying out some new visualizations .", "Now seeing how difficult it is to scale redis and make it highly available compontent in ELK stack I want to ask what is even the point of redis .", "I might be asking for too much here and I think it s just not implemented yet but I have ELK stack setup similar almost identical to how this tutorial does it : https : www.digitalocean.com community tutorials how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04 So basically I have filebeat setup on a client computer and it sends all the log files in a folder to logstash on the server computer .", "If so does anyone use ELK for metering in production", "When I test on the ELK server to see if I am getting anything : .. . .. . Oh and my logstash configuration for filebeats : .. . .. . UPDATE : It is not filebeat .", "In a presentation I used syslog to forward the logs to a Logstash ELK instance listening on port 5000 .", "I have 2 node ELK cluster configured with Shield plugin i.e .", "I have a web app hosted on the azure platform and an ELK stack hosted on a virtual-machine also in azure same subscription and am struggling to find a way to ship the logs from the app to logstash .", "Related to : Combine logs and query in ELK http : stackoverflow.com questions 28429607 combine-logs-and-query-in-elk .. . .. . We are setting up ELK and would want to create a visualization in Kibana 4 .", "I wrote a blog about how to build production ELK http : logz.io blog deploy-elk-production - I spoke about what I find to be the right architecture to deploy ELK in production .. . .. . 4 .", "I need to setup ELK stack on amazon linux in order to analyze the logs which are present in the s3 bucket .", "Just to confirm this problem symptoms occur at the application but do not arise when you don t have the elk-stack component", "Be aware that the data structure sent to Logstash or Elasticsearch is not identical .", "I am using Filebeat Logstash Elasticsearch Kibana to parse and analyse logs basically Java Stack Trace and other Logs .", "I have a bunch of logs being ingested in to ELK .", "Below is a sample of the EventMessage field in my ELK index .", "@WillBarnwell logstash has the configuration to output the logs into elastic search so if logstash is not receiving any data how come elasticsearch is recieving data", "In a use-case for gathering system statistics CPU and RAM of multiple systems via ELK stack I believe it should be straight forward to use topbeat - elasticsearch - Kibana .", "Now i have setup ELK cluster with 3 Master nodes 5 data nodes 3 client nodes .", "And make sure the logstash and elasticsearch are running .", "We d like to use the ELK service provided by the Swisscom cloud .", "Or is the ELK service only available to Apps hosted in the Swisscom cloud", "I m new in ELK and currently I m facing the following issue .", "I have a Lambda function in AWS which reports logs to an ELK instance .", "It doesnt sound like you need Kafka or Hadoop for the getting data into ELK part .", "There is no performance issue when there is no ELK component involved .", "Versions : Logstash - 2.3.2 Elasticsearch - 2.3.2 Kibana - 4.5", "i did google and found a link https : github.com logstash-plugins logstash-input-http poller .. . .. . Logstash version - logstash-1.4.5-1 a2bacae.noarch plugin- https : github.com logstash-plugins logstash-input-http poller .. . .. . I tried it with my ELK setup but its is not working for me .", "But our ELK is heavily separated from the original source of the csv files so I thought about sending the csv files via http to logstash instead of using a file system .", "What do people use to ship logs to ELK from web apps", "If all your logstash processing is dont by type then your improperly typed logs would make it to elasticsearch through logstash with no parsing done .", "while installing plugin step 2.2 bin plugin install home elk logstash-input-http poller logstash-input-http poller-2.0.3.gem it returned me .. . .. . Can only install contrib at this time.. .", "The ELK stack has three components : .. . .. . Elastic Search - storage index .. . Logstash - receive and process log messages like syslog JSON text .. . Kibana - Web UI to search and visualize .. . .. . Like written by @Fydor you cannot reach ELK s service endpoints from the outside .", "So does all this mean that ELK stack can now be used for storing metering information gathered inside the system or it still cannot be considered as a serious competitor to existing solutions : graphite influx db and so forth .", "I ve been tasked with managing our ELK stack and writing rules for elastalert but need a specific part of one field I already have as its own field in order to use elastalert s query key functionality on that field .", "Check out our solution for ELK-as-a-Service http : logz.io and the configuration we have for nxlog .", "I really don t understand of the redis acting as a buffer in every standard ELK architecture .", "We are not using tribe nodes but somehow I generated the system key on ELK master node which was culprit .", "The indexes are created date wise which is the default behaviour while setting up ELK .", "We are looking into getting an ELK stack setup on Amazon but we don t really know what we need of machines to handle it smoothly .", "Here are some debugging ideas : svops.com blog debugging-your-elk-cluster http : svops.com blog debugging-your-elk-cluster", "I m beginner with ELK stack so I configured logstash and when I want to search with ElasticSearch I have no results so I m supposed to get a result because I do my parse on grokdebug and it works very well .", "According to my understanding it only helps to make the unstructured log data into more structured-data .", "Also Have you checked for Logstash and Elasticsearch logs" ] }
{ "confidence": [ 85.89310455322266, 80.06450653076172, 78.76742553710938, 77.92121887207031, 77.63135528564453, 75.87737274169922, 73.56881713867188, 73.00529479980469, 71.83702087402344, 71.72566986083984, 71.5763168334961, 70.03331756591797, 69.50646209716797, 68.81282806396484, 67.93042755126953, 67.23493194580078, 66.99102020263672, 66.65198516845703, 66.34459686279297, 65.94740295410156 ], "content": [ "Question : In the context of ELK Elasticsearch Logstash Kibana I learnt that Logstash has FILTER to make use of grok to divide log messages into different fields . According to my understanding it only helps to make the unstructured log data into more structured-data . But I do no have any idea about how Elasticsearch can make use of the fields done by grok to improve the querying performance Is it possible to build indices on base of the fields like in traditional relational-database .. . Answer : From Elasticsearch : The Definitive Guide https : www.elastic.co guide en elasticsearch guide current index.html .. . .. . So you not need to do anything special . Elasticsearch already indexes all the fields by default .", "Question : null .. . Answer : Installed an ELK server via : https : www.digitalocean.com community tutorials how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-centos-7 .. . .. . It seems to work except for the filebeat connection filebeat does not appear to be forwarding anything or at least I can t find anything in the logs to indicate anything is happening . My filebeat configuration is as follows : .. . .. . The log file output I keep getting from filebeat is just not very helpful : .. . .. . Is there anything wrong with my configuration file When I test on the ELK server to see if I am getting anything : .. . .. . Oh and my logstash configuration for filebeats : .. . .. . UPDATE : It is not filebeat . Somewhat relieved that messages are indeed being passed but still have an issue I can t track : .. . .. . Discovered it wasn t filebeat that was causing the issue . It appears that the configuration file in logstash to send to elasticsearch is not properly labeling the index and the type to make it searchable as shown in the question . Instead of putting filebeat in the index name it gives a result like this : .. . .. . The elasticsearch output put in the file turned out to be incorrect in the .. . .. . Apparently this @metadata is not being passed in correctly . Has anyone been able to get the index and type fields to populate correctly This might be a bug with filebeat https : github.com logstash-plugins logstash-input-beats issues 6 Comment : Have to tried a static representation of the index name Just to confirm your suspicion", "Question : null .. . Answer : I ve set up a basic ELK stack to prase and display apache logs . It has been working for the past 1 month but suddenly from last two days elastic search is throwing the below error . MapperParsingException failed to parse timestamp nested : IllegalArgumentException Invalid format : 16 Jul 2016 : 05 : 31 : 27 +0000 is malformed at Jul 2016 : 05 : 31 : 27 +0000 .. . .. . This is a default setup and I haven t made any custom changes in elasticsearch . The indexes are created date wise which is the default behaviour while setting up ELK . If I stop logstash delete the index logstash-2016.07.16 and start logstash it will work fine for a day . The next day it will throw the same error on the new index created logstash-2016.07.17 . Versions : Logstash - 2.3.2 Elasticsearch - 2.3.2 Kibana - 4.5", "Question : We are looking into getting an ELK stack setup on Amazon but we don t really know what we need of machines to handle it smoothly . Now I know that it will become obvious if it doesn t run smooth but still we hoped to get an idea on what we would need for our situation . So we 4 servers that generate log files in a custom format . About 45 million lines of logs each day generating about 4 files of 600mb gzipped so around 24GB of logs each day . Now we are looking into the ELK stack and would like the dashboards of Kibana display realtime data so I was thinking of logging using syslog to logstash . 4 Servers - Rsyslog on those 4 servers - Logstash AWS - ElasticSearch AWS - Kibana AWS .. . .. . So now we need to figure out what kind of hardware we would need in AWS to handle this . I read somewhere 3 masters for ElasticSearch and 2 datanodes at minimum . So that would total 5 servers + 1 server for Kibana and 1 for Logstash So I would need a total of 7 servers to get started but that kinda seems overkill I would like to keep my data for 1 month so 31 days at most so I would have around 1.4TB of raw logdata in Elastic Search 45GB x 31 .. . .. . But since I don t really have a clue on what the best setup would be any hints tips info would be welcome . Also a system or tool that would handle this for me node failure etc could be useful . Thanks in advance .. . .. . darkownage .. . Answer : Seems like you need something to start with ELK Stack on AWS .. . .. . Did u tried this couple of CloudFormation scripts It would ease your installation process and will help you setup your environment in one go . ELK-Cookbook - CloudFormation Script https : github.com hautelook elk-cookbooks blob master cloudformation.json .. . .. . ELK-Stack with Google OAuth in Private VPC https : github.com guardian elk-stack blob master cloudformation ELK Stack Multi AZ in Private VPC.json .. . .. . Comment below if this doesn t solves your problem .", "Question : null .. . Answer : I m trying to deploy an ELK stack with docker-py on a VirtualBox VM running Ubuntu 14.04 . Currently running docker version 1.7 and am using the Docker Hub library official containers for elasticsearch kibana and logstash . I have written a short script to pull configure and start the containers . The elasticsearch and kibana containers are running successfully but the logstash container is exiting after about 23 seconds . my logstash.start.py : .. . .. . Any suggestions Comment : Is there anything in the logs Comment : Hi can You show configuration for kibana and elasticsearch I think You can try to change out port for different and also change that at logstash conf file . You can also try to run ELK with basic settings for logstash and check if that works", "Question : I am trying to set up ELK Stack following this tutorial : https : www.digitalocean.com community tutorials how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04 .. . .. . However there is a problem with Logstash : the service is stopping if there is a pattern in the output section for example index @metadata beat - +YYYY.MM.dd .. . .. . With constant strings however it works just fine : index nginx web .. . .. . Is there a way to trace data incoming from filebeat in order to check a problematic portion logstash 2.3.2 filebeat 1.2.3 .. . .. . here is a full logstash.conf : .. . .. . thanks in advance Comment : Have you tried with only a single pattern like index beat- +YYYY.MM.dd Does it work Comment : i did but that didn t work too . as for now only constants work Comment : Try not to remove the @timestamp field since it s used for the +YYYY.MM.dd part Comment : that worked could you make it an answer not a comment so that i could accept it thanks a lot .. . Answer : You should not remove the @timestamp field since it s used for the +YYYY.MM.dd part in the index name . If you absolutely want to remove the @timestamp field another way would be to add a new field for the index name before removing the @timestamp field . Add this before remove field : .. . .. . And then use index in your elasticsearch output .", "Question : null .. . Answer : I am new to ELK stack . I am trying to setup FileBeat -- Logstash -- ElasticSearch -- Kibana . Here while trying to send FileBeat output to Logstash input I am getting below error on Logstash side : .. . .. . I am using Logstash 2.3.2 version with FileBeat : 1.2.2 elasticsearch : 2.2.1 my logstash config : .. . .. . my filebeat config :", "Question : With ELK Elasticsearch-Logstash-Kibana stack I collect syslog logs from nix boxes to Logstash and send it to Kibana via Elasticsearch . This is classical one scenario . My syslog log includes normal system events squid access log captiveportal login logs etc . captiveportal logged as .. . .. . and .. . .. . squid access logs logged as : .. . .. . In Logstash I have filtered captive portal log and I have got client ip 192.168.1.23 user name mike.brown and also in different filter in Logstash configuration I have also filtered squid access log and I have got src ip 192.168.1.23 . My question is : How can I query to get user name where client ip of squid access log equals to src ip of captive portal in Kibana .. . Answer : You can t do joins in elasticsearch . They discuss a few of the options for relationships in this doc http : www.elasticsearch.org guide en elasticsearch guide current relations.html . Comment : Is this weakness of the elasticsearch I think so and weird thing is you have data but you can not query it . Thanks . Comment : I think of it as a document store not a database . Do you fault a bicycle for not being able to bake bread Comment : Could you extend the answer a little more It matters to me stackoverflow.com questions 33549171 http : stackoverflow.com questions 33549171 correlate-messages-in-elk-by-field", "Question : I m beginner with ELK stack so I configured logstash and when I want to search with ElasticSearch I have no results so I m supposed to get a result because I do my parse on grokdebug and it works very well . I do my research as follows : .. . .. . http : localhost : 9200 logstash-2016.03.14 search q .. . .. . I wanted to know if I can see my logstash files generated and if it generated the results or not knowing that I tried searching elastic search on a JSON file and it works . The problem is at logstash . thanks Comment : Here are some debugging ideas : svops.com blog debugging-your-elk-cluster http : svops.com blog debugging-your-elk-cluster Comment : Maybe you are searching the wrong index List your indexes with localhost : 9200 cat indices http : localhost : 9200 cat indices .. . Answer : Logstash does not generate any file except for its configuration . To debug your logstash instance you can : .. . .. . Use the --verbose flag and or --debug .. . Use the -l file.log to output logs in file.log default to stdout .. . Use the stdout output plugin et see the results .. . .. . Also did you use the elasticsearch output plugin", "Question : null .. . Answer : I am using ELK stack to monitor some changes in a csv file . The csv file is updated in time interval . So that the rows can be updated or deleted . Currently logstash . As an Example if we have 10 rows in the csv file at 10.15 am . It may be 6 rows at 10.30 am and again 20 rows at 11.00 am . Existing rows are updated in Elasticsearch as well using following configuration . The problem is when a row gets deleted . It is not reflected in Elasticsearch and therefore in kibana . So could these type of situations be handled from logstash configuration file Comment : Can you paste your some sample from your csv file Also Have you checked for Logstash and Elasticsearch logs Posting more information will be helpful . Comment : A B C D Comp1 1 5 8 Comp2 75 45 52 Comp3 40 20 45 Comp4 4 23 80 Comp5 80 23 12 Hope this helps", "Question : ELK stack is heavily used but cAdvisor only support influxdb . So I want to implement a log stash forward drive base on Lumberjack Protocol . I think cAdvisor could be able to forward metrics data to LogStash . So I am planning to work on this.But I really do not know how to begin coding . https : github.com google cadvisor issues 634 .. . Answer : I already implement store metrics data in ElasticSearch . Please see https : github.com google cadvisor pull 875", "Question : I am trying to use nsq as a broker for the ELK stack http : www.elasticsearch.org overview elkdownloads . I was thinking of doing this by having nsq http : nsq.io send data to elasticsearch http : www.elasticsearch.org via the REST api http : www.elasticsearch.org guide en elasticsearch reference current docs-update.html . According to that doc I can make an HTTP PUT request to add data to elastic search . But according the nsq doc http : nsq.io components utilities.html nsq can only make a POST or GET request via the nsq to http utility . I can t make a PUT request which elasticsearch requires . How can I pass values from nsq to elasticsearch .. . Answer : You could use the nsq to file utility and then use logstash to post the files . For anything further you would need to look at the code to adapt it to what you want .", "Question : I might be asking for too much here and I think it s just not implemented yet but I have ELK stack setup similar almost identical to how this tutorial does it : https : www.digitalocean.com community tutorials how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04 So basically I have filebeat setup on a client computer and it sends all the log files in a folder to logstash on the server computer . What I want to do is be able to have gzip files with text-files in them and text-files a directory and be able to send them all over to logstash with filebeat . So I need filebeat to send a unziped file or logstash to be able to look in the gzip file and get the text file inside it . I looked around the web and this doesn t seem to be implemented yet but most of what I found was with log forwarder and logstash rather then filebeat so I m just hoping maybe there is a way with filebeat . I might just be being overly hopeful here . If you don t know a method to do this then I d like to know too . .. . Answer : This is currently not possible with filebeat . An issue with this feature request was opened here : https : github.com elastic beats issues 637 .. . .. . A potential temporary workaround can be found here : https : discuss.elastic.co t backfilling-old-logs-with-filebeat 38428", "Question : I me trying to parse some Apache access logs using ELK stack but I m having issues with logstash not applying the Apache filter i created on any Apache logs . Here is my filter file : .. . .. . filebeat config : .. . .. . Also I m using an example log file from logz.io it contains logs like the following : .. . .. . I ve check my filter in grokdebug and everything works fine there but every time I push those logs into logstash it doesn t apply that filter instead all logs entries have a grokparsefailure tag . Any idea what could be the issue here I ve followed several guides and still have this problem . P.S . I know about COMBINEDAPACHELOG but I still wanted to parse it this way for my own experience and to understand ELK stack batter . .. . Answer : Try to change messege to message in your grok match", "Question : I have a web app hosted on the azure platform and an ELK stack hosted on a virtual-machine also in azure same subscription and am struggling to find a way to ship the logs from the app to logstash . A web app stores all its files on a storage only accessible via FTP which logstash does not have an input plugin for . What do people use to ship logs to ELK from web apps If it was running as a VM I would use NXlog but that s not possible for a Web app . I also use Log4Net and tried a UDP forwarder which worked on my local ELK stack but not the azure hosted one despite me adding the public UDP endpoint . Comment : A web app stores all its files on a storage only accessible via FTP - This isn t true . Web apps are not limited to using their local-storage . They are perfectly capable of working with Azure Storage e.g . blobs Azure File Service databases etc . Comment : @DavidMakogon - That s true . I did look at blob storage as an option but it isn t obvious as to how to get server logs and log4net files to save to them . I am wondering if anyone has done it and configured logstash to use blob storage as an input feed .. . Answer : Currently i am using Serilog http : serilog.net to push my application log messages in batch towards a Redis queue https : azure.microsoft.com en-us documentation articles cache-dotnet-how-to-use-azure-redis-cache get-started-with-azure-redis-cache which in turn is read by Logstash https : www.elastic.co products logstash to enrich them and push them into Elasticsearch . This results in a reliable distributed setup which does not lose any application logs unless the redis max queue length is exceeded . Added bonus Serilog emits json so your logstash config can stay pretty simple . Example code can be found here : https : gist.github.com crunchie84 bcd6f7a8168b345a53ff", "Question : Disclaimer : I am very new to ELK Stack so this question can be very basic . .. . .. . I am setting up ELK stack now . I have below basic questions about ElasticSearch . 1 . What is the storage model elastic search is following For example Oracle is using relational model Alfresco is using document model and Apache Jackrabbit is using hierarchial model .. . .. . 2.Log data stored in elastic search is persistent permanent Or ElasticSearch deletes log data after certain period 3.How we will manage backup this data 4.Log data files in Elastic Search is human-readable Any help route to documentation will be appreciated . Comment : In your title the logs are the logs from Elasticsearch or logs received when using ELK for logs centralisation Comment : elastic.co guide en elasticsearch reference current index.html https : www.elastic.co guide en elasticsearch reference current index.html Comment : I meant logs received through Logstash . Comment : @downvoter this is basic question i knew but raised by very new comer to relatively not-so-famous technology . .. . Answer : 1 . the storage model is a Document model . Everything is a document https : www.elastic.co guide en elasticsearch guide current document.html . The documents are of a particular type and they are stored in an index https : www.elastic.co guide en elasticsearch guide current add an index.html . 2 . Data send to ES is stored on disk . It can be then read https : www.elastic.co guide en elasticsearch reference current docs-get.html searched https : www.elastic.co guide en elasticsearch reference current search-search.html or deleted https : www.elastic.co guide en elasticsearch reference current docs-delete.html through a REST API . 3 . The Data is managed through the rest API . Usually for log centralisation the logs are stored in date-based index one index for today one for yesterday and so on so to delete the logs from one day you delete the relevant index https : www.elastic.co guide en elasticsearch guide current index-management.html . Curator https : www.elastic.co guide en elasticsearch client curator current index.html can help in this case . ES offers a backup and restore module https : www.elastic.co guide en elasticsearch reference 2.3 modules-snapshots.html . 4 . To access the data in ES you ll have to use the REST API or use the Kibana client https : www.elastic.co guide en kibana current index.html . Documentation : .. . https : www.elastic.co guide en elasticsearch guide current index.html .. . https : www.elastic.co guide en elasticsearch reference current index.html Comment : Thanks @baudsp 2.Any data will be automatically deleted by ES If I don t delete it will stay forever right Comment : @SundararajGovindasamy The data sent to ES is stored on disk . So as long you don t delete the data through the API or on disk ES keeps it . Comment : Thank you so much for the detailed answer : - Comment : I would remove ...or on disk.. . as it s not advised to mess up with the data folders directly . Comment : @Val Too late.. . But thanks it s a good point .", "Question : null .. . Answer : In a use-case for gathering system statistics CPU and RAM of multiple systems via ELK stack I believe it should be straight forward to use topbeat - elasticsearch - Kibana . Is there any reason why one should still go for collectd - logstash - elasticsearch - kibana Comment : If all you want is cpu and process load then topbeat should be fine . collectd is more of an infrastructure . They probably expect beats to get there eventually . See collectd.org wiki index.php Table of Plugins https : collectd.org wiki index.php Table of Plugins Comment : Thanks @Alain for your response . Yes topbeat should allow collectd style plugins to be more flexible .", "Question : I have a web app hosted on the azure platform and an ELK stack hosted on a virtual-machine also in azure same subscription and am struggling to find a way to ship the logs from the app to logstash . A web app stores all its files on a storage only accessible via FTP which logstash does not have an input plugin for . What do people use to ship logs to ELK from web apps If it was running as a VM I would use NXlog but that s not possible for a Web app . I also use Log4Net and tried a UDP forwarder which worked on my local ELK stack but not the azure hosted one despite me adding the public UDP endpoint . Comment : A web app stores all its files on a storage only accessible via FTP - This isn t true . Web apps are not limited to using their local-storage . They are perfectly capable of working with Azure Storage e.g . blobs Azure File Service databases etc . Comment : @DavidMakogon - That s true . I did look at blob storage as an option but it isn t obvious as to how to get server logs and log4net files to save to them . I am wondering if anyone has done it and configured logstash to use blob storage as an input feed .. . Answer : Azure now has a project on GitHub called azure-diagnostics-tools https : github.com Azure azure-diagnostics-tools that contains LogStash plugins for reading from blob and table storage among other things . Presumably you can just enable diagnostics logging to blob table storage for your WebApp and use the LogStash plugin to get them into ElasticSearch . Regarding how to get log4net files into blob storage - you can use log4net.Appender.TraceAppender to write to the Trace system which will cause it to be collected into Blob Table storage when the option is enabled in the WebApp . There s also an alternative to FTP for local files - you can use the Kudu REST VFS API https : github.com projectkudu kudu wiki REST-API vfs to access and modify files by HTTP . I found this to be significantly faster and more reliable than FTP .", "Question : Recently I am trying to find out best Docker logging mechanism using ELK stack . I am having some questions regarding the best work flow that companies use in production . Our system has typical software stack including Tomcat PostgreSQL MongoDB Nginx RabbitMQ Couchbase etc . As of now our stack runs in CoreOS cluster . Please find my questions below .. . .. . 1 . With ELK stack what is the best methodology to do the log forwarding - Should I use Lumberjack . I am asking this because I have seen workflows where people use Syslog Rsyslog to forward the logs to logstash . 2 . Since all of our software pieces are containerized should I include Log-forwarder in all my containers I am planning to do this as most of my containers switch nodes based on health so I am not keen on mounting the file system from the container to host . 3 . Should I use redis as a broker in forwarding the logs If yes why 4 . How difficult is it to write log-config files that defines the log format to be forwarded to log-stash This is a subjective questions but I am sure that this is a problem that people have solved long ago and I am not keen on re-inventing the wheel . .. . Answer : Good questions and the answer like in many other cases are - it depends . 1 . Shipping Logs - we use rsyslog as docker containers internally and logstash-forwarder in some cases - the advantage of logstash-forwarder is that it encrypts the logs and compresses them so in some cases that s important . I find rsyslog to be very stable and low on resources so we use it as a default shipper . The full logstash might be heavy for small machines some more data about logstash - http : logz.io blog 5-logstash-pitfalls-and-how-to-avoid-them .. . .. . 2 . We re also fully dockerized and use a separate Docker for each rsyslog lumberjack . Easy to maintain update versions and move around when needed . 3 . Yes definitely use Redis . I wrote a blog about how to build production ELK http : logz.io blog deploy-elk-production - I spoke about what I find to be the right architecture to deploy ELK in production .. . .. . 4 . Not sure what exactly are you trying to achieve with that . HTH", "Question : null .. . Answer : I Installed ELK Elasticsearch Logstash and Kibana with YUM onto our centos based system and set them as start at boot time . Then When I tried command systemctl list-unit-files the output only contains Kibana and Elasticsearch without Logstash at all . But Logstash is indeed listed in command chkconfig --list .. . .. . According to my understanding it means that Logstash is a SysV service whereas Kibana and Elasticsearch are systemd services . Is it so If so why is Logstash different from Elasticsearch and Kibana as a SysV service other than systemd service" ] }
[ "yes-answer-long", "yes-answer-short" ]
kibana
UNK_RELATION
jack-compiler@android@107
jack-compiler -- jack java android compiler kit is a new android toolchain that compiles java source into @placeholder dex bytecode .
{ "confidence": [ 59.98457336425781, 57.52629089355469, 47.82835388183594, 47.51421356201172, 44.878631591796875, 44.33473205566406, 41.80769348144531, 39.023040771484375, 35.364234924316406, 35.364234924316406, 32.404998779296875, 29.485992431640625, 28.323570251464844, 27.146671295166016, 26.974098205566406, 26.9685001373291, 26.582571029663086, 26.205535888671875, 25.304601669311523, 23.74637222290039, 21.111026763916016, 20.971050262451172, 20.971050262451172, 18.922691345214844, 18.47329330444336, 18.028675079345703, 17.44280433654785, 16.469852447509766, 16.469852447509766, 16.469852447509766, 16.469852447509766, 16.469852447509766, 16.21273422241211, 14.805953979492188, 14.805953979492188, 14.805953979492188, 14.805953979492188, 12.811724662780762, 12.811724662780762, 12.811724662780762, 12.811724662780762, 12.811724662780762, 12.811724662780762, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836, 10.472402572631836 ], "content": [ "See stackoverflow.com questions 36880115 http : stackoverflow.com questions 36880115 how-to-enable-jack-java-android-compiler-kit-in-android-studio 36903323 36903323", "This question already has an answer here : .. . .. . How to enable Jack Java Android Compiler Kit in android-studio questions 36880115 how-to-enable-jack-java-android-compiler-kit-in-android-studio 2 answers .. . .. . When I tried to update my android project to use Java 8 after getting android-studio-2.1 and android N SDK by adding .. . .. . I had this error .. . .. . Error : Jack is required to support java-8 language features .", "As in the readme it says : .. . .. . Note : If you are using the new Jack compiler with version 2.2.0 or newer you do not need the android-apt plugin and can instead replace apt with annotationProcessor when declaring the compiler dependency .", "The bootclasspath fix did not set the classpath for the Jack compiler and libraries do not use the Jack compiler yet .", "How to add or use Jack in android-studio", "I am updated my androidstudio 2.1 http : developer.android.com sdk index.html stable.As per Android Studio 2.1 supports Android N Developer Preview http : android-developers.blogspot.in 2016 04 android-studio-21-supports-android-n.html Android studio 2.1 support Jack Java Android Compiler Kit https : source.android.com source jack.html compiler .", "You can enable jack-compiler by adding following line in build.gradle file .", "I just started a very simple project and tried to use both ButterKnife and Jack compiler but it seems they do not cope with each other well .", "Either enable Jack or remove sourceCompatibility JavaVersion.VERSION 1 8 .", "The error say that you have to enable Jack .", "Looks like Jack only recently got the ability to apply annotation processors on the classpath with Android Gradle Plugin version 2.2.0-alpha1 or higher .", "To enable support for Java 8 in your Android project you need to configure your build.gradle file like that", "No I did never add the android-apt plugin .", "After I enable JackOptions in build.gradle and use java version 1.8 Android studio debugger crashed .", "The details on what is required to use Jack and how can be found in the documentation http : developer.android.com preview j8-jack.html .", "Try remove apply plugin : android-apt in your app gradle .", ".. . java.lang.RuntimeException : java.lang.OutOfMemoryError : GC overhead limit exceeded .. . .. . Sometimes the compilation just hangs when performing : .. . .. . I found in the troubleshooting section here https : source.android.com source jack.html the jack toolchain a way to fix it but I can t find the .jack file with the configuration .", "When I use a lambda expression in an Android Library Module I receive a compiler exception com.sun.tools.javac.code.Symbol CompletionFailure : class file for java.lang.invoke.MethodType not found .", "My build.gradle file contains : .. . .. . I m using Android Studio 2.1.1 .", "Error : Jack is required to support java-8 language features .", "In this bug report https : code.google.com p android issues detail id 194027 someone mentioned that the file could have been renamed to jack.settings but I can t find that file either .", "My Android Stdudio version is 2.1.2 buildtoolsversion is 24.0.0 . .. . .. . disable JackOptions", "Lambda expressions are compiling without error when used in the Android application module .", "I m testing the new compilation chain to start using lambdas .", "Here is the relevant part from the docs that goes in build.gradle on how to use jackOptions and set the compileOptions for java 1.8 .", "I opened a bug report on this issue : https : code.google.com p android issues detail id 211386 .. . .. . They commented that this will be addressed in the near future .", "I was able to get past the MethodType not found error by adding my JAVA HOME s runtime jar to gradle s bootclasspath in the project s build.gradle file .", "Gradle plugin version : 2.2.0-alpha5 .. . .. . in my module build.gradle I added : .. . .. . And the error message is : .. . .. . Did I miss something or it s just they are not compatible", "Up vote just because the question title is great", "this could help you github.com JakeWharton butterknife issues 616 https : github.com JakeWharton butterknife issues 616", "Thanks to @isnotmenow s tip I tried to change ButterKnife version to 8.1.0 and it works well .", "But both 8.2.0 and 8.2.1 complain exceptions I have post an an issue https : github.com JakeWharton butterknife issues 673 on the project page .", "@AdityaKamath post your problem in new question so I can help you .", "When I build the app the compilation takes ages and then ends-with an Out of memory error : .. . .. . Execution failed for task : app : compileAppNameJavaWithJack .", "Do you know where the file is", "Do you know how to fix the Out of memory error", "I managed to fix the issue setting : .. . .. . in the gradle.properties file .. . .. . Check here https : docs.gradle.org current userguide build environment.html for more info about the setting", "What should I do", "show build.gradle file", "After adding the following line I get Error : A problem occurred configuring project : app .", "Adding retroLambda solved that problem for me .", "github.com evant gradle-retrolambda https : github.com evant gradle-retrolambda", "Does this work with annotation processing or would it break compilation", "It does not show local variables.Is this the side effect of JackOptions", "Any suggestions", "enter image description here http : i.stack.imgur.com jBs4w.png .. . .. . enable JackOptions .. . .. .", "enter image description here http : i.stack.imgur.com nqcT1.png", "A sample project to demonstrate the problem can be found here : .. . https : github.com adamdye AndroidLambdaIssue .. . .. . The interesting classes in the example are MyLibrary.java and MainActivity.java .", "Each class contains the identical expressions .", "Setup .. . .. . I am not interested in using retro-lambda .", "I d like to get this working through proper configuration .", "I assume I m missing a step somewhere .", "Ref this link https : github.com evant gradle-retrolambda .", "This may help you. .", "Just to circle back and add what I ve learned .", "However the app would not deploy to a device or emulator because the app : transformClassesWithPreJackPackagedLibrariesForDebug gradle task fails .", "It requires that all interfaces that are used as a lamba are on the classpath .", "Awesome", "Thanks for nice answer .", "I still get an error : Could not find property options on task : app : compileDebugJavaWithJack .", "@IgorGanapolsky I found some references that link that error to annotation processors .", "Are you by any chance using any libraries that do annotation processing such as dagger or butterknife", "If using a lower version you might be able to specify the annotation processor yourself as shown here http : tools.android.com tech-docs jackandjill .", "@GeorgeMulligan Indeed using annotation processors but with gradle plugin 2.1.0 .", "@IgorGanapolsky Does it work then if you add the annotationProcessor to the dependencies as shown in the site I linked to at the end of the previous comment" ] }
{ "confidence": [ 78.2501449584961, 76.88899230957031, 65.1080551147461, 61.35643768310547, 55.4480094909668, 43.02214050292969, 42.13323974609375, 27.109901428222656 ], "content": [ "Question : I am updated my androidstudio 2.1 http : developer.android.com sdk index.html stable.As per Android Studio 2.1 supports Android N Developer Preview http : android-developers.blogspot.in 2016 04 android-studio-21-supports-android-n.html Android studio 2.1 support Jack Java Android Compiler Kit https : source.android.com source jack.html compiler . How to add or use Jack in android-studio .. . Answer : You can enable jack-compiler by adding following line in build.gradle file .", "Question : This question already has an answer here : .. . .. . How to enable Jack Java Android Compiler Kit in android-studio questions 36880115 how-to-enable-jack-java-android-compiler-kit-in-android-studio 2 answers .. . .. . When I tried to update my android project to use Java 8 after getting android-studio-2.1 and android N SDK by adding .. . .. . I had this error .. . .. . Error : Jack is required to support java-8 language features . Either enable Jack or remove sourceCompatibility JavaVersion.VERSION 1 8 . What should I do Comment : show build.gradle file Comment : See stackoverflow.com questions 36880115 http : stackoverflow.com questions 36880115 how-to-enable-jack-java-android-compiler-kit-in-android-studio 36903323 36903323 .. . Answer : Error : Jack is required to support java-8 language features . Either enable Jack or remove sourceCompatibility JavaVersion.VERSION 1 8 . The error say that you have to enable Jack . To enable support for Java 8 in your Android project you need to configure your build.gradle file like that Comment : After adding the following line I get Error : A problem occurred configuring project : app . Comment : @AdityaKamath post your problem in new question so I can help you . Comment : Adding retroLambda solved that problem for me . github.com evant gradle-retrolambda https : github.com evant gradle-retrolambda Comment : Does this work with annotation processing or would it break compilation", "Question : I am updated my androidstudio 2.1 http : developer.android.com sdk index.html stable.As per Android Studio 2.1 supports Android N Developer Preview http : android-developers.blogspot.in 2016 04 android-studio-21-supports-android-n.html Android studio 2.1 support Jack Java Android Compiler Kit https : source.android.com source jack.html compiler . How to add or use Jack in android-studio .. . Answer : The details on what is required to use Jack and how can be found in the documentation http : developer.android.com preview j8-jack.html . Here is the relevant part from the docs that goes in build.gradle on how to use jackOptions and set the compileOptions for java 1.8 . Comment : Awesome Thanks for nice answer . Comment : I still get an error : Could not find property options on task : app : compileDebugJavaWithJack . Comment : @IgorGanapolsky I found some references that link that error to annotation processors . Are you by any chance using any libraries that do annotation processing such as dagger or butterknife Looks like Jack only recently got the ability to apply annotation processors on the classpath with Android Gradle Plugin version 2.2.0-alpha1 or higher . If using a lower version you might be able to specify the annotation processor yourself as shown here http : tools.android.com tech-docs jackandjill . Comment : @GeorgeMulligan Indeed using annotation processors but with gradle plugin 2.1.0 . Comment : @IgorGanapolsky Does it work then if you add the annotationProcessor to the dependencies as shown in the site I linked to at the end of the previous comment", "Question : I just started a very simple project and tried to use both ButterKnife and Jack compiler but it seems they do not cope with each other well . Gradle plugin version : 2.2.0-alpha5 .. . .. . in my module build.gradle I added : .. . .. . And the error message is : .. . .. . Did I miss something or it s just they are not compatible Comment : Up vote just because the question title is great .. . Answer : Try remove apply plugin : android-apt in your app gradle . As in the readme it says : .. . .. . Note : If you are using the new Jack compiler with version 2.2.0 or newer you do not need the android-apt plugin and can instead replace apt with annotationProcessor when declaring the compiler dependency . Comment : No I did never add the android-apt plugin . Comment : this could help you github.com JakeWharton butterknife issues 616 https : github.com JakeWharton butterknife issues 616", "Question : When I use a lambda expression in an Android Library Module I receive a compiler exception com.sun.tools.javac.code.Symbol CompletionFailure : class file for java.lang.invoke.MethodType not found . Lambda expressions are compiling without error when used in the Android application module . A sample project to demonstrate the problem can be found here : .. . https : github.com adamdye AndroidLambdaIssue .. . .. . The interesting classes in the example are MyLibrary.java and MainActivity.java . Each class contains the identical expressions . Setup .. . .. . I am not interested in using retro-lambda . I d like to get this working through proper configuration . I assume I m missing a step somewhere . Comment : Ref this link https : github.com evant gradle-retrolambda . This may help you. . .. . Answer : Just to circle back and add what I ve learned . I was able to get past the MethodType not found error by adding my JAVA HOME s runtime jar to gradle s bootclasspath in the project s build.gradle file . However the app would not deploy to a device or emulator because the app : transformClassesWithPreJackPackagedLibrariesForDebug gradle task fails . It requires that all interfaces that are used as a lamba are on the classpath . The bootclasspath fix did not set the classpath for the Jack compiler and libraries do not use the Jack compiler yet . I opened a bug report on this issue : https : code.google.com p android issues detail id 211386 .. . .. . They commented that this will be addressed in the near future .", "Question : I just started a very simple project and tried to use both ButterKnife and Jack compiler but it seems they do not cope with each other well . Gradle plugin version : 2.2.0-alpha5 .. . .. . in my module build.gradle I added : .. . .. . And the error message is : .. . .. . Did I miss something or it s just they are not compatible Comment : Up vote just because the question title is great .. . Answer : Thanks to @isnotmenow s tip I tried to change ButterKnife version to 8.1.0 and it works well . But both 8.2.0 and 8.2.1 complain exceptions I have post an an issue https : github.com JakeWharton butterknife issues 673 on the project page .", "Question : I m testing the new compilation chain to start using lambdas . My build.gradle file contains : .. . .. . I m using Android Studio 2.1.1 . When I build the app the compilation takes ages and then ends-with an Out of memory error : .. . .. . Execution failed for task : app : compileAppNameJavaWithJack . .. . java.lang.RuntimeException : java.lang.OutOfMemoryError : GC overhead limit exceeded .. . .. . Sometimes the compilation just hangs when performing : .. . .. . I found in the troubleshooting section here https : source.android.com source jack.html the jack toolchain a way to fix it but I can t find the .jack file with the configuration . In this bug report https : code.google.com p android issues detail id 194027 someone mentioned that the file could have been renamed to jack.settings but I can t find that file either . Do you know where the file is Do you know how to fix the Out of memory error .. . Answer : I managed to fix the issue setting : .. . .. . in the gradle.properties file .. . .. . Check here https : docs.gradle.org current userguide build environment.html for more info about the setting", "Question : null .. . Answer : After I enable JackOptions in build.gradle and use java version 1.8 Android studio debugger crashed . It does not show local variables.Is this the side effect of JackOptions Any suggestions My Android Stdudio version is 2.1.2 buildtoolsversion is 24.0.0 . .. . .. . disable JackOptions enter image description here http : i.stack.imgur.com jBs4w.png .. . .. . enable JackOptions .. . .. . enter image description here http : i.stack.imgur.com nqcT1.png" ] }
[ "yes-answer-long", "yes-answer-short" ]
android
UNK_RELATION
sqlite.swift@sqlite@67
sqlite.swift -- a third-party type-safe swift-language layer over @placeholder .
{ "confidence": [ 34.103851318359375, 33.02629852294922, 32.658267974853516, 32.625179290771484, 32.2697868347168, 31.53792381286621, 31.52450180053711, 30.409469604492188, 30.24271583557129, 29.860485076904297, 29.774648666381836, 29.714921951293945, 29.458139419555664, 28.939123153686523, 28.866750717163086, 28.866750717163086, 28.55582046508789, 28.55582046508789, 28.55582046508789, 28.15147590637207, 28.15147590637207, 28.15147590637207, 28.00591278076172, 28.00591278076172, 28.00591278076172, 28.00591278076172, 27.73298454284668, 27.687850952148438, 27.48276138305664, 27.224191665649414, 26.672061920166016, 26.672061920166016, 26.283578872680664, 26.283578872680664, 26.141998291015625, 26.00095558166504, 26.00095558166504, 25.978843688964844, 25.978843688964844, 25.844249725341797, 25.19426727294922, 25.19426727294922, 25.13211441040039, 25.1086483001709, 24.850257873535156, 24.850257873535156, 24.845077514648438, 24.845077514648438, 24.845077514648438, 24.583219528198242, 24.357946395874023, 24.357946395874023, 24.291946411132812, 24.291946411132812, 24.291946411132812, 24.291946411132812, 24.291946411132812, 24.291946411132812, 24.060501098632812, 23.805952072143555, 23.728713989257812, 23.728713989257812, 23.399639129638672, 23.399639129638672, 23.335330963134766, 23.335330963134766, 23.158180236816406, 23.158180236816406, 22.970169067382812, 22.338054656982422, 22.01970672607422, 22.01970672607422, 22.01970672607422, 22.01970672607422, 22.01970672607422, 21.99791145324707, 21.938499450683594, 21.64426040649414, 21.28346061706543, 21.26116180419922, 21.26116180419922, 21.26116180419922, 21.26116180419922, 21.138444900512695, 21.112640380859375, 21.112640380859375, 21.112640380859375, 21.112640380859375, 21.112640380859375, 20.885940551757812, 20.885940551757812, 20.885940551757812, 20.885940551757812, 20.885940551757812, 20.885940551757812, 20.780466079711914, 20.70148468017578, 20.70148468017578 ], "content": [ "github.com stephencelis SQLite.swift tree swift-2 carthage https : github.com stephencelis SQLite.swift tree swift-2 carthage", "I m using sqlite.swift in my Swift project .", "I am using Swift in a project and using SQLite.swift https : github.com stephencelis SQLite.swift for database handling .", "Please see the comment here : github.com stephencelis SQLite.swift issues https : github.com stephencelis SQLite.swift issues 199 issuecomment-140889578 Also quickly look over the swift-2 branch s README and documentation for other updates .", "In the SQLite Swift documentation https : github.com stephencelis SQLite.swift blob master Documentation Index.md there is reference to getting statement results directly .", "I just upgraded to the branch of SQLite.swift for xCode 7 and Swift 2 .", "I ve read the documentation about SQLite.swift https : github.com stephencelis SQLite.swift tree swift-2 but I ve nothing clear .", "I have downloaded Stephen Celis swift wrapper SQLite.swift https : github.com stephencelis SQLite.swift and built a working OS X app .", "How do I do that with sqlite.swift API", "But I am using SQLite.swift .", "Since I have updated to Xcode 7 and swift 2 I m getting this errors : .. . .. . No type named Query in module SQLite Use of undeclared type Database .. . .. . using this code : .. . .. . I m using the swift2 branch of SQLite.swift but it looks like my project it can t find the reference SQLite.swift module .", "It s about how to join tables in SQlite.Swift which is a Swift library that runs on SQLite .", "Please try locking to the module-map-path branch see github.com stephencelis SQLite.swift issues 319 https : github.com stephencelis SQLite.swift issues 319 .", "I have downloaded SQLite.swift and get this error : .. . .. . Playground execution failed : var folders 43 nc3kf6y17dbfdn14crfmcdjh0000gn T . lldb 2060 playground2.swift : 1 : 8 : error : no such module SQLite import SQLite .. . .. . I also note that SQLite.swift has a reference to sqlcipher.xcodeproj .", "I am using the SQLite.swift framework https : github.com stephencelis SQLite.swift .", "To check whether data is available in table or not in SQLite.swift https : github.com stephencelis SQLite.swift", "Not sure about whether I should and how to close a Connection in SQLite.swift .", "I really appreciate your work and your well designed Sqlite.swift .", "I confirmed this by using the sql that sqlite.swift generates on the db directly .", "Missed this without the sqlite.swift tag", "I m working with SQLite.swift .", "Is this done behind the scenes with SQLite.swift", "I m trying to query a database to see if it contains records in a certain table using SQLite.Swift library for Swift 2.0 .", "The app is Programed in swift and for the database access i use the framework SQLITE.swift from stephencelis .", "Trying to use sqlite.swift swift-2 version for a simple IOS app targeting IOS 9 .", "I am using SQLite.swift Branch Swift-1-2 in my app in XCode 6.3 beta .", "I was using Sqlite.swift https : github.com stephencelis SQLite.swift with Xcode 7.2.x .", "I am using sqlite.swift in my project .", "Have a look at those Links : https : github.com stephencelis SQLite.swift blob master Documentation Index.md http : masteringswift.blogspot.ch 2015 09 create-data-access-layer-with.html .. . .. . These should help you get going .", "I m using the awesome SQLite.swift framework .", "I am manually adding the SQLite.swift https : github.com stephencelis SQLite.swift subproject to my project .", "See the SQLite.swift documentation https : github.com stephencelis SQLite.swift blob master Documentation Index.md for more help .", "I am using Xcode 7.1 Beta with the c9d3082 commit of SQLite.swift .. . .. . Have followed your instructions precisely .", "I know this is a year ago but how do I get userVersion from sqlite.swift", "http : stackoverflow.com questions 14807472 sql-how-to-update-or-insert-if-doesnt-exist .. . .. . Looking for SQLite.swift implementation .. . .. . I m trying to save development time by using the SQLite.swift https : github.com stephencelis SQLite.swift wrapper for iOS development .", "Also have import SQLite on every file I use SQLite.swift with .", "Is there a way to join tables from more than two SQLite databases with SQLite.Swift", "I m using SQLite.swift library in my iOS project .", "I am using SQLite.swift in my project .", "I looked at the documentation https : github.com stephencelis SQLite.swift blob swift-1-2 Documentation Index.md sqliteswift-documentation but I am still stuck .", "This example from https : github.com stephencelis SQLite.swift issues 194 shows how you can create an extension to do this with the latest SQLite.swift :", "I manually installed the SQLite.swift library in my project following the instructions in the documentation https : github.com stephencelis SQLite.swift blob master Documentation Index.md manual .", "IN for SQLite.Swift http : stackoverflow.com questions 36126350 how-to-create-a-filter-that-does-the-sql-equivalent-of-where-in-for-sqlite-s .. . .. . I asked how to how to do a WHERE...IN in swift .", "Check out the extension here for a workaround : github.com stephencelis SQLite.swift issues 194 https : github.com stephencelis SQLite.swift issues 194 A new pragma interface is coming in a future version .", "The type-safe API lets you declare expressions of non-optional types that when pulled back from a statement are not wrapped .", "I don t really want type-safe I want to be able to plug in my SQL directly .", "Is it possible to install sqlite.swift with Carthage insted of using Cocoapods", "The master branch of the SQLite.swift repository is not compatible with Xcode 7.3 .", "I am using sqlite.swift for my sqlite functionalities .", "this section doesn t work with swift2 branch : .. . .. . https : github.com stephencelis SQLite.swift blob swift-2 Documentation Index.md binary-data .. . .. . I get : .. . .. . Redundant conformance of NSData to protocol Value .. . .. . and .. . .. . Type UIImage does not conform to protocol Value", "Connection into a swift file gets no errors .", "The correct way for swift 2.0 is following :", "I ve been using SQLite.swift lately to build my app database .", "I am using 5 SQLite.swift tables in my code .", "The SQLite pod has a file at project folder Pods SQLite.swift CocoaPods iphonesimulator module.modulemap .", "This creates a SQLite.swift table not the actual database-table so there is no crash .", "@K.Nimo I am not using CoreData simply using Stephen Celis sqlite.swift", "Beyond that SQLite.swift has a helper method to pluck a single row .", "As shared by stephencelis you can follow the instructions detailed on github.com stephencelis SQLite.swift http : github.com stephencelis SQLite.swift .. . .. . Make sure Carthage is installed .", "Also the SQLite.swift documentation states that : .. . .. . While Int64 is the basic raw type to preserve 64-bit integers on 32-bit platforms Int and Bool work transparently .", "I m trying to run a fairly complex SQL JOIN using SQLite.swift and have the results put into an array .", "I m using Stephen Celis iOS lib for handling SQLite3 databases here is the github link https : github.com stephencelis SQLite.swift .", "Please see this thread : github.com stephencelis SQLite.swift issues 194 https : github.com stephencelis SQLite.swift issues 194 It ll give you an extension you can use in your project .", "I believe that I correctly followed the instructions to do so in the SQLite.swift Documentation for frameworkless targets https : github.com stephencelis SQLite.swift blob master Documentation Index.md frameworkless-targets but apparently I am missing something .", "Just installed SQLite.swift from cocoapods in my Xcode project and I get an error when trying to build stating Header usr include sqlite3.h not found .", "Check out the documentation under Joining Other Tables https : github.com stephencelis SQLite.swift blob ccf43925aacf9fcc6130639247b3e7578a1c727a Documentation Index.md joining-other-tables for more information on joining tables .", "I have updated Xcode to Xcode 7.3 and problem occurs with Sqlite.swift framework .", "I got it to work by changing the line in the Podfile to pod SQLite.swift 0.10.1 Thanks", "Raw SQL https : github.com stephencelis SQLite.swift blob master Documentation Index.md executing-arbitrary-sql .. . .. . Using Filters https : github.com stephencelis SQLite.swift blob master Documentation Index.md filter-operators-and-functions .. . .. . I use Filters gives me more insight .", "The closure given to the Connection.commitHook function https : github.com stephencelis SQLite.swift blob 0.10.1 SQLite Core Connection.swift L428-L433 is invoked whenever a transaction is committed .", "There s no good way of doing this yet many of the expression-building helpers are internal to SQLite.swift right now .", "I m using sqlite.swift for my database and I have a table that I would like to use a datetime column in .", "I don t know if when i archive my project the sqlite.swift library will included automatically or i have first embedd it .", "I didn t use SQLite.swift so I have a question here : In the docs it says that you can access a Table with e.g .", "I d like to take the opportunity to thank you for your fantastic work on the SQLite.swift project .", "But now I had to update to Xcode and I had to switch my language to Swift 2 .", "Statements with results may be iterated over .", "Is it possible to write a statement in sqlite.swift that will generate the equivalent sql : .. . .. . SELECT foods.name food types.name FROM foods food types WHERE foods.type id food types.id LIMIT 10 .. . .. . I can t figure out how to query from multiple Table objects at once .", "SQLite.swift s query-builder language currently only supports explicit joins .", "I am using the SQLite.swift https : github.com stephencelis SQLite.swift blob master Documentation Index.md connecting-to-a-database library and need to connect to the database with this line : .. . .. . However this line by itself will not work because it needs to be surrounded with a try-catch block .", "In SQLite.swift https : github.com stephencelis SQLite.swift blob master README.md I create the table like this .. . .. . I believe the SQLite syntax that would be .. . .. . I was preparing to add an index on the word column to speed up performance since I will have to do frequent queries on it .", "The SQLite.swift documentation for filtered queries https : github.com stephencelis SQLite.swift blob master Documentation Index.md filtering-rows gives this example : .. . .. . Since I want to search the database based on user input I guess I could do the following : .. . .. . Am I going about this the right way", "Using SQLite.swift https : github.com stephencelis SQLite.swift blob master Documentation Index.md building-complex-queries this method seems to be working : .. . .. . The way this works though is that I am using ifNotExists : false to throw an error every time after the initial database creation .", "Keep in mind that the SQLite.swift expression layer gives you the flexibility to refer to the underlying column types however you want to assuming you conform it to its Value protocol https : github.com stephencelis SQLite.swift blob master Documentation Index.md custom-types so again : you can use Int freely if that s how you re treating the value throughout your code .", "Read up on error-handling in Swift 2 for more .", "You should read the Apple Swift ebook again .", "I m trying to do a bulk insert with SQLite Swift .", "You can use raw SQL in Swift .", "@ogres Thanks but this is related to a Swift library that runs on SQLite .", "Update your Cartfile to include the following : .. . .. . github stephencelis SQLite.swift .. . .. . Run carthage update and add the appropriate framework in Xcode .", "enter image description here http : i.stack.imgur.com AHFBN.png .. . .. . For clarification https : github.com stephencelis SQLite.swift blob master Documentation Index.md .. . .. .", "Using version : pod SQLite.swift 0.9.2 .. . .. . I found a closed pool request with the same issue .", "I m using their 7.3 branch https : github.com stephencelis SQLite.swift tree cocoapods-xcode-7-3 without issues .", "But install is simple : drag the SQLite.swift xcodeproject to your project then add the linked SQLite library in Linked Frameworks and Libraries .", "I have a Cocoapod v1.0.1 DopamineKit that I have created and has SQLite.swift as a dependency .", "I would like to filter results for the same column with multiple values .. . .. . example in sql : .. . .. . this will return all rows from myTable where the status is 1 and the current condition is New OR Working .. . .. . how do I do this in SQLite.swift", "Sorry but I m new in Swift and I stuck .. . .. . Output is : .. . .. . Stamp : Expression template : timestamp . TIME STAMP bindings : .. . .. . How will I get the items of filtered table", "The latest 0.9.2 should also work ok and be slightly more compatible even for Swift 2.2 as well as Carthage CocoaPods or manual install ." ] }
{ "confidence": [ 44.53919219970703, 42.481658935546875, 41.05827331542969, 39.275447845458984, 39.16130447387695, 39.000389099121094, 38.48857116699219, 37.948326110839844, 37.948326110839844, 36.981590270996094, 36.237953186035156, 36.1136474609375, 34.413970947265625, 34.18939971923828, 33.83283233642578, 33.67615509033203, 33.55477523803711, 33.379329681396484, 32.518531799316406, 32.46533966064453 ], "content": [ "Question : Since I have updated to Xcode 7 and swift 2 I m getting this errors : .. . .. . No type named Query in module SQLite Use of undeclared type Database .. . .. . using this code : .. . .. . I m using the swift2 branch of SQLite.swift but it looks like my project it can t find the reference SQLite.swift module . Also have import SQLite on every file I use SQLite.swift with . I ve tried the manual integration and the cocoa pods but with the same results . It was working with Xcode 6.4 . Comment : Please see the comment here : github.com stephencelis SQLite.swift issues https : github.com stephencelis SQLite.swift issues 199 issuecomment-140889578 Also quickly look over the swift-2 branch s README and documentation for other updates . Comment : Thanks I got it . now I have this as per your example let appDb try Connection dbPath.relativePath but get this error Errors thrown from here are not handled Comment : You need to wrap that try in a do - catch block . Read up on error-handling in Swift 2 for more . Comment : Thanks @stephencelis . Please add your comment as answer in this case it will be more prominent . .. . Answer : I have something like this.. . .. . .. . .. . .. . And. . Util.getDBPath would be.. . .. . .. . import SystemConfiguration .. . .. . class Util .. . .. . .. . .. . Hope this help you .", "Question : In the SQLite Swift documentation https : github.com stephencelis SQLite.swift blob master Documentation Index.md there is reference to getting statement results directly . I have a lot of SQL queries prepared and I don t really want to refactor them . I would sooner use them as they are using db.prepare as per below . Statements with results may be iterated over . The return values always have the Optional around them . Is there a way we can just get the raw row values back without this .. . Answer : The type-safe API lets you declare expressions of non-optional types that when pulled back from a statement are not wrapped . From the README : .. . .. . Note that both id and email which are non-optional are returned as such . Comment : Sorry this doesn t answer really answer my question . I don t really want type-safe I want to be able to plug in my SQL directly . I m fine with all answers output as strings which is the default for SQLite . Comment : @Mark80 Because SQLite values are dynamically returned at runtime there s no way for the non-typesafe version to know what an array of values is going to be other than optional . You can use Swift s numerous optional-unwrapping techniques however to deal with the issue", "Question : this section doesn t work with swift2 branch : .. . .. . https : github.com stephencelis SQLite.swift blob swift-2 Documentation Index.md binary-data .. . .. . I get : .. . .. . Redundant conformance of NSData to protocol Value .. . .. . and .. . .. . Type UIImage does not conform to protocol Value Comment : The swift-2 branch for now already implements conformance with NSData so you shouldn t need to implement the extension yourself anymore Comment : Thanks Stephen still have problem extending UIImage . Also in swift-2 branch it looks like db.userVersion is not available anymore is there a way to track db version Comment : Check out the extension here for a workaround : github.com stephencelis SQLite.swift issues 194 https : github.com stephencelis SQLite.swift issues 194 A new pragma interface is coming in a future version . What does your UIImage extension look like .. . Answer : I have used the code from your documentation example .. . .. .", "Question : I just upgraded to the branch of SQLite.swift for xCode 7 and Swift 2 . Now along with a million other errors I am trying to correct I can t figure out what is the equivalent to the previous Database.userVersion I know Database type has been replaced with the Connection type . But what do I check to know what version of schema changes a particular users has which I previous handled via the following code snippet : Comment : Please see this thread : github.com stephencelis SQLite.swift issues 194 https : github.com stephencelis SQLite.swift issues 194 It ll give you an extension you can use in your project . .. . Answer : This example from https : github.com stephencelis SQLite.swift issues 194 shows how you can create an extension to do this with the latest SQLite.swift :", "Question : I m using sqlite.swift in my Swift project . Until now I m using Cocoapods to install update the library . Is it possible to install sqlite.swift with Carthage insted of using Cocoapods Thanks .. . .. . Alex B . Comment : Have you tried the instructions from the swift-2 branch github.com stephencelis SQLite.swift tree swift-2 carthage https : github.com stephencelis SQLite.swift tree swift-2 carthage Comment : Thanks for your response . I didn t saw the swift-2 branch instructions .. . Answer : As shared by stephencelis you can follow the instructions detailed on github.com stephencelis SQLite.swift http : github.com stephencelis SQLite.swift .. . .. . Make sure Carthage is installed . Update your Cartfile to include the following : .. . .. . github stephencelis SQLite.swift .. . .. . Run carthage update and add the appropriate framework in Xcode . This will install the latest version .", "Question : I am using SQLite.swift Branch Swift-1-2 in my app in XCode 6.3 beta . I am able to create the Database Tables and insert entries into the tables . So far so good . Now when I have a simple scenario as follows : .. . .. . On the line commented ----ERROR I get the compile-time error : Binary operator cannot be applied to operands of type Expression Int64 and Int .. . .. . If I use an Int directly on that line then that works fine . Eg . But if I simply do this it fails with the same error again : .. . .. . I understand what the error is but I am not able to resolve it . I looked at the documentation https : github.com stephencelis SQLite.swift blob swift-1-2 Documentation Index.md sqliteswift-documentation but I am still stuck . So any help is appreciated . Update : .. . .. . Explicitly declaring the variable as Int64 solves the issue : .. . .. . Now I am wondering if I have to change my class definition which will require changes at multiple places in the code . Also official swift documentation https : developer.apple.com library ios documentation General Reference SwiftStandardLibraryReference NumericTypes.html recommends using Int unless an explicit size is required . You should use the word-sized Int type to store integer values unless you require a type with a specific size or signedness . Also the SQLite.swift documentation states that : .. . .. . While Int64 is the basic raw type to preserve 64-bit integers on 32-bit platforms Int and Bool work transparently . So should I be using the Int64 here explicitly in my class definition since its mapped to a DB Comment : I thought this answer can help you stackoverflow.com questions 29054958 http : stackoverflow.com questions 29054958 why-do-i-have-to-explicitly-unwrap-my-string-in-this-case Comment : I don t believe this is the issue . I understand I think the difference between id id and id 3 . See my update above . Even if I declare a local var i 3 and use it in the filter I still get the exact same error . .. . Answer : You re mapping your Foo structure directly to the underlying types in SQL so you should use the same type in both places . If you need 64-bit precision on 32-bit devices to avoid overflow etc . you should use Int64 . If you re not worried use Int both places : .. . .. . If I use an Int directly on that line then that works fine . Eg . This is because that s actually an Int64 which conforms to IntegerLiteralConvertible so the literal s underlying type is inferred you can read more about Swift s literal convertibles here : http : nshipster.com swift-literal-convertible . So should I be using the Int64 here explicitly in my class definition since its mapped to a DB Keep in mind that the SQLite.swift expression layer gives you the flexibility to refer to the underlying column types however you want to assuming you conform it to its Value protocol https : github.com stephencelis SQLite.swift blob master Documentation Index.md custom-types so again : you can use Int freely if that s how you re treating the value throughout your code . Beyond all this when you work with different integer types in Swift you can cast them inline . E.g . Comment : This clarifies my exact point of confusion Thanks for the answer", "Question : I have a db and I want to add a column to it if it doesn t exist . How do I do that with sqlite.swift API .. . Answer : The correct way for swift 2.0 is following :", "Question : In the SQLite Swift documentation https : github.com stephencelis SQLite.swift blob master Documentation Index.md there is reference to getting statement results directly . I have a lot of SQL queries prepared and I don t really want to refactor them . I would sooner use them as they are using db.prepare as per below . Statements with results may be iterated over . The return values always have the Optional around them . Is there a way we can just get the raw row values back without this .. . Answer : Unwrap the values using after the variable as @stephencelis said :", "Question : In the SQLite Swift documentation https : github.com stephencelis SQLite.swift blob master Documentation Index.md there is reference to getting statement results directly . I have a lot of SQL queries prepared and I don t really want to refactor them . I would sooner use them as they are using db.prepare as per below . Statements with results may be iterated over . The return values always have the Optional around them . Is there a way we can just get the raw row values back without this .. . Answer : You may want to use http : github.com groue GRDB.swift . It lets you extract optionals or non-optionals just as you wish : Comment : Why the downvote", "Question : Just installed SQLite.swift from cocoapods in my Xcode project and I get an error when trying to build stating Header usr include sqlite3.h not found . Therefore I get an error stating could not build Objective-C module SQLite3 . Am I just doing something wrong or is there an issue here Comment : This looks like a bug with the latest release . I ll file an issue and we ll try to get 0.9.1 out to address the issue . Comment : Please try locking to the module-map-path branch see github.com stephencelis SQLite.swift issues 319 https : github.com stephencelis SQLite.swift issues 319 . Comment : i realize that the module-map-path branch doesn t exist any more but i see that you have already pushed 0.9.1 . I ve tested it and it works Thank you for the very quick fix . .. . Answer : Adding a note to echo the above comments that this should be fixed now . The latest 0.9.2 should also work ok and be slightly more compatible even for Swift 2.2 as well as Carthage CocoaPods or manual install .", "Question : null .. . Answer : I have downloaded SQLite.swift and get this error : .. . .. . Playground execution failed : var folders 43 nc3kf6y17dbfdn14crfmcdjh0000gn T . lldb 2060 playground2.swift : 1 : 8 : error : no such module SQLite import SQLite .. . .. . I also note that SQLite.swift has a reference to sqlcipher.xcodeproj . Do I need to include this too Even with the playground in SQLite I get the same error . I am using Xcode 7.1 Beta with the c9d3082 commit of SQLite.swift .. . .. . Have followed your instructions precisely . Many thanks .. . .. . Now solved . Here is the answer : 1 Make sure Framework Search Paths in Build Settings for your project is set to the workspace where SQLite is loaded . In my system I had them in the same workspace 2 Get rid of the additional info from Per-configuration Build Products Path . My just says : BUILD DIR CONFIGURATION 3 . IN SQLite Clean then rebuild . Then run Tests . Make sure SQLite.framework is not coloured red under Products in SQLite.xcodeproj 4 . Then follow Stephen s steps 1 to 4 . 5 . I am using Xcode 7.2 Beta Comment : Have you built the framework first Playgrounds that use frameworks expect them to be built and do not build them manually . Comment : Whilst now I no longer get the @no such module message I get the following : error : use of unresolved identifier Connection let db try Connection . I built your framework before following your other instructions . The build was successful . Putting let db try Connection into a swift file gets no errors . Just the playground has issues . Comment : I have now solved my issue . The details are added above . For some reason this version of Xcode does not like db.trace print in the playground . Plus there is a self . needed to be added in one of the modules sorry - I forget which Comment : Stephen - This is the module that needs changing : func test commitHook setsCommitHook async done in db.commitHook done try db.transaction try self.InsertUser alice XCTAssertEqual 1 db.scalar SELECT count FROM users as Int64 Comment : Try changing that to db.trace print 0 instead . Needs to be fixed upstream .", "Question : I would like to filter results for the same column with multiple values .. . .. . example in sql : .. . .. . this will return all rows from myTable where the status is 1 and the current condition is New OR Working .. . .. . how do I do this in SQLite.swift .. . Answer : You can use raw SQL in Swift . So you can use the string you posted . Raw SQL https : github.com stephencelis SQLite.swift blob master Documentation Index.md executing-arbitrary-sql .. . .. . Using Filters https : github.com stephencelis SQLite.swift blob master Documentation Index.md filter-operators-and-functions .. . .. . I use Filters gives me more insight . Comment : To clarify you can use New Working .contains current condition . Comment : thank you very much That helped", "Question : Is it possible to write a statement in sqlite.swift that will generate the equivalent sql : .. . .. . SELECT foods.name food types.name FROM foods food types WHERE foods.type id food types.id LIMIT 10 .. . .. . I can t figure out how to query from multiple Table objects at once . Thanks .. . Answer : Your original query passes two tables to the FROM clause creating an implicit join . SQLite.swift s query-builder language currently only supports explicit joins . Check out the documentation under Joining Other Tables https : github.com stephencelis SQLite.swift blob ccf43925aacf9fcc6130639247b3e7578a1c727a Documentation Index.md joining-other-tables for more information on joining tables . In your case : Comment : Thanks Stephen I ve tried that and it works I m running into trouble when I try and join more than two tables I have multiple tables all with the same foreign key and I m trying to join on it but I don t get the expected result I get way more rows than expected . I can do two at a time and then build my data structure from there but I was looking for something more elegant . I really appreciate your work and your well designed Sqlite.swift . Cheers . Comment : Without an example of what isn t working I unfortunately don t have the ability to help further : .join s can be chained so you should be able to continue to build up more complex joins . Comment : Thanks for for the follow up I think I figured it out . The foreign key is a column for all the tables I m trying to join but there are foreign key members that are not common among all the tables so I believe sql then generates a a cross-join vs an inner join.. . That leads to all the extra rows in the query . I confirmed this by using the sql that sqlite.swift generates on the db directly . Thanks again and I ll close out the question", "Question : null .. . Answer : Is there a way to join tables from more than two SQLite databases with SQLite.Swift The documentation only has examples from the same database . Note to the duplicate gurus : This is not about how to join tables in SQlite from different databases . It s about how to join tables in SQlite.Swift which is a Swift library that runs on SQLite . Comment : Possible duplicate of SQLite - How do you join tables from different databases http : stackoverflow.com questions 6824717 sqlite-how-do-you-join-tables-from-different-databases Comment : @ogres Thanks but this is related to a Swift library that runs on SQLite . The two questions are related but cover different domains . Comment : you can use raw SQL statements and achieve the same result . Comment : @ogres Don t think it d work because I have to create two separate connections in this case and each connection has its own ExecuteSQL method . Combining the two doesnt seem to be possible as for as I know . Comment : @stephencelis might have an answer :", "Question : null .. . Answer : I m trying to get a NSData objet from a Blob to load it into a Web View . I ve read the documentation about SQLite.swift https : github.com stephencelis SQLite.swift tree swift-2 but I ve nothing clear . Please help me . I think I need a working example . my code : https : gist.github.com gobozgz 9d1b02364f878bc1a026 .. . .. . Thanks a lot everyone .", "Question : I would like to create a simple distance function to order objects while fetched from a SQLite database in Swift2 . I m using the awesome SQLite.swift framework . With the following I could fetch the nearest objects : .. . .. . But I would like to use a Type-Safe SQL Expression without using a query String . How can I add a function to be able to make it work like this here the lat and lon values are Expression values which represent the location of the rows in the table and centerLat centerLon values represent the centre point from where I m calculating the distance of the objects : Comment : Missed this without the sqlite.swift tag In your definition and original SQL you have 4 arguments but in your type-safe version you have 2 . Could you please update it to be more representative of what you re looking for Comment : @stephencelis Sorry but happy you found it . I updated my question .. . Answer : There s no good way of doing this yet many of the expression-building helpers are internal to SQLite.swift right now . I encourage you to open an issue as a feature request . In the meantime because these are values that don t need to be quoted you can do the following : Comment : This solution works but distance is not called . I ve printed the query with stmt.expression.asSQL and found that it adds quotation marks around the distance function-call which prevents it from evaluation : SELECT id FROM objects WHERE lat BETWEEN 47.1955518216418 AND 47.7955518216418 AND lng BETWEEN 18.7366857050623 AND 19.3366857050623 ORDER BY distance lat lng 47.4955518216418 19.0366857050623 ASC LIMIT 20 By removing the commas then using it like a raw SQL statement it returned the correct values . Is it possible to somehow turn off quotation", "Question : I m trying to build a command-line tool which uses sqlite . I have downloaded Stephen Celis swift wrapper SQLite.swift https : github.com stephencelis SQLite.swift and built a working OS X app . However I am not able to build my command-line tool . I believe that I correctly followed the instructions to do so in the SQLite.swift Documentation for frameworkless targets https : github.com stephencelis SQLite.swift blob master Documentation Index.md frameworkless-targets but apparently I am missing something . I get an error in Helper.swift @ import CSQLite - No such module CSQLite . I am linking against libsqlite3.dylib also tried libsqlite3.tbd .. . I added the SQLite.swift source to my project .. . I added import sqlite3.h import SQLite-Bridging.h to my bridging header file . Perhaps of note when I right-click on sqlite3.h or SQLite-Bridging.h xCode does not know where what they are . I m happy to send my test project about 80KB compressed to anyone who can and is willing to help . There is probably a very simple solution I just do not see what it is . thx for any help .. . .. . -Craig Comment : My Objective-C Bridging Header xxx-Bridging-Header.h for some reason did not get added properly to the project . Also I had to comment out import CSQLite in three files : Connection Helpers and Statement . Project now builds and runs . .. . Answer : I ve faced the same problem . There were lots of compiler errors like Connection.swift : 26 : 8 : Could not build Objective-C module CSQLite .. . .. . The error has roots to the lctx.h : 13 : 25 : Use of undeclared identifier SYS getlcid .. . .. . It worth mentioning that I have two Xcodes installed - v 6.2 at Applications and v 7.3 at Applications . My project is iOS app on Swift with SQLite pod and I open it with the Xcode 7.3 . The SQLite pod has a file at project folder Pods SQLite.swift CocoaPods iphonesimulator module.modulemap . The file had the content .. . .. . module CSQLite system header Applications Xcode.app Contents Developer Platforms iPhoneSimulator.platform Developer SDKs iPhoneSimulator.sdk usr include sqlite3.h export .. . .. . To fix compiler errors I changed the content of module.modulemap to .. . .. . module CSQLite system header Users my user name Applications Xcode.app Contents Developer Platforms iPhoneSimulator.platform Developer SDKs iPhoneSimulator.sdk usr include sqlite3.h export .. . .. . The change is that I pointed search of sqlite3.h into my Applications folder where Xcode 7.3 is located . This made my project compiling .", "Question : null .. . Answer : I am trying to select all columns from a table in a joined SQLite.swift table statement with the help of the select-function but I always get the following error : .. . .. . Here is a demo code producing the error : .. . .. . The last call of the select-function is always causing an error when I try to use the STAR all fields of a table . Is there any way I can use the star operator and not list all of the fields separately I am using Xcode 7.0.1 maybe this is fixed in 7.1 with swift 2.1", "Question : I want to update the column of a row if the row already exists but if it doesn t exist yet then I want to insert a new row . Related questions .. . .. . This type of question is popular for SQL in general .. . .. . UPDATE if exists else INSERT in SQL Server 2008 http : stackoverflow.com questions 21208719 update-if-exists-else-insert-in-sql-server-2008 .. . Solutions for INSERT OR UPDATE on SQL Server http : stackoverflow.com questions 108403 solutions-for-insert-or-update-on-sql-server .. . Insert into a MySQL table or update if exists http : stackoverflow.com questions 4205181 insert-into-a-mysql-table-or-update-if-exists .. . .. . and SQLite in particular .. . .. . INSERT IF NOT EXISTS ELSE UPDATE http : stackoverflow.com questions 3634984 insert-if-not-exists-else-update .. . SQLite - UPSERT not INSERT or REPLACE http : stackoverflow.com questions 418898 sqlite-upsert-not-insert-or-replace .. . SQLite UPSERT UPDATE OR INSERT http : stackoverflow.com questions 15277373 sqlite-upsert-update-or-insert .. . SQL : How to update or insert if doesn t exist http : stackoverflow.com questions 14807472 sql-how-to-update-or-insert-if-doesnt-exist .. . .. . Looking for SQLite.swift implementation .. . .. . I m trying to save development time by using the SQLite.swift https : github.com stephencelis SQLite.swift wrapper for iOS development . I chose this framework because it was recommended on raywenderlich.com https : www.raywenderlich.com 123579 sqlite-tutorial-swift . I think it would be useful to have an example of the syntax for an update or insert . Strategy .. . .. . In this answer http : stackoverflow.com a 418988 3681880 Sam Saffron says : .. . .. . If you are generally doing updates I would . . .. . .. . 1 . Begin a transaction .. . 2 . Do the update .. . 3 . Check the rowcount .. . 4 . If it is 0 do the insert .. . 5 . Commit .. . .. . If you are generally doing inserts I would .. . .. . 1 . Begin a transaction .. . 2 . Try an insert .. . 3 . Check for primary-key violation error .. . 4 . if we got an error do the update .. . 5 . Commit .. . .. . This way you avoid the select and you are transactionally sound on Sqlite . That makes sense to me so in my answer below I am providing an example of the generally doing updates . .. . Answer : In this example the user dictionary stores words that are typed on a custom-keyboard . If the word is already in the dictionary then that word s frequency count is incremented by 1 . But if the word hasn t been entered before then a new row is inserted with a default frequency of 1 . The table was created with the following schema : .. . .. . And here is how the syntax would look . See the SQLite.swift documentation https : github.com stephencelis SQLite.swift blob master Documentation Index.md for more help .", "Question : I need to initialize a variable to connect to an SQLite database in Swift . I am using the SQLite.swift https : github.com stephencelis SQLite.swift blob master Documentation Index.md connecting-to-a-database library and need to connect to the database with this line : .. . .. . However this line by itself will not work because it needs to be surrounded with a try-catch block . Try catch blocks will not work unless they are defined within methods or functions so now we have .. . .. . However this doesn t allow me to access the variable from other methods in the same file which is what I need to do . Global let declarations also require initialization so that means it cannot be set globally . How can I access this object from other methods within the class Comment : Read this https : developer.apple.com library prerelease ios documentation Swift Conceptual Swift Programming Language Declarations.html Especially the parts about scope Comment : Alternatively to this create a database manager object and pass a reference to that around your application . You ll find it s a lot easier when it comes to testing your application . Comment : Ok I ll do this . Thank you .. . Answer : You could do this : .. . .. . Or you could do this : .. . .. . Or you could do this : .. . .. . You can do whatever you like in the closure to handle an error case ." ] }
[ "yes-answer-long", "yes-answer-short" ]
sqlite
UNK_RELATION
internet-explorer@web@80
internet-explorer -- internet-explorer commonly abbreviated to ie or msie is a @placeholder browser developed by microsoft and is included as part of microsoft windows .
{ "confidence": [ 60.418453216552734, 59.07028579711914, 58.65224075317383, 58.0151481628418, 55.19808578491211, 55.13377380371094, 55.13377380371094, 54.035892486572266, 53.67408752441406, 53.31336975097656, 52.9240608215332, 52.76331329345703, 52.76331329345703, 52.688209533691406, 52.66708755493164, 52.521820068359375, 52.47846984863281, 52.47529602050781, 52.463382720947266, 52.01213836669922, 51.896644592285156, 51.824867248535156, 51.112030029296875, 51.05707931518555, 51.03851318359375, 50.62028884887695, 50.53059768676758, 50.48814010620117, 50.415496826171875, 50.292537689208984, 50.25014114379883, 50.23512268066406, 50.14515686035156, 50.09397888183594, 50.09397888183594, 50.09397888183594, 50.07872772216797, 50.069454193115234, 49.95404815673828, 49.763092041015625, 49.763092041015625, 49.71534729003906, 49.714454650878906, 49.69333267211914, 49.453250885009766, 49.35309982299805, 49.35309982299805, 49.2381706237793, 49.1277961730957, 49.04677200317383, 48.94418716430664, 48.94418716430664, 48.912776947021484, 48.91118240356445, 48.873355865478516, 48.873355865478516, 48.873355865478516, 48.873355865478516, 48.873355865478516, 48.764488220214844, 48.613868713378906, 48.61307144165039, 48.58391571044922, 48.530372619628906, 48.50675964355469, 48.49454116821289, 48.37028884887695, 48.37028884887695, 48.34282302856445, 48.3316764831543, 48.09168243408203, 47.92943572998047, 47.92943572998047, 47.85256576538086, 47.845001220703125, 47.845001220703125, 47.845001220703125, 47.845001220703125, 47.674564361572266, 47.674564361572266, 47.674564361572266, 47.674564361572266, 47.674564361572266, 47.61554718017578, 47.61554718017578, 47.582923889160156, 47.16331481933594, 47.16331481933594, 47.0989990234375, 47.0989990234375, 47.09768295288086, 47.09768295288086, 47.05775833129883, 47.05775833129883, 47.05775833129883, 47.05775833129883, 46.88069152832031, 46.846290588378906, 46.846290588378906 ], "content": [ "Then it reports itself as Microsoft Internet Explorer .", "This feature is available in both Microsoft Edge and Internet Explorer .", "The proper locations are : HKEY LOCAL MACHINE SOFTWARE Microsoft Internet Explorer svcUpdateVersion and HKEY LOCAL MACHINE SOFTWARE Microsoft Internet Explorer svcVersion .", "In Windows Internet Explorer 9 and earlier versions quirks-mode restricted the webpage to the features supported by Microsoft Internet Explorer 5.5 .", "Go to Advanced Default Java for Browsers and check Microsoft Internet Explorer .", "Microsoft does not support multiple versions of Internet Explorer on one operating-system .", "Microsoft has asked us to remove Internet Explorer from this service .", "IE7.js is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser .", "media The url is loaded in the Media Bar in Microsoft Internet Explorer 6 .", "On a Windows box the IF Internet Explorer statements will resolve to Internet Explorer 7 even in Internet Explorer 5 which means even more weird bugs .", "It will force Internet Explorer to use IE standards mode .", "The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine .", "How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine", "Locate the following Windows Internet Explorer 11 or you can type Internet Explorer for a quick search .", "Installed updates - Uninstall Windows Internet Explorer 10 .", "modern.IE http : www.modern.ie is an undertaking by Microsoft to make cross-browser testing for the Internet Explorer browsers easier .", "Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 running-internet-explorer-6-internet-explorer-7-and-internet-explorer-8-on-the .. . .. . I need recommendations on a good Internet Explorer standalone for Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 .", "Open registry and go to : .. . .. . HKEY CURRENT USER Software Microsoft Internet Explorer MenuExt .. . .. . .. . 2 .", "Click on Internet explorer icon to open Internet explorer .", "Browser Mode : Internet Explorer 8 .. . .. . 2 .", "One with Internet Explorer 6 and one with Internet Explorer 7 .", "Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . I am looking for a tool that can allow me to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 if possible on my machine .", "The site requires the browser to be Internet Explorer .", "But it seams to be broken on Internet Explorer IE 8 .", "There isn t even an Internet Explorer folder under Software Policies Microsoft .", "The following font declaration is not working in Internet Explorer 11 http : windows.microsoft.com en-us internet-explorer download-ie .", "How can I test for Internet explorer Ie 11 and below and microsoft-edge using Node js", "Fonts works in any browser but not in Internet Explorer .", "While internet-explorer will load IE .", "You could try userdata behaviors which is a pre-W3C solution developed by Microsoft for Internet Explorer .", "Windows Internet Explorer 8 and later .", "The internet was not yet invented in the time of Internet Explorer 5.5", "Or do browser check and if it is Internet Explorer then just implement it", "But in Internet Explorer and all other browsers Not Internet Explorer is displayed .", "It too doesn t work in Internet Explorer 7 or Internet Explorer 6 .", "Internet Explorer Version Checks are not working in Internet Explorer 8 on Some Computers .", "Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 .", "A Windows Features windows will show uncheck the Internet Explorer 11 as circled .", "del Only virtualization can provide the full DLL stack for definitive testing . del .. . .. . Edit : .. . .. . On March 18 2009 the Microsoft Expression Web team released SuperPreview http : blogs.msdn.com xweb archive 2009 03 18 Microsoft-Expression-Web-SuperPreview-for-Windows-Internet-Explorer.aspx a free stand-alone application that allows cross-browser side-by-side and onionskin comparison between Internet Explorer 8 Internet Explorer 8 - Internet Explorer7 compatibility-mode and Internet Explorer 6 .", "I also tried the Internet Explorer Collection from Edskes but Internet Explorer 6 and Internet Explorer 7 refuse to let me type in a text box .", "When you upgrade from Internet Explorer 6 to Internet Explorer 7 or Internet Explorer 8 you re actually replacing some system DLLs .", "You can also change the IntranetCompatibilityMode HKCU Software Microsoft Internet Explorer Browser Emulation IntranetCompatibilityMode registry setting for IE this will cause IE to render intranet pages in the same way as-if they where internet .", "search Disabled in Windows Internet Explorer 7 see Security and Compatibility in Internet Explorer 7 for details .", "I have Windows 7 Internet Explorer 10 .", "Also you should be aware that ActiveX controls are supported only by Internet Explorer...and that IE is soon to be replaced by the Microsoft Edge browser that doesn t not support ActiveX controls .", "Browse to HKEY LOCALMACHINE - SOFTWARE - Microsoft - Internet Explorer - Main .. . 3 .", "HKEY CURRENT USER Software Microsoft Internet Explorer BrowserEmulation IntranetCompatibilityMode 1-- 0", "Internet Explorer 11 : Internet Explorer has stopped working .", "Firefox version is 3.5.19 and Internet Explorer version is MSIE 7.0 .", "I need it to change the Browser Mode to Internet Explorer 10 Compatibility View .", "But in Internet Explorer not .", "but not Internet Explorer .", "Original file name : IEXPLORE.EXE .. . Product name : Windows Internet Explorer .. . Comments : Windows Internet Explorer .. . Trademarks : Windows Internet Explorer .. . File version : 8.00.6001.18702 longhorn ie8 rtm wmbla .090308-0339 .. . Private build : .. . Special build :", ".. . You can have your add-on included by submitting it through the Internet Explorer Add-on site and you no longer have to be a member of the Microsoft Partner program to be included .", "Except for Internet Explorer of course .", "Does Internet Explorer support it", "works with Internet Explorer 8", "Use Internet Explorer 8 .", "Run Internet Explorer as Administrator .", "Which IE version menu : About Internet Explorer", "Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 .. . .. . Is there a way to have Internet Explorer 8 and Internet Explorer 6 side-by-side without virtualizing", "Type in Internet Explorer in the search-box you should get the Internet Explorer 11 in the list .. . .. . 6 .", "By upgrading your Internet Explorer .", "And that is happening in Internet Explorer 11", "So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 .", "I used Internet Explorer 8 on Windows 7 .", "How does it works in Internet Explorer", "I mean internet-explorer-6", "Go to installed updates and just uninstall Internet Explorer 11 Windows update .", "I have developed a BHO for Internet Explorer and it can be installed successfully by users .", "This question is a duplicate of Force Internet Explorer 8 browser mode in intranet http : stackoverflow.com questions 2742853 force-internet-explorer-8-browser-mode-in-intranet .", "To do this go to Control Panel Java Advanced Default Java for Browsers and uncheck Microsoft Internet Explorer .", "Microsoft deserves all the hate against Internet Explorer that it has had over the years .", "Internet Explorer does not like mixing browser version .", "We know Internet Explorer will be discontinued in Windows 10 being replaced by the new Microsoft Edge formerly codenamed Project Spartan .", "I unfortunately don t have the relevant versions of Windows Microsoft Internet Explorer available on this laptop but perhaps this is of some use .", "For 64-bit Windows installations the key is HKEY LOCAL MACHINE SOFTWARE Wow6432Node Microsoft Internet Explorer Main FeatureControl FEATURE BFCACHE .", ".. . For 64-bit Windows installations the key is HKEY LOCAL MACHINE SOFTWARE Wow6432Node Microsoft Internet Explorer Main FeatureControl FEATURE BFCACHE .", "Is this a known issues in Internet Explorer", "Restart Internet Explorer", "This works in Firefox but not in Internet Explorer .", "Powered by Internet Explorer 6 .", "Internet Explorer cannot .", "Close Internet Explorer open a command-prompt and cd to C : Users username AppData Local Microsoft Internet Explorer Indexed DB then run esentutl.exe Internet.edb .", "If you close Internet Explorer open a command-prompt and cd to C : Users AppData Local Microsoft Internet Explorer Indexed DB then run esentutl.exe Internet.edb .", "The current list of virtual disk images available from the above link are : .. . .. . Internet Explorer 6 on Windows XP SP3 .. . Internet Explorer 7 on Windows XP SP3 .. . Internet Explorer 8 on Windows XP SP3 .. . Internet Explorer 7 on Windows Vista .. . Internet Explorer 8 on Windows Vista .. . .. . List is current as of October 11 2009 .", "Also posted this answer here : Internet Explorer Console http : stackoverflow.com questions 2656730 internet-explorer-console", "I m doing this : .. . .. . This work fine in internet-explorer-11 but I need to do this for internet-explorer-6 .", "This is the reason why you get Internet Explorer 6 when you uninstall Internet Explorer 7 .", "Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 .", "Installed updates - Uninstall Internet Explorer 11 2 .", "Right click the Internet Explorer 11 and click Uninstall", "i am hosting Internet Explorer in a Windows application .", ".. . Available as of Windows Internet Explorer 8 or later .", "The internet-explorer version is IE8 and Windows xp Professional .", "Is it possible to run Internet Explorer in a Windows Server Container", "The WATIR : : IE class maintains a copy of Internet Explorer and issues commands to it as required .", "The browsers in question are Internet Explorer and Firefox .", "Get Internet Explorer 9 .. . 2 ." ] }
{ "confidence": [ 71.72982788085938, 69.83711242675781, 69.07383728027344, 68.81439971923828, 68.50123596191406, 67.7908706665039, 67.27962493896484, 67.16293334960938, 66.29639434814453, 66.24678802490234, 66.24678802490234, 65.95599365234375, 65.92414855957031, 65.8592758178711, 65.85752868652344, 65.79557037353516, 65.62686920166016, 65.52644348144531, 65.41748809814453, 65.25718688964844 ], "content": [ "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : modern.IE http : www.modern.ie is an undertaking by Microsoft to make cross-browser testing for the Internet Explorer browsers easier . Microsoft has created modern.IE to provide developers and designers with a suite of tools to facilitate IE browser testing . With modern.IE you have two methods of testing your website in IE . First modern.IE offers you three months free usage of the web-based browser testing service BrowserStack http : www.browserstack.com . You just need a Facebook account to login and start testing . The second method modern.IE offers is a virtualization image of each browser from IE 6 to IE 10 http : www.modern.ie en-us virtualization-tools downloads which can be run on virtualization software like VirtualBox Virtual PC Hyper-V or VMWare Player on WIndows Mac or Linux . Additionally modern.IE also provides a tool which scans your web page for common coding problems http : www.modern.ie en-us report and lists them out for you to correct so that they display correctly in all IE versions . Source : modern.IE - Cross-Browser IE Testing Tools Suite http : www.functionn.in 2013 02 modernie-cross-browser-ie-testing-tools.html Comment : That s the new tool in town Comment : This needs more support . This is the best and most current solution Comment : Direct link-to emulator downloads here : modern.ie en-US virtualization-tools downloads http : www.modern.ie en-US virtualization-tools downloads Comment : This is it . The st-graal of compatibility testing yea", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : As Eduardo mentioned the recently announced Microsoft SuperPreview http : blogs.msdn.com xweb archive 2009 03 18 Microsoft-Expression-Web-SuperPreview-for-Windows-Internet-Explorer.aspx is a tool that lets you view how web pages are rendered in many different browsers even if they aren t installed locally . For example you can see how your page looks in Internet Explorer 6 Internet Explorer 7 Internet Explorer 8 Firefox and Safari even if you don t have those browsers installed .", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : I wouldn t do it . Use virtual PCs instead . It might take a little setup but you ll thank yourself in the long run . In my experience you can t really get them cleanly installed side-by-side and unless they are standalone installs you can t really verify that it is 100 true-to-browser rendering . Update : Looks like one of the better ways to accomplish this if running Windows 7 is using Windows XP mode to set up multiple virtual machines : Testing Multiple Versions of IE on one PC http : blogs.msdn.com b ie archive 2011 02 04 testing-multiple-versions-of-ie-on-one-pc.aspx at the IEBlog http : blogs.msdn.com b ie . Update 2 : 11 2014 There are new solutions since this was last updated . Microsoft now provides VMs for any environment to test multiple versions of IE : Modern.IE https : www.modern.ie en-us virtualization-tools Comment : tangent : virtualbox.org http : www.virtualbox.org looks cool . I haven t tried it myself - this may be a good opportunity to try it though Comment : It sucks that this is the correct answer . Microsoft should make this work . Unless your machine is an expensive behemoth on steroids you can t run multiple virtual machines at the same time which means you have to test and fix for each browser at separate times . Comment : @apphacker : How many people in this world actually need three different browser versions running side-by-side You can t blame Microsoft or any other software company for not writing their software to the .000001 that need such a thing . Comment : @Dave...I d wager that a large percentage of people that develop large scale web apps need this . We re really not talking about that small a percentage here . Besides plenty of other people would like this too...I d like to be able to upgrade my software without having it blow away my old copy so I could just go back to my old version easily if I decide to . Comment : This question links to a Microsoft support page where you can download VMs containing IE 6 IE 7 and IE 8 : stackoverflow.com questions 135057 http : stackoverflow.com questions 135057 internet-explorer-8-and-ie-6-side-by-side", "Question : Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 running-internet-explorer-6-internet-explorer-7-and-internet-explorer-8-on-the .. . .. . I need recommendations on a good Internet Explorer standalone for Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 . I tried using Tredosoft s Internet Explorer 7 standalone http : tredosoft.com IE7 standalone and MultiIE for Internet Explorer 6 but select elements were being blocked as pop-ups even when the pop-up blocker was turned off in all Internet Explorer browsers 6 7 8 . I also tried the Internet Explorer Collection from Edskes but Internet Explorer 6 and Internet Explorer 7 refuse to let me type in a text box . If someone can provide me with either a solution or an alternative that d be brilliant . Also I m using VMware Fusion http : en.wikipedia.org wiki VMware Fusion to run Windows XP on my Mac . Comment : You ll first have to tell some of us what an IE standalone is . Comment : I suspect he means an IE that isn t tied into Windows . Comment : OK the end result-of what I m trying to do is be able to run IE6 IE7 and IE8 on the same installation of Windows and have them behave as they normally would . I can t use browser shots as I need to be able to test functionality not just layout . I think I might try the Xenocode ones for the short term but I m looking for something that I can run locally . Comment : I won t be going for the Microsoft option as I m hoping for something that continues to work and that I don t have to deal with every three months . It sounds like far too much of an issue . I m going to look into using multiple snapshots or multiple virtual machines unless someone has a better option . .. . Answer : If you need a way to test your app on the different IE-versions you can download and install Microsoft Virtual PC : http : www.microsoft.com downloads details.aspx displaylang en FamilyID 04d26402-3199-48a3-afa2-2dc0b40a73b6 http : www.microsoft.com downloads details.aspx displaylang en FamilyID 04d26402-3199-48a3-afa2-2dc0b40a73b6 .. . .. . ...and download VHD-files with Windows installations with the different browsers included : http : www.microsoft.com Downloads details.aspx FamilyID 21eabb90-958f-4b64-b5f1-73d0a413c8ef displaylang en http : www.microsoft.com Downloads details.aspx FamilyID 21eabb90-958f-4b64-b5f1-73d0a413c8ef displaylang en", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : You can use the new MS Expression Web SuperPreview http : blogs.msdn.com xweb archive 2009 03 18 Microsoft-Expression-Web-SuperPreview-for-Windows-Internet-Explorer.aspx .. . .. . alt text http : www.istartedsomething.com wp-content uploads 2009 03 superpreview1.jpg .. . .. . If you do not want to spend money on MS Expression Web you can download Microsoft Expression Web SuperPreview for Windows Internet Explorer http : www.microsoft.com en-us download details.aspx id 2020 completely free . The only restriction is that after the trial expires you can t compare to non IE browsers . Comment : How does this work with IE8 I don t it on my computer now so if I download it will it show me 6 7 and 8 Comment : I m using it as part of MS Expression not the IE attached version and works very well . A bit slow in my case but I do not have a super-machine Comment : @Martin : Yes if you have IE8 you can view IE7 via compatibility view IE6 and IE8 of course . Comment : Am I right in saying that it just renders the page but you can t actually interact with it as in press buttons enter text etc . That makes it less useful as I thought because you can t actually browse the site as a user would do . Comment : Its not really that super a product to be honest slow very very very very slow and also no interaction .", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : I use http : www.spoon.net browsers Windows-only . You can run IE8 IE7 IE6 Firefox 3.5 Firefox 3 Firefox 2 Safari 4 Safari 3 Opera 10 Opera 9 Chrome . You just need to install a plugin and then click on the corresponding icon . It will download and run the files needed to run each of the above mentioned browsers . Comment : Microsoft has asked us to remove Internet Explorer from this service . Comment : As of 2011-01-24 there is no IE support : Come back soon for more information on how to use Internet Explorer on Spoon.net Comment : The stand-alone files are still available see Quick browser testing : Internet explorer version 6 7 and 8 http : stackoverflow.com q 4227959 938089 quick-browser-testing-internet-explorer-version-6-7-and-8 . This does not work for Windows 7 though . Comment : @DenilsonS : The Service is back Comment : There is a similar service that does not require plugins and should work on Mac Linux Windows : crossbrowsertesting.com http : crossbrowsertesting.com", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : There is one elegant way to run IE6 IE7 and IE8 on the same machine called virtual PC . First download virtual PC from Microsoft website here : http : www.microsoft.com downloadS details.aspx FamilyID 04d26402-3199-48a3-afa2-2dc0b40a73b6 displaylang en http : www.microsoft.com downloadS details.aspx FamilyID 04d26402-3199-48a3-afa2-2dc0b40a73b6 displaylang en .. . .. . Then download 3 EXE files with IE6 IE7 and IE8 here : http : www.microsoft.com downloads details.aspx FamilyId 21EABB90-958F-4B64-B5F1-73D0A413C8EF displaylang en .. . .. . Install them on your PC and test your web-applications . Saved me days of looking for similar solutions .", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : For windows-users there is Windows XP Mode which allows you to run multiple versions of IE on a Windows 7 Professional Enterprise or Ultimate edition . http : blogs.msdn.com b ie archive 2011 02 04 testing-multiple-versions-of-ie-on-one-pc.aspx Comment : edited as while useful it s not the definitive answer . Not everyone uses windows as their host operating-system .", "Question : Possible Duplicate : .. . Running Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine http : stackoverflow.com questions 574463 running-internet-explorer-6-internet-explorer-7-and-internet-explorer-8-on-the .. . .. . I need recommendations on a good Internet Explorer standalone for Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 . I tried using Tredosoft s Internet Explorer 7 standalone http : tredosoft.com IE7 standalone and MultiIE for Internet Explorer 6 but select elements were being blocked as pop-ups even when the pop-up blocker was turned off in all Internet Explorer browsers 6 7 8 . I also tried the Internet Explorer Collection from Edskes but Internet Explorer 6 and Internet Explorer 7 refuse to let me type in a text box . If someone can provide me with either a solution or an alternative that d be brilliant . Also I m using VMware Fusion http : en.wikipedia.org wiki VMware Fusion to run Windows XP on my Mac . Comment : You ll first have to tell some of us what an IE standalone is . Comment : I suspect he means an IE that isn t tied into Windows . Comment : OK the end result-of what I m trying to do is be able to run IE6 IE7 and IE8 on the same installation of Windows and have them behave as they normally would . I can t use browser shots as I need to be able to test functionality not just layout . I think I might try the Xenocode ones for the short term but I m looking for something that I can run locally . Comment : I won t be going for the Microsoft option as I m hoping for something that continues to work and that I don t have to deal with every three months . It sounds like far too much of an issue . I m going to look into using multiple snapshots or multiple virtual machines unless someone has a better option . .. . Answer : Spoon provides a good list of virtualized browsers including IE 6 7 and 8 . http : spoon.net browsers Comment : I have noticed odd behaviour previously with this method - rendering engines not behaving like the original counterparts . Comment : Spoon WAS brilliant.. . Until Microsoft pulled the plug on it . virtualizationpractice.com blog p 8204 http : www.virtualizationpractice.com blog p 8204 Comment : You can get IE6 7 8 9 from Spoon.net March 2012 UK - but only for 2 minutes use every 24 hours unless you pay US 8 month . Not a terrible price for a professional tool but the idea of anyone receiving money in exchange for IE6 makes me feel ill.. . Also I don t know of any way to make it work with my-debugbar.com s IE debug bar .", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : If you have IE8 installed in your machine you can test how your site works in IE7 too . When you are in the page you need to test in IE7 browser Open Tools - developer tools . And then in the menu of that Developer tools dialog box Click on Browser Mode : CURRENT MODE and there you can select 3 options . that is .. . .. . 1 . IE7 .. . 2 . IE8 .. . 3 . IE8 Compatibility Mode", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : I wrote an article about how to test on many browsers without having these browsers installed : 10+ Ways for testing website browser compatibility http : amrelgarhy.com index.php 10-ways-for-testing-website-browser-compatibility Comment : 404 - Not Found", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : Firefox has an add-in that will render a webpage the same as-if it was in Internet Explorer 5.5 6 7 8 beta 2 . IE NET Renderer https : addons.mozilla.org en-US firefox-addon 6455 .. . .. . Edit : This looks like it only does screenshots so it may not be very useful . Good for making sure your layout isn t broken but not much else . Comment : @WalterJ89 Thank you for the link . But from what I read IE NET Renderer only does screenshots and so doesn t work for interactive applications . Comment : sorry i did not notice that . may work for quickly checking that your layout isn t broken though .", "Question : Firefox chrome Safari have there own Web-stores so is Internet Explorer has the same is searched at Google and found this : http : www.iegallery.com .. . .. . but it s really poor just contains 18 extensions so is there any other formal informal site to publish Internet Explorer extension to it and if this is the only site how to upload extension on it i searched for steps to upload with no help . Comment : nope nothing else . Why do u think IE is lagging behind the competiton Comment : If there was an official store I m sure it would be riddled with bugs and have lots of security issues . As well as looking different to everyone else s store . .. . Answer : I feel you . I once thought of developing an extension plugin for IE but couldn t find a decent documentation on how to develop one except for one post I saw here in StackOverflow : .. . .. . Developing Internet Explorer Extensions http : stackoverflow.com questions 5643819 developing-internet-explorer-extensions .. . .. . I believe the IE team in Microsoft does not want us to develop or publish extensions plugins further with the present IE ecosystem as an upcoming version of their browser Spartan reportedly will support Chrome extensions : .. . .. . http : www.zdnet.com article microsoft-confirms-windows-10s-spartan-browser-to-get-extensions .. . .. . I suppose soon enough they will introduce a new webstore for extensions after the new browser gets launched .", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : I did this on my Windows 7 computer today : .. . .. . 1 . Installed Windows Virtual PC and ran XP Mode .. . 2 . Created two Windows XP images . One with Internet Explorer 6 and one with Internet Explorer 7 . 3 . Now I can run these to browsers from my Windows 7 desktop Just like any other application . No need to open Virtual PC . http : www.microsoft.com windows virtual-pc", "Question : Unfortunately we have a massive legacy web application at work that we can t get rid of . It works on IE only and is completely dependent on the X-UA-Compatible : IE EmulateIE8 to work correctly in newer IE versions . My question is whether this is likely to one day suddenly stop working . I.e . will IE12 or 13 or 14 come out one day and render the site useless because it doesn t bother with compatibility-mode anymore If so management won t want to hear it but the sooner they do the better . .. . Answer : Editor s Note : Microsoft has since announced that the official name for their new browser is Microsoft Edge . Substitute it for any instance of Project Spartan that you see . Powered by a new rendering engine Spartan is designed for interoperability with the modern web . We ve deliberately moved away from the versioned document modes historically used in Internet Explorer and now use the same markup as other modern browsers . Spartan s new rendering engine is designed to work with the way the web is written today . The IE Dev Channel http : msdn.microsoft.com en-us library ie dn725043 has a build you can use to test the new defaults . Here are the prerequisites : .. . .. . Windows 8.1 or Windows 7 SP1 .. . Internet Explorer 11 .. . Microsoft .NET Framework 4.0 full version .. . PowerShell 3 x86 or x64 .. . .. . Here is the official recommendation : .. . .. . Starting with IE11 document modes are considered deprecated and should no longer be used . Webpages that require legacy document modes to display properly should be rewritten to use features defined by modern standards . To learn more see Compatibility changes in IE11 . References .. . .. . Project Spartan http : blogs.msdn.com b ie archive 2015 01 22 project-spartan-and-the-windows-10-january-preview-build.aspx .. . .. . Compatibility changes in IE11 http : msdn.microsoft.com en-us library ie bg182625 .. . .. . Building a more Interoperable Web with Microsoft Edge http : blogs.windows.com msedgedev 2015 06 17 building-a-more-interoperable-web-with-microsoft-edge .. . .. . Internet Explorer Developer Channel FAQ http : msdn.microsoft.com en-us library ie dn725043 .. . .. . Announcing Internet Explorer Developer Channel http : blogs.msdn.com b ie archive 2014 06 16 announcing-internet-explorer-developer-channel.aspx .. . .. . Internet Explorer Developer Channel for Windows 7 SP1 http : www.microsoft.com en-us download details.aspx id 43360 .. . .. . Internet Explorer Developer Channel for Windows 8.1 http : www.microsoft.com en-us download details.aspx id 43359", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : Multiple IE http : tredosoft.com Multiple IE Will install ie up to 6 without disrupting current installation i have 7 and it left it as it is . Now I need to find a way to run 8 on top of all that . 6 and 7 already run fine thanks to that little app above . only tested on XP", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : I use Virtual PC to run an instance of windows where I have IE6 installed . It s a bit clumsier than having different versions in the same computer but it s a 100 working IE6 . Multiple IE works fine for most testing but it s lacking that last few percents . Don t work too much to get the page looking right in IE8 it still has some glitches that most likely will be fixed in the final release .", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : Very good option is update to Internet Explorer 10 . You will find very useful developers tools including compatibility with from IE5 to IE 10 including quirks-mode . If switch the IE version i menu the page rendering of the page is changing immediately . Very good feature of this mode is javascript and HTML firebug like debugger which works in compatibility-mode . It means you can debug javascript in very old IE with the newest debugger which is very cool feature . You cannot do that with virtual-machine . Yes you can have virtual-machine for checking the final result . enter image description here http : i.stack.imgur.com Lvbzo.png Comment : Unfortunately I ve found many things that work in a newer browser in an older browser mode but which don t actually work in the older browser . There is no substitute for testing on the real browser .", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : A colleague of mine recommended Internet Explorer Collection http : finalbuilds.edskes.com iecollection.htm . It appears to work without issues but I m far from a power user . It also supports installing IE 1 through 8 .", "Question : Like everyone else I need to test my code on Internet Explorer 6 and Internet Explorer 7 . Now Internet Explorer 8 has some great tools for developer which I d like to use . I d also like to start testing my code with Internet Explorer 8 as it will soon be released . The question is : how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine . So far with Internet Explorer 6 and Internet Explorer 7 I ve been using Multiple IE http : tredosoft.com Multiple IE page 6 . But people have reported see comments on the page linked in the previous sentence issue with Internet Explorer 6 after installing Internet Explorer 8 . Those errors are related to focus in form fields . Running Internet Explorer 7 wouldn t matter so much as Internet Explorer 8 can use the Internet Explorer 7 rendering engine but we still need Internet Explorer 6 . How to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 on the same machine Comment : IE8 Compatibility does not do the same as IE7 . I Have run into many cases where they were different . Comment : @corymatthews that s true but the standalones ARE the real thing and can be installed side-by-side . IE8 normal IE7 standalone and IE6 standalone . Comment : See meta.stackexchange.com questions 9686 http : meta.stackexchange.com questions 9686 what-is-the-most-rampant-duplicate-on-stack-exchange-sites 73989 73989 for a small list of duplicates . Comment : I think simply changing the rendering engine in IE 8 to earlier versions will be sufficient for testing . Comment : see IECollection http : utilu.com IECollection : Runs under many versions of Windows OS . But best under 32-bit version of Microsoft Windows XP Service Pack 3 whether or not in a virtual-machine . Hence best to install a MS Windows XP SP3 Virtual Machine run IECollection inside it . see coding.smashingmagazine.com 2011 09 02 http : coding.smashingmagazine.com 2011 09 02 reliable-cross-browser-testing-part-1-internet-explorer .. . Answer : .02 USD more.. . I ve written a step-by-step blog post http : blog.donavon.com 2009 08 run-ie6-ie7-and-ie8-side-by-side-on.html showing how to run Internet Explorer 6 Internet Explorer 7 and Internet Explorer 8 as virtual applications on Windows 7 Ultimate ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
objective-j@cappuccino@120
objective-j -- objective-j is a programming language for web development and is used to create web-applications in the @placeholder front-end web framework .
{ "confidence": [ 53.89775085449219, 53.802642822265625, 52.39671325683594, 52.39671325683594, 50.33885192871094, 50.24375915527344, 48.961830139160156, 48.005462646484375, 47.91034698486328, 47.37281799316406, 47.352325439453125, 47.352325439453125, 47.352325439453125, 47.352325439453125, 47.352325439453125, 47.352325439453125, 47.352325439453125, 46.0297737121582, 45.78770065307617, 43.43572235107422, 43.43572235107422, 43.422706604003906, 43.422706604003906, 43.02794647216797, 42.11316680908203, 40.60121154785156, 40.153656005859375, 39.516090393066406, 39.34131622314453, 38.668636322021484, 38.668636322021484, 38.160072326660156, 38.160072326660156, 38.160072326660156, 38.160072326660156, 38.160072326660156, 38.160072326660156, 38.160072326660156, 38.160072326660156, 38.160072326660156, 38.160072326660156, 37.9594612121582, 36.83751678466797, 35.252403259277344, 34.9312629699707, 34.9312629699707, 34.33662796020508, 33.39298629760742, 33.39298629760742, 33.39298629760742, 33.39298629760742, 31.73589324951172, 31.48833656311035, 30.435897827148438, 30.413686752319336, 30.16417694091797, 29.263195037841797, 28.94263458251953, 28.407207489013672, 28.166851043701172, 28.166851043701172, 28.166851043701172, 28.166851043701172, 28.166851043701172, 28.166851043701172, 28.078792572021484, 27.680221557617188, 26.844295501708984, 26.110370635986328, 25.545812606811523, 25.545812606811523, 25.545812606811523, 25.289474487304688, 25.23444366455078, 24.22325897216797, 24.22325897216797, 24.22325897216797, 23.941680908203125, 22.59707260131836, 20.979339599609375, 20.822444915771484, 20.723426818847656, 20.497215270996094, 19.743911743164062, 19.174596786499023, 18.88827133178711, 18.871788024902344, 18.630752563476562, 18.353729248046875, 18.353729248046875, 18.353729248046875, 17.981178283691406, 17.96595573425293, 17.958967208862305, 17.632919311523438, 17.565719604492188, 17.523746490478516, 17.383426666259766, 17.34805679321289, 17.331998825073242 ], "content": [ "So native JavaScript is part of the Objective-J language .", "Currently I m working on a product that uses the Cappuccino Framework and the Objective-J language .", "Objective-J is awesome .", "Objective-J is a superset of JavaScript .", "I want to write the back-end in Objective-J just like the front-end .", "Objective-J can be developed in Windows .", "beeing a professional Objective-J coder I can say it is definitely possible since Objective-J is fully based on JavaScript .", "I checked in the Objective-J and other Framework directories in as symlinks .", "Has this approach been implemented for any language other than Objective-J", "I ve a simple question about objective-c objective-j syntax .", "My syntax is still really weak in objective-j .", "Can I use node.js with Objective-J", "@Raynos Objective-J can be easily debugged .", "I m making broad assumptions about Objective-J .", "Is there any way to work on Objective-J in Windows platform", "Any such IDE Compiler for Objective-J for windows", "I ve just red about objective-j .", "Objective-J is compiled transformed into JavaScript directly on the browser .", "Because CGRectMake and CGRectGetHeight are C functions not Objective-C or Objective-J methods .", "Does anyone know of any other editors that support intellisense for Objective-J", "@Raynos why would I debug compiled Objective-J", "My editor of choice for Objective-J Cappuccino development right now is Sublime Text 2 .", "I am trying to start development in Objective-J but I am completely lost as to how to set it up .", "I just started developing with Cappuccino Framework and I wonder if it is possible to use native javascript code in Objective-J", "CoffeeScript Objective-J http : Cappuccino.Org and Clamato http : Clamato.Net fall in this category .", "I ve some hard time to understand method signatures in Objective-J but it should be the same on Objective-C .", "I come from a Cocoa background so I m familiar with how Objective-j should work .", "Also the current development version of Cappuccino and Objective-J is much faster than the last release 0.9.6 thanks to a new better compiler .", "I am very familiar with web development and Objective-C so I can write the programs if I can get everything set up .", "I d like to touch on the comments made about objective-j Michael .", "Objective-j is really just a thin wrapper over js .", "http : stackoverflow.com q 5584833 793053 Objective-j doesn t have the same functions .", "Unfortunately I haven t had any luck finding an Objective-J intellisense autocomplete plugin .", "It seems it should be doable since Objective-J does have optional pluggable types .", "Why would you want to use Objective-J on the server : You can use javascript instead", "You don t even need to compile Objective-J before you can use it .", "Objective-J objects have a few more features than JS object which I m sure the predicate advantage of .", "Many Cappuccino coders use the Sublime Text 2 to edit Objective-J and Cappuccino code .", "And once I am to get it set up I don t know how to compile the Objective-J code to JavaScript .", "And another queastion coming with : How can I make Xcode work with objective-j", "I just tried to implement a simply alert in Objective-J code but it doesn t work at the browser.. .", "Are there any other languages similar to c objective-c that I can use for creating a web-site", "Since valid Javascript code can be executed in Objective J how would I go about adding the Parse SDK", "Is there an IDE Text Editor that provides robust code-completion hinting for cappuccino and objective-j", "I think it would be a good idea to directly start a discussion in the official Objective-J Google Group : .. . .. . http : groups.google.com group objectivej", "That editor is available for Windows and I expect the Objective-J and Cappuccino package https : github.com aparajita Cappuccino-Sublime will work just fine there .", "Aside from the language differences Javascript vs . Objective-J what benefits does Cappuccino provide over SproutCore and vice-versa in your experiences", "You re not going to lose anything if you drop down to JavaScript instead of objective-j .", "Objective-j instance-variables are accessible via the traditional dot syntax if you want.. .", "The final thing I want to put out ther just to make sure there is no confusion : objective-j gets parsed in the browser .", "We only ask developers to learn one technology Objective-J and one set of APIs .", "I am not familiar with other languages similar to Objective-C for the web but Intel has an Objective-C to JavaScript compiler here http : software.intel.com en-us articles technical-reference-intel-html5-app-porter-tool-beta .", "This question seemed similar but in Objective C", "SproutCore came from the perspective that JavaScript is indeed the language of the web so it s what you use to program against the framework .", "I m building a web application with the Cappuccino framework and I m using the new Xcode integration through the XcodeCapp-Cocoa listener .", "So for example would could do : .. . .. . As you can see I m using objective-j syntax and js syntax together.. . You can imagine the power if this .", "Regarding language I think it s important that you do not dismiss what is being used JS versus Obj-J .", "1 shows a mix of two styles the Objective-C style method calls : .. . .. . and C-style function-calls : .. . .. . Objective-J is a strict super-set of JavaScript which means that you can use the message-passing syntax in addition to the C-style function-call syntax JavaScript has .", "SubethaEdit or Coda you can use my bundle : https : github.com Me1000 Objective-J-Cappuccino-Coda-SubethaEdit-bundle .. . .. . Coda has a built-in bundle but mine is a little more full featured in terms of method completion .", "Images like just about everything else on the web load asynchronously .", "I would like to write a web application using node.js and Cappuccino .", "Chrome doesn t support loading web apps from file : URLs .", "You need to run a web server to serve the files and surf to localhost .", "The general problem with web workers is that the code that is run in the worker must be in a separate file .", "https : developer.mozilla.org en-US docs Web API Web Workers API basic usage", "I think some people are needlessly put off by objective-j as-if it s some monstrous beast that will take time to learn and while objective-j adds a lot of great features to js to actually learn them won t really take you the better part of a day if you re already familiar with object oriented programming and obviously if you re coming from cocoa you ll be able to jump right in .", "They use Obj-J as a primary language enhancement to JS in order to inject language features that JS is missing this instead of injecting those language features directly into the framework Cappuccino itself .", "Node.js web server : .. . .. . When I deploy to Heroku it fires up fine .", "Developers can leverage decades of collective experience to really accelerate the pace of building rich web-applications .", "If you use other browsers like Chrome and Firefox they might not allow you to run a web app from a file : URL .", "Instead you ll need to start up a web server and surf to the index-debug.html file through the server .", "When I try to open any code in web browser last versions of Safari Google Chrome it loads increadibly slow . .", "I am both familiar with JavaScript and Objective-C .", "I m thinking about trying to leverage JSCocoa Cappuccino and Emscripten to develop either pure-Javascript or pure-Objective-C app which would end up being compiled in the same way using native Cocoa or Cappuccino .", "If I navigate to the address of the Cappuccino web app it loads the standard loading but goes no further .", "Here is the HTML of the Cappuccino app : .. . .. . EDIT I uploaded the same project to another web-hosting service and experienced the same problem .", "This category includes stuff like GWT http : Google-Web-Toolkit.GoogleCode.Com or Volta http : Wikipedia.Org wiki Microsoft Live Labs Volta .", "I think if you write a significant app in Cappuccino you ll find the load-time to be absolutely comparable with other large web apps such as Gmail .", "The result-of CGRectMake is then passed as a parameter to the initWithFrame : method of the CPView class which is an Objective-C method .", "Finally if you re someone who is already familiar with Obj-C then Obj-J may be more your cup of tea .", "That s why Ur Web http : Impredicative.Com ur Links http : Groups.Inf.Ed.Ac.Uk links Flapjax http : Flapjax-Lang.Org haXe http : haXe.Org Caja http : Google-Caja.GoogleCode.Com and such compile the code on the server .", "I did not symlink the framework .", "Both frameworks have some level abstraction in order to remove you from directly dealing with CSS and HTML even though at the end of the day they have to render to what the web browser ultimately understands .", "Check out the Deep Drop Upload framework .", "I have read everything there is out on the web about both frameworks and I have written a lot of source samples with both and still cannot make a decision .", "I m new to cappuccino but I m picking the language up fast .", "Following this tutorial : Parse JS SDK https : parse.com apps quickstart parse data web existing .. . .. . In my project I can t add the HTML script-tag : .. . .. . nor can I use : .. . .. . What is the correct way to import Parse", "When I create a custom object seen here : .. . .. . https : gist.github.com 800413 .. . .. . I get a parse-error any ideas", "There hasn t been much development going on in the main repo https : github.com davidcann deepDropUpload though .", "They are still under development - we re not quite there with our new site yet - but they are definitely more up to-date .", "You can learn more about good editor options in the development-environment http : www.cappuccino-project.org learn environment.html tutorial .", "Where JavaScript lacks in language OO completeness proper object-object inheritance etc it makes up for in the framework e.g .", "And since any language can be compiled to ECMAScript any compiler can be compiled to ECMAScript all you need is a compiler for the language that compiler is written in .", "It does not work well to edit Cappuccino code itself since the latest versions of Xcode don t include the necessary plugin framework .", "In the end it was deleting the contents of MyProject.xcodeproj project.xcworkspace xcuserdata that solved this .", "In general any language can be compiled to ECMAScript all you need is a compiler .", "Of course as the folks over at Cappuccino have noted before you can still use JS to program against Cappuccino proper but then you miss out on what Obj-J provides .", "That s how you create an image but you can t expect it to load immediately .", "Despite the fact that I have no experience in objective-c and I much prefer the pure-js syntax I will probably go with cappuccino on my current project and hope sproutcore comes out with a better table view in the future .", "Personally I d like to see it as an option but it really is better for sites that need standard browser functionality to use html+css instead of an app framework like Cappuccino ." ] }
{ "confidence": [ 67.42695617675781, 66.14409637451172, 63.938968658447266, 58.44759750366211, 55.837955474853516, 54.51095199584961, 52.508445739746094, 52.046443939208984, 52.046443939208984, 51.09662628173828, 50.9251708984375, 50.18012237548828, 49.45445251464844, 48.378936767578125, 48.01329040527344, 47.56651306152344, 45.847476959228516, 44.79957580566406, 44.316673278808594, 42.298255920410156 ], "content": [ "Question : I would like to write a web application using node.js and Cappuccino . I want to write the back-end in Objective-J just like the front-end . Can I use node.js with Objective-J What is needed to do this Comment : Why would you want to use Objective-J on the server : You can use javascript instead Comment : @Raynos Why not Objective-J is awesome . Comment : @Raynos why would I debug compiled Objective-J Comment : @Raynos Objective-J can be easily debugged . I don t see the problem . You don t even need to compile Objective-J before you can use it . Comment : I m making broad assumptions about Objective-J . I don t know whether you can use it with node.js but you should be able to . .. . Answer : beeing a professional Objective-J coder I can say it is definitely possible since Objective-J is fully based on JavaScript . But I also have to say that I never tried it . I think it would be a good idea to directly start a discussion in the official Objective-J Google Group : .. . .. . http : groups.google.com group objectivej", "Question : I would like to write a web application using node.js and Cappuccino . I want to write the back-end in Objective-J just like the front-end . Can I use node.js with Objective-J What is needed to do this Comment : Why would you want to use Objective-J on the server : You can use javascript instead Comment : @Raynos Why not Objective-J is awesome . Comment : @Raynos why would I debug compiled Objective-J Comment : @Raynos Objective-J can be easily debugged . I don t see the problem . You don t even need to compile Objective-J before you can use it . Comment : I m making broad assumptions about Objective-J . I don t know whether you can use it with node.js but you should be able to . .. . Answer : Check out https : bitbucket.org clbruno objj-node overview Comment : Unfortunately that link is very dead", "Question : I am iOS developer . I know just a couple of languages and I hate html because of the lack of possibilities there. . I ve just red about objective-j . When I try to open any code in web browser last versions of Safari Google Chrome it loads increadibly slow . . 1 . Is it normal 2 . How to make it work fast 3 . Are there any other languages similar to c objective-c that I can use for creating a web-site And another queastion coming with : How can I make Xcode work with objective-j I use coda 2.0 at the moment . .. . Answer : Make sure you run jake deploy to create the stripped and precompiled version of the app you re testing . Most sample code out there will be run in uncompiled debug mode which is great when you re developing but in actual deployment you ll want the precompiled version of your app . Also the current development version of Cappuccino and Objective-J is much faster than the last release 0.9.6 thanks to a new better compiler . Keep an eye out for a future Cappuccino 0.9.7 release . I think if you write a significant app in Cappuccino you ll find the load-time to be absolutely comparable with other large web apps such as Gmail . Currently you can only use Xcode to edit the user-interface of a Cappuccino app http : www.cappuccino-project.org learn xcode-basics.html . It does not work well to edit Cappuccino code itself since the latest versions of Xcode don t include the necessary plugin framework . You can learn more about good editor options in the development-environment http : www.cappuccino-project.org learn environment.html tutorial . I am not familiar with other languages similar to Objective-C for the web but Intel has an Objective-C to JavaScript compiler here http : software.intel.com en-us articles technical-reference-intel-html5-app-porter-tool-beta .", "Question : I just started developing with Cappuccino Framework and I wonder if it is possible to use native javascript code in Objective-J I just tried to implement a simply alert in Objective-J code but it doesn t work at the browser.. . .. . Answer : Objective-J is a superset of JavaScript . So native JavaScript is part of the Objective-J language . Are you sure your code is being executed", "Question : Is there any way to work on Objective-J in Windows platform Any such IDE Compiler for Objective-J for windows Is Cappuccino developed only for Windows .. . Answer : Objective-J can be developed in Windows . If you don t need to compile Cappuccino itself you should be able to just download the starter pack on http : cappuccino.org download and go from there . The jake and objjc compilers should work just fine although I haven t tested it . If you want to compile Cappuccino yourself you ll probably need to install Cygwin to get gcc its preprocessor is used . Many Cappuccino coders use the Sublime Text 2 to edit Objective-J and Cappuccino code . That editor is available for Windows and I expect the Objective-J and Cappuccino package https : github.com aparajita Cappuccino-Sublime will work just fine there . Comment : Hi I downloaded the started pack and I opened index-debug.html It worked fine with firefox I did change the code and reloaded it it worked fine but in error console it was throwing errors like main.j not well-formed . Then loaded it in Chrome it not even launched again in console there is an error like could not find file main.j and appcontroller.j . I downloaded sublime text2 again same issue . I think there is something else we need to do . please let me know . Comment : Chrome doesn t support loading web apps from file : URLs . You need to run a web server to serve the files and surf to localhost . Firefox has similar issues .", "Question : I am trying to start development in Objective-J but I am completely lost as to how to set it up . The documentation about setting it up didn t really help me . I am very familiar with web development and Objective-C so I can write the programs if I can get everything set up . Could somebody please give me step-by-step directions as to how to set it up on my shared server This little tutorial http : cappuccino.org learn tutorials getting-setup.php didn t help me out at all . Comment : Please tell us what you ve already done and what problem exactly you are facing . Comment : I don t know where to start . And once I am to get it set up I don t know how to compile the Objective-J code to JavaScript . .. . Answer : Go to the Cappuccino download http : cappuccino.org download page and download the starter package . Unzip it into a folder your choice . Congratulations you now have your first Cappuccino app ready to run If you are using Safari you can open up index-debug.html right away and start trying out the starter app . If you use other browsers like Chrome and Firefox they might not allow you to run a web app from a file : URL . Instead you ll need to start up a web server and surf to the index-debug.html file through the server . Then you can start to edit the sample application right away and explore . Once you are ready to learn more take a look at these Cappuccino tutorials http : www.cappuccino-project.org learn tutorials and instructions . They are still under development - we re not quite there with our new site yet - but they are definitely more up to-date .", "Question : Aside from the language differences Javascript vs . Objective-J what benefits does Cappuccino provide over SproutCore and vice-versa in your experiences In terms of a long-term forecast is SproutCore more supported than Cappuccino because it is backed by Apple I am trying to choose between the two . I am both familiar with JavaScript and Objective-C . Comment : maybe this should be a wiki not sure how I can convert it to one Comment : Given the age number of upvotes the protected status of the question and the popularity of the accepted answer a bounty for up to-date information seems more appropriate as a new question as the context provided in said bounty would in essence change the nature of the question and the answer . .. . Answer : From the Cappuccino website : .. . .. . On the other end of the existing frameworks are technologies like SproutCore . While SproutCore set out with similar goals to Cappuccino it takes a distincly different approach . It still relies on HTML CSS JavaScript Prototype and an entirely new and unique set of APIs . It also requires special development software and a cumbersome compilation step . We think this is the wrong approach . With Cappuccino you don t need to know HTML . You ll never write a line of CSS . You don t ever have interact with DOM . We only ask developers to learn one technology Objective-J and one set of APIs . Plus these technologies are implementations of well known and well understood existing ones . Developers can leverage decades of collective experience to really accelerate the pace of building rich web-applications . So it seems that Cappuccino does not have need any build tools and completely abstracts the browser away from the developer . Whereas in Sproutcore you get build tools a development server for example and the developer should be somewhat aware of what DOM is . Comment : To be more specific Cappuccino doesn t force you to build after every change but it does include a large set of tools designed to optimize your final release product .", "Question : My editor of choice for Objective-J Cappuccino development right now is Sublime Text 2 . Unfortunately I haven t had any luck finding an Objective-J intellisense autocomplete plugin . It seems it should be doable since Objective-J does have optional pluggable types . So I think a plugin could definitely parse the code to find the expected type of the object you re trying to autocomplete on and then look up its method list . Does anyone know of any other editors that support intellisense for Objective-J .. . Answer : They is only one intellisense plugin for vim available . You can find a little example video on youtube : http : www.youtube.com watch v lJrOcHxq6vc .. . .. . Plugin : https : github.com nanki vim-objj", "Question : My editor of choice for Objective-J Cappuccino development right now is Sublime Text 2 . Unfortunately I haven t had any luck finding an Objective-J intellisense autocomplete plugin . It seems it should be doable since Objective-J does have optional pluggable types . So I think a plugin could definitely parse the code to find the expected type of the object you re trying to autocomplete on and then look up its method list . Does anyone know of any other editors that support intellisense for Objective-J .. . Answer : For Sublime Text 2 you can try https : github.com aparajita Cappuccino-Sublime although it is not that intelli as vim-plugin . After installing you should be able to get autocompletion using Ctrl+Space .", "Question : Objective-J is compiled transformed into JavaScript directly on the browser . This is contrast to doing this on the server as GWT does for Java . Has this approach been implemented for any language other than Objective-J .. . Answer : Heres an example that compiles a ruby like language to javascript - and the compilation can be done in the browser . http : jashkenas.github.com coffee-script", "Question : Node.js web server : .. . .. . When I deploy to Heroku it fires up fine . I can view the home page fine . If I navigate to the address of the Cappuccino web app it loads the standard loading but goes no further . The error console prints : .. . .. . The server and app run fine locally just not on Heroku . I m not even sure how to begin here . I ve searched Stack Overflow and Google for similar issues but came out empty handed . Here is the HTML of the Cappuccino app : .. . .. . EDIT I uploaded the same project to another web-hosting service and experienced the same problem . What other info can I provide to help diagnose the problem .. . Answer : This was my fault . I checked in the Objective-J and other Framework directories in as symlinks . I failed to run jake deploy in the console before running the app and pushing to Heroku . Now runs correctly in both environments .", "Question : Objective-J is compiled transformed into JavaScript directly on the browser . This is contrast to doing this on the server as GWT does for Java . Has this approach been implemented for any language other than Objective-J .. . Answer : List of languages that compile to JS https : github.com jashkenas coffee-script wiki List-of-languages-that-compile-to-JS", "Question : Aside from the language differences Javascript vs . Objective-J what benefits does Cappuccino provide over SproutCore and vice-versa in your experiences In terms of a long-term forecast is SproutCore more supported than Cappuccino because it is backed by Apple I am trying to choose between the two . I am both familiar with JavaScript and Objective-C . Comment : maybe this should be a wiki not sure how I can convert it to one Comment : Given the age number of upvotes the protected status of the question and the popularity of the accepted answer a bounty for up to-date information seems more appropriate as a new question as the context provided in said bounty would in essence change the nature of the question and the answer . .. . Answer : I d like to touch on the comments made about objective-j Michael . You re not going to lose anything if you drop down to JavaScript instead of objective-j . In all actuality the distinction is kind of difficult to make especially in cases where we have toll-free bridged classes more on that in a bit . Objective-j is really just a thin wrapper over js . It provides classical inheritance something that has traditionally been implemented as a language feature which sproutcore implements as a framework feature it also provides code importing accessor generation static scoping and support for messaging nil . Objective-j instance-variables are accessible via the traditional dot syntax if you want.. . I like to think of it like this : once you start writing a method you re mostly writing JavaScript . That is loops variables functions closures etc are all just javascript . You re not losing anything by dropping down that s exactly how the language is designed . We take it a step further by toll-free bridging some of our classes CPDate CPArray CPException CPString and perhaps more that I can t recall . Toll free bridging just means a CPArray IS a native js array and a native js array is a CPArray so you can use methods and functions of both world interchangeably . So for example would could do : .. . .. . As you can see I m using objective-j syntax and js syntax together.. . You can imagine the power if this . The final thing I want to put out ther just to make sure there is no confusion : objective-j gets parsed in the browser . It doesn t need to be compiled before hand although we provide compilation tools for when you re ready to deploy your app . I think some people are needlessly put off by objective-j as-if it s some monstrous beast that will take time to learn and while objective-j adds a lot of great features to js to actually learn them won t really take you the better part of a day if you re already familiar with object oriented programming and obviously if you re coming from cocoa you ll be able to jump right in .", "Question : Objective-J is compiled transformed into JavaScript directly on the browser . This is contrast to doing this on the server as GWT does for Java . Has this approach been implemented for any language other than Objective-J .. . Answer : In addition to these lists there is an index here : http : altjs.org which has : .. . .. . New languages .. . JavaScript enhancements .. . Ports Java C Ruby etc . and more", "Question : null .. . Answer : Since valid Javascript code can be executed in Objective J how would I go about adding the Parse SDK Following this tutorial : Parse JS SDK https : parse.com apps quickstart parse data web existing .. . .. . In my project I can t add the HTML script-tag : .. . .. . nor can I use : .. . .. . What is the correct way to import Parse", "Question : Objective-J is compiled transformed into JavaScript directly on the browser . This is contrast to doing this on the server as GWT does for Java . Has this approach been implemented for any language other than Objective-J .. . Answer : The CoffeeScript http : CoffeeScript.Org compiler compiles CoffeeScript into ECMAScript . Since the CoffeeScript compiler is itself written in CoffeeScript it can compile itself to ECMAScript and thus run in the browser . The necessary bits and pieces to support script type text coffeescript elements are already included in the standard CoffeeScript compiler . In general any language can be compiled to ECMAScript all you need is a compiler . And since any language can be compiled to ECMAScript any compiler can be compiled to ECMAScript all you need is a compiler for the language that compiler is written in . This leads to a combinatorial explosion of possibilities for compiling languages within the browser . For example there is this guy who writes C compilers which target high-level languages http : ClueCC.SourceForge.Net for fun . He has a compiler that compiles C to Java Perl Common Lisp Lua or ECMAScript . So you can use that compiler to compile any other compiler written in C to ECMAScript . And most languages have some compiler somewhere which is written in C . .. . .. . Clue is written in C . Clue compiles C to ECMAScript . Ergo you can use Clue to compile Clue to ECMAScript . Then you can run Clue in the browser to compile C to ECMAScript on the fly . script type text c anyone Fun thought : node.js is written in C . Hmm .. . .. . On a more serious note : there are generally three reasons for compiling to ECMAScript : .. . .. . 1 . reuse .. . 2 . safety http : StackOverflow.Com questions 3848521 .. . 3 . expressivity .. . .. . If you simply want to reuse existing code written in a different language or existing knowlwedge in a different language then compiling interpreting on the client doesn t make much sense . The code or the coder doesn t expect to be able to use script elements anyway . This category includes stuff like GWT http : Google-Web-Toolkit.GoogleCode.Com or Volta http : Wikipedia.Org wiki Microsoft Live Labs Volta . If type- safety is your goal then compiling interpreting on the client simply doesn t work : how can you guarantee safety if you don t control the compiler That s why Ur Web http : Impredicative.Com ur Links http : Groups.Inf.Ed.Ac.Uk links Flapjax http : Flapjax-Lang.Org haXe http : haXe.Org Caja http : Google-Caja.GoogleCode.Com and such compile the code on the server . They guarantee safety either by static-typing or tight integration or both . By tight integration I mean that backend frontend and app are tightly connected by e.g . specifying data-structures once and then generating the corresponding SQL ECMAScript and HTML forms from that single-source to make sure that they all match up . It should be obvious why this requires processing on the server . The ones that focus on expressivity however expect to be used as a replacement for ECMAScript i.e . inside script elements and thus they often come with interpreters and or compilers which run on the client . CoffeeScript Objective-J http : Cappuccino.Org and Clamato http : Clamato.Net fall in this category . Comment : Wow that was.. . interesting . Pops two Tylenol . Comment : Very cool answer And I ll have to try out some CoffeeScript .", "Question : I come from a Cocoa background so I m familiar with how Objective-j should work . When I create a custom object seen here : .. . .. . https : gist.github.com 800413 .. . .. . I get a parse-error any ideas .. . Answer : My guess is the missing space between alloc and init on line 25 .", "Question : I ve some hard time to understand method signatures in Objective-J but it should be the same on Objective-C . The syntax should be : .. . .. . The type is specified between parenthesis . However I ve found the following code line : .. . .. . 1 .. . .. . Why are the parameters passed in between parenthesis I thought you specify parameters after a colon : . 2 .. . .. . what s withSpecifiedPreferences Is it the description What s the use of it thanks .. . Answer : 1 . Because CGRectMake and CGRectGetHeight are C functions not Objective-C or Objective-J methods . Parameters are passed comma-separated in parentheses for C function-calls . The result-of CGRectMake is then passed as a parameter to the initWithFrame : method of the CPView class which is an Objective-C method . 2 . As for your second question I ve not seen that method before so I can t really tell what the prefs parameter is used for.. .", "Question : Is there any way to work on Objective-J in Windows platform Any such IDE Compiler for Objective-J for windows Is Cappuccino developed only for Windows .. . Answer : I m pretty sure none of our build tools actually work on Cygwin . If they do there are a lot of hoops you have to jump through . That will be something we have to work on when we move aeverything to node.js . As for your question like Alexander said you don t need to compile it yourself.. . When you re ready to deploy Andy Linux box will run the build tools just fine .", "Question : I ve some hard time to understand method signatures in Objective-J but it should be the same on Objective-C . The syntax should be : .. . .. . The type is specified between parenthesis . However I ve found the following code line : .. . .. . 1 .. . .. . Why are the parameters passed in between parenthesis I thought you specify parameters after a colon : . 2 .. . .. . what s withSpecifiedPreferences Is it the description What s the use of it thanks .. . Answer : 1 shows a mix of two styles the Objective-C style method calls : .. . .. . and C-style function-calls : .. . .. . Objective-J is a strict super-set of JavaScript which means that you can use the message-passing syntax in addition to the C-style function-call syntax JavaScript has . In 2 withSpecifiedPreferences : is part of the methods or selectors name see Message Syntax http : developer.apple.com library mac documentation Cocoa Conceptual ObjectiveC Articles ocObjectsClasses.html apple ref doc uid TP30001163-CH11-SW6 ." ] }
[ "yes-answer-long", "yes-answer-short" ]
cappuccino
UNK_RELATION
pwnat@server@94
pwnat -- pwnat is a tool that allows any number of clients behind nats to communicate with a @placeholder behind a separate nat .
{ "confidence": [ 54.26154327392578, 53.109500885009766, 51.4444580078125, 48.7420539855957, 46.2596435546875, 40.88784408569336, 40.53017807006836, 37.36067199707031, 37.36067199707031, 35.66883850097656, 32.837669372558594, 32.658077239990234, 23.874717712402344, 23.874717712402344, 23.367069244384766, 22.688129425048828, 22.476348876953125, 22.131746292114258, 22.131746292114258, 20.4677734375, 20.4677734375, 19.87238311767578, 19.87238311767578, 18.693689346313477, 18.308753967285156, 18.308753967285156, 18.068716049194336, 17.623897552490234, 17.07037353515625, 15.789729118347168, 15.331720352172852, 13.348719596862793, 12.560853004455566, 12.560853004455566, 12.560853004455566, 12.560853004455566, 12.560853004455566, 12.560853004455566, 12.560853004455566, 12.560853004455566, 12.560853004455566, 12.560853004455566, 12.560853004455566, 12.560853004455566, 10.869019508361816, 10.869019508361816, 10.869019508361816, 10.869019508361816, 10.869019508361816, 10.869019508361816, 10.869019508361816, 10.869019508361816, 10.869019508361816, 10.869019508361816, 10.869019508361816, 10.869019508361816 ], "content": [ "Currently I am working on video-conferencing project.For this i m using pwnat http : samy.pl pwnat for nat traversing .", "I came across the following tool and it s really amazing - pwnat http : samy.pl pwnat .", "pwnat barely work nowdays .", "Given the problem above it would seem that the premise behind pwnat and ICMP holepunching is invalid and it s never supposed to work .", "Except that the identifier problem by the way the source code https : github.com samyk pwnat blob master packet.c of pwnat use 0 as the identifier of original request pwnat didn t give the right checksum of original ip header which may lead to the NAT-S dropping the TTL exceeded message if the packet can reach there .", "pwnat is based on udp tunneling.I m using the TCP connection for data transmission .", "Diagram .. . .. . Mechanics .. . .. . A quick overview of ICMP holepunching as described in pwnat http : samy.pl pwnat : .. . .. . SERVER sends ICMP Echo Request packets pings to some other host e.g .", "So is pwnat still working and if yes what could I have done wrong", "I had read the source code of pwnat and re-implementited it using go by myself .", "this may be happened because pwnat is working on udp over tcp and it is based on the concept of udp tunneling .", "So pwnat only works with basic NAT devices which rfc 1631 https : tools.ietf.org html rfc1631 describes which do simple address translation won t work with any NAPT device which has robust NAPT implementation .", "Note : I am using windows machine for testing and downloaded the windows version from the following link. . .. . .. . http : www.sumitgupta.net pwnat-windows-complied-version .. . .. . Any help please. .", "If the NAT device does not have an active mapping for the embedded packet the NAT SHOULD silently drop the ICMP Error packet .", "How is ICMP NAT traversal supposed to work if the NAT device in question rewrites outbound ICMP packets", "3.3.3.3 to open up a hole in NAT-S .", "After that the client which don t know the external query ID the code in github https : github.com samyk pwnat blob master packet.c use 0 as the identifier of original request sends an ICMP Time Exceeded packet to the server even if the packet can reach the NAPT in front of the server the NAPT can t find the related record and drop it .", "I have tried it with the two different machine behind different router but i am unable to make it work as explained in the above link .", "I need a solution for NAT traversal to transmit RDP data across the internet .", "This method will fail if your NAT router is changing the source port for outbound packets .", "When CLIENT wants to connect it sends an ICMP Time Exceeded packet to NAT-S which is supposed to get routed to SERVER .", "It means the ICMP Time Exceeded packet from the client wouldn t get through the NAT-C .", "2 . more seriously according to rfc 5508 https : tools.ietf.org html rfc5508 section-4.2.2 which says when the NAT device receives the ICMP Error packet from the Private Realm the NAT device uses the packet embedded within the ICMP Error message i.e . the IP packet from the client to the server to look up the NAT Session to which the embedded packet belongs .", "More serious according to rfc 5508 https : tools.ietf.org html rfc5508 section-4.2.2 .. . .. . when the NAT device receives the ICMP Error packet from the Private Realm the NAT device uses the packet embedded within the ICMP Error message i.e . the IP packet from the client to the server to look up the NAT Session to which the embedded packet belongs .", "Only basic NAT devices which rfc 1631 https : tools.ietf.org html rfc1631 describe which do simple address translation may work with it any NAPT device which has robust NAPT implementation won t do .", "It is not possible to diagnose this by capturing packets on the local network you need to either capture packets between your NAT router and your ISP or capture on a remote system that has a public IP address .", "Problem .. . .. . If CLIENT needs to embed the same ICMP Echo Request packet as it left NAT-S in its ICMP Time Exceeded reply it must know the packet s query ID .", "If you send 16384 bytes you will eventually receieve those 16384 bytes - but you might recieve them in any number of chunks of any size .", "Try capturing the traffic seen by both machines using wireshark or a similar tool then posting it here .", ".. . .. . According to RFC 3022 Section 2.2 https : tools.ietf.org html rfc3022 section-2.2 when NAT-S encounters the outbound ICMP Echo Request it rewrites the packet s query ID field to a unique external query ID so that it can route future ICMP Echo Replies with the same query ID to SERVER .", ".. . I assume you know how does it work : the server sends ICMP echo request packets to the fixed address 3.3.3.3 where no replies won t be returned from the client pretending to be a hop on the Internet sends an ICMP Time Exceeded packet to the server expect the NAT in the front of the server to forward the ICMP time exceeded message to the server .", "Any kind of help will be appriciated .", "It would be my guess that tunneling TCP with UDP would defeat the point of using TCP and eliminate the possibility of any real sequential protocol but that is just a guess .", "It would be very helpful for me .", "It s hard to diagnose the problem without seeing the traffic being sent .", "No .", "It won t work nowdays mainly because 2 resons below : .. . .. . 1 .", "When the server sends ICMP echo request packets to the fixed address according to RFC 3022 https : tools.ietf.org html rfc3022 section-2.2 the identifier field in ICMP echo request header will be uniquely mapped to a query identifier of the registered IP address to a unique external query ID by the NAPT so that it can route future ICMP Echo Replies with the same query ID to the sender so ICMP header in ICMP Query packets must be modified to replace the query ID and ICMP header checksum .", "It means the ICMP Time Exceeded packet from the client wouldn t arrive at the NAPT in front of the server .", "For said routing to work CLIENT constructs the ICMP Time Exceeded packet by embedding within it the same packet ICMP Echo to 3.3.3.3 it expects SERVER to be sending in the first place .", "But how does it know this query ID", "Am I missing something here", "Thanks in advance :", "You re correct about the query ID .", "I happened to know this icmp punching thing years ago and interested in this idea .", "My problem is that when i send a packet it does not reach properly at its destination side .", "Sometime it drops the packet and many times it breaks split the packet into pieces .", "Please Help me . . .. . .. . How can i send and recieve a packet into single piece .", "So i can draw image properly and play sound .", "Thanks in advance", "TCP has no concept of packets .", "A TCP stream is a continuous stream of bytes - if you want a structure within that stream of bytes you have to impose it yourself by implementing some kind of framing mechanism .", "A simple one is the length prefix - when sending an application-level frame you first send the length of the frame then the data .", "Thanks for reply I don t know much about networking becoz m new in n w programming.By review my log files.I found that before send data data length is 16384 bytes and at recieving end stream length is 11300 and next stream of 5084 bytes.But sometime it recieve full length data of 16384 bytes .", "@SR Dusad : TCP does not have an concept of individual messages within a stream .", "Your application has to handle that .", "Thanks caf : your answer help me a lot for understanding the concept" ] }
{ "confidence": [ 73.18170928955078, 72.84288787841797, 60.09187698364258 ], "content": [ "Question : How is ICMP NAT traversal supposed to work if the NAT device in question rewrites outbound ICMP packets Diagram .. . .. . Mechanics .. . .. . A quick overview of ICMP holepunching as described in pwnat http : samy.pl pwnat : .. . .. . SERVER sends ICMP Echo Request packets pings to some other host e.g . 3.3.3.3 to open up a hole in NAT-S . When CLIENT wants to connect it sends an ICMP Time Exceeded packet to NAT-S which is supposed to get routed to SERVER . For said routing to work CLIENT constructs the ICMP Time Exceeded packet by embedding within it the same packet ICMP Echo to 3.3.3.3 it expects SERVER to be sending in the first place . Problem .. . .. . If CLIENT needs to embed the same ICMP Echo Request packet as it left NAT-S in its ICMP Time Exceeded reply it must know the packet s query ID . But how does it know this query ID .. . .. . According to RFC 3022 Section 2.2 https : tools.ietf.org html rfc3022 section-2.2 when NAT-S encounters the outbound ICMP Echo Request it rewrites the packet s query ID field to a unique external query ID so that it can route future ICMP Echo Replies with the same query ID to SERVER . Given the problem above it would seem that the premise behind pwnat and ICMP holepunching is invalid and it s never supposed to work . Am I missing something here Thanks in advance : .. . Answer : You re correct about the query ID . pwnat barely work nowdays . I happened to know this icmp punching thing years ago and interested in this idea . I had read the source code of pwnat and re-implementited it using go by myself . Only basic NAT devices which rfc 1631 https : tools.ietf.org html rfc1631 describe which do simple address translation may work with it any NAPT device which has robust NAPT implementation won t do . Except that the identifier problem by the way the source code https : github.com samyk pwnat blob master packet.c of pwnat use 0 as the identifier of original request pwnat didn t give the right checksum of original ip header which may lead to the NAT-S dropping the TTL exceeded message if the packet can reach there . More serious according to rfc 5508 https : tools.ietf.org html rfc5508 section-4.2.2 .. . .. . when the NAT device receives the ICMP Error packet from the Private Realm the NAT device uses the packet embedded within the ICMP Error message i.e . the IP packet from the client to the server to look up the NAT Session to which the embedded packet belongs . If the NAT device does not have an active mapping for the embedded packet the NAT SHOULD silently drop the ICMP Error packet . It means the ICMP Time Exceeded packet from the client wouldn t get through the NAT-C .", "Question : I need a solution for NAT traversal to transmit RDP data across the internet . I came across the following tool and it s really amazing - pwnat http : samy.pl pwnat . I have tried it with the two different machine behind different router but i am unable to make it work as explained in the above link . So is pwnat still working and if yes what could I have done wrong It would be very helpful for me . Note : I am using windows machine for testing and downloaded the windows version from the following link. . .. . .. . http : www.sumitgupta.net pwnat-windows-complied-version .. . .. . Any help please. . Comment : It s hard to diagnose the problem without seeing the traffic being sent . Try capturing the traffic seen by both machines using wireshark or a similar tool then posting it here . Comment : This method will fail if your NAT router is changing the source port for outbound packets . It is not possible to diagnose this by capturing packets on the local network you need to either capture packets between your NAT router and your ISP or capture on a remote system that has a public IP address . .. . Answer : No . .. . I assume you know how does it work : the server sends ICMP echo request packets to the fixed address 3.3.3.3 where no replies won t be returned from the client pretending to be a hop on the Internet sends an ICMP Time Exceeded packet to the server expect the NAT in the front of the server to forward the ICMP time exceeded message to the server . It won t work nowdays mainly because 2 resons below : .. . .. . 1 . When the server sends ICMP echo request packets to the fixed address according to RFC 3022 https : tools.ietf.org html rfc3022 section-2.2 the identifier field in ICMP echo request header will be uniquely mapped to a query identifier of the registered IP address to a unique external query ID by the NAPT so that it can route future ICMP Echo Replies with the same query ID to the sender so ICMP header in ICMP Query packets must be modified to replace the query ID and ICMP header checksum . After that the client which don t know the external query ID the code in github https : github.com samyk pwnat blob master packet.c use 0 as the identifier of original request sends an ICMP Time Exceeded packet to the server even if the packet can reach the NAPT in front of the server the NAPT can t find the related record and drop it . 2 . more seriously according to rfc 5508 https : tools.ietf.org html rfc5508 section-4.2.2 which says when the NAT device receives the ICMP Error packet from the Private Realm the NAT device uses the packet embedded within the ICMP Error message i.e . the IP packet from the client to the server to look up the NAT Session to which the embedded packet belongs . If the NAT device does not have an active mapping for the embedded packet the NAT SHOULD silently drop the ICMP Error packet . It means the ICMP Time Exceeded packet from the client wouldn t arrive at the NAPT in front of the server . So pwnat only works with basic NAT devices which rfc 1631 https : tools.ietf.org html rfc1631 describes which do simple address translation won t work with any NAPT device which has robust NAPT implementation .", "Question : Currently I am working on video-conferencing project.For this i m using pwnat http : samy.pl pwnat for nat traversing . pwnat is based on udp tunneling.I m using the TCP connection for data transmission . My problem is that when i send a packet it does not reach properly at its destination side . Sometime it drops the packet and many times it breaks split the packet into pieces . Please Help me . . .. . .. . How can i send and recieve a packet into single piece . So i can draw image properly and play sound . Any kind of help will be appriciated . Thanks in advance Comment : It would be my guess that tunneling TCP with UDP would defeat the point of using TCP and eliminate the possibility of any real sequential protocol but that is just a guess . .. . Answer : TCP has no concept of packets . A TCP stream is a continuous stream of bytes - if you want a structure within that stream of bytes you have to impose it yourself by implementing some kind of framing mechanism . A simple one is the length prefix - when sending an application-level frame you first send the length of the frame then the data . Comment : Thanks for reply I don t know much about networking becoz m new in n w programming.By review my log files.I found that before send data data length is 16384 bytes and at recieving end stream length is 11300 and next stream of 5084 bytes.But sometime it recieve full length data of 16384 bytes . this may be happened because pwnat is working on udp over tcp and it is based on the concept of udp tunneling . Comment : @SR Dusad : TCP does not have an concept of individual messages within a stream . If you send 16384 bytes you will eventually receieve those 16384 bytes - but you might recieve them in any number of chunks of any size . Your application has to handle that . Comment : Thanks caf : your answer help me a lot for understanding the concept" ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
igmp@ip@133
igmp -- question related to igmp internet group management protocol a communications protocol used by hosts and adjacent routers on @placeholder networks to establish multicast group memberships .
{ "confidence": [ 59.536903381347656, 58.587562561035156, 48.942527770996094, 46.9360466003418, 45.89176940917969, 45.636451721191406, 44.91257858276367, 44.78238296508789, 44.716835021972656, 43.4112548828125, 42.26560974121094, 42.120155334472656, 41.63589859008789, 41.562652587890625, 41.206939697265625, 41.206939697265625, 41.08530044555664, 40.860504150390625, 40.860504150390625, 40.860504150390625, 40.69802474975586, 40.47492599487305, 39.330589294433594, 39.330589294433594, 39.330589294433594, 38.61310577392578, 38.59003829956055, 38.59003829956055, 38.56510925292969, 38.24360275268555, 38.24360275268555, 38.124149322509766, 37.5363655090332, 37.5363655090332, 37.5363655090332, 37.5363655090332, 37.5363655090332, 37.066436767578125, 37.066436767578125, 36.925811767578125, 36.43859100341797, 36.33207702636719, 36.22038650512695, 35.634361267089844, 35.33224868774414, 34.919464111328125, 34.919464111328125, 34.919464111328125, 34.852989196777344, 33.793540954589844, 33.17232894897461, 33.16111373901367, 33.106929779052734, 33.106929779052734, 33.05876922607422, 33.05876922607422, 33.05876922607422, 33.05876922607422, 33.05876922607422, 33.05876922607422, 33.05876922607422, 33.05876922607422, 33.05876922607422, 33.05876922607422, 33.05876922607422, 33.05876922607422, 32.98572540283203, 32.6470947265625, 32.076866149902344, 31.982030868530273, 31.86846923828125, 31.86846923828125, 31.86846923828125, 31.86846923828125, 31.86846923828125, 30.745952606201172, 30.441864013671875, 30.441864013671875, 30.441864013671875, 30.441864013671875, 30.441864013671875, 30.31838035583496, 30.282642364501953, 30.282642364501953, 30.282642364501953, 29.128082275390625, 29.04327392578125, 29.04327392578125, 28.86823081970215, 28.72805404663086, 27.89981460571289, 27.89981460571289, 27.89981460571289, 27.726905822753906, 27.714813232421875, 27.70147705078125, 27.665740966796875, 26.73113250732422, 25.722633361816406, 25.234275817871094 ], "content": [ "To join the multicast group I use this code : .. . .. . The line that generates the IGMP Join message is .. . .. . And the IGMP Join message is sent out .", "which protocol will send the IGMP join to the next router", "On those 4 devices it seems the app does not send the IGMP request to join the multicast group .", "Is IGMP even on the Transport Layer", "Are you saying hosts do not send IGMP membership reports", "Which IGMP version is being used by the underlying socket", "If your linux box is receiving igmp v2 membership queries from an upstream igmp router then I believe that the default linux behavior as mandated by the igmp v3 rfc is to use only igmp v2 for reports .", "No IGMP request is send by the device and of course no multicast traffic is received .", "The RFC 3376 states : .. . .. . IGMP messages are encapsulated in IPv4 datagrams with an IP protocol number of 2 .", "Seems I don t actually join my receiver to the igmp group although the joining process looks fine .", "I have some questions related to this as I m not really an IGMP routing expert .", "It is IGMP version 2 that I want . .. . .. . I have looked at all of the sysctl net.ipv4 options and though some are related to IGMP none allow me to set the IGMP version .", "select from table where SourceIP in select DestIP from table where Protocol IGMP .. . .. . This assumes the if a IGMP record exist then a UDP would also have to exist .", "Here is an screenshot of the IGMP communications on any interface of my server : .. . .. . http : img521.imageshack.us img521 9953 capture10y.png .. . .. . As we can see my server first send 2 IGMP joins but a few minutes after when the switch send IGMP query nobody answers .", "Is it possible that while IGMP join or leave is updating forwarding tables in the nic it simply stops forwarding all multicast traffic at that moment", "After a few minutes IGMP snooping on the switch runs into a timeout and kicks my app from its multicast table .", "The javadoc for MulticastChannel states It may optionally support source filtering as specified by RFC 3376 : Internet Group Management Protocol Version 3 IGMPv3 .", "Is there a straightforward way to force this software onto IGMP V2", "I built a library for doing IGMP stuff .", "IGMP does exactly the same thing at a lower level .", "In order to join a multicast group I am accustomed to having seeing code like this : .. . .. . Now I am running into an issue where someone is telling me this is a v2 igmp join request and that they require v3 .", "The version of the IGMP protocol set for the concerned interface is V2 : .. . .. . The rp filter is disabled on this interface : .. . .. . Thanks a lot for any help you could give me .", "Can I send out IGMP packets with a PHP script", "That would trigger the operating-system to generate an IGMP join packet .", "If IGMP proxy and PIM enabled in the same router what will be the behavior .", "EDIT 2 : There is a related question http : stackoverflow.com questions 27917605 android-multicastsocket-joingroup-doesnt-trigger-sending-igmp-message .", "There is no proc net igmp available exactly on those devices that can not receive the multicast traffic .", "I am working on an application that makes uses of multicast facilities and one of the four machines is runniung IGMP version 3 .", "Upon using wireshark and looking at the IGMP traffic I see that sometimes there is no IGMP membership report sent when the router has sent out a general IGMP query .", "Does the Linux kernel need recompile for IGMP support", "The other machines are running IGMP version 2 .", "Your problem could be this.. . Every IGMP packet must have an IP TTL 1 that means that IGMP will never cross a routed boundary such as a vlan .", "I beleive that you can set it to 3 to force it use igmp v3 .", "Yes setting the force to 3 does cause the server to use igmp v3 .", "I can t see why someone would require IGMP V3 either .", "What do you mean by why someone require IGMP", "On wireshark I m getting all the frames that I want including IGMP and ICMP", "INADDR ANY is not a multicast group it is strictly a bind-address .", "Join multicast group create and bind pcb 4 .", "I am looking for a c c++ test that works as IGMP raw socket query generator or how can I add a synthetic test that works IGMP query generator I found a perl igmp query generator http : www.coexsi.fr publications igmp-querier igmp-querier.pl but actually I don t have an idea how to test that or what is the purpose of this", "As a result when I open my multicast socket I start receiving multicast data until my IGMP subscription timeout since the server doesn t renew its subscription .", "If the hosts cannot send membership reports assume it s IGMP one how could the bridges know whether there is any receiver in a LAN segment", "All machines and routers on the same LAN that listen to the same multicast group will receive that packet .", "From RFC 2236 - IGMP Version 2 http : tools.ietf.org rfc rfc2236 page-1 : .. . .. . This means you can t be anywhere and see IGMP you should check to be sure that your IGMP receiver above is on the same IP subnet as the sender http : www.subnet-calculator.com .", "On a related note I don t really have an IGMP v3 implementation so to speak .", "That s also why proc net igmp is not available on the affected devices .", "Anyone worked on IGMP Multicasting can throw me some light .", "So it seems sysctl is not the way one sets the IGMP version .", "I have sniffed an IGMP packet and now I would like to send it with the help of python .", "IP multicast is receiver driven design the receivers must indicate their interests in some multicast group .", "I am using a centos 6.3 server to subscribe to UDP multicast data and I noticed that my server doesn t answer to the IGMP queries sent by the switch it is connected to .", "This sheet has UDP TCP ICMP IGMP and PIM type protocols we re trying to strip all those out and keep only addresses with communication on both UDP and IGMP inclusively .", "I need to take out common IP addresses that have two specific protocols UDP and IGMP and filter out all other IP addresses that only have one associated protocol .", "One method is to use window-functions : .. . .. . EDIT : .. . .. . If you only want exactly those protocols : .. . .. . If you just want to filter the protocols then add where protocol in UDP IGMP .", "However the other thing to be aware of is that the behavior of the igmp stack is determined by the environment that it finds itself in .", "only the IGMP header payload so i m using the setsockopt to edit the IP options .", "IGMP membership requests are sent after a IP ADD MEMBERSHIP is done and the Kernel takes charge of setting the IP ROUTER ALERT flag .", "I m trying to use this software on a network that for technical reasons can only use IGMP Version 2 .", "Promiscuous mode off packets missing in capture around IGMP join and leave requests and sequence gaps reported by server .", "Now I am running into an issue where someone is telling me this is a v2 igmp join request and that they require v3 .", "Using IPv4 on Win 7 x64 Dev machine and in future on Win Server 2012 production IGMP-Version should be v2 .", "I don t get IGMP frames although I m getting them when using wireshark .", "I tried also to use : .. . .. . but I was capable of getting only ICMP frames and not IGMP ones .", "Here is the whole code : .. . .. . Please note that the address mac that I m initializing is the address that I get from IGMP frame on wireshark .", "However I want to ask if I m seeing IGMP frame on wireshark doesn t that mean that it s not filtered by the firewall", "you can trace the wireshark process but again wireshark receives ALL frames IGMP or not which is probably not what you want", "I m trying to connect to a multicast group to receive some UDP packets .", "When you join a multicast group the netif- igmp mac filter callback is typically called to configure a MAC filter in your Ethernet controller to accept packets with the multicast MAC address corresponding to the group .", "Traditionally you would use the socket option IP ADD MEMBERSHIP and the corresponding IP DROP MEMBERSHIP to join a multicast group .", "Assuming all IGMP join messages are always sent to every station on the network shouldn t it be possible to monitor which stations are members of which multicast groups doing something like this posix socket c++ code :", "I m trying to sniff all IGMP messages on the local network for crazy reasons not to be discussed - .", "Now does anyone know if it s guaranteed that every IGMP join is spread out on the entire local network", "You also might check to see whether your machine is receiving IGMP with tshark or wireshark .. .", "But from what I understand the IGMP messages should arrive at all machines on the same subnet", "However as I snoop the network with Wireshark I see that the IGMP message has a bad checksum", "Since send call cannot be used for raw socket bcos it is connectionless and the same reason for IGMP packet I am still using sendto .", "So how do I know if I should send an IGMP v1 or v2 or v3", "I have an error from the following scenario with IGMP socket call .. . .. . the sendto call fails saying Message too long .", "In fact the output of sysctl net.ipv4 on the machine running IGMP version 3 is identical to that of the other three machines .", "Would somebobdy in the know mind sharing how I can configure this machine I have to run at IGMP version 2", "It looks like you can force IGMP version 2 by executing sysctl -w net.ipv4.conf.all.force igmp version 2 .", "In IPv4 Version 3 of IGMP adds support for source filtering that is the ability for a system to report interest in receiving packets only from specific source addresses .", "We have a C application that can join and receives data from a multicast group .", "We now want to support IGMPv3 and be able to specify the IP of the source when joining a multicast group .", "At the moment it isn t any kind of a valid join request as it doesn t specify a valid multicast group .", "Care to take a guess at why the C++ code posted never detects IGMP messages send from machines other than itself", "I noticed that the IP header had no port assigned but did have MAC addresses specified which led me to believe that IGMP was not on the Transport Layer but rather on the Network Layer .", "You probably could use some command-line tool like nemesis-igmp from Nemesis project http : sourceforge.net project shownotes.php release id 273337 to do it .", "I know I can read IGMP from a raw socket and I know you can use Wireshark to monitor the IGMP messages that reach your local computer but what puzzles me is this : .. . .. . I use a program on another computer separated from the one running Wireshark by a switch which will join a multicast address - BUT - it s not always that I even see the Membership report JOIN in Wireshark .", "I m runnning multicast on a Windows 2008 R2 server and see an intermittent problem with the router turning off multicast for a group I ve joined .", "Our application is using the following code to join the multicast group : .. . .. . Is there something extra that we need to include in the source program to force IGMPv3", "When I set Active : true I can see the Multicast Group Request in Wireshark and my managed switch forwards multicasts to my app .", "I also have hardware units connected to my local network which send these group reports periodically for themselves and so they stay in the switches multicast list .", "For example if 2 hosts are connected to a router and they want to listen same multicast server .. . .. . There is no such thing as a multicast server .", "Socket binding is ignored such packets are only filtered by protocol .", "enter image description here http : i.stack.imgur.com QlNHL.jpg .. . .. . It returns the IP server that has BOTH UDP and IGMP and NOT the server that only has UDP .", "All the router knows is that there is at least one member of the multicast group on its inside network so it propagages the packet to that network .", "I thought I could use IGMP Snooping for this since I found a comment starting from 2.6.34 the kernel has IGMP snooping feature for the software bridges disabled by default in OpenWrt http : wiki.openwrt.org doc howto udp multicast and my kernel is 3.6.11 running r34761 but I can t find anywhere that explains how to turn this feature on .", "For example if 2 hosts are connected to a router and they want to listen same multicast server which one of the 2 gets the multicast packet first", "I tried to replace it with AF INET but now python tells me that that protocol 0x8100 is not supported ." ] }
{ "confidence": [ 79.4112777709961, 79.4112777709961, 77.9999771118164, 74.68035125732422, 71.98126220703125, 71.94432067871094, 71.1587905883789, 70.06159973144531, 65.29096984863281, 65.24812316894531, 64.68144989013672, 64.60820007324219, 60.877784729003906, 60.807777404785156, 60.360496520996094, 60.12765121459961, 59.66450500488281, 58.835418701171875, 58.03364944458008, 57.842140197753906 ], "content": [ "Question : I am using a centos 6.3 server to subscribe to UDP multicast data and I noticed that my server doesn t answer to the IGMP queries sent by the switch it is connected to . As a result when I open my multicast socket I start receiving multicast data until my IGMP subscription timeout since the server doesn t renew its subscription . To insure that the problem doesn t comes from any code of mine I am simply using smcroute to open multicast subscriptions .. . .. . I search online for a while and none of the tips I found helped me to fix this problem . Here is an screenshot of the IGMP communications on any interface of my server : .. . .. . http : img521.imageshack.us img521 9953 capture10y.png .. . .. . As we can see my server first send 2 IGMP joins but a few minutes after when the switch send IGMP query nobody answers . The version of the IGMP protocol set for the concerned interface is V2 : .. . .. . The rp filter is disabled on this interface : .. . .. . Thanks a lot for any help you could give me . Best .. . .. . Laurent .. . Answer : It might be coming from asymmetric route rules . DO you have a rule to reach 170.19.52.5 from your server you can use route -n Comment : I manage to reach this IP from the server whithout any problems", "Question : I am using a centos 6.3 server to subscribe to UDP multicast data and I noticed that my server doesn t answer to the IGMP queries sent by the switch it is connected to . As a result when I open my multicast socket I start receiving multicast data until my IGMP subscription timeout since the server doesn t renew its subscription . To insure that the problem doesn t comes from any code of mine I am simply using smcroute to open multicast subscriptions .. . .. . I search online for a while and none of the tips I found helped me to fix this problem . Here is an screenshot of the IGMP communications on any interface of my server : .. . .. . http : img521.imageshack.us img521 9953 capture10y.png .. . .. . As we can see my server first send 2 IGMP joins but a few minutes after when the switch send IGMP query nobody answers . The version of the IGMP protocol set for the concerned interface is V2 : .. . .. . The rp filter is disabled on this interface : .. . .. . Thanks a lot for any help you could give me . Best .. . .. . Laurent .. . Answer : Try to temporary disable iptables : .. . .. . and see if it will help . Comment : I tried but it didn t changed anything.. .", "Question : In order to join a multicast group I am accustomed to having seeing code like this : .. . .. . Now I am running into an issue where someone is telling me this is a v2 igmp join request and that they require v3 . Is this something that needs to be addressed in the code above or is it a hardware network os issue on the host running code like the above What steps can I take to correct the above code if it is mistaken .. . Answer : Now I am running into an issue where someone is telling me this is a v2 igmp join request and that they require v3 . At the moment it isn t any kind of a valid join request as it doesn t specify a valid multicast group . INADDR ANY is not a multicast group it is strictly a bind-address . Multicast groups start at 224.0.0.0 but make sure you pick one that is legal for this use and available . Whether the protocol engaged in when you get this right is V2 or V3 isn t affected by this code : it depends on what the UDP protocol stack does when you call it . You don t have any control over that . I can t see why someone would require IGMP V3 either . Comment : What do you mean by why someone require IGMP Is V2 supposed to always work where V3 does Comment : I mean whatever you meant when you wrote it . It s meaningless to me . The application can t decide whether to use V2 or V3 when joining and the sending application can t detect it either . Unless you re running on some peculiar host that supports IGMPv3 and not IGMPv2 it shouldn t make the slightest difference to anybody .", "Question : null .. . Answer : My device wants to subscribe to 239.255.255.250 SSDP and 224.0.0.251 Bonjour as soon as it joins a Network . As per my understanding I have to send a join group request to 239.255.255.250 if it is IGMPv1 2 Network 224.0.0.22 if it is IGMPv3 . On Wireshark I find that the Host Membership query arrives after 5-6 seconds . I would like to send out the join group request beforehand to facilitate faster discovery . So how do I know if I should send an IGMP v1 or v2 or v3 On a related note I don t really have an IGMP v3 implementation so to speak . Is it sufficient if I send my interested multicast address to 224.0.0.22 I will do this on a join group and IGMPv3 Host Membership query . Apart from this I will manage the timers based on the RFC spec . This is mainly to work with IGMPv3 only routers . Kindly advise thank you in advance :", "Question : null .. . Answer : I m writing an app which uses the Indy Multicast Client from Delphi XE5 . When I set Active : true I can see the Multicast Group Request in Wireshark and my managed switch forwards multicasts to my app . But this request is only sent on startup . After a few minutes IGMP snooping on the switch runs into a timeout and kicks my app from its multicast table . I also have hardware units connected to my local network which send these group reports periodically for themselves and so they stay in the switches multicast list . How can I sent group requests periodically with Indy I tried : .. . .. . But that throws me an exception Error 10022 Invalid Argument . Comment : Which IPVersion are you using - IPv4 or IPv6 Which OS and version is your client running on Which IGMP version is being used by the underlying socket Comment : Using IPv4 on Win 7 x64 Dev machine and in future on Win Server 2012 production IGMP-Version should be v2 . My hardware module on the other end sends a simple IGMPv2 Membership Report Type 0x16 periodically to the network and my switch holds this device in its multicast tables .", "Question : It seems multicast reception does not work on some Android devices . I can not receive multicast with 4 out of 13 test devices . On those 4 devices it seems the app does not send the IGMP request to join the multicast group . The code to receive the multicast looks like so : .. . .. . The app has the following permissions : .. . .. . To demonstrate the problem I created a little test project using the above code on GitHub : MulticastTest https : github.com polaris MulticastTest . Is there a problem with my code Do I miss a permission EDIT 1 : This problem does not seem to relate to a specific Android version . I can reproduce the behaviour on Android 4.x 5.x and 6.x . EDIT 2 : There is a related question http : stackoverflow.com questions 27917605 android-multicastsocket-joingroup-doesnt-trigger-sending-igmp-message . .. . Answer : Bad news : This seems to be related to the affected devices . There is no proc net igmp available exactly on those devices that can not receive the multicast traffic . As already expected this very likely leads to the missing join group request IP ADD MEMBERSHIP . We tried with the Android Java API BSD sockets and Boost.Asio . Same result with all three options . We verified the problem with an app called Multicast Tester https : apkpure.com multicast-tester net.liveforcode.multicasttester . This app has the same problem on the same devices as our app . No IGMP request is send by the device and of course no multicast traffic is received . There are some open and closed with statuses Obsolete and WrongForum issues https : code.google.com p android issues list can 1 q igmp colspec ID 20Status 20Priority 20Owner 20Summary 20Stars 20Reporter 20Opened cells tiles in the Android issue tracker . I think the closed issues are marked as Obsolete WrongForum because it is not a problem in Android but specific to the affected devices setup . It seems the kernel on the affected devices was built with .. . .. . in the kernel configuration http : www.tldp.org HOWTO Multicast-HOWTO-7.html file . That s also why proc net igmp is not available on the affected devices . It obviously is only created when CONFIG IP MULTICAST is set as can be seen in the Linux kernel code http : lxr.free-electrons.com source net ipv4 ip output.c L1608 .", "Question : this is a homework question . I tried almost a week for finding a solution for this problem . The problem is as follows .. . .. . Consider doing a multicast in an Extended Ethernet LAN multiple Ethernet LAN segments connected via bridges . Assume that hosts do not send Ethernet membership reports which we discussed in class . However the bridges not the hosts can have their software configured as we please . Assume want to implement IPv4 multicasting on that LAN . How would you modify the bridges to allow efficient multicasting I.e . bridges forward IP multicast packets only to the LAN segments where there are receivers and it should involve the least amount of processing at the bridges . Thanks in advance .. . Answer : Are you saying hosts do not send IGMP membership reports As I ve never heard Ethernet membership reports. . .. . .. . And I m confused by the requirements . If the hosts cannot send membership reports assume it s IGMP one how could the bridges know whether there is any receiver in a LAN segment IP multicast is receiver driven design the receivers must indicate their interests in some multicast group .", "Question : I m trying to connect to a multicast group to receive some UDP packets . The code I m using is working good I m receiving the packets and I haven t had a problem with this before . But just now there is a new requirement that needs the packets to pass-through a switch which needs to see the Multicast join message . Before it has just been dumb switches and this hasn t been a problem . To join the multicast group I use this code : .. . .. . The line that generates the IGMP Join message is .. . .. . And the IGMP Join message is sent out . However as I snoop the network with Wireshark I see that the IGMP message has a bad checksum http : i.imgur.com 6Ct52QG.png http : i.stack.imgur.com Vwr0V.png .. . .. . Is this a problem with my code or the input Or is there something else .. . Answer : That s expected with modern network cards that do checksumming in hardware . Don t worry about this .", "Question : We ve run into a thorny problem . We are writing a c++ program that receives multicast UDP traffic . We re in the process of moving our applications to a different network environment and our operations team has requested that we support IGMPv3 membership announcements from our applications . Initial investigations indicate that Linux 2.6 kernels do support IGMPv3 . Therefore I m puzzled that when we run tcpdump we see the following output traces : .. . .. . My understanding is that one could force the kernel to use a lower version of IGMP by specifying a non-zero value in the file proc sys net ipv4 conf eth1.22 force igmp version however I ve confirmed that the file has a zero value configuration . Our application is using the following code to join the multicast group : .. . .. . Is there something extra that we need to include in the source program to force IGMPv3 .. . Answer : Couple of things to be aware of . The first is that as I understand it setting the proc sys net ipv4 conf eth1.22 force igmp version to 0 doesn t mean use v3 but actually sets it to auto . I beleive that you can set it to 3 to force it use igmp v3 . However the other thing to be aware of is that the behavior of the igmp stack is determined by the environment that it finds itself in . If your linux box is receiving igmp v2 membership queries from an upstream igmp router then I believe that the default linux behavior as mandated by the igmp v3 rfc is to use only igmp v2 for reports . As I understand it when you set proc sys net ipv4 conf eth1.22 force igmp version to 0 it uses this behavior . Comment : Interesting . Yes setting the force to 3 does cause the server to use igmp v3 . Therefore I believe the next step is to make sure the network is using igmpv3 . Thanks", "Question : null .. . Answer : If IGMP proxy and PIM enabled in the same router what will be the behavior . which protocol will send the IGMP join to the next router", "Question : null .. . Answer : I m runnning multicast on a Windows 2008 R2 server and see an intermittent problem with the router turning off multicast for a group I ve joined . Upon using wireshark and looking at the IGMP traffic I see that sometimes there is no IGMP membership report sent when the router has sent out a general IGMP query . For example if I ve joined 4 groups sometimes I see responses from all four sometimes three sometimes two . I set the expiry time to 300 seconds in the router to in theory compensate for this which hasn t always guaranteed success . When the router stops a feed it restarts it after 120 seconds which for the data I m reading is too large of a gap to try to fill . Is this something that can be fixed This doesn t seem like normal behaviour . Any help would be appreciated .", "Question : Can I send out IGMP packets with a PHP script Is IGMP even on the Transport Layer I was looking at some JOIN packets that are destined for 224.0.0.251 . I noticed that the IP header had no port assigned but did have MAC addresses specified which led me to believe that IGMP was not on the Transport Layer but rather on the Network Layer . hopefully I said that right .. . .. . Can someone clarify this for me I m just trying to send out a JOIN packet . I was reading through rfc3376 to try and find the answer but it just shows how to construct one . On trying to do so I just get a malformed packet . .. . Answer : Traditionally you would use the socket option IP ADD MEMBERSHIP and the corresponding IP DROP MEMBERSHIP to join a multicast group . That would trigger the operating-system to generate an IGMP join packet . These options are set using the IPPROTO IP level to setsockopt http : linux.die.net man 3 setsockopt .. . .. . According to this http : bugs.php.net bug.php id 40510 issue on the bugs.php.net site these options are not available by default . However there is a patch listed on that page that should add them to your php installation .", "Question : I m new to lwip and I want to create a multicast receiver with lwip . My steps are as follow : 1 . Enable LWIP IGMP 2 . Set NETIF FLAG IGMP in low-level init 3 . Join multicast group create and bind pcb 4 . udp connect to remote ip or multicast IP address Both are tried but failed .. . .. . Joining group returns success and everything looks fine when program executing this . However the multicast receiver doesn t work no multicast data comes into network-interface . Seems I don t actually join my receiver to the igmp group although the joining process looks fine . Does any one know what I m missing I found netif- igmp mac filter NULL in igmp joingroup but this callback is set as NULL and not implemented . Do I need to implement it by myself to set the MAC filter or it is OK just leave it as NULL Thanks a lot for your help Ryan .. . Answer : When you join a multicast group the netif- igmp mac filter callback is typically called to configure a MAC filter in your Ethernet controller to accept packets with the multicast MAC address corresponding to the group . So depending on the Ethernet H W that you are using you may need to implement the callback .", "Question : I m trying to sniff all IGMP messages on the local network for crazy reasons not to be discussed - . I have some questions related to this as I m not really an IGMP routing expert . Is it even possible I know I can read IGMP from a raw socket and I know you can use Wireshark to monitor the IGMP messages that reach your local computer but what puzzles me is this : .. . .. . I use a program on another computer separated from the one running Wireshark by a switch which will join a multicast address - BUT - it s not always that I even see the Membership report JOIN in Wireshark . Now does anyone know if it s guaranteed that every IGMP join is spread out on the entire local network Sometimes I see the join in Wireshark sometimes I don t . Assuming all IGMP join messages are always sent to every station on the network shouldn t it be possible to monitor which stations are members of which multicast groups doing something like this posix socket c++ code : .. . Answer : Your problem could be this.. . Every IGMP packet must have an IP TTL 1 that means that IGMP will never cross a routed boundary such as a vlan . From RFC 2236 - IGMP Version 2 http : tools.ietf.org rfc rfc2236 page-1 : .. . .. . This means you can t be anywhere and see IGMP you should check to be sure that your IGMP receiver above is on the same IP subnet as the sender http : www.subnet-calculator.com . You also might check to see whether your machine is receiving IGMP with tshark or wireshark .. . Comment : I m pretty sure both machines are on the same subnet they both have 192.168.1 . addresses . But from what I understand the IGMP messages should arrive at all machines on the same subnet Care to take a guess at why the C++ code posted never detects IGMP messages send from machines other than itself Comment : @Vanvid I don t know c++ however I do know that you must put your interface in promiscuous mode to see traffic other than your own and this means you need to run the code as root . Are you doing both of these things Comment : Yeah it s in promiscuous mode and I m running as root . Thanks for your time : -", "Question : I m trying to connect to a multicast group to receive some UDP packets . The code I m using is working good I m receiving the packets and I haven t had a problem with this before . But just now there is a new requirement that needs the packets to pass-through a switch which needs to see the Multicast join message . Before it has just been dumb switches and this hasn t been a problem . To join the multicast group I use this code : .. . .. . The line that generates the IGMP Join message is .. . .. . And the IGMP Join message is sent out . However as I snoop the network with Wireshark I see that the IGMP message has a bad checksum http : i.imgur.com 6Ct52QG.png http : i.stack.imgur.com Vwr0V.png .. . .. . Is this a problem with my code or the input Or is there something else .. . Answer : Is this a problem with my code .. . .. . No because your code isn t generating the IP checksum . That s either generated by the OS s networking stack or as Nikolai Fetissov noted in his answer by the network adapter . If your network analyzer is running on the machine that sent the packet and the checksum is generated by the network adapter rather than by the networking stack then because capturing your own packets is done by the networking stack looping those packets back to the capture mechanism rather than by the network adapter capturing the packets that it transmits which few if any adapters will the captured packets will not have had the IP checksum calculated and will thus almost certainly appear to have a bad IP checksum . Note the may be caused by IP checksum offload in the Wireshark display . That s what Wireshark is talking about .", "Question : I have a CSV file that is a little over a half million lines long by ten columns wide . I need to take out common IP addresses that have two specific protocols UDP and IGMP and filter out all other IP addresses that only have one associated protocol . Here is an example of the data in my table : .. . .. . enter image description here http : i.stack.imgur.com j8aR1.jpg .. . .. . So this query would run and output : .. . .. . enter image description here http : i.stack.imgur.com QlNHL.jpg .. . .. . It returns the IP server that has BOTH UDP and IGMP and NOT the server that only has UDP . How can I do this This needs to be run against 510 000+ lines with about 11 000 unique IPs . .. . Answer : select from table where SourceIP in select DestIP from table where Protocol IGMP .. . .. . This assumes the if a IGMP record exist then a UDP would also have to exist . I t really a cheap answer", "Question : I m new to lwip and I want to create a multicast receiver with lwip . My steps are as follow : 1 . Enable LWIP IGMP 2 . Set NETIF FLAG IGMP in low-level init 3 . Join multicast group create and bind pcb 4 . udp connect to remote ip or multicast IP address Both are tried but failed .. . .. . Joining group returns success and everything looks fine when program executing this . However the multicast receiver doesn t work no multicast data comes into network-interface . Seems I don t actually join my receiver to the igmp group although the joining process looks fine . Does any one know what I m missing I found netif- igmp mac filter NULL in igmp joingroup but this callback is set as NULL and not implemented . Do I need to implement it by myself to set the MAC filter or it is OK just leave it as NULL Thanks a lot for your help Ryan .. . Answer : The hardware needs to be configured to receive multcast MAC frames otherwise it will simply discard all frames with multicast destination address . There is probably an option to accept all incoming multicast frames . Enable that in low-level init and you should be able to see the incoming multicast frames . You shouldn t need to implement any filter .", "Question : I have a CSV file that is a little over a half million lines long by ten columns wide . I need to take out common IP addresses that have two specific protocols UDP and IGMP and filter out all other IP addresses that only have one associated protocol . Here is an example of the data in my table : .. . .. . enter image description here http : i.stack.imgur.com j8aR1.jpg .. . .. . So this query would run and output : .. . .. . enter image description here http : i.stack.imgur.com QlNHL.jpg .. . .. . It returns the IP server that has BOTH UDP and IGMP and NOT the server that only has UDP . How can I do this This needs to be run against 510 000+ lines with about 11 000 unique IPs . .. . Answer : One method is to use window-functions : .. . .. . EDIT : .. . .. . If you only want exactly those protocols : .. . .. . If you just want to filter the protocols then add where protocol in UDP IGMP . Comment : Thank you This is almost exactly what I need but my results still have some TCP connections included . Any idea Let me clarify a bit too . This sheet has UDP TCP ICMP IGMP and PIM type protocols we re trying to strip all those out and keep only addresses with communication on both UDP and IGMP inclusively .", "Question : I ve been unable to find any reference to Netty 4 supporting UDP multicast with IGMPv3 in the documentation . Can anyone clarify if this is supported or not Comment : Is it ever supported by JDK Comment : The javadoc for MulticastChannel states It may optionally support source filtering as specified by RFC 3376 : Internet Group Management Protocol Version 3 IGMPv3 . What isn t clear is if optionally refers to the implementation or an option you need to specify . .. . Answer : Everything that is possible with plain jdk7 should also be possible with Netty in terms of multicast . From Netty Discussions Google Group https : groups.google.com forum topic netty CXZZE5UGotc", "Question : I have a piece of software written out there e.g . no source code available that allows me to use it in multicast mode . I m trying to use this software on a network that for technical reasons can only use IGMP Version 2 . My OS is Windows 7 64-bit though I doubt that makes a difference . So far my searches have only given me Windows XP Windows Server solutions all of which involve editing the registry . In addition to the usual reasons aka registry paranoia I hesitate to edit the registry in this case because this particular network is not the only one that I will be using I have not problems at all in all the other networks I try using multicast on . Is there a straightforward way to force this software onto IGMP V2 Thanks John Price .. . Answer : As far as I remember adding IGMPVersion 3 to HKEY LOCAL MACHINE SYSTEM CurrentControlSet Services Tcpip Parameters is the only way to solve your problem . Anyway there is another creepy solution - just write a little daemon that will sniff for IGMPv3 parse data from it and send IGMPv2 packets" ] }
[ "yes-answer-long", "yes-answer-short" ]
ip
UNK_RELATION
slick-pg@pg@68
slick-pg -- slick extensions for postgresql to support a series of @placeholder data types and related operators functions .
{ "confidence": [ 57.13578414916992, 51.3408203125, 46.98988342285156, 39.98351287841797, 37.461158752441406, 36.97937774658203, 36.97937774658203, 33.5330810546875, 32.002220153808594, 29.791446685791016, 29.68089485168457, 23.75798988342285, 22.085952758789062, 17.983200073242188, 17.983200073242188, 17.983200073242188, 17.983200073242188, 17.983200073242188, 17.983200073242188, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992, 16.166410446166992 ], "content": [ "I m using Slick 3.1.0 and Slick-pg 0.10.0 .", "possibly related issue on github : github.com tminglei slick-pg issues 104 https : github.com tminglei slick-pg issues 104", "I am using slick-pg 0.8.2 with Slick 2.1.0 and am having problems with a JSON-typed column .", "I m trying to build a query that returns a few selected columns using slick-pg for as my slick driver but I m having issues trying to map on the json column MyValueObject .", "How can I write plain SQL with enum in slick", "When writing the integration with the PostgresDriver following this https : github.com tminglei slick-pg instructions add with PostGISImplicits in the object that overrides api this trait is not included in the example .", "This is reflected in my build.sbt - I use version 0.11.0 for slick-pg : .. . .. . Now the driver declaration : .. . .. . So take the java-8 time stuff .", "I tried to add column based on example slick-pg example 1 .. . .. . Also added to the class table implicite .. . .. . but have a compile error .. . .. . What I have done wrong", "You might also come across the need to tell slick how to extract a query result into some custom type T that it doesn t already know about .", "My Driver is defined as follows : .. . .. . This is my Table class it s abstract since I have several tables with the same structure and I subclass from this one : .. . .. . As far as I can see this is all according to the tests examples and the docs on the slick-pg site .", "You need to have an implicit of type SetParameter T in scope which tells slick how to set parameters from some custom type T that it doesn t already know about .", "What I have working for me is something in the following setup : .. . .. . First my table declaration : .. . .. . I need to extensions : java8 time support LocalDateTime and geo stuff Point .", "@BenReich : I tried the solution in the possibly related issue but no go .", "I have an enum as : .. . .. . Following the test case it works fine with the column mapper simply adding the following implicit mapper into my customized driver .", "However when using plain SQL I encountered the following compilation error : .. . .. . I could not find any document about this .", "Thanks .", "For example : .. . .. . The type of pp is PositionedParameters .", "For this you need an implicit GetResult T in scope .", "For example :", "However I m getting the following compilation error on the def json line :", "are you sure you re importing the correct JsonImplicits -- not the one from Play or Json4s or others", "According to IntelliJ the JsonImplicits I m importing are from PgJsonSupport so it seems they are the right ones .", "I also tried using PgJson4sSupport and using JValue instead of JsonString but got the same problem .", "Got it", "My problem was in the last line object PgsqlDriver extends PostgresDriver instead of extends PgsqlDriver .", "D oh", "Ah yes I see .", "Well you should answer your own question since you resolved it", "could you please give work example", ".. . .. . BR", "You can notice that the driver uses PgDate2Support which then allows me the usage of the implicit DateTimeImplicits .", "By importing the ExtendedPostgresDriver.api . in my class of interest I can then have the table definition use the LocalDateTime type that I need .", "Same thing for Point : PgPostGISSupport - PostGISImplicits - Point .", "Hope this helps", "The error I am getting at runtime is.. . .. . .. . A client error occurred : slick.driver.JdbcTypesComponent MappedJdbcType anon 1 cannot be cast to slick.ast.OptionType .. . .. . My case case clase table mapper and query looks similar to this.. .", "The only solution I can come up with right now is to map on the result but the returning rows can be very large and I d like to avoid loading a sequence of large objects into memory ." ] }
{ "confidence": [ 56.78033447265625, 56.26892852783203, 52.01184844970703, 50.70749282836914, 47.252227783203125 ], "content": [ "Question : I am using slick-pg 0.8.2 with Slick 2.1.0 and am having problems with a JSON-typed column . My Driver is defined as follows : .. . .. . This is my Table class it s abstract since I have several tables with the same structure and I subclass from this one : .. . .. . As far as I can see this is all according to the tests examples and the docs on the slick-pg site . However I m getting the following compilation error on the def json line : Comment : possibly related issue on github : github.com tminglei slick-pg issues 104 https : github.com tminglei slick-pg issues 104 Comment : are you sure you re importing the correct JsonImplicits -- not the one from Play or Json4s or others Comment : @BenReich : I tried the solution in the possibly related issue but no go . According to IntelliJ the JsonImplicits I m importing are from PgJsonSupport so it seems they are the right ones . I also tried using PgJson4sSupport and using JValue instead of JsonString but got the same problem . Comment : Got it My problem was in the last line object PgsqlDriver extends PostgresDriver instead of extends PgsqlDriver . D oh Comment : Ah yes I see . Well you should answer your own question since you resolved it .. . Answer : Got it My problem was in the last line object PgsqlDriver extends PostgresDriver instead of extends PgsqlDriver .", "Question : I tried to add column based on example slick-pg example 1 .. . .. . Also added to the class table implicite .. . .. . but have a compile error .. . .. . What I have done wrong could you please give work example .. . .. . BR .. . Answer : What I have working for me is something in the following setup : .. . .. . First my table declaration : .. . .. . I need to extensions : java8 time support LocalDateTime and geo stuff Point . This is reflected in my build.sbt - I use version 0.11.0 for slick-pg : .. . .. . Now the driver declaration : .. . .. . So take the java-8 time stuff . You can notice that the driver uses PgDate2Support which then allows me the usage of the implicit DateTimeImplicits . By importing the ExtendedPostgresDriver.api . in my class of interest I can then have the table definition use the LocalDateTime type that I need . Same thing for Point : PgPostGISSupport - PostGISImplicits - Point . Hope this helps", "Question : I m using Slick 3.1.0 and Slick-pg 0.10.0 . I have an enum as : .. . .. . Following the test case it works fine with the column mapper simply adding the following implicit mapper into my customized driver . However when using plain SQL I encountered the following compilation error : .. . .. . I could not find any document about this . How can I write plain SQL with enum in slick Thanks . .. . Answer : You need to have an implicit of type SetParameter T in scope which tells slick how to set parameters from some custom type T that it doesn t already know about . For example : .. . .. . The type of pp is PositionedParameters . You might also come across the need to tell slick how to extract a query result into some custom type T that it doesn t already know about . For this you need an implicit GetResult T in scope . For example :", "Question : I tried to add column based on example slick-pg example 1 .. . .. . Also added to the class table implicite .. . .. . but have a compile error .. . .. . What I have done wrong could you please give work example .. . .. . BR .. . Answer : When writing the integration with the PostgresDriver following this https : github.com tminglei slick-pg instructions add with PostGISImplicits in the object that overrides api this trait is not included in the example .", "Question : null .. . Answer : I m trying to build a query that returns a few selected columns using slick-pg for as my slick driver but I m having issues trying to map on the json column MyValueObject . The error I am getting at runtime is.. . .. . .. . A client error occurred : slick.driver.JdbcTypesComponent MappedJdbcType anon 1 cannot be cast to slick.ast.OptionType .. . .. . My case case clase table mapper and query looks similar to this.. . The only solution I can come up with right now is to map on the result but the returning rows can be very large and I d like to avoid loading a sequence of large objects into memory ." ] }
[ "yes-answer-long", "yes-answer-short" ]
pg
UNK_RELATION
silverlight-plugin@web@96
silverlight-plugin -- the run-time environment for silverlight available as a plug-in for most @placeholder browsers .
{ "confidence": [ 49.057918548583984, 36.72958755493164, 33.77206039428711, 33.29252243041992, 31.678382873535156, 31.678382873535156, 31.340782165527344, 31.27794075012207, 30.71242332458496, 30.47639274597168, 30.47639274597168, 30.25824737548828, 30.158824920654297, 30.158824920654297, 30.09100341796875, 30.09100341796875, 29.86724090576172, 29.86724090576172, 29.455055236816406, 29.455055236816406, 29.424365997314453, 29.267963409423828, 28.571447372436523, 28.571447372436523, 28.571447372436523, 28.347684860229492, 28.347684860229492, 28.28277587890625, 27.940811157226562, 27.672544479370117, 27.473491668701172, 26.788936614990234, 26.421255111694336, 26.060260772705078, 25.636051177978516, 25.167434692382812, 25.044513702392578, 25.044513702392578, 25.044513702392578, 25.044513702392578, 24.638744354248047, 24.539772033691406, 23.87173080444336, 23.52495574951172, 23.52495574951172, 23.52495574951172, 23.27191734313965, 23.27191734313965, 22.75330924987793, 21.286544799804688, 21.286544799804688, 19.282943725585938, 18.770864486694336, 18.579490661621094, 17.984477996826172, 17.91252326965332, 16.209217071533203, 14.7859468460083, 12.907149314880371, 12.549654006958008, 12.549654006958008, 12.549654006958008, 12.549654006958008, 12.549654006958008, 12.549654006958008, 12.549654006958008, 12.549654006958008, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566, 11.281800270080566 ], "content": [ "The Silverlight installer installs the plugin for all installed browsers .", "When using Silverlight 5 in Chrome if the code opens in a popup window that also contains Silverlight application then the Silverlight plugin get crashed why", "I m trying to hit a Silverlight 3 app with the Silverlight 4 runtime .", "I m having problems with one XP machine where-in internet-explorer chrome and firefox the Silverlight plugin crashes on EVERY page with Silverlight .", "It might not load up silverlight at all .", "Do any silverlight things work", "Cannot upgrade FF or Silverlight .", "The Silverlight 4 runtime is theoretically 100 backwards compatible and can run any Silverlight 3 XAP .", "If you have a Webproject for your Silverlight Application you can specify in the Default.aspx the Minimun Runtime Version of Silverlight that needs to be installed to run your application .", "Is it possible to install the Silverlight 4 plugin on one browser e.g .", "in Chrome or Opera while Firefox and Explorer continue to use the Silverlight 3 plugin", "I can t seem to figure out how to set a particular value for the Silverlight Plug-in .", "Install firefox 3.6.12 and silverlight 4.0.50917.0 .", "I ve written a Silverlight 5 app .", "Does the machine meet the system requirements for Silverlight", "Does the machine meet the system requirements for Silverlight", "Lifetime management is also handled by the browser a plugin may be trying to recycle the silverlight process and restart it .", "There is similar bug in MS Connect not fixed http : connect.microsoft.com VisualStudio feedback details 726815 silverlight-4-and-5-plugin-crashes", "Instead of seeing our application you see Get Microsoft Silverlight -- about : plugins reports silverlight 4.0.50917.0 installed and enabled .. . .. . 4 .", "If the client opens your silverlight application and uses a lower version then an installation dialog is displayed to install the needed silverlight version .", "Pages that used to work fine with silverlight 3 crash instantly - including my app and the Silverlight Beta 4 demo page http : silverlight.net content samples sl4 toolkitcontrolsamples run default.html", "@steve in all browsers", "We are having some wierd behavior in firefox with silverlight .", "After FF restarts silverlight works as expected .. . 8 .", "Once again silverlight is broken .. . .. . Any ideas", "When users with the Silverlight 4.1 plugin instaled visit my page the app fails to load .", "Should Silverlight not automatically download the latest version of the plugin if my .xap file requires it", "It just crashes instantly in all these browsers .", "There is no connection between a Silverlight OOB application and the browser in which it was running when installed .", "Silly question why not just install the Silverlight 4 runtime and continue to develop with the Silverlight 3 Development tools", "i am using silverlight-plugin 3.0 to display the chart.it is working fine on local pc but it is not working on server it is not displaying any thing .", "I have a page with Silverlight 4 oob app .", "Installing Silverlight is a manual activity that the user desktop support must perform .", "With SL plugin 5.0.60818.0 I get an error when I open this page : http : demos.telerik.com silverlight Docking FirstLook .. . .. . I hope someone from telerik sees this .", "If silverlight is crashing within the browser then there s only a few parts of silverlight that actually rely on the browser operating correctly such as calls to webservices must go through the browsers HTTP facade maybe too many responses from the server are queued due to a lagging UI which results in a crash since too many responses are trying to fire events for UI changes at once unlikely yes i know but its an idea .", "Browsers were crashing with no reason but debugger showed the right direction.. .", "This should test to see if it is the chart component data source for it or a general problem with your server host and Silverlight .", "We have written and implemented a LOB Silverlight 3 application - which we are currently testing at a clients site .", "Once running as an OOB application Silverlight uses its own ClientHTTP stack and no longer depends on the Browser HTTP stack .", "Try using this debugging utility silverlight spy http : www.silverlightspy.com to get to the bottom of the problem", "For development reasons I can t install Silverlight 4 on a particular machine .", "Ive used silverlight player in our internal builds and one issue we are facing is that the video is automatically replaying as soon as its over .", "I m able to get this working using the param name value method however I m injecting the Silverlight plug-in using JavaScript and therefore not sure how I can get the plug-in to recognize that I do in fact want to use a splashscreen .", "Visit our silverlight application also tried simple application with just a background .. . .. . 3 .", "A memory leak in prior versions cause some problems in the Silverlight detection script of Firefox .", "Silverlight will tell you that you ve got the wrong version but it is up to the user to actually upgrade it .", "EDIT .. . .. . This post http : stackoverflow.com questions 1346584 calling-webservices-from-silverlight-3-when-running-out-of-browser reinforces my memory .", "AnthonyWJones is right IE has nothing todo with silverlight when running OOB you ll even notice that the HTMLPage object is partially inaccessible when running OOB", "We have come across the problem where on a few of the machines on site the browsers crash randomly .", "so check if there is any issue like this.. . or check this url about URL Access Restrictions in Silverlight http : msdn.microsoft.com en-us library cc189008 v vs.95 .aspx", "What I want to know is when a Silverlight 3 Application is running out-of-browser is it still relying on a specific browser in the background.. . or would this solve our problem if the browser is unstable because of plugins", "You can create a Virtual Machine using Microsoft Virtual PC and use that for one of the plug-ins .", "The only thing that springs to mind is disabling the plugin-container .. . .. . In Firefox address-bar type about : config .. . Read the warning choose your preference to always remind you or not and accept .. . In the search bar of the config options now type : npctrl .. . You should then see the entry : dom.ipc.plugins.enabled.npctrl.dll .. . Change the value from true to false simply double-clicking will-change this for you .. . Restart Firefox .. . .. . EDIT .. . .. . There is another workaround which is to disable then re-enable silverlight-plugin .", "I tried calling the scripts or simple Document.Submit from code on InstallStateChanged - and they all worked well on win XP not only on my machine but on Win 7 or Vista the page hangs or even silverlight-plugin crashes before the installation beginning .", "If you can t install Silverlight 3 on a particular machine why does it matter whether you can install both on a machine I assume you mean a different machine", "Install or uninstall any plug-in tried Firebug and IETab2 .. . 6 .", "The machines run Windows XP SP3 - the browser is Firefox .", "But before i would try it in a local test environment to check if its really a bug in Firefox .", "Can you run a virtual-machine and install SL4 on that", "I uninstalled SL 5 and reinstalled SL 4 and the page opens fine .", "Is there some way I can have both SL 4 and SL 5 runtimes installed and just configure my browser to use the one I want", "The SL4 and SL5 SDK s can live side-by-side why not the plugins", "It seems to be a know issue with teleriks controls at the moment .", "We have a customer solution we have to release during the spring where we need them to have it fixed else we ll have to discard their controls completely .", "Not on the same OS .", "Does anyone know a fix", "You can try to hook up the MediaEnded event and stop the video when it finishes .", "i have checked the MIME type also in iis.its over there .", "please tell me whats the problem .. . .. . thanking you samir", "is working fine on local pc but it is not working on server do you mean its working when the XAP is being served from your local PC but doesn t work when the XAP is served from the Server", "If so are you using the same client machine when viewing it on the server", "can you tell me what is the basic system requirement but it is a simple plugin.just like flash", "If so are you using the same client machine when viewing it on the server can you please tell me what exactly should i do .", "i am not getting you.i have tried on another pc also but still the same problem .", "if you want to check then please open ind107.cfmdeveloper.com then click on checkbox named New Window in the bottom of the page .", "then click on Generate button in the bottom .", "it will open a new window to display the chart .", "Just to rule out the chart component itself have you tried doing a simple hello world type application to see if it works", "yes i have tried.but still its displaying white .", "It being a server is IE in Extra Security Mode", "I usually test with the gallery at silverlight.net .", "I faced same problem .", "I used a perpetuum repoting tool .", "I had to create reporting-services and these services are accessed by reporting viewer from client-side .", "I forgot to change reporting-services url .", "I put localhost and everything was blank I saw blank page when access report .", "I don t know if anyone can advise about this one .", "We suspect that it may be because these machines browser s seems to be unreliable as they had some plugins installed etc .", "and a suggested solution was to implement the application in the out-of-browser mode .", "No .", "Assuming the instability is a result-of Firefox extensions then running the app in OOB may help .", "Bear in mind though that the browser s HTTP stack is likely to be more efficient and you loose automatic cookie handling .", "Thanks for the feedback .", "Appreciate it", "I m struggling for evidence but I m pretty sure I remember reading that out-of-browser uses the Internet Explorer engine .", "And this article http : msdn.microsoft.com en-us library dd550721 28VS.95 29.aspx implies the same if you go to the section Detecting Network Connectivity and Out-of-Browser Status and read the final para beginning You can use local messaging to communicate between.. . .", "I am testing my application on a number of machines .", "It is fine on every machine except 1 .", "The browser crashes instantly and doesn t even attempt to load the page .", "I don t know how to debug this because there s no error ." ] }
{ "confidence": [ 49.91436767578125, 49.32635498046875, 47.8905143737793, 46.133914947509766, 41.67118835449219, 40.73181915283203, 39.88471984863281, 39.72754669189453, 39.238441467285156, 38.155548095703125, 38.152706146240234, 37.04072570800781, 36.351619720458984, 34.45806121826172, 33.527286529541016, 32.428741455078125, 32.428741455078125, 29.387603759765625, 25.106252670288086 ], "content": [ "Question : I don t know if anyone can advise about this one . We have written and implemented a LOB Silverlight 3 application - which we are currently testing at a clients site . We have come across the problem where on a few of the machines on site the browsers crash randomly . The machines run Windows XP SP3 - the browser is Firefox . We suspect that it may be because these machines browser s seems to be unreliable as they had some plugins installed etc . and a suggested solution was to implement the application in the out-of-browser mode . What I want to know is when a Silverlight 3 Application is running out-of-browser is it still relying on a specific browser in the background.. . or would this solve our problem if the browser is unstable because of plugins .. . Answer : If silverlight is crashing within the browser then there s only a few parts of silverlight that actually rely on the browser operating correctly such as calls to webservices must go through the browsers HTTP facade maybe too many responses from the server are queued due to a lagging UI which results in a crash since too many responses are trying to fire events for UI changes at once unlikely yes i know but its an idea . Lifetime management is also handled by the browser a plugin may be trying to recycle the silverlight process and restart it . Try using this debugging utility silverlight spy http : www.silverlightspy.com to get to the bottom of the problem", "Question : For development reasons I can t install Silverlight 4 on a particular machine . Is it possible to install the Silverlight 4 plugin on one browser e.g . in Chrome or Opera while Firefox and Explorer continue to use the Silverlight 3 plugin Comment : If you can t install Silverlight 3 on a particular machine why does it matter whether you can install both on a machine I assume you mean a different machine .. . Answer : Nope . Just tried it . The Silverlight installer installs the plugin for all installed browsers . Can you run a virtual-machine and install SL4 on that", "Question : I am testing my application on a number of machines . It is fine on every machine except 1 . I m having problems with one XP machine where-in internet-explorer chrome and firefox the Silverlight plugin crashes on EVERY page with Silverlight . Pages that used to work fine with silverlight 3 crash instantly - including my app and the Silverlight Beta 4 demo page http : silverlight.net content samples sl4 toolkitcontrolsamples run default.html The browser crashes instantly and doesn t even attempt to load the page . I don t know how to debug this because there s no error . It just crashes instantly in all these browsers . Reinistalling rebooting didn t fix the problem . Comment : MSN toolbar installed Comment : it was . uninstalling and rebooting didn t fix it though : - Comment : I have the exact same problem on a fresh Windows Server 2008 R2 machine . My app loads then hangs for a while and ultimately crashes the browser . I m trying to hit a Silverlight 3 app with the Silverlight 4 runtime . Comment : @steve in all browsers SL3 and SL4 apps for me both break . i think thats what you re saying too . obviously you re 64 bit so i m wondering if that is a factor in your situation . i m definitely 32-bit though . relatively old machine Comment : Honestly I haven t tried Firefox or Chrome yet only IE . I ll try Firefox today and post my findings back . Thanks for the info on the SL4 apps breaking . That is reason enough to compile the application in SL4 just yet assuming Firefox and Chrome break for me like they did for you . .. . Answer : I m not sure what it might be but you could try debug it this way . 1 . Attach to running instance of Firefox with Visual Studio . 2 . Go to menu Debug - Exceptions.. . and check all Break when exception is boxes . 3 . Now open page that crashes the browser . Ideally you should catch an exception with debugger . I ve spotted this way OutOfMemoryException in my app . Browsers were crashing with no reason but debugger showed the right direction.. .", "Question : I am testing my application on a number of machines . It is fine on every machine except 1 . I m having problems with one XP machine where-in internet-explorer chrome and firefox the Silverlight plugin crashes on EVERY page with Silverlight . Pages that used to work fine with silverlight 3 crash instantly - including my app and the Silverlight Beta 4 demo page http : silverlight.net content samples sl4 toolkitcontrolsamples run default.html The browser crashes instantly and doesn t even attempt to load the page . I don t know how to debug this because there s no error . It just crashes instantly in all these browsers . Reinistalling rebooting didn t fix the problem . Comment : MSN toolbar installed Comment : it was . uninstalling and rebooting didn t fix it though : - Comment : I have the exact same problem on a fresh Windows Server 2008 R2 machine . My app loads then hangs for a while and ultimately crashes the browser . I m trying to hit a Silverlight 3 app with the Silverlight 4 runtime . Comment : @steve in all browsers SL3 and SL4 apps for me both break . i think thats what you re saying too . obviously you re 64 bit so i m wondering if that is a factor in your situation . i m definitely 32-bit though . relatively old machine Comment : Honestly I haven t tried Firefox or Chrome yet only IE . I ll try Firefox today and post my findings back . Thanks for the info on the SL4 apps breaking . That is reason enough to compile the application in SL4 just yet assuming Firefox and Chrome break for me like they did for you . .. . Answer : Fixed in RC RTM at least for me", "Question : I don t know if anyone can advise about this one . We have written and implemented a LOB Silverlight 3 application - which we are currently testing at a clients site . We have come across the problem where on a few of the machines on site the browsers crash randomly . The machines run Windows XP SP3 - the browser is Firefox . We suspect that it may be because these machines browser s seems to be unreliable as they had some plugins installed etc . and a suggested solution was to implement the application in the out-of-browser mode . What I want to know is when a Silverlight 3 Application is running out-of-browser is it still relying on a specific browser in the background.. . or would this solve our problem if the browser is unstable because of plugins .. . Answer : No . There is no connection between a Silverlight OOB application and the browser in which it was running when installed . Once running as an OOB application Silverlight uses its own ClientHTTP stack and no longer depends on the Browser HTTP stack . Assuming the instability is a result-of Firefox extensions then running the app in OOB may help . Bear in mind though that the browser s HTTP stack is likely to be more efficient and you loose automatic cookie handling . Comment : Thanks for the feedback . Appreciate it", "Question : I ve written a Silverlight 5 app . When users with the Silverlight 4.1 plugin instaled visit my page the app fails to load . Should Silverlight not automatically download the latest version of the plugin if my .xap file requires it It doesn t appear in Windows Update either . .. . Answer : If you have a Webproject for your Silverlight Application you can specify in the Default.aspx the Minimun Runtime Version of Silverlight that needs to be installed to run your application . In the Default.aspx is an entry like : .. . .. . This setting indicates that at least the Version 5.0.60401.0 must be installed for your application . If the client opens your silverlight application and uses a lower version then an installation dialog is displayed to install the needed silverlight version .", "Question : When using Silverlight 5 in Chrome if the code opens in a popup window that also contains Silverlight application then the Silverlight plugin get crashed why .. . Answer : There is similar bug in MS Connect not fixed http : connect.microsoft.com VisualStudio feedback details 726815 silverlight-4-and-5-plugin-crashes", "Question : We are having some wierd behavior in firefox with silverlight . We have tried everything and I am hoping for some more ideas . Below is the behavior .. . .. . 1 . Install firefox 3.6.12 and silverlight 4.0.50917.0 . The versions there are locked and not controlled by us and on all our users machines . 2 . Visit our silverlight application also tried simple application with just a background .. . .. . 3 . Instead of seeing our application you see Get Microsoft Silverlight -- about : plugins reports silverlight 4.0.50917.0 installed and enabled .. . .. . 4 . Visit site in IE app works .. . .. . 5 . Install or uninstall any plug-in tried Firebug and IETab2 .. . 6 . After install click Restart when prompted .. . 7 . After FF restarts silverlight works as expected .. . 8 . Close firefox and reopen . 9 . Once again silverlight is broken .. . .. . Any ideas We tried the CWDIllegalInDllSearch entry in the registry to no avail . Please help Comment : thats odd . Have you verified this on multiple user machines .. . Answer : The only thing that springs to mind is disabling the plugin-container .. . .. . In Firefox address-bar type about : config .. . Read the warning choose your preference to always remind you or not and accept .. . In the search bar of the config options now type : npctrl .. . You should then see the entry : dom.ipc.plugins.enabled.npctrl.dll .. . Change the value from true to false simply double-clicking will-change this for you .. . Restart Firefox .. . .. . EDIT .. . .. . There is another workaround which is to disable then re-enable silverlight-plugin . Rather than re-isntalling .", "Question : For development reasons I can t install Silverlight 4 on a particular machine . Is it possible to install the Silverlight 4 plugin on one browser e.g . in Chrome or Opera while Firefox and Explorer continue to use the Silverlight 3 plugin Comment : If you can t install Silverlight 3 on a particular machine why does it matter whether you can install both on a machine I assume you mean a different machine .. . Answer : Silly question why not just install the Silverlight 4 runtime and continue to develop with the Silverlight 3 Development tools The Silverlight 4 runtime is theoretically 100 backwards compatible and can run any Silverlight 3 XAP .", "Question : I ve written a Silverlight 5 app . When users with the Silverlight 4.1 plugin instaled visit my page the app fails to load . Should Silverlight not automatically download the latest version of the plugin if my .xap file requires it It doesn t appear in Windows Update either . .. . Answer : Nope . Installing Silverlight is a manual activity that the user desktop support must perform . Silverlight will tell you that you ve got the wrong version but it is up to the user to actually upgrade it .", "Question : I don t know if anyone can advise about this one . We have written and implemented a LOB Silverlight 3 application - which we are currently testing at a clients site . We have come across the problem where on a few of the machines on site the browsers crash randomly . The machines run Windows XP SP3 - the browser is Firefox . We suspect that it may be because these machines browser s seems to be unreliable as they had some plugins installed etc . and a suggested solution was to implement the application in the out-of-browser mode . What I want to know is when a Silverlight 3 Application is running out-of-browser is it still relying on a specific browser in the background.. . or would this solve our problem if the browser is unstable because of plugins .. . Answer : I m struggling for evidence but I m pretty sure I remember reading that out-of-browser uses the Internet Explorer engine . EDIT .. . .. . This post http : stackoverflow.com questions 1346584 calling-webservices-from-silverlight-3-when-running-out-of-browser reinforces my memory . And this article http : msdn.microsoft.com en-us library dd550721 28VS.95 29.aspx implies the same if you go to the section Detecting Network Connectivity and Out-of-Browser Status and read the final para beginning You can use local messaging to communicate between.. . . Comment : AnthonyWJones is right IE has nothing todo with silverlight when running OOB you ll even notice that the HTMLPage object is partially inaccessible when running OOB", "Question : We are having some wierd behavior in firefox with silverlight . We have tried everything and I am hoping for some more ideas . Below is the behavior .. . .. . 1 . Install firefox 3.6.12 and silverlight 4.0.50917.0 . The versions there are locked and not controlled by us and on all our users machines . 2 . Visit our silverlight application also tried simple application with just a background .. . .. . 3 . Instead of seeing our application you see Get Microsoft Silverlight -- about : plugins reports silverlight 4.0.50917.0 installed and enabled .. . .. . 4 . Visit site in IE app works .. . .. . 5 . Install or uninstall any plug-in tried Firebug and IETab2 .. . 6 . After install click Restart when prompted .. . 7 . After FF restarts silverlight works as expected .. . 8 . Close firefox and reopen . 9 . Once again silverlight is broken .. . .. . Any ideas We tried the CWDIllegalInDllSearch entry in the registry to no avail . Please help Comment : thats odd . Have you verified this on multiple user machines .. . Answer : I think it is a problem with Firefox that has been fixed with Version 3.6.14 . See this BugReport https : bugzilla.mozilla.org show bug.cgi id 478823 on Bugzilla . A memory leak in prior versions cause some problems in the Silverlight detection script of Firefox . I can only suggest to update Firefox to version 3.6.14 . But before i would try it in a local test environment to check if its really a bug in Firefox . Update : It seems to be a general problem with Firefox 3.6.x cause some users report the same error as your with higher versions than 3.6.14 . See here http : support.mozilla.com de questions 788686 and here http : support.mozilla.com de questions 790046 . Comment : Question doesn t question memory usage . Cannot upgrade FF or Silverlight . Comment : @All : I ve read the question and the sentence you are pointing . But sometimes customers or users need to update their programms to use software . For me this seems to be a problem with firefox so i answered the question with my best knowledge and pointed the questioner to this . Don t know if this is worth downvoting . Comment : @All : I have to agree with Jehof s comments here . We all know that sometimes getting a fix means getting the next version . Seems like either their rule needs to evolve with the times or they need to live without the app . I m guessing they will evolve their rule . +1 for Jehof", "Question : With SL plugin 5.0.60818.0 I get an error when I open this page : http : demos.telerik.com silverlight Docking FirstLook .. . .. . I hope someone from telerik sees this . I uninstalled SL 5 and reinstalled SL 4 and the page opens fine . Is there some way I can have both SL 4 and SL 5 runtimes installed and just configure my browser to use the one I want The SL4 and SL5 SDK s can live side-by-side why not the plugins Comment : It seems to be a know issue with teleriks controls at the moment . We have a customer solution we have to release during the spring where we need them to have it fixed else we ll have to discard their controls completely . .. . Answer : Not on the same OS . You can create a Virtual Machine using Microsoft Virtual PC and use that for one of the plug-ins .", "Question : I can t seem to figure out how to set a particular value for the Silverlight Plug-in . Specifically the splashScreenSource value . I m able to get this working using the param name value method however I m injecting the Silverlight plug-in using JavaScript and therefore not sure how I can get the plug-in to recognize that I do in fact want to use a splashscreen . It doesn t appear that I can set the value using the args list provided via the default Silverlight.js file . Silverlight.createObject source parentElement id properties events initParams userContext .. . .. . Any idea s will be greatly appreciated .. . .. . thanks much Comment : Please accept answers for previous questions first . Comment : previous questions there was no answer except what AnthonyWJones provided yesterday . Comment : stackoverflow.com users 296895 gcadmes http : stackoverflow.com users 296895 gcadmes 5 Questions asked 1 Accepted answer . .. . Answer : The properties parameter is expected to be a JavaScript object whose properties match the set of param names with a few additions such as width and height . So you can pass the following object to properties parameter . Comment : thanks that worked Cheers", "Question : i am using silverlight-plugin 3.0 to display the chart.it is working fine on local pc but it is not working on server it is not displaying any thing . i have checked the MIME type also in iis.its over there . please tell me whats the problem .. . .. . thanking you samir Comment : is working fine on local pc but it is not working on server do you mean its working when the XAP is being served from your local PC but doesn t work when the XAP is served from the Server If so are you using the same client machine when viewing it on the server Comment : Does the machine meet the system requirements for Silverlight Comment : Does the machine meet the system requirements for Silverlight can you tell me what is the basic system requirement but it is a simple plugin.just like flash Comment : If so are you using the same client machine when viewing it on the server can you please tell me what exactly should i do . i am not getting you.i have tried on another pc also but still the same problem . Comment : if you want to check then please open ind107.cfmdeveloper.com then click on checkbox named New Window in the bottom of the page . then click on Generate button in the bottom . it will open a new window to display the chart . .. . Answer : It being a server is IE in Extra Security Mode It might not load up silverlight at all . Do any silverlight things work I usually test with the gallery at silverlight.net .", "Question : i am using silverlight-plugin 3.0 to display the chart.it is working fine on local pc but it is not working on server it is not displaying any thing . i have checked the MIME type also in iis.its over there . please tell me whats the problem .. . .. . thanking you samir Comment : is working fine on local pc but it is not working on server do you mean its working when the XAP is being served from your local PC but doesn t work when the XAP is served from the Server If so are you using the same client machine when viewing it on the server Comment : Does the machine meet the system requirements for Silverlight Comment : Does the machine meet the system requirements for Silverlight can you tell me what is the basic system requirement but it is a simple plugin.just like flash Comment : If so are you using the same client machine when viewing it on the server can you please tell me what exactly should i do . i am not getting you.i have tried on another pc also but still the same problem . Comment : if you want to check then please open ind107.cfmdeveloper.com then click on checkbox named New Window in the bottom of the page . then click on Generate button in the bottom . it will open a new window to display the chart . .. . Answer : Just to rule out the chart component itself have you tried doing a simple hello world type application to see if it works This should test to see if it is the chart component data source for it or a general problem with your server host and Silverlight . Comment : yes i have tried.but still its displaying white .", "Question : i am using silverlight-plugin 3.0 to display the chart.it is working fine on local pc but it is not working on server it is not displaying any thing . i have checked the MIME type also in iis.its over there . please tell me whats the problem .. . .. . thanking you samir Comment : is working fine on local pc but it is not working on server do you mean its working when the XAP is being served from your local PC but doesn t work when the XAP is served from the Server If so are you using the same client machine when viewing it on the server Comment : Does the machine meet the system requirements for Silverlight Comment : Does the machine meet the system requirements for Silverlight can you tell me what is the basic system requirement but it is a simple plugin.just like flash Comment : If so are you using the same client machine when viewing it on the server can you please tell me what exactly should i do . i am not getting you.i have tried on another pc also but still the same problem . Comment : if you want to check then please open ind107.cfmdeveloper.com then click on checkbox named New Window in the bottom of the page . then click on Generate button in the bottom . it will open a new window to display the chart . .. . Answer : I faced same problem . I used a perpetuum repoting tool . I had to create reporting-services and these services are accessed by reporting viewer from client-side . I forgot to change reporting-services url . I put localhost and everything was blank I saw blank page when access report . so check if there is any issue like this.. . or check this url about URL Access Restrictions in Silverlight http : msdn.microsoft.com en-us library cc189008 v vs.95 .aspx", "Question : Ive used silverlight player in our internal builds and one issue we are facing is that the video is automatically replaying as soon as its over . Does anyone know a fix .. . Answer : You can try to hook up the MediaEnded event and stop the video when it finishes .", "Question : I have a page with Silverlight 4 oob app . After app is installed the bage on the page should automatically refresh . I tried calling the scripts or simple Document.Submit from code on InstallStateChanged - and they all worked well on win XP not only on my machine but on Win 7 or Vista the page hangs or even silverlight-plugin crashes before the installation beginning . However without refresh function on the installation process flows smoothly . How should I do the correct refresh for those systems The info why this can happen will be helpful too . Where MainPage and installedPage are simple grids with text field . Install Page contains only button with click event - to install the App . The web page is auto generated one . Nothing more . Still on Win 7 and Vista have the same prob while install as they had . UPD : project files http : www.mediafire.com p7815nbn941o4ba Comment : Create new project that reproduce the problem and show it to us . This way will be much more easier to help you.. . Comment : @Ai boy that project will contain App.cs file only : What do you suppose to get Comment : We expect to get the App.cs MainPage.xaml MainPage.xaml.cs a .csproj and a .sln all in a zip file . .. . Answer : I have changed your test case like this : .. . .. . And it refreshes upon install on windows-7 fine . Comment : thank you get your +100 Comment : Thanks The answer was simple indeed ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
im4java@imagemagick@66
im4java -- the library im4java provides a pure-java interface to @placeholder graphicsmagick and other popular commandline tools like jpegtran ufraw dcraw exiftool .
{ "confidence": [ 57.758522033691406, 55.670082092285156, 54.307334899902344, 52.490482330322266, 51.64411544799805, 50.1707649230957, 49.886837005615234, 47.672767639160156, 47.22700500488281, 47.22700500488281, 47.00522994995117, 46.90332794189453, 45.4697265625, 43.93537521362305, 43.93537521362305, 43.92699432373047, 43.611202239990234, 43.611202239990234, 42.87247085571289, 42.87247085571289, 42.316219329833984, 42.316219329833984, 42.282894134521484, 41.63508224487305, 41.410736083984375, 41.11519241333008, 41.11519241333008, 41.11519241333008, 41.11519241333008, 41.04818344116211, 40.96587371826172, 39.94940185546875, 39.94940185546875, 39.85602951049805, 39.75320053100586, 39.49148178100586, 39.49148178100586, 39.49148178100586, 38.72270965576172, 38.55217361450195, 38.55217361450195, 38.31420135498047, 37.73420333862305, 37.73420333862305, 37.73420333862305, 37.73420333862305, 37.73420333862305, 37.73420333862305, 37.73420333862305, 37.20516586303711, 37.180477142333984, 37.180477142333984, 37.180477142333984, 36.56841278076172, 36.56841278076172, 36.56841278076172, 36.402713775634766, 36.35114288330078, 36.014686584472656, 35.27033615112305, 35.23692321777344, 35.17118453979492, 34.93730926513672, 34.77999496459961, 33.38276672363281, 33.180030822753906, 33.180030822753906, 33.180030822753906, 33.180030822753906, 33.180030822753906, 33.180030822753906, 33.180030822753906, 32.15005874633789, 32.15005874633789, 32.01424026489258, 32.01424026489258, 32.01424026489258, 32.01424026489258, 31.936344146728516, 31.677349090576172, 30.61701202392578, 30.61701202392578, 30.61701202392578, 30.61701202392578, 30.61701202392578, 29.028236389160156, 27.829761505126953, 27.270957946777344, 27.208812713623047, 25.904769897460938, 25.63888168334961, 24.70793914794922, 23.881603240966797, 23.365238189697266, 22.019420623779297, 21.579181671142578, 21.318584442138672, 21.318584442138672, 20.473949432373047, 20.407821655273438 ], "content": [ "im4java is a pure-java interface to the ImageMagick commandline . so you need ImageMagick installed .", "The home page http : im4java.sourceforge.net explains it reasonably clearly : .. . .. . im4java is a pure-java interface to the ImageMagick commandline .. . .. . and .. . .. . im4java .. . just generates the commandline for the ImageMagick commands and passes the generated line to the selected IM-command using the java.lang.ProcessBuilder.start -method .", "I m using graphicsmagick questions tagged graphicsmagick + im4java questions tagged im4java for generating thumbnails in my web application .", "First of all im4java is an interface for imagemagick and or graphicsmagick so you need to install one of them on your computer to get im4java to work .", "I m using GraphicsMagick 1.3.16 and im4java 1.4.0 to create thumbnails of GIFs .", "im4java is just an interface to run imagemagic s commmands from a java program .", "I am trying to do a GraphicsMagick compare using im4java and gm4java .", "I need to know how to translate a imagemagick commandline-command into java im4java code commandline : .. . .. . I know how to use convert and -append in im4java but what about -define and -limit", "in the post you mentioned im4java .", "yes if you use im4java .", "for one of my project i am using im4java library and send command through it to graphicsmagick .", "You can attain this by using im4java alone or im4java+gm4java .", "Is there a known bug with im4java and BufferedImages", "I don t know Im4Java but it looks like it has a CompareCmd http : im4java.sourceforge.net api org im4java core CompareCmd.html class .", "It looks like Im4Java has a CompareCmd http : im4java.sourceforge.net api org im4java core CompareCmd.html class that will do the trick .", "It s however a problem for im4java because that s considered an error exit code and there s no way as far as I know to tell im4java that it s not .", "Do you really need this im4java", "im4java .. . .. . The two don t go together .", "I m using im4java api to crop images .", "I added gradle dependency for im4java 1.4.0 .", "I m using im4java library for image-processing operations with ImageMagick .", "I m trying to resize an image using Image Magick through IM4Java library .", "In short jmagick uses Java INI to access the ImageMagick API and im4java calls the ImageMagick tools .", "In other words jmagick bundles ImageMagick while im4java does not .", "im4java is a wrapper to execute ImageMagick commands from your java code .", "I m trying to resize an image using im4java .", "But with im4java I get a very good quality image", "To use im4java you need to install ImageMagick .", "I am using im4java for integration with Image Magick .", "Notes : .. . .. . I m using im4java with GM .", "I tried to read an image in Java with the library im4java : .. . .. . The problem is that Info don t recognize the image .", "I want to draw the image using im4java .", "I have tried to create but there is no IMoperation available in im4java .", "1 Do I have to install any external library on my PC other than just adding im4java library to my application", "Basically I want to call this ImageMagick command : .. . .. . but using the im4java library .", "In this question here How do you resize an image using im4java", "Now I am using im4java and imageMagick to deal with pictures .", "jmagic is a wrapper of imagemagick s c api and im4java uses the imagemagic s cli .", "After searching the Internet I have provided the im4java library with my application by simply adding it .", "More about current BufferedImage implementation in im4java .", "So what s the im4java equivalent of threshold 80", "But that will require quite a bit of most like API breaking changes in im4java .", "How can I create an empty transparent canvas using im4java .", "Are there any additional settings should be set when using im4java", "I want to convert images from gif to jpeg by using im4java .", "I m attempting to convert an image in an inputstream to an outputstream using im4java .", "I know that im4java was originally built for ImageMagick and their commands may differ .", "Is it possible to run the above compare using im4java plus gm4java", "jmagick and im4java take two different approaches to using ImageMagick .", "Using the Commandline I can do this using : .. . .. . But using im4java I am stuck at the canvas command : .. . .. . But this only throws an error that it cannot find the out.png .", "I have recently started using Im4Java an imagemagick java wrapper and was wondering if the API supports adding text to images .", "I am using im4java http : im4java.sourceforge.net version 1.4.0 to access ImageMagick http : www.imagemagick.org functionality from Java .", "I have two images which I want to compare with the ImageMagick Java wrapper im4java .", "I am using the im4Java lib to resize my images .", "The class is fairly simple it just delegates the calls to ImageMagick via Im4Java .", "But Im4Java does not provide any wrapper methods to this compare function .", "I am aware of JMagick as an alternative to im4java but have not found this a good solution for other reasons .", "http : stackoverflow.com questions 22841185 how-do-you-resize-an-image-using-im4java an answer says I need an interface for this What does this means", "I ve recently began to use im4java a java wrapper for ImageMagick to convert .eps files to .jpg .", ": .. . .. . Process Pooling in im4java - Is there any way to achieve solely in im4java should i use gm4java wrapper i guess it supports process pooling - BUT it has few limitations like no use of buffered images", "I don t need the parallel-processing feature of the im4java because the output of one process is the input of the other hence sequential .", "GMBatchCommand class in gm4java serves a bridge between im4java and gm4java .", "You can then ship them portable ImageMagick im4java your program.. . altogether to your clients .", "As you want to call a custom command not implemented in im4java as a standard method then either extend im4java functionality to call this command it is opensource or use Apache Commons Exec http : commons.apache.org proper commons-exec to call this custom command .", "Problem solved following this GM gist https : gist.github.com 1283951 : .. . .. . I managed the problem in im4java with p profile java.lang.String profileName http : im4java.sourceforge.net api org im4java core IMOps.html p profile 28java.lang.String 29 method :", "Is it possible to run an im4java http : im4java.sourceforge.net application without installing ImageMagick-6.7.6-1-Q16-windows-dll.exe", "As im4java is just a wrapper you ve got to have installed ImageMagick as otherwise there s nothing for it to wrap", "Now I want to edit the image using im4java and display the Image on the canvas object .", "For example you cannot use im4java to call out to jmagick in order to avoid installing ImageMagick on the computer hosting the Grails app .", "Reading im4java documentation I found that actually the OutputConsumer stores the output in an array list but as already said there is nothing .", "I have been trying to convert .eps images to .jpg by Imagemagick using im4java API .", "i have two images I-1 and I-2 i was able to compare these two images using im4java successfully .", "im4java http : im4java.sourceforge.net is simply a wrapper for ImageMagick http : www.imagemagick.org an old school tool chain that can be started from command-line then process images .", "I want to use imagemagick im4java to combine two images into a single image - .. . .. . I have a command that works great in command-line .", "I am using im4java in my project for various image-processing techniques such as cropping resizing filling and rotating .", "I think im4java is using Runtime.exec internally to delegate image-processing commands to ImageMagick .", "Yes you are right that using im4java along only gives you the same performance as you did with Runtime.exec .", "It can be used as supplement to im4java or just execute the command you built for your Runtime.exec .", "I am using Eclipse JUNO JDK 7 im4java-1.4.0 .. . .. . When I execute the Java progrm I am facing the below problem .. . .. . My Code is : .. . .. . Please suggest me .", "The GraphicsMagick command I m using is like this : .. . .. . I m trying to translate that into Java .", "How can I get rid of unwanted data with im4java before further processing", "Now multiple convert commands executes as an individual process are executed simultaneously and to avoid delay am thinking of process pooling in im4java .", "im4java give you a convenience way with some overhead to construct the GM command and to parse the GM output .", "It let you use that convenience from im4java to construct the commands then use gm4java engine to execute the command .", "The gm4java engine uses a completely different mechanism than im4java to manage and to communicate with GM .", "When I use ImageMagick+im4java in eclipse I always has this error : .. . .. . And I am sure that the itself ImageMagick works well on my computer Mac OSX 10.10.1 .", "Commands are just a list of strings so if you know how to write GM commands you don t need im4java to use gm4java .", "the extra 1.png is there because the first layer of a PSD is the flattened result-of all layers .. . .. . I want to do it using im4java without actually saving the images to the disk using InputStream .", "You can manipulate images with pure Java .", "will my clients separately install this ImageMagick commandline like me", "Once you make ImageMagick utilities portable you can put them relative to your program then add an extra ProcessStarter.setGlobalSearchPath .. . http : im4java.sourceforge.net api org im4java process ProcessStarter.html setGlobalSearchPath java.lang.String line to specify the search path at the beginning of your code .", "Lastly I would NOT consider gm4java a wrapper of im4java the core of gm4java runs by itself and gives you the capability of sending massive concurrent commands to GM and to return the output of GM back to you .", ".. . .. . Hi Team .. . .. . In the above code I am trying to take a screenshot of a page and compare it with expected screenshot using im4java however even if the actual and expected images are similar it still throws false and the difference image is also not getting generated .. . .. . I have added expected screenshot in temp folder .", "gm4java makes use of recently developed batch interactive mode of GraphicsMagick to aovid starting a new GraphicsMagick process again and again for every command .", "I don t read or understand java much but at the commandline you need an exclamation mark to disregard aspect-ratio and force exact dimensions like this convert -resize 300x200", "I use Image4j and graphicsmagick to cut image but crashed wen i deploye my app in linux .", "I accept a command-line solution too and I ll figure out and post it in im4java .. . We can restrict the conversation about horizontal images only I can figure out the vertical operations .. . .. . Any comments would be highly appreciated .", "The oneliner imagemagick convert remove the line-breaks : .. . .. . In bash you have to escape the characters with .. . .. . I solved it in im4java with sub operations : .. . .. . Notes : .. . .. . It still doesn t contain red border I can t add border only to the second image .", "I already added jmagick to gradle dependencies won t that suffice.And when I run the code using jmagick library it is throwing the error not found in java library path .", "I don t know it but I use to do a pure java transformation : .. . .. . this code has been working for me for more than 2 years in my project ." ] }
{ "confidence": [ 71.71222686767578, 70.29725646972656, 67.3839111328125, 65.75862121582031, 64.22047424316406, 63.420318603515625, 59.498897552490234, 58.9868049621582, 58.9868049621582, 57.80996322631836, 56.532073974609375, 55.4576301574707, 52.80849838256836, 52.69829559326172, 52.53792953491211, 50.76065444946289, 49.83622741699219, 49.555564880371094, 49.004032135009766, 48.336143493652344 ], "content": [ "Question : I want to provide my clients the ability to resize and watermark images in an application developed with Java . After searching the Internet I have provided the im4java library with my application by simply adding it . I saw different articles and got this code : .. . .. . it gives exception as .. . .. . why is that so 1 Do I have to install any external library on my PC other than just adding im4java library to my application 2 If I do have to install some kind of other library on my PC then will my clients have to install it too on their machine as well or is their any solution In this question here How do you resize an image using im4java http : stackoverflow.com questions 22841185 how-do-you-resize-an-image-using-im4java an answer says I need an interface for this What does this means And if I somehow install this interface on my machine what my clients will have to do Can t this be embedded like H2 database so my clients don t have to install anything else other than my software Comment : im4java is a pure-java interface to the ImageMagick commandline . so you need ImageMagick installed . So I guess it will execute the program . Comment : @PeterMmm then what do I have to do for my clients will my clients separately install this ImageMagick commandline like me Or is there any solution for this Comment : You can manipulate images with pure Java . Comment : @PeterMmm can you give me some references to such articles in answer Comment : Simple search java image watermark : codeyouneed.com java-watermark-image http : www.codeyouneed.com java-watermark-image .. . Answer : im4java http : im4java.sourceforge.net is simply a wrapper for ImageMagick http : www.imagemagick.org an old school tool chain that can be started from command-line then process images . If you don t install ImageMagick things won t work at all The org.im4java.core.CommandException you ve encountered may perhaps be caused by convert.exe of the same name a built-in disk utility on Windows which can convert FAT volumes into NTFS ones .. . .. . A feasible way to solve your problem is to use a portable version of ImageMagick . For Windows just download the zip file ImageMagick-6.8.9-8-Q16-x86-windows.zip http : www.imagemagick.org download binaries ImageMagick-6.8.9-8-Q16-x86-windows.zip the version may vary and extract it . For other platforms it is better to build a portable version from source . Once you make ImageMagick utilities portable you can put them relative to your program then add an extra ProcessStarter.setGlobalSearchPath .. . http : im4java.sourceforge.net api org im4java process ProcessStarter.html setGlobalSearchPath java.lang.String line to specify the search path at the beginning of your code . You can then ship them portable ImageMagick im4java your program.. . altogether to your clients . Comment : WOW awesome job . Thanks dear Comment : Great answer But don t foget to add Ghostscript to the list of dependencies .", "Question : I m trying to resize an image using im4java . I haven t found any working examples and their JavaDocs are incomplete . OOTB Java solutions are insufficient and lead to poor quality in the resulting images despite rendering hint adjustments . .. . Answer : First of all im4java is an interface for imagemagick and or graphicsmagick so you need to install one of them on your computer to get im4java to work . Here is the code to resize an image :", "Question : Is it possible to run an im4java http : im4java.sourceforge.net application without installing ImageMagick-6.7.6-1-Q16-windows-dll.exe .. . Answer : The home page http : im4java.sourceforge.net explains it reasonably clearly : .. . .. . im4java is a pure-java interface to the ImageMagick commandline .. . .. . and .. . .. . im4java .. . just generates the commandline for the ImageMagick commands and passes the generated line to the selected IM-command using the java.lang.ProcessBuilder.start -method . How would you expect that to work without having the command-line So to answer the question in the body of your post : no . As im4java is just a wrapper you ve got to have installed ImageMagick as otherwise there s nothing for it to wrap Comment : .. . so the answer is no . Comment : @DuncanJones : I was answering the question in the title more than the question in the body . Will make it clearer . Comment : It wasn t a complaint about your answer I gave you a +1 . I was being mildly flippant to the original poster.. . Comment : @DuncanJones : I suspected that might be the case - but the clarification certainly won t hurt : Comment : ok thanks for u r analyzastion", "Question : I am trying to do a GraphicsMagick compare using im4java and gm4java . The GraphicsMagick command I m using is like this : .. . .. . I m trying to translate that into Java . I know that im4java was originally built for ImageMagick and their commands may differ . Is it possible to run the above compare using im4java plus gm4java I ve tried this : .. . .. . The above gives me the error : .. . Answer : You can attain this by using im4java alone or im4java+gm4java . What gm4java gives you is the performance when you need to process a large number of images . The problem you are getting is due to the improper use of the addRawArgs method . Each argument you have in your command-line needs to be added as individual arguments instead of all together in one string . Try : Comment : Thanks Kenneth You are right I was not using the addRawArgs method correctly . I am building a regression tester which will eventually need to process a lot of files so gm4java may come in handy . It s awesome that you were able to create it Comment : @Chuck glad that I can help and happy to know that gm4java will be useful to you . Comment : @ben Thank you for editing the answer . It reads much better now .", "Question : I m using graphicsmagick questions tagged graphicsmagick + im4java questions tagged im4java for generating thumbnails in my web application . Unfortunately as I can see while processing pictures taken with photo cameras the thumbnails contains all original data such color profile aperture camera s manufacturer model etc . In other words much more things than required for displaying just simple thumbnail on the page . Of course it causes large thumbnail s file size . The thumbnail for the same photo which was saved for the web from any graphic editor is much smaller . How can I get rid of unwanted data with im4java before further processing .. . Answer : Problem solved following this GM gist https : gist.github.com 1283951 : .. . .. . I managed the problem in im4java with p profile java.lang.String profileName http : im4java.sourceforge.net api org im4java core IMOps.html p profile 28java.lang.String 29 method :", "Question : I added gradle dependency for im4java 1.4.0 . And trying to run the application in my linux system . Here s the Code .. . .. . But It was throwing the error .. . .. . What was this error about How to fix it .. . Answer : It is trying to run imagemagick s convert command but that is not there in the PATH . im4java is just an interface to run imagemagic s commmands from a java program . You need to have imagemagick in the PATH . Comment : I already added jmagick to gradle dependencies won t that suffice.And when I run the code using jmagick library it is throwing the error not found in java library path . Comment : in the post you mentioned im4java . jmagick is different . jmagic is a wrapper of imagemagick s c api and im4java uses the imagemagic s cli . This is clear from im4java.sourceforge.net http : im4java.sourceforge.net . Comment : I only added the dependency in gradle.build.I did not or downloaded any imagemagick tools.So Do i need to install the imageMagick and give the PATH . Comment : yes if you use im4java .", "Question : I am using im4java in my project for various image-processing techniques such as cropping resizing filling and rotating . Before this I was using the java.lang.Runtime.exec to run commands in the command-prompt . Now when I bench marked the two methods they almost gave the same result I don t need the parallel-processing feature of the im4java because the output of one process is the input of the other hence sequential . In my case it provides just one advantage : ease of use . And that s all . Do you think I am missing something or lacking somewhere in my code Any suggestions would be of great help . Thanks in advance Comment : If you just did long start System.currentTimeMillis process System.out.println Took + System.currentTimeMillis -start then that s not how you benchmark on the JVM not even close . Comment : yes i did that . Comment : Sir what s the correct way to do it Comment : Well the pro way is to use a bencmarking framework such as Google Caliper or Oracle jmh . A poor man s alternative would be to repeat your processing in an endless loop displaying for each iteration the time it took . And use System.nanoTime . Then you ll see to what number these times converge . The biggest thing is waiting for all your code to be JIT-compiled . Comment : I think im4java is using Runtime.exec internally to delegate image-processing commands to ImageMagick . Because of this it s only natural that the benchmark showing similar performance . .. . Answer : Yes you are right that using im4java along only gives you the same performance as you did with Runtime.exec . Or maybe slower because it has the command building and translation layer . But if your applicaiton is to convert a lot of images in one run or large scale concurrent processing then please let me shamelessly introduce the gm4java http : kennethxu.blogspot.com 2013 04 integrate-java-and-graphicsmagick.html which can help to improve the performance . gm4java makes use of recently developed batch interactive mode of GraphicsMagick to aovid starting a new GraphicsMagick process again and again for every command . It can be used as supplement to im4java or just execute the command you built for your Runtime.exec . Comment : thanks for this option sir ill try and let you know whether there was any significant improvement or not . thanks a lot", "Question : I need to know how to translate a imagemagick commandline-command into java im4java code commandline : .. . .. . I know how to use convert and -append in im4java but what about -define and -limit Here is what I got : .. . .. . maybe just add op.limit memory 40GiB and op.define registry : temporary-path F : imageMagick I don t know whether it is the same. . .. . Answer : The op.limit is buggy and I had to use addRawArgs -limit memory 20GiB instead of op.limit memory 40GiB source : http : sourceforge.net p jmagick mailman message 33285563", "Question : I need to know how to translate a imagemagick commandline-command into java im4java code commandline : .. . .. . I know how to use convert and -append in im4java but what about -define and -limit Here is what I got : .. . .. . maybe just add op.limit memory 40GiB and op.define registry : temporary-path F : imageMagick I don t know whether it is the same. . .. . Answer : You are correct . To view the actual command you will be generating put this line of code in before cmd.run op Comment : hey thanks for the answer . I asked in the mailing list and op.limit is buggy . See here : sourceforge.net p jmagick mailman message 33285563 http : sourceforge.net p jmagick mailman message 33285563", "Question : I want to use ImageMagick in my Grails application . I am using the following dependencies in BuildConfig.groovy .. . .. . however when I try and run I get this error : .. . .. . How do I use ImageMagick or Jmagick with Grails without installing it directly am I missing some dependencies Comment : im4java.sourceforge.net docs dev-guide.html http : im4java.sourceforge.net docs dev-guide.html .. . Answer : jmagick and im4java take two different approaches to using ImageMagick . In short jmagick uses Java INI to access the ImageMagick API and im4java calls the ImageMagick tools . In other words jmagick bundles ImageMagick while im4java does not . As you probably know the error is due to ImageMagick either not being installed or not being in the environment PATH . im4java .. . .. . The two don t go together . For example you cannot use im4java to call out to jmagick in order to avoid installing ImageMagick on the computer hosting the Grails app . To use im4java you need to install ImageMagick . jmagick .. . .. . Because jmagick is partly implemented in C it might be problematic to use in a Servlet container . It would certainly make the web app non-portable . What might work is to have the Servlet container provide jmagick compiled for that platform and exclude jmagick from the war file . Don t ask me how to do that :", "Question : for one of my project i am using im4java library and send command through it to graphicsmagick . to get image-size : .. . .. . i can get size properly till the following result . this time stderr changes the result : .. . .. . is there any way to get just image-size and ignore stderr result thanks in advance .. . Answer : Try adding -quiet to your command to suppress the error message like this :", "Question : How can I create an empty transparent canvas using im4java . Using the Commandline I can do this using : .. . .. . But using im4java I am stuck at the canvas command : .. . .. . But this only throws an error that it cannot find the out.png . So I assume it wants to use it as input image . How can I create a new Image .. . Answer : I have found the solution myself : .. . .. . The 4th line creates a fully transparent image .", "Question : I m trying to resize an image using im4java . I haven t found any working examples and their JavaDocs are incomplete . OOTB Java solutions are insufficient and lead to poor quality in the resulting images despite rendering hint adjustments . .. . Answer : Do you really need this im4java I don t know it but I use to do a pure java transformation : .. . .. . this code has been working for me for more than 2 years in my project . Let me know if you have any question . Comment : Thanks but after trying this the image quality was still pretty poor . I m looking for sharper resized images . Comment : I see . This is indeed for simple interpolation re-sizing.. . Comment : It is not clear in the question that you are trying to scale UP the image make it bigger is that what you trying to do scale up keeping at most the quality Comment : Trying to scale it down .", "Question : Guys am using imagemagick library for image-processing in my project java . When multiple requests hit the server it responds very slowly . Now multiple convert commands executes as an individual process are executed simultaneously and to avoid delay am thinking of process pooling in im4java . Following alternatives would be of any help : .. . .. . Process Pooling in im4java - Is there any way to achieve solely in im4java should i use gm4java wrapper i guess it supports process pooling - BUT it has few limitations like no use of buffered images Dedicated Server - Using a dedicated-server just for image-processing the least i want . .. . .. . Is there any OTHER method should i go for Thanks for help in advance Comment : Wrap the code in a callable and use a suitable executor to control the parallism . Comment : can i handle multiple processes not threads with this Comment : Your callable invokes a single imagemagic instance Comment : Whenever the user clicks a request for a convert command is invoked which is handled as a separate process and whenever some manipulation is done on the image a new process is created which is a overhead and i want to overcome that Comment : wrap the Java code to invoke convert into a Callable . Then learn how to use executors . .. . Answer : Actually our team went through exactly the same requirement and hence we created gm4java . It does exactly what you are looking for . As to the support for BufferedImage we already support using BufferedImage as input in the latest release http : search.maven.org artifactdetails 7Ccom.sharneng 7Cgm4java 7C1.1.0 7Cjar . Using BufferedImage as output is still not supported but you can workaround it easily . The workaround is to let GM write the image to the RAM disk in many Linux distributions you get RAM disk for free for Windows there are various solutions available . All you need to do now is to have your Java code reads the converted image from the RAM disk . The little overhead if any is indifference comparing to the huge overhead of starting a new process each time . Even directly comparing with RAM disk approach to BufferedImage the size of BufferedImage is often 10 times larger than a byte array of a JPG image file . So if all you need is to serve images instead of doing additional processing in Java the RAM disk approach is indeed faster also uses less memory . More about current BufferedImage implementation in im4java . When using it as input it was simply written to a tmp file which is very slow . When using it as output it utilizes stdin stdout stream operations which is faster than tmp file but still not optimal . The best would be to use named pipe with Java NIO implementation . But that will require quite a bit of most like API breaking changes in im4java . Lastly I would NOT consider gm4java a wrapper of im4java the core of gm4java runs by itself and gives you the capability of sending massive concurrent commands to GM and to return the output of GM back to you . Commands are just a list of strings so if you know how to write GM commands you don t need im4java to use gm4java . That is actually how we used in an application that demands raw performance . im4java give you a convenience way with some overhead to construct the GM command and to parse the GM output . GMBatchCommand class in gm4java serves a bridge between im4java and gm4java . It let you use that convenience from im4java to construct the commands then use gm4java engine to execute the command . The gm4java engine uses a completely different mechanism than im4java to manage and to communicate with GM . And that s the reason why it is so fast . Comment : thanks for the help sir Comment : @Kenneth Xu I am having trouble sifting through gm4java documentation . How do I use a BufferedImage as input to GMBatchCommand", "Question : I need to draw a circle and save it as an image in a directory . I want to draw the image using im4java . I have tried to create but there is no IMoperation available in im4java . Any help Comment : how does netbeans tag relate to this question Comment : How about some code you wrote .. . Answer : im4java is a wrapper to execute ImageMagick commands from your java code . As you want to call a custom command not implemented in im4java as a standard method then either extend im4java functionality to call this command it is opensource or use Apache Commons Exec http : commons.apache.org proper commons-exec to call this custom command . The ImageMagick command to draw a circle is explained here : .. . .. . http : www.imagemagick.org Usage draw circles", "Question : I m using im4java library for image-processing operations with ImageMagick . The code I m using looks like : .. . .. . But the quality of resulting image is bad . Doing the same thing using command-line gives 4 times bigger size with better quality . Are there any additional settings should be set when using im4java The file-format is jpg . Thanks in advance.. . .. . Answer : This is the code I m using and it works like charm", "Question : null .. . Answer : I m using GraphicsMagick 1.3.16 and im4java 1.4.0 to create thumbnails of GIFs . At the command-line I can do something like : .. . .. . and the thumbnail is created successfully preserving the animation . But something in my app isn t translating because the seemingly identical similar command : .. . .. . creates a thumbnail capturing just a single image of the animation . Note : the input is piped in and output captured as a BufferedImage . If it helps here is the code block used to create the above cmd I m using : .. . .. . What am I missing EDIT : Interestingly when I change .. . .. . to .. . .. . the image is properly created with the animation . Also something I discovered is the byte length returned from s2b.getImage is only 4 8777 bytes gif as a single image whereas the successfully created gif thumb using the direct file path is 190 512 bytes which leads me to believe the problem is with certain settings of the command stream .", "Question : I m writing a junit test case to validate a cropping and resizing class . The class is fairly simple it just delegates the calls to ImageMagick via Im4Java . But to do things properly I am trying to write up a jUnit test case . I manually created expected result images using Photoshop and am trying to compare them to the images produced by my crop resize class . The problem is that the headers that ImageMagick write and those by Photoshop differ . So a simple byte-by-byte comparison will not work . ImageMagick offers a compare function which when run from command-line shows no pixel differences between the expected result and that produced by my class . But Im4Java does not provide any wrapper methods to this compare function . Short of having to call Runtime.exec myself is there a way I can compare these two images in my test case Comment : I don t know Im4Java but it looks like it has a CompareCmd http : im4java.sourceforge.net api org im4java core CompareCmd.html class . Will that not work Comment : Depending on your compression techniques for the image e.g . JPG enough noise might be generated that byte-wise comparison of raster values might not work anyway even though the images are identical to the human eye . See stackoverflow.com questions 3400660 http : stackoverflow.com questions 3400660 testing-graphics-generation-with-junit for some ideas of testing image generation . Comment : Outside of that if you have a library that understands the specific image format you re using jpeg gif whatever you can probably use that to validate that both images have the same dimensions and then iterate over all of the pixels in each and compare them edit : Ireeder s link has some good ideas for that . Comment : @yshavit Thanks . I missed that one in the API docs . If you repost as a proper answer I can credit you appropriately . Comment : Ah cool we all win . Thanks . : .. . Answer : It looks like Im4Java has a CompareCmd http : im4java.sourceforge.net api org im4java core CompareCmd.html class that will do the trick .", "Question : I am using im4java http : im4java.sourceforge.net version 1.4.0 to access ImageMagick http : www.imagemagick.org functionality from Java . It is working well for processing images to and from files . The Developers Guide http : im4java.sourceforge.net docs dev-guide.html has a section on using Buffered Images instead of writing output to a file and there is a test TestCase13 that demonstrate using Buffered Images as output . However when I run any action with a Buffered Image I receive an org.im4java.core.CommandException stating : no ImageReader for given format . I have tried a number of different things including adding the jai imageio.jar to provide additional formats but nothing seems to work . A basic test-code that shows the problem based on im4java.jar s TestCase13 is : .. . .. . Running this throws the following error : .. . .. . The error occurs on the the convertCmd.run line however the problem seems to be with setting the outputConsumer as the stream2BufferedImage . How do I fix this Is there a known bug with im4java and BufferedImages Is there a better work-around than exporting to a temp-file and then reading it back in to a BufferedImage I am aware of JMagick as an alternative to im4java but have not found this a good solution for other reasons . Thanks in advance for any assistance or ideas . .. . Answer : see in this example i have the input source as buffered Image and output is also as buffered image . I hope this can help you .", "Question : null .. . Answer : I want to use imagemagick im4java to combine two images into a single image - .. . .. . I have a command that works great in command-line . I want to achieve the same results using im4java.core package I have this set of commands but it does not give me the right result . Comment : I am guessing your geometry command should have two more parameters as in your commandline version +25+0 is actually shorthand for 0x0+25+0 or maybe WIDTHxHEIGHT+25+0 . Comment : Thanks this somewhat helps ." ] }
[ "yes-answer-long", "yes-answer-short" ]
imagemagick
UNK_RELATION
chm@file-format@36
chm -- chm is the proprietary help @placeholder generated by microsoft htmlhelp workshop hhw.exe .it s html based help so topics are required in html and supplemented by the used .jpg .gif or e.g .
{ "confidence": [ 71.36428833007812, 64.5268783569336, 63.39273452758789, 62.89591598510742, 61.02268600463867, 58.70106506347656, 58.459800720214844, 57.34929275512695, 54.42898178100586, 51.88421630859375, 51.00926208496094, 50.92617416381836, 50.78779602050781, 50.480525970458984, 49.63245391845703, 49.626068115234375, 49.491249084472656, 49.408714294433594, 49.36052703857422, 49.36052703857422, 49.36052703857422, 48.422950744628906, 48.2296028137207, 48.17495346069336, 47.99066162109375, 47.82416534423828, 47.29035568237305, 47.25424575805664, 47.25424575805664, 47.182472229003906, 47.10242462158203, 46.989139556884766, 46.878684997558594, 46.7939338684082, 46.637939453125, 46.565765380859375, 46.423065185546875, 46.413856506347656, 46.08384704589844, 46.030517578125, 46.030517578125, 46.029449462890625, 46.02306365966797, 46.02306365966797, 46.02306365966797, 45.7825813293457, 45.56615447998047, 45.43700408935547, 45.166996002197266, 45.126983642578125, 44.96973419189453, 44.782474517822266, 44.71746826171875, 44.623435974121094, 44.623435974121094, 44.512725830078125, 43.902687072753906, 43.896583557128906, 43.72833251953125, 43.55202102661133, 43.32828140258789, 43.32828140258789, 43.17931365966797, 43.17931365966797, 43.17931365966797, 43.17931365966797, 43.08296203613281, 43.065284729003906, 42.93029022216797, 42.93029022216797, 42.86345291137695, 42.75437927246094, 42.55393600463867, 42.427513122558594, 42.427513122558594, 42.427513122558594, 42.427513122558594, 42.315303802490234, 42.284210205078125, 42.284210205078125, 42.22127151489258, 42.22127151489258, 41.8072509765625, 41.755226135253906, 41.522769927978516, 41.450984954833984, 41.33794403076172, 41.25543975830078, 41.23619842529297, 41.22740936279297, 41.16706466674805, 41.13508987426758, 41.07303237915039, 41.05088806152344, 40.9718132019043, 40.91303253173828, 40.91303253173828, 40.91303253173828, 40.91303253173828 ], "content": [ "The CHM is created by HTML Help Workshop .", "I have created compiled html chm file using the Microsoft html Help Workshop .", "possible duplicate of SVG Graphics in CHM Html Help Workshop http : stackoverflow.com questions 24026440 svg-graphics-in-chm-html-help-workshop", "Microsoft HTML Help Workshop can be used to create good quality professional CHM help files .", "Currently we use Microsoft HTML Help .chm .", "You are using HTML Help Workshop only for creating the CHM file", "Makes no sense see above and below - by using Help Workshop this is not HTMLHelp Workshop for the .chm extension", "The CHM is created by HTML Help Worshop .", "Then compile the result with a CHM compiler like MS htmlhelp workshop", "Fixed my problem with HTML Help Workshop creating a CHM outside of Flare https : github.com Phrogz docubot .", ".. . .. . If you are new in using HTMLHelp Workshop : .. . .. . Question : Is there a way to set a default page to be displayed when a .chm file is opened", "Has anyone succeeded in using SVG Files in CHM created with Html Help Workshop", "Now we have updated the help file to HtmlHelp .chm file we want to click on the Help button in the legacy c++ application to open the .chm file .", "Produced CHM files tool most commonly used is the most easy to use than the Microsoft HTML Help Workshop it fully installed after only 4.6M comprises two groups : HTML Help tool set Workshop and HTML Help Image Editor .", "You can use the Html Help Workshop tools from Microsoft .", "How to create a chm help file", "Open with HTMLHelp Workshop or e.g a tool like FAR HTML .. . 6 .", "CHM is basically a container for HTML files .", "The most subtle way is providing a Compiled HTML CHM help file .", "I have to call html-help - chm files that is - from a command-prompt .", "see : .. . .. . How to use CHM HTML Help file with Delphi XE application", "HTMLHelp .chm also is many years old used as successor for years and application help on Windows operating-system today .", "Answer : You can do this with Microsoft HTMLHelp Workshop .", "If you are trying to build .chm based help try chm-build http : sourceforge.net projects chm-build", "I have a set of files used to make up a .CHM help file using Help Workshop .", "and many other Help Authoring Tools HAT s are a IDE front end for utilizing the Microsoft HTML Help compiler hhw.exe .", "It is called HTML Help Workshop .", "Delphi - How to use CHM HTML Help file with Delphi XE application", "@EvanPlaice - does ghostdoc actually produce .chm .html help files though", "CHM help file is what", "This is not easy to discover unless you have access to the original sources to the CHM or have HTML Help developer tools available to disassemble the CHM and inspect its content .", "The topics are better to be separated into smaller units and individual HTML files when building a CHM help file .", "We are using Windows-HTML-Help .chm for delivering context-specific help to for our software to our customers .", "In FormCreate set the application help file to a valid CHM help file e.g .", "http : stackoverflow.com questions 21534449 how-to-use-chm-html-help-file-with-delphi-xe-application .. . .. . How to add support of HTML help files .chm on Delphi XE2", "But since that is CHM workshop default that might be not too bad .", "Include Htmlhelp.h and link-to Htmlhelp.lib you get these by installing HTML Help workshop but I presume you already have these if you made a .chm", ": - CHM files decompile to hundreds of HTML documents .", "When the CHM is opened in HTML Help Viewer and I try to open pdf link from TOC the HTML Help control crashes along with parent application .", "possible duplicate of What are good tools for creating compiled HTML help files .chm", "http : stackoverflow.com questions 6023 what-are-good-tools-for-creating-compiled-html-help-files-chm", "The file is included with MadCap Flare as well as the Microsoft HTML Help Workshop .", "The help files are in hlp and chm format .", ". help 3DFEMGeo.chm is main chm file .", "translated compiled help file .chm", "Other maybe relevant SO questions : .. . .. . How to creating a chm file http : stackoverflow.com questions 2993166 how-to-creating-a-chm-file .. . .. . What are good tools for creating compiled HTML help files .chm", "And I would like to open the topic in sub merged chm file in the window of main chm file by calling htmlhelp function .", "There are just a few parts to chm reader : .. . .. . parse CHM file-format extract .html pages and other files inside CHM file .", "What s wrong with HTML Help Workshop", "Under HKLM Software Microsoft Windows HTMLHelp create an entry .. . named help.chm .. . value C : path to help file.chm .. . .. . Then to open the chm at a particular topic call", "CHM is good and Sandcastle makes clean HTML .", "New controls have F1 help to new topics in the slave CHM and a new context-ID is required .", "Open the .hhp file in HTML Help Workshop .", "@help-info.de yeah the .chm itself works perfectly .", "The help file for Inquisit is stored in a Windows .CHM file .", "Developers often want a closed documentation as a CHM file and not a web-based help .", "Install HTML Help Workshop in the start menu you can program HTML Help Workshop to open it .", "It s required to install Microsft HTMLHelp Workshop .", "It would appear that CHM help files are no longer the help file-format of choice .", "Jumping to an anchor in CHM .. . Tested with Delphi2010 - DelphiXE2 - Windows XP .. . .. . How to jump to an anchor in a chm file Compiled HTML Help with Delphi .", "We re currently using HTML Help to display CHM help files in our software .", "If the audience for your help file is the user of the application html-help 2 is not usable you will still need to create a chm file .", "I m creating an online help in CHM for my application .", "I have main chm file of application help .", "Because I don t use chm as an help .", "This will be helpful to load a specific help page in the chm file .", "Couldn t you extract the HTML content from the CHM files with logical filenames search the HTML content and relate that back to the CHM file", "CHM is Compiled HTML File .. . .. . My CHM file has a link-to launch a 32-bit application .", "For a WPF UI application a CHM Help file needs to be created .", "First create the document in ms-word and convert it into chm help file", "text html chm pdf ps no problem .", "I have a .chm with map IDs for certain topics .", "If the CHM file name contains the symbol then the topics in the table of contents do not appear .", "You can safely delete a CHW as HTML Help will recreated it next time you open the CHM .", "maybe this can help you http : www.taringa.net posts downloads 1603307 Editar-Archivos-CHM -CHM-Editor-1 2 60.html", "Where does the HTML help viewer save the window position for each CHM file", "I am making a help file .chm for a project I am working on but am having trouble with an HTML form element .", "I tried HTML Help Workshop but it is very tough .", "Creating help files CHM and help authoring has a learn curve .", "I want to open .chm help file when click on Help button .", "The installation package includes help in the .chm format .", "In the past I integrated .chm help files .", "BUG : HTMLHelp Opens the Wrong Help File http : support.microsoft.com kb 267962 en-us .. . .. . Their suggested fix is for me to rename my CHM files .", "Calling the chm file works fine Example : .. . .. . Calling the chm file won t work .. . can anybody help me", "I have also tried using HTML Help Workshop but this tool does not provide the capability to directly create chm file by selecting the directory containing html files .", "And how the CHM help file can be used from DelphiXE application", "The HTML Help Viewer uses the layout engine components of Microsoft Internet Explorer Shdocvw.dll hosting Mshtml.dll to display Help topics .", "So this main chm file includes sub chm file .", "I used Sandcastle Help File Builder SHFB http : shfb.codeplex.com to generate the CHM .", "We compile with htmlhelp workshop .", "Open the project .hhp file in HTML Help Workshop .", "The idea is to have the help in some common format - html or something and why not .chm and to be able to call this library in order to display some topic of the help file .", "Using the Help Wizard makes a CHM in some minutes .", "We would like to use CHM help however it doesn t appear to be the direction that Microsoft wants us to move in .", "I then further want to convert the HTML into a compressed HTML CHM file .", "Removing any random HTML file enabled opening the CHM .", "I will use those html files and create .CHM file .", "i am using Windows HTML helper to create the CHM file .", "I am compiling one chm file with set of html files ." ] }
{ "confidence": [ 88.19894409179688, 78.47431945800781, 77.03549194335938, 76.89187622070312, 76.42987060546875, 75.04010009765625, 74.75980377197266, 74.1094970703125, 73.728759765625, 73.68089294433594, 73.12535858154297, 73.11331939697266, 72.14851379394531, 71.87322998046875, 71.63824462890625, 71.30591583251953, 71.20269775390625, 71.15164947509766, 70.6025390625, 69.85298156738281 ], "content": [ "Question : I have created compiled html chm file using the Microsoft html Help Workshop . when I tried to open the generated chm file it is showing message Page Can not be displayed . But when I click on content topic only then I am able to see corresponding page content . Do I need to set any thing so show the selected page by default . .. . Answer : The short way : If the CHM help file resides on a network-drive please copy this file to a local hard drive first and try again . You ll find some additional and troubleshooting information at : .. . .. . http : www.help-info.de en xml maml troubleshooting hh.xml .. . .. . http : www.grainge.org pages authoring chm mspatch 896358.htm .. . .. . Problem : The help file will appear but instead of the topic text you will see an error message this page cannot be displayed . Cause : Microsoft released some security patches that makes it impossible to view CHM files that are stored on a network-drive as opposed to CHM files stored on your own computer . Solution : There is a work-around to allow viewing across a network as discussed on the following links : .. . .. . http : west-wind.com weblog posts 2928.aspx .. . .. . http : www.helpscribble.com chmnetwork.html .. . .. . The problems can also occur if the CHM file name or the path to the file contains a number sign . If the CHM file name contains the symbol then the topics in the table of contents do not appear . If the path contains the symbol then you may receive an access violation error message . To work around this issue remove the symbol from the file name or from the path to the file . If you have a compiled collection of CHM s so called merged CHM some other problems are possible . .. . .. . If you are new in using HTMLHelp Workshop : .. . .. . Question : Is there a way to set a default page to be displayed when a .chm file is opened I would like to display the page associated with the first item in the Table of Contents . Answer : You can do this with Microsoft HTMLHelp Workshop . 1 . Open your HHP file with HH Workshop .. . 2 . Click the first icon Change project options on the Project tab .. . 3 . Set the Default file from the file list of the combo box .. . 4 . Compile your project .. . .. . HHP file example open with notepad :", "Question : For some reasons I would not be long I can t bring my source code to Windows . I want to generate doxygen and get CHM file too . so I generated doxygen on Linux now I what to know can I copy the html files to linux and generate the chm file I rather using doxygen but couldn t figure out how to do it only from the html files and not on the source code . Any ideas Thank you . Comment : I maintain a nix CHM compiler called chmcmd which is part of the freepascal distribution . I know that people use it with doxygen just not how : - .. . Answer : As I understand you have the source code on Linux and no way to copy to Windows . Please try to generate the HTML files by Doxygen on Linux with the properties shown on the attached snap . The files you need later are marked . Make shure you get these files . 1 . Prepare a Windows machine .. . 2 . Install HTMLHelp Workshop .. . http : www.help-info.de en Help Info HTMLHelp hh download install.htm .. . 3 . Copy all files including index.hhp index.hhk and index.hhp from LINUX to Windows .. . 4 . Right click to index.hhp .. . 5 . Open with HTMLHelp Workshop or e.g a tool like FAR HTML .. . 6 . Compile with HTMLHelp Workshop note there is a icon on the toolbar .. . 7 . Copy the resulting CHM back to Linux and view by e.g . http : www.linux.com news software applications 8209-chm-viewers-for-linux .. . .. . Or learn CHMcmd as mentioned by Marco van de Voort above . enter image description here http : i.stack.imgur.com aJyF9.png", "Question : It would appear that CHM help files are no longer the help file-format of choice . WinHelp .. . - obsolete .. . .. . HtmlHelp CHM .. . - not supported on Vista by default .. . - does not work well on a network share .. . .. . Help 2 HXS .. . - I understand this is used in VS2005+ for displaying help .. . .. . Web Based .. . - Could be hard to manage for multiple versions .. . .. . What help file-format would you use in a new C application that provides multiple versions from the same codebase We would like to use CHM help however it doesn t appear to be the direction that Microsoft wants us to move in . Does anyone employ HXS for their help files Feeback appreciated .. . .. . .. . .. . Update based upon lassevk comments .. . .. . Looks as though HXS help is not intended to be used for normal help projects . .. . Answer : The only useful help documentation I ve ever seen has been plain HTML . Most if not all of the open-source projects I ve seen all have HTML help pages for APIs and reference docs . Anything that uses a proprietary format or that requires a proprietary reader all run the risk of going obsolete CHM or having compatibility or bloat problems PDFs . For some reason Microsoft is just bad at help files . The online help for Visual Studio SQL Studio Office is terrible MSDN is a mess CHMs are clunky and the Microsoft search never returns the results you really want . Just my opinion : Comment : CHM s are just HTML that is indexed and compressed . There are Open Source viewers and de compressors", "Question : I would like to use nativ help support in embarcadero XE XE7 . I used standard chm files in 32bit application in past . It worked fine and there was no problem . Little problem start at present for 64bit application . Now if i press F1 the new help window is show help window for new ms Windows help and there is no contens . How to use chm files id context with this 64bit application What is the best aproach for this Is somebody using new .hlp files If yes how can I create this file Is thete any posibility to convert chm files to hlp files Comment : It seems help-info.de nor me can make heads of tails of your problem . Please show two screenshots . One of the chm if you open it via your application one if you open the chm via explorer and browse to the relevant topic . .. . Answer : I use neither Delphi nor Embarcadero XE . But I ll try to give some hints as a possible answer to your questions . Is there any possibility to convert .chm files to .hlp files This makes no sense because it s a step backwards see below for further information . Is somebody using new .hlp files See above - used by many developers and by me for help authoring many years ago - not today . If yes how can I create this .hlp file Makes no sense see above and below - by using Help Workshop this is not HTMLHelp Workshop for the .chm extension Please note .hlp is not a new extension for a new help format . It s a very old Microsoft help format . HTMLHelp .chm also is many years old used as successor for years and application help on Windows operating-system today . So you have to connect your application and build your own F1-Help . I d recommend searching SO by keywords tags before asking here . E.g . see : .. . .. . How to use CHM HTML Help file with Delphi XE application http : stackoverflow.com questions 21534449 how-to-use-chm-html-help-file-with-delphi-xe-application .. . .. . How to add support of HTML help files .chm on Delphi XE2 http : stackoverflow.com questions 15277118 how-to-add-support-of-html-help-files-chm-on-delphi-xe2 .. . .. . Further information only if you really want .hlp to work with : .. . .. . 32-bit Help files have been around for a long-long while . Based on Rich Text Format these files are a proprietary format for Windows computers . Windows XP was the last operating-system version to include WinHelp viewer yet the popular file-format has continued to be used . WinHelp .hlp originally shipped with Windows 3.0 in 1990 and due to many vendors still utilizing these types of files and because a multitude of older applications are still in use Microsoft has had to update the viewer application with each operating-system after Windows XP . In 2006 Microsoft announced intentions to phase out support for the help file platform stating that it simply no longer met the standards set forth as they planned the development and release of Windows Vista . But you ll find some downloads out there : .. . .. . WinHlp32.exe is required to display 32-bit Help files that have the .hlp file name extension . To view .hlp files on Windows 8.1 you need to install this application . Windows Help program WinHlp32.exe for Windows 8.1 http : www.microsoft.com en-us download details.aspx id 40899 WT.mc id rss alldownloads all . Note that this is for Windows 8.1 ONLY . And if you need to read .hlp files in Windows 7 and Windows Vista you ll find the downloads for those operating systems below : .. . .. . Windows Help program WinHlp32.exe for Windows 8 http : www.microsoft.com en-us download details.aspx id 35449 .. . .. . Windows Help program WinHlp32.exe for Windows 7 http : www.microsoft.com en-us download details.aspx id 91 .. . .. . Windows Help program WinHlp32.exe for Windows Vista http : www.microsoft.com en-us download details.aspx id 5143", "Question : I created a CHM help file using MadCap Flare . When I search for a term that I know is present in my text the search function always reports no topics found . How can I fix the search function .. . Answer : In my case the problem was fixed by registering itcc.dll on the machine where Flare is installed the machine building the CHM . The file is included with MadCap Flare as well as the Microsoft HTML Help Workshop . I have also found an article indicating that the language setting of the help file can affect the search function . Comment : 4 years later let me thank you for posting this . Fixed my problem with HTML Help Workshop creating a CHM outside of Flare https : github.com Phrogz docubot . cd C : Program Files x86 HTML Help Workshop regsvr32 itcc.dll", "Question : It would appear that CHM help files are no longer the help file-format of choice . WinHelp .. . - obsolete .. . .. . HtmlHelp CHM .. . - not supported on Vista by default .. . - does not work well on a network share .. . .. . Help 2 HXS .. . - I understand this is used in VS2005+ for displaying help .. . .. . Web Based .. . - Could be hard to manage for multiple versions .. . .. . What help file-format would you use in a new C application that provides multiple versions from the same codebase We would like to use CHM help however it doesn t appear to be the direction that Microsoft wants us to move in . Does anyone employ HXS for their help files Feeback appreciated .. . .. . .. . .. . Update based upon lassevk comments .. . .. . Looks as though HXS help is not intended to be used for normal help projects . .. . Answer : What exactly makes you think there s no default .chm viewer on windows Vista There certainly is one on my computer as well as on my Win7 box .. . .. . You might confuse .chm with .hlp Microsoft indeed dropped .hlp support in vista then eventually resumed it in a windows-update .. . .. . Bottom line : .chm files seem to be still supported on all windows version and the only real alternative to .chm files i know of is .html", "Question : I have some html pages which are integrated with a web site . Now the requirement is to create a .CHM file for the required pages . To do this task manually will take a huge amount of time . Please help me to extract the only html files from the website without getting its css js or other files . Because I do not want other files except .html . I will use those html files and create .CHM file . The main purpose of this task is to create online help . Your answer will be appreciated a lot. . : Comment : possible duplicate stackoverflow.com questions 2993166 how-to-creating-a-chm-file http : stackoverflow.com questions 2993166 how-to-creating-a-chm-file .. . Answer : Creating online help - also known as help authoring - is a task with a learning curve . It is not clear to me why you want to extract the .css and .js . I think you will need the .css e.g . in your online help project later . A CHM file can be thought of as a zipped compiled web site . The content pane of the help viewer on the right displays the content like a browser window . If you want to see the same formatting by .css as on your web site you ll have to integrate these .css files into the CHM file . And this may become a time consuming task depending of your web site structure and coding inside of your HTML files e.g . the CSS links . A scenario could be to copy the HTML files make a new .css and change the CSS links as needed maybe by FAR with Find And Replace for a structured sub web as described below for preparing the CHM compile task . On the Internet you can find many some expensive tools to create CHM files . One of my favorite shareware tool is Rob Chandler s FAR HTML http : www.helpwaregroup.com products far . It s recommended - the wizards are great and FAR HTML has a 30-days full working trial . To quickly manipulate HTML files or author help Projects FAR HTML will save you lots of time . It s required to install Microsft HTMLHelp Workshop . Please see : http : www.help-info.de en Help Info HTMLHelp hh download install.htm .. . .. . One tip - don t look at all the options of FAR when starting . 1 . Copy your HTML files to structured subfolders of your project folder e.g . : .. . .. . welcome.htm .. . design.css .. . First Steps download.htm .. . First Steps starting program.htm .. . How to extend extend menu.htm .. . How to extend power function.htm .. . images gui screenshot.jpg .. . .. . .. . 2 . Drag and drop these files to FAR HTML .. . .. . 3 . Start the wizard for HTMLHelp 1.x .. . 4 . ready . . Comment : In my source files there are four folders like : -data images javascripts and stylesheet . And other html files when I click the index.html and any other html file its opens in browser like a web page with menus drop-down menu and works very well . But I want to displays these files data in chm file as a Help . Comment : @Anant : I want to recommend giving the help authoring process a first try with some simple HTML and CSS files like shown in the tip above . In a second step this first experience must then be transferred to your needs and existing web page structure . Some sample files you may download from : help-info.de files download chm example files.zip http : www.help-info.de files download chm example files.zip . If you want the resulting CHM file without your existing menus and drop down menus this will be a lot of work . Another solution is trying to add the main functionality of a CHM with Table of Contents Index and Search as additional function . Comment : @Anant : Is your web page online or Intranet only Comment : on Intranet only", "Question : I have a directory containing multiple html files . Need to create chm file using all the html files of the directory . I am trying to create chm file using chmprocessor . downloaded from- http : sourceforge.net projects chmprocessor files .. . .. . I have referred http : chmprocessor.sourceforge.net and tried following : .. . .. . I selected html file using Add file under Source Files tab . And selected the directory using Add directory under additional files tab . But it didn t worked . Could any one please suggest the steps to create chm file using the directory containing html files I have also tried using HTML Help Workshop but this tool does not provide the capability to directly create chm file by selecting the directory containing html files . Comment : This might help : stackoverflow.com questions 24570976 https : stackoverflow.com questions 24570976 how-to-create-chm-file-using-the-directory-containing-html-files .. . Answer : This is really annoying - after installing chmProcessor I have given the tool a longer try and the chmProcessor for good structered Word files .doc is really working good . But testing for HTML with the one selected HTML at Source files makes me crazy as a former Microsoft Help MVP . Only linked files are included in the CHM I added with Add Directory . I put a Change Request for more documentation about Source files to SourceForge where you may download my test sample and some snaps of things I tried : http : sourceforge.net p chmprocessor bugs 29 .. . .. . HTMLHelp Workshop has a learn curve and creating Table of Contents TOC needs a fairly long time . So one more thought : You may have your HTML files in a web structure with sub-directories . A tool I have experience with is FAR HTML . Using the Help Wizard makes a CHM in some minutes . These is shown in a Video I uploaded for you . Give it a try - it s free with full working functions for some weeks . http : www.help-info.de files share VideoCreateChmHelpFilesWithFAR-HTML.mp4", "Question : We have created help file .chm using HTML Help Workshop .. . .. . In Access 2007 database Form property we have set Help File HelpApp.chm and Help Context ID propertiey 1001 so when we press F1 it opens the help file with this context ID . The problem is when we press F1 multiple times once each for different form or help topic it opens multiple instances of the help file . Also I observed if I press F1 on same form multiple times it opens multiple instances as well . We don t want to create multiple instances of help file . How we can prevent openning the multiple instances of help file Database Application being developed in Microsoft Access 2007 .accdb file-format . Help file being created HTML Help workshop 4.74.8702.0 .. . .. . I searched internet but there was no article that has multiple help file instances opening issue in Microsoft Access application . But there is one article that discusses for C application .. . .. . How do I limit my Windows application to spawning a single instance of a process http : stackoverflow.com questions 8102811 how-do-i-limit-my-windows-application-to-spawning-a-single-instance-of-a-process .. . .. . I don t know if the above solutions to check whether the Process has exited OR ProcessStartInfo but I need this in VBA . .. . Answer : This problem is difficult and depends on how the help is invoked . You must give some more information and the calling VBA code . I have seen your issue with multiple instances of the help window only once after moving the Access window to a new position followed by pressing the F1 button . But never seen again yet . One thing I remember is a problem with hh.dat . The hh.dat file stores user-specific information on all the HTMLHelp files .CHM on your system position favourite topics search history etc . and can cause a error if it has somehow been corrupted . Delete or rename the file hh.dat to reset all CHM windows on your system to their default settings . You should find hh.dat in this directory : .. . .. . Documents and Settings username Application Data Microsoft HTML Help or .. . .. . C : Users username AppData Roaming Microsoft HTML Help .. . .. . Windows will create a new version of hh.dat when you next open any .chm file . Try to set F1 to AutoKeys see snapshot . enter image description here http : i.stack.imgur.com II5Pg.png .. . .. . Add a modul for invoking help by HTMLHelp API see code sample : Comment : I am invoking help using facility provided by Microsoft Access i.e . just setting the property help file context ID . see initial text of my comment below In Access 2007 database Form property we have set Help File HelpApp.chm and Help Context ID propertiey 1001 so when we press F1 it opens the help file with this context ID . I will check call using HTML Help API instead of setting on property . Comment : sample download at : help-info.de files share Access-2007-Connect-CHM.zip http : www.help-info.de files share Access-2007-Connect-CHM.zip Comment : Please note : To open the CHM file right-click the unzipped CHM file click Properties and then click Unblock . Comment : Your solution works fine I have several topics in help and had to write mapping in code . But why it creates new instances when we set it using property in MS Access Form Comment : Calling help file through code solved the problem still the mystery of why it opens multiple instances of help when we set using property Help File Context ID of form .", "Question : null .. . Answer : I m trying to use SVG-Graphics in a CHM-File . The CHM is created by HTML Help Workshop . Unfortunately the svg files don t show in my compiled chm . Everything works fine in HTML .. . .. . I already added this meta to display my SVG Graphics .. . .. . I need to copy my SVG-Graphics in my project .hhp file . How I can do this Comment : possible duplicate of SVG Graphics in CHM Html Help Workshop http : stackoverflow.com questions 24026440 svg-graphics-in-chm-html-help-workshop Comment : I already saw this topics but for me the problem is to copy my sources files .svg into my project .hhp Comment : See if this answer http : stackoverflow.com a 22697322 113116 helps . Comment : Yes I just solved my problem now with this solution . Thanks a lot dude :", "Question : I want to create a chm file for my application . Which is the best and easiest free software available I tried HTML Help Workshop but it is very tough . Is there any free software available Comment : CHM files are fairly out of date . It s not even supported anymore . I doubt you re going to find a lot of great utilities to edit them . What s wrong with HTML Help Workshop Comment : how to add images there Comment : Did you read the help file It s probably in CHM format Comment : As far as alternatives a Google search suggests : etextwizard.com easychm.html http : www.etextwizard.com easychm.html and chmeditor.com http : www.chmeditor.com and chmprocessor.sourceforge.net http : chmprocessor.sourceforge.net .. . Answer : CHM help file is what The original software is used by most of the extension HLP help file WinHelp but with the development of the Internet this format help files have been difficult to adapt to the need of software online help as well as more and more humane and simple and easy to view the need therefore a new help file system HTML Help from Microsoft takes the lead in the use of Windows98 the . Because it is a compressed webpage collection not only reducing the file size more conducive to the user downloaded from the INTERNET and also supports HTML Java JScript ActiveX Visual Basic Scripting and a variety of image-formats . JPEG . GIF and . PNG thus quickly by the majority of software author and software users . However its use is far more than these Here we have to siege novels made into an easy to read the electronic version of the novel as an example a step by step to let you understand CHM to help document the entire process of production through this introduction I believe you will certainly be able to make more of their own whim to electronic documents . The public who wishes to do his work well must first sharpen his tools . or to introduce our production tools . Produced CHM files tool most commonly used is the most easy to use than the Microsoft HTML Help Workshop it fully installed after only 4.6M comprises two groups : HTML Help tool set Workshop and HTML Help Image Editor . The former is today we will use good Dongdong the latter in the webpage making used to edit and modify the graphics file . Install HTML Help Workshop in the start menu you can program HTML Help Workshop to open it . To establish a CHM help file must first be we all want to appear in the help file contents into relatively independent webpage file HTML file these can work in HTML Help Workshop to complete can also be applied to other webpage editor such as FontPage or HotDog to make . For example we here as examples of the siege can according to the different sections to make . In addition the HTML file should be linked to each other as each chapter should be retained and between a and the next chapter super link interface these relatively independent webpage production is completed save them to a new folder . First we introduce some will use transition file : .. . .. . 1.hhp file which is one of the most common types of documents it is actually HTML Help project the abbreviation said HTML help documentation project it is the most used directly to generate CHM file a class file need to have only one HHP file can be compiled according to its corresponding CHM files . 2.hhc file it is HTML Help table of contents the abbreviation is expressed in HTML help file directory we usually in the CHM file browser on the left side of the window to see the directory content it provided of course it does not directly be compiled into CHM files but must be integrated into a HHP file to play a role in . 3.hhk file it is HTML Help Index Keyword the abbreviation provides us with a CHM file keyword indexed search function also a easy to view the help file is an indispensable part of with HHC files it can direct the compiler to generate the corresponding CHM file . 4.hhj file it actually does not belong to us today to discuss the content because it belongs-to another help files in the system Win Help in Win Help system the HHJ file is equivalent to the role of HTML Help in the HHP file here is not to make more detailed introduction . We now know that to build a CHM file the first to establish a HHP file . The first Workshop in the file menu select new a project then there will be known as the new project window there will be a Wizard prompted whether you will use for the WinHelp project file i.e . . HPJ to create new projects can be converted WinHelp project options is ticked off click next and then specify the will to establish the HHP file name and the complete path then enters the next step this time there will be three complex options they are expressed in the existing HHC HHK HTML file to create a HHP file since there is no readily available HHC and HHK files so we can only choose one last HTML Files click next to be in the subsequent new project -- HTML files window we have already made good the web documents in order to add to the list of files click next you can see the pleasant completed button but this doesn t mean that be accomplished because this step is just set up a HHP file there are still a lot of work for us to do it . A HHP file form will be in the Workshop project window displays the document structure double-click the window OPTIONS option you can modify the project structure for example to specify the title of the item the specified CHM file for the default home page files and text encoding type and font in the document window also can be specified to be generated by the CHM file name and path specify compile-time required HHC and HHK path and name etc. . Above we have introduced the HHC HHK document they need not may according to need to decide whether to generate the include directories and search help documentation in general the total number of pages less help file can omit the content and function of . Control the electronic version of the novel Besieged City pages we decided to simply first then can perform the file menu compile command Workshop in confirming the HHP file path and name . Soon an electronic version of the novel was generated so although it is a separate file but it can be completely out of your machine run from Workshop requires more than IE4.0 support . A relatively simple CHM help file no directory no index production process is that if you want to make including contents and index of the help file can be separately produced a HHC file and a HHK file and then in the last step will add them into the appropriate project in may . HHC established and edited in two ways one is in the file menu and select new a table of contents in the subsequent appearance of the edit window to edit it another method is formed in the HHP file editor window click on the directory window select create a new directory file and named the corresponding editor . After the introduction now you can edit their own production to help document and electronic document it Workshop uses there are many one of the other has to say is : it can not only build a CHM file can be on existing CHM files decompile so that we can more directly from the and the use of some of the production of very fine to help document some of the highlights sometimes a bit of take-ism feel good . Comment : While you have obviously spent a great deal of time on the content of this answer the Google translation leaves much to be desired . This answer requires rewriting and I m not entirely sure why it has been accepted in its current form .", "Question : It would appear that CHM help files are no longer the help file-format of choice . WinHelp .. . - obsolete .. . .. . HtmlHelp CHM .. . - not supported on Vista by default .. . - does not work well on a network share .. . .. . Help 2 HXS .. . - I understand this is used in VS2005+ for displaying help .. . .. . Web Based .. . - Could be hard to manage for multiple versions .. . .. . What help file-format would you use in a new C application that provides multiple versions from the same codebase We would like to use CHM help however it doesn t appear to be the direction that Microsoft wants us to move in . Does anyone employ HXS for their help files Feeback appreciated .. . .. . .. . .. . Update based upon lassevk comments .. . .. . Looks as though HXS help is not intended to be used for normal help projects . .. . Answer : Adobe RoboHelp http : www.adobe.com products robohelp productinfo features can be used to author help content that has content index search glossary and works in a browser as is HTML-generated . Supports 35 languages . We have a Flex-based web app that uses this for managing the app s help content . The Flex app and its help system work on most browsers on Windows MacOSX Linux .", "Question : What is the best way to create a chm file if possible Could someone provide opensource tools for this job Comment : possible duplicate of What are good tools for creating compiled HTML help files .chm http : stackoverflow.com questions 6023 what-are-good-tools-for-creating-compiled-html-help-files-chm .. . Answer : You can use the Html Help Workshop tools from Microsoft . Its free . http : www.microsoft.com downloads details.aspx FamilyID 00535334-c8a6-452f-9aa0-d597d16580cc DisplayLang en http : www.microsoft.com downloads details.aspx FamilyID 00535334-c8a6-452f-9aa0-d597d16580cc DisplayLang en", "Question : The short story : I can generate a CHM file with Doxygen . Launching the CHM file I observe that the Contents and Index tabs do list the pages namespaces classes and members of those classes . However clicking on the items in those Contents and Index lists do not display any content . I am on a computer using Windows 7 Professional SP1 64-bit . I use Doxywizard to run Doxygen version 1.8.9.1 on my code . It correctly generates the HTML output the pages namespaces classes and members appear in the documentation . I then further want to convert the HTML into a compressed HTML CHM file . I downloaded the Microsoft HTML Help Workshop version 1.31 i.e . htmlhelp.exe version 4.74.8703 from the Microsoft website https : msdn.microsoft.com en-us library windows desktop ms669985 v vs.85 .aspx . I ran the installer . As the installer was proceeding a popup message appeared : .. . .. . This computer already has a newer version of HTML Help . However installation completed successfully . And the hhc.exe program is there where I told it to install . I now specify these relevant Doxygen settings : .. . .. . Wizard -- Output : .. . HTML is checked .. . prepare for compressed HTML .chm option is selected . Expert -- HTML : .. . GENERATE HTMLHELP YES .. . CHM FILE Foo.chm .. . HHC LOCATION C : Program Files x86 Microsoft HTML Help Workshop hhc.exe .. . .. . When I run Doxygen again it reports an error : .. . .. . The Foo.chm file is generated where expected . But as described above it is missing a lot of content . I tried running hhc.exe manually on the HHP file generated by Doxygen . It does not indicate any errors . However the result is the same : a Foo.chm file that is missing content . I subsequently found that I had another installation of the HTML Help Workshop on my computer . But the hhc.exe was the exact same version . So that is not likely the problem . Can you suggest what else I can try to get all the documentation content to display in the CHM file .. . Answer : The essential problem was that the CHM file was on a mapped network-drive . When I copied the CHM file to a physical drive on my computer all the content displays .", "Question : I would like to open topic in merged chm file in master chm file windows . I have main chm file of application help . So this main chm file includes sub chm file . And I would like to open the topic in sub merged chm file in the window of main chm file by calling htmlhelp function . The following is header file in main chm project.And operation ACORD geometry.chm is merged chm file . Now I m using Adobe robohelp . And I call htmlhelp function by following way . But The topic don t open . . help 3DFEMGeo.chm is main chm file . Please teach me the way to open topic in the sub chm . .. . Answer : Creating modular help systems has some benefits by merging indexes and TOCs of multiple help projects but overcoming the wall is difficult some times . Some parts of the following instructions have been posted many years ago by Sean Stagmer . For context-sensitive help see also content and links at the bottom : .. . .. . http : www.help-info.de en Help Info HTMLHelp hh context-id.htm .. . .. . Long story short HTH - please try for your needs and environment : .. . .. . And the stories long version : .. . .. . RoboHelp e.g . and many other Help Authoring Tools HAT s are a IDE front end for utilizing the Microsoft HTML Help compiler hhw.exe . The designers of RoboHelp s older versions did a pretty good job of separating the technical aspects of building an HTML compiled help file but left out several features available if you used the underlying tool directly . Specifically modular help . I assume that most people who investigated this topic learned about adding the following to their help project file the .hhp to begin designing a modular HTML help system : .. . .. . Now tackling the subject of context-sensitive help AND merged files in a modular-design adds a new twist : How can the topic ID be mapped to the appropriate merged HTML file Being modular the topic ID is not in the master host help file but is instead integrated into it through the merged sub-help project s .chm file . This is accomplished by placing the following code in the master host master s TOC file : .. . .. . With these two additions the MERGE FILES statement and the addition to the TOC file the correct resolving of topic id s to their help topic information is complete EXCEPT that you notice that the HTML help window shows ONLY the TOC for the sub-help project it mapped to The master host TOC doesn t show up at all . What gives The answer lies in the alias file for the master host project . Being a good little HTML help content developer you knew to map the topic id of interest to the appropriate sub-help file by modifying the simple alias syntax like this : .. . .. . ...to this : .. . .. . That little ms-its : thing is very much like the http : or ftp : text you type into a web browser : it s known as an Asynchronous Pluggable Protocol from Microsoft . The : : portion of it is a reference a kind of level of indirection or reference alias in C++ parlance . So to solve the problem of having the context-sensitive help topic BOTH map to the correct help topic html text AND keep the TOC synchronized with the master you must add an additional level of indirection to make it work as shown below : .. . .. . This can be read as meaning this : When displaying the help topic HID TOPIC ID1 information open Master.chm then navigate to SubHelpSubject1.chm s HTML file Topic 1.htm then move down the page to the bookmark Topic1 . Hooray Your topic pops up and the master host TOC is visible as well Like thinking in C++ terms the alias file looks very much like how we would reference functionality in a C++ class : .. . .. . As a side note this syntax is being replaced by XML - HTML help will reference a Collection as specified in a collection file .col which has XML entries in it . Much easier to read and follow than the obtuse PERL-like syntax in the alias file .", "Question : I m trying to interface the htmlhelp api which is a big word for one function in two variants and I have a problem with the following usecase : .. . .. . Assume I have a simple programmer s editor with a bunch of helpfiles .CHMs . Some are from the core runtime library some from more exotic libraries . Assume the CHMs are crafted normally and their indexes contains all keywords I want to search . I want to be simply able to search through the various CHMs when a user presses F1 on a keyword in the editor .. . .. . So roughly I want in pseudo code : .. . .. . I ve played a bit with HH HELP TOPIC but that would pop-up a window for every attempted file and worse it would be dog slow since the CHMs would not remain cached . Is there really no solution except DIY with e.g . chmlib Or is it worth making a study of merged CHM files first Language is Delphi or clone but anything win32 COM and somewhat readable will do . edit Search results for nested index entries might be the next problem : HTML Help keyword lookup http : stackoverflow.com questions 563012 html-help-keyword-lookup 1384551 1384551 edit .. . .. . update 2 After a long time I got a potential hint elsewhere . Craft a CHM runtime that merges all the other CHMs . Windows will generate CHWs for it containing all the slave CHM s TOC and indexes . Requires Binary TOC off and Binary Index on though for all slave CHMs and a CHM compiler installed available . But since that is CHM workshop default that might be not too bad . .. . Answer : Do you want to create an index or do a one-time search for these keywords Couldn t you extract the HTML content from the CHM files with logical filenames search the HTML content and relate that back to the CHM file Comment : I want to work via the Windows API . I can already open and process the CHMs outside of that I generated them with own code without MS compiler but I d prefer to use the windows system on windows .", "Question : I am trying to make doxygen documentation using doxywizard and then fine tuning using HTML Help Workshop . I wanted to create two Topics under the root and both pointing to different section in a same Page . I can use add Topic and can add two listing under Root section1 and section 2 but How can I link it with the two section in the same page of the document . Basically creating two hyper link in the same page so the two topics can point to each separately . enter image description here http : i.stack.imgur.com nqvzd.png .. . .. . I wanted to create Section1 and Section2 under Root just like Topic 1 and Topic 2.Where Section 1 and 2 should point to the same page s different section . Or is there any Tool for the same Comment : Please note you can edit your .hhc File and add a URL suffix as a anxhor by a text-editor . Of course you need to insert the anchor in your HTML file and compile again . Comment : The sample snapshots below show the added anchor syntax . BTW - the .hhc file is the source for the Table of Contents TOC navigation pane of .CHM . So with some experience you can edit the URL and add the named anchor e.g . SecondAnchor by your text Editor . .. . Answer : There are many helpauthoring tools out there . Microsoft s HTMLHelp Workshop is nearly 20 years old stuff but free . E.g . search for FAR HTML as a low priced tool or many other ones . If you really want to edit the CHM file generated by Doxygen of course you can do that . But this has a learning curve in help authoring and in using HTMLHelp Workshop . In your Doxygen destination folder you ll find the HH files with extension .hhp project file . You may know you can edit the .hhp .hhk and .hhc files by your preferred text-editor like e.g . Notepad++ . As I understand you want to jump to section1 and section2 in the same file . I think you have to add a anchor tag in the HTML file . So you can specify the target URL including the anchor . 1 . Open the .hhp in HH Workshop .. . 2 . Select the Contents tab .. . 3 . Select a topic .. . 4 . Click the pencil icon Edit selection .. . 5 . Click the Edit button .. . 6 . Browse to your topic and select .. . 7 . NOTE : Add you named anchor manually . enter image description here http : i.stack.imgur.com oD5mj.png .. . .. . enter image description here http : i.stack.imgur.com Zs5ur.png", "Question : We were shipping .hlp files to customers when development was in VC++ . The process to create it was as follows : .. . 1 . Create rtf file .. . 2 . Create new project in WinHelp and then compile to get .hlp file . Now development has moved to .net and also I found that we can no longer open .hlp files in windows-7 or vista . I wanted to know if there are any free command-line tools using which we can convert these .hlp files to a .chm file .. . .. . Also I wanted to know if there are any free command-line tools to convert .rtf file to .chm .. . Answer : Keep in mind that CHM is compiled HTML and not very related to html so your main problem is conversion of rtf to html .. . .. . I would try to convert RTF to HTML but on a topic per file . What you could try is to input the RTF into word and try to save-as HTML and then use a program script to split out the various topics to individual files and fixup references . Then compile the result with a CHM compiler like MS htmlhelp workshop", "Question : I am using Qt 4.6 so do C++ . I have a User Manual .chm for my application which has the help required for the users to run the application . Now I want this help to be integrated into my application so that when the user selects for help from the application the user-manual will be opened with the corresponding help page displayed . In this way I can make use of the already available manual and users will find easy to probe through the document . since it is familiar .. . .. . The user-manual file is in the .chm format which has corresponding search keywords which can be used to display the corresponding page when selected from the application . Just similar to F1 help in any of the windows application . Is it possible to do this in Qt or C++ Or .. . .. . What are the other ways through which the help can be integrated in the application .. . .. . Any pointers regarding this are welcome. . .. . Answer : Yes it s possible . The help system infrastructure was designed to integrate with normal Win32 development in Visual Studio but this is not technically necessary . Basically you just call HtmlHelp GetDesktopWindow Yourhelp.chm HH HELP CONTEXT IDYourCurrentContext . Comment : Can you elaborate on HtmlHelp function . Basically am used to Qt but the function does sound like a VC++ one . Comment : It s not VC++ specific but a general Win32 API function . Include Htmlhelp.h and link-to Htmlhelp.lib you get these by installing HTML Help workshop but I presume you already have these if you made a .chm Comment : Cool. . Is it possible for me to pass the value for Index item from this function so that it directly loads the desired page Comment : The precise value doesn t matter as long as your application and the .chm agree .", "Question : The short story : I can generate a CHM file with Doxygen . Launching the CHM file I observe that the Contents and Index tabs do list the pages namespaces classes and members of those classes . However clicking on the items in those Contents and Index lists do not display any content . I am on a computer using Windows 7 Professional SP1 64-bit . I use Doxywizard to run Doxygen version 1.8.9.1 on my code . It correctly generates the HTML output the pages namespaces classes and members appear in the documentation . I then further want to convert the HTML into a compressed HTML CHM file . I downloaded the Microsoft HTML Help Workshop version 1.31 i.e . htmlhelp.exe version 4.74.8703 from the Microsoft website https : msdn.microsoft.com en-us library windows desktop ms669985 v vs.85 .aspx . I ran the installer . As the installer was proceeding a popup message appeared : .. . .. . This computer already has a newer version of HTML Help . However installation completed successfully . And the hhc.exe program is there where I told it to install . I now specify these relevant Doxygen settings : .. . .. . Wizard -- Output : .. . HTML is checked .. . prepare for compressed HTML .chm option is selected . Expert -- HTML : .. . GENERATE HTMLHELP YES .. . CHM FILE Foo.chm .. . HHC LOCATION C : Program Files x86 Microsoft HTML Help Workshop hhc.exe .. . .. . When I run Doxygen again it reports an error : .. . .. . The Foo.chm file is generated where expected . But as described above it is missing a lot of content . I tried running hhc.exe manually on the HHP file generated by Doxygen . It does not indicate any errors . However the result is the same : a Foo.chm file that is missing content . I subsequently found that I had another installation of the HTML Help Workshop on my computer . But the hhc.exe was the exact same version . So that is not likely the problem . Can you suggest what else I can try to get all the documentation content to display in the CHM file .. . Answer : In your doxyfile put the path to hhc.exe in double quotes since it contains spaces . Or even better do not use paths with spaces ." ] }
[ "yes-answer-long", "yes-answer-short" ]
file-format
UNK_RELATION
glomosim@wireless@122
glomosim -- global mobile information system simulator glomosim is a network protocol simulation software that simulates @placeholder and wired network systems .
{ "confidence": [ 53.50316619873047, 50.991546630859375, 43.20448303222656, 41.64971923828125, 37.4783935546875, 27.943706512451172, 26.65326690673828, 25.651329040527344, 24.301727294921875, 24.248714447021484, 17.888647079467773, 17.888647079467773, 17.888647079467773 ], "content": [ "I am using glomosim to configure my protocol authenticated routing protocol for ad hoc networks .", "Because from the research paper when i get to know about the protocol it was implemented in Glomosim itself .", "My aim is to compare the QoS factors of various MANET protocols like AODV DSR DSDV for which I have decided to use Glomosim simulator.I have installed Glomosim in my windows-8 laptop but I am unable to see any visual representation of nodes and links.Please Help me to figure out how to use this simulator for analyzing QoS .", "Please suggest a good one form the list below .. . .. . NS2 or or Opnet or GloMoSim .. . .. . if you have any more suggestions please do let me know .", "I am planning to implement a concept in MANET Mobile Ad hoc network and I am trying to simulate the same please suggest a good simulator .", "There is one more simulator .", "The name is ONE simulator for such ad hoc networks .", "i can provide you the help if you need in configuring the simulator", "The moral of the story is that the selection simulator is depends upon what exactly you want to do in MANETs .", "I am not sure which one would be ease of use and which one is good in simulation as I am doing this for the first time .", "Many thanks Balaji", "So i wanna improve the performance of it .", "it depends upon your particular problem area space ." ] }
{ "confidence": [ 96.07400512695312, 73.4714584350586 ], "content": [ "Question : I am planning to implement a concept in MANET Mobile Ad hoc network and I am trying to simulate the same please suggest a good simulator . I am not sure which one would be ease of use and which one is good in simulation as I am doing this for the first time . Please suggest a good one form the list below .. . .. . NS2 or or Opnet or GloMoSim .. . .. . if you have any more suggestions please do let me know . Many thanks Balaji .. . Answer : I am using glomosim to configure my protocol authenticated routing protocol for ad hoc networks . Because from the research paper when i get to know about the protocol it was implemented in Glomosim itself . So i wanna improve the performance of it . The moral of the story is that the selection simulator is depends upon what exactly you want to do in MANETs . it depends upon your particular problem area space . There is one more simulator . The name is ONE simulator for such ad hoc networks . i can provide you the help if you need in configuring the simulator", "Question : null .. . Answer : My aim is to compare the QoS factors of various MANET protocols like AODV DSR DSDV for which I have decided to use Glomosim simulator.I have installed Glomosim in my windows-8 laptop but I am unable to see any visual representation of nodes and links.Please Help me to figure out how to use this simulator for analyzing QoS ." ] }
[ "yes-answer-long", "yes-answer-short" ]
wireless
UNK_RELATION
richfaces@jsf@51
richfaces -- richfaces is a component library for @placeholder and an advanced framework for easily integrating ajax capabilities into business applications .
{ "confidence": [ 45.00066375732422, 41.43180465698242, 40.94406509399414, 39.935699462890625, 39.935699462890625, 39.402469635009766, 39.402469635009766, 38.963348388671875, 38.963348388671875, 38.04812240600586, 38.04812240600586, 38.04812240600586, 38.04812240600586, 38.04812240600586, 38.01344680786133, 38.008460998535156, 37.804725646972656, 37.6748046875, 37.57765197753906, 37.56283950805664, 37.03191375732422, 36.86623764038086, 36.86623764038086, 36.86623764038086, 36.86623764038086, 36.68911361694336, 36.68838882446289, 36.674827575683594, 36.67401123046875, 36.67401123046875, 36.67401123046875, 36.67401123046875, 36.65052795410156, 36.55260467529297, 36.43543243408203, 36.43543243408203, 36.43543243408203, 35.96775436401367, 35.96775436401367, 35.943763732910156, 35.77607345581055, 35.77552795410156, 35.77552795410156, 35.386077880859375, 35.33403778076172, 35.33403778076172, 35.33403778076172, 35.33403778076172, 35.33403778076172, 35.33403778076172, 35.33403778076172, 35.33403778076172, 35.33403778076172, 35.33403778076172, 35.33403778076172, 35.05657196044922, 34.934078216552734, 34.934078216552734, 34.890899658203125, 34.87005615234375, 34.866905212402344, 34.866905212402344, 34.77215576171875, 34.698673248291016, 34.63063430786133, 34.43555450439453, 34.43555450439453, 34.43555450439453, 34.41851043701172, 34.41851043701172, 34.41851043701172, 34.41851043701172, 34.244720458984375, 33.6276969909668, 33.6276969909668, 33.55840301513672, 33.55840301513672, 33.55840301513672, 33.54587173461914, 33.54587173461914, 33.54587173461914, 33.54587173461914, 33.54587173461914, 33.52324295043945, 33.52324295043945, 33.52324295043945, 33.52324295043945, 33.500186920166016, 33.27628707885742, 33.27628707885742, 33.27628707885742, 33.27628707885742, 33.27628707885742, 33.27628707885742, 33.27628707885742, 33.27628707885742, 33.27628707885742, 33.27628707885742, 33.27628707885742, 33.27628707885742 ], "content": [ "For basic functionalities use the standard ajax for advanced ones use RichFaces ajax .", "livedemo.exadel.com richfaces-demo richfaces tabPanel.jsf http : livedemo.exadel.com richfaces-demo richfaces tabPanel.jsf", "My richfaces library version is 4.3 .", "Probably a bug in RichFaces .", "RichFaces fails and throws an exception .", "I had a richfaces organizer calendar with events in richfaces 3 .", "might be a silly question but.. . can you mix richfaces 3 with richfaces 4", "This question already has an answer here : .. . .. . RichFaces 3 to RichFaces 4 migration questions 12585086 richfaces-3-to-richfaces-4-migration 2 answers .. . .. . In my project I am using RichFaces .", "From the Richfaces docs : .. . .. . signature must match java.lang.Object action .. . .. . http : livedemo.exadel.com richfaces-demo richfaces support.jsf tab info cid 1615759 http : livedemo.exadel.com richfaces-demo richfaces support.jsf tab info cid 1615759", "I am migrating my application from RichFaces 3.3.3 to Richfaces 4.0.0 .", "I am looking for something like rich : popupPanel in RichFaces 4 but then for RichFaces 3 .", "You need RichFaces 3 RichFaces 4 does not work with JSP .", "It was working fine for richfaces 3.3 but after migration to richfaces 4 it stopped working .", "In case of RichFaces 3 this is normally processed by the org.ajax4jsf.Filter which is missing in RichFaces 4 .", "Is it a bug in richfaces", "I m using richfaces 3.3.3", "Richfaces supplies it with rich : columns in richfaces 3.3.3-final but for Richfaces 4 they seem to recommend c : forEach .", "I want to hide a richfaces ajax component when the component itself is clicked and render something else an h : outputtext in its place .", "Check the RichFaces 3.3 live demo for rich : modalPanel and rich : dataTable example : Edit Table with ModalPanel http : livedemo.exadel.com richfaces-demo richfaces dataTable.jsf tab editDataTable", "I am very new to RichFaces .", "I m using richfaces a4j : support tag to make AJAX calls to the backing bean .", "I m using JSF and RichFaces .", "I m new on seam and richfaces .", "BTW : this isn t RichFaces specific .", "Check the richfaces showcase", "We are migrating our application from Richfaces 3.3 to Richfaces 4.3.7.Final .. . .. . The a4j : commandButton and a4j : commandLinks are not partially rendering the page after the ajax call .", "I am using RichFaces 3.3.3 :", "You added RichFaces as user defined library instead of web library .", "The documentation of RichFaces 3.3.x clearly states that RichFaces requires WebLogic 9.1 or 10.0 docs.jboss.org richfaces 3.3.2.GA en devguide html http : docs.jboss.org richfaces 3.3.2.GA en devguide html TechnicalRequirements.html .", "process -attribute should do the trick : http : livedemo.exadel.com richfaces-demo richfaces commandButton.jsf tab info cid 321214 http : livedemo.exadel.com richfaces-demo richfaces commandButton.jsf tab info cid 321214", "In RichFaces 4.1 you can disable skinning by adding the following to your web.xml .. . .. . I found this and other parameters at http : docs.jboss.org richfaces latest 4 1 X javadoc richfaces-core-impl org richfaces application CoreConfiguration.Items.html", "Did you try alternative JS API provided like rich : component mp .show in link livedemo.exadel.com richfaces-demo richfaces http : livedemo.exadel.com richfaces-demo richfaces modalPanel.jsf c modalPanel", "An example : .. . .. . Check RichFaces VDL http : docs.jboss.org richfaces latest 4 5 X vdldoc index.html rich popupPanel.html for more info .", "We have an application using MyFaces 1.2 with richfaces 3.3.3 running on WebSphere Application Server v7 and have encountered an issue using a4j component in richfaces .", "Are you following the example on the Richfaces demo site http : livedemo.exadel.com richfaces-demo richfaces dropDownMenu.jsf jsessionid 5A4E4F0D809B18C3C1B1EC91E71EA001 c dropDownMenu tab usage", "I cannot get the Richfaces wizard example http : livedemo.exadel.com richfaces-demo richfaces include.jsf c include tab usage to work in GateIn 3.1 .", "And it is also available in the documentation : http : docs.jboss.org richfaces 3.3.X 3.3.3.Final en apidoc impl . . apidoc impl is used for richfaces-impl . . apidoc is used for richfaces-ui .", "When i moved to richfaces .", "I m using Richfaces 3.3.3 .", "Your code does not suggest so rich : popupPanel is not a component in RichFaces 3 .", ".. . .. . might be a silly question but.. . can you mix richfaces 3 with richfaces 4 .. . .. . No you can t .", "We have following jar files in our project richfaces-components-api-4.3.4 richfaces-components-ui-4.3.4 richfaces-core-api-4.3.4 and richfaces-core-impl-4.3.4 .", "You should probably use rich : columns to render dymanic number of columns : livedemo.exadel.com richfaces-demo richfaces http : livedemo.exadel.com richfaces-demo richfaces columns.jsf tab usage cid 1222466", "The link contains an example of richfaces 4 popuppanel : richfaces popuppanel example http : showcase.richfaces.org richfaces component-sample.jsf demo popup sample login skin blueSky .. . .. . Here is the code : .. . .. . But the popup is appearing in random places i.e .", "I m using RichFaces 3.3 .", "Also this doesn t seem to concern RichFaces .", "t is for tomahawk and a4j is a richfaces prefix .", "which richfaces version you are using", "RichFaces 4.0.0 Milestone 1 is Released", "I am using Richfaces 4 .", "Which version of Richfaces are you using", "I am using richfaces 4.2.3", "I have JSF RichFaces project .", "What version of RichFaces are you using", "I am working in Jsf with Richfaces .", "You d need to fiddle with RichFaces specific ajax API in order to figure that .", "As a different alternative you can also just use the rich : list http : richfaces-showcase.appspot.com richfaces component-sample.jsf demo list skin blueSky component instead which renders the complete ul li for you already .", "http : showcase.richfaces.org richfaces component-sample.jsf demo collapsiblePanel skin blueSky http : showcase.richfaces.org richfaces component-sample.jsf demo collapsiblePanel skin blueSky .. . .. . and here is the line where i used the tag :", "We don t use RichFaces .", "I am currently using the JBoss RichFaces http : www.jboss.org jbossrichfaces JSF component library for the project I am working on .", "have you tried using rich : fileUpload tag component from RichFaces", "Richfaces component was not working as expected coz of usage of external jQuery plugin .", "For example .. . .. . or .. . .. . which is in turn to be used like .. . .. . See also : .. . .. . a4j : jsFunction component reference http : docs.jboss.org richfaces latest 4 0 X Component Reference en-US html chap-Component Reference-Actions.html sect-Component Reference-Actions-a4jjsFunction .. . a4j : jsFunction showcase example http : richfaces-showcase.appspot.com richfaces component-sample.jsf demo jsFunction skin blueSky", "Check out the sortBy and sortOrder attributes of rich : dataTable http : livedemo.exadel.com richfaces-demo richfaces dataTable.jsf tab info cid 1272202 and rich : column http : livedemo.exadel.com richfaces-demo richfaces dataTable.jsf c column tab info .", "@BalusC not duplicated I m using Richfaces not Primefaces .", "We re migrating from Richfaces to Primefaces .", "Richfaces had a nice feature resp .", "I will post it in RichFaces issue tracker .", "I work on a JSF 1.2 application with Richfaces 3.3 .", "I don t think there is js API provided by richfaces for this .", "I want to know both options as in jsf and richfaces .", "I m using Richfaces 4.2 and yes it s an a4j : commandButton .", "Richfaces does not have a bunch of common components like the star rating component captcha component and password strength .", "It is reasonable to upgrade JSF and RichFaces", "Upgrade to RichFaces 4.x .", "Platform .. . .. . RichFaces : 4.2.2.Final .. . Spring : 3.1.1.RELEASE .. . .. . Cheers", "I am trying to preserve state of a table using RichFaces .", "I tried giving id to the column and the richfaces tableState string honored that .", "I am using a Richfaces picklist http : livedemo.exadel.com richfaces-demo richfaces pickList.jsf tab usage cid 5212106 and I want to populate the right-side panel with a list of SelectItems from my backing bean .", "I had the following Maven dependencies declared with the RichFaces 4.2.2Final BOM listed earlier : .. . .. . HOWEVER the richfaces-components-ui is a super-set of richfaces-ui-validator-ui that is contains it and a few others .", "For example .. . .. . lenght for rich : popupPanel http : docs.jboss.org richfaces latest 4 X vdldoc rich popupPanel.html .. . .. . selectedClass for rich : extendedDataTable http : docs.jboss.org richfaces latest 4 X vdldoc rich extendedDataTable.html .. . .. . label for rich : column http : docs.jboss.org richfaces latest 4 X vdldoc rich column.html", "I ve found out the ExtendedTableDataModel class in latest 3 3 X http : docs.jboss.org richfaces latest 3 3 X en apidoc impl org richfaces model ExtendedTableDataModel.html but not in 3.3.3.Final http : docs.jboss.org richfaces 3.3.X 3.3.3.Final en apidoc .", "RichFaces ResourceHandler interpretes this resource dependency as dependency to .. . .. . javax.faces : jsf.js .. . jquery.js .. . richfaces.js .. . richfaces-base-component.js .. . .. . So the CombinedResourceHandler needed some extra functionality to seperate dependencies to ordinary Resources from Richfaces ResourceLibraries .", "It s in core-impl inside META-INF richfaces the latest version of RichFaces is 4.5.4", "You seem to be reading RichFaces 3.x documentation or just have upgraded RichFaces 3.x to 4.x .", "See the docs : docs.jboss.org richfaces latest 3 3 X en tlddoc a4j http : docs.jboss.org richfaces latest 3 3 X en tlddoc a4j commandLink.html", "possible duplicate of Dynamic columns with richfaces 4 http : stackoverflow.com questions 13835552 dynamic-columns-with-richfaces-4", "I just copy the source from richfaces showcases here http : showcase.richfaces.org richfaces component-sample.jsf demo ajax skin blueSky but the page cannot function until I press Enter seems the ajax event is not working in my case .", "This works fine with JSF 1.2 and RichFaces 3.x .", "Also I m using JSF 1.1 and RichFaces 3.3.3 .", "I am pretty new to JSF and RichFaces .", "I am using JSF 1.2 richfaces 3.3.3", "It was using JSF1.2 Seam 2.2 and Richfaces 2.x .", "In RichFaces 4.X the correct value is bottomLeft .", "I use richfaces 3.3.3 and seam 2.2.2.final .", "We currently use Seam 2.2 Richfaces with Hibernate .", "richfaces-xxx-4.5 works with JSF 2 .", "Richfaces according to documentation states that it supports weblogic 8.1 .", "The workaround seems to work fine with f : ajax but not with a4j : ajax richfaces .", "Is the fix supposed to work with richfaces out-of-the-box" ] }
{ "confidence": [ 55.89805221557617, 53.78227996826172, 53.181190490722656, 53.07028579711914, 49.58760452270508, 49.13535690307617, 48.841915130615234, 48.44011688232422, 48.068599700927734, 46.73686218261719, 46.43360900878906, 45.415199279785156, 45.32714080810547, 45.208744049072266, 45.177486419677734, 45.177486419677734, 44.302635192871094, 44.06147384643555, 44.018585205078125, 43.93793869018555 ], "content": [ "Question : I am using JSF 2.0 and I am looking for a copmponent library with minimal load in terms of performance . Which one is better to use if I have choice between RichFaces and PrimeFaces What are the advantages and disadvantages of both Comment : Try this primefaces.org showcase ui dialog.jsf http : www.primefaces.org showcase ui dialog.jsf Comment : RichFaces is poorly designed poorly engineered poorly documented and even more poorly managed as a product . And under very slow development . I ve been using it for six years and I am about to drop it completely for PrimeFaces . Comment : Three part of difference between PrimeFaces vs RichFaces vs IceFaces in JSF : Part 1 http : geekonjava.blogspot.com 2015 08 primefaces-vs-richfaces-vs-icefaces-in-jsf-part1.html Part 2 http : geekonjava.blogspot.com 2015 08 primefaces-vs-richfaces-vs-icefaces-in-jsf-part2.html and Part 3 http : geekonjava.blogspot.com 2015 08 primefaces-vs-richfaces-vs-icefaces-in-jsf-part3.html .. . Answer : Here is my comparison : .. . .. . Richfaces is definitely more mature and possibly you may get developers who are experts in . Primefaces has more components but lack combobox available in Richfaces . Richfaces does not have a bunch of common components like the star rating component captcha component and password strength . Primefaces is easier to skin since it is based on themeroller . It also has more themes than that is available in Richfaces . Primefaces is tiny and can be implemented in the code easily - not too many dependencies . Richfaces does not support JSF 2.0 till now Nov 2010 - Primefaces has a stable release that supports JSF 2.0 .. . Richfaces component growth is pretty much absent.. . No new components added in the last few years . The component library remains stale . My recommendation : .. . .. . Choose Primefaces if your application is client facing and need many AJAX components . Choose Richfaces or Primefaces if it is an application that is used by your internal clients . Hari Gangadharan", "Question : I am currently using the JBoss RichFaces http : www.jboss.org jbossrichfaces JSF component library for the project I am working on . It works quite well in general especially the AJAX support provided by ajax4jsf A4J but I find the usually very inflexible table-markup used for almost every component and all this skin stuff of RichFaces quite annoying . It would be nice if there were some components which just provided the functionality and only minimal markup style . Originally I had planned to use ICEfaces but that didn t work too well either and also brings a lot of predefined styles with it so for now RichFaces seems to be the best option . Now I thought it would be nice to develop a clean tag library which provides some useful components found in RichFaces ICEfaces or Tomahawk not all of course which don t use any predefined style and generate markup which can be styled easily with CSS . I wanted to use the ajax4jsf library for AJAX support because I think it works quite nicely and integrates seamlessly into standard JSF with facelets . But it seems that since it has moved over to JBoss it isn t available as a standalone library anymore . You can only download the whole RichFaces package which I don t want . Is the ajax4jsf A4J project dead If it is what alternatives are there .. . Answer : If you read the ajax4jsf forum http : www.jboss.org index.html module bb op viewtopic t 112221 you ll see that it s been merged with Richfaces . You don t have to use the Richfaces components on your page so do you have an issue with having the JARs in your project I agree that many JSF components not just Richfaces are based on tables eg . h : selectManyCheckbox . Don t forget that it s easy to write a new renderer for many of these . I ve done this for the h : selectManyCheckbox http : www.blog.locuslive.com p 15 so that the checkboxes are rendered inside divs instead of a table . I would think that you should be able to do the same for Richfaces components...but if that s the case then why use them You may find it easier nicer using jQuery UI elements and tie them back to your Beans with a4j : jsFunction or similar . Comment : I knew that they somehow merged it but thanks for the link-to the official statement . As it seems I can t use A4J in another library-project because I would always have to carry some RichFaces stuff with it . As you suggest combining jQuery with a4j seems to offer the greatest flexibility which is the reason why it would be nice to have a standalone A4J lib . Comment : it doesn t carry anything with it in terms of page weight - just jars in your WAR EAR . Also if you want to hook up other javascript based UI frameworks easily check out the REST support in Seam 2.1.2 . Fantastic stuff .", "Question : I am currently using the JBoss RichFaces http : www.jboss.org jbossrichfaces JSF component library for the project I am working on . It works quite well in general especially the AJAX support provided by ajax4jsf A4J but I find the usually very inflexible table-markup used for almost every component and all this skin stuff of RichFaces quite annoying . It would be nice if there were some components which just provided the functionality and only minimal markup style . Originally I had planned to use ICEfaces but that didn t work too well either and also brings a lot of predefined styles with it so for now RichFaces seems to be the best option . Now I thought it would be nice to develop a clean tag library which provides some useful components found in RichFaces ICEfaces or Tomahawk not all of course which don t use any predefined style and generate markup which can be styled easily with CSS . I wanted to use the ajax4jsf library for AJAX support because I think it works quite nicely and integrates seamlessly into standard JSF with facelets . But it seems that since it has moved over to JBoss it isn t available as a standalone library anymore . You can only download the whole RichFaces package which I don t want . Is the ajax4jsf A4J project dead If it is what alternatives are there .. . Answer : Just a comment . I started using icefaces . I m a web designer also and im very particular on look-and-feel of the icefaces components in relation to my web application . I was highly frustrated at the time it took me to override the look-and-feel of icefaces components using css . The components had a lot of nested table markup that annoyed me . When i moved to richfaces . I discovered it was alot easier to override the look n feel because richfaces have an integrated system of overriding the look n feel in css . The css given to the components had similar and sensible class names that made it easier to predict and override .", "Question : I am currently using the JBoss RichFaces http : www.jboss.org jbossrichfaces JSF component library for the project I am working on . It works quite well in general especially the AJAX support provided by ajax4jsf A4J but I find the usually very inflexible table-markup used for almost every component and all this skin stuff of RichFaces quite annoying . It would be nice if there were some components which just provided the functionality and only minimal markup style . Originally I had planned to use ICEfaces but that didn t work too well either and also brings a lot of predefined styles with it so for now RichFaces seems to be the best option . Now I thought it would be nice to develop a clean tag library which provides some useful components found in RichFaces ICEfaces or Tomahawk not all of course which don t use any predefined style and generate markup which can be styled easily with CSS . I wanted to use the ajax4jsf library for AJAX support because I think it works quite nicely and integrates seamlessly into standard JSF with facelets . But it seems that since it has moved over to JBoss it isn t available as a standalone library anymore . You can only download the whole RichFaces package which I don t want . Is the ajax4jsf A4J project dead If it is what alternatives are there .. . Answer : You can find many alternatives here : .. . .. . JSF AJAX Component Library Feature Matrix http : www.jsfmatrix.net Comment : Thank you I am looking into it.. . Comment : +1 useful URL. .", "Question : I am currently using the JBoss RichFaces http : www.jboss.org jbossrichfaces JSF component library for the project I am working on . It works quite well in general especially the AJAX support provided by ajax4jsf A4J but I find the usually very inflexible table-markup used for almost every component and all this skin stuff of RichFaces quite annoying . It would be nice if there were some components which just provided the functionality and only minimal markup style . Originally I had planned to use ICEfaces but that didn t work too well either and also brings a lot of predefined styles with it so for now RichFaces seems to be the best option . Now I thought it would be nice to develop a clean tag library which provides some useful components found in RichFaces ICEfaces or Tomahawk not all of course which don t use any predefined style and generate markup which can be styled easily with CSS . I wanted to use the ajax4jsf library for AJAX support because I think it works quite nicely and integrates seamlessly into standard JSF with facelets . But it seems that since it has moved over to JBoss it isn t available as a standalone library anymore . You can only download the whole RichFaces package which I don t want . Is the ajax4jsf A4J project dead If it is what alternatives are there .. . Answer : If you are feeling adventurous take a look at JSF 2 http : javaserverfaces.java.net . It features a shift in view technologies from JSP to Facelets http : facelets.java.net and built-in AJAX support http : javaserverfaces.java.net nonav docs 2.0 jsdocs index.html . David Geary has been running a series of JSF 2 fu http : www.ibm.com developerworks views java libraryview.jsp search by JSF+2+fu articles on developerWorks though you ll have to wait for part 3 for the AJAX stuff . Ed Burns http : weblogs.java.net blog edburns and Jim Driscoll http : weblogs.java.net blog driscoll have been demoing various features during the development of the new API so you might want to check out their blogs too . Comment : I am eagerly waiting for JSF 2 to get ready for production it would solve so many problems we currently have to work around.. .", "Question : I m migrating an application from jsf-1.2 to jsf2 . The application is enhanced with ajax using ajax4jsf . Should I migrate to standard jsf2 ajax functionality or to RichFaces ajax which seems to be similar to ajax4jsf Comment : Why negative votes Comment : Likely because your question is contextually primarily opinion based and technically already answered in the documentation . Questions in form of What should I choose do when considering multiple competing technologies are more eligible for downvotes as they invite a list of opinions as answers and separate the answers in camps . Stack Overflow is not suitable for such questions which can never have a single answer which is acceptable by everyone in the world . Better post such questions at a discussion forum or in a chatbox . .. . Answer : The only interesting link I have found so far is this one : .. . .. . http : www.slideshare.net maxkatz ajax-applications-with-jsf-2-and-new-richfaces-4-tssjs .. . .. . So the answer to my question should be : it depends . For basic functionalities use the standard ajax for advanced ones use RichFaces ajax .", "Question : null .. . Answer : I am new to JavaEE and now trying to setup a project using Richfaces 4.x with Geronimo v3 . I just copy the source from richfaces showcases here http : showcase.richfaces.org richfaces component-sample.jsf demo ajax skin blueSky but the page cannot function until I press Enter seems the ajax event is not working in my case . There is a warning : The page test.xhtml declares namespace http : richfaces.org a4j and uses the tag a4j : ajax but no TagLibrary associated to namespace . I am not sure why this warning . I am using Eclipse Luna to build and deploy the application . Library included : .. . .. . Library included http : i.stack.imgur.com TVaz8.png .. . .. . I am not sure I choose the right combination of the technology but finally I would aim to make the application run on WebSphere v8.5.5 . Thanks . Updates : .. . .. . 500 after adding Richfaces 4.2.3 as WEB-INF lib .. . .. . enter image description here http : i.stack.imgur.com CPy4l.png .. . .. . If I include Mojarra 2.1.6 into WEB-INF lib eclipse cannot deploy . Comment : You added RichFaces as user defined library instead of web library . So it doesn t end up in webapp s default runtime classpath . That is the problem . Is this acceptable as dupe stackoverflow.com questions 7005644 http : stackoverflow.com questions 7005644 classnotfoundexception-when-using-user-libraries-in-eclipse-build-path Comment : I tried to add my the richfaces as deployment assembly but I got 500 error then . Comment : Great this indicates that it finally ended up in the runtime classpath . That 500 error is just an obvious consequence of an exception in the application most likely caused by configuration or developer s mistake . Simply read server log to find the root cause so you can naildown and fix it .", "Question : I am using myfaces ExtensionFilter to upload a file but the file is not getting set to my bean for further processing . Here is the code : .. . .. . and web.xml configuration is as below .. . .. . Since UploadFile was not set to bean I also tried using ValueChangeListener never the less its not se to bean : .. . .. . Bean code .. . .. . Do you see any other configuration that I might be missing here Comment : have you tried using rich : fileUpload tag component from RichFaces or why don t you want to use it Also what versions of JSF RF and Tomahawk are you using Comment : Yes I had tried but since I also use external JQuery richfaces fileUpload was not behaving as expected . So had to implement as balusc.blogspot.in 2008 02 uploading-files-with-jsf.html gt http : balusc.blogspot.in 2008 02 uploading-files-with-jsf.html gt .. . Answer : It is not possible to upload files by ajax with current JSF and Tomahawk version . Ajax requests as created by JSF do not support nor use multipart form-data . Tomahawk is not an ajax based component library . Use a normal command button instead . Support for uploading files with ajax is scheduled http : java.net jira browse JAVASERVERFACES SPEC PUBLIC-802 for upcoming JSF 2.2 with new h : inputFile component . Alternatively you can use RichFaces own rich : fileUpload . Depending on the RichFaces version used it uses either Flash or an iframe hack under the covers to achieve asynchronous file uploading . Comment : Richfaces component was not working as expected coz of usage of external jQuery plugin . So had to do this way . But now it works fine :", "Question : I am using JSF 2.0 and I am looking for a copmponent library with minimal load in terms of performance . Which one is better to use if I have choice between RichFaces and PrimeFaces What are the advantages and disadvantages of both Comment : Try this primefaces.org showcase ui dialog.jsf http : www.primefaces.org showcase ui dialog.jsf Comment : RichFaces is poorly designed poorly engineered poorly documented and even more poorly managed as a product . And under very slow development . I ve been using it for six years and I am about to drop it completely for PrimeFaces . Comment : Three part of difference between PrimeFaces vs RichFaces vs IceFaces in JSF : Part 1 http : geekonjava.blogspot.com 2015 08 primefaces-vs-richfaces-vs-icefaces-in-jsf-part1.html Part 2 http : geekonjava.blogspot.com 2015 08 primefaces-vs-richfaces-vs-icefaces-in-jsf-part2.html and Part 3 http : geekonjava.blogspot.com 2015 08 primefaces-vs-richfaces-vs-icefaces-in-jsf-part3.html .. . Answer : Both are cool . Richfaces is more developed and tested generally since primefaces came out later than RF . Just have a look at the component showcase and choose the one you prefer . Or even better you can use both together there are no compatibility problems . The advantages is that you have a lot of components ready to use out-of-the-box . The disadvantage is that sometimes you don t have full control about what a component can or can t do but you can always create your own component extending a library component and that you have to load some libraries into the client-side for them to work make sense but it decreases performance Comment : Well Richfaces doesn t even have a JSF2-compatible release yet... . Comment : RichFaces 4.0.0 Milestone 1 is Released so start with that and grab the GA when it comes out Comment : Well the milestone is missing many components . Only some are represented .", "Question : I have the following code .. . .. . Problem : Even if I have not specified status commonstatus in h : inputText I still get the loading image for onkeyup event . What am I missing here Any help would be great . .. . Answer : The a4j : status by default applies for all the components in the page that fire an ajax request . However you can restrict the components that will be caught using the for attribute as stated in the tag component documentation http : livedemo.exadel.com richfaces-demo richfaces status.jsf tab info : .. . .. . for : ID of the AjaxContainer component whose status is indicated in the format of a javax.faces.UIComopnent.findComponent call . Comment : thank you : works like a charm Comment : You re welcome :", "Question : I have a rich datatable with columns that I can filter . For the total I can sum all the amounts in sessionScope.paymentsBean.payments to get the total . Which is 355.00 in the following example . However if I filter by Visa the table and total would look like : .. . .. . The total should be 150 but getTotal doesn t know about the filterBy data . Is there a way to dynamically calculate the total based on the filterBy criteria from the rich : datatable Comment : Can you specify RichFaces and JSF versions you are using Comment : Sure I m using JSF 1.2 and Richfaces 3.3.3 Final . I can t do any upgrading of these libraries since this is part of a bigger project but it ll be nice to know if JSF 2 or Richfaces 4 has support for it . Comment : JSF 2 with PrimeFaces you can do it for sure because Datatable is binded to two list the main one and the filtered one so you have the filtered list always available in your backing bean . With PF 1.2 and rich 3.3 I think I did something similar I ll take a look . .. . Answer : There s a way to recover the filtered data . You need the table to be binded to a backing bean property and you need it to be a rich : extendedDataTable http : docs.jboss.org richfaces 3.3.X 3.3.3.Final en tlddoc rich extendedDataTable.html . rich : extendedDataTable value sessionScope.paymentsBean.payments var payment id table binding sessionScope.paymentsBean.table .. . .. . Binded attribute will be HTMLExtendedDataTable http : docs.jboss.org richfaces 3.3.X 3.3.2.GA en apidoc org richfaces component html HtmlExtendedDataTable.html type . After that you will need to create an Ajax call when user types something in the filter to be called . See a4j : support http : docs.jboss.org richfaces latest 3 3 X en devguide html a4j support.html component and use it when a key is pressed as : .. . .. . a4j : support event onkeyup reRender countBox action sessionScope.paymentsBean.actionCalculateTotalValue .. . .. . Remember calling Ajax method on filterings can be tricky http : stackoverflow.com a 2279874 1199132 . I sincerely suggest to avoid the table s built-in filters and create your custom ones based in h : inputText and implement your ajax calls here . You can take a look into this link http : mkblog.exadel.com 2008 11 richfaces-filtering-with-custom-function . Once the method is called you just need to obtain the filtered rows calculate the total amount and put in in a variable over which JSF will update the box when the call is finished . What s the way to get the filtered rows There you have : .. . .. . Basically it makes a loop until there are no more available rows in the table . Good luck .", "Question : null .. . Answer : We have an application using MyFaces 1.2 with richfaces 3.3.3 running on WebSphere Application Server v7 and have encountered an issue using a4j component in richfaces . The ajax request does not appear to be submitting and we are seeing the following js error in firebug : .. . .. . ReferenceError : A4J is not defined .. . .. . It appears to be attempting to load the following resource - a4j g 3 3 3.Finalorg.ajax4jsf.javascript.AjaxScript.xhtml however it is returning 0 byte file . This issue is intermittent and is resolved by restarting the web application server . We have recently migrated web server from SunOne to Apache could this be related Any other ideas Thanks in advance", "Question : This question already has an answer here : .. . .. . RichFaces 3 to RichFaces 4 migration questions 12585086 richfaces-3-to-richfaces-4-migration 2 answers .. . .. . In my project I am using RichFaces . When I click on the a4j : commandButton button which is used for saving the page as a pdf a4j : status is shown on the page and then pdf window opens with Cancel and Ok buttons . I proceed to click on the Ok button . After that the Ajax loader is still shown . It does not hide even though the page is getting refreshed manually . Here is my code : .. . .. . Any idea how to hide the a4j : status after pdf window is closed .. . Answer : Try adding the attribute name ajaxStatus to a4j : status :", "Question : I am looking for something like rich : popupPanel in RichFaces 4 but then for RichFaces 3 . I haven t found anything like in documenation . There is only rich : modalPanel which doesn t suit my needs because it has problems displaying my datamodel in table . The selection doesn t work it always returns no rows selected . If I put my table component in rich : panel or rich : togglePanel then it works fine . Is there any popup window excluding rich : modalPanel in RichFaces 3 .. . Answer : I dont have 50 reputation to ask you more details in a comment so i will answer directly hoping this is what you re asking about . I think you mean that your problem is that the content of the ModalPanel is not rerendered dynamically . but for this you can wrap your table or the components you want to update in an a4j : outputPanel with ajaxRendered true .. . .. . Setting ajaxRendered true will cause the a4j : outputPanel to be updated with each Ajax response for the page even when not listed explicitly by the requesting component . This can in turn be overridden by specific attributes on any requesting components . .. . http : docs.jboss.org richfaces latest 4 0 X Component Reference en-US html chap-Component Reference-Containers.html sect-Component Reference-Containers-a4joutputPanel .. . .. . In my code I have something like : .. . .. . that opens the modalPanel : .. . .. . So my content is updated with the results of my timelineBean.doGenerateLog method each time i open the modalPanel . Comment : Indeed it s a working solution just wanted to add that it s usually not wanted to have the panel content rendered on every ajax request especially requests not related to the panel like field ajax validations etc . . For this case I would recommend to explicitly re-render the panel when button link is clicked reRender modalPanelId and do not do ajaxRendered true . Comment : +1 that is also an even better solution for simple taks . Depends on the complexity of what he wants to do . So I d also refer to limitRender true in case he wanted to reRender only some specific components and not all who have ajaxRendered true cheers", "Question : I m hoping to use a custom richfaces skin to handle the bulk of my presentation work . Unfortunately richfaces renders borders around every cell in a calendar component and around each panel . I would like to turn them off so that day numbers site in an open grid with no borders . There is no obvious way to do that using skins or attributes of the calendar control . I could use custom CSS but I d prefer to work with the framework to completely remove the border related properties from the stylesheets created by richfaces rather than work against the framework and override everything using ugly CSS . So how do I stop richfaces adding borders to panels and calendars .. . .. . This guy has a similar problem http : www-02.imixs.com : 8081 roller ralphsjavablog entry richfaces 5Fbackground 5Ffor 5Finput 5Ffields .. . Answer : There is a skin called plain that s got nearly no styles at all attached to it . Here s an excerpt from the documentation http : docs.jboss.org richfaces latest 3 3 X en devguide html ArchitectureOverview.html SkinParametersTablesInRichFaces : .. . .. . Skin plain was added from 3.0.2 version . It doesn t have any parameters . It s necessary for embedding RichFaces components into existing projecst which have its own styles . You can activate it by adding .. . .. . to the web.xml . .. . .. . You can also hinder RichFaces to load any styles at all with .. . .. . set in the web.xml . But beware since it won t work in JBoss Portlet Bridge 1.0.0 https : issues.jboss.org browse PBR-63 . Comment : Thanks You saved me : Comment : plain still renders too much CSS", "Question : I m hoping to use a custom richfaces skin to handle the bulk of my presentation work . Unfortunately richfaces renders borders around every cell in a calendar component and around each panel . I would like to turn them off so that day numbers site in an open grid with no borders . There is no obvious way to do that using skins or attributes of the calendar control . I could use custom CSS but I d prefer to work with the framework to completely remove the border related properties from the stylesheets created by richfaces rather than work against the framework and override everything using ugly CSS . So how do I stop richfaces adding borders to panels and calendars .. . .. . This guy has a similar problem http : www-02.imixs.com : 8081 roller ralphsjavablog entry richfaces 5Fbackground 5Ffor 5Finput 5Ffields .. . Answer : RichFaces has a skin system built-in called Skinnablity . Skinnability is a high-level extension of standard CSS . You can create your own skin file to use in your application jboss documentation http : www.jboss.org file-access default members jbossrichfaces freezone docs devguide en html ArchitectureOverview.html CreatingAndUsingYourOwnSkinFile . In the richfaces-impl jar the folder META-INF skins contains all the skin files .skin.properties . Copy one and rename name it modify what you want . You will have to rebuild the jar . OR .. . .. . You can use the plug-n-skin http : www.jboss.org file-access default members jbossrichfaces freezone docs devguide en html ArchitectureOverview.html PlugnSkin feature of richfaces which i ve never tried before but looks like it would also work for what you are trying to do .", "Question : I am starting out a new project that involves the use of JSF 2.0 . From my initial reading the Mojarra and Apache Implementation of the project covers the basic components that you will need . But I know that user s would seek gui with better presentation such as panel tab accordion slider etc.. . Currently there are other implementation that I am seeing the Primefaces RichFaces and Icefaces . But I cant find a good article that discusses which among the three are the best . I have used Spring MVC before but I use JqueryUI for those widget . Now that I am into component based framework I would like to use the best JSF Implementation . I would like to know metrics such as performance interoperability ease of use support . Sorry if my question might be vague but I would like to hear comments before I select my JSF Vendor Implementation . Thanks . Comment : Please note that IceFaces RichFaces and PrimeFaces are not JSF implementations . They re component libraries . You still need a JSF implementation as basis to be able to use component libraries . .. . Answer : I have successfully used JBoss RichFaces on a large online B2B store . RichFaces is a quite good framework for building webapps Web 2.0 style and have easy to use tags that help you develop features faster . I do not have any metrics regarding performance between RichFaces and IceFaces Primefaces but the ease of development should be approximately the same . All three frameworks have similar components and they are all working towards more and more logic on the client via JavaScript . At the current state of the JSF libraries I am fairly sure that you will be happy with whichever framework your choose . IMO RichFaces and IceFaces are the two frameworks that have been around the longest and i would put my bet on one of these two . IIRC both frameworks have key developers in the JSF design group as well . As a general rule of thumb these framework should work interoperably but I wouldn t mix and match between them . The frameworks are really ment to be used on their own . Comment : thanks for the input . Just would like to ask can I use RichFaces even if I will deploy it to othe JEE server Say Glassfish or Weblogic JBoss created this one so I am not sure if they are limiting this product to run on JBoss only . Comment : @Mark I have used other JBoss libraries on Tomcat and Glassfish in the past without trouble . It shouldn t be an issue but I would certainly prototype it first . Comment : +1 on NOT mix and matching component frameworks I have never seen this done cleanly . Comment : I am successfully using JBoss RichFaces in an embedded Jetty application . No problems with that what so ever . I expect that you can include RichFaces with any Servlet Container or Application Server without any issues .", "Question : Is it possible for the CombinedResourceHandler http : showcase.omnifaces.org resourcehandlers CombinedResourceHandler to ignore RichFaces JS files When I let omnifaces combine all JS files including RichFaces with Richfaces optimisation off .. . .. . I get the following exception .. . .. . However regardless of what I enter in the context-param org.omnifaces.COMBINED RESOURCE HANDLER EXCLUDED RESOURCES I am unable to exclude any of the Richfaces resources . I tried param values such as .. . Answer : You need to supply the exact resource identifiers . Those aren t valid RichFaces resource identifiers . You seem to have guessed them . You can easily determine them by looking at the generated HTML output when not using CombinedResourceHandler . Given a context path of playground and JSF mapping of .xhtml it ll look something like this : .. . .. . The part after the javax.faces.resource without JSF mapping is the resource name . The part in the ln request parameter is the resource library however as you probably observed RichFaces has none . The resource identifier is represented by library : name notation or just name if there s no library . So this should do it for you : .. . .. . Note that disobeying the resource library and homebrewing another layer over it is indeed a severe mistake of RichFaces . See also among others What is the JSF resource library for and how should it be used http : stackoverflow.com questions 11988415 what-is-the-jsf-resource-library-for-and-how-should-it-be-used .. . .. . .. . .. . Unrelated to the concrete question I can t reproduce issue 39 anymore using RichFaces 4.3.6 . Feel free to reopen the issue at GitHub https : github.com omnifaces omnifaces issues along with the minimum information necessary to reproduce the problem ourselves starting with a completely blank project . Comment : thanks for your quick reply . I must confess I did attempt to guess the param values as nothing seemed to work but even values without a resource identifier such as just richfaces.js has no effect . They always seem to be combined . Comment : p.s I defined the context params in web.xml Comment : Works for me . Have you read and understood the first part of the answer which explains how to determine them Have you applied this information in your particular case In any way you d better tell minimum information necessary to reproduce the problem ourselves starting with a completely blank project for example RichFaces version etc . Comment : You were right thank you - it seemed to be a custom function that was swallowing up most of richfaces.js file . Comment : @MathieuCastets : Nope unfortunately not . Idea isn t bad tho .", "Question : I try to run RichFaces4 app but the components don t render . For example when I try this demo : Demo http : livedemo.exadel.com richfaces-demo richfaces tabPanel.jsf c tabPanel tab usage I get something like this : .. . .. . My code is almost the same as in the demo . I just added form tag becouse it complained for it . Comment : Try again... . There is no way we can help you with what you just posted . Try posting some of the source you used . Comment : Rightclick page in browser view-source does it look right i.e . no single line of unparsed JSF code . Comment : It doesn t look good . This part is a little bit suspicious for me : Here is tab 1 div script type text javascript new RichFaces.ui.Tab .. . Comment : That part is fine . It s the generated HTML JS code . Do you have Firebug Didn t it tell anything about errors in downloaded resources E.g . missing JavaScript files and on . Comment : That s what Crome Developer Tools told me img571.imageshack.us i rfnotdefined.jpg http : img571.imageshack.us i rfnotdefined.jpg Uncaught ReferenceError : RichFaces is not defined I use RF 4 JSF 2.0 eclipse Tomcat7 if that will help . .. . Answer : That s what Crome Developer Tools told me http : img571.imageshack.us i rfnotdefined.jpg Uncaught ReferenceError : RichFaces is not defined .. . .. . This means that the necessary JavaScript files of RichFaces are not been supplied in the generated HTML head . You need to ensure that you re using the JSF h : head http : download.oracle.com javaee 6 javaserverfaces 2.0 docs pdldocs facelets h head.html component instead of plain HTML head in the template . This is namely mandatroy for the new JSF 2.0 resource injection mechanism JSF and RichFaces will inject Ajax UI-related JavaScripts Stylesheets in there . I however wonder if anything has been logged in the server log about the lack of the h : head . Keep an eye on the server logs .", "Question : I m running a Tomcat 7 JSF 2.2 OpenWebBeans 1.6 Omnifaces 1.8 and Richfaces 3 . I recently added the Omnifaces CombinedResourceHandler and noticed that it causes a datatable s value method to be called despite the method being in an unrendered block when the form on the page is submitted . Example : .. . .. . I have a simple test bean : .. . .. . Normally the getStrings isn t called because the panelGroup is set to not be rendered . However when I run both Omnifaces CombinedResourceHandler and Richfaces getStrings is called when the submit button is pressed more than once . This only seems to affect the value attribute of the h : dataTable component . Other el expressions don t get invoked . I set up a small sample project with the following maven dependices : .. . .. . I am not using any richfaces components in the project or on the test page . I am merely including Richfaces as a dependency . I don t have any javascripts that get combined . If I disable the Omnifaces CRH or remove Richfaces from the pom file it works as expected . I tried using Richfaces 5 but I get a similar behaviour there although the getter is called fewer times . I have not tried the latest Omnifaces version since it isn t compatible with OWB 1.6 . Anoter point of interest might be that if I surround the datatable with a JSTL c : if it works . But I don t want to have to do that obviously .. . .. . .. . Am I doing something wrong here Is there a compatibility issue between these versions Omnifaces CRH and Richfaces Edit : Call stack from the datatable s getter Comment : The latest version of RichFaces is 4.5.11.Final 5.x was scrapped not that I think it helps . Calling the getter is certainly unnecessary but does it cause any issues Comment : Figured I should reply to you as well Even if we fix the badly constructed getters it could lead to performance issues if @PostConstructs are called more often than expected . Not likely to be a huge issue .. . but it feels very unnecessary . .. . Answer : First of all getter methods are not supposed to perform business logic : When should I load the collection from database for h : dataTable http : stackoverflow.com questions 5765853 when-should-i-load-the-collection-from-database-for-hdatatable . Once you fix your getter method to solely return the property the concern of it being called multiple times becomes completely unnecessary . Coming back to the observed behavior the getter method of an unrendered h : dataTable may be called at unexpected times when code performs a UIComponent visitTree http : docs.oracle.com javaee 7 api javax faces component UIComponent.html visitTree-javax.faces.component.visit.VisitContext-javax.faces.component.visit.VisitCallback- without VisitHint SKIP UNRENDERED https : docs.oracle.com javaee 7 api javax faces component visit VisitHint.html SKIP UNRENDERED and or VisitHint SKIP ITERATION https : docs.oracle.com javaee 7 api javax faces component visit VisitHint.html SKIP ITERATION . The CombinedResourceHandler itself isn t doing that . At least not directly . It only manipulates the component resources in the component tree . It however has a RichFaces specific hack https : github.com omnifaces omnifaces blob 9540ffec4f1f9ebd01a4d82a38f226446f919572 src main java org omnifaces resourcehandler CombinedResourceHandler.java L430 in-place in order to extract its homegrown resource library approach . Still its source code http : grepcode.com file repo1.maven.org maven2 org.richfaces.core richfaces-core-impl 4.3.7.Final org richfaces resource ResourceLibraryFactoryImpl.java ResourceLibraryFactoryImpl doesn t seem to trigger a visitTree anywhere . To nail down the real cause just put a debug breakpoint on the getter method and explore the call stack who is responsible for the call . As to the apparent JSTL c : if aversion the word obviously is a bit too strong here this is food for read : JSTL in JSF2 Facelets.. . makes sense http : stackoverflow.com questions 3342984 jstl-in-jsf2-facelets-makes-sense .. . .. . That said latest OmniFaces 1.x release is the 1.8.3 not 1.8 . See also download http : omnifaces.org download section . It would also be worth the effort to upgrade Mojarra to latest which is as of now 2.2.12 . Comment : Thanks for the reply . I know that getters shouldn t perform business logic . There s some legacy code doing things it shouldn t and I ve no issues fixing this where I ve found it . I was asking more to prevent something similar to happen unexpectedly . It does seem like UIComponent visitTree is in the call stack actually . From what I can tell it doesn t take SKIP UNRENDERED into consideration . It doesn t seem to be as-if OmniFaces is in there .. . I ve updated my post with the call stack . Any ideas Comment : Right it s done by Facelets FaceletViewHandlingStrategy.reapplyDynamicActions . This will happen during a rebuild of a dynamically manipulated view the CRH removes components . I only wonder why the view is rebuilt during render response . This is usually unnecessary . Perhaps you re navigating to a different view using POST instead of GET Comment : In my small test app I just have a view with a commandButton and a datatable . When the method is run as unrendered FacesContext at least still believes that it s doing a postback . But it s a bit curious .. . I can press the commandButton once without the unrendered method being called . It s when I do it more than once that it works that is if I keep making postbacks to the same view . If I completely refresh the page e.g . just navigating to it via url again it starts over with one button click working and the rest triggering this behaviour ." ] }
[ "yes-answer-long", "yes-answer-short" ]
jsf
UNK_RELATION
xctool@ios@97
xctool -- xctool is a replacement for apple s xcodebuild that makes it easier to build and test @placeholder and mac projects .
{ "confidence": [ 49.73268508911133, 48.84669494628906, 47.856014251708984, 47.856014251708984, 46.69717788696289, 45.93787384033203, 45.93787384033203, 45.93787384033203, 45.76531982421875, 45.529842376708984, 45.30828094482422, 44.375064849853516, 44.375064849853516, 44.237545013427734, 43.276920318603516, 42.514137268066406, 41.997703552246094, 41.49957275390625, 41.41389465332031, 41.14310836791992, 40.838871002197266, 40.838871002197266, 40.69004821777344, 40.46929931640625, 40.46929931640625, 40.3740234375, 40.37128448486328, 40.340736389160156, 40.340736389160156, 40.152183532714844, 40.152183532714844, 40.152183532714844, 40.03673553466797, 39.995269775390625, 38.99334716796875, 38.99334716796875, 38.951839447021484, 38.951839447021484, 38.595375061035156, 38.4371223449707, 38.20344924926758, 38.180057525634766, 37.92156982421875, 37.65099334716797, 37.604454040527344, 37.2795524597168, 36.8858642578125, 36.8734130859375, 36.8734130859375, 36.8734130859375, 36.8734130859375, 36.8734130859375, 36.69032287597656, 36.69032287597656, 36.49970245361328, 35.714576721191406, 35.714576721191406, 35.714576721191406, 35.714576721191406, 35.531490325927734, 35.29781723022461, 35.29781723022461, 35.13906478881836, 35.13906478881836, 35.110809326171875, 34.32568359375, 34.32568359375, 34.32568359375, 34.20372772216797, 34.20372772216797, 34.14259338378906, 33.85194396972656, 33.68207550048828, 33.23851776123047, 32.696441650390625, 32.456932067871094, 32.456932067871094, 32.456932067871094, 32.456932067871094, 32.456932067871094, 32.27968215942383, 32.048160552978516, 31.55270004272461, 31.500747680664062, 31.298095703125, 31.298095703125, 31.298095703125, 31.298095703125, 31.298095703125, 30.982568740844727, 30.13028335571289, 30.05768394470215, 29.97119903564453, 29.909198760986328, 29.803956985473633, 29.803956985473633, 29.753948211669922, 28.47525405883789 ], "content": [ "I run xctool build and xctool -scheme ProjectTests -sdk iphonesimulator test successfully .", "I have tried to build with xctool .", "I didn t I skip xctool entirely and use xcodebuild clean instead", "xctool will not replace xcodebuild contrary to what they state on their Github page .", "I m happy to use xcodebuild or xctool or any other tool to accomplish this .", "Is there a way to skip the clean build-process using xctool", "xctool doesn t do a clean build by default .", "I m experiencing failures while running xctool build .", "Tests with xctool work locally but there appears to be a problem with xctool on travis .", "I solved my problem by using xcodebuild instead of default test script that uses xctool .", "Since the xctool is built upon xcodebuild this answer might help .", "xctool doesn t by default .", "xctool will continue to support testing", "xctool xctool.sh ARCHS i386 -sdk iphonesimulator -workspace Test.xcworkspace -scheme Test build CONFIGURATION BUILD DIR home test build", "In most cases you can just swap xcodebuild with xctool and things will run as expected but with more attractive output .", "I try the build xctool -workspace FastAnimationWithPop.xcworkspace -scheme FastAnimationWithPopDemo -sdk iphonesimulator build test it s the same result .", "When I use xctool to build with simple command : .. . .. . it works just fine .", "It may be related to github.com facebook xctool issues 311 https : github.com facebook xctool issues 311 .", "Which version of xctool are you using", "Then I get the following error : .. . .. . I don t get why xctool looks for test cases in Applications Xcode.app usr bin xcodebuild", "I needed to add SHARED PRECOMPS DIR PWD build onto the xctool command .", "I m also updating cocoapods and xctool to latest on the build script .", "I know the reason is xctool -workspace FastAnimationWithPop.xcworkspace -scheme FastAnimationWithPopDemo -sdk iphonesimulator build test only open the iphonesimulator 6 .", "Anyway I haven t tested yet but I m pretty sure it was fixed in xctool v0.2.5 cf github.com facebook xctool issues 311 https : github.com facebook xctool issues 311", "I m pretty sure it was fixed in xctool v0.2.5 cf github.com facebook xctool issues 311 https : github.com facebook xctool issues 311 but I haven t tested yet .", "So I ve come across xctool https : github.com facebook xctool an alternative for unit-testing made by Facebook and it looks really cool .", "Why is xctool xcodebuild unable to properly compile and sign this to get through to ITC while the native Archiver can", "Check the releases page for information : github.com facebook xctool releases https : github.com facebook xctool releases .", "Cross posted as an issue on the xctool github page https : github.com facebook xctool issues 657", "I see no reason to use xctool nowadays .", "Right now I am testing out xctool .", ".. . .. . Environment is Xcode 7.2 and xctool version 0.2.8 .", "However I run xctool clean and the following happens : .. . .. . 1st it runs xcodebuild clean Project successfully .. . 2nd it runs xcodebuild build clean which fails with the error : .. . Scheme Tests is not currently configured for the clean action .", "I can build it fine from Xcode but when I try to build it using xctool or travisci I get an error : .. . .. . I m guessing that xctool is using different parameters to build than Xcode does but not sure what is different or how to tell xctool to use those settings and then how to configure Travisci to use it too .", "Isn t that just xctool with some fancy integration", ": .. . .. . Using Kiwi v2.3.1 and xctool 0.2.3 .. . .. . Cheers Mo", "Using xctool the tests fail with the same errors that Travis is using as Travis uses xctool .", "From xctool CI tutorial https : github.com facebook xctool continuous-integration : .. . .. . Click the + button and add each dependency to the project .", "When I run my tests using Xcodebuild or Xctool I see that the tool builds and installs the app into the simulator but fails to run the test .", "I am using jenkins and xctool to continuously build and run unit tests on my iOS App .", "I am running test using xctool and I would like to be able to choose the simulator .", "I am using XCTest and can successfully run the test locally with xctool test .", "I can see that this Xctool Issue https : github.com facebook xctool issues 170 works with the same issue but my xctool is well updated to have all those fixes and I am still running into the same issue .", "This is what they say in the docs : .. . .. . Note : Support for building projects with xctool is deprecated and will not be updated to support future versions of Xcode .", "https : github.com facebook xctool issues 534 .", "I have similar issue as this one http : stackoverflow.com questions 22663294 xcodebuild-fails-when-run-from-jenkins-works-in-terminal .. . .. . I am trying to implement Test Reports of Xcode on Jenkins using xctool https : github.com facebook xctool .", "I got it installed but then I immediately run into issues with the xctool.sh file : .. . .. . Installation .. . .. . xctool can be installed from homebrew via .. . .. . brew install xctool or can be downloaded and run via the xctool.sh command .", "I have the .xctool-args file setup with all of the needed configuration .", "I run xctool clean -showTasks and have more details about the error .", "I now works with xctool v0.2+ tested on 0.2.2 0.2.3 and 0.2.5 .", "I solved the issue by removing -sdk iphonesimulator from the xctool command .", "In fact xctool would not work if the command-line tools are not installed on the system .", "I would like to run my tests using xctool without having to build the tests on the machine prior .", "You probably want the file produced by xctool build-tests which builds the tests but does not run them .", "xcodebuild doesn t have this problem as it either doesn t do unit tests discovery or ignore tests that didn t run a thing that xctool fails to do .", "You should make sure that xctool is launching the same simulator as Xcode .", "Has anyone been able to successfully pass the KW SPEC variable to xctool .", "I m using xctool 0.2.4 to run the tests and it executes well locally .", "This took quite a bit of finagling until xctool finally recognized the key and profile .", "I have an Xcode workspace with CocoaPods that I m trying to build using xctool on travis .", "For some strange unknown reason this test fails when running it in xctool 0.1.16 but passes when I run it through XCode .", "How can we tell xctool to adhere the scheme when specifying our test targets in -only", "This link also is similar to what we are encountering : xctool issue 2 https : github.com facebook xctool issues 162 Unfortunately we aren t using tmux so the solution does not apply .", "I m using xctool v0.1.16 for an iOS project which is configured as follows : .. . .. . a workspace .. . two targets Project and ProjectTests .. . two schemes Project and ProjectTests .. . .. . I have a .xctool-args file with the workspace and Project scheme configured .", "enter image description here http : i.stack.imgur.com iYMUm.png .. . .. . So I m kind of at a loss here exactly what is different between xcodebuild and whatever xctool is running .", "Do I still need to additionally specify script : xctool .. . command", "I found the xctool but the tool didn t found my UITestsTarget .", "xctool doesn t support Xcode UI testing now .", "Unfortunately the file is not copied when using xctool it says that the operation couldn t be completed as the file does not exist .", "When examining the paths printed by xctool file and paths do exist : .. . .. . I am totally stucked with this issue .", "we have an app integrated with today-extension we use xctool and Jenkins to do continuous build and in-house distribution .", "I have an iPad only application with a single scheme and two targets otto and ottoTests .. . .. . Working XCTool Commandline .. . .. . Xcodebuild - fail .. . .. . I get this error that .. . .. . A build only device cannot be used to run this target .. . .. .", "I m in a strange situation where I can get xctool to run my test but I cant figure out the equivalent command-line to get xcodebuild and or fastlane scan to run my tests .", "https : github.com facebook xctool building-tests .. . .. . If you just want to execute that test bundle you can do something like this :", "I m trying to run unit tests without the simulator using xctool .", "For compiling my objective-c project I need to be able to specify xctool parameters configuration and destination .", "What config do I need to change to make it evaluate to Debug-iphonesimulator so that xctool can find it", "when I use xctool in jenkins the console output is : .. . .. . Just can t find the reason .", "The last file output by xctool on the command-line is the path the final .xctest or at least it is for me .", "If you consider using xctool for building you may want to reconsider your choice .", "When I run xctool -project MyProject.xcodeproj -scheme MyProject test I get this error .", "I d like to have a build artifact that I can then pass into xcodebuild s test action .", "EDIT : When I run xctools from a terminal using xctool -workspace MyApp.xcworkspace -scheme MyApp -sdk iphonesimulator7.1 build test I get the above error .", "When running tests in parallel xctool will run each bucket of tests in a single process and run multiple buckets simultaneously in different processes .", "The problem is that Xcode now run all tests as application tests and xctool still distinguishes between logic and application tests .", "Questions I ask : .. . .. . 1 does xctool really run pod install somehow", ".. . .. . I ve tweaked xctool with -freshSimulator -freshInstall -destination iPhone 5 OS 7.1 and iPhone 6 OS 8.0 .", "I can run all the tests successfully with xctool but it doesn t seem to pick up the KW SPEC value .", "After this xcode will will gracefully use the passed KW SPEC variable xctool still has the skipped teste marked as failure issue .", "Xctool is not working in my Jenkins job v 1.598 but it works using Terminal .. . .. . This is the command-line : .. . .. . This is the error : .. . .. . I m using xctool 0.2.2 and the weird part of this is that I m running the same Jenkins job in my local machine and it works fine .", "xctool create IPA in jenkins .. . .. . I have some Run Script and Copy Files in Build Phases .. . .. . if build by Xcode : run Run Script and Copy Files then create IPA .. . .. . but build by xctool : create IPA then run Run Script and Copy Files .. . .. . Run Script and Copy Files change some files then create IPA new files in the IPA .. . .. . but create IPA before Run Script and Copy Files new files not in the IPA .. . .. . What should I do Run Script and Copy Files before create IPA", "you try this script .. . .. . xctool oclint .. . .. . xctool -workspace iWeidao.xcworkspace -scheme iWeidao -reporter json-compilation-database : compile commands.json clean build .. . .. . oclint-json-compilation-database -v oclint args -report-type html -o report.html -rc LONG LINE 120 open compile commands.json open report.html .. . .. . here https : github.com facebook xctool issues 270", "Even if only doing a dry-run xcodebuild spends a lot of time opening your projects and preparing to build .", "Xcode Version : 7.0.1 .. . Xctool Version : 0.2.7 .. . Simulator : IPhone 6 .. . OS : Yosemite 10.10.5 .. . .. . .. . Thanks", "You can do this to add the -destination flag to your xctool call in the .travis.yml : .. . .. . We automatically launch the simulator at the start of the build and it sounds like we might be starting an old simulator .", "I want to install xctool for for understanding and practice but I m not sure whether installing it completely replaces the xcodebulid or it will be a separate installation and will not affect my normal build from Xcode play button", "@Opal the same command-line works in terminal installing testing in Simulator I think the issue is related to xctool because it can t launch iOS Simulator", "This is what xctool spits out in the console : .. . .. . : .. . .. . From I figured out through trial-and-error that the test crashes at NSArray matches regex matchesInString : sample uuid options : 0 range : searchRange when it calls enumerateMatchesInString : options : range : usingBlock : ." ] }
{ "confidence": [ 71.91960144042969, 71.67318725585938, 71.17845153808594, 68.88459777832031, 64.30423736572266, 63.717308044433594, 61.317047119140625, 60.427032470703125, 59.9716796875, 57.6898193359375, 56.829200744628906, 56.29640579223633, 55.23804473876953, 55.15607833862305, 54.09357833862305, 53.74480056762695, 52.816017150878906, 51.6635627746582, 51.588409423828125, 51.36313247680664 ], "content": [ "Question : I want to install xctool for for understanding and practice but I m not sure whether installing it completely replaces the xcodebulid or it will be a separate installation and will not affect my normal build from Xcode play button .. . Answer : xctool will not replace xcodebuild contrary to what they state on their Github page . It is just built on top of xcodebuild so you don t have to worry about loosing your xcodebuild when you install it . In fact xctool would not work if the command-line tools are not installed on the system . If you consider using xctool for building you may want to reconsider your choice . This is what they say in the docs : .. . .. . Note : Support for building projects with xctool is deprecated and will not be updated to support future versions of Xcode . We suggest moving to xcodebuild with xcpretty for simple needs or xcbuild for more involved requirements . xctool will continue to support testing Comment : Thanks @lwaicko its of great help .", "Question : I m using xctool v0.1.16 for an iOS project which is configured as follows : .. . .. . a workspace .. . two targets Project and ProjectTests .. . two schemes Project and ProjectTests .. . .. . I have a .xctool-args file with the workspace and Project scheme configured . I run xctool build and xctool -scheme ProjectTests -sdk iphonesimulator test successfully . However I run xctool clean and the following happens : .. . .. . 1st it runs xcodebuild clean Project successfully .. . 2nd it runs xcodebuild build clean which fails with the error : .. . Scheme Tests is not currently configured for the clean action . It is strange because I don t have a Tests scheme at all . I run xctool clean -showTasks and have more details about the error . It runs and fails at .. . .. . However the same command executed separately finishes successfully . The workspace at var folders b7 472b skj24gf7wmw6c3krp5c0000gn T xctool temp KMbH0e Tests.xcworkspace simply references two projects the Project xcodeproj and Pods xcodeproj . It does contain a Tests scheme with a build action . Why does this command fail in the 1st place Any help is appreciated . Cheers . Comment : Edit : temp workspace and scheme now exist Comment : It may be related to github.com facebook xctool issues 311 https : github.com facebook xctool issues 311 . Comment : How did you resolve it at the end Comment : I didn t I skip xctool entirely and use xcodebuild clean instead Comment : I now works with xctool v0.2+ tested on 0.2.2 0.2.3 and 0.2.5 . .. . Answer : I fixed this issue by checking the shared box for the main scheme : .. . .. . 1 . Choose Product Scheme Manage Schemes . .. . 2 . Select the Shared option for the scheme to share and click OK . .. . .. . source : https : developer.apple.com library ios recipes xcode help-scheme editor Articles SchemeShare.html Comment : Which scheme are you talking about The Project ProjectTests or the temporary Tests Comment : Anyway I haven t tested yet but I m pretty sure it was fixed in xctool v0.2.5 cf github.com facebook xctool issues 311 https : github.com facebook xctool issues 311 Comment : I now works with xctool v0.2+ tested on 0.2.2 0.2.3 and 0.2.5 .", "Question : I m using xctool v0.1.16 for an iOS project which is configured as follows : .. . .. . a workspace .. . two targets Project and ProjectTests .. . two schemes Project and ProjectTests .. . .. . I have a .xctool-args file with the workspace and Project scheme configured . I run xctool build and xctool -scheme ProjectTests -sdk iphonesimulator test successfully . However I run xctool clean and the following happens : .. . .. . 1st it runs xcodebuild clean Project successfully .. . 2nd it runs xcodebuild build clean which fails with the error : .. . Scheme Tests is not currently configured for the clean action . It is strange because I don t have a Tests scheme at all . I run xctool clean -showTasks and have more details about the error . It runs and fails at .. . .. . However the same command executed separately finishes successfully . The workspace at var folders b7 472b skj24gf7wmw6c3krp5c0000gn T xctool temp KMbH0e Tests.xcworkspace simply references two projects the Project xcodeproj and Pods xcodeproj . It does contain a Tests scheme with a build action . Why does this command fail in the 1st place Any help is appreciated . Cheers . Comment : Edit : temp workspace and scheme now exist Comment : It may be related to github.com facebook xctool issues 311 https : github.com facebook xctool issues 311 . Comment : How did you resolve it at the end Comment : I didn t I skip xctool entirely and use xcodebuild clean instead Comment : I now works with xctool v0.2+ tested on 0.2.2 0.2.3 and 0.2.5 . .. . Answer : I fixed it by .. . .. . Unchecking auto create schemes in XCode scheme management .. . Removing and recreating the scheme s I wanted to build in your case Project and ProjectTests Comment : Thanks for your answer . I m pretty sure it was fixed in xctool v0.2.5 cf github.com facebook xctool issues 311 https : github.com facebook xctool issues 311 but I haven t tested yet . Comment : Unfortunately not that was the version I used also . Comment : OK thanks that s an interesting feedback I ll check on my side and update this issue asap . Comment : I now works with xctool v0.2+ tested on 0.2.2 0.2.3 and 0.2.5 . I m sure that auto create schemes was unchecked before and I m pretty sure I didn t recreate all my schemes so I don t really know how it got fixed though .", "Question : I am trying to setup travis to run my existing tests . I am using XCTest and can successfully run the test locally with xctool test . I have the .xctool-args file setup with all of the needed configuration . On Travis the build completes but xctest is crashing . Here is the crash log .. . Answer : This is more a workaround than an answer . Tests with xctool work locally but there appears to be a problem with xctool on travis . I solved my problem by using xcodebuild instead of default test script that uses xctool . Comment : Hoorah Finally got Travis working this way . I see no reason to use xctool nowadays .", "Question : I m in a strange situation where I can get xctool to run my test but I cant figure out the equivalent command-line to get xcodebuild and or fastlane scan to run my tests . I have an iPad only application with a single scheme and two targets otto and ottoTests .. . .. . Working XCTool Commandline .. . .. . Xcodebuild - fail .. . .. . I get this error that .. . .. . A build only device cannot be used to run this target .. . .. . enter image description here http : i.stack.imgur.com iYMUm.png .. . .. . So I m kind of at a loss here exactly what is different between xcodebuild and whatever xctool is running . .. . Answer : AFAICS you are missing the -destination argument in the xcodebuild command . Refer to this tutorial http : www.mokacoding.com blog xcodebuild-destination-options for sample code . Comment : so -d iOS Simulator should work .. . i ll give it a shot Comment : @Jeef please mark my answer as accepted if it helped you . Thanks in advance .", "Question : i try to run my Xcode UI Tests and just a specific method . It isn t possible with the default xcodebuild command-line from apple . I found the xctool but the tool didn t found my UITestsTarget . Here my command-line : .. . .. . and i got this error : ...ERROR : build-tests : UITestsTarget is not a testing target in this scheme . with xcodebuild list i can see all the informations about project and i see my UITestsTarget . has someone any ideas Cheers .. . Answer : xctool doesn t support Xcode UI testing now . https : github.com facebook xctool issues 534 . They told : At Facebook we are using our own infrastructure see https : github.com facebook webdriveragent to run E2E tests and as a result we aren t going to work on this feature in the nearest future .", "Question : null .. . Answer : Xcode does not support unit-testing in swift if you have multiple-projects . There is some low-level error importing the bridging header and who knows what else . So I ve come across xctool https : github.com facebook xctool an alternative for unit-testing made by Facebook and it looks really cool . However I find the documentation too sparse . I got it installed but then I immediately run into issues with the xctool.sh file : .. . .. . Installation .. . .. . xctool can be installed from homebrew via .. . .. . brew install xctool or can be downloaded and run via the xctool.sh command . .. . Usage .. . .. . xctool s commands and options are mostly a superset of xcodebuild s . In most cases you can just swap xcodebuild with xctool and things will run as expected but with more attractive output . .. . You can always get help and a full list of options with : .. . .. . path to xctool.sh -help .. . .. . I dont know what an xctool.sh file is or how to make one and there doesn t seem to be one in my project folder . Can you shed some light on what this file is and perhaps where I can learn how to make edit one Googling around like what is an xctool.sh file or how to make an xctool.sh file has not turned up anything useful .", "Question : null .. . Answer : I d like to use xcodebuild to build an app with a command like : .. . .. . xcodebuild -scheme my-app -workspace my-app.xcworkspace CONFIGURATION BUILD DIR tmp .. . .. . which will create a my-app.app in tmp . Then further down my CI pipeline I would like to use this generated app to test : .. . .. . xcodebuild some command to use my-app.app for testing test . Is this possible I m happy to use xcodebuild or xctool or any other tool to accomplish this . Comment : Scarcely seems worthy of adding as an answer but did you try this : developer.apple.com library ios technotes tn2339 index.html https : developer.apple.com library ios technotes tn2339 index.html apple ref doc uid DTS40014588-CH1-HOW DO I RUN UNIT TESTS IN OS X AND IOS FROM THE COMMAND LINE Comment : Hey thanks for looking into this . Unfortunately I have tried that but it s not what I need . I d like to have a build artifact that I can then pass into xcodebuild s test action .", "Question : null .. . Answer : I have a simple Xcode project with a few tests . When I use xctool to build with simple command : .. . .. . it works just fine . However when I try to build run my tests I get an error when trying to run them . I build test with : .. . .. . I run tests with : .. . .. . This complains that I need to specify SDK so I append the -sdk iphonesimulator . Then I get the following error : .. . .. . I don t get why xctool looks for test cases in Applications Xcode.app usr bin xcodebuild Comment : Are those your actual calls If so you probably have a different scheme defined for your tests and soit should look more like this : path to xctool.sh -workspace YourProject.xcodeproj -scheme YourSchemeTests run-tests", "Question : Has anyone been able to successfully pass the KW SPEC variable to xctool . I m trying to run a single KIWI spec by using https : github.com kiwi-bdd Kiwi wiki Kiwi-FAQ q-how-do-i-run-a-single-spec-describecontextit . I can run all the tests successfully with xctool but it doesn t seem to pick up the KW SPEC value . I ve tried it in a lot of different places with the command-line but no luck . e.g . : .. . .. . Using Kiwi v2.3.1 and xctool 0.2.3 .. . .. . Cheers Mo Comment : Have you ever succeeded in this I m trying to do the same with no luck . From reading the Kiwi code I gather : 1 KW SPEC is retrieved using NSProcessInfo processInfo environment which means build-time settings like you used above won t work - I believe you need to set it as an environment variable in the scheme see nshipster.com launch-arguments-and-environment-variables http : nshipster.com launch-arguments-and-environment-variables 2 The filename and line are compared against an atos result which appears consistent with the format you used but when I tried it myself nothing ran 0 tests executed Comment : Related source files : https : github.com kiwi-bdd Kiwi blob ae9f6d83faf774754ea60a9dfc6556eb23800f47 Classes Core KWExampleSuiteBuilder.m https : github.com kiwi-bdd Kiwi blob ae9f6d83faf774754ea60a9dfc6556eb23800f47 Classes Core KWSymbolicator.m . Related GitHub issue : github.com kiwi-bdd Kiwi issues 614 https : github.com kiwi-bdd Kiwi issues 614 . .. . Answer : Update 11 03 2015 .. . .. . @OhadSchneider s comment made me realise that KW SPEC worked for me because I had set it in the test configuration for my scheme Edit scheme- Test- Arguments- Environment variables . Setting the variable from shell doesn t work as that variable applies only to the actual build and not when executing the unit test target . But there s a workaround to this by modifying the test phase of your scheme and adding a KW SPEC environment variable with the value KW SPEC this will expand when running xcodebuild to the value passed to the xcodebuild command as in my original answer . After this xcode will will gracefully use the passed KW SPEC variable xctool still has the skipped teste marked as failure issue . KW SPEC scheme setting http : i.stack.imgur.com 59EeX.png .. . .. . Original answer .. . .. . If you want KW SPEC as an environment variable to xctool or to any nix tool then you have to place it before the command otherwise it will be considered a build setting : .. . .. . This will however lead to another problem : xctool will report as errored the tests that don t run and will report the test as failed even if no tests have failed . xcodebuild doesn t have this problem as it either doesn t do unit tests discovery or ignore tests that didn t run a thing that xctool fails to do . Comment : It doesn t work even with xcodebuild actually even when I define it inside XCode the spec simply doesn t run but the bounty is about to expire so I might as well award it for effort : Comment : @OhadSchneider thanks for checking it I rerun on my machine and it still works cliche doesn t it : The problem was the fact that I altered my scheme from Xcode to pass that environment variable making the command-line one useless . I will update my answer with this as I found the workaround for xcodebuild . Comment : Thanks for following up but I was actually aware of that . My problem is that the spec simply doesn t run I know it reads the flag becuase when it s defined nothing runs when not everything runs . I m using the line number where SPEC BEGIN is defined . Anyway relying on line numbers is probably too fragile anyway so I ll just use a different target for each spec . Too bad using the name of the spec doesn t work . Comment : Hmm. . I used the line where the it I wanted to run began and I got running only that test only I don t think using the line where with SPEC BEGIN would help.. . Comment : In the FAQ they claim spec describe context it are all supported : github.com kiwi-bdd Kiwi wiki Kiwi-FAQ https : github.com kiwi-bdd Kiwi wiki Kiwi-FAQ . I think it failed for me too but if you get the chance it would be interesting to know whether the SPEC BEGIN line works for you may be something in our build that makes atos fail .", "Question : I am using following commands to use the oclint with xcode 5- .. . .. . Step1 : xcodebuild -target OClintDemo -configuration Debug -scheme OClintDemo -sdk iphonesimulator .. . Step2 : OClintDemo jenkins xcodebuild -sdk iphonesimulator tee xcodebuild.log .. . Step3 : oclint-xcodebuild xcodebuild.log .. . Step4 : oclint-json-compilation-database -- -o report.html .. . .. . but i am getting compile commands.json empty file and report.html contains following- OCLint Report Summary : TotalFiles 0 FilesWithViolations 0 P1 0 P2 0 P3 0 OCLint http : oclint.org v0.7 .. . Answer : you try this script .. . .. . xctool oclint .. . .. . xctool -workspace iWeidao.xcworkspace -scheme iWeidao -reporter json-compilation-database : compile commands.json clean build .. . .. . oclint-json-compilation-database -v oclint args -report-type html -o report.html -rc LONG LINE 120 open compile commands.json open report.html .. . .. . here https : github.com facebook xctool issues 270 Comment : I have used this commandline also Comment : I use the second command-line but nothing happend", "Question : I would like to run my tests using xctool without having to build the tests on the machine prior . Basically I want to build the tests on one machine transfer them to several other machines and run them in parallel from there . So I need to know what files the command xctool run-tests requires in order to run the tests so I can transfer those files to each computer in order to parallelize my runs . .. . Answer : You probably want the file produced by xctool build-tests which builds the tests but does not run them . The last file output by xctool on the command-line is the path the final .xctest or at least it is for me . Either way that s what you need . https : github.com facebook xctool building-tests .. . .. . If you just want to execute that test bundle you can do something like this :", "Question : I have a project that has a small number of dependencies managed with Cocoapods . I can build it fine from Xcode but when I try to build it using xctool or travisci I get an error : .. . .. . I m guessing that xctool is using different parameters to build than Xcode does but not sure what is different or how to tell xctool to use those settings and then how to configure Travisci to use it too . .. . Answer : @Campbell Souped s answer works great for tvOS-only projects but if you try to also build for OS X you ll get an error that Bitcode is not supported . This version checks the platform before enabling Bitcode :", "Question : null .. . Answer : Is there a way to skip the clean build-process using xctool I m usually building an xcode project via some automation script and I m not making any changes to the xcode project itself . I m just testing automation scripts changes and it would be helpful to avoid doing the clean build every single time . Comment : xctool doesn t do a clean build by default . How are you calling it Why do you think it s doing a clean build Comment : xctool xctool.sh ARCHS i386 -sdk iphonesimulator -workspace Test.xcworkspace -scheme Test build CONFIGURATION BUILD DIR home test build Comment : And why do you think it s doing a clean build that it doesn t need to do i.e . one that building the Test scheme in the Test workspace in Xcode wouldn t have done xctool doesn t by default . Comment : Found the issue . There was a condition I missed in the script that was causing a clean build to be passed in . I can t go in to detail but I was able to add parameters to skip the clean build . Thanks for helping out .", "Question : we have an app integrated with today-extension we use xctool and Jenkins to do continuous build and in-house distribution . In command-line before we use .. . .. . to generate archive and then export to .ipa it works fine . But right now with today-extension we have to build it with another scheme and xcconfig we put certificate and provisioning-profile in xcconfig as today-extension is a new target and should built with its own certificate and provisioning-profile I m wondering how to achieve using xctool . Any help is appreciated . .. . Answer : I finally managed to export ipa files via xcodebuild . Since the xctool is built upon xcodebuild this answer might help . First of all when you create an extension the extension s target will be embedded into your main app s scheme . enter image description here http : i.stack.imgur.com kSrPv.png .. . .. . So there is no need to use two schemes . Then in your project settings page create a new configuration say AdHoc . And then you can set a new Provisioning Profile in both of your target s build settings . enter image description here http : i.stack.imgur.com d6IJK.png .. . .. . project settings .. . .. . enter image description here http : i.stack.imgur.com 30iOR.png .. . .. . the build settings of one target .. . .. . Then set the right provisioning profiles for your targets And you d better set the code sign identity to automatic so that Xcode can determine which code sign identity is to be used . Next step you can archive your app using xcodebuild with the new configuration you just created above : .. . .. . In this step the codesign will sign two of your targets separately by the provisioning profiles you specified . Finally export the .xcarchive file to ipa again using xcodebuild .. . .. . Notice that -exportWithOriginalSigningIdentity is set so that xcodebuild will not re-sign your ipa and the code signature in the xcarchive file is preserved . Comment : Then set the right provisioning profiles for your targets how to do it via xcodebuild command-line Comment : You don t do this with xcodebuild command instead you need to set them in Xcode s Build Settings in the configuration that you created in step 1 see pic 3 . You only need to specify the configuration to xcodebuild and don t care what provisioning-profile it is . Comment : may be you right . I ve just put it as you said . Not found other ways . Thanks . Comment : It does not work for keyboard extension", "Question : null .. . Answer : Trying to get app logic tests to run through the command-line . Right now I am testing out xctool . It works great on my dev machine but for some reason starts failing on the Mac mini we are using as a build-server . As it turns out it works if I run it through VNC in the terminal . Update : It now works if ssh ed . Now fails only with Jenkins . And seeing this output : .. . .. . .. . Info Collecting info for testables.. . 3822 ms .. . run-test Tests.octest iphonesimulator7.1 application-test .. . Warning Tried to install the test host app xxx but failed . 31 ms .. . Info Preparing test environment failed will retry 2 more times 0 ms .. . Info Stopped any existing iOS simulator jobs to get a fresh simulator . 3 ms .. . Info Reset iOS simulator content and settings . 0 ms .. . Warning Tried to install the test host app xxx but failed . 27 ms .. . Info Preparing test environment failed will retry 1 more time 0 ms .. . Info Stopped any existing iOS simulator jobs to get a fresh simulator . 2 ms .. . Info Reset iOS simulator content and settings . 0 ms .. . Warning Tried to install the test host app xxx but failed . 24 ms .. . Warning Preparing test environment failed . 0 ms .. . .. . .. . Tests fail with : .. . .. . .. . Test did not run : Failed to install the test host app xxx : Failed for unknown reason . .. . .. . Whereas on my dev machine I see the iOS simulator pop-up on the mac mini I don t see anything . What is the issue here If I try to run on 7.0 : .. . .. . I see : .. . .. . .. . Check dependencies .. . No architectures to compile for ARCHS i386 x86-64 VALID ARCHS armv6 . .. . .. . On 6.1 I receive a bunch of compiler errors . Looking at the mini s system.log I am seeing some unusual messages that yield little on search : .. . .. . launchd sim trampoline 69113 : Bogus bootstrap.plist specified . .. . com.apple.launchd.peruser.260 80978 com.apple.iphonesimulator.launchd.5772e154 69113 : Exited with code : 78 .. . .. . com.apple.launchd.peruser.260 80978 com.apple.iphonesimulator.launchd.5772e154 : Throttling respawn : Will start in 10 seconds .. . .. . We are observing similar results as listed here : xctool issue https : github.com facebook xctool issues 45 .. . .. . Unfortunately one of the solutions listed we have already tried that of adding a SessionCreate key pair value to org.jenkins-ci.plist and moving that plist to our user s Library LaunchAgents folder . This link also is similar to what we are encountering : xctool issue 2 https : github.com facebook xctool issues 162 Unfortunately we aren t using tmux so the solution does not apply . Comment : Any updates at all here Experiencing the same issue on my end . Comment : What version of XCode are you using", "Question : null .. . Answer : When I run my tests using Xcodebuild or Xctool I see that the tool builds and installs the app into the simulator but fails to run the test . It is stuck forever in either Touching app-name .xctest when I use xcodebuild or Launching and Running tests when using xctool . I can see that the simulator is launched with its default homescreen but does not progress after that . This happens as part of a continuous-integration environment I am trying to setup . I do a clean test when using either tool . I also run xcrun simctl shutdown iPhone 6 true and killall Simulator true before running the xcode commands to ensure the simulator is turned off . I also tried pre-launching the simulator and waiting before initiating the test-command since I read somewhere that it could help . Please note that this issue does not happen always . It happens like around 3 out of 10 times but at times it gets even more frequent . There is no logs trails that I could work on to debug this issue . Any help leads would be great Xcode Version : 7.0.1 .. . Xctool Version : 0.2.7 .. . Simulator : IPhone 6 .. . OS : Yosemite 10.10.5 .. . .. . .. . Thanks Comment : I can see that this Xctool Issue https : github.com facebook xctool issues 170 works with the same issue but my xctool is well updated to have all those fixes and I am still running into the same issue .", "Question : The fail build is https : travis-ci.org WilliamZang FastAnimationWithPOP jobs 30449252 .. . .. . I ve no idea why it is fail . I try the build xctool -workspace FastAnimationWithPop.xcworkspace -scheme FastAnimationWithPopDemo -sdk iphonesimulator build test it s the same result . I find the solution is add a arg -destination platform iOS Simulator name iPhone Retina 4-inch it make my building success . But I don t know why it works and how to add this arg to travis.yml . I know the reason is xctool -workspace FastAnimationWithPop.xcworkspace -scheme FastAnimationWithPopDemo -sdk iphonesimulator build test only open the iphonesimulator 6 . Even I specify iphonesimulator7.1 it still use iphonesimulator6 . I don t know why it always use simulator 6 . It tastes me about 1 day who can save me .. . Answer : You can do this to add the -destination flag to your xctool call in the .travis.yml : .. . .. . We automatically launch the simulator at the start of the build and it sounds like we might be starting an old simulator .", "Question : I have a project that has a small number of dependencies managed with Cocoapods . I can build it fine from Xcode but when I try to build it using xctool or travisci I get an error : .. . .. . I m guessing that xctool is using different parameters to build than Xcode does but not sure what is different or how to tell xctool to use those settings and then how to configure Travisci to use it too . .. . Answer : try adding the following snippet to the bottom of your Podfile then do pod install :", "Question : null .. . Answer : I have similar issue as this one http : stackoverflow.com questions 22663294 xcodebuild-fails-when-run-from-jenkins-works-in-terminal .. . .. . I am trying to implement Test Reports of Xcode on Jenkins using xctool https : github.com facebook xctool . Executing this command in the local terminal it works as expected : .. . .. . However using exactly the same one on Jenkins as an Execute Shell command fails with this error : .. . .. . Note : Execute shell contains only that single line it is for sure that the error is caused from that line . Also fyi project is using cocoapods .. . .. . Any idea what can cause this behaviour Comment : Your command is well formatted assuming things like project scheme names and such are accurate so it points to an environment related issue . Is your Jenkins instance running under a logged-in OS X GUI user or is it running as a background service without a Finder session I would expect to see those kinds of errors crop up when there isn t an authenticated environment in which shell scripts can execute . iOS Simulator has historically griped about being asked to run headless so even if you managed to get the build to run under headless configs I don t believe unit-testing would work . Comment : Postscript : Use of Cocoapods on a CI server is very much supported however you do need to install and initialize the Cocoapods repository on the build agent and then add specific build tasks that perform pod install prior to attempting to build the requested build target . Comment : @BryanMusial I moved to OSX server for iOS projects and its going well . Anyway thnx for helping" ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
autoexp.dat@data-structures@97
autoexp.dat -- autoexp.dat is a mechanism the visual-studio ide uses to optimize the display of @placeholder .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
data-structures
UNK_RELATION
webrx@templating@126
webrx -- webrx is a browser-based mvvm-framework that combines functional-reactive programming with declarative data-binding @placeholder and client-side routing .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
templating
UNK_RELATION
openmeetings@audio@47
openmeetings -- apache openmeetings is a free @placeholder video-conferencing software that allows you to instantly set up a conference in the web .
{ "confidence": [ 49.426143646240234, 49.426143646240234, 48.36412048339844, 46.76847839355469, 46.63623046875, 46.55571746826172, 46.55571746826172, 45.22412872314453, 45.22412872314453, 45.143795013427734, 44.54502487182617, 43.42089080810547, 43.42089080810547, 43.12120819091797, 42.23428726196289, 42.21205139160156, 42.00950241088867, 42.00950241088867, 40.800662994384766, 40.800662994384766, 40.76322555541992, 39.203269958496094, 39.203269958496094, 39.07612609863281, 38.57499313354492, 38.57499313354492, 38.57499313354492, 38.57499313354492, 38.57499313354492, 37.911624908447266, 37.366153717041016, 37.23475646972656, 36.75826644897461, 36.75826644897461, 36.75826644897461, 35.97010803222656, 35.917327880859375, 35.917327880859375, 35.770904541015625, 35.770904541015625, 35.770904541015625, 34.232704162597656, 34.15256881713867, 33.94873046875, 33.94873046875, 33.94873046875, 33.94873046875, 33.94873046875, 32.739891052246094, 32.739891052246094, 32.739891052246094, 32.739891052246094, 32.739891052246094, 32.70374298095703, 32.00118637084961, 31.99102783203125, 31.85181427001953, 31.291065216064453, 31.291065216064453, 31.139692306518555, 31.13924789428711, 31.117359161376953, 31.117359161376953, 29.768293380737305, 29.768293380737305, 29.768293380737305, 29.69042205810547, 28.331497192382812, 26.325286865234375, 26.315391540527344, 23.614673614501953, 23.1285457611084, 22.257266998291016, 22.257266998291016, 22.21747398376465, 21.96170997619629, 21.16815948486328, 20.356491088867188, 19.46155548095703, 19.46155548095703, 19.382156372070312, 19.22625160217285, 19.214454650878906, 18.812942504882812, 18.726665496826172, 18.726665496826172, 18.70073890686035, 18.521732330322266, 17.92759895324707, 17.924407958984375, 17.905925750732422, 17.597423553466797, 16.83542251586914, 16.783618927001953, 16.511728286743164, 16.511728286743164, 16.511728286743164, 16.511728286743164, 16.511728286743164 ], "content": [ "I have Apache OpenMeetings installed and functioning properly .", "OpenMeetings by default uses the Apache Derby DB .", "I am using SIP Transport with Openmeetings to enable web conferencing through mobile device .", "I would like to customize the GUI of Apache Openmeetings .", "I want to build a vido conference solution using apache openmeetings does any one knows a good tutorial to do that", "I am installing OpenMeetings on RHEL 7.0 .", "In the final step of openmeetings installation I receive this error .", "I am using openmeetings .", "And Help To Redirect and Integrate to openmeetings .", "How do I change the name of the database in Apache OpenMeetings 2.1.0", "I have installed openmeetings successfully .", "Its in the connection properties : .. . .. . See : mysql : localhost : 3306 openmeetings .. . .. . localhost host 3306 port openmeetings name of database", "I m trying to install OpenMeetings 3.0.1 maybe there s another dependency needed with this version of OpenMeetings", "we ve successfully installed openmeetings-3.1.1 but here are some problems .", "Your question should goto : http : incubator.apache.org openmeetings mail-lists.html .. . .. . to discuss with the developers of OpenMeetings on how to convert documents into an editable format .", "OpenMeetings has mailing lists where those problems are discussed : http : incubator.apache.org openmeetings mail-lists.html", "I m having an adventure with Openmeetings SOAP API .", "I have openmeetings database users table .", "I need to record only whiteboard part in openmeetings .", "some problem about start red5 in openmeetings", "For the OpenMeetings whiteboard integration it s probably better to ask the question in the OpenMeetings developer mailing list .", "So need to skip chat and settings tabs.So If its not openmeetings window record entire screen if it is openmeetings window browser record only whiteboard .", "There are some examples for the : http : incubator.apache.org openmeetings SoapRestAPI.html I think the Jira Confluence Integration also uses JSP Servlets to integrate Openmeetings .", "you should join : http : incubator.apache.org openmeetings mail-lists.html to discuss that .", "From openmeetings administration panel update the office.path configuration too .", "kindly help me where to change API setting in openmeetings .", "For reference the SOAP API documentation for Openmeetings can be found here .", "Any idea is welcome.. . .. . .. . PS OpenMeetings - version 3.03 JWPlayer - 4.10", "OpenMeetings requires client of Desktop to have functions like : setId newRed5ScreenCursor etc .", "After following this http : code.google.com p openmeetings wiki InstallationCentOS5 guide on installing OpenMeetings in CentOS 5.6 I ve managed to install all dependencies starting all proceses and configuring all software prior to the installation .", "How do I connect users to OpenMeetings my application", "Then I created the invitation URL in the format : .. . .. . http : host : 5080 openmeetings swf invitationHash hashvalue http : 5Bhost 5D : 5080 openmeetings swf invitationHash 5Bhashvalue 5D .. . .. . When I try to access the above link the page is loading indefinitely it is not loading the conference .", "I am Using Ubuntu 12.04 o.s.i have install openmeetings in my system and now i try to add few API of openmeetings but i don t know in which file i should change it .", "I think the URL to the room is wrong it s just http : host : 5080 openmeetings invitationHash hashvalue http : 5Bhost 5D : 5080 openmeetings invitationHash 5Bhashvalue 5D .", "here is the list for installing various versions of OM for different OSes : https : cwiki.apache.org confluence display OPENMEETINGS Tutorials+for+installing+OpenMeetings+and+Tools .. . .. . start-stop-daemon is usually installed on Ubuntu .", "You should concentrate on using the Rest and SOAP API if you want to integrate Openmeetings somewhere .", "I m running MySQL 5.1.56 Red5 1.0 and OpenMeetings 1.7 .", "so my question is how to intergrate it into the openmeetings application not open a new one", "In openmeetings the openoffice documents are first converted into pdf and swf formats before getting dislpayed on the white board .", "I installed 3.0.3 OpenMeetings to test access via REST interface everything worked ok for the methods in UserService and RoomService .", "When I try to import the same file using the flex application of OpenMeetings everything works right .", "I figure as a last ditch I can roll up my sleaves and figure out how to manually edit the appropriate tables but I was wondering if there was either a documented way to accomplish this or a feature built into the openmeetings software for this purpose .", "You might connect to the mailing list at : http : incubator.apache.org openmeetings mail-lists.html To get further information .", "I want to change the name of the mysql database from openmeetings to something else maybe db openmeetings .", "I m playing around with openmeetings and was wondering if anyone knows how to write a script to automatically add a user or group .", "Few years back i ve written code in Flex for accessing streams from OpenMeetings .", "But still after i disabled those functions in OpenMeetings and recompiled - things still doesnt work.. .", "Here is the reference for API : https : openmeetings.apache.org openmeetings-webservice apidocs index.html index-all.html", "I have two scenarios : .. . 1 When screenshare is not enabled .. . In openmeetings screenrecord is recording the entire screen .", "2 When screenshare is enabled .. . All other windows except openmeetings moderator window which are active should be recorded .", "load-balancing via HTTP is not really that interesting as OpenMeetings main protocol is RTMP and RTMPT .", "After This RestService i have make OmGateWay class which has-many method for integrate with openmeetings .", "http : openmeetings.apache.org RestAPISample.html .. . .. . And also the Integration API that is available via SOAP REST : http : openmeetings.apache.org openmeetings-webservice apidocs index.html", "I would suggest you try to contact : http : incubator.apache.org openmeetings mail-lists.html", "Right click on it and choose checkout .. . .. . After the download is complete you will see a new Project in the Package Explorer Dialog of Eclipse .. . .. . cd to the eclipse openmeetings workspace and run the ant command : ant -Ddb mysql prepare-eclipse .. . .. . refresh the openmeetings eclipse project .", "renamed the db-persistence.xml for example mysql-persistance.xml file if you are using mysql persistance.xml and added mysql-connector j in the lib webapps OpenMeetings WEB-INF lib", "Is there a good way to integrate a google map to the apache openmeetings 2.0 I search it and find use about openlaszlo http : code.google.com p openlaszloincubator source browse trunk googlemapsonlaszlo r 32 googlemapsonlaszlo 253Fstate 253Dclosed and the site http : code.google.com p openmeetings source browse trunk singlewebapp WebContent lps components incubator googlemap.lzx r 3529 which don t base on openmeetings 2.0 Does any one realize it", "Assigned TCP IP permissions to MySQL and the OpenMeetings user in the database and I ve tested the connections .", "When accessing to http : address : 5080 openmeetings I get the following error : http : cl.ly 9zDe .. . .. . Any help", "I install openmeetings on windows-7 64 bits and I configured all things perfectly with compatible versions : C : ffmpeg bin C : ImageMagick-6.6.4 C : Program Files x86 SWFTools C : sox-14.4.0 C : jodconverter-core-3.0-beta-4 lib .. . .. . recording and video conference works perfectly .", "You might review the clustering docs : http : openmeetings.apache.org Clustering.html .. . .. . However those docs refer to Openmeetings 2.1 which is not yet released .", "The idea is that I want to integrate it with a site so that any time a user registers on the site they automatically receive an openmeetings account and are enrolled in a group .", "PS1 - both flash and html5 options are working in CameraStream PS2 - i think i know what is the problem here - probably on OpenMeetings .", "But when I try to upload a pdf file by ImportFile method FileService OpenMeetings returns an object FileImportError stating that the file is damaged and that this may have occurred during the file-transfer via http .", "So here the REST api https : svn.apache.org repos asf openmeetings branches 3.0.x docs UserService.html loginUser .. . .. . We have login method with SID username and userpass as params .", "right now im trying to do this things .. . .. . 1 . call GetSession and get SID .. . 2 . localhost : 5080 openmeetings services UserService loginUser SID Sid here username han userpass test .. . 3 .", "The code what you give above in LZX file have a canvas tag.the openmeetings only have only have one canvas tag which in the main.lzx .", "here is my steps : I do it step by step following this page : http : incubator.apache.org openmeetings BuildInstructions.html So the following is what I did Eclipse in a up to-date copy and Sun JDK6 Apache ANT minimum 1.8.3 Subclipse 1.8 Subversion 1.7 required", "openmeetings-2.1.1 in my system i have install ghostscript ImageMagick-6.8.9 and swftools when i try to upload document file like .ppt .doc file it upload successfully but when i drag to white board it give me error like below .", "Since the current version of OpenMeetings still seems to use the SWF runtime as the default target runtime that leaves you with the option of using an iFrame through the html src tag .", "We have to set the same in settings - conference Information in our gotomeeting accounts .", "Did you set up the db connection correctly", "Can we display the contents directly in the office documents form and make the changes in the files that will be visible to the other participants in the conference .", "But I dont know how to show the conference room in my php page itself .", "I copied it from the invite to conference option in the meeting room", "http : subversion.apache.org packages.html Spring IDE for Eclipse installable via Help Eclipse Marketplace Apache IvyDE For Eclipse installable via Help Install New Software URL : http : www.apache.org dist ant ivyde updatesite detailed steps can be found here : http : ant.apache.org ivy ivyde download.cgi MySQL or Postgres or other Databases supported by openJPA are optionally but handy to have them Start Eclipse .. . .. . Change Perspective to SVN Repository Exploring : .. . .. . Add the URL https : svn.apache.org repos asf incubator openmeetings trunk singlewebapp and click Finish .. . .. . After download is complete you see a new Source Repository in the Repository Explorer .", "I am new to the GotoMeeting API and find the solution for creating a meeting over to the goto meeting if we set the conferencing info as PSTN means according to the country .", "I am very new to apache open meeting and also with REST API .", "My web application is developed with spring struts2 and Hibernate .", "I wanted to integrate openmeeting with my web application .", "Yes it was saving in default Apache Derby DB .", "I encountered a similar problem myself when my boss and I were at a conference and that was the cause of the problem .", "Background : I am working on the apache open meeting integration with my php site .", "So I am thinking to authenticate openmeeting with my web application users .", "Please format you question", "Thank you in advance masoud", "You need to login using a user of type admin or web-service level .", "Apache Open Meeting Integration with PHP http : stackoverflow.com questions 27258420 apache-open-meeting-integration-with-php 28446661 28446661", "Can it be happening because Desktop stream only has video data - and no audio data ive tried to feed only Video data to Camera stream and JWPlayer didnt have any issues .. . 3 .", "You will have much better luck with this question on superuser.com http : superuser.com This question will eventually be closed on this site as Off Topic", "hello I have create my web page and i create web service in it .", "4 The problem is when I play the above 30 seconds video + audio session 2 minutes dead paused session is showing after the actual video .", "2 If you see black screen - in options of JWPlayer object disable flag : stagevideo : false .. . .. . that should force rtmp connection to create stream in video element not in stage element - that fixed the issue for me .", "So maybe you better start of coming up with concrete questions or maybe visit their mailing list .", "During installation i get a message with an endless loop saying : .. . .. . Is there any solution to this", "Could anyone helps me", "Installation is failed .. . .. . org.springframework.dao.InvalidDataAccessApiUsageException : No metadata was found for type class org.apache.openmeetings.db.entity.basic.ErrorType .", "The class does not appear in the list of persistent types : org.apache.openmeetings.db.entity.record.RecordingLog org.apache.openmeetings.db.entity.user.PrivateMessage org.apache.openmeetings.db.entity.user.AsteriskSipUser org.apache.openmeetings.db.entity.log.ConferenceLog org.apache.openmeetings.db.entity.calendar.MeetingMember org.apache.openmeetings.db.entity.user.User org.apache.openmeetings.db.entity.room.RoomPollAnswer org.apache.openmeetings.db.entity.file.FileExplorerItem org.apache.openmeetings.db.entity.server.LdapConfig org.apache.openmeetings.db.entity.basic.MailMessage org.apache.openmeetings.db.entity.basic.ErrorValue org.apache.openmeetings.db.entity.room.RoomPoll org.apache.openmeetings.db.entity.room.Whiteboard org.apache.openmeetings.db.entity.user.Address org.apache.openmeetings.db.entity.basic.ChatMessage org.apache.openmeetings.db.entity.room.Client org.apache.openmeetings.db.entity.server.Server org.apache.openmeetings.db.entity.room.RoomGroup org.apache.openmeetings.db.entity.server.SOAPLogin org.apache.openmeetings.db.entity.calendar.Appointment org.apache.openmeetings.db.entity.user.GroupUser org.apache.openmeetings.db.entity.record.Recording org.apache.openmeetings.db.entity.room.Invitation org.apache.openmeetings.db.entity.room.Room org.apache.openmeetings.db.entity.file.FileItem org.apache.openmeetings.db.entity.basic.Navimain org.apache.openmeetings.db.entity.record.RecordingMetaData org.apache.openmeetings.db.entity.user.Userdata org.apache.openmeetings.db.entity.server.Sessiondata org.apache.openmeetings.db.entity.server.OAuthServer org.apache.openmeetings.db.entity.user.PrivateMessageFolder org.apache.openmeetings.db.entity.user.Group org.apache.openmeetings.db.entity.basic.Naviglobal org.apache.openmeetings.db.entity.basic.Configuration org.apache.openmeetings.db.entity.user.UserContact org.apache.openmeetings.db.entity.room.WhiteboardItem org.apache.openmeetings.db.entity.record.RecordingMetaDelta org.apache.openmeetings.db.entity.user.State org.apache.openmeetings.db.entity.room.RoomModerator .", "nested exception is org.apache.openjpa.persistence.ArgumentException : No metadata was found for type class org.apache.openmeetings.db.entity.basic.ErrorType ." ] }
{ "confidence": [ 70.75146484375, 63.76499938964844, 63.64225769042969, 61.57637405395508, 58.427650451660156, 58.309017181396484, 57.45111846923828, 56.220741271972656, 56.089927673339844, 54.390811920166016, 52.90784454345703, 52.23105239868164, 51.85829162597656, 51.700801849365234, 49.931068420410156, 49.713497161865234, 49.2079963684082, 49.05204772949219, 48.36211395263672, 48.06157302856445 ], "content": [ "Question : I want to build a vido conference solution using apache openmeetings does any one knows a good tutorial to do that also i want to integrate it with JSP . i search on the web but it seems that there is a few resource on it . blogs books or article is accepted . .. . Answer : you should join : http : incubator.apache.org openmeetings mail-lists.html to discuss that . There are some examples for the : http : incubator.apache.org openmeetings SoapRestAPI.html I think the Jira Confluence Integration also uses JSP Servlets to integrate Openmeetings .", "Question : I am working on openmeeting integration for a Drupal site . I was able to successfully generate the invitation hash using the SOAP API provided by openmeeting . I used getInvitationHashFullName API function to generate the hash value . It returned hash value . Then I created the invitation URL in the format : .. . .. . http : host : 5080 openmeetings swf invitationHash hashvalue http : 5Bhost 5D : 5080 openmeetings swf invitationHash 5Bhashvalue 5D .. . .. . When I try to access the above link the page is loading indefinitely it is not loading the conference . Here is the reference for API : https : openmeetings.apache.org openmeetings-webservice apidocs index.html index-all.html .. . Answer : I think the URL to the room is wrong it s just http : host : 5080 openmeetings invitationHash hashvalue http : 5Bhost 5D : 5080 openmeetings invitationHash 5Bhashvalue 5D . Where do you have this URL from Comment : I copied it from the invite to conference option in the meeting room", "Question : I have installed openmeetings successfully . I have registered a user and logged in through this user . Session is running . I have openmeetings database users table . When i checked this no datas are there . But issues are not there . Any idea what is going on Comment : OpenMeetings by default uses the Apache Derby DB . Did you set up the db connection correctly Comment : Yes it was saving in default Apache Derby DB . While installation i did not face any problem . I was using mysql DB . I followed this guide : bigsoft.co.uk blog index.php 2013 03 14 http : www.bigsoft.co.uk blog index.php 2013 03 14 installing-openmeeting-with-mysql . Please guide me i want to save registered user to my database . .. . Answer : renamed the db-persistence.xml for example mysql-persistance.xml file if you are using mysql persistance.xml and added mysql-connector j in the lib webapps OpenMeetings WEB-INF lib", "Question : In openmeetings the openoffice documents are first converted into pdf and swf formats before getting dislpayed on the white board . Can we display the contents directly in the office documents form and make the changes in the files that will be visible to the other participants in the conference . .. . Answer : No you can t do that out of the box . Your question should goto : http : incubator.apache.org openmeetings mail-lists.html .. . .. . to discuss with the developers of OpenMeetings on how to convert documents into an editable format . There is currently a GSoC student working on an alternative to OpenOffice as cenverter however the goal of his project is not to make the documents editable online .", "Question : How do I change the name of the database in Apache OpenMeetings 2.1.0 Which parts of the persistence.xml do I change or do I have to edit some other files too I want to change the name of the mysql database from openmeetings to something else maybe db openmeetings . Would really appreciate some help . .. . Answer : Its in the connection properties : .. . .. . See : mysql : localhost : 3306 openmeetings .. . .. . localhost host 3306 port openmeetings name of database Comment : thank you for the answer .", "Question : I want to build a vido conference solution using apache openmeetings does any one knows a good tutorial to do that also i want to integrate it with JSP . i search on the web but it seems that there is a few resource on it . blogs books or article is accepted . .. . Answer : I do not have a any tutorial for the same . But you can use REST API to connect with Openmeeting using webservice . Below question itself will give you some idea . Apache Open Meeting Integration with PHP http : stackoverflow.com questions 27258420 apache-open-meeting-integration-with-php 28446661 28446661", "Question : I have error HTTP : 500 when I try to upload a file or to share one in the white board . I install openmeetings on windows-7 64 bits and I configured all things perfectly with compatible versions : C : ffmpeg bin C : ImageMagick-6.6.4 C : Program Files x86 SWFTools C : sox-14.4.0 C : jodconverter-core-3.0-beta-4 lib .. . .. . recording and video conference works perfectly . How can I solve this problem Is there a problem with the SWFTools version 0.9.1 Comment : You would probably do better contributing your question to serverfault.com http : serverfault.com or perhaps superuser.com http : superuser.com . This question isn t really the specialty of stackoverflow . This question as far as i can tell is only distantly related to java . .. . Answer : When you import a document you should have a look at the error message convertion message . OpenMeetings has mailing lists where those problems are discussed : http : incubator.apache.org openmeetings mail-lists.html", "Question : I am using SIP Transport with Openmeetings to enable web conferencing through mobile device . But on the server the CPU usage crosses 100 with each SIP transport that is created for a new room . Does anyone have any suggestions on how to control the CPU usage Already got one laptop s CPU fried because of this . .. . Answer : That situation is not normal . Check your transcoder lib whatever you use and try recompile red5sip . Comment : I tried recompile with new checkout. . sip video off too..but after adding sip transport into more than 2 rooms..cpu usage cross more than 150 . . Comment : pastebin.com kYNhPna4 http : pastebin.com kYNhPna4 red5sip logs. .", "Question : null .. . Answer : some problem about start red5 in openmeetings here is my steps : I do it step by step following this page : http : incubator.apache.org openmeetings BuildInstructions.html So the following is what I did Eclipse in a up to-date copy and Sun JDK6 Apache ANT minimum 1.8.3 Subclipse 1.8 Subversion 1.7 required http : subclipse.tigris.org SVN Command line client Subversion 1.7 required http : subversion.apache.org packages.html Spring IDE for Eclipse installable via Help Eclipse Marketplace Apache IvyDE For Eclipse installable via Help Install New Software URL : http : www.apache.org dist ant ivyde updatesite detailed steps can be found here : http : ant.apache.org ivy ivyde download.cgi MySQL or Postgres or other Databases supported by openJPA are optionally but handy to have them Start Eclipse .. . .. . Change Perspective to SVN Repository Exploring : .. . .. . Add the URL https : svn.apache.org repos asf incubator openmeetings trunk singlewebapp and click Finish .. . .. . After download is complete you see a new Source Repository in the Repository Explorer . Right click on it and choose checkout .. . .. . After the download is complete you will see a new Project in the Package Explorer Dialog of Eclipse .. . .. . cd to the eclipse openmeetings workspace and run the ant command : ant -Ddb mysql prepare-eclipse .. . .. . refresh the openmeetings eclipse project . and run the ant command then cd to the dist folder click the red5.bat file.then come to the following errors Comment : Please post the log of the ant task somewhere on pastebin and add link here . Comment : have something similar with raw red5 installation : Comment : did you dload the mysql-connector script and place in the lib folder", "Question : I m playing around with openmeetings and was wondering if anyone knows how to write a script to automatically add a user or group . The idea is that I want to integrate it with a site so that any time a user registers on the site they automatically receive an openmeetings account and are enrolled in a group . I figure as a last ditch I can roll up my sleaves and figure out how to manually edit the appropriate tables but I was wondering if there was either a documented way to accomplish this or a feature built into the openmeetings software for this purpose . Thanks in advance any help would be appreciated . .. . Answer : There are SOAP and REST APIs 1 to add a user . They can be easily extended to add a group . 1 http : openmeetings.apache.org SoapRestAPI.html Comment : Actually just found it It was exactly what I was looking for . Much Obliged", "Question : After following this http : code.google.com p openmeetings wiki InstallationCentOS5 guide on installing OpenMeetings in CentOS 5.6 I ve managed to install all dependencies starting all proceses and configuring all software prior to the installation . I can actually start the installation but when I click Install I receive a blank screen in the step 1 and it drops dead . The database does not populate with tables or data and it should at this point what makes me believe that I can t connect to the database . I m running MySQL 5.1.56 Red5 1.0 and OpenMeetings 1.7 . I ve copied the MySQL 5 hibernate to hibernate.conf.xml using localhost . Assigned TCP IP permissions to MySQL and the OpenMeetings user in the database and I ve tested the connections . All ports in the firewall are open for testing . Every program needed is in the PATH variable . All dependencies are installed . When accessing to http : address : 5080 openmeetings I get the following error : http : cl.ly 9zDe .. . .. . Any help .. . Answer : I would suggest you try to contact : http : incubator.apache.org openmeetings mail-lists.html Comment : Didn t know about those mailing lists I expect that those are more active that their forums or such . Comment : yes and I think they are discussing CentOS installation currently . There are some scripts in the www currently but nothing official .", "Question : I am Using Ubuntu 12.04 o.s.i have install openmeetings in my system and now i try to add few API of openmeetings but i don t know in which file i should change it . so kindly help me.i use jdk 1.7 in my system . kindly help me where to change API setting in openmeetings . Thanks in advance . .. . Answer : You should concentrate on using the Rest and SOAP API if you want to integrate Openmeetings somewhere . Other then that I am sorry but the question itself is that general that it is almost impossible to answer . Maybe you can get somebody on the mailing list to help you further : http : openmeetings.apache.org mail-lists.html", "Question : null .. . Answer : I am using openmeetings . Everything is working fine . But I need some changes in screenshare and screenrecording features . Here are my requirements . I need to record videos irrespective of sharing screen . I have two scenarios : .. . 1 When screenshare is not enabled .. . In openmeetings screenrecord is recording the entire screen . I need to record only whiteboard part in openmeetings . Even when I minimize or open other window it should record only whiteboard part . 2 When screenshare is enabled .. . All other windows except openmeetings moderator window which are active should be recorded . But when the moderator window is active I need to record only whiteboard part . So need to skip chat and settings tabs.So If its not openmeetings window record entire screen if it is openmeetings window browser record only whiteboard .", "Question : I have Apache OpenMeetings installed and functioning properly . I am not able to upload Office files to Whiteboard . I succeeded to upload PDF files . I installed JODconverter and updated the configuration to match the path . I installed the OpenOffice to the machine adjust the Path environment variable and updated the configuration with the full path to the OpenOffice document . but still not luck . am i missing anything .. . Answer : From openmeetings administration panel update the office.path configuration too . In this configuration enter the path of your OpenOffice installation . This should fix the issue .", "Question : null .. . Answer : I am installing OpenMeetings on RHEL 7.0 . During installation i get a message with an endless loop saying : .. . .. . Is there any solution to this", "Question : I m trying to install apache openmeetings 3.1.1 on ubuntu-12.04 .. . .. . .. . But I can t start openmeeting .. . .. . .. . No errors on the command-line .. . I checked log file on usr lib red5 log red5.log .. . I found this error .. . .. . .. . Can anyone till me what this error mean and how can I fix it Comment : This will be fixed soon we have discontinued the use of the RMI connector in Red5 I ll ping one of the OM devs about it . .. . Answer : what script are you using as etc init.d red5 here is the list for installing various versions of OM for different OSes : https : cwiki.apache.org confluence display OPENMEETINGS Tutorials+for+installing+OpenMeetings+and+Tools .. . .. . start-stop-daemon is usually installed on Ubuntu . 3.1.2 release most probably will have modified start-stop script as @Paul have mentioned", "Question : Few years back i ve written code in Flex for accessing streams from OpenMeetings . Now i need to rewrite it to RubyOnRails . I m using JWPlayer too play stream .. . .. . I have 2 streams : .. . .. . Camera stream .. . Desktop stream .. . .. . I had no problem in running Camera stream : rtmp : address : port folder roomID flv : StreamID .. . .. . but the same thing doesnt work with Desktop stream from Desktop Sharer - despite that it was working back in Flex . I know that JWPlayer finds stream - because after clicking play JWPlayer shows load icon and then proceeds to show me black JWPlayer screen without content - and if I give wrong StreamID - JWPlayer shows infinitely load icon . What can I now do : .. . .. . 1 . How can i debug this problem - it doesnt seem that there is debug flag anywhere in JWPlayer .. . 2 . Can it be happening because Desktop stream only has video data - and no audio data ive tried to feed only Video data to Camera stream and JWPlayer didnt have any issues .. . 3 . I ve tried manipulating with options - primary : flash and giving file in playlist or changing flv in stream name to mp4 - no luck here .. . 4 . Can it be caused by too long StreamID in DesktopStream - its 32 alphanumeric signs and one number in CameraStream . Any idea is welcome.. . .. . .. . PS OpenMeetings - version 3.03 JWPlayer - 4.10 Comment : Flash should definitely be set as primary when using RTMP . Do you have a link-to where you are trying to run this though Comment : Both - server and client are working on computers in my home . After I finish - they will be available at University - but its not working now . PS1 - both flash and html5 options are working in CameraStream PS2 - i think i know what is the problem here - probably on OpenMeetings . OpenMeetings requires client of Desktop to have functions like : setId newRed5ScreenCursor etc . I had those functions in my class in Flex . I would know earlier - but JWPlayer doesnt throw any errors . But still after i disabled those functions in OpenMeetings and recompiled - things still doesnt work.. . Comment : Please give us a link-to your site . Complicated descriptions don t help - only a live example will provide any hope of debugging . Comment : Okay I need to see a link then to debug properly . Comment : Just as i said - i have both installed on server in my home - without extrenal IP - so there is no way to give you link . I downloaded and compiled JWPlayer from git . I will try to debug it by myself . I will report if I find anything interesting.. . .. . Answer : I was finally able to show stream from desktop : .. . .. . 1 There is no need to add functions to NetPlayer.as despite what i suggested in comments - JWPlayer is doing good job in handling errors for lacking functions for those calls for you maybe even too good - so they wont matter . 2 If you see black screen - in options of JWPlayer object disable flag : stagevideo : false .. . .. . that should force rtmp connection to create stream in video element not in stage element - that fixed the issue for me . Case closed .", "Question : Anyone have try to load-balancing openmeeting with http i have installed on my server but how i can load-balancing it with http Thanks .. . Answer : load-balancing via HTTP is not really that interesting as OpenMeetings main protocol is RTMP and RTMPT . You might review the clustering docs : http : openmeetings.apache.org Clustering.html .. . .. . However those docs refer to Openmeetings 2.1 which is not yet released . Maxim committed those changes 1-2 weeks ago . You might connect to the mailing list at : http : incubator.apache.org openmeetings mail-lists.html To get further information . Sebastian", "Question : null .. . Answer : So here the REST api https : svn.apache.org repos asf openmeetings branches 3.0.x docs UserService.html loginUser .. . .. . We have login method with SID username and userpass as params . How should i login right now im trying to do this things .. . .. . 1 . call GetSession and get SID .. . 2 . localhost : 5080 openmeetings services UserService loginUser SID Sid here username han userpass test .. . 3 . I get a response like .. . .. . This means that the authentication is successful . But im still need to login trough webpage . So question is - How to authenticate with out webpage .", "Question : I have error HTTP : 500 when I try to upload a file or to share one in the white board . I install openmeetings on windows-7 64 bits and I configured all things perfectly with compatible versions : C : ffmpeg bin C : ImageMagick-6.6.4 C : Program Files x86 SWFTools C : sox-14.4.0 C : jodconverter-core-3.0-beta-4 lib .. . .. . recording and video conference works perfectly . How can I solve this problem Is there a problem with the SWFTools version 0.9.1 Comment : You would probably do better contributing your question to serverfault.com http : serverfault.com or perhaps superuser.com http : superuser.com . This question isn t really the specialty of stackoverflow . This question as far as i can tell is only distantly related to java . .. . Answer : Were you running it in proxied mode on port 8080 The default port of OpenLaszlo proxied mode If so some routers firewalls block this port . I encountered a similar problem myself when my boss and I were at a conference and that was the cause of the problem . We have since changed our demo application to SOLO no-proxied mode which has solved our problem ." ] }
[ "yes-answer-long", "yes-answer-short" ]
audio
UNK_RELATION
map@map-function@100
map -- a map is a data structure relating keys to values.for questions about mapping functions use @placeholder instead.for questions about geography use maps instead .
{ "confidence": [ 37.2865104675293, 36.36058807373047, 35.181800842285156, 34.912750244140625, 34.030616760253906, 33.464088439941406, 33.36808776855469, 33.330810546875, 33.260475158691406, 33.0833854675293, 32.996376037597656, 32.05597686767578, 32.0495491027832, 31.92245101928711, 31.735179901123047, 31.653240203857422, 31.34029769897461, 31.324501037597656, 31.30497169494629, 31.244525909423828, 31.22616958618164, 31.225128173828125, 31.21933364868164, 31.15302276611328, 30.935733795166016, 30.935733795166016, 30.832351684570312, 30.7951717376709, 30.755233764648438, 30.754671096801758, 30.754671096801758, 30.510393142700195, 30.509449005126953, 30.48253631591797, 30.151611328125, 30.099607467651367, 29.891170501708984, 29.880861282348633, 29.880861282348633, 29.837963104248047, 29.67085075378418, 29.67085075378418, 29.67085075378418, 29.600305557250977, 29.496139526367188, 29.496139526367188, 29.36229133605957, 29.36229133605957, 29.360376358032227, 29.25986099243164, 29.2012882232666, 29.198530197143555, 29.11754608154297, 29.07303237915039, 29.033720016479492, 29.033376693725586, 28.85710906982422, 28.85606575012207, 28.75859832763672, 28.659608840942383, 28.64899253845215, 28.632173538208008, 28.57670021057129, 28.546566009521484, 28.49599266052246, 28.485607147216797, 28.47565460205078, 28.307418823242188, 28.30035972595215, 28.299400329589844, 28.232988357543945, 28.21891212463379, 28.217411041259766, 28.19567108154297, 28.19567108154297, 28.161766052246094, 28.141429901123047, 28.14043617248535, 28.097408294677734, 28.04874038696289, 28.04874038696289, 28.02686309814453, 27.98978614807129, 27.964555740356445, 27.932453155517578, 27.932453155517578, 27.931968688964844, 27.931968688964844, 27.916492462158203, 27.916492462158203, 27.916492462158203, 27.90838623046875, 27.888669967651367, 27.888669967651367, 27.783161163330078, 27.67914390563965, 27.66156005859375, 27.6471004486084, 27.622385025024414 ], "content": [ "This is the Javadoc for Map : .. . .. . An object that maps keys to values .", "use map instead of map 5 .", "Mapping one level deeper .. . .. . You need to use map map toUpper .", "Almost never : You may want to use the map-function as a pure abstract-function while doing functional-programming where you re mapping map or currying map or otherwise benefit from talking about map as a function .", "It comes with two closely related functions map-map and map-map-keys which are also missing from the standard-library : .. . .. . You can call map-map-values like this : .. . .. . And the other two functions like this : .. . .. . If you only want map-map-keys or map-map-values without the more general map-map function you can use these implementations which don t rely on map-map : .. . .. . Also here s an alternative implementation of map-map that is based on clojure.walk walk http : clojuredocs.org clojure core clojure.walk walk instead of into http : clojuredocs.org clojure core clojure.core into if you prefer this phrasing : .. . .. . There are also parallel versions of these functions if you need them .", "My keys I use data into the map mostly remain the same .", "Closely related : stackoverflow.com questions 507602 http : stackoverflow.com questions 507602 how-to-initialise-a-static-map-in-java Both questions are about initialising a constant map with static final values .", "Use a map if you are mapping to something i.e .", "I think your best bet is to use the Google Maps API http : code.google.com apis maps instead of the map editor in My Maps .", "Rob : yes keys and vals will use the same order for all maps -- the same order as a seq on the map uses .", "map was about twice as slow .", "One handy tweak on this is to use collect instead of map .", "A bit more context about the use-case : These points are coordinates on a map .", "If the keys have any pattern to them then you can split the map into smaller maps and have a index map .", "And map in the context of a function that maps A - B .", "Is it about map tiling or about Android UI", "3 . use the function pmap instead of map :", "I ve tried to find it online however all the questions I encountered were about some complex versions of map-function such as mapping functions that take two lists as an input .", "Returns an unmodifiable map describing keys that appear in both maps but with different values .", "map instead of map .", "Data structure for efficiently returning the top-K entries of a hash table map dictionary http : stackoverflow.com questions 2105146 data-structure-for-efficiently-returning-the-top-k-entries-of-a-hash-table-map .. . .. . Thanks", "But if you really do need to use const char as map keys try :", "How can map-reduce job generate metrics about how many keys it has processed and give data like : .. . .. . of keys that belonged to this particular value .", "I have already asked http : stackoverflow.com questions 17278264 plot-points-map-of-population about plotting points dependent on region but now my question is about overlaying points given by coordinations over gadm map .", "I wouldn t use map-within-map .", "Why no use a ordered map like std : : map", "Use map .", "Use NgMap.getMap .then function map .. . instead to get a map instance .", "Possible read about this duplicates link1 http : stackoverflow.com questions 8997503 map-set-iterator-not-incrementablemap-set-iterator-not-incrementable link2 http : stackoverflow.com questions 9764058 map-set-iterators-not-incrementable-error-in-c", "http : stackoverflow.com questions 983163 map-function-in-matlab", "map is preferred at Code Golf http : codegolf.stackexchange.com questions .", "Both maps are Map String Set String it s not a bijective map .", "EnumMap is a specialized Map implementation for use with enum type keys .", "You couldn t simply use forEach instead of map .", "The problem here is that I cannot use the container functions as I would with a map .", "I do not think this necessarily has any advantage over a similar solution where the indexer is instead backed by a map of maps map of field name to map of data to object .", "Use a function like this if you re interested only on the keys : .. . .. . Use the following function for the full diff Map without affecting your existing Map objects :", "std : : map will not use ever .", "Conclusion : .. . .. . Use map and filter .", "Is there a query parameter I can use to default a mobile Google Maps directions link-to the map view instead of the text view", "Tell something more about .map and .fits format .", "I don t know about .map though .", "It says nothing about the implementation of the Map in this case a HashMap .", "They simply use pmap http : clojuredocs.org clojure core clojure.core pmap instead of map http : clojuredocs.org clojure core clojure.core map .", "For an SO link here s stackoverflow.com questions 26446352 http : stackoverflow.com questions 26446352 what-is-the-difference-between-unordered-map-emplace-and-unordered-map-ins", "wasnt that already mentioned here : stackoverflow.com questions 2848189 http : stackoverflow.com questions 2848189 efficient-map-overlays-in-android-google-map", "Use K-map Karnaugh map to simplify .", "Build the inverse map or use bidirectional map .", "stackoverflow.com questions 9094076 http : stackoverflow.com questions 9094076 osmdroid-zip-how-to-add-custom-maps - Google s MapView will not work for that since you can t control the map data .", "The data is the map does not need to be shared between actors - there are about 30 actor-instances each with their own maps of data relevant only to them", "You should use map and filter instead of list comprehensions .", "Cross-posted : gis.stackexchange.com questions 73143 http : gis.stackexchange.com questions 73143 legend-of-a-raster-map-with-categorical-data", "thanks for the input but the question isn t really about which data structure to use .", "perl considers map a control-structure .", "http : stackoverflow.com questions 16038562 phonegap-jquery-mobile-google-maps-v3-map-shows-top-left-tiles but in iOS and with jQuery UI Map .", "stackoverflow.com questions 13727992 http : stackoverflow.com questions 13727992 google-maps-api-v2-failed-to-load-map-could-not-contact-google-servers 13728039 13728039", "Not if you want to use map : : find map : : lower-bound etc .", "Using a map as an underlying data structure is certainly not the right way to go .", "With reference to my previously asked question about boost : : bimaps and boost associative property maps interface here http : stackoverflow.com questions 21654594 using-boostassociative-property-map-with-boostbimap-interface 21660622 21660622 I want to use Put and Get helper functions for my bimap .", "If you are using jquery-ui-map why are you using the native google maps api instead of the gmap functions", "I m working on map I stored the data into two different map it is nested map having same key Is their any way to store this data into single DS rather that two different nested maps .", "Or is it possible to use variables in map files", "The difference is that in the second implementation your reference to the HashMap will only allow the use of functions defined in the Map interface while the first will allow the use of any public functions in HashMap which includes the Map interface .", "I have the following nested data structure : .. . .. . Meaning a map from string to a set of maps from string to string .", "Why not use a single std : : map with all the required data", "For a map that sorts by key values you should use TreeMap instead .", "My app is based on ABS how I use google-maps 2 Map in my application in order to show the user s current location on google Map", "use the google map for direction there are a no .", "One first statement about a possible solution : of course it is possible to use a map here .", "What about using a map with the x axis for keys and a linked-list of tiles from top to bottom for values", "http : stackoverflow.com questions 13399821 data-structures-that-can-map-a-range-of-values-to-a-key .. . Hashtable key within integer interval http : stackoverflow.com questions 11188795 hashtable-key-within-integer-interval 11189075 .. . Using java map for range searches http : stackoverflow.com questions 1314650 using-java-map-for-range-searches .. . Java - Suitable data structure for search interval http : stackoverflow.com questions 13742367 java-suitable-data-structure-for-search-interval 13743061", "See also stackoverflow.com questions 443499 json-to-map http : stackoverflow.com questions 443499 json-to-map and stackoverflow.com questions 1957406 http : stackoverflow.com questions 1957406 generate-java-class-from-json and stackoverflow.com questions 658936 http : stackoverflow.com questions 658936 is-there-a-library-to-convert-java-pojos-to-and-from-json-and-xml", "Most times I use a map I use either int s or std : : strings as keys hence I ve got no problems with the definition of the hash-function .", "Do you want to see if the keys of one map are also keys in the other map", "Let s say I want to write a simple function keys that takes in a std : : map and returns an iterator range that provides the keys of the map .", "When you use a map in a program with concurrent access is there any need to use a mutex in functions to read values", "The core of the process is the use of Displace Tool and the depth map as a displacement map .", "I need a disk backed Map structure to use in a Java app .", "Btw : There must be some more info about the map", "My main questions are 1 How do I get a building s map", "http : stackoverflow.com questions 4148375 is-there-an-in-place-equivalent-to-map-in-python", "But ask yourself this : If a language had a native map-function but no forEach couldn t you simply not use map instead of forEach", "http : stackoverflow.com questions 1077491 can-a-method-be-used-as-a-array-map-function-in-php-5-2 but this question is about standard methods not statics .", "My other question http : stackoverflow.com questions 2007212 sorted-hash-table-map-dictionary-data-structure-design is similar but is for the case of returning all elements of a map sorted by the key .", "possible duplicate of Sort Order in STL map and set http : stackoverflow.com questions 3370185 sort-order-in-stl-map-and-set", "possible duplicate of Change Projection in OpenLayers Map http : stackoverflow.com questions 2673945 change-projection-in-openlayers-map", "Because map excludes duplicate keys I suppose.. .", "Using different enums as keys to the map does not work .", "You cannot use a ptr vector in a map .", "You cannot use a ptr vector in a map .", "Which Map should I use", "Use reservoir sampling http : en.wikipedia.org wiki Reservoir sampling to select a list of random keys then insert them into a map along with their corresponding values in the source map .", "A map of vectors isn t suitable for that and while you can use a map of lists it s more convenient to just use a multimap .", "I would suggest that given your usage I would use a Map Integer EscapeChars and use containsKey on this map .", "If your keys map to table column names then the best approach is to leave the keys as is and escape them at their time of use in your SQL .", "If you use the standard link that would display a map in the browser it will automatically open in Google Maps on the device .", "A map cannot contain duplicate keys each key can map to at most one value .", "http : stackoverflow.com questions 16538641 migrating-java-treemap-code-to-scala - mentions to just use Java s TreeMap and forget about anything else .. . Java versions of this issue : .. . Data structures that can map a range of values to a key", "stackoverflow.com questions 9747765 http : stackoverflow.com questions 9747765 how-can-download-map-in-osmdroid 9749861 9749861" ] }
{ "confidence": [ 42.33184051513672, 42.11811447143555, 41.81902313232422, 41.4864616394043, 41.06369400024414, 40.7586784362793, 40.02302932739258, 39.504032135009766, 38.9573974609375, 38.52125930786133, 38.09292221069336, 37.9317512512207, 37.90926742553711, 37.801597595214844, 37.68594741821289, 37.57359313964844, 37.54716491699219, 37.50406265258789 ], "content": [ "Question : This question already has an answer here : .. . .. . Bidirectional Map questions 9783020 bidirectional-map 6 answers .. . .. . I have a simple integer-to-string mapping in Java but I need to be able to easily retrieve string from integer and also integer from string . I ve tried Map but it can retrieve only string from integer it s one way : .. . .. . Is there a right way to do it to have it both directions Another problem is that I only have a few constant values that don t change 1- low 2- mid 3- high so it wouldn t be worth to go for a complicated solution . .. . Answer : You could insert both the key-value pair and its inverse into your map structure .. . .. . Using map.get theValue will then return theKey . It s a quick and dirty way that I ve made constant maps which will only work for a select few datasets : .. . .. . Contains only 1 to 1 pairs .. . Set of values is disjoint from the set of keys 1- 2 2- 3 breaks it Comment : only works if your Key and Value are the same or possibly if you use Map Object Object Comment : edited for clarification thanks Comment : Furthermore all keys and values should be different .", "Question : Ever since Joshua Katz published these dialect maps http : spark.rstudio.com jkatz SurveyMaps that you can find all over the web https : www.google.com search q dialect+maps tbm isch using harvard s dialect survey http : www4.uwm.edu FLL linguistics dialect maps.html I have been trying to copy and generalize his methods. . but much of this is over my head . josh disclosed some of his methods in this poster http : www4.ncsu.edu jakatz2 files dialectposter.png but as far as I know has not disclosed any of his code . My goal is to generalize these methods so it s easy for users of any of the major United States government survey data sets to plop their weighted data into a function and get a reasonable geographic map . The geography varies : some survey data sets have ZCTAs some have counties some have states some have metro areas etc . It s probably smart to start by plotting each point at the centroid - centroids are discussed here http : www.census.gov geo reference zctafaq.html and available for most every geography in the census bureau s 2010 gazetteer files http : www.census.gov geo maps-data data gazetteer2010.html . So for each survey data point you have a point on a map . but some survey responses have weights of 10 others have weights of 100 000 obviously whatever heat or smoothing or coloring that ultimately ends up on the map needs to account for different weights . I m good with survey data but I do not know anything about spatial smoothing or kernel estimation . the method that josh uses in his poster is k-nearest neighbor kernel smoothing with gaussian kernel which is foreign to me . I am a novice at mapping but I can generally get things working if I know what the goal should be . Note : This question is very similar to a question asked ten months ago that no longer contains available data http : stackoverflow.com questions 17025273 create-heatmap-with-distribution-of-attribute-values-in-r-not-density-heatmap . There are also tid-bits of information on this thread http : stackoverflow.com questions 14461954 heatmap-based-on-average-weights-and-not-on-the-number-of-data-points but if someone has a smart way to answer my exact question I d obviously rather see that . The r survey package has a svyplot function and if you run these lines-of-code you can see weighted data on cartesian-coordinates . but really for what i d like to do the plotting needs to be overlaid on a map . In case it s of any use I have posted some example code that will give anyone willing to help me out a quick way to start with some survey data at core-based statistical areas another geography type . Any ideas advice guidance would be appreciated and credited if I can get a formal tutorial guide how-to written for http : asdfree.com .. . .. . thanks Comment : To learn about kernel smoothing in general I d highly recommend Chapter 6 of Hastie Tibshirani Friedman s Elements of Statistical Learning http : statweb.stanford.edu tibs ElemStatLearn . Formula 6.5 and the text around it describes what a k-nearest neighbor kernel possibly Gaussian would look like in one dimension . Once you ve grasped that the extension to two dimensions is conceptually simple . Implementing it is another matter and someone else will have to weigh in re : existing implementations in R . Comment : @JoshO Brien thank you looks like the whole book is on the web and the formula you re referring to is on pdf page 212 of statweb.stanford.edu tibs ElemStatLearn printings http : statweb.stanford.edu tibs ElemStatLearn printings ESLII print10.pdf page 212 Comment : more of those maps hit the nyt front page today : nytimes.com interactive 2014 05 12 upshot http : www.nytimes.com interactive 2014 05 12 upshot 12-upshot-nba-basketball.html hp .. . Answer : this is my final answer regis .. . .. . http : www.asdfree.com 2014 12 maps-and-art-of-survey-weighted.html Comment : Now if we could just have this instead of CASES . Comment : sorry what s cases Comment : What they use at SDA . Comment : ..you can have this we released all of the code . but cases at sda looks like it doesn t have anything to do with mapping so i guess i m still confused Comment : No well actually I was really meaning your larger project of making the big survey data sets available and analyzable with open-source code . The mapping looks great .", "Question : When I work with maps I tend to prefer ones whose elements can be iterated through in the same order they were inserted . It makes them feel more deterministic and easier to test . For this reason and others I ve always been a sucker for LinkedHashMap in Java . In the FP world for lookups there is a preference for trees over maps . True in Scala there is an immutable version of LinkedHashMap called ListMap but it doesn t use hashes and seems too slow for most practical uses . If I want to get the advantages of immutability how can I satisfy my thirst for data-structures that remember insertion order as well as having fast lookup Has somebody written something in a library somewhere .. . Answer : Finit maps hashtables dictionaries usually do not guarantee correct order iteration . It is a common thing for most of libraries and languages . So if you want to iterate through it I would recomend you to store keys pointers into additional data structure that supports insert-order iteration . Thus you can iterate through helper array and lookup into finit map for details about the entry . Regarding finit maps . Scala just like Closure uses HAMT Hash Array Mapped Tree http : en.wikipedia.org wiki Hash array mapped trie data structure for hashtable implementation . And it realy fast . There is also Fast Mergeble Integer Map http : citeseerx.ist.psu.edu viewdoc summary doi 10.1.1.37.5452 s by C . Okasaki which can be used as finit maps . And you were right about trees . Haskell uses Red-Black tree as finit map implementaions . It also fast and it almost O 1 . For example for storing all possible keys in such map in JVM platform you need to alocate 2147483647 nodes . So to look up through the whole tree you need only log 2 2147483647 31 steps . Not so slow huh Comment : I guess this is the closest I will get . Maybe I was asking too much for one data structure . I just got spoilt on LinkedHashMap in Java . In the end for my particular problem I realized I didn t need lookup so much and simplified the structure to a List of pairs .", "Question : With reference to my previously asked question about boost : : bimaps and boost associative property maps interface here http : stackoverflow.com questions 21654594 using-boostassociative-property-map-with-boostbimap-interface 21660622 21660622 I want to use Put and Get helper functions for my bimap . With reference to a sample code given here http : coliru.stacked-crooked.com a f1e7301501fa7f98 I tried to add the following and i get a long compile error for assertion failed .. . Here is the code : .. . .. . It gives error as : a long list . but i have just put a snippet .. . .. . There is also one error which gives me error at line number 364 of the file property map.hpp in boost .. . .. . I understand the error that associative map cannot mutate the data as it references to the left map view . but How do I use put and get helper functions I can use GET my bimap.left z functions but I am not able to use PUT function . I wanted to use associative property map for get and put functions to operate on actual bimap so that i dont have to use insert value-type .. . I hope I am clear enough for my problem . Please suggest . .. . Answer : In general you cannot update bimap entries via iterators : .. . .. . The relations stored in the Bimap will not be in most cases modifiable directly by iterators because both sides are used as keys of key-based sets . When a bimap left view iterator is dereferenced the return-type is signature-compatible with a std : : pair const A const B . So there s your answer . Likewise you couldn t .. . .. . http : www.boost.org doc libs release libs bimap doc html boost bimap the tutorial differences with standard maps.html boost bimap.the tutorial.differences with standard maps.iterator value-type .. . .. . Now reading a bit more on there leads me to suspect the following solution : .. . .. . Disclaimer : I don t know about the semantics that this changes but it at least appears to support writable references . The below sample prints .. . .. . See it Live On Coliru http : coliru.stacked-crooked.com a 780ceb1fd0e9ed90 .. . .. . .. . .. . Full Listing Comment : @sehe...thanks . this worked . but I am sorry I should have told you more about my intentions behind using bimaps . Just using plain maps and associative maps will work for general sense . The thing is : I want to create a bimap which key and value..Initially the bimap is filled with left view map using associative prop map for it . And later on I want to use right view through another associative property map say right asso bimap . In my case I am sure that both the key and value are unique so bimap is most suitable .", "Question : I m having a bit of trouble reversing a given map and storing its reversed keys and values into another map . I have a method prototype as follows : .. . .. . So if I have sample keys for the directed-graph such that : .. . .. . I need to effectively reverse this graph so that instead of b - d I have d - b . .. . .. . I think all this requires is for me is to interchange the values and keys in the original graph and add them to the reverseMap . I suppose I could iterate through each set of values for a given key in the graph and then and store those in a list . Unfortunately I m having trouble implementing this and thinking it through . I d really appreciate a nudge in the right direction . Comment : You might be interested in Guava s Multimaps http : code.google.com p guava-libraries wiki NewCollectionTypesExplained Multimap . .. . Answer : I would first suggest writing a Graph class which abstracts away the underlying Map data structure . Of course this just pushes the implementation to the Graph interface rather than dealing directly with the Map interface . So for now stick with your map : .. . .. . I suggest using Map.entrySet http : docs.oracle.com javase 7 docs api java util Map.html entrySet 28 29 to get the set of entries from your graph . Then for each Map.Entry http : docs.oracle.com javase 7 docs api java util Map.Entry.html retrieve the key and value of each one . Next for each vertex in the value Set insert the key into the Set which is associated with the vertex . This might be more clear if I formatted it similar to Java code rather than English sentences . I hope you get the basic idea . Of course using a pre-made and pre-tested solution would be preferrable if it fits into your constraints of project . Comment : Both maps are Map String Set String it s not a bijective map . Comment : @FrankPavageau ahh...I misunderstood . The OP is reversing the edges in the graph not reversing the mapping relationship of the data structure .", "Question : I m trying to use the new ES6 Map https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Map objects in order to represent a map between properties and a value . I have objects in a form similar to : .. . .. . I want to group them based on both their key1 and key2 value . For example I want to be able to group the following by x and y : .. . .. . And obtain a Map containing : .. . .. . In Python I d use tuples as dictionary keys . ES6 map allow arbitrary objects as keys but use the standard equality algorithm so objects are only equal by reference from what I can tell . How can I accomplish this sort of grouping using ES6 maps Alternatively a solution using normal JS objects if there is an elegant way I overlooked . I d rather not use an external collections library - but if there is a better solution using one I m interested in learning about it too . .. . Answer : Ok I ve raised the issue on esdiscuss http : esdiscuss.org topic maps-with-object-keys now and I got an answer from Mozilla s Jason Orendorff https : twitter.com jorendorff : .. . .. . 1 . This is a problem with ES6 maps . 2 . The solution will come in the form of ES7 value-objects http : www.slideshare.net BrendanEich value-objects for keys instead of objects . 3 . It was considered before to let people specify .equals and .hashCode but it was rejected in favor of value-objects . for good reasons in my opinion . 4 . The only solution as of now is to roll your own collection . A basic such collection concept don t use in production code was offered by Bradley on the ESDiscuss thread and might look something like this : .. . .. . A better solution is to use something like MontageJS Collections https : github.com montagejs collections which allows for specification of hash equals functions . You can see the API docs here http : documentup.com montagejs collections collections map-map-equals-hash-getdefault .", "Question : Ever since Joshua Katz published these dialect maps http : spark.rstudio.com jkatz SurveyMaps that you can find all over the web https : www.google.com search q dialect+maps tbm isch using harvard s dialect survey http : www4.uwm.edu FLL linguistics dialect maps.html I have been trying to copy and generalize his methods. . but much of this is over my head . josh disclosed some of his methods in this poster http : www4.ncsu.edu jakatz2 files dialectposter.png but as far as I know has not disclosed any of his code . My goal is to generalize these methods so it s easy for users of any of the major United States government survey data sets to plop their weighted data into a function and get a reasonable geographic map . The geography varies : some survey data sets have ZCTAs some have counties some have states some have metro areas etc . It s probably smart to start by plotting each point at the centroid - centroids are discussed here http : www.census.gov geo reference zctafaq.html and available for most every geography in the census bureau s 2010 gazetteer files http : www.census.gov geo maps-data data gazetteer2010.html . So for each survey data point you have a point on a map . but some survey responses have weights of 10 others have weights of 100 000 obviously whatever heat or smoothing or coloring that ultimately ends up on the map needs to account for different weights . I m good with survey data but I do not know anything about spatial smoothing or kernel estimation . the method that josh uses in his poster is k-nearest neighbor kernel smoothing with gaussian kernel which is foreign to me . I am a novice at mapping but I can generally get things working if I know what the goal should be . Note : This question is very similar to a question asked ten months ago that no longer contains available data http : stackoverflow.com questions 17025273 create-heatmap-with-distribution-of-attribute-values-in-r-not-density-heatmap . There are also tid-bits of information on this thread http : stackoverflow.com questions 14461954 heatmap-based-on-average-weights-and-not-on-the-number-of-data-points but if someone has a smart way to answer my exact question I d obviously rather see that . The r survey package has a svyplot function and if you run these lines-of-code you can see weighted data on cartesian-coordinates . but really for what i d like to do the plotting needs to be overlaid on a map . In case it s of any use I have posted some example code that will give anyone willing to help me out a quick way to start with some survey data at core-based statistical areas another geography type . Any ideas advice guidance would be appreciated and credited if I can get a formal tutorial guide how-to written for http : asdfree.com .. . .. . thanks Comment : To learn about kernel smoothing in general I d highly recommend Chapter 6 of Hastie Tibshirani Friedman s Elements of Statistical Learning http : statweb.stanford.edu tibs ElemStatLearn . Formula 6.5 and the text around it describes what a k-nearest neighbor kernel possibly Gaussian would look like in one dimension . Once you ve grasped that the extension to two dimensions is conceptually simple . Implementing it is another matter and someone else will have to weigh in re : existing implementations in R . Comment : @JoshO Brien thank you looks like the whole book is on the web and the formula you re referring to is on pdf page 212 of statweb.stanford.edu tibs ElemStatLearn printings http : statweb.stanford.edu tibs ElemStatLearn printings ESLII print10.pdf page 212 Comment : more of those maps hit the nyt front page today : nytimes.com interactive 2014 05 12 upshot http : www.nytimes.com interactive 2014 05 12 upshot 12-upshot-nba-basketball.html hp .. . Answer : I m not sure how much of a help I can be with spatial smoothing as it s a task I have little experience with but I ve spent some time making maps in R so I hope what I add below will help with the that part of your question . I ve started editing your code at shapefile read-in you ll notice that I kept the map in the SpatialPolygonsDataFrame class and I relied on the raster and gstat packages to build the grid and run the spatial smoothing . The spatial smoothing model is the part I m least comfortable with yet the process allowed me to make a raster and demonstrate how to mask project and plot it . enter image description here http : i.stack.imgur.com A922E.png Comment : thank you this is above and beyond . could you contact me via e-mail is there another way to deal with michigan and or maine Comment : You re welcome - I m glad it s useful The gap over Maine was caused by an error in my code when making the raster I used bbox of the cbsa.map and not the base map m . I ve edited the code and replaced the image .", "Question : Let s say I have a simple Java object let s call it DefinedData . It will contain a number of final fields of varying types such as strings integers enums and even perhaps a set or two of strings . All in all it s just a relatively simple data container . There will be potentially 1k to 2k of these all static final objects . Most of these fields will be unique in that no other DefinedData object will have the same value for that field . These will be placed into a Map of DefinedData Object . Now you could easily get that Object out of the Map if you have the DefinedData object but what if you only have one of the unique field values You can t just pass that to the Map . You d have to iterate over the keys and check and that would mean wrapping the map with a lookup method for each field in DefinedData . Doable but not the prettiest thing out there especially if there are a lot of values in the Map and a lot of lookups which is possible . Either that or there would need to be a lookup for DefinedData objects which would again be a bunch of Maps.. . This almost sounds like a job for a database look up based on any column but that s not a good solution for this particular problem . I d also rather avoid having a dozen different Maps each mapping a single field from DefinedData to the Object . The multikey maps I ve seen wouldn t be applicable as they require all key values not just one . Is there a Map Collections or other implementation that can handle this particular problem Comment : Multiple maps is going to be the only solution here . Why are you averse to doing that You could write a MultiKeyMap wrapper to hide the complexity from client code . Comment : Eh maybe I m just being a bit anal about the whole thing . It s not a big deal but I was hoping there would be something a bit cleaner . Yes the complexity can be hidden but I was hoping to find something that could better encapsulate the solution . Building N Hashmaps feels a bit bulky . Comment : You have to provide a lookup function using N different key sets . You won t find anything simpler than N hashmaps . .. . Answer : I hesitate to propose this but you could encapsulate your lookups behind some sort of Indexer class that auto-generates a single map via reflection using the fields of supplied objects . By single map I mean just one single map for the whole indexer which creates a key based on both the field name and data say concatenating the string representing the field name with a string representation of the data . Lookups against the indexer would supply both a field name and data value which would then be looked up in the single map encapsulated by the indexer . I do not think this necessarily has any advantage over a similar solution where the indexer is instead backed by a map of maps map of field name to map of data to object . The indexer could also be designed to use annotations so that not all fields are indexed only those suitably annotated or vice-versa with annotations to exclude fields . Overall a map of map solutions strikes me as easier since it cuts out the step of complicated key assembly which could be complicated for certain field data types . In either case encapsulating it all in an Indexer that auto-generates its maps seems to be the way to go . Update : .. . .. . Made a quick non-generified proof of concept for an Indexer type class using the map of maps approach . This is in no way a finished work but illustrates the concept above . One major deficiency being the reliance on beans so both public and private fields without accessor methods are invisible to this indexer .", "Question : I am very confused by the name unordered-map . The name suggests that the keys are not ordered at all . But I always thought they are ordered by their hash value . Or is that wrong because the name implies that they are not ordered Or to put it different : Is this .. . .. . with .. . .. . the same as .. . .. . Edit : Well ok not exactly STL will complain here because there may be keys k1 k2 and neither k1 k2 nor k2 k1 . You would need to use multimap and overwrite the equal-check . Or again differently : When I iterate through them can I assume that the key-list is ordered by their hash value Comment : Possible duplicate of stackoverflow.com questions 3039823 http : stackoverflow.com questions 3039823 boostunordered-map-is-ordered .. . Answer : Unordered doesn t mean that there isn t a linear sequence somewhere in the implementation . It means you can t assume anything about the order of these elements . For example people often assume that entries will come out of a hash map in the same order they were put in . But they don t because the entries are unordered . As for ordered by their hash value : hash values are generally taken from the full range of integers but hash maps don t have 2 32 slots in them . The hash value s range will be reduced to the number of slots by taking it modulo the number of slots . Further as you add entries to a hash map it might change size to accommodate the new values . This can cause all the previous entries to be re-placed changing their order . In an unordered data structure you can t assume anything about the order of the entries . Comment : I thought I can assume that they come out ordered by their hash value . Comment : I ve added more.. . Comment : Yes sure but still they would be ordered by their hash value . Of course if the hash value is the same for different keys the order is undefined . Comment : They aren t ordered by their hash value . All that depends entirely on the implementation . If it is open hashing they are ordered by their hash value modulo a prime if they didn t cause a collision and by their hash value modulo a prime modulo another prime if there was . If it is a chaining bucket implementation like most are the buckets are ordered on hash value modulo the number of buckets and the items in the list are ordered probably on insertion time . You can t call any of that ordered on hash value or indeed ordered in any useful sense at all . Comment : @Albert : If the hash map has 1009 slots a prime number and your two values hash to 13116 and 13118 they will end up in slots 1008 13116 1009 and 1 13118 1009 . When iterating the entries the second one will come out first . You can t assume anything about the ordering in an unordered-map .", "Question : as a tcl developer starting with groovy I am a little bit surprised about the list and map support in groovy . Maybe I am missing something here . I am used to convert between strings lists and arrays maps in tcl on the fly . In tcl something like .. . .. . would be possible where as in groovy the each command steps through each character of the string . This would be much of a problem is I could easily use something like the split or tokenize command but because a serialized list or map isn t just a : 2 b : 4 it is a little bit harder to parse . It seems that griffon developers use a stringToMap library http : code.google.com p stringtomap but the example can t cope with the serialized maps either . So my question is now : what s the best way to parse a map or a list in groovy Cheers Ralf .. . .. . PS : it s a groovy question but I ve tagged it with grails because I need this functionality for grails where I would like to pass maps through the URL .. . .. . Update : This is still an open question for me.. . so here are some updates for those who have the same problem : .. . .. . when you turn a Map into a String a .toString will result in something which can t be turned back into a map in all cases but an .inspect will give you a String which can be evaluated back to a map in Grails there is a .encodeAsJSON and JSON.parse String - both work great but I haven t checked out yet what the parser will do with JSON functions possible security problem Comment : If you re using grails and want a map I d look at POSTing a JSON message . Probably easier to generate on the client-side and there are things built into grails to evaluate JSON . Comment : thanx . json could indeed be a very good alternative Comment : Passing maps through the URL in Grails sounds like a job for URL mappings . Check out the Embedded Variables section of the grails user guide section 6.4.2 . You can define a custom URL structure to pass whatever map you d like ie myapp.com controller action key1 value1 key2 value2 http : myapp.com controller action key1 value1 key2 value2 It won t work too well for multi-dimensional maps or huge data-structures but I would contend those shouldn t be passed around via URLs anyway . Comment : good idea - when you have small maps . In my case I would like to submit the data to be plotted on a chart through the URL . Something like the google chart API . So my maps can be quite big.. . .. . Answer : If you don t want to use evaluate do instead : Comment : That is a pretty limited as it will only work with Strings . For example in your example the values that are put in newMap will be the Strings 2 and 4 not the numbers 2 and 4 .", "Question : I m trying to use the new ES6 Map https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Map objects in order to represent a map between properties and a value . I have objects in a form similar to : .. . .. . I want to group them based on both their key1 and key2 value . For example I want to be able to group the following by x and y : .. . .. . And obtain a Map containing : .. . .. . In Python I d use tuples as dictionary keys . ES6 map allow arbitrary objects as keys but use the standard equality algorithm so objects are only equal by reference from what I can tell . How can I accomplish this sort of grouping using ES6 maps Alternatively a solution using normal JS objects if there is an elegant way I overlooked . I d rather not use an external collections library - but if there is a better solution using one I m interested in learning about it too . .. . Answer : While this question is quite old value-objects are still not an existing thing in JavaScript so people might still be interested so I decided to write a simple library to accomplish similar behaviour for arrays as keys in maps repo here : https : github.com Jamesernator es6-array-map . The library is designed to be basically identical to map in usage except arrays are compared element-wise instead of by identity . Usage : .. . .. . Warning : The library however treats key elements by identity so the following doesn t work : .. . .. . But as long as you can serialize the data into arrays of primitives you can use ArrayMap as follows :", "Question : as a tcl developer starting with groovy I am a little bit surprised about the list and map support in groovy . Maybe I am missing something here . I am used to convert between strings lists and arrays maps in tcl on the fly . In tcl something like .. . .. . would be possible where as in groovy the each command steps through each character of the string . This would be much of a problem is I could easily use something like the split or tokenize command but because a serialized list or map isn t just a : 2 b : 4 it is a little bit harder to parse . It seems that griffon developers use a stringToMap library http : code.google.com p stringtomap but the example can t cope with the serialized maps either . So my question is now : what s the best way to parse a map or a list in groovy Cheers Ralf .. . .. . PS : it s a groovy question but I ve tagged it with grails because I need this functionality for grails where I would like to pass maps through the URL .. . .. . Update : This is still an open question for me.. . so here are some updates for those who have the same problem : .. . .. . when you turn a Map into a String a .toString will result in something which can t be turned back into a map in all cases but an .inspect will give you a String which can be evaluated back to a map in Grails there is a .encodeAsJSON and JSON.parse String - both work great but I haven t checked out yet what the parser will do with JSON functions possible security problem Comment : If you re using grails and want a map I d look at POSTing a JSON message . Probably easier to generate on the client-side and there are things built into grails to evaluate JSON . Comment : thanx . json could indeed be a very good alternative Comment : Passing maps through the URL in Grails sounds like a job for URL mappings . Check out the Embedded Variables section of the grails user guide section 6.4.2 . You can define a custom URL structure to pass whatever map you d like ie myapp.com controller action key1 value1 key2 value2 http : myapp.com controller action key1 value1 key2 value2 It won t work too well for multi-dimensional maps or huge data-structures but I would contend those shouldn t be passed around via URLs anyway . Comment : good idea - when you have small maps . In my case I would like to submit the data to be plotted on a chart through the URL . Something like the google chart API . So my maps can be quite big.. . .. . Answer : I think you are looking for a combination of ConfigObject http : groovy.codehaus.org gapi groovy util ConfigObject.html and ConfigSlurper . Something like this would do the trick . Comment : thanx good to know about the slurper", "Question : This question already has an answer here : .. . .. . How to create a deep unmodifiable collection questions 415967 how-to-create-a-deep-unmodifiable-collection 5 answers .. . .. . The java.util.Collections class allows me to make collection instances unmodifiable . The following method .. . .. . returns an umodifiable Map so that an UnsupportedOperationException is caused by attempting to alter the map instance . Unfortunately all List String childs aren t unmodifiable . So I want to know whether there is a way to enforce the unmofiable behavior for the child values List String too Of course alternatively I can iterate through the maps key-value pairs make the lists unmodifiable and reassemble the map . Comment : Use final access modifier Comment : @Ashokkuttuva that s incorrect final stops you from creating a new instance of the object you can still modify the contents of a list if it s made final . Comment : @Ashokkuttuva final --- Assignment . Not the content . Prefer to read stackoverflow.com questions 19049697 http : stackoverflow.com questions 19049697 why-final-instance-class-variable-in-java Comment : @OP not possible with default one I guess . Write one on your own As per your needs . stackoverflow.com questions 16356232 unmodifiable-list-in-java http : stackoverflow.com questions 16356232 unmodifiable-list-in-java Comment : The map has no influence on how the lists deal with their data so indeed the only thing you can do is create an unmodifiable map of unmodifiable lists . .. . Answer : Maybe that s not exactly what you need but I recommend to use Guava immutable list multimap http : docs.guava-libraries.googlecode.com git javadoc com google common collect ImmutableListMultimap.html Comment : A ListMultiMap is not the same thing as Map String List String Comment : @JasonNichols please give me the reasons why could I use Map String List String instead of ListMultiMap Comment : An ImmutableListMultiMap is simply an immutable implementation of a MultiMap which allows multiple keys in a single map that s not the same as a Map String List . I ll post some code", "Question : the other day I was wondering why scala.collection.Map defines its unzip method as .. . .. . Since the method returns only a pair of Iterable instead of a pair of Seq it is not guaranteed that the key-value pairs in the original map occur at matching indices in the returned sequences since Iterable doesn t guarantee the order of traversal . So if I had a .. . .. . then after calling .. . .. . I might end up with .. . .. . just as well as with .. . .. . While I can imagine storage-related reasons behind this think of HashMaps for example I wonder what you guys think about this behavior . It might appear to users of the Map.unzip method that the items were returned in the same pair order and I bet this is probably almost always the case yet since there s no guarantee this might in turn yield hard-to-find bugs in the library user s code . Maybe that behavior should be expressed more explicitly in the accompanying scaladoc EDIT : Please note that I m not referring to maps as ordered collections . I m only interested in matching sequences after unzip i.e . for .. . .. . it holds for all i that keys i values i is an element of the original mapping . .. . Answer : Maps generally do not have a natural sequence : they are unordered collections . The fact your keys happen to have a natural order does not change the general case . However I am at a loss to explain why Map has a zipWithIndex method . This provides a counter-argument to my point . I guess it is there for consistency with other collections and that although it provides indices they are not guaranteed to be the same on subsequent calls . Comment : It s best to think of zipWithIndex as just a convenient helper . It s not saying anything in particular about the ordering of the Map it s just providing a handy mechanism that is too often rewritten in languages that don t provide a similar call . Comment : Thanks for answering . However the OP didn t assume maps as ordered collections .", "Question : I want to create an application where users can mark on map location of polluting factories . Google map provides a MAP editor feature . We would like to have our own website like www.toxic-map.org where people could mark these locations . What would be the best approach for this Additionally we should be able to backup this database which could be cross checked or used for other purposes . This will enable us to have little accurate census of such entities and thereby helping us in the fight against these environment harming illegal factories . Most of our work is focused on developing countries of Asia . Edited : Google maps is one of the options . I am open to other possible solutions as well . I am looking at something we could do quick prototyping in . Thank you in advance Comment : If you consider a a week or two as quick I don t see it taking you longer with to have a prototype with Google Maps along with the remaining tiers : application + database . You will find a lot of help and examples on the web . .. . Answer : On the client-side I recommend you to have a look at OpenLayers http : openlayers.org a free and open-source web mapping framework released under a BSD-style License . It is completely written in Javascript and offers a lot of functionality including the features that your application may need Add markers to the map drag them to adjust the locations .. . . It also supports dozens of different geographic data formats and services such as WMS http : en.wikipedia.org wiki Web Map Service KML http : code.google.com apis kml documentation or Google Maps . If you are worried about licensing issues regarding the use of Google Maps you can use other global data sources like OpenStreetMap http : www.openstreetmap.org or a public WMS if they provide enough coverage of your area of interest . On the server-side I agree with the answer provided by Daniel Vassallo http : stackoverflow.com questions 2065393 a-crowdsourced-map-edit-application-for-enviornmental-cause 2065476 2065476 . I will just add a little detail and recommend you to serve the markers in a standard format natively supported by OpenLayers like KML GeoJSON http : geojson.org or GeoRSS http : www.georss.org . It will make really easy to draw the markers on the map . Looks like a really interesting project I hope you are lucky starting it up . Comment : +1 for suggesting OpenStreetMap", "Question : What is the difference between HashMap LinkedHashMap and TreeMap in Java I don t see any difference in the output as all the three has keySet and values . What are Hashtable s Comment : related language-agnostic : stackoverflow.com questions 371136 http : stackoverflow.com questions 371136 binary-trees-vs-linked-lists-vs-hash-tables .. . Answer : All three represent mapping from unique keys to values and therefore implement the Map http : java.sun.com javase 6 docs api java util Map.html interface . 1 . HashMap is a map based on hashing http : en.wikipedia.org wiki Hash function of the keys . It supports O 1 get put operations . Keys must have consistent implementations of hashCode and equals http : java.sun.com javase 6 docs api java lang Object.html hashCode for this to work . 2 . LinkedHashMap is very similar to HashMap but it adds awareness to the order at which items are added or accessed so the iteration order is the same as insertion order or access order depending on construction parameters . 3 . TreeMap is a tree based mapping . Its put get operations take O log n time . It requires items to have some comparison mechanism either with Comparable or Comparator . The iteration order is determined by this mechanism . Comment : So if I understand correctly the only difference between LinkedHashMap and TreeMap is performance given that the order of insertion is the same as the natural order Comment : @MosheShaham As he said in 2 : LinkedHashMap will iterate in the insertion order not the natural order . So if you add 2 5 3 to a LinkedHashMap and do a for each over it it will return 2 5 3 . If it were 2 5 3 to a TreeMap it will return 2 3 5 . Comment : Tree map also has a lot of other nice tricks . Like head and tail maps .", "Question : This question already has an answer here : .. . .. . What is the best way get the symmetric-difference between two sets in java questions 8064570 what-is-the-best-way-get-the-symmetric-difference-between-two-sets-in-java 6 answers .. . .. . I have two maps : .. . .. . the Sample is some custom class .. . .. . The newMap has keys : 1 2 3 4 5 The oldMap has keys : 2 3 4 5 8 .. . .. . What is the best way to get difference between them .e get Sample s with keys : 1 and 8 .. . .. . I thought to use Collections and extract Set : .. . .. . Thank you Comment : see stackoverflow.com questions 8064570 http : stackoverflow.com questions 8064570 what-is-the-best-way-get-the-symmetric-difference-between-two-sets-in-java .. . Answer : Use a function like this if you re interested only on the keys : .. . .. . Use the following function for the full diff Map without affecting your existing Map objects :", "Question : It s my first time trying out C++ STL . I m trying to build a multidimensional associative-array using map . For example : .. . .. . When compiling the code above in VS2005 I got 170 of C4503 warnings . All of the warnings are about decorated name-length exceeded name was truncated . The program seems to run fine though . Anyone care to spare some time to explain to me what caused these warnings and how do i solve em thanks in advance : Comment : May I suggest that you use a boost : : shared-ptr instead of a raw pointer for storing your DA Otherwise freeing all the allocated memory is likely to become a nightmare . Comment : Hi ereOn thanks for your suggestion . I ll need to study this more . My program is actually an exe called by a main exe.In the program a whole bunch probably thousands of DA will be allocated first then as the program runs some will be freed and allocated dynamically depending on the control commands from the main exe . Comment : So many maps . D : .. . Answer : Others have suggested how you could disable the warning . I suggest that you rethink your design instead . Use some more abstraction than map 5 . Or change the data structure of the storage . E.g . use map instead of map 5 . Updated : .. . .. . What I mean is that you basically have two options : .. . .. . You use a key with as many strings levels as you need : .. . .. . struct Key3 std : : string x y z typedef std : : map Key3 DA MyMap .. . .. . Or you build something generic where each level can hold either the DA value and or another level . Comment : Hi wilx thanks for the advise . I was rethinking how i could minimize the number of maps . The best i could end up with is map 2 . What are the disadvantages of having the data structure such as above map 5 I need at least 2 levels of data association for iteration purposes . What do you think is a better approach to this" ] }
[ "yes-answer-short" ]
map-function
UNK_RELATION
perlscript@perl@55
perlscript -- perlscript is a scripting engine to run @placeholder scripts on either asp or wsh .
{ "confidence": [ 47.204559326171875, 44.4813346862793, 42.76569366455078, 37.196372985839844, 37.196372985839844, 37.196372985839844, 37.196372985839844, 35.8238410949707, 35.8238410949707, 35.8238410949707, 35.8238410949707, 23.22742462158203, 21.25396156311035, 20.377365112304688, 19.239139556884766, 16.577388763427734, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 13.585786819458008, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184, 12.213255882263184 ], "content": [ "+1 for the sheer rarity of expertise for PerlScript", "This is not true obviously as those functions are actually PerlScript subroutines .", "Well the answer is actually pretty simple - don t use PerlScript to create the elements dynamically instead create them statically and use PerlScript to hide and show them .", "All .. . .. . I want to send the xml to the main function and receive it and create XmlDocument I will be calling the exe thru perlscript .", "@BaskerGanesan Maybe Perlscript has a good way to send rich strings as arguements to a program", "Make sure that you do select PerlScript when installing Active Perl it is selected by default at least in the latest version : .. . .. .", "enter image description here http : i.stack.imgur.com LAS1S.png .. . .. . Successful installation creates PerlScript key under HKEY CLASSES ROOT hive .", "I m specifically talking about the IE embedded script language PerlScript from ActiveState .", "Now if we convert this back to the equivalent perlscript we can see that it still doesn t work .", "I ve written a very small html page for IE that uses client-side PerlScript .", "Here s the page : .. . .. . I have looked at on-line documentation for PerlScript which is incredibly sparse .", "Perl Script MACRO name MacroName key Ctrl+Shift+C lang PERLSCRIPT id 9999 my xml xml version 1.0 test ans a ans ans b ans test system start C : XMLTest abc.exe xml MACRO C main function static void Main string args XmlDocument doc new XmlDocument doc.LoadXml args 0", "The error means that matching language engine can not be found .", "This key should have CLSID subkey with CLSID of Active Script language engine .", "In my VB 6 application I am using Script Control 1.0 for running external scripts through my application .", "If we run this the third button will appear but clicking it will do nothing .", "From perl script I will be calling the exe and pass the XML as input parameter .", "Input : xml version 1.0 test ans a ans ans b ans test .. . .. . Please send me samples", "Having read How to Ask http : stackoverflow.com questions how-to-ask what research have you done", "Where is your code", "Hint : the xml string will be in args .", "Question on passing arguments to programs is generically off-topic for SO - SU.SE may be better place for it .", "Reading arguments in C discussed in many questions articles already - so clearly you can t be asking that as you should have found many options .", "The way you pass values into your program is with that string args parameter in your main .", "The elements in that array that will be whatever arguments you ve passed into your program .", ".. . .. . So if you execute your program like this : .. . .. . args will consist of 1 string : xml version 1.0 test ans a ans ans b ans test .. . .. . you can also pass a filename into your program if your xml is stored in a file .", "If you really want to answer this question you should figure out how to deal with spaces and quotes and explain that .", "You may need to significantly edit question .", "I could not do debug to see whats going on what it is receiving .", "When I put logger .", "I got this message : Unexpected end of file has occurred .", "The following elements are not closed : arguements .", "Line 1 position 7 .", "Source : System.Xml.It seems it is receiving only first node test .", "Its not receiving complete whole xml as a single string .", "its truncates each node as single string", "@BaskerGanesan change xml version 1.0 to xml version 1.0 using the single quotes isn t quite a full solution .", "you should probably store the xml in a file if you can", "As of now I should not store the xml in system I got to send it thru xml as content", "But while running I am getting the below error .", "I ve installed ActivePerl 5.14 and the error is occurring while running the code below : .. . .. . Any ideas what the problem may be", "Component having this CLSID should be registered in the system .", "In my installation the component s binary is C : Perl bin PerlSE.dll .", "I currently have the following but when button 3 is pressed no action happens .", "This is a very difficult thing to achieve apparently .", "The browser IE9 in my case is expecting the value of the onclick attribute when set from a script to be a function reference rather than a string .", "We can prove this by converting your code into the equivalent JavaScript as shown below .", "We need to make only a minor adjustment to make this work in JavaScript .", "In fact it s a little bit worse because now if you use your favourite HTML debugger to inspect the button 3 element there is no onclick handler at all .", "So what can we do to get around this", "This seems to do the job nicely although I m not sure how well it will fit into your use-case .", "There is of course one massively weird thing in this code : the onclick handlers for each of the input elements explictly states that it is calling a JavaScript function .", "However if you remove the javascript : prefix then the handlers are never called .", "I think this just further highlights the browser s bias towards JavaScript .", "Hope that helps", "Damian this was an awesome answer .", "If I could vote up multiple times I would .", "Thank you for taking time to explain it .", "I think the bug with adding javascript : in the handler is probably an IE quirk .", "@MikeCaron No worries", "Thanks for the thanks", "In the script I launch a separate process which creates a TCP socket .", "After launching the process I start a listener which appends HTML to the end of a div as lines are read additionally for debugging I added alerts as each line is read .", "The problem is that the alerts hit spot on as lines are read but the HTML doesn t update until the process has finished .", "Why is that", "Is there a way to force the page to render so that I can get the same behavior", "I m looking for hints at how to command IE to fire page renders respond to these html insertions.. . etc .", "In researching this I have found that I can get it to render as the lines are read if instead of onload I use an onclick on the div .", "Perhaps I m not using the right event and the page isn t fully rendered before the subroutine is fired", "I m very frustrated with IE here v . 9 .", "And yes when I use this in a command-line situation everything fires as expected .", "The CreateServer CreateClient are just wrappers around IO : : Socket : : INET for client and server .", "UPDATE based @Oleg V . Volkov s answer : .. . .. . I modified go and added a read function that reads a line then passes control back to the browser to render .", "Seems to do an ok job .", "That seems to get near real-time updates .", "Most if not all browsers do not redraw page until you return from hosted script process .", "They can reflow internal representation of data on some operations but still won t spend time redrawing it until you ve returned control .", "To allow browser to redraw you should break your task into steps and yield once in a while by scheduling next step with setTimeout and return ing from your script .", "In your particular case replacing sleep 3 where you do nothing anyway with scheduling of next loop iteration to happen 3 seconds later seems like the best way .", "That did the trick thanks", "I modified go to be this : sub go" ] }
{ "confidence": [ 59.67359161376953, 53.30207824707031, 43.903564453125, 37.535667419433594 ], "content": [ "Question : In my VB 6 application I am using Script Control 1.0 for running external scripts through my application . But while running I am getting the below error . I ve installed ActivePerl 5.14 and the error is occurring while running the code below : .. . .. . Any ideas what the problem may be .. . Answer : The error means that matching language engine can not be found . Make sure that you do select PerlScript when installing Active Perl it is selected by default at least in the latest version : .. . .. . enter image description here http : i.stack.imgur.com LAS1S.png .. . .. . Successful installation creates PerlScript key under HKEY CLASSES ROOT hive . This key should have CLSID subkey with CLSID of Active Script language engine . Component having this CLSID should be registered in the system . In my installation the component s binary is C : Perl bin PerlSE.dll .", "Question : I m specifically talking about the IE embedded script language PerlScript from ActiveState . I currently have the following but when button 3 is pressed no action happens . .. . Answer : This is a very difficult thing to achieve apparently . The browser IE9 in my case is expecting the value of the onclick attribute when set from a script to be a function reference rather than a string . We can prove this by converting your code into the equivalent JavaScript as shown below . If we run this the third button will appear but clicking it will do nothing . We need to make only a minor adjustment to make this work in JavaScript . Now if we convert this back to the equivalent perlscript we can see that it still doesn t work . In fact it s a little bit worse because now if you use your favourite HTML debugger to inspect the button 3 element there is no onclick handler at all . So what can we do to get around this Well the answer is actually pretty simple - don t use PerlScript to create the elements dynamically instead create them statically and use PerlScript to hide and show them . This seems to do the job nicely although I m not sure how well it will fit into your use-case . There is of course one massively weird thing in this code : the onclick handlers for each of the input elements explictly states that it is calling a JavaScript function . This is not true obviously as those functions are actually PerlScript subroutines . However if you remove the javascript : prefix then the handlers are never called . I think this just further highlights the browser s bias towards JavaScript . Hope that helps Comment : +1 for the sheer rarity of expertise for PerlScript Comment : Damian this was an awesome answer . If I could vote up multiple times I would . Thank you for taking time to explain it . I think the bug with adding javascript : in the handler is probably an IE quirk . Comment : @MikeCaron No worries Thanks for the thanks", "Question : All .. . .. . I want to send the xml to the main function and receive it and create XmlDocument I will be calling the exe thru perlscript . From perl script I will be calling the exe and pass the XML as input parameter . Input : xml version 1.0 test ans a ans ans b ans test .. . .. . Please send me samples Comment : Having read How to Ask http : stackoverflow.com questions how-to-ask what research have you done Where is your code Hint : the xml string will be in args . Comment : Question on passing arguments to programs is generically off-topic for SO - SU.SE may be better place for it . Reading arguments in C discussed in many questions articles already - so clearly you can t be asking that as you should have found many options . Comment : Perl Script MACRO name MacroName key Ctrl+Shift+C lang PERLSCRIPT id 9999 my xml xml version 1.0 test ans a ans ans b ans test system start C : XMLTest abc.exe xml MACRO C main function static void Main string args XmlDocument doc new XmlDocument doc.LoadXml args 0 .. . Answer : The way you pass values into your program is with that string args parameter in your main . The elements in that array that will be whatever arguments you ve passed into your program . .. . .. . So if you execute your program like this : .. . .. . args will consist of 1 string : xml version 1.0 test ans a ans ans b ans test .. . .. . you can also pass a filename into your program if your xml is stored in a file . Comment : If you really want to answer this question you should figure out how to deal with spaces and quotes and explain that . You may need to significantly edit question . Comment : I could not do debug to see whats going on what it is receiving . When I put logger . I got this message : Unexpected end of file has occurred . The following elements are not closed : arguements . Line 1 position 7 . Source : System.Xml.It seems it is receiving only first node test . Its not receiving complete whole xml as a single string . its truncates each node as single string Comment : @BaskerGanesan change xml version 1.0 to xml version 1.0 using the single quotes isn t quite a full solution . you should probably store the xml in a file if you can Comment : As of now I should not store the xml in system I got to send it thru xml as content Comment : @BaskerGanesan Maybe Perlscript has a good way to send rich strings as arguements to a program", "Question : I ve written a very small html page for IE that uses client-side PerlScript . In the script I launch a separate process which creates a TCP socket . After launching the process I start a listener which appends HTML to the end of a div as lines are read additionally for debugging I added alerts as each line is read . The problem is that the alerts hit spot on as lines are read but the HTML doesn t update until the process has finished . Why is that Is there a way to force the page to render so that I can get the same behavior Here s the page : .. . .. . I have looked at on-line documentation for PerlScript which is incredibly sparse . I m looking for hints at how to command IE to fire page renders respond to these html insertions.. . etc . In researching this I have found that I can get it to render as the lines are read if instead of onload I use an onclick on the div . Perhaps I m not using the right event and the page isn t fully rendered before the subroutine is fired I m very frustrated with IE here v . 9 . And yes when I use this in a command-line situation everything fires as expected . The CreateServer CreateClient are just wrappers around IO : : Socket : : INET for client and server . UPDATE based @Oleg V . Volkov s answer : .. . .. . I modified go and added a read function that reads a line then passes control back to the browser to render . Seems to do an ok job . That seems to get near real-time updates . .. . Answer : Most if not all browsers do not redraw page until you return from hosted script process . They can reflow internal representation of data on some operations but still won t spend time redrawing it until you ve returned control . To allow browser to redraw you should break your task into steps and yield once in a while by scheduling next step with setTimeout and return ing from your script . In your particular case replacing sleep 3 where you do nothing anyway with scheduling of next loop iteration to happen 3 seconds later seems like the best way . Comment : That did the trick thanks Comment : I modified go to be this : sub go" ] }
[ "yes-answer-long", "yes-answer-short" ]
perl
UNK_RELATION
uwamp@apache@38
uwamp -- uwamp is a wamp server with @placeholder mysql php and sqlite .
{ "confidence": [ 54.205955505371094, 52.72260284423828, 52.31111145019531, 49.867191314697266, 49.867191314697266, 47.411720275878906, 47.40528106689453, 46.326324462890625, 45.39530944824219, 44.538883209228516, 43.41212463378906, 41.40057373046875, 40.953399658203125, 40.90562438964844, 40.59495162963867, 40.083316802978516, 39.89533233642578, 39.89533233642578, 39.89533233642578, 39.89533233642578, 39.89033889770508, 39.883243560791016, 39.883243560791016, 39.68361282348633, 38.859893798828125, 38.859893798828125, 38.859893798828125, 38.68489456176758, 38.308502197265625, 37.227901458740234, 37.09739685058594, 37.0399169921875, 36.98616027832031, 36.371864318847656, 35.899051666259766, 35.526039123535156, 35.317848205566406, 35.129859924316406, 35.129859924316406, 35.129859924316406, 35.129859924316406, 33.543033599853516, 33.543033599853516, 32.272640228271484, 32.272640228271484, 32.22068786621094, 32.22068786621094, 30.87236785888672, 30.784442901611328, 30.219425201416016, 29.28862953186035, 28.962310791015625, 28.380691528320312, 25.844528198242188, 25.537153244018555, 25.086406707763672, 24.970035552978516, 24.661365509033203, 24.056808471679688, 23.66106605529785, 23.489765167236328, 22.82013511657715, 21.48906898498535, 21.186447143554688, 19.701133728027344, 19.006404876708984, 18.895597457885742, 18.860877990722656, 18.76611328125, 18.448444366455078, 18.43724822998047, 17.81122398376465, 17.791078567504883, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.308069229125977, 17.096351623535156, 17.096351623535156, 17.049776077270508, 16.31222915649414, 16.109752655029297 ], "content": [ "Mysql Server stop working after 5 seconds fresh install of uwamp .. . .. . Uwamp version 3.1 started with Administrator rights on windows-10 32bits .", "my UWamp Version is 3.0.1 .", "UwAmp is running php-5.6.18 .", "Or learn to do a virtualhost in Uwamp .", "I changed the version of Uwamp .", "In my case I installed UwAmp in C : UwAmp so : .. . .. . from zip bin .dll -- C : UwAmp bin apache bin .. . .. . 4 .", "In the uwAmp control panel click on XDebug client and select Remove MySql log .Then try to start MySQL in the top of control panel .", "Mysql Server stop working after 2 seconds fresh install of uwamp .. . .. . Uwamp version 3.1 started with Administrator rights on windows-8.1 pro 64 bits .", "UwAmp use x86 version to keep compatibility with older PHP version .", "I am testing it on Windows 8.1 with uwAmp PHP 5.3.24 or PHP 5.4.31 .", "It will be copied to the correct php.ini when UwAmp is restarted .", "The web server I am running is UwAmp http : www.uwamp.com en .", "Please help me when I am running PHP 7 with UWamp I see some extensions is undefined to call such as openssl decrypt curl .", "PHP version : 5.2.17 for uWamp I recieve this error : .. . .. . httpd.exe : Syntax error on line 166 of C : UwAmp bin apache conf httpd.conf : LoadModule takes two arguments a module name and the name of a shared object file to load it from .", "I see no cgi-bin folder in Uwamp apache server so just wondering where to put these cgi scripts", "I have a problem at start of UwAmp I get the message : .. . .. . Apache HTTP server has stopped working .. . .. . So impossible to start Apache .. . .. . A solution", "I need to activate Headers module with a2enmod headers to support CORS -- how can I do this with uwamp", "Before use UwAmp you must install Visual C++ Redistributable x86 version vc redist.x86.exe .", "Well what s your line 166 of C : UwAmp bin apache conf httpd.conf", "yes httpd.exe : Syntax error on line 168 of E : UwAmp bin apache conf httpd.conf", "I have Xampp in my computer and all thing works well but when I uninstall it and install uwAmp instead I can not start MySQL server .", "This error occurs since I know UwAmp at its version 1.x.x .", "The solution could be fixing the PID to kill list inside UwAmp software .", "I have UwAmp 3.1.0 sometimes the Apache has trouble to close properly regardless the PHP version installed .", "Copied php phalcon.dll file to C : UwAmp bin php php-5.6.18 ext folder .. . 3 .", "Added extension php phalcon.dll to C : UwAmp bin php php-5.6.18 php uwamp.ini .. . 4 .", "Appended C : UwAmp bin php php-5.6.18 C : phalcon-tools to Windows System Environment Variables : Path .. . 9 .", "I know this can be done with Uniform Server but I would like to stick with UwAmp .", "When I downloaded the correct version for uWamp I recieve this error .. . .. . httpd.exe : Syntax error on line 166 of C : UwAmp bin apache conf httpd.conf : LoadModule takes two arguments a module name and the name of a shared object file to load it from .", "Is already fixed on my end I had to go to apacheconfig button in uwamp and just change the port to 8012 for main-serveur virtual-server .", "Added extension php phalcon.dll to C : UwAmp bin apache php.ini .. . 5 .", "I was playing with clipboard apps yesterday but how could they affect Uwamp starting httpd.exe", "Secondly I am having a couple of problems with UWAMP : .. . .. . UI of newest version 3.1.0 doesn t display correctly on Win 10 Laptop with 1366 968 resolution .", "Install the Visual C++ Redistributable x86 lib .. . .. . For PHP older version you need VC6 2005 For PHP 5.3 you need VC9 2008 For PHP 5.4+ you need VC11 2012 For PHP 7.x+ you need VC14 2015 .. . .. . Download links are on UwAmp download page in section Prerequisites .", "Error.log appache : C : UwAmp www work1 .htaccess : Invalid command RewriteEngine perhaps misspelled or defined by a module not included in the server configuration", "Using UwAmp I ve been able to start the program from the CD DVD and Apache runs perfectly but Mysql stops after 5 seconds .", "So here I am asking my first stackoverflow question ever : I need to install imagick to my UwAmp local server .", "Thank you for you help Michael .. . .. . EDIT : my UwAmp version is 32-bit", "To me this is because UwAmp try to kill some others processes in addition to Apache when stopping Apache .", "But there s a trouble with the PID UwAmp wants to kill and these PID are actually internal processes you have no rights to kill .", "Uwamp 3.1.0 refuses to start apache on port 80 arguing that this port is already in use .", "I have search the web for my problem and found out that I must delete any my.ini file in other places in my computer except for uWamp folder But I have not any my.ini file in my computer except for uwAmp .", "I have asked the developer of UwAmp Guillaume Le Coz how I can achieve to have two or more instances of UwAmp running on a Windows-7 computer to display two or more versions of the same website I m developing locally .", "In command-line ImageMagick is working OK . .. . .. . My PHP version : 5.4.31 .. . .. . The extension is listed in UwAmp list of extensions but when i run PHPinfo there isn t a single word about imagick .", "I have Windows 7 x64 UwAmp v3.1.0 and have installed : .. . .. . Could you please tell me what should I do to be able to run php x64", "On the site uwamp.com en http : www.uwamp.com en there s a uBugTrack tab but I m not able to find any public bug tracker opened for UwAmp bugs .", "So please can someone give me a hint how to achieve to run multiple instances of UwAmp at the same time on a windows-7-64bit computer", "Some thing has happened in the last day with Uwamp not starting up Apache but when I manually go into the httpd.exe folder and run it from a command-line apache starts fine and I can access localhost easily .", "Unzip and copy php imagick.dll to the php-extension folder : .. . .. . In my case : php imagick.dll -- C : UwAmp bin php php-5.6.18 ext .. . .. . Note : this ZIP also contains dlls which other guides says to extract to the extension folder of apache .", "Bug : When opening the dropdown from tools groupbox and selecting nothing it shows error dialog PS : I have moved the data directory of mysql with message : .. . .. . Cannot enumerate files in directory C : UwAmp bin database mysql-5.x.yy data error 3 : the system cannot find the path specified .. . .. . The most annoying problem is the dialog box : cannot kill why does it need to do it anyway and the problem that it kills browser explorer and even code editor which has the file open .", "all the steps i did till this point were - DL UwAmp - start and test if everything works - Burn on CD DVD non-editable same as with normal Burns of programs Program does NOT work - Burn on CD DVD Editable like it s a flash drive Program works MySQL stops after 5 seconds .. . .. . I can t find anything really usefull on this subject for UwAmp on the internet thusfar .", "Edit php.ini and add : .. . .. . extension php imagick.dll .. . .. . or I placed it at the very end : .. . .. . Imagick .. . .. . extension php imagick.dll .. . .. . For super newbies : click the edit button in the UwAmp UI php uwamp.ini will open and edit it .", "I have tried bunch php imagick.dll files for various versions of PHP for x64 wamp server for x86 one etc .", "Potentially a duplicate of : mysql server not starting http : stackoverflow.com questions 22461872 configuration-of-mysql-server-installation-failed-or-cant-start-the-service .", "Here is the Mysql log :", "Little more options in MySQL configuration .", "This is a PHP requirement .", "uwApm is a portable version of wamp .", "Its written in PHP version : 5.2.17 .", "phpmyadmin instead of mysql .. . The www folder I mean the tray context menu .", ".. . For PHP older version you need : Download VC6 2005 vc redist.x86.exe .. . For PHP 5.3 you need : Download VC9 2008 vc redist.x86.exe .. . For PHP 5.4+ you need : Download VC11 2012 vc redist.x86.exe .. . For PHP 7.x+ you need : Download VC14 2015 vc redist.x86.exe", "Same error but with a recent php version corrected with installation of the right file .", "Appended .PHP to Windows System Environment Variables : PATHEXT .. . .. . I am now using the Command Prompt to run php -v which is giving me the correct PHP version I have installed through UwAmp but then running phalcon project test gives the following error : .. . .. . ERROR : Phalcon extension isn t installed follow these instructions to install it : https : docs.phalconphp.com en latest reference install.html .. . .. . By checking this question http : stackoverflow.com questions 23230995 installing-phalcon-php-devtools-error-phalcon-extension-isnt-installed it looks like I may have only installed the module for FPM but not for CLI .", "I either would like to know how I can manage to actually do the same as in WAMP and modify that supress localhost option .", "Here is the Mysql log : .. . .. . I have no problem with the version 3.0.2 .. . .. . Thank you for your help", "removing the double-quotes form the httpd uwamp.conf file worked for me on both UnWamp and PHP distributions .", "Have you looked at the MySQL error-log and also Windows Event Viewer .", "I have seen a lot of messages talking about wamp and how to actually just modify one line or two to .. . .. . Revert WAMPServer 2.5 Your Projects links to pre 2.5 mechanism .. . .. . and how to index.php in www folder and set .. . .. . change line 30 : .. . .. . So About the port .", "It simply only lists Win32 x86 PHP versions .", "MySQL need a write Access on the current storage .", "Later Edit : I think it may have something to do with the following text I found on the download page meaning that it being x86 cannot manage a x64 php server .", "then let me know if that then starts the server .", "Mysql reports error to the Windows logging system if they happen before it can open its error-log .", "Thanks .. . .. . I am running Windows 8.1 Pro", "thanks that was it", "It must works fine .", "First of all thank you dev for the great project really hats off .", "It has helped me a lot in many ways .", "There is no option to import settings from previous version or an option to upgrade in the installer .", "It would be nice if you would ask before doing so with options to kill or not .", "Now for suggestions : .. . .. . Allow user to add third party tools in the utils directory .", "Right now I have deleted SQLiteBrowser and copied the portable version of HeidiSQL with exe named as SQLiteBrowser.exe .. . Add an editor for config files and viewer for log files with the application .", "I know its too much to ask but still wanted you to know .", "At least data folder path .", "I m tricking it by creating a shortcut named www with path to my htdocs folder .", "LAN mode where only people in local subnet can access Allow from 192.168.1.0 24 or dynamically get LAN address and add that to config .. . .. . Please do not take my suggestions otherwise I do like this project very much and was in search for such a life saver after XAMPP changed its interface far too much .", "I wanted to update a old project i ve made .", "Can somebody help me with this error", "Make sure you have the right Visual C++ Redistributable x86 like they tell on the download page http : www.uwamp.com en page download .", "Thanks", "I only installed the 64 bit versions .", "Didn t knowing 32-bit would work", "all ready Download and install VC6 2005 vc redist.x86.exe this file. . but same problem are available.. .", "If you edit the line containing the syntax-error into your question somebody might be able to help you .", "I had trouble at first since there are several php .ini scattered all over .", "Also try changing the PHP Version one lower or one higher and then try again using port 80 .", "Just to let you know there seems to be an issue with the latest version when selecting the php-7 option it loads the httpd.conf rather the httd-uwamp.conf file so cant find the php7xxxx.dll and will stop from apache from working loading .", "i have had the same problem but it looks like it could be down to the mscvr1110.dll issue Visual c++ 2012 runtime you must install the 32-bit version along side with the 64 bit if you are running a 64bit windows and I would personally install the 32-bit first then the 64bit - if applicable .. . .. . the one problem I have noticed is if you are selecting php-7 then it loads httpd.conf rather than the httpd uwamp.conf so at the moment I wouldn t select that option .", "Restarted Apache MySQL and checked phpinfo to check install - OK .. . 6 ." ] }
{ "confidence": [ 70.2725601196289, 68.08912658691406, 62.12303924560547, 61.79026794433594, 61.186485290527344, 61.0625, 61.01734924316406, 59.12458801269531, 58.99332809448242, 58.868751525878906, 58.676475524902344, 57.41592025756836, 55.18121337890625, 53.631935119628906, 52.05290222167969, 51.46015930175781, 50.736289978027344, 49.772369384765625, 49.04113006591797, 44.564369201660156 ], "content": [ "Question : I have Xampp in my computer and all thing works well but when I uninstall it and install uwAmp instead I can not start MySQL server . uwApm is a portable version of wamp . I have search the web for my problem and found out that I must delete any my.ini file in other places in my computer except for uWamp folder But I have not any my.ini file in my computer except for uwAmp . Can anybody help me Comment : Have you looked at the MySQL error-log and also Windows Event Viewer . Mysql reports error to the Windows logging system if they happen before it can open its error-log . .. . Answer : In the uwAmp control panel click on XDebug client and select Remove MySql log .Then try to start MySQL in the top of control panel . It must works fine . Comment : Dude that s amazing Comment : Worked Thanks", "Question : Mysql Server stop working after 5 seconds fresh install of uwamp .. . .. . Uwamp version 3.1 started with Administrator rights on windows-10 32bits . Here is the Mysql log : .. . Answer : In the uwAmp control panel click on XDebug client and select Remove MySql log .Then try to start MySQL in the top of control panel . It must works fine .", "Question : null .. . Answer : Please help me when I am running PHP 7 with UWamp I see some extensions is undefined to call such as openssl decrypt curl . my UWamp Version is 3.0.1 .", "Question : I have a problem at start of UwAmp I get the message : .. . .. . Apache HTTP server has stopped working .. . .. . So impossible to start Apache .. . .. . A solution Thanks .. . .. . I am running Windows 8.1 Pro .. . Answer : Install the Visual C++ Redistributable x86 lib .. . .. . For PHP older version you need VC6 2005 For PHP 5.3 you need VC9 2008 For PHP 5.4+ you need VC11 2012 For PHP 7.x+ you need VC14 2015 .. . .. . Download links are on UwAmp download page in section Prerequisites . Comment : thanks that was it", "Question : null .. . Answer : PHP version : 5.2.17 for uWamp I recieve this error : .. . .. . httpd.exe : Syntax error on line 166 of C : UwAmp bin apache conf httpd.conf : LoadModule takes two arguments a module name and the name of a shared object file to load it from . all ready Download and install VC6 2005 vc redist.x86.exe this file. . but same problem are available.. . Comment : Well what s your line 166 of C : UwAmp bin apache conf httpd.conf Comment : yes httpd.exe : Syntax error on line 168 of E : UwAmp bin apache conf httpd.conf Comment : If you edit the line containing the syntax-error into your question somebody might be able to help you .", "Question : I have seen a lot of messages talking about wamp and how to actually just modify one line or two to .. . .. . Revert WAMPServer 2.5 Your Projects links to pre 2.5 mechanism .. . .. . and how to index.php in www folder and set .. . .. . change line 30 : .. . .. . So About the port . Is already fixed on my end I had to go to apacheconfig button in uwamp and just change the port to 8012 for main-serveur virtual-server . I either would like to know how I can manage to actually do the same as in WAMP and modify that supress localhost option . Or learn to do a virtualhost in Uwamp . Hope anybody could help me . phpmyadmin works index.php works subdirectory inside www does not work .. . Answer : What is you code in subdirectory A simple code like this .. . .. . in a index.php file inside subdirectory work", "Question : null .. . Answer : I m attempting to install the Phalcon Developer Tools https : docs.phalconphp.com en latest reference tools.html on my local Windows machine . The web server I am running is UwAmp http : www.uwamp.com en . UwAmp is running php-5.6.18 . These are the steps I have followed so far : .. . .. . 1 . Downloaded Phalcon https : phalconphp.com en download windows Windows x86 for PHP 5.6.0 .. . 2 . Copied php phalcon.dll file to C : UwAmp bin php php-5.6.18 ext folder .. . 3 . Added extension php phalcon.dll to C : UwAmp bin php php-5.6.18 php uwamp.ini .. . 4 . Added extension php phalcon.dll to C : UwAmp bin apache php.ini .. . 5 . Restarted Apache MySQL and checked phpinfo to check install - OK .. . 6 . Downloaded Phalcon Developer Tools https : github.com phalcon phalcon-devtools from Github extracted to C : phalcon-tools .. . 7 . Amended PTOOLSPATH in phalcon.bat to C : phalcon-tools .. . 8 . Appended C : UwAmp bin php php-5.6.18 C : phalcon-tools to Windows System Environment Variables : Path .. . 9 . Appended .PHP to Windows System Environment Variables : PATHEXT .. . .. . I am now using the Command Prompt to run php -v which is giving me the correct PHP version I have installed through UwAmp but then running phalcon project test gives the following error : .. . .. . ERROR : Phalcon extension isn t installed follow these instructions to install it : https : docs.phalconphp.com en latest reference install.html .. . .. . By checking this question http : stackoverflow.com questions 23230995 installing-phalcon-php-devtools-error-phalcon-extension-isnt-installed it looks like I may have only installed the module for FPM but not for CLI . Is this right How can I go about doing this on a Windows machine the question only covers Linux Note : I have double-checked that I have no other installs of PHP on my machine as I also read that another version could take priority within the Path Environment Variables .", "Question : null .. . Answer : Mysql Server stop working after 2 seconds fresh install of uwamp .. . .. . Uwamp version 3.1 started with Administrator rights on windows-8.1 pro 64 bits . Here is the Mysql log : .. . .. . I have no problem with the version 3.0.2 .. . .. . Thank you for your help Comment : Operating system error number 87 in a file operation . and aio write returned OS error 187 . seem to be the central error messages worth Googling . Comment : Potentially a duplicate of : mysql server not starting http : stackoverflow.com questions 22461872 configuration-of-mysql-server-installation-failed-or-cant-start-the-service . It seemed like adding innodb flush method normal to the my.ini config file fixed the issue for this person which also was related to the same logfile . This was a reported bug back in 2007 but it seems like people were still encountering this error all the way up to 2014 .", "Question : null .. . Answer : I have UwAmp 3.1.0 sometimes the Apache has trouble to close properly regardless the PHP version installed . Logs file are telling me .. . .. . here the configuration file for apache http : pastebin.com iJZmdS3A .. . .. . The problem comes with Windows 7 and windows-10 .. . .. . error http : i.stack.imgur.com TtZJX.png .. . .. . thanks Comment : This error occurs since I know UwAmp at its version 1.x.x . To me this is because UwAmp try to kill some others processes in addition to Apache when stopping Apache . But there s a trouble with the PID UwAmp wants to kill and these PID are actually internal processes you have no rights to kill . The solution could be fixing the PID to kill list inside UwAmp software . On the site uwamp.com en http : www.uwamp.com en there s a uBugTrack tab but I m not able to find any public bug tracker opened for UwAmp bugs .", "Question : I wanted to update a old project i ve made . Its written in PHP version : 5.2.17 . When I downloaded the correct version for uWamp I recieve this error .. . .. . httpd.exe : Syntax error on line 166 of C : UwAmp bin apache conf httpd.conf : LoadModule takes two arguments a module name and the name of a shared object file to load it from . Can somebody help me with this error .. . Answer : Make sure you have the right Visual C++ Redistributable x86 like they tell on the download page http : www.uwamp.com en page download . Same error but with a recent php version corrected with installation of the right file . Before use UwAmp you must install Visual C++ Redistributable x86 version vc redist.x86.exe . This is a PHP requirement . .. . For PHP older version you need : Download VC6 2005 vc redist.x86.exe .. . For PHP 5.3 you need : Download VC9 2008 vc redist.x86.exe .. . For PHP 5.4+ you need : Download VC11 2012 vc redist.x86.exe .. . For PHP 7.x+ you need : Download VC14 2015 vc redist.x86.exe Comment : Thanks I only installed the 64 bit versions . Didn t knowing 32-bit would work", "Question : null .. . Answer : It simply only lists Win32 x86 PHP versions . I have Windows 7 x64 UwAmp v3.1.0 and have installed : .. . .. . Could you please tell me what should I do to be able to run php x64 Later Edit : I think it may have something to do with the following text I found on the download page meaning that it being x86 cannot manage a x64 php server . UwAmp use x86 version to keep compatibility with older PHP version .", "Question : I ve been browsing net few days however I haven t find the solution to my problem yet . So here I am asking my first stackoverflow question ever : I need to install imagick to my UwAmp local server . My current imagemagick version : ImageMagick-6.8.9-1-vc9-x86 I have Windows 7 x64 but neither x64 version of ImageMagick made my local server run the imagick . In command-line ImageMagick is working OK . .. . .. . My PHP version : 5.4.31 .. . .. . The extension is listed in UwAmp list of extensions but when i run PHPinfo there isn t a single word about imagick . My Apache error-log doesn t print any error associated with loading problems . When I run the test file it prints out : Fatal error : Class imagick not found . I have tried bunch php imagick.dll files for various versions of PHP for x64 wamp server for x86 one etc . The solutions I have found doesn t solve it . Neither do the step-by-step tutorials . Have you experienced this problem so far What php imagick.dll file would you recommend me to try Thank you for you help Michael .. . .. . EDIT : my UwAmp version is 32-bit Comment : Have a look at my answer here : stackoverflow.com questions 3036847 http : stackoverflow.com questions 3036847 how-to-install-imagemagick-on-windows-7 22210399 .. . Answer : Detailed guide for newbies like me . Took a long time to get it to work . I initially followed : http : php.net manual en imagick.installation.php .. . .. . but after installation PHPInfo under imagick shows number of supported formats 0 .. . .. . So I followed these steps clobbered from various sources to get it to work . 1 . Click PHPInfo and check : .. . .. . Architecture x86 or x64 .. . .. . Thread Safety yes or no .. . .. . 2 . Download ImageMagick from : .. . .. . http : windows.php.net downloads pecl deps .. . .. . In my case I downloaded : ImageMagick-6.9.3-7-vc11-x86.zip .. . .. . because the Architecture under PHPInfo is x86 .. . .. . as for vc11 or vc14 .. . .. . search google for visual-c++ 11 runtime or visual-c++ 14 runtime and install it .. . .. . 3 . Unzip and copy all dlls from the bin subfolder to the Apache bin directory . It s a bunch of CORE RL .dll and IM MOD RL .dll plus a few other dlls . In my case I installed UwAmp in C : UwAmp so : .. . .. . from zip bin .dll -- C : UwAmp bin apache bin .. . .. . 4 . Goto : .. . .. . http : pecl.php.net package imagick .. . .. . as of today latest is 3.4.1 so I went to : http : pecl.php.net package imagick 3.4.1 windows .. . .. . My PHP version is : 5.6.18 and Thread Safety is Yes from Step 1 so I downloaded : .. . .. . 5.6 Thread Safe TS x86 .. . .. . and got : php imagick-3.4.1-5.6-ts-vc11-x86.zip .. . .. . 5 . Unzip and copy php imagick.dll to the php-extension folder : .. . .. . In my case : php imagick.dll -- C : UwAmp bin php php-5.6.18 ext .. . .. . Note : this ZIP also contains dlls which other guides says to extract to the extension folder of apache . NO NEED TO DO IT . Step 3 has taken care of it . 6 . Edit php.ini and add : .. . .. . extension php imagick.dll .. . .. . or I placed it at the very end : .. . .. . Imagick .. . .. . extension php imagick.dll .. . .. . For super newbies : click the edit button in the UwAmp UI php uwamp.ini will open and edit it . It will be copied to the correct php.ini when UwAmp is restarted . I had trouble at first since there are several php .ini scattered all over . 7 . Restart Apache .. . .. . 8 . Check PHPInfo scroll to section or find : imagick .. . number of supported formats : 234 on mine .. . .. . If there is no imagick section or supported format is 0 something went wrong . Hope this helps . BTW the comment to the question by Gras Double works just wish I had found it earlier . Comment : Thank you I had the wrong thread-safety version downloaded . Your post helped me", "Question : null .. . Answer : I have asked the developer of UwAmp Guillaume Le Coz how I can achieve to have two or more instances of UwAmp running on a Windows-7 computer to display two or more versions of the same website I m developing locally . I haven t got an answer and a search on the web on that topic came up with no results that s why I contacted Mr . Le Coz in the first place . I know this can be done with Uniform Server but I would like to stick with UwAmp . So please can someone give me a hint how to achieve to run multiple instances of UwAmp at the same time on a windows-7-64bit computer Thank you .", "Question : I m Creating a new version of an old Flash application this application will be written with HTML 5 one of the Requests is that the web application is runable from a CD DVD . Using UwAmp I ve been able to start the program from the CD DVD and Apache runs perfectly but Mysql stops after 5 seconds . I have a feeling I need to change some settings to keep it running as the web application and the data in the MySQL database will be non editable on CD DVD but it needs to be able to select items from the database . all the steps i did till this point were - DL UwAmp - start and test if everything works - Burn on CD DVD non-editable same as with normal Burns of programs Program does NOT work - Burn on CD DVD Editable like it s a flash drive Program works MySQL stops after 5 seconds .. . .. . I can t find anything really usefull on this subject for UwAmp on the internet thusfar . Anyone with knowledge on this subject that can tell me if i m doing anything wrong .. . Answer : MySQL need a write Access on the current storage . So you can run it on a USB key but you can t from a CD .", "Question : null .. . Answer : I need to activate Headers module with a2enmod headers to support CORS -- how can I do this with uwamp", "Question : null .. . Answer : I see no cgi-bin folder in Uwamp apache server so just wondering where to put these cgi scripts There is nothing in the docs either .", "Question : null .. . Answer : First of all thank you dev for the great project really hats off . It has helped me a lot in many ways . Secondly I am having a couple of problems with UWAMP : .. . .. . UI of newest version 3.1.0 doesn t display correctly on Win 10 Laptop with 1366 968 resolution . There is no option to import settings from previous version or an option to upgrade in the installer . Bug : When opening the dropdown from tools groupbox and selecting nothing it shows error dialog PS : I have moved the data directory of mysql with message : .. . .. . Cannot enumerate files in directory C : UwAmp bin database mysql-5.x.yy data error 3 : the system cannot find the path specified .. . .. . The most annoying problem is the dialog box : cannot kill why does it need to do it anyway and the problem that it kills browser explorer and even code editor which has the file open . It would be nice if you would ask before doing so with options to kill or not . Now for suggestions : .. . .. . Allow user to add third party tools in the utils directory . Right now I have deleted SQLiteBrowser and copied the portable version of HeidiSQL with exe named as SQLiteBrowser.exe .. . Add an editor for config files and viewer for log files with the application . I know its too much to ask but still wanted you to know . Little more options in MySQL configuration . At least data folder path . phpmyadmin instead of mysql .. . The www folder I mean the tray context menu . I m tricking it by creating a shortcut named www with path to my htdocs folder . LAN mode where only people in local subnet can access Allow from 192.168.1.0 24 or dynamically get LAN address and add that to config .. . .. . Please do not take my suggestions otherwise I do like this project very much and was in search for such a life saver after XAMPP changed its interface far too much .", "Question : Uwamp 3.1.0 refuses to start apache on port 80 arguing that this port is already in use . This is quite strange because : .. . .. . tcpview tool shows no process using port 80 .. . my old easyphp v12 runs perfectly on apache port 80 . Is it a bug or am I missing something .. . Answer : Try changing the port to 8080 to test . then let me know if that then starts the server . Also try changing the PHP Version one lower or one higher and then try again using port 80 .", "Question : Some thing has happened in the last day with Uwamp not starting up Apache but when I manually go into the httpd.exe folder and run it from a command-line apache starts fine and I can access localhost easily . Any thing come to mind I was playing with clipboard apps yesterday but how could they affect Uwamp starting httpd.exe After 2 days still can t find out what s wrong . Developer is not answering this question . Yes he knows this question exists . .. . Answer : i have had the same problem but it looks like it could be down to the mscvr1110.dll issue Visual c++ 2012 runtime you must install the 32-bit version along side with the 64 bit if you are running a 64bit windows and I would personally install the 32-bit first then the 64bit - if applicable .. . .. . the one problem I have noticed is if you are selecting php-7 then it loads httpd.conf rather than the httpd uwamp.conf so at the moment I wouldn t select that option . Let me know if that helps Comment : Gee I feel so silly thanks devouk that was it I ran the 64 bit which was already installed but said to fix it I guess it did and now it works great", "Question : null .. . Answer : I changed the version of Uwamp . I had no problem with 2.2.1 but with the last version 3.1 I have an internal error with .htaccess . The module rewrite is activated . The problem occurs with only one line in this file : .. . .. . So it s not a problem of syntax . Error : .htaccess : Options not allowed here OR RedirectPermanent not allowed here .. . .. . Options in httpd uwamp.conf :" ] }
[ "yes-answer-long", "yes-answer-short" ]
apache
UNK_RELATION
capedwarf@google-app-engine@58
capedwarf -- jboss capedwarf is an implementation of the @placeholder api which allows applications to be deployed on jboss application servers without modification .
{ "confidence": [ 54.29426193237305, 52.30592346191406, 50.55860900878906, 48.06226348876953, 45.58634948730469, 44.53338623046875, 43.107337951660156, 42.1800537109375, 40.22743606567383, 38.60408401489258, 38.59797286987305, 34.96587371826172, 34.12016296386719, 32.644405364990234, 31.805606842041016, 29.88934326171875, 28.2659912109375, 28.2659912109375, 28.2659912109375, 27.014387130737305, 23.426740646362305, 19.329376220703125, 17.810714721679688, 17.807979583740234, 17.444297790527344, 17.024669647216797, 16.063600540161133, 14.83290958404541, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.406864166259766, 13.085794448852539, 12.052409172058105, 12.052409172058105, 12.052409172058105, 12.052409172058105, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172, 10.429058074951172 ], "content": [ "I ve recently added this index.html test .. . .. . https : github.com capedwarf capedwarf-blue blob master testsuite src test java org jboss test capedwarf testsuite servlet test PokeTest.java L65 .. . .. . and it works as it should .", "I am using CapeDwarf JBoss AS7 to host classic GAE+GWT application .", "So is CapeDwarf can deploy Python Application", "I m getting this error from the JBoss logs when trying to run my GAE app with Openshift Capedwarf : .. . .. . Initially the template capedwarf app worked fine but when I git-push my app its not working .", "Yes as Alex posted - CapeDwarf is Java only .", "I am new to capedwarf and trying to implement a GAE application .", "But I will also fix this in CapeDwarf so the two libs won t overlap .", "This should not surprise me because it is stated in the docs http : www.jboss.org capedwarf docs and it is needed in order to display logs in gae-like admin console of CapeDwarf .", "I m trying to deploy my GAE application - written with Python - on CapeDwarf WildFly 2.0.0.CR5 .", "How can I deploy GAS application with OAuth 2.0 client ID in capedwarf", "I tried to deploy my web application war file in CapeDwarf Jboss AS7 however I am getting this error : .. . .. . Updated : .. . .. . This web application works fine using Maven .. . .. . https : github.com maven-gae-plugin maven-gae-plugin .. . .. . mvn gae : run .. . .. . What could be the problem", "Here git.io r34Jbg http : git.io r34Jbg is the new Capedwarf restlet quickstart that I can t make to work .", "Restlet works in Capedwarf for other Restlet target type but I guess the issue is with the Directory is trying to access static files which is restricted", "CapeDwarf by design only supports Java -- the author makes the point clearly in his long interview at http : www.infoq.com articles capedwarf explaining the difference with other larger but thereby inevitably more complicated GAE implementations such as AppScale https : github.com AppScale appscale and TyphoonAE https : code.google.com p typhoonae which do strive to support all programming-languages GAE does which answers your any other application other question : - .", "Anyone with stack who could be promising as far as I tested so far on GAE +gaelyk and now with capedwarf because of asset limitation on GAE .", "I just managed to deploy a CapeDwarf app using the template in Openshift however when I try to access ah admin it asks for OpenID but throws this error anyway : .. . .. . What could be the problem", "Hello tried today but with no luck it appears that groovy files can be called and gtpl no beeing parsed in capedwarf it is twisted regarding to the behavior of gae built-in engine any hints", "after inquiry it seems that capedwarf routing is biased the left hand side of expression in routes.groovy always will be a groovy file and not a url or part of whereas the right hand either a redirect or forward is ok for a groovy file not a template with extension gtpl .", "yes in fact it is the basic template from gaelyk however I suppose it has to do with the gaelyk jar artefact my shame I sent an email to people of capedwarf :", "This is a typical arquillian XML config to run test in managed JBoss environment .", "I get a lot of errors when trying to deploy Vosao in Capedwarf Beta 3 : .. . .. . Here s the complete log : .. . .. . http : pastebin.com 2z35pEvE .. . .. . java.lang.LinkageError : Failed to link org apache velocity-tools view jsp VelocityViewTag Module org.apache.velocity.tools : main from local module loader .. . .. . Looks like CD can t locate the Apache Velocity dependency", "However when deployed it does not work anymore .", "You mean rename my web application logging.properties file", "I deployed my app successfully on a Wildfy application server but trying to access https : localhost : 8080 it redirects me to https : localhost : 8443 with an error localhost refused to connect .", "else any other application that can", "But all the documentation talking only about Java Application .", "I ll cut a new release soon -- probably at the end of this week or early next week which should have this fixed .", "The application works fine the logs print nice to the console and files .", "This is a bug in our Beta2 release .", "It s already fixed in upstream and it will be in next Beta3 .", "As a temp workaround you can rename the logging.properties e.g .", "logging-tmp.properties but make sure you also change the ref to it in appengine-web.xml sys properties .", "Like WEB-INF logging-tmp.properties", "I did this but still getting error", "Hmmmm what about if you completely remove logging.properties file", "Anyway I still tried accessing the context root : .. . .. . and .. . .. . I guess there was really a problem in the deployment .", "How can I fix this error", "Do you use Velocity in your app", "I would say yes as it looks like it overlaps with CapeDwarf s Velocity usage - we use it to rended admin console .", "Try removing the Velocity libs .", "Leaving you with your own version of Velocity then .", "This should now be fixed in upstream master .", "Cool i will try to build", "Can you advise which specific part of the TCK project shows how to archieve this", "Hmmm no idea .", "Check if Google s OAuth OpenID docs have something on it .", "if it is how to do it", "or presumably other languages running on the JVM including Jython : -", "Cheers Jim", "hi not yet .", "as they claim to be 100 compatible with App Engine there should be no problem .", "it looks like only thing is to point the capedwarf.sh script to your exploded webapp directory", "I tweaked appengine-web.xml and web.xml", "I will see if I can raise a feature ticket", "Cool .", "I m looking forward for any update .", "Can you share your test project on GitHub", "Some news .. . .. . The first answer of musketyr was right capedwarf.sh bat + path of exploded app .", "However path of exploded app structure should be : .. . .. . 1 .", "App artefacts WEB-INF CSS images.. . .. . .. . 2 .", "A directory name with the same name of app with the same content as 1", "On server-side I am logging directly to java.util.Logger framework .", "However all my logs together with some http-request logs are also stored in the datastore .", "Yes every log line becomes one datastore entity .", "I was looking for a way to disable this useful but expensive feature .", "I cannot find any docs that would tell me what to do if I do not need want my logs in the datastore e.g .", "right now 98.3 of my datastore are org.jboss.capedwarf.LogRequest and org.jboss.capedwarf.LogLine entities .", "Does anyone happen to know how to do it", "Already answered on our forum : https : community.jboss.org message 810735 810735", "How do I adopt this for Google App Engine https : github.com alesj arquillian-container-gae .. . .. . arquillian.xml .. . .. . Errors : .. . .. . Process finished with exit code 254", "See how this is done in GAE TCK : https : github.com GoogleCloudPlatform appengine-tck", "Ales I tried to somehow try to implement Arquillian in my GAE project however I m getting this : Caused by : java.lang.IllegalArgumentException : Attempted to register the same Observer : org.jboss.as.arquillian.container.ServerSetupObserver multiple times please check classpath for conflicting jar versions", "I can assure that the same git-repo worked fine as Cloudbees deploys this app with jenkins to GAE cloud appspot .", "Can you try this with the latest release but locally", "Hello I am having this problem where this code : .. . .. . Works in GAE localhost when run with Maven : mvn appengine : devserver .. . .. . No problem .", "I ve checked the logs and all I can see is that access to index.html return 404", "Try changing the ROOT URI i.e .", "EMPTY STRING .", "I have also faced some similar issue also double check that in your appengine logs how the appengine in creating and deploying your war file .", "I also tried this and it still doesn t work", "Perhaps if you have time you can try to deploy it and see if it really works", "I m trying to run the https : github.com alesj arquillian-container-gae test within my IntelliJ workspace .", "However it won t run I ve tried : .. . .. . 1 .", "Git clone then import to IntelliJ parent .. . 2 .", "Then run the test : .. . .. .", "enter image description here http : i.stack.imgur.com slVRB.png .. . .. . This is what I get : .. . .. .", "enter image description here http : i.stack.imgur.com dvhIW.png .. . .. . I have added the -Dappengine.sdk.root in the Maven runner config of IntelliJ but it doesn t seem to affect anything .", "Also I have tried running mvn test and it seems to work fine : .. . .. . However internally when I checked with the -e switch I can see this error :", "How are you running these tests", "I see Jetty Embedded Arquillian Container", "That won t work .", "I would suggest using GAE Arquillian Container for SDK .", "https : github.com alesj arquillian-container-gae tree master gae-local .. . .. . Or a bit more hacky GAE Arquillian Container Embedded .", "https : github.com alesj arquillian-container-gae tree master gae-embedded .. . .. . We use the GAE ARQ SDK Container in GAE TCK : .. . .. . https : github.com GoogleCloudPlatform appengine-tck blob master tests pom.xml L125", "When I remove the client Id from the app it is working perfectly .", "you need to configure https-listener in your undertow configuration that can be found in standalone.xml", "Thanks so much ." ] }
{ "confidence": [ 72.43234252929688, 67.32730102539062, 64.40010070800781, 61.47008514404297, 60.7706298828125, 60.099586486816406, 59.412410736083984, 50.52191925048828, 48.6943473815918, 47.417327880859375, 26.303686141967773, 9.983776092529297 ], "content": [ "Question : Hello I am having this problem where this code : .. . .. . Works in GAE localhost when run with Maven : mvn appengine : devserver .. . .. . No problem . However when deployed it does not work anymore . I ve checked the logs and all I can see is that access to index.html return 404 Comment : Try changing the ROOT URI i.e . EMPTY STRING . I have also faced some similar issue also double check that in your appengine logs how the appengine in creating and deploying your war file . Comment : I also tried this and it still doesn t work .. . Answer : I ve recently added this index.html test .. . .. . https : github.com capedwarf capedwarf-blue blob master testsuite src test java org jboss test capedwarf testsuite servlet test PokeTest.java L65 .. . .. . and it works as it should . Comment : Restlet works in Capedwarf for other Restlet target type but I guess the issue is with the Directory is trying to access static files which is restricted Comment : Here git.io r34Jbg http : git.io r34Jbg is the new Capedwarf restlet quickstart that I can t make to work . Perhaps if you have time you can try to deploy it and see if it really works", "Question : I m getting this error from the JBoss logs when trying to run my GAE app with Openshift Capedwarf : .. . .. . Initially the template capedwarf app worked fine but when I git-push my app its not working . I can assure that the same git-repo worked fine as Cloudbees deploys this app with jenkins to GAE cloud appspot . .. . Answer : Can you try this with the latest release but locally", "Question : I am using CapeDwarf JBoss AS7 to host classic GAE+GWT application . On server-side I am logging directly to java.util.Logger framework . The application works fine the logs print nice to the console and files . However all my logs together with some http-request logs are also stored in the datastore . Yes every log line becomes one datastore entity . This should not surprise me because it is stated in the docs http : www.jboss.org capedwarf docs and it is needed in order to display logs in gae-like admin console of CapeDwarf . I was looking for a way to disable this useful but expensive feature . I cannot find any docs that would tell me what to do if I do not need want my logs in the datastore e.g . right now 98.3 of my datastore are org.jboss.capedwarf.LogRequest and org.jboss.capedwarf.LogLine entities . Does anyone happen to know how to do it .. . Answer : Already answered on our forum : https : community.jboss.org message 810735 810735", "Question : I m trying to deploy my GAE application - written with Python - on CapeDwarf WildFly 2.0.0.CR5 . But all the documentation talking only about Java Application . So is CapeDwarf can deploy Python Application if it is how to do it else any other application that can .. . Answer : Yes as Alex posted - CapeDwarf is Java only .", "Question : I m trying to deploy my GAE application - written with Python - on CapeDwarf WildFly 2.0.0.CR5 . But all the documentation talking only about Java Application . So is CapeDwarf can deploy Python Application if it is how to do it else any other application that can .. . Answer : CapeDwarf by design only supports Java -- the author makes the point clearly in his long interview at http : www.infoq.com articles capedwarf explaining the difference with other larger but thereby inevitably more complicated GAE implementations such as AppScale https : github.com AppScale appscale and TyphoonAE https : code.google.com p typhoonae which do strive to support all programming-languages GAE does which answers your any other application other question : - . or presumably other languages running on the JVM including Jython : -", "Question : I tried to deploy my web application war file in CapeDwarf Jboss AS7 however I am getting this error : .. . .. . Updated : .. . .. . This web application works fine using Maven .. . .. . https : github.com maven-gae-plugin maven-gae-plugin .. . .. . mvn gae : run .. . .. . What could be the problem .. . Answer : This is a bug in our Beta2 release . It s already fixed in upstream and it will be in next Beta3 . As a temp workaround you can rename the logging.properties e.g . logging-tmp.properties but make sure you also change the ref to it in appengine-web.xml sys properties . Comment : You mean rename my web application logging.properties file Like WEB-INF logging-tmp.properties I did this but still getting error Comment : Hmmmm what about if you completely remove logging.properties file Comment : I ll cut a new release soon -- probably at the end of this week or early next week which should have this fixed .", "Question : null .. . Answer : I am new to capedwarf and trying to implement a GAE application . I deployed my app successfully on a Wildfy application server but trying to access https : localhost : 8080 it redirects me to https : localhost : 8443 with an error localhost refused to connect . When I remove the client Id from the app it is working perfectly . How can I deploy GAS application with OAuth 2.0 client ID in capedwarf Comment : you need to configure https-listener in your undertow configuration that can be found in standalone.xml Comment : Thanks so much .", "Question : I get a lot of errors when trying to deploy Vosao in Capedwarf Beta 3 : .. . .. . Here s the complete log : .. . .. . http : pastebin.com 2z35pEvE .. . .. . java.lang.LinkageError : Failed to link org apache velocity-tools view jsp VelocityViewTag Module org.apache.velocity.tools : main from local module loader .. . .. . Looks like CD can t locate the Apache Velocity dependency Anyway I still tried accessing the context root : .. . .. . and .. . .. . I guess there was really a problem in the deployment . How can I fix this error .. . Answer : Do you use Velocity in your app I would say yes as it looks like it overlaps with CapeDwarf s Velocity usage - we use it to rended admin console . Try removing the Velocity libs . But I will also fix this in CapeDwarf so the two libs won t overlap . Leaving you with your own version of Velocity then . Comment : This should now be fixed in upstream master . Comment : Cool i will try to build", "Question : Anyone with stack who could be promising as far as I tested so far on GAE +gaelyk and now with capedwarf because of asset limitation on GAE . Cheers Jim Comment : hi not yet . as they claim to be 100 compatible with App Engine there should be no problem . it looks like only thing is to point the capedwarf.sh script to your exploded webapp directory Comment : Hello tried today but with no luck it appears that groovy files can be called and gtpl no beeing parsed in capedwarf it is twisted regarding to the behavior of gae built-in engine any hints I tweaked appengine-web.xml and web.xml Comment : after inquiry it seems that capedwarf routing is biased the left hand side of expression in routes.groovy always will be a groovy file and not a url or part of whereas the right hand either a redirect or forward is ok for a groovy file not a template with extension gtpl . I will see if I can raise a feature ticket Comment : Cool . I m looking forward for any update . Can you share your test project on GitHub Comment : yes in fact it is the basic template from gaelyk however I suppose it has to do with the gaelyk jar artefact my shame I sent an email to people of capedwarf : .. . Answer : Some news .. . .. . The first answer of musketyr was right capedwarf.sh bat + path of exploded app . However path of exploded app structure should be : .. . .. . 1 . App artefacts WEB-INF CSS images.. . .. . .. . 2 . A directory name with the same name of app with the same content as 1", "Question : I just managed to deploy a CapeDwarf app using the template in Openshift however when I try to access ah admin it asks for OpenID but throws this error anyway : .. . .. . What could be the problem .. . Answer : Hmmm no idea . Check if Google s OAuth OpenID docs have something on it .", "Question : This is a typical arquillian XML config to run test in managed JBoss environment . How do I adopt this for Google App Engine https : github.com alesj arquillian-container-gae .. . .. . arquillian.xml .. . .. . Errors : .. . .. . Process finished with exit code 254 .. . Answer : See how this is done in GAE TCK : https : github.com GoogleCloudPlatform appengine-tck Comment : Ales I tried to somehow try to implement Arquillian in my GAE project however I m getting this : Caused by : java.lang.IllegalArgumentException : Attempted to register the same Observer : org.jboss.as.arquillian.container.ServerSetupObserver multiple times please check classpath for conflicting jar versions Comment : Can you advise which specific part of the TCK project shows how to archieve this", "Question : I m trying to run the https : github.com alesj arquillian-container-gae test within my IntelliJ workspace . However it won t run I ve tried : .. . .. . 1 . Git clone then import to IntelliJ parent .. . 2 . Then run the test : .. . .. . enter image description here http : i.stack.imgur.com slVRB.png .. . .. . This is what I get : .. . .. . enter image description here http : i.stack.imgur.com dvhIW.png .. . .. . I have added the -Dappengine.sdk.root in the Maven runner config of IntelliJ but it doesn t seem to affect anything . Also I have tried running mvn test and it seems to work fine : .. . .. . However internally when I checked with the -e switch I can see this error : .. . Answer : How are you running these tests I see Jetty Embedded Arquillian Container That won t work . I would suggest using GAE Arquillian Container for SDK . https : github.com alesj arquillian-container-gae tree master gae-local .. . .. . Or a bit more hacky GAE Arquillian Container Embedded . https : github.com alesj arquillian-container-gae tree master gae-embedded .. . .. . We use the GAE ARQ SDK Container in GAE TCK : .. . .. . https : github.com GoogleCloudPlatform appengine-tck blob master tests pom.xml L125" ] }
[ "yes-answer-long", "yes-answer-short" ]
google-app-engine
UNK_RELATION
staf@cross-platform@138
staf -- the software testing automation framework staf is an open-source epl eclipse public license project that enables users to create @placeholder distributed software test-environments .
{ "confidence": [ 61.40980529785156, 56.26297378540039, 49.91698455810547, 49.72856521606445, 49.70016860961914, 47.005340576171875, 46.22822570800781, 46.22822570800781, 45.5932502746582, 45.28969955444336, 45.05767059326172, 43.76557922363281, 43.76557922363281, 43.76557922363281, 43.31658172607422, 42.21696853637695, 40.076820373535156, 38.34784698486328, 38.34784698486328, 38.21852111816406, 36.408634185791016, 36.40018081665039, 36.40018081665039, 35.3068733215332, 35.10808563232422, 35.10808563232422, 35.10808563232422, 35.10808563232422, 33.35920715332031, 33.35920715332031, 33.35920715332031, 30.276273727416992, 29.031047821044922, 28.723735809326172, 27.647003173828125, 27.150936126708984, 25.923595428466797, 25.47100067138672, 24.790725708007812, 24.665077209472656, 23.6048583984375, 23.357234954833984, 23.219398498535156, 23.005935668945312, 22.67073631286621, 21.951536178588867, 21.702611923217773, 21.390079498291016, 21.323143005371094, 21.11711883544922, 20.951736450195312, 20.862043380737305, 20.62955665588379, 20.46038818359375, 20.264034271240234, 19.9129581451416, 19.797203063964844, 19.60513687133789, 19.60513687133789, 19.578704833984375, 19.284400939941406, 18.736984252929688, 18.736984252929688, 18.736984252929688, 18.736984252929688, 18.736984252929688, 18.221832275390625, 17.648906707763672, 17.648906707763672, 17.648906707763672, 17.648906707763672, 17.648906707763672, 17.64484214782715, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762, 14.737261772155762 ], "content": [ "Can anyone please explain me the difference between a Framework like STAF software testing automation framework and Tool like selenium .", "Of course you can either build a test automation framework and use it for your own application or create a generic test automation framework and make it available to the testing community for everyone to use which is what STAF is .", "How run remote python script with STAF", "By default STAF is getting started at Logon .", "I am trying to ping STAF using local host .. . .. . Command is .. . .. . it shows the below error .. . .. . Error registering with STAF RC : 21 .. . .. . I have already executed startSTAFProc.sh to start STAF it is showing output .. . .. . Library staf startSTAFProc.sh .. . exit .. . logout Process completed .. . .. . How to fix this error", "I did it in windows way not STAF : 1 .", "the python script is in usr local staf services wbxtf wbxtf python TeleLogAgent.py .", "I don t think you can run STAF from a python script .", "For doing this I am using staf which gets invoked in one php script but getting below error even if I run staf command like below .. . .. . At the time of starting staf it says staf initialized .. . .. . Ping test also gives same error .. . .. . I am running staf version 3.4.11 on RHEL 6.3", "Hi I have installed STAF http : prdownloads.sourceforge.net staf STAF3419-setup-winamd64.exe download on my windows 2008 server machine .", "staf is running on remoteVM with correct trust levels .", "I have been working on STAF STAX .", "I have little idea about STAF STAX .", "All these three machines are interconnected using STAF .", "I want to start STAF as soon as I boot may machine .", "I have been working on STAF STAX .", "I tried updating my staf to latest version with latest python version .", "I added 1 config file at etc ld.so.conf.d staf.conf Content : usr local staf lib and then did ldconfig .", "I did following : .. . .. . Basically adding STAF library path in etc ld.so.conf.d staf.conf", "In one remote-server has one python script I want to send one staf command to the remote-server to run the python script .", "In case of test automation tools are software that let you automate your tests on an application .", "I have a STAF job which kicks off an Ant script all run under a functional ID .", "I want to run python script test.py using STAF using below command but getting Retrun code 1", "From the error codes list http : staf.sourceforge.net current2x STAFRC.htm RC : 10 means that the OS returned an error so the problem is not with STAF .", "My objective is to read a JSON file using STAF STAX Return Testcase PASS or FAIL .", "Python Version Detail .. . .. . Here is my Code : .. . .. . It is giving error given below .. . .. . What s the process to include JSON in STAF Module .", "I have a STAX Job new15.xml inside home dharm staf services stax samples location .", "Using STAF command from machine C I am starting FTP program TCL script on machine B .", "STAF launches this script : .. . .. . I would understand if Ant would fail on any of these tasks with a permissions error but I cannot understand why it would hang .", "This is how I run the command via staf but it doesn t seem to list the files and folders under C : Program Files .. . Even though the folder actually exists . .", "Environment variable points to C : STAF32 bin Pythonpath C : STAF bin .. . .. . Pycharm environment vairble PYTHONCASEOK .. . .. . Stuck on this one for a long time .", "Tool : .. . .. . Simply put a tool is a software .", "Does the project software not have a more inert descriptive page that you could link-to", "Framework : .. . .. . The most popular test automation tools like Selenium and Visual Studio provide all the basic features you require to build your own tests .", "These frameworks are used in long-term test automation projects which require scripting of thousands of test cases .", "Simply put a framework is what you create with a tool or a collection of tools to test your application .", "There are myriads of test automation tools that one can choose from depending on one s requirements .", "A typical framework consists of two parts : test scripts and function libraries .", "Things to consider when we design the framework including : .. . Maintainability .. . Reusability .. . Data Driven .. . Reporting .. . Schedule running through CI tools like Jenkins .. . Example : We design a Test Automation Framework by using WebDriver + Java + TestNG + ANT to meet the objective to identify our current code base stability and the test will be trigger and run by jenkins in a daily basis SSRS report will captured in a daily basis as well each time the test finished .", "This requires the creation of a Framework which is nothing but a collection of code written using a tool of one s choice that makes testing an application easy .", "A framework is normally just wrapping a tool to make it easier to make a test by imparting knowledge of your application a standard example is login .", "FRAMEWORK .. . .. . We DESIGN a framework to meet the organization mission .", "If you are short on budget you will prefer open-source tools over commercial tools and so on .", "Application Testing is a huge industry now and there is no dearth of testing tools available in the market .", "I am new to testing .", "framework is a tool to build other tools .", "in my head a framework is a platform made for developers so you use a framework to build other tools .", "Also how to select a tool for a particular framework .", "However some testing tools like Telerik Test Studio let you write script-less tests where your tests will consist a bunch of easily understandable keywords not code .", "A tool like selenium is what actually does the automation it has an API that will work for pretty much anything it covers in this case websites but it knows nothing about how the website you want to test works this means it deals with low-level constructs such as elements on a page and clicks .", "Tools things for developers Apps things for users .", "Selection of testing tools : .. . .. . To address your second question there is no straight-forward answer to it .", "The commonly used terms like Framework and tool confuses me a lot .", "Test Scripts are the pieces of code that need to be executed to perform actions on the application under test AUT .", "You can also use an external database to pass test data to your test scripts during run-time instead of hard-coding it in your test scripts .", "Some examples are Selenium UFT Visual Studio CUIT Jamo Solutions Meux Test T-Plan Robot Telerik Test Studio etc .", "However they do not provide ready-made features like Reporting and Exception Handling for testing purposes .", "see stackoverflow.com questions 1415592 http : stackoverflow.com questions 1415592 what-is-the-major-difference-between-a-framework-and-a-toolkit", "This is where a framework comes into play normally with selenium it will be page objects see here http : code.google.com p selenium wiki PageObjects", "Function Libraries are classes consisting of important functions that are called by your test scripts .", "Clear the Users must enter a user name and password to use this computer check box and then click Apply .", "Say you want a test that checks when you enter a correct username and password in you get access to application .", "The main objective of these frameworks is to reduce the time required to script a test case by reusing code that has already been written .", "They often include very strong function libraries which enable scripting of test cases using just predefined keywords .", "If it is a Web application you can use Selenium UFT Visual Studio or Test Studio .", "If it is a mobile app you can use Appium Meux Test or T-Plan Robot .", "Example : We use Selenium IDE as a tools helps us to automate some repetitive steps to do certain verification during our smoke test .", "Resolved this issue by setting Host name using command scutil --set HostName name .. . .. . Then restarted machine and started startSTAFProc.sh from terminal", "How to run the command", "Thanks", "It must be either C++ Java or Perl .", "Use the developer guide here : http : staf.sourceforge.net current stafsdg.html .. . .. . Although using Java Runtime.Exec if the path doesn t change you could run the .py program from java code .", "If you want to test your mobile app over a large number of devices and platforms you will prefer cloud-based tools like Sauce Labs Perfecto Mobile or Device Anywhere .", "I want to copy a file from one directory to another directory .", "After you get this error what is the result-of echo", "Hi Burhan .. . output is 0", "There is even a faq entry http : staf.sourceforge.net current STAFFAQ.htm d0e1786 specifically for RC 10 .", "Yes i checked it but not getting any clue on this .", "All files are present at respective paths also .", "@Burhan . . the problem is solved .", "Thanks for your help :", "What are the criterias used for selection", "Brief explanations are welcomed", "@Leo Can u please elaborate your comment as a answer", "I will try to answer what I believe people normally use these terms to mean lets start with the simpler term : A tool .", "Using just selenium it would something like : .. . .. . driver.findElement By.id username .sendKeys MyUsername driver.findElement By.id password .sendKeys password123 driver.findElement By.id login .click .. . .. . Thats pretty simple but as you can guess login is going to be used a lot across your tests and so it makes sense to move this into a place that makes it easier to reuse both from a less code stand point and maintainability .", "Thanks Harris .", "But I am expecting an in-depth answer which can explain the difference even more .", "en.wikipedia.org wiki http : en.wikipedia.org wiki Test automation Defining boundaries between automation framework and a testing tool", "Base on my understanding : .. . .. . TOOLS .. . .. . We USE tools to meet our objective can be own self or your small groups of team .", "Stakeholders can review the daily code stability report anytime he she needed .", "Hope that can help you : D", "Often one has to write tests in the tools using a supported programming language .", "For instance testers using UFT need to code in VB while those using Visual Studio can code in both VB and C .", "These can include timing functions reporting logging functions exception-handling functions data communication functions etc .", "Frameworks that employ external databases are called data-driven frameworks .", "The external database can be of your choice be it a SQL Server an XML file or a simple Excel spreadsheet .", "Data-driven frameworks make use of APIs or include custom-made classes that let you communicate with the database to transfer data .", "Another type of frameworks are the keyword-driven frameworks ." ] }
{ "confidence": [ 68.8011245727539, 67.92633056640625, 63.77617645263672, 60.809730529785156, 60.610538482666016, 59.715267181396484, 58.034278869628906, 54.98350143432617, 50.08176040649414, 48.08699035644531, 48.04878616333008, 47.159149169921875, 47.11964797973633, 45.72209167480469, 45.72209167480469, 42.100154876708984, 41.06189727783203, 40.458961486816406, 14.227483749389648, 12.312459945678711 ], "content": [ "Question : I am new to testing . The commonly used terms like Framework and tool confuses me a lot . Can anyone please explain me the difference between a Framework like STAF software testing automation framework and Tool like selenium . Also how to select a tool for a particular framework . What are the criterias used for selection Brief explanations are welcomed Comment : framework is a tool to build other tools . Comment : @Leo Can u please elaborate your comment as a answer Comment : in my head a framework is a platform made for developers so you use a framework to build other tools . Tools things for developers Apps things for users . see stackoverflow.com questions 1415592 http : stackoverflow.com questions 1415592 what-is-the-major-difference-between-a-framework-and-a-toolkit .. . Answer : Tool : .. . .. . Simply put a tool is a software . In case of test automation tools are software that let you automate your tests on an application . There are myriads of test automation tools that one can choose from depending on one s requirements . Some examples are Selenium UFT Visual Studio CUIT Jamo Solutions Meux Test T-Plan Robot Telerik Test Studio etc . Often one has to write tests in the tools using a supported programming language . For instance testers using UFT need to code in VB while those using Visual Studio can code in both VB and C . However some testing tools like Telerik Test Studio let you write script-less tests where your tests will consist a bunch of easily understandable keywords not code . Framework : .. . .. . The most popular test automation tools like Selenium and Visual Studio provide all the basic features you require to build your own tests . However they do not provide ready-made features like Reporting and Exception Handling for testing purposes . This requires the creation of a Framework which is nothing but a collection of code written using a tool of one s choice that makes testing an application easy . Simply put a framework is what you create with a tool or a collection of tools to test your application . A typical framework consists of two parts : test scripts and function libraries . Test Scripts are the pieces of code that need to be executed to perform actions on the application under test AUT . Function Libraries are classes consisting of important functions that are called by your test scripts . These can include timing functions reporting logging functions exception-handling functions data communication functions etc . You can also use an external database to pass test data to your test scripts during run-time instead of hard-coding it in your test scripts . Frameworks that employ external databases are called data-driven frameworks . The external database can be of your choice be it a SQL Server an XML file or a simple Excel spreadsheet . Data-driven frameworks make use of APIs or include custom-made classes that let you communicate with the database to transfer data . Another type of frameworks are the keyword-driven frameworks . These frameworks are used in long-term test automation projects which require scripting of thousands of test cases . The main objective of these frameworks is to reduce the time required to script a test case by reusing code that has already been written . They often include very strong function libraries which enable scripting of test cases using just predefined keywords . For example common actions on an application like login and logout are performed by single line codes like : .. . .. . and .. . .. . where Actions is a Function Library which consists of the Login and Logout functions . This massively reduces the script size and the long-term maintenance requirements of the script among other benefits . Of course you can either build a test automation framework and use it for your own application or create a generic test automation framework and make it available to the testing community for everyone to use which is what STAF is . Selection of testing tools : .. . .. . To address your second question there is no straight-forward answer to it . There are a number of criteria that can affect your decision . But in the end it is all about your requirements and the requirements of your AUT . If it is a Windows desktop app you have to use Coded UI Tests in Visual Studio . If it is a Web application you can use Selenium UFT Visual Studio or Test Studio . If it is a mobile app you can use Appium Meux Test or T-Plan Robot . If you want to test your mobile app over a large number of devices and platforms you will prefer cloud-based tools like Sauce Labs Perfecto Mobile or Device Anywhere . If you are short on budget you will prefer open-source tools over commercial tools and so on . Application Testing is a huge industry now and there is no dearth of testing tools available in the market . You will find the perfect tool for you if you know what you want and do some research on Google .", "Question : Hi I have installed STAF http : prdownloads.sourceforge.net staf STAF3419-setup-winamd64.exe download on my windows 2008 server machine . By default STAF is getting started at Logon . I want to start STAF as soon as I boot may machine . How can I change this setting Comment : Providing a link-to a download page isn t the most friendly of actions . Does the project software not have a more inert descriptive page that you could link-to .. . Answer : I did it in windows way not STAF : 1 . In the Search box type control userpasswords2 and then press ENTER . Administrator permission required If you are prompted for an administrator password or confirmation type the password or provide confirmation . 2 . Clear the Users must enter a user name and password to use this computer check box and then click Apply . 3 . In the Automatically Log On dialog box type your password and then click OK . 4 . In the User Accounts dialog box click OK .", "Question : I am new to testing . The commonly used terms like Framework and tool confuses me a lot . Can anyone please explain me the difference between a Framework like STAF software testing automation framework and Tool like selenium . Also how to select a tool for a particular framework . What are the criterias used for selection Brief explanations are welcomed Comment : framework is a tool to build other tools . Comment : @Leo Can u please elaborate your comment as a answer Comment : in my head a framework is a platform made for developers so you use a framework to build other tools . Tools things for developers Apps things for users . see stackoverflow.com questions 1415592 http : stackoverflow.com questions 1415592 what-is-the-major-difference-between-a-framework-and-a-toolkit .. . Answer : Base on my understanding : .. . .. . TOOLS .. . .. . We USE tools to meet our objective can be own self or your small groups of team . Example : We use Selenium IDE as a tools helps us to automate some repetitive steps to do certain verification during our smoke test . FRAMEWORK .. . .. . We DESIGN a framework to meet the organization mission . Things to consider when we design the framework including : .. . Maintainability .. . Reusability .. . Data Driven .. . Reporting .. . Schedule running through CI tools like Jenkins .. . Example : We design a Test Automation Framework by using WebDriver + Java + TestNG + ANT to meet the objective to identify our current code base stability and the test will be trigger and run by jenkins in a daily basis SSRS report will captured in a daily basis as well each time the test finished . Stakeholders can review the daily code stability report anytime he she needed . Hope that can help you : D", "Question : I want to copy a file from one directory to another directory . For doing this I am using staf which gets invoked in one php script but getting below error even if I run staf command like below .. . .. . At the time of starting staf it says staf initialized .. . .. . Ping test also gives same error .. . .. . I am running staf version 3.4.11 on RHEL 6.3 Comment : After you get this error what is the result-of echo Comment : Hi Burhan .. . output is 0 Comment : From the error codes list http : staf.sourceforge.net current2x STAFRC.htm RC : 10 means that the OS returned an error so the problem is not with STAF . There is even a faq entry http : staf.sourceforge.net current STAFFAQ.htm d0e1786 specifically for RC 10 . Comment : Yes i checked it but not getting any clue on this . All files are present at respective paths also . Comment : @Burhan . . the problem is solved . I added 1 config file at etc ld.so.conf.d staf.conf Content : usr local staf lib and then did ldconfig . Thanks for your help : .. . Answer : I did following : .. . .. . Basically adding STAF library path in etc ld.so.conf.d staf.conf", "Question : I am trying to ping STAF using local host .. . .. . Command is .. . .. . it shows the below error .. . .. . Error registering with STAF RC : 21 .. . .. . I have already executed startSTAFProc.sh to start STAF it is showing output .. . .. . Library staf startSTAFProc.sh .. . exit .. . logout Process completed .. . .. . How to fix this error .. . Answer : Resolved this issue by setting Host name using command scutil --set HostName name .. . .. . Then restarted machine and started startSTAFProc.sh from terminal", "Question : How run remote python script with STAF In one remote-server has one python script I want to send one staf command to the remote-server to run the python script . the python script is in usr local staf services wbxtf wbxtf python TeleLogAgent.py . How to run the command Thanks .. . Answer : I don t think you can run STAF from a python script . It must be either C++ Java or Perl . Use the developer guide here : http : staf.sourceforge.net current stafsdg.html .. . .. . Although using Java Runtime.Exec if the path doesn t change you could run the .py program from java code .", "Question : I am new to testing . The commonly used terms like Framework and tool confuses me a lot . Can anyone please explain me the difference between a Framework like STAF software testing automation framework and Tool like selenium . Also how to select a tool for a particular framework . What are the criterias used for selection Brief explanations are welcomed Comment : framework is a tool to build other tools . Comment : @Leo Can u please elaborate your comment as a answer Comment : in my head a framework is a platform made for developers so you use a framework to build other tools . Tools things for developers Apps things for users . see stackoverflow.com questions 1415592 http : stackoverflow.com questions 1415592 what-is-the-major-difference-between-a-framework-and-a-toolkit .. . Answer : I will try to answer what I believe people normally use these terms to mean lets start with the simpler term : A tool . A tool like selenium is what actually does the automation it has an API that will work for pretty much anything it covers in this case websites but it knows nothing about how the website you want to test works this means it deals with low-level constructs such as elements on a page and clicks . A framework is normally just wrapping a tool to make it easier to make a test by imparting knowledge of your application a standard example is login . Say you want a test that checks when you enter a correct username and password in you get access to application . Using just selenium it would something like : .. . .. . driver.findElement By.id username .sendKeys MyUsername driver.findElement By.id password .sendKeys password123 driver.findElement By.id login .click .. . .. . Thats pretty simple but as you can guess login is going to be used a lot across your tests and so it makes sense to move this into a place that makes it easier to reuse both from a less code stand point and maintainability . This is where a framework comes into play normally with selenium it will be page objects see here http : code.google.com p selenium wiki PageObjects Comment : Thanks Harris . But I am expecting an in-depth answer which can explain the difference even more . Comment : en.wikipedia.org wiki http : en.wikipedia.org wiki Test automation Defining boundaries between automation framework and a testing tool", "Question : I have been working on STAF STAX . My objective is to read a JSON file using STAF STAX Return Testcase PASS or FAIL . I tried updating my staf to latest version with latest python version . Python Version Detail .. . .. . Here is my Code : .. . .. . It is giving error given below .. . .. . What s the process to include JSON in STAF Module . .. . Answer : I have little idea about STAF STAX . But going by what the error says it seems simplejson module is not available . Rewrite the import line as following : .. . .. . You can fallback to json module in case import fails Python 2.6+ .", "Question : I have 3 machines A B C connected to a Router . A B C are in same subnet . All these three machines are interconnected using STAF . I am using machine A as an FTP server machine B as an FTP client . Using STAF command from machine C I am starting FTP program TCL script on machine B . Now the question is How C will know whether FTP traffic is flowing between A B .. . Answer : The ftp package http : core.tcl.tk tcllib doc trunk embedded www tcllib files modules ftp ftp.html allows you to specify a progress monitor callback in the ftp : : Open command : .. . .. . This will print a message every time a chunk is transferred the chunk size is configurable in the options to ftp : : Open via the -blocksize option it s 4096 by default . On modern networks this is probably going to write messages very rapidly", "Question : Why do I not get a proper list of processes below staf is running on remoteVM with correct trust levels . .. . Answer : Went with this workaround . .", "Question : I have 3 machines A B C connected to a Router . A B C are in same subnet . All these three machines are interconnected using STAF . I am using machine A as an FTP server machine B as an FTP client . Using STAF command from machine C I am starting FTP program TCL script on machine B . Now the question is How C will know whether FTP traffic is flowing between A B .. . Answer : Comment : Mere code is not an answer and this code doesn t detect whether FTP traffic is flowing between A and B . -1", "Question : null .. . Answer : Environment variable points to C : STAF32 bin Pythonpath C : STAF bin .. . .. . Pycharm environment vairble PYTHONCASEOK .. . .. . Stuck on this one for a long time .", "Question : I have been working on STAF STAX . My objective is to read a JSON file using STAF STAX Return Testcase PASS or FAIL . I tried updating my staf to latest version with latest python version . Python Version Detail .. . .. . Here is my Code : .. . .. . It is giving error given below .. . .. . What s the process to include JSON in STAF Module . .. . Answer : STAX uses Jython a version of Python written in Java not Python to execute code within a element in a STAX job . As i said i was using the latest version of STAX v3.5.4 then it provides an embedded Jython 2.5.2 which implements the same set of language features as Python 2.5 to execute code within a element . .. . Note : Jython 2.5.2 does not include simplejson since simplejson is included in Python 2.6 or later . .. . Appendix F : Jython and CPython Differences in the STAX User s Guide at http : staf.sourceforge.net current STAX staxug.html Header CPythonDiffs talks about some differences between Jython and Python aka CPython . Installing Python 2.7 or later in system will have no effect on the fact that STAX uses Jython 2.5.2 to execute code within a element in a STAX job . However simplejson can be run via Jython . I added the directory containing the simplejson module to the sys.path within my STAX job and then import simplejson . For example : .. . .. . Or if you want to use Python 2.7 or later that you installed on your system that includes simplejson you can run a Python script that uses json via your STAX job using a element . .. . For example to use Python 2.7 if installed in C : Python2.7 to run a Python script named YourPythonScript.py in C : tests .", "Question : I want to run python script test.py using STAF using below command but getting Retrun code 1 .. . Answer : Check that the remote machine is on trust list then try it without PARAMS or hardcode the value inside your python script .", "Question : This is how I run the command via staf but it doesn t seem to list the files and folders under C : Program Files .. . Even though the folder actually exists . . enter image description here http : i.stack.imgur.com iGGgK.png .. . Answer : Surrounding path with double quotes directly in command worked . .", "Question : null .. . Answer : I have a STAX Job new15.xml inside home dharm staf services stax samples location . new15.xml have two function main and readFile .. . .. . Required Argument for readFile is file name . .. . I want to execute this command using command-line but i also want to give required parameter to readFile function . What are the modification i should do in command to make it work . What I have Trierd .. . .. . FIRST .. . .. . 2ND Command", "Question : null .. . Answer : I have been working on STAF STAX . I have created a STAX job using some modules of python and multiple functions but all of them are in the same file . Now I want to create a big STAX job using multiple python programs and different functions from each program . How can I import or include multiple functions from different programs stored in different files in a single STAX JOB Ex : .. . .. . Any help How can I use the Conditional Import of a function in a STAX job", "Question : I have a STAF job which kicks off an Ant script all run under a functional ID . The ant script does basic init tasks which work fine and then hangs on one of the following tasks : delete mkdir or junit depending on how much muddling I do in the file system . I am able to sudo to this functional ID and run the corresponding commands from a shell just fine ex : rm -rf path results latestDate . Clearly something is different about running in the Ant environment under the functional id . In fact I can run the script just fine with my own id .. . .. . path results has 777 permissions before my script runs and when path results latestDate exists it is owned by the same functional id w 777 permissions . STAF launches this script : .. . .. . I would understand if Ant would fail on any of these tasks with a permissions error but I cannot understand why it would hang . I would like help either a determining why there is a hang or b how to convert the hang to a hard failure Comment : It would probably help debugging to have the current stack when Ant is hanging . To get stack use jstack or send a kill -3 to the process running Ant and look into its standard output . .. . Answer : Solved the Ant script was hanging on an exec command that was waiting for input from STDIN . Execution had continued past that point because it was launched with spawn attribute . When I removed this exec task from my init target the Ant script ran as expected .", "Question : Considering the following : .. . .. . I can t find the way to copy the jpg file 2.jpg on the remote machine 192.168.1.139 . From CMD I use the following : .. . .. . and it s working but nothing happens when I run the script . The file is not copied on the remote machine . No errors are thrown . I use : .. . .. . to start a windows service and it s working . .. . Answer : This should work to COPY to C : Temp dir of remote : .. . .. . result.result will print the error in case there is any .", "Question : Assumming the following error is because the same path on local system does not exist on the remote system . Is there a way to specify an alternative path to save on remote system Error information : .. . Answer : Found correct command :" ] }
[ "yes-answer-long", "yes-answer-short" ]
cross-platform
UNK_RELATION
libgdx@linux@111
libgdx -- libgdx is a cross-platform java game development framework based on opengl-es that works on windows @placeholder mac os x android ios and your webgl enabled browser .
{ "confidence": [ 51.60655975341797, 50.7043571472168, 48.88538360595703, 47.29892349243164, 46.467185974121094, 46.130855560302734, 45.15824508666992, 44.948486328125, 44.368682861328125, 44.22252655029297, 43.76299285888672, 43.52244567871094, 43.438140869140625, 43.438140869140625, 43.366004943847656, 42.50946044921875, 42.25147247314453, 42.089805603027344, 42.03849411010742, 42.006526947021484, 41.83706283569336, 41.48754119873047, 41.07655334472656, 41.06358337402344, 41.00063705444336, 40.872337341308594, 40.872337341308594, 40.7938346862793, 40.697723388671875, 40.654693603515625, 40.447418212890625, 40.39117431640625, 40.39117431640625, 40.358924865722656, 40.28486633300781, 40.22905731201172, 40.22539520263672, 40.12750244140625, 40.07804489135742, 40.05475616455078, 40.05475616455078, 39.99399185180664, 39.94221496582031, 39.87030792236328, 39.76720428466797, 39.731956481933594, 39.69297790527344, 39.690738677978516, 39.640350341796875, 39.4510612487793, 39.405364990234375, 39.36717987060547, 39.355377197265625, 39.308658599853516, 39.206478118896484, 39.105072021484375, 38.85596466064453, 38.741973876953125, 38.570987701416016, 38.498313903808594, 38.44123077392578, 38.41851043701172, 38.383399963378906, 38.33025360107422, 38.33025360107422, 38.29566955566406, 38.29566955566406, 38.29566955566406, 38.29566955566406, 38.29566955566406, 38.29566955566406, 38.264137268066406, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.086265563964844, 38.043701171875, 37.99855041503906, 37.923248291015625, 37.80647659301758, 37.694671630859375, 37.68086624145508, 37.67536926269531, 37.652854919433594, 37.54487991333008, 37.51128005981445, 37.51128005981445, 37.51128005981445, 37.51128005981445, 37.390716552734375, 37.329261779785156, 37.329261779785156, 37.252891540527344, 37.239280700683594 ], "content": [ "I am making a platform game in Libgdx framework .", "I developed a nice game with libgdx + java for android as target-platform .", "The shaders in Libgdx are just OpenGL ES shaders so any collection of OpenGL ES or OpenGL generally shaders should be adaptable to Libgdx https : github.com libgdx libgdx wiki Shaders .", "Error says Libgdx requires OpenGL ES 2.0 .", "Note that libgdx is NOT a game-engine rather a game framework .", "I am developing a game using libgdx framework .", "I have a cross-platform application built with libgdx .", "I have developed this game using Libgdx framework .", "I m really new to Android App development LibGDX but very familiar with Java .", "I m developing a strategy game for Android using libGDX .", "I m making a game with Java and Libgdx scene2d .", "How am I supposed to achieve this in libgdx using OpenGL ES", "Am currently making a game in LibGDX for Android .", "I m building a little Android game using libgdx .", "I ve created a isometric tile based game in Libgdx .", "I am working on an android app which is based on libgdx framework .", "Using Box2D in Libgdx Game http : rotatingcanvas.com using-box2d-in-libgdx-game-part-i this tutorial showes you how to create a game with box2D and libgdx .", "In Libgdx the Gdx.gl10 object is the wrapper for the OpenGL 1.x API .", "I am making a game with LibGDX Java .", "And second game was created on libgdx .", "there is no android buildToolsversion this is libgdx", "becuase its libgdx framework .", "I have been using both and my conclusion is : .. . .. . libgdx is more organized and easy to understand framework than andEngine as regards object oriented concept .. . libgdx is more efficient .. . there are lots of goods tutorial about libgdx .. . libgdx is cross-platform .. . and the most important libgdx is much faster", "Hiero instructions here : github.com libgdx libgdx wiki Hiero https : github.com libgdx libgdx wiki Hiero", "I m working on moving vehicle based on Box 2d physics for my Android game Java + LibGDX .", "I am developing a game in libgdx .", "I made a game using libGDX .", "Now the problem libgdx is cross-platform which is good for testing .", "Recently I decided to make a new game and give that chance to libgdx framework .", "This answer is for vanilla Android not Libgdx .", "I am trying to port libgdx code to iOS platform .", "I ve been searching online for hours and I m new to LibGDX game development .", "I suggest you to read Learning libGDX Game Development .", "github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki Managing-your-assets creating-an-assetmanager", "The wiki entry may help : github.com libgdx libgdx wiki Managing-your-assets https : github.com libgdx libgdx wiki Managing-your-assets .", "I saw this thread comment on 2D engines at stackoverflow : 2D Cross-Platform Game Development Engines http : stackoverflow.com questions 17584717 2d-cross-platform-game-development-engines .. . .. . I am interested in LibGdx Java and Citrus Engine Action Script .", "I am new in LibGDX development .", "LibGDX is a Java library .", "packtpub.com learning-libgdx-game-development book http : www.packtpub.com learning-libgdx-game-development book Pm I have done games in just java for desktop and also a few andengine books .", "I am trying to make a game on android using libgdx .", "Hi I am developing LibGDX kind of rhythm game on android .", "For those of you who are not familiar with GDX it is a framework used for cross-platform development in java most of the methods are implementations of openGL ES methods .", "github.com libgdx libgdx commit https : github.com libgdx libgdx commit 94559d6b1d382028ad8599271a1fa91c04599651", "Is there a better way on Android or LibGDX", ": github.com libgdx libgdx wiki Scene2d.ui label https : github.com libgdx libgdx wiki Scene2d.ui label github.com libgdx libgdx wiki Bitmap-fonts https : github.com libgdx libgdx wiki Bitmap-fonts", "This is a recent LibGDX bug https : github.com libgdx libgdx issues 4183 .", "I am trying to run this http : appwarp.shephertz.com game-development-center java-multiplayer-libgdx-tutorial demo which is a simple libgdx game implementing the AppWarp multi player API but it doesn t work .", "LibGDX works with OpenGL ES for graphics and also supports importing models which are created with a plugin for Blender 3D .", "I have a problem with Libgdx framework .", "And if so might it be included in some way in game development libraries like libgdx", "This will allow libgdx to run as software openGL mode .", "Are you referring to the tutorial here http : appwarp.shephertz.com game-development-center java-multiplayer-libgdx-tutorial", "I am trying to port my game from Android to iOS using LibGDX + RoboVM .", "I have android game using libgdx framework .. . .. . on Google Play store there are report : .. . .. . what I can do", "I am using the TextureAtlas in my LibGdx based game .", "As libgdx creates multiple-projects core android ios etc .", "I am using the Libgdx framework", "I m new to Libgdx Box2d and generally to Android development so the help is appreciated .", "I am about to develop a Game with network capabilities using libGDX and Kryonet for both Android and iOS .", "Libgdx works well .", "I have been developing a 2D game in Java using Android Libgdx Tiled Maps and App42API s backend API s .", "I have working on libGDX and use Box2D https : github.com libgdx libgdx wiki Box2d for simple 2D physic interactions inside my game .", "I have no real experience ith scene2d but these 2 reads have your answer : github.com libgdx libgdx wiki Scene2d.ui wiki-Button https : github.com libgdx libgdx wiki Scene2d.ui wiki-Button github.com libgdx libgdx wiki Skin https : github.com libgdx libgdx wiki Skin", "I m an android developer building my first game using LibGDX .", "I am a newbie to both android game develop and libGdx .", "In my libgdx game I have multiple screens .", "I am making a racing game using Libgdx .", "My problem is with the Game rendering and the FitViewport on libgdx .", "I am creating game with Libgdx and Overlap2d .", "I just started creating a game using libgdx .", "I am using LibGDX to create a game .", "I m developing for plain Android but I think about using the LibGDX framework .", "github.com libgdx libgdx wiki Universal-Tween-Engine https : github.com libgdx libgdx wiki Universal-Tween-Engine", "It s all explained here : github.com libgdx libgdx wiki Scene2d https : github.com libgdx libgdx wiki Scene2d", "Check this : github.com libgdx libgdx wiki Texture-packer https : github.com libgdx libgdx wiki Texture-packer", "See github.com libgdx libgdx pull 3347 https : github.com libgdx libgdx pull 3347", "See also github.com libgdx libgdx wiki Material-and-environment https : github.com libgdx libgdx wiki Material-and-environment", "More info on scene2d here : github.com libgdx libgdx wiki Scene2d https : github.com libgdx libgdx wiki Scene2d", "github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki -- check the Input Handling sections .", "As for dispose have a look at : github.com libgdx libgdx wiki Memory-management https : github.com libgdx libgdx wiki Memory-management", "Check the gdx-invaders example https : github.com libgdx libgdx-demo-invaders to see how it uses Mesh OpenGL and SpriteBatch .", "As far as I know Libgdx will switch to Multi-OS engine as the default iOS backend for newly created libGDX projects in the next couple of weeks .", "Is it possible to render to texture using SpriteBatch in libGdx Java engine for Android Desktop", "I m using box2d with libgdx game-engine - so the code is in Java .", "I m developing a cross-plattform application in java focusing on android right now and I m mainly using libgdx to achieve this .", "I trying to learn libgdx I install all the software listed here https : github.com libgdx libgdx wiki Setting-up-your-Development-Environment- 28Eclipse 2C-Intellij-IDEA 2C-NetBeans 29 with a new Eclipse 4.3 on a fresh formated mac osx Maverick .", "@noone You re right about OpenGL and Libgdx .", "https : github.com libgdx libgdx wiki Managing-your-assets", "I ve been following the Libgdx tutorial here http : obviam.net index.php getting-started-in-android-game-development-with-libgdx-create-a-working-prototype-in-a-day-tutorial-part-1 and I m running into a strange problem .", "Additionally since WebGL http : en.wikipedia.org wiki WebGL is also based on OpenGL ES WebGL shaders should be applicable .", "I am working on a game project using LibGDX .", "I am developing a little game using libgdx .", "I m writing a game with LibGDX and Box2DLights for lighting .", "I d like to create a btConvexHullShape for my game with libgdx .", "I try to draw simple text in my android game on libgdx but it s look sharp .", "github.com libgdx libgdx issues 4117 https : github.com libgdx libgdx issues 4117", "github.com libgdx libgdx wiki Gdx-freetype https : github.com libgdx libgdx wiki Gdx-freetype", "I did not know of appwarp before seeing your question - but maybe this tutorial http : appwarp.shephertz.com game-development-center java-multiplayer-libgdx-tutorial will help", "The example in the libgdx documentation Integrating libgdx and the device camera https : github.com libgdx libgdx wiki Integrating-libgdx-and-the-device-camera uses an Android surface view that is below everything to draw the image on with GLES 1.1 ." ] }
{ "confidence": [ 70.43761444091797, 68.4870376586914, 62.51812744140625, 59.28026580810547, 57.88252258300781, 57.04850387573242, 56.63921356201172, 55.648101806640625, 55.06589126586914, 54.472469329833984, 54.41893768310547, 54.33973693847656, 54.23566818237305, 54.15950012207031, 54.046424865722656, 53.99612808227539, 53.98374557495117, 53.91619873046875, 53.45438766479492, 53.38722229003906 ], "content": [ "Question : I am coming from an XNA background and it was really cool to re-use shaders that other people made . There was a really cool bloom shader that was available and easy to reuse . Is there an official or are there any unofficial collections of reusable shaders for water normal mapping or other cool effects Comment : Not That i know of . But you can add shader yourself . Take a look at github.com libgdx libgdx wiki Shaders https : github.com libgdx libgdx wiki Shaders .. . Answer : The shaders in Libgdx are just OpenGL ES shaders so any collection of OpenGL ES or OpenGL generally shaders should be adaptable to Libgdx https : github.com libgdx libgdx wiki Shaders . Additionally since WebGL http : en.wikipedia.org wiki WebGL is also based on OpenGL ES WebGL shaders should be applicable . See https : www.shadertoy.com or http : glsl.heroku.com for some lightly organized examples . In practice I ve found that the inputs to the shaders need to be adapted to my specific structures but the core of the shader can be developed in WebGL and ported to Libgdx easily . Comment : Thanks perfect answer it seems like I will have the ability to pull off whatever effect I can handle with libgdx then", "Question : I saw this thread comment on 2D engines at stackoverflow : 2D Cross-Platform Game Development Engines http : stackoverflow.com questions 17584717 2d-cross-platform-game-development-engines .. . .. . I am interested in LibGdx Java and Citrus Engine Action Script . What would you choose Comment : I am only asking for a recommendation and there exists guys that are judging you and can up and down your points... . thank for the one who answer me because i won a contest and I am travelling to USA .. . Answer : I can only talk for LibGDX but I can honestly say that it is the best game-engine I ve used so far . Let it be features ease of use or active community LibGDX has it all . It supports a lot of platforms like Desktop iOS Android and others . It s really fast and supports both 2D and 3D as well as sound and physics engines which are included Box2D and bullet physics . There are tools like a particle editor loaders for several map editors and UI skins . Join the official channel libgdx on freenode IRC http : libgdx.badlogicgames.com community.html if you have any questions and have a look at this trend http : www.google.com trends explore q libgdx .", "Question : I ve been trying to get the Hello-World project to run as part of learning LibGDX . Using the Nightly Build libgdx-nightly-20140322 . However I have become quite frustrated because the hello-world-desktop project will work when run as a Java Application the hello-world-html project will Run As a Web Application . But hello-world-android simple produces a not very descriptive error : .. . .. . image of LibGDX failure in Android emulator http : i.stack.imgur.com ZosOS.png .. . .. . I have checked on here looking for similar problems and found Android Emulator does not launch LibGDX project http : stackoverflow.com questions 10972035 android-emulator-does-not-launch-libgdx-project but the solution given does not work with what I have . There was also libgdx my first triangle tutorial not working http : stackoverflow.com questions 10970039 libgdx-my-first-triangle-tutorial-not-working which pointed me to new tutorials to try but no avail . The first time I attempted to follow the tutorial on GITHUB https : github.com libgdx libgdx wiki Project-setup -running- -debugging and the second time Games from Scratch s LibGDX Tutorial 1 : Creating an initial project http : www.gamefromscratch.com post 2013 09 19 LibGDX-Tutorial-1-Creating-an-initial-project.aspx . I have tried different API Levels 8 13 16 19 . Here is the dump of the logfile : Comment : Are you running your app in emulator or real device If emulator then please run it on device . Comment : Why doesn t the emulator work Comment : Error says Libgdx requires OpenGL ES 2.0 . Your emulator does not support OpenGL ES 2.0 Comment : possible duplicate of Android Emulator does not launch LibGDX project http : stackoverflow.com questions 10972035 android-emulator-does-not-launch-libgdx-project .. . Answer : As @Sid notes in the comments the error says LibGDX requires OpenGL ES 2.0 support . The emulator s software renderer does not support OpenGL ES 2.0 . You may be able to get your emulator to support by enabling graphics acceleration in the emulator . See http : developer.android.com tools devices emulator.html accel-graphics and Android OpenGL ES 2.0 emulator http : stackoverflow.com questions 8941016 android-opengl-es-2-0-emulator .. . .. . Here is the Android Virtual Device Manager dialog with the setting highlighted . Enabling this definitely solves the problem on a Macbook Air and likely many other computers . Click Use Host GPU http : i.stack.imgur.com aVvOp.jpg Comment : also fixes problem in linux", "Question : I am creating a game using Libgdx and would like to integrate player Leaderboard high score on both iOS and Android devices . Ideally I would use Google Play Game Services but I could be convinced to use other technologies like Parse . There are tutorials to use Google Play services for Android devices : http : theinvader360.blogspot.co.uk 2013 10 google-play-game-services-tutorial-example.html . But as far as I understand this will not work for iOS devices according to this : https : developers.google.com games services integration .. . .. . There are also tutorials to do so on iOS devices using RoboVM : http : www.badlogicgames.com forum viewtopic.php f 11 t 11424 http : www.badlogicgames.com forum viewtopic.php f 11 t 11424 but as far as I understand this will only work for iOS devices . Since one of libgdx benefit is to write once but to run cross platforms my Question is the following : How do I integrate with Google Play Game Services and run on iOS and Android . It seems to me that the answer is to use the REST API https : developers.google.com games services web-api since this is technologically agnostic but that means that I then need to implement quite a few things login notifications.. . .. . .. . I cannot imagine I am the first one to be facing this but it seems there are no examples available on the subject . .. . Answer : You don t have to use the REST API for this even though that would certainly be an option . The easier way is the use of platform specific code via interfacing https : github.com libgdx libgdx wiki Interfacing-with-platform-specific-code . Everything that is not directly integrated into libGDX won t work via write once run everywhere . This also applies to achievements leaderboards and other things that Google Play Game Services offer . However you are lucky that GPGS unites these features within one framework for at least Android iOS and Web . So what you would do is adding the platform specific library dependencies to the platform specific projects you have generated . Then implement a generic interface e . g . AchievementHandler with methods like unlockAchievement String achievementId . Then you would implement this interface via AndroidAchievementHandler that makes use of GPGS . The same will work with an IOSAchievementHandler . In your core code you will only use AchievementHandler and each platform will use its own implementation of this .", "Question : I want to implement Unity ads into Android game which is created with Libgdx engine . I searched for solutions on net but i didn t find anything useful so every help is welcome : Code samples links with explanations.. . .. . Answer : Unity provides instructions on integrating Unity ads into any Android application built-in the Eclipse IDE here http : unityads.unity3d.com help monetization integration-guide-android . Unity ads are not specific to a specific graphics application framework so they should work with the provided instructions for any Android app . You might have to wrap your LibGDX in a bit of native Android UI using the second answer here http : gamedev.stackexchange.com questions 57702 libgdx-with-android-ui . Comment : I already saw this links . Unity s Integration guide is for native Android and not for cross-platform engine . I also find some instructions for adding Admob ads in Libgdx and i know that i need to do something like that for Unity ads so i would like to find some instructions for that .", "Question : I ve been trying to get the Hello-World project to run as part of learning LibGDX . Using the Nightly Build libgdx-nightly-20140322 . However I have become quite frustrated because the hello-world-desktop project will work when run as a Java Application the hello-world-html project will Run As a Web Application . But hello-world-android simple produces a not very descriptive error : .. . .. . image of LibGDX failure in Android emulator http : i.stack.imgur.com ZosOS.png .. . .. . I have checked on here looking for similar problems and found Android Emulator does not launch LibGDX project http : stackoverflow.com questions 10972035 android-emulator-does-not-launch-libgdx-project but the solution given does not work with what I have . There was also libgdx my first triangle tutorial not working http : stackoverflow.com questions 10970039 libgdx-my-first-triangle-tutorial-not-working which pointed me to new tutorials to try but no avail . The first time I attempted to follow the tutorial on GITHUB https : github.com libgdx libgdx wiki Project-setup -running- -debugging and the second time Games from Scratch s LibGDX Tutorial 1 : Creating an initial project http : www.gamefromscratch.com post 2013 09 19 LibGDX-Tutorial-1-Creating-an-initial-project.aspx . I have tried different API Levels 8 13 16 19 . Here is the dump of the logfile : Comment : Are you running your app in emulator or real device If emulator then please run it on device . Comment : Why doesn t the emulator work Comment : Error says Libgdx requires OpenGL ES 2.0 . Your emulator does not support OpenGL ES 2.0 Comment : possible duplicate of Android Emulator does not launch LibGDX project http : stackoverflow.com questions 10972035 android-emulator-does-not-launch-libgdx-project .. . Answer : Thanks . I have a Samsung Galaxy S-III G4 so I ve just installed Kies from Samsung http : downloadcenter.samsung.com content SW 201402 20140221104324625 KiesSetup.exe and that s appears to have covered the drivers . I followed the HowTo Run an android application in a mobile device https : www.youtube.com watch v TXojre lOag and the LibGDX Hello-World app works on my device .", "Question : I am currently developing a small multiplatform game with libGDX . The game works great on Windows Android and OSX but I can t make it compile for iOS . The libGDX guide for iOS http : code.google.com p libgdx wiki IOSWIP states a couple of caveats but I m pretty sure I have taken everything into account . I have Eclipse Xamarin.iOS JDK Ant and PATH IKVM HOME is set as they should . The gamename.dll which is the Mono compiled dll that contains all my game logic and is automatically generated from the Java code has been created and everything looks to be in order . When compiling however I get the following error message : .. . .. . Paths abbreviated a little bit for brevity . These arguments are automatically generated by libGDX when creating the iOS project and looks like this in Xamarin s project settings : .. . .. . The build output contains this : .. . .. . libObjectAL is one of the referenced dlls that was added automatically by libGDX when creating the project . I assume this means that there is something wrong with my settings but I can t find anything that looks like it is related . Any ideas EDIT : After adding the framework suggested by poupou I now get a slightly different error message : EDIT1b : No it s actually the same . The only difference are the arguments . .. . Answer : One of your native libraries libObjectAL from your logs requires the AVFoundation framework to be linked with your application . Note : you can somewhat guess this from the AV prefix of the types that were not found . Solution : Add -framework AVFoundation to your -gcc flags and rebuild your application . Comment : Thanks that s probably a step the right direction but I now get i686-apple-darwin11-llvm-g++-4.2 : AVFoundation : No such file or directory instead . I assume this means that I need to include AVFoundation in the Xamarin solution somewhere but I can t figure out where it is nor how to add it . Comment : It must be inside your -gcc flags since it s a directive you re giving to the native Apple linker . OTOH I made a typo fixed it should have been -framework AVFoundation not --framework AVFoundation only one - . Comment : Thanks but it seems to make no difference see my edit in the original post . The error message seems to be identical but I can see that -framework AVFoundation is now added at the end of the first line . Note however that it looks like this framework is already included if you scroll horizontally to a little bit before the center -framework AVFoundation is there already together with a lot of other frameworks . Comment : Can you pastebin and add a link-to your complete build log Comment : Yep here it is : pastebin.com xVwQ3cWX http : pastebin.com xVwQ3cWX The first part is a libGDX script that builds the Mono-dll . Up to the last Writting method I believe .", "Question : I have been trying to learn more about Android Game Development this past month . I read the only book I could find about libGDX and it definitely helped me get started but there are literally no other tutorials that I have found . My question is how do you learn to create games using libGDX if there are no good tutorials out there I hear a lot of people talk about documentation of libGDX and have no clue what that means . I guess to generalize it in the most simple way possible where do I go from here Suppose the developer just dropped the framework on the Internet today and you were to begin trying to learn how to use it without any help . What route would you take I m afraid I ve come to a dead end after being so excited finishing the book . Comment : I would guess that by documentation they mean product s javadoc http : libgdx.badlogicgames.com nightlies docs api . I assume that you are familiar with their web-site http : libgdx.badlogicgames.com documentation.html gettingstarted it does list some tutorials . Comment : Yes there s a few tutorials such as rendering an image touch input etc . But suppose I wanted to create a tower defense game or even a simple pong game . The book I read has some collision-detection but not a lot . I m more just trying to find out how to learn this framework more instead of relying on tutorials to hold my hand . Comment : what kind of book From my experience I learned a lot from books and it was the good start to try and develop a lot projects with java technologies by myself . But it was not about libGDX . Just wondering that you have read a book and it was not help you. . Comment : I have no specific knowledge of this framework . Since you stated I hear a lot of people talk about documentation of libGDX and have no clue what that means . I provided my understanding . Have you programmed games before possibly in a different environment Comment : Salvador don t get me wrong the book helped tremendously to get me started . It s just after that it s a dead end . Nothing else really exists in terms of different kinds of game creation . packtpub.com learning-libgdx-game-development book http : www.packtpub.com learning-libgdx-game-development book Pm I have done games in just java for desktop and also a few andengine books . Its a sharp learning curve and I m trying to find the best way to go about this . .. . Answer : There is a lot of documentation about libgdx : .. . .. . Wiki https : github.com libgdx libgdx wiki .. . a game tutorial right there : Bucket Game https : github.com libgdx libgdx wiki A-simple-game .. . Javadocs http : libgdx.badlogicgames.com nightlies docs api .. . Another tuto : Frogger http : www.rengelbert.com tutorial.php id 175 .. . Tuto for a Game Prototype http : obviam.net index.php getting-started-in-android-game-development-with-libgdx-create-a-working-prototype-in-a-day-tutorial-part-1 .. . Tutorial Series http : blog.gemserk.com tag libgdx .. . Another Tutorial Series http : www.reddit.com r gamedev comments 1pkgq8 libgdx tutorial series .. . Video Tutorial Series https : www.youtube.com user doctoriley videos .. . Another Video Tutorial Series http : www.youtube.com user dermetfan videos - everyone talk about how good these are .. . More tuto s https : github.com mattdesl lwjgl-basics wiki libgdx-tutorials .. . Swap Race Game tutorial http : theinvader360.blogspot.co.uk 2013 05 street-race-swipe-libgdx-scene2d.html .. . A ridiculous ammount of test examples https : github.com libgdx libgdx tree master tests gdx-tests src com badlogic gdx tests .. . Some Open Source Games https : github.com libgdx libgdx tree master demos -just some of the many out there .. . This page in the libgdx site conveniently called documentation http : libgdx.badlogicgames.com documentation.html .. . .. . And the master of them all : Top Secret Site https : www.google.com.mx q libgdx+tutorial .. . .. . And I have never read that book but I heard it s somewhat outdated even if the release date is not far the author started writing the book a long time ago and didn t bother to update it prior release . And if you were left clueless desperetaly trying to get your hands in a tutorial after reading the book : .. . .. . I m afraid I ve come to a dead end after being so excited finishing the book . Then I will dare to say its not a good book . Comment : The book was OK to get into the feel of developing but didn t accomplish what I thought it would . A book more like learn java in 21 days definitely did it s job well when I was learning java exclusively . Thank you so much for all the help . I ll have my work cut out for me these next few months . I really want to specialize ingame development and feel libGDX opens a lot of doors .", "Question : I just want to know that in the long run using which of these engines will be better . Although I feel that using Cocos2D will be a better option as it can also be used for iphone developement there s just 1 tutorial http : dan.clarke.name 2011 04 how-to-make-a-simple-android-game-with-cocos2d which I ve found so far . libgdx on the other hand has a complete book . Any suggestions Comment : I recommend you AndEgine . It is easy to learn and good documented engine . For example market.android.com https : market.android.com details id com.bestcoolfungamesfreegameappcreation.bunnyshooter and market.android.com details id org.anddev.farmtower.eco https : market.android.com details id org.anddev.farmtower.eco are done with AndEgine . Check andengine.org http : www.andengine.org for more details and code.google.com p andengineexamples source browse http : code.google.com p andengineexamples source browse hg 2Fsrc 2Forg 2Fanddev 2Fandengine 2Fexamples for examples . Comment : Thanks Greg but I was thinking that since using Cocos2d will make i phone game development easier should I go for Cocos2d Comment : @RockyTriton you click on reopen .. . Answer : Consider using AndEngine http : www.andengine.org . From a short look at libgdx they seem similiar Although AndEngine is 2D only . However AndEngine has everything you need for a 2D game . The only thing it lacks is documentation but it is open-source - if you don t get something take a look at the code http : code.google.com p andengine . There is an active forum here http : www.andengine.org forums and there is also a SO tag http : stackoverflow.com tags andengine info for AndEngine so you can ask questions here too . It also has-many extensions for useful add-ons like the physics-engine Box2D http : box2d.org which is a 2D cross-platform physics-engine used for many well known games For example Angry Birds uses it . It also supports TMX tiled maps with a pretty easy interface Actually that s the game I m developing now it s really easy to use the AndEngine TMX utillities . So. . before you pick one of cocos2d or libgdx take a look at AndEngine : .. . .. . @Greg That s not true.. . .. . .. . It is easy to learn and good documented engine .. . .. . There is almost no javadoc at all . But the forums are full with tutorials and so is the web . EDIT : From your comment at Greg s answer if you are looking for easy developing AndEngine is a good choice . From taking a look at that s cocos2d tutorial code it seems much more complicated and less intuitive than AndEngine s code . Comment : Thanks Jong . But Box2D and tmx utilities are also included in Cocos2D and looking at the popularity it has got over iphone dont you think Cocos2D will ultimately become the most popular game-engine on android Comment : I m not sure about it . as Ludeivik said cocos2d has it s weird coordinate system . And looking at its code it is more like C or C++ than Java all of these prefixes for classes and so on.. . That s weird . AndEngine also encapsulates both native Android calls requirements For example you don t implement any activity life cycle methods AndEngine does and encapsulates OpenGL calls too . In fact you don t even have to know it runs on OpenGL.. . The regular case won t require you to override any AndEngine OpenGL implementation . Comment : Just for the record : the box2d wrapper of Andengine is actually from libgdx . Libgdx also supports TMX . Comment : Don t use AndEngine . Use LigGDX . Comment : why is this the marked answer libgdx really is the obvious choice here.. .", "Question : Has any one got recommendations technical functional or otherwise for one of these game engines over the other I ve worked through a couple of tutorials for each of them and they both seem pretty functional but at this point I don t know enough about either of them to make a decision either way . I think either of them will require a fairly large number of hours invested in learning the engine so I m keen to try and pick one I ll be wanting to stick with . So far it seems that AndEngine is slightly more popular but libgdx has the ability to run games on the desktop which seems a pretty big advantage.. . I guess also I m fairly new to android development and am finding it a bit of a struggle - is one of these significantly easier than the other Comment : Here more information about libgdx vs andengine thegreystudios.com blog p 30 http : thegreystudios.com blog p 30 Comment : AndEngine is really cool but the lack of proper documentation makes it a bit hard to use at times . .. . Answer : Simply I can tell you that libgdx is much better than andEngine . I have been using both and my conclusion is : .. . .. . libgdx is more organized and easy to understand framework than andEngine as regards object oriented concept .. . libgdx is more efficient .. . there are lots of goods tutorial about libgdx .. . libgdx is cross-platform .. . and the most important libgdx is much faster You dont need anymore emulator to test your games Hope this can help people to decide .", "Question : I make a game with Java and LibGdx .. . .. . It s a game of skill with a time limit and the problem is the player can push home button to pause app and go to task manager and can see preview of app to seek what he has to find without counting time .. . .. . task manager http : i.stack.imgur.com 4ncKZ.jpg .. . .. . So I would like to hide the preview of the app when the player push home button to pause .. . .. . What I tried to do .. . .. . I override pause and resume handler .. . .. . and main part of my public void render float function .. . .. . log tell me that pause and resume are indeed invoked .. . .. . but in task manager I still see the game and not the black rectangle .. . .. . Update 1 .. . .. . to Ridcully answer : .. . .. . I tried what you suggested .. . .. . But same thing I still see the screenshot .. . .. . I m with Android Studio 2.1 My smartphone : Oneplus One and Android 6.0.1 .. . .. . Do you have an idea thanks .. . Answer : There is a flag for that . You can use this little method e.g . in onCreate to prevent Android from creating a screenshot for the recent activities list . You can activate deactivate as you want e.g . only activate it when the actual game board is visible etc . EDIT I just found this http : stackoverflow.com questions 33941381 flag-secure-not-working-on-libgdxs-androidapplication SO answer regarding Libgdx applications : Seems you have to set the flag AFTER invoking the initialize method . Comment : thanks for your answer I edited my message Comment : Don t put it into the Application class but in the Activities you don t want to show. . Comment : I think i ve just single Activity it s my AndroidLauncher Android applications can have multiple activities . Libgdx games should usually only consist of a single activity . Different screens of the game are implemented within libgdx not as separate activities . The reason for this is that creating a new Activity also implies creating a new OpenGL context which is time consuming and also means that all graphical resources have to be reloaded . from github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki Starter-classes- -configuration android . Other class in my project are just Screen and Game class Comment : Ah I have no experience with Libgdx but it seems the AndroidApplication class which your AndroidLauncher extends is in fact inheriting from Activity I alread wondered that Application class has access to Window . Maybe the Libgdx surroundings manipulate the window flags too . You can try to put a breakpoint in onPause method and check if the SECURE flag is still set then -- or just try and set the flag in onPause . Comment : Yep I was right -- please see my EDIT in my answer .", "Question : I am trying to port my game from Android to iOS using LibGDX + RoboVM . RoboVM is set up successfully and I can test in an iPhone simulator . I tried to follow the instructions on this website : Khela Interactive http : webcache.googleusercontent.com search q cache : ybefSRltnwMJ : www.khelainteractive.com porting-libgdx-game-iphone-via-robovm-part-2 20 cd 4 hl en ct clnk gl nl . However I cannot find the libs iOS folder and robovm.xml . How do I set up FreeType for iOS development .. . Answer : I found it . In Project Gradle under iOS - dependencies add :", "Question : I ve been testing with AndEngine for months but still haven t produced any game prototypes . There are few reasons why I want to switch to libgdx : .. . .. . - AndEngine is using libgdx s INI wrapper for Box2d but updates reach Andengine slowly - I m primarily targeting Android but having option for easy porting to other platforms could come handy - Documentation AndEngine has absolutely no documentation except for examples . - I would like to get as high performance as possible and that seems easier on libgdx . Few things I am concerned about libgdx is that I will need to write lower level code and that development for full game will take longer But then again sometimes I lost few days to understand how some parts of AndEngine work so is it possible that I ll even write code faster with libgdx since it s fully documented What should I be aware about libgdx before switching What is main difference when coding game and designing code .. . Answer : You should be aware of the following things : .. . .. . 1 . It is more performant thats a fact and widely known . Libgdx uses native-code for the more difficult tasks . 2 . Development on it is very fast I dont get why some people say it takes a lot of lines to do simple tasks thats simply not true . The library is very high level with the possibility of programming as low-level as you would need . Especially the ability to test on desktop immediately instead of waiting for the app to deploy to an android device or worse.. . the emulator . That makes the development time way faster . 3 . The library gives a lot of freedom you can make the things as you want it . For example I made a template that I use for every new game that makes things even faster for me . 4 . You dont have to know opengl androidsdk or lwjgl actually you just need to know the abstractions of the library . But you can make platform specific code if needed . And thats well documented . 5 . complementing P.T . point libgdx has a wrapper for box2d physics and bullet 3d physics which are pretty easy to use except bullet : S nah kidding . And I would say the new 3d api is almost complete not much will-change for the next stable release I even read on irc that it is pretty much done . I use it and can tell you its very easy to use . In conclusion Libgdx is a very fast library to develop on . Its very performant and complete . Has a good and helping community plus great documentation . I would recommend you to change :", "Question : In the past few days I ve been porting my game Apopalypse http : lostsourcestudios.com games.php to the Android Mobile platform . I ve did a quick search on Google of sprite touch detection but didn t find anything helpful . Each balloon will pop once touched and I just need to detect if it s touched . Here s my balloon spawning code : .. . .. . Rendering x y width and height are randomized : .. . .. . Spawning in main game class : Comment : What have you tried Have you read the wiki github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki -- check the Input Handling sections . .. . Answer : You could add a tiny 1x1 pixel rectangle to your mouse and check if it intersects or contains other boxes . You do need to use boxes for all your objects you want to make clickable this way .", "Question : In the past few days I ve been porting my game Apopalypse http : lostsourcestudios.com games.php to the Android Mobile platform . I ve did a quick search on Google of sprite touch detection but didn t find anything helpful . Each balloon will pop once touched and I just need to detect if it s touched . Here s my balloon spawning code : .. . .. . Rendering x y width and height are randomized : .. . .. . Spawning in main game class : Comment : What have you tried Have you read the wiki github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki -- check the Input Handling sections . .. . Answer : You have Gdx.input.getX and Gdx.input.getY . The X and Y coordinates of the last touch . Just compare them with balloon frame .", "Question : I cant find my error with this so it seems like the method intersecLines which as you could guess checks if two lines have one or more common points returns wrong results . Im using this in a Snake-kind-of game and this method should check if the line between the first and the second point of this snake-path which is existing as an ArrayList consisting of the points of the path intersects with one of the other lines which the snake consists of . The parameters are : Vector2 first Point of first line Vector2 second point of first line Vector2 first point of second line Vector2 second point of second line Vector2 that will be set to the intersecting point . For those of you who are not familiar with GDX it is a framework used for cross-platform development in java most of the methods are implementations of openGL ES methods . Heres the api reference of the Intersector class : http : libgdx.badlogicgames.com nightlies docs api com badlogic gdx math Intersector.html .. . Answer : Looking at the code https : github.com libgdx libgdx blob master gdx src com badlogic gdx math Intersector.java it would seem that the intersectLines method checks lines not line segments which I think is what you re looking for . Look at this excerpt specifically : .. . .. . This returns false if and only if the two lines slopes are equal the lines are parallel . Notice that it s equivalent to : .. . .. . For your purposes you d need to use a custom method or add-in some post processing . For example if you added in the fifth parameter to the method and then checked if that intersection point lied between two of your points that would suffice . I m not sure exactly how your points are stored but it might also be sufficient to check if any of the endpoints are equal .", "Question : I ve been testing with AndEngine for months but still haven t produced any game prototypes . There are few reasons why I want to switch to libgdx : .. . .. . - AndEngine is using libgdx s INI wrapper for Box2d but updates reach Andengine slowly - I m primarily targeting Android but having option for easy porting to other platforms could come handy - Documentation AndEngine has absolutely no documentation except for examples . - I would like to get as high performance as possible and that seems easier on libgdx . Few things I am concerned about libgdx is that I will need to write lower level code and that development for full game will take longer But then again sometimes I lost few days to understand how some parts of AndEngine work so is it possible that I ll even write code faster with libgdx since it s fully documented What should I be aware about libgdx before switching What is main difference when coding game and designing code .. . Answer : Both P.T . and Lestat make very good points in their answers . But for me I think there is just one thing that you need to know about libgdx which is simply that libgdx is a toolkit not an engine or framework . This one fact means that you are not locked in to a particular way of doing things . If you want a micro-framework write one with libgdx . If you want to write Unity 2D write it with libgdx . If you want to put everything in one file throwing object oriented principles to the wind you can do that with libgdx . It helps that it is well documented . It helps that it is fast . It helps that it has a strong knowledgeable community . It helps that the source code is available and is well-written . It helps that it comes with examples . It helps that it is a platform abstraction-layer so the same code will run on multiple platforms . It helps that it is actively developed . But fundamentally it is a toolkit albeit an excellent one . What you choose to do with that toolkit is up to you .", "Question : In the past few days I ve been porting my game Apopalypse http : lostsourcestudios.com games.php to the Android Mobile platform . I ve did a quick search on Google of sprite touch detection but didn t find anything helpful . Each balloon will pop once touched and I just need to detect if it s touched . Here s my balloon spawning code : .. . .. . Rendering x y width and height are randomized : .. . .. . Spawning in main game class : Comment : What have you tried Have you read the wiki github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki -- check the Input Handling sections . .. . Answer : in your class having the render method use can do following code", "Question : I am currently developing a small multiplatform game with libGDX . The game works great on Windows Android and OSX but I can t make it compile for iOS . The libGDX guide for iOS http : code.google.com p libgdx wiki IOSWIP states a couple of caveats but I m pretty sure I have taken everything into account . I have Eclipse Xamarin.iOS JDK Ant and PATH IKVM HOME is set as they should . The gamename.dll which is the Mono compiled dll that contains all my game logic and is automatically generated from the Java code has been created and everything looks to be in order . When compiling however I get the following error message : .. . .. . Paths abbreviated a little bit for brevity . These arguments are automatically generated by libGDX when creating the iOS project and looks like this in Xamarin s project settings : .. . .. . The build output contains this : .. . .. . libObjectAL is one of the referenced dlls that was added automatically by libGDX when creating the project . I assume this means that there is something wrong with my settings but I can t find anything that looks like it is related . Any ideas EDIT : After adding the framework suggested by poupou I now get a slightly different error message : EDIT1b : No it s actually the same . The only difference are the arguments . .. . Answer : So -framework AVFoundation is needed at least if your application does not refer to types in MonoTouch.AVFoundation . In that later case the framework will automagically be linked . OTOH the three symbols have another thing in common : they are all new in iOS6 . And it turns our you re building against iOS 5.1 i.e . -isysroot Applications Xcode.app Contents Developer Platforms iPhoneSimulator.platform Developer SDKs iPhoneSimulator5.1.sdk .. . .. . So the symbols are not present in the AVFoundation.framework being referenced and your libObjectAL-universal.a is not pleased with the missing symbols . From there you have two choices : .. . .. . 1 . Set your minimum build version to iOS6 which already has 93 of the market .. . .. . 2 . Try to find or build a libObjectAL without dependencies on iOS 6 API . Comment : Ah thanks I d love to set my minimum build version but I can only find 5.1 . Is there something I haven t installed properly In Options iOS Build SDK version I have only two options : 5.1 and Default . In iOS Application Deployment Target I have a lot of versions but none higher than 5.1 . 3.2 is currently selected . In the build dropdown I can select iPad Simulator 5.1 or iPhone Simulator 5.1 none for 6.1 . I have XCode version 4.3.2 and Xamarin version 4.0.8b2 . Am I missing anything obvious Comment : That s because your version of Xcode which includes the iOS SDK is too old it was released before 6.0 became available . You ll need to update it for 4.5 or 4.6 to get iOS 6 or 6.1 SDK support . Comment : Yep that solved the problem . Thank you very much Sorry it took me so long to check your answer -- it was a company Mac so naturally it took me all of four days to acquire the needed permissions to update Xcode .", "Question : I trying to learn libgdx I install all the software listed here https : github.com libgdx libgdx wiki Setting-up-your-Development-Environment- 28Eclipse 2C-Intellij-IDEA 2C-NetBeans 29 with a new Eclipse 4.3 on a fresh formated mac osx Maverick . Everything goes smooth after a reboot I download and execute the gdx-setup.jar fill the form and import into Eclipse . No error no warning when I try to run the desktop . Right click the desktop project Run As - Java Application . I got this error .. . .. . I found a lot of similar issue here I try them all without any good result.. . Last night I found this https : github.com libgdx libgdx issues 1361 very cool I have the latest java 1.8 a mac and Eclipse fit perfectly.. . But no success I try with java 1.6 and 1.7 Always the same error I kept Java 1.7 .. . .. . I begin to do some debug here my only modification of the original code generated by the importation . the weird thing is pathLocal is equal It is normal for Gdx.files.getLocalStoragePath to return nothing empty string Also the .. . .. . work great only the local one give the error also isLocal and isExternal return true . And I try a lots of combination assets data badlogic.jpg assets badlogic.jpg data badlogic.jpg data badlogic.jpg badlogic.jpg . The image badlogic.jpg is there and I put it at multiple place to be sure.. . .. . .. . And now the reason why I m here for help is I just try all the same step on a PC and everything works great . What is wrong with my new mac and it s setting Thanks for all your suggestions .. . .. . Bill Comment : That s weird.. . did you refresh the android-project in Eclipse after adding the assets Because that happens to me a lot when I add a new asset to the asset-folder in the android-project and then forget to refresh the android project in Eclipse it will give me an error saying the image isn t there.. . .. . Answer : For those using Intellij IDEA : .. . .. . 1 . Run - Edit Configurations .. . 2 . On the left hand side choose : Application - DesktopLauncher .. . 3 . In the Configuration -Tab undert Working directory choose your android-assets path Comment : You might mention : 1 This requires you to first create a desktop configuration . 2 This assumes you selected android when generating your original project . 3 This answer was already provided by Code-Apprentice above as instructions for Android Studio which is built on the IntelliJ IDE . Comment : Thank you for clarifying all of this ." ] }
[ "yes-answer-long", "yes-answer-short" ]
linux
UNK_RELATION
tomcat-jdbc@tomcat@34
tomcat-jdbc -- this tag is about @placeholder and jdbc working together .
{ "confidence": [ 39.94635772705078, 39.67698669433594, 39.21363067626953, 39.1917724609375, 39.1917724609375, 38.8629150390625, 37.66494369506836, 37.46726989746094, 37.46726989746094, 37.46726989746094, 37.41788101196289, 37.09344482421875, 36.110755920410156, 36.110755920410156, 35.68065643310547, 34.968223571777344, 34.582801818847656, 34.48494338989258, 34.48494338989258, 34.200958251953125, 33.55720138549805, 33.55720138549805, 33.50272750854492, 33.2877197265625, 33.2877197265625, 33.03602600097656, 32.95811080932617, 32.84363555908203, 32.57778549194336, 32.380287170410156, 32.15618896484375, 32.0599365234375, 31.931209564208984, 31.931209564208984, 31.931209564208984, 31.931209564208984, 31.887962341308594, 31.619203567504883, 31.050954818725586, 31.050954818725586, 31.050954818725586, 30.799678802490234, 30.799678802490234, 30.72974395751953, 30.46951675415039, 30.375755310058594, 30.375755310058594, 30.30539321899414, 30.30539321899414, 30.30539321899414, 30.30539321899414, 30.30539321899414, 30.30539321899414, 30.30539321899414, 30.30539321899414, 30.024229049682617, 30.015167236328125, 30.015167236328125, 30.015167236328125, 30.015167236328125, 30.015167236328125, 29.90949249267578, 29.90949249267578, 29.373233795166016, 29.373233795166016, 29.175994873046875, 29.175994873046875, 29.175994873046875, 29.175994873046875, 29.17386245727539, 29.17386245727539, 29.17386245727539, 28.65865707397461, 28.65865707397461, 28.65865707397461, 28.44329833984375, 28.398237228393555, 28.398237228393555, 28.398237228393555, 28.398237228393555, 28.042591094970703, 27.864723205566406, 27.864723205566406, 27.864723205566406, 27.864723205566406, 27.864723205566406, 27.747417449951172, 27.747417449951172, 27.747417449951172, 27.526134490966797, 27.41095733642578, 27.41095733642578, 27.266706466674805, 27.1312255859375, 27.1312255859375, 27.1312255859375, 27.1312255859375, 27.1312255859375, 27.1312255859375, 27.1312255859375 ], "content": [ "For example HikariCP http : brettwooldridge.github.io HikariCP BoneCP http : jolbox.com or perhaps Tomcat JDBC Pool http : people.apache.org fhanik jdbc-pool jdbc-pool.html .", "Thanks for nothing tomcat-jdbc .", "it runs in tomcat-jdbc-7.0.47 and there is the configuration below .", "We were facing similar issue with Tomcat JDBC connection pool .", "https : tomcat.apache.org tomcat-8.0-doc jdbc-pool.html org.apache.tomcat.jdbc.pool.interceptor.StatementDecoratorInterceptor", "Here is a complete list of properties supported by tomcat-jdbc http : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html Common Attributes .", "I am using tomcat-jdbc pool with apache-tomcat-7.0.47 as my app server .", "You need to configure the Tomcat JDBC connection pool to test connections .", "So what I understand is that TOMCAT is handling the JDBC memory leak properly .", "http : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html Interceptors", "But if the MYSQL Jdbc jar is duplicated in WebApp and Tomcat Lib Tomcat will only be able to handle the jar present in the Tomcat Lib folder .", "So just include tomcat-jdbc without tomcat-juli and you re done .", "JDBC Tomcat pgPool-II or another service like pgBouncer", "DBCP : default initialSize 0 Tomcat JDBC : default initialSize 10", "This issue seems to be a tomcat-jdbc triggered one .", "I am using this tutorial http : people.apache.org fhanik jdbc-pool jdbc-pool.html to set up pooling for JDBC .", "Or JDBC URL is in wrong syntax .. . .. . You need to ensure that the JDBC URL is conform the JDBC driver documentation and keep in mind that it s usually case sensitive .", "We configure tomcat-jdbc connection pool with removeAbandoned true .", "I m using Apache Tomcat JDBC connection-pooling in my project .", "And are you using JNDI or direct JDBC access", "The JDBC driver is not loaded at all .", "As the JDBC driver is also there it will be seen .", "3- jdbc", "Could be duplicate of stackoverflow.com questions 2604630 http : stackoverflow.com questions 2604630 tomcat-fails-to-start-because-of-jdbc-driver-loading", "If you move your JDBC driver jar to the tomcat lib folder instead of deploying it with your webapp the warning seems to disappear .", "JDBC driver is not loaded .. . .. . You need to ensure that the JDBC driver is placed in server s own lib folder .", "When I say tomcat-jdbc pool I mean Resource in context.xml in tomcat conf directory .", "In stand alone application which is build on top of hibernate I like to use Tomcat JDBC Connection Pool https : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html .", "I am using tomcat-jdbc pool in default spring-boot setup .", "My jdbc url jdbc : oracle : oci : @mytnsname", "With JDBC a database is represented by a URL Uniform Resource Locator .", "I have to put the jdbc driver jar in the common folder TOMCAT HOME lib .", "Either we delegate the pool task to JDBC Tomcat pool either we delegate it to pgPool-II right", "So I ensure that there s a query result cache in tomcat-jdbc pool but I haven t found any documents on this issue .", "Could someone tell me how to close the query-cache in tomcat-jdbc pool", "I changed the value in database but it didn t change when I query it out using tomcat-jdbc", "The Tomcat DataSource is an extension of DataSourceProxy https : tomcat.apache.org tomcat-7.0-doc api org apache tomcat-jdbc pool DataSourceProxy.html which has the method setMaxActive .", "Starting from a Tomcat server JDBC Tomcat pool seems to be a little faster than PgBouncer probably because it is embedded in the Tomcat application so in that case there are no tier services between Tomcat server and database.. .", "As the default container in Spring Boot is Tomcat you will automatically get Tomcat JDBC pool unless you change this", "Correct answer : DLL in the Tomcat bin folder and the jdbc JAR file in the Tomcat lib folder", "In my spring+hibernate based web application I recently moved from tomcat-dbcp to tomcat-jdbc connection-pooling .", "URL does not match any of the loaded JDBC drivers .", "Show us the JDBC URL you are using .", "Be happy that Tomcat did its job properly and wait until the JDBC driver vendor get it fixed so that you can upgrade the driver .", "That makes mysql jdbc driver to be unloaded only at JVM shutdown and noone cares about memory-leaks then .", "markt .. . .. . Also I ve found that a new system property was introduced in the Apache Tomcat JDBC Connection Pool : .. . .. . org.apache.tomcat.jdbc.pool.onlyAttemptCurrentClassLoader .. . .. . Controls classloading of dynamic classes such as JDBC drivers interceptors and validators .", "See.. . .. . .. . https : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html org.apache.tomcat.jdbc.pool.interceptor.QueryTimeoutInterceptor .. . .. . You should be able to add one of these interceptors to your config .. . .. . Note : that document says it is still up to the JDBC driver to enforce query timeouts .", "Spring-Boot supports tomcat-jdbc HikariCP and Commons DBCP natively are they all configured the same way", "I ve read-the-docs http : tomcat.apache.org tomcat-8.0-doc jdbc-pool.html but could not conclude much .", "Can someone guide me how to configure hibernate to use Tomcat JDBC Connection Pool as connection pool .", "May be this will help you Config http : www.javacodegeeks.com 2012 06 using-tomcat-jdbc-connection-pool-in.html", "It s all good and dandy when that LogFactory has to load tomcat-jdbc classes .", "I am running this app off of Tomcat 6.0 and am utilizing the Microsoft JDBC driver .", "I have recently incorporated the Apache Tomcat JDBC Connection Pool to my application using MySQL DB .", "I have configured Tomcat to use JDBC connection pool org.apache.tomcat.jdbc.pool along with PostgreSQL database .", "Those will be passed to the JDBC driver .", "The postgres jdbc driver postgresql-8.4.701.jdbc3.jar is in CATALINA HOME common lib .", "Thanks your JDBC connection-string formats were extremely helpful", "To prevent a memory leak the JDBC Driver has been forcibly unregistered .", "The actual bug is in someone else s code the JDBC driver in question not in yours .", "Where could I find the connection-string of jdbc myDS", "Also putting JDBC drivers into Tomcat s lib folder will help prevent memory-leaks when you redeploy your web app without restarting Tomcat e.g .", "Current versions of Tomcat probably 6.x and definitely 7.x will log warnings on undeployment of a web app if a memory leak is detected among other things by JDBC drivers .", "I have encountered an issue that is tomcat-jdbc pool cooperating with hibernate caches query results but I have banned hibernate s cache .", "According to link https : tomcat.apache.org tomcat-8.0-doc jdbc-pool.html by defalut DBCP creates 10 connections when the pool is started .", "I have a weird problem where two web apps with oracle jdbc driver will conflict with each other .", "This is even more problematic if your web apps use different versions of the same JDBC driver .", "Of course all your apps have to be able to work with the same JDBC driver version then .", "Is it just me or does a JVM-wide singleton DriverManager seem like a major bug in the design of JDBC", "Instead use the jtds jdbc driver http : jtds.sourceforge.net .", "Spring handled the sharing of the jdbc sessions for you and voila", "MySql JDBC driver does not support batch operations .", "What does is it uses a TNSnames and JDBC to reach an oracle database .", "But when I switch jdbc-pool to DBCP the issue get disappeared .", "The JDBC driver has to be visible to the same classloader as the data source factory itself .", "Setting the pools connectionProperties https : tomcat.apache.org tomcat-7.0-doc api org apache tomcat-jdbc pool DataSourceProxy.html setConnectionProperties java.lang.String should work .", "Can I somehow tell tomcat-jdbc that I don t want exceptions unless it tried to reconnect X number of times", "I do realize the mysql server is probably at fault here for the exception but isn t tomcat-jdbc supposed to handle these cases", "I placed a breakpoint when I log the number and verified that the tomcat-jdbc pool datasource has the correct parameters .", "But as Tomcat JDBC pool is the default it wouldn t hurt mentioning specific configuration options - I created an issue at github because of this .", "Yes I m working with Tomcat 6.0.18", "I tried to copy the jdbc driver has you say : TOMCAT HOME lib postgresql-9.0-801.jdbc4.jar - Tomcat 7.0 lib postgresql-9.0-801.jdbc4.jar with no results.. .", "Then Spring will handle it when it destroys its context and Tomcat won t give you the SEVERE log and you don t have to move your JDBC driver into the lib dir .", "Upgrading JDK to 6u21 as suggested in References section of URL http : wiki.apache.org tomcat MemoryLeakProtection solved the Java Heap Space problem context now reloads OK although JDBC Driver error still appears .", "While creating a JdbcInterceptor for Tomcat jdbc-pool one can override the method reset ConnectionPool parent PooledConnection con which will called every time the connection is borrowed from the pool .", "But I was told to use only the Tomcat-jdbc from CATALINA HOME lib and mysql-connector.jar from WEB-INF lib which gives a ClassNotFound Exception for Sql Driver .", "Does the Tomcat JDBC Connection Pool default Spring boot pool support more than one pool for each of my databases", "I think not .. . .. . But if you want to use the credentials of the user running Tomcat to connect to SQL Server then you can use Microsoft s JDBC Driver .", "You can also look at this http : www.metro-six.com en weblog 2010 08 30 persisting-http-session-state-tomcat-using-jdbc .", "The isValid int method was added in JDBC 4 Java 6 by the looks of it you are simply using a driver for an older Java version ojdbc5 ojdbc14 etc or an old version that doesn t fully implement JDBC 4 .", "If you have the same as in class name JDBC driver register twice from two different web apps this might cause your problem .", "Yes if you put a single JDBC driver JAR into Tomcat s lib instead of your web app s lib this will avoid conflicts like described by the original poster .", "This seems to work for properties that get passed in the jdbc url .", "See also Where do I have to place the JDBC driver for Tomcat s connection pool", "http : stackoverflow.com questions 13161747 where-do-i-have-to-place-the-jdbc-driver-for-tomcats-connection-pool .. . .. . 2 .", "On the other hand you aren t supposed to drop a JDBC driver in webapp s WEB-INF lib but only in server s lib .", "Move the JDBC driver to Tomcat s lib folder and have a connection pooled datasource to manage the driver .", "Was you assigning JDBC artifacts as fields of a class which is in turn stored in the HTTP session", "This is potentially unsafe in a shared environment as you might not want to deregister all JDBC drivers that are available .", "I found that implementing a simple destroy method to de-register any JDBC drivers works nicely ." ] }
{ "confidence": [ 45.41705322265625, 44.242469787597656, 43.62842559814453, 43.21464538574219, 42.93537139892578, 42.73865509033203, 42.10560607910156, 41.815155029296875, 41.603485107421875, 41.33406066894531, 41.30470657348633, 41.02505111694336, 41.02071762084961, 40.54299545288086, 40.273292541503906, 40.211753845214844, 39.89384460449219, 39.56731033325195, 39.298152923583984, 39.001564025878906 ], "content": [ "Question : I have a weird problem where two web apps with oracle jdbc driver will conflict with each other . I have to put the jdbc driver jar in the common folder TOMCAT HOME lib . What is the reason for this Thanks Comment : What do you mean will conflict with each other What exactly is the conflict And are you using JNDI or direct JDBC access .. . Answer : JDBC drivers register themselves in the JVM-wide singleton DriverManager http : download.oracle.com javase 6 docs api java sql DriverManager.html which is shared by all web apps . If you have the same as in class name JDBC driver register twice from two different web apps this might cause your problem . This is even more problematic if your web apps use different versions of the same JDBC driver . Also putting JDBC drivers into Tomcat s lib folder will help prevent memory-leaks when you redeploy your web app without restarting Tomcat e.g . if you just put a new WAR file into Tomcat s webapps folder : .. . .. . The class DriverManager gets loaded by the bootstrap classloader and thereby lives globally in the JVM while Tomcat loads all web apps in their own classloaders . So if a JDBC driver from a web app s WEB-INF lib folder registers itself in DriverManager it pins that web app s classloader in memory and thereby all the classes of that web app preventing its garbage-collection . If instead both DriverManager and JDBC drivers come from non-web app classloaders you can freely redeploy your web apps without any web app classes pinning themselves in classes loaded from other classloaders . Current versions of Tomcat probably 6.x and definitely 7.x will log warnings on undeployment of a web app if a memory leak is detected among other things by JDBC drivers . Comment : placing the sql jar inside lib folder of tomcat apache-tomcat-7.0.37 lib will solve the issue Comment : Yes if you put a single JDBC driver JAR into Tomcat s lib instead of your web app s lib this will avoid conflicts like described by the original poster . Of course all your apps have to be able to work with the same JDBC driver version then . Comment : Is it just me or does a JVM-wide singleton DriverManager seem like a major bug in the design of JDBC", "Question : I am getting this message when I run my web application . It runs fine but I get this message during shutdown . SEVERE : A web application registered the JBDC driver oracle.jdbc.driver.OracleDriver but failed to unregister it when the web application was stopped . To prevent a memory leak the JDBC Driver has been forcibly unregistered . Any help appreciated . Comment : Could be duplicate of stackoverflow.com questions 2604630 http : stackoverflow.com questions 2604630 tomcat-fails-to-start-because-of-jdbc-driver-loading .. . Answer : I found the same issue with Tomcat version 6.026 . I used the Mysql JDBC.jar in WebAPP Library as well as in TOMCAT Lib . To fix the above by removing the Jar from the TOMCAT lib folder . So what I understand is that TOMCAT is handling the JDBC memory leak properly . But if the MYSQL Jdbc jar is duplicated in WebApp and Tomcat Lib Tomcat will only be able to handle the jar present in the Tomcat Lib folder .", "Question : null .. . Answer : I have encountered an issue that is tomcat-jdbc pool cooperating with hibernate caches query results but I have banned hibernate s cache . But when I switch jdbc-pool to DBCP the issue get disappeared . So I ensure that there s a query result cache in tomcat-jdbc pool but I haven t found any documents on this issue . Could someone tell me how to close the query-cache in tomcat-jdbc pool it runs in tomcat-jdbc-7.0.47 and there is the configuration below . Comment : Tomcat version Comment : There s a statement in the Tomcat 7 connection pool documentation http : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html that you can use interceptors to gather query stats cache session states reconnect the connection upon failures retry queries cache query results and so on which implies it doesn t do that by default . Comment : but actually it did it cached . Comment : Can you post a small code sample that explains why you think it cached the result Comment : I changed the value in database but it didn t change when I query it out using tomcat-jdbc", "Question : I am getting this message when I run my web application . It runs fine but I get this message during shutdown . SEVERE : A web application registered the JBDC driver oracle.jdbc.driver.OracleDriver but failed to unregister it when the web application was stopped . To prevent a memory leak the JDBC Driver has been forcibly unregistered . Any help appreciated . Comment : Could be duplicate of stackoverflow.com questions 2604630 http : stackoverflow.com questions 2604630 tomcat-fails-to-start-because-of-jdbc-driver-loading .. . Answer : Since version 6.0.24 Tomcat ships with a memory leak detection http : wiki.apache.org tomcat MemoryLeakProtection feature which in turn can lead to this kind of warning messages when there s a JDBC 4.0 compatible driver in the webapp s WEB-INF lib which auto- registers http : docs.oracle.com javase 6 docs api java sql DriverManager.html registerDriver 28java.sql.Driver 29 itself during webapp s startup using the ServiceLoader API http : docs.oracle.com javase 6 docs api java util ServiceLoader.html but which did not auto- deregister http : docs.oracle.com javase 6 docs api java sql DriverManager.html deregisterDriver 28java.sql.Driver 29 itself during webapp s shutdown . This message is purely informal Tomcat has already taken the memory leak prevention action accordingly . What can you do 1 . Ignore those warnings . Tomcat is doing its job right . The actual bug is in someone else s code the JDBC driver in question not in yours . Be happy that Tomcat did its job properly and wait until the JDBC driver vendor get it fixed so that you can upgrade the driver . On the other hand you aren t supposed to drop a JDBC driver in webapp s WEB-INF lib but only in server s lib . If you still keep it in webapp s WEB-INF lib then you should manually register and deregister it using a ServletContextListener . 2 . Downgrade to Tomcat 6.0.23 or older so that you will not be bothered with those warnings . But it will silently keep leaking memory . Not sure if that s good to know after all . Those kind of memory-leaks are one of the major causes behind OutOfMemoryError issues http : wiki.apache.org tomcat OutOfMemory during Tomcat hotdeployments . 3 . Move the JDBC driver to Tomcat s lib folder and have a connection pooled datasource to manage the driver . Note that Tomcat s builtin DBCP does not deregister drivers properly on close . See also bug DBCP-322 https : issues.apache.org jira browse DBCP-332 which is closed as WONTFIX . You would rather like to replace DBCP by another connection pool which is doing its job better then DBCP . For example HikariCP http : brettwooldridge.github.io HikariCP BoneCP http : jolbox.com or perhaps Tomcat JDBC Pool http : people.apache.org fhanik jdbc-pool jdbc-pool.html . Comment : This is good advice . It s not warning of a memory leak it s a warning that Tomcat took some forcible action to prevent a leak Comment : If option 1 is the way to go why does Tomcat log these as SEVERE though SEVERE to me means page the admin not ignore . Comment : Why not do it yourself - rather than expect Tomcat to do it . In my opinion it s not Tomcat s job to clean up our messy code . See my answer below . Comment : @sproketboy : Huh Was you assigning JDBC artifacts as fields of a class which is in turn stored in the HTTP session Comment : I guess it s usually reason 3 having the library in the wAR as opposed to lib .", "Question : I am using tomcat-jdbc pool with apache-tomcat-7.0.47 as my app server . When I don t use the StatementCache interceptor everything works fine . But I start getting an error as soon as I declare StatementCache interceptor in my context.xml . Below is the entry in my context.xml : .. . .. . Below is the error trace i get : .. . .. . Has anyone else faced this error It seems to me that the first statement gets executed and closed . This statement is cached . The next db gets the closed statement . I use spring with ibatis in my application . Should I do something in the application to not close the statement or probably open the statement if closed .. . Answer : We were facing similar issue with Tomcat JDBC connection pool . Removing StatementCache was resolving it . This was strange because Tomcat pool doesn t closes a statement if Statement cache is enabled even if we call statement.close . We added StatementDecoratorInterceptor to resolve the issue . There is a bug in tomcat connection pool https : bz.apache.org bugzilla show bug.cgi id 48392 .. . .. . so calling resultSet.getStatement .close will close actual statement . Use StatementDecoratorInterceptor to avoid actual statement close in your code due to above issue . https : tomcat.apache.org tomcat-8.0-doc jdbc-pool.html org.apache.tomcat.jdbc.pool.interceptor.StatementDecoratorInterceptor", "Question : I am getting this message when I run my web application . It runs fine but I get this message during shutdown . SEVERE : A web application registered the JBDC driver oracle.jdbc.driver.OracleDriver but failed to unregister it when the web application was stopped . To prevent a memory leak the JDBC Driver has been forcibly unregistered . Any help appreciated . Comment : Could be duplicate of stackoverflow.com questions 2604630 http : stackoverflow.com questions 2604630 tomcat-fails-to-start-because-of-jdbc-driver-loading .. . Answer : This is purely driver registration deregistration issue in mysql s driver or tomcats webapp-classloader . Copy mysql driver into tomcats lib folder so its loaded by jvm directly not by tomcat and message will be gone . That makes mysql jdbc driver to be unloaded only at JVM shutdown and noone cares about memory-leaks then . Comment : that don t works.. . I tried to copy the jdbc driver has you say : TOMCAT HOME lib postgresql-9.0-801.jdbc4.jar - Tomcat 7.0 lib postgresql-9.0-801.jdbc4.jar with no results.. . Comment : @Florito - you have to remove it from your web-apps WEB-INF lib as well Comment : Amazing solution . And thanks @CollinPeters as well .", "Question : So I ve figured out my error now I m just looking for some insight as to what is going on exactly . I am using Apache Tomcat Version 7.0.32 . I am using this tutorial http : people.apache.org fhanik jdbc-pool jdbc-pool.html to set up pooling for JDBC . In my META-INF folder I made a context.xml file and put this in there . I got this error when I wrote this .. . .. . This error only comes up when I have this statement in my context.xml file . When I remove it no error . The reason I want to make sure that I have it is because in the apache tomcat tutorial it says .. . .. . So then I did a little bit of research on SO and found a post saying that you need to add this jar http : people.apache.org fhanik jdbc-pool to your lib folder if you have an older version of tomcat . So I added the jar and now it works but I would like to have some information as to what on earth is going on because I am using the newest tomcat version . So why when I specify a factory do I get an error . And what is this jar that I m adding in and why is there very little documentation about it Any information about what is going on here would be greatly appreciated . .. . Answer : The JDBC driver has to be visible to the same classloader as the data source factory itself . The data source factory library is placed in Tomcat s own lib folder and thus loaded by Tomcat s common classloader . Your problem sounds much like that you dropped the JDBC driver in webapp s WEB-INF lib . The webapp s WEB-INF lib is invisible to the common classloader . So technically you have to place the JDBC driver in Tomcat s own lib folder or at least in a configurable path as specified by common.loader setting in conf catalina.properties in order to make it visible to the data source factory . Or as you attempted copying the data source factory into WEB-INF lib will also fix it . The webapp s WEB-INF lib has namely higher precedence in classloading than Tomcat s lib folder . So if the data source factory is found in WEB-INF lib it will be loaded from there . As the JDBC driver is also there it will be seen . This is however not the right solution to your concrete problem this is more a workaround so you shouldn t do this . There isn t exactly documentation which is specifically targeted to this issue . The Tomcat Class Loader HOW-TO http : tomcat.apache.org tomcat-7.0-doc class-loader-howto.html will however help in understanding the class loading hierarchy in Tomcat . screen shot showing Tomcat folder with nested lib folder with nested JDBC driver .jar file http : i.stack.imgur.com iNLWX.png .. . .. . See also : .. . .. . The infamous java.sql.SQLException : No suitable driver found http : stackoverflow.com questions 1911253 the-infamous-java-sql-sqlexception-no-suitable-driver-found .. . How should I connect to JDBC database datasource in a servlet based application http : stackoverflow.com questions 2299469 how-should-i-connect-to-jdbc-database-datasource-in-a-servlet-based-applicatio .. . Is it safe to use a static java.sql.Connection instance in a multithreaded system http : stackoverflow.com questions 9428573 is-it-safe-to-use-a-static-java-sql-connection-instance-in-a-multithreaded-syste Comment : THANK YOU THANK YOU THANK YOU You are honestly the best I understand everything you are saying and why I was getting an error . The only thing that I do not understand is where Tomcat s own lib folder is I am currently using eclipse and I have two folders in my workspace . gmustudent and Servers . When I expand Servers I see a folder Tomcat v7.0 Server at localhost-config and in that there are a couple of XML files . I tried putting it in that folder but that was a huuuuge error So I apologize for the second question but what do you mean by Tomcat s own lib folder Comment : In Tomcat s installation folder on the local disk file system . E.g . C : path to apache-tomcat-7.0.30 . This is not to be managed from inside Eclipse . The conf folder mentioned in my answer is also in there . Comment : Wow that makes so much sense I wish I could talk to you about this for hours I have a couple quick questions of things I want to clear up about this if you don t mind . 1 You say the datasource factory is in that lib folder . Which jar is it in 2 This may be a similair answer to 1 but where is this located factory org.apache.tomcat.jdbc.pool.DataSourceFactory exactly Is this pointing to a jar in that folder or somewhere else 3 Should I keep my jdbc driver in that lib folder from now on or is it good practice to put it in WEB-INF lib unless you need it elsewhere like this scenario Comment : It s the tomcat-jdbc.jar file . The factory value is the fully qualified class name which is to be passed to Class forName in Tomcat s internal code so that it could be loaded and instantiated . Yes the JDBC driver JAR file should be kept in Tomcat s lib or at least in a path as specified by common.loader property . Comment : So basically when I start my server factory org.apache.tomcat.jdbc.pool.DataSourceFactory is loaded into ClassforName somewhere behind the scenes in Tomcats internal code and then it loads that jar tomcat-jdbc.jar which allows me to utilize connection-pooling Do I got it lol", "Question : I have java web application using Spring Hibernate Tomcat7 MySql . I use Datasource for database operations . I am not very clear about what is the standard location to load the jar files Tomcat-jdbc.jar Mysql-connector.jar from It works if I keep BOTH the jars either in CATALINA HOME lib or webapps myApp WEB-INF lib . But I was told to use only the Tomcat-jdbc from CATALINA HOME lib and mysql-connector.jar from WEB-INF lib which gives a ClassNotFound Exception for Sql Driver . Can someone let me know which is the right location for these jars Comment : Do you have the MySQL driver on your classpath Comment : Yes . WEB-INF lib mysql-connector.jar Comment : Also read Apache Tomcat 6.0 Class Loader HOW-TO https : tomcat.apache.org tomcat-6.0-doc class-loader-howto.html .. . Answer : That depends on who s managing the datasource . If you re manually constructing and managing the datasource in your own webapp like so new SomeDataSource etc then the JDBC driver JAR file can be placed in webapp s WEB-INF lib . But if appserver happen to provide the very same JDBC driver JAR file in its own lib already then you could also just make use of it . However if you re instructing appserver to manage the datasource all by itself and you re merely making use of it in your webapp via @Resource etc then the JDBC driver JAR file has to be placed in appserver s own lib for the very simple reason because the data source is prepared on appserver s startup completely independently from any to be deployed web-applications . This data source is in turn shareable among all webapps . It would technically just not work if the JDBC driver JAR file is in one of the yet-to-be-deployed webapps . Comment : What if each application uses different database vendors Comment : You can simply create more than one datasource . Comment : FYI See this detailed helpful answer also by BalusC http : stackoverflow.com a 2299870 642706 to a similar question .", "Question : In stand alone application which is build on top of hibernate I like to use Tomcat JDBC Connection Pool https : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html . My guess is that i need to add some configs in hibernate.cfg.xml . Can someone guide me how to configure hibernate to use Tomcat JDBC Connection Pool as connection pool . Comment : May be this will help you Config http : www.javacodegeeks.com 2012 06 using-tomcat-jdbc-connection-pool-in.html .. . Answer : In your hibernate.cfg.xml configuration file you need to set the following property : .. . .. . assuming this is the JNDI name of your Tomcat CP DataSource . Comment : Did it help you", "Question : I am getting this message when I run my web application . It runs fine but I get this message during shutdown . SEVERE : A web application registered the JBDC driver oracle.jdbc.driver.OracleDriver but failed to unregister it when the web application was stopped . To prevent a memory leak the JDBC Driver has been forcibly unregistered . Any help appreciated . Comment : Could be duplicate of stackoverflow.com questions 2604630 http : stackoverflow.com questions 2604630 tomcat-fails-to-start-because-of-jdbc-driver-loading .. . Answer : I will add to this something I found on the Spring forums . If you move your JDBC driver jar to the tomcat lib folder instead of deploying it with your webapp the warning seems to disappear . I can confirm that this worked for me .. . .. . http : forum.springsource.org showthread.php 87335-Failure-to-unregister-the-MySQL-JDBC-Driver p 334883 post334883 http : forum.springsource.org showthread.php 87335-Failure-to-unregister-the-MySQL-JDBC-Driver p 334883 post334883 Comment : I think this offers a better solution - just subclass your DatasourceManager and override the close method to add deregistration . Then Spring will handle it when it destroys its context and Tomcat won t give you the SEVERE log and you don t have to move your JDBC driver into the lib dir . Here s the orignal msg from the old spring forum http : forum.spring.io forum spring-projects security 96659-spring-security-jdbc-memory-leak", "Question : Which of the settings of jdbc-pool may help me with killing sql query which runs more than 1 seconds When I say tomcat-jdbc pool I mean Resource in context.xml in tomcat conf directory . Comment : removeAbandonedTimeout 1 does not help me .. . Answer : It looks like the tomcat pool provides an out-of-the-box interceptor to do this for you . See.. . .. . .. . https : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html org.apache.tomcat.jdbc.pool.interceptor.QueryTimeoutInterceptor .. . .. . You should be able to add one of these interceptors to your config .. . .. . Note : that document says it is still up to the JDBC driver to enforce query timeouts .", "Question : null .. . Answer : My company plans to use pgPool-II in order to benefit of its Fail Over Load Balancing and eventually Replication features . We consider here that we have a J2EE Tomcat web application hosted by a servers cluster where Jakarta Tomcat Connector JK or similar service is used to do the link between clients and these Tomcat servers load-balancing . Also we consider that we have a cluster of PostgreSQL 9.3 databases where pgPool-II is used to do the link between the Tomcat servers cluster and the databases cluster . Our application is a multi-user application where each user is associated to a different role in terms of databases of course . I learned that pgPool-II use the same protocol than postgreSQL so to connect to the pool we just need to connect to it as we usually connect to a database right In this mail copy http : www.sraoss.jp pipermail pgpool-general 2014-January 002489.html I saw that it s useless to have 2 pool layers so no need to use JDBC Tomcat pool in addition to pgPool-II . Either we delegate the pool task to JDBC Tomcat pool either we delegate it to pgPool-II right So my final questions are : .. . .. . How to properly get connections from pgPool-II with JDBC in that case must I simply demand a new connection to pgPool-II every time a user need to execute a SQL request Does not affect performance Which part should take charge of pool task in order to obtain the best performance JDBC Tomcat pgPool-II or another service like pgBouncer What is the best approach Thanks in advance PS : If some points aren t clear please tell me and I ll edit my post . Comment : I made some integration tests and benchmarks with JUnit . Starting from a Tomcat server JDBC Tomcat pool seems to be a little faster than PgBouncer probably because it is embedded in the Tomcat application so in that case there are no tier services between Tomcat server and database.. .", "Question : I don t seem to know what I am doing wrong I have been stuck for such a long time . I have this web application which runs on tomcat server . What does is it uses a TNSnames and JDBC to reach an oracle database . I am using odjbc6.jar for this . 1 . I have set my odjbc6.jar in the library and buildpath so that is there . 2 . my tnsname is working as intended I can test it with another program with exaclty the same configuration . 3 . I have set my global enviroment .. . .. . What am I missing here Comment : You don t need a tnsnames.ora if you are using the thin driver i.e . the URL starts with jdbc : oracle : thin . Show us the JDBC URL you are using . Comment : @a horse with no name unfortunatly I need to do it this way . The reason is because this saves me lots of work down the road with the rest of the application . My jdbc url jdbc : oracle : oci : @mytnsname .. . Answer : The problem was that tomcat in eclipse didn t compile everything correctly but when I exported it to a WAR file and hosted it on a tomcat server then it worked . It still does not work correctly when I run tomcat on eclipse which I find strange", "Question : I am getting this message when I run my web application . It runs fine but I get this message during shutdown . SEVERE : A web application registered the JBDC driver oracle.jdbc.driver.OracleDriver but failed to unregister it when the web application was stopped . To prevent a memory leak the JDBC Driver has been forcibly unregistered . Any help appreciated . Comment : Could be duplicate of stackoverflow.com questions 2604630 http : stackoverflow.com questions 2604630 tomcat-fails-to-start-because-of-jdbc-driver-loading .. . Answer : I was having a similar problem but additionally I was getting a Java Heap Space error anytime I modified saved JSP pages with Tomcat server running therefore the context were not fully recharged . My versions were Apache Tomcat 6.0.29 and JDK 6u12 . Upgrading JDK to 6u21 as suggested in References section of URL http : wiki.apache.org tomcat MemoryLeakProtection solved the Java Heap Space problem context now reloads OK although JDBC Driver error still appears .", "Question : I am getting this message when I run my web application . It runs fine but I get this message during shutdown . SEVERE : A web application registered the JBDC driver oracle.jdbc.driver.OracleDriver but failed to unregister it when the web application was stopped . To prevent a memory leak the JDBC Driver has been forcibly unregistered . Any help appreciated . Comment : Could be duplicate of stackoverflow.com questions 2604630 http : stackoverflow.com questions 2604630 tomcat-fails-to-start-because-of-jdbc-driver-loading .. . Answer : If you are getting this message from a Maven built war change the scope of the JDBC driver to provided and put a copy of it in the lib directory . Like this : Comment : This is a great solution", "Question : null .. . Answer : While creating a JdbcInterceptor for Tomcat jdbc-pool one can override the method reset ConnectionPool parent PooledConnection con which will called every time the connection is borrowed from the pool . Is there a way to detect if this is the first time a particular underlying connection is being borrowed from the pool I could code something in my interceptor to remember and then check this each time but I wonder if there is some type of property on the PooledConnection that I can check . I tried isInitialized but that is always true in the reset method . http : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html Interceptors", "Question : So I ve figured out my error now I m just looking for some insight as to what is going on exactly . I am using Apache Tomcat Version 7.0.32 . I am using this tutorial http : people.apache.org fhanik jdbc-pool jdbc-pool.html to set up pooling for JDBC . In my META-INF folder I made a context.xml file and put this in there . I got this error when I wrote this .. . .. . This error only comes up when I have this statement in my context.xml file . When I remove it no error . The reason I want to make sure that I have it is because in the apache tomcat tutorial it says .. . .. . So then I did a little bit of research on SO and found a post saying that you need to add this jar http : people.apache.org fhanik jdbc-pool to your lib folder if you have an older version of tomcat . So I added the jar and now it works but I would like to have some information as to what on earth is going on because I am using the newest tomcat version . So why when I specify a factory do I get an error . And what is this jar that I m adding in and why is there very little documentation about it Any information about what is going on here would be greatly appreciated . .. . Answer : I had the same problem your solution didn t work for me . I had to add the mysql-connector-java-5.1.30-bin.jar file to my lib folder for it to work since i was using that driver : Cheers .", "Question : null .. . Answer : In the web.inf of an application I have .. . .. . I would like to know where jdbc myDS points . I checked in Tomcat 5.5 conf server.xml but I don t see any references to it . Where could I find the connection-string of jdbc myDS Comment : Probably in your webapp s context.xml file . Comment : In my webapp I don t have any context.xml file", "Question : I am getting this message when I run my web application . It runs fine but I get this message during shutdown . SEVERE : A web application registered the JBDC driver oracle.jdbc.driver.OracleDriver but failed to unregister it when the web application was stopped . To prevent a memory leak the JDBC Driver has been forcibly unregistered . Any help appreciated . Comment : Could be duplicate of stackoverflow.com questions 2604630 http : stackoverflow.com questions 2604630 tomcat-fails-to-start-because-of-jdbc-driver-loading .. . Answer : I found that implementing a simple destroy method to de-register any JDBC drivers works nicely . Comment : This is potentially unsafe in a shared environment as you might not want to deregister all JDBC drivers that are available . See my answer http : stackoverflow.com a 23912257 889583 for a safer approach . Also this really should be done in a ServletContextListener not on a per-servlet basis as your JDBC driver is shared across all of your servlets in your webapp .", "Question : I m trying to add a database-enabled JSP to an existing Tomcat 5.5 application GeoServer 2.0.0 if that helps . The app itself talks to Postgres just fine so I know that the database is up user can access it all that good stuff . What I m trying to do is a database query in a JSP that I ve added . I ve used the config example in the Tomcat datasource example http : tomcat.apache.org tomcat-5.5-doc jndi-datasource-examples-howto.html pretty much out of the box . The requisite taglibs are in the right place -- no errors occur if I just have the taglib refs so it s finding those JARs . The postgres jdbc driver postgresql-8.4.701.jdbc3.jar is in CATALINA HOME common lib . Here s the top of the JSP : .. . .. . The relevant section from CATALINA HOME conf server.xml inside the Host which is in turn within Engine : .. . .. . These lines are the last in the tag in webapps gs2 WEB-INF web.xml : .. . .. . Finally the exception : .. . Answer : The infamous java.sql.SQLException : No suitable driver found .. . .. . This exception can have basically two causes : .. . .. . 1 . JDBC driver is not loaded .. . .. . You need to ensure that the JDBC driver is placed in server s own lib folder . http : i.stack.imgur.com iNLWX.png .. . .. . Or when you re actually not using a server-managed connection pool data source but are manually fiddling around with DriverManager getConnection in WAR then you need to place the JDBC driver in WAR s WEB-INF lib and perform . . .. . .. . . . in your code before the first DriverManager getConnection call whereby you make sure that you do not swallow ignore any ClassNotFoundException which can be thrown by it and continue the code flow as-if nothing exceptional happened . See also Where do I have to place the JDBC driver for Tomcat s connection pool http : stackoverflow.com questions 13161747 where-do-i-have-to-place-the-jdbc-driver-for-tomcats-connection-pool .. . .. . 2 . Or JDBC URL is in wrong syntax .. . .. . You need to ensure that the JDBC URL is conform the JDBC driver documentation and keep in mind that it s usually case sensitive . When the JDBC URL does not return true for Driver acceptsURL http : docs.oracle.com javase 8 docs api java sql Driver.html acceptsURL-java.lang.String- for any of the loaded drivers then you will also get exactly this exception . In case of PostgreSQL it is documented here https : jdbc.postgresql.org documentation 80 connect.html . With JDBC a database is represented by a URL Uniform Resource Locator . With PostgreSQL this takes one of the following forms : .. . .. . jdbc : postgresql : database .. . jdbc : postgresql : host database .. . jdbc : postgresql : host : port database .. . .. . In case of MySQL it is documented here http : dev.mysql.com doc connector-j en connector-j-reference-configuration-properties.html . The general format for a JDBC URL for connecting to a MySQL server is as follows with items in square brackets being optional : .. . .. . jdbc : mysql : host1 : port1 host2 : port2 .. . database propertyName1 propertyValue1 propertyName2 propertyValue2 .. . .. . .. . In case of Oracle it is documented here http : www.orafaq.com wiki JDBC . There are 2 URL syntax old syntax which will only work with SID and the new one with Oracle service name . .. . Old syntax jdbc : oracle : thin : @ HOST : PORT : SID .. . .. . New syntax jdbc : oracle : thin : @ HOST : PORT SERVICE .. . .. . .. . .. . See also : .. . .. . Where do I have to place the JDBC driver for Tomcat s connection pool http : stackoverflow.com questions 13161747 where-do-i-have-to-place-the-jdbc-driver-for-tomcats-connection-pool .. . How to install MySQL JDBC driver in Eclipse web project without java.lang.ClassNotFoundexception com.mysql.jdbc.Driver http : stackoverflow.com questions 2353141 how-to-install-mysql-jdbc-driver-in-eclipse-web-project-without-java-lang-classn .. . How should I connect to a MySQL data source in a servlet based application http : stackoverflow.com questions 2299469 how-should-i-connect-to-a-mysql-data-source-in-a-servlet-based-application .. . What is the difference between Class.forName and Class.forName .newInstance http : stackoverflow.com questions 2092659 what-is-the-difference-between-class-forname-and-class-forname-newinstanc 2093236 2093236 .. . Connect Java to a MySQL database http : stackoverflow.com questions 2839321 connect-java-to-a-mysql-database 2840358 2840358 Comment : Thanks guys Sorry 1st attempt wasn t in OP just jdbc : postgresql : mmas and I d tried others . Sadly with araqnid s URL same result . Last night I swapped tablib stuff for ick embedded Java and that works fine : try Class.forName org.postgresql.Driver .newInstance con DriverManager.getConnection jdbc : postgresql : mmas mmas passwd stmt con.createStatement rs stmt.executeQuery select yada yada if rs null rs.next reap fame fortune glory babes Jakarta example was w taglibs so I started that way . Comment : Ah . Comments not so much w the code-formatting . Ahem . Is my newbie showing ZIIP Anyway the Jakarta example was all about using the sql : query syntax instead of just embedding Java code and I agree that s a much much cleaner way to do it . One should not need to explicitly call forName and getConnection right But the old ugly hack-the-driver-code-in-the-presentation-layer method worked just fine first try . So I m baffled but now it s more of a maintenance aesthetics issue than This is broken fix it or brush up on your burger-flipping skills . Comment : IMHO using the sql taglib is only slightly better than doing JDBC in scriptlets.. . much prefer a controller view pattern where the db stuff is done upfront and the JSP just displays stuff . Each to their own though and using sql : query keeps things simple : ish Comment : I have never said that I agree with using JSTL SQL taglib but that s not the subject where this topic is about . Comment : Thanks your JDBC connection-string formats were extremely helpful" ] }
[ "yes-answer-long", "yes-answer-short" ]
tomcat
UNK_RELATION
firebird@cross-platform@48
firebird -- firebird is a free and open-source @placeholder client-server sql relational-database management system running on linux unix and windows .
{ "confidence": [ 46.93939971923828, 46.11000061035156, 45.85952377319336, 44.03416442871094, 44.00806427001953, 43.74689483642578, 43.41673278808594, 43.40319061279297, 43.19779968261719, 43.151153564453125, 43.14741897583008, 42.80369567871094, 42.659786224365234, 42.6390380859375, 42.534725189208984, 42.51895523071289, 42.286460876464844, 42.25833511352539, 42.107242584228516, 41.960472106933594, 41.88356018066406, 41.88229751586914, 41.81084442138672, 41.77234649658203, 41.710140228271484, 41.56119155883789, 41.550479888916016, 41.39643096923828, 41.3864631652832, 41.34124755859375, 41.17034912109375, 41.13042449951172, 41.113460540771484, 40.91191101074219, 40.787776947021484, 40.7696418762207, 40.63811111450195, 40.63121032714844, 40.600624084472656, 40.47624969482422, 40.395355224609375, 40.381065368652344, 40.333797454833984, 40.32014846801758, 40.246421813964844, 40.22420120239258, 40.17826461791992, 40.070594787597656, 40.070594787597656, 40.070594787597656, 39.92681884765625, 39.88478088378906, 39.88478088378906, 39.88478088378906, 39.857425689697266, 39.857425689697266, 39.857425689697266, 39.81005096435547, 39.74745178222656, 39.66239929199219, 39.58815383911133, 39.565711975097656, 39.532405853271484, 39.394813537597656, 39.28243637084961, 39.05113983154297, 39.02043151855469, 39.02043151855469, 39.02043151855469, 39.02043151855469, 38.91652297973633, 38.91485595703125, 38.91485595703125, 38.90697479248047, 38.87471008300781, 38.78919982910156, 38.6910285949707, 38.67750549316406, 38.60984802246094, 38.514991760253906, 38.36449432373047, 38.35661315917969, 38.3132209777832, 38.24705123901367, 38.22384262084961, 38.21828842163086, 38.1622314453125, 38.1622314453125, 38.1622314453125, 38.130714416503906, 38.03992462158203, 37.972782135009766, 37.971649169921875, 37.971649169921875, 37.971649169921875, 37.968109130859375, 37.943058013916016, 37.835628509521484, 37.817970275878906 ], "content": [ "These database managers are not free but firebird is .", "Is it SQL Server from Microsoft or Firebird", "I am using Firebird SQL below command used for connecting database through Firebird SQL .", "Here are the outputs for open access .. . .. . Firebird .. . .. . I was confused that firebird open access use SQL as a query language .", "On Linux with Firebird embedded you don t need to run the Firebird service but Firebird embedded needs to be installed correctly .", "The server architecture of Firebird Embedded on Windows was changed in Firebird 2.5 .", "These database managers are not free but firebird is : There are multiple free database managers for Firebird some of them being unbelievably good .", "If you want to access a Firebird database over the network then you need to install Firebird server and connect through the server .", "So : Don t use Firebird embedded but install Firebird server and configure the clients to connect to Firebird server .", "You will need to upgrade your database by backing it up with Firebird 2.5 + Firebird 2.5 gbak and restoring it under Firebird 3 + Firebird 3 gbak .", "This is a Firebird database .", "The problem is that you are connecting to database with Firebird server and Firebird embeeded .", "You need a running Firebird server in order to access your database .", "Its Firebird SQL", "For example db or xxx and Firebird will open it .", "The reason for this is that the database is open shared so all Firebird embedded instances and a running Firebird service - if any - need to share the same lockfiles otherwise this could corrupt the database if it is open by more than one process .", "Firebird is the database", "fdb is standart for Firebird database files .", "I m running Firebird 2.5.1 on Windows 7 .", "NOTE : Running firebird 2.1", "I belive there is no system tables or etc in Firebird single sql file .", "Firebird-embedded is the database of choice .", "Does this happen if you connect to a Firebird server instead of using Firebird embedded", "Starting with Firebird 2.5 Firebird Embedded on Windows behaves like the SuperClassic server model which means it uses shared access to the database files and that the same database can be accessed by multiple Firebird Embedded applications and Firebird servers in the Classic or SuperClassic server model but not SuperServer if they are running on the same machine .", "I m running this project in a Windows 7 with WAMP and Firebird server installed .", "However the database you are connecting to must be a Firebird database .", "Firebird is a client-server system - it has server part fbserver.exe or fb inet server.exe and client part fbclient.dll .", "Firebird 2.5 server is running on my Computer .", "This question is about Firebird not about SQL Server your query will work on Firebird 3 if the at start of the WITH clause is removed .", "is this SQL valid for Firebird", "Installing Firebird on Windows : The Windows Firebird Installer is mostly a click-through thing .", "I can connect to it using the Linux Firebird client but what are these tables :", "Unable to Access Embedded Firebird Database Server with .Net Client .. . .. . I aim to develop a program which uses the Embedded Firebird Server but face errors when trying to make a connection using the .Net client .", "In this case The Server computer is very powerful multi-processor and more than 16GB of RAM and DataBase Management system is FireBird 2.5 .", "I have firebird database .", "Using Firebird embedded is - probably - not the default as most people use Firebird server .", "Firebird supports most SQL standards .", "This means that any Firebird client version can talk to any Firebird version .", "The fbembed.dll library for Firebird Embedded is specific to Windows and cannot be loaded on linux .", "And in the case of Firebird hey it s FREE .", "I am looking some free tool to database-migration from Firebird 2.5 to SQL Server 2012 .", "@TuralGulmammadov I think Mariuz meant that the node-firebird driver is an implementation of the Firebird wire protocol while the firebird driver uses the Firebird native client library .", "You get this error : .. . .. . unsupported on-disk structure for file D : FIREBIRD-TEST test.FDB found 11.2 support 12.0 .. . .. . This means that you try to open a Firebird 2.5 database ODS 11.2 on Firebird 3 .", "I try reinstall firebird ddex firebird client and delete all firebird in machine.config .", "This are the server and client features : .. . .. . Server Side : .. . .. . Server Methods .. . .. . TSQLConnection .. . .. . Driver : Firebird .", "Downloaded Firebird Embedded server Firebird Embedded Server v2.5.0 http : sourceforge.net projects firebird files firebird-win32 2.5-Release Firebird-2.5.0.26074-0 Win32 embed.zip download .", "Clad Genius internally uses a Firebird SQL database cafw.fdb .", "how to run SQL files on schema created by firebird", "Firebird uses SQL as its query language .", "So anything you write in Firebird is SQL", "I have a Firebird database .", "But firebird database file extension may be any other .", "Firebird doesn t care about the extension of the database file .", "I would need to store a code in the Firebird database .", "It s problem in Firebird server .", "Install Firebird 2.5 server .", "Start the Firebird server .", "@TOndrej That changed with Firebird 2.5 on Windows on Linux embedded has always behaved as a sort of local Classic Server instance .", "Add : Old Database is a Firebird Database .", "The script was tested against a firebird 2.1 server in windows but it will work for most firebird versions and platforms .", "A Firebird database will never shrink without a backup and restore .", "Running Firebird 2.5 as a service on a local 64-bit Windows 10 machine .", "For firebird I prefer IBExpert but Database Workbench can be used for Firebird and MySQL", "Before Firebird 2.5 Firebird Embedded on Windows behaved as SuperServer meaning it required exclusive access to the database file .", "Still I can t get Firebird running on Linux with Mono haven t tried Windows yet .", "The IBPP library dynamically loads the Firebird client libraries .", "Does Firebird Database support Schema", "Firebird Database comes in several flavours .", "We are using firebird as our database .", "I am using firebird as a database .", "In Firebird 3 Firebird embedded is delivered through fbclient.dll + engine12.dll whereas Firebird 2.5 and earlier had a separate fbembed.dll .", "The original application use Firebird 2.5.3.26778 Firebird 2.5 .", "destructor.de firebird-3.0 http : destructor.de firebird-3.0", "I have Firebird version 2.1 running as a database server on a Windows XP Pro machine .", "If you want to access a Firebird database from multiple hosts then you need to use a Firebird server and connect through that .", "Firebird http : en.wikipedia.org wiki Firebird 5F 28database 5Fserver 29 is the most comptible to SQL embedded database .", "We get .ydb files of firebird database from client .", "Firebird is Open source .. . .. . Do you support integration with developer studio", "BTW : If you are starting fresh with Firebird why not use Firebird 3 instead", "No .. . .. . Yes Firebird 2.1 supports database monitoring via system tables .", "I m working on c windows service that handles firebird database requests .", "Take sure that Firebird service is running and try to connect to the database .", "At Does Firebird ADO.NET 4.10.0.0 Data provider work with Firebird 3.0", "Use any Firebird management tool of your choice for that .", "Firebird does not support most of SQL queries .", "I m trying to get Firebird-embedded 2.5 64bit on Linux with firebird .net provider FirebirdSql.Data.FirebirdClient working .", "I want to make a Pricelist App that connects to a local Firebird SQL server .", "Firebird doesn t have a concept of named instances like SQL Server .", "Firebird doesn t support table variables the same way SQL Server does .", "While firebird database seems in itself very promising for an embedded database technology .", "I am using : .. . .. . Firebird ADO.NET Provider 4.6 from NuGet .. . Firebird Embedded database 2.5.3 x64 .. . .. . I actually am not sure with which version of firebird the database file was created", "i have a question about Firebird Client and Server versions .", "Install Firebird server as suggested and make sure it is started .", "I have an application using Firebird embedded server .", "However this doesn t work on embedded Firebird server .", "Connection to Firebird database : .. . .. . When I try to connect my android app to Firebird database I got following errors .", "I downloaded the lasted source from Firebird git .", "The firebird service is running and I verified this several times .", "I use IB Expert to open the Firebird .fdb database" ] }
{ "confidence": [ 63.516143798828125, 62.36558532714844, 61.012115478515625, 59.991329193115234, 59.65028381347656, 58.4119873046875, 58.136085510253906, 57.71638488769531, 56.73162841796875, 56.517642974853516, 56.25761795043945, 56.207271575927734, 56.0550537109375, 55.61748504638672, 55.59063720703125, 55.540794372558594, 55.246639251708984, 54.78441619873047, 54.77664566040039, 54.75703048706055 ], "content": [ "Question : I am trying to choose between postgre and firebird databasses . The database will be installed on a windows 2003 server with asp.net-3.5 . i don t want to use sql-server because of price issues and I don t want MySQL I had a bad experience with it and the .net connector and the membership provider . .. . Answer : I always worked with Firebird since 2005 writing application in Delphi C and ASP.NET . I never had a corrupt database in my projects . I never needed to work with another database . Why Firebird instead of PostgreSQL Because Firebird is : .. . .. . Easy to Install and Configure .. . Very stable .. . Lightweight Firebird 2.5 Download : 6 4MB Postgresql 9.0 Download : 47MB .. . OpenSource .. . Easy deployment PSQL .. . Crossplatform Win32 Win64 Linux x86 Linux AMD64 MacOS X Solaris HP-UNIX .. . No need for DBAs .. . Embedded engine .. . .. . Well . If you are using Firebird you dont need another Database . :", "Question : null .. . Answer : We re about to integrate a firebird database in our software via IBPP . Accordingly to the firebird documantation http : www.firebirdsql.org manual ufb-cs-embedded.html ufb-cs-embedded-linux this should be possible . We already managed to use the firebird database via IBPP while the service was running . But we want avoid to run a service . On windows we already accomplished to do this - but on the linux side there are two main differences : .. . .. . Installation .. . .. . On windows it is not neccessary to make an installation . On Linux it seems to be as the docs http : www.firebirdsql.org manual ufb-cs-embedded.html ufb-cs-embedded-linux say : .. . .. . Finally you can t just ship libfbembed.so with your application and use it to connect to local databases . Under Linux you always need a properly installed server be it Classic or Super . Is this true I found the firebird documentation beeing outdated sometimes . If this is still valid how to deal with this installtion Can we just run it on the customer s pc . I looked at the shell script . It starts a service . For me it seems running this service is needed during installation process . Anyway this would be no problem if the service is running only for the installtion and is never needed afterwards - but I m not sure about this . IBPP .. . .. . On windows you just load the DLL via loadlibrary : We put the fbembed.dll icuuc30.dll and icudt30.dll on any dirctory changed the passage in IBPP where the embedded dll is called to loadlibary any directory fbembed.dll and added any directory to PATH variable . Everything works now . Aside : By doing this it is possible to call the database via a DLL we created using IBPP . This DLL can be used by every EXE we give to the customer withour caring about the path the EXE is places in . But on Linux I didn t found the code where this is done . On this HOWTO http : www.firebirdfaq.org Firebird-Embedded-Linux-HOWTO.html Final directory structure it seems a special directory structure is needed . Is this really neccessary Is it possible to place the .so-files on any directory and run the application from another dirctory Is it neccessary to add loadlibary to Linux section in IBPP BTW : My problem is I can t really test things because Linux integration is doing someone else for me . Comment : On Linux with Firebird embedded you don t need to run the Firebird service but Firebird embedded needs to be installed correctly . The reason for this is that the database is open shared so all Firebird embedded instances and a running Firebird service - if any - need to share the same lockfiles otherwise this could corrupt the database if it is open by more than one process . Technically since Firebird 2.5 this is also the case on Windows but there you can get away with it because it uses a shared location based on Windows conventions .", "Question : is there any thumb of rules or step-by-step guide how to re-build firebird database in win xp I mean to change SYSDBA s password not with gsec command. . : -D regard .. . Answer : Changing the password in the firebird-embedded server enviroment doesn t make any difference as the embedded server doesn t authenticate users http : www.firebirdsql.org manual fbmetasecur-embedded.html it only uses the username . So you can always use the embedded with full privileges using username SYSDBA and random password . Anyway there is SQL user management commands http : www.firebirdsql.org file documentation reference manuals reference material html langrefupd25-security-sql-user-mgmt.html available in Firebird 2.5 which allow you to work with users without using gsec . Comment : ain - I tried to rebuild http : fossies.org unix privat Firebird-2.5.1.26351-0.tar.gz : a Firebird-2.5.1.26351-0 doc README.build.msvc.html with MSVS 2005 to change SYSDBA http : tracker.firebirdsql.org browse CORE-1933 user but I couldn t find this root yet still working . Meanwhile firebird v3 look like promising http : www.ibphoenix.fr IMG pdf Firebird 3.pdf . I love to donate firebird after this superuser resolved . I need it to convince my customers firebird is best option for their data security and budget . : -D Pardon for my English and my best regard for firebird team . : -D", "Question : I was recently looking into Firebird Embedded as a product that could replace SQLite in my project . The thing is I would like to be able to use the same compilation of my application both on Windows and Linux and unfortunately with SQLite it s not possible . Still I can t get Firebird running on Linux with Mono haven t tried Windows yet . Things I ve done : .. . .. . 1 . Installed Firebird ADO.NET Provider from NuGet . 2 . Downloaded 32-bit embedded client for Windows libraries http : www.firebirdsql.org en firebird-2-5-2-upd1 Win32 and extracted to my bin directory : fbembed.dll firebird.cfg firebird.msg ib util.dll icudt30.dll icuin30.dll icuuc30.dll . 3 . Created the connection-string with : .. . .. . string fbConnectionString String.Format ServerType 1 User SYSDBA + Password masterkey Dialect 3 Database 0 Charset UTF8 dbFile .. . FbConnection.CreateDatabase fbConnectionString .. . .. . .. . 4 . Still I get the error that fbembed.dll is not found in the path . What should I do .. . Answer : The Firebird .NET provider is primarily developed for he Windows platform . The wire protocol implementation works with Mono and under Linux so it can connect to a normal Firebird server . The fbembed.dll library for Firebird Embedded is specific to Windows and cannot be loaded on linux . The .NET provider code https : github.com cincuranet NETProvider blob master NETProvider source FirebirdSql Data Client Native FbClient.cs does have support for Linux but it looks like you need to specifically compile it for linux . I assume the NuGet package is the default version compiled with support for Windows and Embedded . Comment : That s what I feared . So SQLite it is . Thank you for the clarification . Comment : @moskalak You could add it as a feature request to tracker.firebirdsql.org browse DNET http : tracker.firebirdsql.org browse DNET Comment : This is not true . The .NET client can load libfbembed the same way as fbembed . Comment : @cincura.net How Comment : You specify the path to libfbembed.so in connection-string explicitly or you can use build for Mono Linux where the libfbembed is supposed to be default name instead of fbembed .", "Question : I know that there are many Delphi database related questions available but I m considering only these two databases . I will need to query around 100.000 records . From your experience which one is faster : .. . .. . as embedded .. . as C S .. . .. . Thanks . Comment : Difficult Question.. . i think it is more an decision of what kind of database you prefer . .. . Answer : I Haven t used Nexus tbh but I use Firebird regulary Client Server and I am absolutely loving it . It s small fast tries-to-be SQL92 compliant and the management tools are f-a-n-t-a-s-t-i-c see IBExpert they have free edition aswell .. . .. . The embedded version should be as good as the normal one . Comment : It seems for small and independant shops Firebird and Interbase are fine but most of the Database developers I talk to seem to think Interbase and Firebird are lacking in a lot of core features that anybody using MS SQL Oracle or any other big SQL database would miss . However in my own small-scale applications I ve never found one thing Interbase or Firebird won t do that I need it to do . And in the case of Firebird hey it s FREE . What a great deal .", "Question : We have Delphi XE2 . We are looking for a database for our application . We have tried Absolute Database and it supports most of SQL commands we need . I see most of Delphi users choose Firebird but it seems to hard to work with . I am so much confused about databases and licenses . Here are my problems : .. . .. . 1 . When we choose a database let s say Absolute Database Firebird MySql embedded etc . and if we have for example 3.000 customers do we still need to pay to Database developers Or is it one time fee I am so much confused because they say when we buy we can use it inside our building http : www.componentace.com order licenses.php . But when we release our software our customers will need to use the same database of course . 2 . Absolute DB is easy to install and supports most of SQL queries . Firebird does not support most of SQL queries . Is this correct 3 . When we try to use Firebird we use FlameRobin to design database . But when we try to connect using IB components it says Unable to connect database . Thank you very much.. . Comment : For Interbase Firebird I like IBExpress for admin Comment : If you work with firebird I recommend using a comercial programm like sqlmaestro.com or sqlmanager.net Comment : I suggest to you read more about Firebird . Check the Get to know Firebird in two minutes paper at firebirdnews.org page id 165 http : www.firebirdnews.org page id 165 Comment : I believe firebird is not as easy as absolute-db . am i right Comment : I think that SQL Lite http : www.sqlite.org is the most popular embedded database probably because it is free and open-source . Even iOS comes with support for SQL Lite built-in . .. . Answer : 1 . Firebird has no licensing fees at all . However it s smart to help maintain this great project once you rely on it . There is a lot of ways to help Firebird project : .. . .. . http : www.firebirdsql.org consider-your-contribution .. . .. . 2 . Not correct . Firebird is very powerful and supports most SQL standards plus a great SQL extensions for stored-procedures and triggers .. . .. . 3 . Check your database-connection string . It s usually something like server ip : full db path if you re connecting over a network or just full db path if local . You can always use an ALIAS in-place of full db path . Make sure you have Firebird server running or if using embedded if it s installed correctly . Firebird has a great and very complete documentation and one of the best support groups on open-source projects . Comment : Thank you for your answer . I don t want to use Firebird Server but embedded . So can you help me how i can set it up Because i am always getting error on Delphi at desing time . Do I need to distribute files for embedded fb Comment : You need to describe what you have done and what kind of errors you get . Maybe create a new question for that .", "Question : I am trying to choose between postgre and firebird databasses . The database will be installed on a windows 2003 server with asp.net-3.5 . i don t want to use sql-server because of price issues and I don t want MySQL I had a bad experience with it and the .net connector and the membership provider . .. . Answer : Firebird Rocks man see this link Firebird Advantages over PostgreSQL http : web.firebirdsql.org dotnetfirebird blog 2005 03 firebird-advantages-over-postgresql.html .. . .. . Mature Windows support . Firebird is supported on Windows for a very long time and it s well tested . PostgreSQL supports Windows natively since 8.0 . Still only a few months.. . .. . .. . Mature ADO.NET provider . Npqsql PostgreSQL ADO.NET provider is still in beta . Firebird ADO.NET provider supports the embedded Firebird services API backup restore statistics batch SQL execution.. . . Embedded version . Embedded version with 2 MB runtime and easy switching to a standalone server seems to be one of the biggest advantages of Firebird . Licensing . LGPL Npgsql is covered by LGPL seems to be less commercial-friendly than IPL at least it is a much less clear language . The Firebird open-source database server wins a SourceForge Community Choice Award http : web.sourceforge.com investor-news 5 sourceforge-announces-winners-fourth-annual-community-choice-awards in the Best Project for Enterprise category . Bye . Comment : I don t know how Windows 98 support is a point in favor of Firebird . Comment : That s a pretty old web page.. . PostgreSQL has had native Windows support for over four years Npqsql is out of beta and is actively developed and the LGPL isn t as bad as it s made out to be . Summary : Don t statically link LGPL ed code . Make the LPGL ed source available upon request . Don t change LPGL ed source without publishing your changes . Comment : Even ignoring the fact that link is old the advantages listed are pretty weak in my opinion to say the least .", "Question : I have a fdb file firebird from a new client he dont know the version . I have tried to use some GUI to access the database but with no luck . All of them tell that its missing gds32.dll but I have this one . I have copied this dll to the GUI folder I have copied the dll to system32 folder and I have copied to syswow64 . I am running Windows 7 64 bits and the firebird database is 32 bits . I have tried to install the dll but I cant register it . I have installed WinXP in a virtual-machine to see if it runs but nothing . The regsvr32 tells me that it is not an executable file.. . in Win 7 that this dll could be not compatible with windows version . I have tried IbExpert Personal Ibmanager and Flamerobin and they shows me the same error that the dll was not found or not installed . Could you please tell me what is wrong and if it is possible to open this firebird db I need to open this file urgently . Best Regards Marcelo . Comment : Is the application 32-bit or 64 bit how did you obtain that gds32.dll is it 32-bit or 64 bit did you install the other required files for the Firebird client as installed by the Firebird installer when you do a client installation Comment : Do you by any chance use the gds32.dll of a recent version of Interbase The APIs of Firebird and Interbase have diverged since Interbase 6 . .. . Answer : You need a running Firebird server in order to access your database . If you just want to access the data then the easiest way would be : .. . .. . 1 . Grab free FDBConvert utility http : gsbelarus.com gs fdbconvert and upgrade database to the Firebird 2.5 format .. . 2 . Install Firebird 2.5 server . Get setup from here http : www.firebirdsql.org en server-packages Win32 . Use Win32 version if your GUI tool is 32-bit application . During installation check Generate client library as GDS32DLL for legacy app support . 3 . Take sure that Firebird service is running and try to connect to the database . If the database will be accessed by an old application later on then you have to : .. . .. . 1 . Determine Firebird version needed . Use gstat -h dbname.fdb command . Check ODS version value . In the table here http : gedemin.blogspot.com 2012 08 firebird.html you will find a correspondence between ODS number and Firebird version . gstat utility is a part of server installation . 2 . Download and install appropriate version of Firebird server from here http : www.firebirdsql.org en downloads . Comment : This worked VERY well and of all of the drivers and solutions that I tried was the only one to load the database successfully . A note for users who are getting database unavailable after trying the above steps make sure that you ve started the guardian service fbguard.exe -a in the background and pre-pended the string localhost : in front of the file name for the gdb file .", "Question : We get .ydb files of firebird database from client . Currenlty we created a DSN with some additional installation drivers and then access the tables and data inside the files . We are planning to move this process to azure cloud service not azure VM so to avoid creating DSN etc . we need to access the .ydb files from c code . I could not open directly using firebird ado.net provider throwing exceptions . The below are the steps used to create DSN in the machine . It is working for long time . 1 . Firebird ODBC setup in Windows Server .. . .. . DSNName-DSNName1 .. . .. . Driver-IscDbc .. . .. . Database-E : Somefolder FileName.ydb .. . .. . Client-C : ProgramFiles Firebird Firebird2 5 WOW64 fbclient.dll .. . .. . Database Account- SYSDBA .. . .. . Password - masterkey .. . .. . Role - SYSDBA .. . .. . CharSet - None .. . .. . 2 . Then used the below C code to access the FileName.ydb using the DSN . using var connection new OdbcConnection DSN DSNName1 .. . .. . connection.Open .. . var schema connection.GetSchema Tables .. . var tableNames new List string .. . .. . .. . .. . Now to modify the above DSN creation process I added FirebirdSql.Data.FirebirdClient nuget-package in the c solution . It throws exception on fbConn.Open - Unable to complete network request to host localhost . How to open the .ydb files in C directly without creating a DSN Comment : Show us what you have so far post your code to the question . And also what error are you getting Comment : Updated the original post with more details . Please help . Comment : Do you actually have a Firebird server installed Because the driver is trying to connect to a Firebird server on localhost . If you don t want to install Firebird you will need to use the Firebird ADO.NET provider and an embedded Firebird install . Comment : Also note that ydb is not a typical suffix for Firebird databases usually it is fdb or maybe gdb . .. . Answer : The biggest problem you seem to have is that you do not have Firebird server installed or running so you can t actually connect to it and ask it to open the database file . You can download Firebird from http : www.firebirdsql.org en downloads you will probably need Firebird 2.5 and install it . Then in a project that references FirebirdSql.Data.FirebirdClient you should be able to connect with as little as : .. . .. . If for some reason you don t want to install Firebird server you will need to use Firebird embedded which can also be downloaded from the link above . You will need to make sure that your application is either running 32-bit or 64 bit and download the right Firebird embedded package . Put it in the path or in the folder of your executable . In the URL you need to add ServerType 1 to get Embedded support the default is ServerType 0 :", "Question : We have Delphi XE2 . We are looking for a database for our application . We have tried Absolute Database and it supports most of SQL commands we need . I see most of Delphi users choose Firebird but it seems to hard to work with . I am so much confused about databases and licenses . Here are my problems : .. . .. . 1 . When we choose a database let s say Absolute Database Firebird MySql embedded etc . and if we have for example 3.000 customers do we still need to pay to Database developers Or is it one time fee I am so much confused because they say when we buy we can use it inside our building http : www.componentace.com order licenses.php . But when we release our software our customers will need to use the same database of course . 2 . Absolute DB is easy to install and supports most of SQL queries . Firebird does not support most of SQL queries . Is this correct 3 . When we try to use Firebird we use FlameRobin to design database . But when we try to connect using IB components it says Unable to connect database . Thank you very much.. . Comment : For Interbase Firebird I like IBExpress for admin Comment : If you work with firebird I recommend using a comercial programm like sqlmaestro.com or sqlmanager.net Comment : I suggest to you read more about Firebird . Check the Get to know Firebird in two minutes paper at firebirdnews.org page id 165 http : www.firebirdnews.org page id 165 Comment : I believe firebird is not as easy as absolute-db . am i right Comment : I think that SQL Lite http : www.sqlite.org is the most popular embedded database probably because it is free and open-source . Even iOS comes with support for SQL Lite built-in . .. . Answer : If you ll choose Firebird then take a look at IBExpert http : www.ibexpert.net ibe index.php n Main.IBExpertFeatures . This is absolutely the best administration tool available for Firebird . But not cheap . Comment : stackoverflow.com a 722677 460775 http : stackoverflow.com a 722677 460775", "Question : I am trying to choose between postgre and firebird databasses . The database will be installed on a windows 2003 server with asp.net-3.5 . i don t want to use sql-server because of price issues and I don t want MySQL I had a bad experience with it and the .net connector and the membership provider . .. . Answer : Firebird is wonderfull solid easy to maintain install small footprint embedded version as well The only drawback : you have to do a backup and restore to eliminate deleted records physically . So for a system that has to be 24 7 365 it is a huge limitation.it is not my case so no problemo . PostgreSQL does not have that problem but I have never used it . A friend runs an entire shipping company with millions of transactions on PostgreSQL with linux servers java and he is very happy.But the maintenance is more heavy than firebird . Besides if you use delphi Firebird is better suited . Comment : FB will reuse the space used by deleted records .", "Question : I am trying to choose between postgre and firebird databasses . The database will be installed on a windows 2003 server with asp.net-3.5 . i don t want to use sql-server because of price issues and I don t want MySQL I had a bad experience with it and the .net connector and the membership provider . .. . Answer : They are both cool . However one BIG advantage for Firebird is it s .net data provider . Good mature solution vs buggy npgsql or some paid Postgres drivers . So it it mostly to chose what db you are more familiar with or what are your developement team skills . Both Postgres and Firebird are excellent databases . Comment : Postgres is good but Firebird is Great . Comment : Would you use firebird with a very large active website Comment : @luke101 - how big this website will be 1k users 1M users And how many concurent users I think the answer will be yes unless you want to build enterprise-class system . In this case I would recommend Oracle note : Firebird has some Oracle emulation . Comment : I am hoping it will be the size of Yahoo Answers Comment : So you would better start with Oracle there is a free scaled down version or design your database in such a manner that during upgrade to big database you will be able to switch smoothly .", "Question : I am using an application that apparently uses the firebird as database . I believe this because in the app directory I found the files firebird.conf and firebird.msg . The data file is called database.cdb . I m trying to access this file directly without going through the application . Can anyone suggest me a good way to do this I m trying to use the squirrel-sql but so far without success I m not able to build a proper connection-string . I m using a windows SO . I checked services process and wasn t able to find anyone that suggests that firebird is running . TIA .. . .. . Bob Comment : is this java then Please tag appropriately .. . Answer : Install Firebird server as suggested and make sure it is started . Then you could try EMS SQL Manager for InterBase Firebird Freeware http : www.sqlmanager.net products ibfb manager that has a nice GUI and it can list browse edit all the tables procedure triggers etc that the database may contain . In EMS first register a host localhost - push the Detect Automatically button to detect the Firebird server previously installed . For the connection settings the default username is SYSDBA password masterkey for the Firebird server . Next step register the database by providing the path to it .", "Question : My application at present uses Microsoft Access but now may be hosted on Linux boxes . Additionally while being accessed from multiple computers one of these may update the records when its being read by other users . I also require that the embedded database should support complex SQL queries - like inner SQL Joins etc . I tried SQLite http : en.wikipedia.org wiki SQLite but many of the existing queries fail or need to be fixed like in a simple query using inner-join the brackets after FROM was not acceptable to SQLite and had to be removed . Right join too is not supported . I came to know about Apache Derby http : en.wikipedia.org wiki Apache 5FDerby and H2 http : en.wikipedia.org wiki H2 5F 28DBMS 29 but would first prefer your valuable opinion . Edit : .. . .. . I forgot to mention that my application is entirely written in Java . Edit : .. . .. . At preset I use Microsoft Access mdb shared on network-drive making DSN-less connection from remote computers . Update .. . .. . I did trials with Firebird and it really does seem very good zero admin and SQL compliant . It is fast and I had no problems in any of the typical queries I could try on it . I am very satisfied with it and hopefully will use it for the project for which I raised this question . Hopefully Advantage Server too will be good but could not get time to review it . After reviewing using Firebird do not feel any need to try anything else . Comment : According to HSqlDb http : hsqldb.org doc guide sqlgeneral-chapt.html sgc standards they support the widest range of SQL standard features among all open-source RDBMS . .. . Answer : I think it s Firebird http : www.firebirdsql.org . Even Cte s http : www.firebirdsql.org rlsnotesh rlsnotes210.html rnfb210-cte are supported in Firebird 2.1 Firebird works on Windows Linux Mac OS.. . .. . .. . Jaybird http : www.firebirdsql.org index.php op devel sub jdbc driver for Java . There are some good migration tools from Access to Firebird : .. . .. . IBDatapump http : www.clevercomponents.com products datapump ibdatapump.asp .. . Microsoft Access to Firebird database converter MDB2FDB http : www.firebase.com.br fb downloads.php categ 8 Comment : Thanks for reminding about Firebird . Looks good . However many reviews comparisons mention that inspite of being a mature database most of the firebird developer tools are third-party commercial products . Comment : - IBExpert www.ibExpert.com have personal edition - Database Workbench www.upscene.com have personal edition too You can also use FlameRobin www.flamerobin.org Comment : For the database to be accessed connected from multiple computers and to update from the system its hosted - it seems it will require to be setup up in non-embedded that is server mode . Will this require quite some administration Actually I was looking for embedded databases because of their zero administration simplicity . Comment : @vikramsjn : even in server mode Firebird is in most of case zero administration . Comment : I ll second the on the zero admin . We use Firebird in non embeded mode as a background database . We have had it running for years without anyone touching it in hundreds of installations .", "Question : I am using an application that apparently uses the firebird as database . I believe this because in the app directory I found the files firebird.conf and firebird.msg . The data file is called database.cdb . I m trying to access this file directly without going through the application . Can anyone suggest me a good way to do this I m trying to use the squirrel-sql but so far without success I m not able to build a proper connection-string . I m using a windows SO . I checked services process and wasn t able to find anyone that suggests that firebird is running . TIA .. . .. . Bob Comment : is this java then Please tag appropriately .. . Answer : You will need to install a Firebird Server http : www.firebirdsql.org en server-packages and then use a Firebird admin tool like Flame Robin http : www.flamerobin.org to access the database . You need to make sure that the application is not running because most likely it is using Firebird embedded which means that database server is running as part of the application and the database file will then be opened exclusively by the application .", "Question : I have next specific situation . I have an application using Firebird embedded server . The files : application executive database fbembed.dll are located in the same folder . Everything is good and working good . Now my client says so : .. . .. . I would like to place all your application file on a server and run it via local network from all workstations . So as I see I start application on the server and it starts . But database-connection string looks now like : .. . .. . SERVER share db.fdb .. . .. . Yes I know conventions about allowed firebird paths from here : FAQ : What s a connection-string http : www.firebirdfaq.org faq260 .. . .. . I do not understand what should I use with embedded server Is it possible at all Comment : AFAIK embedded Firebird is not designed for anything else than single user mode using it from a shared directory by multiple clients simultaneously will most probably lead to some unexpected results . Comment : Ok Thanks . You can make you answer as a post . I will check it . Comment : @TOndrej That changed with Firebird 2.5 on Windows on Linux embedded has always behaved as a sort of local Classic Server instance . But that still only means shared database on a local machine not across the network . Comment : Thanks for clarification @MarkRotteveel . .. . Answer : If you want to access a Firebird database over the network then you need to install Firebird server and connect through the server . You can t at least not by default access a database from a network path and you really shouldn t although there is a config option to allow it as it can lead to database corruption due to insufficient or incorrect filelocking support over the network . So : Don t use Firebird embedded but install Firebird server and configure the clients to connect to Firebird server .", "Question : There s a database engine that looks amazing for a free tool and that is Scimore http : www.scimore.com . Have you had much experience with it If so how does it rate..particularly against Firebird How resilient self reliant is it Meaning how much downtime maintenance is expected The scale out capabilities also look very interesting . I just downloaded it and have been playing around and so far it looks good . I had been looking for an easy to deploy single-user type embedded database which Scimore has an option and was toying with MS SQL Compact Edition and SQLite and remembered this database from a trial a few years ago . Windows platform .. . .. . I was about ready to settle in on SQLite but started thinking about other projects which are multi-user and wanted to stick with a single solution...which is why I started looking at Firebird as well . Comment : I m interested to know if you actually choose Scimore and if so what are you experiences so far Comment : I did not end up sticking with Scimore . It seemed fast and stable but I went with more established options .. . Answer : FAQ http : www.scimore.com support faq.aspx is a quite nice start .. . .. . Can I get access to the source code ScimoreDB Yes sign a support contract . Firebird is Open source .. . .. . Do you support integration with developer studio ScimoreDB No . We are working on both Linq and DDEX functionality . There is yet no release date .. . .. . Firebird have . Linux do you have a linux version ScimoreDB Almost . Using Wine we almost got there but unfortunately the library seems to have some bugs for async socket and disc access . Firebird have", "Question : My application at present uses Microsoft Access but now may be hosted on Linux boxes . Additionally while being accessed from multiple computers one of these may update the records when its being read by other users . I also require that the embedded database should support complex SQL queries - like inner SQL Joins etc . I tried SQLite http : en.wikipedia.org wiki SQLite but many of the existing queries fail or need to be fixed like in a simple query using inner-join the brackets after FROM was not acceptable to SQLite and had to be removed . Right join too is not supported . I came to know about Apache Derby http : en.wikipedia.org wiki Apache 5FDerby and H2 http : en.wikipedia.org wiki H2 5F 28DBMS 29 but would first prefer your valuable opinion . Edit : .. . .. . I forgot to mention that my application is entirely written in Java . Edit : .. . .. . At preset I use Microsoft Access mdb shared on network-drive making DSN-less connection from remote computers . Update .. . .. . I did trials with Firebird and it really does seem very good zero admin and SQL compliant . It is fast and I had no problems in any of the typical queries I could try on it . I am very satisfied with it and hopefully will use it for the project for which I raised this question . Hopefully Advantage Server too will be good but could not get time to review it . After reviewing using Firebird do not feel any need to try anything else . Comment : According to HSqlDb http : hsqldb.org doc guide sqlgeneral-chapt.html sgc standards they support the widest range of SQL standard features among all open-source RDBMS . .. . Answer : This might be helpful in your research : Comparison of relational-database management systems http : en.wikipedia.org wiki Comparison 5Fof 5Frelational 5Fdatabase 5Fmanagement 5Fsystems . I personally would suggest taking a serious look at Firebird . It is cross-platform has a native .NET provider http : www.firebirdsql.org index.php op files id netprovider and supports the joins you mention .", "Question : I am using Firebird SQL below command used for connecting database through Firebird SQL . In newdb.db file Schema data are dumped from SQLite . Here newdb.db has read-write permission . But it is showing the error of not a valid username and password . Statement failed SQLCODE -902 Comment : Try googling that SQLCODE and tell us what it means . Comment : SQLCODE 0 execution was not successful . @J.Chomel Comment : kv You must show more research effort please . But thanks for editing . Comment : After doing some research I found that with file-extension of .fdb .gdb are used for firebirdSQL . But for file extension like .db are not used by firebirdSQL . I am curious to know if this is possible . If yes It would help for my project . Comment : gdb is standart for Interbase files . fdb is standart for Firebird database files . But firebird database file extension may be any other . For example db or xxx and Firebird will open it . .. . Answer : Firebird doesn t care about the extension of the database file . fdb is standard and gdb is historical but it could be anything . However the database you are connecting to must be a Firebird database . You can t just open a database file from a different database system eg SQLite . Your problem is one of authentication : you are trying to authenticate without a username + password combination and if you haven t set the appropriate environment-variables it means Firebird tries to authenticate with an empty user and password which doesn t exist for your Firebird install . In general you also get this error if you use a username and password that is not known to Firebird . But even if you fix the authentication problem you would immediately get a different error : invalid database or similar because the file is not a Firebird database . Comment : Hey thanks It was helpful . Comment : @kvk30 You re welcome Comment : How can I reset SYSDBA for firebird . I don t know the password SYSDBA . Comment : @kvk30 Tip : you could have asked this as a separate question . The default password is masterkey or for Firebird 2.5 and earlier : actually masterke . If you don t know the sysdba password you can either reset it with a different user with the RDB ADMIN role 2.5+ or you need to replace the security database security2.fdb for 2.x security3.fdb for 3.x with one from a clean Firebird install where it has the default password or from a Firebird install where you know the password . Comment : done please check the question :", "Question : I have firebird 1.5 super server installed on my windows-7 machine . I am unable to use the Gsec utility to change the sysdba password for the default user . The firebird service is running and I verified this several times . When running gsec from a command-prompt i receive this error unavailable database unable to open database .. . .. . The command i am using is the following gsec -user sysdba -pass masterkey -mo sysdba -pw whatever .. . .. . Using a gui admin tool i am able to change the password without issue and it apears to only be an issue when I try to run gsec directly . I appreciate any advice . Comment : Why you still use Firebird 1.5 .. . Answer : My NEW advice is to upgrade to firebird 2.1.4 . I was able to solve my problem by running the firebird guardian as administrator . The following GSEC command then works : gsec -database localhost : E : tools firebird2 security2.fdb -user sysdba -pass masterkey -mo sysdba -pw newpass .. . .. . My firebird is installed in E : tools firebird2 and newpass is the new passowrd . Maybe running the guardian as administrator will work for 1.5 also . So Uncle Bill is back in my good books but I ll never forgive him for the evil that is the windows registry : -" ] }
[ "yes-answer-long" ]
cross-platform
UNK_RELATION
intel-edison@intel@134
intel-edison -- intel-edison is an electronics prototyping platform equipped with a micro controller intel quark and a dual core cpu @placeholder atom plus ble and wifi aimed for product prototyping of iot connected type of devices .
{ "confidence": [ 82.54893493652344, 74.8466796875, 74.8466796875, 72.48841857910156, 72.17527770996094, 72.17527770996094, 72.17527770996094, 69.92060089111328, 69.92060089111328, 69.42316436767578, 68.658447265625, 67.71931457519531, 67.71931457519531, 67.71931457519531, 67.71931457519531, 67.2757568359375, 66.87203979492188, 66.38773345947266, 65.83810424804688, 65.83810424804688, 65.83810424804688, 65.0713882446289, 63.71790313720703, 63.58341979980469, 63.58341979980469, 63.58341979980469, 63.58341979980469, 63.58341979980469, 62.00043487548828, 60.93549346923828, 60.60589599609375, 59.71411895751953, 59.35688781738281, 59.18316650390625, 59.18316650390625, 59.18316650390625, 57.31403350830078, 57.30195617675781, 57.30195617675781, 57.30195617675781, 57.30195617675781, 55.880584716796875, 55.55584716796875, 55.047279357910156, 55.047279357910156, 55.047279357910156, 55.047279357910156, 55.047279357910156, 55.047279357910156, 55.047279357910156, 55.047279357910156, 54.45232391357422, 53.9588623046875, 53.9588623046875, 52.164825439453125, 52.07765197753906, 52.07765197753906, 51.77794647216797, 50.667633056640625, 49.822975158691406, 49.822975158691406, 48.10745620727539, 47.91643524169922, 46.84700012207031, 46.554832458496094, 46.554832458496094, 46.22624588012695, 46.104515075683594, 44.241310119628906, 43.97156524658203, 43.97156524658203, 43.97156524658203, 43.834327697753906, 43.361534118652344, 43.361534118652344, 42.818199157714844, 42.50739288330078, 42.41893768310547, 41.98663330078125, 41.75459289550781, 41.75459289550781, 41.480323791503906, 41.480323791503906, 41.480323791503906, 41.480323791503906, 41.097434997558594, 41.086360931396484, 40.8125, 39.873382568359375, 39.77409362792969 ], "content": [ "node hello.js 1450662623651 Device s Intel Edison 1450662623667 Connected Intel Edison 1450662623692 Repl Initialized", "I had already tried that with the following result : The Intel Edison is not connected .", "Make sure your Intel Edison is set up and connected", "I will list key features of both .. . .. . Galileo .. . .. . CPU : Intel Quark X1000 400 MHz .. . RAM : 256 MB .. . Storage : Micro SD Card .. . .. . Edison .. . .. . CPU : A dual core dual threaded Intel ATOM x86 CPU running at 500 MHz and a 32-bit Intel Quark Micro-controller running at 100 MHz .", "I have configured temperature sensor with intel-edison .", "I am new to intel-edison and python .", "I am using an Intel Edison with the Kit for Arduino .", "Intel Edison uses systemd for handling services .", "It is not a web project it is to be run on an Intel Edison board .", "The IoT devkit is solution comprised of various hardware and software options to create IoT projects using Intel s maker boards such as Intel Edison and Intel Galileo .", "I m trying to let my Android application communicate with Intel Edison over Bluetooth and configure wifi network of Edison on the android phone .", "So my question is how to install a .rpm file on an Intel Edison", "It works perfectly on Ubuntu with the same file but on the Intel Edison nothing is happening .", "The current setup is : -Intel Edison mounted on Arduino breakout board .", "I am currently working on a little robot based upon an Intel Edison .", "I am building a Yocto image for Intel Edison .", "As sketch link below I need help to do a websocket to control two DC motors in intel EDISON connected to a i2c driver which in turn is connected to the intel Edison .", "Intel R Edison is a product-ready general-purpose compute platform optimized to enable rapid innovation and product development.Intel Edison is ideal for small form factor devices that require a powerful computing system .", "I m trying out pyaudio on Intel Edison board but it fails with the build-in tests .", "Is there a way to start a program on an Intel Edison using a program on the Host PC .", "Here is the output with -vvv : .. . .. . I m running Debian on an Intel Edison .", "I have a new Intel Edison connected to the Arduino breakout board and it is unable to boot .", "But I cannot clearly understand what is the difference between Intel Galileo and Intel Edison", "I m cross-compiling ffmpeg for the Intel Edison using the poky linux sdk .", "I m beginner with Intel Edison and Linux all I know that the OS is Yocto .", "After that I used WinSCP to explorer my Intel Edison files .", "However it returns following error on Ubilinux on intel-edison Arduino .", "The problem is sending data from my Intel Edison module .", "I was given a Intel Edison with an integrated WiFi board to mess around with and read some tweets .", "I m trying to adapt it so that I can write from the Intel Edison to the connected device Nexus 5 in this case .", "I have successfully paired the devices Intel Edison comes with a Yocto distribution that has the BlueZ stack already installed .", "Edison is dual core atom I would suggest you to put CentOS on it and then try to install a rpm on it .", "Summary .. . .. . Edison is way more powerful in terms of CPU ATOM vs Quark and RAM .", "I have flashed edison board using intel phone lite tool with release 2.1 Yocto .", "Does anybody know how to extract a cpio file on the Intel Edison running on a yocto kernel", "I just bought a new Intel Edison and flashed the newest Yocto 3.0 image .", "I recently bought an intel-edison with the grove starter kit plus I tried to blink the led two led a t the same time. . iT works perfectly .", "I m running Debian on my Intel Edison and attempting to capture video through a USB webcam using ffmpeg .", "I m starting with Intel Edison but I m having some problems and I think that don t have a lot of material on web .", "Can someone help me to use my Intel Edison via Arduino IDE", "I have configured the port and choosen Intel Edison on Arduino IDE .. . .. . I appreciate any help .", "i am trying to upload my intel-edison arduino breakout data to MSSQL server through wifi but i failed to do so.Can someone help", "I can identify my Arduino Uno board is transmitting data from XBee S2 by seeing the tx LED but I am not clear how to receive data on the Intel Edison https : en.wikipedia.org wiki Intel Edison Arduino setup board XBee S2 is also connected to the Intel Edison board .", "Is it possible to use the MCU on the Intel Edison without having the standard Yocto Linux installed", "As there is no rc.local file in Intel Edison how do I run a command in a .sh file during startup", "Conclusion .. . .. . .. . Difference between Galileo and Edison is 1 year of more research and technological advances by Intel .", "Intel Edison with breakout board http : i.stack.imgur.com 4D7sn.jpg .. . .. . The documentation for Python s mraa package was a bit thin on example code .", "First side : intel Edison I2C DRIVER with python or C++library 2 motors BLUEMIX with node-RED and websocket .", "Reason for this : .. . .. . Intel Edison has older Git version installed which doesn t support submodules .", "I use Intel edison with Adrunio breakout board which is configured as usb host .", "I want to send data from my Intel Edison module to my Android app .", "You can look into this article data sharing on Intel Edison https : software.intel.com en-us blogs 2015 05 05 efficient-data-sharing-using-interrupts-on-intel-edison which explains data sharing between NodeJs and Arduino .", "I have a working example and an article here https : software.intel.com en-us articles internet-of-things-a-plant-monitor-on-the-intel-edison-board", "I can run any sketch using the intel XDK so I know that my edison is working but nothing works through node.js command-prompt .", "A sample C code for DHT11 with Intel Edison is there in one of the links you already shared http : www.i-programmer.info programming hardware 9200-exploring-edison-bit-banging-the-dht11dht22-.html start 2 .", "My Intel Edison board is stuck in the emergency mode loop it doesn t accept my root password and Ctrl-D just print this message again and again .", "I ve been trying to run simple scripts on my Intel Edison to try the different Grove Seeed Studio sensors and cannot manage to make them work .", "But I have no idea on how to configure wifi network of Edison on my android", "Is this a setup problem of the Edison", "I am not clear how the Arduino shield board for Intel Edison is supporting UART to Tx Rx data through XBee S2 .", "I am using a USB Webcam attached to an Intel Edison Arduino board running Edi-Cam application to monitor to do security monitoring .", "This is the sample code from Intel for running an accelerometer Grove digital : .. . .. . It builds and uploads to the Edison Arduino board but when running it throws this error : .. . .. . Any thoughts as to what s wrong there", "Also Intel Atom CPU is available on many laptops I m sure most languages can compile to the appropriate machine code no", "It includes a set of I O and Sensor libraries specifically libmraa https : github.com intel-iot-devkit mraa and upm https : github.com intel-iot-devkit upm currently available for C C++ Python and JavaScript .", "I tried on my Edison and had no problem .", "Yes the Git on Edison might be a light weight version .", "I m using the Intel Edison for a project but the code to introduce new lcds in arduino is as follows : .. . .. . rgb lcd lcd .. . .. . I am not capable of picking which grove shield plug I d like when using multiple lcds .", "Good day .. . .. . I ve been trying to get the BLE-Peripheral template working on the Intel Edison using the Intel XDK but I ve hit a few snags : .. . .. . After I upload and run the application and connect to the device it responds as expected console output below : .. . .. . bleno - ble peripheral .. . on - stateChange : poweredOn .. . on - advertisingStart : success .. . Characterisitic s value : Hello World from Edison", "This is the sample code from Intel for running a barometer .", "I m trying to create an DHT11-based temperature humidity sensor http : www.micropik.com PDF dht11.pdf with Intel Edison and mraa via Python http : iotdk.intel.com docs master mraa python : .. . .. .", "I stumbled across some more specific instructions http : www.uugear.com portfolio dht11-humidity-temperature-sensor-module to decode the bytes but undfortunately the code examples were specific to the Raspberry Pi and I m working with Intel Edison .", "The initial thought was to make a standard image for each device and I set out attempting to install docker on an UDOO Quad and an Intel Edison to start but without any success up to this point .", "When i try using git-submodules and type the usual command git submodule on my Intel Edison running Yocto Linux and git 2.0.1 I just get the following error message : .. . .. . System version is : .. . .. . No tracks of that error on google .", "I have not downloaded any new packages for the Edison could this help the problem", "I am now sure the Edison has a physical problem .", "I tried to update the lib opkg npm upm...or other missing modules but nothing here is the code : .. . .. . .. . var Cylon require cylon .. . .. . function writeToScreen screen message .. . screen.setCursor 0 0 .. . screen.write message .. . .. . .. . Cylon .. . .robot name : LCD .. . .connection edison adaptor : intel-iot .. . .device screen driver : upm-jhd1313m1 connection : edison .. . .on ready function my .. . writeToScreen my.screen Ready", "I am using the cross compile environemt from the Intel Site https : software.intel.com en-us iot hardware edison downloads and have successfully compiled several other libraries using it libsndfile alsa fftw but when I try to compile portaudio it refuses to link-to the proper directories .", "The edison has a built-in microcontroller but no SPI implemented yet .", "I work at Intel and may be able to help .", "I have been trying to run my hello-worlds.js file on my intel Edison shown below : .. . .. . I have installed Node.js I also used npm-install galileo-io johnny-five and downloaded files to my file directory of folder my-robotics-project .", "Hi I am new to Linux and I am trying to install a .rpm file on an Intel Edison but I can t find a way to install it I have tried : .. . .. . With this command I get the error Failed dependencies : bin bash is needed bin sh is needed and some more both of thise files exist .", "Are you trying to access files when on serial console to edison", "the edison is has 2 i2c buses-- except if you re using the arduino board .", "Before your run the i2cdetect you need to config these gpio pins for Edison :", "How do you want the host PC to communicate with the Edison", "I m trying to install opencv on Intel Edison s linux os .", "While it was easy to send commands from Edison to Arduino the direction from Arduino to Edison seems to be a big problem .", "make sure you are connected to the internet though so ping a server like twitter.com from your edison to test .", "I receive those error messages they are in portuguese : .. . .. . Arduino : 1.6.6 Windows 8.1 Placa : Intel Edison .. . .. . Aviso : platform.txt do n cleo 0 cont m algo depreciado recipe.ar.pattern compiler.path compiler.ar.cmd compiler.ar.flags build.path archive file object file automaticamente convertido para recipe.ar.pattern compiler.path compiler.ar.cmd compiler.ar.flags archive file path object file .", "FirstCharacteristic - onReadRequest : value Hello World from Edison" ] }
{ "confidence": [ 131.4685516357422, 95.2428207397461, 94.41291809082031, 93.25886535644531, 86.46802520751953, 86.09898376464844, 84.90634155273438, 84.28498840332031, 84.1017074584961, 82.87287139892578, 82.19544982910156, 81.56446075439453, 80.16204071044922, 79.92324829101562, 76.6617202758789, 75.43177032470703, 74.97297668457031, 74.63837432861328, 73.79835510253906, 73.47614288330078 ], "content": [ "Question : I am quite new to the Internet of Things . I checked the Intel website and went through a few other links too . But I cannot clearly understand what is the difference between Intel Galileo and Intel Edison And which one should be used when Does anyone know of a good resource for reference Comment : Stack Overflow is a site for programming and development questions . This question appears to be off-topic because it is not about programming or development . See What topics can I ask about here http : stackoverflow.com help on-topic in the Help Center . Perhaps Super User http : superuser.com or Unix Linux Stack Exchange http : unix.stackexchange.com would be a better place to ask . Also see Where do I post questions about Dev Ops http : meta.stackexchange.com q 134306 . .. . Answer : I will list key features of both .. . .. . Galileo .. . .. . CPU : Intel Quark X1000 400 MHz .. . RAM : 256 MB .. . Storage : Micro SD Card .. . .. . Edison .. . .. . CPU : A dual core dual threaded Intel ATOM x86 CPU running at 500 MHz and a 32-bit Intel Quark Micro-controller running at 100 MHz . RAM : 1 GB .. . Storage : 4 GB ROM + micro SD card on Arduino board .. . Communication : Wi-Fi and Bluetooth LE . Summary .. . .. . Edison is way more powerful in terms of CPU ATOM vs Quark and RAM . Edison is more flexible like while making prototype you can use it with Arduino board and while deploying you can use it with smaller breakout board required for your application . Almost all things that can be done using Galileo can be done better using Edison in very smaller form factor correct me if i am wrong . Conclusion .. . .. . .. . Difference between Galileo and Edison is 1 year of more research and technological advances by Intel .", "Question : I have a new Intel Edison connected to the Arduino breakout board and it is unable to boot . I have never seen it boot ever . I have tried connecting it with different settings to discard a problem at cable level or power input . The current setup is : -Intel Edison mounted on Arduino breakout board . -Power cable connected to Powered USB Hub or to wall adapter . -Console cable connected directly to computer USB port . When monitoring the boot process with a terminal app the only output is : .. . .. . .. . .. . PSH KERNEL VERSION : b0182727 .. . .. . ..WR : 20104000 .. . .. . .. . .. . SCU IPC : 0x800000d0 0xfffce92c .. . .. . PSH miaHOB version : TNG..B0..VVBD..0000000c .. . .. . microkernel . built 23 : 15 : 13 . Apr 24 2014 . PSH loader .. . .. . PCM page cache size 192 KB .. . .. . Cache Constraint 0 Pages .. . .. . Arming IPC driver . . Adding page store pool . . .. . .. . PagestoreAddr IMR Start Address 0x04899000 .. . .. . pageStoreSize IMR Size 0x00080000 .. . .. . Ready to receive application .. . .. . After this the Edison loops every X amount of time . If I disconnect and reconnect power the exact result is obtained . I have also tried to boot from OsX Debian Linux with no results . When running the flashall.sh scripts the device is never found . I have tried everything I have found online and have run out of ideas.. . Comment : I would try flashing with the dev kit installer instead if you haven t tried that yet for Mac : downloadmirror.intel.com 25384 eng https : downloadmirror.intel.com 25384 eng m iot dev kit 2015.0.026.tar.gz and if you want another OS : software.intel.com en-us iot hardware edison downloads https : software.intel.com en-us iot hardware edison downloads Comment : I had already tried that with the following result : The Intel Edison is not connected . Make sure your Intel Edison is set up and connected Comment : And both USB cables are connected Comment : Yes . Both cables are connected . Comment : I have actually tried every type of cable . .. . Answer : I am now sure the Edison has a physical problem . I tried with a new one and was able to boot it up without any trouble . I already talked to the company I bought it from and they will be doing a refund .", "Question : As sketch link below I need help to do a websocket to control two DC motors in intel EDISON connected to a i2c driver which in turn is connected to the intel Edison . First side : intel Edison I2C DRIVER with python or C++library 2 motors BLUEMIX with node-RED and websocket . Second side : BLUEMIX and android with SDK . enter link description here https : drive.google.com file d 0B9gPdWq4OH-XbDJTdjUzM3pHdEk view pli 1 .. . .. . Can anyone write about ideas tutorial .. . Answer : Not sure what you re asking but if you are asking how you can gather data from your Edison into Bluemix than I can think of two things : .. . .. . 1 . Install Node-RED in your Edison and use node-red-gpio to communicate to the I2C interface and then send the data to an MQTT perhaps IBM IoT Foundation or any other MQTT and then the app in Bluemix can read that MQTT topic . 2 . Gather your data with your own scripts and connect your Edison directly to IBM IoT Foundation using a recipe https : developer.ibm.com recipes", "Question : Hi I am new to Linux and I am trying to install a .rpm file on an Intel Edison but I can t find a way to install it I have tried : .. . .. . With this command I get the error Failed dependencies : bin bash is needed bin sh is needed and some more both of thise files exist . This is also the result with all other commands that tries to install the file . further information the Linux is based on Yocto and from what I understand there is no command like apt-get . So my question is how to install a .rpm file on an Intel Edison .. . Answer : Edison is dual core atom I would suggest you to put CentOS on it and then try to install a rpm on it . Comment : The cores are indeed Atom Silvermonts but the rest is still typical embedded hardware : it won t work with a vanilla kernel and one doesn t just put CentOS on it I m sure it can be done but it s going to be quite a bit more involved than a normal install .", "Question : null .. . Answer : I m trying to let my Android application communicate with Intel Edison over Bluetooth and configure wifi network of Edison on the android phone . Just like this https : www.youtube.com watch v Cizn7NRGNDc . I know the procedure for Bluetooth pairing and sending receiving data . But I have no idea on how to configure wifi network of Edison on my android Any help would be much appreciated . Thanks", "Question : I am quite new to the Internet of Things . I checked the Intel website and went through a few other links too . But I cannot clearly understand what is the difference between Intel Galileo and Intel Edison And which one should be used when Does anyone know of a good resource for reference Comment : Stack Overflow is a site for programming and development questions . This question appears to be off-topic because it is not about programming or development . See What topics can I ask about here http : stackoverflow.com help on-topic in the Help Center . Perhaps Super User http : superuser.com or Unix Linux Stack Exchange http : unix.stackexchange.com would be a better place to ask . Also see Where do I post questions about Dev Ops http : meta.stackexchange.com q 134306 . .. . Answer : I work at Intel and may be able to help . Intel R Edison is a product-ready general-purpose compute platform optimized to enable rapid innovation and product development.Intel Edison is ideal for small form factor devices that require a powerful computing system . Some good use cases are robots and quadcopters 3D fabrication machines remote asset monitoring and audio processing . Intel R Galileo is an open-source Arduino-compatible platform that enables educators students and makers of all skill levels to quickly and easily engage in projects . It combines the simplicity of the Arduino development-environment with the performance of Intel technology and the advanced capabilities of a full Linux software stack . A really great place to learn more about both platforms is our online community at maker.intel.com . You can join the conversation find getting started guides and share your projects in our project gallery . Comment : Thanks - +1 . I was more looking for one on one compare eg : differnece between processing power OS sensors limitations memory etc . Comment : Can I use Intel R Galileo on Windows with .NetMF", "Question : null .. . Answer : I have been trying to run my hello-worlds.js file on my intel Edison shown below : .. . .. . I have installed Node.js I also used npm-install galileo-io johnny-five and downloaded files to my file directory of folder my-robotics-project . When i execute using node hello-worlds.js I get the following error : Comment : Have you considered upgrading the OS image Comment : I have flashed edison board using intel phone lite tool with release 2.1 Yocto . This is the latest image on their site I still get the same error . Comment : I also SSHed into edison and used echo src mraa-upm iotdk.intel.com repos 1.1 intelgalactic quot http : iotdk.intel.com repos 1.1 intelgalactic quot etc opkg mraa-upm.conf okpg update opkg upgrade mraa upgraded from 0.8.0 to 0.8.1 and upm from 0.4.0 to 0.4.1 . I still have the same error Comment : I tried on my Edison and had no problem . node hello.js 1450662623651 Device s Intel Edison 1450662623667 Connected Intel Edison 1450662623692 Repl Initialized Comment : I can run any sketch using the intel XDK so I know that my edison is working but nothing works through node.js command-prompt . any idea @tasasaki", "Question : null .. . Answer : I want to send data from my Intel Edison module to my Android app . I have sample code to reference to when actually receiving data in my Android app . The problem is sending data from my Intel Edison module . I have successfully paired the devices Intel Edison comes with a Yocto distribution that has the BlueZ stack already installed . I know there are two profiles available that are suited for this need OBEX and SPP . SPP is used in for this https : software.intel.com en-us articles connecting-the-intel-edison-board-to-your-android-phone-with-serial-port-profile-spp tutorial but then an existing app is used and it does not show how the module can send the signal . Now that my module and smartphone are paired how do I send data between them", "Question : This is the sample code from Intel for running an accelerometer Grove digital : .. . .. . It builds and uploads to the Edison Arduino board but when running it throws this error : .. . .. . Any thoughts as to what s wrong there The accelerometer is connected to an I2C port . Another sensor temperature is working ok . Comment : Are you sure that is the sensor type you have I believe the normal grove one that gets sent out is the mma7660 part : github.com intel-iot-devkit upm blob master examples javascript https : github.com intel-iot-devkit upm blob master examples javascript mma7660.js I m not seeing your error but I am getting bogus values when I run the adxl345 code . Comment : Also when you type configure edison --version into a serial connection what do you get I m on 159 currently . .. . Answer : The grove acceleremoter is not the ADXL345 but the MMA7660 as explained here https : communities.intel.com thread 88732 . And below is the upm code for the MMA7660", "Question : I have an Arduino Uno http : arduino.cc en Main ArduinoBoardUno board and an XBee S2 device on it . I can identify my Arduino Uno board is transmitting data from XBee S2 by seeing the tx LED but I am not clear how to receive data on the Intel Edison https : en.wikipedia.org wiki Intel Edison Arduino setup board XBee S2 is also connected to the Intel Edison board . I am not clear how the Arduino shield board for Intel Edison is supporting UART to Tx Rx data through XBee S2 . How do I actually write XBee S2 code Is it only a serial UART communication Comment : Any reference is highly appreciated . .. . Answer : I did this coding using API mode and AT mode for xbee received input to edison using canonical receive uart program .", "Question : null .. . Answer : I recently bought an intel-edison with the grove starter kit plus I tried to blink the led two led a t the same time. . iT works perfectly . But i have an error message to run a message on the LCD screen . I tried to update the lib opkg npm upm...or other missing modules but nothing here is the code : .. . .. . .. . var Cylon require cylon .. . .. . function writeToScreen screen message .. . screen.setCursor 0 0 .. . screen.write message .. . .. . .. . Cylon .. . .robot name : LCD .. . .connection edison adaptor : intel-iot .. . .device screen driver : upm-jhd1313m1 connection : edison .. . .on ready function my .. . writeToScreen my.screen Ready .. . .. . .start .. . .. . when i do node screen.js i got this error .. . .. . .. . home root node-modules cylon lib registry.js : 39 .. . throw e .. . .. . Error : home root node-modules mraa build Release mraa.node : undefined symbol : ZN2v811HandleScopeC1Ev .. . at Error native .. . at Module.load module.js : 355 : 32 .. . at Function.Module . load module.js : 310 : 12 .. . at Module.require module.js : 365 : 17 .. . at require module.js : 384 : 17 .. . at Object . anonymous home root node-modules cylon-intel-iot lib mraa.js : 5 : 18 .. . at Module . compile module.js : 460 : 26 .. . at Object.Module . extensions..js module.js : 478 : 10 .. . at Module.load module.js : 355 : 32 .. . at Function.Module . load module.js : 310 : 12 .. . .. . the LCD is plug on I2C . . Thx for your help Comment : The board Os is Yocto Linux", "Question : null .. . Answer : I was given a Intel Edison with an integrated WiFi board to mess around with and read some tweets . So far I ve downloaded the Twitter4j core .jar version 4.0.2 latest as of today and set up the Arduino-Processing communication . Every time I try to execute a query search tweets by hashtags for instance it says Error : api.twitter.com . I have verified that I am connected to the network and that the network has no proxy issues with Twitter . It stops working right after println pre query . Any ideas My Arduino sketch is as follows : .. . .. . My Processing sketch : Comment : You have left in some of your api keys . Comment : Thank you just changed it . Comment : Can you post full error Also can you share the twitter4j package version you are using . Comment : You could actually do all the processing part on the actual edison . You have Python you could use to do the twitter query and pass the data to your sketch via a udp socket for example . You ve got node.js preinstalled and there s a node.js twitter package https : www.npmjs.com package node-twitter-api and so on . Also you should look into Temboo https : www.temboo.com arduino others and their Twitter Choreo https : www.temboo.com library Library Twitter which should allow you to do the whole thing on the Arduino Quark side Comment : configure edison --wifi should be enough . make sure you are connected to the internet though so ping a server like twitter.com from your edison to test .", "Question : null .. . Answer : Good day .. . .. . I ve been trying to get the BLE-Peripheral template working on the Intel Edison using the Intel XDK but I ve hit a few snags : .. . .. . After I upload and run the application and connect to the device it responds as expected console output below : .. . .. . bleno - ble peripheral .. . on - stateChange : poweredOn .. . on - advertisingStart : success .. . Characterisitic s value : Hello World from Edison Accepted Connection with Client Address : 14 : 89 : fd : 59 : 1b : 80 .. . .. . but when I make a read request using the companion app this is what I get : .. . .. . FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison FirstCharacteristic - onReadRequest : value Hello World from Edison .. . .. . For some reason the read request is called 12 times instead of once . That s not the only error though when I try make a write request from the companion app I get an error ERROR : 6 to be precise . So far I ve looked at the logs for the edison itself the companion app and my cellphone log using logcat and the write error seems to be permission related but I can t seem to deduce why the read error occurs . Here s the link I ve been using : https : software.intel.com en-us creating-a-bluetooth-low-energy-app .. . .. . Any help is greatly appreciated PS : I haven t made any changes to the code .", "Question : I am trying to extract the content of a cpio file using the command : .. . .. . to the directory where I currently are . It works perfectly on Ubuntu with the same file but on the Intel Edison nothing is happening . There is not even an error message appear . Does anybody know how to extract a cpio file on the Intel Edison running on a yocto kernel I have not downloaded any new packages for the Edison could this help the problem .. . Answer : Are you using the GNU cpio or BusyBox Generally BusyBox features a more limited set of flags compared to its GNU equivalents .", "Question : I am using an Intel Edison with the Kit for Arduino . I have some code running in an Arduino sketch and I want to make system const char command calls to execute some linux commands in the Edison after that get the output in a string variable . Something like this : .. . .. . Is this possible at all Comment : The answer is apparently no . Well at least not directly . I would need to save the output of the command in a text file in an SD card . Then use the Arduino SD card API to read that output . .. . Answer : True it is not that straight forward as mentioned in the comment . You can look into this article data sharing on Intel Edison https : software.intel.com en-us blogs 2015 05 05 efficient-data-sharing-using-interrupts-on-intel-edison which explains data sharing between NodeJs and Arduino . You can try this approach in achieving the desired result . Comment : Thanks you . I am already using the Rx Tx pins but this should still work I hope", "Question : I m trying to create an DHT11-based temperature humidity sensor http : www.micropik.com PDF dht11.pdf with Intel Edison and mraa via Python http : iotdk.intel.com docs master mraa python : .. . .. . Intel Edison with breakout board http : i.stack.imgur.com 4D7sn.jpg .. . .. . The documentation for Python s mraa package was a bit thin on example code . There s a lookup table http : iotdk.intel.com docs master mraa edison.html to associate physical pins to mraa pin numbers . The GP44 pin on the breakout board is mraa pin 31 : .. . .. . The gp44 port was configured as an ouput port : .. . .. . When I read from the gp44 pin it returns zero : .. . .. . Looking at the C examples it seems that the DHT11 sensor returns a byte array http : www.i-programmer.info programming hardware 9200-exploring-edison-bit-banging-the-dht11dht22-.html start 2 that can be deciphered . I stumbled across some more specific instructions http : www.uugear.com portfolio dht11-humidity-temperature-sensor-module to decode the bytes but undfortunately the code examples were specific to the Raspberry Pi and I m working with Intel Edison . Ideally I d like to call methods that return temperature and humidity but a byte array would would also work since I have the decoder ring . Can you see what needs to be done in order to return the temperature humidity or byte array .. . Answer : A sample C code for DHT11 with Intel Edison is there in one of the links you already shared http : www.i-programmer.info programming hardware 9200-exploring-edison-bit-banging-the-dht11dht22-.html start 2 . One of the section The Software describes in detail how the sample program is designed to read the data . Also there is a discussion on this thread https : communities.intel.com thread 67423 on issues with DHT11 sensor or any other sensor that uses one wire with Edison or similar boards .", "Question : I have configured temperature sensor with intel-edison . I am trying to read temperature sensor values using following python code .. . .. . But this code is return always 0 as reading value . I am new to intel-edison and python . So any help will be appreciating . Thanks .. . Answer : mraa is a low-level skeleton library for I O communication . In case of a basic analog sensor it will do the job but I would recommend you to use upm instead . If it does n t work you may need to update the libraries", "Question : null .. . Answer : Is there a way to start a program on an Intel Edison using a program on the Host PC . I am trying to create a GUI on my computer which starts the program that is already uploaded on the Edison when the User presses a button Comment : How do you want the host PC to communicate with the Edison Comment : It s possible . More standard ways are a SSH for text UI and b X11 protocol for GUI .", "Question : Can someone help me to use my Intel Edison via Arduino IDE I have the latest version of Arduino IDE installed with the installer provided on Intel s website . I receive those error messages they are in portuguese : .. . .. . Arduino : 1.6.6 Windows 8.1 Placa : Intel Edison .. . .. . Aviso : platform.txt do n cleo 0 cont m algo depreciado recipe.ar.pattern compiler.path compiler.ar.cmd compiler.ar.flags build.path archive file object file automaticamente convertido para recipe.ar.pattern compiler.path compiler.ar.cmd compiler.ar.flags archive file path object file . Considere atualizar este n cleo . Aviso : platform.txt do n cleo 0 cont m algo depreciado recipe.ar.pattern compiler.path compiler.ar.cmd compiler.ar.flags build.path archive file object file automaticamente convertido para recipe.ar.pattern compiler.path compiler.ar.cmd compiler.ar.flags archive file path object file . Considere atualizar este n cleo . Placa Intel : i586 : izmir fg n o define uma prefer ncia build.board . Autoconfigurada para : I586 IZMIR FG Placa Intel : i586 : izmir fd n o define uma prefer ncia build.board . Autoconfigurada para : I586 IZMIR FD Placa Intel : i686 : izmir ec n o define uma prefer ncia build.board . Autoconfigurada para : I686 IZMIR EC exec : C : Users bruna zamith AppData Local Arduino15 packages Intel tools core2-32-poky-linux 1.6.2+1.0 pokysdk usr bin i586-poky-linux i586-poky-linux-g++ : file does not exist Erro compilando . And there are other messages like for example : .. . .. . Invalid library found C : Users bruna zamith AppData Local Arduino15 packages Intel hardware i686 1.6.2+1.0 libraries Wire : C : Users bruna zamith AppData Local Arduino15 packages Intel hardware i686 1.6.2+1.0 libraries Wire .. . .. . What can I do to compile sketchs to my Edison I have configured the port and choosen Intel Edison on Arduino IDE .. . .. . I appreciate any help . .. . Answer : The fix was suggested in https : communities.intel.com thread 93908 start 0 tstart 0 https : communities.intel.com thread 93908 start 0 tstart 0 .. . .. . Content from orignal post slightly altered .. . ZohaibArshad it should work fine in 1.6.6 . Came across that same error today what you need to do is rename the file ..... . arduino15 packages Intel hardware i686 1.6.2+1.0 libraries Wire libraries.properties to library.properties .. . .. . Here is the original thread that led me to that https : forum.arduino.cc index.php topic 362521.0 .. . .. . Hope this helps", "Question : I am trying to connect a intel Edison to IOT hub as to documentation on Azure at Git .. . .. . https : github.com Azure azure-iot-sdks blob 26e81a7a3358815bfee9553678f546ffe6f3d3ce c doc run sample on intel edison.md .. . .. . it says to .. . .. . Navigate to : cmake iothub client samples iothub client sample amqp .. . .. . and .. . .. . . iothub client samples iothub client sample amqp .. . .. . but this folder have nothing to run .. . .. . I found a .c file of it in azure-iot-sdks c iothub client samples iothub client sample amqp .. . .. . but it says I don t have permission and I try it with gcc command but it says : .. . .. . but in cmaker folder I have iothub client folder I have run .. . .. . . build proton.sh .. . .. . . build.sh .. . .. . successfully and copy libqpid-proton.so.2 to lib .. . .. . my cmaker .. . .. . root@pe3iot : cmake --version cmake version 3.4.0 .. . .. . gcc : .. . .. . root@pe3iot : gcc --version gcc GCC 4.9.1 .. . .. . have tried Updated instructions too at .. . .. . https : github.com Azure azure-iot-sdks pull 212 files short path af74a54 .. . .. . make all file changes it says but I was unable to run make -f makefile.linux with error .. . .. . make : makefile.linux : No such file or directory make : No rule to make target makefile.linux . Stop . Thanks in Advance Comment : gcc . iothub client sample amqp.cthub client samples iothub client sample amqp . iothub client sample amqp.c : 7 : 27 : fatal-error : iothub client.h : No such file or directory include iothub client.h Probably the error is here because gcc is looking for iothub client.h in your current folder but not it folder in which file being compiled is located . Try to navigate to folder containing c file first and then compile it . .. . Answer : I faced similar issue and reported the issue on azure-iot-sdks Github https : github.com Azure azure-iot-sdks issues 353 . Reason for this : .. . .. . Intel Edison has older Git version installed which doesn t support submodules . Our C SDK uses submodules for each protocol implementation and because of those submodules were not exist the build script failed .. . .. . Solution for this is to cross-compile Azure IoT SDK on Linux OS which you can refer ashokkhurana s solution on https : github.com Azure azure-iot-sdks issues 435 . Hope this helps ." ] }
[ "yes-answer-long", "yes-answer-short" ]
intel
UNK_RELATION
dot.js -- dot.js is a javascript templating function with emphasis on performance under v8 and @placeholder .
{ "confidence": [ 52.49974822998047, 47.78645706176758, 46.308143615722656, 44.97433090209961, 44.816375732421875, 44.8027458190918, 44.39165496826172, 43.7939453125, 43.541603088378906, 43.541603088378906, 43.541603088378906, 43.248069763183594, 41.87745666503906, 41.81779861450195, 41.27483367919922, 40.674217224121094, 40.30756378173828, 40.05516815185547, 40.05516815185547, 40.05516815185547, 40.05516815185547, 40.05516815185547, 39.3036003112793, 38.93695068359375, 38.331363677978516, 37.935943603515625, 37.570289611816406, 37.187782287597656, 36.986751556396484, 36.48716735839844, 36.48716735839844, 36.42670822143555, 35.81716537475586, 35.35895919799805, 35.35895919799805, 35.35895919799805, 34.47255325317383, 33.635154724121094, 33.635154724121094, 33.635154724121094, 32.49156951904297, 32.49156951904297, 31.120956420898438, 31.120956420898438, 31.120956420898438, 31.120956420898438, 30.760974884033203, 30.56361198425293, 29.97821807861328, 29.675865173339844, 29.61739158630371, 29.61739158630371, 29.61739158630371, 29.61739158630371, 28.83463478088379, 28.773406982421875, 28.246776580810547, 27.541786193847656, 27.541786193847656, 27.541786193847656, 25.465349197387695, 25.027591705322266, 24.89867401123047, 24.04672622680664, 22.001522064208984, 21.532527923583984, 20.43238067626953, 19.566064834594727, 19.566064834594727, 19.406208038330078, 19.13556480407715, 18.990894317626953, 18.553691864013672, 18.356651306152344, 18.26620864868164, 18.16758155822754, 18.11752700805664, 17.91818618774414, 17.552186965942383, 17.552186965942383, 17.481664657592773, 17.22807502746582, 17.136470794677734, 17.001375198364258, 16.985305786132812, 16.985305786132812, 16.627561569213867, 16.57453727722168, 16.394973754882812, 16.338083267211914, 16.32103729248047, 16.08449363708496, 16.01849937438965, 15.828381538391113, 15.828381538391113, 15.633657455444336, 15.633657455444336, 15.633657455444336, 15.633657455444336, 15.620360374450684 ], "content": [ "I use doT.js 1.0 for templating with requirejs .", "I was trying doT.js template engine.How to do nested if-else if in dot.js like", "Is there any way to solve this with doT.js", "Looking at the doT.js source : .. . .. . https : raw.github.com olado doT master doT.js .. . .. . What does this do", "I would rather use JSON and a Javascript-Templating engine such as doT.js http : olado.github.com doT tutorial.html intro .", "I m using doT.js for templating so I don t want to include another large library for one function .", "Is there a way to generate nested lists with doT.js", "And use it in a doT.js template like this :", "The doT.js template is an external template in my case .", "I am new to both backbone and dot.js .", "my dot.js file looks like .. . .. . Please help in this", "But doT.js doesn t seem to provide this option .", "And dot.js throws error on client browser .", "doT.js doesn t seem be handling recursion in partials .", "Problem is that inside doT.js tags I need JavaScript syntacs .", "I have been thinking doT.js or handlebars .", "I ve been able to get doT.js working with knockout as the templating-engine but i m having a big issue .", "Please help me with process to integrate doT.js template in Backbone framework .", "Please edit it to add what difficulties you encountered in using dot.js with Backbone", "currently i need to set the dot.js template as backbone view .", "I need help in integrating external dot.js file in to my backbone file .", "With dot.js template-engine how do you loop through an object", "I want to use doT.js-Templates in JetBrains PHPStorm .", "Hi I would like to know how can I render output in dot.js templating-engine .", "I use the normal doT.js on the client-side with a require-js plugin .", "I m using doT.js as template-engine and I need to use html files as partial view templates .", "Using doT.js as my templating-engine I need to print this out as .. . .. . I loop through the array of MySQL results and print out the word .", "I think the primary reason for this is that doT.js just compiles a string of html .", "You recursion code def.ul : value.children makes the doT.js library infinitely resolve replace it with the contents of your function .", "I m using doT.js http : olado.github.io doT in order to manage view templates and so on I wanted to load an external template placing it in another folder then loading it like a CSS file or a JS file is it possible to make this with doT.js", "However porting doT.js to my own solution appears to be more of a challenge than I first imagined . .. . .. . I m trying to create a simple table using doT.js to render its contents .", "The page is being rendered using the fast DoT.js templating library from a JSON object that can go about 6 levels deep .", "I m developing Eclipse editor with SWT JFace for doT.js template-engine .", "You just need to for example set your doT.js template as the View s template variable .", "Use AJAX to fetch the external files and store the response in a string which you give to doT.js .. . 2 .", "My backbone file looks like .. . .. . where-in dot.Template I am calling dotView which is present in dot.js file .", "I want to define and use a global helper function for the doT.js template-engine how can I do this", "Do I have to write a helper on the server to to detect and handle these line-breaks or is there an option in doT.js to ignore them on render", "I have a rather large JSON data set that I am parsing through using DoT.js to populate a template for display .", "I have a doT.js template looking like this : .. . .. . The br-Tag in the end should only be rendered every third time .", "From what I have observed dot.js is a constant performer with good rendering speed but is it mature enough for larger applications", "What would be the best way to being able to define events in my views and still use doT.js", "dot.js isn t yet integrated with express 4.0 s view engine middleware hook .", "It isn t quite as fast as dot.js but for me it has a great balance of speed and features with an extremely intuitive syntax .", "I have done tags highlighting content-assist with doT.js global-variables and tags .", "I m doing some frontend work using doT.js for generating content and jquery-ui for displaying tooltips .", "I m rendering server-side templates containing HTML pre and code elements using Express and doT.js which are processed and formatted by the Prism library client-side .", "questions 3561043 what-does-a-comma-do-in-javascript-expressions 3 answers .. . .. . I read a line https : github.com olado doT blob e86a9681f770bc99ef562dada4884ebb5dee8e28 doT.js L28 from doT.js https : github.com olado doT : .. . .. . After it was minified https : github.com olado doT blob e86a9681f770bc99ef562dada4884ebb5dee8e28 doT.min.js : .. . .. . So what is the 0 eval I mean what does the comma do", "Building the html string directly in JS with a recursive function is straight forward enough : http : jsfiddle.net fergal doyle WN8hZ 5 .. . .. . .. . del But with doT.js this is what I have and after that I m stumped", "I have doT.js template laying on the server so when clicking on navigation bar button - I need to fetch somehow this template and after rendering it with javascript - append it to page container .", "All I get is Internal Server Error If you were able to make file includes work on dot.js can you please share your knowledge .", "Hi I m new to node and I m trying to figure out how to compile partials from a file into a string using doT.js http : olado.github.io doT index.html .", "My thought is that I would have to define my events in a data- attribute and once doT.js is done compiling throw that html string into a detached DOM element .", "JSFiddle Example .. . .. . Here s an example of Knockout.js and doT.js working together pulled from this example http : jsperf.com knockout-template-engines 11 : .. . .. . http : jsfiddle.net eeKe7", "I don t know if it apply to you but on nodejs using expressjs and express-dot.js what I did was to define loadfile : .. . .. . in app.js .. . .. . in index.dot : .. . .. . basically it adds loadfile as a function that take a path and output a string in the def object of dotjs .", "I am trying to pass a new created object to my dot.js partial snippet like this : .. . .. . .. . try .. . var tempFn doT.template myTpl .text .. . var resultText tempFn .. . foo : this snippet .. . .. . result .html resultText .. . catch e .. . error .show .html e .. . throw e .. . .. . .. . .. . error .. . font-weight : bold .. . border : 1px solid red .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs dot 1.0.3 doT.js script .. . .. . -- Template HERE -- .. . script id myTpl type template doT.js", "@NarendraSoni I am not sure about Ejs but I know that Jade is significantly slower the doT.js which is why I first chose it .", "Looking at the source code I can see that the outputted code is minified and so far I haven t been able to find any doT.js documentation on maintaining these line-breaks to display the formatted code elements correctly .", "Assuming I have a data structure like this : .. . .. . How would I go about creating a template with doT.js that will recursively go through the object and build nested lists", "Now I am using dot.js in the web page I have a span call spanHelloword and its value is helloworld .I want to get the span value in dot temple How to do that", "I was looking for a JavaScript template-engine and chose DoT.js https : github.com olado doT mostly because it s very fast http : jsperf.com dom-vs-innerhtml-based-templating 356 but had the following issues .. . .. . Null safe Undefined safe null-coalescing Just like in Freemarker VTL I want to be able to pass foo.bar.foobar and not worry about checking foo foo.bar and foo.bar.foobar that they are defined .. . e.g .", "You can do so by using some of the advanced features of doT.js see their advanced snippets examples https : github.com olado doT blob master examples advancedsnippet.txt for other advanced use .", "Not everything in JavaScript is about performance .", "On the user side using a template system doT.js http : olado.github.io doT index.html .. . .. . The question arose in the browser to pass a line like : .. . .. . But I do not know how to make Swig not handle as part of the string variable ie not handle braces .", "If not what templating-engine will make me able to do that", "String replacement is almost enough.. . but only almost some simple evaluations is also needed.. . Like if x greater than y output a otherwise b .. . .. . I have been using doT.js for a while now which would be sufficiently simple so something that borders to the semantics of that or is more simple .", "avoid things like .. . .. . var val try var foo.bar.foobar catch val .. . .. . .. . which I feel bad about or .. . .. . typeof foo undefined typeof foo.bar undefined typeof foo.bar.foobar undefined foo.bar.foobar : foo.bar.foobar is undefined : foo.bar is undefined : foo is undefined .. . .. . .. . which I m not sure if I feel better or worse about .. . .. . I want to have good XSS protection and as fast DoT.js are by not using DOM even with the", "From what you describe the performance hit likely isn t in your JavaScript code .", "Beyond that it s hard to know if there s other javascript performance problems without knowing what the rest of your code does .", "So I m wanting to replace the Knockout http : knockoutjs.com templating-engine with doT http : olado.github.io doT for enhanced performance for my large-scale single-page app .", "I am writing project on Node.js http : nodejs.org + Express.js http : expressjs.com with templating Swig http : paularmstrong.github.io swig .", "Hi this is the perf test I have settled with. . jsperf.com dom-vs-innerhtml-based-templating 473 http : jsperf.com dom-vs-innerhtml-based-templating 473", "What do you understand by performance", "I am on a search for a javascript template-engine that has good performance when used in large js applications and is also very suitable for mobile applications .", "I think it s a generic question about nodejs templating .", "See : MDN .bind documentation https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Function bind for more information .", "With Convenient Slower performance .. . .. . Non-with Inconvenient Faster performance .. . .. . Best of both worlds .. . .. . Also note that the template function returns a compiled template if the second argument is null undefined or not given .", "I am trying out doT.js for the first time and have written a very basic server setup : .. . .. . When I run the server and goto myaddress : 8080 I get the following error : Error : ENOENT open home myproject views layout.html .. . .. . If I try calling index.html with res.sendFile it works although of course I can t pass variables that way .. . .. . Where am I going wrong", "This question already has an answer here : .. . .. . What does a comma do in JavaScript expressions", "This is generally done because with a JavaScript library framework etc its one global identifier needs to be exposed to the outside world .", "mustache.js - Logic-less mustache templates with JavaScript .", "comments : .. . .. . Does having a empty array like this impact performance negatively", "Especially when you re dealing with JavaScript there s practically no reason to prefer JSON JavaScript Object Notation over actual JavaScript objects .", "EDIT : .. . .. . I have a schedule structure that come from a REST webservice like that : .. . .. . I would to do not repeat my templating for each day because they must be processed in same way DRY", "I believe that mahmoud is saying use a templating-engine like json2html to dynamically convert your JSON feed into html WHEN you need it .", "Not sure if I understand correctly but you re already using doT as the templating-engine why not just let knockout handle the stuff doT doesn t support", "see developer.mozilla.org en JavaScript Reference Statements with https : developer.mozilla.org en JavaScript Reference Statements with", "Or is the documentation wrong and there is no loadfile function", "It s likely it will be window at least in the browser as a plain function-call should have its ThisBinding set to the global object .", "You re better off storing the json as an object in javascript .", "You can read up on the comma operator : http : javascriptweblog.wordpress.com 2011 04 04 the-javascript-comma-operator .. . .. . Even though I have no idea the purpose of 0 eval .. . 0 eval is the equivalent and one less character .", "I want to wait for JsRender but the performance doesnt look up to par .", "The result should look like : .. . .. . .. . document .ready function .. . var data simple .. . level1 : .. . name : t1 .. . .. . name : t2 .. . .. . name : t3 .. . .. . .. . .. . var data complex .. . level1 : .. . name : g1 .. . data : .. . name : t11 .. . .. . name : t12 .. . .. . name : t13 .. . .. . .. . name : g2 .. . data : .. . name : t21 .. . .. . name : t22 .. . .. . name : t23 .. . .. . .. . .. . .. . var compiled tpl simple doT.template data-template simple .html .. . var compiled tpl complex doT.template data-template complex .html .. . .. . var result simple compiled tpl simple data simple .. . var result complex compiled tpl complex data complex .. . .. . output simple .append result simple .. . output complex .append result complex .. . .. . .. . .. . script src https : cdnjs.cloudflare.com ajax libs dot 1.0.3 doT.js script .. . script src https : ajax.googleapis.com ajax libs jquery 1.11.1 jquery.min.js script .. . .. . script data-template simple type text x-dot-template .. . strong Beg simple strong br .. . it.level1 : element : index .. . element.name br .. . .. . strong End simple strong .. . script .. . .. . script data-template complex type text x-dot-template .. . strong Beg complex strong br .. . it.level1 : group : index .. . group.name br .. . group.data : element : index .. . element.name br .. . .. . .. . strong End complex strong .. . script .. . .. . div id output simple .. . .. . div .. . div id output complex .. . .. . div .. . .. . https : jsfiddle.net srw2ogpz", "However the javascript console throws an error : .. . .. . How can I get loadfile to work", "You need to use square-bracket notation instead of dot notation when accessing properties with names that are not valid javascript identifiers .", "With JavaScript object literals you a don t need JSON.parse etc .", "d is no issue since Javascript execution begins only when the DOM is loaded .", "It will be used as the javascript global variable to which the json data will be assigned to .", "Have you tried removing the javascript to see how the page performs", "is there any way to pass urls instead of html string for templates" ] }
{ "confidence": [ 55.81475067138672, 55.14752960205078, 53.39080810546875, 51.97739028930664, 51.7551155090332, 50.5401611328125, 49.737388610839844, 49.35099411010742, 48.426971435546875, 48.36621856689453, 47.81023406982422, 47.129940032958984, 46.9400634765625, 46.8952522277832, 46.678382873535156, 46.360572814941406, 46.360572814941406, 46.06720733642578, 45.101234436035156, 44.29879379272461 ], "content": [ "Question : So I m wanting to replace the Knockout http : knockoutjs.com templating-engine with doT http : olado.github.io doT for enhanced performance for my large-scale single-page app . I ve been able to get doT.js working with knockout as the templating-engine but i m having a big issue . I m used to using Knockout s event bindings to keep me from having to attach event handlers in my ViewModels . But doT.js doesn t seem to provide this option . I think the primary reason for this is that doT.js just compiles a string of html . What would be the best way to being able to define events in my views and still use doT.js Has this been done before My thought is that I would have to define my events in a data- attribute and once doT.js is done compiling throw that html string into a detached DOM element . Then I would have to do something like a .querySelectorAll to find the data- event attributes and attach those to the parent element . Does anyone have any better thoughts on this JSFiddle Example .. . .. . Here s an example of Knockout.js and doT.js working together pulled from this example http : jsperf.com knockout-template-engines 11 : .. . .. . http : jsfiddle.net eeKe7 Comment : Would you care to provide a JS fiddle that shows your current state of integration with doT Comment : updated with fiddle .. . Answer : Not sure if I understand correctly but you re already using doT as the templating-engine why not just let knockout handle the stuff doT doesn t support http : jsfiddle.net sjroesink ytdLj .. . .. . Edit .. . .. . And if you also want to change the JS notation inside the data-bind you can use doT also : .. . .. . http : jsfiddle.net sjroesink ytdLj 2 .. . .. . I wouldn t recommend this though as it only limits the flexibility in defining your bindings . Comment : Oh my gosh you are amazing I didn t know you could pass back into knockout Not exactly what I was wanting as I didn t want to use knockout bindings at all but this helps tremendously . If I don t get an answer that doesn t use knockout bindings I will definitely accept this Comment : something I just noticed is wrong with your code . itemClick should be within the array of likes but it s not . It s in the root of the viewmodel . How would I change the scope for knockout Comment : You can access the root scope via root : event : click : root.itemClick Comment : the problem is what if it isn t in the root . See this example : jsfiddle.net ytdLj 3 http : jsfiddle.net ytdLj 3", "Question : I m using doT.js http : olado.github.io doT in order to manage view templates and so on I wanted to load an external template placing it in another folder then loading it like a CSS file or a JS file is it possible to make this with doT.js If not what templating-engine will make me able to do that I prefer not using jQuery just native JS . .. . Answer : The best way to load those template views was to get them with an XHR call and then appending them to the document : .. . .. . Hope it will help others : .", "Question : I m using doT.js http : olado.github.io doT in order to manage view templates and so on I wanted to load an external template placing it in another folder then loading it like a CSS file or a JS file is it possible to make this with doT.js If not what templating-engine will make me able to do that I prefer not using jQuery just native JS . .. . Answer : I know you didn t ask for Query but for others this is a easy way of returning the template as a string which you can immediately pass to doT . Note that this is synchronous . That may not be what you want but that s easily changed :", "Question : I am new to both backbone and dot.js . I need help in integrating external dot.js file in to my backbone file . My backbone file looks like .. . .. . where-in dot.Template I am calling dotView which is present in dot.js file . This method is working fine but I want to impliment it using ajax . my dot.js file looks like .. . .. . Please help in this .. . Answer : RequireJS http : requirejs.org is recommended it has a text http : requirejs.org docs download.html text plugin . let you store your template in a text file . And requireJS will load it asynchronizely when you require it .", "Question : Please help me with process to integrate doT.js template in Backbone framework . Ie i need to override the backbone view with doTjs . Thanks for the help Comment : As is your question is very vague . Please edit it to add what difficulties you encountered in using dot.js with Backbone .. . Answer : You don t need to override the Backbone View . You just need to for example set your doT.js template as the View s template variable . If you want your templates to be external files you have 2 choices : .. . .. . 1 . Use AJAX to fetch the external files and store the response in a string which you give to doT.js .. . 2 . Use RequireJS http : www.requirejs.org or other module framework to offshore the AJAXing to them . Comment : Hi Jakke thanks for your response . The doT.js template is an external template in my case . How can i handle the same here . Comment : It would be much easier for me to help if you d edit your question with all the relevant info . For example are you using a module framework like requirejs where your templates are etc . Comment : Im using backbone MVC framework for my app . currently i need to set the dot.js template as backbone view . Also the doTjs template needs be included as external file or external template .", "Question : I m developing Eclipse editor with SWT JFace for doT.js template-engine . I have done tags highlighting content-assist with doT.js global-variables and tags . But I m new at Eclipse plugin development and I have a probleem . Problem is that inside doT.js tags I need JavaScript syntacs . Is it possible to use already existing editors plugins like Aptana plugin or add JS syntacs some other way .. . Answer : I used Aptana plugin to get JavaScript and HTML syntax support for my editor . WTP seemed to complicated for that .", "Question : Assuming I have a data structure like this : .. . .. . How would I go about creating a template with doT.js that will recursively go through the object and build nested lists Building the html string directly in JS with a recursive function is straight forward enough : http : jsfiddle.net fergal doyle WN8hZ 5 .. . .. . .. . del But with doT.js this is what I have and after that I m stumped http : jsfiddle.net fergal doyle BTZpu 4 del .. . .. . EDIT : I can do it by mixing in some JS with evaluation http : jsfiddle.net fergal doyle he8AN .. . .. . I was trying to achieve it using partials . Defining a ul snippet then have that snippet calling itself passing in an array as a param but I m getting a too much recursion error . If there s any way to get the below working it s a lot neater than the above I think . http : jsfiddle.net fergal doyle qazGe 4 .. . Answer : The issue is at compile-time . doT.js doesn t seem be handling recursion in partials . You recursion code def.ul : value.children makes the doT.js library infinitely resolve replace it with the contents of your function . One way to get around this is to use arguments.callee to refer to your partial within your partial . Here s a fork of your FIDDLE http : jsfiddle.net 8LRPg .. . .. . The author s of the library can implement the same idea in their library in the following fashion untested :", "Question : I m developing Eclipse editor with SWT JFace for doT.js template-engine . I have done tags highlighting content-assist with doT.js global-variables and tags . But I m new at Eclipse plugin development and I have a probleem . Problem is that inside doT.js tags I need JavaScript syntacs . Is it possible to use already existing editors plugins like Aptana plugin or add JS syntacs some other way .. . Answer : The Eclipse Web Tools Project WTP contains a Javascript editor . You can install this using Help Install New Software.. . Choose you main Eclipse site in the Work with field http : download.eclipse.org releases luna for Luna . Choose Javascript Development Tools in the Web XML Java EE.. . section . Comment : This isn t actually answer that really helps . I think I use WTP SDK to get that dependency .", "Question : I am writing project on Node.js http : nodejs.org + Express.js http : expressjs.com with templating Swig http : paularmstrong.github.io swig . On the user side using a template system doT.js http : olado.github.io doT index.html .. . .. . The question arose in the browser to pass a line like : .. . .. . But I do not know how to make Swig not handle as part of the string variable ie not handle braces . Is there any mechanism to solve my problem Thanks in advance .. . Answer : Read more in swig docs http : paularmstrong.github.io swig docs tags raw .", "Question : null .. . Answer : I m rendering server-side templates containing HTML pre and code elements using Express and doT.js which are processed and formatted by the Prism library client-side . However when the templates are rendered the line-breaks aren t being carried through . Looking at the source code I can see that the outputted code is minified and so far I haven t been able to find any doT.js documentation on maintaining these line-breaks to display the formatted code elements correctly . Do I have to write a helper on the server to to detect and handle these line-breaks or is there an option in doT.js to ignore them on render Comment : It looks like my assumptions were correct .", "Question : I use doT.js 1.0 for templating with requirejs . My goal is to load a file called length.html from another file called freight.html . The advanced sample https : github.com olado doT blob master examples advancedsnippet.txt states that you can load files with .. . .. . def.loadfile snippet.txt .. . .. . So I tried using def.loadfile length.html in freight.html . freight.html is in the same directory as length.html . However the javascript console throws an error : .. . .. . How can I get loadfile to work Or is the documentation wrong and there is no loadfile function Comment : Also I found out that the advanced sample defines their own loadfile function elsewhere . But this seems to be for node.js because they use var doT require doT Do I have to define my own function .. . Answer : It appears as though loadfile needs to be created by you as per your requirements . If you are using express I would suggest looking at https : github.com nerdo dot-emc . This module wraps doT so that you can use res.render to return your templates . It also provides a nifty include function to solve the problem you have above . So instead of loadfile you would use : .. . .. . def.include length .. . .. . Just be aware that if you use this module the default file extension is .def which needs to be changed with options to use say .html Comment : I use the normal doT.js on the client-side with a require-js plugin .", "Question : This question already has an answer here : .. . .. . What does a comma do in JavaScript expressions questions 3561043 what-does-a-comma-do-in-javascript-expressions 3 answers .. . .. . I read a line https : github.com olado doT blob e86a9681f770bc99ef562dada4884ebb5dee8e28 doT.js L28 from doT.js https : github.com olado doT : .. . .. . After it was minified https : github.com olado doT blob e86a9681f770bc99ef562dada4884ebb5dee8e28 doT.min.js : .. . .. . So what is the 0 eval I mean what does the comma do I played in Chrome s console 0 1 2 1 2 2 1 etc it always returns the last one . Comment : Do we know why they used 0 eval in the first place Comment : It very well might be to get code analyzers to shut up about the fact that they re using the evil eval at all . But I m just as confused as you are . Comment : @Len They want an indirect call to eval : github.com olado doT issues 26 issuecomment-5669788 https : github.com olado doT issues 26 issuecomment-5669788 .. . Answer : The comma operator evaluates both and always returns the last . Much like you said . You can read up on the comma operator : http : javascriptweblog.wordpress.com 2011 04 04 the-javascript-comma-operator .. . .. . Even though I have no idea the purpose of 0 eval .. . 0 eval is the equivalent and one less character .", "Question : I am trying to pass a new created object to my dot.js partial snippet like this : .. . .. . .. . try .. . var tempFn doT.template myTpl .text .. . var resultText tempFn .. . foo : this snippet .. . .. . result .html resultText .. . catch e .. . error .show .html e .. . throw e .. . .. . .. . .. . error .. . font-weight : bold .. . border : 1px solid red .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs dot 1.0.3 doT.js script .. . .. . -- Template HERE -- .. . script id myTpl type template doT.js CDATA .. . def.snippet : obj : .. . div How to use obj.x div .. . .. . def.snippet : x : it.foo .. . script .. . .. . .. . div id result div .. . div id error style display : none div .. . .. . But I get Template has an error : SyntaxError : Unexpected token : So how can I create and pass object or multiple params to a defined partial What s going wrong EDIT : .. . .. . I have a schedule structure that come from a REST webservice like that : .. . .. . I would to do not repeat my templating for each day because they must be processed in same way DRY So I consider using partial snippet to print each line of my schedule morning open close time and afternoon open close time . So as morning and afternoon div sould be threated in same way I would like to create a second snippet to handle that . But for morning I need to pass only am prefixed data and pm prefixed data for afternoon like that : .. . .. . scheduleHalfDay are not working . So how can I pass my 3 parameters properly without change data structure .. . Answer : Another way to make it work is to declare your param as a variable . var param x : it.foo def.snippet : param", "Question : I m developing Eclipse editor with SWT JFace for doT.js template-engine . I have done tags highlighting content-assist with doT.js global-variables and tags . But I m new at Eclipse plugin development and I have a probleem . Problem is that inside doT.js tags I need JavaScript syntacs . Is it possible to use already existing editors plugins like Aptana plugin or add JS syntacs some other way .. . Answer : Disclaimer I m the author of the tern.java . If you need powerfull completion hyperlink hover validation for JavaScript I suggest you that you try tern.java . You can use it with a simple SWT Text : .. . .. . enter image description here http : i.stack.imgur.com o2zIS.png .. . .. . See this sample at tern.eclipse.swt.samples https : github.com angelozerr tern.java tree master eclipse tern.eclipse.swt.samples Comment : I already used Aptana plugin for JavaScript and HTML syntax support . WTP seemed too complicated for that . Comment : tern.java can be used without WTP with a simple SWT Text . Comment : I have already used Aptana and I think I rewrite that part again in my editor . But still it is good thing to know . Comment : Pay attention it s just for completion validation hyperlink hover not for syntax coloration .", "Question : I was looking for a JavaScript template-engine and chose DoT.js https : github.com olado doT mostly because it s very fast http : jsperf.com dom-vs-innerhtml-based-templating 356 but had the following issues .. . .. . Null safe Undefined safe null-coalescing Just like in Freemarker VTL I want to be able to pass foo.bar.foobar and not worry about checking foo foo.bar and foo.bar.foobar that they are defined .. . e.g . avoid things like .. . .. . var val try var foo.bar.foobar catch val .. . .. . .. . which I feel bad about or .. . .. . typeof foo undefined typeof foo.bar undefined typeof foo.bar.foobar undefined foo.bar.foobar : foo.bar.foobar is undefined : foo.bar is undefined : foo is undefined .. . .. . .. . which I m not sure if I feel better or worse about .. . .. . I want to have good XSS protection and as fast DoT.js are by not using DOM even with the operator I m not feeling comfortable that all XSS in the world will be handled by find and replace e.g . what if the author missed something .. . .. . Documentation although it s very fast it s not that popular yet but the sources are so small you can figure out most things by just reading them but having a good community is a great benefit .. . .. . Which JavaScript template library answers these two requirements and is still considered fast .. . Answer : mustache.js - Logic-less mustache templates with JavaScript . 1 If the key exists and has a value of null undefined or false or is an empty list the block will not be rendered . 2 All variables are HTML-escaped by default . If you want to render unescaped HTML use the triple mustache : name . You can also use to unescape a variable . Reference : https : github.com janl mustache.js Comment : Re 2 HTML escaping is a decent first step but does not prevent against XSS . For example injecting javascript : doEvil into the href of a link will not be prevented by this default .", "Question : I was trying doT.js template engine.How to do nested if-else if in dot.js like .. . Answer : You can use the following syntax : .. . .. . The above gets compiled to : .. . .. . Essentially just keep adding condition until you get to the end of the block . Comment : thanks.. . helped.. . Comment : Seems right but the relationship of the properties in all of those conditionals can be confusing . You may want to edit so that you re just checking various possibilities of a single property .", "Question : I was trying doT.js template engine.How to do nested if-else if in dot.js like .. . Answer : this image tag is incorrect : .. . .. . .. . .. . img src user.absolutePath img user-shape.png : user.absolutePath .. . .. . this is correct : .. . .. . .. . it.userCollection 0 .attributes.admin : user : index .. . div class team-content-user .. . -- if not null-- .. . user.absolutePath .. . img src user.absolutePath .. . -- if not not null -- .. . user.absolutePath .. . img src img user-shape.png .. . user.email br .. . .. . div .. . Comment : if possible please indicate why the excerpt cited is incorrect", "Question : I was looking for a JavaScript template-engine and chose DoT.js https : github.com olado doT mostly because it s very fast http : jsperf.com dom-vs-innerhtml-based-templating 356 but had the following issues .. . .. . Null safe Undefined safe null-coalescing Just like in Freemarker VTL I want to be able to pass foo.bar.foobar and not worry about checking foo foo.bar and foo.bar.foobar that they are defined .. . e.g . avoid things like .. . .. . var val try var foo.bar.foobar catch val .. . .. . .. . which I feel bad about or .. . .. . typeof foo undefined typeof foo.bar undefined typeof foo.bar.foobar undefined foo.bar.foobar : foo.bar.foobar is undefined : foo.bar is undefined : foo is undefined .. . .. . .. . which I m not sure if I feel better or worse about .. . .. . I want to have good XSS protection and as fast DoT.js are by not using DOM even with the operator I m not feeling comfortable that all XSS in the world will be handled by find and replace e.g . what if the author missed something .. . .. . Documentation although it s very fast it s not that popular yet but the sources are so small you can figure out most things by just reading them but having a good community is a great benefit .. . .. . Which JavaScript template library answers these two requirements and is still considered fast .. . Answer : https : github.com mikesamuel jquery-jquery-tmpl-proposal benchmarks http : mikesamuel.github.com jquery-jquery-tmpl-proposal tests templates-benchmarks.html well against other template systems and has contextual autoescaping https : github.com mikesamuel jquery-jquery-tmpl-proposal blob master tests contextesc-end-to-end-test.js to prevent XSS . You can see from the conformance suite https : github.com mikesamuel jquery-jquery-tmpl-proposal blob master tests conformance-suite.html L589 that it coalesces undefined .", "Question : I was trying doT.js template engine.How to do nested if-else if in dot.js like .. . Answer : You can do it like this : .. . .. . .. . -- CONDITIONAL -- .. . -- if -- .. . div .. . it 0 .firstName .. . it 0 .firstName .. . div .. . .. . -- if else if else -- .. . div .. . -- if -- .. . it 0 .lastName .. . span First name is set span .. . .. . -- else if -- .. . it 0 .zip .. . span You don t have a last name span .. . .. . -- else if -- .. . it 0 .firstName .. . span Your firstName is : it 0 .firstName span .. . .. . -- else if end -- .. . -- else -- .. . span You didn t set your name span .. . .. . -- if end -- .. . div Comment : this here is wrong : img src user.absolutePath img user-shape.png : user.absolutePath", "Question : I thought all I have to do according to docs on git hub https : github.com olado doT blob master examples advancedsnippet.txt is to put def.loadfile snippet.txt into my template so it would look like this : .. . .. . but it does not seem to be working . I even tried to import withdoT.js https : github.com olado doT blob master examples withdoT.js but still nothing . All I get is Internal Server Error If you were able to make file includes work on dot.js can you please share your knowledge . I like this nifty engine but docs for it are not as nifty . .. . Answer : I don t know if it apply to you but on nodejs using expressjs and express-dot.js what I did was to define loadfile : .. . .. . in app.js .. . .. . in index.dot : .. . .. . basically it adds loadfile as a function that take a path and output a string in the def object of dotjs . You could certainly adapt and enhance this to your specific needs" ] }
[ "yes-answer-long", "yes-answer-short" ]
node.js
UNK_RELATION
repast-simphony@linux@140
repast-simphony -- repast-simphony 2.0 is a cross-platform java-based modeling system that runs under microsoft windows apple mac os x and @placeholder .
{ "confidence": [ 85.91139221191406, 82.98927307128906, 79.97815704345703, 77.92106628417969, 76.4415054321289, 75.8785171508789, 75.8785171508789, 74.74372863769531, 74.26757049560547, 72.63681030273438, 72.15760040283203, 71.96977996826172, 69.31741333007812, 67.65567779541016, 66.30035400390625, 66.30035400390625, 65.63799285888672, 63.500587463378906, 63.500587463378906, 63.299598693847656, 61.123756408691406, 60.90556335449219, 60.14142608642578, 59.46900939941406, 58.882286071777344, 58.57231140136719, 57.76991653442383, 57.63855743408203, 57.63855743408203, 56.89878845214844, 56.58636474609375, 56.112144470214844, 55.361045837402344, 54.893218994140625, 54.710670471191406, 54.29583740234375, 53.87262725830078, 52.97475051879883, 51.07286071777344, 51.07286071777344, 50.22527313232422, 49.453514099121094, 49.453514099121094, 49.453514099121094, 49.07107925415039, 47.11750793457031, 47.11750793457031, 47.11750793457031, 47.11750793457031, 45.31979751586914, 44.87567901611328, 44.87567901611328, 44.87567901611328, 43.7403564453125, 42.073951721191406, 39.739906311035156, 38.935909271240234, 36.455650329589844, 33.80013656616211, 33.71246337890625, 33.6539192199707, 32.66949462890625, 31.872310638427734, 29.659908294677734, 29.4714298248291, 28.30803871154785, 27.964923858642578, 27.964923858642578, 27.689762115478516, 27.634319305419922, 27.351764678955078, 27.123048782348633, 27.108915328979492, 27.015789031982422, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.64383888244629, 26.51666259765625, 26.236770629882812, 25.534603118896484, 25.517669677734375, 25.47577667236328, 25.053176879882812, 24.259124755859375, 24.162525177001953, 23.585678100585938, 23.172266006469727, 23.172266006469727 ], "content": [ "I have just installed Groovy and Repast Simphony in my Eclipse and created a Repast Simphony Project .", "The problem was that Repast Simphony doesn t run with Eclipse 4.4.2 .", "This is probably the best solution but the course of action is not evident to me because my projects are Repast Projects that include all repast-simphony development libraries while my library only imports the main repast-simphony jar .", "I am using Repast Simphony to build a simulation using java in Eclipse .", "However I am not able to find any out if mouse click is possible to be implemented on the Repast Simphony based Model .", "I m programming a simulation using repast-simphony groovy API .", "If I understand you have installed repast Simphony and eclipse separately .", "In the repast code that handles removing agents from the display http : sourceforge.net p repast repast-simphony ci master tree repast.simphony.gis.visualization src repast-simphony visualization gis DisplayGIS.java l137 the removal is triggered by an event in the Projection object associated with the display - in your case the Geography .", "A bit of a delay here but the problem has been solved in conversation with Nick Collier Repast Simphony co-creator on the repast interest list http : sourceforge.net p repast mailman repast-interest viewmonth 201504 .", "I have but was unable to get the debugger to work for a repast-simphony simulation the same way it works for a java class .", "You will find further information on scheduling in the Repast Simphony FAQ http : repast.sourceforge.net docs RepastSimphonyFAQ.pdf .", "Repast Simphony 2.0-beta had a known issue https : sourceforge.net p repast mailman message 27491795 with specifying value layer styles .", "http : repast.sourceforge.net docs api repast-simphony repast-simphony space gis Geography.html .. . .. . http : repast.sourceforge.net docs api repast-simphony repast-simphony query space grid GridCellNgh.html .. . .. . Or perhaps is it possible to build both a Grid and a Geography in the context", "I am running an Agent-based Simulation in Repast Simphony Java and need to calculate the Gini coefficient from a sorted array of int values .", "Why don t you download directly the Repast Simphony package which comes with groovy compiler eclipse and all", "You have to use Eclipse 4.2 when you want to use Repast Simphony .", "http : repast.10935.n7.nabble.com repast-model-that-ran-last-year-won-t-run-now-td8080.html For those that aren t interested in clicking on a link the problem arises because user path.xml files were introduced with Repast Simphony 2.0 whereas earlier versions do not use this file .", "Thank you .. . .. . I tested code taken from the internet and it works if I don t run it with repast-simphony .. . .. . My server", "Another solution is then to replace the servlet-api jar used by default by Repast Simphony by a recent javax servlet-api", "Simply download the OS X version of Repast J .", "I want to use java-websocket with Repast simphony but it doesn t work I get the following errors : .. . .. . Could someone explain me how to solve this error", "Has anyone tried Repast HPC 2.0 .", "What I intend to do is to upgrade the repast version 1.2 to the repast version 2.0 .", "Repast Symphony is installed in Eclipse as a plugin so I created Repast Projects that include all Repast libraries .", "The mouse click can be implemented in Repast .", "Solution to the original problem .. . .. . The problem was fixed by downloading three .class files Nick Collier attached to an email on the Repast mailing list to the folder : .. . .. . Repast-Simphony-2.0.0-beta eclipse plugins repast.simphony.visualization 2.0.0 bin repast-simphony visualization gui .. . .. . An example where it works .. . .. . Repast StupidModel which was hosted on Google Code has an example where the option shows up .", "You could try the repast-interest mailing list https : lists.sourceforge.net lists listinfo repast-interest", "Some points that may be useful note that I didn t use repast-simphony so some of the points may be already implemented by this framework : .. . .. . 1 .", "Another alternative to the removing of the groovy jars : In fact Repast Simphony 2.2 uses servlet-api 2.4 . which doesn t contain javax.servlet.http.HttpServletRequest.getServletContext method .", "Everything builds fine but when I run a the Repast simulation it throws java.lang.NoClassDefFoundError : repast-simphony context Context .. . .. . I tried exporting my library as a jar importing the project directly and adding the library to my project s classpath to no avail .", "I tried to replace the repast.simphony.bin and src.jar with the latest version of it repast 2.0 but such an error occurs :", "Install the Repast J that is appropriate for your operating-system by following the instructions provided on the Repast website for the downloads .", "UPDATE : there was a bug in the repast display code .", "The Repast toolbar should appear .", "I am new to agent-based-modeling and am running the demo model that come along with the RepastJ Repast 3 .", "I m running a repast simulation from another Java application .", "No idea about Repast Simphony and the documentation for the groovy aspect of it seems sparse at best but in Groovy if you have a list of objects you can find all the objects that have a matching property by using :", "Just go to Import projects - Other- Import Repast Example Models- Mousetrap .", "a It sounds like you might want a GridValueLayer http : repast.sourceforge.net docs api repast-simphony repast-simphony valueLayer GridValueLayer.html on a 2D grid rather than a 3D grid .", "You could also make it implement the ProjectionListener http : repast.sourceforge.net docs api repast-simphony repast-simphony space projection ProjectionListener.html interface listening for a ProjectionEvent of type OBJECT MOVED and then setting the value of visited to true for that location .", "That model was built with an earlier version of Repast .", "The contents of Repast don t appear inside the jars I generate .", "Luckily he fixed the bug and sent me the replacement files for repast .", "If you are interested obtaining the files email [email protected] .", "I m running Eclipse on my Windows 7 machine Version : Luna Service Release 2 4.4.2 Build id : 20150219-0600 Java : 1.8.0 31 .. . .. . I have installed in eclipse for Repast : .. . .. . Groovy Compiler 2.3 Feature 2.9.1.xx .. . JDT Core patch for Groovy-Eclipse plugin on Eclipse 4.4 2.9.1.xx .. . Repast Simphony 2.3.1 .. . .. . Any ideas what might cause the problem and how to resolve it", "I m working with Repast-symphony trying to visualize the results of routing simulations .", "repast uses shape files for visualization of roads and everything else .", "Be sure to download the correct version of Repast J for your computer .", "Click the Run button triangle on the Repast toolbar to start the simulation .", "Once the above steps have been completed the simulation may be run as follows : .. . .. . Start Repast either by clicking on the icon or by finding the repastj.exe file within the repast directory and clicking on it .", "I don t have access to the internals of Repast as I said in the previous comment but thanks for the tip .", "So what you need to do is that have the Repast jar inside your jars classpath .", "The fix files are available by contacting Eric Tatara at [email protected] although all bugs will be removed in the next release version .", "I am trying to write an ABM in Repast Java Suite and am using a 3D grid for that .", "The projects use Repast Symphony http : repast.sourceforge.net and my library does so too so i m afraid this error is being caused by some conflict .", "I am trying to run the Repast zombie example with Drools but I got same errors at run time .", "The following is a snippet of it use in two classes : .. . .. . Editing to add relevant info from the comments : I don t import the repast JAR directly in my projects as I do in my library .", "Did you edit it as advised on pages 18-20 of the repast getting started guide", "But when I call the newKnowledgeBuilder function of the KnowledgeBuilderFactory : .. . .. . KnowledgeBuilder kbuilder KnowledgeBuilderFactory.newKnowledgeBuilder .. . .. . I get this exception : .. . .. . Exception in thread AWT-EventQueue-0 java.lang.NoClassDefFoundError : org drools builder KnowledgeBuilderFactory .. . .. . Has anyone experience in running Repast with Drools", "If you are using a Mac : .. . .. . A copy of JAVA is NOT needed .", "I just can t figure out what is going on but I need to solve the problem soon because I need to work with repast for a uni project .", "I am modeling a supply chain with an customer retailer and supplier .", "You could run a batch which runs without visualisations - with only one parameter combination if you like .", "I m creating a Java library for using in other Java projects .", "That s based on the OP s code anyway .", "All the items are there just arranged to find them based on preferredness .", "How does combining boolean and non-boolean if statements in java work", "I cant imagine java doesn t allow for mixing.. . .. . .. . EDIT : .. . .. . Context.. .", "I have created a tree class and implemented a comparator : .. . .. . .. . .. . And then I have put them into a context in geographic space on a grid using Respast Simphony : .. . .. . If I am correct in the code below I created 10 tree objects added them to the context and then created 10 new separate tree objects and adding them to the ArrayList : .. . .. . Next I print the suitability values and the maximum suitability value .", "See stackoverflow.com questions 4712139 http : stackoverflow.com questions 4712139 java-object-default-tostring and stackoverflow.com questions 10734106 http : stackoverflow.com questions 10734106 how-to-override-tostring-properly-in-java", "The ideas is that each Player is an agent and we have a n x n grid of Player that can t be moved .", "Random nextBoolean http : docs.oracle.com javase 7 docs api java util Random.html nextBoolean", "I looked at the demos and built my own zombie simulator as described in the documentation but an error keeps coming up and I m pretty sure its not to do with my code since I just copied it from the docs for the zombie simulator and opened the demos repast provides .", "you can try this will help you a lot : .. . .. . If you are using a PC : .. . .. . Go to the Java website to obtain a free copy of the Java software and download Java at least the Java Runtime Environment if it is not already on the PC to be used .", "I want to implement the a model including a functionality that allows me to do various things by clicking the mouse on its interface .", "Please help .", "This model allows the user to use mouse left right-click as well as Scroll .", "The classes in the model would be helpful :", "For some reason my method doesn t get called when I use @ScheduledMethod .", "Have no idea what is wrong as I used it before and everything was fine .", "Here is the code : .. . .. . Thanks in advance Dina .", "I had a simiar issue with @ScheduledMethod : it simply did not execute my method .", "However I did get it running by scheduling the method in a different way which could look for you as follows : .. . .. . I suggest you try executing this code snippet once at the very beginning and perhaps in the same class .", "Hope it helps Thorben", "I am running a large scale simulation and wanted to see if muting the graphical output charts displays and simply writing the necessary data for each simulation to a file that can be read into MATLAB for visualization would improve the performance of the model .", "Does anyone know of a way to do this without deleting them", "Yes - you can do this .", "Docs here http : repast.sourceforge.net docs RepastBatchRunsGettingStarted.pdf .", "It may or may not improve performance depending on your exact model but a full code-analysis is too broad for this site .", "Click on the BasicImmuneSimulator.jar file and Basic Immune Model will appear under Other Models .", "Each Player has to play with 4 neighbours northern southern western and eastern one finding the best strategy based on the outcome of the 4 different games in each round .", "Here s the code taken from Player class : .. . .. . Here s the console output so that you can see that everything seems to be sent and received without issues used a 3 x 3 grid : .. . .. . As you can see in the last line playSharedQueue.size is 1 and I really don t understand why .", "Since there s not a built-in system to exchange messages between agents in Repast Simphony I had to implement some kind of workaround to deal with agents sync A vs B and B vs A should count as the same round that s why they need to be sync ed .", "for each f x y x+y .", "So when an agent is at point x y it will know that corresponding z value is z f x y x+y .", "beginner in java here .", "Q26289147.java https : github.com jarrodhroberson Stack-Overflow blob master src main java com stackoverflow Q26289147.java .. . .. . Notes : .. . .. . 1 .", "at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next Unknown Source at com.sun.xml.internal.stream.XMLEventReaderImpl.nextEvent Unknown Source at repast.simphony.scenario.data.ContextFileReader.read ContextFileReader.java : 40 at repast.simphony.scenario.ScenarioLoader.load ScenarioLoader.java : 126 .. . .. . .. . 22 more .. . .. . Also on the eclipse console it gives me this error before repast starts .. . .. . .. . .. . Oct 03 2014 4 : 05 : 01 PM java.util.prefs.WindowsPreferences .. . .. . WARNING : Could not open create prefs root node Software JavaSoft Prefs at root 0x80000002 .", "I am attempting to create an agent based simulation model as an exercise .", "The model is based on a simple 2D grid with 1 agent class ." ] }
{ "confidence": [ 107.27604675292969, 107.27604675292969, 104.17051696777344, 100.46255493164062, 97.26521301269531, 96.0968017578125, 93.48748779296875, 93.02297973632812, 92.9393539428711, 91.93421936035156, 91.70742797851562, 86.60482788085938, 85.87277221679688, 85.62911987304688, 83.85832214355469, 81.598876953125, 78.44990539550781, 63.43578338623047, 56.01207733154297, 55.544368743896484 ], "content": [ "Question : I have just installed Groovy and Repast Simphony in my Eclipse and created a Repast Simphony Project . In the auto-generated files is an error . In the ModelInitializer class the import : .. . .. . throws an error : Groovy : unable to resolve class repast.simphony.essentials.RepastEssentials .. . .. . I checked the filesystem and the file-exists at the given location .. . .. . When I remove the static keyword the error is gone but the second error Groovy : class ProbeID is not an annotation in @ProbeID this is the annotation at the toString -method is still there . I m running Eclipse on my Windows 7 machine Version : Luna Service Release 2 4.4.2 Build id : 20150219-0600 Java : 1.8.0 31 .. . .. . I have installed in eclipse for Repast : .. . .. . Groovy Compiler 2.3 Feature 2.9.1.xx .. . JDT Core patch for Groovy-Eclipse plugin on Eclipse 4.4 2.9.1.xx .. . Repast Simphony 2.3.1 .. . .. . Any ideas what might cause the problem and how to resolve it Thanks in advance Frank .. . Answer : If I understand you have installed repast Simphony and eclipse separately . Why don t you download directly the Repast Simphony package which comes with groovy compiler eclipse and all Comment : Because I already had Eclipse installed .", "Question : I have just installed Groovy and Repast Simphony in my Eclipse and created a Repast Simphony Project . In the auto-generated files is an error . In the ModelInitializer class the import : .. . .. . throws an error : Groovy : unable to resolve class repast.simphony.essentials.RepastEssentials .. . .. . I checked the filesystem and the file-exists at the given location .. . .. . When I remove the static keyword the error is gone but the second error Groovy : class ProbeID is not an annotation in @ProbeID this is the annotation at the toString -method is still there . I m running Eclipse on my Windows 7 machine Version : Luna Service Release 2 4.4.2 Build id : 20150219-0600 Java : 1.8.0 31 .. . .. . I have installed in eclipse for Repast : .. . .. . Groovy Compiler 2.3 Feature 2.9.1.xx .. . JDT Core patch for Groovy-Eclipse plugin on Eclipse 4.4 2.9.1.xx .. . Repast Simphony 2.3.1 .. . .. . Any ideas what might cause the problem and how to resolve it Thanks in advance Frank .. . Answer : The problem was that Repast Simphony doesn t run with Eclipse 4.4.2 . You have to use Eclipse 4.2 when you want to use Repast Simphony .", "Question : I want to use java-websocket with Repast simphony but it doesn t work I get the following errors : .. . .. . Could someone explain me how to solve this error Thank you .. . .. . I tested code taken from the internet and it works if I don t run it with repast-simphony .. . .. . My server .. . Answer : Another alternative to the removing of the groovy jars : In fact Repast Simphony 2.2 uses servlet-api 2.4 . which doesn t contain javax.servlet.http.HttpServletRequest.getServletContext method . Another solution is then to replace the servlet-api jar used by default by Repast Simphony by a recent javax servlet-api", "Question : I want to implement the a model including a functionality that allows me to do various things by clicking the mouse on its interface . However I am not able to find any out if mouse click is possible to be implemented on the Repast Simphony based Model . Please help . .. . Answer : The mouse click can be implemented in Repast . Just go to Import projects - Other- Import Repast Example Models- Mousetrap . This model allows the user to use mouse left right-click as well as Scroll . The classes in the model would be helpful :", "Question : I need your help . I m running a repast simulation from another Java application . What I intend to do is to upgrade the repast version 1.2 to the repast version 2.0 . How can I do this I tried to replace the repast.simphony.bin and src.jar with the latest version of it repast 2.0 but such an error occurs : .. . Answer : I saw your question as I have this problem too . I found the cause of the problem in this email group . http : repast.10935.n7.nabble.com repast-model-that-ran-last-year-won-t-run-now-td8080.html For those that aren t interested in clicking on a link the problem arises because user path.xml files were introduced with Repast Simphony 2.0 whereas earlier versions do not use this file . There is apparently an automated method to update your old packages see section 2.5 here http : repast.sourceforge.net docs RepastSimphonyFAQ.pdf . But there could still be issues with the code . I m going to try to reconstruct the program I m trying to use in the latest version . As Nick says in his reply in that archive the alternative is to install an earlier version of RS which doesn t have user path.xml files .", "Question : I want to use java-websocket with Repast simphony but it doesn t work I get the following errors : .. . .. . Could someone explain me how to solve this error Thank you .. . .. . I tested code taken from the internet and it works if I don t run it with repast-simphony .. . .. . My server .. . Answer : I finally found the solution . I removed all the groovy jars which are by default present in the project build path and it works .", "Question : Repast Simphony 2.0-beta had a known issue https : sourceforge.net p repast mailman message 27491795 with specifying value layer styles . The option to display them did not show up in the GUI interface . In the GUI right-clicking on a display and selecting Edit should open a window several tabs along the left side : .. . .. . General .. . Agent Selection .. . Agent Style .. . Grid Style .. . Value Layer Details and .. . Schedule Details .. . .. . With the bug the Value Layer Details tab does not show up so it is not possible to set the ValueLayer Style and see the state of the layer . Is that bug fixed by default in version 2.3.1 I am having a similar problem . The tab does not show up . http : i.stack.imgur.com Xe9x1.png .. . .. . My question is is this the same problem or something else and how do I fix it Solution to the original problem .. . .. . The problem was fixed by downloading three .class files Nick Collier attached to an email on the Repast mailing list to the folder : .. . .. . Repast-Simphony-2.0.0-beta eclipse plugins repast.simphony.visualization 2.0.0 bin repast-simphony visualization gui .. . .. . An example where it works .. . .. . Repast StupidModel which was hosted on Google Code has an example where the option shows up . That model was built with an earlier version of Repast . I have tried to replicate their implementation of the ValueLayer and style sheets . .. . Answer : The bug is fixed . Adding this line to the file context.xml makes the option show up in the GUI :", "Question : null .. . Answer : I am running an Agent-based Simulation in Repast Simphony Java and need to calculate the Gini coefficient from a sorted array of int values . Is there any package available to calculate the Gini coefficient and maybe even other inequality measures Is there a package to plot the data as a Lorenz curve Thanks everyone for their time", "Question : I m programming a simulation using repast-simphony groovy API . There s a method count myTurtles which allows me to count the number of agents turtles of a particular class myTurtle extends BaseTurtle . My question is : Is there any way to filter this count so I can only get the turtles matching a particular value for a property shape color size.. . .. . Answer : No idea about Repast Simphony and the documentation for the groovy aspect of it seems sparse at best but in Groovy if you have a list of objects you can find all the objects that have a matching property by using :", "Question : I am using Repast Simphony to build a simulation using java in Eclipse . The simulation has an agent class that functions within a geography context . There are other contexts that agents can move within including grid and space . These are 2D projections where a geography context is a GIS projection . The grid package comes with a set of objects methods as does the geography package . One of those in the grid package is called GridcellNgh which creates a Moore neighborhood or a filter around a particular grid point . Does anyone know of an object that can perform a similar function to the GridCellNgh that will work in the Geography package projection http : repast.sourceforge.net docs api repast-simphony repast-simphony space gis Geography.html .. . .. . http : repast.sourceforge.net docs api repast-simphony repast-simphony query space grid GridCellNgh.html .. . .. . Or perhaps is it possible to build both a Grid and a Geography in the context I think this is less likely as Geography is a GIS projection and Grid is a 2D projection . .. . Answer : From the Geography package use the method .getObjectsWithin .. . .. . Parameters : the bounding envelope .. . .. . Create an envelope object of various dimensions 2D plane .. . .. . http : www.vividsolutions.com jts javadoc com vividsolutions jts geom Envelope.html", "Question : I m creating a Java library for using in other Java projects . The projects use Repast Symphony http : repast.sourceforge.net and my library does so too so i m afraid this error is being caused by some conflict . Everything builds fine but when I run a the Repast simulation it throws java.lang.NoClassDefFoundError : repast-simphony context Context .. . .. . I tried exporting my library as a jar importing the project directly and adding the library to my project s classpath to no avail . What can I be doing wrong This Context class is being used in both my library and my projects . The following is a snippet of it use in two classes : .. . .. . Editing to add relevant info from the comments : I don t import the repast JAR directly in my projects as I do in my library . Repast Symphony is installed in Eclipse as a plugin so I created Repast Projects that include all Repast libraries . Therefore I m unable to remove the specific JAR that is causing the possible conflict of classes . Comment : Extract resulting jar file and check if there this class or no . Comment : This Context class is not inside my library s jar . It s inside Repast s jar . The contents of Repast don t appear inside the jars I generate . I m not sure I understood your suggestion though . I can use the missing class in my library-project but not in the project that uses my library . .. . Answer : Exactly as you said . This error should be the conflict between the same classes in a jar . If you are using an IDE try to clean the build and rebuild again . And also I would suggest you to use only one symphony library jar . Multiple class definitions always leads to ambiguity for the JVM class loader . Try not to use symphony jar in the importing project since you already have it in your exported jar . After importing your lib there should no errors . Try this and let me know how it goes . I suggest that you use an build tool . Something like Maven . Then maven with the right plugin will fix this problem for you . All you need to do is to tell Maven that you need a particular jar file . Then a magic will occur and you will have a well working jar-file to distribute Comment : This is probably the best solution but the course of action is not evident to me because my projects are Repast Projects that include all repast-simphony development libraries while my library only imports the main repast-simphony jar . I can t remove an individual jar from my projects . Comment : @ecc I use ant for my builds . I really dont have much idea regarding maven . What I do in my build is I copy all my jars into a single directory copy the directory to final jar place the directory on classpath and reference them to project . So now I have only a single jar file to run my project . Using ANT it is really easy . I can send you a sample build.xml file if you need it . Comment : I don t have access to the internals of Repast as I said in the previous comment but thanks for the tip .", "Question : I have a simple Agent in a simple context geography package which operates using latitude and longitude to represent space . The agent is supposed to die on the 10th iteration of the model . It is then removed from the context . On the 10th iteration of the simulation the agent stops doing the other methods such as moving around so I assume it has successfully been removed from the context died but it does not get removed from the simulation display just sits there . Why does it remain in the display and how can I remove it from the display as it dies UPDATE : there was a bug in the repast display code . The fix files are available by contacting Eric Tatara at [email protected] although all bugs will be removed in the next release version . .. . Answer : You need to remove your agent from the geography in your die method I think . In the repast code that handles removing agents from the display http : sourceforge.net p repast repast-simphony ci master tree repast.simphony.gis.visualization src repast-simphony visualization gis DisplayGIS.java l137 the removal is triggered by an event in the Projection object associated with the display - in your case the Geography . Strangely the Geography interface does not define a remove method but one is implemented in the DefaultGeography class . It s likely that your Geography is actually a DefaultGeography concrete object so you could try the following addition to your die method : .. . .. . Notes .. . .. . 1 . You are getting the context in the die method but already have a reference to it from when you construct your Agent so this is almost certainly redundant . 2 . You need to make sure your display is actually scheduled to update . By default they are but you should double click on the display in the left hand navigator pane of the GUI and check the Schedule Details tab to make sure that the display updates on a regular schedule not ONE TIME Comment : Hi Richard . Thanks for your answer . I contacted the creator of the Geography package Eric Tatara who found a bug in the display code . Luckily he fixed the bug and sent me the replacement files for repast . If you are interested obtaining the files email [email protected] . Comment : Okay thanks for letting me know - glad you got it sorted :", "Question : How does combining boolean and non-boolean if statements in java work Is there a particular way the conditional-statements need to be written For example the code below gives me different results every time . Beetles are initialized as randomly male or female and at age 0 . I cant imagine java doesn t allow for mixing.. . .. . .. . EDIT : .. . .. . Context.. . I have sysout code to see that I am indeed getting male and female beetles . I also have sysout code to see that they are aging properly . Sometimes methods are skipped as-if the conditions are not met . Sometimes they all work properly . Sorry the outputs are in code format but its easiest . What I want is if the beetles are age 7 and female they will find a mate . If the beetles are age 13 and male they will die . If the beetles are age 25 and female they will die . Sometimes this happens : Comment : I cant immediately see any problems with the if statements . Have you tried using a debugger to check the variable values and why the conditionals are aren t passing Comment : @blm Good to know . I have but was unable to get the debugger to work for a repast-simphony simulation the same way it works for a java class . I will try again . Comment : Can you tell us what output you re getting exactly and what is expected I also can t find anything wrong with the code right now . Comment : I believe the only problem you can have here is with your constructor inputs age and isFemale . Can you show us what are you passing into it We will need the desired output and the actual output too Comment : By the way there is no non-boolean mixing here . For example this.getAge 7 results in a boolean everytime . For example the code below gives me different results every time . Beetles are initialized as randomly male or female and at age 0 . Since they are randomly initialized shouldn t the results be different every time .. . Answer : A bit of a delay here but the problem has been solved in conversation with Nick Collier Repast Simphony co-creator on the repast interest list http : sourceforge.net p repast mailman repast-interest viewmonth 201504 . He stated that all the methods are scheduled for the same priority which means they are using random helper and thus a random seed to decide their order . Consequently for example step may be called after checkMate etc . and then in the next tick the randomization occurs again and step may be called before checkMate etc . As a result an agent may be 13 and then 14 without any other methods being called when the agent is 13 . If you want to specify the priority of the @Scheduled methods you can use the priority parameter or just stagger the start times i.e . step starts at 1 then next method at 1.1 and so on . I found that my code works fine if the death methods are the highest priority .", "Question : I am new to agent-based-modeling and am running the demo model that come along with the RepastJ Repast 3 . Is it possible to run the simulation in a web browser Thanks in advance . .. . Answer : you can try this will help you a lot : .. . .. . If you are using a PC : .. . .. . Go to the Java website to obtain a free copy of the Java software and download Java at least the Java Runtime Environment if it is not already on the PC to be used . Then download RepastJ to run the Basic Immune Simulator . If you are using a Mac : .. . .. . A copy of JAVA is NOT needed . Simply download the OS X version of Repast J . Install the Repast J that is appropriate for your operating-system by following the instructions provided on the Repast website for the downloads . Be sure to download the correct version of Repast J for your computer . Download the Basic Immune Simulator file BasicImmuneSimulator.jar onto your computer . Once the above steps have been completed the simulation may be run as follows : .. . .. . Start Repast either by clicking on the icon or by finding the repastj.exe file within the repast directory and clicking on it . The Repast toolbar should appear . At the left edge of the toolbar there is an icon of a folder . Click on the folder and a Load Model pane appears . Scroll down in the Load Model pane and click on Models and then the Add button . A browser will appear . Use this browser to find the BasicImmuneSimulator.jar file which can be found where ever it was downloaded . Click on the BasicImmuneSimulator.jar file and Basic Immune Model will appear under Other Models . Click on the Load button to make the Basic Immune Model graphical user-interface GUI appear . Once Basic Immune Model Settings GUI appears click on the Parameters tab to see the input parameter choices available for a simulation run if the parameters are not already displayed . Choose the pathological challenge from the list in the GUI . Any other parameter may be changed to the user s discretion at this point as well . Click the Run button triangle on the Repast toolbar to start the simulation . Note that data files from the simulation will be saved automatically to wherever the repastj.exe file is located . Comment : Thanks . Is it possible to trigger the simulation from a web browser", "Question : For some reason my method doesn t get called when I use @ScheduledMethod . Have no idea what is wrong as I used it before and everything was fine . Here is the code : .. . .. . Thanks in advance Dina . .. . Answer : I had a simiar issue with @ScheduledMethod : it simply did not execute my method . However I did get it running by scheduling the method in a different way which could look for you as follows : .. . .. . I suggest you try executing this code snippet once at the very beginning and perhaps in the same class . You will find further information on scheduling in the Repast Simphony FAQ http : repast.sourceforge.net docs RepastSimphonyFAQ.pdf . Hope it helps Thorben", "Question : I m creating a Java library for using in other Java projects . The projects use Repast Symphony http : repast.sourceforge.net and my library does so too so i m afraid this error is being caused by some conflict . Everything builds fine but when I run a the Repast simulation it throws java.lang.NoClassDefFoundError : repast-simphony context Context .. . .. . I tried exporting my library as a jar importing the project directly and adding the library to my project s classpath to no avail . What can I be doing wrong This Context class is being used in both my library and my projects . The following is a snippet of it use in two classes : .. . .. . Editing to add relevant info from the comments : I don t import the repast JAR directly in my projects as I do in my library . Repast Symphony is installed in Eclipse as a plugin so I created Repast Projects that include all Repast libraries . Therefore I m unable to remove the specific JAR that is causing the possible conflict of classes . Comment : Extract resulting jar file and check if there this class or no . Comment : This Context class is not inside my library s jar . It s inside Repast s jar . The contents of Repast don t appear inside the jars I generate . I m not sure I understood your suggestion though . I can use the missing class in my library-project but not in the project that uses my library . .. . Answer : java.lang.NoClassDefFoundError is thrown when the JVM tries to run the application . Typical cases is when you got one jar-file as interface . Then you got other jar-file that implement that interface . So what you need to do is that have the Repast jar inside your jars classpath . So that your program can find the right class you want to use . Comment : I ve got a manifest inside my library s jar with Class-Path : repast.simphony.bin and src.jar but I m unsure where I should place that jar . In the root of my library s jar Comment : I suggest that you use an build tool . Something like Maven . Then maven with the right plugin will fix this problem for you . All you need to do is to tell Maven that you need a particular jar file . Then a magic will occur and you will have a well working jar-file to distribute . Comment : Thanks @Viggo I guess it s time I learn to use Maven . If you want include that comment in your response so I can accept it .", "Question : I am trying to write an ABM in Repast Java Suite and am using a 3D grid for that . Two questions about the grid : 1 I want to assign a functional value for each x y combination in the grid- E.g . for each f x y x+y . So when an agent is at point x y it will know that corresponding z value is z f x y x+y . How can I assign a data-layer to the grid to do that 2 Again for the same grid agents should be able to know that whether specific patch is visited or not . It will be updated whenever an agent visits that patch . In general my problem is to assign additional methods data etc . to the grid interface . As it s a fundamental question for my simulation I can t move further without solving it. . Answers really appreciated. . Thanks .. . Answer : a It sounds like you might want a GridValueLayer http : repast.sourceforge.net docs api repast-simphony repast-simphony valueLayer GridValueLayer.html on a 2D grid rather than a 3D grid . You use a 3D grid if you want the agents to be able to move in a 3 dimensional space but a 2D grid if they move in 2D space even if you want them to then read a value for each location . A GridValueLayer can be used on an n-dimensional grid and holds a value for each cell location specified by n int values . For your example you might want the GridValueLayer to hold the value x+y for each cell in the 2D grid . e.g . b This could be done in a number of ways . I suggest the GridValueLayer again . In the agent code at the point that you do the move to a point in the grid you set the GridValueLayer for that coordinate to 1 . A final note . You could implement your own grid . As long as it conforms to Repast s Grid interface or you can extend AbstractGrid . For instance if you extend AbstractGrid and then have methods getSum int.. . coords which simply returns the sum of the coords array and getVisited int.. . coords to solve your problem . You could also make it implement the ProjectionListener http : repast.sourceforge.net docs api repast-simphony repast-simphony space projection ProjectionListener.html interface listening for a ProjectionEvent of type OBJECT MOVED and then setting the value of visited to true for that location .", "Question : null .. . Answer : I am running a large scale simulation and wanted to see if muting the graphical output charts displays and simply writing the necessary data for each simulation to a file that can be read into MATLAB for visualization would improve the performance of the model . Does anyone know of a way to do this without deleting them Comment : Yes - you can do this . You could run a batch which runs without visualisations - with only one parameter combination if you like . Docs here http : repast.sourceforge.net docs RepastBatchRunsGettingStarted.pdf . It may or may not improve performance depending on your exact model but a full code-analysis is too broad for this site . You could try the repast-interest mailing list https : lists.sourceforge.net lists listinfo repast-interest", "Question : null .. . Answer : Has anyone tried Repast HPC 2.0 . I am trying to install it on Mint 16 64-bit but got errors as below : .. . .. . I installed all the required dependencies namely C++ make mpicxx boost curl and netcdf through apt-get and changed the addresses of libraries in the makefile as below : .. . .. . Does anyone have an idea how to fix the problem Comment : Did you solve this problem I recently met this problem with linking the serialization . I solve this by using the latest version of boost v1.59 now .", "Question : I am building a model with a number of autonomous agents . They make decisions on which object to choose within their immediate environment or neighborhood . They do this retrieving the objects add them to a list sort the list based on preferences and choose the top choice every iteration . The decision determines their movement . Unfortunately once the population of agents becomes too high the program slows down massively . I use a compare method below which is relatively short but uses a lot of memory to compare the objects . I am wondering if there are any other methods you guys know of that might be more computationally efficient .. . Answer : Some points that may be useful note that I didn t use repast-simphony so some of the points may be already implemented by this framework : .. . .. . 1 . Measure - is comparison sorting the bottle-neck You said that it uses a lot of memory - that doesn t automatically make the program run slower are there GC overhead issues maybe Experiment with the VM args . And of course before measuring - warm up the JVM so that the JIT can catch up with normal operating conditions for your code etc . . Find out what s going on with jvisualvm . 2 . I don t know what are the objects that you re passing to append method but consider the case that you can maybe return faster than comparing objects like you do now . Try to use the knowledge of your specific domain-model . 3 . You ve said that agents retrieve the objects add them to a list and sort . Maybe it will be beneficial to store already sorted list of neighbors and if something will-change maybe that s a guess there will be a little change in the list - so it s almost completely sorted . Use sorting algorithm that handles almost sorted lists lists very quickly and compare results with the default Java sorting algorithm . That of course depends on how often does your model of neighbors change . If your model won t change I suppose that TYPE won t change then the sorting issue will be non-existent . 4 . Consider using plain Java code to CompareToBuilder - if you have millions of objects the object creation might be a big overhead if it lies on a critical path bottle-neck . 5 . Do you utilize concurrency Maybe it will speed up if you run your algorithm in a parallel way . Many of the other optimizations depends on your specific object structure and relations . E.g . you have Tree as the type in the generics - maybe this tree is not ballanced maybe you could use AVL Heap or change LinkedList to ArrayList etc . Experiment Measure . I hope that will help a little ." ] }
[ "yes-answer-long", "yes-answer-short" ]
linux
UNK_RELATION
amazon-ses@amazon-ses@43
amazon-ses -- amazon simple email service @placeholder is a highly scalable and cost-effective bulk and transactional email-sending service for businesses and developers .
{ "confidence": [ 114.23941040039062, 66.20386505126953, 64.63998413085938, 62.77782440185547, 60.922157287597656, 60.858062744140625, 60.005332946777344, 59.901611328125, 58.41236114501953, 58.26054382324219, 58.02725601196289, 57.262760162353516, 57.24261474609375, 56.58556365966797, 56.014957427978516, 55.064048767089844, 54.78989028930664, 54.78989028930664, 54.38862609863281, 53.967620849609375, 52.41688537597656, 52.09326171875, 52.09326171875, 51.8206901550293, 50.71937942504883, 50.4113655090332, 50.39677429199219, 50.37553787231445, 49.931785583496094, 49.905738830566406, 49.894554138183594, 49.17139434814453, 48.68391418457031, 48.568214416503906, 48.568214416503906, 48.520668029785156, 48.520668029785156, 48.20502471923828, 47.86803436279297, 47.83912658691406, 47.66968536376953, 47.612159729003906, 47.499717712402344, 47.00433349609375, 47.00433349609375, 46.60647964477539, 46.26080322265625, 46.21068572998047, 45.129974365234375, 45.129974365234375, 45.129974365234375, 45.129974365234375, 44.741268157958984, 44.741268157958984, 44.64680480957031, 44.21609878540039, 44.0567626953125, 43.918540954589844, 43.81334686279297, 43.539093017578125, 43.16722106933594, 43.16722106933594, 43.15247344970703, 43.09272766113281, 42.99029541015625, 42.93126678466797, 42.909950256347656, 42.7824592590332, 42.697662353515625, 42.5385627746582, 42.43864440917969, 42.43864440917969, 42.40538024902344, 42.39616775512695, 42.257049560546875, 42.24946594238281, 42.21954345703125, 42.06556701660156, 42.03260803222656, 41.98816680908203, 41.716651916503906, 41.67099380493164, 41.30302429199219, 41.13378143310547, 40.942771911621094, 40.86829376220703, 40.86829376220703, 40.84812545776367, 40.57373809814453, 40.57373809814453, 40.48692321777344, 40.34518814086914, 40.29290771484375, 40.280914306640625, 40.24275207519531, 40.15825271606445, 40.11680221557617 ], "content": [ "The Amazon SES Simple Email Service self-described as a highly scalable and cost-effective bulk and transactional email-sending service .", "I use Amazon SES service to send email in tomcat6 .", "We ve changed our email service from Mandrill to Amazon SES .", "For more information see Verifying Email Addresses and Domains in Amazon SES and Testing Amazon SES Email Sending .", "465 587 are authenticated ports and it specifically mentions Amazon Simple Email Service SES Which is specifically designed for bulk sending email and is tuned to detect use by spammers .", "Q : Can I use Amazon SES to send bulk-email", "I m using Amazon SES SNS API of Amazon for sending email and getting notification .", "Hello i have use amazon SES simple email service in my codeigniter project .", "After reading that Amazon-SES http : aws.typepad.com aws 2011 07 amazon-simple-email-service-now-supports-attachments.html now supports sending attachments I was searching for an C example but was unable to find one .", "I am using Amazon SES service .", "I think yesterday Amazon announced SMTP support for SES Simple Email Service .", "I am using Amazon ses for email .", "Use the Amazon SNS simple notification service and then you can add your email-address - or Amazon SQS service for holding a log of all bounces complaints .", "Add your FROM email to the verified email addresses in Amazon SES .", "This question already has an answer here : .. . .. . Amazon SES Email address is not verified questions 22128800 amazon-ses-email-address-is-not-verified 4 answers .. . .. . I am trying to send an email using PHPMailer library and Amazon SES service .", "Planning to use Amazon SES for transaction email .", "I am sending bulk mails by using amazon SES .", "I am sending bulk emails using amazon-ses .", "I am trying to upgrade a Wordpress blog to use Amazon SES Simple Email Service with the Subscribe2 email notification plugin see links below .", "Question : Is it possible to customize the address verification request email sent by Amazon SES", "Source : SPF and Amazon SES http : sesblog.amazon.com post Tx3IREZBQXXL8O8 SPF-and-Amazon-SES .. . .. . More info : .. . .. . Authenticating Email with SPF in Amazon SES http : docs.aws.amazon.com ses latest DeveloperGuide spf.html .. . Authenticating Email with DKIM in Amazon SES http : docs.aws.amazon.com ses latest DeveloperGuide dkim.html", "For more information see Verifying Email Addresses in Amazon SES .", "I m currently using Amazon SES to notify me if the email is bounced .", "I have an Amazon SES account - it s sending emails fine .", "I want to add some custom headers while sending an email through Amazon SES .", "I am sending a mail with Amazon SES .", "From : Verifying Email Addresses in Amazon SES http : docs.aws.amazon.com ses latest DeveloperGuide verify-email-addresses.html .. . .. . Until your account is out of the Amazon SES sandbox you must also verify the email-address of every recipient except for the recipients provided by the Amazon SES mailbox simulator .", "The Amazon SES team is pleased to announce the addition of original email-headers to the bounce complaint and delivery notifications SES provides through Amazon SNS .", "There are a couple steps to setting up the Amazon SES service and getting this to work correctly .", "If you have a large amount of emails to send to your customers the recommended way is to use Amazon Simple Email Service http : aws.amazon.com ses .", "How to hide these ToAddresses of multiple email via Amazon SES", "Is there a way to do this with Amazon SES", "If you already have your own bulk mailing software it s easy to update it to deliver through Amazon SES either by modifying the software to directly call Amazon SES or reconfiguring it to deliver email through an Amazon SES SMTP relay as described above .", "I m using Amazon SES for email server and set the header information from PHP code .", "I have created a domain in Amazon SES for receving email from gmail and stored it in S3 Bucket .", "For more information about the mailbox simulator see Testing Amazon SES Email Sending .", "I have configured postfix to relay mail to Amazon SES by following their integration guide and sending email is working without issue .", "I ve read about other Mac developers using Sendy and Amazon SES .", "Custom Email without Amazon Branding", "SES is more of a raw email sending service that doesn t provide any of those higher-level features you are looking for .", "Amazon in turn sends a verification email to the sender email-address .", "I found some other solutions like here http : stackoverflow.com questions 13801730 sending-html-email-through-amazon-ses .", "I thought this package abstracted out the Amazon SES API to Send Email and allowed for native Meteor email calls .", "So far I ve used Postfix in conjunction with a Nodejs module called Nodemailer to send my email through Amazon SES .", "I want to retrieve the invalid emails from mail delivery notification sent to my email endpoint from Amazon SES .", "From the SES documentation : .. . .. . Important .. . .. . Amazon Elastic Compute Cloud Amazon EC2 throttles email traffic over port 25 by default .", "It is not possible : Creating IAM Policies for Access to Amazon SES http : docs.aws.amazon.com ses latest DeveloperGuide control-user-access.html Restrictions in IAM policy are : .. . .. . There are three reasons you might use IAM with Amazon SES : .. . .. . To restrict the email-sending action .", "Very hard to navigate Amazon SES to find this setting .", ".. . Note that Amazon SES has endpoints in multiple AWS regions and email-address verification status is separate for each AWS region .", "We only send email from Google Apps and Amazon SES nothing else .", "Is the expectation that you as someone implementing Amazon SES make individual calls per email send", "Amazon SES will attempt to send email with Transport Layer Security enabled but there is not a way to guarantee messages are sent with TLS .", "Is Amazon provide any scheduler Api for scheduling the email for future", "As i want to schedule my email by using Amazon API .", "- I use PHP to interface with Amazon SES", "For information about using Amazon SES in multiple AWS regions see Regions and Amazon SES .", "Also I m not sure if this is still valid but this page https : aws.amazon.com about-aws whats-new 2015 05 amazon-ses-is-now-integrated-with-cloudtrail says .. . .. . All Amazon SES APIs except for the email-sending APIs SendEmail and SendRawEmail are supported .", "http : docs.aws.amazon.com ses latest DeveloperGuide smtp-response-codes.html .. . .. . You are trying to send email from an email-address or domain that you have not verified with Amazon SES .", "My Amazon SES account was suspended due to non-compliance with the Amazon Web Services Acceptable Use Policy AUP .", "I m having issues on sending email via sendmail to my SMTP Hub which is configured to relay all my mails to Amazon SES .", ".. . Thank you for using Amazon SES", "It is definitely a good alternative to Amazon SES .", "With sandbox access you can only send email to the Amazon SES mailbox simulator and to email addresses or domains that you have verified .", "SPF and Amazon SES .. . .. . If you are using Amazon SES to send from your domain you need to know that the current SES implementation involves sending emails from an SES-owned MAIL-FROM domain .", "Beware that this might be slightly outdated as well insofar both the AWS Management Console http : aws.amazon.com console ses and section Amazon SES SMTP Issues http : docs.aws.amazon.com ses latest DeveloperGuide smtp-issues.html are referring to the more common alternative ports 465 and 587 only : .. . .. . You are sending to Amazon SES from an Amazon EC2 instance via port 25 and you cannot reach your Amazon SES sending limits or you are receiving time outs Amazon SES EC2 imposes default sending limits on email sent via port 25 and throttles outbound connections if you attempt to exceed those limits .", "I have been trying to send an email using Amazon SES Https Query API .", ".. . If you have not requested production access to Amazon SES you must verify every recipient email-address except for the recipients provided by the Amazon SES mailbox simulator .", "You can use their Simple Queue Service http : aws.amazon.com en sqs to send bulk-email .", "I m searching for an working C example to send attachments with Amazon-SES .", "Software running on Amazon EC2 Amazon Elastic MapReduce or your own servers can compose and deliver bulk emails via Amazon SES in whatever way best suits your business .", "For more information about setting up email-receiving rules see the Amazon SES Developer Guide at http : docs.aws.amazon.com ses latest DeveloperGuide Welcome.html .", "Limitations of AWS SES Sandbox Mode : .. . .. . You can only send mail to the Amazon SES mailbox simulator and to verified email addresses and domains .", "This question already has an answer here : .. . .. . Amazon SES Email address is not verified questions 22128800 amazon-ses-email-address-is-not-verified 4 answers .. . .. . I have an AWS Account and a verified domain and also a verified email-address in that domain both items have been verified by Amazon except for the DKIM for now .. . .. . After I tried to send an email with a source account equals to [email protected] to another of my email accounts from the AWS webpage with the send test email button I get the following error : Email address is not verified .. . .. . The domain and the email-address from that domain are verified .", "SES is probably intended to be a bit more scalable in this fashion using one of the Amazon AWS database products .", "I want to access Amazon s SES Simple Email Service using the boto3 library and a user-profile .", "I m writing a PHP script to be an Amazon SNS end point for Amazon SES bounce complain notifications .", "You can only send mail to the Amazon SES mailbox simulator and to verified email addresses and domains .. . You can only send mail from verified email addresses and domains .", "I ve read those articles about handling bounces : Amazon SES Notifications Through Amazon SNS http : docs.aws.amazon.com ses latest DeveloperGuide notifications-via-sns.html .. . .. . Using Notifications with Amazon SES http : docs.aws.amazon.com ses latest DeveloperGuide notifications.html .. . .. . Testing Amazon SES Email Sending http : docs.aws.amazon.com ses latest DeveloperGuide mailbox-simulator.html .. . .. . Amazon SES Bounce FAQ http : docs.aws.amazon.com ses latest DeveloperGuide e-faq-bn.html .. . .. . But I still can t understand how to create controller function which will delete bounced emails from dispatch list using Symfony2 .", "It says here http : docs.aws.amazon.com ses latest DeveloperGuide smtp-issues.html .. . .. . .. . Amazon EC2 imposes default sending limits on email sent via port 25 and throttles outbound connections if you attempt to exceed those limits .", "What I read about suppression list : https : sesblog.amazon.com post Tx2H36ZIFTEVXOZ Goodbye-blacklist-Introducing-the-suppression-list .. . .. . Suppression list is a list of recipient addresses that Amazon SES blocks because the addresses have caused a hard bounce for any Amazon SES sender within the past 14 days....If you try to send an email to an address on the suppression list the call to Amazon SES succeeds but Amazon SES treats the email as-if it was a hard bounce .", "SES is the service in question not EC2 .", "Not terribly convenient for bulk mails I would guess Amazon is not orienting their service for this particular use .", "Even Amazon Rejects in their Send Test Email http : i.stack.imgur.com tAbxg.png", "To send emails through Amazon SES a user is required to verify the : .. . .. . 1 .", "I d like to use Amazon SES to send transactional emails to my users so I opened a case to ask to increase my sending allowance .", ".. . Use the Amazon SES console or API to configure the notification settings for an identity email-address or domain and notification type bounce complaint or delivery .", "After verifying your email go to the SMTP Services within the Amazon Web Services SES management page we navigated to before .", "We are already using Amazon SES for Change Password related emails but it also means we have to create the infrastructure to publish the topic send emails to all subscribers may be using Amazon Sqs and Amazon Ses .", "Amazon SES even overwrites an existing MessageId AFAIK .", "Beside Amazon SNS SES Is there any options to implement this", "I m trying to get a Simple Email Service account running .", "Email is sent through Amazon SES and has high quality recipient s name in the email single recipient personally crafted message extremely low bounce and complaint rate .", "SES -- Email Addresses -- Verify a new email-address Enter email-address Verify this email-address", "I have created an emailing system using Amazon s Simple Email Service SES that handles bounces to invalid messages with their Notification SNS and Queue SQS services .", "I believe I setup the Amazon SES with the right DKIM-Signature and link my personal gmail with SES .", "The recommendation is to use https multiple hosts and multiple threads http : www.slideshare.net AmazonWebServices from-0-to-100m-emails-per-day-sending-email-with-amazon-ses-svc301-aws-reinvent-2013 .", "The time of the machine you are sending the request from is too different from the Amazon SES server s time ." ] }
{ "confidence": [ 117.13321685791016, 111.4093017578125, 109.6637191772461, 100.48294830322266, 79.142822265625, 77.40016174316406, 76.87881469726562, 76.12063598632812, 74.80374145507812, 74.48519897460938, 72.08123779296875, 70.81727600097656, 70.81727600097656, 70.76930236816406, 70.68913269042969, 70.18244934082031, 69.35546875, 69.15735626220703 ], "content": [ "Question : The Amazon SES Simple Email Service self-described as a highly scalable and cost-effective bulk and transactional email-sending service . From everything that I can gather and by perusing the AWS SDK as well as the SES guides and API it looks great for transactional emails i.e . application emails sent in a one-off fashion but I cannot find anything about bulk emailing . Based on the price-point Amazon clearly wants needs customers to send very large quantities of mail . Is the expectation that you as someone implementing Amazon SES make individual calls per email send i.e . If you are sending a marketing email to 200 000 recipients do you really make 200K requests to the SendEmail or SendRawEmail via curl or whatever or using the AWS sdk This seems impractical . .. . Answer : You can use their Simple Queue Service http : aws.amazon.com en sqs to send bulk-email . Comment : Can you demonstrate with an example Comment : This is the correct answer but yes an example would be nice . If you re using Elastic Beanstalk you can have a worker environment listening to the queue . This scales well - much better than a single request cron job .", "Question : The Amazon SES Simple Email Service self-described as a highly scalable and cost-effective bulk and transactional email-sending service . From everything that I can gather and by perusing the AWS SDK as well as the SES guides and API it looks great for transactional emails i.e . application emails sent in a one-off fashion but I cannot find anything about bulk emailing . Based on the price-point Amazon clearly wants needs customers to send very large quantities of mail . Is the expectation that you as someone implementing Amazon SES make individual calls per email send i.e . If you are sending a marketing email to 200 000 recipients do you really make 200K requests to the SendEmail or SendRawEmail via curl or whatever or using the AWS sdk This seems impractical . .. . Answer : Thanks NuclearDog Upon further review I think the answer to the question is to call the api repeatedly x times below from the SES FAQ . Lets say we are sending out 200K mailings . First I would be very interested to know the realistic limit for how many ToAddresses we can tack on to one mailing . Once we know that we could maybe batch sends into groups of 100 or so ToAddresses at a time . Second as with most bulk mailings the content is slightly different per recipient even if it is just a Hello intro . Given that the mailing body will while similar will have personalization per email I believe the expectation is simply to call the api over and over . I was thinking perhaps there would be some way to queue up multiple emails with one call then do a send but this is likely not realistic given the nature of the API . SES is probably intended to be a bit more scalable in this fashion using one of the Amazon AWS database products . For now I think I would have to implement a queue or message system to call the api X times in an efficient so that all the api calls 1 don t take all day and 2 don t tax our systems too much . Q : Can I use Amazon SES to send bulk-email Yes . Simply call the SendEmail or SendRawEmail APIs repeatedly for each email you would like to send . Software running on Amazon EC2 Amazon Elastic MapReduce or your own servers can compose and deliver bulk emails via Amazon SES in whatever way best suits your business . If you already have your own bulk mailing software it s easy to update it to deliver through Amazon SES either by modifying the software to directly call Amazon SES or reconfiguring it to deliver email through an Amazon SES SMTP relay as described above .", "Question : The Amazon SES Simple Email Service self-described as a highly scalable and cost-effective bulk and transactional email-sending service . From everything that I can gather and by perusing the AWS SDK as well as the SES guides and API it looks great for transactional emails i.e . application emails sent in a one-off fashion but I cannot find anything about bulk emailing . Based on the price-point Amazon clearly wants needs customers to send very large quantities of mail . Is the expectation that you as someone implementing Amazon SES make individual calls per email send i.e . If you are sending a marketing email to 200 000 recipients do you really make 200K requests to the SendEmail or SendRawEmail via curl or whatever or using the AWS sdk This seems impractical . .. . Answer : The docs now clearly state that you can add up to 50 recipients http : s3.amazonaws.com awsdocs ses latest ses-api.pdf per message . So you can divide up your sender list in batches for 200k recipients you would have to make 4k API calls . Not terribly convenient for bulk mails I would guess Amazon is not orienting their service for this particular use . Comment : The email of these 50 recipients will be revealed to each other right If yes then it is not ideal . Comment : That would be a major flaw it might even be a breach of data-protection laws . Fortunately you can add email addresses to the BCC of mails so that recipients don t see each other . Comment : Thanks I totally forgot about BCC . Comment : With BCc...then they will not see them in To list and may guess that it was not personalized email . Comment : Yes if you want personalized email you have to do one call per recipient which will be more costly and may run against service limitations .", "Question : The Amazon SES Simple Email Service self-described as a highly scalable and cost-effective bulk and transactional email-sending service . From everything that I can gather and by perusing the AWS SDK as well as the SES guides and API it looks great for transactional emails i.e . application emails sent in a one-off fashion but I cannot find anything about bulk emailing . Based on the price-point Amazon clearly wants needs customers to send very large quantities of mail . Is the expectation that you as someone implementing Amazon SES make individual calls per email send i.e . If you are sending a marketing email to 200 000 recipients do you really make 200K requests to the SendEmail or SendRawEmail via curl or whatever or using the AWS sdk This seems impractical . .. . Answer : If you take a look in the API reference http : docs.amazonwebservices.com ses latest APIReference it would certainly look like you can send to more than one account at a time per request . SendEmail requires an argument of Destination of type Destination . Destination has three properties : ToAddresses CCAddresses BCCAddresses - all are of type string list . If you look at the example requests in the Developer Guide you ll see it specified the destination addresses as an argument similar to : .. . .. . I m going to go out on a limb and guess for a string list they re expecting multiple addresses in a format similar to : .. . .. . I actually stumbled across your question looking for answers to some of my own questions about SES - as of yet the docs are complete enough to use but not always terribly helpful - you often have to make some fun inferences to get answers - just a fair warning for you Cheers Edit : One other thing that might be possible I pulled from the quote you posted in your self-answer : .. . .. . either by modifying the software to directly call Amazon SES or reconfiguring it to deliver email through an Amazon SES SMTP relay as described above . .. . .. . If you set up your own SMTP server and just have it relay forward through SES that might handle your queuing etc . You can just shoot out a few thousand e-mails and your SMTP server will handle queuing etc before it hits Amazon .", "Question : I m searching for an working C example to send attachments with Amazon-SES . After reading that Amazon-SES http : aws.typepad.com aws 2011 07 amazon-simple-email-service-now-supports-attachments.html now supports sending attachments I was searching for an C example but was unable to find one . .. . Answer : I ve been through this lately . Good news it works and it s simple . We re using it on a daily basis . There exists an alternative to webservice calls now AWS SES provides the ability to directly address an SMTP endpoint . This makes attachment handling much easier . Please refer to my blog post http : tekaris.com blog 2012 07 25 sending-email-through-aws-ses for more information including the history of SES feature development in this area and a small code example . Hope that helps . Comment : The blog post link is dead .", "Question : I m searching for an working C example to send attachments with Amazon-SES . After reading that Amazon-SES http : aws.typepad.com aws 2011 07 amazon-simple-email-service-now-supports-attachments.html now supports sending attachments I was searching for an C example but was unable to find one . .. . Answer : I also need help with this but so far I ve found you need to send a multipart MIME message with the attachment encoded in base64 .", "Question : I m searching for an working C example to send attachments with Amazon-SES . After reading that Amazon-SES http : aws.typepad.com aws 2011 07 amazon-simple-email-service-now-supports-attachments.html now supports sending attachments I was searching for an C example but was unable to find one . .. . Answer : I think that using AWS SDK for .NET https : github.com aws aws-sdk-net and MimeKit https : github.com jstedfast MimeKit is very easy and clean solution . You can send e-mails with attachments via SES API instead of SMTP . You can write MimeMessage directly to MemoryStream and then use it with SES SendRawEmail :", "Question : I m searching for an working C example to send attachments with Amazon-SES . After reading that Amazon-SES http : aws.typepad.com aws 2011 07 amazon-simple-email-service-now-supports-attachments.html now supports sending attachments I was searching for an C example but was unable to find one . .. . Answer : I m not sure if this is what you are looking for but it s the only resource I ve been able to find on the subject . I would love a better answer to this question too . http : docs.amazonwebservices.com ses latest DeveloperGuide .. . .. . It states how to use it but is very cryptic at least to me . Any better guides out there", "Question : I m searching for an working C example to send attachments with Amazon-SES . After reading that Amazon-SES http : aws.typepad.com aws 2011 07 amazon-simple-email-service-now-supports-attachments.html now supports sending attachments I was searching for an C example but was unable to find one . .. . Answer : Found that here https : forums.aws.amazon.com thread.jspa messageID 325690 295303 .. . .. . Update : A method-signature has changed in .NET 4.5 which breaks the above : Getting System.Net.Mail.MailMessage as a MemoryStream in .NET 4.5 beta http : stackoverflow.com questions 9595440 getting-system-net-mail-mailmessage-as-a-memorystream-in-net-4-5-beta", "Question : I m searching for an working C example to send attachments with Amazon-SES . After reading that Amazon-SES http : aws.typepad.com aws 2011 07 amazon-simple-email-service-now-supports-attachments.html now supports sending attachments I was searching for an C example but was unable to find one . .. . Answer : You can setup IIS SMTP to relay through SES as well . You need to install stunnel http : www.stunnel.org downloads.html and set it up https : gist.github.com 3236880 .. . .. . Then you can just set the IIS SMTP Smart Host and some other options and it will relay your email through SES . Instructions from above linked gist : .. . .. . Instructions taken from Amazon s docs http : docs.amazonwebservices.com ses latest DeveloperGuide SMTP.MTAs.SecureTunnel.html and modified as necessary . 1 . Install stunnel : .. . .. . Download from stunnel s download page http : www.stunnel.org downloads.html .. . Run installer w default options create self-signed cert by answering questions .. . Open the c : program files x86 stunnel stunnel.conf file in notepad .. . Clear all the server configs under Example SSL server mode services section won t have a client yes line .. . Create a new client config : .. . .. . smtp-tls-wrapper .. . accept 127.0.0.1 : 2525 .. . client yes .. . connect email-smtp.us-east-1.amazonaws.com : 465 .. . .. . .. . Start stunnel.exe and ensure no errors are reported you will get a little systray icon .. . If it succeeds you can optionally install as a service by running stunnel.exe -install at-command line note this installs the service but doesn t start it so start it .. . Test the connection at cmd line run telnet localhost 2525 and you should see an SMTP response from Amazon s server if telnet isn t installed add the feature in Server Manager Features Add Feature .. . .. . 2 . Configure IIS SMTP .. . .. . Set Smart Host as 127.0.0.1 include the brackets .. . In the Outbound Connections section set outgoing port to 2525 like the stunnel.conf file .. . In the Outbound Security section set authentication information to your Amazon SMTP credentials set it to basic-authentication NOTE : DO NOT CHECK THE TLS CHECKBOX Comment : I would only use this setup if you couldn t just change your code to send directly through SES or were using a system that didn t support the code option see tekaris.com blog 2012 07 25 sending-email-through-aws-ses http : tekaris.com blog 2012 07 25 sending-email-through-aws-ses", "Question : It says here http : docs.aws.amazon.com ses latest DeveloperGuide smtp-issues.html .. . .. . .. . Amazon EC2 imposes default sending limits on email sent via port 25 and throttles outbound connections if you attempt to exceed those limits . To remove these limits submit a Request to Remove Email Sending Limitations . You can also connect to Amazon SES via port 465 or port 587 neither of which is throttled . Why doesn t it throttle ports 465 and 587 Why doesn t everyone use these ports instead of 25 and avoid the throttling issue altogether Comment : A small PS the title of this question and the content don t match the quote is about EC2 imposing limits on port 25 I d change it but it would need authorising so I ll leave it to someone else Comment : So the limits only come into play when sending from EC2 Comment : No you can send from anywhere with the proper credentials . The limits are global . Comment : Within an AWS context EC2 is the only place that you could openly send email from for that reason the limits only apply to EC2 . Once you send mail into SES then they have more explicit message limits that are ramped up as you prove yourself as a none spammer . .. . Answer : This is an anti-spam measure . Without this restriction you could create a new Amazon account fire up an EC2 machine and send a few million spam messages before anything could be done . By throttling the connection it makes that scenario unavailable to new user accounts . 465 587 are authenticated ports and it specifically mentions Amazon Simple Email Service SES Which is specifically designed for bulk sending email and is tuned to detect use by spammers . Edited to add SES information .. . .. . When you first sign up for SES you are placed in a sandbox . This will place the following restrictions upon your account . You can only send mail to the Amazon SES mailbox simulator and to verified email addresses and domains .. . You can only send mail from verified email addresses and domains . You can send a maximum of 200 messages per 24-hour period . Amazon SES can accept a maximum of one message from your account per second . Which basically means that if you want to use SES in a production scenario because you can only send to from accounts that you have explicitly verified . You need to request a sending limit raise . Which you can either do from the console or by raising a support ticket . You will then have a new sending limit applied and a daily quota . For instance on my dev account I have a 50 000 per day daily quota and 14 second sending limit . If I were to attempt to send more than 14 messages per second over SMTP regardless of port you will get this SMTP error message 454 Throttling failure : Maximum sending rate exceeded if I tried to send more than 50 000 messages I would receive 454 Throttling failure : Daily message quota exceeded .. . .. . In order to understand how throttling works you need to think about the process that is occurring . When you connect to SES over SMTP on any port you pass your credentials AWS will check the limits on your account and start counting against your limits . At that point you are an authenticated user coming over an authenticated endpoint you cannot send via SES anonymously - You can receive email in SES but there are no incoming email limits applied apart from message size In that context you can see that throttling a particular port would be entirely pointless . The only AWS service to have default throttling on port 25 is EC2 . the ONLY time that SES will throttle your messages is when you exceed your allowed limits . Those limits can never be removed they can only be increased albeit increased to reasonably insane numbers .. . .. . Those limits will grow over time if you are diligent in your use of SES and your handling of blocked bounced messages your numbers will increase . So in summary . SES Does not throttle port 25 port 465 or port 587 . SES will only rate limit messages based on your quotas . SES Rate limits apply entirely independently to TCP port numbers .", "Question : I m using Amazon SES SNS API of Amazon for sending email and getting notification . Is Amazon provide any scheduler Api for scheduling the email for future As i want to schedule my email by using Amazon API . .. . Answer : No SES does not provide this functionality . You would need to do that yourself using a task scheduler such as the built-in windows or perhaps quartz.net if you need something more sophisticated", "Question : I m using Amazon SES SNS API of Amazon for sending email and getting notification . Is Amazon provide any scheduler Api for scheduling the email for future As i want to schedule my email by using Amazon API . .. . Answer : While they may not offer it directly in SES or SNS they do offer similar functionality with SQS or SWF .", "Question : While the SES dashboard shows aggregated statistics about the bounce rate of emails sent through the service I do not see a way of retrieving the individual addresses that bounced . Is this possible Our situation is that the from address we had set in certain emails was incorrect and resolved to a non existant mailbox on our verfied sender domain so anything SES would have forwarded to the from address is likely gone . .. . Answer : Use the Amazon SNS simple notification service and then you can add your email-address - or Amazon SQS service for holding a log of all bounces complaints . Comment : The question states the emails were already sent . SNS SQS or setting the email will only work for future emails .", "Question : I am sending bulk emails using amazon-ses . My code is given below .. . .. . Here I have given my html content as string to the variable body . The mail sent successfully . But I got the html content as email . How to send html content in mail . What changes in the code will solve this issue Comment : What does the received email look like What do you mean by I got the html content as email What email-client are you viewing the mail in Comment : I got mail as html .... . I mean the original html code full of tags Comment : What email-client are you using Comment : I am doing this as programatically using amazon-java-sdk Comment : What email-client are you using to view the received email in If you re just viewing the text content of the email it will show as HTML markup and if you re using a client that can render HTML then you will see the expected result assuming you ve done everything properly on the sending side . .. . Answer : From the Amazon SES developerGuide http : docs.amazonwebservices.com ses latest DeveloperGuide SendingEmail.Formatted.html : .. . .. . You should use the WithHtml method : Comment : Thanks Gerard. .", "Question : We ve changed our email service from Mandrill to Amazon SES . We are using it with SMTP . In Mandrill we had access to some details such as : .. . .. . raw content of the emails .. . delivery dates .. . is the email viewed by the recipient .. . are the links in the email clicked .. . .. . But in SES Management Console Sending Statistics page it shows only the numbers without any details for deliveries bounces complaints rejects . And I ve looked into CloudTrail CloudWatch S3 combination with no luck . Also I m not sure if this is still valid but this page https : aws.amazon.com about-aws whats-new 2015 05 amazon-ses-is-now-integrated-with-cloudtrail says .. . .. . All Amazon SES APIs except for the email-sending APIs SendEmail and SendRawEmail are supported . So I can t seem to log these data with CloudTrail . Can I log them via another method maybe a third party tool . How do other people log these Or do they Maybe it s not possible with SMTP but possible with only API Example scenario .. . .. . We re using multiple IAM access keys with multiple users for SES . Let s say there is 50 increase in complaints . Doesn t AWS offer any tool to find the culprit access key .. . Answer : For raw content logging you would have to proxy the SMTP requests through some service that logs everything and then sends it to SES or just log everything in your code before making the call to SES . For delivery rates you would have to setup SNS listeners to process SES bounce notifications http : docs.aws.amazon.com ses latest DeveloperGuide best-practices-bounces-complaints.html . For email viewed and links clicked you would have to build your own analytics service to add tracking to the emails you send or find some third-party service that does that for you . There is a reason SES is so much cheaper than other email services like Mandrill it is because you don t get all the features that the other services provide . Honestly if you want things like click tracking analytics I would suggest you rethink moving away from Mandrill or look at other email services like SendGrid . SES is more of a raw email sending service that doesn t provide any of those higher-level features you are looking for . Comment : We re using multiple IAM access keys with multiple users for SES . Let s say there is 50 increase in complaints . Doesn t AWS offer any help as in tools not support plans to find the culprit access key Comment : @Taylan No I can t think of any easy way to track down the source of the complaints . As you can see in the documentation here AWS doesn t tie complaint notifications to the IAM account that generated the email : docs.aws.amazon.com ses latest DeveloperGuide http : docs.aws.amazon.com ses latest DeveloperGuide notification-contents.html complaint-object Comment : OK than thanks for the info . I ll wait a week before accepting the answer just in case .", "Question : Email NOOB here . Planning to use Amazon SES for transaction email . Trying to understand how to handle emails that bounce or get marked as spam . SES automatically adds bounce complaint recipients to the suppression list . What I read about suppression list : https : sesblog.amazon.com post Tx2H36ZIFTEVXOZ Goodbye-blacklist-Introducing-the-suppression-list .. . .. . Suppression list is a list of recipient addresses that Amazon SES blocks because the addresses have caused a hard bounce for any Amazon SES sender within the past 14 days....If you try to send an email to an address on the suppression list the call to Amazon SES succeeds but Amazon SES treats the email as-if it was a hard bounce . Is there a benefit to setting up SNS + SQS to monitor complaints and bounces if I don t have a list of emails as described here https : sesblog.amazon.com post TxJE1JNZ6T9JXK Handling-Bounces-and-Complaints .. . .. . enter image description here http : i.stack.imgur.com uRidD.png .. . .. . If an email is on suppression list then the next time SES tries sending the email will never get to ISP . So the negative is that I pay for that email transaction . What are the other negatives What am I missing here Clarification : Totally understand why my question can rub people the wrong way . I m not a marketer or spammer with a list of emails . I have a service for which people sign up for . The emails that can be mistyped - welcome email reset a password email document to someone else . These actions require a user to type in emails . If they mistyped or have a bad email-address the email will bounce or marked as spam . How do I handle it With a list I can just remove that email from a list . With transaction email do I start keeping my own blacklist Then check my blacklist before sending .. . Answer : This question leaves me with an impression that I as a human with an e-mail address find highly offensive . It appears to be an attempt to justify a lack of willingness to be a responsible e-mail sender . Hopefully I have misinterpreted your motivation . Consider this : SES does not allow you to take a path of least resistance easily . You have to accept the notifications one way or another : .. . .. . You must receive bounce and complaint notifications either by email or through Amazon SNS .. . .. . http : docs.aws.amazon.com ses latest DeveloperGuide notifications.html .. . .. . This requirement should be sufficient to answer the question . Maintain your own list of people you should not send mail to ever again and don t try to send to them . But there s more . SES is a service for legitimate senders and they are monitoring sender behavior . High bounce and complaint rates put your account at risk of being shut down so you need to make sure that you have a process in-place to remove recipient addresses that have bounced or complained from your recipient list . .. . http : docs.aws.amazon.com ses latest DeveloperGuide best-practices-bounces-complaints.html .. . .. . So apart from my own indignation I believe the implications are clear -- SES expects you to manage your list and your bounces properly . The suppression list is not for convenience . It is for the benefit of SES and its conscientious users helping SES maintain a high reputation for only delivering mail people want to people who want it and thereby maintain high deliverability for legitimate mail by preventing the inevitable backlash from repeated bounces . It s a safety net -- not a safety harness . .. . .. . If you re sending only transactional emails then your list -- assuming you don t already have some opt-in validation records -- starts with the recipient of the first e-mail you send and instead of being a list from which you remove people is a list of people you ve sent to and whether it worked out or not . It s more work up front but you will hate yourself soon enough if you send automated emails without keeping track of what you sent and who you sent it to and the associated SES message-id . In case of a bounce or complaint store the info and flag that address in your list so that you can avoid sending to it in the future . Otherwise store the delivery notification for your future reference . Comment : Thank you for addressing these points . I understand the concern and I ve updated my question with Clarification section . tl dr so how do people who send transaction emails handle bounces complaints With a list it s an easy remove from list answer but with transaction email Comment : Updated . Maintain a local list of bounces and complaints .", "Question : I m searching for an working C example to send attachments with Amazon-SES . After reading that Amazon-SES http : aws.typepad.com aws 2011 07 amazon-simple-email-service-now-supports-attachments.html now supports sending attachments I was searching for an C example but was unable to find one . .. . Answer : I think you need to follow the instructions on this link http : docs.amazonwebservices.com ses latest DeveloperGuide SendingEmail.Raw.html . Amazon doesn t let you add attachments or other more complicated message types iCalendar events . Essentially you need to handcraft the message body by string building and manipulation . Currently I do this for iCalendar format emails on a legacy system . It s a bit of a pain in the ass but if you read RFC 2822 it tells you pretty clearly what the format is . Special things to pay attention to : .. . .. . Base64 encoding of the data .. . MIME types .. . Make sure your multipart boundaries match up and are unique .. . Finicky problems with the number of line-breaks n after certain lines .. . .. . Best of luck . I don t know if there is an open library that will do this sort of thing for you in C . If you can find one then try use it because dealing with the intricacies of the RFC should have a medical notice for increased blood pressure and hair loss ." ] }
[ "yes-answer-long", "yes-answer-short" ]
amazon-ses
UNK_RELATION
jvm-languages@byte@66
jvm-languages -- languages that compile their source code to the @placeholder code of the java virtual-machine are commonly called jvm-languages .
{ "confidence": [ 63.96067810058594, 60.58007049560547, 54.816612243652344, 54.60978698730469, 53.18935775756836, 51.57671356201172, 51.486934661865234, 51.486934661865234, 49.97428894042969, 49.45446014404297, 48.55385971069336, 48.55385971069336, 47.730743408203125, 46.851436614990234, 46.851436614990234, 44.97816848754883, 44.60789108276367, 43.966732025146484, 43.909114837646484, 43.73030090332031, 43.73030090332031, 43.39404296875, 41.158817291259766, 40.607444763183594, 40.27119064331055, 39.769500732421875, 37.710689544677734, 37.62053680419922, 37.62053680419922, 37.261539459228516, 36.853763580322266, 36.785987854003906, 36.785987854003906, 36.775604248046875, 36.64026641845703, 36.52149200439453, 36.51649475097656, 36.36785125732422, 36.289878845214844, 36.1776008605957, 36.0875129699707, 35.6286735534668, 35.55926513671875, 35.450721740722656, 34.93311309814453, 34.92717742919922, 34.92717742919922, 34.65224838256836, 34.58745574951172, 34.44859313964844, 34.2555046081543, 34.2555046081543, 34.210784912109375, 33.94934844970703, 33.50249481201172, 32.7844123840332, 32.73603820800781, 32.56407165527344, 32.50065612792969, 32.48295593261719, 32.48295593261719, 32.42155456542969, 32.21513366699219, 31.948089599609375, 31.804325103759766, 31.46751594543457, 31.396617889404297, 31.299243927001953, 31.299243927001953, 31.299243927001953, 31.299243927001953, 31.247116088867188, 31.17209815979004, 31.049171447753906, 31.049171447753906, 30.98170280456543, 30.868051528930664, 30.826492309570312, 30.491416931152344, 30.491416931152344, 30.418132781982422, 30.298583984375, 30.19598388671875, 29.878814697265625, 29.805213928222656, 29.628742218017578, 29.628742218017578, 29.500078201293945, 29.419559478759766, 29.360103607177734, 29.360103607177734, 29.360103607177734, 29.360103607177734, 29.25417709350586, 29.13992691040039, 29.10702896118164, 29.10702896118164, 29.10702896118164 ], "content": [ "Tag java changed to jvm-languages .", "Specifics to other JVM languages", "I was contemplating on the necessity of different non-Java languages coming up on the JVM .", "Note that at this point I will be focusing on JVM based languages .", "You can use all languages that are based on JVM .", "One is able to run codes written in other languages without using their virtual-machine while java requires JVM to run the code .", "The JVM languages typically have plugins for Eclipse e.g .", "There is a mailing list about the topic jvm-languages .", "imho there is nothing brilliant in the fact that you can run other languages on the jvm .", "Java has added invokedynamic to specifically cater for dynamic non-Java JVM languages .", "I could help noticing that there are a lot of mature JVM languages .", "Scala Clojure and Kotlin are JVM languages already known to work .", "I don t think the jvm was intended to be a multi-language platform but it s proven to work well with non-java languages .", "However most of the mentioned languages require pretty decent JVM environment .", "How do other JVM languages like Scala and Clojure handle it", "Why is it that we have a virtual-machine for Java while for other popular languages like C++ or python there is no such virtual-machine required", "In many cases you can also use JVM languages without a plugin in a regular Java project .", "All JVM languages are compiled by the JVM at runtime https : en.wikipedia.org wiki Just-in-time compilation so that distinction is not really very interesting .", "None of the languages that target the .NET Framework have as much dominance in that area as Java has with the JVM but many people use those languages for no other purpose except to write code for the .NET framework .", "I would like to know if this is possible in other statically typed JVM languages too : Scala Kotlin Ceylon etc .", "That is why other functional jvm-languages like Clojure need special constructs recur .", "very recently the jvm specification noticed the existence of other languages and added invoke-dynamic which is currently accessible only from the bytecode no java construct for that .", "Real CPU machine languages have no such restriction typically .", "Please refer to the domain-model example the docs and the 7-languages if you want to learn more about the inferred JVM model .", "It s worth noting that many JVM languages like Clojure don t need to be explicitly installed they are downloaded as required by standard Java build tools like Maven .", "a Java library in Scala and that happens quite a lot even with other languages .", "I recently read in the Java Virtual Machine Specification that the JVM does not support a NaN value nor a way to signal overflow .", "What do you mean by combined with other languages", "It should be easier to learn other FP languages .", "Meanwhile programs written in other languages that don t run on a Virtual Machine may need different compilations of the code in order to run on different operating systems .", "Most so-called dynamic languages require the VM to have reflection .", "Does the language provide any inherent advantages to make up for the fact that Jython and Jruby skills are applicable to their parent languages outside of the JVM", "There are many dynamic languages that target Sun s JVM Groovy Scala Jython Jruby etc and I was sure there are many that target Adobe s AVM as well .", "the JVM", "JVM is like a virtual Machine that works to Load the class and Bytcode varifier execute the code .", "Historically there have actually been quite a few languages which were virtual-machine based .", ".. . Frege programs are compiled to Java and run in a JVM .", "Many languages provide an FFI a foreign function interface which is a way to call functions written in other languages from your language .", "Are there any stack-based machine examples except the JVM", "it s easier to translate compile languages to simple bytecode rather than to other high-level language .", "Being spoiled by all those new features in JVM-based languages Groovy Scala Clojure you name it I was considering using one of them for my code .", "With all the money poured into .NET or the length of time C has been around or all the modern programming-languages and VMs recently created why does the JVM stand alone", "The Java Virtual Machine means that Java code runs on every machine with the correct version of the Virtual Machine on it .", "In theory because the JVM is supposed to represent a full virtual-machine you could have a computer that booted up and just ran a JVM without any OS or rather the JVM would be the OS and your programs would just be Java bytecodes and class files .", "The source for this is entirely in the JVM in C++ .", "For teamwork to work the team must be in agreement about what languages they know .", "you can run many different languages on your OS as well .", "JVM implementations are written according to a JVM spec .", "What is it about the JVM as a machine that prevents or makes this difficult", "It runs on a JVM but supports a lot of advanced features that Java doesn t still fully compatible with a pure java JVM .", "I know that integration works pretty well between Java and Clojure and Java and Scala but what about other languages like C++", "I know that integration works pretty well between Java and Clojure and Java and Scala but what about other languages like C++", "The Java virtual Machine is a stack based machine .", "In Java Scala or generally any JVM language there is a set of packages that is imported by default .", "I have a strong interest in functional languages because they have so many advantages but I don t know if they are really used in practice .. . .. . They definitely are although not nearly as much as object-oriented or procedural languages .", "By consuming Java bytecode rather than Java source code the RoboVM ahead-of-time compiler can at least in theory be used with any JVM language that compiles down to bytecode .", "I m getting lately interested in the JVM thanks to this awesome language called Ceylon .", "Is the combined use of functional languages and Java in a real world project scenario really fertile or do the possible disadvantages outweigh the possible gains", "What about other languages such as Groovy Clojure Scheme", "Oracle s JVM is heavily based on OpenJDK .", "but the jvm also enforces a lot of limits .", "The Clojure compiler produces Java byte code which is typically then JIT-compiled to native-code by the JVM .", "@sutanudalui the JVM was designed for Java so it doesn t have any features Java doesn t use .", "In any case structural restrictions on code executing on the JVM are indeed the issue .", "But all these languages are very high level and complicated to create a compiler for them .", "for example you can t benefit from tail-call-optimization startup time is a disaster so you need cheats always running daemon to use it efficiently for a scripting-language debugging stacktraces of non-java languages is a nightmare haskell is still not ported to jvm because of technical difficulties and completely different evaluation models .. . .. . i think the jvm is brilliant because after a years it s really fast GC JIT stable portable with huge market penetration and zillions of libraries .", "Java program execute where JVM Installed and Works .", "Could a programmer who works in a team with other programmers that don t know any functional language use it combined with other languages", "This means that two different teams use two different languages and do completely different things .", "Could a programmer who works in a team with other programmers that don t know any functional language use it combined with other languages", "Depending on your language implementation there will be more or less support for calling to or from your language from other languages .", "You can always check out JIProlog which is rather a Prolog implementation in Java not a JVM Prolog but I guess it should be possible to reuse some of their code .", "Some of the JVM bytecode may later be compiled to machine code by HotSpot if you re using OpenJDK or a derivative of it .", "The JVM is broadly used : Scala Groovy Jython etc .", "More specifically what makes the JVM unique", "Edited to Add : I ll award the answer either to the best individual reference mentioned or to someone who provides a pointer to a website perhaps built-in response to this question that best concentrates catalogs JVM implementation wisdom and the practical consequences on client languages and developers .", "Some interesting related questions on SO : Tail-call optimization in JVM http : stackoverflow.com questions 105834 does-the-jvm-prevent-tail-call-optimizations Killer JVM features http : stackoverflow.com questions 1656639 killer-facility-or-scenario-that-would-make-another-jvm-a-better-choice-than-the optimizations that are going to be useless tomorrow http : stackoverflow.com questions 296297 what-optimizations-today-are-going-to-be-useless-tomorrow Differences between JVM implementations http : stackoverflow.com questions 747360 difference-between-jvm-implementations .", "Note JVM Java though it would certainly nice to have it there too .", "JVM bytecode produced by scalac could be decompiled into Java but the result won t resemble anything readable or maintainable .", "why does the JVM stand alone .. . .. . Java receives a great support from Oracle SUN before and community .", "Compiling for the JVM will allow one s code to be run more widely than if one compiles to native-code .", "Your code goes through the threads of the executing JVM but in your question you are saying all java processes .", "Why there is a need for Java virtual-machine", "There are a few other stack-based languages of which the first that jumps to mind is Forth http : en.wikipedia.org wiki Forth 28programming language 29 .", "scalac will compile your code to java bytecode .", "Is there a JVM language that could help me to do this", "The JVM does not mention the existence of registers anywhere .", "I have a strong interest in functional languages because they have so many advantages but I don t know if they are really used in practice and how well they can be integrated into a mainstream Java C or C++ environment .", "I also created a virtual-machine for that runs the intermediate code created by the compiler .", "The JVM obviously has no problem with loops .", "Is there a convention on how to add a JVM language", "The JVM is very hard to sandbox correctly .", "Even the JVM follows this model on desktops .", "Could it be that you are confusing JVM processes and threads inside a JVM", "I can t imagine it would be hard to compile Haskell to the JVM if you did not care about performance at all and only focus on what the Haskell language requires .", "Do you guys know of an alternative that works with Sun Jvm", "yeah : edited my question to focus it a little more on what differentiates the jvm .", "I m comparing the stability of the JVM today vs . 15 years ago ." ] }
{ "confidence": [ 65.26364135742188, 65.07139587402344, 64.81097412109375, 63.118167877197266, 57.92233657836914, 57.276180267333984, 56.6936149597168, 56.39657211303711, 56.31281661987305, 55.72111129760742, 55.524169921875, 55.469642639160156, 55.46578598022461, 54.63877487182617, 54.1421012878418, 53.775184631347656, 52.12105941772461, 51.799217224121094, 50.30615234375, 49.76176452636719 ], "content": [ "Question : Why there is a need for Java virtual-machine One is able to run codes written in other languages without using their virtual-machine while java requires JVM to run the code . Why is it that we have a virtual-machine for Java while for other popular languages like C++ or python there is no such virtual-machine required Comment : LOLOLOLOLOLOLOLOL Comment : en.wikipedia.org wiki HipHop for PHP http : en.wikipedia.org wiki HipHop for PHP Comment : Most applications required the runtime environment which supports the language e.g . libc or MVCxxx.DLL While you can compile C in such a way that no external library is needed this is rarely done outside embedded systems Comment : Are you asking the question in your title or the question in your question Re your title I was using a virtual-machine in 1976 and later I got to work on one that had been designed in the 1960s . Comment : Perl Python elisp clisp most of the older JavaScript implementations various Forths various ML implementations hordes of the less known languages - all are all running on top of virtual machines . So what are you talking about .. . Answer : Java is perhaps the most popular virtual-machine-based language but it is by no stretch of the imagination the only one . The .NET Framework uses a different virtual-machine . None of the languages that target the .NET Framework have as much dominance in that area as Java has with the JVM but many people use those languages for no other purpose except to write code for the .NET framework . Historically there have actually been quite a few languages which were virtual-machine based . Perhaps the most famous platform-independent VM prior to Java was the USCD P-system http : en.wikipedia.org wiki UCSD P-system 5d which was probably most widely used on the Apple II series computers but was also available for the PC . Some games like Wizardry which were based on the P-system and originally published for the Apple were later released for the PC the PC versions of such games behaved almost exactly as the Apple versions since they were running almost the same code .", "Question : Why there is a need for Java virtual-machine One is able to run codes written in other languages without using their virtual-machine while java requires JVM to run the code . Why is it that we have a virtual-machine for Java while for other popular languages like C++ or python there is no such virtual-machine required Comment : LOLOLOLOLOLOLOLOL Comment : en.wikipedia.org wiki HipHop for PHP http : en.wikipedia.org wiki HipHop for PHP Comment : Most applications required the runtime environment which supports the language e.g . libc or MVCxxx.DLL While you can compile C in such a way that no external library is needed this is rarely done outside embedded systems Comment : Are you asking the question in your title or the question in your question Re your title I was using a virtual-machine in 1976 and later I got to work on one that had been designed in the 1960s . Comment : Perl Python elisp clisp most of the older JavaScript implementations various Forths various ML implementations hordes of the less known languages - all are all running on top of virtual machines . So what are you talking about .. . Answer : The main reason is so that java can be run on any os that can download the jvm and it will run the same way that it did on your computer .", "Question : Why there is a need for Java virtual-machine One is able to run codes written in other languages without using their virtual-machine while java requires JVM to run the code . Why is it that we have a virtual-machine for Java while for other popular languages like C++ or python there is no such virtual-machine required Comment : LOLOLOLOLOLOLOLOL Comment : en.wikipedia.org wiki HipHop for PHP http : en.wikipedia.org wiki HipHop for PHP Comment : Most applications required the runtime environment which supports the language e.g . libc or MVCxxx.DLL While you can compile C in such a way that no external library is needed this is rarely done outside embedded systems Comment : Are you asking the question in your title or the question in your question Re your title I was using a virtual-machine in 1976 and later I got to work on one that had been designed in the 1960s . Comment : Perl Python elisp clisp most of the older JavaScript implementations various Forths various ML implementations hordes of the less known languages - all are all running on top of virtual machines . So what are you talking about .. . Answer : The Java Virtual Machine means that Java code runs on every machine with the correct version of the Virtual Machine on it . Meanwhile programs written in other languages that don t run on a Virtual Machine may need different compilations of the code in order to run on different operating systems .", "Question : The JVM is broadly used : Scala Groovy Jython etc . I ve heard it described as remarkable brilliant and massively under-appreciated . Why More specifically what makes the JVM unique With all the money poured into .NET or the length of time C has been around or all the modern programming-languages and VMs recently created why does the JVM stand alone Comment : I d love to know the answer to this but it probably will get closed as to opinion-based . Comment : yeah : edited my question to focus it a little more on what differentiates the jvm . .. . Answer : imho there is nothing brilliant in the fact that you can run other languages on the jvm . you can run many different languages on your OS as well . but i think that using simple bytecode as a native language of the jvm has helped a lot . it s easier to translate compile languages to simple bytecode rather than to other high-level language . very recently the jvm specification noticed the existence of other languages and added invoke-dynamic which is currently accessible only from the bytecode no java construct for that . but the jvm also enforces a lot of limits . for example you can t benefit from tail-call-optimization startup time is a disaster so you need cheats always running daemon to use it efficiently for a scripting-language debugging stacktraces of non-java languages is a nightmare haskell is still not ported to jvm because of technical difficulties and completely different evaluation models .. . .. . i think the jvm is brilliant because after a years it s really fast GC JIT stable portable with huge market penetration and zillions of libraries . so you write once and later run on your pc server phone tv and washing machine . why not .NET nor C i guess : portability price luck . most servers are non-windows . it s cheaper to start with java than .NET . C is not portable doesn t have GC", "Question : I have created a compiler in C using lex bison for a dynamic typed programming language that supports loops functions declarations inside functions recursive calls etc . I also created a virtual-machine for that runs the intermediate code created by the compiler . I was now thinking instead of compiling to my own intermediate code compile it to java byte code . I saw that the question about creating a JVM language has already been asked http : stackoverflow.com questions 716613 how-to-make-a-net-or-jvm-language but I don t find the answer very informative . So here are my questions : .. . .. . 1 . I guess to create a language for JVM a must is to read the JVM specification http : java.sun.com docs books jvms second edition html VMSpecTOC.doc.html book what other books can you suggest except Dragon Book of course I m mostly concerned in books or tutorials on how to create a JVM language not a compiler in general . 2 . There are many Java libraries to read-write and change .class files like jclasslib http : www.ej-technologies.com products jclasslib overview.html bcel http : jakarta.apache.org bcel gnu bytecode http : www.gnu.org software kawa api gnu bytecode package-summary.html etc . Which one would you suggest Also are you aware of C libraries that do the same job 3 . I was thinking to have a look at maybe another language that targets the JVM like Clojure Jython or JRuby . But all these languages are very high level and complicated to create a compiler for them . I was looking for a simpler I don t mind it it s unknown or unused programming language that targets the JVM and it s compiler is open-source . Any ideas .. . Answer : First I d back off modify my compiler to output actual Java instead of Java byte codes which means creating more of a translator than compiler and compile the Java output with whatever Java environment is convenient which would probably generate better object code than my own compiler . You could use the same technique eg compile to C to generate CLI byte codes or compile to Pascal to generate P-code etc . It s not clear why you re considering Java codes instead of using your own VM but if it s for performance then of course you should also consider compiling to actual machine code . Comment : matt.might.net articles compiling-to-java http : matt.might.net articles compiling-to-java Comment : Compiling for the JVM will allow one s code to be run more widely than if one compiles to native-code . Further compiling to bytecode will make it possible for code to do some things which are not possible within the Java language itself .", "Question : I have created a compiler in C using lex bison for a dynamic typed programming language that supports loops functions declarations inside functions recursive calls etc . I also created a virtual-machine for that runs the intermediate code created by the compiler . I was now thinking instead of compiling to my own intermediate code compile it to java byte code . I saw that the question about creating a JVM language has already been asked http : stackoverflow.com questions 716613 how-to-make-a-net-or-jvm-language but I don t find the answer very informative . So here are my questions : .. . .. . 1 . I guess to create a language for JVM a must is to read the JVM specification http : java.sun.com docs books jvms second edition html VMSpecTOC.doc.html book what other books can you suggest except Dragon Book of course I m mostly concerned in books or tutorials on how to create a JVM language not a compiler in general . 2 . There are many Java libraries to read-write and change .class files like jclasslib http : www.ej-technologies.com products jclasslib overview.html bcel http : jakarta.apache.org bcel gnu bytecode http : www.gnu.org software kawa api gnu bytecode package-summary.html etc . Which one would you suggest Also are you aware of C libraries that do the same job 3 . I was thinking to have a look at maybe another language that targets the JVM like Clojure Jython or JRuby . But all these languages are very high level and complicated to create a compiler for them . I was looking for a simpler I don t mind it it s unknown or unused programming language that targets the JVM and it s compiler is open-source . Any ideas .. . Answer : I was thinking to have a look at maybe another language that targets the JVM like Clojure Jython or JRuby . But all these languages are very high level and complicated to create a compiler for them . Suggestion : You could have a look at Lua Programming Language http : www.lua.org there are JVM implementations of it like LuaJ http : sourceforge.net projects luaj . Lightweight fast Java-centric Lua interpreter written for J2ME and J2SE with libraries for basic string table package math io os debug and coroutine packages a compiler luajava bindings and JSR-233 pluggable scripting engine bindings . Not to be confused with LuaJava that uses a native libs with JNI approach . Comment : Thank you . I will take a look", "Question : I have created a compiler in C using lex bison for a dynamic typed programming language that supports loops functions declarations inside functions recursive calls etc . I also created a virtual-machine for that runs the intermediate code created by the compiler . I was now thinking instead of compiling to my own intermediate code compile it to java byte code . I saw that the question about creating a JVM language has already been asked http : stackoverflow.com questions 716613 how-to-make-a-net-or-jvm-language but I don t find the answer very informative . So here are my questions : .. . .. . 1 . I guess to create a language for JVM a must is to read the JVM specification http : java.sun.com docs books jvms second edition html VMSpecTOC.doc.html book what other books can you suggest except Dragon Book of course I m mostly concerned in books or tutorials on how to create a JVM language not a compiler in general . 2 . There are many Java libraries to read-write and change .class files like jclasslib http : www.ej-technologies.com products jclasslib overview.html bcel http : jakarta.apache.org bcel gnu bytecode http : www.gnu.org software kawa api gnu bytecode package-summary.html etc . Which one would you suggest Also are you aware of C libraries that do the same job 3 . I was thinking to have a look at maybe another language that targets the JVM like Clojure Jython or JRuby . But all these languages are very high level and complicated to create a compiler for them . I was looking for a simpler I don t mind it it s unknown or unused programming language that targets the JVM and it s compiler is open-source . Any ideas .. . Answer : I would also recommend ASM but have a look at Jasmin http : jasmin.sourceforge.net I used it or : had to use it for an university-project and it works quite well I wrote a lexer parse analyzer optimizer generator combination for a programing-language using java and jasmin so generating JVM Code . I uploaded the code here http : www.dbruhn.de compilerpraktikum the interesting part should be the source-code itself http : www.dbruhn.de compilerpraktikum src edu kit compilerpraktikum . In the folder bytecode InsanelyFastByteCodeCreator.java you find a pice of code which transforms an AST Tree into the input format of jasmin assembler . Is quite straight forward . The source-language which was tranformed to the AST by Lexer+Parser+Analyzer is a subset of Java called MiniJava . It lacks some complicated features like Inheritance Constructors static-methods private fields methods . None of those features are difficult to implement but there was another task to write an X86 backend so to generate machine-assembler and those things tend to get difficult if you got no JVM which handles some things . In case you wonder about the strange Class name : The task of the university project was to transform the AST into a a SSA https : secure.wikimedia.org wikipedia en wiki Static single assignment form Graph so a graph representing the input code then optimize the graph and then turn the graph into java byte code . That was about 3 4 of the work of the project and the InsanlyFastByteCodeCreator was just a short-cut to test everything . .. . .. . Have a look at the Java Virtual Machine book from Jon Meyer and Troy Downing . This book heavily references the Jasmin-Assembler it s quite helpful for understanding the JVM internals . Comment : Thanks for your answer I will take a look at Jasmin . And also I would be glad if you could upload the source so I can take a look . About the book you suggested it seems interesting but it s out of print and quite old : . Comment : The book is very cheap second-hand though . I found a copy for a few dollars . Comment : Have a look at my edit above if you have any questions I ll be glad to help .", "Question : I have created a compiler in C using lex bison for a dynamic typed programming language that supports loops functions declarations inside functions recursive calls etc . I also created a virtual-machine for that runs the intermediate code created by the compiler . I was now thinking instead of compiling to my own intermediate code compile it to java byte code . I saw that the question about creating a JVM language has already been asked http : stackoverflow.com questions 716613 how-to-make-a-net-or-jvm-language but I don t find the answer very informative . So here are my questions : .. . .. . 1 . I guess to create a language for JVM a must is to read the JVM specification http : java.sun.com docs books jvms second edition html VMSpecTOC.doc.html book what other books can you suggest except Dragon Book of course I m mostly concerned in books or tutorials on how to create a JVM language not a compiler in general . 2 . There are many Java libraries to read-write and change .class files like jclasslib http : www.ej-technologies.com products jclasslib overview.html bcel http : jakarta.apache.org bcel gnu bytecode http : www.gnu.org software kawa api gnu bytecode package-summary.html etc . Which one would you suggest Also are you aware of C libraries that do the same job 3 . I was thinking to have a look at maybe another language that targets the JVM like Clojure Jython or JRuby . But all these languages are very high level and complicated to create a compiler for them . I was looking for a simpler I don t mind it it s unknown or unused programming language that targets the JVM and it s compiler is open-source . Any ideas .. . Answer : The best resource for the beginning might be Ola Bini s presentation http : skillsmatter.com podcast java-jee language-on-jvm . Grab the slides as well .", "Question : I m currently writing an embedded application for J2ME environment CLDC 1.1 configuration and IMP-NG profile . Being spoiled by all those new features in JVM-based languages Groovy Scala Clojure you name it I was considering using one of them for my code . However most of the mentioned languages require pretty decent JVM environment . Most so-called dynamic languages require the VM to have reflection . Many ask for annotations support . None of the above features are available under J2ME . From what I found Xtend http : www.eclipse.org xtend looks like a viable options as its compiler spits out plain Java not bytecode and doesn t require any library for runtime needs . Of course the generated Java code also must meet some requirements but Xtend webpage looks promising in this regard : .. . .. . Xtend just does classes and nothing else .. . .. . Interface definitions in Java are already nice and concise . They have a decent default visibility and also in other areas there is very little to improve . Given all the knowledge and the great tools being able to handle these files there is no reason to define them in a different way . The same applies for enums and annotation types . .. . That s why Xtend can do classes only and relies on interfaces annotations and enums being defined in Java . Xtend is really not meant to replace Java but to modernize it . Am I right and it is possible to compile Xtend-generated code for J2ME platform or there are some constructs that will not work there Alternatively can you recommend any other rich Java modification language that can be run on J2ME Update : Knowing that the compiler producing results as another source code is called transcompiler one can also find Mirah http : www.mirah.org a tool which requires no runtime library and specific Java features . .. . Answer : In addition to being able to generate Java source Mirah recently added support for javac s --bootclasspath option which allows you to generate your bytecode against a non-standard version of the java core classes e.g . LeJOS . It s still a little fresh but it d be nice to have more people using it on different javas .", "Question : I have created a compiler in C using lex bison for a dynamic typed programming language that supports loops functions declarations inside functions recursive calls etc . I also created a virtual-machine for that runs the intermediate code created by the compiler . I was now thinking instead of compiling to my own intermediate code compile it to java byte code . I saw that the question about creating a JVM language has already been asked http : stackoverflow.com questions 716613 how-to-make-a-net-or-jvm-language but I don t find the answer very informative . So here are my questions : .. . .. . 1 . I guess to create a language for JVM a must is to read the JVM specification http : java.sun.com docs books jvms second edition html VMSpecTOC.doc.html book what other books can you suggest except Dragon Book of course I m mostly concerned in books or tutorials on how to create a JVM language not a compiler in general . 2 . There are many Java libraries to read-write and change .class files like jclasslib http : www.ej-technologies.com products jclasslib overview.html bcel http : jakarta.apache.org bcel gnu bytecode http : www.gnu.org software kawa api gnu bytecode package-summary.html etc . Which one would you suggest Also are you aware of C libraries that do the same job 3 . I was thinking to have a look at maybe another language that targets the JVM like Clojure Jython or JRuby . But all these languages are very high level and complicated to create a compiler for them . I was looking for a simpler I don t mind it it s unknown or unused programming language that targets the JVM and it s compiler is open-source . Any ideas .. . Answer : Last weekend I was asking myself the same question to port my toy language to the JVM . I spend only few hours searching information so take this references with a grain of salt . Language Implementation Patterns . I hate antlr but this book looks very good . If you dont like antlr neither there is a very good about parsing Parsing Techniques . A Practical Guide . Learn to build configuration file readers data readers model-driven code generators source-to-source translators source analyzers and interpreters . You don t need a background in computer-science ANTLR creator Terence Parr demystifies language implementation by breaking it down into the most common design-patterns . Pattern by pattern you ll learn the key skills you need to implement your own computer languages . Chapter 10 cover in 30 pages to fast IMO this topics . But there are other chapter that probably you will be interested . 10 Building Bytecode Interpreters .. . 10.1 Programming Bytecode Interpreters . . 10.2 Defining an Assembly Language Syntax .. . 10.3 Bytecode Machine Architecture . . . . . 10.4 Where to Go from Here . . . . . . . . . . P.26 . Bytecode Assembler . . . . . . . . . . . P.27 . Stack-Based Bytecode Interpreter . . . P.28 . Register-Based Bytecode Interpreter .. . http : pragprog.com titles tpdsl language-implementation-patterns .. . .. . The Implementation of Lua 5.0 This is a great paper about register- based bytecode machines . Go an read it even for the sake of it . Lisp in Small Pieces . This book teach how to write a 2 schme compailers that compile to C . So many lessons can be learned from this book . I own a copy of this book and it is really good for anyone interesting is lisp but maybe not your cup of tea . This is a comprehensive account of the semantics and the implementation of the whole Lisp family of languages namely Lisp Scheme and related dialects . It describes 11 interpreters and 2 compilers .. . .. . .. . http : www.amazon.com Lisp-Small-Pieces-Christian-Queinnec dp 0521562473 http : rads.stackoverflow.com amzn click 0521562473 .. . .. . Check the Dalvik7 VM a register-based VM . The DVM operates on bytecodes that are transformed from the Java Class files compiled by a Java compiler . There is a mailing list about the topic jvm-languages . Are you planning to upload the code to anyplace I would like to take a look . Comment : Are you planning to upload the code to anyplace I m not proud of that code : .. . I maybe would rewrite the whole thing . Anyway If I do I will let you know . Thank you very much for your suggestions .", "Question : I m getting lately interested in the JVM thanks to this awesome language called Ceylon . So if RoboVM enables you to write Java targetting iOS I m wondering if there could be a way to use Ceylon with RoboVM Thanks .. . Answer : After quick look on documentation http : docs.robovm.com user 1.0.0-SNAPSHOT the bytecode compiler . By consuming Java bytecode rather than Java source code the RoboVM ahead-of-time compiler can at least in theory be used with any JVM language that compiles down to bytecode . Scala Clojure and Kotlin are JVM languages already known to work . Another benefit with this approach is that RoboVM can be used with 3rd party libraries in standard JAR files without any need for the original source code enabling the use of proprietary and closed-source libraries . I see it is compiling Java bytecode into native app . Ceylon compiles to Java bytecode therefore you should be able to compile Ceylon to Java bytecode using ceylon compiler and later compile it to native iOS app using RoboVM . RoboVM supports Java 7 which is using by Ceylon 1.1 compiler . In future versions Ceylon may require newer version of Java what may lead to compatibility issues if RoboVM won t keep up . Follow Ceylon Java interoperation manual to be able to use RoboVM classes from Ceylon . Comment : thanks for your answer but I guess it s not complete because Ceylon is not just another JVM language at the bytecode level because AFAIU it has a runtime possibly for the non-JVM-compatible language features Comment : Yes Ceylon has a runtime and you can figure out which jars to add to your classpath with ceylon classpath .", "Question : I m currently writing an embedded application for J2ME environment CLDC 1.1 configuration and IMP-NG profile . Being spoiled by all those new features in JVM-based languages Groovy Scala Clojure you name it I was considering using one of them for my code . However most of the mentioned languages require pretty decent JVM environment . Most so-called dynamic languages require the VM to have reflection . Many ask for annotations support . None of the above features are available under J2ME . From what I found Xtend http : www.eclipse.org xtend looks like a viable options as its compiler spits out plain Java not bytecode and doesn t require any library for runtime needs . Of course the generated Java code also must meet some requirements but Xtend webpage looks promising in this regard : .. . .. . Xtend just does classes and nothing else .. . .. . Interface definitions in Java are already nice and concise . They have a decent default visibility and also in other areas there is very little to improve . Given all the knowledge and the great tools being able to handle these files there is no reason to define them in a different way . The same applies for enums and annotation types . .. . That s why Xtend can do classes only and relies on interfaces annotations and enums being defined in Java . Xtend is really not meant to replace Java but to modernize it . Am I right and it is possible to compile Xtend-generated code for J2ME platform or there are some constructs that will not work there Alternatively can you recommend any other rich Java modification language that can be run on J2ME Update : Knowing that the compiler producing results as another source code is called transcompiler one can also find Mirah http : www.mirah.org a tool which requires no runtime library and specific Java features . .. . Answer : Xtend s generated code uses google guava heavily . If that is compatible to the J2ME Xtend could be the language of your choice . I m not aware of anything that prevents from using it on other platforms that provide a dedicated development kit e.g . Android . Comment : Well then it could be a problem.. . Guava advertises itself as Google Core Libraries for Java 1.6+ :", "Question : I have created a compiler in C using lex bison for a dynamic typed programming language that supports loops functions declarations inside functions recursive calls etc . I also created a virtual-machine for that runs the intermediate code created by the compiler . I was now thinking instead of compiling to my own intermediate code compile it to java byte code . I saw that the question about creating a JVM language has already been asked http : stackoverflow.com questions 716613 how-to-make-a-net-or-jvm-language but I don t find the answer very informative . So here are my questions : .. . .. . 1 . I guess to create a language for JVM a must is to read the JVM specification http : java.sun.com docs books jvms second edition html VMSpecTOC.doc.html book what other books can you suggest except Dragon Book of course I m mostly concerned in books or tutorials on how to create a JVM language not a compiler in general . 2 . There are many Java libraries to read-write and change .class files like jclasslib http : www.ej-technologies.com products jclasslib overview.html bcel http : jakarta.apache.org bcel gnu bytecode http : www.gnu.org software kawa api gnu bytecode package-summary.html etc . Which one would you suggest Also are you aware of C libraries that do the same job 3 . I was thinking to have a look at maybe another language that targets the JVM like Clojure Jython or JRuby . But all these languages are very high level and complicated to create a compiler for them . I was looking for a simpler I don t mind it it s unknown or unused programming language that targets the JVM and it s compiler is open-source . Any ideas .. . Answer : ASM http : asm.ow2.org can be a solution for generating bytecode . To start check the topics on generating elements from the manual http : download.forge.objectweb.org asm asm-guide.pdf .", "Question : The JVM is broadly used : Scala Groovy Jython etc . I ve heard it described as remarkable brilliant and massively under-appreciated . Why More specifically what makes the JVM unique With all the money poured into .NET or the length of time C has been around or all the modern programming-languages and VMs recently created why does the JVM stand alone Comment : I d love to know the answer to this but it probably will get closed as to opinion-based . Comment : yeah : edited my question to focus it a little more on what differentiates the jvm . .. . Answer : IMHO it s simply been around for a while and had the time to be shaken out . I m comparing the stability of the JVM today vs . 15 years ago . In particular the JIT hotspot implementation garbage collector thread handling are well done . I don t think the jvm was intended to be a multi-language platform but it s proven to work well with non-java languages .", "Question : I have created a compiler in C using lex bison for a dynamic typed programming language that supports loops functions declarations inside functions recursive calls etc . I also created a virtual-machine for that runs the intermediate code created by the compiler . I was now thinking instead of compiling to my own intermediate code compile it to java byte code . I saw that the question about creating a JVM language has already been asked http : stackoverflow.com questions 716613 how-to-make-a-net-or-jvm-language but I don t find the answer very informative . So here are my questions : .. . .. . 1 . I guess to create a language for JVM a must is to read the JVM specification http : java.sun.com docs books jvms second edition html VMSpecTOC.doc.html book what other books can you suggest except Dragon Book of course I m mostly concerned in books or tutorials on how to create a JVM language not a compiler in general . 2 . There are many Java libraries to read-write and change .class files like jclasslib http : www.ej-technologies.com products jclasslib overview.html bcel http : jakarta.apache.org bcel gnu bytecode http : www.gnu.org software kawa api gnu bytecode package-summary.html etc . Which one would you suggest Also are you aware of C libraries that do the same job 3 . I was thinking to have a look at maybe another language that targets the JVM like Clojure Jython or JRuby . But all these languages are very high level and complicated to create a compiler for them . I was looking for a simpler I don t mind it it s unknown or unused programming language that targets the JVM and it s compiler is open-source . Any ideas .. . Answer : Last semester I have attended a Compiler Construction course . Our project was exactly what you want to do . The language I ve used to write my language was Scala http : www.scala-lang.org . It runs on a JVM but supports a lot of advanced features that Java doesn t still fully compatible with a pure java JVM . To output java bytecode I ve used the Scala CAFEBABE library https : github.com psuter cafebabe . Well documented and you don t have to go deep inside java classes to understand what to do . Beside the book I think you can find a lot of infos by going trough the labs http : lara.epfl.ch dokuwiki cc09 : top we ve done during the course . Comment : This sound like a great course . Would you mind to share your notes or code Comment : No problem I will check where my backups are and post a link here so you can download it asap . Comment : Neat I ve been looking for an hands-on compiler course that targets the JVM with all the material online for self-study .", "Question : I have created a compiler in C using lex bison for a dynamic typed programming language that supports loops functions declarations inside functions recursive calls etc . I also created a virtual-machine for that runs the intermediate code created by the compiler . I was now thinking instead of compiling to my own intermediate code compile it to java byte code . I saw that the question about creating a JVM language has already been asked http : stackoverflow.com questions 716613 how-to-make-a-net-or-jvm-language but I don t find the answer very informative . So here are my questions : .. . .. . 1 . I guess to create a language for JVM a must is to read the JVM specification http : java.sun.com docs books jvms second edition html VMSpecTOC.doc.html book what other books can you suggest except Dragon Book of course I m mostly concerned in books or tutorials on how to create a JVM language not a compiler in general . 2 . There are many Java libraries to read-write and change .class files like jclasslib http : www.ej-technologies.com products jclasslib overview.html bcel http : jakarta.apache.org bcel gnu bytecode http : www.gnu.org software kawa api gnu bytecode package-summary.html etc . Which one would you suggest Also are you aware of C libraries that do the same job 3 . I was thinking to have a look at maybe another language that targets the JVM like Clojure Jython or JRuby . But all these languages are very high level and complicated to create a compiler for them . I was looking for a simpler I don t mind it it s unknown or unused programming language that targets the JVM and it s compiler is open-source . Any ideas .. . Answer : I would recommend that you first learn how JVM assembly works if you don t already know it . Many instructions have the form name where is i if the instruction works on with an integer type and a if it works with a reference-type . Basically JVM is a stack machine with no registers so all instructions work with data directly on the stack . You can push pop data with push pop and move data between local-variables stack locations referenced by offsets and the top of the stack using store load . Some other important instructions are invoke and if . For my university s compiler course http : daimi.au.dk dOvs we used Jasmin http : jasmin.sourceforge.net to assemble the programs . I don t know if this is the best way but at least it is an easy place to start . Here is an instruction reference http : www.brics.dk mis dOvs jvmspec ref-Java.html for an old version of the JVM which might contain fewer instructions than a new one .", "Question : What s a prefereed way to download Scala via scala-lang.org can it be added directly by the Eclipse IDE or how to add Scala to Eclipse IDE Is there a convention on how to add a JVM language Update .. . .. . I could add Clojure and Scala from Help...install new software so now I can create those kinds of projects : .. . .. . enter image description here http : i.stack.imgur.com S1Syi.png .. . Answer : The JVM languages typically have plugins for Eclipse e.g . Counterclockwise http : code.google.com p counterclockwise for Clojure . In many cases you can also use JVM languages without a plugin in a regular Java project . For example the following approach works with Clojure : .. . .. . Include clojure-1.4.0.jar as a dependency using Maven or similar .. . Include clojure source files as regular resources in your project .. . Write a short piece of Java code that executes the clojure code by calling the appropriate methods in clojure.lang.RT a class provided in Clojure s jar file", "Question : I have a strong interest in functional languages because they have so many advantages but I don t know if they are really used in practice and how well they can be integrated into a mainstream Java C or C++ environment . Could a programmer who works in a team with other programmers that don t know any functional language use it combined with other languages It s a problem when others don t understand the code that one team member produced but Java byte code that has been written in Scala could be easily decompiled to pure Java . I know that integration works pretty well between Java and Clojure and Java and Scala but what about other languages like C++ Comment : JVM bytecode produced by scalac could be decompiled into Java but the result won t resemble anything readable or maintainable . Comment : You need to be more specific . What do you mean by combined with other languages Depending on your application domain there are various ways of creating software that utilizes for instance both C++ and Clojure . Depending on the design of your workflow the C++ programmer may not need to know any Clojure . Comment : I mean that Scala Clojure and Java code can both be compiled to one .jar but could C++ code also be compiled together with code of a functional-programming language to one executable Is the combined use of functional languages and Java in a real world project scenario really fertile or do the possible disadvantages outweigh the possible gains Thanks . Comment : As for Clojure you may integrate C++ code into Java like described in this tutorial javaworld.com javatips jw-javatip17.html http : www.javaworld.com javatips jw-javatip17.html . Then invoke this Java from Clojure using Java Interop . .. . Answer : Could a programmer who works in a team with other programmers that don t know any functional language use it combined with other languages Yes . This is typically achieved via a foreign function interface . Depending on your language implementation there will be more or less support for calling to or from your language from other languages .", "Question : I have a strong interest in functional languages because they have so many advantages but I don t know if they are really used in practice and how well they can be integrated into a mainstream Java C or C++ environment . Could a programmer who works in a team with other programmers that don t know any functional language use it combined with other languages It s a problem when others don t understand the code that one team member produced but Java byte code that has been written in Scala could be easily decompiled to pure Java . I know that integration works pretty well between Java and Clojure and Java and Scala but what about other languages like C++ Comment : JVM bytecode produced by scalac could be decompiled into Java but the result won t resemble anything readable or maintainable . Comment : You need to be more specific . What do you mean by combined with other languages Depending on your application domain there are various ways of creating software that utilizes for instance both C++ and Clojure . Depending on the design of your workflow the C++ programmer may not need to know any Clojure . Comment : I mean that Scala Clojure and Java code can both be compiled to one .jar but could C++ code also be compiled together with code of a functional-programming language to one executable Is the combined use of functional languages and Java in a real world project scenario really fertile or do the possible disadvantages outweigh the possible gains Thanks . Comment : As for Clojure you may integrate C++ code into Java like described in this tutorial javaworld.com javatips jw-javatip17.html http : www.javaworld.com javatips jw-javatip17.html . Then invoke this Java from Clojure using Java Interop . .. . Answer : Haskell has a pretty mature C foreign function interface http : www.haskell.org haskellwiki FFI Introduction . I ve only ever used it to call down into C libraries but the opposite is possible as well .", "Question : I read somewhere Clojure is compiled . Is it really compiled like Java or Scala rather than interpreted like Jython or JRuby Comment : JFGI . Look at the project home page . Comment : @Marcin I did but it confuses me a bit . Could you provide an aswer along with the donwvote Comment : Clojure is a compiled language - it compiles directly to JVM bytecode yet remains completely dynamic . Clear enough Comment : Then I don t see why you are confused . Clojure is strictly a compiled language just like Java and Scala . The difference with Java is that it can also compile code at run-time and load it instead of relying on a distinct compilation phase . Comment : I m not sure how much clearer that could be . .. . Answer : Both-ish when it comes to generating bytecode .. . .. . Clojure is on-the-fly- compiled at code load-time http : clojure.org evaluation into JVM bytecode which has the feeling and flow of an interpreted-language and ahead-of-time compiled http : clojure.org compilation into JVM bytecode which has the flow of a compiled language . both of these are then JIT compiled into machine code by the Java Hotspot compiler which takes care of the dynamic optimization that Clojure depends on for speed . just to make things interesting loaded evaluated code can compile on the fly at runtime and AOT compiled code can load and evaluate source at runtime . If you want interpreted then you can load my file.clj from the repl . If you want Ahead-Of-Time compiling may I suggest using the leiningen https : github.com technomancy leiningen clojure project-management tool . In this case-when i mention compiling vs . interpreting I should be clear that I am talking about turning source code into JVM bytecode . All JVM languages are compiled by the JVM at runtime https : en.wikipedia.org wiki Just-in-time compilation so that distinction is not really very interesting . Comment : Both is wrong its only the flow of an interpreted-language there is never anything interpreted . Comment : we are running into the contention between pure deffinitions and clear concise answers . in the last paragraph . I am talking about the process of creating JVM bytecode . Comment : edited to make that distinctin more clear thanks kickik" ] }
[ "yes-answer-long", "yes-answer-short" ]
byte
UNK_RELATION
expect.js -- expect.js is a library of javascript which is minimalistic bdd assertion toolkit based on @placeholder .
{ "confidence": [ 48.78180694580078, 47.52727127075195, 45.951751708984375, 44.27510070800781, 36.954627990722656, 36.954627990722656, 35.700096130371094, 30.254745483398438, 30.254745483398438, 26.411794662475586, 22.668954849243164, 22.422542572021484, 21.568138122558594, 20.765554428100586, 19.670700073242188, 16.92662239074707, 16.856853485107422, 16.773303985595703, 16.203210830688477, 15.074548721313477, 14.732368469238281, 14.349115371704102, 13.477834701538086, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211, 12.41781234741211 ], "content": [ "I am using mocha and expect.js .", "I m using Mocha.js Superagent Expect.js .", "Looked on expect.js README for any hints .. . 3 .", "I ve been trying to learn how to use expect.js assertion plugin for my project .", "@limelights using mocha and expect.js at the moment do i need jest to get it working", "For example if I have this : .. . .. . Can I write a test with Mocha and Expect.js that will enable me to check if the rootReducer contains say reducer2", "I m using Mocha and expect.js .. . .. . The complete test is : .. . .. . My Client ChatterClient is : .. . .. . The Server ChatterServer is :", "After reading the submission test guidelines and API http : www.codecademy.com docs submission tests I decided to use expect.js to handle the bulk of my validation since I need to traverse the DOM .", "I m using .. . .. . .. . .. . in my package.json and following a testing pattern that from online examples https : github.com Automattic expect.js and https : github.com elliotf mocha-mongoose seems like it should be fine .", "From my understanding of how expect.js operates and my current validation it should not pass because the user neglected to add the second type text attribute .. . .. . My validation criteria are as follows : .. . .. . If the user submits the HTML code then it should fail however it is passing .", "That s because most testing frameworks use throw when an assertion fails but those are absorbed by the then of promises.. . .. . .. . For example in the following I d like Mocha to tell me that hello isn t equal to world .. . .. . .. . Complete fiddle here http : jsfiddle.net marcandre g9Lfbnhp .. . .. . With Mocha we can officially return the promise but this swallows completely the error http : jsfiddle.net marcandre r3hkpnhc and is thus much worse.. . .. . .. . Note : I m using mocha and expect.js as I want to be compatible with IE8", "Why aren t I getting a sensible assertion fail", "I m playing around with Node Socket.IO and BDD by creating a chat application .", "You could also use sinon to make synchronous mocks and then use whatever should.throw functionality your assertion library provides .", "when the database has more than one user in it I get the log of found object which is perfectly-fine looking then a confusing error : .. . .. . It appears this crazy error is what is what is thrown when the length assertion is wrong", "jsdom is implemented in JavaScript we can have a DOM-like API to work with without needing a browser .", "I think you need the that which https : github.com Codecademy jquery-expect that--which feature which is terribly documented .", "and that the library authors make no mention of this crap", "A good testing library would not require you to change code just to make the tests run :", "Traditionally Unit testing in React is done using Jest which apparently contains DOM support .", "That means that we don t have to capture a browser in order test like Karma which is why it works the moment you use Karma .", "My problem is i want to get the error message which only displayed on console section of my browser s inspect element to be alerted into my HTML page when i click my button .", "Your second change even before trying I have to disagree with since it would hook that event on the client not the server which is the intended effect .", "I m trying to do TDD for the Rest APIs that I ve been creating .", "New to NodeJS .", "I ve created a Rest API and on the response I want to perform all the expect checks .", "To make an HTTP request I m using SuperagentJS also tried RequestJS .", "Here is how my code looks like Snippet only not whole code .. . .. . No matter what I try mocha always gives successful result .", "All test cases passed .. . .. . Please tell what I m missing here .", "What should I do to implement test cases on httpRespnse .", "I m sure that request is working fine because whenever I use console.log httpResponse.text it is returning the default apache home page .", "All networking in node.js is asynchronous therefore you must use the mocha asynchronous flavor of it Create a New Entity function done and call the done callback when your test is done .", "Thanks need to learn a lot about how async node work .", "Any references you can suggest", "The learnyounode nodeschool workshop https : github.com workshopper learnyounode is a good place to start .", "I am creating a lesson on codeacademy that enables users to learn about the creation of HTML forms .", "This is mostly for my own entertainment just so we re all on the same page .", "So the lesson I am creating asks the users to create two label elements with content inside the label tags and two input fields with the type attribute defined and the value set to text .", "So again the criteria are as follows : .. . .. . 1 .", "Create two label elements inside the form element .", "Be sure to indicate what the user will be filling out", "2 .", "Create two input elements below each of the label elements .", "Be sure to include and define the type attribute", "Let s assume I have the following code : .. . .. . This will pass .", "My disconnect is when the user enters the second set of label and input tags .", "If they omit content within the second label and or the type attribute with a value of text it will still pass .", "Is there something special or unique that I am missing here", "I have tried the validation code supplied above with and without out method-chaining with no avail .", "What I have Tried .. . .. . 1 .", "Looked on Codeacademy for any hints on how to rectify this issue .. . 2 .", "Looking on StackOverflow for any hints .. . 4 .", "Removed method-chaining and reestablished method-chaining", "Here s what i ve been doing so far .. . .. . When i click the button the error will show on console when i check inspect element from my browser .", "What I m trying to do is get the error message and alert the message when i click the button .", "Your fn function doesn t return anything .", "The fn function will return the string of expect if it doesn t make the requirement but only on console section of inspect element .", "For example in my code i don t have div with class name of post .", "The function will show the message Make sure your new div has a class name of post in my console section of inspect element of my browser .", "What I want is to get this message to be alerted to my HTML file .", "I get that I m saying that your fn function must return something to be displayed in alert .", "And it s not .", "Did you try to see what does expect actually returns", "No I haven t because i don t know how to check the return-type of expect .", "Use console.log expect.. . and see what is logged", "I would like to start using a test framework mocha + expect seem good to me .", "Say i have this function .. . .. . To make it testable do I need to add Return statements like below", "Or should I be testing the dom element loader", "I agree entirely", "Indeed .", "Test for the actual intended results of the function not what it s telling you it did .", "It might say one thing but have done something completely different .", "Thanks .", "I guess what i m looking for is an api where I can go to.cause loader.style.display none", "No you don t .", "Instead check for loader element display property in the DOM .", "Update after comment : .. . .. . haven t used much of mocha but when in comes to testing UI its similar fashion almost in every framework or libarary .", "Look for elements in the DOM using jQuery or any selector lib you have available and check their content if they are as desired .", "In your case you will check if loader element is display block or display none .", "something like when loader is shown .. . .. . when loader is hidden", "Okay this is what i was hoping for .", "Have you had any experience with mocha + expect with testing dom element attributes perhaps you could demonstrate above", "updated my answer .", "A best practice is : your tests shouldn t require your code-under-test to be modified such that they can either pass fail .", "So you shouldn t add return statements like you ve suggested you also shouldn t have test flags that can be passed into a function to enable some special test state .", "So the simple answer is : no you shouldn t add return statements .", "But just the posing of the question itself sounds to me like maybe you re new to DOM testing", "It sounds like you wish to unit test the code you ve sampled there perhaps outside of the rest of your app", "Assuming that s true then maybe you should look at something like mocha-jsdom https : www.npmjs.com package mocha-jsdom I d expect you d then be able to write a test like : .. . .. . Note : I can t promise that code snippet will work just a example and mostly stolen from mocha-jsdom s page", ".", "I am new to reactJS and try to learn how to test with it .", "I have encouter the following testing util method .", "However i am keep getting the same error message : ReferenceError : document is not defined .", ".. . .. . renderIntoDocument .. . .. . Render a component into a detached DOM node in the document .", "This function requires a DOM .", "Note : You will need to have window window.document and window.document.createElement globally available before you import React .", "Otherwise React will think it can t access the DOM and methods like setState won t work .", ".. . .. . I know it the reason failing its missing the DOM but how can i insert the DOM or require it", ".. . .. . My test below :", "Have you installed jest" ] }
{ "confidence": [ 48.66600799560547, 47.06828308105469, 45.997196197509766, 40.95570373535156, 38.22718811035156, 35.375221252441406, 34.6602668762207, 32.84039306640625, 30.97297477722168, 29.7628173828125, 29.7628173828125, 29.7628173828125, 14.44935417175293, 14.44935417175293, 12.659165382385254 ], "content": [ "Question : I m having a hard time getting meaningful failures in tests when I need to check things in a promise . That s because most testing frameworks use throw when an assertion fails but those are absorbed by the then of promises.. . .. . .. . For example in the following I d like Mocha to tell me that hello isn t equal to world .. . .. . .. . Complete fiddle here http : jsfiddle.net marcandre g9Lfbnhp .. . .. . With Mocha we can officially return the promise but this swallows completely the error http : jsfiddle.net marcandre r3hkpnhc and is thus much worse.. . .. . .. . Note : I m using mocha and expect.js as I want to be compatible with IE8 .. . Answer : This is less of an answer rather than a suggestion Using the before hook would be useful here . You could also use sinon to make synchronous mocks and then use whatever should.throw functionality your assertion library provides .", "Question : I am creating a lesson on codeacademy that enables users to learn about the creation of HTML forms . This is mostly for my own entertainment just so we re all on the same page . After reading the submission test guidelines and API http : www.codecademy.com docs submission tests I decided to use expect.js to handle the bulk of my validation since I need to traverse the DOM . So the lesson I am creating asks the users to create two label elements with content inside the label tags and two input fields with the type attribute defined and the value set to text . So again the criteria are as follows : .. . .. . 1 . Create two label elements inside the form element . Be sure to indicate what the user will be filling out 2 . Create two input elements below each of the label elements . Be sure to include and define the type attribute Let s assume I have the following code : .. . .. . This will pass . From my understanding of how expect.js operates and my current validation it should not pass because the user neglected to add the second type text attribute .. . .. . My validation criteria are as follows : .. . .. . If the user submits the HTML code then it should fail however it is passing . My disconnect is when the user enters the second set of label and input tags . If they omit content within the second label and or the type attribute with a value of text it will still pass . Is there something special or unique that I am missing here I have tried the validation code supplied above with and without out method-chaining with no avail . What I have Tried .. . .. . 1 . Looked on Codeacademy for any hints on how to rectify this issue .. . 2 . Looked on expect.js README for any hints .. . 3 . Looking on StackOverflow for any hints .. . 4 . Removed method-chaining and reestablished method-chaining .. . Answer : I think you need the that which https : github.com Codecademy jquery-expect that--which feature which is terribly documented .", "Question : null .. . Answer : I m using .. . .. . .. . .. . in my package.json and following a testing pattern that from online examples https : github.com Automattic expect.js and https : github.com elliotf mocha-mongoose seems like it should be fine . I have a minimal example mongoose model of .. . .. . in my user.js and my testfile is .. . .. . As you can see for now I just want to verify that when I save to the database mongoose can find the new thing I just saved to it . So in the .save callback I run a .find and try to test the results I get back it its callback . In my console this will work only on success . If the expect assertiong should fail i.e . when the database has more than one user in it I get the log of found object which is perfectly-fine looking then a confusing error : .. . .. . It appears this crazy error is what is what is thrown when the length assertion is wrong If I change the number to match how many users I know there will be it finishes without problems . Anyone know why this is happening It looks like I m straight-up breaking something . Why aren t I getting a sensible assertion fail", "Question : Learning TDD and my first simple test for my Hello World server response is failing in Mocha . I m using Mocha.js Superagent Expect.js . When I curl -i localhost : 8080 I get the correct response and status code . Test code : .. . .. . Server code : .. . .. . Mocha output : .. . .. . I ve tried googling this issue but no luck finding out what I m doing wrong . Comment : has anybody noticed that expect .to.equal doesnt work anymore and that the library authors make no mention of this crap BTW its changed from .to.equal to .toEqual . I m surprised this guy s code works at all .. . Answer : Node notation of callbacks is to have first parameter error . Superagent is following this Node policy . This is from superagent github site https : github.com visionmedia superagent : .. . .. . So change this line .. . .. . to Comment : That was the issue @lkrnac - test is working now .", "Question : null .. . Answer : I ve been trying to learn how to use expect.js assertion plugin for my project . My problem is i want to get the error message which only displayed on console section of my browser s inspect element to be alerted into my HTML page when i click my button . Here s what i ve been doing so far .. . .. . When i click the button the error will show on console when i check inspect element from my browser . What I m trying to do is get the error message and alert the message when i click the button . Comment : Your fn function doesn t return anything . Comment : The fn function will return the string of expect if it doesn t make the requirement but only on console section of inspect element . For example in my code i don t have div with class name of post . The function will show the message Make sure your new div has a class name of post in my console section of inspect element of my browser . What I want is to get this message to be alerted to my HTML file . Comment : I get that I m saying that your fn function must return something to be displayed in alert . And it s not . Did you try to see what does expect actually returns Comment : No I haven t because i don t know how to check the return-type of expect . Comment : Use console.log expect.. . and see what is logged", "Question : I m having a hard time getting meaningful failures in tests when I need to check things in a promise . That s because most testing frameworks use throw when an assertion fails but those are absorbed by the then of promises.. . .. . .. . For example in the following I d like Mocha to tell me that hello isn t equal to world .. . .. . .. . Complete fiddle here http : jsfiddle.net marcandre g9Lfbnhp .. . .. . With Mocha we can officially return the promise but this swallows completely the error http : jsfiddle.net marcandre r3hkpnhc and is thus much worse.. . .. . .. . Note : I m using mocha and expect.js as I want to be compatible with IE8 .. . Answer : With Mocha we can officially return the promise but this swallows completely the error and is thus much worse.. . In your fiddle you are using Mocha 1.9 which dates from April 2013 and did not support returning promises from tests . If I upgrade your fiddle to the latest Mocha it works just fine . Comment : You can return a Promise to test for resolution . You can t just return a Promise when testing rejection because your test will incorrectly pass if there is an error in your code that causes the Promise to unexpectedly resolve . Comment : Well what you are saying here amounts to tautologically saying it is not going to work correctly if you write your code incorrectly . Comment : Just returning the Promise may allow your test to pass incorrectly if you have written your code incorrectly . Your Promise always has a chance to resolve before it gets to the assertions in your catch when you are testing for rejection . Tautology or not that s how it works . Comment : I understood what you said the first time around . There s absolutely no need for bolding anything . If you start with the unwarranted assumption that the solution won t be implemented correctly because that s what you decide to imagine then the solution won t work . This is an objection you could bring up about all answers posted on SO . Comment : Oh I see what you mean . Yes I m deliberately trying to educate the author of the question beyond the actual scope of the question .", "Question : I m having a hard time getting meaningful failures in tests when I need to check things in a promise . That s because most testing frameworks use throw when an assertion fails but those are absorbed by the then of promises.. . .. . .. . For example in the following I d like Mocha to tell me that hello isn t equal to world .. . .. . .. . Complete fiddle here http : jsfiddle.net marcandre g9Lfbnhp .. . .. . With Mocha we can officially return the promise but this swallows completely the error http : jsfiddle.net marcandre r3hkpnhc and is thus much worse.. . .. . .. . Note : I m using mocha and expect.js as I want to be compatible with IE8 .. . Answer : To test a failing Promise do this : Comment : You absolutely do not need to do this with Mocha . Just return the promise . Comment : You can t just return the Promise because if your code accidentally resolves Mocha will think your test passes and you get a false positive . You can leave the .then out above but I included it to demonstrate what can go wrong when testing for Promise rejection . Comment : Of course if start with the unwarranted assumption that all other solutions cannot be implemented correctly then only your solution works . Comment : It s not unwarranted . Testing Promise rejection is just not as easy as assert.throws . There are a couple of extra gotchas . Comment : Ok my apologies . You are technically right . He s not trying to trap a rejection . The fact that he s throwing an example error actually threw me into thinking he was .", "Question : I am new to reactJS and try to learn how to test with it . I have encouter the following testing util method . However i am keep getting the same error message : ReferenceError : document is not defined . .. . .. . renderIntoDocument .. . .. . Render a component into a detached DOM node in the document . This function requires a DOM . Note : You will need to have window window.document and window.document.createElement globally available before you import React . Otherwise React will think it can t access the DOM and methods like setState won t work . .. . .. . I know it the reason failing its missing the DOM but how can i insert the DOM or require it .. . .. . My test below : Comment : Have you installed jest Also paste your test and component code that reproduces the issue please . Comment : @limelights using mocha and expect.js at the moment do i need jest to get it working Comment : No you don t but it was tagged with Jest . Comment : @limelights my bad i thought it will attract people attention with testing you ever experience above testing error Comment : No worries just update your question please : .. . Answer : tl dr You need jsdom + Mocha . .. . .. . .. . .. . According to spec ReactTestUtils renderIntoDocument https : goo.gl x8E7U9 .. . .. . renderIntoDocument requires a DOM : .. . .. . You will need to have window window.document and window.document.createElement globally available before you import React . Otherwise React will think it can t access the DOM and methods like setState won t work . Traditionally Unit testing in React is done using Jest which apparently contains DOM support . And Mocha doesn t . To understand this consider this overly simplify analogy Jest Mocha + jsdom . jsdom is implemented in JavaScript we can have a DOM-like API to work with without needing a browser . That means that we don t have to capture a browser in order test like Karma which is why it works the moment you use Karma . Hence we can run our tests in environments without browsers like in Node or in continuous-integration environments . .. . .. . References : .. . .. . 1 . Tutorial : Testing React on Jsdom http : goo.gl tQ0ACv .. . 2 . React Spec : ReactTestUtils renderIntoDocument https : goo.gl x8E7U9 .. . 3 . Information : How to Jest https : goo.gl LYcMyJ .. . 4 . Information : react-testing-mocha-jsdom https : goo.gl U5yPIu Comment : Thank you this is correct answer you either use jsdom + mocha or jasmine + karma Comment : It should be stated that this is incorrect : Jest Mocha + jsdom . What the answerer is rephrasing is simply that Jest provides a virtual DOM and Mocha does not but there are many more ways that Mocha and Jest are quite different from one another .", "Question : I m playing around with Node Socket.IO and BDD by creating a chat application . During one of the tests I get a timeout error stating : .. . .. . Error : timeout of 2000ms exceeded . Ensure the done callback is being called in this test . The affected test is .. . .. . I found that the cause of this issue is that the chatterMessage event is not being caught by the server . Whilst I did specify it . The console s output is : .. . .. . Sending message Sent Error : timeout of 2000ms exceeded . Ensure the done callback is being called in this test . I m probably doing something wrong . I m not too familiar with Node and Socket.IO so I m sorry if this question is very obvious . I looked around Google with the search terms socket.io server not receiving from client but from what I found nothing helped me to solve my issue so far . I did however try the solution in this question http : stackoverflow.com questions 9837998 socket-io-client-not-receiving-messages-from-server rq 1 but that didn t fix it for me . I m using Mocha and expect.js .. . .. . The complete test is : .. . .. . My Client ChatterClient is : .. . .. . The Server ChatterServer is : .. . Answer : You need to change your code in two sides . First side you will need to listen incoming socket connections on the socketIO object . see the emphasized code below .. . .. . Second side when you are adding new events to listen on the server you need to bind those events to the sockets since they are ones that are going to listen when events are emitted from the socket clients . Comment : I just tried this but the issue stays . On the first side I can understand that change . I had it like that before but changes it to this.on since it would hook the same way but using the Server s method instead . I know I m creating some overhead with this but I don t think that s that much of an issue . Your second change even before trying I have to disagree with since it would hook that event on the client not the server which is the intended effect . Besides the server isn t receiving the event to begin with . I m wondering why that is . Comment : @TheSerenin Please review this gist https : gist.github.com wilsonbalderrama 9f87787a201a55d99cc6 I tried to replicate your code on these files hope that it is the same as yours this example is working . Regarding the change on the second side I suggest you to code your example using raw socketio without creating the abstraction ChatterServer ChatterClient so that you can understand why I am doing in this way . Comment : I m mainly using abstraction so that it supports dependency-injection . This is at this moment mainly used for the Client as during testing the client uses the socket.io-client package whereas when it ll be on the web it ll use the socket.io global object . I reviewed your gist and to me it really doesn t seem much different to what I m doing . I m hosting the code on GitHub find the repo here : github.com TheSerenin chatter https : github.com TheSerenin chatter Comment : @TheSerenin if you run the code of my gist you will see that it is running ok . Comment : @TheSerenin I have created a pull request https : github.com TheSerenin chatter pulls on your repository applying these changes and other minor changes as well regarding the unit test please check it out .", "Question : I am busy building functional tests for an existing nodejs api I wrote . I am using mocha and expect.js . One test that is failing is when I want to do a negative test for the existence of a url parameter . What I want is to send a message back to the the consumer of the service if the param is missing . Currently the positive test I have works : .. . .. . However the following does not work and all I get is a timeout : .. . .. . Both the above tests are testing this endpoint : .. . .. . However as stated before the first test is successful while the second test times out . Update 1 : Additionally I am getting the following output : .. . .. . Update 2 : So adding the following code solves the problem but doesn t really solve the problem : .. . .. . Obviously I don t want a rather redundant piece of code sitting around . I am baffled as to why I cannot enter the api v1 user : userid endpoint and just test for the existence of : userid in there It s as-if nodejs is requiring the existence of : userid otherwise the endpoint does not exist . Is this correct What am I missing Comment : Do you no if there comes something back from the server Can you just add some console.log breakpoints on both sites to see where it get stuckt How do you know that your first test succeed there no assertions or did you just chopped it off Comment : I have added console.log s in both the server and the test and I do not get a response from the server . I think the request must be getting stuck server-side but I cannot tell where as I have a console.log on the very first line of the endpoint on the server but it never gets hit . .. . Answer : According to mocha documentation https : mochajs.org asynchronous-code the done callback must always be called also in case of errors . In fact it accepts an error . So I think that you must rewrite your code with : Comment : You are right and I rewrote it the way you described also I added console.log s inside the callback in request.get . However I never get a result from those console.log s still just the timeout . This leads me to believe there is something I am not handling serverside but I am never getting a response from the console.log I put on the very first line of the endpoint... .", "Question : I am busy building functional tests for an existing nodejs api I wrote . I am using mocha and expect.js . One test that is failing is when I want to do a negative test for the existence of a url parameter . What I want is to send a message back to the the consumer of the service if the param is missing . Currently the positive test I have works : .. . .. . However the following does not work and all I get is a timeout : .. . .. . Both the above tests are testing this endpoint : .. . .. . However as stated before the first test is successful while the second test times out . Update 1 : Additionally I am getting the following output : .. . .. . Update 2 : So adding the following code solves the problem but doesn t really solve the problem : .. . .. . Obviously I don t want a rather redundant piece of code sitting around . I am baffled as to why I cannot enter the api v1 user : userid endpoint and just test for the existence of : userid in there It s as-if nodejs is requiring the existence of : userid otherwise the endpoint does not exist . Is this correct What am I missing Comment : Do you no if there comes something back from the server Can you just add some console.log breakpoints on both sites to see where it get stuckt How do you know that your first test succeed there no assertions or did you just chopped it off Comment : I have added console.log s in both the server and the test and I do not get a response from the server . I think the request must be getting stuck server-side but I cannot tell where as I have a console.log on the very first line of the endpoint on the server but it never gets hit . .. . Answer : So I did some more investigation and asked another question regarding this issue here http : stackoverflow.com questions 35119662 node-js-express-routing-with-parameters . In the end the issue was that I didn t fully understand the express framework . Basically what I alluded to in Update 2 of my question is the route I will need to follow and specify a route where no param is expected but return the error message I am expecting in that case . The problem I have with this approach is that in some instances one might want to use more than one parameter in the ur . However this will mean the permutations to cater for each scenario where a parameter is undefined gets a bit daunting . 2 params will mean 4 combinations 3 will mean 9 etc . This will be a maintenance nightmare My approach from now on will be to rather follow an approach where any info I want to pass to the server will be sent via JSON in the body from of each request . This will allow me to keep to one single route .", "Question : Say I have several reducer functions and I combine them all into one reducer using combineReducers .. . is there a way of testing what reducers the combined reducer actually contains For example if I have this : .. . .. . Can I write a test with Mocha and Expect.js that will enable me to check if the rootReducer contains say reducer2 Is this even possible The way I currently have my project set up is that each reducer is in a separate file and is then imported into the file where the combineReducers .. . function is used to combine them all . I am testing all the individual reducers to check that they do what they should but I also thought it would be a good idea to test the combined reducer to make sure that it contains all the other reducers that it should in case I forget to add one for example . Thanks Comment : does it matter more if it contains reducer2 whatever that would even mean or does it work the same as reducer2 i think your test might be asking the wrong questions.. . also looking at github.com reactjs redux blob master src combineReducers.js L93 https : github.com reactjs redux blob master src combineReducers.js L93 i don t see any ref back to the un-combined reducers ether finalReducers or reducers so no i think is your direct answer . all it returns is a function that loops and calls all the individuals.. . Comment : Thanks . Your comment made me think about what the reducer actually does and made me realise that it will produce a state with keys named after the reducers that were passed into the combineReducers function so I could test the returned state and check that it contains the keys I expect it to . That way I ll know if I have passed in all the required reducers . .. . Answer : You are testing the wrong thing IMO . You should trust that the combineReducers function does what it should it should be tested in Redux distrubution tests . But you can create a method that will return the object with reducers to combine to pass as the parameter to combineReducers . That method can and should be tested . Comment : Thanks . I think that s a similar approach to how I ve ended up doing it although I m currently testing the state that the combined reducer generates . Your idea sounds like a better idea though so I ll try that instead as my test could fail if Redux changed how it handled the state unlikely but you never know . Comment : Testing the resulting state will make the tests brittle as it will need to be changed every time any of the combined reducers or anything downstream changes . Comment : Of course I hadn t thought of that . Thanks again .", "Question : I would like to start using a test framework mocha + expect seem good to me . Say i have this function .. . .. . To make it testable do I need to add Return statements like below Or should I be testing the dom element loader Comment : A good testing library would not require you to change code just to make the tests run : Comment : I agree entirely Comment : Indeed . Test for the actual intended results of the function not what it s telling you it did . It might say one thing but have done something completely different . Comment : Thanks . I guess what i m looking for is an api where I can go to.cause loader.style.display none .. . Answer : No you don t . Instead check for loader element display property in the DOM . Update after comment : .. . .. . haven t used much of mocha but when in comes to testing UI its similar fashion almost in every framework or libarary . Look for elements in the DOM using jQuery or any selector lib you have available and check their content if they are as desired . In your case you will check if loader element is display block or display none . something like when loader is shown .. . .. . when loader is hidden Comment : Okay this is what i was hoping for . Have you had any experience with mocha + expect with testing dom element attributes perhaps you could demonstrate above Comment : updated my answer .", "Question : I would like to start using a test framework mocha + expect seem good to me . Say i have this function .. . .. . To make it testable do I need to add Return statements like below Or should I be testing the dom element loader Comment : A good testing library would not require you to change code just to make the tests run : Comment : I agree entirely Comment : Indeed . Test for the actual intended results of the function not what it s telling you it did . It might say one thing but have done something completely different . Comment : Thanks . I guess what i m looking for is an api where I can go to.cause loader.style.display none .. . Answer : A best practice is : your tests shouldn t require your code-under-test to be modified such that they can either pass fail . So you shouldn t add return statements like you ve suggested you also shouldn t have test flags that can be passed into a function to enable some special test state . So the simple answer is : no you shouldn t add return statements . But just the posing of the question itself sounds to me like maybe you re new to DOM testing It sounds like you wish to unit test the code you ve sampled there perhaps outside of the rest of your app Assuming that s true then maybe you should look at something like mocha-jsdom https : www.npmjs.com package mocha-jsdom I d expect you d then be able to write a test like : .. . .. . Note : I can t promise that code snippet will work just a example and mostly stolen from mocha-jsdom s page .", "Question : I m trying to do TDD for the Rest APIs that I ve been creating . New to NodeJS . I ve created a Rest API and on the response I want to perform all the expect checks . To make an HTTP request I m using SuperagentJS also tried RequestJS . Here is how my code looks like Snippet only not whole code .. . .. . No matter what I try mocha always gives successful result . All test cases passed .. . .. . Please tell what I m missing here . What should I do to implement test cases on httpRespnse . I m sure that request is working fine because whenever I use console.log httpResponse.text it is returning the default apache home page . .. . Answer : All networking in node.js is asynchronous therefore you must use the mocha asynchronous flavor of it Create a New Entity function done and call the done callback when your test is done . Comment : Thanks need to learn a lot about how async node work . Any references you can suggest Comment : The learnyounode nodeschool workshop https : github.com workshopper learnyounode is a good place to start ." ] }
[ "yes-answer-long", "yes-answer-short" ]
should.js
UNK_RELATION
panoramio@website@64
panoramio -- panoramio is a geolocation-oriented photo sharing @placeholder .
{ "confidence": [ 45.11998748779297, 42.12124252319336, 41.553558349609375, 41.490882873535156, 40.96601867675781, 40.79255676269531, 40.79255676269531, 39.986976623535156, 39.96573257446289, 39.64076614379883, 39.168785095214844, 38.60291290283203, 38.60291290283203, 38.26031494140625, 37.43260955810547, 37.43260955810547, 37.43260955810547, 37.43260955810547, 37.39149475097656, 37.238433837890625, 37.238433837890625, 37.238433837890625, 37.238433837890625, 36.280818939208984, 36.280818939208984, 36.280818939208984, 36.280818939208984, 35.65531921386719, 35.65531921386719, 35.60313034057617, 35.07826614379883, 34.900367736816406, 34.6429557800293, 34.5035285949707, 34.5035285949707, 33.28103256225586, 33.28103256225586, 32.906776428222656, 32.906776428222656, 32.906776428222656, 32.906776428222656, 32.906776428222656, 32.906776428222656, 32.906776428222656, 32.906776428222656, 32.906776428222656, 32.771522521972656, 31.8730525970459, 31.754989624023438, 31.754989624023438, 31.754989624023438, 31.754989624023438, 31.754989624023438, 31.754989624023438, 31.39591407775879, 31.39591407775879, 31.366138458251953, 31.366138458251953, 30.37453842163086, 30.37453842163086, 30.37453842163086, 30.244125366210938, 30.13687515258789, 30.033058166503906, 28.985084533691406, 28.985084533691406, 28.985084533691406, 28.985084533691406, 28.755203247070312, 28.755203247070312, 27.604633331298828, 27.604633331298828, 27.034481048583984, 27.034481048583984, 27.034481048583984, 25.985301971435547, 25.882692337036133, 25.882692337036133, 25.882692337036133, 25.882692337036133, 25.882692337036133, 25.882692337036133, 24.76396942138672, 24.514663696289062, 24.502241134643555, 22.88290786743164, 22.80640983581543, 21.919185638427734, 21.199382781982422, 21.13397979736328, 20.546852111816406 ], "content": [ "this Panoramio JavaScript API widget .", "The Panoramio and Google user IDs are not correlated .", "but the requirement of my application is that user should get photo details from his panoramio account not the other user photo details .", "I m using the Panoramio API to create a little photo widget like the one you see here at this link .", "It is very simple just go to panoramio website and then open World Map from panoramio website.Then go to specified location whichs latitude and longitude required .", "i have a clue about panoramio api but that is not accurate .", "You can see it in address to your panoramio page .", "The difference between the total number of photos according to the API and the actual total number of photos in Panoramio is that the API only returns geo-referenced photos and not all photos in Panoramio are geo-referenced .", "I ve looked at the documentation for both the Panoramio API on the Panoramio site http : panoramio.com api widget api.html and the Google documentation on the Panoramio API https : developers.google.com maps documentation javascript reference PanoramioLayer .", "the following : .. . .. . The Panoramio URL works if typed directly to the browser .", "I need this stuff in order to use the panoramio API http : www.panoramio.com api .", "I am aware with your mentioned apis which are used for fetching photo details uploaded by user on panoramio .", "This link is used to fetch all photo details uploaded by user if i pass the panoramio userid in set parameter of url .", "What languages does the Panoramio JavaScript API support", "That s a super clear and simple way to get images from Panoramio", "I m using panoramio api to show some pictures about a destination .", "Panoramio offers an API with multiple possibilities to obtain images and descriptions .", "I am trying to get panoramio picture around a given coordinate .", "Another type of Panoramio JavaScript API widget in which you can also change background-color with example and code is here http : codespk.blogspot.com 2013 10 panoramio-javascript-api-widget-example.html .", "I am in developing web application to allow user search Panoramio images using a tag .", "As long as you ve set up the Panoramio service correctly it should only take a line or two of code .", "The url in your example is right but the coordinates are in the middle of pacific ocean where there is no images by panoramio .", "I am trying to get the total number of photos from one specific area using the panoramio data API .", "I used a OpenLayers ProxyHost which was supposed to allow communication with Panoramio .", "Panoramio does not Provider an authentication API and is not yet supported by Google s OAuth .", "Thats why i need to authenticate his panoramio account .", "It seems like maybe one is not meant to display Panoramio images this way", "I m writing a location base client and would love to integrate Panoramio with my client now the problem is that I can t find a way to interact with the Panoramio using a REST-like service .", "Following the Panoramio API Reference Guide I have set up a Panoramio box and it works fine as long as I try to make it work in an html test page on my computer .", "However Panoramio has a VERY long delay before a photo with a specific tag is able to be queried via the google maps api .", "There is usually more pictures from Panoramio but Panoramio API can only search for pictures by location and not by a particular restaurant or hotel name for example .", "I have a Google Map displaying an array of markers formatted as Panoramio thumbnails .", "this Panoramio JavaScript API widget create a bounding-box around a lat long pair and then returning all photos with in those bounds .", "gisandchips.org 2010 05 04 openlayers-y-panoramio .. . .. . So I have followed this tutorial and now I am trying to access the Panoramio data API to query photos and display them on my map .", "Is it possible to fetch panoramio userinfo such as userid birth date full name country state city from any api by providing users panoramio email-id and password", "I know Panoramio had an API but that s being shut down .", "I m wondering if there is a way to turn on that same streetview panoramio mode that they have in maps.google.com", "Just add latitude-longitude values and tag for places i.e restaurants in this panoramio JavaScript API .", "How could i test if panoramio doesnt have any results so i can display something else .", "If you can get an uncompressed version of the Panoramio script you can probably fix the relevant loop s .", "I m developing an application which includes processing of Panoramio Google maps photos around user location .", "Unfortunatly I am new to programming issues and need a clarification regarding panoramio APIs .", "I ve been trying to use setUserID to filter Panoramio for photos according to user using the PanoramioLayer in the Google Maps API .", "I m trying to display a layer of thumbnail images on my Google Map via Panoramio .", "The Panoramio is RESTful and its homepage states a simple GET request must be submitted on the API url .", "2 -My goal is to use the JSON response to show Panoramio photos on my Google Map as thumbnails .", "When the user select a POI the app send a request to Panoramio to get a photo from the latitude and the longitude like that : .. . .. . The problem is that I saw today on the Panoramio ToS : .. . .. . Section 2 : API Client restrictions You may not use the API in API Clients using map technology other than Google Maps or any photo-sharing sites .", "I have made a blogspot page http : discoverworldz.blogspot.com where i have created many Panoramio JavaScript and HTML API widgets .", "If I now examine the default input from the Panoramio service I atleast cannot locate the parameters lat and lon in the result", "I need to fetch panoramio user info using google-api-php-client library .", "One more thing want to confirm that .. . is panoramio userid not username or email id same as google userid", "Thats why i required panoramio userid once the user sign in to my application .", "I have a Google map http : vispo.com geogenie dev pt3.html that displays Panoramio images .", "I m trying to make it so that when you click a Panoramio thumbnail the image fills the browser .", "It would appear that the Panoramio JavaScript is using for..in on an array without allowing for this because the error message contains the source of the associate function that MooTools adds : .. . .. . This is a bug in the Panoramio script one should never use for..in to loop over an array without correct safeguards .", "that if you load the Panoramio script after loading MooTools it works : http : jsfiddle.net DEWvZ 2 But beware that if you make any calls into Panoramio later once MooTools is loaded those could fail because if they ve made the mistake in one place initialization they re likely to make it elsewhere as well .", "You ll find all the information you need to know here : .. . .. . https : developers.google.com maps documentation javascript examples layer-panoramio-tags .. . .. . Its easy to implement give it a go .", "The following code .. . .. . returns .. . .. . count should be around 100 000 000 the total number of photos in panoramio and not 72 543 250 and I guess the value of has more should be false .", "I ve integrated the Panoramio API into my javascript-based Google Maps project so that it loads a photoListWidget alongside the map .", "I want to search for new york photos in panoramio api but for that i have to know the coordinates of New York City .", "Every single output seems limited to 498 records not only 100 as declared by Panoramio so strange .. . 2 .", "it also seems like panoramio does have an API based on services with responses in JSON .. . .. . the request will be something like .. . .. . checkout this post http : googlegeodevelopers.blogspot.com 2008 06 panoramio-api-markermanager-instant.html in google geo developers blog for more info .. . .. . hope it helps .", "this Panoramio JavaScript API widget create a bounding-box around a lat long pair and then returning all photos with in those bounds with your tag .", "Apologies if I have missed this in the API docs but it is stated there that : .. . .. . The PanoramioLayer renders a layer of geotagged photo icons from Panoramio on the map as a series of large and small photo icons .. . .. . Is there any way to control this - i.e to show only small icons for instance", "However my code fails at the line : .. . .. . var panoramio json.read response.responseText .. . .. . According to firebug and alert response.responseText my responseText is an empty string.. .", "Your request to www.panoramio.com is the problem since I don t think you re hosted on the www.panoramio.com : .. . .. . You may want to check if panoramio offer a JSONP service .", "I have been creating an implementation where I would want to get the latitude and longitude coordinate values per each of the returned image from Panoramio .", "Panoramio is not yet integrated with all the other Google APIs so you can t access it using the google-api-php-client library .", "This is similar to a panoramio layer but much slicker and it lets you click between photos taken within the same field of view .", "Please note : I have checked out Panoramio and Google Street View API and these do not suit my needs", "However you don t really want any individual geocode panoramio failure including ZERO RESULTS to scupper the whole .when enterprise in the master routine .", "To create a visual quality map I m trying to get a list of all Panoramio photos in an about 2000 Km2 wide study area .", "for panoramio it says that there is a limit daily panoramio.com api data api.html http : www.panoramio.com api data api.html do you think you make more than 100K requests per day", "I have spent several days tryng to find a tutorial on how to do this but the search is stymied by the existence and subsequent deprecation of the google map API s embedded panoramio layer .", "I guess my strategy was to display raw JSON on my webpage to prove a connection to the Panoramio API and then process the JSON to display georeferenced thumbnail photos in my Google Map .", "I could add a normal panoramio layer but I am really wanting to have that really nice blue dot thing happening .", "I would like to create some kind of open free group posting of photos with geotags .. . .. . First I thought about Panoramio http : www.panoramio.com but seems there is no API for photos upload .", "Yes Panoramio has it s api panoramio.com api widget api.html http : www.panoramio.com api widget api.html but as I stated in question it has no API for photos upload .. .", "I m not using Google Maps API for iOS so the question is : can I use the standard MKMapKit from Apple AND show photos from Panoramio in the same app", "From what I read there I don t see a problem with retrieving your location via the CoreLocation framework and subsequently using that info to request map information from Panoramio .", "i have panoramio widgets on this link digitalwander.blogspot.com 2013 11 recent-world-photos.html http : digitalwander.blogspot.com 2013 11 recent-world-photos.html i add a function .", "Sure will try but need the widget code the code which you have downloaded from panoramio which you have integrated in your website so that I can try to crack the issue .", "I ve made a PHP port of your GeoLocation class .", "You can test it here http : www.panoramio.com map lt -33.541395 ln 167.380829 z 8 k 2 a 1 tab 1 pl all http : www.panoramio.com map lt -33.541395 ln 167.380829 z 8 k 2 a 1 tab 1 pl all .. . .. . One can also use this fiddle to test your panoramio requests .. . .. . http : jsfiddle.net qb0tyyjk 2", "and also i know as a fact that the request i am doing to panoramio api is returning successfull results and has nothing to do with entering in the .when.apply null requestPlaces first .", "The Places API will give you the coordinates latitude and longitude in the place detail response http : code.google.com apis maps documentation places PlaceDetails you can then send the coordinates to the Panoramio API http : www.panoramio.com api data api.html .", "Panoramio Data API : .. . .. . I m trying to access the photos from New Zealand through the following request of http : www.panoramio.com map get panoramas.php order popularity set public from 0 to 10 minx -33.541395 miny 167.380829 maxx -46.498392 maxy 179.817352 http : www.panoramio.com map get panoramas.php order popularity set public from 0 to 10 minx -33.541395 miny 167.380829 maxx -46.498392 maxy 179.817352 .. . .. . The above URL always returns an empty content as mentioned below : count : 271 has more : false photos : .. . .. . But the request with a different co-ordinates works fine as mentioned below .", "http : www.panoramio.com map lt 32.739485 ln 70.491211 z 9 k 1 a 1 tab 1 pl all http : www.panoramio.com map lt 32.739485 ln 70.491211 z 9 k 1 a 1 tab 1 pl all .. . .. . lt 32.739485 latitude ln 70.491211 longitude .. . .. . this Panoramio JavaScript API widget create a bounding-box around a lat long pair and then returning all photos with in those bounds .", "http : www.panoramio.com lookaround 38848817 .. . .. . You can click on the photo to see another photo .", "My strategy has been to retrieve the URL of the Panoramio thumbnails through JSON.Stringify run String Replace on them to replace the mini square image-size with medium in the URL path and to remove the double-quotes on each end and then pass the url as an image source to the infoWindow I get only a broken image icon when clicking the marker .", "Geolocation and mapping are two complimentary functions that don t necessarily interact ." ] }
{ "confidence": [ 66.11442565917969, 57.683475494384766, 55.6830940246582, 54.68667984008789, 52.03677749633789, 51.19137191772461, 51.02008819580078, 50.47056198120117, 48.83433151245117, 48.747684478759766, 48.16490936279297, 48.15542984008789, 48.10431671142578, 47.50410079956055, 46.54690933227539, 46.54690933227539, 46.387874603271484, 45.68331527709961, 45.40025329589844, 45.21062469482422 ], "content": [ "Question : I m developing a little iOS App which shows POIs on a standard MKMapKit map from Apple . When the user select a POI the app send a request to Panoramio to get a photo from the latitude and the longitude like that : .. . .. . The problem is that I saw today on the Panoramio ToS : .. . .. . Section 2 : API Client restrictions You may not use the API in API Clients using map technology other than Google Maps or any photo-sharing sites . I m not using Google Maps API for iOS so the question is : can I use the standard MKMapKit from Apple AND show photos from Panoramio in the same app If not is there an alternative solution to get photos from GPS coordinates Thanks .. . Answer : First off I AM NOT A LAWYER AND THIS IS NOT LEGAL ADVICE . Disclaimer aside use apple s CoreLocation classes to generate latitude-longitude information and you never touch mapping software . Geolocation and mapping are two complimentary functions that don t necessarily interact . From what I read there I don t see a problem with retrieving your location via the CoreLocation framework and subsequently using that info to request map information from Panoramio . Good luck", "Question : I need to fetch panoramio user info using google-api-php-client library . Can somebody guide me how it is possible using google-api-php-client library One more thing want to confirm that .. . is panoramio userid not username or email id same as google userid Since i am using google php api for sign in to my application . .. . Answer : Panoramio is not yet integrated with all the other Google APIs so you can t access it using the google-api-php-client library . They however have 2 public APIs i.e . without the need to authenticate that you can use : .. . .. . The Widget API http : www.panoramio.com api widget api.html toc for e.g . including photos using JS .. . The older REST Data API http : www.panoramio.com api data api.html for quering image metadata in JSON format .. . .. . Note that both are restriced to 100000 queries day . The Panoramio and Google user IDs are not correlated . Comment : Is it possible to fetch panoramio userinfo such as userid birth date full name country state city from any api by providing users panoramio email-id and password I am aware with your mentioned apis which are used for fetching photo details uploaded by user on panoramio . Comment : Simply said : no . Panoramio does not Provider an authentication API and is not yet supported by Google s OAuth . Comment : www.panoramio.com map get panoramas.php set public from 0 to 20 minx -180 miny - 90 maxx 180 maxy 90 size medium mapfilter true . This link is used to fetch all photo details uploaded by user if i pass the panoramio userid in set parameter of url . Thats why i required panoramio userid once the user sign in to my application . So it will fetch the photo details of logged in user . Is there any different way to achieve this kind of functionality @jan Comment : You can only ask the user to provide his ID or a link-to his profile page where you could extract the ID manually . He could then of course also use the ID profile page of somebody else . Comment : but the requirement of my application is that user should get photo details from his panoramio account not the other user photo details . Thats why i need to authenticate his panoramio account . So is there any way to achieve this functionality", "Question : I m using the Panoramio API to create a little photo widget like the one you see here at this link . http : www.panoramio.com api widget api.html attribution-widget My code sets some options up for retrieving photos namely by creating a bounding-box around a lat long pair and then returning all photos w in those bounds . However sometimes depending on the coordinates no photos are returned and my widget just appears with broken page links small symbol . Anyone know how to check whether or not the api will in fact return data I d like to perhaps replace the contents of the div tag holding the widget w some text saying no photos available . Something like that.. . .. . Answer : this Panoramio JavaScript API widget create a bounding-box around a lat long pair and then returning all photos with in those bounds . Another type of Panoramio JavaScript API widget in which you can also change background-color with example and code is here http : codespk.blogspot.com 2013 10 panoramio-javascript-api-widget-example.html . I have made a blogspot page http : discoverworldz.blogspot.com where i have created many Panoramio JavaScript and HTML API widgets . It does not show in composing mood.It show after publishing .", "Question : I am trying to get the total number of photos from one specific area using the panoramio data API . The following code .. . .. . returns .. . .. . count should be around 100 000 000 the total number of photos in panoramio and not 72 543 250 and I guess the value of has more should be false . Thanks in advance . .. . Answer : The difference between the total number of photos according to the API and the actual total number of photos in Panoramio is that the API only returns geo-referenced photos and not all photos in Panoramio are geo-referenced .", "Question : I am in developing web application to allow user search Panoramio images using a tag . Would be appreciate if someone has done previously and share how you do that to me . Comment : Try it yourself and when you get stuck ask a specific question . Asking people to do things for you is not appropriate on StackOverflow . .. . Answer : You ll find all the information you need to know here : .. . .. . https : developers.google.com maps documentation javascript examples layer-panoramio-tags .. . .. . Its easy to implement give it a go . As long as you ve set up the Panoramio service correctly it should only take a line or two of code .", "Question : I would like to create some kind of open free group posting of photos with geotags .. . .. . First I thought about Panoramio http : www.panoramio.com but seems there is no API for photos upload . By now I can see only two ways : .. . .. . Flickr http : www.flickr.com - there are groups but you have to approve group membership anyway or use tags for grouping which is bad for maintenance .. . .. . Custom server solution which will cost efforts and hosting .. . .. . Can you suggest other free photo services with geotags functionality or opensource solutions Thank you EDIT .. . : Want to add that I am intrasted in services with open API that is why I thought its a good idea ask this question at SO.. . .. . Answer : it also seems like panoramio does have an API based on services with responses in JSON .. . .. . the request will be something like .. . .. . checkout this post http : googlegeodevelopers.blogspot.com 2008 06 panoramio-api-markermanager-instant.html in google geo developers blog for more info .. . .. . hope it helps . G . Comment : Yes Panoramio has it s api panoramio.com api widget api.html http : www.panoramio.com api widget api.html but as I stated in question it has no API for photos upload .. . I need a way to upload photos from my code . But thank you anyway Comment : oh right.. . missed the upload part.. . cheers", "Question : Apologies if I have missed this in the API docs but it is stated there that : .. . .. . The PanoramioLayer renders a layer of geotagged photo icons from Panoramio on the map as a series of large and small photo icons .. . .. . Is there any way to control this - i.e to show only small icons for instance .. . Answer : There is no way to control this through the Google Maps API .", "Question : null .. . Answer : I have been creating an implementation where I would want to get the latitude and longitude coordinate values per each of the returned image from Panoramio . I have seen an example where the REST call returned an object which contained also the lat lon values for the photo . E.g . when requesting simply first 10 top listed images . If I now examine the default input from the Panoramio service I atleast cannot locate the parameters lat and lon in the result Anyone knows why this is and how could I get both the images and the latitude-longitude values as supposed Cheers Gary Hamilton Norway", "Question : I am trying to get the total number of photos from one specific area using the panoramio data API . The following code .. . .. . returns .. . .. . count should be around 100 000 000 the total number of photos in panoramio and not 72 543 250 and I guess the value of has more should be false . Thanks in advance . .. . Answer : The 100 000 000 are recent ID because some ID are deleted so REAL number may be lower . Comment : Can you elaborate on what you mean Are you trying to say that the output the OP is getting is correct", "Question : I have given a location defined by latitude and longitude . Now i want to calculate a bounding-box within e.g . 10 kilometers of that point . The bounding-box should be defined as latmin lngmin and latmax lngmax . I need this stuff in order to use the panoramio API http : www.panoramio.com api . Does someone know the formula of how to get thos points Edit : Guys i am looking for a formula function which takes lat lng as input and returns a bounding-box as latmin lngmin and latmax latmin . Mysql php c javascript is fine but also pseudocode should be okay . Edit : I am not looking for a solution which shows me the distance of 2 points Comment : If you are using a geodatabase somewhere they surely have a bounding-box calculation integrated . You could even go check the source of PostGIS GEOS for example . .. . Answer : It is very simple just go to panoramio website and then open World Map from panoramio website.Then go to specified location whichs latitude and longitude required . Then you found latitude and longitude in address-bar for example in this address . http : www.panoramio.com map lt 32.739485 ln 70.491211 z 9 k 1 a 1 tab 1 pl all http : www.panoramio.com map lt 32.739485 ln 70.491211 z 9 k 1 a 1 tab 1 pl all .. . .. . lt 32.739485 latitude ln 70.491211 longitude .. . .. . this Panoramio JavaScript API widget create a bounding-box around a lat long pair and then returning all photos with in those bounds . Another type of Panoramio JavaScript API widget in which you can also change background-color with example and code is here http : codespk.blogspot.com 2013 10 panoramio-javascript-api-widget-example.html . It does not show in composing mood.It show after publishing .", "Question : I have a Google map http : vispo.com geogenie dev pt3.html that displays Panoramio images . I m trying to make it so that when you click a Panoramio thumbnail the image fills the browser . As you can see I am sort of almost there . How do I finish it so that it works across browsers of different sizes I ve looked at the documentation for both the Panoramio API on the Panoramio site http : panoramio.com api widget api.html and the Google documentation on the Panoramio API https : developers.google.com maps documentation javascript reference PanoramioLayer . I ve also read-the-docs on infoWindows . It seems like maybe one is not meant to display Panoramio images this way It s easy to just display a small image in a small infoWindow but it isn t a very interesting thing to do . .. . Answer : I found the answer to the question . The important thing is not to display the image in an infoWindow . Instead just display a div that covers the map and is not embedded in the map . Have a look at http : vispo.com geogenie dev pt4.html . Click a thumbnail image . It displays large as can be . Then click it to close the image . Trying to do it by displaying the image in an infoWindow is very painful because you don t have full control over infoWindow positioning and sizing .", "Question : I have a set of latitude and longitude of places like restaurants landmarks etc . and even their addresses . i wanted to find out their pictures using these details i.e . LOCATION lat long or the ADDRESS and i am not being able to do so . Pictures as in the thumbnails or pictures that we see if we view these places on google-maps . i got the latitude and longitude using HTTP requests and also preferably would like to get the pictures similarly . i have a clue about panoramio api but that is not accurate . Any idea about anything else the latitude and longitude has been found using Google geo-location api . Thank you . .. . Answer : Just add latitude-longitude values and tag for places i.e restaurants in this panoramio JavaScript API . this Panoramio JavaScript API widget create a bounding-box around a lat long pair and then returning all photos with in those bounds with your tag . Another type of Panoramio JavaScript API widget in which you can also change background-color with example and code is here http : codespk.blogspot.com 2013 10 panoramio-javascript-api-widget-example.html . More HTML and JavaScript API examples are here http : discoverworldz.blogspot.com .. . .. . It does not show in composing mood.It show after publishing .", "Question : I m using panoramio api to show some pictures about a destination . Unfortuanatly for some destinations they dont have any images . How could i test if panoramio doesnt have any results so i can display something else . I tried replacing it usig livequery : .. . .. . This work but only if i click or press a button probably when any event occures . Can t imagine why.. . .. . .. . Any other method that does the job is welcome . .. . Answer : It is very simple just go to panoramio website and then open World Map from panoramio website.Then go to specified location whichs latitude and longitude required . Then you found latitude and longitude in address-bar for example in this address . http : www.panoramio.com map lt 32.739485 ln 70.491211 z 9 k 1 a 1 tab 1 pl all http : www.panoramio.com map lt 32.739485 ln 70.491211 z 9 k 1 a 1 tab 1 pl all .. . .. . lt 32.739485 latitude ln 70.491211 longitude .. . .. . this Panoramio JavaScript API widget create a bounding-box around a lat long pair and then returning all photos with in those bounds . Another type of Panoramio JavaScript API widget in which you can also change background-color with example and code is here http : codespk.blogspot.com 2013 10 panoramio-javascript-api-widget-example.html . It does not show in composing mood.It show after publishing .", "Question : I m using Google Places API to retrieve data about places but couldn t find how to get a picture of that place Google Places API just provides icon which is not the same . I need the photo you get when you search for a place in Google Maps in a web browser for example . There is usually more pictures from Panoramio but Panoramio API can only search for pictures by location and not by a particular restaurant or hotel name for example . Any ideas .. . Answer : The Places API just added the ability to request photos directly in the API : https : developers.google.com maps documentation javascript places places photos Comment : do u have any sample code for that", "Question : I m writing a location base client and would love to integrate Panoramio with my client now the problem is that I can t find a way to interact with the Panoramio using a REST-like service . I know they do have an API but it s mostly for embedding the content into a website and not as to interact thru me code at least from documentation .. . .. . Have any of you hacked a way thru this I am writing the clients natively for android and iphone in case you are wondering . cheers .. . .. . G . .. . Answer : well it seems like the answer came a bit fast.. . and although this is easily accessible thru their website it is discussed http : forums.digitalpoint.com showthread.php t 1473025 in their forum and even google has posted about it http : googlegeodevelopers.blogspot.com 2008 06 panoramio-api-markermanager-instant.html in their geo developer blog .. . .. . a sample request to get images from a bounding-box will go along the lines of the following example : .. . .. . Update : I have found also the official page http : www.panoramio.com api data api.html to their data api . hope it helps Comment : Wuau That s a super clear and simple way to get images from Panoramio Thanks for looking into it : D", "Question : I am trying to use Panoramio s JavaScript API but it fails to display when the MooTools framework is used . Using Chrome s inspect feature on this jsFiddle http : jsfiddle.net DEWvZ 1 reveals this error with the included JavaScript : .. . .. . The site I am trying to use the API on is a Joomla 2.5 one hence the use of the MooTools framework . Changing the framework on the fiddle to jQuery or removing it entirely produces the pictures and the error does not appear . I ve looked at trying to incorporate jQuery s noConflict function somehow and searched for a similar function for MooTools but have had no success . Any suggestions to solve this would be greatly welcome . Or is it a limitation of Panoramio s JavaScript API itself .. . Answer : this Panoramio JavaScript API widget . Another type of Panoramio JavaScript API widget in which you can also change background-color with example and code is here http : codespk.blogspot.com 2013 10 panoramio-javascript-api-widget-example.html . I have made a blogspot page http : discoverworldz.blogspot.com where i have created many Panoramio JavaScript and HTML API widgets . It does not show in composing mood.It show after publishing.I have used this on my blogspot website.its work .", "Question : I m using Google Places API to retrieve data about places but couldn t find how to get a picture of that place Google Places API just provides icon which is not the same . I need the photo you get when you search for a place in Google Maps in a web browser for example . There is usually more pictures from Panoramio but Panoramio API can only search for pictures by location and not by a particular restaurant or hotel name for example . Any ideas .. . Answer : The Places API will give you the coordinates latitude and longitude in the place detail response http : code.google.com apis maps documentation places PlaceDetails you can then send the coordinates to the Panoramio API http : www.panoramio.com api data api.html . For example drawing from examples in the API docs : .. . .. . https : maps.googleapis.com maps api place details json reference big long key for place sensor true key AIzaSyAiFpFd85eMtfbvmVNEYuNds5TEF9FjIPI .. . .. . Response : .. . .. . We can see that the coordinates are location : lat : -33.8669710 lng : 151.1958750 .. . .. . Then we can send a request to Panoramio inserting the coordinates plus a little wiggle room on either side I did + - 0.002 degrees a shape 200 m x 200 m square at the equator generally smaller . http : www.panoramio.com map get panoramas.php set public from 0 to 20 minx -33.868 miny 151.193 maxx -33.864 maxy 151.197 size medium mapfilter true .. . .. . You may need to do some filtering of the responses to get the closest photo but this should give you something to work with . Comment : thanks i was thinking about that it won t necessarily give the picture of the right place but i guess its the closest you can get . Its just weird they have pics on website but don t give them anyhow in maps or places api", "Question : I m using Google Places API to retrieve data about places but couldn t find how to get a picture of that place Google Places API just provides icon which is not the same . I need the photo you get when you search for a place in Google Maps in a web browser for example . There is usually more pictures from Panoramio but Panoramio API can only search for pictures by location and not by a particular restaurant or hotel name for example . Any ideas .. . Answer : The Places API now supports the return of one place photo if available for a Place Search request https : developers.google.com places documentation search and up to ten place photos for a Place Details request https : developers.google.com places documentation details . If a photos array is returned with your request you can pass the photo reference from a contained photo object to a Place Photo request https : developers.google.com places documentation photos with the maxheight and or maxwidth sensor and key parameters : .. . .. . Please see the documentation https : developers.google.com places documentation photos for more details .", "Question : How to get all images from the panorama by sending multiple latitude-longitude at a time . I want to show the panorama images on my site and for the same I did the follwing .. . .. . I am able to get images from the panorama by sending tag lat lng for one location only as : .. . .. . it gives me 20 images for pune tag .. . .. . By using lat lng I used the follwing URL to the Images : .. . .. . it gives me 20 images for pune location which is having lat 18.520430 and lng 73.856743 .. . .. . Is there way to get the images by sending multiple tags or lat lng i.e for multiple location at a time .. . Answer : Its not possible to get photos of two tag or two different locations at a time . In JavaScript code You can change many things . this Panoramio JavaScript API widget create a bounding-box around a lat long pair and then returning all photos with in those bounds . Another type of Panoramio JavaScript API widget in which you can also change background-color with example and code is here http : codespk.blogspot.com 2013 10 panoramio-javascript-api-widget-example.html . I have made a blogspot page http : discoverworldz.blogspot.com where i have created many Panoramio JavaScript and HTML API widgets . It does not show in composing mood.It show after publishing .", "Question : Panoramio Data API : .. . .. . I m trying to access the photos from New Zealand through the following request of http : www.panoramio.com map get panoramas.php order popularity set public from 0 to 10 minx -33.541395 miny 167.380829 maxx -46.498392 maxy 179.817352 http : www.panoramio.com map get panoramas.php order popularity set public from 0 to 10 minx -33.541395 miny 167.380829 maxx -46.498392 maxy 179.817352 .. . .. . The above URL always returns an empty content as mentioned below : count : 271 has more : false photos : .. . .. . But the request with a different co-ordinates works fine as mentioned below . http : www.panoramio.com map get panoramas.php order popularity set public from 0 to 10 minx -124.29382324218749 miny 36.089060460282006 maxx -119.8773193359375 maxy 38.724090458956965 http : www.panoramio.com map get panoramas.php order popularity set public from 0 to 10 minx -124.29382324218749 miny 36.089060460282006 maxx -119.8773193359375 maxy 38.724090458956965 .. . .. . Can any one let me know what is the problem and how this can be rectified is the API restricted to any specific country Thanks in advance .. . Answer : The url in your example is right but the coordinates are in the middle of pacific ocean where there is no images by panoramio . You can test it here http : www.panoramio.com map lt -33.541395 ln 167.380829 z 8 k 2 a 1 tab 1 pl all http : www.panoramio.com map lt -33.541395 ln 167.380829 z 8 k 2 a 1 tab 1 pl all .. . .. . One can also use this fiddle to test your panoramio requests .. . .. . http : jsfiddle.net qb0tyyjk 2" ] }
[ "yes-answer-long", "yes-answer-short" ]
website
UNK_RELATION
telnet@bidirectional@41
telnet -- telnet is an old protocol for @placeholder interactive text-oriented communication with remote hosts via virtual terminals .
{ "confidence": [ 43.729740142822266, 41.3044548034668, 41.199005126953125, 40.829830169677734, 40.48234176635742, 40.48234176635742, 40.35713577270508, 40.26613998413086, 39.234798431396484, 38.931976318359375, 38.931976318359375, 37.98652267456055, 37.702518463134766, 37.40616226196289, 37.35450744628906, 37.1126708984375, 37.07626724243164, 36.97640609741211, 36.97640609741211, 36.85336685180664, 36.85336685180664, 36.833011627197266, 36.539573669433594, 36.47845458984375, 36.47845458984375, 36.40904998779297, 35.733280181884766, 35.571998596191406, 35.571998596191406, 35.571998596191406, 35.55125045776367, 35.495277404785156, 35.194183349609375, 35.06285858154297, 35.06285858154297, 35.05723571777344, 34.93421173095703, 34.89501953125, 34.89501953125, 34.521240234375, 34.402732849121094, 34.2142219543457, 34.2142219543457, 34.2142219543457, 34.14684295654297, 34.14684295654297, 34.14633560180664, 33.949562072753906, 33.939918518066406, 33.76507568359375, 33.76507568359375, 33.73528289794922, 33.405765533447266, 33.405765533447266, 33.405765533447266, 33.405765533447266, 33.201385498046875, 33.201385498046875, 33.081153869628906, 33.02943420410156, 32.99446105957031, 32.99446105957031, 32.99446105957031, 32.81962203979492, 32.7890625, 32.7890625, 32.7890625, 32.7890625, 32.7890625, 32.7890625, 32.7890625, 32.7890625, 32.42258834838867, 32.42258834838867, 32.42258834838867, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.39072036743164, 32.07115173339844, 32.06822967529297, 32.019107818603516, 31.980607986450195, 31.980607986450195, 31.980607986450195, 31.980607986450195, 31.97986602783203, 31.862651824951172, 31.843608856201172 ], "content": [ "Telnet is a name of a protocol and there are many different clients terminals that handle it .", "I m not sure what it means to be a telnet client that doesn t follow the telnet protocol .", "Is it possible to be done via TELNET", "Remote telnet commands will work here .", "Is this a telnet protocol I m missing or what", "It was indeed a telnet protocol I was missing .", "It is defined by TELNET protocol spec independently of OS .", "required for TELNET on Linux and TELNET on Windows .", "I don t think this is correct as I ve configured SecureCRT to use the Telnet protocol not SSH Telnet SSL or any other .", "Is that some kind of encoding or something belongs-to telnet protocol", "I concluded that telnet is the right protocol for the job .", "From the site : .. . .. . TTnCnx - TELNET client protocol support .", "Execute the telnet commands .", "The issue is that I am trying to telnet into a remote device that only has telnet enabled .", "github.com 9swampy Telnet https : github.com 9swampy Telnet", "I want to communicate with a data-logger via Telnet .", "If you want to connect to real telnet server you might need to handle telnet escape sequences face terminal emulation handle interactive commands etc .", "CR+LF is the standard newline sequence used by the telnet protocol .", "Maybe is worth considering using SSH protocol instead of Telnet .", "TELNET protocol is more or less a distant terminal emulation .", "Am I missing some subtlety of the telnet protocol", "Good guess about is this a telnet protocol I m missing - .. . .. . The RFCs involved in defining the telnet protocol are linked from this page http : www.omnifarious.org hopper technical telnet-rfc.html if you want to debug further .", "I was reading the device manual saying that it uses a telnet like communication protocol and I thought it was telnet .", "BTW i use this telnet 127.0.0.1 12345 to connect via telnet on both OS .", "I ve succesfully connected to wifi module using telnet and execute command via telnet .", "en.wikipedia.org wiki Telnet http : en.wikipedia.org wiki Telnet", "Please see this old answer of mine http : stackoverflow.com a 14606871 440558 which quotes and links to the Telnet standards about newlines in the Telnet protocol .", "I m not familiar with telnet or VxWorks .", "Telnet is just a socket connection .", "telnet localhost should do that .", "Telnet is often used when you learn HTTP protocol .", "To control the robot one needs to connect with it wirelessly via telnet and send commands through the tcp-ip protocol .", "Best C Telnet Lib I ve found is called Minimalistic Telnet .", "gets the remote at least telnet from an Xterm on a Linux box into the right state .", "@Tomas suggestion is to replace the use of Telnet the remote login service with SSH .", "Or if you must use telnet prepare your input in a text file and pipe paste from there into telnet .", "It is the TELNET protocol itself which requires r n defined as the end-of-line sequence in the protocol .", "Unless TOR is actually using the real Telnet protocol Telnet sequences and all then you are better off using TIdTCPClient instead of TIdTelnet .", "ssh is surely more secure than telnet but some IP devices just do not provide ssh service and rely on telnet protocol for using the device .", "Have to do below before and after telnet .", "I can successfully use Telnet via the terminal in OS X or cmd prompt in Windows so I know the telnet server on the remote machine is working login credentials work and my command is correct .", "Well telnet is a little bit more .", "I want to connect to a telnet server .", "Only telnet console connection works .", "This is the standard line terminator in Telnet .", "Telnet is the only option .", "This is the code that prints the input : .. . .. . I m connecting via Putty through Telnet to a remote host .", "Short form : telnet is not a simple protocol and what you re seeing is a trace of a telnet negotiation trying to occur with a server that doesn t speak telnettese - .", "I am trying to connect via telnet to a laboratory instrument .", "here is the result Welcome to Microsoft Telnet Client Escape Character is CTRL+ Microsoft Telnet send hallo Sent string hallo Microsoft Telnet", "This link might help you C Telnet Library http : stackoverflow.com questions 390188 c-telnet-library .. . .. . Minimalistic Telnet .. . telnetcsharp.codeplex.com .. . xpresslearn .. . thoughtproject.com .. . dotnettelnet", "Unless you are very good at typing binary-data into telnet and reading the binary response you re not going to be able to communicate with a Modbus TCP slave via telnet .", "I enabled the Telnet server on the 2012 server and from a linux desktop I telnet to the 2012 server by using the domain administrator .", "For very basic telnet just telnet to a port and echo bytes there s not much to do .", "I recommend installing Wireshark http : www.wireshark.org to watch the Telnet traffic using an existing Telnet server .", "An example is here stackoverflow.com questions 1491494 telnet-automation-scripting http : stackoverflow.com questions 1491494 telnet-automation-scripting", "Is the weather a telnet server", "TTnScript - TELNET scripting component .", "Stop wireshark capture and then filter out everything except telnet communication between you and the target .", "I am able to access Universe via the Universe Shell but not via telnet on port 23 .", "yes the weather service is via telnet vt100 so far as I know .", "Here s what I m doing now via Telnet commands .", "A telnet application can be done by simply sending string via socket .", "You told that you programmed a telnet server using QTcpSocket and you said nothing about the telnet client.. . is a commercial telnet client", "Submit works fine under telnet .", "This is small and light telnet server for python .", "out.println sends a message to a telnet client", "manual page for your telnet client .", "Once automated there will be no interaction of the user with telnet .", "Using telnet for this purpose is very risky .", "Do I need to reconfigure telnet", "Authentication is done through this telnet connection .", "A bunch of telnet protocol commands have to be working before a server will get to stage of prompting user for login password commands .", "My point was really it has nothing to do with OS but TELNET protocol itself i.e .", "Does this send some sort of Telnet protocol configuration commands or am I reading too far into your example", "I m not sure the above is a feature of Telnet or OpenVMS .", "The line terminator in Telnet is r n not n .", "@AniketThakur TCP port 23 is the default telnet port .", "ok but i wanted to try to telnet on a certaint port .", "Is there a telnet library that I can use with c++ for Linux", "telnet specifies negotiation of terminal options send in binary .", "I think you are correct about Telnet .", "There is also a Telnet interface for controlling the camera i.e .", "jsTerm http : jsterm.com is an HTML5 implementation of a Telnet client .", "does anyone know a telnet connection library in PHP", "I see that Perl has a Net : : Telnet module .", "I believe the question is about a TELNET session", "The module I am using is Net : : Telnet .", "Detailed Solution : Login to telnet in the same machine .", "I need to build a script to get the telnet output of as many hosts as possible and save them to a separate file for each host .", "You cannot do it with telnet .", "I would like to telnet to a remote device run some commands parse the o p and present the results .", "I am not shelling out to Telnet please see the the updated post that details how I am currently interacting with Telnet .", "For example how does this differ from going into the telnetlib source and changing def Telnet : to def Telnet Object :", "While its running it reads the output from telnet into a buffer and looks for the string telnet outputs to indicate we are connected .", "I think what you want to do is not : .. . .. . but rather : .. . .. . According to the docs on NET : : Telnet Telnet cmd returns the response .", "For simple tasks such as connecting to a specialized hardware device with telnet-like interface connecting via socket and just sending and receiving text commands might be enough .", "plus to tcp socket programming you must understand how telnet protocol works for that you can refer to RFC request for comment documents .. . .. . this is telnet specification telnet specification http : www.faqs.org rfcs rfc854.html and old telnep protocol rfc http : www.faqs.org rfcs rfc318.html .. . .. . for very pure delphi telnet client daemon code please check this pack http : www.torry.net samples samples soft kolsocket.zip KOL based", "I was doing .. . .. . telnet 192.168.200.150 1099 .. . .. ." ] }
{ "confidence": [ 53.343048095703125, 53.018802642822266, 50.457298278808594, 50.07720947265625, 49.69659423828125, 49.61716079711914, 49.57682800292969, 47.14504623413086, 47.04669952392578, 46.816192626953125, 46.2271614074707, 45.71915817260742, 45.693939208984375, 45.648014068603516, 45.51777267456055, 45.22840118408203, 45.06399154663086, 44.794090270996094, 44.743553161621094, 44.416473388671875 ], "content": [ "Question : I am working on automating some telnet related tasks using Bash scripts . Once automated there will be no interaction of the user with telnet . that is it will be totally automated .. . .. . the scripts looks something like this : .. . .. . There are 2 problems I am facing here : .. . .. . 1 . How to execute the commands on the remote system from the script without human interaction From my experience with some test codes I was able to deduce that when the telnet 10.1.1.1 is executed telnet goes into an interactive session and the subsequent lines-of-code in the script are executed on the local system . How can I run the lines-of-code on the remote system rather than the local one 2 . I am unable to get a log file for the activity in the telnet session on the local system . The stdout redirect I used makes a copy on the remote system I do not want to perform a copy operation to copy the log to the local system . How can I achieve this functionality .. . Answer : Use ssh for that purpose . Generate keys without using a password and place it to .authorized keys at the remote machine . Create the script to be run remotely copy it to the other machine and then just run it remotely using ssh . I used this approach many times with a big success . Also note that it is much more secure than telnet . Comment : ssh is surely more secure than telnet but some IP devices just do not provide ssh service and rely on telnet protocol for using the device . Comment : telnet the program can be used as a client for ANY or more practically MOST text-based client-server connections . It can be used for easy testing for example HTTP and IMAP . @Tomas suggestion is to replace the use of Telnet the remote login service with SSH . whilst his comment is true it is probably not what the OP was requiring . Comment : Rob telnet can be indeed used to connect to any port but see the OPs question - in his context he wants to use telnet only for login citing : execute some commands on the remote system . Using telnet for this purpose is very risky .", "Question : I ve installed Universe Personal Edition on a Windows 8.1 virtual-machine that s hosted in VMWare . I also have installed a terminal-emulator SecureCRT in the VM . I am able to access Universe via the Universe Shell but not via telnet on port 23 . I ve confirmed that the uvtelnet service is running and that it s listening on port 23 as confirmed by netstat -a . When I stop the service netstat -a shows that nothing is listening on port 23 . After restarting the service netstat -a shows that it s listening on port 23 . Everything looks correct but when I try to connect via SecureCRT the message The remote system refused the connection is displayed in the terminal window . I ve tried disabling the Windows Firewall but still get the same result . That Universe is installed and working is proven by the fact that I can use the Universe Shell . I d prefer to use SecureCRT instead but can t even get a login prompt . Any help would be appreciated I can t find anything on the net or in the docs that helps . .. . Answer : I have not used the terminal-emulator you mentioned . Yet I can tell you the error is caused because you are trying to make a secure connection to the UniVerse port which is not setup for secure connections . Port 23 is the default telnet port set up by UniVerse and is not intended for secure connections . Comment : I don t think this is correct as I ve configured SecureCRT to use the Telnet protocol not SSH Telnet SSL or any other . But hey it s a thought . I will try using the built-in windows telnet client and see if that works . Comment : Problem solved . I replaced the machine name with 127.0.0.1 and can connect perfectly . Neither the host name Windows81 or localhost worked and a ping test showed that Windows was using IPV6 addresses when either of those was used . I know that I can change the hosts-file to force IPV4 for Windows81 or localhost but using the IP address work for my purposes .", "Question : I m using Twisted to implement a server of sorts . When I test it the first line it receives is always strange : .. . .. . for both inputs I sent NAME Blurr . This is the code that prints the input : .. . .. . I m connecting via Putty through Telnet to a remote host . Is this a telnet protocol I m missing or what When I use Unix s telnet program and connect locally the first line is fine . .. . Answer : It was indeed a telnet protocol I was missing . Connecting as Raw instead Telnet solved the problem . Comment : Beat me by one second - Darn I should have sent sooner rather than go around collecting and pasting useful URLs - .", "Question : I m using Twisted to implement a server of sorts . When I test it the first line it receives is always strange : .. . .. . for both inputs I sent NAME Blurr . This is the code that prints the input : .. . .. . I m connecting via Putty through Telnet to a remote host . Is this a telnet protocol I m missing or what When I use Unix s telnet program and connect locally the first line is fine . .. . Answer : You can find an explanation of the mystery here http : www.cpp-home.com forum viewtopic.php f 1 t 8879 . Short form : telnet is not a simple protocol and what you re seeing is a trace of a telnet negotiation trying to occur with a server that doesn t speak telnettese - . Good guess about is this a telnet protocol I m missing - .. . .. . The RFCs involved in defining the telnet protocol are linked from this page http : www.omnifarious.org hopper technical telnet-rfc.html if you want to debug further . I m no putty expert so I don t know how to tell putty to avoid this negotiation and act like the good old simple Unix telnet client - . Comment : Thanks for the descriptive answer Comment : @Alex you re welcome Many of us have puzzled over that in the past since putty is far from the only telnet client to try fancy negotiations and telnet s often used for testing purposes on servers that don t do telnet protocols - it just took me 5 minutes to find a good explanation online", "Question : IS this straightforward Does any one have any good examples All my google searches return items on how to make telnet clients in dotNet but this overkill for me . I m trying to do this in C . Thanks .. . Answer : For simple tasks such as connecting to a specialized hardware device with telnet-like interface connecting via socket and just sending and receiving text commands might be enough . If you want to connect to real telnet server you might need to handle telnet escape sequences face terminal emulation handle interactive commands etc . Using some already tested code such as Minimalistic Telnet library from CodeProject http : www.codeproject.com KB IP MinimalisticTelnet.aspx free or some commercial Telnet Terminal Emulator library such as our Rebex Telnet http : www.rebex.net telnet.net might save you some time . Following code taken from this url http : www.rebex.net telnet.net tutorial-telnet.aspx shows how to use it :", "Question : I am working on automating some telnet related tasks using Bash scripts . Once automated there will be no interaction of the user with telnet . that is it will be totally automated .. . .. . the scripts looks something like this : .. . .. . There are 2 problems I am facing here : .. . .. . 1 . How to execute the commands on the remote system from the script without human interaction From my experience with some test codes I was able to deduce that when the telnet 10.1.1.1 is executed telnet goes into an interactive session and the subsequent lines-of-code in the script are executed on the local system . How can I run the lines-of-code on the remote system rather than the local one 2 . I am unable to get a log file for the activity in the telnet session on the local system . The stdout redirect I used makes a copy on the remote system I do not want to perform a copy operation to copy the log to the local system . How can I achieve this functionality .. . Answer : Write an expect http : linux.die.net man 1 expect script . Here is an example http : osix.net modules article id 30 . Comment : the expect is mostly for interactive sessions . What I want is an automated non-interactive session . the problem I am facing is that I am unable run the scripts on the remote system via telnet as all the lines following the telnet 10.1.1.1 are executed on the local machine rather than the machine I am accessing . Comment : As Thomas Telensky pointed out depending on your needs ssh is ultimately easier . But expect can be completely non-interactive . I am assuming that you mean that all the lines following the telnet are what you want executed on the remote machine in that case just add them to the expect script as send commands and delete the interact command . But ssh is easier and more secure . Comment : fair enough . I will be using expect for this task . Comment : another good addition is to read this - elenako.com 2013 04 04 http : elenako.com 2013 04 04 expect-script-start-telnet-run-commands-close-telnet provided script hasn t had r sequence at the end of command and when i clicked enter myself it haven t worked for some reason", "Question : I am working on automating some telnet related tasks using Bash scripts . Once automated there will be no interaction of the user with telnet . that is it will be totally automated .. . .. . the scripts looks something like this : .. . .. . There are 2 problems I am facing here : .. . .. . 1 . How to execute the commands on the remote system from the script without human interaction From my experience with some test codes I was able to deduce that when the telnet 10.1.1.1 is executed telnet goes into an interactive session and the subsequent lines-of-code in the script are executed on the local system . How can I run the lines-of-code on the remote system rather than the local one 2 . I am unable to get a log file for the activity in the telnet session on the local system . The stdout redirect I used makes a copy on the remote system I do not want to perform a copy operation to copy the log to the local system . How can I achieve this functionality .. . Answer : Telnet is often used when you learn HTTP protocol . I used to use that script as a part of my web-scraper : .. . .. . let s say the name of the script is get-page.sh then : .. . .. . will give you a html document . Hope it will be helpful to someone Comment : Most helpful comment This actually lets you automate sending commands by putting them in a loop Comment : Another help post blog.tonycode.com tech-stuff http-notes http : blog.tonycode.com tech-stuff http-notes making-http-requests-via-telnet Comment : Great Answer Thanks Helped me automate some command-line testing I was doing when testing a web server I am writing", "Question : I am working on automating some telnet related tasks using Bash scripts . Once automated there will be no interaction of the user with telnet . that is it will be totally automated .. . .. . the scripts looks something like this : .. . .. . There are 2 problems I am facing here : .. . .. . 1 . How to execute the commands on the remote system from the script without human interaction From my experience with some test codes I was able to deduce that when the telnet 10.1.1.1 is executed telnet goes into an interactive session and the subsequent lines-of-code in the script are executed on the local system . How can I run the lines-of-code on the remote system rather than the local one 2 . I am unable to get a log file for the activity in the telnet session on the local system . The stdout redirect I used makes a copy on the remote system I do not want to perform a copy operation to copy the log to the local system . How can I achieve this functionality .. . Answer : While I d suggest using expect too for non-interactive use the normal shell commands might suffice . Telnet accepts its command on stdin so you just need to pipe or write the commands into it : .. . .. . Edit : Judging from the comments the remote command needs some time to process the inputs or the early SIGHUP is not taken gracefully by the telnet . In these cases you might try a short sleep on the input : .. . .. . In any case if it s getting interactive or anything use expect . Comment : this won t work because you close the connection with EOF . Comment : +1 for sleep and braced expressions Comment : +1 again for sleep and braced expressions worked beautifully", "Question : I am working on automating some telnet related tasks using Bash scripts . Once automated there will be no interaction of the user with telnet . that is it will be totally automated .. . .. . the scripts looks something like this : .. . .. . There are 2 problems I am facing here : .. . .. . 1 . How to execute the commands on the remote system from the script without human interaction From my experience with some test codes I was able to deduce that when the telnet 10.1.1.1 is executed telnet goes into an interactive session and the subsequent lines-of-code in the script are executed on the local system . How can I run the lines-of-code on the remote system rather than the local one 2 . I am unable to get a log file for the activity in the telnet session on the local system . The stdout redirect I used makes a copy on the remote system I do not want to perform a copy operation to copy the log to the local system . How can I achieve this functionality .. . Answer : This worked for me. . I was trying to automate multiple telnet logins which require a username and password . The telnet session needs to run in the background indefinitely since I am saving logs from different servers to my machine . telnet.sh automates telnet login using the expect command . More info can be found here : http : osix.net modules article id 30 .. . .. . telnet.sh .. . .. . sample script.sh is used to create a background-process for each of the telnet sessions by running telnet.sh . More information can be found in the comments section of the code . sample script.sh .. . .. . 1 . Make sure there is no screen running in the backgroud by using the command screen -ls . 2 . Read http : www.gnu.org software screen manual screen.html Stuff to read more about screen and its options . 3 . -p option in sample script.sh preselects and reattaches to a specific window to send a command via the -X option otherwise you get a No screen session found error .", "Question : Is there an open-source telnet API library out there for Java something like Python telnetlib I need to connect to a server using telnet and execute some commands from within a Java program . .. . Answer : Maybe is worth considering using SSH protocol instead of Telnet . Telnet is much less secure for instance all the data is transmitted as plain text including your passwords . Comment : it s a windows machine that already has a telnet server it s also in the internal network so no outside access no security concerns .", "Question : Is there a telnet library that I can use with c++ for Linux I would like to telnet to a remote device run some commands parse the o p and present the results . .. . Answer : Telnet is just sending ascii text one byte at a time over a socket so this wouldn t be hard to implement . Just open the socket to the correct port and then read-write data to it and display it to the screen . Comment : The reason I prefer a library is exactly the steps to avoid as outline . It s very easy to do this in Java Apache lib . Can this be done in c++ or is it a PITA Comment : I m more familiar with Winsock than berkely sockets but it s not that hard to do . Socket code looks intimidating at first but it s not that hard and you don t need to do anything special to connect for this thing in terms of socket options or protocol wierdness or funky errors or anything like that . This page looks like it has everything you would need to write the code for this : tenouk.com Module40.html http : www.tenouk.com Module40.html Comment : Socket program is simple in theory - it s all the details of error-handling and things that can go wrong when you don t have control of the other machine that are tricky Comment : Things likely to go wrong that you have to handle : 1 . connection times out 2 . connection is forcibly closed by remote host a FIN or RST packet 3 . remote host cannot be found DNS failure or destination unreachable 4 . remote host refused connection remote host not listening on that port or refusing to respond by sending a RST or FIN There are other things but as long as you handle those gracefully you should be ok for a simple telnet client . If you re handling thousands of simultaneous connections it gets much harder . Comment : telnet specifies negotiation of terminal options send in binary . It s not just ascii .", "Question : I m looking for a C library that provides access to both SSH and Telnet under the same interface . What would be a good choice Comment : How could they possibly use the same interface SSH needs things like username private key files and so on which have no meaning to Telnet . I guess after the connection is established you could have a common interface which is just a bidirectional byte stream but connection setup is very different . Comment : what did you find when you searched and why didn t they meet your needs Comment : Wait search I thought posting here was searching Comment : Hang on isn t SO Search Outsourcing Comment : @Ben : Sure there must be different config parameters depending on which kind of connection is needed but being forced to use different libs with different API for the rest of the communication seems stupid . .. . Answer : I recommend Granados http : granados.sourceforge.net for SSH stack . It has been used in many products . I recommend this code project page http : www.codeproject.com KB IP MinimalisticTelnet.aspx for telnet stack . You can also download Poderosa terminal-emulator http : en.poderosa.org download binary.html . It s using Granados as the SSH stack and it has its own implementation of telnet stack . Poderosa is very pluggable . It provides a good abstraction-layer on the network stacks . If you don t have time to write your own unified interface you should really check out their work . It provides access to both SSH and Telnet under the same interface like what you want . Unfortunately it s written by Japanese engineers . All the inline comments are written in Japanese . It may take you some time to understand the codes . You may also like to check out the terminal emulation library as well . Since you are going to process the data returning from the remote terminals most terminals return escape character sequence http : www.termsys.demon.co.uk vtansi.htm for device control commands font color style or cursor movement commands . You may not notice that even in a simple command ls -al the returned content may also involve some escape character sequences . Those escape sequences are to make the directory name and file name shown in different colors . Again for terminal emulation the best C library I can find is Poderosa . If you don t have to use C library PuTTY http : www.chiark.greenend.org.uk sgtatham putty has the best terminal emulation support . It can recognize almost all escape character sequences I have seen so far . Although I highly recommend you to look at Poderosa and Granados please be aware that these projects seem to be no longer active . Well. . even so it s still the best I have seen .", "Question : How do I create a Telnet Client inside of a Delphi 5 application .. . Answer : plus to tcp socket programming you must understand how telnet protocol works for that you can refer to RFC request for comment documents .. . .. . this is telnet specification telnet specification http : www.faqs.org rfcs rfc854.html and old telnep protocol rfc http : www.faqs.org rfcs rfc318.html .. . .. . for very pure delphi telnet client daemon code please check this pack http : www.torry.net samples samples soft kolsocket.zip KOL based Comment : +1 . The rfc is an interesting read if you want to know a bit more about the details of the protocol . However I think rfc s are usually a bad place if you just want to set up an application to use that protocol .", "Question : I am working on a robot automation project and I have run into a road block . To control the robot one needs to connect with it wirelessly via telnet and send commands through the tcp-ip protocol . ex . The Mabc command moves it forward based on the left wheel speed a the right wheel speed b and time c . What I am trying to do is do some calculations in a C program and then send a message to the robot based on the value of the calculation . How can send commands via tcp-ip protocol in a C program Thanks Erik .. . Answer : You are looking for sockets . This is a comprehensive guide to socket programming in C . http : www.beej.us guide bgnet Telnet is also a well defined protocol although I don t know if this robot would use telnet or not it s extra processing overhead for a protocol that wouldn t have much added benefit for a robot control program . Telnet is covered in detail by RFC 854 http : www.faqs.org rfcs rfc854.html Comment : They generally don t implement the full telnet protocol just sending short ascii commands to port 23 .", "Question : I m trying to send non-printable ASCII characters codes 128 - 255 through telnet to a Ruby app using Socket objects to read data in . When I try to send x80 through telnet I expect Ruby to receive a string of 3 bytes : 128 13 10 . I actually receive a string of 6 bytes : 92 120 56 48 13 10 . Do I need to change something about how telnet is sending the information or how the Ruby socket is accepting it I ve read through all the telnet jargon I can comprehend . A point in the right direction would be very much appreciated . .. . Answer : is in decimal ASCII : .. . .. . So you are doing something very wrong and it s not the Telnet . The escape sequence x80 was treated literally instead of being understood as single character of code 128 . I guess you have used x80 instead of x80 . Note the different quotes . If that was a single character you can in Ruby also use character to denote a character : x80 so for example : .. . .. . while of course .. . .. . -- .. . .. . To summarize long story from the comments : .. . .. . originally data to be sent was entered manually through telnet terminal .. . telnet terminals often don t accept any escape codes and just send everything they got directly sometimes copying pasting a text with special-characters work sometimes terminals provide some extra UI goodies to send special-characters - but this time the terminal was very basic and pasting it didn t work and there was no UI goodies .. . instead of entering the data manually sending a file through a pipe to the telnet terminal seemed to work much better . Some data arrived but not good .. . piping the data to nc netcat instead of telnet terminal almost seemed to work binary-data arrived but it was not perfect yet .. . after examining the input file the one that was piped to nc with hexdump utility https : developer.apple.com library mac documentation Darwin Reference ManPages man1 hexdump.1.html it turned out that the file contained not exactly what we thought it seems that the editor used to create the file saved the text with wrong encoding and it has added some extra unwanted bytes .. . finally a utility called xxd https : developer.apple.com library mac documentation Darwin Reference ManPages man1 xxd.1.html helped to produce a good binary-data from a tailored hex-text output of xxd could be directly piped to nc netcat Comment : I m manually entering the hex code into telnet not through Ruby . It s being accepted by Ruby and interpreted character-by-character . I m asking how to enter the special character into telnet so that Ruby will understand what I mean . Comment : @BradRice : Usually you can t . But it greatly depends on what terminal are yo uusing . Intelligent terminals often have some side console or window when you can issue command like now send this special character . But if yours doesn t have anything like that then the onlu thing is to try copying a pasting it the exact character or string from some text notepad that can handle them . Also you may try to pipe into the terminal a text file that contains the text-with-special-characters instead of typing them by hand . Often that s more handy and repeatable . Or write a script for that or .. . Comment : And by terminal I mean the telnet terminal not your Bash console etc window . I mean the application you are using to establish the telnet connection . Telnet is a name of a protocol and there are many different clients terminals that handle it . For example putty can and it supports pasting special-characters provided you manage to copy them to clipboard . Comment : Also if you just want Ruby to understand it then send literally the x80 as four characters and parse translate it in Ruby . Simple eval will do although it s not the safest way . But if you really want to have a binary charcode 128 sent over the wire you must first understand your terminal . Comment : Gotcha . Well putting the character in a file yielded the same result I ve been seeing . I m using telnet from my Mac terminal so I have no extra help there . Unfortunately I won t be able to have Ruby piece together the data for me . I need to be able to send the special-characters themselves .", "Question : null .. . Answer : I am trying to develop a java application that reads raw data from a telnet client . I use TelnetClient from Apache Commons Net https : commons.apache.org proper commons-net to communicate and read-write to the device . My device a thermohygrometer sends raw bytes that need to be parsed to get the actual measurements . I am able to communicate with the device but the problem is that while reading binary-data it ignores some bytes . Specifically it ignores 0xff and 1 byte before it . I tested with the telnet client from terminal but I have the same behavior as from within the app . The first image show the wireshark capture while the second the raw input from telnet . Right after multiple 0x00 is the problem Wireshark Capture http : i.stack.imgur.com wdOAm.png .. . .. . Telnet Capture http : i.stack.imgur.com 00zEK.png .. . .. . I understand like 0xff is an escape character or a special command . Is there anyway I can change it so It will treat it as binary-data instead of trying to interpret it Comment : So just to clarify it doesn t sound like the device is actually using the telnet protocol.. . why not just make a raw socket connection with it Comment : I was reading the device manual saying that it uses a telnet like communication protocol and I thought it was telnet . I tried with a Socket and it worked fine . Thank you", "Question : I am working on automating some telnet related tasks using Bash scripts . Once automated there will be no interaction of the user with telnet . that is it will be totally automated .. . .. . the scripts looks something like this : .. . .. . There are 2 problems I am facing here : .. . .. . 1 . How to execute the commands on the remote system from the script without human interaction From my experience with some test codes I was able to deduce that when the telnet 10.1.1.1 is executed telnet goes into an interactive session and the subsequent lines-of-code in the script are executed on the local system . How can I run the lines-of-code on the remote system rather than the local one 2 . I am unable to get a log file for the activity in the telnet session on the local system . The stdout redirect I used makes a copy on the remote system I do not want to perform a copy operation to copy the log to the local system . How can I achieve this functionality .. . Answer : Play with tcpdump or wireshark and see what commands are sent to the server itself .. . .. . Try this .. . .. . Some servers require a delay with the password as it does not hold lines on the stack Comment : Newness is no excuse for rudeness . Please see the FAQ stackoverflow.com faq http : stackoverflow.com faq . Comment : wasn t meant to be insulting more like.. . i dont know apologies . I just keep seeing people using expect command as a solution . I just want people to realize there is a better solution to understanding what you are trying to accomplish . The expect command doesn t show you how its working its just a workaround for not knowing . It is more confusing then not . When in doubt go to the source . If the source is not available and if its a network protocol tcpdump wireshark snoop the packets and follow the command flow and you should be able to put something together with working knowledge . Comment : If you say so - I m a Mathematica programmer so the substance of your answer and comment is a mystery to me . But I am not alone in interpreting the word idiots to be intentionally insulting . I think you need to spend a bit more time on the site and see how people behave here .", "Question : I am working on automating some telnet related tasks using Bash scripts . Once automated there will be no interaction of the user with telnet . that is it will be totally automated .. . .. . the scripts looks something like this : .. . .. . There are 2 problems I am facing here : .. . .. . 1 . How to execute the commands on the remote system from the script without human interaction From my experience with some test codes I was able to deduce that when the telnet 10.1.1.1 is executed telnet goes into an interactive session and the subsequent lines-of-code in the script are executed on the local system . How can I run the lines-of-code on the remote system rather than the local one 2 . I am unable to get a log file for the activity in the telnet session on the local system . The stdout redirect I used makes a copy on the remote system I do not want to perform a copy operation to copy the log to the local system . How can I achieve this functionality .. . Answer : You can use expect scripts instaed of bash . Below example show how to telnex into an embedded board having no password", "Question : I m not even sure whether I ve framed this question correctly . Let me explain my situation . I have an Application hosted in a OpenVMS environment which is being accessed via Telnet . I m in need to programmatically accomplish certain tasks . So far I could send and receive messages using a C Telnet Client . I am able to execute tasks by sending commands and receiving responses . But for one task I have to edit a Form to change some information . The command looks like below .. . .. . modify page page no .. . .. . As soon as I enter the above command the entire terminal gets loaded with this Form I have to use page-down to go through the fields press enter to edit the text and use Ctrl-Z to save it . I m not sure how to accomplish this task programmatically . I m not familiar with telnet or VxWorks . I m not sure the above is a feature of Telnet or OpenVMS . Kindly help . Comment : Can you use other tools Like ssh instead of telnet where you can pass ssh a parameter that is the command to execute and sed or awk or perl to edit the file instead of vi .. . Answer : This should be easy to figure out thanks to the clear text of telnet : D It shouldn t matter what platform your target is running . All you have to remember is that special keys like ctrl-z or page down are just chars in the data-stream . Ctrl-z is typically 0x1a and I am not sure what page down is off the top of my head but here is how you can figure it out : .. . .. . 1 . Get wireshark http : www.wireshark.org and install it if you don t already have it . 2 . Start wireshark up and capture all traffic on your NIC that will carry the connection to the target . 3 . Start a normal telnet session to the target and issue all of the commands including the page downs and the ctrl-z . 4 . Stop wireshark capture and then filter out everything except telnet communication between you and the target . 5 . Look at the data that was sent to issue the ctrl-z and page downs . 6 . Put those chars in your telnet stream when you are ready to issue those commands . Easy . Comment : Thank you Chris : . I will try your suggestion and update it here . Comment : @deena102 - If you can t use Wireshark most Telnet clients support some sort of log file for a session . You could puzzle out the escape codes with a text-editor that displays control-characters . Appendix A here http : vt100.net docs vt100-tm ek-vt100-tm-002.pdf might help . If you use Wireshark it may help to set the capture filter to ignore other traffic before starting the capture .", "Question : Does anyone know of an easy way to create a script that can connect to a telnet server do some common telnety stuff and then logoff I am dealing with users who are not familiar with telnet and the commands they will need to run . All I want is for them to double-click on a script and have that script auto-magically run the commands for them . You re probably wondering What platform are the users on They will be on both Windows and Linux . Implementations in languages like Perl Java or Python are acceptable . I see that Perl has a Net : : Telnet module . Has anyone used that My ideal solution would be two create two script files...a BAT file for windows and a shell script for Linux . While this would make dual maintenance an issue it would mean I wouldn t have to install Perl Java Python etc.. . on every machine . Unfortunately I have not seen any way to automate a telnet session with batch files or shell scripts . Thanks . Comment : Use python telnetlib module . An example is here stackoverflow.com questions 1491494 telnet-automation-scripting http : stackoverflow.com questions 1491494 telnet-automation-scripting .. . Answer : It may not sound a good idea but i used java and used simple TCP IP socket programming to connect to a telnet server and exchange communication . ANd it works perfectly if you know the protocol implemented . For SSH etc it might be tough unless you know how to do the handshake etc but simple telnet works like a treat . Another way i tried was using external process in java System.exec etc and then let the windows built-in telnet do the job for you and you just send and receive data to the local system process ." ] }
[ "yes-answer-long" ]
bidirectional
UNK_RELATION
statsd@udp@85
statsd -- a simple lightweight network daemon to collect and aggregate metrics over @placeholder .
{ "confidence": [ 44.85649108886719, 35.68561553955078, 35.18898010253906, 33.31266784667969, 33.100467681884766, 32.41362762451172, 32.41362762451172, 32.41362762451172, 31.83908462524414, 30.402355194091797, 29.698833465576172, 29.54265785217285, 28.730865478515625, 28.730865478515625, 28.730865478515625, 28.730865478515625, 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.260265350341797, 26.063419342041016, 26.062227249145508, 25.74169158935547, 25.74169158935547, 25.72576332092285, 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.317848205566406, 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.670185089111328, 22.668155670166016, 22.668155670166016, 22.668155670166016, 22.668155670166016, 22.371597290039062, 22.371597290039062, 22.371597290039062, 21.848731994628906, 21.848731994628906, 21.77627182006836, 21.636173248291016 ], "content": [ "How to send JMX metrics to statsD daemon", "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 .", "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 .", "I wanted to track some application metrics using statsd and I see collectd has a statsd plugin .", "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 default StatsD daemon from etsy is designed to update to carbon the graphite daemon every 10 seconds .", "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 .", "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", "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 .", "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 .", "StatsD operates over UDP which removes the risk of carbon-aggregator.py being slow to respond and introducing latency in your application .", "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 prefer to keep this bundle pretty simple so I would like to skip statsd if it s possible .", "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 .", "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 .", "I am writing my first set of cookbooks to install grafana for StatsD .", "I m using grafana statsd graphite-web carbon and whisper .", "I have Graphite set up using StatsD collector .", "Lastly make sure the settings take if you ve already been sending metrics .", "This will ensure that the newly created metrics follow this new aggregation rule .", "These default to false which means statsd will always send 0 previous value for gauges when data isn t received for a time bucket .", "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 ." ] }
{ "confidence": [ 56.88641357421875, 49.217567443847656, 46.808448791503906, 44.428619384765625, 44.27647399902344, 44.035484313964844, 43.91719055175781, 42.9608154296875, 42.05670928955078, 41.740501403808594, 40.18434143066406, 40.09828186035156, 37.85205841064453, 37.61125946044922, 37.53609085083008, 37.523616790771484, 36.57926940917969, 36.17723846435547, 35.87200164794922, 35.78921127319336 ], "content": [ "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 : 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 : 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 : 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 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 : 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 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 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 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 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 : 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 : 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", "Question : I m sending stats to a Graphite server via statsd . My stats are fairly fine-grained and can be easily added by developers . I d like to roll up all statistics matching a certain pattern stats.timers.api . .200.count for example . Is that possible within Graphite If not are there other systems that I should be looking at that can generate that type of roll-up data from statsd Or is this the sort of thing that I should do within my statsd configuration directly .. . Answer : If you after a blanket sum of all the data that matches then you can use 1 http : graphite.readthedocs.org en 1.0 functions.html graphite.render.functions.sumSeries sumSeries . an example : .. . .. . would give you the total for everything that matches stats.timers.api . .200.count .. . .. . You can group metrics together via the 2 http : graphite.readthedocs.org en 1.0 functions.html graphite.render.functions.groupByNode groupByNode . an example .. . .. . would give you a a sum of all the timers that match stats.timers.api . by the 4th column in this case return code All the functions are documented at http : graphite.readthedocs.org en 1.0 functions.html Comment : Awesome just what I was looking for Thanks .", "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 ." ] }
[ "yes-answer-long", "yes-answer-short" ]
udp
UNK_RELATION
apache-commons-net@protocols@100
apache-commons-net -- apache-commons-net library implements the client-side of many basic internet @placeholder .
{ "confidence": [ 64.01553344726562, 60.031219482421875, 59.89350891113281, 59.568031311035156, 56.629783630371094, 56.629783630371094, 56.629783630371094, 56.629783630371094, 56.629783630371094, 54.92762756347656, 54.92762756347656, 54.634239196777344, 54.634239196777344, 54.634239196777344, 52.29337692260742, 52.29337692260742, 52.29337692260742, 51.987327575683594, 51.77943420410156, 51.38849639892578, 51.199581146240234, 51.13786697387695, 50.18048858642578, 49.42425537109375, 49.42425537109375, 49.42425537109375, 49.42425537109375, 49.42425537109375, 49.42425537109375, 49.42425537109375, 48.951148986816406, 48.80907440185547, 48.32678985595703, 47.6576042175293, 47.4287109375, 47.364540100097656, 47.364540100097656, 47.364540100097656, 46.97157287597656, 46.955604553222656, 46.75590515136719, 46.46525573730469, 46.21318054199219, 46.07865905761719, 45.163455963134766, 45.06306457519531, 45.02367401123047, 45.02367401123047, 45.02367401123047, 45.02367401123047, 44.91086959838867, 44.51432800292969, 44.41381072998047, 44.37809753417969, 44.3597526550293, 44.149227142333984, 43.956947326660156, 43.589725494384766, 43.492183685302734, 43.06752014160156, 43.03224182128906, 42.91532897949219, 41.762550354003906, 41.762550354003906, 41.49664306640625, 41.49664306640625, 41.49664306640625, 41.002418518066406, 39.949703216552734, 39.88371658325195, 38.74969482421875, 38.695838928222656, 38.695838928222656, 38.34296417236328, 38.341163635253906, 37.93204879760742, 37.93204879760742, 37.80878448486328, 37.80878448486328, 37.80878448486328, 36.62440490722656, 36.511009216308594, 36.1822509765625, 35.5911865234375, 35.5911865234375, 35.5911865234375, 34.999725341796875, 34.999725341796875, 34.86843490600586, 34.59032440185547, 34.14404296875, 34.13383483886719, 33.59046173095703, 33.59046173095703, 33.45970153808594 ], "content": [ "I m using Apache Commons Net .", "I m using Apache Commons Net in Android .", "I m writing a simple FTPS client using Apache Commons Net .", "I use TelnetClient from Apache Commons Net https : commons.apache.org proper commons-net to communicate and read-write to the device .", "I am using JDK7u79 and Apache Commons Net 3.3 .", "With my Java-Program I m connecting to a FTP server with Apache Commons Net .", "I m retrieving files from an FTP server using Apache commons net .", "I have a java code- .. . .. . The apache-commons-net jar is added to the classpath .", "I m trying to use apache commons-net for ftp file transfers .", "Use the FTPClient.mlistDir method https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html mlistDir java.lang.String .", "Iterate the returned array of FTPFile s https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPFile.html .", "I am using Apache Commons net to connect programmatically to my server .", "I m using latest Apache Commons Net to make use of FTP functionality .", "For this purpose Im using Apache Commons net which is quite good .", "I ve tried using Apache Commons Net and Spring s sftpsessionfactory FTP libraries .", "I m using apache commons-net FTPClient to upload some files .", "It s probably worth reporting this on the Apache Commons Net project .", "I am using Apache commons ftps client to connect to an ftps server .", "I ve read other questions and it s not the enterLocalPassiveMode problem Apache Commons Net FTPClient and listFiles http : stackoverflow.com questions 2712967 apache-commons-net-ftpclient-and-listfiles as I m using that after connecting but before logging in .", "In the latest version as of this comment commons-net-3.2 http : apache.parentingamerica.com commons net binaries commons-net-3.2-bin.zip you do the following : ftp.setFileType FTPClient.BINARY FILE TYPE", "This behavior is a error of the commons-net library", "Related questions that didn t answer my question : .. . .. . Apache Commons Net FTPClient and listFiles http : stackoverflow.com questions 2712967 apache-commons-net-ftpclient-and-listfiles .. . Issue with org.apache.commons.net.ftp.FTPClient listFiles http : stackoverflow.com questions 2576647 issue-with-org-apache-commons-net-ftp-ftpclient-listfiles", "It uses the Apache Commons Net library http : commons.apache.org proper commons-net : .. . .. . How can I modify this code to return the time in Melbourne rather than my time", "So after you connect using the FTPClient.connect use the FTPClient.getReplyStrings https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTP.html getReplyString 28 29 to retrieve the welcome message .", "I have the following configuration .. . .. . But the payload is a List FTPFile https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPFile.html and the splitter doesn t work .", "You would have to override the FTPClient.getListArguments https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html getListArguments 28java.lang.String 29 to inject your own flags .", "Just make sure you use FTPClient.mlistDir https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html mlistDir 28 29 which internally uses a modern MLSD command .", "Except for a time-consuming call of MDTM - FTPClient.getModificationTime https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html getModificationTime 28java.lang.String 29 for each listed file .", "You call the FTPClient.setFileType method https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html setFileType 28int 29 too early .", "For those entries where the FTPFile.isDirectory https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPFile.html isDirectory is true call the FTPClient.mlistDir again .", "From http : commons.apache.org net api org apache-commons-net ftp FTPClient.html .. . .. . The default settings for FTPClient are for it to use FTP.ASCII FILE TYPE FTP.NON PRINT TEXT FORMAT FTP.STREAM TRANSFER MODE and FTP.FILE STRUCTURE .", "To upload I m using the library commons-net-3.1 Apache also tested with version 3.5 and it still fails .", "I am using apache-commons FTP client v3.4 .", "Through eclipse java client i tried to connect to server for upload and download the file using the below code using commons-net apache library .", "From their documentation https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPSClient.html execPROT java.lang.String I see that P stands for Private Data Channel Protection Level .", "I m using Apache Commons Net FTPSClient to build a FTPS plugin for my web application .", "I don t see a method that Apache Commons net provides to add a cert file .", "I m using Camel 2.15.2 with Apache Commons Net 3.3 on Java 8 deployed into a Tomcat container .", "Which version of Apache Commons are you using", "It doesn t work because the default transfer mode for FTPClient http : commons.apache.org net apidocs org apache-commons-net ftp FTPClient.html is FTP.ASCII FILE TYPE .", "The client code is written in Java and is as follows : .. . .. . Where ftp is a commons net FTPClient .", "Try using FTPClient http : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html instead of FTPHTTPClient which according to it s documentation http : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPHTTPClient.html is experimental HTTP proxying of FTP connections .. . .. . .. . should work just fine", "I ve been asked to start using the Apache Commons Net library FTPClient and FTPSClient mainly and I m running into problems doing a file listing .", "Getting the following while using Apache s commons-net library .", "While trying to perform a listFiles command using Apache Commons Net 3.3 FTPSClient against an Mina s Apache FTP Server parsing of the listing fails .", "Checked the class files inside the apache-commons-net.jar and there was no SubnetUtils present .", "This makes sense to me as how it s supposed to be work but the Apache Commons Net FTPS implementation doesn t seem to be doing that .", "I had been looking through the Apache Commons Net JIRA but apparently didn t dig as far as you did .", "In apache Commons Net however there seems to be either AuthenticatingSMTPClient no SSL though it extends SMTPSClient", "I am using apache-commons-net 3.4 and i found a strange issue i cant explain .", ".. . .. . The Apache Commons Net FTPClient sends the -a flag when FTPClient.setListHiddenFiles is set the -a flag is supported or at least safely ignored by most -but not all- FTP servers .", "Looking at some other FTPClient-questions I think the reason is a bug in the Apache Commons-NET library https : issues.apache.org jira browse NET-409 of which the FTPClient is a component in version 3.0 .", "This looks like a bug in the Commons NET library https : issues.apache.org jira browse NET-409 which affected version 3.0 .", "https : repository.apache.org content repositories snapshots commons-net commons-net 3.0.1-SNAPSHOT .. . .. . Cheers", "The Apache Commons Net client doesn t actually follow the FTPS standard and only allows some subset that doesn t allow for securing the data connections .", "There s no API for an FTP client to tell remote path separator not only in Java Apache Commons but in general .", "I am trying to use the Aapche Commons Net library to implement a telnet connection in Android .", "@SubOptimal That s the same similar code the OP has already but for a different library edtFTPj not Apache Commons .", "I m using spring-integration 4.2.5 and commons-net-2.0 .", "Using Apache Commons FTPSClient the downloaded file is always stored as 0 bytes .", "At least the ProFTPD FTP server http : www.proftpd.org resets the default transfer mode after the authentication FTPClient.login https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html login 28java.lang.String 20java.lang.String 29 .", "Code from Apache Commons Net added for reference . .. . .. . openDataConnection in org.apache.commons.net.ftp.FTPClient : .. . .. . parsePassiveModeReply in org.apache.commons.net.ftp.FTPClient : .. . .. . Thank you in advance for trying to help me .", "The exact failure message can be found by calling FtpClient getReplyCode http : commons.apache.org net apidocs org apache-commons-net ftp FTPClient.html getReplyCode 28 29 .", "From documentation http : commons.apache.org net api org apache-commons-net ftp FTPClient.html storeFile 28java.lang.String 20java.io.InputStream 29 .. . .. . This method does NOT close the given InputStream .", "My classpath was pointing to an older verion of commons-net jar file .", "I am using camel 2.15.2 Commons net API 3.3 .", "The environment is maven and commons-net has been loaded via the pom file .", "I highly recommend that you use IOutils from Apache Commons IO http : commons.apache.org io apidocs org apache-commons-io IOUtils.html to copy streams .", "Currently I am using Apache s Commons Net library http : commons.apache.org proper commons-net for transferring some application files 2KB to 200MB from one AIX server to another through FTP protocol .", "like : .. . .. . That when .forEach System.out : : println is run over the templist displays something like : .. . .. . I m using the Apache Commons FTP library in Java .", "Both will work but apache commons.net libraries are not thread safe http : wiki.apache.org commons Net FrequentlyAskedQuestions so if you do use one client with multiple threads be aware that you ll have to synchronize access to it .", "Looking at the latest implementation of FTPSClient in the trunk of the Subversion repository http : svn.apache.org viewvc commons proper net trunk src main java org apache-commons-net ftp FTPSClient.java view markup pathrev 1697433 it s visibly using a TrustManager implementation coming from TrustManagerUtils.getValidateServerCertificateTrustManager by default .", "In turn the latest implementation of TrustManagerUtils http : svn.apache.org viewvc commons proper net trunk src main java org apache-commons-net util TrustManagerUtils.java view markup pathrev 1697433 reveals that this provides a TrustManager that only calls checkValidity on this certificate and that s the option with validation turned on not even the ACCEPT ALL implementation .", "I am trying to calculate the last IP adddress from CIDR using Apache commons-net for IPV4 .. . .. . It won t work for IPV6 can anybody suggest some library to solve this issue", "It was something related with the Session reuse Apache Commons Net has some kind of bug It does not allow you to reuse the session I had to implement the cyberduck library cyberduck source code https : g.iterate.ch projects ITERATE repos cyberduck browse source ch cyberduck core .", "We are using the following Apache Commons Net FTP code to connect to an FTP server poll some directories for files and if files are found to retrieve them to the local machine : .. . .. . We have this scheduled to run every minute on the minute .", "As far as I know Apache commons net have two methods to force passive-mode .enterLocalPassiveMode and .enterRemotePassiveMode but I need to connect my FTP server first for using such methods .", "I am trying download a file from ftp server to sdcard using Apache Commons FTPClient .", "I am using Apache Commons Util.copyStream function to upload a file to an FTP server .", "@BlocBloc : I m not familiar with the specific implementations in Apache Commons I only know the innards and problems of the FTP protocol itself .", "Looking at older questions here http : stackoverflow.com q 6193485 600500 with similar problems it looks like you hit a bug of the Commons-NET library https : issues.apache.org jira browse NET-409 of which the FTPClient is a part .", "I am trying to rename the files over FTP using commons net FTP 3.5 and Java 1.8.0.45 .", "I can make the login but when I try to list the files I get an Exception : .. . .. . I have tried every possible solution on line nothing has worked for me this is the code I m using with apache commons-net : .. . .. . I will really appreciate your help guys .", "Environment : I m using Sun Java JDK 1.8.0 60 on 64-bit Windows 7 using Spring Integration 4.1.6 which internally appears to use Apache Commons Net 3.3 for FTPS access .", "SOLUTION : On top of setting charset codepage to cp037 as specified by Bruce Martin s answer I also had to change a setting in my FTP logic using apache-commons-net .", "I created SSL certificate using - .. . .. . I used Apache Commons net to connect to my FTPS server and retrieve files using - .. . .. . This worked fine and I was able to retrieve files .", "I m trying to develop a FTP client in java using Apache Commons Net but even if my code seems to be good I can t connect to any server and I get : .. . .. . I tried to connect to this server : ftp : ics.ftptest.org which works perfectly .", "I guess my question s is are : does anyone know of any good FTP libraries for java that just move the damned bytes from there to here or am I going to have to hack up apache commons-net-2.0 and maintain my own FTP client code just for this simple application", "You can see from detailed explanation about bug : https : issues.apache.org jira browse NET-409 .. . .. . You can download fixed relea https : repository.apache.org content repositories snapshots commons-net commons-net 3.0.1-SNAPSHOT", "The only solution I currently see is copying the Apache Commons FTP code and implementing my own changes to make it work with a masquerading NAT box .", "I ve just had a problem using Apache commons FTP as the client connecting from a Windows 7 dev machine to a test Windows 7 ftp Server on IIS 7.5 .", "Commons FTP defaults to ascii file types .", "For ftp to work I need commons-net.jar as dependency at .. . .. . ANT HOME lib folder .", "Is there a way to keep commons-net.jar at customized folder instead of .. . .. . ANT HOME lib folder", "I am using commons-net package for the first time and using the code below to ftp a file from a FileZilla server over SSL ." ] }
{ "confidence": [ 64.09141540527344, 63.933006286621094, 57.45912170410156, 55.98436737060547, 55.510616302490234, 55.31816864013672, 54.72188949584961, 54.48660659790039, 54.383949279785156, 53.28519821166992, 53.170936584472656, 52.40706253051758, 52.35573196411133, 52.21306610107422, 51.6498908996582, 50.421817779541016, 49.821510314941406, 49.69659423828125, 49.616355895996094, 49.35401916503906 ], "content": [ "Question : My problem is to get the paths of all files on the FTP server in Java . I want to be able to make List String of the paths of all files on on the server . I need this to be able to determine if a file-exists on the server that is not on a local computer and vice versa . How do I get a list of the paths for each file on the server like : .. . .. . That when .forEach System.out : : println is run over the templist displays something like : .. . .. . I m using the Apache Commons FTP library in Java . Thanks for the help .. . Answer : Use the FTPClient.mlistDir method https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html mlistDir java.lang.String . Iterate the returned array of FTPFile s https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPFile.html . For those entries where the FTPFile.isDirectory https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPFile.html isDirectory is true call the FTPClient.mlistDir again . Comment : Awesome thanks Comment : Now the only problem is that my ftp server vsftpd does not support the MLSD command that FTPClient.mlistDir is running.. . Comment : Use .listFiles instead . Comment : Thanks that did the trick : D", "Question : I m trying to develop a FTP client in java using Apache Commons Net but even if my code seems to be good I can t connect to any server and I get : .. . .. . I tried to connect to this server : ftp : ics.ftptest.org which works perfectly . I tried to disconnect my firewall and that leeds to the same results . Here is my code I hope that it will obvious for you guys haha : .. . Answer : Try using FTPClient http : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html instead of FTPHTTPClient which according to it s documentation http : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPHTTPClient.html is experimental HTTP proxying of FTP connections .. . .. . .. . should work just fine Comment : Ouch you re right I just read the FTPClientExample.java file on the apache website and it did not mention that it was experimental . Thank you .", "Question : I m modifying some code that was previously working with an FTPS library I wrote myself . I ve been asked to start using the Apache Commons Net library FTPClient and FTPSClient mainly and I m running into problems doing a file listing . I ve read other questions and it s not the enterLocalPassiveMode problem Apache Commons Net FTPClient and listFiles http : stackoverflow.com questions 2712967 apache-commons-net-ftpclient-and-listfiles as I m using that after connecting but before logging in . The same code works fine on a test server I set up also using Apache FTP but doesn t work on the server I need it for . I ve also tried using the PBSZ 0 and PROT P commands but they re not implemented on the remote system . Code : .. . .. . I ve tried specifying the directory explicitly and using the default : .. . .. . .. . but both give the same result . This is the output of the debugging info : .. . .. . Then it times out after 30 seconds with this stack-trace : .. . .. . I ve checked my firewall settings and that host is allowed to connect via port 990 and 6200-6300 . I ve also read FTPClient.listFiles not working http : stackoverflow.com questions 15790074 ftpclient-listfiles-not-working and Java application hanging during LIST command to FTP Server Apache Commons FTPClient http : stackoverflow.com questions 29570165 java-application-hanging-during-list-command-to-ftp-server-apache-commons-ftpcl and neither of these have helped with my problem . EDIT : It looks as though FTPClient is not recognizing the data channel . I tried uploading a file instead of doing a listing and it died after the 150 Opening data connection message . I ve confirmed that the ports assigned to the data connection from the PASV command are NOT blocked by our firewall . Any ideas Comment : Can you connect with a standalone FTP client from the same machine to the same server using a passive-mode Comment : I m currently trying to see if I can use cURL to connect but the local machine is an AIX server I have limited control over . .. . Answer : I fixed it . Turns out I was doing a directory listing with an invalid path . Instead of returning an error message Apache FTP closed the connection . Not sure why . Anyway it s working now .", "Question : I have a java code- .. . .. . The apache-commons-net jar is added to the classpath . Still I am getting an error for SubnetUtils as it cannot be resolved to a type . Any ideas .. . Answer : The issue is resolved now . Checked the class files inside the apache-commons-net.jar and there was no SubnetUtils present . The jar file seems to be of a very old version . Downloaded a latest jar and everything works fine .", "Question : I m trying to use apache commons-net for ftp file transfers . Problem is files are intermittently arriving at the server corrupt . by corrupt i mean that winrar tells me a zip file has an Unexpected end of archive . sometimes the files are completely empty . I have noticed that this happens more for larger files 100kb+ however does happen for small files too 20kb . I know for a fact that the source zip file being uploaded is valid and is only 243kb . I do not get any errors exceptions from the code . Here s the code being executed : .. . .. . and some logs : .. . .. . note that all of these were complete within 15 seconds and all of the resulting files on the server are corrupt . i have also tested without setting any timeouts and the problem still occurs . .. . Answer : Commons FTP defaults to ascii file types . You want to set it to Binary when dealing with binary-data like a zip file . From http : commons.apache.org net api org apache-commons-net ftp FTPClient.html .. . .. . The default settings for FTPClient are for it to use FTP.ASCII FILE TYPE FTP.NON PRINT TEXT FORMAT FTP.STREAM TRANSFER MODE and FTP.FILE STRUCTURE . The only file types directly supported are FTP.ASCII FILE TYPE and FTP.BINARY FILE TYPE . you want to do setFileType FTP.BINARY FILE TYPE before you send the file . Comment : should i use binary when sending content via new ByteArrayInputStream a string .getBytes Comment : Im not 100 sure . Its probably safer that way . Should be quick enough to test . Comment : How did you fix it i have the same problem . Comment : In the latest version as of this comment commons-net-3.2 http : apache.parentingamerica.com commons net binaries commons-net-3.2-bin.zip you do the following : ftp.setFileType FTPClient.BINARY FILE TYPE", "Question : I have setup an FTPS server on my aws ec2 instance . I am using Apache Commons net to connect programmatically to my server . I cannot retrieve files if I don t set execProt P . From their documentation https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPSClient.html execPROT java.lang.String I see that P stands for Private Data Channel Protection Level . What does this mean Why am I using P instead of S or E .. . Answer : The PROT command in ftps can have the values P and C . P stands for private and means that the data connection is encrypted with TLS . C stands for clear and means that the data connection is not encrypted . The values of E confidential and S safe are defined too but in practice not implemented in FTP servers . For more details see the specification i.e . RFC 4217 https : tools.ietf.org html rfc4217 page-17 .", "Question : I am using apache-commons-net 3.4 and i found a strange issue i cant explain . I want to get the FTPFile entries of an directory but when i use FTPClient listFiles an empty array is returned but FTPClient listNames list all entries . What is going on here how to use listFiles correct Related questions that didn t answer my question : .. . .. . Apache Commons Net FTPClient and listFiles http : stackoverflow.com questions 2712967 apache-commons-net-ftpclient-and-listfiles .. . Issue with org.apache.commons.net.ftp.FTPClient listFiles http : stackoverflow.com questions 2576647 issue-with-org-apache-commons-net-ftp-ftpclient-listfiles .. . Answer : This topic could help you make listFiles work : .. . .. . FTPClient.listFiles not working http : stackoverflow.com questions 15790074 ftpclient-listfiles-not-working .. . .. . From the documentation of FtpClient the two methods don t work in the same way : .. . .. . listFiles String pathname Using the default system autodetect mechanism obtain a list of file information for the current working directory or for just a single file.This information is obtained through the LIST command . .. . listNames String pathname Obtain a list of filenames in a directory or just the name of a given file which is not particularly useful .This information is obtained through the NLST command .", "Question : With my Java-Program I m connecting to a FTP server with Apache Commons Net . The FTP server works as the update server for my software and currently everytime I check for updates the updater downloads a .txt and checks if the version number written in the file is greater than the version number currently installed on the machine . Is there a way to get the version number of the update for the software on the machine from the welcome-message of the FTP server Then I don t have to download the .txt to check for updates instead I m able to only connect to the server and check the welcome-message for the number Comment : @MartinPrikryl of course it is about programming i want to know if there s a way to retrieve the welcomemessage from the server in my Javaprogramm Comment : @MartinPrikryl sorry asked wrong Will edit my post . .. . Answer : The welcome message is effectively a response to a connection . So after you connect using the FTPClient.connect use the FTPClient.getReplyStrings https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTP.html getReplyString 28 29 to retrieve the welcome message . Comment : Thank you it works perfectly And I m sorry about the confusion", "Question : I m using org.apache.commons.net.ftp library to work with FTP servers . I use about 5 FTP servers and one of them doesn t work properly for me . For uploading files I also use method ftpClient.setFileType FTP.BINARY FILE TYPE but on this server the size of the uploaded file is not the same as on my local HDD . It is usually MP3 files and when I try to play uploaded MP3 there is some buzz . I suspects that FTP server has wrong configuration but the company which takes care of this server would be very unlikely to do some changes . One more very important note : when I use Total Commander or WinSCP to upload file the uploaded file is correct with same size . Here is my code : .. . .. . Do someone know the solution how to change this code or set this FTP server to have the same size uploaded file Thanks in advance for any help . .. . Answer : You call the FTPClient.setFileType method https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html setFileType 28int 29 too early . At least the ProFTPD FTP server http : www.proftpd.org resets the default transfer mode after the authentication FTPClient.login https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html login 28java.lang.String 20java.lang.String 29 . Move the .setFileType call after the .login . Comment : It works Thanks", "Question : I have written this below code to connect to a remote FTP Server vsftp in CentOS 6 . For brevity Exception handling is not shown here .. . .. . If there are 100 files in that FTP server this listFiles gives the list of file names according to the Alphabetical order . Is there any way to get the files according to the modified time i.e . oldest files first . This listFiles uses LIST command . Is there any other command available to list the files according to the modification time . Since this is a Linux server can we send some Linux commands to achieve this .. . .. . I have already checked question get latest file from ftp http : stackoverflow.com q 3824983 850848 . The problem with this approach is that we have to order the files using a Comparator then rename and move it a different folder To get them in the modification order . If there are more than 1000 files sorting them would become a time consuming operation Edit : .. . And more over retrieving the files and sorting them has another problem . It doesn t have seconds information when ftpFile.getTimestamp is used . It is accurate only to minutes . Comment : Have a look at this answer how-to-sort-sftp-files-order-by-last-updated-time-using-java http : stackoverflow.com questions 35335826 how-to-sort-sftp-files-order-by-last-updated-time-using-java 35338654 . Comment : @SubOptimal That s the same similar code the OP has already but for a different library edtFTPj not Apache Commons . Comment : @MartinPrikryl I m looking for a solution by which i could retrieve the list in last modified order rather than fetching the list and using comparator to sort it . Comment : @MartinPrikryl I know that it s for a different library but contrary to the code of the OP it has a sorting implement . Can t see that in the OPs code . Comment : The code is in the question the OP is referring to : stackoverflow.com q 3824983 850848 http : stackoverflow.com q 3824983 850848 .. . Answer : There s no standard way to have the FTP server sort the files according to your or any criteria . Though some FTP servers notably the ProFTPD and vsftpd support proprietary flags with the LIST command to sort the entries . Both these servers support the -t flag to sort the files by a modification time : .. . .. . Though this is not only non-standard it actually violates the FTP protocol . For all options supported by ProFTPD see its man page : .. . http : www.proftpd.org docs directives linked config ref ListOptions.html .. . .. . Note that vsftpd supports only -a -r -t -F and -l with the same meaning as ProFTPD . .. . .. . The Apache Commons Net FTPClient sends the -a flag when FTPClient.setListHiddenFiles is set the -a flag is supported or at least safely ignored by most -but not all- FTP servers . It does not offer any API to add another flags . You would have to override the FTPClient.getListArguments https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html getListArguments 28java.lang.String 29 to inject your own flags . .. . .. . Though again I do not see what s wrong with using a Comparator to sort the files . Just make sure you use FTPClient.mlistDir https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html mlistDir 28 29 which internally uses a modern MLSD command . This way you get precise timestamps not minute- or worse precision timestamps like with obsolete LIST - FTPClient.listFiles . Though as you commented the vsftpd does not support MLSD ProFTPD does . In that case the LIST -t is indeed the only efficient although again not standard portable way to get precisely sorted files . Except for a time-consuming call of MDTM - FTPClient.getModificationTime https : commons.apache.org proper commons-net apidocs org apache-commons-net ftp FTPClient.html getModificationTime 28java.lang.String 29 for each listed file . Comment : Got it by overriding the getListArguments as you said I used the arguments -tr to get the oldest files first . And one more thing vsftp server doesn t support MLSD . Comment : That s true I ve forgot . I ve added this to my answer .", "Question : I am developing a Java application that will be used by people from around the world . One feature requires it to display the current time in Melbourne Australia . I have found this http : stackoverflow.com questions 4442192 how-to-use-an-internet-time-server-to-get-the-time answer and adapted the code as follows but it returns my current time as expected . It uses the Apache Commons Net library http : commons.apache.org proper commons-net : .. . .. . How can I modify this code to return the time in Melbourne rather than my time I am open to other solutions to solve this problem as well . .. . .. . Thank you EDIT : .. . .. . Taking Jon s advice I have used the JodaTime library http : www.joda.org joda-time and built the following code to solve the problem . It can be used for other time zones by changing Australia Melbourne to any timezone found here http : en.wikipedia.org wiki List of tz database time zones . .. . Answer : Check this http : docs.oracle.com javase 6 docs api java util TimeZone.html . You can get a calendar instance and change its timezone .", "Question : I am trying to upload file from android-sdcard to FTP Web server . For this i am using Apache FTPClient library . Here is my code to upload file .. . While try to upload file .. . i am getting exception that says bad file number . . socket exception.. . .. . .. . i stuck here and passed a lot time to solve this but no solution yet i found . Please help with this . thanks . .. . Answer : Try getting the Apache FTPClient 3.0.1 . It seems like there was bug in the 3.0 . https : repository.apache.org content repositories snapshots commons-net commons-net 3.0.1-SNAPSHOT .. . .. . Cheers Comment : yahh .. . i also think so .. . coz after firing this exception it was uploading file to my ftp server that i was not knowing .. .", "Question : This is the thing I am trying to connect from java to a FileZilla FTPS Server . I can make the login but when I try to list the files I get an Exception : .. . .. . I have tried every possible solution on line nothing has worked for me this is the code I m using with apache commons-net : .. . .. . I will really appreciate your help guys . Thanks in advance . Comment : can you give me your credentials to filezilla Comment : Looks like networkimg problem - wrong port-number or proxy in between would be the usual suspects . Comment : That might be possible but I can list download and upload files to the same FTPS server using any ftp-client software so I guess It is not a networking problem : ...maybe It is something related to the certificates Comment : @Jhon Charles A problem about certificates Could be . Have you installed the remote-server s certificate in your current JRE Comment : Hum.. . I don t think the problem is in authentication because you are authenticating with user pass not with a certificate.. . I suppose you can t use active mode instead of passive-mode can you .. . Answer : I found the solution . It was something related with the Session reuse Apache Commons Net has some kind of bug It does not allow you to reuse the session I had to implement the cyberduck library cyberduck source code https : g.iterate.ch projects ITERATE repos cyberduck browse source ch cyberduck core . I hope this helps someone in the future thanks for your help . Comment : I forgot Something the class we need is FTPClient", "Question : null .. . Answer : I am trying to develop a java application that reads raw data from a telnet client . I use TelnetClient from Apache Commons Net https : commons.apache.org proper commons-net to communicate and read-write to the device . My device a thermohygrometer sends raw bytes that need to be parsed to get the actual measurements . I am able to communicate with the device but the problem is that while reading binary-data it ignores some bytes . Specifically it ignores 0xff and 1 byte before it . I tested with the telnet client from terminal but I have the same behavior as from within the app . The first image show the wireshark capture while the second the raw input from telnet . Right after multiple 0x00 is the problem Wireshark Capture http : i.stack.imgur.com wdOAm.png .. . .. . Telnet Capture http : i.stack.imgur.com 00zEK.png .. . .. . I understand like 0xff is an escape character or a special command . Is there anyway I can change it so It will treat it as binary-data instead of trying to interpret it Comment : So just to clarify it doesn t sound like the device is actually using the telnet protocol.. . why not just make a raw socket connection with it Comment : I was reading the device manual saying that it uses a telnet like communication protocol and I thought it was telnet . I tried with a Socket and it worked fine . Thank you", "Question : I have set up an FTPS server on my aws ec2 instance and configured SSL using vsftpd . I created SSL certificate using - .. . .. . I used Apache Commons net to connect to my FTPS server and retrieve files using - .. . .. . This worked fine and I was able to retrieve files . Since it is not a CA certificate how did Java accept the server s self-signed certificate without throwing an error My vsftpd conf has the following lines - My vsftpd.conf has the following lines- .. . .. . .. . Answer : You re not showing how you ve initialised your FTPSClient but I ll assume you ve used the default values . Looking at the latest implementation of FTPSClient in the trunk of the Subversion repository http : svn.apache.org viewvc commons proper net trunk src main java org apache-commons-net ftp FTPSClient.java view markup pathrev 1697433 it s visibly using a TrustManager implementation coming from TrustManagerUtils.getValidateServerCertificateTrustManager by default . In turn the latest implementation of TrustManagerUtils http : svn.apache.org viewvc commons proper net trunk src main java org apache-commons-net util TrustManagerUtils.java view markup pathrev 1697433 reveals that this provides a TrustManager that only calls checkValidity on this certificate and that s the option with validation turned on not even the ACCEPT ALL implementation . Unfortunately checkValidity only checks that the certificate is valid at the current time with respect to its not before and not after validity dates . It s not a verification of the certificate against any known trust anchor . This is essentially very close to useless since attackers in a position to insert an incorrect certificate should be able to create one with the validity dates they want . However it seems that you can instantiate FTPSClient with an SSLContext so using new FTPSClient SSLContext.getDefault would give you the default more sensible behaviour unless you ve changed the default SSLContext . Of course you can also use a custom SSLContext with the correct behaviour but initialised with a specific truststore too . I haven t checked the rest of the implementation but I would have a look at what it does with hostname verifiers too just in case . It s probably worth reporting this on the Apache Commons Net project . This default behaviour probably sounded like a good idea at the time but it really isn t .", "Question : null .. . Answer : I m trying upload a file to an FTP in passive-mode however by calling the function FTPClient.storeFileStream the following error occurs : .. . .. . See that before the response 150 there is a feed line n . I noticed that the error occurs when there is a retransmission in the TCP layer as can be seen in the analysis below made with WireShark : .. . .. . The retransmission occurs between the lines 19 and 23 of WireShark log . When there is no retransmission the upload works . I tried upload with the FileZilla tool and even with the retransmission at the TCP layer the upload works . To upload I m using the library commons-net-3.1 Apache also tested with version 3.5 and it still fails . The FTP server is third and unfortunately do I not have access to his settings . Below is a sample program used to upload : .. . .. . I did a test by changing the method org.apache.commons.net.ftp.FTP . getReply boolean calling the line.trim before the parsing of the response code . Thus the upload started to work . This behavior is a error of the commons-net library Do you have any way to solve my problem without changing the library Comment : Since TCP retransmissions are outside the control of the client and the server I think that this is very arguably a bug in the library and your fix workaround would be appropriate for submitting to them .", "Question : Installed the filezilla server and enabled the FTP over TLS Settings in Settings and started the server . Through eclipse java client i tried to connect to server for upload and download the file using the below code using commons-net apache library . It creates a file hello.txt on the server but size is of 0kb source file size is 10 kb and ended up the following error . Please help me to resolve this .. . Answer : just un-tick Require TLC session resumption on data connection.. . in the filezilla server - settings - FTP over TLS Settings - un-tick the Require TLC session resumption on data connection when using PROT P", "Question : null .. . Answer : I m retrieving files from an FTP server using Apache commons net . While retrieving I want to fetch the files which are having a certain prefix . Here is the sample implementation . Here I have used FTPFileFilter class . If there are 1000 files in the folder and there are only less than 5 files with that prefix Is this implementation would be fast enough Here I m looking for the best way to do with respect to the performance .. . .. . I could see there are two other classes FTPListParseEngine and FTPFileEntryParser . Are these related to this scenario", "Question : While trying to perform a listFiles command using Apache Commons Net 3.3 FTPSClient against an Mina s Apache FTP Server parsing of the listing fails . I ve done some debugging and the entries attribute on FTPListParseEngine after reading the server list has entries formatted like this : .. . .. . x 0 B 0Hy .B4 b - Mp2s 6 .. . .. . I wouldn t know if this is an encoding issue on the server-side or the clients .. . .. . Any hint would be appreciated Thanks .. . Answer : Finally figured it out . It turns out that my FTP server supports compression . I was setting mode to Z compressed after logging in which seems to alter further transfers behaviour . I m assuming the library was trying to parse a compressed response as it would be plain .", "Question : I m just wondering : in my Java application each time I need to connect to an FTP server should I create a new FTPClient object or should I create one FTPClient object and re-use that each time I connect to an FTP server .. . Answer : Both will work but apache commons.net libraries are not thread safe http : wiki.apache.org commons Net FrequentlyAskedQuestions so if you do use one client with multiple threads be aware that you ll have to synchronize access to it ." ] }
[ "yes-answer-long", "yes-answer-short" ]
protocols
UNK_RELATION
fusebox@naming-conventions@121
fusebox -- fusebox is a coding methodology for application development centered around the use of switch statements and @placeholder to organize code .
{ "confidence": [ 52.3055419921875, 45.903167724609375, 45.903167724609375, 44.934974670410156, 44.838600158691406, 44.32744598388672, 44.096168518066406, 44.096168518066406, 44.096168518066406, 43.917510986328125, 43.68846893310547, 43.113677978515625, 42.78594207763672, 42.183204650878906, 42.136253356933594, 41.7073860168457, 41.669349670410156, 41.669349670410156, 41.313594818115234, 41.2023811340332, 41.079307556152344, 41.079307556152344, 39.96271514892578, 39.96271514892578, 39.96271514892578, 39.96271514892578, 39.96271514892578, 39.96271514892578, 39.96271514892578, 39.96271514892578, 39.947120666503906, 39.9371337890625, 39.65741729736328, 39.51366424560547, 39.28802490234375, 38.973060607910156, 38.830528259277344, 38.82444381713867, 38.38208770751953, 38.38208770751953, 38.38208770751953, 38.38208770751953, 38.38208770751953, 38.23050308227539, 37.473567962646484, 37.308921813964844, 36.67545700073242, 36.67545700073242, 36.67545700073242, 36.67545700073242, 36.67545700073242, 36.64324951171875, 36.417686462402344, 36.298927307128906, 36.165306091308594, 35.54326629638672, 35.54326629638672, 35.54326629638672, 35.54326629638672, 35.54326629638672, 35.54326629638672, 34.711055755615234, 34.59229278564453, 34.18630599975586, 34.12237548828125, 34.12237548828125, 33.954166412353516, 33.954166412353516, 33.954166412353516, 33.954166412353516, 33.954166412353516, 33.954166412353516, 33.39659118652344, 33.286949157714844, 32.475990295410156, 32.247535705566406, 32.247535705566406, 32.247535705566406, 32.247535705566406, 32.247535705566406, 32.247535705566406, 32.247535705566406, 32.247535705566406, 32.247535705566406, 32.247535705566406, 32.247535705566406, 31.786060333251953, 31.683778762817383, 31.244184494018555, 31.115345001220703, 31.115345001220703, 31.115345001220703, 31.115345001220703, 31.115345001220703, 31.115345001220703, 31.115345001220703, 31.115345001220703, 31.115345001220703, 31.115345001220703, 30.974445343017578 ], "content": [ "I am creating a fusebox application in Fusebox 5 .", "Is this possible with the structures Fusebox creates", "Can Fusebox not be run this way", "Can anyone advise if this is incorrect for a Fusebox application", "possible duplicate of Fusebox invoking a fuse within the code http : stackoverflow.com questions 14004014 fusebox-invoking-a-fuse-within-the-code", "I am working on migrating an application to an framework application specifically Fusebox 5.5 .", "With this approach Fusebox is configured as FUSEBOX PARAMETERS scope .", "I wouldn t mess with the Fusebox Application.cfc no .", "But the sub app fails the is a fusebox app .", "I use Coldfusion 9 fusebox 3 and an Application.cfc in my web application .", "Fusebox is being maintained updated http : fusebox.org index.cfm fusebox-downloads fusebox-56 after a long period of dormancy and it ll work .", "I m working on a Fusebox application using Coldfusion and there is a fusebox.xml http : trac.fusebox.org fusebox wiki FuseboxXmlPage Thefusebox.xmlFile file which I d like to be slightly different on the production server than it is on the development server .", "What you ll need is a cf application mapping for Fusebox in your Application.cfc .", "The Fusebox docs http : cfinnovate.com : 9082 display fb fusebox.xml don t seem to indicate a way to use a different fusebox.xml but maybe an expert on Fusebox can confirm that .", "Right now I can see a cflock around the main fusebox file .", "The Fusebox version used 4.0.5", "I have a site using CF8 and Fusebox 5 .", "I m running ColdFusion 8.1 with FuseBox 5 .", "In Fusebox 3 I believe this actually made a difference but I think in Fusebox 4 5 it doesn t really .", "My primary objective would simply to be organize code .", "I ve inherited a CF application that currently runs on Fusebox 4 .", "From there in the skeleton it clearly shows the proper structure of a Fusebox 5 application .", "How do I do it with the noxml version of fusebox", "Currently in the application.cfc I extend the Fusebox 5.5 Framework .", "Ok I m kind of inheriting a Fusebox applications.. .", "May I ask why you ve chosen Fusebox", "I did not know FuseBox was no longer supported", "My app uses Fusebox 5.5 and Coldspring 1.2 .", "Btw - did your school really insist on Fusebox", "documentation and community links on the fusebox site 404. .", "Usually when I work with Fusebox I reinitialize the application .", "The easiest solution is to use your Application.cfc like you would for any application then include fusebox from your index.cfm .", "So the code will have no effect in OnRequestStart unless those fusebox parameters are passed in .", "Fusebox 5.1 allows you to use SES URLs by allowing you to change", "I would like to know if there s an easier way other than Mod Rewrite using the fusebox framework or directly in Coldfusion to convert a url as follows : .. . .. . from : .. . .. . to : .. . .. . My app is an existing Fusebox 5.5 application .", "I am looking into some ColdFusion development with the Fusebox framework - I have installed CF10 and downloaded Fusebox 5.5 and their sample skeleton app but I am left wanting at their setup guide http : www.fusebox.org index.cfm getting-started setting-up-fusebox .", "I am new to a company that is using fusebox .", "If this is a cost licensing issue there are FLOS alternatives to ColdFusion - migrating from ColdFusion+Fusebox - Railo http : www.getrailo.org +Fusebox will be much easier.. .", "Perform a fusebox fusebox.load true on the Live site - nothing else except password .", "You can run Fusebox 5+ in a subfolder of your app root .", "The mode setting is buried in your fusebox setttings - check the fbx settings.cfm file .", "Can anyone explain all the attributes of do action in fusebox framework coldfusion", "And your sub-app can then extend the Fusebox one as per normal .", "It won t hurt you to use FuseBox for class you ll learn the basics of MVC and how to structure your application .", "What mode is your Fusebox app set to", "just starting to use coldfusion fusebox a bit this is my second question asked here where a lot of the response mentioned that fusebox is no longer supported and there are possibly better suited frameworks - so am looking at ColdBox and FW 1 - but still wanted to ask this Fusebox question .", "EDIT : example with lexicon .. . .. . This will work only with Fusebox 5 traditional .", "Then in the OnRequestStart method below I set the fusebox mode depending on a certain condition .", "The Fusebox core files should be in the webroot in a folder named fusebox5 by default .", "FW 1 is implemented in a single file where as Fusebox is really big .", "Is there a way to stop ColdFusion 11 from caching Fusebox circuit.xml.cfm files", "You haven t specified which Fusebox version this answer applies to Fusebox 5.x .. . .. . Your title and question is asking two different things - a fuse and a fuseaction are two distinct things .", "Don t think that its really part of Fusebox job -- to define access to code blocks .", "We don t use Fusebox but we have similar config files that are different from dev to test to production .", "As for why you need to use it the question is not Why use FuseBox but Why use MVC", "I have a live site in fusebox 5.5 production mode .", "For example I delete the parsed folder and reload fusebox with the FB parameters in the url .", "I am having trouble with fusebox 5.5 noxml and circuits.. .", "This is because in Fusebox models and views are just a convention to implement MVC .", "Try searching the entire Fusebox folder for getCanonicalPath and replacing each occurrence with getCanonicalPathUdf .", "Inherited a CF9 site that uses Fusebox 5 Coldspring and CFUnit .", "This code is working 99 of the time but on the odd occasion Coldfusion Fusebox throws this error out .", "I have a assignment for school and I need to use the Fusebox framework on my ColdFusion website .", ".. . .. . 1 . migrate to Fusebox-PHP .. . 2 . migrate to Zend .. . 3 . migrate to Symfony", "It is almost like Fusebox remains in production mode even though when I dump the FUSEBOX PARAMETERS.mode it says development-full-load .. . .. . What could be causing this", "By default fusebox is set to production mode so the only time I have to pass those parameters is when I m on a development server .", "NOTE : New fuses do not need a fusebox reload - only new fuseactions require one .", "If so how can I include the framework without having Fusebox in the root or in a mapping", "And I believe that Fusebox allows you to refactor that logic into something that can be used by multiple actions .", "I m a bit rusty on my Fusebox functionality though but I bet some Googling will lead you the way .", "And I believe that Fusebox allows you to refactor that logic into something that can be used by multiple actions .", "This link is useful : http : www.dopefly.com projects fuseboxxmlcheatsheet.cfm .. . .. . The documentation within fusebox circuit.dtd also has some explanation : .. . .. . action Required .", "Using VisualVM and FusionReaction on a trial we have narrowed it down to this particular application built with Fusebox .", "You could potentially use the classic way of doing it not sure if Fusebox will interfere using a 404 handler something like this should do the trick : .. . .. . 1 .", "Here s the Fusebox method : .. . .. . Here s the mixture of Fusebox and ColdFusion method : .. . .. . Both methods are employed throughout the site and I m not opposed to using either one but my objective is to reduce any error that could come up when the user tries to access a particular page .", "How do I create Search Engine Safe URLs in Fusebox 5.1 noxml", "I ve read this article http : trac.fuseboxframework.org fusebox wiki Fusebox51Enhancements SearchEngineSafeURLs but it only applies to the xml version .", "I m wondering if anyone has come up with a clean way to generate a breadcrumbs trail in Fusebox .", "Now this is a production server so there were some things I normally have to do for the fusebox framework to load the new pages .", "Next I moved on to the Fusebox Mapping which was set to trusted and once I unchecked that the page refreshed as required .", "The problem is that sometimes the fusebox xml files do not reparse no matter what changes I make .", "Fusebox settings are populated when super.onApplicationStart invoked so modifying them in onRequestStart does not make sense .", "There is a MODE setting somewhere in fusebox that can be set to DEV or PROD my memory may be faulty .", "Can someone describe common convention best practice for structuring my applications and FuseBox files in my web server", "There are two implementations for Fusebox Applications and they can be mixed and matched to a degree as well : Implicit and XML Explicit .", "There are a lot of similarities but FW 1 has very few configuration options compared to Fusebox .", "My dilemma is should I switch to Fusebox-PHP as it will be easier to migrate the project layout or a robust and popular framework like Symfony or Zend .", "Is the way that the fusebox mode is being manipulated correct in the code below or should that kind of setting be done somewhere else besides the fusebox.xml obviously", "If you are looking to replace crusty old fusebox take a look at this github.com jamie-pate FuseBoxFreedom https : github.com jamie-pate FuseBoxFreedom", "I have tried all the different fusebox reload parameters and they do work for all files except the layout file .", "Also if I delete the layout files and reload Fusebox it still works without error", "I remove the parsed files and let fusebox rebuild but I still get this error .", "We are using Fusebox with ColdSpring which also has a new mapping of coldspringD if that helps .", "A bit OT but you might want to consider something a little more modern than Fusebox .", "This may be caused by a conflict between a UDF in Fusebox and a built-in function with the same name in Railo Lucee .", "Is there a way to refresh changes made to a CFC faster while using Fusebox 5 Coldspring", "I m a Fusebox 5 Coldspring newbie so please provide an ABC step response if you can :", "I have a large Adobe ColdFusion 9 site that uses the no XML version of Fusebox 5.5 .", "My question is which of those three would be faster and easier to convert to when moving from a Fusebox no XML site", "In the D drive version of the app though while most of the settings have been changed to point to mappedD Fusebox keeps rewriting the parsed files to use mapped and I cannot for the life of me figure out where the heck to change the setting in Fusebox so it uses mappedD from now on" ] }
{ "confidence": [ 59.586395263671875, 58.53725814819336, 58.370384216308594, 56.68183135986328, 55.8513298034668, 55.253143310546875, 53.72273254394531, 53.55881881713867, 51.879371643066406, 51.713157653808594, 51.46299743652344, 51.3321418762207, 50.8838005065918, 50.83060836791992, 50.20587158203125, 50.06603240966797, 49.85369110107422, 49.541839599609375, 49.48492431640625, 49.185028076171875 ], "content": [ "Question : I m working on a Fusebox application using Coldfusion and there is a fusebox.xml http : trac.fusebox.org fusebox wiki FuseboxXmlPage Thefusebox.xmlFile file which I d like to be slightly different on the production server than it is on the development server . Since it appears that this file is just a xml file ie : I don t think it can be a cfm file it seems I cannot use some if..else. . logic within fusebox.xml . So I m wondering if my assumption above is wrong or if there is a way to use two files one for development and one for production Comment : If you are looking to replace crusty old fusebox take a look at this github.com jamie-pate FuseBoxFreedom https : github.com jamie-pate FuseBoxFreedom .. . Answer : We don t use Fusebox but we have similar config files that are different from dev to test to production . We just keep all three versions in different directories in the repository and upload the required production version to the production servers . Since these files changes infrequently this works for us . The Fusebox docs http : cfinnovate.com : 9082 display fb fusebox.xml don t seem to indicate a way to use a different fusebox.xml but maybe an expert on Fusebox can confirm that .", "Question : Currently in the application.cfc I extend the Fusebox 5.5 Framework . Then in the OnRequestStart method below I set the fusebox mode depending on a certain condition . The problem is that sometimes the fusebox xml files do not reparse no matter what changes I make . If I force a reparse using the url variables fusebox.parse true fusebox.loadclean true fusebox.password xxx then the files parse again . It is almost like Fusebox remains in production mode even though when I dump the FUSEBOX PARAMETERS.mode it says development-full-load .. . .. . What could be causing this Is the way that the fusebox mode is being manipulated correct in the code below or should that kind of setting be done somewhere else besides the fusebox.xml obviously Any help would be great . Thanks .. . Answer : See FUSEBOX PARAMETERS are stored in application scope by default they are included in huge container application.fusebox . Fusebox settings are populated when super.onApplicationStart invoked so modifying them in onRequestStart does not make sense . I would recommend to move your cfswitch code into the component body where you define application-settings . In onRequestStart you can force the application restart to reread the settings possibly something like this : .. . .. . Please note that fusebox.loadapp is not built-in Fusebox attribute it will work only for your app simply prefixed like others for convenience . This way you can reread the singletones of your application . Comment : Thanks for the reply - I suspected it had something to do with the application scope . So would putting the code in the onApplicationStart method work if I put it before the call to cfset super.onApplicationStart Comment : @Cheeky You mean putting your code right I think this may work in onApplicationStart too but you ll need to do at least two things : 1 execute super.onApplicationStart after that 2 force application restart in request somehow unless it wont be fired before timeout . Plus I m don t think FUSEBOX PARAMETERS will work inside onApplicationStart possibly you should try application.fusebox format instead . But simplest solution would be to do as I proposed in the answer . Comment : @Sergii : Would you mind elaborating on I would recommend to move your cfswitch code into the component body where you define application-settings . In this application all settings are defined in fusebox.init or appliction.cfc . There is no separate CFC for app settings . Thanks@Sergii : Would you mind elaborating on I would recommend to move your cfswitch code into the component body where you define application-settings . In this application all settings are defined in fusebox.init or appliction.cfc . There is no separate CFC for app settings . So maybe in the fusebox.init place the switch t Comment : @Sergii : Ok it works simply by running cfif StructKeyExists attributes fusebox.loadapp AND attributes fusebox.password EQ application.fusebox.password cfset this.onApplicationStart cfif after the switch . So the code will have no effect in OnRequestStart unless those fusebox parameters are passed in . By default fusebox is set to production mode so the only time I have to pass those parameters is when I m on a development server . Or perhaps I can even check if the application.fusebox.mode is different from the request and call OnApplicationStart as well Comment : @Sergii : Ok I ve edited the original post to reflect the route i ve taken . You see any issues Thanks", "Question : I m working on a Fusebox application using Coldfusion and there is a fusebox.xml http : trac.fusebox.org fusebox wiki FuseboxXmlPage Thefusebox.xmlFile file which I d like to be slightly different on the production server than it is on the development server . Since it appears that this file is just a xml file ie : I don t think it can be a cfm file it seems I cannot use some if..else. . logic within fusebox.xml . So I m wondering if my assumption above is wrong or if there is a way to use two files one for development and one for production Comment : If you are looking to replace crusty old fusebox take a look at this github.com jamie-pate FuseBoxFreedom https : github.com jamie-pate FuseBoxFreedom .. . Answer : Here is what I did : .. . .. . And obviously the application name is different for the production environment than it is for the development-environment .", "Question : I am working on migrating an application to an framework application specifically Fusebox 5.5 . I would need to extend two Application.cfc Fusebox5.Application and another Application.cfc that sits in a folder a couple directories up . Below is the directory structure : .. . .. . The Application.cfc file has the following code : .. . .. . It s not as simple as adding fusebox5.Application Folder1.Application but basically is what I want to do . Any help would be appreciated . Couple caveats : .. . .. . I do NOT want to make any impact on any existing code outside of the Application folder . I read about extending an ApplicationProxy.cfc and would probably be willing to try that out but that would be the extent of any modifications to existing code base . I can consider an alternative framework but a lot of the existing code base that I m migrating would not lend itself very well . My primary objective would simply to be organize code . Comment : It doesn t make a great deal of sense to want to extend two different Application.cfc s in a multiple-inheritance sort of way . Well not to me anyhow . Why is it you need to extend both the application s and Fusebox s Application.cfcs I don t doubt you need to do it for some reason but elaborating upon the reason would help answering . Comment : Jesus I don t believe I put an apostrophe in Application.cfc s : - Comment : @AdamCameron - I was attempting to do this to utilize both Fusebox s Application.CFC which is needed for the framework to run as well as the original application s Application.cfc . I do not know what the extent it is being utilized but I know at least the application name DSN and some onRequestStart settings are initialized there . I agree with you that it doesn t really make sense . I ve sort of scrapped the idea of putting it in a structured framework and am now just attempting to reorganize decouple the pages . .. . Answer : Without knowing which bits from which Application.cfc you need to re-use it s difficult to answer this . However you cannot have multiple-inheritance in CF . I guess you know this . You could conceivably create a new CFC in your sub app which extends the one in the main app and then create an instance of that wihthn your sup-app s Application.cfc . You can then call its public methods and access its THIS scope as needs must . And your sub-app can then extend the Fusebox one as per normal . Or possibly do it the other way around depending on which makes more sense . Other than that you could refactor the bits you need from the main app into some other construct and include file a different CFC or something and then call that code from each of the main-app and sub-app and again extend Fusebox from the sub-app . Obviously this means monkeying with the main app and regression-testing again etc . Comment : Adam thanks for the insight . I ll look into creating the new CFC for the sub-app and extending from there . I have a feeling I m going to run into some conflicts onRequestStart I think . Though I am reluctant to do it and probably won t what are your thoughts on adding stuff from the App.CFC to the Fusebox.CFC Comment : I wouldn t mess with the Fusebox Application.cfc no . The Application.cfc in there should only concern itself with FB things just like really the Application.cfc files in the other apps should really only concern themselves with their own interests . I guess your situation is interesting because it s entirely possible to have an app that is a Fusebox app is a being used in the OO sense as well as is a your sub app . But the sub app fails the is a fusebox app . Comment : Other frameworks like ColdBox can be run either using the extends model like you are trying with Fusebox here or in a embedded instance model where the Coldbox all stuff is just an instance variable of your Application.cfc and you call methods on it rather than relying on it being extended by your app . Can Fusebox not be run this way", "Question : I ve inherited a CF application that currently runs on Fusebox 4 . I m noticing quite a high number of application scope time-outs within the CF Administrator and I m not 100 about locking and where cflock should be used . Right now I can see a cflock around the main fusebox file . My instinct is telling me that this really isn t a sound practise . Can anyone advise if this is incorrect for a Fusebox application .. . Answer : Locks around big long chunks of code IS a bad practice . In this case it should be really called only once at application-start if you use Application.cfc put it in OnApplicationStart method if you are still on Application.cfm then put it inside applicationStart restart if block .", "Question : I m working on a Fusebox application using Coldfusion and there is a fusebox.xml http : trac.fusebox.org fusebox wiki FuseboxXmlPage Thefusebox.xmlFile file which I d like to be slightly different on the production server than it is on the development server . Since it appears that this file is just a xml file ie : I don t think it can be a cfm file it seems I cannot use some if..else. . logic within fusebox.xml . So I m wondering if my assumption above is wrong or if there is a way to use two files one for development and one for production Comment : If you are looking to replace crusty old fusebox take a look at this github.com jamie-pate FuseBoxFreedom https : github.com jamie-pate FuseBoxFreedom .. . Answer : In older projects with fusebox.xml we re using another copy of the config called server.xml . This file is typically out of source control so it allows easy configuration of application instances . It s structure is pretty the same as fusebox.xml but includes only attributes which we want to override for current instance for example datasource or paths : .. . .. . In the fusebox.appinit.cfm or fusebox.init.cfm depending how frequently this file is changed or any other reasons this file is parsed and matching entries in application.fusebox are updated . For example here s the function for doing this : .. . .. . BTW for safety we usually rename them to the fusebox.xml.cfm server.xml.cfm -- it does not make it CFML file but protects from direct access without web-server tricks .. . .. . .. . .. . Also it worth mentioning that in latest since 2009 Fusebox-based projects we ve used Application.cfc for configuration . These are modern-style applications with much better control over the initialization and other stuff available as Application.cfc methods . With this approach Fusebox is configured as FUSEBOX PARAMETERS scope . It s even easier to override its values simply include server.cfm file and put there a chunk of plain CFScript with FUSEBOX PARAMETERS.datasource my datasource .", "Question : I am looking into some ColdFusion development with the Fusebox framework - I have installed CF10 and downloaded Fusebox 5.5 and their sample skeleton app but I am left wanting at their setup guide http : www.fusebox.org index.cfm getting-started setting-up-fusebox . I can get a basic app Hello World style working by just dropping a directory in my webroot and a basic index.cfm but when I try to access the skeleton app I get an error saying the Fusebox files cant be found . Can someone describe common convention best practice for structuring my applications and FuseBox files in my web server I currently have the following structure : .. . .. . Also the docs mention that I need to add a line to index.cfm to confirm the directory structure - can anyone shed any more light on this as to what the config line looks like And finally if anyone can chip in on general directory structure best practice for individual applications that would be great. . Im hoping they share something in common with the typical kind of layout as used by Initialize http : www.initializr.com etc Comment : May I ask why you ve chosen Fusebox It s not like I dislike it I actually worked with it a lot but there are few modern alternatives out there which at least currently maintained . FW 1 CFWheels etc . Comment : I have been working with a cfusion application that uses it so thought I would stick with it . I did not know FuseBox was no longer supported What would be your preferred framework to recommend looking for a nice clean but powerful MVC framework - good REST support and responsive-design support a plus . Im java Spring background Comment : @Sergii oh yes and of course im using CF10 so good support for that and its features would be good Comment : Fusebox is being maintained updated http : fusebox.org index.cfm fusebox-downloads fusebox-56 after a long period of dormancy and it ll work . However you ll certainly find more people using newer frameworks mainly FW 1 Model-Glue cfWheels ColdBox - some of those use ColdSpring a CF port of Spring so worth looking into that if that s your background . Comment : @PeterBoughton Well it was one burst of activity after changing the ownership.. . 7 months ago . To be honest I don t think it will fly again but I d be happy to be wrong here . .. . Answer : The Fusebox core files should be in the webroot in a folder named fusebox5 by default . Alternatively and probably the recommended deployment is to locate them outside of the webroot and create a mapping in your Application.cfc or ColdFusion Admin called fusebox5 to the directory . From there in the skeleton it clearly shows the proper structure of a Fusebox 5 application . There are two implementations for Fusebox Applications and they can be mixed and matched to a degree as well : Implicit and XML Explicit . You can customize where the fusebox core files are located by adjusting the line in the application.cfc : .. . .. . Let s say you move the core files into the FBCore directory in webroot : .. . .. . Looking at the latest download from Fusebox.org it isn t very new-developer friendly out of the box . Try downloading the sample Bookstore application for version 5 and version 4 if you want to see the xml at work . The framework stagnated for a number of years but there is a new group working on the framework but I m not sure where that group stands right now . Sean Corfield one of Fusebox s core maintainers in the past has wrote recently he felt that his FW 1 framework is a successor to Fusebox . Fusebox is touted as a feature-complete framework meaning all the big features planned for it were completed and I think FW 1 is also in a similar state . The most actively maintained framework is Coldbox . It too supported both xml and now implicit no-xml flavors and the group behind it releases a large number of products and features on an almost too-regular basis it s hard to keep up . It does come with ALOT of documentation but the framework does everything under the sun . They have released a Lite version that might make it easier for newer developers to jump in . Comment : I would be surprised if Sean Corfield ever promoted FW 1 as successor . There are a lot of similarities but FW 1 has very few configuration options compared to Fusebox . FW 1 is implemented in a single file where as Fusebox is really big . Comment : He did recently it was the first time I d seen him write something to that effect too . I shouldn t have used the word touted he just mentioned it in passing . Comment : Thanks - did manage to get it working but think i will have a look at ColdBox Comment : Sean has said words with the approx same meaning as FW 1 is what I wanted FB5.5 No-XML to be but without the constraints of backwards compatibility . Though that was a while ago unless he repeated it recently Comment : Also the only area FW 1 deliberately lacks configuration is in the controller view layout locations - there are plenty of general FW 1 configuration options including the ability to easily edit override the single core-file yourself since it is only one file and much easier to follow than Fusebox", "Question : I am currently working on converting a ColdFusion website using Fusebox framework to PHP . The site contains like 20 000 lines of ColdFusion code . My dilemma is should I switch to Fusebox-PHP as it will be easier to migrate the project layout or a robust and popular framework like Symfony or Zend . Can anyone suggest a few points in favor or against the three options .. . .. . 1 . migrate to Fusebox-PHP .. . 2 . migrate to Zend .. . 3 . migrate to Symfony Comment : Does the migration have to be to PHP If this is a cost licensing issue there are FLOS alternatives to ColdFusion - migrating from ColdFusion+Fusebox - Railo http : www.getrailo.org +Fusebox will be much easier.. . Comment : If it does need to be to PHP you will need to state which version of Fusebox is used since I m not sure if the PHP version was updated to the same level as the CF version which affects how simple such a migration might be . Comment : Yes The migration needs to be to PHP only . The Fusebox version used 4.0.5 Comment : Yeah and there is no cost licensing issue. . .. . Answer : Fusebox has been abandoned for a variety of issues legal issues amongst them iirc . As long as you are rewriting it into PHP you might as well switch to a more current framework . Sure you will have to learn how to do the same things a new way but on the bright side you will have gained experience with a popular framework Ultimately Fusebox is dead and it would be unwise to use it unless you were doing something turn-key like just migrating to Railo Comment : Thanks That was really insightful .", "Question : I have a assignment for school and I need to use the Fusebox framework on my ColdFusion website . But why do I need to use it And what are the benefits .. . Answer : Fusebox http : www.fusebox.org is a Model-View-Controller MVC http : en.wikipedia.org wiki Model E2 80 93view E2 80 93controller framework for building application with the ColdFusion programming language . However it is horribly outdated and hasn t been in development for quite some time . I m surprised that you re being asked to use it for class when there are much more modern MVC frameworks available for ColdFusion . ColdBox http : www.coldbox.org and Framework 1 http : fw1.riaforge.org are much more modern implementations of MVC for CFML applications . It won t hurt you to use FuseBox for class you ll learn the basics of MVC and how to structure your application . However once you start building a larger application try using either of these newer frameworks . You ll have a much better time with them . As for why you need to use it the question is not Why use FuseBox but Why use MVC To quote the article from Wikipedia .. . .. . Model view controller MVC is a software architectural pattern for implementing user interfaces . It divides a given software application into three interconnected parts so as to separate internal representations of information from the ways that information is presented to or accepted from the user . The central component the model consists of application data business-rules logic and functions . A view can be any output representation of information such as a chart or a diagram . Multiple views of the same information are possible such as a bar-chart for management and a tabular view for accountants . The third part the controller accepts input and converts it to commands for the model or view . In other words MVC gives you an excellent way to structure and separate your application code . You re probably used to building CF apps where queries logic and UI are all in the same file . As your applications grow larger this will cause duplication of code and other issues that can be easily addressed with an MVC framework . Comment : Thanks you really helped me out and i will definitely use coldbox in the future Comment : Btw - did your school really insist on Fusebox If so please be sure to let them know what iKnowKungFoo said about about it being outdated . They are doing a disservice to their students on forcing an outdated framework . Comment : @RaymondCamden I m not surprised at all . At my kids high school they still insist on using frames for their html class . I don t mean just once but for the entire course.. . The school created the class about 4 years ago but some how they chose a book that was ancient to teach the class .", "Question : I would like to know if there s an easier way other than Mod Rewrite using the fusebox framework or directly in Coldfusion to convert a url as follows : .. . .. . from : .. . .. . to : .. . .. . My app is an existing Fusebox 5.5 application . I just need to add that the url above is not static i.e . salmahayek could be any name . Any help would be greatly appreciated Thanks .. . Answer : You could potentially use the classic way of doing it not sure if Fusebox will interfere using a 404 handler something like this should do the trick : .. . .. . 1 . Set up a 404 hander on your server e.g . in .htaccess : .. . .. . ErrorDocument 404 404handler.cfm .. . .. . 2 . set up 404handler.cfm to wrap around the framework e.g . : .. . .. . not tested but should work Comment : IIS will support the same . It is a hack but it won t fail . Comment : Hi - Sorry - I meant to add that the url above is not static i.e . salmahayek could be any name so that hard coded entry probably wouldn t work . Comment : Cheeky - as per the coldfusion comment it was just an example you probably want to replace it with a better check e.g . making sure it exists in the database or so rather than blindly sending anything that 404s through the profile.view action .", "Question : Does anyone know if its possible to invoke a fuseaction within a coldfusion template .. . Answer : With MVC you should be working through a single entry-point . So only a single fuseaction should be called during your request . BUT that fuseaction can call some of the other model and view templates as needed . And I believe that Fusebox allows you to refactor that logic into something that can be used by multiple actions . I m a bit rusty on my Fusebox functionality though but I bet some Googling will lead you the way . As a dire last resort you could use cfhttp to call a URL within your app that invokes that fuseaction . But why not just run some of the code directly without needing to burden your server with another HTTP call Comment : So only a single fuseaction should be called during your request . - nope . There will be a single entry-point but it is perfectly valid and encouraged to divide the request up into further sub-fuseactions . There s even the ability to set prefuseaction and postfuseactions . Comment : And I believe that Fusebox allows you to refactor that logic into something that can be used by multiple actions . I suppose the proper way to describe this was with a prefuseaction . I think prefuseactions are a much more expressive way to run refactored controller logic and it is in line with more modern development practices . Think before filter in Rails and filters in CFWheels .", "Question : null .. . Answer : I use Coldfusion 9 fusebox 3 and an Application.cfc in my web application . I would like to control intercept and eventually change the value of fuseaction in the onRequestStart section of the Application.cfc .. . .. . I m able to check the content of the fuseaction with a single ListFirst fuseaction . but I have tried to replace the fuseaction value without success . Should I need to absolutely use a and rebuild my URL or is there another solution What is the best solution Thanks . Comment : possible duplicate of Fusebox invoking a fuse within the code http : stackoverflow.com questions 14004014 fusebox-invoking-a-fuse-within-the-code Comment : I have tried to replace the fuseaction value without success . Show us your code and describe the results more thoroughly . Read this : blog.adamcameron.me 2013 09 http : blog.adamcameron.me 2013 09 short-self-contained-correct-compilable.html and the various docs it links to about how to ask questions .", "Question : I am currently working on converting a ColdFusion website using Fusebox framework to PHP . The site contains like 20 000 lines of ColdFusion code . My dilemma is should I switch to Fusebox-PHP as it will be easier to migrate the project layout or a robust and popular framework like Symfony or Zend . Can anyone suggest a few points in favor or against the three options .. . .. . 1 . migrate to Fusebox-PHP .. . 2 . migrate to Zend .. . 3 . migrate to Symfony Comment : Does the migration have to be to PHP If this is a cost licensing issue there are FLOS alternatives to ColdFusion - migrating from ColdFusion+Fusebox - Railo http : www.getrailo.org +Fusebox will be much easier.. . Comment : If it does need to be to PHP you will need to state which version of Fusebox is used since I m not sure if the PHP version was updated to the same level as the CF version which affects how simple such a migration might be . Comment : Yes The migration needs to be to PHP only . The Fusebox version used 4.0.5 Comment : Yeah and there is no cost licensing issue. . .. . Answer : My opinion is that Fusebox is an old framework that is not only not that popular with ColdFusion any more but never really took off in the PHP world . I would either find a new framework or do without the framework depending on the complexity of the site there are many good PHP frameworks out there . Looks like the last release for PHP was 7 years ago in 2005 Comment : Thanks I will consider it .", "Question : I am creating a fusebox application in Fusebox 5 . It is working fine in my local . When I try it in a railo server it throws an error like Attempting to execute the parsed file MyController.main.cfm threw an error . This can occur if the parsed file does not exist in the parsed directory or if the parsed directory itself is missing .. . .. . in the OnRequest of the core application file . It happens in the line cfinclude template parsedFileData.parsedFile and when I dumped the variable it shows like . . . . . . . . . . : projects Mydomain MyAppName parsed MyController.main.cfm . The file path is strange as the Mydomain is my host name where I am having my application MyAppName is the application name . Can anyone help me to fix this issue Comment : A bit OT but you might want to consider something a little more modern than Fusebox . Comment : @JamesAMohler It is good to see the opt choice for the requirements . But they want me to do this way : .. . Answer : This may be caused by a conflict between a UDF in Fusebox and a built-in function with the same name in Railo Lucee . Try searching the entire Fusebox folder for getCanonicalPath and replacing each occurrence with getCanonicalPathUdf . Comment : That worked . Sorry for the late approval... .", "Question : just starting to use coldfusion fusebox a bit this is my second question asked here where a lot of the response mentioned that fusebox is no longer supported and there are possibly better suited frameworks - so am looking at ColdBox and FW 1 - but still wanted to ask this Fusebox question . I am trying to understand if Fusebox 5.5 the latest version which am using supports any kind of convention based url-mapping . I have the noxml skeleton app which starts and runs on the urL : .. . .. . Now I have seen that this defaults to executing the welcome function within the app controller - what I want to know is if there is convention based url-mapping built-in so i can define my urls like this : .. . .. . e.g . appname controllername functionname .. . .. . I have also seen this question : How do I create Search Engine Safe URLs in Fusebox 5.1 noxml http : stackoverflow.com questions 744181 how-do-i-create-search-engine-safe-urls-in-fusebox-5-1-noxml and having added the suggested basic config : .. . .. . I can hit this url : .. . .. . but obviously thats still a pretty ugly url. . .. . .. . Is what I want even possible out of the box with fusebox 5.5 documentation and community links on the fusebox site 404. . .. . Answer : If you want to do the purest form of SES URLs http : site.com controller action it requires the removal of the index.cfm which involves having to do some URL rewriting on the web server-side . No framework that I know of can avoid URL rewriting if you want to remove the index.cfm .. . .. . IIS7.5 supports it natively using the web.config or using built-in wizards Apache has mod-rewrite via .htaccess . There are 3rd party products for IIS6 7 . If you want more power control you can also check out using coldcourse http : coldcourse.riaforge.org as mentioned here : .. . .. . How do I create Search Engine Safe URLs in Fusebox 5.1 noxml http : stackoverflow.com questions 744181 how-do-i-create-search-engine-safe-urls-in-fusebox-5-1-noxml .. . .. . As the poster mentions apparently there is built-in URL rewriting in FB 5.5 but I m not familiar with 5.5 intimately . Comment : Ok thanks . And if I didn t mind the index.cfm but wanted to use inex.cfm controller action could I do that easily", "Question : How do I create Search Engine Safe URLs in Fusebox 5.1 noxml For instance I want this : http : www.site.com index.cfm app.welcome .. . .. . Instead of this : http : www.site.com index.cfm fuseaction app.welcome .. . .. . Fusebox 5.1 is suppose to be able to do this . I ve read this article http : trac.fuseboxframework.org fusebox wiki Fusebox51Enhancements SearchEngineSafeURLs but it only applies to the xml version . I know so little I am not sure where to start . How do I do it with the noxml version of fusebox Update : It looks like I need to add this to my Application.cfc file . Still not working though.. . .. . Answer : riaforge http : www.riaforge.org is your friend : .. . .. . http : coldcourse.riaforge.org", "Question : I ve inherited a CF application that currently runs on Fusebox 4 . I m noticing quite a high number of application scope time-outs within the CF Administrator and I m not 100 about locking and where cflock should be used . Right now I can see a cflock around the main fusebox file . My instinct is telling me that this really isn t a sound practise . Can anyone advise if this is incorrect for a Fusebox application .. . Answer : I m not sure there is anything IN fusebox.runtime.cfmx.cfm that requires a full application lock . You should check . When you lock the whole application scope for each request you are affecting a sort of single-threading for that file . In other words 2 requests cannot run this file at the same time . Since it s a general file for the framework this greatly affects your scalability . As Germann has suggested an application be used judiciously - typically once for the life of the application . Meanwhile the specific file in question fusebox4.runtime.cfmx.cfm has lots of things in that are not related to the application . You can t run the framework without it.. . I would removed this lock and examine fusebox4.runtime.cfmx.cfm to try and determine why someone felt it necessary to lock the file to begin with . One more thing . There is a MODE setting somewhere in fusebox that can be set to DEV or PROD my memory may be faulty . It could be that you are set to DEV - in which case lots of things are happening under the hood that you want to avoid - chiefly that each request is reassembling files in the parsed directory with each request . So check that one too .", "Question : null .. . Answer : Inherited a CF9 site that uses Fusebox 5 Coldspring and CFUnit . I ve set the mode in fusebox.xml.cfm to : .. . .. . However my CFC files seem cached all cache options in CF admin are unchecked . So I added the following parameters to the URL : .. . .. . fusebox.password fusebox.load true fusebox.loadclean true fusebox.parse true .. . .. . The above parameters do cause the changes I make to a CFC to be picked up and not cached . Which is what I want . But it s making loading the page much longer . Is there a way to refresh changes made to a CFC faster while using Fusebox 5 Coldspring I m a Fusebox 5 Coldspring newbie so please provide an ABC step response if you can : Comment : Can you supply the code that you use for the CFCs Are they tied to session s or application s", "Question : Does anyone know if its possible to invoke a fuseaction within a coldfusion template .. . Answer : You haven t specified which Fusebox version this answer applies to Fusebox 5.x .. . .. . Your title and question is asking two different things - a fuse and a fuseaction are two distinct things . A fuse is simply a CFML template whilst a fuseaction represents a bundle of logic that performs a particular action similar to a function . Fuses : .. . .. . To invoke a fuse simply include the file as you would normally - there s no special FB functionality required for this . Fuseactions : .. . .. . To invoke a fuseaction use the do verb like so : .. . .. . .. . To store the result use the second argument for the content variable : .. . .. . This is the equivalent of this XML : .. . .. . .. . There are other arguments available see this Fusebox cheat sheet http : www.dopefly.com projects fuseboxxmlcheatsheet.cfm which contains plenty of other useful info too . Comment : Fuseactions is what I was looking for and I will give your solution a try . Thanks I will let you know .", "Question : I would like to know if there s an easier way other than Mod Rewrite using the fusebox framework or directly in Coldfusion to convert a url as follows : .. . .. . from : .. . .. . to : .. . .. . My app is an existing Fusebox 5.5 application . I just need to add that the url above is not static i.e . salmahayek could be any name . Any help would be greatly appreciated Thanks .. . Answer : I ve doing some like this in one my apps currently albeit in PHP : .. . .. . http : localhost index.cfm profile.view salmahayek .. . .. . This works perfectly but you have to put up with the index.cfm if you don t want to rewrite ." ] }
[ "yes-answer-long", "yes-answer-short" ]
naming-conventions
UNK_RELATION
snap-framework@haskell@77
snap-framework -- snap is a simple web development framework written in the @placeholder programming language .
{ "confidence": [ 52.99393844604492, 51.90898513793945, 51.02754592895508, 49.52837371826172, 47.7315788269043, 47.65426254272461, 46.002296447753906, 44.50312805175781, 44.50312805175781, 43.6871452331543, 42.73012161254883, 42.295475006103516, 41.766178131103516, 41.58867263793945, 41.58867263793945, 41.00083541870117, 41.00083541870117, 40.74116897583008, 40.598602294921875, 40.58436965942383, 40.26283264160156, 39.94028854370117, 39.94028854370117, 39.94028854370117, 39.5537109375, 39.50166320800781, 39.50166320800781, 39.08519744873047, 38.565391540527344, 38.565391540527344, 37.74673843383789, 37.74673843383789, 37.74673843383789, 37.74673843383789, 37.74673843383789, 37.74673843383789, 37.066219329833984, 36.9608039855957, 36.9608039855957, 36.9608039855957, 36.71889114379883, 36.71889114379883, 36.71889114379883, 36.71889114379883, 36.71889114379883, 36.666072845458984, 36.644317626953125, 36.571876525878906, 36.50166320800781, 36.48563766479492, 36.24756622314453, 36.24756622314453, 35.912635803222656, 35.8608283996582, 35.55558776855469, 35.55558776855469, 35.55558776855469, 35.26942443847656, 35.26942443847656, 35.26942443847656, 35.21971893310547, 35.21971893310547, 35.15447998046875, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 34.21770477294922, 33.7847785949707, 33.68219757080078, 33.68219757080078, 33.42292404174805, 33.42292404174805, 33.42292404174805, 33.42292404174805, 33.42292404174805, 33.18967056274414, 32.89466857910156, 32.89466857910156, 32.89466857910156, 32.89466857910156, 32.89466857910156, 32.89466857910156, 32.89466857910156, 32.89466857910156, 32.89466857910156, 32.718536376953125, 32.718536376953125, 32.42213439941406 ], "content": [ "I begin learning snap-framework .", "I use the snap-framework for this .", "I am using Snap framework to prototype a web application .", "I am trying to learn snap web framework is haskell .", "I am running a web-application built with the snap-framework .", "I have started learning a bit about the snap-framework I found some tutorial on blaze snap and want to build a little web-app .", "I d like to serve some static files from a Snaplet in the Snap framework .", "How do you override the custom logging in the snap-framework", "I was using different version of the snap-framework than given in this tutorial .", "I m using the snap-web-routes package https : github.com lukerandall snap-web-routes : .", "snap-server is a web server that exposes the API defined by snap-core .", "is there a simple example on enabling HTTPS in a Snap server", "Why must I know about deployment of the damn thing if I am just interested in programming.. . .. . .. . Edit : related question : Deploy Haskell code that uses the Snap Framework http : stackoverflow.com questions 7539450 deploy-haskell-code-that-uses-the-snap-framework", "Snap provides the getEnvironment http : hackage.haskell.org package snap-0.14.0.5 docs Snap-Snaplet.html v : getEnvironment function for this purpose .", "glob.win.Snap Snap .. . return Snap .. . window this .. . .. . Firebug shows the Snap object in the window context before instantiating any user objects .", "but Snap itself already depends on lens http : hackage.haskell.org package snap-0.14.0.6 .", "I don t see that the var Snap at the top or the return Snap are doing anything .", "Right now the Snap team maintains five different projects on hackage : snap-core snap-server heist snap and xmlhtml .", "Has anyone got the SNAP AOP framework working with MVC 3 and Ninject .", "I m just playing with the Snap framework and wanted to see how it performs against other frameworks under completely artificial circumstances .", "I am new Snap and Haskell web development I want to parse the request body to Haskell data value .", "I m not familiar with Snap or Heist", "Snap did this with a Pong benchmark .", "the below is my snap file .", "Edit 2 : .. . .. . On the wiki http : snapframework.com docs tutorials snap-api they say : .. . .. . snap-server is an HTTP server library that supports the interface defined in snap-core .", "what does it take for .snap package to be automatically updated from snap store", "Say you had snap foo built with Snapcraft as foo 1 amd64.snap .", "I m trying to deliver a large HTTP response using the Haskell Snap framework but memory usage grows in proportion to the size of the response .", "It would be worth to wait for Snap 1.0 .", "Snap itself comes with this capability built-in .", "There are ways to do this kind of thing but snap 1.0 doesn t do them sorry --- and in snap 1.0 the issue will be moot .", "This function gets the environment passed to runSnaplet http : hackage.haskell.org package snap-0.14.0.5 docs Snap-Snaplet.html v : runSnaplet .", "There already appears to be an AuthUser https : hackage.haskell.org package snap docs Snap-Snaplet-Auth.html t : AuthUser type for dealing with user authentication .", "I have installed version 0.9.8.0 of snap-core and version 0.9.5.1 of snap-server .", "If you re interested in that look around the different branches in the snap-benchmarks repository https : github.com snapframework snap-benchmarks .", "Playing with the default app generated by snap init I can t get snap to render anything but index.tpl for the root request .", "Heist was designed to have no dependencies on Snap .", ": .. . .. . This bit https : github.com snapframework snap-server blob 0.9-stable src Snap Internal Http Server.hs L602 in Snap does something like .. . .. . and x-www-form-urlencoded is curl s default .", "What I have found is that my Snap application tops out at about 1500 requests second the app is simply snap init snap build . dist app app ie .", "runWebSocketsSnap is just a regular Snap application so you can use rqRemoteAddr https : hackage.haskell.org package snap-core-0.9.7.0 docs Snap-Core.html v : rqRemoteAddr to get remote IP address :", "I am not that into OpenSsl and its usage with Snap .", "I have a Haskell desktop application that uses Snap .", "Heist was specifically designed to not depend on anything from Snap .", "That s when I noticed the var Snap .", "Is this possible using snap or any other Haskell server", "The web-routes package was originally written for Happstack which has essentially the same routing interface that Snap has .", "I m new to snap and js .", "The Heist snaplet has a function serveHeist http : hackage.haskell.org package snap-0.14.0.6 docs Snap-Snaplet-Heist.html v : heistServe that acts a lot like serveDirectory http : hackage.haskell.org package snap-core-0.9.8.0 docs Snap-Util-FileServe.html v : serveDirectory .", "I thought it will be something more programmatic right from the server written in the app using one of these functions https : hackage.haskell.org package snap-server-0.9.5.1 docs Snap-Http-Server-Config.html", "I haven t done this before but this is what I would try : .. . .. . Use the wrapSite function to conditionally use the routes for your subdomain and you can test which subdomain was requested with fmap rqServerName getRequest .. . .. . http : hackage.haskell.org packages archive snap 0.11.0 doc html Snap-Snaplet.html g : 7 http : hackage.haskell.org packages archive snap-core 0.9.2.2 doc html Snap-Core.html g : 5 http : hackage.haskell.org packages archive snap-core 0.9.2.2 doc html Snap-Core.html g : 10", "This function is defined by the heist snaplet here http : hackage.haskell.org package snap-0.13.3.1 docs Snap-Snaplet-Heist.html v : heistInit .", "Now you can run sudo snap install foo and it ll install your newly published snap version 1 .", "Yes snap is a web server but we almost always put nginx in front of them with the snap apps only listening on localhost and a proxy path pointing to the server or a group of them .", "I m new Snap-SVG and and takes a long time to do something as simple as this .", "The simplest way to serve static files is with serveFile http : hackage.haskell.org package snap-core-0.9.8.0 docs Snap-Util-FileServe.html v : serveFile .", "The results of an old test from 2011 and Snap 0.3 can be seen here http : snapframework.com blog 2010 11 17 snap-0.3-benchmarks .", "You can do that in your initializer by calling the addRoutes http : hackage.haskell.org packages archive snap 0.11.2 doc html Snap-Snaplet.html v 3aaddRoutes function .", "Snap has pretty good momentum .", "Snap does not deal with widgets at all .", "Create a snap plugin for draggable rectangles .", "GHC version 7.8.3 .. . .. . Snap version 0.14.0.5", "snap init barebones will suffice for creating the project .", "You can see from the source code https : github.com snapframework snap blob master src Snap Snaplet HeistNoClass.hs L239 that it s slightly different from what you have here .", "I d like to implement streaming of large-data in both directions with the Snap server .", "For this reason snap-server limits the amount of data it is willing to read in this way .", "Maybe it s a good pull request for the Snap team to check", "It seems to work But wondering if there is any standard way to do this in Snap world .", "Is there a possibility to configure Snap that it would delay the outcoming stream of data", "Did something change in Snap since I last built this code", "These things all happen in Heist itself rather than in snap .", "What steps would one take to optimise Snap for throughput speed", "One of these is the sample Snap application and the other is just a Grails application .", "I was wondering exactly what mechanism was injecting the Snap object into the DOM .", "Further investigation resulted in the discovery at the bottom of the iife.. . specifically glob.win.Snap Snap .", "It seems that the function Snap is being injected to the window context via the glob.win.Snap assignment .", "And do I still run snap webserver or only nginx", "Using Hakyll that uses snap i started working on a routing server .", "This is not in Snap i know but is the most expressive example found out there .", "The Auth snaplet https : hackage.haskell.org package snap-0.14.0.4 doesn t appear to provide any mechanism for using HTTP Basic so at this point I ve basically written my own : .. . .. . I then use this like so throwChallenge and throwDenied are a couple of helpers that I think are the correct way to approach the necessary short-circuiting in the Snap monad : .. . .. . It works but it seems ridiculous to have to write this myself for a web framework in 2015 .", "image of snap example .. . auto snap example from other site http : i.stack.imgur.com vS3Ld.png .. . .. . link here : .. . auto snap example site http : namecardonline.com eng editor.aspx action content template 10002-1-0-0 modified", "I recently added some new functions https : github.com snapframework snap blob master src Snap Snaplet Heist Generic.hs to the snap package that make it easier to write generic snaplets that automatically work in either compiled or interpreted splice mode .", "Full disclosure : I m one of the lead developers of Snap .", "First of all let s talk about what Snap is .", "In the future Snap will stick with this policy as often as possible .", "But...I m stuck on how to snap align the pieces together .", "See Flatpak Appimage And Snap How Do They Stack", "Snap does have sessions http : hackage.haskell.org packages archive snap 0.7 doc html Snap-Snaplet-Session.html and authentication http : hackage.haskell.org packages archive snap 0.7 doc html Snap-Snaplet-Auth.html interfaces to several databases and nice form handling here http : hackage.haskell.org package digestive-functors-snap and here http : hackage.haskell.org package digestive-functors-heist using digestive-functors http : hackage.haskell.org package digestive-functors that includes prepackaged support for arbitrarily nested dynamically sizable lists .", "If you don t know your snaplet s base URL you can get it with the getSnapletRootURL http : hackage.haskell.org package snap-0.13.3.1 docs Snap-Snaplet.html v : getSnapletRootURL function .", "You can use the getSnapletRootURL http : hackage.haskell.org package snap-0.13.3.1 docs Snap-Snaplet.html v : getSnapletRootURL function and create a splice that makes the information available inside a template .", "The function that starts Snap s main loop takes a configuration parameter as the first argument as you can see in this bit of documentation https : hackage.haskell.org package snap-server-0.9.5.1 docs Snap-Http-Server.html httpServe .", "You can simply call defaultConfig from the Snap.Http.Server.Config https : hackage.haskell.org package snap-server-0.9.5.1 docs src Snap-Internal-Http-Server-Config.html defaultConfig module and then call setSSLPort setCert and setSSLKey on it .", "I have found the snap-auth https : github.com snapframework snap-auth usage-example-1 module on GitHub outlining the creation of a User type that has the AuthUser embedded inside .", "Get a minimal working example - use the snap init barebone command and substitute the src Main.hs with .. . .. . and make sure to have snap-blaze and blaze-html in the corresponding .cabal file .", "If you are trying to serve many different HTML files a better solution is serveDirectory http : hackage.haskell.org package snap-core-0.9.8.0 docs Snap-Util-FileServe.html v : serveDirectory .", "Snap s getParam http : snapframework.com docs latest snap-core Snap-Types.html v 3agetParam function allows you to get HTTP request parameters specified by the user .", "Yes snap-server is its own server which means compilation of your Haskell Snap app leaves you with an executable that you can literally run from the command-line to host your site .", "Trying to use acid-state in Snap and I hit a roadblock .", "I tried to start a new snap project using the stack commands .", "As you can see here https : hackage.haskell.org package snap-server-0.9.5.1 docs src Snap-Internal-Http-Server-Config.html extendedCommandLineConfig the default config is created from the command-line using a description of options https : hackage.haskell.org package snap-server-0.9.5.1 docs src Snap-Internal-Http-Server-Config.html optDescrs ." ] }
{ "confidence": [ 55.835105895996094, 55.51886749267578, 53.253021240234375, 53.231937408447266, 52.76713562011719, 49.11840057373047, 48.95783615112305, 48.583492279052734, 47.4107666015625, 46.88722229003906, 46.513214111328125, 46.491905212402344, 46.02751541137695, 45.83358383178711, 45.3839225769043, 44.98918914794922, 44.33155822753906, 43.9523811340332, 43.8825569152832, 43.773624420166016 ], "content": [ "Question : I ve installed Snap Haskell on my production Ubuntu server on EC2 and checked-out my project - but how do I run it I mean locally I run it from command-line : .. . .. . Does snap come with it s own web-server it looks like it http : hackage.haskell.org package snap-server-0.7.0.1 and if so how do I go about configuring it to run as a daemon of some sort Any tips Edit 2 : .. . .. . On the wiki http : snapframework.com docs tutorials snap-api they say : .. . .. . snap-server is an HTTP server library that supports the interface defined in snap-core . While here the haskell wiki about Deployment Backend options for your haskell web code says that Snap : .. . .. . includes its own server . see Web Frameworks http : www.haskell.org haskellwiki Web Frameworks .. . .. . But HOW How would I run it s own server Why must I know about deployment of the damn thing if I am just interested in programming.. . .. . .. . Edit : related question : Deploy Haskell code that uses the Snap Framework http : stackoverflow.com questions 7539450 deploy-haskell-code-that-uses-the-snap-framework Comment : When you run project-name -p 8000 is your app not just running on port 8000 as you requested Comment : If you cannot run it as daemon run it daemon like with screen . e.g screen -S snapd -d -m -L project-name -p 8000 You then can stop the process via screen -r snapd -X quit Comment : @Sarah Yes but in production when I log-out it terminates my session and all processes in it . Comment : @DanielLeschkowski I probably can run it as daemon I just don t know how.. . .. . Answer : Since it s Ubuntu you re almost always better off using upstart to manage it . man 5 init .. . .. . Among other things it lets you set dependency hierarchies for your services . snapapp depends on mongodb so don t start snapapp until mongodb is running - that sort of thing . Yes snap is a web server but we almost always put nginx in front of them with the snap apps only listening on localhost and a proxy path pointing to the server or a group of them . Funny enough we ve almost completely switched to Common Lisp for new development at work and the setup is exactly the same . Comment : Thanks for letting me know about upstart . It looks great and simple to use How would you put nginx in from of them - I mean what shape does my snap webapp take And do I still run snap webserver or only nginx Sorry for stupid questions.. . Comment : As an obvious side note : I d run snap behind nginx which would serve static content and proxy URLs to dynamic-content .", "Question : I am trying to learn snap web framework is haskell . I am following the tutorial http : janrain.com blog tutorial-building-a-sample-application-with-haskell-snap-postgresql-and-the-postgresql-simple-snaplet .. . .. . I get the following error when I do cabal-install and no clue what is mistake Thanks in advance .. . Answer : I was using different version of the snap-framework than given in this tutorial . Things works fine after changed the version .", "Question : I m certain that I must be missing something obvious but I can t find any built-in way to use HTTP Basic auth within a Snap application . The Auth snaplet https : hackage.haskell.org package snap-0.14.0.4 doesn t appear to provide any mechanism for using HTTP Basic so at this point I ve basically written my own : .. . .. . I then use this like so throwChallenge and throwDenied are a couple of helpers that I think are the correct way to approach the necessary short-circuiting in the Snap monad : .. . .. . It works but it seems ridiculous to have to write this myself for a web framework in 2015 . So where the heck is it Oh also I m aware that there s WAI middleware for providing HTTP Basic auth in https : hackage.haskell.org package wai-extra but I ve not had much luck figuring out whether there s a way to integrate this in Snap the only wai integration packages I ve found are deprecated . .. . Answer : I m guessing either it hasn t been done or people who did it felt it was simple enough that it wasn t worth posting to hackage . The latter makes sense because typically uploading something to hackage carries with it some expectation that you ll support it . But if you think it s needed feel free to put it on hackage yourself .", "Question : The two Haskell web frameworks in the news recently are Yesod http : www.yesodweb.com at 0.8 and Snap http : snapframework.com at 0.4 . It s quite obvious that Yesod currently supports a lot more features than Snap . However I can t stand the syntax Yesod uses for its HTML CSS and Javascript . So I d like to understand what I d be missing if I went with Snap instead . For example doesn t look like database support is there . How about sessions Other features Comment : Personally I can t stand the syntax that html uses for html Comment : what do you not like about the hamlet template syntax for generating html Comment : I don t like that I can t move between Dreamweaver and Yesod because the syntax is different . Comment : In general the Yesod team is very open to new ideas . Now that I know your use-case I can probably recommend a good solution for you . It would be best if you send an email to the web-devel list as SO isn t the best place for a collaborative discussion . Comment : People still use Dreamweaver .. . Answer : Full disclosure : I m one of the lead developers of Snap . First of all let s talk about what Snap is . Right now the Snap team maintains five different projects on hackage : snap-core snap-server heist snap and xmlhtml . snap-server is a web server that exposes the API defined by snap-core . heist is a templating system . xmlhtml is an XML HTML parsing and rendering library used by heist . snap is an umbrella project that glues them all together and provides the powerful snaplets API that makes web apps composable and modular . Yesod has a host of projects on hackage . Most all of them are listed in the Yesod category http : hackage.haskell.org package cat 3ayesod . Some of the notable ones are yesod-core warp persistent and hamlet . The reality of Haskell web development is that it s much less of an exclusive-or choice than seems to be perceived . In general the projects are very loosely coupled and fairly interchangeable . You could build a website using warp the Yesod team s web server heist the Snap team s template system and acid-state the Happstack project s persistence system . You could also use snap-server with hamlet or persistent . That said the two projects definitely have some differences . The biggest difference I can point out objectively is that Yesod projects typically make heavy use of Template Haskell and quasiquoting to create concise DSLs while Snap projects stick to building combinator libraries that favor composability . Just about any other differences I can think of will be subjectively biased towards Snap . The umbrella packages named after both projects are obviously going to make specific choices for the above mentioned components and these choices will be reflected in the project dependencies . But that still doesn t mean that you can t pull in something different and use it as well . Snap does have sessions http : hackage.haskell.org packages archive snap 0.7 doc html Snap-Snaplet-Session.html and authentication http : hackage.haskell.org packages archive snap 0.7 doc html Snap-Snaplet-Auth.html interfaces to several databases and nice form handling here http : hackage.haskell.org package digestive-functors-snap and here http : hackage.haskell.org package digestive-functors-heist using digestive-functors http : hackage.haskell.org package digestive-functors that includes prepackaged support for arbitrarily nested dynamically sizable lists . These are just some of the growing ecosystem of pluggable snaplets http : snapframework.com snaplets . The sessions and authentication snaplets are written in a way that is back-end agnostic . So with a small amount of glue code you should be able to use it with just about any persistence system you can think of . In the future Snap will stick with this policy as often as possible . For the most part I think the choice of Snap vs Yesod vs Happstack is less an issue of features and more one of personal taste . Whenever someone says that one of the frameworks doesn t have something that another one has most of the time it will be pretty easy to pull in the missing functionality from the other framework by importing the necessary package . EDIT : For a more detailed comparison of the big three Haskell web frameworks check out my recent blog post http : softwaresimply.blogspot.com 2012 04 hopefully-fair-and-useful-comparison-of.html . For a rougher but possibly more useful comparison using some broader generalizations see my Haskell Web Framework Comparison Matrix http : softwaresimply.blogspot.com 2012 12 haskell-web-framework-matrix 20.html Comment : The dual nature of friendly competition and mix-and-match in Haskell web development seems very promising . That said I d recommend getting snap-auth over to hackage asap . Sessions and authentication are a big deal . Comment : Yesod also has an as-yet-unreleased interface to mongodb for persistent . Comment : Velocity of development has an influence on me hence this question . It looks very much like Yesod has forward momentum adding features while Snap has remained stagnant . I just don t know offhand what are the new features since I first heard about it 6+ months ago . Comment : Snap has pretty good momentum . First of all it was the most downloaded web framework on hackage last year even though the project didn t launch publicly until May . Second since the 0.3 release in December we ve seen a big increase in activity . Libraries for sessions auth mongoDB the xmlhtml library and more are all being worked on by people who are for the most part new contributors in 2011 . You can also usually find 30 or more people in the snapframework IRC channel . It is definitely an active project . Comment : Of the two I plumped for Snap simply because at the time it seemed to have the greater momentum . I ve been extremely impressed with the quality of the components . Heist has a beautifully simple and clean design that is probably the best templating system I ve seen on any web framework on any language that I ve used . The Snap monads are easy to work with and behave pretty much as you d expect i.e . no nasty surprises . I just wish that they d standardise on either ByteStrings or Text as you are constantly converting between them", "Question : I ve installed Snap Haskell on my production Ubuntu server on EC2 and checked-out my project - but how do I run it I mean locally I run it from command-line : .. . .. . Does snap come with it s own web-server it looks like it http : hackage.haskell.org package snap-server-0.7.0.1 and if so how do I go about configuring it to run as a daemon of some sort Any tips Edit 2 : .. . .. . On the wiki http : snapframework.com docs tutorials snap-api they say : .. . .. . snap-server is an HTTP server library that supports the interface defined in snap-core . While here the haskell wiki about Deployment Backend options for your haskell web code says that Snap : .. . .. . includes its own server . see Web Frameworks http : www.haskell.org haskellwiki Web Frameworks .. . .. . But HOW How would I run it s own server Why must I know about deployment of the damn thing if I am just interested in programming.. . .. . .. . Edit : related question : Deploy Haskell code that uses the Snap Framework http : stackoverflow.com questions 7539450 deploy-haskell-code-that-uses-the-snap-framework Comment : When you run project-name -p 8000 is your app not just running on port 8000 as you requested Comment : If you cannot run it as daemon run it daemon like with screen . e.g screen -S snapd -d -m -L project-name -p 8000 You then can stop the process via screen -r snapd -X quit Comment : @Sarah Yes but in production when I log-out it terminates my session and all processes in it . Comment : @DanielLeschkowski I probably can run it as daemon I just don t know how.. . .. . Answer : Yes snap-server is its own server which means compilation of your Haskell Snap app leaves you with an executable that you can literally run from the command-line to host your site . That s it there s no external server like apache or nginx to tie into . You can setup reverse proxies if needed but that s up to you . Here s what I do with most of my serious deployments : .. . .. . Compile on the same linux box or a compatible machine - I almost always use cabal-dev for sandboxing .. . Command line arguments : cabal-dev bin myapp -p 8010 -e prod +RTS -A4M -qg1 .. . I run on an unprivileged non-default port 8010 above so that I can use a load balancer to forward requests to it . This also allows me to run multiple snap apps per linux box if needed . Then I use a simple process monitoring application to make sure it stays up . You can use : .. . god : http : godrb.com .. . angel : https : github.com jamwt Angel .. . supervisor : http : supervisord.org .. . One the monitor is set up you can just send a HUP signal to your application whenever you want to restart and the monitoring app will just bring it back up . I m a big fan of Fabric http : fabric.readthedocs.org en latest tutorial.html for deployment automation . You can handle remote synching restart etc . all using fabric . Hope this helps . Comment : Thanks this is great . But how do I start my app Also is there alternative to using cabal-dev the damn thing doesn t work on windows Comment : You start by just running the executable - the myapp.exe that s created after cabal s compilation . If you don t want to use cabal-dev just use cabal itself . You ll get the same result without sandboxing . Comment : What kind of load balancer do you run", "Question : I begin learning snap-framework . I m trying to render an html file and layout html file template in a simple way . That is to say I have a shared html file I want to use as a template one for all the page in my website . How can I do that And a similar question how can I render an html file UPDATE : .. . .. . I don t want to add a new level of abstruction . Is there any to avoid using Heist Comment : Did you look at this page http : snapframework.com docs tutorials heist Comment : @Bakuriu I don t want to add a new level of abstruction . Is there any to avoid using Heist .. . Answer : The simplest way to serve static files is with serveFile http : hackage.haskell.org package snap-core-0.9.8.0 docs Snap-Util-FileServe.html v : serveFile . You would probably have something like this in your routes : .. . .. . This makes it so that when a user goes to http : yoursite markup the file mymarkup.html in whatever directory you ran the app from gets served . If you are trying to serve many different HTML files a better solution is serveDirectory http : hackage.haskell.org package snap-core-0.9.8.0 docs Snap-Util-FileServe.html v : serveDirectory . You might use it like this : .. . .. . This makes it so that when a user goes to http : yoursite static mymarkup.html the file html mymarkup.html gets served . For your question of how to make one file be the template for all your pages that is precisely what Heist does for you There are certainly ways to avoid using Heist but you will probably be reinventing a lot of what Heist does for you . At the basic level that you re asking about Heist is pretty straightforward . All valid HTML files are valid Heist templates . I would recommend reading through the tutorial http : snapframework.com docs tutorials heist like Bakuriu mentioned . I believe Heist s apply tag is almost exactly what you re looking for . Comment : can I use Heist with any other web framework say Scotty Comment : Yes . Heist was specifically designed to not depend on anything from Snap . However you ll probably have to write a bit more infrastructure code with other frameworks than you would have to do with Snap . For instance this package http : hackage.haskell.org package happstack-heist has the small amount of infrastructure code that makes it easier to use Heist with Happstack .", "Question : I have started learning a bit about the snap-framework I found some tutorial on blaze snap and want to build a little web-app . The tedious thing when changing code in the html section is that I have to Ctrl+C the existing Snap server then cabal run to restart it again is there an easier way to do that . .. . .. . I found the following util watchr http : github.com owainlewis watchr which allows for running a command after a certain file is being changed - which is definitely useful but I don t quite know how to apply it in this situation . Get a minimal working example - use the snap init barebone command and substitute the src Main.hs with .. . .. . and make sure to have snap-blaze and blaze-html in the corresponding .cabal file . I also saw that there is a package snap-loader-dynamic which sounds promising but I could not build the application for the dependencies required and the dependencies in the cabal sandbox had different hash values . I saw that there exists stack to eventually replace cabal in the long run but I have not had enough time to check wether stack could do automatic rebuild restart . If the environment where I am developing is relevant : Linux Mint + cabal-sandbox . Comment : Just to double-check : does cabal-install -fdevelopment as suggested in the quick-start guide http : snapframework.com docs quickstart work for you Comment : one moment I ll have to try Comment : I do not know why it is building -but as I wrote I tried using the snap-loader-dynamic nevertheless I tried modifying the Site.hs from the freshly built app and I also modified the login.tpl just added a word but it did not recompile . - To not make sure I ll be a fool - i opened the site in chrome - and then it recompiled - lazyness - bit me again the recompilation only happens when the site is requested - thanks Comment : could you make your comment an answer - I would like to accept it .. . Answer : Snap itself comes with this capability built-in . Assuming you initialized your project with snap init just build your project by .. . .. . and it will reload itself on the fly as necessary . Comment : Also see this faq entry http : snapframework.com faq how-do-i-run-my-app-in-development-mode .", "Question : I ve installed Snap Haskell on my production Ubuntu server on EC2 and checked-out my project - but how do I run it I mean locally I run it from command-line : .. . .. . Does snap come with it s own web-server it looks like it http : hackage.haskell.org package snap-server-0.7.0.1 and if so how do I go about configuring it to run as a daemon of some sort Any tips Edit 2 : .. . .. . On the wiki http : snapframework.com docs tutorials snap-api they say : .. . .. . snap-server is an HTTP server library that supports the interface defined in snap-core . While here the haskell wiki about Deployment Backend options for your haskell web code says that Snap : .. . .. . includes its own server . see Web Frameworks http : www.haskell.org haskellwiki Web Frameworks .. . .. . But HOW How would I run it s own server Why must I know about deployment of the damn thing if I am just interested in programming.. . .. . .. . Edit : related question : Deploy Haskell code that uses the Snap Framework http : stackoverflow.com questions 7539450 deploy-haskell-code-that-uses-the-snap-framework Comment : When you run project-name -p 8000 is your app not just running on port 8000 as you requested Comment : If you cannot run it as daemon run it daemon like with screen . e.g screen -S snapd -d -m -L project-name -p 8000 You then can stop the process via screen -r snapd -X quit Comment : @Sarah Yes but in production when I log-out it terminates my session and all processes in it . Comment : @DanielLeschkowski I probably can run it as daemon I just don t know how.. . .. . Answer : Ok so after some digging http : stackoverflow.com a 7544384 74865 and asking http : serverfault.com questions 404251 how-to-properly-configure-a-web-service-ubuntu-12-04 here is what I came up with . Big idea .. . .. . Compile your Snap application into a binary and then run it as a service with the help of upstart http : upstart.ubuntu.com cookbook . Step by Step .. . .. . 1 . Compile your webapp . For the sake of this example we ll assume the webapp is at home john webapps mysite : .. . .. . cd home john webapps mysite .. . cabal-install .. . .. . .. . Preprocessing executable mysite for mysite-0.1 .. . Installing executable s in home john .cabal bin .. . .. . .. . As we can see the the binary is placed in home john .cabal bin . You may move it to any place you like but we ll leave it there . 2 . Create a log in your application folder otherwise snap will complain : .. . .. . mkdir home john webapps mysite log .. . .. . .. . 3 . Now we will create a service that will run our webapp . To do so we will use Ubuntu s service facility called upstart http : upstart.ubuntu.com cookbook . a We name our service simply by creating a conf file with the desired name in the etc init directory . Let s call it mysite : .. . .. . sudo vi etc init mysite.conf .. . .. . .. . b Now let s add the description of what our service is : .. . .. . start on startup .. . chdir home john webapps mysite .. . exec home john .cabal bin mysite -p 80 .. . .. . .. . First we say that the service should run on startup or on bootup of the system . Second since snap needs it s snaplets and other static resources like the log directory we created earlier - we tell the service to run inside our project s directory . Lastly we specify the binary that actually will run as a service : home john .cabal bin mysite . We pass the -p 80 parameter to the snap webserver to make it run on port 80 . Note : you have to disable all apache and nginx servers so that they don t take up that port any more .. . .. . 4 . Done . You can check if it is running and start it manually if you need to : .. . .. . initctl list grep mysite .. . initctl start mysite", "Question : I want to implement custom logging in my Snap application so that I can pass my logs as JSON to Logstash Kibana however I cannot figure out how to override the default logging behaviour . Reading the code I m pretty sure that the logA A for Access log method is what is providing this logging format implicitly https : github.com snapframework snap-server blob master src Snap Http Server.hs L126 . But I m not sure how to override it . How do you override the custom logging in the snap-framework Is it impossible Will I need to raise a PR Cheers . .. . Answer : I have asked the Snap Core team if this was possible and the answer is : no you cannot configure custom logging . Raised a feature request as a result which you can view here https : github.com snapframework snap-server issues 62 issuecomment-67252909 .", "Question : I m just playing with the Snap framework and wanted to see how it performs against other frameworks under completely artificial circumstances . What I have found is that my Snap application tops out at about 1500 requests second the app is simply snap init snap build . dist app app ie . no code changes to the default app created by snap : .. . .. . I then fired up a Grails application and it seems like Tomcat once the JVM warms up can take a bit more load : .. . .. . I m guessing that a part of this could be the fact that Tomcat seems to reserve a lot of RAM and can keep cache some methods . During this experiment Tomcat was using in excess of 700mb or RAM while Snap barely approached 70mb . Questions I have : .. . .. . Am I comparing apples and oranges here What steps would one take to optimise Snap for throughput speed .. . .. . Further experiments : .. . .. . Then as suggested by mightybyte http : stackoverflow.com users 527460 mightybyte I started experimenting with +RTS -A4M -N4 options . The app was able to serve just over 2000 requests per second about 25 increase . I also removed the nested templating and served a document same size as before from the top level tpl file . This increased the performance to just over 7000 requests a second . The memory usage went up to about 700MB . .. . Answer : I m by no means an expert on the subject so I can only really answer your first question and yes you are comparing apples and oranges and also bananas without realizing it . First off it looks like you are attempting to benchmark different things so naturally your results will be inconsistent . One of these is the sample Snap application and the other is just a Grails application . What exactly are each of these things doing Are you serving pages Handling requests The difference in applications will explain the differences in performance . Secondly the difference in RAM usage also shows the difference in what these applications are doing . Haskell web frameworks are very good at handling large instances without much RAM where other frameworks like Tomcat as you saw will be limited in their performance with limited RAM . Try limiting both applications to 100mb and see what happens to your performance difference . If you want to compare the different frameworks you really need to run a standard application to do that . Snap did this with a Pong benchmark . The results of an old test from 2011 and Snap 0.3 can be seen here http : snapframework.com blog 2010 11 17 snap-0.3-benchmarks . This paragraph is extremely relevant to your situation : .. . .. . If you re comparing this with our previous results you will notice that we left out Grails . We discovered that our previous results for Grails may have been too low because the JVM had not been given time to warm up . The problem is that after the JVM warms up for some reason httperf isn t able to get any samples from which to generate a replies sec measurement so it outputs 0.0 replies sec . There are also 1000 connreset errors so we decided the Grails numbers were not reliable enough to use . As a comparison the Yesod blog has a Pong benchmark from around the same time that shows similar results . You can find that here http : www.yesodweb.com blog 2011 03 preliminary-warp-cross-language-benchmarks . They also link-to their benchmark code if you would like to try to run a more similar benchmark it is available on Github https : github.com yesodweb benchmarks .", "Question : is there a simple example on enabling HTTPS in a Snap server I am not that into OpenSsl and its usage with Snap . Thanks Comment : Have you looked at snapframework.com faq how-do-i-enable-ssl http : snapframework.com faq how-do-i-enable-ssl Where are you stuck Comment : I read it yes . I thought it will be something more programmatic right from the server written in the app using one of these functions https : hackage.haskell.org package snap-server-0.9.5.1 docs Snap-Http-Server-Config.html Comment : @JPMoresmau The official documentation on that is misleading because it assumes you are using the internal cli argument parser via commandLineAppConfig which might or might not be true depending on your project . .. . Answer : JP Moresmau showed you how to enable it from the command-line but doing the same programatically is just as easy . The function that starts Snap s main loop takes a configuration parameter as the first argument as you can see in this bit of documentation https : hackage.haskell.org package snap-server-0.9.5.1 docs Snap-Http-Server.html httpServe . You can simply call defaultConfig from the Snap.Http.Server.Config https : hackage.haskell.org package snap-server-0.9.5.1 docs src Snap-Internal-Http-Server-Config.html defaultConfig module and then call setSSLPort setCert and setSSLKey on it . Then you can pass this new config to httpServe as the first argument . If you used snap init you can find all the relevant code in your src Main.hs . As you can see here https : hackage.haskell.org package snap-server-0.9.5.1 docs src Snap-Internal-Http-Server-Config.html extendedCommandLineConfig the default config is created from the command-line using a description of options https : hackage.haskell.org package snap-server-0.9.5.1 docs src Snap-Internal-Http-Server-Config.html optDescrs . So changing the defaultConfig is exactly the same as passing commandline arguments . What I find slightly odd is that there s no defaultSSLConfig that generates a self-signed certificate so you can try SSL quickly . Also it s odd the certificate and keys are of type FilePath . Maybe it s a good pull request for the Snap team to check", "Question : I am using Snap framework to prototype a web application . I am trying to use Snap.Util.FileUploads.handleMultiPart to upload a file immediately process it using iteratee and at the same time display the progress message on the same page . It is possible to hook Data.Enumerator.printChunks to debug progress on the console . I could not figure out how to display the progress on the same page while processing the file-upload . How can a progress message be displayed using handleMultiPart during file-upload Also handleMultiPart takes PartInfo - Iteratee ByteString IO a to handle the file-upload . Should handleMultiPart rather take MonadIO m PartInfo - Iteratee ByteString m a to make it simpler .. . Answer : In general I don t know if it s possible to display progress on the client-side via pushing an HTML response while the file is being uploaded . To the best of my knowledge web apps that do this are typically using some JavaScript API or Flash widget to do so . Certainly it s not possible using handleMultiPart . Streaming to the console is another matter however -- you can easily provide an enumeratee that logs chunk information or updates an MVar for an alternative and then passes control downstream . This will be less brain-bending in snap 1.0 nearing release which will use io-streams which are much easier to think about . Finally handleMultiPart works over IO because to do otherwise would require the run action for the monad i.e the inverse lift from m a - IO a . There are ways to do this kind of thing but snap 1.0 doesn t do them sorry --- and in snap 1.0 the issue will be moot . Comment : It would be worth to wait for Snap 1.0 . Hope it will be released soon .", "Question : Using Hakyll that uses snap i started working on a routing server . Given the following code from their tutorials i can see the routing but i would like to have some different applications on their own subdomains like oneapp.mysite.com . Is this possible using snap or any other Haskell server .. . Answer : I haven t done this before but this is what I would try : .. . .. . Use the wrapSite function to conditionally use the routes for your subdomain and you can test which subdomain was requested with fmap rqServerName getRequest .. . .. . http : hackage.haskell.org packages archive snap 0.11.0 doc html Snap-Snaplet.html g : 7 http : hackage.haskell.org packages archive snap-core 0.9.2.2 doc html Snap-Core.html g : 5 http : hackage.haskell.org packages archive snap-core 0.9.2.2 doc html Snap-Core.html g : 10 Comment : thank you for suggestion it seem to make sense theoretically but i don t know how to use snaplets . Comment : You don t have to use snaplets to use this . Just use rqServerName and getRequest . Comment : also i don t have a clue about the context in that they have to be . The most feedbacker stuff on vhosts is this one http : www.haskellshapes.com haskell-web-programming-ii but it only emits status ByteString messages any further implementation using forwarding to routes being abolished by the necessity for vhosts to receive an Application then everything is broken . This is not in Snap i know but is the most expressive example found out there . So please if you have a hint on how to do it in Snap please write a line . Or i m too new to Haskell . maybe", "Question : I have started learning a bit about the snap-framework I found some tutorial on blaze snap and want to build a little web-app . The tedious thing when changing code in the html section is that I have to Ctrl+C the existing Snap server then cabal run to restart it again is there an easier way to do that . .. . .. . I found the following util watchr http : github.com owainlewis watchr which allows for running a command after a certain file is being changed - which is definitely useful but I don t quite know how to apply it in this situation . Get a minimal working example - use the snap init barebone command and substitute the src Main.hs with .. . .. . and make sure to have snap-blaze and blaze-html in the corresponding .cabal file . I also saw that there is a package snap-loader-dynamic which sounds promising but I could not build the application for the dependencies required and the dependencies in the cabal sandbox had different hash values . I saw that there exists stack to eventually replace cabal in the long run but I have not had enough time to check wether stack could do automatic rebuild restart . If the environment where I am developing is relevant : Linux Mint + cabal-sandbox . Comment : Just to double-check : does cabal-install -fdevelopment as suggested in the quick-start guide http : snapframework.com docs quickstart work for you Comment : one moment I ll have to try Comment : I do not know why it is building -but as I wrote I tried using the snap-loader-dynamic nevertheless I tried modifying the Site.hs from the freshly built app and I also modified the login.tpl just added a word but it did not recompile . - To not make sure I ll be a fool - i opened the site in chrome - and then it recompiled - lazyness - bit me again the recompilation only happens when the site is requested - thanks Comment : could you make your comment an answer - I would like to accept it .. . Answer : Daniel s answer is definitely the right one . However if you want reloading that doesn t involve code changes that is also possible too . See this blog post http : devblog.soostone.com posts 2013-06-17-snap-template-reloading.html for an example . Comment : Thanks - I will give this blogpost definitely some attention", "Question : I am new Snap and Haskell web development I want to parse the request body to Haskell data value . I have tried the example from this https : github.com raimohanska snap-skeleton blob master src Examples Restful.hs . It seems to work But wondering if there is any standard way to do this in Snap world . Comment : What have you tried so far Comment : I have Edited the question . Thanks Comment : the example is pretty neat - what do you mean with standard way Comment : In Java world there is Jackson to this . Is there any library that does this in Haskell world Comment : does what - parse JSON The example is using it look for AESON .. . Answer : Thanks to Carsten . Found out that the Aeson library does exactly this . https : hackage.haskell.org package aeson-0.6.1.0 docs Data-Aeson.html", "Question : I m just playing with the Snap framework and wanted to see how it performs against other frameworks under completely artificial circumstances . What I have found is that my Snap application tops out at about 1500 requests second the app is simply snap init snap build . dist app app ie . no code changes to the default app created by snap : .. . .. . I then fired up a Grails application and it seems like Tomcat once the JVM warms up can take a bit more load : .. . .. . I m guessing that a part of this could be the fact that Tomcat seems to reserve a lot of RAM and can keep cache some methods . During this experiment Tomcat was using in excess of 700mb or RAM while Snap barely approached 70mb . Questions I have : .. . .. . Am I comparing apples and oranges here What steps would one take to optimise Snap for throughput speed .. . .. . Further experiments : .. . .. . Then as suggested by mightybyte http : stackoverflow.com users 527460 mightybyte I started experimenting with +RTS -A4M -N4 options . The app was able to serve just over 2000 requests per second about 25 increase . I also removed the nested templating and served a document same size as before from the top level tpl file . This increased the performance to just over 7000 requests a second . The memory usage went up to about 700MB . .. . Answer : The answer by jkeuhlen makes good observations relevant to your first question . As to your second question there are definitely things you can play with to tune performance . If you look at Snap s old raw result data https : github.com snapframework snap-benchmarks blob master results.txt L182 you can see that we were running the application with +RTS -A4M -N4 . The -N4 option tells the GHC runtime to use 4 threads . Note that you have to build the application with -threaded to do this . The -A4M option sets the size of the garbage collector s allocation area . Our experiments showed that these two seemed to have the biggest impact on performance . But that was done a long time ago and GHC has changed a lot since then so you probably want to play around with them and find what works best for you . This page https : downloads.haskell.org ghc latest docs html users guide runtime-control.html has in-depth information about other command-line options available to control GHC s runtime if you wish to do more experimentation . A little work was done last year on updating the benchmarks . If you re interested in that look around the different branches in the snap-benchmarks repository https : github.com snapframework snap-benchmarks . It would be great to get more help on a new set of benchmarks .", "Question : I m creating simple web application using haskell . First I used Snap in front and I was able to run the application but I want to add user input to the application . I couldn t find a way to get user input parameters to the function . How might I do that Other thing I also used Happstack framework I can not import Happstack.Server . I use cabal installation configure Happstack . It was successfully installed but when I try to import to Happstack.Server it gives me an error : .. . .. . If I run my program using ghc --make HelloWorld.hs -v I get : Comment : While we are at web frameworks have you checked out yesod My personal opinion is that it looks around 100x more promising than snap and happstack together . Why Because it s more active I see daily pushes and blog posts every week for Yesod . Link : yesodweb.com http : www.yesodweb.com Comment : 1 ghc-pkg list 2 what if : ghci import Happstack.Server Comment : thanxx for the reply I tried with yesod @Tarrasch I can not install yesod that give an configuration error when I try to install that Comment : thaxx for the reply @voidizard I did not get what you have said here I tried with 1 one it shows all ghci packages what is the 2 Comment : Look at my answer below . Seems the cabal packages are messed -- it s happen quite often . I use cabal-dev to make new projects in a sanbox without affecting global packages . If you do not want to deal with sandbox just try to sweep all packages out install cabal and then install Happstack . It should work then . But if you do not want to do it often then use cabal-dev or capri .. . Answer : Snap s getParam http : snapframework.com docs latest snap-core Snap-Types.html v 3agetParam function allows you to get HTTP request parameters specified by the user . These can come in the post body of a form submission or from the query-string . For example consider the following code : .. . .. . If I request the url myapp.com mypage foo bar then I will see bar as the response . If I leave off the foo bar part then it will return no value . Comment : thanxxx I have implemented this one different way", "Question : I d like to implement streaming of large-data in both directions with the Snap server . To explore the possibilities I created a sample program that has two endpoints - reading and writing . There is a very simple internal buffer that holds one ByteString and whatever is written to the writing endpoint appears in the reading one . Currently there is no way how to terminate the stream but that s fine for this purpose . Then I run in different terminals .. . .. . and .. . .. . But the writing part fails with an exception escaped to toplevel : Too many bytes read . This is obviously an instance of TooManyBytesReadException but I couldn t find where it s thrown . Writing smaller amount of data like 1MB works as expected . My questions are : .. . .. . 1 . Where how to fix the reading limit 2 . Will this stream data without loading the whole POST request in memory If not how to fix it .. . Answer : It will work if you add any content-type that s not application x-www-form-urlencoded to your write e.g . : .. . .. . This bit https : github.com snapframework snap-server blob 0.9-stable src Snap Internal Http Server.hs L602 in Snap does something like .. . .. . and x-www-form-urlencoded is curl s default . Comment : Probably application octet-stream would be a more appropriate content-type .", "Question : The default behavior for an uncaught runtime exception in Snap is to display a white page containing the error . This is great for development mode but really terrible for production . I have my application setup to catch the exception and log the error so that displays something more attractive to the user when something bad happens . How can I change it so that this only happens when I am in production mode .. . Answer : Snap provides the getEnvironment http : hackage.haskell.org package snap-0.14.0.5 docs Snap-Snaplet.html v : getEnvironment function for this purpose . This function gets the environment passed to runSnaplet http : hackage.haskell.org package snap-0.14.0.5 docs Snap-Snaplet.html v : runSnaplet . The environment defaults to devel but can be changed at runtime with the -e command-line option . If you run your application like this : .. . .. . Then getEnvironment will return prod . You can use that like this : Comment : I have no reason to display naked exceptions when the application is compiled without the -f development flag so what I m looking for is an answer that checks that flag not the one passed in when running the application . Comment : That function just gets the environment string set by the user . What you do with it is up to you . Why not just display your nice looking exception page all the time If you need more detailed information for debugging purposes you can write it to stdout or a log file . Comment : Logging the error would require tailing the log the entire time I am doing development . That s rather inconvenient since I have to refresh my browser to get it to recompile . Displaying it in the browser is the most efficient way to obtain the error .", "Question : My self-directed javascript study has finally led me to reading libraries where I found the following snippet truncated for brevity . I m using Firefox with firebug on a windows apache server xampp . I figured the snippet below would suffice but if anyone needs it the entire library can be found here : snap.svg.js on github https : github.com adobe-webplatform Snap.svg tree master dist .. . .. . .. . var Snap function root .. . Snap.version 0.4.0 .. . .. . function Snap w h\tcan be either width height OR .. . if w .. . if w.nodeType deterimines if parameter is a dom element .. . return wrap w .. . .. . if is w array Snap.set deterimines if parameter is an array .. . return Snap.set.apply Snap w .. . .. . if w instanceof Element deterimines if parameter is a Snap.Element .. . return w .. . .. . if h null by elimination determines if parameter is a dom element id . w glob.doc.querySelector String w .. . return wrap w .. . .. . .. . .. . numerous public and private properties and methods .. . . . . glob.win.Snap Snap .. . return Snap .. . window this .. . .. . Firebug shows the Snap object in the window context before instantiating any user objects . I was wondering exactly what mechanism was injecting the Snap object into the DOM . That s when I noticed the var Snap . Initially I thought that was it . But since it didn t break the app when I changed the variable name or even deleted it I became confused . Further investigation resulted in the discovery at the bottom of the iife.. . specifically glob.win.Snap Snap . Since window is being passed into the iife it seems this is what s actually creating the Snap object in the window . Changing the name to glob.win.Snappy confirmed this . I m still learning so please correct me if I m wrong . I m trying to understand what s going on with this library . It seems that the function Snap is being injected to the window context via the glob.win.Snap assignment . I don t see that the var Snap at the top or the return Snap are doing anything . In fact I can rem them out and everything seems to function fine . So my first question : Do those two lines serve some function I m not seeing A secondary question is : What does the this fallback parameter refer to My limited understanding of Snap is that it is always used within the window namespace so wouldn t this always be the window Just when I think I m beginning to make the paradigm shift from classical to prototypical language I run across code like this and it sets me back . I d really appreciate some insight . .. . Answer : I had a look at the referenced source code here a more condensed version : .. . .. . It seems that the function Snap is being injected to the window context via the glob.win.Snap assignment . I don t see that the var Snap at the top or the return Snap are doing anything . You are correct the declaration of var Snap .. . and assignment via return Snap is superfluous since that variable lives in the global-scope i . e . the Window object and is already declared by glob.win.Snap Snap .. . .. . I assume they just keept that var declaration since it is pretty much standard when using the class pattern : .. . .. . A secondary question is : What does the this fallback parameter refer to My limited understanding of Snap is that it is always used within the window namespace so wouldn t this always be the window In some JavaScript environments the root object is not called window e.g . global in node.js . window this will evaluate to the root object no matter what it is called . You will see such dependency injections often in JavaScript modules . See https : carldanley.com js-module-pattern for more . However it seems that this library will not run if there is no window object available due to the var glob win : root.window .. . assignment . They might just have kept the this in there because it is part of a standard module-pattern ." ] }
[ "yes-answer-long", "yes-answer-short" ]
haskell
UNK_RELATION
pgmagick@magick++@42
pgmagick -- pgmagick is a graphicsmagick @placeholder binding for python .
{ "confidence": [ 56.68439483642578, 56.51910400390625, 51.227020263671875, 50.14309310913086, 48.71556091308594, 48.67935562133789, 48.509090423583984, 44.36647415161133, 43.92356872558594, 43.92356872558594, 43.92356872558594, 43.92356872558594, 43.08100891113281, 42.35273361206055, 42.35273361206055, 41.049034118652344, 41.049034118652344, 40.840858459472656, 40.38187026977539, 40.38187026977539, 39.744590759277344, 39.24251937866211, 38.67575454711914, 38.67575454711914, 37.58208465576172, 37.5073356628418, 37.5073356628418, 36.51210021972656, 35.63390350341797, 35.61122131347656, 35.61122131347656, 35.61122131347656, 35.61122131347656, 35.19291305541992, 34.66234588623047, 34.570350646972656, 34.30373764038086, 32.73668670654297, 32.69148254394531, 32.35749435424805, 31.596765518188477, 29.81694793701172, 28.113784790039062, 27.841670989990234, 27.561973571777344, 27.05679702758789, 26.546733856201172, 25.489742279052734, 24.952579498291016, 24.190048217773438, 22.981714248657227, 22.220008850097656, 19.787403106689453, 18.93946647644043, 18.233997344970703, 16.926513671875, 16.120128631591797, 16.006444931030273, 15.72482681274414, 15.443342208862305, 15.359461784362793, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.12790298461914, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695 ], "content": [ "According to the pgmagick docs boost141 and your GraphicsMagick libraries should be supported : packages.python.org pgmagick tutorial.html requirements http : packages.python.org pgmagick tutorial.html requirements", "Problem .. . .. . I am trying to install pgmagick the Python interface to GraphicsMagick .", "I ve been using pgmagick with ImageMagick rather than GraphicsMagick as the backend .", "I m using the pgmagick python api .", "Question .. . .. . What is a good way to use flood-fill with the Graphicsmagick command-line or its pgmagick wrapper for python", "I also tried homebrew-pgmagick https : github.com hhatto homebrew-pgmagick .", "Im trying to install pgmagick on CentOS .", "I can ssh into it run python and successfully import numpy and pgmagick .", "Look at how other distributions build packages for pgmagick .", "I m using pgmagick to generate a circular thumbnail .", "Any ideas on making this border smoother using pgmagick", "The code underlying pgmagick is the same as that used by the commandline .", "Turns out the only way to get this working was to : .. . .. . remove all the pre-compiled boost rpms from the system .. . remove all the pre-compiled GraphicsMagick rpms from the system .. . compile boost-1.49.0 manually using . configure --prefix usr --enable-shared yes .. . reinstall GraphicsMagick-1.3.14 GraphicsMagick-c++-1.3.14 GraphicsMagick-devel-1.3.14 and GraphicsMagick-c++-devel-1.3.14 via yum .. . clone the pgmagick repository from bitbucket .. . run python setup.py install again within the pgmagick directory", "After i run pip install pgmagick i get some errors .", "If anyone has any suggestions on that or how to extend pgmagick to achieve it I d be elated .", "I m trying to install pgmagick library on windows .", "I am trying to use pgmagick on Google AppEngine .", "File Users user app pgmagick pgmagick init .py line 1 in from pgmagick import pgmagick ImportError : cannot import name pgmagick .. . .. . Am I missing some additional pgmagick libs and where can I get them from", "I m not having much success when attempting building pgmagick on CentOS 5.6 .", "The pgmagick homepage mentions using libboost-python1.40-dev on Ubuntu .", "Instead of .. . .. . Do this : .. . .. . You could try other sizes and decide which is the smallest that satisfies you e.g . .. . .. . This commandline works on both GraphicsMagick gm convert and ImageMagick convert .. . .. . Looking at the pgmagick documentation at http : pgmagick.readthedocs.org en latest cookbook.html scaling-a-image it is not clear that pgmagick offers resize .", "I recommend you use the precompiled binary packages from the Unofficial Windows Binaries for Python Extension Packages http : www.lfd.uci.edu gohlke pythonlibs pgmagick as mentioned in the pgmagick http : pypi.python.org pypi pgmagick web page instead of trying to compile from source which will be quite a complicated process .", "I am installing numpy and pgmagick python libraries on it via .ebextensions which seems to be successful .", "But when I attempt to import these from django view python script it fails with no module named pgmagick error .", "pgmagick apparently doesn t make it super easy to access the blob contents of the edited image .", "The wxPython library can open PNG files itself without the need for pgmagick .", "I suspect that pgmagick isn t returning a buffer object i.e .", "I ve installed the following via yum : .. . .. . However whenever I try to build pgmagick I get the following error : .. . .. . I ve also tried installing boost141 boost141-devel and boost141-python but pgmagick won t build against those libraries .", "I went to website and download it but it installs just the software and when i try to install pgmagick like this : pip install pgmagick .. . .. . there is an error that i need magick++ : .. . .. . thanks", "I was wondering if it possible to perform low-level pixel manipulations on an image via pgmagick .", "Here s the pgmagick code I used to achieve that : .. . .. . This works but the surrounding white border is fairly distorted with choppy edges -- not production ready .", "I leave it as a simple exercise for the reader to convert this solution from commandline to pgmagick see more below .", "pgmagick does however allow you to specify the filter type as in .. . .. . which should be equivalent to -resize and is what you want .", "pgmagick is a thin Python wrapper for a C++ frontend so you have to dig through the layers of interface to figure out how to make it work .", "In pgmagick you initialize an image like this : .. . .. . I will be operating on files stored remotely on S3 and would rather not temporarily store them on disk .", "@user1427661 - looking over the docs I found this example http : pythonhosted.org pgmagick cookbook.html scaling-a-jpeg-image which calls the Blob method class on the results of a Python open command .", "Only i could not install pgmagick - here is error .. . .. . ...........................................................................................................Than i installed sorl-thumbnail nothing happened and tryed again -", "I have dropped pgmagick 0.5.10 directory containing init .py version.py api.py in main AppEngine directory .", "Using subprocess is an option but also it s quite a pain since the app has been developed using pgmagick directly - a lot of code would need to be reworked .", "On OSX : brew install graphicsmagick and brew install boost-python", "In particular I would like to mimic the functionality found in the C++ GraphicsMagick API shown here : .. . .. . http : www.graphicsmagick.org Magick++ Image.html low-level-image-pixel-access .. . .. . When I try the following : .. . .. . I get an error like the following : .. . .. . What would be the equivalent functionality in pgmagick", "I can deploy the app successfully on Google AppEngine but it fails on the import pgmagick since init .py is trying to import pgmagick which is not present .", "I fixed it with except Exception as e Than i tryed again - it showed .. . .. . ..................................................................................................................................................................................... . Before installing sorl-thumnail i had to install some requirements as redis Pillow pgmagick and Wand .", "Traceback most recent call last : File C : Python34 pgmagick.py line 1 in import pgmagick as pg File C : Python34 pgmagick.py line 48 in remove background img File C : Python34 pgmagick.py line 41 in remove background img pg.Image filename AttributeError : module object has no attribute Image .. . .. . what is wrong", "In any case here are the tweaks I needed to make to get your code to work : .. . .. . use Color rather than RGBColor .. . .. . from pgmagick import Color .. . color Color white .. . .. . .. . provide two more 0s when instantiating the Geometry object : .. . .. . from pgmagick import Geometry .. . geo Geometry 0 0 1 1 .. . .. . .. . rather than passing two Color arguments to floodFillColor call fillColor first and then call floodFillColor like this : .. . .. . img.fillColor color .. . img.floodFillColor geo color", "Most of the installation procedures I have tried have finished without errors but on import pgmagick I get an .. . .. . Things tried .. . .. . I first tried this tutorial http : www.pyimagesearch.com 2015 04 27 installing-boost-and-boost-python-on-osx-with-homebrew .", "I m following the official page : http : pypi.python.org pypi pgmagick .. . .. . From there i can notice that i need to install first easy install pip boost and graphicsMagic .", "In this page i found easy install : http : blog.troygrosfield.com 2010 12 18 installing-easy install-and-pip-for-python In this page i can find pip and boost : http : www.lfd.uci.edu gohlke pythonlibs pgmagick .. . .. . But i can t figure out how to install magick++ .", "You are probably missing the GraphicsMagick-c++-devel package available from the EPEL http : fedoraproject.org wiki EPEL repository .", "Other symptoms .. . .. . In Terminal I get command not found for all of graphicsmagick boost boost-python so I suppose something is not working properly in the Homebrew installation of these .", "pythonware.com products pil http : www.pythonware.com products pil Or at using the subprocess module to execute GraphicsMagick directly", "I would like to use graphicsmagick with wxpython to make an interactive image editor .", "Python 3.4 with Python 2 syntax", "Setup .. . .. . OS X 10.10.5 .. . Python 3.4.4 python -V -- Python 3.4.4 : : Anaconda 2.3.0 x86-64", "Not a direct answer but have you looked at the Python Imaging Library", "Namely in python 3 that line in question must be written except Exception as e :", "I just tried to build the extension on my Scientific Linux 6.2 installed boost graphics-magick dependencies from repo downloaded source did python setup.py build and didn t have any issues there .", "I would recommend taking a look at the Python Imaging Library http : effbot.org imagingbook PIL .. . .. . e.g .", "Try to use pure python version if it exists also you can use Managed VMs to run python with custom C libs .", "Do I need additional permissions or something for django view scripts to access all the python libraries installed on the Elastic Beanstalk env", "In fact you can use the Python Imaging Library with wx too .", "After i checked log file this is what i ve got : .. . .. . Am i missing something", "How to make it work", "Just had this myself .", "For anyone visiting via Google from the future you need two additional packages first :", "This should be the accepted answer .", "Thank you", "Thanks for adding the Redhat-based equivalent", "Is there any way to open an image file from a URL instead", "When I try to simply replace the file name with the URL I get an error : Unable to open file . .. . .. . I d like to be able to use a URL .", "The easiest way in my mind is to use the awesome requests http : docs.python-requests.org en latest library .", "You can fetch each image from the server one at a time then open it with Image : .. . .. . And that s all there is to it .", "Authentication is of course not required but may be necessary depending on your S3 setup .", "Have fun", "Ah but this won t work unfortunately .", "pgmagick s Image is looking for a filename which it then uses to open the file .", "In the above example the Image class will quite unsuccessfully scan the UNIX filesystem for a file that matches the blob contents passed in .", "@user1427661 - so is there no way to open raw data directly", "Pillow can do that just fine - maybe it would work better for your needs", "I just updated my example above why don t you see if it works now", "Ahah", "That did the trick .", "Now the only question is how to write the file back to S3 .", "what can i solve it", "Background .. . .. . So far this is what I have but its saying that the signatures do not match : .. . .. . Extra .. . .. . Also if you know of a better way that I can manipulate graphics from a Python application or the windows command-line I m all ears .", "Any suggestions on how I can fix the problem or further diagnose the issue", "@RolandSmith unfortunately PIL doesn t have the features we require .", "Maybe specific patches are needed", "what version of CentOS are you using", "Running CentOS5.6", "It looks like versions incompatibility problem try using boost-1.34", "CentOS doesn t seem to have boost-1.34 available .", "Would it be best to install this manually", "I d just use some non-official repo like this one : rpm.pbone.net index.php3 stat 4 idpl 8359010 dir centos 5 com http : rpm.pbone.net index.php3 stat 4 idpl 8359010 dir centos 5 com boost-1.34.1-11.1.x86 64.rpm.html", "Generally I don t recommend installing packages from non-official repos .", "You should only do that if you re willing to take the risks involved .", "When you ran configure I m assuming you executed it as . configure --enable-shared yes note the parameter .", "If you did that like the tutorial says I see no reason why it shouldn t be working .", "If you didn t this may help ." ] }
{ "confidence": [ 75.06461334228516, 72.1988754272461, 70.635986328125, 69.15216827392578, 66.67047882080078, 65.05689239501953, 64.87255859375, 64.18048095703125, 61.98518753051758, 58.173988342285156, 57.504859924316406, 56.88813781738281, 56.756954193115234, 53.997825622558594, 52.59735107421875, 50.984527587890625, 50.97480773925781, 50.97480773925781, 45.04616165161133, 12.36292552947998 ], "content": [ "Question : I m not having much success when attempting building pgmagick on CentOS 5.6 . I ve installed the following via yum : .. . .. . However whenever I try to build pgmagick I get the following error : .. . .. . I ve also tried installing boost141 boost141-devel and boost141-python but pgmagick won t build against those libraries . Any suggestions on how I can fix the problem or further diagnose the issue Comment : Not a direct answer but have you looked at the Python Imaging Library pythonware.com products pil http : www.pythonware.com products pil Or at using the subprocess module to execute GraphicsMagick directly Comment : @RolandSmith unfortunately PIL doesn t have the features we require . Using subprocess is an option but also it s quite a pain since the app has been developed using pgmagick directly - a lot of code would need to be reworked . Comment : Look at how other distributions build packages for pgmagick . Maybe specific patches are needed The pgmagick homepage mentions using libboost-python1.40-dev on Ubuntu . Comment : what version of CentOS are you using I just tried to build the extension on my Scientific Linux 6.2 installed boost graphics-magick dependencies from repo downloaded source did python setup.py build and didn t have any issues there . Comment : Running CentOS5.6 .. . Answer : Turns out the only way to get this working was to : .. . .. . remove all the pre-compiled boost rpms from the system .. . remove all the pre-compiled GraphicsMagick rpms from the system .. . compile boost-1.49.0 manually using . configure --prefix usr --enable-shared yes .. . reinstall GraphicsMagick-1.3.14 GraphicsMagick-c++-1.3.14 GraphicsMagick-devel-1.3.14 and GraphicsMagick-c++-devel-1.3.14 via yum .. . clone the pgmagick repository from bitbucket .. . run python setup.py install again within the pgmagick directory", "Question : null .. . Answer : I have been fiddling with this for about a day now . Problem .. . .. . I am trying to install pgmagick the Python interface to GraphicsMagick . Most of the installation procedures I have tried have finished without errors but on import pgmagick I get an .. . .. . Things tried .. . .. . I first tried this tutorial http : www.pyimagesearch.com 2015 04 27 installing-boost-and-boost-python-on-osx-with-homebrew . This brought me to where I am now . I also tried homebrew-pgmagick https : github.com hhatto homebrew-pgmagick . Other symptoms .. . .. . In Terminal I get command not found for all of graphicsmagick boost boost-python so I suppose something is not working properly in the Homebrew installation of these . Setup .. . .. . OS X 10.10.5 .. . Python 3.4.4 python -V -- Python 3.4.4 : : Anaconda 2.3.0 x86-64", "Question : I m not having much success when attempting building pgmagick on CentOS 5.6 . I ve installed the following via yum : .. . .. . However whenever I try to build pgmagick I get the following error : .. . .. . I ve also tried installing boost141 boost141-devel and boost141-python but pgmagick won t build against those libraries . Any suggestions on how I can fix the problem or further diagnose the issue Comment : Not a direct answer but have you looked at the Python Imaging Library pythonware.com products pil http : www.pythonware.com products pil Or at using the subprocess module to execute GraphicsMagick directly Comment : @RolandSmith unfortunately PIL doesn t have the features we require . Using subprocess is an option but also it s quite a pain since the app has been developed using pgmagick directly - a lot of code would need to be reworked . Comment : Look at how other distributions build packages for pgmagick . Maybe specific patches are needed The pgmagick homepage mentions using libboost-python1.40-dev on Ubuntu . Comment : what version of CentOS are you using I just tried to build the extension on my Scientific Linux 6.2 installed boost graphics-magick dependencies from repo downloaded source did python setup.py build and didn t have any issues there . Comment : Running CentOS5.6 .. . Answer : It looks like versions incompatibility problem try using boost-1.34 Comment : CentOS doesn t seem to have boost-1.34 available . Would it be best to install this manually Comment : I d just use some non-official repo like this one : rpm.pbone.net index.php3 stat 4 idpl 8359010 dir centos 5 com http : rpm.pbone.net index.php3 stat 4 idpl 8359010 dir centos 5 com boost-1.34.1-11.1.x86 64.rpm.html Comment : Generally I don t recommend installing packages from non-official repos . You should only do that if you re willing to take the risks involved . According to the pgmagick docs boost141 and your GraphicsMagick libraries should be supported : packages.python.org pgmagick tutorial.html requirements http : packages.python.org pgmagick tutorial.html requirements", "Question : Im trying to install pgmagick on CentOS . After i run pip install pgmagick i get some errors . After i checked log file this is what i ve got : .. . .. . Am i missing something How to make it work .. . Answer : Just had this myself . For anyone visiting via Google from the future you need two additional packages first : Comment : This should be the accepted answer . Thank you Comment : On OSX : brew install graphicsmagick and brew install boost-python", "Question : I would like to use graphicsmagick with wxpython to make an interactive image editor . I m using the pgmagick python api . A naive attempt : .. . .. . produced : TypeError : expected a readable buffer object from wximg.SetData im .. . .. . Then I flailed about trying pgmagick.getPixels blob etc . without success . Have you succeeded Thanks .. . Answer : The wxPython library can open PNG files itself without the need for pgmagick . In fact you can use the Python Imaging Library with wx too . I suspect that pgmagick isn t returning a buffer object i.e . a stream of the image . If you can achieve that then maybe you can make it work .", "Question : Im trying to install pgmagick on CentOS . After i run pip install pgmagick i get some errors . After i checked log file this is what i ve got : .. . .. . Am i missing something How to make it work .. . Answer : You are probably missing the GraphicsMagick-c++-devel package available from the EPEL http : fedoraproject.org wiki EPEL repository . Comment : Thanks for adding the Redhat-based equivalent", "Question : Question .. . .. . What is a good way to use flood-fill with the Graphicsmagick command-line or its pgmagick wrapper for python Background .. . .. . So far this is what I have but its saying that the signatures do not match : .. . .. . Extra .. . .. . Also if you know of a better way that I can manipulate graphics from a Python application or the windows command-line I m all ears . I m starting to feel like I may be using the wrong tool for this with the state of the documentation . Comment : Have you tried to force an explicit cast to Color e.g . Color cRGB .. . Answer : As you say the documentation isn t great . pgmagick is a thin Python wrapper for a C++ frontend so you have to dig through the layers of interface to figure out how to make it work . Unless you need the extra features Pillow is probably a better choice . I ve been using pgmagick with ImageMagick rather than GraphicsMagick as the backend . I don t know whether that makes much difference . In any case here are the tweaks I needed to make to get your code to work : .. . .. . use Color rather than RGBColor .. . .. . from pgmagick import Color .. . color Color white .. . .. . .. . provide two more 0s when instantiating the Geometry object : .. . .. . from pgmagick import Geometry .. . geo Geometry 0 0 1 1 .. . .. . .. . rather than passing two Color arguments to floodFillColor call fillColor first and then call floodFillColor like this : .. . .. . img.fillColor color .. . img.floodFillColor geo color Comment : Hey I think you might mean this to be a comment as opposed to an answer to the question Comment : I ve expanded the answer Comment : Oh awesome thanks", "Question : I m not having much success when attempting building pgmagick on CentOS 5.6 . I ve installed the following via yum : .. . .. . However whenever I try to build pgmagick I get the following error : .. . .. . I ve also tried installing boost141 boost141-devel and boost141-python but pgmagick won t build against those libraries . Any suggestions on how I can fix the problem or further diagnose the issue Comment : Not a direct answer but have you looked at the Python Imaging Library pythonware.com products pil http : www.pythonware.com products pil Or at using the subprocess module to execute GraphicsMagick directly Comment : @RolandSmith unfortunately PIL doesn t have the features we require . Using subprocess is an option but also it s quite a pain since the app has been developed using pgmagick directly - a lot of code would need to be reworked . Comment : Look at how other distributions build packages for pgmagick . Maybe specific patches are needed The pgmagick homepage mentions using libboost-python1.40-dev on Ubuntu . Comment : what version of CentOS are you using I just tried to build the extension on my Scientific Linux 6.2 installed boost graphics-magick dependencies from repo downloaded source did python setup.py build and didn t have any issues there . Comment : Running CentOS5.6 .. . Answer : When you ran configure I m assuming you executed it as . configure --enable-shared yes note the parameter . If you did that like the tutorial says I see no reason why it shouldn t be working . If you didn t this may help .", "Question : I m using pgmagick to generate a circular thumbnail . I m using a process similar to the one discussed here http : stackoverflow.com questions 890051 how-do-i-generate-circular-thumbnails-with-pil which does indeed produce a nice circular thumbnail for me . However I need a white border around the radius of the circle . My initial approach was to create a new image of a slightly larger white circle with a transparent background and composite the thumbnail over that letting the white circle peak out from under the thumbnail and create a border effect . Here s the pgmagick code I used to achieve that : .. . .. . This works but the surrounding white border is fairly distorted with choppy edges -- not production ready . If I take drawer.stroke antialias False out it s even worse . Any ideas on making this border smoother using pgmagick .. . Answer : I leave it as a simple exercise for the reader to convert this solution from commandline to pgmagick see more below . The code underlying pgmagick is the same as that used by the commandline . You could draw the circle larger and then resize it down . This ameliorates the jaggy look of the circle by averaging the edge with the surrounding background during the resizing operation . Instead of .. . .. . Do this : .. . .. . You could try other sizes and decide which is the smallest that satisfies you e.g . .. . .. . This commandline works on both GraphicsMagick gm convert and ImageMagick convert .. . .. . Looking at the pgmagick documentation at http : pgmagick.readthedocs.org en latest cookbook.html scaling-a-image it is not clear that pgmagick offers resize . The documentation shows img.scale which will probably result in a jaggy circle . Using -scale on the commandline examples above instead of -resize does indeed produce the same jaggy image . pgmagick does however allow you to specify the filter type as in .. . .. . which should be equivalent to -resize and is what you want .", "Question : null .. . Answer : I was wondering if it possible to perform low-level pixel manipulations on an image via pgmagick . In particular I would like to mimic the functionality found in the C++ GraphicsMagick API shown here : .. . .. . http : www.graphicsmagick.org Magick++ Image.html low-level-image-pixel-access .. . .. . When I try the following : .. . .. . I get an error like the following : .. . .. . What would be the equivalent functionality in pgmagick Comment : I share your pain indraniel . Apparently you tried to get answers on any possible internet forum mailing list : The documentation is not useful at all but I think it s a recent change because many posts point to it as very useful . I tried to find previous version of the page but to no avail .", "Question : I m trying to install pgmagick library on windows . I m following the official page : http : pypi.python.org pypi pgmagick .. . .. . From there i can notice that i need to install first easy install pip boost and graphicsMagic . In this page i found easy install : http : blog.troygrosfield.com 2010 12 18 installing-easy install-and-pip-for-python In this page i can find pip and boost : http : www.lfd.uci.edu gohlke pythonlibs pgmagick .. . .. . But i can t figure out how to install magick++ . I went to website and download it but it installs just the software and when i try to install pgmagick like this : pip install pgmagick .. . .. . there is an error that i need magick++ : .. . .. . thanks .. . Answer : I recommend you use the precompiled binary packages from the Unofficial Windows Binaries for Python Extension Packages http : www.lfd.uci.edu gohlke pythonlibs pgmagick as mentioned in the pgmagick http : pypi.python.org pypi pgmagick web page instead of trying to compile from source which will be quite a complicated process .", "Question : null .. . Answer : I have a simple Django app deployed on Amazon Elastic Beanstalk . I am installing numpy and pgmagick python libraries on it via .ebextensions which seems to be successful . I can ssh into it run python and successfully import numpy and pgmagick . But when I attempt to import these from django view python script it fails with no module named pgmagick error . Do I need additional permissions or something for django view scripts to access all the python libraries installed on the Elastic Beanstalk env I am attaching the config file that I create in .ebextensions directory below :", "Question : null .. . Answer : I am trying to use pgmagick on Google AppEngine . I have dropped pgmagick 0.5.10 directory containing init .py version.py api.py in main AppEngine directory . I can deploy the app successfully on Google AppEngine but it fails on the import pgmagick since init .py is trying to import pgmagick which is not present . File Users user app pgmagick pgmagick init .py line 1 in from pgmagick import pgmagick ImportError : cannot import name pgmagick .. . .. . Am I missing some additional pgmagick libs and where can I get them from Comment : Maybe its trying to use C libraries which are not allowed on gae Comment : Correct . It is C libraries . I am going to try Amazon Elastic Beanstalk . . Thanks Comment : Try to use pure python version if it exists also you can use Managed VMs to run python with custom C libs .", "Question : Question .. . .. . What is a good way to use flood-fill with the Graphicsmagick command-line or its pgmagick wrapper for python Background .. . .. . So far this is what I have but its saying that the signatures do not match : .. . .. . Extra .. . .. . Also if you know of a better way that I can manipulate graphics from a Python application or the windows command-line I m all ears . I m starting to feel like I may be using the wrong tool for this with the state of the documentation . Comment : Have you tried to force an explicit cast to Color e.g . Color cRGB .. . Answer : I would recommend taking a look at the Python Imaging Library http : effbot.org imagingbook PIL .. . .. . e.g . draw a gray cross over an image http : effbot.org imagingbook imagedraw.htm Comment : According to the sources I ve read PIL is pretty much abandonware now and we should all be using Pillow instead .", "Question : In pgmagick you initialize an image like this : .. . .. . I will be operating on files stored remotely on S3 and would rather not temporarily store them on disk . Is there any way to open an image file from a URL instead When I try to simply replace the file name with the URL I get an error : Unable to open file . .. . .. . I d like to be able to use a URL . If anyone has any suggestions on that or how to extend pgmagick to achieve it I d be elated . .. . Answer : The easiest way in my mind is to use the awesome requests http : docs.python-requests.org en latest library . You can fetch each image from the server one at a time then open it with Image : .. . .. . And that s all there is to it . Authentication is of course not required but may be necessary depending on your S3 setup . Have fun Comment : Ah but this won t work unfortunately . pgmagick s Image is looking for a filename which it then uses to open the file . In the above example the Image class will quite unsuccessfully scan the UNIX filesystem for a file that matches the blob contents passed in . Comment : @user1427661 - so is there no way to open raw data directly Pillow can do that just fine - maybe it would work better for your needs Comment : @user1427661 - looking over the docs I found this example http : pythonhosted.org pgmagick cookbook.html scaling-a-jpeg-image which calls the Blob method class on the results of a Python open command . I just updated my example above why don t you see if it works now Comment : Ahah That did the trick . Now the only question is how to write the file back to S3 . pgmagick apparently doesn t make it super easy to access the blob contents of the edited image .", "Question : I m using pgmagick to generate a circular thumbnail . I m using a process similar to the one discussed here http : stackoverflow.com questions 890051 how-do-i-generate-circular-thumbnails-with-pil which does indeed produce a nice circular thumbnail for me . However I need a white border around the radius of the circle . My initial approach was to create a new image of a slightly larger white circle with a transparent background and composite the thumbnail over that letting the white circle peak out from under the thumbnail and create a border effect . Here s the pgmagick code I used to achieve that : .. . .. . This works but the surrounding white border is fairly distorted with choppy edges -- not production ready . If I take drawer.stroke antialias False out it s even worse . Any ideas on making this border smoother using pgmagick .. . Answer : You will get a better result if you choose a different approach :", "Question : I ve got no idea what s the problem . But when I clean my settings.py .. . .. . .. . .. . And pull off everything that connected with file picker and bootstrap - it works help me please ..................................................................................................................................................................................... . I fixed it with except Exception as e Than i tryed again - it showed .. . .. . ..................................................................................................................................................................................... . Before installing sorl-thumnail i had to install some requirements as redis Pillow pgmagick and Wand . Only i could not install pgmagick - here is error .. . .. . ...........................................................................................................Than i installed sorl-thumbnail nothing happened and tryed again - Comment : Python 3.4 with Python 2 syntax Comment : Namely in python 3 that line in question must be written except Exception as e : .. . Answer : You use old version of sorl-thumbnail - it can not work with your django version . You need to upgrade sorl-thumbnail . Can not say more concrete because don t know what versions of sorl-thumbnail and django you use .", "Question : I ve got no idea what s the problem . But when I clean my settings.py .. . .. . .. . .. . And pull off everything that connected with file picker and bootstrap - it works help me please ..................................................................................................................................................................................... . I fixed it with except Exception as e Than i tryed again - it showed .. . .. . ..................................................................................................................................................................................... . Before installing sorl-thumnail i had to install some requirements as redis Pillow pgmagick and Wand . Only i could not install pgmagick - here is error .. . .. . ...........................................................................................................Than i installed sorl-thumbnail nothing happened and tryed again - Comment : Python 3.4 with Python 2 syntax Comment : Namely in python 3 that line in question must be written except Exception as e : .. . Answer : Looks like the Syntax Error is at C : Python34 lib site-packages file picker views.py line 73 .. . .. . There is a syntax-error related to the except statement . Comment : No it could not be .", "Question : null .. . Answer : Traceback most recent call last : File C : Python34 pgmagick.py line 1 in import pgmagick as pg File C : Python34 pgmagick.py line 48 in remove background img File C : Python34 pgmagick.py line 41 in remove background img pg.Image filename AttributeError : module object has no attribute Image .. . .. . what is wrong what can i solve it", "Question : I am trying to convert a jpeg image to a png rgb+ . I tried the following code but it doesn t work . How do I achieve this .. . Answer : You need to use :" ] }
[ "yes-answer-long", "yes-answer-short" ]
magick++
UNK_RELATION
versant-vod@database@104
versant-vod -- versant object database also known as vod or just versant is an enterprise grade object @placeholder supporting massive concurrency and large-data sets provided by versant corporation .
{ "confidence": [ 93.57533264160156, 89.00926208496094, 84.44064331054688, 79.99490356445312, 78.31964874267578, 78.31964874267578, 75.1445541381836, 75.1445541381836, 75.1445541381836, 75.1445541381836, 73.53307342529297, 72.9552230834961, 68.80155181884766, 59.801177978515625, 59.801177978515625, 59.801177978515625, 59.801177978515625, 58.38386535644531, 55.44805145263672, 53.27665710449219, 44.98931121826172, 44.93833923339844, 44.0803337097168, 43.44855880737305, 41.26051330566406, 40.66938018798828, 40.66938018798828, 40.66938018798828, 40.20032501220703, 37.52143859863281, 36.58047103881836, 35.526554107666016, 34.262794494628906, 34.000038146972656, 32.99480438232422, 32.41646957397461, 31.852306365966797, 30.87899398803711, 30.87899398803711, 30.7449951171875, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 30.215625762939453, 29.241371154785156, 28.724681854248047, 26.067625045776367, 25.593494415283203, 24.546493530273438, 24.012189865112305, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.57318115234375, 23.547672271728516, 23.14201545715332, 23.14201545715332, 20.39808464050293, 20.39808464050293, 20.39808464050293, 20.39808464050293, 20.39808464050293, 20.39808464050293 ], "content": [ "We are using JPA and Versant as database .", "I m working on a system which uses versant object database .", "I m currently working with the versant object database using jvi and have a case where I need to query the database based on an object id .", "I disagree with some statements from DataNucleus : Yes Versant is an ODBMS and not an RDBMS thus we ignore anything which is just specific to mapping - your Java data model is virtually the same as the data model in the Versant database .", "It seems the C type decimal is weirdly supported in Versant and is transformed into a char array .", "Look under the Versant Menu drop down in Visual Studio .", "Let me put a disclaimer first : I m one of the developers of Versant JPA .", "To work with Versant JPA it should be sufficient to have basic JPA skills .", "Currently I have an application which uses a Versant DB .", "Is there a feature similar to Oracle Flashback in Versant if not what is the proper way to handle this problem", "Just have a look into this and the provided Getting Started with Versant JPA manual to get the first impressions how easy to use it is .", "I m working on a c project that use a Versant Object Database back end and I m trying to build a query that contains an arithmetic operator .", "There is a table in the C docs that explain the value-type mappings from the CLR types to Versant server types .", "We provide a tutorial which should run out of the box after you have installed the Versant JPA Technical Preview and the supplied Eclipse plug-in .", "All the big differences between Versant JPA and RDBMS based JPA implementations are described in a separate chapter in our Getting Started with JPA guide .", "However when I try to run the ant testing task through Jenkins Hudson some of the test cases throw a NoClassDefFoundError looking for one of the Versant files .", "Im not familiar with versant but according to wikipedia it comes with transaction support en.wikipedia.org wiki Versant Object Database Transactions https : en.wikipedia.org wiki Versant Object Database Transactions .", "What you want to do is use the GetObjectId first to get the VOD Id of the object then query the DB .. . .. . id session.GetObjectId employee", "We do also have a JDO implementation but I would recommend to try out our Versant JPA technical preview as the term preview suggests it is not feature complete yet .", "An expert in Hibernate JPA can use Versant without the mapping process no matter how complex the model and if peformance and scale don t rule plug in an RDB driver an go .", "The problem is I m running some performance tests on the database using the pole position framework and one of the tests in that framework requires me to fetch an object from the database using either an object-reference or a low-level object id .", "I already have some experience with Hibernate but if I m correct there s no way to use it to access object databases like Versant s VOD .", "It s an object database so keys really aren t nessecary .", "Once you have the object ID just grab the object from its Handle .", "Here s http : www.objectdb.com an ODB that claims to work with JPA maybe you can adapt or follow suit with Versant s VOD .", "Thus I m not allowed to reference specific fields in the employee object but must perform the query on the object in its entirety .", "This is how I did the whole roundtrip object OID object : .. . .. . First you get the OID with TransSession.getOidAsLong .", "Thank you Bernie but unfortunatly the restraints were such that I had to bind the query to an object id not on an object property .", "If the key field is EmployeeID then it needs to be populated in the object for this to work .", "I had be struggling to get an object by oid so your last example made my day - thanks", "So it s not allowed for me to go select from Employee e where e.id 4 I need it to use the entire object .", "I m finding out the hard way that the way I m trying to acheive this is wrong because I get a EVJ NOT A VALID KEY TYPE which means I can t bind the parameter to an object of the type employee .", "Why would you need Hibernate if you re using an object database", "Needless to say JPA was designed around RDBMS only and various parts particularly JPQL are clearly not as applicable to an ODBMS hence it is not as suitable an API as you may wish to have for that datastore and something like JDO would be more suited which VOD also supports IIRC .. . but anyway", "You are creating an Employee using just his name perhaps the correct identifier to use is his employeeId .", "I am not sure that the Object Inspector will know the syntax for the arithmtic expression .", "However apart from all mapping related stuff JPA is a natural API for an object database as well .", "I m trying to build something like this : .. . .. . If I try this statement in the Object Inspector I get a synthax error near the - .", "After a lot of testing it appears that you are right Object Inspector doesn t seem to be able to support this .", "Since they just released a preview with JPA support http : community.versant.com jpa.aspx I was wondering if I can use my limited Hibernate skills to use the object database with JPA .", "What I m trying to achieve is something along the lines of .. . .. . However this throws an EVJ NOT A VALID KEY TYPE error .", "Does anyone know the correct way of doing this", "What kinds of things are you finding out the hard way", "Is this Java or C++", "It s java .", "Sure you figured this out post was months ago .", "Actually I never figured it out so thank you", "Problem is that because of this : meta.stackexchange.com questions 1413 http : meta.stackexchange.com questions 1413 why-an-answer-cant-be-accepted-after-an-unresolved-bounty I can t mark your answer as accepted which frankly is silly .", "I do thank you though for taking the time to answer this .", "However all readers of this thread should know that this is the answer to this question .", "You rock", "Cool thanks", "Glad it helped : -", "No VQL needed .", "Usually keys are integers and not strings .", "I need some more information on the table to know for sure .", "Hi Mike thanks for your answer .", "but you still need to atleast populate the key field .", "Double check what the primary-key s on the employee table are .", "You can try this .. . .. . It will return all Employees with the name Mr . Pickles Then loop through them .", "Why did I get marked down", "Grr... .", "Hibernate is an ORM tool which stands for object-relational mapping .", "It s a fine query API for expressing predicate based query expressions involving logical operators set based operations aggregations and the like and those constructs are all supported will by the underlying object database .", "If you re not using a relational-database what s Hibernate for", "Query query new Query session select from com.yourCompany.yourClass where qtyOrdered - qtySent 0 .. . .. . QueryResult result query.execute .. . .. . I just tried this out on one of my classes and it worked fine .", "We have functional tests which sends requests to the server server performs requested operation on database and returns results .", "Till now I am debbuging the the arquillian test and once my flow reaches DB handler code I am stopping the database .", "The documentation states that it is supported but lack any example .", "Anyone has an example of a working VQL with that kind of statement", "Thanks", "However in your code you should be referring to the fully qualified class .", "Then the syntax you are using should be perfectly fine .", "Cheers -Robert", "But the problem was deeper then that .", "That explains my error .", "Thanks for the answer .", "With C and OQL you have to make sure you select the proper class extent .", "This is done by adding the Extent suffix to the class name .", "For example in my Pet class I would identify all the pets with PetExtent in the OQL string .", "Class members are accessed in the predicate by defining a local moniker p in the code below .", "Any arithmetic expressions will be evaluated by the query-engine .", "The best way to test OQL with Versant s C binding is to use the OQL Query Browser integrated into Visual Studio .", "Best Regards .. . .. . Derek", "Thanks for pointing out the OQL Query Browser .", "It will save me a lot of hassle in the future .", "System.Decimal and BigDecimal JDO binding are indeed translated to strings for storage on the server .", "If you need to do math in your queries you need to stick to one of the integer or floating-point types .", "Unfortunately due to legacy test code we would have to load a lot of data each time in that case .", "The main point of the API is to allow people who want to try a Big Data NoSQL technology an option which involves little risk .", "I am implementing a feature where if there is any exception while writing data into DB we should retry it for 5 times before failing .", "If anybody has experience with please let me know if these versions are compatible .", "Best .", "Harry", "I disagree that there is a big correlation between the design of JPQL and the fact that JPA was designed with RDBMS in mind .", "Actually Microsoft has proven this by abstracting LINQ to a datastore agnostic level .", "The biggest one might be our restriction to have an @Id field of type long or java.lang.Long which is automatically set by our runtime ." ] }
{ "confidence": [ 133.71856689453125, 95.95964813232422, 95.63243103027344, 93.74345397949219, 93.45257568359375, 91.11185455322266, 90.46360778808594, 85.84029388427734, 81.12764739990234, 80.39966583251953, 79.38851165771484, 63.14992904663086 ], "content": [ "Question : I already have some experience with Hibernate but if I m correct there s no way to use it to access object databases like Versant s VOD . Since they just released a preview with JPA support http : community.versant.com jpa.aspx I was wondering if I can use my limited Hibernate skills to use the object database with JPA . If anybody has experience with please let me know if these versions are compatible . Best . Harry .. . Answer : Let me put a disclaimer first : I m one of the developers of Versant JPA . To work with Versant JPA it should be sufficient to have basic JPA skills . We provide a tutorial which should run out of the box after you have installed the Versant JPA Technical Preview and the supplied Eclipse plug-in . Just have a look into this and the provided Getting Started with Versant JPA manual to get the first impressions how easy to use it is . I disagree with some statements from DataNucleus : Yes Versant is an ODBMS and not an RDBMS thus we ignore anything which is just specific to mapping - your Java data model is virtually the same as the data model in the Versant database . However apart from all mapping related stuff JPA is a natural API for an object database as well . I disagree that there is a big correlation between the design of JPQL and the fact that JPA was designed with RDBMS in mind . Actually Microsoft has proven this by abstracting LINQ to a datastore agnostic level . All the big differences between Versant JPA and RDBMS based JPA implementations are described in a separate chapter in our Getting Started with JPA guide . The biggest one might be our restriction to have an @Id field of type long or java.lang.Long which is automatically set by our runtime . We do also have a JDO implementation but I would recommend to try out our Versant JPA technical preview as the term preview suggests it is not feature complete yet . Christian Romberg", "Question : I m currently working with the versant object database using jvi and have a case where I need to query the database based on an object id . The problem is I m running some performance tests on the database using the pole position framework and one of the tests in that framework requires me to fetch an object from the database using either an object-reference or a low-level object id . Thus I m not allowed to reference specific fields in the employee object but must perform the query on the object in its entirety . So it s not allowed for me to go select from Employee e where e.id 4 I need it to use the entire object . What I m trying to achieve is something along the lines of .. . .. . However this throws an EVJ NOT A VALID KEY TYPE error . Does anyone know the correct way of doing this Comment : What kinds of things are you finding out the hard way Is this Java or C++ Comment : It s java . I m finding out the hard way that the way I m trying to acheive this is wrong because I get a EVJ NOT A VALID KEY TYPE which means I can t bind the parameter to an object of the type employee . .. . Answer : Sure you figured this out post was months ago . What you want to do is use the GetObjectId first to get the VOD Id of the object then query the DB .. . .. . id session.GetObjectId employee Comment : Actually I never figured it out so thank you Problem is that because of this : meta.stackexchange.com questions 1413 http : meta.stackexchange.com questions 1413 why-an-answer-cant-be-accepted-after-an-unresolved-bounty I can t mark your answer as accepted which frankly is silly . I do thank you though for taking the time to answer this . However all readers of this thread should know that this is the answer to this question . You rock Comment : Cool thanks Glad it helped : -", "Question : I m working on a c project that use a Versant Object Database back end and I m trying to build a query that contains an arithmetic operator . The documentation states that it is supported but lack any example . I m trying to build something like this : .. . .. . If I try this statement in the Object Inspector I get a synthax error near the - . Anyone has an example of a working VQL with that kind of statement Thanks .. . Answer : I am not sure that the Object Inspector will know the syntax for the arithmtic expression . However in your code you should be referring to the fully qualified class . Then the syntax you are using should be perfectly fine . Query query new Query session select from com.yourCompany.yourClass where qtyOrdered - qtySent 0 .. . .. . QueryResult result query.execute .. . .. . I just tried this out on one of my classes and it worked fine . Cheers -Robert Comment : After a lot of testing it appears that you are right Object Inspector doesn t seem to be able to support this . But the problem was deeper then that . It seems the C type decimal is weirdly supported in Versant and is transformed into a char array . That explains my error . Thanks for the answer .", "Question : I already have some experience with Hibernate but if I m correct there s no way to use it to access object databases like Versant s VOD . Since they just released a preview with JPA support http : community.versant.com jpa.aspx I was wondering if I can use my limited Hibernate skills to use the object database with JPA . If anybody has experience with please let me know if these versions are compatible . Best . Harry .. . Answer : You don t use any Hibernate skills with a different piece of software you use you JPA skills . It s a standard API hence same classes with same metadata and same persistence code . The only thing different is you may have some different persistence properties to use in your persistence.xml . Needless to say JPA was designed around RDBMS only and various parts particularly JPQL are clearly not as applicable to an ODBMS hence it is not as suitable an API as you may wish to have for that datastore and something like JDO would be more suited which VOD also supports IIRC .. . but anyway Comment : Versant s implementation of JPA includes support for JPQL . It s a fine query API for expressing predicate based query expressions involving logical operators set based operations aggregations and the like and those constructs are all supported will by the underlying object database . The main point of the API is to allow people who want to try a Big Data NoSQL technology an option which involves little risk . An expert in Hibernate JPA can use Versant without the mapping process no matter how complex the model and if peformance and scale don t rule plug in an RDB driver an go .", "Question : I m working on a c project that use a Versant Object Database back end and I m trying to build a query that contains an arithmetic operator . The documentation states that it is supported but lack any example . I m trying to build something like this : .. . .. . If I try this statement in the Object Inspector I get a synthax error near the - . Anyone has an example of a working VQL with that kind of statement Thanks .. . Answer : With C and OQL you have to make sure you select the proper class extent . This is done by adding the Extent suffix to the class name . For example in my Pet class I would identify all the pets with PetExtent in the OQL string . Class members are accessed in the predicate by defining a local moniker p in the code below . Any arithmetic expressions will be evaluated by the query-engine . The best way to test OQL with Versant s C binding is to use the OQL Query Browser integrated into Visual Studio . Look under the Versant Menu drop down in Visual Studio . Best Regards .. . .. . Derek Comment : Thanks for pointing out the OQL Query Browser . It will save me a lot of hassle in the future . Comment : System.Decimal and BigDecimal JDO binding are indeed translated to strings for storage on the server . If you need to do math in your queries you need to stick to one of the integer or floating-point types . There is a table in the C docs that explain the value-type mappings from the CLR types to Versant server types .", "Question : null .. . Answer : I m working on a system which uses versant object database . We have functional tests which sends requests to the server server performs requested operation on database and returns results . Afterwards we send an opposite request which is supposed to restore db to previous state untill next test starts . This is invalid approach we try to restore db to previous state using the very same request we are testing . Is there a feature similar to Oracle Flashback in Versant if not what is the proper way to handle this problem Comment : How about a separate environment for testing Running tests on production seems utterly wrong to me . Comment : @SebastianHoffmann didnt say we run tests in production . Its a test environment . We need to restore db between two subsequent test cases . Comment : In that case why not create a fresh schema for each test case Is there anything preventing you from doing so Have you tested this approach already did you meassure an performance drop If yes is it bearable Path of least resistance Comment : Unfortunately due to legacy test code we would have to load a lot of data each time in that case . We have tried this approach but performance drop was not acceptable . We are slowly refactoring to prepare for this approach but we are not there yet . Comment : Im not familiar with versant but according to wikipedia it comes with transaction support en.wikipedia.org wiki Versant Object Database Transactions https : en.wikipedia.org wiki Versant Object Database Transactions . In that case it should be sufficient to wrap the whoel test case in a transaction and roll it back at the end of it .", "Question : null .. . Answer : Currently I have an application which uses a Versant DB . I can build this application in ant and have an ant-task for unit-testing . When I run the testing task from command-line all of the test cases will run correctly . However when I try to run the ant testing task through Jenkins Hudson some of the test cases throw a NoClassDefFoundError looking for one of the Versant files . Can anyone tell me what I m missing in Jenkins to fix this Stack Trace : Comment : I am facing same issue", "Question : null .. . Answer : I am implementing a feature where if there is any exception while writing data into DB we should retry it for 5 times before failing . I have implemented the feature but not able to test it using arquillian test . We are using JPA and Versant as database . Till now I am debbuging the the arquillian test and once my flow reaches DB handler code I am stopping the database . But this is worst way of testing . Do you have any suggestion how to achieve the same", "Question : I m currently working with the versant object database using jvi and have a case where I need to query the database based on an object id . The problem is I m running some performance tests on the database using the pole position framework and one of the tests in that framework requires me to fetch an object from the database using either an object-reference or a low-level object id . Thus I m not allowed to reference specific fields in the employee object but must perform the query on the object in its entirety . So it s not allowed for me to go select from Employee e where e.id 4 I need it to use the entire object . What I m trying to achieve is something along the lines of .. . .. . However this throws an EVJ NOT A VALID KEY TYPE error . Does anyone know the correct way of doing this Comment : What kinds of things are you finding out the hard way Is this Java or C++ Comment : It s java . I m finding out the hard way that the way I m trying to acheive this is wrong because I get a EVJ NOT A VALID KEY TYPE which means I can t bind the parameter to an object of the type employee . .. . Answer : Usually keys are integers and not strings . You are creating an Employee using just his name perhaps the correct identifier to use is his employeeId . I need some more information on the table to know for sure . Comment : Hi Mike thanks for your answer . The problem is I m running some performance tests on the database using the pole position framework and one of the tests in that framework requires me to fetch an object from the database using either an object-reference or a low-level object id . Thus I m not allowed to reference specific fields in the employee object but must perform the query on the object in its entirety . So it s not allowed for me to go select from Employee e where e.id 4 I need it to use the entire object . Comment : but you still need to atleast populate the key field . If the key field is EmployeeID then it needs to be populated in the object for this to work . Double check what the primary-key s on the employee table are . Comment : It s an object database so keys really aren t nessecary .", "Question : I m currently working with the versant object database using jvi and have a case where I need to query the database based on an object id . The problem is I m running some performance tests on the database using the pole position framework and one of the tests in that framework requires me to fetch an object from the database using either an object-reference or a low-level object id . Thus I m not allowed to reference specific fields in the employee object but must perform the query on the object in its entirety . So it s not allowed for me to go select from Employee e where e.id 4 I need it to use the entire object . What I m trying to achieve is something along the lines of .. . .. . However this throws an EVJ NOT A VALID KEY TYPE error . Does anyone know the correct way of doing this Comment : What kinds of things are you finding out the hard way Is this Java or C++ Comment : It s java . I m finding out the hard way that the way I m trying to acheive this is wrong because I get a EVJ NOT A VALID KEY TYPE which means I can t bind the parameter to an object of the type employee . .. . Answer : This is how I did the whole roundtrip object OID object : .. . .. . First you get the OID with TransSession.getOidAsLong . Once you have the object ID just grab the object from its Handle . No VQL needed . Comment : I had be struggling to get an object by oid so your last example made my day - thanks", "Question : I m currently working with the versant object database using jvi and have a case where I need to query the database based on an object id . The problem is I m running some performance tests on the database using the pole position framework and one of the tests in that framework requires me to fetch an object from the database using either an object-reference or a low-level object id . Thus I m not allowed to reference specific fields in the employee object but must perform the query on the object in its entirety . So it s not allowed for me to go select from Employee e where e.id 4 I need it to use the entire object . What I m trying to achieve is something along the lines of .. . .. . However this throws an EVJ NOT A VALID KEY TYPE error . Does anyone know the correct way of doing this Comment : What kinds of things are you finding out the hard way Is this Java or C++ Comment : It s java . I m finding out the hard way that the way I m trying to acheive this is wrong because I get a EVJ NOT A VALID KEY TYPE which means I can t bind the parameter to an object of the type employee . .. . Answer : You can try this .. . .. . It will return all Employees with the name Mr . Pickles Then loop through them . Comment : Thank you Bernie but unfortunatly the restraints were such that I had to bind the query to an object id not on an object property . Comment : Why did I get marked down Grr... .", "Question : I already have some experience with Hibernate but if I m correct there s no way to use it to access object databases like Versant s VOD . Since they just released a preview with JPA support http : community.versant.com jpa.aspx I was wondering if I can use my limited Hibernate skills to use the object database with JPA . If anybody has experience with please let me know if these versions are compatible . Best . Harry .. . Answer : Why would you need Hibernate if you re using an object database Hibernate is an ORM tool which stands for object-relational mapping . If you re not using a relational-database what s Hibernate for Here s http : www.objectdb.com an ODB that claims to work with JPA maybe you can adapt or follow suit with Versant s VOD ." ] }
[ "yes-answer-long", "yes-answer-short" ]
database
UNK_RELATION
pybuffer@interface@50
pybuffer -- shorthand name for the python buffer @placeholder so named for the py buffer struct used throughout .
{ "confidence": [ 30.491090774536133, 30.029159545898438, 29.79738998413086, 28.804771423339844, 28.743009567260742, 27.917587280273438, 27.658395767211914, 27.4814395904541, 27.32528305053711, 27.036724090576172, 26.521860122680664, 25.985090255737305, 25.957897186279297, 25.762968063354492, 25.152578353881836, 24.895944595336914, 24.853958129882812, 24.853958129882812, 24.822826385498047, 24.7164306640625, 24.652469635009766, 24.50530433654785, 23.654441833496094, 23.654441833496094, 23.62298011779785, 23.448196411132812, 23.287017822265625, 23.287017822265625, 23.20855140686035, 23.075410842895508, 22.190532684326172, 22.190532684326172, 22.031505584716797, 22.031505584716797, 21.229774475097656, 21.229774475097656, 21.10287094116211, 20.842344284057617, 20.823009490966797, 20.68318748474121, 20.32076644897461, 20.021896362304688, 19.810302734375, 19.266498565673828, 19.266498565673828, 19.266498565673828, 19.205062866210938, 19.18709945678711, 19.089786529541016, 18.915002822875977, 18.868480682373047, 18.72203826904297, 18.704631805419922, 18.423934936523438, 17.740880966186523, 17.740880966186523, 17.666000366210938, 17.62779998779297, 16.820810317993164, 16.405595779418945, 16.30207061767578, 16.257707595825195, 16.257707595825195, 16.181884765625, 15.93962287902832, 15.911568641662598, 15.70730209350586, 15.627013206481934, 15.627013206481934, 15.236945152282715, 14.942268371582031, 14.833047866821289, 14.833047866821289, 14.809771537780762, 14.671869277954102, 14.45973014831543, 14.369349479675293, 14.369349479675293, 14.18201732635498, 14.170299530029297, 14.055801391601562, 14.055801391601562, 13.801682472229004, 13.537060737609863, 13.49269962310791, 13.207687377929688, 12.862004280090332, 12.862004280090332, 12.550931930541992, 12.448795318603516, 12.448795318603516, 12.448795318603516, 12.448795318603516, 12.448795318603516, 12.448795318603516, 12.448795318603516, 12.448795318603516, 12.448795318603516, 12.448795318603516, 12.448795318603516 ], "content": [ "I m converting these images to a binary file-format via Matlab Now I need to load the binary file in a buffer in Python and read from the buffer .", "I have implemented the new python buffer interface in C++ outlined here : .. . .. . https : docs.python.org 2 c-api buffer.html .. . .. . I have implemented my Py buffer struct and filled it in : .. . .. . I am creating my Python buffer class in Python and handing it to C++ .", "Is there any kind of documentation on how to implement a python write buffer", "Hopefully this will be clearer : .. . .. . I am trying to expose a simple C structure to Python 3.x as a PyBuffer so I can retrieve a MemoryView from it .", "Is the PyBuffer automatically freed when the VideoFrame object gets deleted", "I simply redesigned the code slightly so that the user returns a bytearray or any type that supports the buffer interface from the Python callback function .", "Calling buffer just builds an additional buffer object pointing to that string .", "Basically instead of creating a buffer or bytearray equiv .", "@est : For example on most nix platforms with sendv and or writev you have to create an array of struct iovec objects each of which has a buffer pointer and a length .", "So now my question is how am I supposed to write and resize this pyBuffer in C++", "I am quite confused with the term buffer Interface in python .", "This is the buffer interface described in PEP 3118 .", "I am trying to expose a buffer of image pixel information 32-bit RGBA through the Python 3.x buffer interface .", "Just asking because 640x480 doesn t necessarily translate to a specific buffer size .", "I have created a buffer object in python like so : .. . .. . I m now passing byte stream as a parameter to a C function through SWIG .", "This object is then changed into a buffer inside using the PyObject GetBuffer function even though in the case of mv 0 it is already a buffer and the buffer you want .", "This way I need not even worry about the size of the items since in my case all the C code does with the returned object is to extract its buffer and copy it to another buffer with a simple memcpy .", "I want buffer my file because I gono send byte by byte with serial-port and I think if I buffer the file I can send bytes faster am I right", "The set of methods to implement so that your extension type supports the buffer protocol is described here : http : docs.python.org 3.1 c-api typeobj.html buffer-object-structures .. . .. . I recognize that the documentation is pretty rough so the best advice I can give is to start from an existing implementation of the buffer API by a C type for example bytesobject.c or bytearrayobject.c in the official Python source code .", "As for getting at the memory pointed to by the buffer object try PyObject AsReadBuffer .", "I don t think you would resize the pybuffer directly I think you would resize the associated pyobject e.g .", "But my buffer must already have the correct size or it wont write .", "does it say int does not support the buffer interface or object does not support the buffer interface", "My guess is that this function takes the object and makes it into a simple buffer of itemsize 1 regardless of whether it is already a buffer or not .", "I ve gotten it to work using PyBuffer FillInfo work I can manipulate the data in Python and write it to stdout in C but if I try to roll my own buffer I get a segfault after the C function returns .", "I need to create my own buffer because PyBuffer FillInfo assumes that the format is char making the itemsize field 1 .", "Conclusion .. . .. . Currently the Python buffer system can t handle items with itemsize 1 as you guessed .", "The mmap object which provides a Python interface to OS-level memory mapping functionality also provides a buffer interface .", "The old-style buffer API did support a mode designed specifically for scatter gather-like use but it was dropped in Python 3.x and deprecated in 2.6+ once the 3.x API was backported basically because nobody ever used it .", "The nearly all is because the Python buffer interface allows the elements in the data array to themselves be pointers Cython memoryviews do not yet support this .", "But if its a newly created buffer how do I tell it how much space I need", "I can use : int result PyBuffer FromContiguous m view const-cast void data pySize A .. . .. . to add data to my buffer .", "For example if you wanted to build something like NumPy http : www.numpy.org from scratch you might build it around the buffer API .", "Can t you just treat the file as your buffer and readline one line from the file at a time and do your processing that way", "Also it can t handle assignments to a buffer from non-bufferable objects such as ints .", "and we can access that C representation for objects which support buffer interface", "The question s gather https : github.com python cpython blob master Objects bytearrayobject.c L3648-3651 link points at Python 3 s bytearray implementation which doesn t use the Python 2 version of PyBufferProcs that has six fields including the last two for the new buffer protocol .", "The numpy numeric package is built around this kind of data sharing between Python and C and even FORTRAN for which they extended the buffer protocol and some of these extensions made it into Python 3 .", "One final thought : In python an int isn t necessarily 32 bits so that s probably why int to buffer assignment isn t allowed : because the size of an int can be unpredictable or at least non-obvious to the uninformed user .", "There are many different methods for converting a C data to a buffer but none that I can find for going the other way around .", "In case 1 the error informs me that int does not support the buffer interface which is a shame and a bit confusing I did specify that the buffer format was I after all but I can deal with that .", "But if you don t care about old-style buffers you can almost always use a memoryview http : docs.cython.org src userguide memoryviews.html python-buffer-support : .. . .. . Cython memoryviews support nearly all objects exporting the interface of Python new style buffers .", "I d like to write a Cython wrapper in such a way that the Python implementation of that callback can return any reasonable data type like str bytearray memory-mapped-files and so on specifically supports the Buffer interface http : docs.python.org 2 c-api buffer.html bufferobjects .", "As soon as you use the read method on your file object the data will be converted to a str object calling the buffer method does not convert it into a stream of any kind .", "If you want to support everything that implements every variation of the new-style or old-style buffer interface then you have to use the C API .", "From the documentation for 2.7 however the description of this structure https : docs.python.org 2 c-api typeobj.html c.PyBufferProcs only contains entries for the old buffer protocol .", "No Python type has exactly that shape so you have to build it out of a ctypes.Structure .", "However please note that the buffer protocol doesn t give access to high-level notations such as the one you quoted : img buffer 1 : : 4 255 won t work on a memoryview object .", "In other cases this is either useless as with lists which are internally arrays of internal pointers to Python objects or downright impossible as with dicts which are internally hash tables with fairly complex structures and as such cannot be represented as a single buffer .", "In other words the buffer system isn t currently able to handle item sizes bigger from 1 .", "Also I would like to avoid including third party libs to achieve functionality that should be part of the core libs but it feels to me like the PyBuffer functionality is still fairly immature and perhaps something like NumPy would be a better choice .", "Some code this is a working example : .. . .. . Looking at the implementation of PyBuffer FillInfo which is really simple I rolled my own function to be able to provide custom itemsizes : .. . .. . How i use it : .. . .. . The result-of using my own buffer object is a segfault after the C function returns .", "In that case the question is more about how to assign Python floats to the memoryview object in the Python function .", "in C and passing it to Python for the extension user to modify .", "@est : Python 2.x doesn t provide any scatter gather APIs .", "code.runnable.com UqJdRnCIohYmAAGP http : code.runnable.com UqJdRnCIohYmAAGP reading-binary-files-in-python-for-io", "Does it mean to say that every python object has an equivalent C representation which is used by python interpreter for processing .", "Is it used for scatter gather vector buffers", "Basically what I want to do is to expose a C array to Python using a Py buffer wrapped in a memoryview -object .", "However it would be great if I could work with the full pixel value int 4 byte instead of individual bytes so I modified the buffer fetch like so : .. . .. . This actually returns the data and I can read it correctly but any attempt to assign a value into it now fails", "Python 3 has recvmsg into http : docs.python.org 3.3 library socket.html socket.socket.recvmsg into and sendmsg http : docs.python.org 3.3 library socket.html socket.socket.sendmsg on its sockets but they work by just providing an iterable of 1D buffers a list of bytearray s works fine so there s no need for anything more fancy .", "Namely this one http : stackoverflow.com questions 15033683 calling-a-python-function-from-a-c-thread-with-a-mutable-c-array if anyone is interested .", "If you are using the C-API you are going to want to use a Py buffer structure which is not a Python object it is unrelated to PyObject -compatible structures in the C-API .", "That is why you get the mismatching item sizes even for .. . .. . The problem with the first assignment .. . .. . mv 0 0xFFFFFFFF .. . .. . stems I think from checking if the int is able to be used as a buffer which currently it isn t set-up for from what I understand .", "The Python 3 source also doesn t use the Py TPFLAGS HAVE NEWBUFFER flag that s just in Python 2 .", "This array is exposed through the buffer interface - it allows one to query the exact memory position and size of the underlying C array and pass it to some C function that will efficiently initialize it or write it out to disk .", "So I suppose everything is correctly implemented .", "EDIT According to this question http : stackoverflow.com questions 2297026 assignment-into-python-3-x-buffers-with-itemsize-1 rq 1 which I failed to find before itemsize 1 might not even be supported at all .", "Alternatively if you tell Cython it s an object that lets Cython deal with it like any other Python object and manage the reference count correctly : .. . .. . The generated code for the loop is then .. . .. . Note the DECREF which will be where the object is deallocated .", "Yes absolutely I have looked at exactly those things but that isn t the problem we are asking about unless I am missing something those are the public official Python API funcs which won t respond properly to our python C-extension objects without the proper and needlessly cryptically documented stuff set up in the related PyBufferProcs as appropriately pointed at in the type struct def .", "Basic information is here : https : docs.python.org 2 c-api buffer.html .. . .. . If not using C you will be interested in memoryview the Python-level analog to Py buffer and the file I O builtins and library module s : .. . .. . https : docs.python.org 2 tutorial inputoutput.html reading-and-writing-files", "So in lack of answers I decided to take another approach than the one I originally intended .", "It s been a while since I made real use of it though so I can t give any real advice .", "After quite a bit of playing around I was able to get this working like so : .. . .. . And in python I can play with it like so : .. . .. . And that works splendidly .", "I m still new to the Python C APIs so I have a hard time finding the bits that I need in the code .", "But this entry shouldn t be used if I m supporting PEP 3118 .", "The whole point of me trying to expose this memory is to allow Python developers to manipulate image data at a byte level and if they can t do basic indexing or slicing then this method is useless to me .", "The function may move the memory block to a new location whose address is returned by the function The only way I can get the python data is through the function pointer that view- buf exposes .", "@molnarg : Here http : pastebin.com Z7jQU9DR is an implementation of the relevant parts with incomplete error-handling e.g . if you run out-of-memory halfway through allocating the Jagged you ll leak all the buffers allocated so far .", "I have no idea why this isn t documented anywhere but you can see it used in the definition of the bytearray type for python-2.7 see here https : hg.python.org cpython file ee879c0ffa11 Objects bytearrayobject.c l2914 : .. . .. . .. . .. . This content was already posted in comments but it deserves an answer .", "The questions remain : .. . .. . Do I have to do something special to tell Python that these new entries are valid", "It cannot be overstated how correct this is the lack of documentation for Py TPFLAGS HAVE NEWBUFFER is actually listed as a Python bug q.v .", "Of course the documentation for this interface is really sparse and perusing through the python code doesn t really give any usage examples so I m fairly stuck .", "what I have so far is : .. . .. . The code I want to write would produce equivalent C code but look like this : .. . .. . The generated C code looks like what I think it should be doing but this seems like digging around in the Python API unnecessarily .", "I m using buffers because I want to avoid the overhead of converting the data to a string when reading it from the file I m using python-2.6 on Linux .", "In some cases arrays it is possible and useful to expose this representation outside Python .", "I am in the process of extending the classes in our library which supports Python 2.7 to support PEP 3118 http : legacy.python.org dev peps pep-3118 which has been back-ported to 2.7 .", "From the sources I gather https : github.com python cpython blob master Objects bytearrayobject.c L3648-3651 that PyBufferProcs has some additional entries for the new protocol bf getbuffer and bf releasebuffer .", "The structure I want to expose is similar to this : .. . .. . and it is my desire to allow the script writer to access the data like so : .. . .. . Unfortunately the existing documentation about the C API for these structures is pretty sparse self contradictory in places and outright wrong in others documented function signatures do not match those in the headers etc .", "This question is related to a previous question I asked .", "I need to be able to provide items of size 1 2 4 and 8 .", "I really don t understand why this happens at all .", "Any help would be most appreciated .", "Which makes this question even more interesting .", "Maybe I could use PyBuffer FillInfo with a large enough block of memory to hold what I want 32 C floats for example .", "Questions questions .", "Leaving this here in case someone else hits the same snag .", "Code : .. . .. . I hope this helps someone .", "http : docs.python.org 2 c-api buffer.html .. . .. . int ndim .. . .. . The number of dimensions the memory represents as a multi-dimensional array .", "If it is 0 strides and suboffsets must be NULL ." ] }
{ "confidence": [ 52.92997741699219, 44.19781494140625, 33.754825592041016, 32.71696472167969, 32.471012115478516, 30.532676696777344, 30.438196182250977, 30.26026153564453, 29.471477508544922, 28.756473541259766, 28.33173370361328, 27.739887237548828 ], "content": [ "Question : I have implemented the new python buffer interface in C++ outlined here : .. . .. . https : docs.python.org 2 c-api buffer.html .. . .. . I have implemented my Py buffer struct and filled it in : .. . .. . I am creating my Python buffer class in Python and handing it to C++ . I am getting a pyObject along with my Py Buffer . So now my question is how am I supposed to write and resize this pyBuffer in C++ I can get access to the pointer directly and a size . But if its a newly created buffer how do I tell it how much space I need There does not seem to be any sort of resize function for me to call . I can use : int result PyBuffer FromContiguous m view const-cast void data pySize A .. . .. . to add data to my buffer . But my buffer must already have the correct size or it wont write . I do not think this is the correct way to be using it anyway . Cython is not an option . Comment : How about realloc Comment : I thought of a similar solution but am I allowed to reassign the view- buf pointer Is this how things are supposed to be done Is there any kind of documentation on how to implement a python write buffer Other then just the method names . Comment : this won t reassign this ll extend . I think you can give this a try . Comment : The function may move the memory block to a new location whose address is returned by the function The only way I can get the python data is through the function pointer that view- buf exposes . I cannot change the pointer that the function pointer is returning . Comment : I don t think you would resize the pybuffer directly I think you would resize the associated pyobject e.g . with PyByteArray Resize .. . Answer : You shouldn t resize the Py buffer directly since it is just an interface to the data of a PyObject . Instead use PyByteArray Resize or possibly PyString Resize on the underlying PyObject .", "Question : EDIT : Upon re-reading my original question I realized very quickly that it was very poorly worded ambiguous and too confusing to ever get a decent answer . That s what I get for rushing out a question at the end of my lunch break . Hopefully this will be clearer : .. . .. . I am trying to expose a simple C structure to Python 3.x as a PyBuffer so I can retrieve a MemoryView from it . The structure I want to expose is similar to this : .. . .. . and it is my desire to allow the script writer to access the data like so : .. . .. . Unfortunately the existing documentation about the C API for these structures is pretty sparse self contradictory in places and outright wrong in others documented function signatures do not match those in the headers etc . As such I don t have a very good idea about how to best expose this . Also I would like to avoid including third party libs to achieve functionality that should be part of the core libs but it feels to me like the PyBuffer functionality is still fairly immature and perhaps something like NumPy would be a better choice . Does anyone have any advice on this .. . Answer : The set of methods to implement so that your extension type supports the buffer protocol is described here : http : docs.python.org 3.1 c-api typeobj.html buffer-object-structures .. . .. . I recognize that the documentation is pretty rough so the best advice I can give is to start from an existing implementation of the buffer API by a C type for example bytesobject.c or bytearrayobject.c in the official Python source code . However please note that the buffer protocol doesn t give access to high-level notations such as the one you quoted : img buffer 1 : : 4 255 won t work on a memoryview object . Edit : to be more precise memoryviews support some kinds of slice assignment but not all of them . Also they are not smart enough to understand that assigning 255 to a slice actually means that you want the byte value to be repeated . Example : Comment : Really Memoryviews don t do slicing I thought that was supposed to be the big benefit of using them . Do they at least support basic indexing The whole point of me trying to expose this memory is to allow Python developers to manipulate image data at a byte level and if they can t do basic indexing or slicing then this method is useless to me . Comment : See edited version above . Comment : Ah thank you for the clarification . That s more in line with what I thought . I ll have to play with that and see if I can work out a good way of achieving what I want . Thanks again", "Question : This question is related to a previous question I asked . Namely this one http : stackoverflow.com questions 15033683 calling-a-python-function-from-a-c-thread-with-a-mutable-c-array if anyone is interested . Basically what I want to do is to expose a C array to Python using a Py buffer wrapped in a memoryview -object . I ve gotten it to work using PyBuffer FillInfo work I can manipulate the data in Python and write it to stdout in C but if I try to roll my own buffer I get a segfault after the C function returns . I need to create my own buffer because PyBuffer FillInfo assumes that the format is char making the itemsize field 1 . I need to be able to provide items of size 1 2 4 and 8 . Some code this is a working example : .. . .. . Looking at the implementation of PyBuffer FillInfo which is really simple I rolled my own function to be able to provide custom itemsizes : .. . .. . How i use it : .. . .. . The result-of using my own buffer object is a segfault after the C function returns . I really don t understand why this happens at all . Any help would be most appreciated . EDIT According to this question http : stackoverflow.com questions 2297026 assignment-into-python-3-x-buffers-with-itemsize-1 rq 1 which I failed to find before itemsize 1 might not even be supported at all . Which makes this question even more interesting . Maybe I could use PyBuffer FillInfo with a large enough block of memory to hold what I want 32 C floats for example . In that case the question is more about how to assign Python floats to the memoryview object in the Python function . Questions questions . .. . Answer : So in lack of answers I decided to take another approach than the one I originally intended . Leaving this here in case someone else hits the same snag . Basically instead of creating a buffer or bytearray equiv . in C and passing it to Python for the extension user to modify . I simply redesigned the code slightly so that the user returns a bytearray or any type that supports the buffer interface from the Python callback function . This way I need not even worry about the size of the items since in my case all the C code does with the returned object is to extract its buffer and copy it to another buffer with a simple memcpy . Code : .. . .. . I hope this helps someone .", "Question : I have some 640X480 Images . I m converting these images to a binary file-format via Matlab Now I need to load the binary file in a buffer in Python and read from the buffer . Can anyone help me out with how I might do that or suggest a link Thanks . Comment : Are you saving it to a .mat file Comment : have a look at io.BytesIO docs.python.org 2 library io.html io.BytesIO https : docs.python.org 2 library io.html io.BytesIO Comment : code.runnable.com UqJdRnCIohYmAAGP http : code.runnable.com UqJdRnCIohYmAAGP reading-binary-files-in-python-for-io Comment : Can t you just treat the file as your buffer and readline one line from the file at a time and do your processing that way Just asking because 640x480 doesn t necessarily translate to a specific buffer size . You could also just read the whole file with . open image file.jpg mode rb .read Comment : I have binary file . I want buffer my file because I gono send byte by byte with serial-port and I think if I buffer the file I can send bytes faster am I right .. . Answer : If you are using the C-API you are going to want to use a Py buffer structure which is not a Python object it is unrelated to PyObject -compatible structures in the C-API . Basic information is here : https : docs.python.org 2 c-api buffer.html .. . .. . If not using C you will be interested in memoryview the Python-level analog to Py buffer and the file I O builtins and library module s : .. . .. . https : docs.python.org 2 tutorial inputoutput.html reading-and-writing-files", "Question : http : docs.python.org 2 c-api buffer.html .. . .. . int ndim .. . .. . The number of dimensions the memory represents as a multi-dimensional array . If it is 0 strides and suboffsets must be NULL . What s the real world usage for this Is it used for scatter gather vector buffers .. . Answer : Using ndim and shape is primarily for multidimensional fixed-shape arrays . For example if you wanted to build something like NumPy http : www.numpy.org from scratch you might build it around the buffer API . There are also variations to make things easy for NumPy PIL and modules that wrap typical C and Fortran array-processing libraries . If you read a bit further down the next two values both say See complex arrays http : docs.python.org 3 c-api buffer.html complex-arrays for more information . If you click that link it gives you an example of doing something like NumPy and describes how it works . Also see PEP 3118 http : www.python.org dev peps pep-3118 for some rationale . It s not primarily for jagged-shaped arrays like the scatter gather use . While you can use PIL-style suboffsets for that it s generally simpler to just use a list or array of buffers unless you re trying to interface with PIL of course . The old-style buffer API did support a mode designed specifically for scatter gather-like use but it was dropped in Python 3.x and deprecated in 2.6+ once the 3.x API was backported basically because nobody ever used it . Comment : thanks a million I am noob to scatter gather any recommend related info to get started with preparing to write network file IO tasks for exercise . Comment : @est : Python 2.x doesn t provide any scatter gather APIs . Python 3 has recvmsg into http : docs.python.org 3.3 library socket.html socket.socket.recvmsg into and sendmsg http : docs.python.org 3.3 library socket.html socket.socket.sendmsg on its sockets but they work by just providing an iterable of 1D buffers a list of bytearray s works fine so there s no need for anything more fancy . If you re using some third-party library or ctypes -ing direct to platform-specific functions like sendv then well each one will have different requirements . Comment : @est : For example on most nix platforms with sendv and or writev you have to create an array of struct iovec objects each of which has a buffer pointer and a length . No Python type has exactly that shape so you have to build it out of a ctypes.Structure . Comment : Could you explain how to implement jagged-shaped arrays using suboffsets The length of the second dimension is constant even if you have PIL-style pointer list in the first dimension isn t it Comment : @molnarg : Here http : pastebin.com Z7jQU9DR is an implementation of the relevant parts with incomplete error-handling e.g . if you run out-of-memory halfway through allocating the Jagged you ll leak all the buffers allocated so far .", "Question : I am trying to expose a buffer of image pixel information 32-bit RGBA through the Python 3.x buffer interface . After quite a bit of playing around I was able to get this working like so : .. . .. . And in python I can play with it like so : .. . .. . And that works splendidly . However it would be great if I could work with the full pixel value int 4 byte instead of individual bytes so I modified the buffer fetch like so : .. . .. . This actually returns the data and I can read it correctly but any attempt to assign a value into it now fails In case 1 the error informs me that int does not support the buffer interface which is a shame and a bit confusing I did specify that the buffer format was I after all but I can deal with that . In case 2 and 3 things get really weird though : Both cases gime me an TypeError reading mismatching item sizes for my.Image and bytes Where my.Image is obviously my image type .. . .. . This is very confusing to me since the data I m passing in is obviously the same size as what I get out of that element . It seems as though buffers simply stop allowing assignment if the itemsize is greater than 1 . Of course the documentation for this interface is really sparse and perusing through the python code doesn t really give any usage examples so I m fairly stuck . Am I missing some snippit of documentation that states buffers become essentially useless when itemsize 1 am I doing something wrong that I can t see or is this a bug in Python Testing against 3.1.1 .. . .. . Thanks for any insight you can give on this admittedly advanced issue Comment : does it say int does not support the buffer interface or object does not support the buffer interface Comment : It explicitly says int just as I typed it . Comment : ok just checking .. . Answer : I found this in the python code in memoryobject.c in Objects in the function memory ass sub : .. . .. . that s the source of the latter two errors . It looks like the itemsize for even mv 0 is still not equal to itself . Update .. . .. . Here s what I think is going on . When you try to assign something in mv it calls memory ass sub in Objects memoryobject.c but that function takes only a PyObject as input . This object is then changed into a buffer inside using the PyObject GetBuffer function even though in the case of mv 0 it is already a buffer and the buffer you want . My guess is that this function takes the object and makes it into a simple buffer of itemsize 1 regardless of whether it is already a buffer or not . That is why you get the mismatching item sizes even for .. . .. . The problem with the first assignment .. . .. . mv 0 0xFFFFFFFF .. . .. . stems I think from checking if the int is able to be used as a buffer which currently it isn t set-up for from what I understand . In other words the buffer system isn t currently able to handle item sizes bigger from 1 . It doesn t look like it is so far off but it would take a bit more work on your end . If you do get it working you should probably submit the changes back to the main Python distribution . Another Update .. . .. . The error-code from your first try at assigning mv 0 stems from the int failing the PyObject CheckBuffer when PyObject CheckBuffer is called on it . Apparently the system only handles copies from bufferable objects . This seems like it should be changed too . Conclusion .. . .. . Currently the Python buffer system can t handle items with itemsize 1 as you guessed . Also it can t handle assignments to a buffer from non-bufferable objects such as ints . Comment : Are you sure that len is supposed to be the number of items That would explain a lot but is also in direct conflict with the Python documentation docs.python.org 3.1 c-api buffer.html http : docs.python.org 3.1 c-api buffer.html : Py ssize t len - The total length of the memory in bytes . I ll give it a try though . Thanks . Comment : Yeah I no longer think that is the problem . Comment : Thanks for doing the legwork on this I m still new to the Python C APIs so I have a hard time finding the bits that I need in the code . I had already guessed as much about the int issue which isn t a big deal but it s a little disappointing that the itemsize 1 is borked . Given the time I may see if I can get that working on my own and if so I ll definitely submit the changes back in . Thanks again Comment : One final thought : In python an int isn t necessarily 32 bits so that s probably why int to buffer assignment isn t allowed : because the size of an int can be unpredictable or at least non-obvious to the uninformed user . Makes sense . Comment : so does mv 0 np.uint32 0xFFFFFFFF work after considering that len should be total number of bytes .", "Question : I have created a buffer object in python like so : .. . .. . I m now passing byte stream as a parameter to a C function through SWIG . I have a typemap for converting the data which looks like this : .. . .. . I have tried a few different things bug can t get to the actual content value of my byte stream . How do I convert or access the content of my byte stream using the C API There are many different methods for converting a C data to a buffer but none that I can find for going the other way around . I have tried looking at this object in gcb but neither it or the values it points to contain my data . I m using buffers because I want to avoid the overhead of converting the data to a string when reading it from the file I m using python-2.6 on Linux . -- Thanks Pavel .. . Answer : I m using buffers because I want to avoid the overhead of converting the data to a string when reading it from the file .. . .. . You are not avoiding anything . The string is already built by the read method . Calling buffer just builds an additional buffer object pointing to that string . As for getting at the memory pointed to by the buffer object try PyObject AsReadBuffer . See also http : docs.python.org c-api objbuffer.html .", "Question : I m working in with a C library that repeatedly calls a user supplied function pointer to get more data . I d like to write a Cython wrapper in such a way that the Python implementation of that callback can return any reasonable data type like str bytearray memory-mapped-files and so on specifically supports the Buffer interface http : docs.python.org 2 c-api buffer.html bufferobjects . what I have so far is : .. . .. . The code I want to write would produce equivalent C code but look like this : .. . .. . The generated C code looks like what I think it should be doing but this seems like digging around in the Python API unnecessarily . Does Cython provide a nicer syntax to achieve this effect .. . Answer : If you want to support everything that implements every variation of the new-style or old-style buffer interface then you have to use the C API . But if you don t care about old-style buffers you can almost always use a memoryview http : docs.cython.org src userguide memoryviews.html python-buffer-support : .. . .. . Cython memoryviews support nearly all objects exporting the interface of Python new style buffers . This is the buffer interface described in PEP 3118 . NumPy arrays support this interface as do Cython arrays . The nearly all is because the Python buffer interface allows the elements in the data array to themselves be pointers Cython memoryviews do not yet support this . This of course includes str or in 3.x bytes bytearray etc if you followed the link you may notice that it links to the same page to explain what it supports that you linked to explain what you want to support . For 1D arrays of characters like str it s :", "Question : I am quite confused with the term buffer Interface in python . what does it mean to say that A python object exposing its underlying memory structure can someone explain with an example . Thanks in advance .. . Answer : Underlying memory structure refers to the sequence of octets that comprise the object in computer memory . For example when you create the string abc Python must reserve at least 3 bytes of memory and store the letters a b and c . If the memory is contiguous as is the case for strings its address and size can be passed to any piece of C code that wants to inspect it without going through the overhead of the Python str type . A useful example is the array http : docs.python.org 2 library array.html type . An array is a sequence that works much like a Python list with the difference that it contains single-typed elements - you can have an array of ints and an array of floats but you can t mix the two . The benefit is that arrays pack data as efficiently as possible storing them in a flat C array . This array is exposed through the buffer interface - it allows one to query the exact memory position and size of the underlying C array and pass it to some C function that will efficiently initialize it or write it out to disk . The numpy numeric package is built around this kind of data sharing between Python and C and even FORTRAN for which they extended the buffer protocol and some of these extensions made it into Python 3 . The mmap object which provides a Python interface to OS-level memory mapping functionality also provides a buffer interface . This enables C code that must efficiently access the memory such as the re module to also work with memory-mapped regions . Comment : Does it mean to say that every python object has an equivalent C representation which is used by python interpreter for processing . and we can access that C representation for objects which support buffer interface Comment : @user634615 Every Python object must be somehow represented in memory and since CPython is implemented in C the representation is ultimately based on C s data types . In some cases arrays it is possible and useful to expose this representation outside Python . In other cases this is either useless as with lists which are internally arrays of internal pointers to Python objects or downright impossible as with dicts which are internally hash tables with fairly complex structures and as such cannot be represented as a single buffer . Comment : See also this explanation by Guido http : mail.python.org pipermail python-dev 2000-October 009974.html . Comment : Thanks a lot user4815162342", "Question : I have created a buffer object in python like so : .. . .. . I m now passing byte stream as a parameter to a C function through SWIG . I have a typemap for converting the data which looks like this : .. . .. . I have tried a few different things bug can t get to the actual content value of my byte stream . How do I convert or access the content of my byte stream using the C API There are many different methods for converting a C data to a buffer but none that I can find for going the other way around . I have tried looking at this object in gcb but neither it or the values it points to contain my data . I m using buffers because I want to avoid the overhead of converting the data to a string when reading it from the file I m using python-2.6 on Linux . -- Thanks Pavel .. . Answer : As soon as you use the read method on your file object the data will be converted to a str object calling the buffer method does not convert it into a stream of any kind . If you want to avoid the overhead of creating the string object you could simply pass the file object to your C code and then use it via its C API http : docs.python.org c-api file.html .", "Question : I am in the process of extending the classes in our library which supports Python 2.7 to support PEP 3118 http : legacy.python.org dev peps pep-3118 which has been back-ported to 2.7 . From the documentation I need to initialize the tp as buffer field to point to a PyBufferProcs . From the documentation for 2.7 however the description of this structure https : docs.python.org 2 c-api typeobj.html c.PyBufferProcs only contains entries for the old buffer protocol . From the sources I gather https : github.com python cpython blob master Objects bytearrayobject.c L3648-3651 that PyBufferProcs has some additional entries for the new protocol bf getbuffer and bf releasebuffer . The questions remain : .. . .. . Do I have to do something special to tell Python that these new entries are valid Do I have to fill in the entries for the old protocol The documentation for 2.7 says for example that bf getsegcount may not be null . But this entry shouldn t be used if I m supporting PEP 3118 . Comment : Look at bytearray as buffer http : hg.python.org cpython file ee879c0ffa11 Objects bytearrayobject.c l2800 in 2.7 with the additional fields for bf getbuffer and bf releasebuffer . Also PyByteArray Type.tp flags http : hg.python.org cpython file ee879c0ffa11 Objects bytearrayobject.c l2893 sets Py TPFLAGS HAVE NEWBUFFER . PyObject GetBuffer http : hg.python.org cpython file ee879c0ffa11 Objects abstract.c l357 uses the PyObject CheckBuffer http : hg.python.org cpython file ee879c0ffa11 Include abstract.h l534 macro to check that this flag is set . Comment : Yes absolutely I have looked at exactly those things but that isn t the problem we are asking about unless I am missing something those are the public official Python API funcs which won t respond properly to our python C-extension objects without the proper and needlessly cryptically documented stuff set up in the related PyBufferProcs as appropriately pointed at in the type struct def . Help us with getting all of that proper and correct Comment : The question s gather https : github.com python cpython blob master Objects bytearrayobject.c L3648-3651 link points at Python 3 s bytearray implementation which doesn t use the Python 2 version of PyBufferProcs that has six fields including the last two for the new buffer protocol . Using just the new protocol only requires those two fields . The Python 3 source also doesn t use the Py TPFLAGS HAVE NEWBUFFER flag that s just in Python 2 . Setting this flag is the something special that tells PyObject CheckBuffer that the new entries are valid . Comment : @eryksun IS CORRECT . I got my objects Py buffered this very morning with this . .. . Answer : You can just fill the last two fields of PyBufferProcs but you have to add the Py TPFLAGS HAVE NEWBUFFER flag to the tp flags of your types . This is the special thing that was introduced in python2 to make the new protocol available together with the old one . I have no idea why this isn t documented anywhere but you can see it used in the definition of the bytearray type for python-2.7 see here https : hg.python.org cpython file ee879c0ffa11 Objects bytearrayobject.c l2914 : .. . .. . .. . .. . This content was already posted in comments but it deserves an answer . Comment : It cannot be overstated how correct this is the lack of documentation for Py TPFLAGS HAVE NEWBUFFER is actually listed as a Python bug q.v . bugs.python.org issue23850 https : bugs.python.org issue23850 and as @Bakuriu says it s the special thing one needs to unleash PEP 3118 . Yes", "Question : I am searching for a memory leak in code of someone else . I found : .. . .. . In function current is no free or similar neither in VideoFrame . Is the PyBuffer automatically freed when the VideoFrame object gets deleted .. . Answer : The answer is : it depends we don t have enough code to tell from your question . It s governed by what type you ve told Cython that PyBuffer New returns . I ll give two simplified illustrating cases and hopefully you should be able to work it out for your more complicated case . If you tell Cython that it s a PyObject it has no innate knowledge of that type and doesn t do anything to keep track of the memory : .. . .. . and the generated code for the loop pretty much looks like : .. . .. . i.e . memory is being allocated but never freed . If you run test and look at a task manager you can see the memory usage jump up and not return . Alternatively if you tell Cython it s an object that lets Cython deal with it like any other Python object and manage the reference count correctly : .. . .. . The generated code for the loop is then .. . .. . Note the DECREF which will be where the object is deallocated . If you run test here you see no long-term jump in memory usage . It may be possible to jump between these two cases by using cdef for variable for example in the definition of VideoFrame . If they use PyObject without careful DECREF s then they re probably leaking memory.. . Comment : thanks It seems the author has implemented the correct object PyBuffer New int size way . Also I see that in VideoFrame data is defined as cdef readonly object data . Is that the case where it could leak Comment : Just found that Pyx GOTREF pyx t 2 is called in the C-file after PyBuffer New . So I suppose everything is correctly implemented . Comment : @P.R . I can t see anything I m immediately suspicious of including for VideoFrame.data . Although obviously it s hard to tell from this . The tool of choice for finding memory-leaks on Linux at least is Valgrind . It s been a while since I made real use of it though so I can t give any real advice ." ] }
[ "yes-answer-long", "yes-answer-short" ]
interface
UNK_RELATION
slidingdrawer@widget@51
slidingdrawer -- slidingdrawer is an android-view @placeholder that hides content out of the screen and allows the user to drag a handle to bring the content on screen .
{ "confidence": [ 51.61658477783203, 48.43737030029297, 48.11238479614258, 46.81592559814453, 46.642913818359375, 46.23183822631836, 46.2232780456543, 45.53290557861328, 45.36665344238281, 45.36665344238281, 43.92902755737305, 43.78778076171875, 43.6441764831543, 43.53608703613281, 42.63338851928711, 41.41794967651367, 41.0776252746582, 41.0776252746582, 40.68061065673828, 40.370513916015625, 40.370513916015625, 40.1414680480957, 39.866390228271484, 39.49875259399414, 39.10066604614258, 38.210411071777344, 37.74749755859375, 37.74749755859375, 37.74749755859375, 37.74749755859375, 37.74749755859375, 37.5985221862793, 37.58684539794922, 37.298274993896484, 37.19594192504883, 36.881526947021484, 36.512210845947266, 36.16862487792969, 36.16862487792969, 36.16862487792969, 36.16862487792969, 36.019649505615234, 36.019649505615234, 36.019649505615234, 35.72332763671875, 35.72332763671875, 35.5841064453125, 35.121192932128906, 35.121192932128906, 35.121192932128906, 34.54821014404297, 34.237701416015625, 33.71683883666992, 33.35967254638672, 33.26183319091797, 33.26183319091797, 33.26183319091797, 33.26183319091797, 32.89910888671875, 32.77399826049805, 32.45419692993164, 32.10429763793945, 32.06865692138672, 31.682960510253906, 31.682960510253906, 31.682960510253906, 31.682960510253906, 31.682960510253906, 31.682960510253906, 31.668338775634766, 31.40538787841797, 30.753711700439453, 30.672847747802734, 30.635526657104492, 30.635526657104492, 30.631683349609375, 30.516510009765625, 30.516510009765625, 30.516510009765625, 30.516510009765625, 30.172073364257812, 29.529661178588867, 29.380149841308594, 29.246231079101562, 29.07880401611328, 28.878692626953125, 27.907535552978516, 27.89020347595215, 27.882694244384766, 27.640850067138672, 27.441650390625, 27.31591033935547, 26.925373077392578, 26.758373260498047, 26.63482666015625, 26.51372528076172, 26.494396209716797, 26.494239807128906, 26.42222023010254, 26.092697143554688 ], "content": [ "All you have to do is to set the rotation of 180 for the slidingDrawer the content and the handle .", "I m trying to create a SlidingDrawer with LinearLayout content over a FrameLayout .", "then place the frameLayout that is after the slidingDrawer before the slidingDrawer .", "In expanded open mode this implementation will work just as the standard SlidingDrawer but in collapsed closed mode the content screen will never become completely hidden unless you specify semiClosedContentSize 0dp which will turn it into a standard SlidingDrawer .", "Even though the SlidingDrawer view is in focus it is still possible to click on items buttons and other elements in the view that is behind the SlidingDrawer .", "This is SlidingDrawer XML .", "This is the scenario : I have a button B and a slidingdrawer that when pulled out covers the entire screen .", "I have a SlidingDrawer that pops up from the bottom of the screen and fills the screen about 80 .", "Dont use SlidingDrawer it is deprecated", "I used it.sephiroth.slider.widget.MultiDirectionSlidingDrawer as the SlidingDrawer", "SlidingDrawer is deprecated .", "Which slidingDrawer are you using", "SlidingDrawer has a handle built-in that you can pull out from the side .", "I create a menu using SlidingDrawer .", "On your SlidingDrawer override onTouch View v MotionEvent event and return true .", "That being said SlidingDrawer should be in the Android SDK for the foreseeable future .", "In this SlidingDrawer there are many items ImageViews EditText TextViews etc . .", "Some clarification : Set this xml-attribute on the SlidingDrawer element .", "Also note that SlidingDrawer was deprecated in API 17 Android 4.2 so it s probably better to future proof-yourself and migrate away from SlidingDrawer .", "This implementation is based on the implementation of SlidingDrawer in Android-4 1.6 but is compatible up to incl .", "You can use the code posted in this answer : Android SlidingDrawer from top", "are there already some open-source project that extends the slidingDrawer out there", "I can still click on where the handle should be on the screen drag it and the content would show but I need to guess where the handle is .", "I ve tried to put SlidingDrawer in the RelativeLayout instead of LinearLayout .", "This specific SlidingDrawer above is configured to use horizontal orientation and a 40dp wide and fill-parent high strip of the content view will be shown to the right in collapsed closed mode .", "I first thought it s a visibility issue because the visibility of the content is set to GONE in onFinishInflate prepareContent closeDrawer .. . copied the SlidingDrawer and removed these lines didn t solve it .", "Also in my manifest i wrote this line : .. . .. . But the SlidingDrawer still remain visible .", "The strange thing as I said before is that sometimes the SlidingDrawer is already opened sometimes not", "Here s the complete XML code of my SlidingDrawer : .. . .. . Any suggestions", "For the complexity of the project and it final utilization we have to use SlidingDrawer .", "By putting your SlidingDrawer last it will overlap everything else when opened .", "I m new to Android programming and to stack-overflow and I need to slow down the animation speed of a SlidingDrawer in my app .", "So I have a GoogleMap in my activity actually a fragment but it doesn t matter and a nice SlidingDrawer in the same screen .", "Would I write the onTouch method in the Report.java class and pass a view that would be owned by the SlidingDrawer or something along those lines", "I can t understand is it a SlidingDrawer NavigationDrawer or somesing else .", "http : stackoverflow.com questions 3695856 android-slidingdrawer-from-top 18341293 18341293 .. . .. . The provided solution features setting the orientation of the Slidingdrawer in xml also it s simple requiring only 1 class and some additions in attrs.xml and stable since it s derived from Androids Slidingdrawer from SDK .", "You can similarly make a SlidingDrawer that descends from the top like I did here http : stackoverflow.com questions 3695856 android-slidingdrawer-from-top 11227689 11227689 .", "I ve created a replacement widget for SlidingDrawer it works in all directions .", "In the last version of my app i finally dumped the SlidingDrawer .", "If I set the SlidingDrawer s layout height to a specific value e.g .", "Can be some state of slidingdrawer that avoid to click childs when collapsed", "The error appears when you insert the custom listview Android SlidingDrawer pressed the button on the listview .", "I just noticed that since API 17 the SlidingDrawer https : developer.android.com reference android-widget SlidingDrawer.html it s been deprecated .", "stackoverflow.com questions 5393314 http : stackoverflow.com questions 5393314 android-slidingdrawer-doesnt-disable-buttons-under-the-drawer lq 1", "It looks like the map want s to stay in front of the slidingdrawer .", "I changed the slidingdrawer and used a slidingmenu instead .", "I had a similar problem and I ended up modifying SlidingDrawer to be able to show a part of the content when the Drawer is collapsed closed .", "I could not find any code samples for SlidingDrawer or for Fragment .", "I need to make the SlidingDrawer to be partially opened at the beginning of the activity .", "You similarly cannot make a SlidingDrawer that descends from the top .", "If I drag the handle all the way up the entire content eventually gets shown however if I now drag the handle down it will be clipped by the border rectangle of the content .", "I ve already subclassed SlidingDrawer like this : .. . .. . .. . .. . I found this link : How to change animation velocity on SlidingDrawer http : groups.google.com group android-developers browse thread thread a7d0102811474bfe and it says that I can find an alternative implementation or copy the source and modify it .", "I have a SlidingDrawer http : developer.android.com reference android-widget SlidingDrawer.html that contains a ListFragment .", "Like I said it s probably better to migrate away from SlidingDrawer entirely since you can t rotate a drawer until 3.0 and SlidingDrawer was deprecated in 4.2 .", "I have tried with creating a fragment with SlidingDrawer layout but not able to implement like a default notification sliding panel .", "Only difference than lxx s code is that I did not copy all SlidingDrawer class but extended it by making new class .", "What seems to be causing this is the fact that I have a SurfaceView in the xml file just before SlidingDrawer .", "Does this mean that they re doing the SlidingDrawer rendering directly in the SurfaceView or are they doing it all manually with OpenGL", "I m trying to implement a SlidingDrawer that will occupy the full screen width but whose height is determined dynamically by its contents : in other words standard fill-parent layout behaviour for the width and wrap content for the height .", "What I d like is for the content to sit neatly on the bottom of the screen .", "When SlidingDrawer is active pulled up in focus I want to disable the entire view behind it so it will not be able to recieve clicks and touches .", "Take a look at github.com Ali-Rezaei SlidingDrawer https : github.com Ali-Rezaei SlidingDrawer which makes it possible to slide from any side by few lines-of-code .", "I managed to get it working using android : bottomOffset -50dip the problem with this is that the SlidingDrawer keeps the content s visibility on GONE until the handle is pressed or opened on its totally .", "Personally I would dump SlidingDrawer and do something else for all new app development .", "I just discovered SlidingDrawer and it looks like exactly the UI interaction I want .", "The documentation on SlidingDrawer is a bit vague on this and I haven t been able to find any examples that do what I m after either .", "The onMeasure method of the SlidingDrawer class basically overrides the layout modes to fill-parent this is why layout height wrap content is not working .", "To get around this you can extend SlidingDrawer with a re-implemented onMeasure method that honors the layout width and layout height attributes .", "You can then use this custom class in your XML layout by replacing SlidingDrawer .. . with fully.qualified.package.ClassName .. . .", "This implementation ought to be compatible with future versions of Android as well almost nothing has changed in SlidingDrawer between API 4 and API 14 .", "If I add shadow for handle and content separately by giving image with shadow as background for both handle and content then the shadow makes a gap between the handle and content .", "does this mean I should import the code http : grepcode.com file repository.grepcode.com java ext com.google.android android 4.1.1 r1 android-widget SlidingDrawer.java SlidingDrawer into my project to be sure that it will be supported in the future", "I want to just have something that covers the entire screen and then at the bottom of it I d like to have a handle that will only open up to the content it needs to show.. .", "slidingdrawer succes in front..but i got new problem...listview doesn t display i get error java.lang.ClassCastException : android.widget.listview", "I m using a slidingDrawer in my application that has its handler placed at the bottom when in portrait mode .", "Take a look at github.com Ali-Rezaei SlidingDrawer https : github.com Ali-Rezaei SlidingDrawer which makes it possible to slide from any side by few lines-of-code and much more simpler than slidingUpPanel to work with .", "The problem is that sometimes when I open the Activity I find my SlidingDrawer already opened even if I did not write specific code for this .", "Here is a working solution : .. . .. . Create a full copy of SlidingDrawer class and then replace the method dispatchDraw so it looks like this : .. . .. . What I did was comment lines .", "My problem is that I don t know how to call a method on my SlidingDrawer as I have no such method as far as I can tell in my Report.java class .", "Added the component to the program now but the question is how I can override the onTouch-method when I instantiate the SlidingDrawer using the findViewById .", "It has to show on the bottom of the screen and I need to slide drag it to the center of the screen .", "The problem seems to be related to bringing the off-screen view on-screen as starting with LeftPanel off-screen gives me the same problem .", "Because the SlidingDrawer class was deprecated in API 17 the source code was copied over an accessed via a local class .", "This is a bit similar to the android 5 notification bar where you drag down to reveal half the view then another drag down will reveal the whole view .", "When I pull out the screen and touch the screen where B used to be visible its action is still executed .", "I found this http : stackoverflow.com questions 2596571 how-can-i-disable-a-view-behind-my-slidingdrawer-in-android thread describing the very same problem but no answer was accepted and the ones given I didn t manage to get working .", "It works fine but when I open or close the slidingdrawer over the map it starts behaving weird .", "I don t think you can other than perhaps by grabbing the SlidingDrawer source code making changes to it and using your modified version .", "enter image description here http : i.stack.imgur.com Ch0ns.png .. . .. . I was almost able to do it with the SlidingDrawer widget it s deprecated. . the only problem is that I don t know how to make the LinearLayout to appear in the middle and then to shift when the button to expand the SlidingDrawer is clicked .", "But then if I start dragging the handle up and the content starts showing it gets clipped by the border rectangle of the handle .", "Just adding to @f-horn s answer : .. . .. . If you include a layout from a different file like I do for the SlidingDrawer you have to put the android : clickable true in the included layout file not in the include tag .", "This default behaviour also looks erroneous to me I don t know why somebody would want to make the offset only for the handle making a gap between it and the content and then on touch put the content directly under the handle.. .", "It checks if a x y relative to the click are contained in a rectangle created starting from the HandleButton view of sliding drawer.. . .. . .. . and this is obviously false because i m clicking on a button contained inside the content part of slidingdrawer and that s ok.. . .. . As i said above the problem is that in semi-collapsed state buttons contained in content part are not receiving the event.. . .. . .. . Have you any idea how can i solve this issue", "So for instance if your SemiClosedSlidingDrawer view is located at the very bottom of the screen you can use a simple detection algorithm like this : .. . .. . Now the touch-events during the user s interaction with the semi-opened content will be dispatched to onTouchEvent .", "What happens is when the users provides input and filters the list such that there are no matching results i.e . the ListView is empty and size is 0 the entire SlidingDrawer disappears .", "Maybe try something like setting the innner content of the of the slidingdrawer be something like .. . .. . then set the button ShowMore to toggle the visibility of the linearlayout More between View.GONE and View.VISIBLE .. . .. . EDIT : Hmm re-reading your question I m actually a little confused : the title is ..opened on start but then you say open partially .", "The height of my content varies but typically it s only about half the screen height so I end up with a big gap underneath it .", "However because SlidingDrawer in its default state only opened right-to-left this drawer applies the XML attribute android : rotation 180 to flip the view so that it can be opened left to right .", "At first it all seems fine I get my SlidingDrawer s handle at the bottom of the screen .", "for some reason the second view only allows me to create a Text view which is for the handle to slide it up ." ] }
{ "confidence": [ 75.67471313476562, 75.57144165039062, 72.37673950195312, 66.60150909423828, 66.25492858886719, 66.16654968261719, 65.94348907470703, 65.43081665039062, 65.00469207763672, 64.81485748291016, 64.80498504638672, 64.80498504638672, 63.425086975097656, 62.69164276123047, 61.95791244506836, 61.95791244506836, 59.938331604003906, 59.69048309326172, 59.557029724121094, 59.51144027709961 ], "content": [ "Question : I m trying to create a SlidingDrawer with LinearLayout content over a FrameLayout . At first it all seems fine I get my SlidingDrawer s handle at the bottom of the screen . But then if I start dragging the handle up and the content starts showing it gets clipped by the border rectangle of the handle . If I drag the handle all the way up the entire content eventually gets shown however if I now drag the handle down it will be clipped by the border rectangle of the content . Also if the handle is all the way up as soon as I start dragging it the whole content disappears . I can still click on where the handle should be on the screen drag it and the content would show but I need to guess where the handle is . What seems to be causing this is the fact that I have a SurfaceView in the xml file just before SlidingDrawer . Removing the view from the xml solves this problem however I need this view . Here s the xml : .. . .. . Java : .. . .. . Edit : I just noticed that if DrawView extends View and not SurfaceView this problem goes away . However I m using a dedicated drawing thread and according to the documentation and LunarLander example when using a dedicated drawing thread it should draw to a SurfaceView . Any help would be greatly appreciated .. . Answer : android : background 00000000 .. . .. . Background color was the problem . Comment : Cheers that worked Comment : Some clarification : Set this xml-attribute on the SlidingDrawer element . Comment : I don t think this actually solves the problem . The region where the drawer would have been becomes blacked-over and the SurfaceView is not visible in that region even when the drawer is closed . I am still having the problem where the background is clipped by the location the handle would have occupied if the drawer were open . Comment : This totally solved the problem for me although I have no idea why . Thanks", "Question : I m trying to create a SlidingDrawer with LinearLayout content over a FrameLayout . At first it all seems fine I get my SlidingDrawer s handle at the bottom of the screen . But then if I start dragging the handle up and the content starts showing it gets clipped by the border rectangle of the handle . If I drag the handle all the way up the entire content eventually gets shown however if I now drag the handle down it will be clipped by the border rectangle of the content . Also if the handle is all the way up as soon as I start dragging it the whole content disappears . I can still click on where the handle should be on the screen drag it and the content would show but I need to guess where the handle is . What seems to be causing this is the fact that I have a SurfaceView in the xml file just before SlidingDrawer . Removing the view from the xml solves this problem however I need this view . Here s the xml : .. . .. . Java : .. . .. . Edit : I just noticed that if DrawView extends View and not SurfaceView this problem goes away . However I m using a dedicated drawing thread and according to the documentation and LunarLander example when using a dedicated drawing thread it should draw to a SurfaceView . Any help would be greatly appreciated .. . Answer : SurfaceView works by cutting a hole through the window to display another surface the one you draw into . This is what is causing the SlidingDrawer s drawer to be clipped . I m sorry to say you won t be able to use both views together . Comment : Thanks for your answer Shame though.. . Comment : I noticed that they basically have this feature in the HTC std camera app . Does this mean that they re doing the SlidingDrawer rendering directly in the SurfaceView or are they doing it all manually with OpenGL Comment : Adding the background-color got it working on all devices I ve tried . Before that it was working with some devices and not others .", "Question : I am working a piece of my app and I was wondering if it s possible to have a Sliding Drawer open partially instead of being fully closed so the user can peak at the text content before clicking the show more button which would be able to show the rest of the text . Thanks in advance . .. . Answer : I had a similar problem and I ended up modifying SlidingDrawer to be able to show a part of the content when the Drawer is collapsed closed . With SemiClosedSlidingDrawer http : pastebin.com FtVyrcEb you specify how much of the content screen that should be shown in collapsed closed mode with the dimension attribute semiClosedContentSize : .. . .. . Then your attrs.xml in res values also needs to contain : .. . .. . where se.smartrefill.app.x refers to the application package defined in the AndroidManifest . This specific SlidingDrawer above is configured to use horizontal orientation and a 40dp wide and fill-parent high strip of the content view will be shown to the right in collapsed closed mode . In expanded open mode this implementation will work just as the standard SlidingDrawer but in collapsed closed mode the content screen will never become completely hidden unless you specify semiClosedContentSize 0dp which will turn it into a standard SlidingDrawer . This implementation is based on the implementation of SlidingDrawer in Android-4 1.6 but is compatible up to incl . Android-14 4.0 . This implementation ought to be compatible with future versions of Android as well almost nothing has changed in SlidingDrawer between API 4 and API 14 . This implementation supports both vertical and horizontal orientation . Try it out Regards Jacob Comment : Thanks a lot for this implementation it worked for me BUT and I know I m a year late but hopefully it might help other people reading this : On line 519 there are two minus - signs there should be one . Otherwise the tap-to-expand won t work when using semi-closed content . Comment : I am an iOS Developer and new to Android could you please provide a sample project it s great if you can modify this androidhive.info 2013 11 http : www.androidhive.info 2013 11 android-sliding-menu-using-navigation-drawer", "Question : I m trying to implement a SlidingDrawer that will occupy the full screen width but whose height is determined dynamically by its contents : in other words standard fill-parent layout behaviour for the width and wrap content for the height . That s exactly how I ve specified it in the layout XML see below but the sliding drawer always opens to the full screen height . The height of my content varies but typically it s only about half the screen height so I end up with a big gap underneath it . What I d like is for the content to sit neatly on the bottom of the screen . I ve tried everything I can think of to fix it but nothing s worked so far . If I set the SlidingDrawer s layout height to a specific value e.g . 160dip it works but that s not what I need : it has to be dynamic . Of course I ve made sure all the child elements have their height set to wrap content too . The documentation on SlidingDrawer is a bit vague on this and I haven t been able to find any examples that do what I m after either . If anyone can see where I m going wrong I d really appreciate your help .. . Answer : The onMeasure method of the SlidingDrawer class basically overrides the layout modes to fill-parent this is why layout height wrap content is not working . To get around this you can extend SlidingDrawer with a re-implemented onMeasure method that honors the layout width and layout height attributes . You can then use this custom class in your XML layout by replacing SlidingDrawer .. . with fully.qualified.package.ClassName .. . . Note that since the drawer will no longer be filling the parent layout you will have to enclose it in a LinearLayout with the gravity attribute set to the edge where the drawer should be . Below are a class I have created for this purpose and an example layout . WrappingSlidingDrawer class : .. . .. . Example layout assuming WrappingSlidingDrawer is in package com.package : Comment : Great stuff I struggled for weeks with this sliding drawer issue . Thanks a lot Comment : Its good n helped me a lot. . thanks : Comment : Fantastic : thanks for such a detailed answer and sorry it took me so long to get round to accepting it Comment : Thank you so much for this . I d give you +100 if I could . Comment : This is great however how do I align something to fill the screen until the handle the way it works now the linearlayout is on fill width and height so i can t fit anything else on the screen.. . any tips I want to just have something that covers the entire screen and then at the bottom of it I d like to have a handle that will only open up to the content it needs to show.. . In other words - I d like to align an element to be above the handle - is that possible using this method", "Question : I have a SlidingDrawer that pops up from the bottom of the screen and fills the screen about 80 . Even though the SlidingDrawer view is in focus it is still possible to click on items buttons and other elements in the view that is behind the SlidingDrawer . When SlidingDrawer is active pulled up in focus I want to disable the entire view behind it so it will not be able to recieve clicks and touches . Is there a good way to disable an entire view I have tried setEnable false and setClickable false but neither of them work . Help Comment : I use sliding drawer too but never had this problem Comment : Did you figure this one out Having the same problem . Comment : stackoverflow.com questions 5393314 http : stackoverflow.com questions 5393314 android-slidingdrawer-doesnt-disable-buttons-under-the-drawer lq 1 Comment : use this : - stackoverflow.com a 31587294 4395114 http : stackoverflow.com a 31587294 4395114 .. . Answer : I don t know if this will work but it s worth a try . Call setDescendantFocusability ViewGroup.FOCUS BLOCK DESCENDANTS http : developer.android.com intl zh-CN reference android-view ViewGroup.html setDescendantFocusability 28int 29 on your container View the one that the sliding drawer slides over . Comment : @Sara please let us know if it works .", "Question : This is the scenario : I have a button B and a slidingdrawer that when pulled out covers the entire screen . When I pull out the screen and touch the screen where B used to be visible its action is still executed . How can I get around this I found this http : stackoverflow.com questions 2596571 how-can-i-disable-a-view-behind-my-slidingdrawer-in-android thread describing the very same problem but no answer was accepted and the ones given I didn t manage to get working . UPDATE : I have a file named Report.java with a corresponding report.xml file as seen below . Adding components : .. . Answer : Just adding to @f-horn s answer : .. . .. . If you include a layout from a different file like I do for the SlidingDrawer you have to put the android : clickable true in the included layout file not in the include tag . Let me rather use an example : .. . .. . This will not work : .. . .. . main.xml .. . .. . This will : .. . .. . main.xml .. . .. . some other layout.xml :", "Question : I have a SlidingDrawer that pops up from the bottom of the screen and fills the screen about 80 . Even though the SlidingDrawer view is in focus it is still possible to click on items buttons and other elements in the view that is behind the SlidingDrawer . When SlidingDrawer is active pulled up in focus I want to disable the entire view behind it so it will not be able to recieve clicks and touches . Is there a good way to disable an entire view I have tried setEnable false and setClickable false but neither of them work . Help Comment : I use sliding drawer too but never had this problem Comment : Did you figure this one out Having the same problem . Comment : stackoverflow.com questions 5393314 http : stackoverflow.com questions 5393314 android-slidingdrawer-doesnt-disable-buttons-under-the-drawer lq 1 Comment : use this : - stackoverflow.com a 31587294 4395114 http : stackoverflow.com a 31587294 4395114 .. . Answer : I ve tried to put SlidingDrawer in the RelativeLayout instead of LinearLayout . And set mySlidingDrawer.bringToFront in opening method . So I think this may be a solution .", "Question : This is the scenario : I have a button B and a slidingdrawer that when pulled out covers the entire screen . When I pull out the screen and touch the screen where B used to be visible its action is still executed . How can I get around this I found this http : stackoverflow.com questions 2596571 how-can-i-disable-a-view-behind-my-slidingdrawer-in-android thread describing the very same problem but no answer was accepted and the ones given I didn t manage to get working . UPDATE : I have a file named Report.java with a corresponding report.xml file as seen below . Adding components : .. . Answer : you could add android : clickable true to your slider content-tag id reportContent . that way it won t click through . your buttons inside the slider should still work. . i hope Comment : If you include a layout from a different file like I do you have to put the android : clickable true in the included layout file not in the include tag . Let me rather use an example : Comment : yap this did it . My case : sliding drawer over a recyclerview . Use drawer name .setclickable true or false to enable or disable the view underneath .", "Question : I have a SlidingDrawer that pops up from the bottom of the screen and fills the screen about 80 . Even though the SlidingDrawer view is in focus it is still possible to click on items buttons and other elements in the view that is behind the SlidingDrawer . When SlidingDrawer is active pulled up in focus I want to disable the entire view behind it so it will not be able to recieve clicks and touches . Is there a good way to disable an entire view I have tried setEnable false and setClickable false but neither of them work . Help Comment : I use sliding drawer too but never had this problem Comment : Did you figure this one out Having the same problem . Comment : stackoverflow.com questions 5393314 http : stackoverflow.com questions 5393314 android-slidingdrawer-doesnt-disable-buttons-under-the-drawer lq 1 Comment : use this : - stackoverflow.com a 31587294 4395114 http : stackoverflow.com a 31587294 4395114 .. . Answer : Here s a way to get around this problem I needed a solution also - grab the linearLayout that holds the contents and add a click listener . Have the click listener respond to clicks throw away whatever - and this then stops it propagating to the view below the sliding drawer - it works for me - and it doesn t block the other items in the drawer . Comment : +1 This works great . Thanks Comment : Work great jugaad Comment : This amounts to what @mansukh says below - but his way is less code .", "Question : This is the scenario : I have a button B and a slidingdrawer that when pulled out covers the entire screen . When I pull out the screen and touch the screen where B used to be visible its action is still executed . How can I get around this I found this http : stackoverflow.com questions 2596571 how-can-i-disable-a-view-behind-my-slidingdrawer-in-android thread describing the very same problem but no answer was accepted and the ones given I didn t manage to get working . UPDATE : I have a file named Report.java with a corresponding report.xml file as seen below . Adding components : .. . Answer : On your SlidingDrawer override onTouch View v MotionEvent event and return true . The one thing I am uncertain about is whether the framework will consider the drawer to overlay the View even when it is closed . If that is the case then you should add some checks to see the state of the drawer returning isOpened which will be true when the drawer is opened but false when it is closed . Comment : My problem is that I don t know how to call a method on my SlidingDrawer as I have no such method as far as I can tell in my Report.java class . Can you elaborate a little on how this would be implemented Would I write the onTouch method in the Report.java class and pass a view that would be owned by the SlidingDrawer or something along those lines Comment : Added the component to the program now but the question is how I can override the onTouch-method when I instantiate the SlidingDrawer using the findViewById .", "Question : I have a SlidingDrawer that pops up from the bottom of the screen and fills the screen about 80 . Even though the SlidingDrawer view is in focus it is still possible to click on items buttons and other elements in the view that is behind the SlidingDrawer . When SlidingDrawer is active pulled up in focus I want to disable the entire view behind it so it will not be able to recieve clicks and touches . Is there a good way to disable an entire view I have tried setEnable false and setClickable false but neither of them work . Help Comment : I use sliding drawer too but never had this problem Comment : Did you figure this one out Having the same problem . Comment : stackoverflow.com questions 5393314 http : stackoverflow.com questions 5393314 android-slidingdrawer-doesnt-disable-buttons-under-the-drawer lq 1 Comment : use this : - stackoverflow.com a 31587294 4395114 http : stackoverflow.com a 31587294 4395114 .. . Answer : Joe s answer did not do the trick for me . My scenario is a bit diferent . I have a FrameLayout with two children . Only one of the children has to be active at a given moment and while the second is active the first should no longer process any input . My solution : .. . .. . Enjoy", "Question : I have a SlidingDrawer that pops up from the bottom of the screen and fills the screen about 80 . Even though the SlidingDrawer view is in focus it is still possible to click on items buttons and other elements in the view that is behind the SlidingDrawer . When SlidingDrawer is active pulled up in focus I want to disable the entire view behind it so it will not be able to recieve clicks and touches . Is there a good way to disable an entire view I have tried setEnable false and setClickable false but neither of them work . Help Comment : I use sliding drawer too but never had this problem Comment : Did you figure this one out Having the same problem . Comment : stackoverflow.com questions 5393314 http : stackoverflow.com questions 5393314 android-slidingdrawer-doesnt-disable-buttons-under-the-drawer lq 1 Comment : use this : - stackoverflow.com a 31587294 4395114 http : stackoverflow.com a 31587294 4395114 .. . Answer : In side Layout do android : clickable true .. . .. . For Example Following file is drawer.xml .. . .. . Inside LinearLayout android : id @+id drawer view clickable true Comment : To my mind this is the easiest and most direct solution to layouts that cover each other - this makes the background of the covering page absorb the click as opposed to passing it down . Comment : because i can t override SwipeRefreshLayout method canChildScrollUp thats why i use this solution .", "Question : This is the scenario : I have a button B and a slidingdrawer that when pulled out covers the entire screen . When I pull out the screen and touch the screen where B used to be visible its action is still executed . How can I get around this I found this http : stackoverflow.com questions 2596571 how-can-i-disable-a-view-behind-my-slidingdrawer-in-android thread describing the very same problem but no answer was accepted and the ones given I didn t manage to get working . UPDATE : I have a file named Report.java with a corresponding report.xml file as seen below . Adding components : .. . Answer : hey i stuck with this error for days so there is the simple answer .. . .. . you ve already created in your class the slidingdrawer whatever just implement in your class OnDrawerOpenListener onDrawerCloseListener .. . .. . then let the class add the unimplemented methods and go to the ondraweropenlistener slidingdrawer.setclickable true .. . .. . and in the drawercloselistener slidingdrawer.setclickable false .. . .. . this will set when the drawer is opened will make it clickable and prevent clicking in the behind view and when it closes every thing get back to default .. . .. . this is the simplest solution try it : D", "Question : This is the scenario : I have a button B and a slidingdrawer that when pulled out covers the entire screen . When I pull out the screen and touch the screen where B used to be visible its action is still executed . How can I get around this I found this http : stackoverflow.com questions 2596571 how-can-i-disable-a-view-behind-my-slidingdrawer-in-android thread describing the very same problem but no answer was accepted and the ones given I didn t manage to get working . UPDATE : I have a file named Report.java with a corresponding report.xml file as seen below . Adding components : .. . Answer : Sample of mine after bit frustration where to add that android : clickable true", "Question : I m trying to implement a SlidingDrawer that will occupy the full screen width but whose height is determined dynamically by its contents : in other words standard fill-parent layout behaviour for the width and wrap content for the height . That s exactly how I ve specified it in the layout XML see below but the sliding drawer always opens to the full screen height . The height of my content varies but typically it s only about half the screen height so I end up with a big gap underneath it . What I d like is for the content to sit neatly on the bottom of the screen . I ve tried everything I can think of to fix it but nothing s worked so far . If I set the SlidingDrawer s layout height to a specific value e.g . 160dip it works but that s not what I need : it has to be dynamic . Of course I ve made sure all the child elements have their height set to wrap content too . The documentation on SlidingDrawer is a bit vague on this and I haven t been able to find any examples that do what I m after either . If anyone can see where I m going wrong I d really appreciate your help .. . Answer : just set to pmargin in sliding drawer in your xml", "Question : I m trying to implement a SlidingDrawer that will occupy the full screen width but whose height is determined dynamically by its contents : in other words standard fill-parent layout behaviour for the width and wrap content for the height . That s exactly how I ve specified it in the layout XML see below but the sliding drawer always opens to the full screen height . The height of my content varies but typically it s only about half the screen height so I end up with a big gap underneath it . What I d like is for the content to sit neatly on the bottom of the screen . I ve tried everything I can think of to fix it but nothing s worked so far . If I set the SlidingDrawer s layout height to a specific value e.g . 160dip it works but that s not what I need : it has to be dynamic . Of course I ve made sure all the child elements have their height set to wrap content too . The documentation on SlidingDrawer is a bit vague on this and I haven t been able to find any examples that do what I m after either . If anyone can see where I m going wrong I d really appreciate your help .. . Answer : It works for me : .. . .. . XML Layout :", "Question : I need to do a Sliding Up View wich should slide up from the bottom of the screen when I click a button . It has to show on the bottom of the screen and I need to slide drag it to the center of the screen . The images below explain it better . almost like the AndroidSlidingUpPanel from umano which you can find here https : github.com umano AndroidSlidingUpPanel : .. . .. . The problem is that I want the first child The content of my View - an image for example to fill all the screen and also I want the second child the actual bottom bar to be showed when I click a button . The images below explain it better . If there is not possible to do this by changing the AndroidSlidingUpPanel how can I do that I have never worked with views like this . I would really appreciate any tip or help . Thank you very much . enter image description here http : i.stack.imgur.com hvcIM.png Comment : possible duplicate of Replicate Google Maps Bottom Panel Swipe Up http : stackoverflow.com questions 21826892 replicate-google-maps-bottom-panel-swipe-up Comment : It is not a duplicate . I want my view to appear when I click the button I do not want it to be already there . Comment : Take a look at github.com Ali-Rezaei SlidingDrawer https : github.com Ali-Rezaei SlidingDrawer which makes it possible to slide from any side by few lines-of-code and much more simpler than slidingUpPanel to work with . .. . Answer : You can check this library for dragging content from all four edges of the screen https : github.com SimonVT android-menudrawer .. . .. . You can make a custom layout inside this menu drawer to get your expected result . Comment : This is giving me a lot of troubles to import in my project . So any other idea Comment : what are the problems", "Question : null .. . Answer : Just to be clear we re talking about an XML rotated view here not the effects of rotating the device . I have a SlidingDrawer http : developer.android.com reference android-widget SlidingDrawer.html that contains a ListFragment . The ListFragment implements the Filterable http : developer.android.com reference android-widget Filterable.html interface so that users can search its contents by providing a string input through an EditText . The relevant layout is included below . Because the SlidingDrawer class was deprecated in API 17 the source code was copied over an accessed via a local class . That s why the name of that view looks like a custom class when really it s not . What happens is when the users provides input and filters the list such that there are no matching results i.e . the ListView is empty and size is 0 the entire SlidingDrawer disappears . Some things I ve noticed in trying to fix this : .. . .. . I am pretty sure this is related to displaying the empty view and or whatever layout change occurs when it is displayed . If I simply do not set an empty view for the ListFragment the issue does not occur . I am also pretty sure the effects are related to the fact that the SlidingDrawer is being rotated by 180 degrees since if I remove the rotation attribute the issue also does not occur . However because SlidingDrawer in its default state only opened right-to-left this drawer applies the XML attribute android : rotation 180 to flip the view so that it can be opened left to right . This must remain since there is other stuff on the right side of the screen that cannot be moved . I m not sure what is making the view disappear or where to start fixing it . I ve trying fixing the child views sizes by overriding onMeasure onSizeChanged and onLayout but cannot find anything that solves the issue . Any ideas are appreciated . Comment : SlidingDrawer is deprecated . Any reason you are not using DrawerLayout http : developer.android.com reference android support v4 widget DrawerLayout.html . You can use android : layout-gravity to make it appear on the right Comment : SlidingDrawer has a handle built-in that you can pull out from the side . Also can only open one DrawerLayout as far as I can tell . The design here calls for a left and right drawer . Comment : Check out this answer stackoverflow.com a 11228364 1011435 http : stackoverflow.com a 11228364 1011435 Comment : I can try that library but still doesn t answer the question of why the view is disappearing", "Question : This is the scenario : I have a button B and a slidingdrawer that when pulled out covers the entire screen . When I pull out the screen and touch the screen where B used to be visible its action is still executed . How can I get around this I found this http : stackoverflow.com questions 2596571 how-can-i-disable-a-view-behind-my-slidingdrawer-in-android thread describing the very same problem but no answer was accepted and the ones given I didn t manage to get working . UPDATE : I have a file named Report.java with a corresponding report.xml file as seen below . Adding components : .. . Answer : I think you should add a touch listener on slider and return true on it . In that way you will tell to the system that the touch-event has been consumed . Comment : Thanks for your reply . See my comment on the answer below if you can . Comment : after you got a reference to slider add-on your onCreate method : slider.setOnTouchListener new OnTouchListener @Override public boolean onTouch View arg0 MotionEvent arg1 return true", "Question : I m trying to implement a SlidingDrawer that will occupy the full screen width but whose height is determined dynamically by its contents : in other words standard fill-parent layout behaviour for the width and wrap content for the height . That s exactly how I ve specified it in the layout XML see below but the sliding drawer always opens to the full screen height . The height of my content varies but typically it s only about half the screen height so I end up with a big gap underneath it . What I d like is for the content to sit neatly on the bottom of the screen . I ve tried everything I can think of to fix it but nothing s worked so far . If I set the SlidingDrawer s layout height to a specific value e.g . 160dip it works but that s not what I need : it has to be dynamic . Of course I ve made sure all the child elements have their height set to wrap content too . The documentation on SlidingDrawer is a bit vague on this and I haven t been able to find any examples that do what I m after either . If anyone can see where I m going wrong I d really appreciate your help .. . Answer : unfortunately you can t set the height but rather the opposite of that . the topOffset attribute will determine how tall to make the sliding drawer but its what to shave off rather than how tall it will be . Comment : Actually I did manage to set the height as I ve mentioned above by giving an explicit height to the SlidingDrawer : looks like the topOffset solution is another way to achieve the same thing . I ve also found examples where this is done but so far none using wrap content . Comment : this guy s panel widget lets you set the height with wrap content among other nice things anddev.org viewtopic.php p 16622 http : www.anddev.org viewtopic.php p 16622" ] }
[ "yes-answer-long", "yes-answer-short" ]
widget
UNK_RELATION
autofac@inversion-of-control@45
autofac -- autofac http : autofac.org is an @placeholder ioc-container for microsoft .net .
{ "confidence": [ 49.97840881347656, 46.749507904052734, 45.58686065673828, 44.6910514831543, 44.34987258911133, 43.617401123046875, 43.00984191894531, 42.323699951171875, 41.709808349609375, 41.412593841552734, 41.33127975463867, 40.84634017944336, 40.7767219543457, 40.11145782470703, 39.34465026855469, 39.23133087158203, 39.170928955078125, 39.079856872558594, 39.05795669555664, 39.04555892944336, 38.94826126098633, 38.336238861083984, 38.1229248046875, 38.096473693847656, 38.052452087402344, 37.96232604980469, 37.716529846191406, 37.685768127441406, 37.65052795410156, 37.58879089355469, 37.52656173706055, 37.34495544433594, 37.280155181884766, 37.061214447021484, 37.061214447021484, 37.03931427001953, 37.03931427001953, 37.03931427001953, 36.97880172729492, 36.93278121948242, 36.88890838623047, 36.888675689697266, 36.888675689697266, 36.82225799560547, 36.82225799560547, 36.754722595214844, 36.679901123046875, 36.52375793457031, 36.20343017578125, 36.12701416015625, 36.11142349243164, 35.99463653564453, 35.926448822021484, 35.87418746948242, 35.7193603515625, 35.7193603515625, 35.71089553833008, 35.688995361328125, 35.688995361328125, 35.688995361328125, 35.688995361328125, 35.629234313964844, 35.615692138671875, 35.615692138671875, 35.57014846801758, 35.57014846801758, 35.56721496582031, 35.565555572509766, 35.504676818847656, 35.43269729614258, 35.30705642700195, 35.30705642700195, 35.30705642700195, 35.30705642700195, 35.255062103271484, 35.255062103271484, 35.19292449951172, 34.79318618774414, 34.79318618774414, 34.79318618774414, 34.79318618774414, 34.79318618774414, 34.79318618774414, 34.69536590576172, 34.69536590576172, 34.46889877319336, 34.41511917114258, 34.21982955932617, 34.21982955932617, 34.21982955932617, 34.21982955932617, 34.21982955932617, 34.21982955932617, 34.21982955932617, 34.21982955932617, 34.025177001953125, 34.025177001953125, 33.78810119628906 ], "content": [ "I use Autofac as my IoC container of choice .", "I am using autofac as IOC Container .", "I m already using Autofac for Ioc .", "We use Autofac as our IOC .", "Now regarding Autofac I m new to Autofac and any other DI container - not to the principle of IoC though .. .", "I m using Autofac for DI IoC .", "Use this : .. . .. . For more details refer this blog http : www.codeproject.com Articles 808894 IoC-in-ASP-NET-MVC-using-Autofac", "Did microsoft autofac explained this somethere", "Is Autofac team planning releasing autofac with reference to .NET 4.0", "I am using Autofac for IoC in ASP .Net MVC 4 app .", "Take a look at Autofac DI container in Console app http : codereview.stackexchange.com questions 56197 autofac-di-container-in-console-app", "Next the default in Autofac is that instances have the lifetime of their container .", "First configure the Autofac container .", "In Autofac the innermost scope is always the container .", "NPoco.IDatabase implements IDisposable and its Dispose method will be called by the Autofac IoC container at the end of a HTTP request in an ASP.NET MVC application .", "Autofac .", "Similar question issue filed : github.com autofac Autofac issues 751 https : github.com autofac Autofac issues 751", "Note : this topic http : groups.google.com group autofac browse thread thread 8140a17734bf217d over at the Autofac discussion group is related .", "This looks like an Autofac registration .", "I used the instructions developers autofac to use a delegate factory https : code.google.com p autofac wiki DelegateFactories .. . .. . Registration into IoC", "I m working on a WCF project in which I m using Autofac as IoC container and MediatR as a mediator to execute my requests commands .", "And you can use it like this : .. . .. . This registration is a simplified version of the original CollectionRegistrationSource https : github.com autofac Autofac blob master src Autofac Features Collections CollectionRegistrationSource.cs .", "Working currently with .NET 4.0 Autofac 3.5.2 and Hangfire 1.1.1 we set up Dresel s solution with Autofac .", "One uses Autofac 3.5.2 and the other is used Autofac.Extras.DynamicProxy2 for interception Autofac 3.3.1 . The one with Autofac 3.3.1 has project reference to the one with Autofac 3.5.2 .", "I am trying to build a routing infrastructure and I use Autofac as IoC container .", "I have an IoC setup with Autofac and use AoP interceptors .", "The ISession instance is HttpRequestScoped and injected by Autofac http : code.google.com p autofac .", "I have web application ASP.NET MVC for IoC I use Autofac Using Autofac I see problem with starting App 20 - 21 sec .", "Is this possible with Autofac", "How can I accomplish this in Autofac", "Is there a way to set up an Autofac container per area", "Thing is that the Autofac container gives you the factory stuff OOTB .", "You use the Autofac factory registration", "Possible duplicate of Register Generic Type with Autofac http : stackoverflow.com questions 15226536 register-generic-type-with-autofac", "Autofac supports identification of services by name http : code.google.com p autofac wiki TypedNamedAndKeyedServices By Name .", "What version of Autofac is this", "I m new to Autofac .", "Autofac supports open generics .", "I m using AutoFac IoC container how to inject my log Object to the Log property of my every class", "let s say this scenario : .. . .. . To resolve C from Autofac container I have to register both B and C to container .", "Even passing container is not encouraged http : code.google.com p autofac wiki BestPractices .", "So I have this application where Im using IOC autofac .", "I have existing project which uses AutoFac as IoC .", "I just embarked on DI using Autofac how this supposed to be implemented in Autofac .", "It looks like Autofac.Integration.Wcf wants Autofac 3.3 but I have Autofac 3.5 .", ".. . .. . .. . .. . Autofac Config :", "Since you already added AutoFac in GlobalConfiguration.Configuration.UseAutofacActivator container You just simple let hangfire and Autofac resolve dependencies for you .", "That said Autofac have excellent instance lifetime handling scoping http : code.google.com p autofac wiki InstanceScope and deterministic disposal http : code.google.com p autofac wiki DeterministicDisposal .", "Use Autofac delegate factories http : code.google.com p autofac wiki DelegateFactories or new auto-generated factories in Autofac 2 http : code.google.com p autofac wiki NewInV2 .", "Now looking at Autofac.RegistrationExtensions in Autofac 3.5.2 https : github.com autofac Autofac blob v3.5.2 Core Source Autofac RegistrationExtensions.cs sure enough there is no RegisterModule method .", "You may not have any dependencies on Autofac except at the project root however you re going to be highly dependent upon whatever IOC you might replace Autofac with behaving exactly like autofac .", "Autofac is requesting the Func IDataStore instance from there not from the request container .", "Autofac checks whether host is a IServiceHost and because it is not Autofac throws an exception .", "@JJS - that would be the Autofac-in-general default lifetime which is per dependency scope ref code.google.com p autofac wiki InstanceScope https : code.google.com p autofac wiki InstanceScope", "I m using the Autofac IoC container with the MVC4 add-on which provides the InstancePerHttpRequest lifetime scope .", "I m using Autofac as IOC Container and i like to load the Plugins Class Libraries from the build in DNX LibraryManager .", "See the Modem example here : code.google.com p autofac wiki TypedNamedAndKeyedServices http : code.google.com p autofac wiki TypedNamedAndKeyedServices", "That s not just an Autofac thing .", "With Autofac RequestContext is null", "PostSharp and Autofac are not in my GAC .", "I m using Autofac .", "IOC is based on Autofac and defined in a Bootstrapper project using WabActivator .", "I have an autofac DI in my project .", "So Autofac can t do as Unity do", "Anyone done something similar to this with Autofac", "Getting to really like the features of Autofac", "The reason that Autofac doesn t throw an exception is because Autofac considers multiple registrations for the same interface to be part of a collection .", "Please have a look at the source code of the CollectionRegistrationSource.cs https : github.com autofac Autofac blob master src Autofac Features Collections CollectionRegistrationSource.cs for a more complete version of the registration .", "There is a whole article on registering and consuming WCF services using Autofac on the Autofac wiki that shows exactly what you re asking for : https : github.com autofac Autofac wiki Wcf-Integration", "Autofac.3.5.2 .. . 2 .", "It is possible to register components modules in Autofac in the App.config .", "Have you already looked at this section of the Autofac Manual", "I ve encountered a strange issue with using Autofac .", "Everything in Autofac is registered internally as a series of callbacks .", "You will first want to read the Autofac wiki page on instance scopes https : code.google.com p autofac wiki InstanceScope as well as this primer on Autofac lifetimes http : nblumhardt.com 2011 01 an-autofac-lifetime-primer .", "If you can t upgrade to the latest Autofac package grab the ContravariantRegistrationSource from http : code.google.com p autofac source browse src Source Autofac Features Variance ContravariantRegistrationSource.cs - it should compile against any recent Autofac build .", "I am using Autofac for IoC in my ASP .Net MVC 4 project .", "We have a websolution with autofac .", "In that case it is not a Autofac problem .", "How is it possible to achieve this with Autofac", "I am using AutoFac .", "It is not supported natively by autofac .", "I m a new user of Autofac .", "This appears to have also been filed as a question issue https : github.com autofac Autofac issues 740", "It s not Autofac you just happen to see it because Autofac is the only PCL you re using .", "I have Autofac Autofac.Mvc5 and Autofac.WebApi2 dependencies installed .", "It is a bug to not clean up owned instances . quote code.google.com p autofac wiki NewInV2 http : code.google.com p autofac wiki NewInV2", "That depends on your Autofac registration code .", "Luckily Autofac has an answer for that in the AnyConcreteTypeNotAlreadyRegisteredSource .", "If I remove autofac then it works as expected .", "how to do property inject in autofac", "I m using Autofac version 2.4.5.724 .", "I m using Autofac constructor-injection .", "You d modify this to do the AutoFac injection .", "What s the advantage of replacing this factory with Autofac", "Should I be using the same Autofac container already used for MVC and NServiceBus", "What is the suggested method of getting the Autofac container from inside a class in the application", "Read up on Getting Started http : code.google.com p autofac wiki GettingStarted ." ] }
{ "confidence": [ 54.26226806640625, 53.805912017822266, 53.424720764160156, 51.93086242675781, 51.03907012939453, 50.500450134277344, 50.165550231933594, 50.071815490722656, 49.95280456542969, 49.48990249633789, 49.254974365234375, 48.9301643371582, 48.73085403442383, 48.576393127441406, 48.57470703125, 48.30939483642578, 47.708187103271484, 47.39886474609375, 47.054969787597656, 46.84023666381836 ], "content": [ "Question : Assuming that I have the following interface and class : .. . .. . I use Autofac as IoC container in my application and if I register this as below can I be sure that it will disposed properly Or should I take further steps depending on the application type I am using . In this case I using ASP.NET MVC but I am considering using autofac in a WCF Web API project and a class-library .. . Answer : This portion comes into lifetime management in IOC or DI Container . As you are using AutoFac following link may help you . http : code.google.com p autofac wiki DeterministicDisposal .. . .. . Also look at section of Controlling scope and lifetime for autofac .", "Question : Autofac Registeration .. . .. . Class using a managed IDisposable dependency .. . .. . MVC Controller .. . .. . Question 1 .. . .. . Is implementing IDisposable on MyDataAccess sample class almost unnecessary given the fact that intelligent IoC containers like Autofac automatically disposes IDisposable -implemented resolved services upon end of lifetime scope NPoco.IDatabase implements IDisposable and its Dispose method will be called by the Autofac IoC container at the end of a HTTP request in an ASP.NET MVC application . Question 2 .. . .. . Is not implementing IDisposable on MyDataAccess have any effect on the Garbage Collection process IMPORTANT NOTE : lets say we are ONLY using the MyDataAccess inside this ASP.NET application managed by the IoC container . I know that if we are using this in another type of application without using an IoC container then it is better to implement the IDisposable on it since it will be safer . The only reason I am asking this is because my colleagues and I are debating . So is implementing IDisposable in this particular scenario unnecessary or .. . it should still be implemented since it is good for GC process . .. . Answer : You may find some useful information from this answer http : stackoverflow.com questions 8944369 autofac-and-idisposable-interface which points to some advice http : nblumhardt.com 2011 01 an-autofac-lifetime-primer by Autofac s creator on IDisposables . These make up the basis of this answer . Is implementing IDisposable almost unnecessary Yes if you are using lifetime scopes correctly . Autofac calls Dispose for all instances of components implementing IDisposable once their parent lifetime scope ends . You don t need to do any additional work here . Does not implementing IDisposable have any effect on the Garbage Collection process IMPORTANT NOTE : lets say we are ONLY using the MyDataAccess inside this ASP.NET application managed by the IoC container . .. . .. . The exact time the GC executes is undefined and the thread on which an object s finaliser method runs is unspecified . Further to this the CLR also manages virtual-memory for your .NET application so freed memory may or may not have been released back to the operating-system . You might call Dispose on MyDataAccess before Autofac would have but that s no guarantee of having it disposed of before other objects . So is implementing IDisposable in this particular scenario unnecessary Yes", "Question : Does anyone have any tips or best practices regarding how Autofac can help manage the NHibernate ISession Instance in the case of an ASP.NET MVC application .. . Answer : Edit : Sounds like Autofac and probably other containers can scope the lifetime correctly . If that s the case go for it . It isn t a good idea to use your IoC container to manage sessions directly . The lifetime of your session should correspond to your unit of work transaction boundary . In the case of a web application that should almost certainly be the lifetime of a web request . The most common way to achieve this is with an HttpModule that both creates your session and starts your transaction when a request begins then commits when the request has finished . I would have the HttpModule register the session in the HttpContext.Items collection . In your IoC container you could register something like HttpContextSessionLocator against ISessionLocator . I should mention that your generic error-handling should locate the current session and roll back the transaction automatically or you could end up committing half a unit of work . Comment : Why isn t that a good idea Comment : Agree with James on this I inject a unit of work factory into my asp.net-mvc controllers and create a unit of work from inside the controller when required . The factory is just wrapper class service locator around the IoC container Structure Map Comment : @AWC : thats exactly what I would do too . Thing is that the Autofac container gives you the factory stuff OOTB . Comment : Hi James I believe that AutoFac provides HttpRequestScoped which I think will provide the same behaviour as the http module . I might be wrong but I think one benefit is that this will only new up the object in requests that actually used it rather than on all requests as you would get with the HttpModule . Comment : @UpTheCreek . Interesting - I ve never used Autofac before . It sounds like that ll work as long is it calls Dispose for you .", "Question : I m still pretty new to using Autofac and one thing I miss in the documentation and examples is how to make it easy to get to the configured container from different places in a web application . I know I can use the Autofac controller factory to automatically resolve constructor injected dependencies for controllers but how about the other stuff you might need to resolve that is not injected yet . Is there an obvious pattern I am not aware of for this Thank you Comment : BTW this question was asked when MVC was at version 2 . In MVC 3 DependencyResolver.Current is all you need whether you re using Autofac or something else . .. . Answer : Having IOC container globally available is not a best practice . Even passing container is not encouraged http : code.google.com p autofac wiki BestPractices . If dependency-injection can not be used you need to create request objects after component has been created then you can : .. . .. . 1 . Use hand-coded factories factory is injected to the component and component uses factory to create other objects .. . 2 . Use Autofac delegate factories http : code.google.com p autofac wiki DelegateFactories or new auto-generated factories in Autofac 2 http : code.google.com p autofac wiki NewInV2 .", "Question : do any other .NET IoC containers provide equivalent functionality to the typed-factory-facility in Castle Windsor e.g . if I am using an abstract-factory pattern in a WPF application : .. . .. . I don t want to have to create a manual implementation of IAnotherViewModelFactory for every type of ViewModel I wish to show I want the container to take care of this for me . Comment : Seems like Ninject is about to - stackoverflow.com questions 8166696 http : stackoverflow.com questions 8166696 how-to-use-a-factory-with-dependecy-injection-without-resorting-to-using-service 8167100 8167100 .. . Answer : In Autofac you can implement typed factories on top of the delegate approach Mark mentions . E.g . If this class is registered with the container along with AnotherViewModel Autofac will provide the Func AnotherViewModel implementation implicitly : .. . .. . Practically any interface you can implement using Typed Factory Facility can be implemented in Autofac using this kind of approach . The primary difference is that the Windsor implementation configures the factory through the component registration API while in Autofac the factory is a component in its own right . For more sophisticated examples you might like to look at : http : code.google.com p autofac wiki RelationshipTypes and http : nblumhardt.com 2010 01 the-relationship-zoo . Comment : +1 but doesn t shouldn t the implementation of GetAnotherViewModel be return factory Comment : Thanks Mark fixed Comment : This technique works exactly the same way in Unity by the way .", "Question : In beta builds of Autofac 2.1 there was support for automatic resolution of Lazy T as described in Nicholas Blumhardt s Lazing Around with Autofac http : nblumhardt.com 2009 12 lazing-around-with-autofac2 blog post . The code http : www.google.com codesearch p hl en 15-NfL2P5pY trunk src Source Autofac.Integration.Mef LazyDependencyModule.cs q Autofac.Integration.Mef 20package 3ahttp : autofac 5C.googlecode 5C.com t 0 d 4 still seems to be in the source on Google Code but I can t find LazyDependencyModule in any of the .NET 4.0 binaries I ve looked at . Has it moved somewhere else How do I use Autofac s automatic Lazy T resolution with the latest Autofac builds .. . Answer : You don t need to register LazyDependencyModule yourself in the production Autofac 2 builds . It is a part of the default container so just register T and Lazy T will be provided . Make sure you re not accidentally using a .NET 3.5 binary too : .. . .. . Nick Comment : You re right I must have got my assembly versions in a pickle . It s working now thanks Comment : Thanks I had the same problem - it took me hours to find out .", "Question : So I have this application where Im using IOC autofac . In the mean time I found myself in position where I need a factory . Inside the factory I create new objects that has dependencies - so now I m wondering how could I marry these Comment : Inject the IoC container into the factory and then use the methods exposed on it to acquire an instance of the concrete type you want . Then the container will resolve the other dependencies for you . Comment : @MartinCostello that s a service locator largely considered an anti-pattern even if done within a factory . Comment : Are you certain you NEED a factory Why are you certain that you can t allow the IoC container to build the object dependency graph for you Comment : Sorry for late response David what do you propose to avoid factory .. . Answer : You could use named and keyed service http : docs.autofac.org en latest advanced keyed-services.html and retrieve instances using IIndex TKey TService .. . .. . Registration could look like this : .. . .. . and factory like this : Comment : This is awesome . I also can abstract away the IIndex for sake of being not attached to autofac . Comment : Actually the factory has just become the abstraction over autofac from perspective of customer of that factory - that s even better", "Question : I am trying to build a routing infrastructure and I use Autofac as IoC container . I read the wiki http : code.google.com p autofac wiki WcfIntegration and I know these steps : .. . .. . .. . .. . I do have this code here to satisfy my scenario : .. . .. . This doesn t work as I get an error from Autofac as it can t find condtructor for RoutingService its constructor is private . Do you have any hint Comment : Make the constructor public . Comment : Can t do that RoutingService is part of WCF Routing.. . .. . Answer : As far as I know the RoutingService class has no constructors defined . You can see that if you try to do this : .. . .. . RoutingService rs new RoutingService .. . .. . You will get an error from the compiler saying : The type System.ServiceModel.Routing.RoutingService has no constructors defined . Comment : Yes I know why the error appears . Comment : Perhaps you can create a wrapper around the RoutingService class to be able to use it in Autofac .", "Question : let s say this scenario : .. . .. . To resolve C from Autofac container I have to register both B and C to container . But today I used Unity http : unity.codeplex.com it seems I just need to register B to container then C can be resolved . So Autofac can t do as Unity do .. . Answer : With out-of-the-box Autofac it is expected that every type you want to use is registered with the container either directly using the Register.. . methods or in bulk using RegisterAssemblyTypes . But there are other options too take a look at Nicholas article about resolving everything http : nblumhardt.com 2010 01 resolve-anything . So yes Autofac can do what Unity does but you ll have to enable it . Update : actually the resolve anything feature is built-in now and you can do the following : .. . .. . With the AnyConcreteTypeNotAlreadyRegisteredSource you can actually resolve both C and B without registering any of them . Note that the lifetime of services resolved by AnyConcreteTypeNotAlreadyRegisteredSource will be per dependency scope http : code.google.com p autofac wiki InstanceScope . Note : this topic http : groups.google.com group autofac browse thread thread 8140a17734bf217d over at the Autofac discussion group is related . Comment : thanks . that s my question in the discussion group . Comment : What s the default lifetime of the AnyConcreteTypeNotAlreadyRegisteredSource Comment : @JJS - that would be the Autofac-in-general default lifetime which is per dependency scope ref code.google.com p autofac wiki InstanceScope https : code.google.com p autofac wiki InstanceScope", "Question : I m trying to use MVC Contrib Localization in my Asp.net MVC application for now I have it working with resource files but I want to use it with Sql Server .. . .. . I m checking this tutorial : http : www.codeproject.com Articles 352583 Localization-in-ASP-NET-MVC-with-Griffin-MvcContri .. . .. . but it uses Autofac as the IoC container which I don t understand does anyone have used it with Ninject or anyone knows how this Autofac code can be transated to Ninject : .. . .. . Thanks in advance . .. . Answer : I am trying to do the same thing at the moment with the Ninject.Web.MVC NuGet package . I am not sure if Ninject has anything similar to .AsImplementedInterfaces however you can still bind the interfaces yourself if not its just more manual work looking at Griffin.MvcContrib s classes and what interfaces they implement . One example to put in the NinjectWebCommon RegisterServices method is : .. . .. . The InRequestScope extension https : github.com ninject Ninject.Web.Common wiki Inrequestscope from what I have read so far is the closest I can see to the AutoFac .InstancePerLifetimeScope http : code.google.com p autofac wiki InstanceScope .. . .. . As for .RegisterInstance new AdoNetConnectionFactory DemoDb .AsSelf .. . .. . There is a .ToSelf method for Ninject but I am not entirely sure what this line is doing yet myself .", "Question : I m still pretty new to using Autofac and one thing I miss in the documentation and examples is how to make it easy to get to the configured container from different places in a web application . I know I can use the Autofac controller factory to automatically resolve constructor injected dependencies for controllers but how about the other stuff you might need to resolve that is not injected yet . Is there an obvious pattern I am not aware of for this Thank you Comment : BTW this question was asked when MVC was at version 2 . In MVC 3 DependencyResolver.Current is all you need whether you re using Autofac or something else . .. . Answer : First of all try not to overuse the IoC container . Its great for wiring up controllers views and services but objects that need to be created during runtime should be created by factory objects and not by the container . Otherwise you get Container.Resolve calls all through your code tying it to your container . These extra dependencies defeat the purpose of using IoC . In most cases I can get by only resolving one or two dependencies at the top level of my application . The IoC container will then recursively resolve most dependencies . When I need the container elsewhere in my program here s a trick I often use . I wrap the container in a Container class like this . It adds itself to the wrapped container in the constructor . Now classes that need the container can have an IContainer injected . the example is for Castle Windsor but it can probably be adapted for AutoFac", "Question : So I have this application where Im using IOC autofac . In the mean time I found myself in position where I need a factory . Inside the factory I create new objects that has dependencies - so now I m wondering how could I marry these Comment : Inject the IoC container into the factory and then use the methods exposed on it to acquire an instance of the concrete type you want . Then the container will resolve the other dependencies for you . Comment : @MartinCostello that s a service locator largely considered an anti-pattern even if done within a factory . Comment : Are you certain you NEED a factory Why are you certain that you can t allow the IoC container to build the object dependency graph for you Comment : Sorry for late response David what do you propose to avoid factory .. . Answer : I solve it . Kind of . Since I didnt want to take dependency on Autofac it self I was torn . But thanks to @martin-costello it came to me that maybe I dont need to take autofac but the build in IDependencyResolver which is less evil . Since I was unable to register autofac as IDependencyResolver I register DependencyResolver as IDependencyResolver . One more step closer . Since registration happens before autofac DependencyResolver.SetResolver happens I needed to use Lazy which finally solves my problem . Here s code or at least the best solution I found out .. . .. . Then factory changes to this before cleanup : .. . .. . This for now is the best clean less evil less specific abstract whatever solution that I was able to figure out . Any comment welcome .", "Question : I ve found some 2008 benchmark results for testing the performance of several of the top .NET DI IoC containers here http : www.codinginstinct.com 2008 05 ioc-container-benchmark-rerevisted.html . But I haven t been able to find any updated results . Are there any benchmarks out there that compare some of the big IoC containers StructureMap Unity Ninject Autofac Castle Windsor etc . Comment : I agree with Reed . Besides benchmarks are easy to get wrong . Look for instance at this thread : stackoverflow.com questions 5298240 http : stackoverflow.com questions 5298240 hiro-vs-other-ioc-containers 5308894 5308894 . Comment : The fact that such new benchmarks are missing from the net I take as a statement that this is of lesser concern . .. . Answer : IoC Container Benchmark - Performance comparison http : www.palmmedia.de blog 2011 8 30 ioc-container-benchmark-performance-comparison has performance and features comparison tables for 20+ products and it is up-to-date latest update 06.01.2013 .. . .. . The conclusion from the article : .. . .. . Especially Simple Injector http : simpleinjector.codeplex.com seems to be a good choice . It s very fast has a good documentation and also supports advanced scenarios like interception and generic decorators . See also related .NET DI Containers Comparison http : stackoverflow.com questions 1140730 net-di-containers-comparison question .", "Question : I m accustomed to creating my own factories as shown this is simplified for illustration : .. . .. . I m finally getting around to using an IoC container AutoFac in my current project and I m wondering is there some magic way of achieving the same thing elegantly with AutoFac Comment : What s the advantage of replacing this factory with Autofac Comment : Sorry as I alluded to in my comment on KeithS s answer I was hoping there d be some AutoFac voodoo that let me avoid the switch . What s the advantage of avoiding the switch I dunno.. . I just seem to have been indoctrinated with an aversion to them : Comment : IoC is no magic wand . You can use named registrations and you might remove the switch but in the end there will always be some sort of switching logic . My advice : use a factory fort his and register the factory in Autofac . .. . Answer : Short answer : Yes . Longer answer : First in simple cases where a class Foo is registered as the implementation for IFoo constructor parameters or properties of type Func IFoo will be resolved automatically by Autofac with no additional wiring needed . Autofac will inject a delegate that basically executes container.Resolve IFoo when invoked . In more complex cases like yours where the exact concretion returned is based on input parameters you can do one of two things . First you can register a factory-method as its return-value to provide a parameterized resolution : .. . .. . This isn t type-safe domInstance won t be compiler-checked to ensure it s an IHtml nor very clean . Instead another solution is to actually register the factory-method as a Func : .. . .. . If you wanted to keep the code in ElementFactory instead of putting it in the Autofac module you could make the factory-method static and register that this works especially well in your case because your factory-method is trivially made static : Comment : Thanks that s really useful I was kind of hoping AutoFac would help me avoid the ugly switch-statement but there it was staring at me practically mocking me in all three of your code blocks : Comment : Well it s also possible to use keyed registrations specifying each of the element type names as a key for a resolution method for the corresponding object-type . The complication in this situation is that not all possible return types are associated with a key you have a default case and the IHtml parent of the element name is needed for other reasons . So it seemed easiest just to take your working code and set it up so AutoFac could use it . Comment : The registration does not compile : builder.Register Func IHtml IElement ElementFactory.Create I would expect it to look somewhat like this : builder.Register Func IHtml IElement context parameters html ElementFactory.Create html Comment : Or even simpler : context builder.Register Func IHtml IElement context ElementFactory.Create", "Question : So I have this application where Im using IOC autofac . In the mean time I found myself in position where I need a factory . Inside the factory I create new objects that has dependencies - so now I m wondering how could I marry these Comment : Inject the IoC container into the factory and then use the methods exposed on it to acquire an instance of the concrete type you want . Then the container will resolve the other dependencies for you . Comment : @MartinCostello that s a service locator largely considered an anti-pattern even if done within a factory . Comment : Are you certain you NEED a factory Why are you certain that you can t allow the IoC container to build the object dependency graph for you Comment : Sorry for late response David what do you propose to avoid factory .. . Answer : You cannot use IoC to abstract away the instantiation of objects forever . At some point you are going to have to create a concrete instance either inside your factory or your IoC container .. . .. . You could either inject your autofac container into your factory or since your factory itself implements an interface then you can inject different versions of your factory into what ever class might require them e.g . if you needed a different factory for unit-testing purposes", "Question : I am running integration tests and when I reach that line of code : .. . .. . uses the autofac container inside .. . .. . I get this exception : .. . .. . Fusionlog : .. . .. . It seems the autofac web-api integration works only up to web-api 2.0 . When I use the web-api 2.1 which does not reference the system.web.http 5.0.0 anymore but instead the 5.1.0 then it does not work anymore . How can I tell the autofac to use the system.web.http 5.1.0 version and not 5.0.0 I put this in the app.config of my integration test AND API project : .. . .. . But it did NOT work Another thing that is very odd is that I have read that using .NET 4.5.1 this redirection assembly stuff is done automatically . But its not happening.. . .. . Answer : As explained here http : stackoverflow.com questions 14921297 is-it-possible-to-ignore-assembly-manifest-mismatch here http : stackoverflow.com questions 6789446 could-not-load-file-or-assembly-microsoft-web-extensions and here http : stackoverflow.com questions 8743992 how-do-i-work-around-log4net-keeping-changing-publickeytoken you have a Public Key Token mismatch caused when a referenced assembly is recompiled with a different strong-named key . This cannot be solved other than by compiling the autofac library against the newer assembly . Comment : So who is to blame Microsoft for making crap out of the System.Web.Http public-key Comment : About your last sentence : Should this not be the task of the autofac author I ask this because I would like to have this fix as a nuget-package . Not some custom added reference by me.. . Comment : @Pascal I ve verified the publicKeyTokens for Web API 2 and 2.1 match . Can you try changing 32ab4ba45e0a69a1 to 31bf3856ad364e35 in your config If the token would have changed then yes the autofac folks should release an update but it looks like this isn t the case . Comment : YEAH.. . it works thanks a bunch : all autofac user owe you a beer : P", "Question : null .. . Answer : I am trying to use latest Hangfire in our MVC5 application to peridically fire off a message to NServiceBus . However I am not sure how to do this especially the IoC . I have configured NServiceBus 5.2.9 to use Autofac in MVC5 but I am not clear how to inject IBus into HAngfire and with what scope . This is my Hangfire configuration in Startup.cs : .. . .. . 1 . Should I be using the same Autofac container already used for MVC and NServiceBus Or should I create a secodn container like I do in the code above 2 . Since the IBus is correctly injected into controllers is there a way for Hangfire to call the an MVC controller method instead Thank you", "Question : I m working on a WCF project in which I m using Autofac as IoC container and MediatR as a mediator to execute my requests commands . The base implementation of the WCF contract takes an instance of IMediator as a dependency to delegate the work associated with each request to the associated handler . I also have several decorators I stack up the base implementation for things like authorization and error-handling . As specified in this page of Autofac documentation http : docs.autofac.org en latest integration wcf.html using-decorators-with-services the use of a MultitenantServiceImplementationDataProvider is necessary in order to satisfy WCF internals when you use decorators on the service implementation . Nothing more multitenant-related is needed so it just consists of : .. . .. . Also in the .svc I specified the qualified-name of the interface since it s supported by Autofac and I have decorators on top on my base implementation . Now on to MediatR . MediatR uses service location to instantiate the appropriate handlers when it is given a request . More specifically it relies on CSL https : www.nuget.org packages CommonServiceLocator . Not a problem since Autofac provides a bridge to support CSL https : www.nuget.org packages Autofac.Extras.CommonServiceLocator . The tricky part relies in the fact that my handlers take DbContext as dependencies and I want them disposed by Autofac after each WCF request . So the AutofacServiceLocator has to be given the scope that is created for the specific request since the root scope is not disposed and neither would be the DbContext instances . Autofac got you covered with the AutofacInstanceContext.Current static property which is the equivalent of the AutofacDependencyResolver.RequestLifetimeScope in ASP.NET MVC . So far so good here s how I registered the ServiceLocatorProvider the Mediator class takes a depedency on : .. . .. . It works as expected on my development box but I get a NullReferenceException on the staging environment and I don t really know where to look for - GoogleBing didn t give relevant results . Only things that differ from both environments : .. . .. . HTTP on my box vs HTTPS on the staging env . debug attribute on system.web element was set to false on staging env . And that s about it.. . .. . .NET frameworks as the same 4.5.2 . Anyone has an idea Thanks .. . Answer : Fixed it by changing : .. . .. . with .. . .. . I wouldn t be able to tell you exactly why it didn t work but I guess that by the time the lambda expression new AutofacServiceLocator AutofacInstanceContext.Current.OperationLifetime was executed internally by MediatR it was too late and the current operation context was disposed of or released . Any insight would still be greatly appreciated Comment : which version of MediatR are you using It has moved away from Common Service Locator in favor of factory-method delegates github.com jbogard MediatR commit https : github.com jbogard MediatR commit 82ce595fcd5d265862bf80127fee932902c3d8cd Comment : I m using the latest stable version 1.0.0 . Jimmy stated he won t make 2.0 stable until .NET Core is stable if I m not mistaken . Anyway I don t think this would change much regarding my issue", "Question : I m working on a Windows Service with a number of self-hosted WCF services . I m using Autofac for DI IoC . WCF services and endpoints are set up in app.config and by enumerating the configured services http : stackoverflow.com q 3740193 137471 the Windows service is able to automatically create and open a ServiceHost for each configured WCF service . To enable dependency-injection I add a call to the AddDependencyInjectionBehavior docs http : autofac.org apidoc html 3BC9275C.htm method for each new instance of ServiceHost but the method specifically requests a contractType and at this point I only have the service implementation type . I could retrieve the contract type by looking for implemented interfaces using reflection but since this is my first project working with Autofac I wanted to make sure I m not going about this all wrong . Is there an elegant solution to this is any of this considered bad practice or is reflection the only way to go in this case Any input is appreciated . .. . Answer : You can try to enumerate all endpoints for your ServiceHost and extract ContractType from there . Comment : Have you actually used this code with more than one endpoint It fails for me because the AddDependencyInjectionBehavior extension method resolves to adding an AutofacDependencyInjectionServiceBehavior to the ServiceDescription.Behaviors property of the ServiceHost and that collection does not allow duplicates even if the properties are different which is the intent here . See my issue detailed at How to register two WCF service contracts with autofac http : stackoverflow.com q 18114364 115690 .", "Question : null .. . Answer : I m trying to create a new WebApplication using onion Architecture . IOC is based on Autofac and defined in a Bootstrapper project using WabActivator . My authentication part is based on Jwt token using Owin . I m trying to inject a service resolved by IOC in the CustomProvider . I have been searching and i found a solution .. . .. . In my first attempt using this configuration to call the user service i have an exception : .. . .. . No scope with a Tag matching AutofacWebRequest is visible from the scope in which the instance was requested . This generally indicates that a component registered as per-HTTP request is being requested by a SingleInstance component or a similar scenario . Under the web integration always request dependencies from the DependencyResolver.Current or ILifetimeScopeProvider.RequestLifetime never from the container itself . so i changed InstancePerRequest to InstancePerLifetimeScope now it s working . Questions : .. . .. . 1 knowing that the i dont have a direct access from WebAPI to Autofac Container defined in bootstrapper project is .. . .. . IService service IService GlobalConfiguration.Configuration.DependencyResolver.GetService typeof IService .. . .. . a good option if no is there any others options 2 knowing that Owin startup is a singleton and the authentication process is by request i m not sure whta s the impact of changing autofac resolution from InstancePerRequest to InstancePerLifetimeScope thanx :" ] }
[ "yes-answer-long", "yes-answer-short" ]
inversion-of-control
UNK_RELATION
common-schema@scripting-language@113
common-schema -- a self-contained schema which includes a set of sophisticated views routines and a specialized @placeholder queryscript simplifying mysql server administration and analysis .
{ "confidence": [ 20.722503662109375, 20.722503662109375, 19.61798667907715, 16.54560089111328, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375, 14.3695068359375 ], "content": [ "I have to manipulate json object inside mysql trigger .", "However while using same query inside mysql trigger it is throwing error .", "We are using this common-schema library in mysql-5.6 to extract the values from json array .", "Below is query using mysql common-schema : : .. . .. . 10 rows in set 0.06 sec .. . .. . Here is my trigger : : .. . .. . CREATE TRIGGER response in sms reports AFTER INSERT ON api response FOR EACH ROW .. . .. . BEGIN .. . .. . -- variable declarations DECLARE subscriber id INT DECLARE GUID varchar 250 DECLARE SUBMITDATE datetime DECLARE is error INT DEFAULT 1 DECLARE error-code varchar 100 -- trigger code -- Find username of person performing the INSERT into table select common schema.extract json value api.response ID into subscriber id common schema.extract json value api.response GUID into GUID common schema.extract json value api.response SUBMITDATE into SUBMITDATE common schema.extract json value api.response ERROR into is error common schema.extract json value api.response ERROR CODE into error-code from api response api .. . .. . -- Insert record into audit table INSERT INTO sms reports guid list subscriber id submit date error error-code VALUES GUID subscriber id SUBMITDATE is error error-code .. . .. . END .. . .. . This results in ERROR 1327 42000 : Undeclared variable : common-schema", "For this I have already installed common-schema .", "It is installed successfully and whlie quering directly it is proving approptiate results .", "ERROR 1327 42000 : Undeclared variable : common-schema .", "Please assist .", "Please show us your trigger code .", "In addition to the suggested change avoid naming variables as columns of your tables .", "Thanks a lot it worked .", "The format is given below .", "But it returns the NULL value .", "So can you please help us out how to parse the json array using common-schema .", "Expected output should be saved in table as .. . .. . Please let us know how we can achieve this parsing .", "Thanks Kalyan", "Please make sure you use extract json value with a valid json cause this is not a valid one .", "Your JSON is not valid .", "It is likely you need to add curly-brackets around the entire string .", "Directly it seems not so easy to get what you need .", "An option to obtain a single value is :" ] }
{ "confidence": [ 22.41635513305664, 19.106983184814453 ], "content": [ "Question : I have to manipulate json object inside mysql trigger . For this I have already installed common-schema . It is installed successfully and whlie quering directly it is proving approptiate results . However while using same query inside mysql trigger it is throwing error . ERROR 1327 42000 : Undeclared variable : common-schema . Please assist . Below is query using mysql common-schema : : .. . .. . 10 rows in set 0.06 sec .. . .. . Here is my trigger : : .. . .. . CREATE TRIGGER response in sms reports AFTER INSERT ON api response FOR EACH ROW .. . .. . BEGIN .. . .. . -- variable declarations DECLARE subscriber id INT DECLARE GUID varchar 250 DECLARE SUBMITDATE datetime DECLARE is error INT DEFAULT 1 DECLARE error-code varchar 100 -- trigger code -- Find username of person performing the INSERT into table select common schema.extract json value api.response ID into subscriber id common schema.extract json value api.response GUID into GUID common schema.extract json value api.response SUBMITDATE into SUBMITDATE common schema.extract json value api.response ERROR into is error common schema.extract json value api.response ERROR CODE into error-code from api response api .. . .. . -- Insert record into audit table INSERT INTO sms reports guid list subscriber id submit date error error-code VALUES GUID subscriber id SUBMITDATE is error error-code .. . .. . END .. . .. . This results in ERROR 1327 42000 : Undeclared variable : common-schema Comment : Please show us your trigger code . .. . Answer : In addition to the suggested change avoid naming variables as columns of your tables . Comment : Thanks a lot it worked .", "Question : We are using this common-schema library in mysql-5.6 to extract the values from json array . The format is given below . But it returns the NULL value . So can you please help us out how to parse the json array using common-schema . Expected output should be saved in table as .. . .. . Please let us know how we can achieve this parsing . Thanks Kalyan Comment : Please make sure you use extract json value with a valid json cause this is not a valid one . Comment : Your JSON is not valid . It is likely you need to add curly-brackets around the entire string . .. . Answer : Directly it seems not so easy to get what you need . An option to obtain a single value is :" ] }
[ "yes-answer-long", "yes-answer-short" ]
scripting-language
UNK_RELATION
rule@business-rules@46
rule -- rule might refer to various things : @placeholder junit rules a rule of thumb rules engines . . .
{ "confidence": [ 50.641868591308594, 47.432579040527344, 47.21873092651367, 47.04541015625, 46.34354019165039, 46.221500396728516, 46.179588317871094, 46.092716217041016, 44.641822814941406, 44.49053192138672, 44.48093032836914, 44.48093032836914, 44.48093032836914, 44.402984619140625, 43.96491622924805, 43.73375701904297, 43.46189880371094, 43.22793960571289, 43.20455551147461, 43.20455551147461, 43.094093322753906, 42.72431945800781, 42.373313903808594, 42.223480224609375, 42.00808334350586, 41.906253814697266, 41.841102600097656, 41.841102600097656, 41.811832427978516, 41.377052307128906, 41.377052307128906, 41.377052307128906, 41.23324203491211, 41.009864807128906, 41.009864807128906, 41.009864807128906, 41.009864807128906, 41.009864807128906, 40.970489501953125, 40.75509262084961, 40.74595642089844, 40.71117401123047, 40.673614501953125, 40.64604187011719, 40.34919738769531, 40.114891052246094, 40.01359939575195, 40.01359939575195, 39.97303009033203, 39.923851013183594, 39.37376403808594, 39.36825180053711, 39.205360412597656, 39.11862564086914, 38.927589416503906, 38.927589416503906, 38.66172790527344, 38.66172790527344, 38.54399108886719, 38.54399108886719, 38.4804801940918, 38.4804801940918, 38.4804801940918, 38.097408294677734, 37.97432327270508, 37.847923278808594, 37.847923278808594, 37.847923278808594, 37.7982063293457, 37.665462493896484, 37.565547943115234, 37.250179290771484, 37.250179290771484, 37.250179290771484, 37.250179290771484, 37.228271484375, 37.228271484375, 37.22748947143555, 37.20591354370117, 36.89253616333008, 36.49679946899414, 36.420372009277344, 36.374671936035156, 36.374671936035156, 36.374671936035156, 36.374671936035156, 36.374671936035156, 36.37281799316406, 36.37281799316406, 36.37281799316406, 36.372161865234375, 36.176475524902344, 36.175506591796875, 36.07134246826172, 36.064361572265625, 36.02042007446289, 36.02042007446289, 35.997188568115234, 35.997188568115234, 35.997188568115234 ], "content": [ "There is no support for declaring rules with @Rule inside of rules .", "Is there a way to call a rule or multiple rules in a script and execute it", "There are approximately 40 rules like rule 1 some 35 like rule 2 and rest are like rule 3 .", "Most commercial and open-source rules engines have evolved into rule management systems with repositories reporting on rule usage versioning etc .", "This page shows some examples of open-source rules engines in C : http : csharp-source.net open-source rule-engines", "The documentation https : github.com junit-team junit wiki Rules and other posts How Junit @Rule works", "but some rules doesn t work like ceksk rule .", "It is however a rule of thumb .", "The biggest pro that I ve seen for rules engines is that it lets the Business Rule owners implement the business-rules instead of putting the onus on programmers .", "What about using the ExternalResource http : kentbeck.github.com junit javadoc 4.10 org junit rules ExternalResource.html rule", "Most rule engines keep their rules in external files that can be modified by business analysts or end users .", "The most common lie i hear about Rule Engines like Drool is : Business Users can modify their own rules .", "Rule engines and the rules you put into them along with the stuff that implements them can be a bit hairy .", "It offers representation of rules in various different formats such as -- flat rule file written in JAVA or MVEL using DROOLS rule flow and decision tables composed in EXCEL .", "If this is the reason you wish to use a rule-engine be aware that rule engines work best when you are able to write declarative rules .", "I am new to rule engines .", "In JUnit 4.10 and below it is possible to annotate a rule as both @Rule and @ClassRule .", "We host our rule engines in Tomcat and call them via a web service tiny overhead over the rules themselves .", "Business analysts set up rules on the rule-engine and should have a GUI interface for rule creation and save to XML or a database .", "There is no next-line rule part of core TSLint but there is a one-line rule http : palantir.github.io tslint rules one-line .", "Here all rules with no parameters are stored in the list rule and the first one is applied .", "Here are some useful links for reference : .. . .. . http : www.cubearticle.com articles framework junit junit-rule .. . http : www.codeaffine.com 2012 09 24 junit-rules", "To ignore these rules you will have to create a rule to specifically ignore it or overwrite the rule without the alert by email option .", "I see rule process and data engines a.k.a .", "A rules engine will not help with this - you need to think about the rule management capabilities that a business-rules management system has .", "Is the normal way of working with rule-engines", "The ruleapp archive is typically the business-rules compliled into IRL ILOG Rule Language .", "Web Rule Seems to offer that plus a nice rules engine too .", "If your rules are complicated it makes sense to implement an established business-rules engine instead of coding rule management yourself .", "Then on the rule task on the rule flow use a dynamic select to include or exclude rules that have the property set .", "Under here you should be able to expand the rule flow into the rule packages and rules", "Business Rule Composer provides easy rule building as well as can be installed to business users for composing rules .", "This is going to be my rule of thumb for a while anyways .", "Yes the validation rules in the existing OWL rule files are based on OWL semantics .", "Drools rule language would be simple enough for simple rules .", "There are a few other rules but I ve removed them in an effort to simplify the rule for this question .", "My goal is to have a common rule template with specific rules for each user .", "The BizTalk rules engine is used to evaluate messages against rule sets .", "What are some of the best or most popular rule engines", "The JavaScript rule plugin allows extending the rules http : docs.sonarqube.org display DEV Extending+Coding+Rules using Java .", "I get very nervous when I see people using very large rule sets e.g . on the order of thousands of rules in a single rule set .", "I use ActivityTestRule as JUnit Rule .", "A biz rule is generally NOT a production rule", "It isn t that these aren t achievable with non-rule engine solutions but more that rule engines try to offer these features out of the box .", "Disclaimer : This is a rule of thumb so you might deviate from it .", "This is an example of an out-of-box rule provided by Junit .", "Looking for a Rule Engine to manage thousands of Financial compliance rules .", "a predefined Rule that contains or aggregates other application test specific Rules .", "A couple benefits offered by rule engines that don t necessarily come from SOA architecture are declarative code and a way for business owners to change rules e.g .", "explicitly separate the @ClassRule and @Rule responsibilities into separate rules but it seems a shame to have to mandate the use of two rules .", "The rule could be .. . .. . case-1 .. . .. . As per the above defined rules we look for highest number of matching criteria first and select the value of that rule i.e rule with value 100 .. . .. . case-2 .. . .. . If two conflicting rules found with same number of matching criteria then look for priority and select rule with highest priority .", "The simplest way to execute the rule is to include the rule archive generated from rule studio inside your application this is called Embedded mode of execution and invoke the rules using ILOG api and by passing the input parameters .", "You don t know which rule to apply : .. . .. . In this case might only use rules that have no parameters since you have to provide the rule parameter of the right type .", "check your junit version @Rule was introduced in junit4.7", "I created a simple rule in the rules file local.rules inside of the Snort rules folder .", "List Rule rules new ArrayList OWLFBRuleReasoner ReasonerRegistry.getOWLReasoner .getRules rules.addAll Rule.rulesFromURL file : JENA RULES FILE GenericRuleReasoner completeReasoner new GenericRuleReasoner rules", "Add the following rule in your ossec rules local rules.xml file : .. . .. . Add the rule at the bottom of the file but make sure it is within the group tag .", "- You may simplify this a little by defining a basic rule .. . .. . and write the other rules as extensions : .. . .. . so you don t need to repeat the Walker pattern for each rule .", "Is there a neat and tidy way of combining the @ClassRule and @Rule functionality in a single rule in JUnit 4.11", "As of JUnit 4.12 unreleased at time of writing it will be possible to annotate a single static rule with both @Rule and @ClassRule .", "If you don t like that - you won t like rule engines at all .", "Rule Engines can offer a lot of value in certain instances .", "First many rule engines work in a more declarative way .", "It does not utilize any forward backward chaining of rules like most of the other rule engines just executes the rules from top to bottom against the desired .NET object .", "This set of abstractions would then be consumed by specific rule engines .", "I ve read that The Rule of Three What is The Rule of Three", "White rule flow to include the rule written in sequence .", "Third create a rule flow to orchestrate this action rule .", "In your custom @Rule call the various methods on your child @Rule at the appropriate times .", "I m using nools https : github.com C2FO nools rule-engine and I have the necessity of modify rules on the fly without impacting the rule-engine integrity .", "However I would seriously consider alongside rule engines the possibility of not using a rule-engine .", "If your rules aren t for example the even number of these properties rule then the grid like presentation will break down in a combinatorial explosion of cases .", "Say this week the base credit score shifts you just adjust that rule in the chain of rules .", "This rule soup nature lets folks focus very tightly on their domain with little concern for all of the other rules that may be in the system .", "The rules engine gives you the tools to handle rule relationships but you still have to be able to imagine all of that in your mind .", "Junit Rules Are Explained In This Article http : www.singhajit.com junit-rules", "Here is an article which explains junit rules http : www.singhajit.com junit-rules", "i want to use some rule engines for my application which is in java .", "Essentially pretend that you are the JUnit library using the @Rule per its interface .", "When not to use.. . .. . .. . As rule engines are dynamic dynamic in the sense that the rules can be stored and managed and updated as data they are often looked at as a solution to the problem of deploying software .", "Due to the rather restrictive rules about compiler-generated special functions and the C++03 compatibility the rule of three stays the rule of three .", "When rule is invoked the input parameters are serialized and passed to the rule-engine rule-engine parse the invoked rule from the archive evaluate the rule based on the input parameters prepare the serialized output and returned back the output to the caller .", "Have been using @Rule from junit using 4.12 .", "@Rule was introduced in 4.7 version of junit thus it cannot be found .", "In JUnit test case a field annotated by @Rule must be public .", "The JUnit runner will need to access the field reflectively to run the rule .", "I am using the Junit ExpectedException Rule to verify the expected exception .", "In most cases the Rules being processed are at the business-layer it is possible to look at a firewall as a rule-engine of sorts another common type of rule-engine is based on high level domain specific languages for transaction processing and decision making .", "Does it matter if the rule set up at time x is different from the rule set up at time y because of : .. . a business people don t understand business or .. . b business people don t understand rules", "A repository of rules structured into coherent rule sets that can be orchestrated to make business decisions is a lot easier to manage than either thousands of lines-of-code or a rule soup .", "Will there be a rule of 5", "I am using the native rule-engine of webMethods wm Business rule to create complex rule .", "Documentation for @Rule : https : github.com junit-team junit blob master src main java org junit Rule.java", "If not so this rule can itself covered by the following rule i.e they shall refer to the same entity. .", ".. . or this might help : codeaffine.com 2013 11 18 http : www.codeaffine.com 2013 11 18 a-junit-rule-to-conditionally-ignore-tests", "No spiral rule or right-to-left rule needed .", "This is because the rule is not a query itself it is a rule for rewriting queries .", "The system should be able to save the rules defined by the Client and the properties should be set based on conditions defined in the rule .", "I d have three scoping rules for car bus and train to set a value then 41 rule took in that scoped value and operated on it .", "It worked fine when my rules were loaded from the file system but not when the rule were deployed in Guvnor ." ] }
{ "confidence": [ 59.013553619384766, 55.957576751708984, 55.36161804199219, 55.32606506347656, 55.12272644042969, 54.682376861572266, 54.45738220214844, 53.752159118652344, 53.6226921081543, 53.44924545288086, 53.262367248535156, 52.98020935058594, 52.74445343017578, 52.736854553222656, 52.688621520996094, 52.65128707885742, 52.65093231201172, 52.54307174682617, 52.398109436035156, 52.24123764038086 ], "content": [ "Question : What is the best practice to test drools rules with junit Until now we used junit with dbunit to test rules . We had sample-data that was put to hsqldb . We had couple of rule packages and by the end of the project it is very hard to make a good test input to test certain rules and not fire others . So the exact question is that how can I limit tests in junit to one or more certain rule s for testing Thanks for help .. . .. . Hubidubi .. . Answer : Do not attempt to limit rule execution to a single rule for a test . Unlike OO classes single rules are not independent of other rules so it does not make sense to test a rule in isolation in the same way that you would test a single class using a unit test . In other words to test a single rule test that it has the right effect in combination with the other rules . Instead run tests with a small amount of data on all of your rules i.e . with a minimal number of facts in the rule session and test the results and perhaps that a particular rule was fired . The result is not actually that much different from what you have in mind because a minimal set of test data might only activate one or two rules . As for the sample-data I prefer to use static data and define minimal test data for each test . There are various ways of doing this but programmatically creating fact objects in Java might be good enough . Comment : yes I know how rule execution works . This is the way we do it now . My problem is with this approach that it is very hard to make enough and appropriate test data . Because we don t limit the runnable rules any other rules can run and change the final result . So it s hard to predict the final result for asserts . That was the reason why I thought that it would be better to test rules izolated . Comment : I guess I was trying to say that the fact that any other rules can run and change the final result is exactly why testing a rule in isolation is less meaningful .", "Question : I want to write test cases for a bulk of code I would like to know details of JUnit @Rule annotation feature so that I can use it for writing test cases . Please provide some good answers or links which give detailed description of its functionality through a simple example . Comment : i already gone through this link http : cwd.dhemery.com 2011 01 what-junit-rules-are-good-for Comment : I think it is similar to the concept of injection am I right Comment : Junit Rules Are Explained In This Article http : www.singhajit.com junit-rules .. . Answer : Junit Rules work on the principle of AOP aspect oriented programming . It intercepts the test method thus providing an opportunity to do some stuff before or after the execution of a particular test method . Take the example of the below code : .. . .. . Every time the above test method is executed a temporary folder is created and it gets deleted after the execution of the method . This is an example of an out-of-box rule provided by Junit . Similar behaviour can also be achieved by creating our own rules . Junit provides the TestRule interface which can be implemented to create our own Junit Rule . Here are some useful links for reference : .. . .. . http : www.cubearticle.com articles framework junit junit-rule .. . http : www.codeaffine.com 2012 09 24 junit-rules", "Question : I am about to dive into a rules oriented project using ILOGs Rules for .NET - now IBM . And I have read a couple different perspectives regarding how to set up the rules processing and how to interact with the rule-engine . The two main thoughts I have seen is to centralize the rule-engine into its own farm of servers and program against the farm via a web service API or in ILOG s case via WCF . The other side is to run an instance of the rule-engine on each of your app servers and interact with it locally with each instance having its own copy of the rules . The up side to centralization is the ease of deployment of the rules to a centralized location . The rules scale as they need to rather than scaling each time you expand your application server configuration . This reduces waste from a purchased license perspective . The down side to this set up is the added overhead of making service calls network latency etc . The upside downside to locally running the rule-engine is the exact opposite of the centralized configuration s upside downside . No slow service calls fast API calls no network issues each app server relies on it self . Managing deployment of rules becomes more complex . Each time you add a node to your app cloud you will need more licenses for rule engines . In reading white papers I see that Amazon is running the rule-engine per app server configuration . They appear to do a slow deployment of rules and recognize that the lag in rule publishing is acceptable even though business logic is out of a sync for a given period of time . Question : From your experiences what is the best way to start integrating rules into a .net based web app for a shop that has not yet spent much time working in a rules driven world Comment : Programmers should be writing rules engines . Business analysts set up rules on the rule-engine and should have a GUI interface for rule creation and save to XML or a database . Indeed most rule engines fail in not integrating proper workflow management and only handle rules hence FCRE implementations that start adding over-complexity for the poor business analysts who then start requiring programmers to help them . Slow deployment of rules is unacceptable in a financial business environment and thus presumably so in other environments . Comment : But the programmers need to also expose hooks and datapoints to the rules engines for the BA s to work with . The apps that we write must tie into the rule-engine somehow . Comment : Yeah your apps put data into the rule-engine the rule-engine runs rules calculations custom processes where the programmers come in e.g . if you need to add a webservice call halfway through your workflow execution and spits out answers . The interface web service direct method call should be quite generic . The BAs define the data names that they work with and that s what you pass in . Of course I m sure financial workflows differ from other workflows rule engines . We host our rule engines in Tomcat and call them via a web service tiny overhead over the rules themselves . Comment : WOW . You are saying that to inject a web service in the middle of a ruleflow workflow inside the rule-engine is an acceptable practice I am currently thinking that I will do NO data-access inside the rule-engine but rather expect that all the data that I need to work with will be passed in to me . Is this way off from the accepted norm Do you have links to resources with rule development best practices Comment : I think we re working from different ideas here . A rule-engine is part of a workflow one type of activity that can be embedded . The business analysts create business decision workflows that include rulesets . We need to call external web-services e.g . credit checks within the workflow . It could just be that our needs are very different and that s why I didn t make it a comment . .. . Answer : We re using ILOG For DotNet and have a deployed pilot project . Here s a summary of our immature Rules Architecture : .. . .. . 1 . All data-access done outside of rules . 2 . Rules are deployed the same way as code source control release process yada yada . 3 . Projects services that use Rules have a reference to ILOG.Rules.dll and new-up RuleEngines via a custom pooling class . RuleEngines are pooled because it is expensive to bind a RuleSet to a RuleEngine . 4 . Almost all rules are written to expect Assert d objects rather than RuleFlow parameters . 5 . Since the rules run in the same memory space instances that are modified by the rules are the same instances in the program - which is immediate propagation of state . 6 . Almost all rules are run via RuleFlow even if it is a single RuleStep in the RuleFlow . We re looking at RuleExecutionServer as an hosting platform as well as RuleTeamServerForSharePoint to be the host for rules source . Eventually we will have Rules deployed to production outside of the code release process . The primary obstacle in all our Rule endeavors is Modeling and Rule Authoring skillsets .", "Question : In JUnit 4.10 and below it is possible to annotate a rule as both @Rule and @ClassRule . This means the rule gets invoked before before after the class and before after each test . One possible reason for doing so is to set up an expensive external resource via the @ClassRule calls and then cheaply reset it via the @Rule calls . As of JUnit 4.11 @Rule fields must be non-static and @ClassRule fields must be static so the above is no longer possible . There are clearly workarounds e.g . explicitly separate the @ClassRule and @Rule responsibilities into separate rules but it seems a shame to have to mandate the use of two rules . I briefly looked at using @Rule and inferring whether or not its the first last test but I don t believe that information is available at least it s not directly available on Description . Is there a neat and tidy way of combining the @ClassRule and @Rule functionality in a single rule in JUnit 4.11 Thanks Rowan Comment : See also JUnit issue 793 https : github.com junit-team junit issues 793 on GitHub where I ve asked this same question . .. . Answer : As of JUnit 4.12 unreleased at time of writing it will be possible to annotate a single static rule with both @Rule and @ClassRule . Note that it must be static - a non-static rule annotated with @Rule and @ClassRule is still considered invalid as anything annotated @ClassRule works at the class level so only really makes sense as a static member . See the release notes https : github.com junit-team junit blob master doc ReleaseNotes4.12.md pull-request-932-allow-static-rules-also-annotated-with-classrule and my pull request https : github.com junit-team junit pull 932 if you re interested in more detail . Comment : This was released as part of JUnit 4.12", "Question : I am about to dive into a rules oriented project using ILOGs Rules for .NET - now IBM . And I have read a couple different perspectives regarding how to set up the rules processing and how to interact with the rule-engine . The two main thoughts I have seen is to centralize the rule-engine into its own farm of servers and program against the farm via a web service API or in ILOG s case via WCF . The other side is to run an instance of the rule-engine on each of your app servers and interact with it locally with each instance having its own copy of the rules . The up side to centralization is the ease of deployment of the rules to a centralized location . The rules scale as they need to rather than scaling each time you expand your application server configuration . This reduces waste from a purchased license perspective . The down side to this set up is the added overhead of making service calls network latency etc . The upside downside to locally running the rule-engine is the exact opposite of the centralized configuration s upside downside . No slow service calls fast API calls no network issues each app server relies on it self . Managing deployment of rules becomes more complex . Each time you add a node to your app cloud you will need more licenses for rule engines . In reading white papers I see that Amazon is running the rule-engine per app server configuration . They appear to do a slow deployment of rules and recognize that the lag in rule publishing is acceptable even though business logic is out of a sync for a given period of time . Question : From your experiences what is the best way to start integrating rules into a .net based web app for a shop that has not yet spent much time working in a rules driven world Comment : Programmers should be writing rules engines . Business analysts set up rules on the rule-engine and should have a GUI interface for rule creation and save to XML or a database . Indeed most rule engines fail in not integrating proper workflow management and only handle rules hence FCRE implementations that start adding over-complexity for the poor business analysts who then start requiring programmers to help them . Slow deployment of rules is unacceptable in a financial business environment and thus presumably so in other environments . Comment : But the programmers need to also expose hooks and datapoints to the rules engines for the BA s to work with . The apps that we write must tie into the rule-engine somehow . Comment : Yeah your apps put data into the rule-engine the rule-engine runs rules calculations custom processes where the programmers come in e.g . if you need to add a webservice call halfway through your workflow execution and spits out answers . The interface web service direct method call should be quite generic . The BAs define the data names that they work with and that s what you pass in . Of course I m sure financial workflows differ from other workflows rule engines . We host our rule engines in Tomcat and call them via a web service tiny overhead over the rules themselves . Comment : WOW . You are saying that to inject a web service in the middle of a ruleflow workflow inside the rule-engine is an acceptable practice I am currently thinking that I will do NO data-access inside the rule-engine but rather expect that all the data that I need to work with will be passed in to me . Is this way off from the accepted norm Do you have links to resources with rule development best practices Comment : I think we re working from different ideas here . A rule-engine is part of a workflow one type of activity that can be embedded . The business analysts create business decision workflows that include rulesets . We need to call external web-services e.g . credit checks within the workflow . It could just be that our needs are very different and that s why I didn t make it a comment . .. . Answer : I don t have much to say on the which server question but I would urge you to develop decision services - callable services that use rules to make decisions but that do not change the state of the business . Letting the calling application service process decide what data changes to make as a result-of calling the decision service and having the calling component actually initiate the action s suggested by the decision service makes it easier to use the decision service over and over again across channels processes etc . The cleaner and less tied to the rest of the infrastructure the decision service the more reusable and manageable it is going to be . The discussion here on ebizQ http : www.ebizq.net blogs decision 5Fmanagement 2009 04 interesing 5Fdebate 5Fon 5Fbusiness.php might be worth reading in this regard .", "Question : In JUnit 4.10 and below it is possible to annotate a rule as both @Rule and @ClassRule . This means the rule gets invoked before before after the class and before after each test . One possible reason for doing so is to set up an expensive external resource via the @ClassRule calls and then cheaply reset it via the @Rule calls . As of JUnit 4.11 @Rule fields must be non-static and @ClassRule fields must be static so the above is no longer possible . There are clearly workarounds e.g . explicitly separate the @ClassRule and @Rule responsibilities into separate rules but it seems a shame to have to mandate the use of two rules . I briefly looked at using @Rule and inferring whether or not its the first last test but I don t believe that information is available at least it s not directly available on Description . Is there a neat and tidy way of combining the @ClassRule and @Rule functionality in a single rule in JUnit 4.11 Thanks Rowan Comment : See also JUnit issue 793 https : github.com junit-team junit issues 793 on GitHub where I ve asked this same question . .. . Answer : The answer for you question is following : there is no clean way to do it only setup two rules simultaneously . We tried to implement similar task for automatic tests retries and two rules were combined for this task and such ugly approach was implemented : Tests retry with two rules http : stackoverflow.com questions 11867683 re-run-failed-test-script-completely-using-junit 15937230 15937230 .. . .. . But if think more precisely on the necessary task that needs to be implemented better approach can be used using jUnit custom Runner : Retry Runner http : stackoverflow.com questions 8295100 how-to-re-run-failed-junit-tests-immediately 20762914 20762914 . So in order to have better approach it will be good to know your specific use-case . Comment : My use-case is basically the example I gave in the question : I have an external resource a WireMock http : wiremock.org instance to be specific that I d like to set up tear down at class start end and reset in between tests . Comment : I think it s not possible to configure it using one rule . Based on use-case that you ve published on GitHub I would suggest put these rules into some base-class to do not allow developers to forget about this and not to duplicate code", "Question : In JUnit 4.10 and below it is possible to annotate a rule as both @Rule and @ClassRule . This means the rule gets invoked before before after the class and before after each test . One possible reason for doing so is to set up an expensive external resource via the @ClassRule calls and then cheaply reset it via the @Rule calls . As of JUnit 4.11 @Rule fields must be non-static and @ClassRule fields must be static so the above is no longer possible . There are clearly workarounds e.g . explicitly separate the @ClassRule and @Rule responsibilities into separate rules but it seems a shame to have to mandate the use of two rules . I briefly looked at using @Rule and inferring whether or not its the first last test but I don t believe that information is available at least it s not directly available on Description . Is there a neat and tidy way of combining the @ClassRule and @Rule functionality in a single rule in JUnit 4.11 Thanks Rowan Comment : See also JUnit issue 793 https : github.com junit-team junit issues 793 on GitHub where I ve asked this same question . .. . Answer : Another possible workaround is to declare a static @ClassRule and use that value when declaring a non-static @Rule too : .. . .. . That means you don t have to refactor any existing rule classes but you still need to declare two rules so it doesn t answer the original question particularly well . Comment : In the Rule s code how do you differentiate when it fires as a @ClassRule set up the external resource in your example and when it fires as a @Rule resetting the resource in that example Comment : It ll depend on the exact implementation of the rule . In my case the external resource can be interrogated to see if it s up and running . If it is we re acting as a @Rule so we run the base Statement and then reset . If not we re acting as a @ClassRule so we set up the resource run the base Statement and then close down the resource . Comment : The Description passed into TestRule can be checked to see if the current node is a test i.e . no children or a suite at least one child", "Question : I have a pretty decent list of the advantages of using a Rules Engine as well as some reasons to use them what I need is a list of the reasons why you should NOT use a Rules Engine .. . .. . The best I have so far is this : .. . .. . Rules engines are not really intended to handle workflow or process executions nor are workflow engines or process-management tools designed to do rules . Any other big reasons why you should not use them Comment : Oh come on 43 upvotes 25 stars top hit on google and it s closed Comment : @GaneshKrishnan : Twelve answers is already probably enough yes .. . Answer : I m a big fan of Business Rules Engines since it can help you make your life much easier as a programmer . One of the first experiences I ve had while working on a Data Warehouse project was to find Stored Procedures containing complicated CASE structures stretching over entire pages . It was a nightmare to debug since it was very difficult to understand the logic applied in such long CASE structures and to determine if you have an overlapping between a rule at page 1 of the code and another from page 5 . Overall we had more than 300 such rules embedded in the code . When we ve received a new development requirement for something called Accounting Destination which was involving treating more than 3000 rules i knew something had to change . Back then I ve been working on a prototype which later on become the parent of what now is a Custom Business Rule engine capable of handling all SQL standard operators . Initially we ve been using Excel as an authoring tool and later on we ve created an ASP.net application which will allow the Business Users to define their own business-rules without the need of writing code . Now the system works fine with very few bugs and contains over 7000 rules for calculating this Accounting Destination . I don t think such scenario would have been possible by just hard-coding . And the users are pretty happy that they can define their own rules without IT becoming their bottleneck . Still there are limits to such approach : .. . .. . You need to have capable business users which have an excellent understanding of the company business . There is a significant workload on searching the entire system in our case a Data Warehouse in order to determine all hard-coded conditions which make sense to translate into rules to be handled by a Business Rule Engine . We ve also had to take good care that these initial templates to be fully understandable by Business Users . You need to have an application used for rules authoring in which algorithms for detection of overlapping business-rules is implemented . Otherwise you ll end up with a big mess where no one understands anymore the results they get . When you have a bug in a generic component like a Custom Business Rule Engine it can be very difficult to debug and involve extensive tests to make sure that things that worked before also work now . More details on this topic can be found on a post I ve written : http : dwhbp.com post 2011 10 30 Implementing-a-Business-Rule-Engine.aspx .. . .. . Overall the biggest advantage of using a Business Rule Engines is that it allows the users to take back control over the Business Rule definitions and authoring without the need of going to the IT department each time they need to modify something . It also the reduces the workload over IT development teams which can now focus on building stuff with more added value . Cheers .. . .. . Nicolae Comment : Nice article My use-case is a data-warehouse that is in its infancy . So this was very helpful", "Question : Can you provide a good example of rule definition language written in C . Java guys have JESS http : herzberg.ca.sandia.gov is there anything good for C Comment : This article can help codeproject.com KB aspnet buisness-rules-asp-net.aspx http : www.codeproject.com KB aspnet buisness-rules-asp-net.aspx .. . Answer : This page shows some examples of open-source rules engines in C : http : csharp-source.net open-source rule-engines", "Question : I am creating a new @Rule for my use-case which looks like .. . .. . In my Test I use it as .. . .. . When I run this test I get error as .. . .. . Seems like when creating your own @Rule I am not able to depend on any existing @Rule .. . .. . Is that the issue and how do I resolve it .. . Answer : Yes I don t think that there s anything built-in to JUnit to let you nest @Rule objects like you re doing . I think the most obvious options would be : .. . .. . 1 . In your custom @Rule call the various methods on your child @Rule at the appropriate times . Essentially pretend that you are the JUnit library using the @Rule per its interface . I haven t dug into the details to see how complex it would be . 2 . Have your @Rule extend TemporaryFolder rather than ExternalResource making sure to call super in any of the methods you re overriding . This lets you do Everything a TemporaryFolder does and then some which perhaps isn t perfect OO-theory as it s not really a type-of TemporaryFolder but should work the way you re looking for . I ve used this approach when setting up a particular folder that needed to be set up with a particular environment for my tests and it worked fairly well . 3 . Have your custom @Rule take in as a constructor parameter a TemporaryFolder reference which you then save in a field and use as needed . This requires all users of your @Rule to include both @Rule objects but perhaps makes it clear that the test really does require both a temporary folder to do its work in as well as your particular custom setup . Comment : Option 3 sounds like the best design . However I think it ll be hard to implement : You want to guarantee that TemporaryFolder has been instantiated first so you can pass it to your custom Rule . For that purpose JUnit has a RuleChain hascode.com 2012 02 ordering-your-junit-rules-using-a-rulechain http : www.hascode.com 2012 02 ordering-your-junit-rules-using-a-rulechain . Here you can define the order but not pass one instance to the constructor of the other . A real dilemma I think option 1 is pragmatic : Override apply .. . wrap your Statement around the one generated by TemporaryFolder and execute your logic after your child rule . Comment : I like the approach 3 as well I will read about RuleChain", "Question : I am about to dive into a rules oriented project using ILOGs Rules for .NET - now IBM . And I have read a couple different perspectives regarding how to set up the rules processing and how to interact with the rule-engine . The two main thoughts I have seen is to centralize the rule-engine into its own farm of servers and program against the farm via a web service API or in ILOG s case via WCF . The other side is to run an instance of the rule-engine on each of your app servers and interact with it locally with each instance having its own copy of the rules . The up side to centralization is the ease of deployment of the rules to a centralized location . The rules scale as they need to rather than scaling each time you expand your application server configuration . This reduces waste from a purchased license perspective . The down side to this set up is the added overhead of making service calls network latency etc . The upside downside to locally running the rule-engine is the exact opposite of the centralized configuration s upside downside . No slow service calls fast API calls no network issues each app server relies on it self . Managing deployment of rules becomes more complex . Each time you add a node to your app cloud you will need more licenses for rule engines . In reading white papers I see that Amazon is running the rule-engine per app server configuration . They appear to do a slow deployment of rules and recognize that the lag in rule publishing is acceptable even though business logic is out of a sync for a given period of time . Question : From your experiences what is the best way to start integrating rules into a .net based web app for a shop that has not yet spent much time working in a rules driven world Comment : Programmers should be writing rules engines . Business analysts set up rules on the rule-engine and should have a GUI interface for rule creation and save to XML or a database . Indeed most rule engines fail in not integrating proper workflow management and only handle rules hence FCRE implementations that start adding over-complexity for the poor business analysts who then start requiring programmers to help them . Slow deployment of rules is unacceptable in a financial business environment and thus presumably so in other environments . Comment : But the programmers need to also expose hooks and datapoints to the rules engines for the BA s to work with . The apps that we write must tie into the rule-engine somehow . Comment : Yeah your apps put data into the rule-engine the rule-engine runs rules calculations custom processes where the programmers come in e.g . if you need to add a webservice call halfway through your workflow execution and spits out answers . The interface web service direct method call should be quite generic . The BAs define the data names that they work with and that s what you pass in . Of course I m sure financial workflows differ from other workflows rule engines . We host our rule engines in Tomcat and call them via a web service tiny overhead over the rules themselves . Comment : WOW . You are saying that to inject a web service in the middle of a ruleflow workflow inside the rule-engine is an acceptable practice I am currently thinking that I will do NO data-access inside the rule-engine but rather expect that all the data that I need to work with will be passed in to me . Is this way off from the accepted norm Do you have links to resources with rule development best practices Comment : I think we re working from different ideas here . A rule-engine is part of a workflow one type of activity that can be embedded . The business analysts create business decision workflows that include rulesets . We need to call external web-services e.g . credit checks within the workflow . It could just be that our needs are very different and that s why I didn t make it a comment . .. . Answer : I never liked the centralization argument . It means that everything is coupled into the rules engine which becomes a dumping ground for all the rules in the system . Pretty soon you can t change anything for fear of the unknown : What will we break I much prefer following Amazon s idea of services as isolated autonomous components . I interpret that to mean that services own their data and their rules . This has the added benefit of partitioning the rules space . A rule set becomes harder to maintain as it grows better to keep them to a manageable size . If parts of the rule set are shared I d prefer a data-driven DI approach where a service can have its own instance of a rules engine and load the common rules from a database on startup . This might not be feasible if your iLog license makes multiple instances cost prohibitive . That would be a case where product that s supposed to be helping might actually be dictating architectural choices that will bring grief . It would be a good argument for a less expensive alternative e.g . JBoss Rules in Java-land . What about a data-driven decision-tree approach Is a Rete rules engine really necessary o is the enterprise tool decision driving your choice I d try to set up the rules engine so it was as decoupled from the rest of the enterprise as possible . I wouldn t have it calling out to databases or services if I could . Better to make that the responsibility of the objects asking for a decision . Let them call to the necessary web-services and databases to assemble the necessary data pass it to the rules engine and let it do its thing . Coupling is your enemy : Try to design your system to minimize it . Keeping rules engines isolated is a good way to do it .", "Question : According to the 4.12 release notes https : github.com junit-team junit blob master doc ReleaseNotes4.12.md pull-request-932-allow-static-rules-also-annotated-with-classrule it is possible to annotate static-members of a test class with both @Rule and @ClassRule : .. . .. . a static member annotated with both @Rule and @ClassRule is now considered valid . This means a single rule may be used to perform actions both before after a class e.g . setup tear down an external resource and between tests e.g . reset the external resource .. . .. . I want to use this functionality to initialize a resource at the beginning of all tests in the file do some cleanup on the resource between each test and dispose of it after all tests have finished . This resource is currently represented by a class that extends ExternalResource http : junit.org apidocs org junit rules ExternalResource.html . In my before and after methods how can I differentiate between before after all tests and before after each test Do I need to use a different custom implementation of TestRule to accomplish this Comment : Here is an article which explains junit rules http : www.singhajit.com junit-rules .. . Answer : The methods annotated with @Before and @After will be run before and after each test while those annotated with @BeforeClass and @AfterClass will be run before and after the first last test in the class respectively . The before after methods of a @Rule are executed before and after each test while the before after methods of a @ClassRule are run before after the whole test class . You can use an ExternalResource for either the @Rule or @ClassRule case as long as the handler methods react properly for both scenarios . As far as I can tell from the documentation there is no means of distinguishing between the two rule categories within the rule class methods . If you use the rule class for both cases it will be applied the same for both . Comment : Ok so if @ClassRule and @Rule are on the same static member its before after methods will be run before after the whole class and before after each test That doesn t seem useful since it doesn t differentiate between the expensive setup and teardown of a resource and resetting without full teardown it between tests . Do you know why the junit team decided that was useful Is the answer to use separate @Rule and @ClassRule members like in the blog you linked Comment : I would imagine someone came up with a valid use-case so they implemented it . It would be nice if they pointed out that use-case . : - Yes I would suggest splitting them up as in my blog entry coffeaelectronica.com blog 2013 junit-rules.html http : coffeaelectronica.com blog 2013 junit-rules.html", "Question : When is a Business Rules Engine used What is the difference between Business Rules Engines and scripting configuration customization .. . Answer : Business rules engines are typically used to provide customizable IF some-condidtion THEN do-something sorts of logic to applications . These types of business-rules can trigger certain workflows to execute or bubble up event knowledge to higher level rules causing them to be evaluated . Using a rule-engine also allows for easier separation-of-concerns by removing the business logic from your code . Rules engines today typically also offer a front-end where users can add new rules without having to modify scripts inside the application . Rules engines implement algorithms such as Rete speaking from Drools experience that make the task of evaluating the rules quicker . The rule-engine also provides forward chaining backward chaining hybrid chaining etc . of rules . However these could be implemented in a scripting-language as well . You can achieve some of the same sorts of things with both approaches but I believe that it depends on the complexity and number of rules as to which avenue you should choose . Take a look at this link from the Jess project : http : www.jessrules.com guidelines.shtml .. . .. . It provides a step-by-step walk through of questions to ask yourself in order to determine if a rules engine meets your needs or is overkill .", "Question : I m auditing a project that uses what is called a Rules Engine http : en.wikipedia.org wiki Business rules engine . In short it s a way to externalize business logic from application code . This concept is entirely new to me and I m pretty skeptical about it . After hearing people talk about Anemic Domain Models http : www.martinfowler.com bliki AnemicDomainModel.html for the past few years I m questioning the Rules Engine Approach . To me they seem like a great way to WEAKEN a domain-model . For example say I m doing a java webapp interacting with a Rules Engine . Then I decide I want to have an Android app based on the same domain . Unless I want the Android app to interact with the Rules Engine as well I m going to have to miss out on whatever business logic was already written . As I don t have any experience with them yet just curiosity I was interested to hear about the pros and cons are in using a Rules Engine The only pro that I can think of is that you don t need to rebuild your entire Application just to change some business rule but really how many apps really have that many changes . But using a Rules Engine to solve that problem kind of sounds to me like putting a band-aid over a shotgun wound . UPDATE - since writing this the god himself Martin Fowler has blogged about using a Rules engine http : martinfowler.com bliki RulesEngine.html . Comment : Are you looking into any third party products or are you going to roll your own Comment : That is a great article from Martin Fowler thanks Comment : you are right - they are very anti-OO . They come from a time when OO wasn t common that partly explains it but yes they very much want to work with records value-objects which are anemic as you say . This isn t necessarily a bad thing but it is what it is . If you don t like that - you won t like rule engines at all . Comment : I would also examine whether one really wants the forward chaining rule-engine or one actually wants the semantically clear in the sense of : at least one knows what they compute in the first place logic programs of Prolog or very much simpler Datalog or one can go into more rarified territories and take a look at Transaction Logic . If one wants reactivity whenever something changes in the database do something anything a look a a Tuplespace Lindaspace implementation linked to good old OO programming in PREFERRED LANGUAGE might be worth it . .. . Answer : Rule Engines can offer a lot of value in certain instances . First many rule engines work in a more declarative way . A very crude example would be AWK where you can assign regexes to blocks of code . When the regex is seen by the file scanner the block of code is executed . You can see that in this case if you had say a large AWK file and you wanted to add Yet Another rule you can readily go to the bottom of the file add you regex and logic and be done with it . Specifically for many applications you re not particularly concerned with what the other rules are doing and the rules don t really interoperate with each other . Thus the AWK file becomes more like a rule soup . This rule soup nature lets folks focus very tightly on their domain with little concern for all of the other rules that may be in the system . For example Frank is interested in orders with a total of more than 1000 so he puts in to the rule system that he s interested . IF order.total 1000 THEN email Frank . Meanwhile Sally wants all orders from the west coast : IF order.source WEST COAST THEN email Sally . So you can see in this trivial contrived case that an order can satisfy both rules yet both rules are independent of each other . A 1200 order from the West Coast notifies both Frank and Sally . When Frank is no longer concerned he ll simply yank his rule out from the soup . For many situations this flexibility can be very powerful . It can also like this case be exposed to end users for simple rules . Using high level expressions and perhaps lightweight scripting . Now clearly in a complicated system there are all sorts of interrelationships that can happen an this is why the entire system is not Done with rules . Someone somewhere is going to be in charge of the rules not getting out of hand . But that doesn t necessarily lessen the value such a system can provide . Mind this doesn t even go in to things like expert systems where rules fire on data that rules can create but a simpler rules system . Anyway I hope this example shows how a rules system can help augment a larger application .", "Question : The rule of three also known as the Law of The Big Three or The Big Three is a rule of thumb in C++ that claims that if a class defines one of the following it should probably explicitly define all three : destructor copy-constructor copy assignment-operator . Why is a non-default constructor not considered as one of them When there is any resource managed in the class programmer has to define a non-default constructor anyway . .. . Answer : That s not what the rule of three is about . Any class that manages resources will have that destructor and hence the rule of three applies anyway . The point is that you don t absolutely need non-default constructors but you do need the others copy-constructor assignment-operator . At least it used to be vital for e.g . elements in standard containers . Now with move-semantics c++11 things are starting to shift a bit . Will there be a rule of 5 I don t know how it will pan out in terms of best practices and rules of thumb . In fact one could state a variation of the Rule of Three already : a class that defines a destructor should also define a copy move-constructor and copy move assignment-operator . AND if a copy-constructor is defined a copy assignment-operator should also be defined . AND if a move-constructor is defined a move assignment-operator should also be defined . This is going to be my rule of thumb for a while anyways .", "Question : What goals can be accomplished using a Rules Engine Comment : I don t mean to be rude but have you tried Google I m sure the Wikipedia page was one of the first results and it s pretty clear : en.wikipedia.org wiki Rule engine http : en.wikipedia.org wiki Rule engine Comment : Goals are not mentioned on Wiki . I have searched Wiki page first . Comment : Also what problems are solved using Rule Engine is also not mentioned . Comment : If you read the article on Wikipedia along with the articles on production systems en.wikipedia.org wiki Production system http : en.wikipedia.org wiki Production system and inference engines en.wikipedia.org wiki Inference engine http : en.wikipedia.org wiki Inference engine you will find answers to both the purpose goals and problems solved by rule engines . Comment : As an aside when queried about problems solved using Rule Engine result was google.com http : www.google.com search hl en client firefox-a rls org.mozilla 3Aen-US 3Aofficial hs krI q Problems+solved+using+Rule+Engine aq f oq aqi and it was not very impressive . .. . Answer : To add to @Reed Copsey s answer . Most rule engines keep their rules in external files that can be modified by business analysts or end users . Drools is one such solution . Comment : This isn t a full answer -- it belongs as a comment attached to another answer .", "Question : I m auditing a project that uses what is called a Rules Engine http : en.wikipedia.org wiki Business rules engine . In short it s a way to externalize business logic from application code . This concept is entirely new to me and I m pretty skeptical about it . After hearing people talk about Anemic Domain Models http : www.martinfowler.com bliki AnemicDomainModel.html for the past few years I m questioning the Rules Engine Approach . To me they seem like a great way to WEAKEN a domain-model . For example say I m doing a java webapp interacting with a Rules Engine . Then I decide I want to have an Android app based on the same domain . Unless I want the Android app to interact with the Rules Engine as well I m going to have to miss out on whatever business logic was already written . As I don t have any experience with them yet just curiosity I was interested to hear about the pros and cons are in using a Rules Engine The only pro that I can think of is that you don t need to rebuild your entire Application just to change some business rule but really how many apps really have that many changes . But using a Rules Engine to solve that problem kind of sounds to me like putting a band-aid over a shotgun wound . UPDATE - since writing this the god himself Martin Fowler has blogged about using a Rules engine http : martinfowler.com bliki RulesEngine.html . Comment : Are you looking into any third party products or are you going to roll your own Comment : That is a great article from Martin Fowler thanks Comment : you are right - they are very anti-OO . They come from a time when OO wasn t common that partly explains it but yes they very much want to work with records value-objects which are anemic as you say . This isn t necessarily a bad thing but it is what it is . If you don t like that - you won t like rule engines at all . Comment : I would also examine whether one really wants the forward chaining rule-engine or one actually wants the semantically clear in the sense of : at least one knows what they compute in the first place logic programs of Prolog or very much simpler Datalog or one can go into more rarified territories and take a look at Transaction Logic . If one wants reactivity whenever something changes in the database do something anything a look a a Tuplespace Lindaspace implementation linked to good old OO programming in PREFERRED LANGUAGE might be worth it . .. . Answer : Most rule engines that I have seen are viewed as a black-box by system code . If I were to build a domain-model I would probably want certain business-rules to be intrinsic to the domain-model e.g . business-rules that tell me when an object has invalid values . This allows multiple systems to share the domain-model without duplicating business logic . I could have each system use the same rule service to validate my domain-model but this appears to weaken my domain-model as was pointed out in the question . Why Because instead of consistently enforcing my business-rules across all systems at all times I am relying on system programmers to determine when the business-rules should be enforced by calling the rule service . This may not be a problem if the domain-model comes to you completely populated but can be problematic if you re dealing with a user-interface or system that changes values in the domain-model over its lifetime . There is another class of business-rules : decision making . For example an insurance company may need to classify the risk of underwriting an applicant and arrive at a premium . You could place these types of business-rules in your domain-model but a centralized decision for scenarios like this are usually desirable and actually fit quite well into a service-oriented architecture . This does beg the question of why a rule-engine and not system code . The place where a rule-engine may be a better choice is where business-rules responsible for the decision change over time as some other answers have pointed out . Rule engines usually allow you to change rules without restarting your system or deploying new executable code regardless of what promises you receive from a vendor do make sure you test your changes in a non-production environment because even if the rule-engine is flawless humans are still changing the rules . If you re thinking I can do that by using a database to store values that change you re right . A rule-engine is not a magical box that does something new . It is intended to be a tool that provides a higher level of abstraction so you can focus less on reinventing the wheel . Many vendors take this a step further by letting you create templates so that business users can fill in the blanks instead of learning a rule language . One parting caution about templates : templates can never take less time than writing a rule without a template because the template must at the bare minimum describe the rule . Plan for a higher initial cost the same as-if you were to build a system that used a database to store values that change vs . writing the rules in directly in system code - the ROI is because you save on future maintenance of system code . Comment : I m coming to this discussion 2 years late so if you re still around Aaron can you describe how the above benefits not having to restart the system for changes abstraction decoupling and reuse of business-rules are distinct to Rules Engines and not simply a benefit of SOA architectures in general In other words aren t rules engines a subset of SOA and if so what are their distinct benefits vs . simply deploying an SOA service written in imperative style code Comment : A SOA architecture is a good ecosystem for a rules engine for decision making . The engine can route calls to different services depending on the system s needs . Without one an admin would manually configure the system to follow another path . Comment : Many of the benefits I listed do come with a SOA architecture . A couple benefits offered by rule engines that don t necessarily come from SOA architecture are declarative code and a way for business owners to change rules e.g . decrease some dollar amount that triggers a manual review . It isn t that these aren t achievable with non-rule engine solutions but more that rule engines try to offer these features out of the box . Comment : An even more recent blog post by Martin Fowler goes in depth on how to refactor code into data + rules engine : Refactoring to an Adaptive Model http : martinfowler.com articles refactoring-adaptive-model.html", "Question : I want to write test cases for a bulk of code I would like to know details of JUnit @Rule annotation feature so that I can use it for writing test cases . Please provide some good answers or links which give detailed description of its functionality through a simple example . Comment : i already gone through this link http : cwd.dhemery.com 2011 01 what-junit-rules-are-good-for Comment : I think it is similar to the concept of injection am I right Comment : Junit Rules Are Explained In This Article http : www.singhajit.com junit-rules .. . Answer : I found this article http : cwd.dhemery.com 2010 12 junit-rules explains @Rule s rather well especially check out the last section The Sequence Of Events In Detail", "Question : In JUnit 4.10 and below it is possible to annotate a rule as both @Rule and @ClassRule . This means the rule gets invoked before before after the class and before after each test . One possible reason for doing so is to set up an expensive external resource via the @ClassRule calls and then cheaply reset it via the @Rule calls . As of JUnit 4.11 @Rule fields must be non-static and @ClassRule fields must be static so the above is no longer possible . There are clearly workarounds e.g . explicitly separate the @ClassRule and @Rule responsibilities into separate rules but it seems a shame to have to mandate the use of two rules . I briefly looked at using @Rule and inferring whether or not its the first last test but I don t believe that information is available at least it s not directly available on Description . Is there a neat and tidy way of combining the @ClassRule and @Rule functionality in a single rule in JUnit 4.11 Thanks Rowan Comment : See also JUnit issue 793 https : github.com junit-team junit issues 793 on GitHub where I ve asked this same question . .. . Answer : Yet another possible workaround is to declare a non-static @Rule and have it act on static collaborators : if the collaborator isn t initialised yet the @Rule knows it s running for the first time so it can set up its collaborators e.g . starting an external resource if they are initialised the @Rule can do it s per-test work e.g . reseting an external resource . This has the drawback that the @Rule doesn t know when it s processed the last test so can t perform any after-class actions e.g . tidying up the external resource an @AfterClass method can be used to do so instead however .", "Question : I have a pretty decent list of the advantages of using a Rules Engine as well as some reasons to use them what I need is a list of the reasons why you should NOT use a Rules Engine .. . .. . The best I have so far is this : .. . .. . Rules engines are not really intended to handle workflow or process executions nor are workflow engines or process-management tools designed to do rules . Any other big reasons why you should not use them Comment : Oh come on 43 upvotes 25 stars top hit on google and it s closed Comment : @GaneshKrishnan : Twelve answers is already probably enough yes .. . Answer : I don t really understand some points such as : .. . a business people needs to understand business very well or .. . b disagreement on business people don t need to know the rule . For me as a people just touching BRE the benefit of BRE is so called to let system adapt to business change hence it s focused on adaptive of change . Does it matter if the rule set up at time x is different from the rule set up at time y because of : .. . a business people don t understand business or .. . b business people don t understand rules" ] }
[ "yes-answer-long", "yes-answer-short" ]
business-rules
UNK_RELATION
mysqlpp@wrapper@29
mysqlpp -- mysql + + is a c++ @placeholder for mysql s c api .
{ "confidence": [ 32.83869171142578, 31.2601375579834, 29.477325439453125, 25.076881408691406, 24.320507049560547, 23.66754913330078, 23.66754913330078, 22.111473083496094, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797, 11.614513397216797 ], "content": [ "Ok I m relatively new to using the mysqlpp library that is used in Visual Studio to connect to a MySQL database and am having trouble trying to convert a vector of type mysqlpp : : String to a vector of type int .", "If you want to be more explicit you can use mysqlpp : : String s conv http : tangentsoft.net mysql++ doc html refman classmysqlpp 1 1String.html a12 function :", "It comes out as a mysqlpp : : sql blob type .", "I m particularly worried because of this snippet from the mysqlpp documentation : .. . .. . Because C++ strings handle binary-data just fine you might think you can use std : : string instead of sql blob but the current design of String converts to std : : string via a C string .", "I m grabbing some binary-data out of my MySQL database .", "Does anyone have any experience with mysqlpp and would mind helping me out a little", "mysqlpp : : String has operator int so your code snippet should work .", "http : tangentsoft.net mysql++ doc html userman ssqls.html ssqls-blob .. . .. . Thanks for your assistance", "It just so happens that this BLOB is a serialized Google Protobuf .", "I need to de-serialize it so that I can access it normally .", "This gives a compile error since ParseFromString is not intended for mysqlpp : sql blob types : .. . .. . However if I force the cast it compiles OK : .. . .. . Is this safe", "As a result the BLOB data is truncated at the first embedded null character during population of the SSQLS .", "There s no way to fix that without completely redesigning either String or the SSQLS mechanism .", "It doesn t look like it would be a problem judging by that quote it s basically saying if a null character is found in the blob it will stop the string there however ASCII strings won t have random nulls in the middle of them .", "However this might present a problem for internalization multibyte charsets may have nulls in the middle .", "Basically it depends on how you serialized the protobuf .", "If you serialized it as a binary watch out", "You re setting yourself up for a problem down the road .", "But if you use the google : : protobuf : : TextFormat : : PrintToString and ParseFromString functions you ll be all right .", "I ve posted an example of what I m basically trying to do below that appears in my code .", "Assume the vector futureItemsets is already populated and I just want to copy over the contents into an integer vector .", "Thanks for any help you can provide", "What problem are you having with it" ] }
{ "confidence": [ 44.86662292480469, 39.80662536621094 ], "content": [ "Question : Ok I m relatively new to using the mysqlpp library that is used in Visual Studio to connect to a MySQL database and am having trouble trying to convert a vector of type mysqlpp : : String to a vector of type int . Does anyone have any experience with mysqlpp and would mind helping me out a little I ve posted an example of what I m basically trying to do below that appears in my code . Assume the vector futureItemsets is already populated and I just want to copy over the contents into an integer vector . Thanks for any help you can provide .. . Answer : mysqlpp : : String has operator int so your code snippet should work . What problem are you having with it If you want to be more explicit you can use mysqlpp : : String s conv http : tangentsoft.net mysql++ doc html refman classmysqlpp 1 1String.html a12 function :", "Question : I m grabbing some binary-data out of my MySQL database . It comes out as a mysqlpp : : sql blob type . It just so happens that this BLOB is a serialized Google Protobuf . I need to de-serialize it so that I can access it normally . This gives a compile error since ParseFromString is not intended for mysqlpp : sql blob types : .. . .. . However if I force the cast it compiles OK : .. . .. . Is this safe I m particularly worried because of this snippet from the mysqlpp documentation : .. . .. . Because C++ strings handle binary-data just fine you might think you can use std : : string instead of sql blob but the current design of String converts to std : : string via a C string . As a result the BLOB data is truncated at the first embedded null character during population of the SSQLS . There s no way to fix that without completely redesigning either String or the SSQLS mechanism . http : tangentsoft.net mysql++ doc html userman ssqls.html ssqls-blob .. . .. . Thanks for your assistance .. . Answer : It doesn t look like it would be a problem judging by that quote it s basically saying if a null character is found in the blob it will stop the string there however ASCII strings won t have random nulls in the middle of them . However this might present a problem for internalization multibyte charsets may have nulls in the middle . Comment : Basically it depends on how you serialized the protobuf . If you serialized it as a binary watch out You re setting yourself up for a problem down the road . But if you use the google : : protobuf : : TextFormat : : PrintToString and ParseFromString functions you ll be all right ." ] }
[ "yes-answer-long", "yes-answer-short" ]
wrapper
UNK_RELATION
wing-ide@python@38
wing-ide -- wing-ide is a commercial @placeholder integrated development-environment for python made by wingware .
{ "confidence": [ 67.91822052001953, 65.66996765136719, 65.18692016601562, 65.18692016601562, 63.908241271972656, 61.17694091796875, 60.01819610595703, 59.69483184814453, 59.69483184814453, 57.99782943725586, 57.16050720214844, 56.550048828125, 56.550048828125, 56.550048828125, 55.267826080322266, 54.726112365722656, 54.726112365722656, 54.726112365722656, 54.229225158691406, 54.229225158691406, 54.229225158691406, 54.229225158691406, 53.14796447753906, 52.540069580078125, 52.540069580078125, 52.40528869628906, 52.40528869628906, 52.40528869628906, 50.21924591064453, 50.21924591064453, 49.91179656982422, 49.857208251953125, 49.857208251953125, 49.857208251953125, 49.857208251953125, 49.50491714477539, 49.16347122192383, 49.16347122192383, 48.710296630859375, 48.03327178955078, 48.03327178955078, 47.61460876464844, 47.473777770996094, 47.473777770996094, 45.84722900390625, 45.84722900390625, 45.761051177978516, 45.761051177978516, 45.55998229980469, 45.295875549316406, 45.295875549316406, 45.295875549316406, 44.35142135620117, 44.35142135620117, 44.242740631103516, 44.242740631103516, 44.05294418334961, 43.47193908691406, 43.47193908691406, 43.47193908691406, 43.452457427978516, 42.358917236328125, 42.358917236328125, 42.18169403076172, 42.18169403076172, 42.18169403076172, 41.75107192993164, 41.75107192993164, 41.532554626464844, 41.17320251464844, 41.07705307006836, 41.07705307006836, 40.53498077392578, 40.35775375366211, 40.35775375366211, 40.35775375366211, 40.35775375366211, 40.35775375366211, 40.3414421081543, 40.23276138305664, 39.349266052246094, 39.349266052246094, 39.25311279296875, 39.228515625, 38.955135345458984, 38.71046447753906, 38.17171096801758, 38.17171096801758, 38.17171096801758, 38.17171096801758, 37.98690414428711, 37.98690414428711, 37.98690414428711, 37.98690414428711, 37.262107849121094, 37.16322326660156, 37.16322326660156, 36.861724853515625, 36.76139831542969 ], "content": [ "I like Wing IDE .", "Is there any way to zoom in on the Python Shell in Wing IDE", "I am trying Wing IDE .", "This only seems to be happening in Wing IDE .", "This is a limitation of Wing IDE 101 .", "Does Wing IDE not already do this", "how to set run arguments for python when using wing IDE", "Apparently it s not possible to flush stdout in the Wing IDE .", "I m trying it in wing-ide 4 pro .", "I m using : .. . .. . Wing version : Wing IDE Pro 5.1.3-1 rev 33002 .. . Tkinter version : Revision : 81008 .. . Python version : 2.7.10", "Wing IDE Personal and Wing IDE Pro both have auto-completion and much more Wing 101 really is severely scaled back to make it simple for beginners .", "I m using Wing IDE 101 version 4.1.14-1 on Windows 7 .", "I can load the module and use it fine in the command-line but not in Wing IDE .", "I am using Wing IDE and I have installed VIDLE with Vpython .", "Make sure that Wing IDE is looking for python modules in the correct location .", "I have been trying this with Wing IDE with no success so far .", "I am trying to import both of those files in Wing IDE Pro .", "For Wing IDE : .. . .. . Try ctrl++ or ctrl+MouseScrollUp for quick changes .", "Can I browse variables in the stack of a Python Shell in Wing IDE preferablly with a GUI tool", "I m a beginner at using python in wing-ide and I m trying to write a slot machine program .", "I am new to Python and am having trouble loading numpy in Wing IDE .", "So if this really has something to do with the version how can I change the Python path on Wing IDE", ".. . .. . I am on Wing IDE if this has something to do with the debugging tricks in an IDE itself .", "@writes on No Problem I use Wing IDE and bottle frequently .", "I have wing-ide installed on my local machine .", "When I run in the Wing 101 IDE - outputs to Python Shell it waits till the end .", "Also please include details like Wing IDE version and Python version that you are using .", "I am using the Python IDE Wing and just cannot seem to find the auto-complete option .", "I ve been using Wing IDE for python programming and I am trying to switch to Eclipse PyDev .", "I m using Python 2.7 Wing IDE 4.1.11-1 Sublime Text 2.0.2 on Windows 7 .", "However when I try to run the basic script : .. . .. . In either Wing IDE or Sublime Text 2 I get this error : .. . .. . The strange part is it works fine when I do it at the command-line or in the Wing IDE shell .", "That plugin and extension scripts plugins in general only work in Wing IDE Pro and not Personal .", "I installed PEP8 plugin for Wing IDE and now I get error when validate any .PY : .. . .. . What s wrong", "VIDLE works fine but if I want to use it on Wing IDE somehow it can t import the visual module .", "I am using Wing IDE and it treat this - - coding : UTF-8 - - as a comment because of", "You don t install any packages into Wing itself since Wing uses whatever Python you point it at the latest installed version of Python by default .", "The default configuration of the debugger launches Django from Wing IDE and disables auto-reload so the restart button in Wing must be pressed before changes take effect in the debug process .", "I found this plugin : plugin link http : bitbucket.org stj pep8panel wiki Home .. . .. . I put it in C : Users home AppData Roaming Wing Personal 5 script directory opened Wing IDE but nothing appeared .", "I am new to Python and I have trouble to import modules with Wing IDE Python 2.7 Mac OS .. . .. . I have read : Import module from other directory in Wing Ide http : stackoverflow.com questions 5258104 import-module-from-other-directory-in-wing-ide .. . .. . and : http : docs.python.org 2 tutorial modules.html .. . .. . but still I don t get it .", "Does any know of a way to get syntax-highlighting for coffeescript files in Wing IDE", "I checked out that IDE and it seems quite promising but unfortunately doesn t have anywhere near the feature set of Wing yet .", "However now my goal is to get Wing IDE specifically wing 101 for now running and have it import pygame as well but it does not seem to recognize pygame .", "Wing should be doing this automatically for PyQt4 if you have it using the right Python .", "In Wing 101 this is under Configure Python in the Edit menu instead .", "The testing tool in Wing IDE Pro now supports the pytest unit-testing framework .", "I ve found that Wing IDE has integration with PyLint : wingware.com doc edit pylint http : www.wingware.com doc edit pylint", "If so please let us know which Wing IDE version this is what OS you re on and what type of keyboard you have .", "I have a file called tweet.py located on my desktop which contains numerous functions that I would like to use in the wing-IDE .", "I am developing algorithms in python and mostly use IPython notebook but when ever I need to debug I usually use Wing IDE .", "I want Wing to PEP8-validate my code .", "Is there any way to do PEP8 validating in Wing", "@emma : have you tried asking the Wing developers", "Working like this also has the advantage that you can try out code right away in Wing IDE Pro s Debug Probe a Python shell that runs in the current debug stack frame .", "But when I integrate PyLint on Wing IDE v 5.0 I am getting below error on checking any python file .. . .. . Am I missing something to install or pre-configure .", "Then enter that into Python Executable in the Configure Python dialog accessed from the Source menu in Wing 101 .", "You ll need to restart the Python Shell in Wing 101 from its Options menu before it switches to the new Python version .", "If you re using Wing 4 then you should try Wing 5 instead .", "No sorry I wasn t able to add it to Wing 4 .", "What s the status on coffeescript being added to wing 5", "I m not certain why Wing is offering auto-completion there .", "The code I have so far is : .. . .. . And I get this error : .. . .. . Traceback most recent call last : File C : Program Files x86 Wing IDE 101 4.1 src debug tserver sandbox.py line 109 in File C : Program Files x86 Wing IDE 101 4.1 src debug tserver sandbox.py line 102 in fightSequence File C : Program Files x86 Wing IDE 101 4.1 src debug tserver sandbox.py line 63 in humanAttack builtins.NameError : global name Monster is not defined .. . .. . Thanks", "Open the file in Wing and then select Evaluate File in Python Shell from the Source menu .", "This depends on what s on the Python Path and possibly current directory which probably explains why it works outside of Wing .", "Knowing the exact version of Wing and PyQt would help a lot .", "I am using Wing to write and debug a Tkinter GUI .", "Why is Wing showing me an attribute that doesn t actually exist", "For example I would like my tests being distributed to multiple CPUs when I run them triggered from the Wing IDE GUI .", "Ideally I would like my compiler currently Wing IDE https : wingware.com to detect errors as part of the build compilation process .", "See here : http : www.wingware.com doc edit helping-wing-analyze-code .. . .. . Your IDE Wing doesn t know for sure what type of objects are in cars but you can tell it what car is with an assert statement and it will do autocompletion exactly how you want it to .", "I am a newbie and i don t know how to set my console to print urdu arabic characters i am using Wing IDE when i run this code .. . .. . i get this on my console .. . .. .", "Instead install PyQt into your Python or use one of the PyQt installers then make sure Wing is using the Python where you installed PyQt .", "If incorrect use Project Properties from the Project menu or in Wing 101 Configure Python from the Edit menu to set the Python Executable .", "Note that in Wing 101 this is done in the Configure Python dialog instead which is accessed from the Edit menu .", "It looks like there isn t syntax-highlighting support for coffeescript in Wing 4 .", "It should be in Wing 5 though I don t know when that is out .", "If you are able to add this to wing 4 let me know .", "In fact Wing 5 doesn t support it at all so that certainly won t work .", "It is only for container contents and other ambiguous cases that Wing needs some coaching .", "The test code I m using is below however this doesn t work EDIT : it works in a script launched from terminal but does not work when run in the python shell of my IDE - Wing 101 .", "Wing looks for python on the path or if none tries to find Python on your path or on Windows in the registry .", "You may want to instead make MyLibs into a package by adding a file called init .py inside it and then you can do this : .. . .. . from MyLibs import testlib .. . .. . That solves it w o any extra configuration in Wing IDE .", "A good way to work in Wing IDE is to set a breakpoint run to it and then you ll get runtime-sourced analysis in the editor in code that s on the active debug stack and Debug Probe .", "To solve this you can add C : Temp MyLibs to your Python Path in Wing s Project Properties or Configure Python dialog in Wing 101 .", "You can check that in the Python Shell in Wing by trying to import PyQt or looking at sys.executable after import sys to see if it s the correct one .", "Note that you ll need to restart the integrated Python Shell in Wing from its Options menu before that change takes effect there Wing doesn t just automatically restart that in case you have data or state there that you don t want to lose .", "Or in Wing Personal or Pro you can set the file as the main debug file although I just noticed that you ll need to restart Wing before that approach works due to apparent failure to rescan the file .", "In Wing you need to turn off the reloader then it should work .", "But you will have to restart the app in wing every time you make changes .", "If set to True try setting it to False when debugging under Wing .", "issue print sys.path from both Wing and IPython examine the differences", "I believe I ve scene this feature somewhere else I just can t seem to find it for wing .", "For example when I try write this code snippet : .. . .. . Wing helps me and autocompletes socket.socket .", "Wing screen-capture http : i.stack.imgur.com h5i25.png .. . .. . Anyone know what s going on", "Because of the keys and getitem Wing is displaying the instance as-if it were a dictionary with the keys and values interspersed with the attributes .", "Tks Wingware .", "When I run my code in Wing IDE after finishing the execution the console goes right back to the interactive shell and I can continue on testing but I don t know how to do this in Eclipse .", "test.py : .. . .. . When I run this in Wing IDE by clicking that green arrow the console would look like this after execution : .. . .. . And I can keep doing whatever on the shell and it would know my code defined functions etc . .", "This code works fine when you run it in the linux terminal using .. . .. . But when I run it in Wing 101 IDE - by pressing the green play button Run the contents of the editor within the python shell - it waits to till the program is finished before outputting .", "One possibility is that you ve modified your Python Path in Project Properties or Configure Python dialog in Wing 101 and have not yet restarted the Python Shell from its Options menu ." ] }
{ "confidence": [ 81.37681579589844, 70.885498046875, 68.8363037109375, 68.68749237060547, 68.370361328125, 68.31501007080078, 67.34274291992188, 66.40475463867188, 65.60896301269531, 65.39535522460938, 64.83650207519531, 64.83650207519531, 64.7596435546875, 64.61508178710938, 64.40945434570312, 64.22994232177734, 63.85517883300781, 63.16319274902344, 62.713924407958984, 62.19630432128906 ], "content": [ "Question : I m trying to make PDFs out of HTML files and URLs . I ve found wkhtmltopdf to be just what I m looking for and the Python wrapper pdfkit seems great too . However when I try to run the basic script : .. . .. . In either Wing IDE or Sublime Text 2 I get this error : .. . .. . The strange part is it works fine when I do it at the command-line or in the Wing IDE shell . I assume this has something to do with how pdfkit is installed in sitepackages but I don t know enough about the intricacies of those to figure out how to fix the issue . Can anyone help I m using Python 2.7 Wing IDE 4.1.11-1 Sublime Text 2.0.2 on Windows 7 . Thanks a lot Alex Comment : Is it possible you have a source file called pdfkit.py If so hat is probably being imported instead and thus does not contain from url . Try adding as line 2 print pdfkit . file to see if it s the file you think it is . Comment : Ah you re right I stupidly made a file called pdfkit.py in the same folder . Thanks a lot . .. . Answer : As Wingware pointed out I had a file called pdfkit.py in the same folder as the script . Instead of importing the module it was importing that file which of course was almost empty . Thanks Wingware .", "Question : null .. . Answer : I am using Wing IDE and I have installed VIDLE with Vpython . VIDLE works fine but if I want to use it on Wing IDE somehow it can t import the visual module . It always gives an error No module named visual . How can I import the visual module into the IDE I thought maybe the problem lies in the version of the Vpython or the Python itself . The installed Vpython is for Python 2.7 I ve tried another one for 3.4 but the VIDLE wouldn t work with it . Both Python 2.7 and 3.4 are installed on the PC but I don t even know which one is taken as default on the IDE . So if this really has something to do with the version how can I change the Python path on Wing IDE Sorry I am quite new in Python and I ve looked everywhere but didn t come to any helpful answer . Thank you in advance . Comment : Did you already set Python Executable in Project Properties from the Project menu In Wing 101 this is under Configure Python in the Edit menu instead . You ll set this to the full path printed by sys.executable in the Python you want to use do import sys followed by sys.executable to get the value . Comment : Woow sorry for having asked such a simple question it works now Thank you", "Question : I am using the Python IDE Wing and just cannot seem to find the auto-complete option . Is there even such option in this program .. . Answer : You are probably using Wing 101 which is a very scaled back version that does not have auto-completion . It was designed for teaching beginning programmers and the professors we worked with in creating it felt auto-completion should be left off . Wing IDE Personal and Wing IDE Pro both have auto-completion and much more Wing 101 really is severely scaled back to make it simple for beginners . Comment : I had a feeling that this was the reason . Other than that it s a great IDE Comment : I agree I mean why even have an ide if there no autocomplete you can use notepad . Comment : For Wing 101 it was a design decision driven by educators wanting no completion for people just learning programming for the first time . Personally I d want it even then - but that s why it s like that .", "Question : I am new to Python and I have trouble to import modules with Wing IDE Python 2.7 Mac OS .. . .. . I have read : Import module from other directory in Wing Ide http : stackoverflow.com questions 5258104 import-module-from-other-directory-in-wing-ide .. . .. . and : http : docs.python.org 2 tutorial modules.html .. . .. . but still I don t get it . If as presented in the second link I create a fibo.py script and save it in my Python Path then when I try to import it I have the following error : .. . .. . although fibo is available for auto-completion when I type .. . .. . What did I miss Thanks for your answers .. . Answer : That error indicates that the module is not found on the path so either it s in the wrong place or the path is not what you think it is . You can look at sys.path after import sys to see the path . I m not certain why Wing is offering auto-completion there . One possibility is that you ve modified your Python Path in Project Properties or Configure Python dialog in Wing 101 and have not yet restarted the Python Shell from its Options menu . Comment : Thank you very much The issue was indeed that I modified the Python Path without restarting the shell .", "Question : I want Wing to PEP8-validate my code . I found this plugin : plugin link http : bitbucket.org stj pep8panel wiki Home .. . .. . I put it in C : Users home AppData Roaming Wing Personal 5 script directory opened Wing IDE but nothing appeared . Is there any way to do PEP8 validating in Wing .. . Answer : That plugin and extension scripts plugins in general only work in Wing IDE Pro and not Personal .", "Question : I have a situation where-in first class I declare array and I pass it to another object which prints name of elements in this array . It works but when I input car . in ReadCarNames ide doesn t suggest me name I m trying it in wing-ide 4 pro . Can I cast car in method ReadCarNames Comment : Its your IDE auto suggest based upon pep8 to find expressions to suggest As per your example it may struggle with ReadCarNames as this is a def and by general pep8 ishness it should read read car names I could be totally wrong as I ve never used wings . aptana.com http : www.aptana.com is great for this stuff - if perhaps an alternative IDE would suite . Comment : I change name of the method and still the same . I check it in pycharm and it works .. . Answer : See here : http : www.wingware.com doc edit helping-wing-analyze-code .. . .. . Your IDE Wing doesn t know for sure what type of objects are in cars but you can tell it what car is with an assert statement and it will do autocompletion exactly how you want it to . You can view it as casting the type for Wing s eyes only if you like . or if you don t want that assert firing off all the time you can wrap it in if 0 logic that Wing s SourceAssistant picks up but python will not execute . You currently cannot tell Wing that a list tuple etc only contains one type of object and what it is but it is in their plans and will use similar syntax . Comment : great That s what I was looking for . Thanks Comment : Seems somewhat hackish to have to clutter your code with worthless asserts to make an IDE do autocompletion . Comment : @Xorlev : autocompletion generally works extremely well in Wing often better than I expect . It is only for container contents and other ambiguous cases that Wing needs some coaching . As others said this is a result-of the dynamic nature of python . Having said that it is impressive that pycharm pulls it off.. . I checked out that IDE and it seems quite promising but unfortunately doesn t have anywhere near the feature set of Wing yet .", "Question : how to set run arguments for python when using wing IDE I create a project using wingIDE and save to folder D : TEST djgprj but the models manage.py programs are in folder D : TEST djgprj testdjg . When I try to run manage.py using wingIDE I dont know where to set arguments . I know there is one place which is Debug- Run Arguments but it does not work well . .. . Answer : Right click on the file either in editor or Project tool and select Properties and set the run args under Debug Run Arguments . If you mean sending arguments to Python itself and not your code this is the Debug Python Options property instead the default is -u for unbuffered output . Comment : Yes I got it . and I have changed Configure External Console and I can see the debug info on external console . Tks Wingware .", "Question : null .. . Answer : After successful installation on Pylint on my Windows OS I am able to run it on command-prompt to check any python file . But when I integrate PyLint on Wing IDE v 5.0 I am getting below error on checking any python file .. . .. . Am I missing something to install or pre-configure . I have set the location of Pylint.bat in PATH variable already . Comment : I doubt on some environment variable but not able to figure that out Comment : I am still struggling to get this over . Can anyone points me anything regarding . Comment : What is command set to in your pylintpanel.cfg file Comment : Not sure if this is the problem here but there should be no quotes around the command name . So use command C : Python27 Scripts pylint and not command C : Python27 Scripts pylint . Comment : Thanks @Wingware : I renamed command C : Python27 Scripts pylint.bat to command C : Python27 Scripts pylint and the problem got fixed .", "Question : everyone : Can you tell me how to using WingIDE to program pyqt4 programs . I don t want to use Eclipse and Eric because WingIDE is the most familiar IDE I can handle . If there is a solution about this If you have any please let me know thank you very much I m looking forward your help thanks again .. . Answer : You don t install any packages into Wing itself since Wing uses whatever Python you point it at the latest installed version of Python by default . Instead install PyQt into your Python or use one of the PyQt installers then make sure Wing is using the Python where you installed PyQt . You can check that in the Python Shell in Wing by trying to import PyQt or looking at sys.executable after import sys to see if it s the correct one . If incorrect use Project Properties from the Project menu or in Wing 101 Configure Python from the Edit menu to set the Python Executable . Hope this helps . Comment : Thank you very much for helping me With your help I can use wingIDE to deal with Qt", "Question : I ve been trying to learn Python but ran into a very interesting problem . I cannot seem to find the right double quotation marks to denote a string . Those funny marks are as close as I could get . This only seems to be happening in Wing IDE . Thoughts Comment : Odd not something I ve seen before . Are you pressing the quote character on the keyboard and it s producing this incorrect character If so please let us know which Wing IDE version this is what OS you re on and what type of keyboard you have . Thanks Comment : I m using Wing IDE 101 version 4.1.14-1 on Windows 7 . Using an Asus laptop G73Jh . Comment : Switching the keyboard language seems to have sorted out the problem . .. . Answer : Though it looks similar to the double-quote is not a double-quote . It seems somehow your IDE is translating a double-quote into a different character . Comment : Seems to be a general problem with this model of laptop . Switching the keyboard language sorted out the problem .", "Question : I am using Wing to write and debug a Tkinter GUI . I am finding that the Stack Data View doesn t seem to match the actual attributes of my widgets . Take this code for example : .. . .. . This gives me an attribute error at the last line . However when I look at the stack there is clearly an attribute called text with the value that I m looking for : .. . .. . Wing screen-capture http : i.stack.imgur.com h5i25.png .. . .. . Anyone know what s going on I m using : .. . .. . Wing version : Wing IDE Pro 5.1.3-1 rev 33002 .. . Tkinter version : Revision : 81008 .. . Python version : 2.7.10 .. . Answer : I posted this to the Wing email list and I got the following response from the developers : .. . .. . It looks like a ttk.Checkbutton defines keys and getitem methods to exposes tk attributes via checkbutton name . Because of the keys and getitem Wing is displaying the instance as-if it were a dictionary with the keys and values interspersed with the attributes . Wing does this because often you want to view an object that defines keys and getitem as-if it were a dictionary but I agree that it s confusing in this instance . .. . We ll try to improve this in a future release .", "Question : I am using Wing to write and debug a Tkinter GUI . I am finding that the Stack Data View doesn t seem to match the actual attributes of my widgets . Take this code for example : .. . .. . This gives me an attribute error at the last line . However when I look at the stack there is clearly an attribute called text with the value that I m looking for : .. . .. . Wing screen-capture http : i.stack.imgur.com h5i25.png .. . .. . Anyone know what s going on I m using : .. . .. . Wing version : Wing IDE Pro 5.1.3-1 rev 33002 .. . Tkinter version : Revision : 81008 .. . Python version : 2.7.10 .. . Answer : What you are calling attributes are not object attributes . Widgets use an internal system for managing the widget options . .text is not an attribute which is why you get the error . To reference the configuration use .cget .. . to get the value and .configure .. . to change the value . Comment : That s true but I m not so much confused about the attribute error as I am about the presence of a .text attribute in the stack data . Why is Wing showing me an attribute that doesn t actually exist Comment : @emma : have you tried asking the Wing developers Comment : @Emma I think that at least logically from an OO point of view text is considered an attribute and that s probably why Wing developers decided to include it as an attribute .", "Question : I am new to Python and am having trouble loading numpy in Wing IDE . I can load the module and use it fine in the command-line but not in Wing IDE . Below is what I am seeing : .. . .. . code : .. . .. . import numpy as np .. . .. . a np.arange 15 .. . .. . result : .. . .. . evaluate numpy.py Traceback most recent call last : File C : Users my name Documents Python practice numpy.py line 2 in 0 builtins.NameError : name arange is not defined .. . .. . I have also tried to use the help command : .. . .. . code : .. . .. . help np .. . .. . result : .. . .. . Help on module numpy : .. . .. . NAME numpy .. . .. . FILE c : users my name documents python practice numpy.py .. . Answer : It is probably due to your code being in a file named numpy.py If you do this then import numpy may import your module and not numpy . This depends on what s on the Python Path and possibly current directory which probably explains why it works outside of Wing . Comment : Changing the file name worked Thank you Other than carefully naming files do you have ideas on how to prevent this from happening in the future This is an issue even when using IDLE . Right now I have C : Python34 as one of the paths in system variables . I am considering removing it .", "Question : I want Wing to PEP8-validate my code . I found this plugin : plugin link http : bitbucket.org stj pep8panel wiki Home .. . .. . I put it in C : Users home AppData Roaming Wing Personal 5 script directory opened Wing IDE but nothing appeared . Is there any way to do PEP8 validating in Wing .. . Answer : Did you noticed that the windows setting are wrong You can look here https : bitbucket.org stj pep8panel issue 2 incorrect-instructions-for-windows to change the arguments .", "Question : I like Wing IDE . But I have some problems with autocompleting . For example when I try write this code snippet : .. . .. . Wing helps me and autocompletes socket.socket . But it doesn t find methods like send or recv when I type s . : .. . .. . First http : i.stack.imgur.com LiNA1.png Second http : i.stack.imgur.com HDYaV.png .. . .. . Do I do something wrong .. . Answer : This is because the SocketType or socketobject in socket.py is assembled partially dynamically at runtime and our static-analysis engine can t intepret that code it s at line 226 of socket.py in Python 2.7.6 where it iterates over socketmethods to add methods to socketobject location may vary by exact Python version but it s probably just after the regular class def of socketobject in all of them . One way to deal with this is to set a breakpoint after s socket.socket and run to it and then the auto-completer uses the live runtime state so the complete contents will be there . Working like this also has the advantage that you can try out code right away in Wing IDE Pro s Debug Probe a Python shell that runs in the current debug stack frame . I ll also see if we can improve this for the static-analysis case . We do have manual overrides for some things and this case seems like it should be added .", "Question : I am developing algorithms in python and mostly use IPython notebook but when ever I need to debug I usually use Wing IDE . I m currently having a strange problem . In the notebook I do have a method from the matplotlib package subplot2grid but in Wing I do not have this method . most of my packages were installed with the installation of pythonXY . still i do not understand why wing is using a different matplotlib from IPython and how something like that had happend in the first place I dont think I installed matplotlib again beside from the pythonXY automatic installation . What is going on here Comment : issue print sys.path from both Wing and IPython examine the differences Comment : Is there any other like maybe seeing explicitly where matplotlib is coming from in both envr or checking the version Comment : How do I find the location of Python module sources http : stackoverflow.com questions 269795 how-do-i-find-the-location-of-python-module-sources Comment : Did you setup your interpreters correctly Comment : Thanks JOHN i ll look at that . Games I dont know. . .. . Answer : Wing looks for python on the path or if none tries to find Python on your path or on Windows in the registry . Look at sys.executable in the IPython notebook and set Python Executable in Wing s Project Properties from the Project menu to that full path . Then the debugger should use the right Python . Note that you ll need to restart the integrated Python Shell in Wing from its Options menu before that change takes effect there Wing doesn t just automatically restart that in case you have data or state there that you don t want to lose .", "Question : Brand new to WingIDE and have limited python experience . How can I set up a WingIDE project so I can create MCEDIT filters https : github.com mcedit mcedit .. . Answer : If you are running MCEdit from sources you can probably set up a Wing project with mcedit.py as the main debug file and just debug the whole thing then you ll be able to set breakpoints etc also in filters . Alternatively you could copy wingdbstub.py from your Wing installation into the same directory as the filters and add import wingdbstub to start debugging when the filter is run . You will need to click on the bug in lower left of Wing s main window to Enable Passive Listen or Accept Debug Connections in Wing 5+ . You may want to set kEmbedded True in wingdbstub.py if Wing drops the debug connection after the filter is used once this indicates the filters are invoked in a way that requires this flag to be set . If you still run into problems w dropped debugger connections then also call wingdbstub.Ensure just after the import . You may also need to set WINGHOME in your copy of wingdbstub.py depends on how you installed this is set up automatically in most cases . This is all documented in more detail at https : wingware.com doc debug debugging-externally-launched-code .. . .. . If you re new to Wing you may want to go through the Tutorial in the Help menu first . We don t have documentation specific to setting up Wing for MCEdit but some of the How-Tos for rendering and composting systems at https : wingware.com doc howtos may be useful to look at since they probably invoke their Python code in a way similar to MCEdit s filters mechanism . If you have trouble with this please email support at wingware dot com and or post comments here .", "Question : I m considering moving from Matlab to Python . I am trying Wing IDE . I found it very convenient but now I m looking for some functionality like the command Windows and variable browser in Matlab . I know if I start a debug process I can tweak variables in memory with Debug Probe so Debug Probe acts pretty much like a Matlab command window . But it is inconvenient to start a debug process first every time . I would prefer to use the Python Shell tab for this . So I have 2 questions : .. . .. . 1 . Is it possible that I can use the Python Shell tab just like the command Windows in Matlab 2 . Can I browse variables in the stack of a Python Shell in Wing IDE preferablly with a GUI tool .. . Answer : I would definettly suggest using Spyderlib http : code.google.com p spyderlib it is basically a Matlab GUI representation of a python IDE . It provides a shell tab variable browser etc . Support for various systems and architectures and open-source .", "Question : I m using django python with wingIDE and every time I make a change I have to restart the debugger and refresh the page . Most of the time I forget to restart my debugger and it takes a second to figure out why my web page didn t change . I was wondering if anyone new any easy way to make the debugger restart every time a file is saved or changed . I believe I ve scene this feature somewhere else I just can t seem to find it for wing . I hope there is just a preference I m missing or something simple like that . Thanks for your help . .. . Answer : The default configuration of the debugger launches Django from Wing IDE and disables auto-reload so the restart button in Wing must be pressed before changes take effect in the debug process . To launch from outside the IDE and to handle auto-reload automatically see Debugging with Auto-Reload at the end of http : wingware.com doc howtos django", "Question : I have a Python file called caller.py located at C : Temp . I have two other Python files : local testlib.py located in C : Temp and testlib.py located in C : Temp MyLibs . I am trying to import both of those files in Wing IDE Pro . I get suggestions only for the local testlib nothing for the testlib see picture below . I do get access to the variables in the testlib.py so it is imported correctly though . What adjustments should I have done to make this work enter image description here http : i.stack.imgur.com ED4M1.png .. . Answer : To solve this you can add C : Temp MyLibs to your Python Path in Wing s Project Properties or Configure Python dialog in Wing 101 . Or in Wing Personal or Pro you can set the file as the main debug file although I just noticed that you ll need to restart Wing before that approach works due to apparent failure to rescan the file . This could probably be changed to take local path modifications into account in our source analysis although in general modifying sys.path like this is not a great way to do things since the added path may screw up other modules you import later if they are trying to import a module called testlib from another location . That s why we only look for modifications like this in the main debug file . You may want to instead make MyLibs into a package by adding a file called init .py inside it and then you can do this : .. . .. . from MyLibs import testlib .. . .. . That solves it w o any extra configuration in Wing IDE ." ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
google-hadoop@s@215
google-hadoop -- the open-source apache hadoop framework can be run on google-cloud-platform for large-scale data-processing using google-compute-engine vms and persistent disks and optionally incorporating google @placeholder tools and libraries for integrating hadoop with other cloud services like google-cloud-storage and bigquery .
{ "confidence": [ 114.48641204833984, 101.63394165039062, 97.91059112548828, 94.54792785644531, 93.54710388183594, 93.30531311035156, 92.50555419921875, 92.22775268554688, 90.97824096679688, 90.09345245361328, 85.2018814086914, 84.96527099609375, 83.66213989257812, 82.72140502929688, 82.4764404296875, 79.37797546386719, 78.22135925292969, 77.85767364501953, 77.60008239746094, 77.14225769042969, 76.53390502929688, 76.49417114257812, 76.27985382080078, 75.9156723022461, 74.5091552734375, 73.96141815185547, 73.96141815185547, 72.86868286132812, 71.03499603271484, 70.57234191894531, 70.09843444824219, 69.88175964355469, 69.3790054321289, 69.043701171875, 69.043701171875, 67.86701965332031, 66.66887664794922, 66.40152740478516, 66.26387023925781, 65.2254867553711, 64.96073150634766, 64.8222427368164, 64.35303497314453, 64.21128845214844, 64.14868927001953, 63.821044921875, 63.79255676269531, 61.78544998168945, 61.341094970703125, 60.570831298828125, 60.570831298828125, 60.33180236816406, 59.55857849121094, 59.35739517211914, 58.210235595703125, 58.03418731689453, 56.885101318359375, 56.2393684387207, 56.055702209472656, 55.648014068603516, 55.15071487426758, 55.07440948486328, 54.95556640625, 54.67271041870117, 54.58729934692383, 54.272891998291016, 54.14999771118164, 53.812408447265625, 53.812408447265625, 53.812408447265625, 53.56875991821289, 53.554805755615234, 53.42692565917969, 53.36479949951172, 52.710960388183594, 52.48949432373047, 51.935516357421875, 51.882476806640625, 50.60334014892578, 49.7726936340332, 49.676666259765625, 49.35624313354492, 47.76292037963867, 47.6142463684082, 46.2784423828125, 46.23799514770508, 44.847991943359375, 44.45559310913086, 44.35673522949219, 44.35673522949219, 44.35673522949219, 43.91587448120117, 43.81431579589844, 43.285682678222656, 42.91755294799805, 42.6024284362793, 42.26024627685547, 42.04804229736328, 42.00149917602539, 41.39630126953125 ], "content": [ "I am running an Hadoop Cluster on Google Cloud Platform using Google Cloud Storage as backend for persistent data .", "This is unfortunately a limitation of Google Cloud Storage https : cloud.google.com storage GCS and the GCS Hadoop connector https : cloud.google.com hadoop google-cloud-storage-connector .", "Deploying Apache Hadoop on Google Cloud Platform .. . .. . The Apache Hadoop framework supports distributed processing of large-data sets across a clusters of computers .", "I have begun testing The Google Cloud Storage connector for Hadoop .", "I am trying to run Oryx on top of Hadoop using Google s Cloud Storage Connector for Hadoop : https : cloud.google.com hadoop google-cloud-storage-connector .. . .. . I prefer to use Hadoop 2.4.1 with Oryx so I use the hadoop2 env.sh set-up for the hadoop cluster I create on google-compute-engine e.g .", "I m using Hadoop with HDFS 2.7.1.2.4 and Pig 0.15.0.2.4 Hortonworks HDP 2.4 and trying to use Google Cloud Storage Connector for Spark and Hadoop https : cloud.google.com hadoop google-cloud-storage-connector bigdata-interop on GitHub .", "I m trying to connect Hadoop running on Google Cloud VM to Google Cloud Storage .", "Is there a recommended persistent disk size when using cloud-storage connector with hadoop in google cloud", "Question 1 : The recommended way of moving data from a local Hadoop cluster to GCS is to use the Google Cloud Storage connector for Hadoop https : developers.google.com hadoop google-cloud-storage-connector .", "I am trying to run Hadoop Job on Google Compute engine against our compressed data which is sitting on Google Cloud Storage .", "The Hadoop cluster uses a Cloud Storage bucket as its default file system accessed through Google Cloud Storage Connector .", "Is it possible to deploy several Hadoop clusters in one Google Cloud project", "It is possible to connect my Hadoop cluster to multiple Google Cloud Projects at once", "Is there a disadvantage to using this hadoop FileSystem api as opposed to the google-cloud-storage client api", "I have read this article stackoverflow.com questions 25291397 http : stackoverflow.com questions 25291397 migrating-50tb-data-from-local-hadoop-cluster-to-google-cloud-storage for copying data from hdfs to google-cloud-storage .", "How can I use the Google Cloud Platform free trial https : cloud.google.com free-trial to test a Hadoop cluster", "I am using Google Cloud Storage for Hadoop 2.3.0 using GCS connector .", "I am trying to migrate existing data JSON in my Hadoop cluster to Google Cloud Storage .", "I can easly use any Google Storage bucket in single Google Project via Google Cloud Storage Connector as explained in this thread Migrating 50TB data from local Hadoop cluster to Google Cloud Storage http : stackoverflow.com questions 25291397 migrating-50tb-data-from-local-hadoop-cluster-to-google-cloud-storage .", "Why does google cloud click to deploy hadoop workflow requires picking size for local persistent disk even if you plan to use the hadoop connector for cloud-storage", "Long Answer .. . .. . By default bdutil also configures Google Cloud Storage as the default Hadoop filesystem which means that control files used by Spark and YARN require access to Google Cloud Storage .", "Is this a result-of using the google-hadoop connector", "I read Hadoop cannot connect to Google Cloud Storage http : stackoverflow.com questions 26132011 hadoop-cannot-connect-to-google-cloud-storage and I configured my hadoop client accordingly pretty hard stuff and now I can see items in my bucket .", "I have used google-cloud-storage-connector for hadoop and able to run mapreduce job that takes input from my local hdfs Hadoop running in my local machine and places the result in google-cloud-storage bucket .", "I m using Spark on a Google Compute Engine cluster with the Google Cloud Storage connector instead of HDFS as recommended https : cloud.google.com hadoop google-cloud-storage-connector benefits and get a lot of rate limit errors as follows : .. . .. . Anyone knows any solution for that", "I need to set up an Hadoop cluster on Google Compute Engine .", "I m surprise that google-compute-engine has no a similar web interface for hadoop .", "Your answers led me to the configuration as noted in Migrating 50TB data from local Hadoop cluster to Google Cloud Storage http : stackoverflow.com questions 25291397 migrating-50tb-data-from-local-hadoop-cluster-to-google-cloud-storage .", "Is it possible to write directly to a Google Cloud Storage Bucket", ": hadoop fs -ls yields the contents of my google cloud bucket and all the expected contents of the gs : BUCKET NAME directory .", "ch : java.nio.channels.SocketChannel connection-pending remote 111.222.333.444.bc.googleusercontent.com 111.222.333.444 : 8020 .. . .. . Are you aware of any limitation using the Java Hadoop APIs against Hadoop on Google Cloud Platform", "I am using Google Compute Engine to run Mapreduce jobs on Hadoop pretty much all default configs .", "I am trying to setup a Hadoop cluster on Google Compute Engine and I have been following these instructions https : github.com GoogleCloudPlatform solutions-google-compute-engine-cluster-for-hadoop .", "Let me explain : .. . .. . Introduction .. . .. . I ve launched a hadoop cluster on google cloud one click set up to use a bucket .", "Related questions .. . .. . Do I need to launch a Hadoop cluster on Google Cloud or not to achieve my goal", "However I am running this command from the master node of the hadoop cluster i.e . PREFIX NAME-m and I am not sure of the expected output when using the google-cloud-storage connector for hadoop .", "I am using flume to write to Google Cloud Storage .", "Wanted to know the possibility of doing the same using google-datastore connector for hadoop", "Will I be charged during the free Google Cloud Platform trial", "Additionally external IPs are required in order to access Google Cloud Storage .", "I have just installed Google Cloud platform for a free trial .", "I can t find the answer in google cloud doscumentation .", "After I create a google-cloud-based hadoop-enable cluster I want to change the default bucket to a different one how can I do that", "The original question was trying to deploy spark 1.4 on Google Cloud http : stackoverflow.com questions 31466206 spark-1-4-image-for-google-cloud .", "I m trying to install a custom Hadoop implementation 2.0 on Google Compute Engine using the command-line option https : cloud.google.com hadoop setting-up-a-hadoop-cluster .", "1 Despite confirming that my hadoop conf directory matches what is expected for the google installation on compute engine e.g .", "Apache Hadoop on Google Compute Engine Click to Deploy Apache Hadoop Apache Hadoop ZONE us-central1-a WORKER NODE COUNT .. . .. . CLOUD STORAGE BUCKET Select a bucket HADOOP VERSION 1.2.1 MASTER NODE DISK TYPE Standard Persistent Disk MASTER NODE DISK SIZE GB .. . .. . WORKER NODE DISK TYPE Standard Persistent Disk WORKER NODE DISK SIZE GB", "Using bdutil https : cloud.google.com hadoop downloads you can deploy arbitrarily many different Hadoop clusters in a single Google project as long as you ve obtained sufficient Google Compute Engine quota https : cloud.google.com compute docs resource-quotas to do so .", "I have a Spark Cluster deployed using bdutil for Google Cloud .", "How should I include enable Snappy in my Hadoop cluster on google-compute-engine", "What is the best approach to deploy third party libs jars on Hadoop cluster deployed on Google Compute engine", "However I am not familiar with the google manifestation of hadoop via the hadoop connector and the traditional way I usually test to see if the hadoop cluster is running i.e .", "I would like to write data from flume-ng to Google Cloud Storage .", "Apologies for the delay for future reference adding the google-hadoop tag may reach the Hadoop team more quickly .", "I am testing the scaling of some MapReduce jobs on Google Compute Engine s Hadoop cluster and finding some unexpected results .", "In fact the source of bigquery-connector appears to be on GitHub https : github.com GoogleCloudPlatform bigdata-interop tree master bigquery src main java com google cloud hadoop io bigquery along with its pom https : github.com GoogleCloudPlatform bigdata-interop blob master bigquery pom.xml but is the source of datastore-connector available", "I have 4 APIs enabled i.e GCS GCS JSON API Google Cloud SQL and BigQuery API .", "The instructions on that site are mostly for running Hadoop on Google Compute Engine VMs but you can also download the GCS connector directly either gcs-connector-1.2.8-hadoop1.jar http : storage.googleapis.com hadoop-lib gcs gcs-connector-1.2.8-hadoop1.jar if you re using Hadoop 1.x or Hadoop 0.20.x or gcs-connector-1.2.8-hadoop2.jar http : storage.googleapis.com hadoop-lib gcs gcs-connector-1.2.8-hadoop2.jar for Hadoop 2.x or Hadoop 0.23.x .", "Google now has an example https : cloud.google.com hadoop examples bigquery-connector-spark-example on how to use the BigQuery connector with Spark .", "Ultimately if you re using the instructions for using a service-account keyfile http : stackoverflow.com questions 25291397 migrating-50tb-data-from-local-hadoop-cluster-to-google-cloud-storage the GCS requests are performed on behalf of that service-account which can be treated more-or-less like any other user .", "As I m asking here http : stackoverflow.com questions 27994029 hadoop-on-google-compute-engine-management-console is there a way to get cloudera manager or similar on GCE", "By the notes in the CHANGES.txt it seems to be coming from : .. . .. . https : github.com GoogleCloudPlatform bigdata-interop .. . .. . The source should be in the package com.google.cloud.hadoop.io.datastore src main com google cloud hadoop io datastore but it s not there .", "To your question is there an alternative way to create MapReduce tasks from local command-line one option is to use Google Cloud Dataflow https : cloud.google.com dataflow what-is-google-cloud-dataflow .", "Now I want to run a mapreduce job using google-datastore-connector for hadoop that takes input from local hdfs Hadoop running in my local machine and places the result in google-datastore kind kind is synonymous to database-table .", "Store.java : 57 .. . .. . As per the instructions here : https : cloud.google.com hadoop google-cloud-storage-connector classpath I believe I have added connector jar to Hadoop s classpath I added : .. . .. . to home rich hadoop-env-setup.sh .", "You could also share details with [email protected] to discuss with Google engineers more directly if it s easier", "Visit Cloud Storage browser to find or create a bucket that you can use in your Hadoop deployment .", "Question s .. . .. . The main question is : What is the minimal setup needed to write to HDFS GS on Google Cloud Storage with flume", "http : stackoverflow.com questions 27174033 what-is-the-minimal-setup-needed-to-write-to-hdfs-gs-on-google-cloud-storage-wit", "I am trying to use a file from Google Cloud Storage via FileInputFormat as input for a MapReduce job .", "If you re talking about bulk data you can also first upload to Google Cloud Storage and then in your master node do hadoop fs -cp gs : your-bucket your-location data hdfs : master-hostname hdfs-location .", "This can be changed by setting fs.gs.io.buffersize.write https : github.com GoogleCloudPlatform bigdata-interop blob master gcs src main java com google cloud hadoop fs gcs GoogleHadoopFileSystemBase.java L120 to a smaller value in bytes in core-site.xml .", "The literal 32555940559.apps.googleusercontent.com ZmssLNjJy2998hD4CTg2ejr2 I provided are attributed with a Google-managed project associated with the Cloud SDK and is the reason the auth flow mentions Google Cloud SDK wants to access.. . .", "After I deleted a Google Cloud Storage directory through the Google Cloud Console the directory was generated by early Spark ver 1.3.1 job when re-run the job it always fail and seemed the directory was still there to the job I cannot find the directory with gsutil .", "gs is Google Storage .", "Question : i want to run MapReduce programs developed in Java using deployed Hadoop on cloud", "You should be able to use the BigQuery connector for Hadoop see https : cloud.google.com hadoop bigquery-connector which provides an implementation of the Hadoop OutputFormat class .", "Note that I have confirmed the hadoop cluster is connected to the google file system e.g .", "But I was able to ssh using google cloud SDK so I didn t set this up .", "But since you already have a local setup running it s up to you whether Google Compute Engine will be an easier place to run your Hadoop Flume cluster .", "My RDD is derived from several text-files inside a directory that is located in a google cloud bucket .", "I m piping unstructured event data through Hadoop and want to land it in BigQuery .", ".. . .. . My flume.conf file : .. . .. . .. . .. . related question in my flume gcs journey : What is the minimal setup needed to write to HDFS GS on Google Cloud Storage with flume", "I checked all the VMs Hadoop is not up .", "Our Hadoop tarball was built and internally tested only on Ubuntu which was why we set our Google instance image to be Ubuntu as well .", "Since service-accounts are often used with Google Compute Engine VMs it s quite possibly related to enabling Google Compute Engine it shouldn t be necessary to actually create any VMs try enabling it and see if that opens up the service-account options .", "In the meantime if you re up for building from source you should be able to add after line 317 of BigQueryRecordWriter.java https : github.com GoogleCloudPlatform bigdata-interop blob master bigquery src main java com google cloud hadoop io bigquery BigQueryRecordWriter.java L317 : .. . .. . Then you simply mvn -Phadoop1 package or mvn -Phadoop2 package and upload your custom BigQuery connector jarfile to some location in GCS and finally modify BIGQUERY CONNECTOR JAR in your bdutil env.sh to point to your custom jarfile before re-deploying .", "I m able to run gsutil -ls gs : mybucket without any issues but when I execute .. . .. . hadoop fs -ls gs : mybucket .. . .. . I get the output : .. . .. . Wondering what steps I am missing to get Hadoop to be able to see the Google Storage", "But i can t find any documentation or example how to connect to two or more Google Cloud Project from single map-reduce job .", "My Spark cluster is running in Google Cloud is bdutil deployed and is composed with 1 master and 2 workers with 15gb of RAM and 4 cores each .", "The Dataflow SDK includes support for Datastore access https : cloud.google.com dataflow java-sdk JavaDoc com google-cloud-dataflow sdk io DatastoreIO .", "The GCS connector for Hadoop is actually built directly on top of the Java API and since it s all open-source you can see what kinds of things it takes to make it work smoothly here in its source code on GitHub : https : github.com GoogleCloudPlatform bigdata-interop blob master gcs src main java com google cloud hadoop gcsio GoogleCloudStorageImpl.java", "I am starting a Google Compute Engine VM from an App Engine application .", "I have so the file home hadoop hadoop-install conf hadoop-env.sh anyway .", "I m getting started with running a spark cluster on google-compute-engine backed by google-cloud-storage that is deployed with bdutil on the GoogleCloudPlatform github I am doing this as follows : .. . .. . I am expecting I might want to start with a cluster of 2 nodes as the default and would later like to add another worker node to cope with a big job that needs to be run .", "My HDFS repository is based on Google Storage with gcs-connector 1.4.0 .", "Did you create a cluster by hand using bdutil https : cloud.google.com hadoop bdutil using Cloud Dataproc https : cloud.google.com dataproc or through some other means", "I realized that BigQuery supports the Hadoop Input Output format .. . .. . https : cloud.google.com hadoop writing-with-bigquery-connector .. . .. . and pyspark should be able to use this interface in order to create an RDD by using the method newAPIHadoopRDD .", "There is no Hadoop process .", "I am trying to setup hadoop cluster in Google Compute Engine through Launch click-to-deploy software feature .I have created 1 master and 1 slave node and tried to start the cluster using start-all.sh script from master node and i got error permission-denied publickey ." ] }
{ "confidence": [ 148.91677856445312, 112.26004791259766, 111.90409088134766, 110.11433410644531, 105.81571197509766, 105.52490234375, 104.1751708984375, 101.98687744140625, 98.7116928100586, 98.26062774658203, 97.8786849975586, 97.60069274902344, 97.17063903808594, 97.13001251220703, 96.93299102783203, 95.89915466308594, 94.45997619628906, 94.13860321044922, 93.09602355957031, 92.69355010986328 ], "content": [ "Question : Why does google cloud click to deploy hadoop workflow requires picking size for local persistent disk even if you plan to use the hadoop connector for cloud-storage The default size is 500 GB . . I was thinking if it does need some disk it should be much smaller in size . Is there a recommended persistent disk size when using cloud-storage connector with hadoop in google cloud Deploying Apache Hadoop on Google Cloud Platform .. . .. . The Apache Hadoop framework supports distributed processing of large-data sets across a clusters of computers . Hadoop will be deployed in a single cluster . The default deployment creates 1 master VM instance and 2 worker VMs each having 4 vCPUs 15 GB of memory and a 500-GB disk . A temporary deployment-coordinator VM instance is created to manage cluster setup . The Hadoop cluster uses a Cloud Storage bucket as its default file system accessed through Google Cloud Storage Connector . Visit Cloud Storage browser to find or create a bucket that you can use in your Hadoop deployment . Apache Hadoop on Google Compute Engine Click to Deploy Apache Hadoop Apache Hadoop ZONE us-central1-a WORKER NODE COUNT .. . .. . CLOUD STORAGE BUCKET Select a bucket HADOOP VERSION 1.2.1 MASTER NODE DISK TYPE Standard Persistent Disk MASTER NODE DISK SIZE GB .. . .. . WORKER NODE DISK TYPE Standard Persistent Disk WORKER NODE DISK SIZE GB Comment : Where does it say anything about local disk Comment : May be local is not the right word . . I was referring to the Standard Persistent Disk size requirement for both master and worker nodes . Comment : I would imagine the disk of this size is required for worker MR jobs the cloud-storage is probably used for the output of the job I m only guessing here but it makes sense . .. . Answer : The three big uses of persistent disks PDs are : .. . .. . Logs both daemon and job or container in YARN .. . These can get quite large with debug logging turned on and can result in many writes per second .. . MapReduce shuffle .. . These can be large but benefit more from higher IOPS and throughput .. . HDFS image and data .. . .. . Due to the layout of directories persistent disks will also be used for other items like job data JARs auxiliary data distributed with the application etc but those could just as easily use the boot PD . Bigger persistent disks are almost always better due to the way GCE scales IOPS and throughput with disk size 1 . 500G is probably a good starting point to start profiling your applications and uses . If you don t use HDFS find that your applications don t log much and don t spill to disk when shuffling then a smaller disk can probably work well . If you find that you actually don t want or need any persistent disk then bdutil 2 also exists as a command-line script that can create clusters with more configurability and customizability . 1 . https : cloud.google.com developers articles compute-engine-disks-price-performance-and-persistence .. . 2 . https : cloud.google.com hadoop", "Question : I have just installed Google Cloud platform for a free trial . In order to run MapReduce tasks with DataStore the docs https : cloud.google.com hadoop running-with-datastore-connector says to run .. . .. . But I couldn t get this file on my local and there s a good reason for that this way to run MapReduce jobs seem to be deprecated see this on github https : cloud.google.com hadoop running-with-datastore-connector . Is that true is there an alternative way to create MapReduce tasks from local command lines without requiring BigQuery .. . Answer : The Datastore connector connector is indeed deprecated . To your question is there an alternative way to create MapReduce tasks from local command-line one option is to use Google Cloud Dataflow https : cloud.google.com dataflow what-is-google-cloud-dataflow . It s not MapReduce per se but it s the programming model for parallel data-processing which has replaced MapReduce at Google . The Dataflow SDK includes support for Datastore access https : cloud.google.com dataflow java-sdk JavaDoc com google-cloud-dataflow sdk io DatastoreIO . Unlike Hadoop you don t have to set up a cluster . You just write your code using the Dataflow SDK and submit your job from the CLI . The Datastore service will create the needed workers on the fly to process your job and then terminate them .", "Question : null .. . Answer : I have used google-cloud-storage-connector for hadoop and able to run mapreduce job that takes input from my local hdfs Hadoop running in my local machine and places the result in google-cloud-storage bucket . Now I want to run a mapreduce job using google-datastore-connector for hadoop that takes input from local hdfs Hadoop running in my local machine and places the result in google-datastore kind kind is synonymous to database-table . Please help me what are all the configurations that I need to give and what steps I have to follow . Comment : Do you have a code snippet that shows what you are struggling with Comment : sorry kaz I dont have any code for this use-case . I have read this article stackoverflow.com questions 25291397 http : stackoverflow.com questions 25291397 migrating-50tb-data-from-local-hadoop-cluster-to-google-cloud-storage for copying data from hdfs to google-cloud-storage . Wanted to know the possibility of doing the same using google-datastore connector for hadoop", "Question : I am running an Hadoop Cluster on Google Cloud Platform using Google Cloud Storage as backend for persistent data . I am able to ssh to the master node from a remote machine and run hadoop fs commands . Anyway when I try to execute the following code I get a timeout error . Code .. . .. . When executing the hdfs.exists command I get a timeout error . Error .. . .. . org.apache.hadoop.net.ConnectTimeoutException : Call From gl051-win7 192.xxx.1.xxx to 111.222.333.444.bc.googleusercontent.com : 8020 failed on socket timeout exception : org.apache.hadoop.net.ConnectTimeoutException : 20000 millis timeout while waiting for channel to be ready for connect . ch : java.nio.channels.SocketChannel connection-pending remote 111.222.333.444.bc.googleusercontent.com 111.222.333.444 : 8020 .. . .. . Are you aware of any limitation using the Java Hadoop APIs against Hadoop on Google Cloud Platform Thanks .. . Answer : It looks like you re running that code on your local machine and trying to connect to the Google Compute Engine VM by default GCE has strict firewall settings to avoid exposing your external IP addresses to arbitrary inbound connections . If you re using defaults then your Hadoop cluster should be on the default GCE network . You ll need to follow the adding a firewall instructions https : cloud.google.com compute docs networking addingafirewall to allow incoming TCP connections on port 8020 and possible on other Hadoop ports as well from your local IP address for this to work . It ll look something like this : .. . .. . Note that you really want to avoid opening a 0.0.0.0 0 source-range since Hadoop isn t doing authentication or authorization on those incoming requests . You ll want to restrict it as much as possible to only the inbound IP addresses from which you plan to dial in . You may need to open up a couple other ports as well depending on what functionality you use connecting to Hadoop . The more general recommendation is that wherever possible you should try to run your code on the Hadoop cluster itself in that case you ll use the master hostname itself as the HDFS authority rather than external IP : .. . .. . That way you can limit the port exposure to just the SSH port 22 where incoming traffic is properly gated by the SSH daemon and then your code doesn t have to worry about what ports are open or even about dealing with IP addresses at all . Comment : Hi Dennis opening the port worked for me but as you have already pointed out there could be also the need to open other ports as well in particular if I want to load into HDFS some data files from my local machine this is my final goal . I think you are right I should have the java code running on the master node to avoid to exposure too many ports to the inbound traffic but what is the best practice to push to the master node the original data files programmatically thanks Comment : Generally you can either use gcloud compute copy-files https : cloud.google.com sdk gcloud reference compute copy-files or you can first stage the files to Google Cloud Storage using gsutil cp local file gs : your bucket your GCS location and then SSH into the master and gsutil cp gs : your bucket your GCS location master local file . If you re talking about bulk data you can also first upload to Google Cloud Storage and then in your master node do hadoop fs -cp gs : your-bucket your-location data hdfs : master-hostname hdfs-location . Comment : If it s a lot of data you can even use hadoop distcp to then move from GCS into HDFS . Alternatively consider just reading the files from GCS directly in your hadoop jobs anywhere you would ve used hdfs : just go ahead and use your gs : bucket location instead .", "Question : It is possible to connect my Hadoop cluster to multiple Google Cloud Projects at once I can easly use any Google Storage bucket in single Google Project via Google Cloud Storage Connector as explained in this thread Migrating 50TB data from local Hadoop cluster to Google Cloud Storage http : stackoverflow.com questions 25291397 migrating-50tb-data-from-local-hadoop-cluster-to-google-cloud-storage . But i can t find any documentation or example how to connect to two or more Google Cloud Project from single map-reduce job . Do You have any suggestion trick Thanks a lot . .. . Answer : Indeed it is possible to connect your cluster to buckets from multiple different projects at once . Ultimately if you re using the instructions for using a service-account keyfile http : stackoverflow.com questions 25291397 migrating-50tb-data-from-local-hadoop-cluster-to-google-cloud-storage the GCS requests are performed on behalf of that service-account which can be treated more-or-less like any other user . You can either add the service account email [email protected] to all the different cloud projects owning buckets you want to process using the permissions section of cloud.google.com console and simply adding that email-address like any other member or you can set GCS-level access https : cloud.google.com storage docs gsutil commands acl ch-examples to add that service-account like any other user .", "Question : I am trying to migrate existing data JSON in my Hadoop cluster to Google Cloud Storage . I have explored GSUtil and it seems that it is the recommended option to move big data sets to GCS . It seems that it can handle huge datasets . It seems though that GSUtil can only move data from Local machine to GCS or S3 - GCS however cannot move data from local Hadoop cluster . 1 . What is a recommended way of moving data from local Hadoop cluster to GCS 2 . In case of GSUtil can it directly move data from local Hadoop cluster HDFS to GCS or do first need to copy files on machine running GSUtil and then transfer to GCS 3 . What are the pros and cons of using Google Client Side Java API libraries vs GSUtil Thanks a lot .. . Answer : Question 1 : The recommended way of moving data from a local Hadoop cluster to GCS is to use the Google Cloud Storage connector for Hadoop https : developers.google.com hadoop google-cloud-storage-connector . The instructions on that site are mostly for running Hadoop on Google Compute Engine VMs but you can also download the GCS connector directly either gcs-connector-1.2.8-hadoop1.jar http : storage.googleapis.com hadoop-lib gcs gcs-connector-1.2.8-hadoop1.jar if you re using Hadoop 1.x or Hadoop 0.20.x or gcs-connector-1.2.8-hadoop2.jar http : storage.googleapis.com hadoop-lib gcs gcs-connector-1.2.8-hadoop2.jar for Hadoop 2.x or Hadoop 0.23.x . Simply copy the jarfile into your hadoop lib dir or HADOOP COMMON LIB JARS DIR in the case of Hadoop 2 : .. . .. . You may need to also add the following to your hadoop conf hadoop-env.sh file if youre running 0.20.x : .. . .. . Then you ll likely want to use service-account keyfile authentication since you re on an on-premise Hadoop cluster . Visit your cloud.google.com console find APIs auth on the left-hand-side click Credentials if you don t already have one click Create new Client ID select Service account before clicking Create client id and then for now the connector requires a .p12 type of keypair so click Generate new P12 key and keep track of the .p12 file that gets downloaded . It may be convenient to rename it before placing it in a directory more easily accessible from Hadoop e.g : .. . .. . Add the following entries to your core-site.xml file in your Hadoop conf dir : .. . .. . The fs.gs.system.bucket generally won t be used except in some cases for mapred temp files you may want to just create a new one-off bucket for that purpose . With those settings on your master node you should already be able to test hadoop fs -ls gs : the-bucket-you-want to-list . At this point you can already try to funnel all the data out of the master node with a simple hadoop fs -cp hdfs : yourhost : yourport allyourdata gs : your-bucket . If you want to speed it up using Hadoop s distcp sync the lib gcs-connector-1.2.8-hadoop1.jar and conf core-site.xml to all your Hadoop nodes and it should all work as expected . Note that there s no need to restart datanodes or namenodes . Question 2 : While the GCS connector for Hadoop is able to copy direct from HDFS without ever needing an extra disk buffer GSUtil cannot since it has no way of interpreting the HDFS protocol it only knows how to deal with actual local filesystem files or as you said GCS S3 files . Question 3 : The benefit of using the Java API is flexibility you can choose how to handle errors retries buffer sizes etc but it takes more work and planning . Using gsutil is good for quick use cases and you inherit a lot of error-handling and testing from the Google teams . The GCS connector for Hadoop is actually built directly on top of the Java API and since it s all open-source you can see what kinds of things it takes to make it work smoothly here in its source code on GitHub : https : github.com GoogleCloudPlatform bigdata-interop blob master gcs src main java com google cloud hadoop gcsio GoogleCloudStorageImpl.java Comment : Thanks a lot Dennis for your detailed response I am also considering gsutil for transferring my 50TB data to the GCS . My criteria for selecting a solution either Hadoop connector or GsUtil is the total amount of time it will take to upload the data to GCS . Do you think that a Hadoop solution will be faster than GsUtil gsutil has an option for utilizing multiple cores Secondly will I be able to transfer my 6GB hdfs files without any loss change in data from HDFS to GCS using Hadoop-connector since each file is composed of 128MB hdfs blocks Thanks again Comment : I just realized that the original answer only posted the first part of my response I had tried to post it over a flaky data plan hopefully my answers to Question 2 and Question 3 help clarify the distinction between using the GCS connector vs gsutil . Generally gsutil s multithreading will help for uploading files from just a single local machine but for data inside HDFS gsutil can t really read that data directly and you ll want to use hadoop distcp instead which will be able to utilize all the cores across your cluster . It should be as fast as your network allows using distcp . Comment : To more directly answer your followup questions : yes using hadoop distcp hdfs : host : port your-current-file-dir gs : your-bucket new-file-dir should definitely be faster than trying to use gsutil itself . Your 6GB hdfs files should arrive in GCS unchanged intact even though once on GCS the actual underlying block sizes will be abstracted away you can really just think of them as monolithic 6GB files in GCS . I d recommend first testing with a smaller subset or maybe just single files to ensure your distcp works as intended before trying the full 50TB . Comment : Thanks a lot Dennis I really appreciate your help . I am trying your approach GCS hadoop connector however for some reason I cannot see a Service Account option in Credentials whenever I hit Create client id to generate a key . Does it has to do something with the enabled APIs I have 4 APIs enabled i.e GCS GCS JSON API Google Cloud SQL and BigQuery API . I see following options : - Installed application Runs on a desktop computer or handheld device like Android or iPhone . - Android Learn more - Chrome Application Learn more - iOS Learn more - Other . Comment : Since service-accounts are often used with Google Compute Engine VMs it s quite possibly related to enabling Google Compute Engine it shouldn t be necessary to actually create any VMs try enabling it and see if that opens up the service-account options .", "Question : I got connectors from https : cloud.google.com hadoop datastore-connector But I m trying to add the datastore-connector and bigquery-connector too as a dependency in the pom.. . I don t know if it this is possible . I could not find the right artifact and groupId . Is there some maven repository that contain the datastore-connector Furthermore I am looking for the source of datastore-connector but I didn t find it . By the notes in the CHANGES.txt it seems to be coming from : .. . .. . https : github.com GoogleCloudPlatform bigdata-interop .. . .. . The source should be in the package com.google.cloud.hadoop.io.datastore src main com google cloud hadoop io datastore but it s not there . In fact the source of bigquery-connector appears to be on GitHub https : github.com GoogleCloudPlatform bigdata-interop tree master bigquery src main java com google cloud hadoop io bigquery along with its pom https : github.com GoogleCloudPlatform bigdata-interop blob master bigquery pom.xml but is the source of datastore-connector available .. . Answer : What David says in the other answer is correct . To elaborate more the connector under the hood uses the Protocol Buffers SDK https : cloud.google.com datastore docs downloads and uses for example the QuerySplitter https : cloud.google.com datastore docs apis javadoc com google-api services datastore client QuerySplitter to define splits . In the near future we will be posting more information to gcp-hadoop-announce https : groups.google.com forum forum gcp-hadoop-announce with further guidance regarding the future of the Datastore connector for Hadoop . You may want to familiarize yourself with other Datastore features that may suit your purposes better including Datastore backup to GCS https : cloud.google.com appengine docs adminconsole datastoreadmin backup and restore and this codelab https : cloud.google.com bigquery articles datastoretobigquery walking through an AppEngine-friendly approach to extracting data from Datastore and loading it into BigQuery for analysis . You may notice at the top of that page an announcement of trusted-tester availability for direct backend loading of Datastore backups into BigQuery .", "Question : I m using Spark on a Google Compute Engine cluster with the Google Cloud Storage connector instead of HDFS as recommended https : cloud.google.com hadoop google-cloud-storage-connector benefits and get a lot of rate limit errors as follows : .. . .. . Anyone knows any solution for that Is there a way to control the read-write rate of Spark Is there a way to increase the rate limit for my Google Project Is there a way to use local Hard-Disk for temp files that don t have to be shared with other slaves Thanks Comment : I must add that those read-write are for temporary files used by Spark and not my input output of the program . .. . Answer : Have you tried to set the spark.local.dir config parameter and attach a disk preferable SSD for that tmp space to your Google Compute Engine instances https : spark.apache.org docs 1.2.0 configuration.html .. . .. . You can not change the rate-limiting for your project what you would have to use is a back-off algorithm once the limit is reached . Since you mentioned most of the reads writes are for tmp files try to configure Spark to use local disks for that . Comment : I did try to use spark.local.dir and spark.worker.dir with local dir like tmp but it still didn t work . I guess these are writes in order to sync with other slaves so it can t be saved locally .", "Question : I have just installed Google Cloud platform for a free trial . In order to run MapReduce tasks with DataStore the docs https : cloud.google.com hadoop running-with-datastore-connector says to run .. . .. . But I couldn t get this file on my local and there s a good reason for that this way to run MapReduce jobs seem to be deprecated see this on github https : cloud.google.com hadoop running-with-datastore-connector . Is that true is there an alternative way to create MapReduce tasks from local command lines without requiring BigQuery .. . Answer : NOTE : Google team removed DataStore connector https : github.com GoogleCloudPlatform bdutil blob master CHANGES.txt from bdutil v1.3.0 2015-05-27 going forward so you might need to use older version or use GCS or BigQuery as proxy to accessing your data in DataStore . I try to cover as much as I can but bdutil is require lots more detail which is hard to document it in this answer but I hope this can give you enough to start : .. . .. . Setup Google Cloud SDK - detail https : cloud.google.com sdk .. . .. . Download SDK .. . curl https : sdk.cloud.google.com bash .. . Restart your shell .. . exec -l SHELL .. . Authenticate to GCP .. . gcloud auth login .. . Select Project .. . gcloud config set project PROJECT NAME .. . .. . .. . Download and extract bdutil https : cloud.google.com hadoop bdutil source code that contains DataStore connector . Download source which contains DataStore connector .. . wget https : github.com GoogleCloudPlatform bdutil archive 1.2.1.tar.gz -O bdutil.tar.gz .. . Extract source .. . tar -xvzf bdutil.tar.gz .. . cd bdutil- .. . .. . .. . Create bdutil custom environment variable file . Please refer to bdutil configuration documentation https : cloud.google.com hadoop setting-up-a-hadoop-cluster configuringacluster about creating correct configuration file since you need to specify project number of servers GCS bucket machine type etc.. . .. . .. . Deploy your Hadoop instances Full documentation https : cloud.google.com hadoop setting-up-a-hadoop-cluster deployinstances using datastore env.sh .. . .. . . bdutil deploy -e YOUR ENV FILE.sh datastore env.sh .. . .. . .. . Connect to Hadoop Master node .. . .. . . bdutil shell .. . .. . .. . Now in Master node you can run your MapReduce Job which will have access to DataStore as well . Turn down your Hadoop Cluster .. . .. . . bdutil delete Comment : thanks but there is no longer any datastore env.sh file - see when you untar the bdutil file Comment : @Newben you are absolutely right . They removed it in v1.3.0 1.3.0 - 2015-05-27 - 12 days ago - More Detail : github.com GoogleCloudPlatform bdutil blob master CHANGES.txt https : github.com GoogleCloudPlatform bdutil blob master CHANGES.txt Comment : yes indeed I saw that", "Question : I m trying to connect Hadoop running on Google Cloud VM to Google Cloud Storage . I have : .. . .. . Modified the core-site.xml to include properties of fs.gs.impl and fs.AbstractFileSystem.gs.impl .. . Downloaded and referenced the gcs-connector-latest-hadoop2.jar in a generated hadoop-env.sh .. . authenticated via gcloud auth login using my personal account instead of a service account . I m able to run gsutil -ls gs : mybucket without any issues but when I execute .. . .. . hadoop fs -ls gs : mybucket .. . .. . I get the output : .. . .. . Wondering what steps I am missing to get Hadoop to be able to see the Google Storage Thanks .. . Answer : Thanks very much for both of your answers Your answers led me to the configuration as noted in Migrating 50TB data from local Hadoop cluster to Google Cloud Storage http : stackoverflow.com questions 25291397 migrating-50tb-data-from-local-hadoop-cluster-to-google-cloud-storage . I was able to utilize the fs.gs.auth.service.account.keyfile by generating a new service account and then applying the service account email-address and p12 key . Comment : Please don t add thank you as an answer . Instead vote up the answers that you find helpful . Comment : Please re-read my answer before deleting it . While I thanked both people for providing their helpful answers my answer is different from theirs . I had also up voted both responses as their answers had led me to mine .", "Question : I got connectors from https : cloud.google.com hadoop datastore-connector But I m trying to add the datastore-connector and bigquery-connector too as a dependency in the pom.. . I don t know if it this is possible . I could not find the right artifact and groupId . Is there some maven repository that contain the datastore-connector Furthermore I am looking for the source of datastore-connector but I didn t find it . By the notes in the CHANGES.txt it seems to be coming from : .. . .. . https : github.com GoogleCloudPlatform bigdata-interop .. . .. . The source should be in the package com.google.cloud.hadoop.io.datastore src main com google cloud hadoop io datastore but it s not there . In fact the source of bigquery-connector appears to be on GitHub https : github.com GoogleCloudPlatform bigdata-interop tree master bigquery src main java com google cloud hadoop io bigquery along with its pom https : github.com GoogleCloudPlatform bigdata-interop blob master bigquery pom.xml but is the source of datastore-connector available .. . Answer : The datastore-connector source is not available nor is there a maven repo with the artifact . Your best option is to create a local raven repo in your source tree as described in this helpful article https : devcenter.heroku.com articles local-maven-dependencies .", "Question : I am trying to run Oryx on top of Hadoop using Google s Cloud Storage Connector for Hadoop : https : cloud.google.com hadoop google-cloud-storage-connector .. . .. . I prefer to use Hadoop 2.4.1 with Oryx so I use the hadoop2 env.sh set-up for the hadoop cluster I create on google-compute-engine e.g . : .. . .. . I face two main problems when I try to run oryx using hadoop . 1 Despite confirming that my hadoop conf directory matches what is expected for the google installation on compute engine e.g . : .. . .. . I still find something is looking for a conf directory e.g . : .. . .. . My understanding is that . . etc hadoop should be the conf directory e.g . : hadoop : configuration-files http : stackoverflow.com questions 25336698 hadoop-configuration-files 25336741 25336741 .. . .. . And while I shouldn t need to make any changes this problem is only resolved when I copy the config files into a newly created directory e.g . : .. . .. . So why is this Is this a result-of using the google-hadoop connector 2 After resolving the issue above I find additional errors which seem to me to be related to communication between the hadoop cluster and the google file system : .. . .. . Wed Oct 01 20 : 18 : 30 UTC 2014 WARNING Unable to load native-hadoop library for your platform.. . using builtin-java classes where applicable .. . .. . Wed Oct 01 20 : 18 : 30 UTC 2014 INFO Namespace prefix : hdfs : BUCKET NAME .. . .. . Wed Oct 01 20 : 18 : 30 UTC 2014 SEVERE Unexpected error in execution java.lang.ExceptionInInitializerError at com.cloudera.oryx.common.servcomp.StoreUtils.listGenerationsForInstance StoreUtils.java : 50 at com.cloudera.oryx.computation.PeriodicRunner.run PeriodicRunner.java : 173 at java.util.concurrent.Executors RunnableAdapter.call Executors.java : 471 at java.util.concurrent.FutureTask.runAndReset FutureTask.java : 304 at java.util.concurrent.ScheduledThreadPoolExecutor ScheduledFutureTask.access 301 ScheduledThreadPoolExecutor.java : 178 at java.util.concurrent.ScheduledThreadPoolExecutor ScheduledFutureTask.run ScheduledThreadPoolExecutor.java : 293 at java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java : 1145 at java.util.concurrent.ThreadPoolExecutor Worker.run ThreadPoolExecutor.java : 615 at java.lang.Thread.run Thread.java : 745 Caused by : java.lang.IllegalArgumentException : java.net.UnknownHostException : resistance-prediction at org.apache.hadoop.security.SecurityUtil.buildTokenService SecurityUtil.java : 373 at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy NameNodeProxies.java : 258 at org.apache.hadoop.hdfs.NameNodeProxies.createProxy NameNodeProxies.java : 153 at org.apache.hadoop.hdfs.DFSClient . DFSClient.java : 602 at org.apache.hadoop.hdfs.DFSClient . DFSClient.java : 547 at org.apache.hadoop.hdfs.DistributedFileSystem.initialize DistributedFileSystem.java : 139 at org.apache.hadoop.fs.FileSystem.createFileSystem FileSystem.java : 2591 at org.apache.hadoop.fs.FileSystem.access 200 FileSystem.java : 89 at org.apache.hadoop.fs.FileSystem Cache.getInternal FileSystem.java : 2625 at org.apache.hadoop.fs.FileSystem Cache.get FileSystem.java : 2607 at org.apache.hadoop.fs.FileSystem.get FileSystem.java : 368 at com.cloudera.oryx.common.servcomp.Store . Store.java : 76 at com.cloudera.oryx.common.servcomp.Store . Store.java : 57 .. . 9 more .. . .. . Caused by : java.net.UnknownHostException : BUCKET NAME .. . 22 more .. . .. . What seems relevant to me is that the namespace prefix is hdfs : when I set the default file system to gs : .. . .. . Perhaps this is leading to the UnkownHostException Note that I have confirmed the hadoop cluster is connected to the google file system e.g . : hadoop fs -ls yields the contents of my google cloud bucket and all the expected contents of the gs : BUCKET NAME directory . However I am not familiar with the google manifestation of hadoop via the hadoop connector and the traditional way I usually test to see if the hadoop cluster is running i.e . : jps only yields 6440 Jps rather than listing all the nodes . However I am running this command from the master node of the hadoop cluster i.e . PREFIX NAME-m and I am not sure of the expected output when using the google-cloud-storage connector for hadoop . So how can I resolve these errors and have my oryx job via hadoop successfully access data in my gs : BUCKET NAME directory Thanks in advance for an insights or suggestions . UPDATE : Thanks for the very detailed response . As a work-around I hard coded gs : into oryx by changing : .. . .. . to : .. . .. . I now get the following errors : .. . .. . Tue Oct 14 20 : 24 : 50 UTC 2014 SEVERE Unexpected error in execution java.lang.ExceptionInInitializerError at com.cloudera.oryx.common.servcomp.StoreUtils.listGenerationsForInstance StoreUtils.java : 50 at com.cloudera.oryx.computation.PeriodicRunner.run PeriodicRunner.java : 173 at java.util.concurrent.Executors RunnableAdapter.call Executors.java : 471 at java.util.concurrent.FutureTask.runAndReset FutureTask.java : 304 at java.util.concurrent.ScheduledThreadPoolExecutor ScheduledFutureTask.access 301 ScheduledThreadPoolExecutor.java : 178 at java.util.concurrent.ScheduledThreadPoolExecutor ScheduledFutureTask.run ScheduledThreadPoolExecutor.java : 293 at java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java : 1145 at java.util.concurrent.ThreadPoolExecutor Worker.run ThreadPoolExecutor.java : 615 at java.lang.Thread.run Thread.java : 745 .. . .. . Caused by : java.lang.RuntimeException : java.lang.ClassNotFoundException : Class com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem not found at org.apache.hadoop.conf.Configuration.getClass Configuration.java : 1905 at org.apache.hadoop.fs.FileSystem.getFileSystemClass FileSystem.java : 2573 at org.apache.hadoop.fs.FileSystem.createFileSystem FileSystem.java : 2586 at org.apache.hadoop.fs.FileSystem.access 200 FileSystem.java : 89 at org.apache.hadoop.fs.FileSystem Cache.getInternal FileSystem.java : 2625 at org.apache.hadoop.fs.FileSystem Cache.get FileSystem.java : 2607 at org.apache.hadoop.fs.FileSystem.get FileSystem.java : 368 at com.cloudera.oryx.common.servcomp.Store . Store.java : 76 at com.cloudera.oryx.common.servcomp.Store . Store.java : 57 .. . .. . As per the instructions here : https : cloud.google.com hadoop google-cloud-storage-connector classpath I believe I have added connector jar to Hadoop s classpath I added : .. . .. . to home rich hadoop-env-setup.sh . and echo HADOOP CLASSPATH yields : .. . .. . contrib capacity-scheduler .jar : home hadoop hadoop-install share hadoop common lib gcs-connector-1.2.9-hadoop2.jar : contrib capacity-scheduler .jar : home hadoop hadoop-install share hadoop common lib gcs-connector-1.2.9-hadoop2.jar .. . .. . Do I need to add more to the class path I also note perhaps related that I still get the error for etc hadoop conf even with the export commands . I have been using the sudo mkdir etc hadoop conf as a temporary work around . I mention this here in case it may be leading to additional issues . Comment : I found the command jps yields output for Jps NameNode ResourceManager and SecondaryNameNode when executed as the hadoop user on the master node hadoop@PREFIX NAME-m . However the output errors from the oryx hadoop job when run as the hadoop user is the same as when run from my default user-profile . Comment : What command are you running when you see the Caused by : java.lang.IllegalStateException : Not a directory : etc hadoop conf error Are you able to provide the rest of the stack-trace behind that error .. . Answer : There appear to be a couple of problems the first of which is that normally when things are run under hadoop jar hadoop imbues the various system environment-variables and classpaths etc . into the program being run in your case since Oryx runs without using hadoop jar instead using something like : .. . .. . then HADOOP CONF DIR doesn t actually make it into the environment so System.getenv in OryxConfiguration.java https : github.com cloudera oryx blob 7d9b3e2e7331b54c7744fd06038ae40c202e56e4 common-servcomp src main java com cloudera oryx common servcomp OryxConfiguration.java L103 fails to pick it up and uses the default etc hadoop conf value . This is solved simply with the export command which you can test by seeing if it makes it into a subshell : .. . .. . The second and more unfortunate issue is that Oryx appears to hard-code hdfs https : github.com cloudera oryx blob 7d9b3e2e7331b54c7744fd06038ae40c202e56e4 common-servcomp src main java com cloudera oryx common servcomp Namespaces.java L64 rather allowing any filesystem scheme set by the user : .. . .. . It all depends on whether Oryx intends to add support for other filesystem schemes in the future but in the meantime you would either have to change the Oryx code yourself and recompile or you could attempt to hack around it but with potential for pieces of Oryx which have a hard dependency on HDFS to fail . The change to Oryx should theoretically just be : .. . .. . However if you do go this route keep in mind the eventual list consistency semantics of GCS https : cloud.google.com storage docs concepts-techniques consistency where multi-stage workflows must not rely on list operations to find immediately find all the outputs of a previous stage Oryx may or may not have such a dependency . The most reliable solution in your case would be to deploy with --default fs hdfs where bdutil will still install the gcs-connector so that you can run hadoop distcp to move your data from GCS to HDFS temporarily run Oryx and then once finished copy it back out into GCS .", "Question : I have a reference to the GoogleHadoopFileSystemBase in my java code and I m trying to call setTimes Path p long mtime long atime to modify the timestamp of a file . It doesn t seem to be working though even though other FileSystem apis work fine . From the console UI I can only see the last uploaded time . Does the google file system only store the upload time and thus ignore changes to the modification time and access time I also checked the timestamp using hadoop fs -ls gs : mybucket but that timestamp also shows up as unchanged . .. . Answer : This is unfortunately a limitation of Google Cloud Storage https : cloud.google.com storage GCS and the GCS Hadoop connector https : cloud.google.com hadoop google-cloud-storage-connector . Specifically GCS objects https : cloud.google.com storage docs json-api v1 objects resource do not have mtime and atime which causes the underlying failure . As a workaround right now HDFS attached to clusters should function normally . Comment : Is this still true cloud.google.com storage docs json-api v1 objects resource https : cloud.google.com storage docs json-api v1 objects resource does show a field called updated of type datetime which seems to contradict the statement that GCS objects don t have an mtime .", "Question : I would like to write data from flume-ng to Google Cloud Storage . It is a little bit complicated because I observed a very strange behavior . Let me explain : .. . .. . Introduction .. . .. . I ve launched a hadoop cluster on google cloud one click set up to use a bucket . When I ssh on the master and add a file with hdfs command I can see it immediately in my bucket .. . .. . But when I try to add then read from my computer it seems to use some other HDFS . Here I added a file called jp.txt and it doesn t show my previous file test.txt .. . .. . That s also the only file I see when I explore HDFS on http : ip.to.my.cluster : 50070 explorer.html .. . .. . When I list files in my bucket with the web-console https : console.developers.google.com project my-project-id storage my-bucket I can only see test.txt and not jp.txt . I read Hadoop cannot connect to Google Cloud Storage http : stackoverflow.com questions 26132011 hadoop-cannot-connect-to-google-cloud-storage and I configured my hadoop client accordingly pretty hard stuff and now I can see items in my bucket . But for that I need to use a gs : URI .. . .. . Observation Intermediate conclusion .. . .. . So it seems here there are 2 different storages engine in the same cluster : traditional HDFS starting with hdfs : and a Google storage bucket starting with gs : . Users and rights are different depending on where you are listing files from . Question s .. . .. . The main question is : What is the minimal setup needed to write to HDFS GS on Google Cloud Storage with flume Related questions .. . .. . Do I need to launch a Hadoop cluster on Google Cloud or not to achieve my goal Is it possible to write directly to a Google Cloud Storage Bucket If yes how can I configure flume adding jars redefining classpath.. . .. . How come there are 2 storage engine in the same cluster classical HDFS GS bucket .. . .. . My flume configuration .. . .. . Does the line a1.sinks.hdfs sink.hdfs.path accept a gs : path What setup would it need in that case additional jars classpath Thanks .. . Answer : As you observed it s actually fairly common to be able to access different storage systems from the same Hadoop cluster based on the scheme : of the URI you use with hadoop fs . The cluster you deployed on Google Compute Engine also has both filesystems available it just happens to have the default set to gs : your-configbucket . The reason you had to include the gs : configbucket file instead of just plain file on your local cluster is that in your one-click deployment we additionally included a key in your Hadoop s core-site.xml setting fs.default.name to be gs : configbucket . You can achieve the same effect on your local cluster to make it use GCS for all the schemeless paths in your one-click cluster check out home hadoop hadoop-install core-site.xml for a reference of what you might carry over to your local setup . To explain the internals of Hadoop a bit the reason hdfs : paths work normally is actually because there is a configuration key which in theory can be overridden in Hadoop s core-site.xml file which by default sets : .. . .. . Similarly you may have noticed that to get gs : to work on your local cluster you provided fs.gs.impl . This is because DistribtedFileSystem and GoogleHadoopFileSystem both implement the same Hadoop Java interface FileSystem and Hadoop is built to be agnostic to how an implementation chooses to actually implement the FileSystem methods . This also means that at the most basic level anywhere you could normally use hdfs : you should be able to use gs : . So to answer your questions : .. . .. . 1 . The same minimal setup you d use to get Flume working with a typical HDFS-based setup should work for using GCS as a sink . 2 . You don t need to launch the cluster on Google Compute Engine though it d be easier as you experienced with the more difficult manual instructions for using the GCS connector on your local setup . But since you already have a local setup running it s up to you whether Google Compute Engine will be an easier place to run your Hadoop Flume cluster . 3 . Yes as mentioned above you should experiment with replacing hdfs : paths with gs : paths instead and or setting fs.default.name to be your root gs : configbucket path . 4 . Having the two storage-engines allows you to more easily switch between the two in case of incompatibilities . There are some minor differences in supported features for example GCS won t have the same kinds of posix-style permissions you have in HDFS . Also it doesn t support appends to existing files or symlinks . Comment : Thanks for your reply . I thought that using gs : or hdfs : would result in the same behaviour except for GS limitations you mentionned . I thought that one click cluster would result in an abstraction for storage but in fact files are stored in different places GS bucket and hard drives of cluster nodes . I expected to see the same files either with gs : or hdfs : Comment : Now it seems to work : folders and files are created accordingly to the pattern I wrote but files are empty and I have a Java heap space in GCS code : pastebin.com i5iSgCM3 http : pastebin.com i5iSgCM3 gist.github.com jpcaruana 3a960ff64ff0eb1c30e0 https : gist.github.com jpcaruana 3a960ff64ff0eb1c30e0 . Any idea Comment : Since the GCS connector is optimized for large-scale workloads which typically average at least several hundred megabytes per file file-creation by default initializes a fairly large 64MB in-memory default at the time of file-creation . This setting is controlled by fs.gs.io.buffersize.write default 67108864 which you can try to alter to a smaller number perhaps 8388608 inside your core-site.xml . Alternatively simply make sure wherever you re able to pass in jvm flags to include something like -Xmx2048m to increase the max heap size . Comment : thanks Dennis I asked the question elsewhere : stackoverflow.com questions 27232966 https : stackoverflow.com questions 27232966 what-causes-flume-with-gcs-sink-to-throw-a-outofmemoryexception and had a similar answer .", "Question : I m trying to connect Hadoop running on Google Cloud VM to Google Cloud Storage . I have : .. . .. . Modified the core-site.xml to include properties of fs.gs.impl and fs.AbstractFileSystem.gs.impl .. . Downloaded and referenced the gcs-connector-latest-hadoop2.jar in a generated hadoop-env.sh .. . authenticated via gcloud auth login using my personal account instead of a service account . I m able to run gsutil -ls gs : mybucket without any issues but when I execute .. . .. . hadoop fs -ls gs : mybucket .. . .. . I get the output : .. . .. . Wondering what steps I am missing to get Hadoop to be able to see the Google Storage Thanks .. . Answer : By default the gcs-connector when running on Google Compute Engine is optimized for using the built-in service-account mechanisms so in order to force it to use the oauth2 flow there are a few extra configuration keys that need to be set you can borrow the same client id and client secret from gcloud auth as follows and add them to your core-site.xml also disabling fs.gs.auth.service.account.enable : .. . .. . You can optionally also set fs.gs.auth.client.file to something other than its default of .credentials storage.json . If you do this then when you run hadoop fs -ls gs : mybucket you ll see a new prompt similar to the gcloud auth login prompt where you ll visit a browser and enter a verification code again . Unfortunately the connector can t quite consume a gcloud generated credential directly even though it can possibly share a credentialstore file since it asks explicitly for the GCS scopes that it needs you ll notice that the new auth flow will ask only for GCS scopes as opposed to a big list of services like gcloud auth login . Make sure you ve also set fs.gs.project.id in your core-site.xml : .. . .. . since the GCS connector likewise doesn t automatically infer a default project from the related gcloud auth . Comment : Thanks for the information Dennis As the instance was created using my own gmail account how would I determine what my ClientID and secret-key be I tried using my gmail address and the verification code generated by gcloud auth login but its giving me a different error message : ls : No FileSystem for scheme : gs Comment : So client id and client secret are actually not attributed to a gmail account but are rather attached to a project in this case the installed app flow means the client secret is a bit of a misnomer . The literal 32555940559.apps.googleusercontent.com ZmssLNjJy2998hD4CTg2ejr2 I provided are attributed with a Google-managed project associated with the Cloud SDK and is the reason the auth flow mentions Google Cloud SDK wants to access.. . . It doesn t get involved in actual access-control or billing so using those values as-is suits most practical purposes . Comment : In order to use a client id and client secret specific to your project you would go to cloud.google.com console under the project you re using find APIs auth - Credentials find a box that says Client ID for native application or if it doesn t exist click the Create new Client ID button with Installed Application as the type and then use the provided client id and client secret there . Comment : Thanks very much Dennis Very helpful context", "Question : null .. . Answer : I am using Google Cloud Storage for Hadoop 2.3.0 using GCS connector . I have added GCS.jar to lib directory of my hadoop installation an added path to GCS connector in hadoop-env.sh file as : .. . .. . I had also made changes to core-site.xml file of Hadoop installation as : .. . .. . The billing account for my created project is also enabled . I created a bucket and the contents of the buckets are visible to me using : .. . .. . I had tried the Hadoop click-to-deploy option of master and worker nodes for Hadoop and VM instances are created . I had installed gcloud for auth login . Git repositories are also created . I had followed MapReduce article posted on Google but its not helpful for complete guidance . Question : i want to run MapReduce programs developed in Java using deployed Hadoop on cloud What path do I provide in my programs for input and output files My programs are working well on Hadoop platform on my system .", "Question : I am trying to run Hadoop Job on Google Compute engine against our compressed data which is sitting on Google Cloud Storage . While trying to read the data through SequenceFileInputFormat I get the following exception : .. . .. . 1 . It seems that the SnappyCodec is not available . How should I include enable Snappy in my Hadoop cluster on google-compute-engine 2 . Can I deploy Snappy lib if I have to through bdutil script while deploying a Hadoop cluster 3 . What is the best approach to deploy third party libs jars on Hadoop cluster deployed on Google Compute engine Thanks a lot .. . Answer : This procedure is no longer required . A bdutil deployment will contain Snappy by default . For reference the original answer : .. . .. . Your last question is the easiest to answer in the general case so I ll begin there . The general guidance for shipping dependencies is that applications should make use of the distributed cache to distribute JARs and libraries to workers Hadoop 1 or 2 . If your code is already making use of the GenericOptionsParser you can distrubte JARs with the -libjars flag . A longer discussion can be found on Cloudera s blog that also discusses fat JARs : http : blog.cloudera.com blog 2011 01 how-to-include-third-party-libraries-in-your-map-reduce-job .. . .. . For installing and configuring other system-level components bdutil supports an extension mechanism . A good example of extensions is the Spark extension bundled with bdutil : extensions spark spark env.sh . When running bdutil extensions are added with the -e flag e.g . to deploy Spark with Hadoop : .. . .. . With regard to your first and second questions : there are two obstacles when dealing with Snappy in Hadoop on GCE . The first is that the native support libraries built by Apache and bundled with Hadoop 2 tarballs are built for i386 while GCE instances are amd64 . Hadoop 1 bundles binaries for both platforms but snappy is not locatable without either bundling or modifying the environment . Because of this architecture difference no native compressors are usable snappy or otherwise in Hadoop 2 and Snappy is not available easily in Hadoop 1 . The second obstacle is that libsnappy itself is not installed by default . The easiest way to overcome both of these is to create your own Hadoop tarball containing amd64 native Hadoop libraries as well as libsnappy . The steps below should help you do this and stage the resulting tarball for use by bdutil . To start launch a new GCE VM using a Debian Wheezy backports image and grant the VM service account read-write access to Cloud Storage . We ll use this as our build machine and we can safely discard it as soon as we re done building storing the binary . Building Hadoop 1.2.1 with Snappy .. . .. . SSH to your new instance and run the following commands checking for any errors along the way : .. . .. . Building Hadoop 2.4.1 with Snappy .. . .. . SSH to your new instance and run the following commands checking for any errors along the way : .. . .. . Updating bdutil env.sh or hadoop2 env.sh .. . .. . Once you have a Hadoop version with the correct native libraries bundled we can point bdutil at the new Hadoop tarball by updating either bdutil env.sh for Hadoop 1 or hadoop2 env.sh for Hadoop 2 . In either case open the approprirate file and look for a block along the lines of : .. . .. . and change the URI pointed to to be the URI where we stored the tarball above : e.g . Comment : Compiling native libs in Hadoop 1.2.1 is not required as they are in fact bundled with the distribution . I ve removed that step from the 1.2.1 section and updated the paragraph leading to it . Bundling libsnappy and staging your own tarball is still as of right now the easiest route . Comment : Thanks a lot Angus for a detailed response and flawless commands I followed your recommended steps and successfully deployed hadoop with SnappyCodec . Comment : @AngusDavis Can I use these Snappy on my windows machine Comment : @GopsAB It looks like Snappy is supported on Windows but I honestly have not tried it myself . See HADOOP-9802 https : issues.apache.org jira browse HADOOP-9802 for details on how it can be tested built .", "Question : I am using flume to write to Google Cloud Storage . Flume listens on HTTP : 9000 . It took me some time to make it work add gcs libaries use a credentials file.. . but now it seems to communicate over the network . I am sending very small HTTP request for my tests and I have plenty of RAM available : .. . .. . I encounter this memory exception on first request then of course it stops working : .. . .. . see complete stack-trace as a gist https : gist.github.com jpcaruana 3a960ff64ff0eb1c30e0 for full details .. . .. . The strange part is that folders and files are created the way I want but files are empty . Is it something wrong with the way I configured flume + GCS or is it a bug in GCS.jar https : storage.googleapis.com hadoop-lib gcs gcs-connector-latest-hadoop2.jar Where should I check to gather more data ps : I am running flume-ng inside docker . .. . .. . My flume.conf file : .. . .. . .. . .. . related question in my flume gcs journey : What is the minimal setup needed to write to HDFS GS on Google Cloud Storage with flume http : stackoverflow.com questions 27174033 what-is-the-minimal-setup-needed-to-write-to-hdfs-gs-on-google-cloud-storage-wit .. . Answer : When uploading files the GCS Hadoop FileSystem implementation sets aside a fairly large 64MB write buffer per FSDataOutputStream file open for write . This can be changed by setting fs.gs.io.buffersize.write https : github.com GoogleCloudPlatform bigdata-interop blob master gcs src main java com google cloud hadoop fs gcs GoogleHadoopFileSystemBase.java L120 to a smaller value in bytes in core-site.xml . I imagine 1MB would suffice for low-volume log collection . In addition check what the maximum heap size is set to when launching the JVM for flume . The flume-ng script sets a default JAVA OPTS value of -Xmx20m to limit the heap to 20MB . This can be set to a larger value in flume-env.sh see conf flume-env.sh.template in the flume tarball distribution for details . Comment : too bad we cannot pass the JVM size to flume-ng", "Question : I m piping unstructured event data through Hadoop and want to land it in BigQuery . I have a schema that includes most of the fields but there are some fields I want to ignore or don t know about . BigQuery has a configuration field called ignoreUnknownValues https : cloud.google.com bigquery docs reference v2 jobs but I can t figure out how to turn that on from the Hadoop connector . Is this possible .. . Answer : Unfortunately the BigQuery connector for Hadoop doesn t support this at the moment we ll be sure to add more flexible config customizations in the next release and direct support for the known configuration settings like ignoreUnknownValues . In the meantime if you re up for building from source you should be able to add after line 317 of BigQueryRecordWriter.java https : github.com GoogleCloudPlatform bigdata-interop blob master bigquery src main java com google cloud hadoop io bigquery BigQueryRecordWriter.java L317 : .. . .. . Then you simply mvn -Phadoop1 package or mvn -Phadoop2 package and upload your custom BigQuery connector jarfile to some location in GCS and finally modify BIGQUERY CONNECTOR JAR in your bdutil env.sh to point to your custom jarfile before re-deploying .", "Question : I m trying to connect Hadoop running on Google Cloud VM to Google Cloud Storage . I have : .. . .. . Modified the core-site.xml to include properties of fs.gs.impl and fs.AbstractFileSystem.gs.impl .. . Downloaded and referenced the gcs-connector-latest-hadoop2.jar in a generated hadoop-env.sh .. . authenticated via gcloud auth login using my personal account instead of a service account . I m able to run gsutil -ls gs : mybucket without any issues but when I execute .. . .. . hadoop fs -ls gs : mybucket .. . .. . I get the output : .. . .. . Wondering what steps I am missing to get Hadoop to be able to see the Google Storage Thanks .. . Answer : It looks like the instance itself isn t configured to use the correct service account but the gsutil command-line utility is . The Hadoop file system adaptor looks like it s not pulling those credentials . First try checking https : cloud.google.com compute docs authentication metadata if that instance is configured with the correct service account . If not you can set it up https : cloud.google.com compute docs authentication using . Hope this helps Comment : Thanks - will definitely check that Comment : Oh the issue that I m running into is that I spun up the instances via the mesosphere config which was using my own gmail address . Is there a way to apply a service account to an instance s that is already created looking at the documentation it appears that I can only apply the service account at instance creation . Comment : I think using that second link you should be able to apply or configure a service account on instances after they ve been created . Comment : Thanks very much :" ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION
external-accessory@bluetooth@201
external-accessory -- the external-accessory framework provides support for communicating with external hardware connected to an ios-based device through the 30-pin dock connector or wirelessly using @placeholder .
{ "confidence": [ 87.29329681396484, 78.25949096679688, 69.76201629638672, 69.71998596191406, 69.5549087524414, 69.338623046875, 67.68629455566406, 66.62899780273438, 65.83177185058594, 65.54621124267578, 65.54621124267578, 65.10215759277344, 63.91822814941406, 63.839874267578125, 63.60717010498047, 63.550621032714844, 62.85096740722656, 61.76502227783203, 61.47843933105469, 60.570037841796875, 60.418479919433594, 59.62493896484375, 59.62493896484375, 59.48463439941406, 58.927818298339844, 58.92528533935547, 58.893394470214844, 58.07672882080078, 57.6583251953125, 57.6583251953125, 57.6583251953125, 57.6583251953125, 56.99817657470703, 56.70466613769531, 56.70466613769531, 56.59503173828125, 56.50849914550781, 56.43072509765625, 56.29113006591797, 56.244415283203125, 56.22638702392578, 56.15825271606445, 55.87272644042969, 55.87272644042969, 55.57469177246094, 55.57469177246094, 55.24945831298828, 55.06458282470703, 55.06458282470703, 55.06458282470703, 54.104331970214844, 54.005218505859375, 53.71881866455078, 53.70293426513672, 53.14287567138672, 52.47618103027344, 51.91791915893555, 51.82234191894531, 51.649009704589844, 51.649009704589844, 51.649009704589844, 51.04917907714844, 50.97411346435547, 50.73395538330078, 50.706817626953125, 50.69325256347656, 50.14610290527344, 49.721282958984375, 48.92122268676758, 48.92122268676758, 48.92122268676758, 48.901222229003906, 48.825767517089844, 48.79850769042969, 48.70119857788086, 48.675559997558594, 47.608604431152344, 47.01291275024414, 46.78113555908203, 46.78113555908203, 46.78113555908203, 46.78113555908203, 46.45234680175781, 45.96369934082031, 45.73179626464844, 45.36421203613281, 45.270172119140625, 45.17811584472656, 44.9666748046875, 44.80738830566406, 44.80738830566406, 44.77622985839844, 44.20463562011719, 44.15148162841797, 43.80021667480469, 43.654823303222656, 43.544471740722656, 43.544471740722656, 42.90213394165039 ], "content": [ "External Accessory framework used to communicate with external hardware device using dock connector or bluetooth .", "I have an iOS app that connects to a device using External Accessory Framework .", "I have an app that communicates with a piece of hardware using the External Accessory Framework .", "I am developing an iOS application which using external-accessory framework to communicate with hardware device .", "I am writing an iOS-based program that interacts with a Bluetooth device via the External Accessory Framework .", "is it possible to use iPad as Hands Free Device maybe with the external-accessory framework", "I try to use the External Accessory framework .", "I tried External Accessory but failed .", "For Healthkit to connect with external-accessory Like Heart rate monitor which generally has bluetooth dock connector you may require to use External Accessory framework .", "There s no need to include use external-accessory framework .", "There s no need to include use external-accessory framework . .", "I am using external-accessory framework and successfully created the session and accessory is connected with iPhone but not able to read and write the data from sd-card .", "It will then assuming it s connected and within range become available for use using the External Accessory Framework .", "However if HAP Accessory bridge Garage door has wifi then iOS app requires to use External accessory framework .", "Anyone knows if external-accessory can launch terminated apps in iOS", "I m specifically looking for a solution related to the External Accessory Framework .", "I am looking for some good resources to learn the External Accessory framework specially the Bluetooth accessory interfacing .", "For more information about this framework see External Accessory Programming Topics .", "I know that by adding a unique protocol name in the info.plist file the application can be made to launch automatically when iOS device is connected to the external-accessory I am aware that support is needed from the external-accessory device too .", "What my understanding is an iOS device can communicate with BT device using External Accessory Framework if BT device is MFI compliant", "See this question for more details : .. . .. . What are the protocols supported in Iphone s External Accessory Framework http : stackoverflow.com questions 2083453 what-are-the-protocols-supported-in-iphones-external-accessory-framework", "For this i use the External Accessory Framework But the function does not work .", "Information : Use external-accessory framework Bluetooth 2.0 + EDR .. . .. . Thanks", "We are developing an MFi external-accessory on which we can launch iOS apps from iPhone using External Accessory Protocol.We are using Ford Smartdevicelink protocol to register the apps .", "So the accessories which doesnt have a inbuit wifi chip in it non-wifi accessory ....can nly be connected through ethernet....And these devices can be contacted by ios devices without the help of external-accessory framework", "I want to try out Wireless Accessory Configuration External Accessory Framework with Apple Airport Express .", "2a- How does External Accessory API Work", "I am building an iOS application that communicates to the external-accessory using a proprietary protocol over iAP .", "Add protocols supported by MFI to Info.plist Supported external-accessory protocols .", "I have implemented a static library which connects to an external-accessory .", "If I use iOS9 and external-accessory with iAP2 implemented it again works fine .", "Supported external-accessory protocols Item 0 yourCompanyProtocol 2 .", "I am using external-accessory framework to connect to a bluetooth device I am successfully able to open the session and perform a write operation in the OutputStream .", "3- Or is there a better solution without using External Accessory API", "It appears that Apple recommends using runloops for data communications with an external-accessory .", "To load app automatically when Supported external-accessory is connected we need to put two things in the Info.plist : 1 .", "I am having problems with exporting a working .ANE using the external-accessory framework of Xcode iOS .", "Bluetooth 2.1 devices are covered by the external-accessory framework and require membership of the MFI program in order for the device to be certified by Apple .", "I am working to print image using External Accessory in iOS but I have problem to send request to Printer .", "I want to scan all the available unpaired MFi devices using External accessory framework and display the devices in a UITableView .", "I need to receive data periodically through a BlueTooth External Accessory .", "Here I attached the sample code to make the packet and send to External Accessory Device printer using Objective C language .", "The external-accessory has a data flow that can only be read once .", "@Paulw11 Regardless of if that background mode is extended due to the external-accessory", "Well after doing some more reading I see that the headphones jack isn t supported in the external-accessory framework .", "The library uses External Accessory Framework for the purpose and uses libXML for xml data-transfer .", "There is one problem though : .. . .. . In order to make the External Accessory framework work I need to include the protocol of the external device in my plist .", "Apps that are able to communicate with an external-accessory must declare the protocols they support in their Info.plist file .", "Applications that are able to communicate with an external-accessory should declare the protocols they support in their Info.plist file .", "Applications that are able to communicate with an external-accessory should declare the protocols they support in their Info.plist file .", "It is MFI certified and I already have an application on the AppStore that communicates with it using the External Accessory Framework .", "Connect your MFI accessory to iOS device .", "I see that card reader is part of the MFI program - there is no difference from the external-accessory framework s perspective between dock and bluetooth connections .", "It is a device that uses Serial communication and yes it has the Apple external-accessory protocol ID .", "Is it possible to set a timer for hours away that will trigger some code to be ran which will in-turn trigger a message to be sent to the External Accessory if the application includes external-accessory as a Background Mode", "Homekit Framework used to communicate between HAP Homekit Accessory protocol enabled accessory and iOS device .", "iOS will use this Bundle Seed ID to search for an app that is responsible for communicating with this accessory .", "I am not able to defer the situation that how do I establish connection with this external-accessory and then the device should be shown connected in my app .", "Can I achieve this by apple s external-accessory framework or by registration for apple s MFI program", "I have looked into the External Accessory framework however I was unable to get it to even work properly .", "The External Accessory framework only works with accessories that are MFi-compliant not generic paired Bluetooth accessories .", "I am new to ios and i have a doubt that whether implementation of homekit healthkit frameworks needs the involvement of the external-accessory framework .", "In this case by what means of communication will the iOS device will communicate with the HAP device.And why we dont need External Accessory frame work here", "But applications integrated with static library running on iOS9 fails to connect to an external-accessory on iAP1 iOS System do not sends the XML after initial hand shaking .", "1 . add protocol name to Supported external-accessory protocols in EADemo-Info.plist of the EADemo .", "I know there is a book by Ken Maskrey http : www.apress.com 9781430229315 for learning the External Accessory framework but this book does not cover the bluetooth communication .", "These accessories doesn t require external frame work as they are connected in intranet Accessory like bridge connected with Ethernet cabel to home s intranet work .", "We would like to develop a static library framework for communicating with the accessory .", "I m trying to create an app which powers an external-accessory but I am not sure how to do it .", "All i plan on doing right now is have a UIView app that sends power to an external-accessory .", "As far as I know showBluetoothAccessoryPickerWithNameFilter displays only devices with protocol strings added to Supported External Accessory Protocols key of Info.plist .", "The MFi program from Apple gives you access to documentation and support to communicate iOS devices using Bluetooth or the 30 pin dock connector .", "I mean with the homekit healthkit framework whether we can directly communicate with the MFi devices with out the involvement of external-accessory framework .", "Unfortunately I don t see anything in the External Accessory Framework https : developer.apple.com library prerelease ios documentation ExternalAccessory Reference ExternalAccessoryFrameworkReference index.html documentation that allows me to do this .", "The project I am working on involves connecting to a MFI Made for iPhone device using EAF External Accessory Framework and passing data back and forth via a USB cable .", "Actually iOS device should connect to normal wifi router which is further connected to Accessory bridge using ethernet cabel .", "Since my framework works with iOS accessory over lightning connector I can t use XCTest of Xcode .", "I have researched the External Accessory https : developer.apple.com library ios featuredarticles ExternalAccessoryPT Articles MonitoringEvents.html apple ref doc uid TP40009501-SW1 framework and am finding that it is rather vaguely defined .", "I am confused about send and received data from external-accessory asynchronized way .", "I use MFi External Accessory I checked EADemo but seems that send and received data synchronized way .", "I am building an app which will communicate with an external-accessory capable of establishing a wi-fi bridge .", "Supported external-accessory protocols is already added to info.plist .. . .. . Could any one have idea about it", "Here is the code of the connect disconnect methods : .. . .. . Tried connecting the headphones that come with the iPhone and got nothing same for my external-accessory I want to integrate with the app .", "I have all the permission to do MFI i am developing an ios application in swift which will speak with accessory connected to the device iphone ipad .", "Does it require any external hardware support like arduino or raspberry-pi", "At least in your iOS Settings General About you will see the connected accessory information .", "My MFI accessory other company s MFI accessory and protocol names", "MFi accessories that are connected through the external-accessory framework can send an event to wake your app as I described in my previous comment and your app then has a few seconds in the background to process the update but external-accessory background mode does not provide extended continuous execution of code in the background this includes waiting for an NSTimer to fire", "In your accessory during identification process accessory has to tell iOS the Bundle Seed ID the xxxxxxxx portion of xxxxxxxx.com.yourcompany.yourappname .", "Declaring support for specific protocols lets the system know that your app can be launched when that accessory is connected .", "Declaring support for specific protocols lets the system know that your application can be launched when that accessory is connected .", "The next option you could go for comprises of creating a camera that will only connect to the desired device via a handshake of sorts and yes for this method you will need Apples external-accessory framework .", "Specifically : .. . .. . Apple says : App IDs are an integral part of the iPhone Development and Provisioning Process that allows an application to communicate with the Apple Push Notification service and or an external hardware accessory .", "Because the lighting was integrated on the accessory .", "I am receiving connected accessory in EAAccessoryManager sharedAccessoryManager connectedAccessories but unable to get list in accessory picker .", "EAAccessory notifications are for hardware that connects to the 30 pin port .", "from accessory design perspective and from iOS perspective .", "So iOS app will automatically discover that accessory .", "There is no difference between Bluetooth and Dock connection - you cannot communicate with a third party bluetooth accessory that isn t part of the MFI program ." ] }
{ "confidence": [ 108.80254364013672, 95.29731750488281, 88.81787872314453, 85.9212417602539, 85.37383270263672, 83.93888092041016, 82.19320678710938, 81.65569305419922, 80.53179168701172, 80.23768615722656, 80.0113296508789, 78.6685562133789, 78.1956787109375, 77.98790740966797, 75.84326934814453, 74.79601287841797, 74.3917007446289, 72.47469329833984, 72.22612762451172, 72.1962661743164 ], "content": [ "Question : I am new to ios and i have a doubt that whether implementation of homekit healthkit frameworks needs the involvement of the external-accessory framework . I mean with the homekit healthkit framework whether we can directly communicate with the MFi devices with out the involvement of external-accessory framework . ......pls do guide . Thanks in advance. . : .. . Answer : Homekit Framework used to communicate between HAP Homekit Accessory protocol enabled accessory and iOS device . Like Lightbulb Door lock Bridge which further connects to zigbee zwave devices . External Accessory framework used to communicate with external hardware device using dock connector or bluetooth . Like Heartrate monitor Smart Thermometer etc . iOS application can connect to HAP enabled device which has implemented MFi authentication using Homekit framework . There s no need to include use external-accessory framework . However if HAP Accessory bridge Garage door has wifi then iOS app requires to use External accessory framework . For Healthkit to connect with external-accessory Like Heart rate monitor which generally has bluetooth dock connector you may require to use External Accessory framework . Comment : Thanks for replying but I have a doubt on your 3rd point iOS application can connect to HAP enabled device which has implemented MFi authentication using Homekit framework . There s no need to include use external-accessory framework . . In this case by what means of communication will the iOS device will communicate with the HAP device.And why we dont need External Accessory frame work here and why we need it if it has wifi support Comment : For 3rd : iOS app connects to HAP enabled device using Bonjour in network . These accessories doesn t require external frame work as they are connected in intranet Accessory like bridge connected with Ethernet cabel to home s intranet work . So iOS app will automatically discover that accessory . If it is wifi accessory then it requires setup Like every other wifi we are using to access internet once its configured it can connect to that accessory . Comment : If i understood your answer properly Your ans : These accessories doesn t require externalframe work as they are connected in intranet ..Are the ios device and accessory get connected with each other by means of lightning cable wired connection Is this what you are trying to say. . Comment : No not like that . Actually iOS device should connect to normal wifi router which is further connected to Accessory bridge using ethernet cabel . So iOS Application can able to connect to accessory in intranet mode . Comment : So the accessories which doesnt have a inbuit wifi chip in it non-wifi accessory ....can nly be connected through ethernet....And these devices can be contacted by ios devices without the help of external-accessory framework am i rite samir", "Question : I am looking for some good resources to learn the External Accessory framework specially the Bluetooth accessory interfacing . I know there is a book by Ken Maskrey http : www.apress.com 9781430229315 for learning the External Accessory framework but this book does not cover the bluetooth communication . Some blog posts with some sample codes will be greatly appreciated .. . .. . Thanks Much .. . Answer : Are you an approved Made for iPhone iPod program participant If you re not you ll find it very difficult to get much information . There is no difference between Bluetooth and Dock connection - you cannot communicate with a third party bluetooth accessory that isn t part of the MFI program . See this question for more details : .. . .. . What are the protocols supported in Iphone s External Accessory Framework http : stackoverflow.com questions 2083453 what-are-the-protocols-supported-in-iphones-external-accessory-framework Comment : Hello lxt. . Actually I am integrating Blue Bamboo s Card reader in my app . And the reader I am using only support bluetooth are you sure that there is no difference between Dock connection and Bluetooth connection Comment : I see that card reader is part of the MFI program - there is no difference from the external-accessory framework s perspective between dock and bluetooth connections . However you must pair with the bluetooth device first via the settings menu . It will then assuming it s connected and within range become available for use using the External Accessory Framework . It is up to the hardware manufacturer as to how exactly you can communicate with it and which protocols are supported . Comment : Thanks Man I am reading the book by Ken Maskrey because there is no diff . in the Doc and Bluetooth connections .", "Question : I was wondering if there is a way to use IPhone as an HID device with some other device like PS3 . I checked out the Bluetooth specification and IOS Devices do support HID Profile . So I thought it would be easy to pair my iPhone using passkey mechanism and should be able to start using my iPhone as keyboard or mouse without much hassle . But I found very soon that this assumption is naive and I need to develop custom solution . I was initially thinking about using GameKit framework but I think it only works between two compatible IOS Devices . If I want to extend this capability then I have to use iPhone External Accessory API .In my analysis I also found that iPhone will only communicate and pair with devices that are licensed by Apple . Made for iPhone iPod program . Does it mean that if I want to use iPhone with another device I need to get that device approved by Apple . Which will not surprise me one bit . Also if someone could point me to more detailed documentation on this that will also be helpful . What is an MFI developer board I do not want a solution that needs me to jailbreak an iPhone . or any solution that will disqualify my app by Apple . So to summarize : .. . .. . 1- Please validate my findings correct them if they are wrong 2a- How does External Accessory API Work b- Can I use this to connect to third party accessories or is this only for accessory developers . 3- Or is there a better solution without using External Accessory API Please provide supportive documentation or link if you can . Thank You . Comment : The MFi program from Apple gives you access to documentation and support to communicate iOS devices using Bluetooth or the 30 pin dock connector . For the connector check Building iPhone OS Accessories Devices from Apress . For Bluetooth I don t know if every profile supported by the device is also supported by the API probably not . I am not enrolled in MFi myself . .. . Answer : You are unlikely to get on the External accessory program from apple unless you are a big company you can try but I have read this a number of places . iPhones use a proprietary Bluetooth interface that and hardware must also implement this interface so not much chance of getting it to connect to any other hardware directly . Most apps like this Remote Mouse for example connect to your wifi network and have another application installed on your computer . The iphone can then talk to this application over the wi-fi network but not bluetooth . I would suggest that the only way I can see this would be possible to to create the server app that you install on a computer on the wi-fi network that then in turn controls the 3rd party device if there is an API that you can use from the desktop app to control the 3rd party device . This is just what I have found when I researched about this for making an app for iPhone to control a bluetooth watch . I had to jailbreak in the end to replace the bluetooth stack on the iPhone with one that could connect to any hardware device . Not limited by apple .", "Question : null .. . Answer : I am developing an iOS application which using external-accessory framework to communicate with hardware device . Problem : .. . .. . Above method always return empty list . I have seen a lot links and questions but didn t find any solution . Supported external-accessory protocols is already added to info.plist .. . .. . Could any one have idea about it It would be appreciate . Comment : If you connect to it manually in Settings.app and then EAAccessoryManager sharedAccessoryManager connectedAccessories is still empty Comment : I am receiving connected accessory in EAAccessoryManager sharedAccessoryManager connectedAccessories but unable to get list in accessory picker .", "Question : I had asked this question earlier but was closed for unclear or insufficient details . Hopefully I have explained it better . Here it goes . I am building an iOS application that communicates to the external-accessory using a proprietary protocol over iAP . I know that by adding a unique protocol name in the info.plist file the application can be made to launch automatically when iOS device is connected to the external-accessory I am aware that support is needed from the external-accessory device too . Applications that are able to communicate with an external-accessory should declare the protocols they support in their Info.plist file . Declaring support for specific protocols lets the system know that your application can be launched when that accessory is connected . If no application supports the connected accessory the system may choose to launch the App Store and point out applications that do . .. . .. . In my application I wish to give the user a graphical interface to enable or disable automatically launching the application . Behind the scenes this would require setting the protocol name to a pre-defined value to enable it or clearing it to disable it . I would appreciate if someone can give me information on how to modify the protocol id programatically . Comment : The Info.plist is read-only because its in the application bundle .. . Answer : To load app automatically when Supported external-accessory is connected we need to put two things in the Info.plist : 1 . Supported external-accessory protocols Item 0 yourCompanyProtocol 2 . Application does not run in background YES Comment : No he wants to enable or disable auto-launch at the user s choice .", "Question : null .. . Answer : I am doing the preliminary research for an app that has already been implemented for Android . The app needs to be able to perform some calculations at plug-in and then at the calculated time intervals send messages to the USB device . These intervals are likely to span hours . In Android the application utilizes the AlarmManager API in order to run the communication code at those intervals . However as iOS does not have an equivalent API I am wondering if this is possible . I have researched the External Accessory https : developer.apple.com library ios featuredarticles ExternalAccessoryPT Articles MonitoringEvents.html apple ref doc uid TP40009501-SW1 framework and am finding that it is rather vaguely defined . I have looked through SO and found a few relevant answers here http : stackoverflow.com questions 10152056 ios-external-accessory-disconnects-when-application-goes-to-background and here http : stackoverflow.com questions 17785325 pedometer-in-the-background 17786208 17786208 however they seem to say that the USB device must initiate communication and the EASession cannot have NSTimers running in the limited background state . Is it possible to set a timer for hours away that will trigger some code to be ran which will in-turn trigger a message to be sent to the External Accessory if the application includes external-accessory as a Background Mode Or does the application only remain in background mode as long as it is receiving messages from the connected accessory Comment : check this stackoverflow.com questions 25406254 http : stackoverflow.com questions 25406254 ios-nstimer-run-in-background-for-check-alarm-time-is-equal-to-current-time-and Comment : There is no way to schedule code to execute at a specific time on iOS when your app is in the background . Comment : @Paulw11 Regardless of if that background mode is extended due to the external-accessory Comment : There are two types of background mode in iOS - Your app can be in the background and waiting for an event or in the background executing code in response to an event . An app can stay in the background waiting for an event for a long time but it can be eventually removed by iOS if memory is needed or the user can kill the task . When an event such as an update to device location or a push-notification triggers execution in the background you only have a few seconds to execute to handle that event . Comment : MFi accessories that are connected through the external-accessory framework can send an event to wake your app as I described in my previous comment and your app then has a few seconds in the background to process the update but external-accessory background mode does not provide extended continuous execution of code in the background this includes waiting for an NSTimer to fire", "Question : null .. . Answer : I have Lexar microSD Reader with Lightning Connector . How to read the data from the sd-card . I am using external-accessory framework and successfully created the session and accessory is connected with iPhone but not able to read and write the data from sd-card .", "Question : Anyone knows if external-accessory can launch terminated apps in iOS The documentation from Apple says that Declaring support for specific protocols lets the system know that your app can be launched when that accessory is connected . So if my app register a protocol X and I connect my iPhone to a bluetooth accessory that has that protocol X my app is launched in background even if is terminated like CoreBluetooth And I can send commands to that accessory Thanks .. . Answer : I think it s clear from the External Accessory Programming Topics https : developer.apple.com library prerelease ios featuredarticles ExternalAccessoryPT Introduction Introduction.html apple ref doc uid TP40009502 which you quoted copied below that the app can be launched meaning the app didn t need to be already running in the fore or background . However launched to me does not imply launched in the background such as is done with the CoreBluetooth background modes but rather it means launched normally into the foreground . Apps that are able to communicate with an external-accessory must declare the protocols they support in their Info.plist file . Declaring support for specific protocols lets the system know that your app can be launched when that accessory is connected . If no app supports the connected accessory the system may choose to launch the App Store and point out apps that do .", "Question : I am writing an iOS-based program that interacts with a Bluetooth device via the External Accessory Framework . I would like to determine ahead of time if Bluetooth is even enabled before attempting to connect . Unfortunately I don t see anything in the External Accessory Framework https : developer.apple.com library prerelease ios documentation ExternalAccessory Reference ExternalAccessoryFrameworkReference index.html documentation that allows me to do this . After checking the docs for the EAAccessoryManager 1 the closest I can find is to check the connectedAccessories 1 list to see if any devices are currently connected . However this doesn t directly indicate the Bluetooth adapter s status . There are plenty of examples on SO pertaining to Core Bluetooth and Bluetooth LE . I m specifically looking for a solution related to the External Accessory Framework . .. . Answer : This is not possible with the ExternalAccessory framework . You should use CoreBluetooth which can give you the information you need on devices that have BLE hardware i.e . everything released after 2011 . The fact that you are using ExternalAccessory for communication with your device does not prevent you from also using CoreBluetooth just for the purpose of knowing whether Bluetooth is turned on . For older devices there is no way to get this info with public APIs however if you are not intending to publish your app on the App Store you can use the private BluetoothManager framework . To get the info with CoreBluetooth you will need to instanciate a CBCentralManager instance for example like this : .. . .. . and then implement the following delegate method to get the relevant info :", "Question : I am trying to develop an iPhone app that integrates properly with a Made for iPhone accessory . There is conflicting documentation as to whether applications with wildcard Bundle Identifiers will work properly . I need to know whether .. . .. . 1 . An app with a wildcard identifier will show up in the app-store when the accessory is connected and the app is not installed .. . 2 . That the app will launch when the accessory is connected .. . .. . The manufacturer is asking for our Bundle Seed ID and Bundle Identifier which they tell us should be a reverse-dns style string but it is in fact a . .. . .. . The conflicting information.. . .. . .. . From Apple s provisioning portal : .. . .. . An App ID is the combination of a unique ten character string called the Bundle Seed ID and a traditional CF Bundle ID or Bundle Identifier . The Bundle Seed ID portion of your App ID can be utilized to share keychain access between multiple applications you build with a single App ID . In addition it can be incorporated into any external hardware accessories you wish to pair your iOS application with . Registration of your App ID is required to utilize the Apple Push Notification service APNs and to register an application to incorporate In App Purchases . .. . The Bundle Identifier portion of an App ID can be substituted with a wild-card character asterisk so that a single App ID may be used to build and install multiple applications . If the wild-card character is not used the Bundle Identifier portion of your App ID must be input as your CF Bundle ID in Xcode to allow the application to install on your device . The Bundle Seed ID portion of your App ID does not need to be input into Xcode . Wild-card App IDs cannot be used with the Apple Push Notification service or for In App Purchase . From the App ID portion of gumbypp http : iphone.gumbypp.com provisioning.html . Specifically : .. . .. . Apple says : App IDs are an integral part of the iPhone Development and Provisioning Process that allows an application to communicate with the Apple Push Notification service and or an external hardware accessory . For every app that uses APNS In App Purchase or external hardware accessories you will need a specific App ID . All other apps can use a Wild-card App ID . I searched for that quote in Google but could not find it . Comment : did you find a more definite answer to this .. . Answer : In your accessory during identification process accessory has to tell iOS the Bundle Seed ID the xxxxxxxx portion of xxxxxxxx.com.yourcompany.yourappname . iOS will use this Bundle Seed ID to search for an app that is responsible for communicating with this accessory . If your app has a wildcard identifier it will never be chosen . And a dialog will be shown asking the user whether it should proceed to App Store to search for the required app . Comment : Thanks for this I can t find any documentation where this is explained but it appears to be true . Do you maybe have a link", "Question : I am looking for some good resources to learn the External Accessory framework specially the Bluetooth accessory interfacing . I know there is a book by Ken Maskrey http : www.apress.com 9781430229315 for learning the External Accessory framework but this book does not cover the bluetooth communication . Some blog posts with some sample codes will be greatly appreciated .. . .. . Thanks Much .. . Answer : If you know the correct protocolString for the Blue Bamboo s Card reader and register to observe EAAccessoryDidConnectNotification your app should have received the notification if the Card reader has paired with iPhone and passed the identification process . At least in your iOS Settings General About you will see the connected accessory information .", "Question : I have a requirement to control USB CAM from any iOS device by sending command like take picture zoom in zoom out . Also the live video should be stream on iOS device so I can see the camera view on my iOS device s screen and perform required action . Can I achieve this by apple s external-accessory framework or by registration for apple s MFI program Does it require any external hardware support like arduino or raspberry-pi Does USB CAM companies provide any SDK for this Thanks in advance . Similar app on app-store but it uses their own hardware https : itunes.apple.com us app camranger-wireless-dslr-camera id552765874 mt 8 .. . Answer : Okay so in short there are a few different ways to achieve what you re trying to do here all and each offering their own pros and cons . So first off you could go 100 hardware end driven and build yourself a camera that simply outputs what it sees to a webserver local to the device . Pop a WebView in your app connect and you re golden . Dowsides : .. . .. . Your camera is now a public device rather than an iOS locked device if that s what you re looking for .. . You will have to most likely be connected to a network unless the camera has it s own DHCP server as well which complicates things slightly further . The next option you could go for comprises of creating a camera that will only connect to the desired device via a handshake of sorts and yes for this method you will need Apples external-accessory framework . In the way of hardware support you re probably not going to do it with an Arduino Raspberry Pi is feasible but then you ll have to accommodate all that Apple standard nightmare rubbish In my opinion I would go with the webserver approach and call so java etc to ensure the device you re connecting to is of the correct type formfactor . If you have a raspberry-pi and picamera you can use this Git my personal experience with it was good i stripped down some of the code to make it work with a quadcopter project . It s here : https : github.com ccrisan motionPie", "Question : I ve been trying to get this to work for a while now . I ve done everything they say in the documentation and still got nothing . This is the code in my app delegate that registers for local notifications : .. . .. . The above is called from applicationDidFinishLaunching . Here is the code of the connect disconnect methods : .. . .. . Tried connecting the headphones that come with the iPhone and got nothing same for my external-accessory I want to integrate with the app . Please help Thanks Shaul . Comment : Well after doing some more reading I see that the headphones jack isn t supported in the external-accessory framework . Is there any other framework I can use Please anyone .. . Answer : You should use AudioSessionPropertyListener for this . EAAccessory notifications are for hardware that connects to the 30 pin port . Add this listener in viewDidLoad and remove it in ViewDidUnLoad .. . .. . Add the following methods in the view controller . Note I got this code long ago from somewhere and it worked for me . Cannot attribute the source now as I don t know where I got it from . Comment : Tried to manage with this C code but it s been years since I touched C . Saw there s an alternative called AVAudioSession in Objective-C . Do you think I can do the same with this developer.apple.com library ios documentation AVFoundation http : developer.apple.com library ios documentation AVFoundation Reference AVAudioSession ClassReference Reference Reference.html apple ref doc uid TP40008240 Comment : Ok I managed to get this code you posted to work but it works only when the headset isn t connected to the device before the app starts . Any ideas why is that Comment : Call isHeadsetPluggedIn on viewDidLoad as well . The above code calls it only when audio route change-notification is received . Comment : I simply missed initialization of the audio session . That was the real problem . It needs to come before anything else related to audio sessions . After I added that everything started working .", "Question : null .. . Answer : I have implemented a static library which connects to an external-accessory . The library uses External Accessory Framework for the purpose and uses libXML for xml data-transfer . The sdk works fine below iOS 9 versions . If I use iOS9 and external-accessory with iAP2 implemented it again works fine . But applications integrated with static library running on iOS9 fails to connect to an external-accessory on iAP1 iOS System do not sends the XML after initial hand shaking . iOS8 Connects Connects .. . .. . iOS9 Do not Connect Connects .. . .. . My query is what is that changed in iOS9 that makes the sdk incompatible with iAP1 external accessories .", "Question : I need to do an app which will be able to tell if I am currently connected to a classic Bluetooth device or not actually it will be a Bluetooth car device . My first step is to tell what are the current connected classic Bluetooth devices . I cannot use CoreBluetooth because it s only for LE . I try to use the External Accessory framework . Here is the code a button starts the method : .. . .. . I have tried when the iPhone was connected to a Bluetooth keyboard and also with a Bluetooth headset . In both cases the console displays that the number is 0 . How can I display the correct number Comment : It seems that Bluetooth devices like normal Keyboard and normal Headset are not listed in EAAcessoryManager . Comment : Yes I think it s because the device has to be MFI which may not not be the case for normal bluetooth devices . The solution I found was to use the AVAudioSession sharedInstance availableInputs to get the bluetooth input however with this solution I can not receive notifications while in the background I would have to play music to be allowed to receive the notification . .. . Answer : From apple documentation : .. . .. . Applications that support external accessories must be sure to configure their Info.plist file correctly . Specifically you must include the UISupportedExternalAccessoryProtocols key to declare the specific hardware protocols your application supports . For more information about this framework see External Accessory Programming Topics . here https : developer.apple.com library prerelease ios documentation ExternalAccessory Reference ExternalAccessoryFrameworkReference index.html .. . .. . You need to add this key in your Info.plist file with the protocol of your MFi device . Regards", "Question : How to communicate with MFI Accessory communicate via USB Here s what I ve got . 1 . My MFI accessory other company s MFI accessory and protocol names enter image description here http : i.stack.imgur.com RISrU.png .. . .. . 2 . EADemo An Apple official Accessory Demo .. . .. . Here s what I ve done . 1 . add protocol name to Supported external-accessory protocols in EADemo-Info.plist of the EADemo . 2 . Run EADemo with other accessory send data text of receivedBytesLabel keep changing . When I run EADemo with my accessory click send data nothing changes in UI . My colleague a hardware developer says I should set interface like changing a communicate tunnel after connecting to accessory so that I can communicate with accessory . But I look up EASession and ExternalAccessory document I can t find some method that would allow me to change interface . I don t know if it s my problem not setting interface or it s a problem of the accessory How can my App communicate with a MFI accessory Comment : Do you connect your device to Lightning directly or using Lightning to USB cable Comment : Lighting I think . Because the lighting was integrated on the accessory . Comment : So you have Lightning connector on your accessory and why you say about USB .. . Answer : As nobody has experienced this situation . I ll explain how to communicate with MFI accessory in normal way and what leads to my situation .. . .. . Usually If you wanna use MFI device you just need to do the following steps : .. . .. . 1 . Add protocols supported by MFI to Info.plist Supported external-accessory protocols . 2 . Connect your MFI accessory to iOS device . 3 . That s it . You can see data change status on screen . Note : Those procedure are base on Apple official project EADemo you can download from the official site . Here s what I ve been experienced : .. . .. . The MFI accessory support 2 protocols one is for connection event the other one is data exchange like my colleague said before there should be 2 interface . But the manufacture didn t give the specific document . So when I connect one protocol of course there s no data exchanging . So I connect the first protocol and step back connect to the second one . It works there s data exchange status on screen . Comment : You created two EASession objects for one accessory Comment : Hi @ronan. . I am in the same situation . I need to access my MFI accessory via USB in my iOS application . Currently i have used EADemo and i can fully access my MFI accessory . Can you help me with this Comment : Ok . but I didn t get what you re saying . As you ve said that you had already get access to the accessory .", "Question : I have an iOS app that connects to a device using External Accessory Framework . When I first start the app the accessoryDidConnect event won t fire . I have to disconnect and reconnect the USB cable connected to the device in order for the event to fire . Any idea why this is happening I can t debug since the phone has to be connected to the device via a USB cable . Thanks . .. . Answer : Have you called the registerForLocalNotifications method Your controllers won t observe the notification values without calling this method to indicate that you re actively wanting to observe the notifications . Swift .. . .. . Objective-C", "Question : We are developing an MFi external-accessory on which we can launch iOS apps from iPhone using External Accessory Protocol.We are using Ford Smartdevicelink protocol to register the apps . We are using USB as the medium of communication between accessory and iPhone . Currently we are able to launch one app on accessory . We would like to launch multiple apps simultaneously . But we are struck here . Please provide some inputs as to how we can accomplish this . A .. . .. . The problem we are facing is if one app is already launched in accessory and iPhone if we launch another app in iPhone while previous app is in background accessory receives StopExternalAccessoryProtocolSession for background app . Hence the background app becomes non functional and hence only one app is functional at a time . For the new app launched we receive StartExternalAccessoryProtocolSession and it becomes functional . Also we are using one protocol identifier for all the apps . Should we use different protocols for all the apps for multiple app support or If we can achieve this using single protocol identifier Please provide inputs on how can we achieve this . .. . Answer : The external-accessory has a data flow that can only be read once . For a similar problem i implemented a socket server that could send data read from accessory via tcp or udp so I simply had a main app that spoke with external-accessory and acted sa a proxy for other apps the app I m talking about is NMEA Gps and lets other apps connect to an external Gps from dual electronics Comment : The method you mentioned has been done for android . But iOS we are not able to do . Did you implement the proxy app for iOS or android Comment : iOS the app is this : itunes.apple.com it app nmea-gps id590868529 mt 8 https : itunes.apple.com it app nmea-gps id590868529 mt 8", "Question : We are developing an MFi external-accessory on which we can launch iOS apps from iPhone using External Accessory Protocol.We are using Ford Smartdevicelink protocol to register the apps . We are using USB as the medium of communication between accessory and iPhone . Currently we are able to launch one app on accessory . We would like to launch multiple apps simultaneously . But we are struck here . Please provide some inputs as to how we can accomplish this . A .. . .. . The problem we are facing is if one app is already launched in accessory and iPhone if we launch another app in iPhone while previous app is in background accessory receives StopExternalAccessoryProtocolSession for background app . Hence the background app becomes non functional and hence only one app is functional at a time . For the new app launched we receive StartExternalAccessoryProtocolSession and it becomes functional . Also we are using one protocol identifier for all the apps . Should we use different protocols for all the apps for multiple app support or If we can achieve this using single protocol identifier Please provide inputs on how can we achieve this . .. . Answer : I m a maintainer on SDL-iOS . For SDL the way we ve gotten around it is by enabling up to 30 protocol strings to be used . The app will look for the com.smartdevicelink.prot0 stream and connect . It will receive a single byte of data 0x01 - 0x1E from the accessory of which data protocol to connect to . This is a list of the SDL Protocol Strings . https : github.com smartdevicelink sdl ios blob master SmartDeviceLink-iOS SmartDeviceLink Example Info.plist L39-L69 .. . .. . EDITED to fix a mistaken statement . Comment : On the app side we are enabling all the protocols you mentioned above . What needs to be done on accessory side I am enabling all the protocols on accessory side too but still not able to launch multiple apps . Comment : Take a look at the sdl ios project s SDLIAPTransport class . An app will try to connect to the control protocol com.smartdevicelink.prot0 first . It needs to receive a single byte of data telling it which data protocol to switch to com.smartdevicelink.prot1 - 30 . If you need more help there is a slack linked from the github repositories .", "Question : null .. . Answer : I am building an app which will communicate with an external-accessory capable of establishing a wi-fi bridge . I am not able to defer the situation that how do I establish connection with this external-accessory and then the device should be shown connected in my app . After connection there are certain actions I need to perform on the device . So a two-way communication is also a requirement . How do I initiate a connection and then communicate over it . Is any Apple framework available for it . As I am not able to find anything . If possible please provide a sample code on how to achieve this feat . Thanks in advance ." ] }
[ "yes-answer-long", "yes-answer-short" ]
bluetooth
UNK_RELATION
ng-style@html@69
ng-style -- the ngstyle directive allows you to set css style on an @placeholder element conditionally .
{ "confidence": [ 96.95799255371094, 51.27625274658203, 50.549293518066406, 49.78535842895508, 47.11092758178711, 45.44176483154297, 45.06259536743164, 44.840370178222656, 44.74207305908203, 44.71891403198242, 43.010990142822266, 42.09562301635742, 41.87543487548828, 40.581764221191406, 40.508628845214844, 39.942047119140625, 39.062957763671875, 39.062957763671875, 39.062957763671875, 38.861419677734375, 38.861419677734375, 38.819068908691406, 38.74289321899414, 38.571800231933594, 38.495792388916016, 38.35588836669922, 38.20216751098633, 38.20216751098633, 38.09880828857422, 38.02134704589844, 37.80200958251953, 37.37340545654297, 37.37340545654297, 37.35121154785156, 37.25382614135742, 37.19740295410156, 37.12141418457031, 37.12141418457031, 37.12141418457031, 37.12141418457031, 37.104820251464844, 36.91976547241211, 36.86806869506836, 36.3589973449707, 36.30439758300781, 36.20145034790039, 35.927734375, 35.916866302490234, 35.898231506347656, 35.7261962890625, 35.69535827636719, 35.69535827636719, 35.39299774169922, 35.17082595825195, 34.9705924987793, 34.49148178100586, 34.49148178100586, 34.49148178100586, 34.11859893798828, 34.005210876464844, 33.98619079589844, 33.98619079589844, 33.837886810302734, 33.8258056640625, 33.14167404174805, 33.06622314453125, 33.06622314453125, 32.8673210144043, 32.68281936645508, 32.63951110839844, 32.514102935791016, 32.493614196777344, 32.361656188964844, 32.361656188964844, 32.361656188964844, 32.211055755615234, 31.715618133544922, 31.62099838256836, 31.596778869628906, 31.35625648498535, 31.35625648498535, 31.35625648498535, 31.21420669555664, 30.969816207885742, 30.948978424072266, 30.948978424072266, 30.93560028076172, 30.876384735107422, 30.540973663330078, 30.540973663330078, 30.540973663330078, 30.217321395874023, 30.213621139526367, 30.030668258666992, 30.011619567871094, 29.892099380493164, 29.82134246826172, 29.794836044311523, 29.756765365600586 ], "content": [ "ngStyle https : docs.angularjs.org api ng directive ngStyle directive allows you to set CSS style on an HTML element conditionally .", "docs.angularjs.org api ng directive ngStyle https : docs.angularjs.org api ng directive ngStyle", "Here is the ng-style documentation : https : docs.angularjs.org api ng directive ngStyle .. . .. . I would prefer using ng-class example code : .. . .. . css : .. . .. . HTML : .. . .. . But if you insist on using ng-style :", "Directly from ngStyle docs https : docs.angularjs.org api ng directive ngStyle : .. . .. . Expression which evals to an object whose keys are CSS style names and values are corresponding values for those CSS keys .", "I would like to keep the ng-style syntax and not bind the ng-style to an entire object not ng-style css .", "You can use ng-style https : docs.angularjs.org api ng directive ngStyle for changin background property or ng-class https : docs.angularjs.org api ng directive ngClass for class manipulation .", "According to the documentation https : docs.angularjs.org api ng directive ngStyle your expression needs to be an object : .. . .. . Expression which evals to an object whose keys are CSS style names and values are corresponding values for those CSS keys .", "The style is set with ng-style on the DOM .", "Docs https : docs.angularjs.org api ng directive ngStyle .", "I m using the ngStyle directive in AngularJs to change the Background Image of an element and I ve noticed that the style is not applied when the URL of the image contains brackets .", "please try ng-style into style", "Is it possible to change style of pseudo elements using style or ngStyle in angular2", "EDIT .. . .. . The docs https : docs.angularjs.org api ng directive ngStyle specify that you need to wrap your keys in quotation marks so they aren t invalid JSON object keys : .. . .. . .. . .. . Old Answer not using ng-style .. . .. . While I never used ng-style https : docs.angularjs.org api ng directive ngStyle it doesn t seem to take objects .", "Notice that I m manipulating ng-style to set those css properties moving the element to the left and centering on the page .", "The syntax of ng-style is not quite that .", "In that movie-info.html template I have this .. . .. . Which results in .. . .. . So it creates a ng-style and a normale style attribute for the element .", "ng-style does not support important .", "Try using ng-style green.image", "In second ng-style is not that to be a question mark", "So .. . .. . Use ng-style tags instead of style someCss .", "Any ideas why the ng-style gets updated but the other style does not", "@crmpicco check the docs https : docs.angularjs.org api ng directive ngStyle or ask a question otherwise I can t help", "I am trying to set the div width dynamically using ng-style but it is not applying the style .", "I m using ng-style to change the color of HTML element dynamically .", "NOTE According to this question http : stackoverflow.com questions 22046704 can-i-use-the-important-css-keyword-with-angularjs-ng-style-directive and this GitHub issue https : github.com angular angular.js issues 5379 the important keyword is not supported within the ng-style directive .", "ng-style should not contain interpolation directive you could directly access scope variable there .", "There is not need to use inside ng-style use + for string-concatenation while concatenating scope variable inside ng-style expression .", "div ng-style background-color : data.backgroundCol div should be div ng-style background-color : data.backgroundCol div", "The issue is the same solvable with ng-style or ng-attr-style : .. . .. . ng-style : .. . .. . ng-attr-", "You need to use ng-style :", "You can t set style of pseudo-element with javascript .", "why not use ng-style", "Use ng-style", "Not sure if the directive has been created to solve this issue but could just use ng-attr-style index 1", "So alternate is to use ng-class instead of ng-style it will solve the problem .", "I have an object of styles and I need to set another css style only for the first element .", "I used the following : ng-style hasScroll 0", "ng-style width : iconStyle.iconWidth does not work for me .", "I don t think that how ng-style works .", "Am I misunderstanding how ng-style works", "I ve tried multiple solutions even trying to add the same exact ng-style from the li element and it just doesn t get processed and no style is added .", "However if your : : after is defined in a stylesheet you can use ng-class https : docs.angularjs.org api ng directive ngClass to dynamically add that style .", "You can see example here https : docs.angularjs.org api ng directive ngStyle and here http : www.w3schools.com angular ng ng-style.asp .", "you can add style in your body element", "I want to have more properties in ng-style but it won t work .", "If you use ng-style here it would also work .", "This should happen via ng-style .", "this way you can manger your ng-style", "after executing this on my page I get the scroller and the ng-style inside the li elements gets displayed correctly while the ng-style for the ul doesn t .", "or just use ng-style and modify the style directly and not the class .", "@toddmo no never use interpolation parenthesis in ng-style", "All ng-style does is add inline styles .", "I want to combine 2 styles in my ng-style one of them is conditional style .", "On a generic note you can use a combination of ng-if and ng-style incorporate conditional changes with change in background-image .", "you can use the ng-if - new in version 1.1.5 for manipulating CSS styling conditionally .", "IE11 it does not show anything if I do ng-style green.image", "It seems I am unable to apply ng-style to the img tag .", "I think this should work : ng-style getStyle data.objectStyle", "I have a problem using ng-style with ng-repeat .", "You can use ng-class to set dynamically css classes .. . .. . If you don t want to create extra classes you can use ng-style : .. . .. . Then in your controller you have to create the getItemStyle function :", "In controller we have two ng-style objects .", "Simply do string-concatenation inside ng-style .", "You already have a scope on that element created by the ng-controller directive .", "Why not move the style related code into your directive", "The problem is that when I fire the updateSelectedMovie movie the ng-style attribute gets updated with a new url but the style attribut does not get changed .", "im familiar with ng-class but how would you then define the style", "I think the problem is that you cannot bind ng-style like that .", "This question already has an answer here : .. . .. . AngularJS - ng-style does not update css background property questions 23324545 angularjs-ng-style-does-not-update-css-background-property 4 answers .. . .. . My angular website gets data from a Web API back end and initially a generic background is shown .", "The code I ve excluded has not been changed : .. . .. . CSS : .. . .. . In your HTML simply remove the ng-style .", "You shouldn t be really using interpolation directive in ng-click ng-style directive also while generating background url you should use string-concatenation .", "First I m getting the height of the navbar in my controller like this : .. . .. . Then I set the style of an empty div using ng-style to make sure the space behind the navbar is used : .. . .. . But this is not working .", "Since some CSS style names are not valid keys for an object they must be quoted .", "I guess you can do it like this : .. . .. . ng-style width : hasScroll 0", "As Alon says you are incorrectly assuming that ng-style will evaluate randomWidth only once .", "ng-style waits for an object-literal so you need to adjust your code to", "Simplified JS : .. . .. . HTML : .. . .. . Problem : .. . .. . The ng-style directive is not calling getBoxBackgroundColor function when a new item is added .", "But after login even though ng-style now shows the correct background-image url the style attribute is still pointing to the default url .", "I would achieve this using ng-style attribute inside an ng-repeat attribute and setting the ng-style value calling a JavaScript function defined inside the HomeController .", "source https : developer.mozilla.org en-US docs Web CSS Pseudo-elements All ng-style does is add inline styles .", "This means that I m not able to apply both ng-style attributes at the same time .", "We want to use both these in ng-style some thing like this .. . .. . Is not working .", "Is there a way to add animation on the ng-style background-image transition", "Here s a solution where I moved your style generation into the directive .", "The easiest way is to call a function for the style and have the function return the correct style .", "ng-style will reevaluate it whenever there is reason to suspect that the resulting value might have changed .", "ng-style accepts an Angular expression https : docs.angularjs.org guide expression that evaluates to an object .", "ng-style shouldn t contain interpolation in it you could use direct scope variable in it .", "I think the best approach for what you re looking for is the ng-class directive which allows you to set different dynamic classes based on scope variables .", "I have the following inline-styling using Angular s ng-style and css s calc but it didn t work .", ".logo-area ng-style right : calc 50 - + fixedWidth + px + .. . .. . Will solve the problem .", "Here are a few syntaxes I tried : .. . .. . How can I use my controller data in this ng-style", "ngStyle accepts a map : .. . .. . Fiddle http : jsfiddle.net 7veB2", "app.factory style function return style :", "I d simplify a bit--you seem to have two mechanisms doing the same job ng-if and ng-style .", "If you want to use ng-style specifically then try to write within html itself- please don t try to write within any function .", "sorry my bad ng-style needs to be and object where keys are the css property and values the actual value try changing image to an object with background as a property and the rest as the value and check .", "I have the below html and css and I need to set .tooltip : after to item.color the same way i have set for the static-class using ngstyle .", "You can create one method which will create an object by combining the result from multiple methods will set it to ng-style object .", "Try to do : .. . .. . No curly bracket a lot of ng directive don t like it" ] }
{ "confidence": [ 85.4005355834961, 70.7042465209961, 63.53362274169922, 62.415809631347656, 61.47206115722656, 61.407554626464844, 60.31600570678711, 58.93599319458008, 58.67823028564453, 58.52130126953125, 57.07725143432617, 56.15985107421875, 55.74762725830078, 55.35284423828125, 53.09846878051758, 52.94035720825195, 52.25092697143555, 51.865333557128906, 51.413143157958984, 50.319339752197266 ], "content": [ "Question : This should be a simple problem but I can t seem to find a solution . I have the following markup : .. . .. . I need the background-color to be bound to the scope so I tried this : .. . .. . That didn t work so I did some research and found ng-style but that didn t work so I tried taking the dynamic part out and just hard-coding the style in ng-style like this.. . .. . .. . and that doesn t even work . Am I misunderstanding how ng-style works Is there a way of putting data.backgroundCol into a plain style attribute and getting it to insert the value Comment : Checkout this article : ecofic.com about blog http : www.ecofic.com about blog conditionally-apply-a-css-class-with-angularjs .. . Answer : ngStyle https : docs.angularjs.org api ng directive ngStyle directive allows you to set CSS style on an HTML element conditionally . Expression https : docs.angularjs.org guide expression which evals to an object whose keys are CSS style names and values are corresponding values for those CSS keys . Since some CSS style names are not valid keys for an object they must be quoted . ng-style color : myColor .. . .. . Your code will be : .. . .. . If you want to use scope variables : .. . .. . Here http : jsfiddle.net mrajcok eTTZj an example on fiddle that use ngStyle and below the code with the running snippet : .. . .. . .. . angular.module myApp .. . .controller MyCtrl function scope .. . scope.items .. . name : Misko .. . title : Angular creator .. . .. . name : Igor .. . title : Meetup master .. . .. . name : Vojta .. . title : All-around superhero .. . .. . .. . .. . .. . .. . .. . .pending-delete .. . background-color : pink .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs angularjs 1.2.23 angular.min.js script .. . div ng-app myApp ng-controller MyCtrl ng-style color : myColor .. . .. . input type text ng-model myColor placeholder enter a color name .. . .. . div ng-repeat item in items ng-class pending-delete : item.checked .. . name : item.name item.title .. . input type checkbox ng-model item.checked .. . span ng-show item.checked span will be deleted span .. . div .. . p .. . div ng-hide myColor red I will hide if the color is set to red . div .. . div Comment : I want to get the current clicked element s original background-color and not the background-color when I hover . Using following gives me hover background-color not the original color : event.currentTarget.currentStyle.backgroundColor any idea how to get original background-color Comment : div ng-style background-color : data.backgroundCol div should be div ng-style background-color : data.backgroundCol div", "Question : This should be a simple problem but I can t seem to find a solution . I have the following markup : .. . .. . I need the background-color to be bound to the scope so I tried this : .. . .. . That didn t work so I did some research and found ng-style but that didn t work so I tried taking the dynamic part out and just hard-coding the style in ng-style like this.. . .. . .. . and that doesn t even work . Am I misunderstanding how ng-style works Is there a way of putting data.backgroundCol into a plain style attribute and getting it to insert the value Comment : Checkout this article : ecofic.com about blog http : www.ecofic.com about blog conditionally-apply-a-css-class-with-angularjs .. . Answer : Directly from ngStyle docs https : docs.angularjs.org api ng directive ngStyle : .. . .. . Expression which evals to an object whose keys are CSS style names and values are corresponding values for those CSS keys . So you could do this : .. . .. . Hope this helps Comment : Yeah I saw that in the docs but I couldn t see how to translate that to multiple rules now I can see that it s not normal css syntax but object syntax .", "Question : I have 1 div in which i want to conditionally set background-color property of this class.I am using boostrap progress-bar http : www.w3schools.com bootstrap bootstrap progressbars.asp and i want to use below class only because it contains some custom settings for progress-bar . Below is my div : .. . .. . Condition is like below : .. . .. . Can anybody help me with this .. . Answer : You can use ng-style https : docs.angularjs.org api ng directive ngStyle for changin background property or ng-class https : docs.angularjs.org api ng directive ngClass for class manipulation . Do not forget to use object notation like this", "Question : I need for apply multi css rule to html tag in angular form template . getStyle function in controller : .. . .. . taskType object : .. . .. . The getStyle function does not return a style What to do Comment : You haven t included enough code . What does the function return What are the values of taskType.backColor etc Comment : @Ed Hinchliffe taskType backColor : 006 color : 56DA fontSize : 12 font : New Times Roman . Comment : That should work then . Errors in the console .. . Answer : EDIT .. . .. . The docs https : docs.angularjs.org api ng directive ngStyle specify that you need to wrap your keys in quotation marks so they aren t invalid JSON object keys : .. . .. . .. . .. . Old Answer not using ng-style .. . .. . While I never used ng-style https : docs.angularjs.org api ng directive ngStyle it doesn t seem to take objects . Rather it is an equivalent of ng-class but for single styles . Try changing your function to : .. . .. . and the html to use the regular style tag with a bind : Comment : This doesn t work . Do you have a working fiddle Comment : @crmpicco check the docs https : docs.angularjs.org api ng directive ngStyle or ask a question otherwise I can t help Comment : I think this should work : ng-style getStyle data.objectStyle Comment : @crmpicco it should work given the keys are wrapped in quotes Comment : What version of AngularJS are you using I m using 1.0.7 .", "Question : I m trying to change the font-style of an element when a variable is true . In my controller there s a variable which returns it s value . Now I want to change the font-style based on the return-value . This should happen via ng-style . Already searched the internet for it . W3 schools and everything but it doesn t work . Could somebody please give me an example or some useful tutorial or tips to help Thanks in advance . Comment : Rule 1 : Show Your Code .. . Answer : Here is the ng-style documentation : https : docs.angularjs.org api ng directive ngStyle .. . .. . I would prefer using ng-class example code : .. . .. . css : .. . .. . HTML : .. . .. . But if you insist on using ng-style :", "Question : I m using Angularjs in order to display some images in the DOM and apply some style to them dim the background . It seems I am unable to apply ng-style to the img tag . What is the reason to that Fiddle https : jsfiddle.net 4vkqzgs8 1 here . HTML : .. . .. . CSS : Comment : please try ng-style into style Comment : It doesnt work the dim effect is not applied to the image . Comment : why you didnot use ng-class Comment : Why do I have to use ng-class Comment : @undroid Do you want the image to have transparency : 0.5 .. . Answer : I don t think that how ng-style works . You can see example here https : docs.angularjs.org api ng directive ngStyle and here http : www.w3schools.com angular ng ng-style.asp . Try this : .. . .. . In html : .. . .. . In controller : .. . .. . Hope this help .", "Question : I have an object of styles and I need to set another css style only for the first element . I created a directive especially for that but it doesn t work .. . .. . I will appreciate your help Here is the code : .. . .. . Thanks Comment : can you add fiddle Comment : You are having this issue because cssRow is overriding your styling in the directive ngZero . You can use others solutions as susggested btw the argument element is already a jqLite wrapped element so no need to wrap it in jQuery again . .. . Answer : you can use the ng-if - new in version 1.1.5 for manipulating CSS styling conditionally .", "Question : I built a table with ng-repeat showing type specs for a project with a column of swatches : .. . .. . enter image description here http : i.stack.imgur.com nWYsA.png .. . .. . As you can see works great on Mac Safari and Chrome . However on IE 11 Win 8 : .. . .. . enter image description here http : i.stack.imgur.com dfBxM.png .. . .. . The rows of the table are such : .. . .. . It would seem that IE does not like the inline style tag for some reason . Inspecting the code in safari looks as expected . You can see the style tag with the background-color and color : enter image description here http : i.stack.imgur.com T2Kxa.png .. . .. . But inspecting in IE11 it s all messed up . There s only the one color it s white and rgb : enter image description here http : i.stack.imgur.com gArgY.png .. . .. . So why is this working on Mac but not IE I assume something about my syntax but I ve tried a few things and no results so far . Comment : why not use ng-style docs.angularjs.org api ng directive ngStyle https : docs.angularjs.org api ng directive ngStyle .. . Answer : use ng-class instead of class Comment : I m not using classes . I m processing a list of css hex colors.. .", "Question : I want to have more properties in ng-style but it won t work . This is my code line : .. . .. . If I only have the color : titleColor then it works perfectly . Help me to get the font-size in there aswell Comment : You need to wrap font-size in quotes also remove semi columns and use comma . i.e color : titleColor font-size : titleSize What you have is invalid syntax . Look at the console about the error . Comment : Thanks man it works now Comment : docs.angularjs.org api ng directive ngStyle https : docs.angularjs.org api ng directive ngStyle Comment : or camel case fontSize without wrapping in quotes I think .. . Answer : This should work : Comment : Thanks nice work man", "Question : Tag Button already has cursor css assigned . I want to override cursor css according to is active values to disable button . is active may have values 0 or 1 . Following is code for js html please let me know correct method to apply cursor css to button . scope.ngStyleDisabled function status .. . if status 1 .. . return .. . else if status 0 .. . return cursor : not-allowed important pointer-events : none .. . .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs angularjs 1.2.23 angular.min.js script .. . button ng-style ngStyleDisabled item.is active Action Button button .. . Answer : According to the documentation https : docs.angularjs.org api ng directive ngStyle your expression needs to be an object : .. . .. . Expression which evals to an object whose keys are CSS style names and values are corresponding values for those CSS keys . Try returning an object instead of the string using quoutes since the CSS properties might not be valid keys : .. . .. . Also leave out the curly-braces in your template : .. . .. . This JSFiddle http : jsfiddle.net h943wz7m shows how the properties are applied to the button . NOTE According to this question http : stackoverflow.com questions 22046704 can-i-use-the-important-css-keyword-with-angularjs-ng-style-directive and this GitHub issue https : github.com angular angular.js issues 5379 the important keyword is not supported within the ng-style directive . You can find workarounds behind the links . Comment : tried your code which returned result as button ng-style cursor : not-allowed important pointer-events : none Action Button button Comment : Is that not what you wanted Comment : This returned values with double quotes not in single quotes . Comment : If you check the JSFiddle you can see that the properties are applied to the button as you requested . What is the issue", "Question : I m trying to add a dynamic class in Angular template and set a style attributes accordingly . HTML would be -- body class product-id .. . .. . CSS would be -- product-id : color : ccc Where product-id would be a dynamic value . What would be the best method to do this I want to be able to have this be a selector I could use for various element locations within the page which is why ng-style isn t working for me . .. . Answer : I think the best approach for what you re looking for is the ng-class directive which allows you to set different dynamic classes based on scope variables . You can check out the docs for ng-class here https : docs.angularjs.org api ng directive ngClass . Hope that helps you out Comment : im familiar with ng-class but how would you then define the style for ex . product-848483823 would be set to color : ccc or product-0943094 would also be set to the same style . Comment : Hmm . How many different style combinations are there and how would the mapping be defined or where do the style definitions come from You could define a mapping object in your controller and pass that into the ng-class directive attribute possibly if you have a handle on the different styles . Ideally your styling will be located in CSS files though .", "Question : I built a table with ng-repeat showing type specs for a project with a column of swatches : .. . .. . enter image description here http : i.stack.imgur.com nWYsA.png .. . .. . As you can see works great on Mac Safari and Chrome . However on IE 11 Win 8 : .. . .. . enter image description here http : i.stack.imgur.com dfBxM.png .. . .. . The rows of the table are such : .. . .. . It would seem that IE does not like the inline style tag for some reason . Inspecting the code in safari looks as expected . You can see the style tag with the background-color and color : enter image description here http : i.stack.imgur.com T2Kxa.png .. . .. . But inspecting in IE11 it s all messed up . There s only the one color it s white and rgb : enter image description here http : i.stack.imgur.com gArgY.png .. . .. . So why is this working on Mac but not IE I assume something about my syntax but I ve tried a few things and no results so far . Comment : why not use ng-style docs.angularjs.org api ng directive ngStyle https : docs.angularjs.org api ng directive ngStyle .. . Answer : You need to use ng-style : Comment : Amazing . I knew it was something about my syntax . There are so many different ways to do things and formats in Angular Thanks", "Question : I have some content where I use ng-style here is part of the template html : .. . .. . the breddeCSS is defined in the controller here : .. . .. . The template gets the margin style but only when the site is first loaded . If I change the scope.bredde it is only when the page is refreshed that I see the change I would like the page to change dynamically everytime scope.bredde is updated . How can I do this Comment : @ArpitSrivastava breddeCSS is an object not a function . .. . Answer : ngStyle requires an expression itself not the resulf of its evaluation . Docs https : docs.angularjs.org api ng directive ngStyle . http : plnkr.co edit RxTte5njdS8GfTiD73LA p preview", "Question : When i use Angular to dynamic change div s backgroundImage i find there are two ways to set backgrond-image : .. . .. . first : .. . .. . div style background : url example expression div .. . .. . the second : .. . .. . div ng-style backgroundImage : url example expression div .. . .. . But when i change example expression only the first way can dynamically change the backgroundImage . There is a example in Plunker http : plnkr.co edit iss7x1KlNvRemdIUGzZ1 p preview .. . .. . What s wrong with ngStyle .. . Answer : ng-style should not contain interpolation directive you could directly access scope variable there . Also backgroundImage should be background-image .. . .. . Markup .. . .. . Demo Plunkr http : plnkr.co edit iss7x1KlNvRemdIUGzZ1 p preview Comment : Thanks a lot it works Comment : @YuDeng glad to help you..Thanks :", "Question : I have an object of styles and I need to set another css style only for the first element . I created a directive especially for that but it doesn t work .. . .. . I will appreciate your help Here is the code : .. . .. . Thanks Comment : can you add fiddle Comment : You are having this issue because cssRow is overriding your styling in the directive ngZero . You can use others solutions as susggested btw the argument element is already a jqLite wrapped element so no need to wrap it in jQuery again . .. . Answer : You can use index to track the n th element . Not sure if the directive has been created to solve this issue but could just use ng-attr-style index 1 padding-top : 0px .. . .. . Also you should not manipulate HTML or refer to presentation css in Controllers .", "Question : I am trying to set the div width dynamically using ng-style but it is not applying the style . Here is the code : .. . .. . Controller : .. . .. . What am I missing Fiddle link : Fiddle http : jsfiddle.net Rameshramamoorthy 344vF .. . Answer : ngStyle accepts a map : .. . .. . Fiddle http : jsfiddle.net 7veB2", "Question : I have an object of styles and I need to set another css style only for the first element . I created a directive especially for that but it doesn t work .. . .. . I will appreciate your help Here is the code : .. . .. . Thanks Comment : can you add fiddle Comment : You are having this issue because cssRow is overriding your styling in the directive ngZero . You can use others solutions as susggested btw the argument element is already a jqLite wrapped element so no need to wrap it in jQuery again . .. . Answer : You don t need a directive for that . ng-repeat scope exposes an property first in the repeat scope which is true for first element . You can define a class for the first row and use ng-class to apply it .. . .. . ng-class my-first-class : first", "Question : I have a template in which I call a function and I have a directive element .. . .. . The function is inside a directive .. . .. . As you can see I set my MovieRowCtrl as controller for the .container-wrapper . So when the updateSelectedMovie movie function fires it sets the scope.rowActive to true showing the element and it inject the movie-info.html template inside the movie-details element . This works fine . In that movie-info.html template I have this .. . .. . Which results in .. . .. . So it creates a ng-style and a normale style attribute for the element . The problem is that when I fire the updateSelectedMovie movie the ng-style attribute gets updated with a new url but the style attribut does not get changed . Any ideas why the ng-style gets updated but the other style does not .. . Answer : There is not need to use inside ng-style use + for string-concatenation while concatenating scope variable inside ng-style expression . Comment : Ah I see you remove the single quotes around the movie.backdrop . Pfff totally missed that . Thanks Comment : @alucardu do accept and udvote answer if it does helped..Thanks :", "Question : null .. . Answer : I m using the ngStyle directive in AngularJs to change the Background Image of an element and I ve noticed that the style is not applied when the URL of the image contains brackets . .. . .. . Any suggestion Fiddle http : jsfiddle.net HB7LU 19425 Comment : Try jsfiddle.net HB7LU 19426 http : jsfiddle.net HB7LU 19426 was the issue Comment : Omg you re my hero I wish I could upvote this . Thanks", "Question : I am designing a dynamic hr horizonatal rule . In my Style sheet .. . .. . In my template .. . .. . But how do i dynamically change the content in the template when using ng-repeat Comment : why not think of changing array itself Comment : Can you just give an example Comment : Why not just use ng-class and dynamically add and remove the class my-hr EDIT : You can only use pseudo elements in a selector not inline . source https : developer.mozilla.org en-US docs Web CSS Pseudo-elements All ng-style does is add inline styles . .. . Answer : All ng-style does is add inline styles . However you want to add a psuedo element : : after . According to the MDN https : developer.mozilla.org en-US docs Web CSS Pseudo-elements : .. . .. . You can use only one pseudo-element in a selector . It must appear after the simple selectors in the statement . So inferred from that you can t use them inline which sadly means ng-style can t do what your after . However if your : : after is defined in a stylesheet you can use ng-class https : docs.angularjs.org api ng directive ngClass to dynamically add that style . So .. . .. . Most cases that will suffice . However it looks like to want to dynamically set the content of : : after . So for that i can only imagine two options . If you just want to simply add the string value use databinding .. . .. . However if you want extra styling on that string create a small directive as a re-usable widget may be the better option ." ] }
[ "yes-answer-long", "yes-answer-short" ]
html
UNK_RELATION
expressionengine-stash@expressionengine@56
expressionengine-stash -- stash is an extension to the @placeholder template language .
{ "confidence": [ 50.964996337890625, 42.605369567871094, 42.46259689331055, 40.76136779785156, 40.76136779785156, 40.76136779785156, 40.76136779785156, 38.26356506347656, 38.26356506347656, 38.26356506347656, 38.26356506347656, 34.899044036865234, 34.899044036865234, 34.899044036865234, 34.899044036865234, 34.899044036865234, 34.899044036865234, 34.899044036865234, 34.091739654541016, 34.06314468383789, 34.06314468383789, 32.839881896972656, 32.839881896972656, 32.839881896972656, 30.144380569458008, 28.667407989501953, 26.91006851196289, 25.600900650024414, 24.836183547973633, 23.46224594116211, 23.175689697265625, 23.175689697265625, 22.469593048095703, 22.469593048095703, 19.60569190979004, 19.60569190979004, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 18.911401748657227, 14.710979461669922 ], "content": [ "With that said my question is : is there anyway to dynamically use Stash context and ExpressionEngine categories", "I am brand new to Stash .", "When using Stash and the template partials approach http : eeinsider.com articles template-partials-using-stash which I don t use personally the files you mention are all embedded http : expressionengine.com user guide templates embedding.html .", "The outcome of the logic gets stores as stash variables .", "Is there a way to use a boolean variable within stash", "They are totally awesome - just grab the dev branch of Stash .", "I haven t familiarized myself with stash embeds yet .", "http : devot-ee.com add-ons support stash viewthread 7518 25397", "Then I stash the content to be inserted into the wrapper using the exp : stash : set name content-tag .", "This same concept can be accomplished using Stash embeds in the dev branch .", "I don t use any EE embeds anymore in-favor of Stash embeds .", "I was merely attempting to answer your questions about Stash and if it could do it vs . being the best way .", "Maybe you need to wrap your whole append list tag in categories categories rather than running it as a parameter of the stash tag", "I m trying to understand how the use of the stash plugin will affect the URls of my site .", "But when I use stash I will have 2 wrappers one for the homepage and one for the rest of the site .", "The Stash-based approach is simply a different way of doing things within your existing templates - not a replacement for them .", "The stash variables then get called upon by your embedded layout templates to display the content you ve stashed .", "Generally what I d do here is setup multiple Stash gets within the wrapper .", "I m hoping there is a way to use Stash Context with Categories for example like so : .. . .. . I know I can do the following though this would mean that someone would have to edit the template each time a category was added .", "What s the best way DRY to get the comments of the current entry with stash", "But this does not work within stash and isn t there a smarter way than a embeded tempalte", "The problem you are having comes down to the exp : channel : entries loop running multiple iterations which then uses Stash to set an associative-array of values .", "For parts where you might be repeating content like the opening and closing divs of a sidebar you can always drop some snippets inside the stash .", "You can also use exp : stash : not empty docs https : github.com croxton Stash expstashnot empty to wrap around the div or container for your sidebar within the wrapper .", "I did however run into a possible bug with matrix tag pairs inside the categories tag pairs which you can read more about in my two replies here : devot-ee.com add-ons support stash viewthread 4021 25588 http : devot-ee.com add-ons support stash viewthread 4021 25588", "just letting you know about our proposal for an EE specific site here if you already are supporting it you need to link your account so your reputation counts towards it area51.stackexchange.com proposals 46387 expressionengine http : area51.stackexchange.com proposals 46387 expressionengine", "You still use the same template groups and template files as before .", "I usually use one wrapper for every template .", "The traditional way : I have a template group called site .", "To expand on both their answers above and just to be specific to your www.mysite.com index.php site about us request : .. . .. . You d create a template group called site and then you may alternatively have something like this code in the index template .. . .. . The embed calls the .site layout and the interior simply pulls your specific channel : entries data .", "The URl will for a single entry be .. . .. . URL for the About-us-page : .. . .. . Both will reflect the template group template structure and thus be SEO-friendly and give users a hint where they are on the site .", "As you can see it s still using the traditional templategroup template ways of building URLs it s just pulling data differently .", "My second block of code works though each category is hard coded meaning that if a new category is added then I will have to add said new category to the template as well ie .", "The way to think about it is this - with the template partials approach your templates contain mostly if not only the entries logic channel entries loop its parameters what custom-fields are in play for that channel etc .", "So far I used a embed-template to present all comments and the comment-form .", "Also I d say loose the embed if possible for a snippet or Low Variable Template Variables add-ons if one of those are installed .", "Normally I set the context in the get list via a segment though this is on a single page for a jQuery accordion so not go there .", "Again trying to avoid hardcoding the categories one by one for cases when a new category is added by client .", "Not sure it s possible or not .", "Any reason why you need to use context", "I guess I m not clear on how you are trying to use get list to output the data .", "Would something like this achieve what you need to do", "There may be a way to do it with match against though I m not sure .", "The point of context in get list and in append list for that matter is to allow me to loop through entries from certain categories .", "another get list with said category s name in the context-param .", "Which isn t a big deal though I like hands off if at all possible .", "I m re-reading that post .", "That s interesting let me try it .", "Justin Kimbrell of couse was right on about everything he said though it was the link from Trevor which ultimately lead the way to getting this done correctly and why I chose it as the right answer hoping it will help others in the future .", "Once the channel : entries is compete you have an array of this category name variables so it s never actually set like a regular variable .", "So you really have a few options : .. . .. . 1 .", "Use a URI segment since those are parsed early .", "2 .", "Use the exp : stash : set tag to set a snippet type variable which can be parsed later on the page .", "3 .", "Hardcode the values .. . .. . Here is my code which I have tested and can confirm works 100 on my end .", "1 caveat if your entries have multiple categories this will break .", "I believe this will use the first category set within the iteration .", "Note be sure to use the process end parameters to manipulate the parse order otherwise you will end up with a blank screen .", "I will add that there is likely a much better way to tackle your problem .", "The logic of what you are trying to do doesn t really add up .", "Thanks Justin for the effort made on this really appreciate it", "That said it could also be a parsing order issue so you might need exp : stash : parse in there somewhere too .", "Thanks allot Tyssen", "Within the TG site I have the templates articles about us etc .", "Partials will be used for header main content and footer .", "As far as I understand it I ll use the template groups layout for the wrappers and partials for the main content .", "The templating look like .. . .. . Two wrappers build the TG layout Both are hidden since they should nt be called directly .", "Three partials in the TG partials .. . .. . And by the way shouldn t those not also be hidden since they aren t complete HTML-pages either .", "This is what confuses me .", "How do I get my nice URLs back", "A URL like .. . .. . will not match the TG T concept anymore .", "Any help", "Exactly as Derek says .", "So your URL structure remains the same but you have considerably less duplication of effort since the more you constrain your templates to logic i.e .", "very little if any formatting display markup the cleaner they are and the easier it then is to manage your templates .", "First off a caveat .. .", "I ve heard a lot about it but this is my first time actually playing with it .", "I get the concept but am having a hard time figuring this one thing out .", "I have a main wrapper file and everything within that wrapper stays the same .", "I would like the option however to be able to toggle the sidebar on and off if I need to .", "I wouldn t think I would need a totally separate layout wrapper would I", "e.g .", "2col TRUE or am I thinking about it wrong", "Thanks in advance for your help", "It ll contain an exp : stash : get name content-tag like yours which contains the only variable content within .", "In my individual templates I embed the wrapper at the beginning using a regular EE embed ie .", "embed includes wrapper .", "This seems like what you re doing anyway .", "If I want to conditionally show a sidebar I might just pass a variable into the embed .", "eg .", "embed includes wrapper show sidebar yes .. . .. . In my wrapper I would do this :", "I like that solution .", "Never thought of using embed variables in the wrapper embed .", "Genius .", "Thanks Justin .", "If they can perform the same task then that would be an even better solution .", "Cool solution definitely a why didn t I think of that moment there :", "Then in your individual templates you can set both the sidebar and the main content area .", "Where are you using exp : stash : get name entry comments at" ] }
{ "confidence": [ 61.67267608642578, 59.64012145996094, 59.19383239746094, 56.23762512207031, 54.857383728027344, 53.481285095214844, 48.5192985534668, 45.475067138671875, 44.43307113647461 ], "content": [ "Question : I m trying to understand how the use of the stash plugin will affect the URls of my site . The traditional way : I have a template group called site . Within the TG site I have the templates articles about us etc . The URl will for a single entry be .. . .. . URL for the About-us-page : .. . .. . Both will reflect the template group template structure and thus be SEO-friendly and give users a hint where they are on the site . But when I use stash I will have 2 wrappers one for the homepage and one for the rest of the site . Partials will be used for header main content and footer . As far as I understand it I ll use the template groups layout for the wrappers and partials for the main content . The templating look like .. . .. . Two wrappers build the TG layout Both are hidden since they should nt be called directly . Three partials in the TG partials .. . .. . And by the way shouldn t those not also be hidden since they aren t complete HTML-pages either . This is what confuses me . How do I get my nice URLs back A URL like .. . .. . will not match the TG T concept anymore . Any help Comment : just letting you know about our proposal for an EE specific site here if you already are supporting it you need to link your account so your reputation counts towards it area51.stackexchange.com proposals 46387 expressionengine http : area51.stackexchange.com proposals 46387 expressionengine .. . Answer : When using Stash and the template partials approach http : eeinsider.com articles template-partials-using-stash which I don t use personally the files you mention are all embedded http : expressionengine.com user guide templates embedding.html . You still use the same template groups and template files as before . The Stash-based approach is simply a different way of doing things within your existing templates - not a replacement for them .", "Question : I m hoping there is a way to use Stash Context with Categories for example like so : .. . .. . I know I can do the following though this would mean that someone would have to edit the template each time a category was added . With that said my question is : is there anyway to dynamically use Stash context and ExpressionEngine categories Comment : Normally I set the context in the get list via a segment though this is on a single page for a jQuery accordion so not go there . Again trying to avoid hardcoding the categories one by one for cases when a new category is added by client . Not sure it s possible or not . .. . Answer : Maybe you need to wrap your whole append list tag in categories categories rather than running it as a parameter of the stash tag That said it could also be a parsing order issue so you might need exp : stash : parse in there somewhere too . Comment : Thanks allot Tyssen", "Question : I m trying to understand how the use of the stash plugin will affect the URls of my site . The traditional way : I have a template group called site . Within the TG site I have the templates articles about us etc . The URl will for a single entry be .. . .. . URL for the About-us-page : .. . .. . Both will reflect the template group template structure and thus be SEO-friendly and give users a hint where they are on the site . But when I use stash I will have 2 wrappers one for the homepage and one for the rest of the site . Partials will be used for header main content and footer . As far as I understand it I ll use the template groups layout for the wrappers and partials for the main content . The templating look like .. . .. . Two wrappers build the TG layout Both are hidden since they should nt be called directly . Three partials in the TG partials .. . .. . And by the way shouldn t those not also be hidden since they aren t complete HTML-pages either . This is what confuses me . How do I get my nice URLs back A URL like .. . .. . will not match the TG T concept anymore . Any help Comment : just letting you know about our proposal for an EE specific site here if you already are supporting it you need to link your account so your reputation counts towards it area51.stackexchange.com proposals 46387 expressionengine http : area51.stackexchange.com proposals 46387 expressionengine .. . Answer : Exactly as Derek says . The way to think about it is this - with the template partials approach your templates contain mostly if not only the entries logic channel entries loop its parameters what custom-fields are in play for that channel etc . The outcome of the logic gets stores as stash variables . The stash variables then get called upon by your embedded layout templates to display the content you ve stashed . So your URL structure remains the same but you have considerably less duplication of effort since the more you constrain your templates to logic i.e . very little if any formatting display markup the cleaner they are and the easier it then is to manage your templates .", "Question : I m hoping there is a way to use Stash Context with Categories for example like so : .. . .. . I know I can do the following though this would mean that someone would have to edit the template each time a category was added . With that said my question is : is there anyway to dynamically use Stash context and ExpressionEngine categories Comment : Normally I set the context in the get list via a segment though this is on a single page for a jQuery accordion so not go there . Again trying to avoid hardcoding the categories one by one for cases when a new category is added by client . Not sure it s possible or not . .. . Answer : Any reason why you need to use context I guess I m not clear on how you are trying to use get list to output the data . Would something like this achieve what you need to do http : devot-ee.com add-ons support stash viewthread 7518 25397 Comment : There may be a way to do it with match against though I m not sure . The point of context in get list and in append list for that matter is to allow me to loop through entries from certain categories . My second block of code works though each category is hard coded meaning that if a new category is added then I will have to add said new category to the template as well ie . another get list with said category s name in the context-param . Which isn t a big deal though I like hands off if at all possible . Comment : I m re-reading that post . That s interesting let me try it . Comment : Justin Kimbrell of couse was right on about everything he said though it was the link from Trevor which ultimately lead the way to getting this done correctly and why I chose it as the right answer hoping it will help others in the future . I did however run into a possible bug with matrix tag pairs inside the categories tag pairs which you can read more about in my two replies here : devot-ee.com add-ons support stash viewthread 4021 25588 http : devot-ee.com add-ons support stash viewthread 4021 25588", "Question : I m trying to understand how the use of the stash plugin will affect the URls of my site . The traditional way : I have a template group called site . Within the TG site I have the templates articles about us etc . The URl will for a single entry be .. . .. . URL for the About-us-page : .. . .. . Both will reflect the template group template structure and thus be SEO-friendly and give users a hint where they are on the site . But when I use stash I will have 2 wrappers one for the homepage and one for the rest of the site . Partials will be used for header main content and footer . As far as I understand it I ll use the template groups layout for the wrappers and partials for the main content . The templating look like .. . .. . Two wrappers build the TG layout Both are hidden since they should nt be called directly . Three partials in the TG partials .. . .. . And by the way shouldn t those not also be hidden since they aren t complete HTML-pages either . This is what confuses me . How do I get my nice URLs back A URL like .. . .. . will not match the TG T concept anymore . Any help Comment : just letting you know about our proposal for an EE specific site here if you already are supporting it you need to link your account so your reputation counts towards it area51.stackexchange.com proposals 46387 expressionengine http : area51.stackexchange.com proposals 46387 expressionengine .. . Answer : To expand on both their answers above and just to be specific to your www.mysite.com index.php site about us request : .. . .. . You d create a template group called site and then you may alternatively have something like this code in the index template .. . .. . The embed calls the .site layout and the interior simply pulls your specific channel : entries data . As you can see it s still using the traditional templategroup template ways of building URLs it s just pulling data differently .", "Question : I m hoping there is a way to use Stash Context with Categories for example like so : .. . .. . I know I can do the following though this would mean that someone would have to edit the template each time a category was added . With that said my question is : is there anyway to dynamically use Stash context and ExpressionEngine categories Comment : Normally I set the context in the get list via a segment though this is on a single page for a jQuery accordion so not go there . Again trying to avoid hardcoding the categories one by one for cases when a new category is added by client . Not sure it s possible or not . .. . Answer : The problem you are having comes down to the exp : channel : entries loop running multiple iterations which then uses Stash to set an associative-array of values . Once the channel : entries is compete you have an array of this category name variables so it s never actually set like a regular variable . So you really have a few options : .. . .. . 1 . Use a URI segment since those are parsed early . 2 . Use the exp : stash : set tag to set a snippet type variable which can be parsed later on the page . 3 . Hardcode the values .. . .. . Here is my code which I have tested and can confirm works 100 on my end . 1 caveat if your entries have multiple categories this will break . I believe this will use the first category set within the iteration . Note be sure to use the process end parameters to manipulate the parse order otherwise you will end up with a blank screen . I will add that there is likely a much better way to tackle your problem . The logic of what you are trying to do doesn t really add up . I was merely attempting to answer your questions about Stash and if it could do it vs . being the best way . Comment : Thanks Justin for the effort made on this really appreciate it", "Question : First off a caveat .. . I am brand new to Stash . I ve heard a lot about it but this is my first time actually playing with it . I get the concept but am having a hard time figuring this one thing out . I have a main wrapper file and everything within that wrapper stays the same . I would like the option however to be able to toggle the sidebar on and off if I need to . I wouldn t think I would need a totally separate layout wrapper would I Is there a way to use a boolean variable within stash e.g . 2col TRUE or am I thinking about it wrong Thanks in advance for your help .. . Answer : I usually use one wrapper for every template . It ll contain an exp : stash : get name content-tag like yours which contains the only variable content within . In my individual templates I embed the wrapper at the beginning using a regular EE embed ie . embed includes wrapper . Then I stash the content to be inserted into the wrapper using the exp : stash : set name content-tag . This seems like what you re doing anyway . If I want to conditionally show a sidebar I might just pass a variable into the embed . eg . embed includes wrapper show sidebar yes .. . .. . In my wrapper I would do this : Comment : I like that solution . Never thought of using embed variables in the wrapper embed . Genius . Comment : This same concept can be accomplished using Stash embeds in the dev branch . I don t use any EE embeds anymore in-favor of Stash embeds . They are totally awesome - just grab the dev branch of Stash . Comment : Thanks Justin . I haven t familiarized myself with stash embeds yet . If they can perform the same task then that would be an even better solution . Comment : Cool solution definitely a why didn t I think of that moment there :", "Question : First off a caveat .. . I am brand new to Stash . I ve heard a lot about it but this is my first time actually playing with it . I get the concept but am having a hard time figuring this one thing out . I have a main wrapper file and everything within that wrapper stays the same . I would like the option however to be able to toggle the sidebar on and off if I need to . I wouldn t think I would need a totally separate layout wrapper would I Is there a way to use a boolean variable within stash e.g . 2col TRUE or am I thinking about it wrong Thanks in advance for your help .. . Answer : Generally what I d do here is setup multiple Stash gets within the wrapper . Then in your individual templates you can set both the sidebar and the main content area . For parts where you might be repeating content like the opening and closing divs of a sidebar you can always drop some snippets inside the stash . You can also use exp : stash : not empty docs https : github.com croxton Stash expstashnot empty to wrap around the div or container for your sidebar within the wrapper .", "Question : What s the best way DRY to get the comments of the current entry with stash So far I used a embed-template to present all comments and the comment-form . But this does not work within stash and isn t there a smarter way than a embeded tempalte Comment : Where are you using exp : stash : get name entry comments at Comment : Also I d say loose the embed if possible for a snippet or Low Variable Template Variables add-ons if one of those are installed . .. . Answer : This gist https : gist.github.com 3973821 from Mark Croxton is for an articles listing page that includes comments . It does a bit more than what you re describing in your scenario but you might be able to use some of the concepts ." ] }
[ "yes-answer-long", "yes-answer-short" ]
expressionengine
UNK_RELATION
wsgi@web@35
wsgi -- wsgi is a python standard @placeholder server gateway interface .
{ "confidence": [ 50.19700241088867, 43.82376480102539, 43.76300811767578, 43.75917053222656, 42.718692779541016, 42.52231216430664, 41.457862854003906, 41.457862854003906, 40.49640655517578, 40.32198715209961, 39.63050842285156, 39.314029693603516, 38.80149459838867, 38.44408416748047, 38.34761047363281, 38.33039855957031, 38.33039855957031, 38.33039855957031, 38.27983093261719, 38.1894645690918, 38.13521194458008, 38.03052520751953, 37.84862518310547, 37.641178131103516, 37.41230392456055, 36.562538146972656, 36.54941177368164, 36.546993255615234, 36.11687088012695, 36.11687088012695, 36.11687088012695, 36.11687088012695, 36.09395217895508, 35.9036865234375, 35.9036865234375, 35.6999626159668, 35.411441802978516, 35.33633041381836, 35.29560470581055, 35.25398254394531, 35.25398254394531, 35.01761245727539, 34.84123611450195, 34.800392150878906, 34.61183547973633, 34.60298538208008, 34.60298538208008, 34.60298538208008, 34.60298538208008, 34.60298538208008, 34.48612976074219, 34.448307037353516, 34.35610580444336, 34.187339782714844, 34.09376907348633, 33.98341369628906, 33.98341369628906, 33.95344161987305, 33.95344161987305, 33.95344161987305, 33.85935974121094, 33.74009323120117, 33.74009323120117, 33.74009323120117, 33.64996337890625, 33.64996337890625, 33.63542556762695, 33.60066604614258, 33.422447204589844, 33.422447204589844, 33.404296875, 33.3987922668457, 33.17545700073242, 33.17545700073242, 33.17545700073242, 33.17545700073242, 33.09054946899414, 33.09054946899414, 33.09054946899414, 33.09054946899414, 33.09054946899414, 33.09054946899414, 32.99646759033203, 32.96453094482422, 32.96453094482422, 32.96453094482422, 32.96453094482422, 32.96453094482422, 32.92858123779297, 32.705894470214844, 32.705894470214844, 32.705894470214844, 32.705894470214844, 32.558982849121094, 32.51875686645508, 32.51875686645508, 32.46039581298828, 32.35525894165039, 32.35525894165039 ], "content": [ "WSGI is a Python-specific interface standard for web-applications .", "WSGI is a Python specific interface for writing web-applications .", "That s the responsability of the WSGI gateway eg .", "CGI applications will find that many of the keys will be in os.environ because the gateway server has provided them and the cgi to wsgi gateway interface say wsgiref.handlers.CGIHandler need add only the wsgi specific keys before calling the wsgi application .", "In a project like Django https : www.djangoproject.com you can use a WSGI Web Server Gateway Interface http : en.wikipedia.org wiki Web Server Gateway Interface server from the Flup module http : www.saddi.com software flup .", "If you need a very small WSGI server which only relies on stuff from the standard Python distribution then use the WSGI server from the wsgiref module .", "For Python one such option is WSGI .", "WSGI is Python only .", "WSGI is the standard that allows webservers to communicate with Python applications .", "Are you using the WSGI interface directly", "WSGI is a Python API connecting two or more Python WSGI-compatible modules inside the same process Python interpreter .", "WSGI is a protocol not a server .", "There are wrappers for about any web server protocol to provide the WSGI interface .", "Just use cherrypy s wsgi server .", "Python connector WSGI .", "Below is the Python script I wrote for isapi-wsgi .", "For me the problem was wsgi python version mismatch .", "But mod-python is deprecated and I want to migrate to wsgi .", "What wsgi server is this", "Isn t there something standard in WSGI itself for this", "See Graham Dumpleton s post : .. . .. . WSGI and printing to standard output http : blog.dscpl.com.au 2009 04 wsgi-and-printing-to-standard-output.html", "WSGI is a specification .", "WSGI is an interface that is based on the CGI design pattern .", "Learn WSGI .. . .. . WSGI is absurdly simple. .", "How you apply the middleware depends on the exact WSGI server you are using see your WSGI server documentation .", "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 middleware looks just like a WSGI app to the server and like a server to the next app .", "EDIT : My WSGI server is Gunicorn", "Hendrix is a WSGI compatible server written in Tornado .", "Wsgi is for interacting with a web server Apache or Nginx .", "I want to use an existing WSGI server i.e .", "I am using cherrypy s wsgi server for pyramid .", "Are you sure libapache2-mod-wsgi-py isn t for Python 3.3 .", "It also support wsgi .", "It could be refactored for WSGI .", "This is the basic wsgi code .", "IMHO flup is a much more lean and simple way to deploy WSGI-apps and serves as a gateway between a WSGI-app and AJP FCGI SCGI CGI .", "Seriously - IIS sucks on running python wsgi apps .", "To run a WSGI as a CGI script you can use the CGIHandler http : docs.python.org library wsgiref.html wsgiref.handlers.CGIHandler in Python standard-library .", "2 . uWSGI is a server and one of the protocols it implements is WSGI .", "How paths are handled is not part of the WSGI server responsibility .", "I guess it must be because of WSGI server because app.logger works in the absence of WSGI .", "@Merlin i think it will not be an easy way Flask uses WSGI and WSGI is not asynchronous .", "I have a wsgi directory in which i have some python code saved in a .wsgi file .", "There is no WSGI with Klein .", "This question is tagged wsgi .", "The wsgi is setting the path correct .", "How to install WSGI support", "How to install WSGI support", "Helped me understand WSGI .", "You need a server which can talk to Django with WSGI .", "Even if you can manage to do it somehow with a specific WSGI server your code will not be portable as it will have to be violating the WSGI specification to work .", "The problem only exists with WSGI .", "I ve got a IIS 7.5 web server runnig a python website using the isapi-wsgi module .", "To have WSGI support you ll need to have installed a WSGI module like mod-wsgi http : code.google.com p modwsgi or use a web server with WSGI baked in like CherryPy http : tools.cherrypy.org .", "Although the WSGI specification technically disallows it the issue is more to do with the WSGI server being used .", "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 .", "I m using CherryPy in order to serve a python application through WSGI .", "From the web I ve gleaned that WSGI is a CGI for python web development frameworks .", "You might want to check which python interpreter is pointed to by wsgi .", "The WSGI API uses Python language features like iteration generators and passing of callable objects between the cooperating WSGI-compatible modules .", "wsgi is a protocol. . and 2 .", "The setup is on apache with WSGI .", "Write a WSGI app that does this .", "Example the sock is var run httpd wsgi.1769.1.1.sock but apache looks for var run httpd wsgi.1769.0.1.sock .. . .. . There are no permission issues AFAIK the problem is with the WSGI sock number apache is looking up .", "Exact log line : 2 No such file or directory : client A.B.C.D : 57798 mod-wsgi pid 1549 : Unable to conn ect to WSGI daemon process wsgi on etc httpd run wsgi.1144.0.1.sock after multiple attempts .", "You should now run your application with the WSGI interface .. . .. .", "Nowadays WSGI has become the de facto standard http : en.wikipedia.org wiki Web Server Gateway Interface for python webapps and so most websites written in python separate out the server interface-y functionality that receives and implements the WSGI requirements from the webapp-y stuff .", "Try to enable wsgi mod in Apache .. . .. . If you come across below error .. . .. . ERROR : Module mod-wsgi does not exist", "It is a limitation of the WSGI specification itself in as much as the WSGI specification prohibits use of chunked request content by requiring a CONTENT LENGTH value for request .", "I never use IIS but IIS supports CGI gateway therefore you should be able to adapt CGI with WSGI .", "Therefore running a scheduler in a WSGI worker is not a good idea .", "Questions are : is class reloaded by application or wsgi", "I have configured wsgi module .", "And imported my app s wsgi callable there .", "WSGI Flow http : i.stack.imgur.com glnJA.png", "In your WSGI script : .. . .. . Adjust as appropriate for your Python version etc .", "I am working with python buildout and want do deploy a diazo wsgi .", "WSGI is a Python specification http : www.python.org dev peps pep-3333 .", "I m having a problem with the sessions in my python wsgi web app .", "For WSGI applications you are better off staying with Python 2.X .", "Python servers that allow WSGI applications do not seem to have Rewrite engines .", "Note that WSGI is not yet fully-specified for Python 3.0 and much of the popular WSGI infrastructure has not been converted or has been 2to3d but not properly tested .", "But when I try load wsgi moudule server is not starting up .", "As the title suggests is it possible to run a WSGI server from x inetd", "Try and find a version of your application which already works on a WSGI server .", "Are you just using cherrypy s wsgi server for your Pyramid app", "The last I heard was that Cherrypy was separating out their wsgi server from their framework .", "Reconfigure the WSGI app for daemon mode .", "I have created wsgi .", "I am using WSGI .", "WSGI is an inherently synchronous API .", "I m on WSGI 3.X", "A solution that is WSGI compliant would be much preferred .", "This is because ways of hosting WSGI applications such as CGI use standard output as the mechanism for sending the content of a response back to the web server .", "URL rewriting is an extra service that a server could implement but that has nothing to do with the WSGI standard .", "Wiki states that for a Python application interface OpenShift uses WSGI 3 http : en.wikipedia.org wiki OpenShift Supported frameworks .", "You will have to install mod-wsgi as below .", "For me the issue was that the WSGI script wasn t executable ." ] }
{ "confidence": [ 58.870399475097656, 58.061676025390625, 53.19880676269531, 53.153907775878906, 51.985504150390625, 49.76813507080078, 49.614784240722656, 49.34294509887695, 49.1021728515625, 48.80817794799805, 48.03196716308594, 47.84468078613281, 46.570343017578125, 46.00889587402344, 44.50481414794922, 44.31922149658203, 44.15441131591797, 43.217185974121094, 42.91530227661133, 42.63075637817383 ], "content": [ "Question : I m just wondering what the differences and advantages are for the different CGI s out there . Which one would be best for python scripts and how would I tell the script what to use Comment : Is mod-wsgi faster My current server uses CGI what reasons are there to switch Comment : Possible duplicate : stackoverflow.com questions 219110 http : stackoverflow.com questions 219110 how-python-web-frameworks-wsgi-and-cgi-fit-together Comment : We can t tell you if mod-wsgi will be faster in your environment . You have to actually measure them in your environment with your constraints and your applications and your configuration . Comment : mod-wsgi is Apache only . Is it still the most popular in 2012 .. . Answer : In a project like Django https : www.djangoproject.com you can use a WSGI Web Server Gateway Interface http : en.wikipedia.org wiki Web Server Gateway Interface server from the Flup module http : www.saddi.com software flup . A WSGI server wraps a back-end process using one or more protocol : .. . .. . FastCGI http : en.wikipedia.org wiki FastCGI calling a server process .. . SCGI Simple Common Gateway Interface http : en.wikipedia.org wiki Simple Common Gateway Interface - a simpler FastCGI .. . AJP Apache JServ Protocol http : en.wikipedia.org wiki Apache JServ Protocol - a Java FastCGI .. . mod-python http : en.wikipedia.org wiki Mod python runs pre-loaded code per request - uses lots of RAM .. . CGI Common Gateway Interface http : en.wikipedia.org wiki Common Gateway Interface starts a process per request - slow", "Question : From the web I ve gleaned that WSGI is a CGI for python web development frameworks . FCGI seems to be a more generalised gateway for a variety of languages . Don t know the performance difference between the two in reference to the languages python and C ++ . .. . Answer : They are two different things . WSGI is a Python specific interface for writing web-applications . There are wrappers for about any web server protocol to provide the WSGI interface . FastGCI FCGI is one of such web server protocols . So WSGI is an abstraction-layer while CGI FastCGI mod-python are how the actual web servers talk to the application . Some code has to translate the native interface to WSGI there is a CGI module in wsgiref there is flup for FastCGI etc . . There is also mod-wsgi for Apache which does the translation directly in an Apache module so you don t need any Python wrapper .", "Question : What s the difference between these two Which is better faster reliable .. . Answer : SCGI like FastCGI is a serialized protocol suitable for inter-process communication between a web-server and a web-application . WSGI is a Python API connecting two or more Python WSGI-compatible modules inside the same process Python interpreter . One module represents the web-server being either a Python in-process web-server implementation or a gateway to a web-server in another process via e.g . SCGI . The other module is or represents the web application . Additionally zero or more modules between theses two modules may serve as WSGI middleware modules doing things like session cookie management content caching authentication etc . The WSGI API uses Python language features like iteration generators and passing of callable objects between the cooperating WSGI-compatible modules . Comment : Perfect answer .", "Question : From the web I ve gleaned that WSGI is a CGI for python web development frameworks . FCGI seems to be a more generalised gateway for a variety of languages . Don t know the performance difference between the two in reference to the languages python and C ++ . .. . Answer : Correct WSGI is a Python programmatic API definition and FASTCGI is a language-agnostic socket wire protocol definition . Effectively they are at different layers with WSGI being a higher layer . In other words one can implement WSGI on top of something that so happened to use FASTCGI to communicate with a web server but not the other way around . In general FASTCGI being a socket wire protocol means that you always need some type of programmatic interface on top to use it . For Python one such option is WSGI . As FASTCGI is just a means to an end one can t really compare its performance to WSGI in that case because WSGI isn t a comparable socket wire protocol but a user of FASTCGI itself . One could try and compare performance of different language interfaces on top of FASTCGI but in general that is quite meaningless in itself as the lower network layer and server request handling aren t the bottleneck . Instead your application code and database will be . Comment : I think it s meaningful to ask what the time difference is between a fcgi app responding to a request and a wsgi app responding to request . Since fcgi and wsgi are two different ways to interface a programming language to a web request they do very similar things .", "Question : Can anyone help me get a Flask application running on IIS 6 I have tried to use isapi-wsgi but when I visit the Virtual Directory address I get a page that says The specified module could not be found . Are there other options for this Below is the Python script I wrote for isapi-wsgi . The Virtual Directory was made and everything looked ok in IIS Manager but the site did not work . .. . Answer : I never use IIS but IIS supports CGI gateway therefore you should be able to adapt CGI with WSGI . To run a WSGI as a CGI script you can use the CGIHandler http : docs.python.org library wsgiref.html wsgiref.handlers.CGIHandler in Python standard-library . Comment : CGI is not an acceptable solution unless it s a very low-traffic thing e.g . just used by yourself . It starts a process everytime a page is requested .", "Question : For the server part of Python s WSGI specification not the application part is the server not allowed to rewrite requests I ask because I can t find any that do . As I understand it Nginx and Apache are generic so they will have a rewrite rule-engine and IIS . Why wouldn t a WSGI capable server have the same so that I do not have to use regex Does PEP-333 not allow rewrites Is rewriting not a Python way to do things Comment : What does a rewrite rule-engine have to do with an web interfacing standard A rewrite rule-engine is an application . Write a WSGI app that does this . Comment : @MartijnPieters I know you are the expert on Python . But that does not make sense to me . The application is separate from the server . Python servers that allow WSGI applications do not seem to have Rewrite engines . I do not want to create a rewrite engine in the application . I only want to deal with the results like I would with mod-rewrite . I have no idea if it has anything to do with it or not . That is why I asked the very specfic question about it . Comment : But why would this need to be part of the specification URL rewriting is orthogonal to a standard that lets you plug in Python code into a web server . Comment : The specification doesn t preclude it it just doesn t care because that s not the job of the specification or a server implementing a WSGI container . Comment : @MartijnPieters I have no idea why it would or wouldn t . I was asking if it precluded it . It does not appear to do so and perhaps doing it at the server is not the Pythonic way . .. . Answer : How paths are handled is not part of the WSGI server responsibility . It passes on the request to the apps transparently and returns the response produced equally transparently . That is what the standard describes . URL rewriting is an extra service that a server could implement but that has nothing to do with the WSGI standard . Apache does this with an optional module mod-rewrite . It is a popular feature so other servers have offered it too . But that doesn t mean that the WSGI standard needs to say anything about this just as the HTTP standard doesn t describe URL rewriting . If you need paths rewritten you can easily do so in your WSGI app or write WSGI middleware to do so . WSGI middleware looks just like a WSGI app to the server and like a server to the next app . Someone already wrote such middleware for you see the WSGIRewrite project https : pypi.python.org pypi WSGIRewrite . Comment : The answer then is it something that it typically done at the server level but the application which is different from the non-Python world who use Apache IIS or something else Comment : Apache is an application too . It is just a very rich and versatile applicition with plugins . mod-rewrite is a plugin middleware that offers that functionality . WSGI servers are also versatile in that middleware can solve this same problem .", "Question : I m considering running a tiny Python webapp that comes as an implementation of a BaseHTTPRequestHandler i.e . https : github.com openid python-openid blob master examples server.py . I want to use an existing WSGI server i.e . Apache with mod-wsgi . So my question is : How to conveniently serve the BaseHTTPRequestHandler via WSGI so that I can hook it up with Apache + mod-wsgi .. . Answer : Don t try it would likely be one huge hack even if you tried and could somehow get it to work . Try and find a version of your application which already works on a WSGI server . If you need a very small WSGI server which only relies on stuff from the standard Python distribution then use the WSGI server from the wsgiref module . http : docs.python.org 2 library wsgiref.html module-wsgiref.simple server .. . .. . If you need a simple to use WSGI framework and try and port that application use Flask .", "Question : I m confused . If AppEngine is supposed to allow running of WSGI-employing apps . . .. . .. . . . then why does env not contain variables that PEP 333 http : www.python.org dev peps pep-0333 lists as must -be-present -- causing the wsgiref.util.request uri to raise a KeyError I m basically writing some libraries that will need to work either AppEngine or a typical Apache + modwsgi setup . I thought it would be enough to simply write a WSGI compliant app but seems AppEngine itself . . is not .. . Answer : the environ which must contain wsgi specific keys is the environ passed to the wsgi application callable . PEP-333 does not require that this be the value os.environ . CGI applications will find that many of the keys will be in os.environ because the gateway server has provided them and the cgi to wsgi gateway interface say wsgiref.handlers.CGIHandler need add only the wsgi specific keys before calling the wsgi application . To be clear when PEP-333 mentions environ it does not mean os.environ . EDIT : google.appengine.ext.webapp.Request apparently inherits from webob.Request . Thus a webapp handler can access the wsgi environ something like so . Comment : And note that when the App Engine Python runtime gets concurrency support os.environ will become particularly untrustworthy as it could contain data from a request being served by another thread . Comment : as a general rule be very pedantic about where you get the environ pep-333 makes some choices that enable a high degree of concurrency wsgi servers may interleave interaction for multiple requests in the same process multi-threaded or even in the same thread asyncronous although I know of no actual servers in the wild that do the second and this fact has eluded the designs of many frameworks which are not async safe in any measure .", "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 : Pyramid uses it s own Waitress web server for development purposes but I want to serve my WSGI app under Tornado . I think I should configure it using the pserve .ini files but I can t get it to work Comment : Not really what you asked for so making it a comment not an answer . While Tornado CAN serve WSGI it s not really recommended since WSGI doesn t allow the asynchronous processing which is the real reason for running Tornado . IMHO flup is a much more lean and simple way to deploy WSGI-apps and serves as a gateway between a WSGI-app and AJP FCGI SCGI CGI . You should go for the fork-versions in production since it get s around the Python GIL http : wiki.python.org moin GlobalInterpreterLock . .. . Answer : Again not really recommending running WSGI under Tornado since it gives you none of the advantages of Tornado . Should you still want to do it for some reason the second example of the docs seems to be what you are looking for : http : www.tornadoweb.org documentation wsgi.html Comment : Okay which server should I use then Preferably one that s very fast Comment : Depends on your needs . If speed is everything you should probably go with Tornado but not deploy as a WSGI-app but a native asynchronous Tornado-app . Especially if long-polling is a concern If your existing WSGI-interface app is a must nichol.as benchmark-of-python-web-servers http : nichol.as benchmark-of-python-web-servers might be helpful . Depending on your app a good strategy can be to use a slightly slower but simple and lean server combined with a well-tuned Varnish nginx caching frontend . Comment : For example if much of the app is generating a few highly-visited common index-views a well-tuned nginx could make sure just one request every few seconds hit the Python-code and any application-server can handle that . Comment : Personally I find tornado to be a much more pleasant web server to use over pyramid so OP s question makes sense to me I d rather develop on tornado + waitress and then slowly migrate over to a proper async model when time and opportunity allow . Thank you for posting this solution even if it doesn t have an obvious use-case .", "Question : What s the difference between these two Which is better faster reliable .. . Answer : SCGI is a language-neutral means of connecting a front-end web server and a web application . WSGI is a Python-specific interface standard for web-applications . Though they both have roots in CGI they re rather different in scope and you could indeed quite reasonably use both at once for example having a mod scgi on the webserver talk to a WSGI app run as an SCGI server . There are multiple library implementations that will run WSGI applications as SCGI servers for you eg . wsgitools cherrypy . They are both reliable in as much as you can consider a specification reliable as opposed to a particular implementation . These days you would probably write your application as a WSGI callable and consider the question of deployment separately . Maybe an Apache+mod wsgi embedded interface might be a bit faster than an Apache+mod scgi+ SCGI wrapper lib but in all likelihood it s not going to be hugely different . More valuable is the ability to run the application on a variety of servers platforms and connection standards .", "Question : Pyramid uses it s own Waitress web server for development purposes but I want to serve my WSGI app under Tornado . I think I should configure it using the pserve .ini files but I can t get it to work Comment : Not really what you asked for so making it a comment not an answer . While Tornado CAN serve WSGI it s not really recommended since WSGI doesn t allow the asynchronous processing which is the real reason for running Tornado . IMHO flup is a much more lean and simple way to deploy WSGI-apps and serves as a gateway between a WSGI-app and AJP FCGI SCGI CGI . You should go for the fork-versions in production since it get s around the Python GIL http : wiki.python.org moin GlobalInterpreterLock . .. . Answer : The Pyramid application can be loaded from the INI files easily . From there you just pass the wsgi app into Tornado s WSGIContainer . Comment : Is there a way to start the app via pserve instead of a runner script Comment : Well the pserve server runners are entirely pluggable via PasteDeploy so feel free to write your own it s quite simple if you figure out setuptools entry points . I am not familiar with a pre-baked runner for tornado .", "Question : I have a Bluehost http : en.wikipedia.org wiki Bluehost account where I can run Python scripts as CGI . I guess it s the simplest CGI because to run I have to define the following in .htaccess : .. . .. . Now whenever I look up web programming with Python I hear a lot about WSGI and how most frameworks use it . But I just don t understand how it all fits together especially when my web server is given Apache running at a host s machine and not something I can really play with except defining .htaccess commands . How are WSGI http : en.wikipedia.org wiki Web Server Gateway Interface CGI and the frameworks all connected What do I need to know install and do if I want to run a web framework say web.py http : webpy.org or CherryPy http : en.wikipedia.org wiki CherryPy on my basic CGI configuration How to install WSGI support .. . Answer : You can run WSGI over CGI as Pep333 demonstrates http : www.python.org dev peps pep-0333 the-server-gateway-side as an example . However every time there is a request a new Python interpreter is started and the whole context database connections etc . needs to be build which all take time . The best if you want to run WSGI would be if your host would install mod-wsgi http : code.google.com p modwsgi and made an appropriate configuration to defer control to an application of yours . Flup http : trac.saddi.com flup is another way to run with WSGI for any webserver that can speak FCGI http : www.fastcgi.com drupal SCGI http : www.mems-exchange.org software scgi or AJP . From my experience only FCGI really works and it can be used in Apache either via mod-fastcgi http : www.fastcgi.com mod-fastcgi docs mod fastcgi.html or if you can run a separate Python daemon with mod-proxy fcgi http : mproxyfcgi.sourceforge.net . WSGI http : wsgi.org is a protocol much like CGI which defines a set of rules how webserver and Python code can interact it is defined as Pep333 http : www.python.org dev peps pep-0333 . It makes it possible that many different webservers can use many different frameworks and applications using the same application protocol . This is very beneficial and makes it so useful . Comment : Is running WSGI over CGI what flup is for How is flup connected to the scheme", "Question : I have a Bluehost http : en.wikipedia.org wiki Bluehost account where I can run Python scripts as CGI . I guess it s the simplest CGI because to run I have to define the following in .htaccess : .. . .. . Now whenever I look up web programming with Python I hear a lot about WSGI and how most frameworks use it . But I just don t understand how it all fits together especially when my web server is given Apache running at a host s machine and not something I can really play with except defining .htaccess commands . How are WSGI http : en.wikipedia.org wiki Web Server Gateway Interface CGI and the frameworks all connected What do I need to know install and do if I want to run a web framework say web.py http : webpy.org or CherryPy http : en.wikipedia.org wiki CherryPy on my basic CGI configuration How to install WSGI support .. . Answer : I think Florian s answer http : stackoverflow.com questions 219110 how-python-web-frameworks-wsgi-and-cgi-fit-together 219124 219124 answers the part of your question about what is WSGI especially if you read the PEP http : www.python.org dev peps pep-0333 . As for the questions you pose towards the end : .. . .. . WSGI CGI FastCGI etc . are all protocols for a web server to run code and deliver the dynamic-content that is produced . Compare this to static web serving where a plain HTML file is basically delivered as is to the client . CGI FastCGI and SCGI are language-agnostic . You can write CGI scripts in Perl Python C bash whatever . CGI defines which executable will be called based on the URL and how it will be called : the arguments and environment . It also defines how the return-value should be passed back to the web server once your executable is finished . The variations are basically optimisations to be able to handle more requests reduce latency and so on the basic concept is the same . WSGI is Python only . Rather than a language-agnostic protocol a standard function signature is defined : .. . .. . That is a complete if limited WSGI application . A web server with WSGI support such as Apache with mod-wsgi can invoke this function whenever a request arrives . The reason this is so great is that we can avoid the messy step of converting from a HTTP GET POST to CGI to Python and back again on the way out . It s a much more direct clean and efficient linkage . It also makes it much easier to have long-running frameworks running behind web servers if all that needs to be done for a request is a function-call . With plain CGI you d have to start your whole framework up http : tools.cherrypy.org wiki RunAsCGI for each individual request . To have WSGI support you ll need to have installed a WSGI module like mod-wsgi http : code.google.com p modwsgi or use a web server with WSGI baked in like CherryPy http : tools.cherrypy.org . If neither of those are possible you could use the CGI-WSGI bridge given in the PEP . Comment : Whose stupid idea was it to not make WSGI language-agnostic What s the point then Might as well just ship the whole of Python as an Apache module . Comment : @SalmanPK I think it s just a trade off . Surely it s not easy if not impossible to make a language-agnostic protocol that can be used by simply implementing a function in the chosen language .", "Question : print only works in development server . But what if I want it to work in Apache Just in case I forget to comment it out...I want to be able to go smoothly without causing errors . Just print to nothing .. . Answer : What you re proposing is a Bad Idea but if you insist on doing it anyways check out the mod-wsgi configuration directives http : code.google.com p modwsgi wiki ConfigurationDirectives : .. . .. . WSGIRestrictStdout .. . .. . A well behaved Python WSGI application should never attempt to write any data directly to sys.stdout or use the print statement without directing it to an alternate file object . This is because ways of hosting WSGI applications such as CGI use standard output as the mechanism for sending the content of a response back to the web server . If a WSGI application were to directly write to sys.stdout it could interfere with the operation of the WSGI adapter and result in corruption of the output stream . .. . In the interests of promoting portability of WSGI applications mod-wsgi restricts access to sys.stdout and will raise an exception if an attempt is made to use sys.stdout explicitly . .. . The only time that one might want to remove this restriction is purely out of convencience of being able to use the print statement during debugging of an application or if some third party module or WSGI application was errornously using print when it shouldn t . If restrictions on using sys.stdout are removed any data written to it will instead be sent through to sys.stderr and will appear in the Apache error-log file .", "Question : I am facing a problem related to django-wsgi script . I have been using two virtualenv for my two application and I have deployed these two application on my local server with different port . Apache configuration file for first Appplication looks like : .. . .. . and Apache configuration for second application is almost same but instead of virtual-env1 I am using virtual-env2 and different port . But when I run my second application on the server I got this error . My django.wsgi file loks like this : .. . .. . I don t know why my server is looking inside the virtual-env1 instead of virtual-env2 . Please help me as I am new to django and wsgi . .. . Answer : Here s what helped me in similar situation . My wsgi file looks like this : .. . .. . May be this isn t the best approach but it worked for me . I remember that I ve googled and found many different solutions here s some related links : .. . .. . Setting up Apache and Python WSGI to use VirtualEnv http : stackoverflow.com questions 6723494 setting-up-apache-and-python-wsgi-to-use-virtualenv .. . Setting up django on apache mod-wsgi virtualenv http : stackoverflow.com questions 10898216 setting-up-django-on-apache-mod-wsgi-virtualenv .. . Django Apache wsgi virtualenv import error http : stackoverflow.com questions 13753151 django-apache-wsgi-virtualenv-import-error .. . .. . Hope that helps . Comment : : : Can you describle what is full path to activate this.py as I am totally new to django Comment : activate this should be in your virtualenv folder under bin dir . Comment : Thank you Your WSGI file has worked for me .", "Question : Could anyone please explain pros cons when using WSGI http : www.wsgi.org en latest index.html VS uWSGI http : projects.unbit.it uwsgi wiki with Nginx . Currently i am building up a production server for the Django website which i have prepared but unable to decide whether should i go with WSGI or uWSGI . Could you please explain in detail what differentiates each configuration Which configuration should scale the best Thanks in advance Comment : WSGI is a specification . uWSGI provides an implementation of the WSGI specification . You can t compare them . You can only compare different implementations . Comment : segmentfault.com a 1190000004294634 http : segmentfault.com a 1190000004294634 .. . Answer : It is generally best to run Python in a separate process from your main web server . That way the web server can have lots of tiny threads that serve static content really fast while your separate Python processes will be big and heavyweight and each be running their own Python interpreter . So plain WSGI is bad because it bloats every single one of your nginx threads with a big Python interpreter . Using flup or gunicorn or uWSGI behind nginx is much better because that frees up nginx to simply serve content and lets you choose how many tiny light nginx threads to run independently of your choice of how many heavyweight Python threads you bring up to serve dynamic-content . People seem very happy with gunicorn at the moment but any of those three options should work fine . Going forward it also frees you up to move the Python to another server when load starts to get serious . Comment : Am a bit confused by your answer . I can t see that he mentioned running any sort of WSGI implementation inside of nginx . He referenced the main wsgi.org site . His original comparison between WSGI and uWSGI is thus a bit silly in the first place because uWSGI is an implementation of the WSGI specification . You yourself have used generic WSGI term in a confusing way in saying that it bloats every single one of your nginx threads with a big Python interpreter . The WSGI specification itself can t do that only implementations can . Comment : It could make sense if we were comparing nginx + mod-wsgi the pluggable module and nginx + uWSGI the application server container . Comment : So when it comes to using Nginx to run Python web apps since Manlio Perillo s mod-wsgi is deadware and not recommended the good solutions are either WSGI with either gunicorn or uWSGI or FastCGI with Flup", "Question : I m trying to deploy Django located in a virtualenv on Apache using WSGI deploying . I m following the default tutorial from https : docs.djangoproject.com en dev howto deployment wsgi modwsgi .. . .. . wsgi.py the default one which Django generated with the comments dropped : .. . .. . apache2.conf its the same httpd.conf just in Debian . Appended this to the end : .. . .. . However this ends-with an error : .. . .. . It seems that the standard python is accessible since .. . .. . yields no errors . So it seems that modules imported from the virtualenv aren t importable . The tutorial said : .. . .. . A further change required to the above configuration if you use daemon mode is that you can t use WSGIPythonPath instead you should use the python-path option to WSGIDaemonProcess for example : .. . .. . What am I missing .. . Answer : the pythonpath your envinronment is different than the apache one i think . install django globaly with easy install or pip .. . .. . or add .virtualenv pythonpath to the mod-wsgi config .. . .. . WSGIPythonPath directory directory-1 : directory-2 : .. . .. . MOD wsgi config http : code.google.com p modwsgi wiki ConfigurationDirectives WSGIPythonPath Comment : I want to use wsgi in daemon mode and it is specified in the Django documentation that in those cases WSGIPythonPath doesn t work but has to be changed with WSGIDaemonProcess example.com python-path path to mysite.com : path to venv lib python2.7 site-packages", "Question : I am taking a python course where they use BaseHTTPServer . The code they start with is here https : storage.googleapis.com supplemental media udacityu 3624118892 webserver.py GoogleAccessId 1069728276824-fdhtlb98k1m9qrmdgj4jgc7gjp2l1lsm@developer.gserviceaccount.com Expires 1432072519 Signature Sx2u9twsHyPXigGaqwQdzEwb8o rh5odNhD3bcMukJv9S 2BWYaRCzvIPgw1Gn2Ktjiy3V1LiFsDyJwV9aA3njmfQMYGlHLLn8dWnCDxItbhopRHe1VmyE1gqHr1HR1TOeJCvRsXwPla0XiwcUMlOE6BOlfb0d7f8W 2BiZQ2jrY9Jw 3D .. . .. . I am using python anywhere and there the only possibility to get an application onto the internet is to use an wsgi interface . A configuration file for the wsgi interface looks like this : .. . .. . application could be something like this : .. . .. . HELLO WORLD would be a string with html content . I cannot just point to port 8080 as in the example . In order to use python anywhere I do have to interface both . I reckoned it could be possible that the wsgi is derived from BaseHTTPServer so it might be possible to interface them and to use my course on pythonanywhere.com .. . .. . It is clear I have to get rid in the code in the main function and use the application function instead . But I am not exactly getting how this works . I get a callback start response which I call and then I yield the content How can I combine this with the webServerHandler class If this would be possible it should in theory work as well for the google-app-engine . I found a very complex example here https : chromium.googlesource.com external googleappengine python + 9e962efff462d9ed00a8bee046a85d0d631861cb google appengine tools dev appserver.py where BaseHTTPServer is used but this is too complex for me yet . Is it possible to do this and if yes could someone give me a hint how to do this and provide me with some basic start code Comment : It would be great if you could comment on why the downvote so I could improve the question . Comment : I was looking at your question when you edited it and I think you improved your question I didn t down vote you BTW . One other suggestion would be to include any error messages that you are getting . .. . Answer : So WSGI is a specification https : www.python.org dev peps pep-0333 specification-details that defines an interface between a request and a webapp . ie . when it receives a http-request it will pass it along to the webapp in a standardized way as described in the specification eg : it must set this environment variable it must pass this argument it must make this call etc . On the other hand BaseHTTPServer both defines an interface and also has code that actually serves web requests . This is a little used interface that is implemented almost exclusively by SimpleHTTPServer from the python2 standard-library or http.server in python3 and the server is not intended for anything production-ready . This is because SimpleHTTPServer was designed mainly for developing locally . For example it helps you get past js cross origin request problems when testing on localhost http : stackoverflow.com a 23118676 2353123 . Nowadays WSGI has become the de facto standard http : en.wikipedia.org wiki Web Server Gateway Interface for python webapps and so most websites written in python separate out the server interface-y functionality that receives and implements the WSGI requirements from the webapp-y stuff . In your code you have a single piece of code that does both the webapp-y stuff and also the process the http-request interface-y stuff . This is not wrong and is great for getting some basic understanding of how servers process http requests etc . So my suggestion would be : .. . .. . 1 . if your class is going to start using any python webapp frameworks soon anywahs eg : django flask bottle web2py cherrypy etc then you could potentially just wait till then to use pythonanywhere . 2 . if your class is focused on digging into the nitty gritty of servers you could refactor out the webapp-y layer from your code and just use the webapp-y layer on PythonAnywhere . Locally you would start the server interface-y stuff that then imports your webapp-y to generate a response . If you successfully do this then congrats You have kind of just written a server that supports WSGI http : wsgi.readthedocs.org en latest servers.html . Comment : Thanks i will wait until the class is going to use flask which I know is working just fine on pyhonanywhere . I found a temporary fix over night which is to use the cloud 9 platform where I just have to direct to port 8080 and got the code working . I ll accept your answer .", "Question : Could anyone please explain pros cons when using WSGI http : www.wsgi.org en latest index.html VS uWSGI http : projects.unbit.it uwsgi wiki with Nginx . Currently i am building up a production server for the Django website which i have prepared but unable to decide whether should i go with WSGI or uWSGI . Could you please explain in detail what differentiates each configuration Which configuration should scale the best Thanks in advance Comment : WSGI is a specification . uWSGI provides an implementation of the WSGI specification . You can t compare them . You can only compare different implementations . Comment : segmentfault.com a 1190000004294634 http : segmentfault.com a 1190000004294634 .. . Answer : Ok guys this confusion is because of lack of detail from several sources and the naming of these protocols and what WSGI actually is . Summary : .. . .. . 1 . WSGI and uwsgi both ARE protocols not servers . It is used to communicate with web servers for load-balancing and especially to take advantage of extra features that pure HTTP can not provide . So far Nginx and Cherokee have implemented this protocol . 2 . uWSGI is a server and one of the protocols it implements is WSGI . WSGI is a Python specification http : www.python.org dev peps pep-3333 . There are several implementations of the WSGI specification and it s intended to be used for more than just application servers web servers but there are quite a few WSGI application servers ie . CherryPy which also happens to have a production ready WSGI compliant web server if you weren t confused enough already . 3 . Comparing uwsgi to WSGI is comparing oranges to apples . Comment : Typo : 1 . uwsgi is a protocol not a server . -- 1 . WSGI is a protocol not a server . Comment : Actually what I ve written for 1 is correct but it s true WSGI is a protocol as well as uwsgi so both statements you have written are correct : . Of course without the rest of the context of 1 . It s the protocol used by uWSGI server . wiki.nginx.org HttpUwsgiModule http : wiki.nginx.org HttpUwsgiModule - Do not confuse the uwsgi protocol with the uWSGI server that speaks the uwsgi protocol Comment : Ah okay . I had thought you were trying to draw a contarst between statement 1 . wsgi is a protocol. . and 2 . uwsgi is a server that implements the protocol ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
siddhi@open-source@51
siddhi -- siddhi cep is a lightweight easy-to-use @placeholder complex-event-processing engine cep under apache software license v2 .0 .
{ "confidence": [ 70.23735809326172, 65.98893737792969, 65.98893737792969, 65.98893737792969, 63.50535202026367, 62.64000701904297, 61.99806594848633, 59.723594665527344, 51.467567443847656, 51.284217834472656, 50.421722412109375, 47.55296325683594, 46.50858688354492, 46.119140625, 45.354209899902344, 44.256927490234375, 44.256927490234375, 43.971229553222656, 43.45054626464844, 43.064605712890625, 42.70154571533203, 42.225868225097656, 42.175193786621094, 41.20111846923828, 40.74422836303711, 40.74422836303711, 40.74422836303711, 40.61210632324219, 40.537879943847656, 40.334068298339844, 40.28624725341797, 40.07912063598633, 40.0446891784668, 39.76311111450195, 39.76311111450195, 39.76311111450195, 39.76311111450195, 39.76311111450195, 39.76311111450195, 39.76311111450195, 39.76311111450195, 39.691612243652344, 39.62086486816406, 39.57106399536133, 39.334007263183594, 38.633453369140625, 38.633453369140625, 38.6222038269043, 37.99293899536133, 37.99293899536133, 37.499080657958984, 37.40757369995117, 37.40757369995117, 37.065635681152344, 36.926292419433594, 36.850425720214844, 36.58149719238281, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.49580383300781, 36.34318542480469, 36.34318542480469, 36.34318542480469, 36.277915954589844, 36.11808776855469, 36.013187408447266, 35.90478515625, 35.366146087646484, 34.88352966308594, 34.66660690307617, 34.409542083740234, 34.409542083740234, 34.409542083740234, 34.409542083740234, 33.312679290771484, 33.30986022949219, 33.279884338378906, 33.279884338378906, 33.15972137451172, 32.80558776855469, 32.167457580566406, 32.13705062866211, 32.094757080078125, 32.094757080078125, 32.094757080078125, 32.094757080078125, 32.094757080078125, 32.094757080078125, 32.094757080078125, 32.094757080078125, 32.094757080078125 ], "content": [ "In-fact that is how Siddhi Manager is used in WSO2 CEP .", "Is this possible to do in wso2 cep using siddhi QL", "Is it possible to do using siddhi and WSO2 CEP .", "If not CEP Siddhi cannot wait batch indefinitely .", "This is for SIddhi CEP but I imagine Esper would be similar .", "You can use Siddhi Try it 2 tool of WSO2 CEP product and simulate events with Siddhi queries .", "I am writing a small CEP program using Siddhi https : github.com wso2 siddhi .", "I am using Siddhi CEP 3.0.2 as standalone library .", "Please report a public jira under wso2.org jira browse CEP https : wso2.org jira browse CEP with all the information including the Siddhi library version you re using .", "At CEP level we don t have a mechanism to logically grouping Siddhi execution plans .", "Please find the docs for help docs.wso2.com display CEP400 Siddhi+Try+It+Tool https : docs.wso2.com display CEP400 Siddhi+Try+It+Tool you have to use WSO2 CEP 4.0.0 for this .", "Please check the this https : github.com wso2 siddhi blob master modules siddhi-extensions event-table src test java org wso2 siddhi extension eventtable rdbms JoinRDBMSTableTestCase.java L106 reference. .", "I am performing some experimentations for a prototype using Siddhi as a CEP engine and would like to know if the input streams only support flat event data or can also support a JSON-like data hierarchy for queries .", "Using siddhi CEP standalone library running execution plan APCheckInMonitor available in this link for 12 days with 1GB RAM memory slowly increasing and reached 1GB .", "3 . inEvents array represents current-events emitted by Siddhi and removeEvents represent expired-events emitted by Siddhi .. . 4 .", "1 https : docs.wso2.com display CEP400 Installing+R+to+work+with+WSO2+CEP .. . .. . 2 https : github.com wso2-gpl siddhi blob master siddhi-extensions r src test java org wso2 siddhi gpl extension r RScriptTestCase.java", "Note that for CEP 4.0.0 the syntax is a bit different for correct syntax check the test source codes here https : github.com wso2 siddhi blob master modules siddhi-core src test java org wso2 siddhi core query window TimeWindowTestCase.java since the docs are still work-in-progress .", "This is the default behavior of Siddhi .", "If you want to process JSON or XML in Siddhi Then you can use map extension support in Siddhi for this .", "How deploy siddhi execution plan with triggers to Apache Storm", "I have another question regarding WS02 CEP do you know the answer : stackoverflow.com questions 35267646 ws02-cep-event-lifecycle http : stackoverflow.com questions 35267646 ws02-cep-event-lifecycle .", "I guess Siddhi Try It under tools provides this help .", "Using Siddhi 3.0.3 as Java library .", "In the CEP engine can I look for a patterns for events that haven t occurred .", "I m new to Siddhi and I got several questions : .. . .. . 1 .", "How would Siddhi scale if I have lots of stream and queries", "In Siddhi stream definition + query combination is considered as an Execution Plan .", "Use case : The switch sends the SNMP traps to CEP .", "I ve been looking into the Drools Fusion Complex Event Processing component and the WSO2 Complex Event Processor Siddhi and I was wondering if one both of these components are capable to handle spatial events for 2D and 3D events .", "Using Siddhi CEP 3.0.2 as standalone library I am using Pattern partition along with Within option but callback is invoked even when time gab between the linkdown and linkup events is more than the 5 seconds .", "Tip : You can use Siddhi try it https : docs.wso2.com display CEP400 Siddhi+Try+It+Tool to easily try out your queries", "Update : .. . .. . Looking at ExecutionPlanRuntime class https : github.com wso2 siddhi blob master modules siddhi-core src main java org wso2 siddhi core ExecutionPlanRuntime.java it does not seem like it is possible to add queries on the run .", "If you want to get events from intermediate streams then you just want to create stream callback like this https : github.com wso2 siddhi blob master modules siddhi-core src test java org wso2 siddhi core query window TimeWindowTestCase.java L157 .", "Grouping by several variables is supported by Siddhi 3.0.0 .", "I am trying to implement a sample project in Siddhi .", "Do i have to write three Siddhi queries", "With on Siddhi joins only the events that matches the condition .. . 5 .", "I ve used Siddhi version 3.0.6-beta2 .", "It was written in JavaScript and included a client-side Siddhi parser .", "Siddhi does not allow an Attribute name to have dot .", "Siddhi processes events in real-time as and when they arrive .", "I m using Siddhi 3.0.0-M1 .", "Are you using WSO2 CEP server for this", "This code sample is a modification made to one of the Siddhi Passthrough test cases https : github.com wso2 siddhi blob release-3.0.6-beta2 modules siddhi-core src test java org wso2 siddhi core query PassThroughTestCase.java PassThroughTest4 .", "In Siddhi exists any instruction that I can use to call the web service", "To handle this I developed an execution plan using Siddhi .", "But writing extensions to WSO2 Siddhi would be a viable option .", "Here all events are sent to Siddhi without any time delay and hence Siddhi processes all these events together .", "I tried to extend the Siddhi extension RDBMS event table from siddhi-master branch and while doing the jUnit tests I can interact successful with the database .", "- Have a unique name for siddhiext file. . For example postgres.siddhiext . . .. . .. . 1 https : github.com wso2 siddhi tree master modules siddhi-extensions event-table src main resources", "Documentation : https : docs.wso2.com display CEP400 Inbuilt+Windows InbuiltWindows-frequent .. . Test cases : https : github.com wso2 siddhi blob master modules siddhi-core src test java org wso2 siddhi core query window FrequentWindowTestCase.java", "yes I am using wso2 cep server .", "At that time CEP update the DB with that value data empty .", "As you can see in github.com wso2 siddhi blob master modules siddhi-core src main https : github.com wso2 siddhi blob master modules siddhi-core src main java org wso2 siddhi core stream input SingleStreamEntryValve.java L133 we are batching the outputs of disrupter and when we do aggregations in windows .", "Actually I m using CEP 4.0.0 and I saw that the insert overwrite comes with CEP 4.1.0 so I probably will use it in the near future .", "But it will give some exceptions when i use window facilities in Siddhi .", "But those objects are pass-through only Siddhi engine just passes them along with the event and you won t be able to do any modifications processing to those objects unless you write some custom extension .", "The Siddhi docs states that grouping by more than one variable should be possible .", "I just checked your query with Siddhi 3.0.0 and I was able to compile it .", "There are many callbacks in siddhi I want to know the difference between them .", "I am trying to implement a basic window on an input stream in siddhi .", "Currently in Siddhi 3.0.4 we don t have a way to change this behaviour .", "With within Siddhi joins only the events that are within that time of each other", "I have to create an extension of Siddhi and call the web service from java", "The problem here is that your class does not extend an extension class in Siddhi .", "With siddhi partitions separate events will be generated for each partition variable in this case the CurrentEventId .", "As of now there is no way to batch events in siddhi as you have requested .", "Using siddhi 4.1.0 .. . .. . Is there any possibility to apply time.windowBatch for upcoming events", "I am using the next code wlist : whitelist is my extension Siddhi .", "There is no dedicated way to edit an execution plan at Siddhi level other than re-deploying that using createExecutionPlan method .", "Siddhi will scale quite well if you have lot of queries in single execution plan .", "1 http : wso2-oxygen-tank.10903.n7.nabble.com Siddhi-Making-Disruptor-configurable-td136499.html", "CEP handles the subscribe unsubscribe requests and the push events .", "If you want to process json inputs use WSO2 CEP product .", "A jira has being created to report this problem - wso2.org jira browse CEP-1541 https : wso2.org jira browse CEP-1541", "I am using WSO2 CEP for processing the events coming from a Kafka topic .", "I need that my trigger run when I start SIDDHI .", "From what I have read the full WSO2 CEP product comes with all the UI etc . not only the Java CEP library", "In the code samples provided in the source repository https : github.com wso2 siddhi tree master modules siddhi-samples quick-start-samples src main java org wso2 siddhi sample this attribute type is also never used .", "In the current released CEP does not support to include receivers and publishers for the template .", "Non occurrences are not supported as of CEP 3.1.0 but it will be available in the next version 4.0.0 .", "Currently WSO2 CEP is triggered using some Http requests .", "At that time how to handle those null values using CEP .", "Looking at the test case here https : github.com wso2 siddhi blob release-3.0.0-Alpha modules siddhi-core src test java org wso2 siddhi core query window ExternalTimeWindowTestCase.java the remove events are getting invoked with timestamp instead of timestamp + timeWindowLength e.g .", "In that case you may need to use some json library to extract primitives out of the json inputs and send them to Siddhi .", "I m developing a pushing service using the WSO2 CEP and the GCM .", "Regarding WSO2 CEP you can find some articles in 1 2 .", "You will be able to define mappings and disassemble the json input to some primitive-types like string int float etc that the Siddhi engine can process .", "You can use archetype to generate the custom siddhi extensions https : docs.wso2.com display SIDDHIEXTENSIONS Creating+a+Siddhi+Extension+and+Publishing+in+WSO2+Store and more over that in your resource name is Custom.siddhiext but when you use you typed as custom please check on that .", "I want extend siddhi mi java code is : .. . .. . the siddhiext : .. . .. . I generated my JAR and your location is C : wso2 wso2das-3.0.1 repository components lib .. . .. . I can use swordurl from siddhi : .. . .. . But I run my executionplan and I get the next error : .. . .. . this error always happens when I use external dependencies to Siddhi .", "Siddhi in memory tables cannot be accessed by DAS REST API so you have to persist content in the memory to a persistant stream which will store in a event table .", "You can specify Cron expression string for desired time periods in Siddhi 1 .", "This is done in several places in siddhi to give high throughput in realtime without compromising latency .", "Is there any tool such as Esper EPL Online http : www.esper-epl-tryout.appspot.com epltryout mainform.html for Siddhi", "Yes you need to write multiple Siddhi queries in same execution plan to insert events into multiple streams .", "Using siddhi 3.0.3 as Java library .. . .. . I am seeing some unexpected behavior when using group-by with a time window .", "More information on extensions can be found here https : docs.wso2.com display CEP410 Writing+Extensions+to+Siddhi .", "I could not really make an extension to Siddhi with external libraries and do not understand why .", "I m jumping from Esper to Siddhi .. . .. . I m trying to deploy several queries in the same stream .", "In Siddhi query template you can place a parameter with where you define the stream ." ] }
{ "confidence": [ 94.6535415649414, 87.19319915771484, 84.14543151855469, 80.89067077636719, 78.81913757324219, 76.6980209350586, 75.13206481933594, 72.56251525878906, 71.61631774902344, 70.98883056640625, 70.62741088867188, 70.59542846679688, 70.44303131103516, 70.03086853027344, 69.13801574707031, 68.56867218017578, 68.33504486083984, 68.15846252441406, 67.3161392211914, 67.19761657714844 ], "content": [ "Question : I am performing some experimentations for a prototype using Siddhi as a CEP engine and would like to know if the input streams only support flat event data or can also support a JSON-like data hierarchy for queries . Siddhi s documentation https : docs.wso2.com display CEP400 SiddhiQL+Guide+3.0 SiddhiQLGuide3.0-IntroductiontoSiddhiQueryLanguage refers to an object-type for attributes but I could not find anyhere what this type refers to . In the code samples provided in the source repository https : github.com wso2 siddhi tree master modules siddhi-samples quick-start-samples src main java org wso2 siddhi sample this attribute type is also never used . Extending one of the queries written in these examples I would like to be able to do something like : .. . .. . Is any kind of JSON-like data supported by Siddhi If yes what Java object types should be passed to the InputHandler .. . Answer : It accepts java.lang.Object instances . So you can pass any java object there . But those objects are pass-through only Siddhi engine just passes them along with the event and you won t be able to do any modifications processing to those objects unless you write some custom extension . If you want to process json inputs use WSO2 CEP product . You will be able to define mappings and disassemble the json input to some primitive-types like string int float etc that the Siddhi engine can process . Comment : Thanks for your answer . From what I have read the full WSO2 CEP product comes with all the UI etc . not only the Java CEP library I my case I only need the CEP library to integrate it in another product . Comment : Yes it s not a Java library . In that case you may need to use some json library to extract primitives out of the json inputs and send them to Siddhi . Otherwise you can pass json as strings and do some processing with regex matching etc . Comment : docs.wso2.com display CEP400 https : docs.wso2.com display CEP400 Siddhi+Extensions SiddhiExtensions-regex", "Question : I ve been looking into the Drools Fusion Complex Event Processing component and the WSO2 Complex Event Processor Siddhi and I was wondering if one both of these components are capable to handle spatial events for 2D and 3D events . I m interested in creating triggers such as : .. . .. . If the distance between 2 points is less than X miles .. . If a object is inside an area polygon .. . If a object is outside an area polygon .. . .. . Are these triggers such as these possible to create or do I need to write extensions custom functions If spatial event are possible where can I find some documentation that I can look into . What I ve found so far : .. . .. . Drools Fusion : http : blog.athico.com 2009 10 secret-sauce.html Indicating that spatial based questions should be possible It s an old source however . Rules engine for spatial and temporal reasoning http : stackoverflow.com questions 2469567 rules-engine-for-spatial-and-temporal-reasoning Similar question but it s very old .. . .. . WSO2 Complex Event Processor Siddhi : link : wso2.com about news wso2-vp-of-platform-evangelism-to-lead-workshop-on-improving-team-performance-with-big-data-streamin link : prweb.com releases 2014 WSO2 03 StructureData prweb11661730.htm spatial and temporal processing are talked about . link : mail.wso2.org mailarchive architecture 2013-October 013646.html Questions about Spatial Extensions .. . .. . https : docs.wso2.com display CEP310 Writing+Extentions+to+Siddhi Siddhi Extensions .. . .. . Sorry for the Link : part i can t seem to post more than 2 links since I m new here . Thank you for your time and effort Best regards .. . .. . Dennis .. . Answer : I won t be able to answer regarding support in Drools Fusion since am not much aware of Drools . Regarding WSO2 CEP you can find some articles in 1 2 . More functionalities are being added to Siddhi as extensions by using external libraries as discussed in the [email protected] mail thread pointed out by you in the question . Also there is some work for a geo dashboard done in 3 . There are no publicly available articles tutorials as yet on these but you can drop a mail to [email protected] to get more info on the implementation details capabilities if you are interested. . : - .. . .. . 1 http : wso2.com library articles 2014 09 fleet-management-with-wso2-cep .. . .. . 2 http : wso2.com library tutorials 2014 07 tutorial-on-running-cep-fleet-management-samples .. . .. . 3 https : github.com tmkasun geo dashboard Comment : Hi Thank you for your input : I can t mark the question as answered yet since i don t have information about Drools Fusion yet . But writing extensions to WSO2 Siddhi would be a viable option .", "Question : What is the easiest method to learn SiddhiQL . Is there any tool such as Esper EPL Online http : www.esper-epl-tryout.appspot.com epltryout mainform.html for Siddhi Or what is the most easy way for a beginner Thanks .. . Answer : I guess Siddhi Try It under tools provides this help . Comment : Please find the docs for help docs.wso2.com display CEP400 Siddhi+Try+It+Tool https : docs.wso2.com display CEP400 Siddhi+Try+It+Tool you have to use WSO2 CEP 4.0.0 for this .", "Question : null .. . Answer : Using siddhi CEP standalone library running execution plan APCheckInMonitor available in this link for 12 days with 1GB RAM memory slowly increasing and reached 1GB . Can anyone please help me on this . https : drive.google.com folderview id 0BxifNAFRuWpGOEk1Um1OQVZQd00 usp sharing https : drive.google.com folderview id 0BxifNAFRuWpGOEk1Um1OQVZQd00 usp sharing Comment : Please report a public jira under wso2.org jira browse CEP https : wso2.org jira browse CEP with all the information including the Siddhi library version you re using .", "Question : In SiddhiQL how is it possible to insert into multiple streams with same condition When i have two correlated events event1 and event2 and want to insert event1 in streamA insert event2 in streamB insert abstractEvent in streamC . Do i have to write three Siddhi queries Thank you . .. . Answer : Yes you need to write multiple Siddhi queries in same execution plan to insert events into multiple streams . The logic you are selecting events for each stream can be done using a filter . In following case i am inserting odd meta id events in to stream1 and even into stream2 by having a filter . Comment : I have another question regarding WS02 CEP do you know the answer : stackoverflow.com questions 35267646 ws02-cep-event-lifecycle http : stackoverflow.com questions 35267646 ws02-cep-event-lifecycle .", "Question : null .. . Answer : We have WSO2CEP 4.1.0 in cluster distributed mode and Apache Storm . When execution plan of a flow has trigger it can not be deployed to Storm as topology . When I edit execution plan and press Add execution plan button CEP gives me a popup with exception .. . .. . Here is the simplest execution plan that can reproduce this situation . How deploy siddhi execution plan with triggers to Apache Storm Comment : A jira has being created to report this problem - wso2.org jira browse CEP-1541 https : wso2.org jira browse CEP-1541", "Question : Currently WSO2 CEP is triggered using some Http requests . But some times triggered request has null values . At that time how to handle those null values using CEP . Comment : Is it about sending events to CEP http receivers where some attributes have null values Comment : Yes @TharikKanaka It has null values . .. . Answer : There two ways of fixing this .. . .. . 1 . Using default values in Event Receiver input event mapping https : docs.wso2.com display CEP410 Input+Mapping+Types .. . 2 . Using Siddhi by checking is null operator with in the query https : docs.wso2.com display CEP410 SiddhiQL+Guide+3.0 SiddhiQLGuide3.0-QueryProjection", "Question : I need to process an input stream an publish the processed stream which has same schema as input stream to the logger . In other words I need to have the same schema for import and export definitions . How do I solve this issue Is this possible to do in wso2 cep using siddhi QL .. . Answer : Even If both the input and output streams have the same schema still you are required to have two streams with the same schema . If you use the same stream as input and output stream it will make the CEP engine to stuck in an infinite-loop because output of the query becomes an input subsequently if you use the same stream for both input and output . Comment : having two streams with same schema is possible how does an input event decide which schema it belongs-to Comment : It s possible to have two stream with the same schema . When you publish data into a stream you have to specify to which stream you are publishing to . Are you using WSO2 CEP server for this Comment : yes I am using wso2 cep server . I will try it out as you have mentioned", "Question : I need to use an event-table with connection to a PostgreSQL db on execution plan . I tried to extend the Siddhi extension RDBMS event table from siddhi-master branch and while doing the jUnit tests I can interact successful with the database . I add the eventtable.siddhiext file to conf folder and the .jar to dropins folder but when I try to access through the execution plan i cannot establish the connection . Moreover I could create the PostgreSQL Datasource with no problems so the cep can reach the database . .. . Answer : Catarina Actually you don t have to add the eventtable.siddhiext to conf folder. . What you have to do is wrap the .siddhiext with the jar file and copy to the dropins folder As shown in 1 . . Here there are few things that you need to keep in mind . - Since we have an OSGI runtime . Please have a unique package name for your event table extension . - Have a unique name for siddhiext file. . For example postgres.siddhiext . . .. . .. . 1 https : github.com wso2 siddhi tree master modules siddhi-extensions event-table src main resources", "Question : Is there any way to update the MySQL Db without updating the empty values in the stream . If my input data-stream contains some empty values currently that empty value is indicate using data empty value . At that time CEP update the DB with that value data empty . My goal is without updating that empty value update the rest of things . Is it possible to do using siddhi and WSO2 CEP . .. . Answer : It s sort of difficult to update only the non-empty not data empty in your scenario values to the database . However in Siddhi there s a function called ifThenElse condition value if true value if false which can be used in your scenario . Refer to the below sample execution plan for you to get an idea on using ifThenElse and table updating similar to your usecase .", "Question : I am writing a small CEP program using Siddhi https : github.com wso2 siddhi . I can add a callback whenever a given filter outputs a data like this .. . .. . but is there is a way to know that the filter has finished processing and it won t give any more of the above callback . Something like didFinish . I think that would be the ideal place for shutting down SiddhiManager and ExecutionPlanRuntime instances . .. . Answer : No . There in no such functionality and can t be supported in the future also . Rationale behind that is in real-time stream processing queries will process the incoming stream and emit an output stream . There is no concept as finished processing . Query will rather process event as long as there is input . Since your requirement is to shutdown SiddhiManager and ExecutionPlanRuntime recommended way is to do this inside some cleaning method of your program . Or else you can write some java code inside callback to count responses or time-wait and call shutdown . Hope this helps Comment : Thanks for your explanation . I have implemented something similar . When I am done giving input to the query I wait for 5 seconds before calling a shutdown . Very crude approach I know but this is what I am doing now .", "Question : I am working on developing a tool that has the functionality of custom execution plan builder . So by using this tool end users can create large number of execution plans inside WSO2 CEP . I have following 3 concerns on this . 1 Is there any considerable performance impact when having large number of execution plans in CEP There can be around 100 000 execution plans . 2 When having large number of execution plans how to group them 3 Finally I want to load execution plans into the UI of my tool . So end users can customize them . So is there a execution plan parser so we can just pass it though and get it as object . Or any other suggestion about loading execution plan in to UI java program . Thanks .. . Answer : Please find my answers to your questions . 1 . Creating such a large number of execution plans will degradation the performance of your system . 2 . At CEP level we don t have a mechanism to logically grouping Siddhi execution plans . I think it is more appropriate for you to come up with your own grouping scheme to suit your problem domain . 3 . Last year there was a Google Summer of Code GSoc project which implements client-side text-editor for Siddhi execution plans . It was written in JavaScript and included a client-side Siddhi parser . So I think that GSoc project would be a good starting point for you . Herewith I have included the relevant GSoc mail thread http : wso2.markmail.org search q 5BDev 5D 20 5BGSoC-2015 5D 20Proposal2 20 : 20Siddhi 20Editor 20for 20WSO2 20CEP 20 query : 5BDev 5D 20 5BGSoC-2015 5D 20Proposal2 20 : 20Siddhi 20Editor 20for 20WSO2 20CEP 20list : org.wso2.dev 20page : 1 20mid : 7oh6n2stn7pi3ssq 20state : results and the GitHub repository https : github.com TharinduMunasinge CEP-Siddhi Editor of the Siddhi text-editor . I hope above answers will help you to get started with your project . If you need further help regarding this questions please let me know . Good Luck Comment : Thanks for answer do you have testing statistics for large number of execution plans such as that tested CEP with X amount of execution plans and then TPS is reduced this much Comment : @Isc actually we have not benchmarked this but you should be able to add several thousand on execution plans without any issues .", "Question : I m new to Siddhi and I got several questions : .. . .. . 1 . Is SiddhiManager thread safe Is it a good practice one shared instance per JVM 2 . How to define stream and add query at runtime It seems it only has siddhiManager.createExecutionPlanRuntime plan which will create a new ExecutionPlanRuntime instance . And how to redefine stream and query 3 . What s inEvents and removeEvents in QueryCallback executionPlanRuntime.addCallback query1 new QueryCallback .. . @Override .. . public void receive long timeStamp Event inEvents Event removeEvents .. . EventPrinter.print timeStamp inEvents removeEvents .. . .. . .. . .. . .. . 4 . How would Siddhi scale if I have lots of stream and queries Thanks .. . Answer : 1 . Yes . SiddhiManager is Thread safe and it is a good practice to have one shared instance per JVM . In-fact that is how Siddhi Manager is used in WSO2 CEP . 2 . In Siddhi stream definition + query combination is considered as an Execution Plan . There is no dedicated way to edit an execution plan at Siddhi level other than re-deploying that using createExecutionPlan method . Please note that you will get a new ExecutionPlanRuntime object by this . Hence can not reuse old input handler references . 3 . inEvents array represents current-events emitted by Siddhi and removeEvents represent expired-events emitted by Siddhi .. . 4 . Siddhi will scale quite well if you have lot of queries in single execution plan . But when scaling out with multiple execution plans Siddhi will hit the resource threshold quickly since resource utilization is little high per execution plan which will result in performance degredation . Recently we made an improvement to address this limitation as explained in this 1 mail . Improvement is available in master branch . 1 http : wso2-oxygen-tank.10903.n7.nabble.com Siddhi-Making-Disruptor-configurable-td136499.html Comment : Thanks a lot it s really helpful Any plan to support edit an execution plan at runtime Or you think this is useless perhaps Comment : Feature to hot deploy is indeed useful but we have compromised it for the sake of performance . If we are to support hot query swapping there should be a mechanism to prevent loosing events which received during swapping process . This will add a layer of code to the critical path of execution . If we think about the probability of someone hot swapping execution plans at runtime in a production system it is very minimal . Perhaps zero even . So we are basically trading off . That is the reason behind not pursuing a hot deploy solution .", "Question : I wish to call my R scripts from WSO2 DAS server . I have written the following code in siddhi query .. . .. . is my syntax to call a R script correct If it is can someone please tell me why I get this error Error message in DAS console http : i.stack.imgur.com aPXjB.jpg . I have also downloaded the JRI files at https : rforge.net JRI files according to the link given by wso2 . .. . Answer : This is not due to a syntax-error but because of JRI is not properly configured . Please refer WSO2 CEP docs on integrating R and make sure that you are using exact version 1 . You can try few test cases written for R extension 2 . 1 https : docs.wso2.com display CEP400 Installing+R+to+work+with+WSO2+CEP .. . .. . 2 https : github.com wso2-gpl siddhi blob master siddhi-extensions r src test java org wso2 siddhi gpl extension r RScriptTestCase.java", "Question : I m trying to build an execution plan which aggregates different events into one and counts the occurrence CurrentEventId . The plan looks like the following : .. . .. . Actually I have the following output : .. . .. . I need just a single event every 10 seconds and not multiple events . This event should have the following format : .. . .. . Do you have an idea on how to realize that .. . Answer : With siddhi partitions separate events will be generated for each partition variable in this case the CurrentEventId . Since you have two CurrentEventIds you receive two events into outStream . If there were three CurrentEventIds you would have received 3 events separately . As of now there is no way to batch events in siddhi as you have requested . There is a related Jira https : wso2.org jira browse CEP-256 which is similar to the functionality you are expecting .", "Question : Say I have a stream of events and I want to be able to count how many of them there are in a time window . I would like to receive notification whenever an event enters the time window and changes the count and the same when an event exits the time window . The below illustration show what I mean . I m using a time window of length 4 and I want 3 notifications one when the first event enters the window the second when the second event enters and the third when the first event exits the time window . enter image description here http : i.stack.imgur.com eQXqY.png .. . .. . How do I make a query that does that What if I also want to group-by an event s property Here s what I have so far but it doesn t give me a notification when an event leaves the window : @config async true define stream myStream symbol string timeStamp long @info name query1 from myStream window.externalTime timeStamp 10 sec select symbol timeStamp count timeStamp as eventCount group-by symbol insert into outputStream . This is for SIddhi CEP but I imagine Esper would be similar . .. . Answer : From any type of a window in WSO2 CEP you can expect two types of events . 1 . Current events - these are triggered when a new event enters the window . i.e . the new event itself is used as a trigger .. . 2 . Expired events - these are triggered when an existing event in the window exits it . i.e . in case of a time window of 1 minute each event is kept for 1 minute and emitted at the end of 1 minute .. . .. . You can also use a combination of these two in the same query to trigger it from both types of events . An example query that uses both types of triggers in CEP 3.1.0 will be check the docs here https : docs.wso2.com display CEP310 Windows : .. . .. . if you want this to be triggered only using expired events use expired-events in-place of all-events . Same applies for current-events . If you don t specify anything it defaults to current-events that s why your current query doesn t get triggered for expired events . Note that for CEP 4.0.0 the syntax is a bit different for correct syntax check the test source codes here https : github.com wso2 siddhi blob master modules siddhi-core src test java org wso2 siddhi core query window TimeWindowTestCase.java since the docs are still work-in-progress . Comment : That doesn t seem to work . I m using Siddhi 3.0.0-M1 . The query is @config async true define stream myStream symbol string timeStamp long @info name query1 from myStream window.externalTime timeStamp 10 sec select symbol timeStamp count timeStamp as eventCount group-by symbol insert all events into outputStream note the external time . But I still only get events when an event enters the time window . Comment : that s because you are using an external time window which uses an external time stamp . so the window compares times of existing events against the times of new incoming events to expire them and emit . if it s not mandatory to use an external time just use the plain time window window.time 10 sec Comment : also try to use the alpha beta or the latest snapshot of siddhi since it contains fixes to many bugs in M1 . Comment : That worked . But the remove-events are getting called with the wrong timestamp . Looking at the test case here https : github.com wso2 siddhi blob release-3.0.0-Alpha modules siddhi-core src test java org wso2 siddhi core query window ExternalTimeWindowTestCase.java the remove events are getting invoked with timestamp instead of timestamp + timeWindowLength e.g . I would expect the first event to expire at 1366335804341 its timestamp + 5000 time window length . Any ideas Comment : That s actually the expected behaviour . The window just keeps events and emits them once expired doesn t modify anything . There s an extension to get the system timestamp and you can probably use that to insert it to the events inside the select clause .", "Question : I have created simple execution plan with storm support using WSO2 CEP v4.1.0 . But it will give some exceptions when i use window facilities in Siddhi . And Its not possible to join table with stream with use of storm also . How do I resolve this Is there any alternative for it . Execution Plan .. . .. . Given error by CEP .. . .. . Exception : Invalid distributed query specified Error while converting to XML storm query plan . Execution plan : ExecutionPlan Tenant : -1234 . Error in deploying query : @name query1 @dist parallel 8 execGroup Filtering from InputStream window.time 1 sec select id as id param3 as param3 insert into OutputStream Parallelism has to be 1 for window join and pattern queries . .. . Answer : You can t have parallelism of 1 for a query when the query contains a window join or a pattern . This is due to the fact that when the state is distributed across multiple bolts such queries can t be processed correctly . However if you uses partitions https : docs.wso2.com display CEP400 SiddhiQL+Guide+3.0 SiddhiQLGuide3.0-Partition then you can have a parallelism of 1 for window and pattern quarries because once partitioned each partition becomes an isolated unit of processing which can be executed on different bolts independently . Refer to this sample https : docs.wso2.com display CEP400 Sample+0504+-+Processing+a+Distributed+Siddhi+Query+with+Partitioning+by+integrating+with+Apache+Storm for better understanding of a such partitioned query . Comment : Thanks. . But event table join with stream is not working still even though with the partitioning. .", "Question : null .. . Answer : Using Siddhi CEP 3.0.2 as standalone library I am using Pattern partition along with Within option but callback is invoked even when time gab between the linkdown and linkup events is more than the 5 seconds . Can anyone help me on this .", "Question : I m testing a very simple CEP query with an externally timed window . The query is define stream LoginEvents timeStamp long ip string phone string @info name query1 from LoginEvents window.externalTime timeStamp 5 sec select timeStamp ip insert all events into uniqueIps .. . .. . Looking at the unit test here https : github.com wso2 siddhi blob release-3.0.0-M1 modules siddhi-core src test java org wso2 siddhi core query window ExternalTimeWindowTestCase.java I thought what would happen is that the callback would be invoked 9 times 5 times for incoming events and 4 for expiring . Instead it s only invoked once . Why is that and how can I get to the state where the callback is invoked for every event .. . Answer : Here all events are sent to Siddhi without any time delay and hence Siddhi processes all these events together . Thats why the events are returned as a bulk . If you want a callback to be invoked for every event then you have to extend either StreamCallback or QueryCallback and iterate the returned event array and invoke the callback for each event . Comment : Ideally I d like to be able to override send but that s a private method . receiveStreamEvent is public but with private fields...Are there any other possible hooks Comment : Currently there are non but we ll add this to the road map such that the users can disable bulk event processing .", "Question : null .. . Answer : I am using Siddhi CEP 3.0.2 as standalone library . I have single execution plan with below stream query definitions to correlate the consecutive events and detect the change . I am invoking custom function-call . Object attributes mentioned in stream definition are custom java object and java.util.Map object types . On every event occurrence periodically say 5 minutes I could see CPU utilization is reaching around 40 to 50 for a second and gradually falls down . But this CPU utilization is increasing on every 5th minute . Is something wrong in my way of using pattern query . Any help on this Comment : I have the same problem . When I use the every for pattern detection I have a very high CPU-load and a poor event output . The processing take a long time ." ] }
[ "yes-answer-long", "yes-answer-short" ]
open-source
UNK_RELATION
package-private@access-control@51
package-private -- package-private is the default @placeholder modifier in java .
{ "confidence": [ 49.85939407348633, 47.474510192871094, 47.474510192871094, 45.350440979003906, 44.825347900390625, 44.671653747558594, 44.64901351928711, 44.281494140625, 43.18335723876953, 43.05487823486328, 43.04087448120117, 42.86863708496094, 42.310646057128906, 41.7691650390625, 40.875022888183594, 40.875022888183594, 40.875022888183594, 39.793922424316406, 39.1287727355957, 38.98786163330078, 38.98786163330078, 38.98786163330078, 38.98786163330078, 37.552955627441406, 37.326316833496094, 36.34010314941406, 36.11628723144531, 35.840980529785156, 35.840980529785156, 35.840980529785156, 35.840980529785156, 35.840980529785156, 35.840980529785156, 35.760986328125, 35.63508605957031, 35.60260009765625, 35.47428894042969, 35.25464630126953, 34.87431335449219, 34.176395416259766, 33.56684494018555, 33.33258056640625, 32.965301513671875, 32.965301513671875, 31.60215187072754, 31.60215187072754, 31.60215187072754, 31.60215187072754, 31.60215187072754, 31.60215187072754, 31.60215187072754, 31.440221786499023, 30.42447280883789, 30.42447280883789, 30.18709945678711, 29.854164123535156, 29.854164123535156, 29.3111572265625, 29.080053329467773, 29.007898330688477, 29.007898330688477, 28.59321403503418, 28.36576271057129, 27.43975257873535, 26.666975021362305, 26.19611358642578, 25.771209716796875, 25.51457977294922, 25.51457977294922, 25.51457977294922, 25.2291316986084, 25.034740447998047, 24.978530883789062, 24.978530883789062, 24.852630615234375, 24.51153564453125, 23.62045669555664, 23.09748077392578, 22.947574615478516, 22.947574615478516, 22.789405822753906, 22.789405822753906, 22.57038116455078, 22.476322174072266, 22.460039138793945, 22.242420196533203, 22.242420196533203, 22.242420196533203, 22.015901565551758, 20.85367202758789, 20.85367202758789, 20.81969451904297, 20.81969451904297, 20.81969451904297, 20.81969451904297, 20.81969451904297, 20.81969451904297, 19.685243606567383, 19.61418914794922, 19.61418914794922 ], "content": [ "In other words what are the major pros and cons of the default package-private modifier", "Package private and default access are the same .", "@BZ Isn t the default package-private", "package-private .", "No modifier anything in the package can read it - so not truly private .", "Hence package-private means same as default .", ".. . So package mypackage is both more and less restrictive that Java package-private .", "This comes from the fact that Java private package isn t equivalent to Scala private package .", "@BZ Which said : If a class has no modifier the default also known as package-private .", "The default access modifier the one where none of them are explicitly given is package-private which means only things in the same package can access them .", "But what about package-private .", "I realize that inner classes can be private protected or package-private but outer classes can only be package-private or public .", "The package-private term actually is termed by the meaning of private modifier as private means it is available only in same class and no other classes or subclasses can access it within same package or without .", "The protected modifier specifies that the member can only be accessed within its own package as with package-private and in addition by a subclass of its class in another package .", "Aren t package-private and default access both synonymous with protected", "Its worth noting that the default access for interface member is not package-private .", "@BZ - the terms default and package-private are often used interchangeably .", "default and package-private both are same which means both can be used by any class till they are in same package .", "questions 6470556 pros-and-cons-of-package-private-classes-in-java 8 answers .. . .. . I love access-control in any language but I find that in Java I almost never if ever use the package-private http : docs.oracle.com javase tutorial java javaOO accesscontrol.html access modifier or lack thereof .", "So there is no keyword whatsoever to express package-private access", "Why can an outer class be package-private but not protected", "I seldom see the use of package-private class .", "If it was not package-private before the move : .. . .. . Well tough luck .", "The default access for classes is package-private however the default access for interface members is public .", "If we reconstruct this issue with a simpler example : .. . .. . And decompile this in Java : .. . .. . We see that private package in Scala becomes public in Java .", "Look at the table of permissions - there is a difference between private and no modifier .", "I am learning Java recently and I came across the notion of package-private classes which is the default if we don t specify anything .", "In what situation should we use package-private in the real world", "I remember that I read somewhere that subclass could be a substitute for package-private .", "That would give you the organizational structure and the benefit of package-private access correct", "If any other class is defined in the same file it must be package-private .", "Protected members are or may be intended for inheritance while package-private members are not .", "You are not specifying if Helper was already package-private before the move .", "I am a little confused over the term package-private that some of the documentation uses along with the usage of default access .", "Sample innocently bystanding client : .. . .. . Changing package of package-private class : .. . .. . Javap shows why .", "This question already has an answer here : .. . .. . Pros and cons of package-private classes in Java", "I can see why someone might have said that - the protected modifier is the same as package-private except that subclasses are also invited to the party .", "package-private and default access are synonym.. . An object also can access protected member of the objects whose classes are on the same package. . An object also can access protected member of its superclasses without a condition about their package .", "Maybe this is what s confusing you : the body of the package in which a private type is declared has direct access to those fields .", "Java s packages are not hierarchical and package-private grants access only to classes in that package as well as subclasses of the original class something that Scala s private mypackage does not allow .", "One nice thing about package-private is that you can use it to give access to methods you would otherwise consider private to unit test classes .", "There is a nice explanation in this post http : www.scala-lang.org old node 11418.html : .. . .. . The important distinction is that private mypackage in Scala is not Java package-private however much it looks like it .", "I use package-private classes and methods when I want to hide implementation details from users and other classes outside the package .", "Package-private members are often used so multilpe classes inside a package can access implementation-specific attributes or utility methods .", "If you seal your jar file package-private methods can also help restrict who can access these methods .", "Unsealed jars allow anyone to make classes in your packages so they will get access to package-private or protected methods", "For the question part why outer classes may be package-private but not protected I have no answer .", "Apart from encapsulation one of the main advantages of using package-private classes is that they do not appear in the javadoc of your project .", "Sorry if it was unclear yes Helper has been package-private before nothing changed regarding its visibility .", "Note that I can use various package-private methods of Spark it s not just about Broadcast .", "For both reasons JVM package-private can t be used to implement it and the only option that allows the uses that Scala exposes in the compiler is public .", "In early releases of the compiler around 1.1.2 3 package was an allowed modifier but ignored meaning the same as no modifier i.e .", "In this context it makes perfect sense to make methods public if they re going to be called by consumers private if they re internal to a class and package-private if they re used to call between classes in this module i.e .", "Please notice that when you are speaking about classes you have only two options : .. . .. . 1 . public classes .. . 2 . package-private classes .. . .. . The concept of private class is meaningless .", "Package Private its used when you have several packages and it means other classes in the same package can access that class or class member as public classes in other packages cannot access its like private like them .", "Good examples to this are the package-private constructor of String and the StringBuilder.value char array : .. . .. . So classes inside the java.lang package can efficiently create new Strings if the content is already present in a char without compromising security .", "Because of an issue with package name aux under Windows I am moving a helper class within the package hierarchy of my library from .. . .. . to .. . .. . The class is private to the library i.e .", "As for client java code it s a bit different because even if Helper is package-private its visibility is still public as far as the JVM is concerned and thus the java compiler will happily let client code access Helper thus client java code might very well already access Helper despite it being declared package-private .", "not public protected private is not the same as private - its a 4th state .", "Thus he can make sure that package-private accesses between classes adhere to the encapsulated logic of the accessed class and that these accesses do not break anything .", "The package-private access level is more restrictive than protected : protected attributes and methods can still be accessed by simply subclassing a class .", "So I ll treat both cases : .. . .. . If it was already package-private : .. . .. . I suspect that the migration-manager reports an incompatibility only because it must stay conservative : packages are open in scala like in java which means that client code might very well define a class package scalainterpreter .", "private scalainterpreter object Helper .", "This is a HUGE difference from a private class .", "Yup what I meant is that now that I know all Spark internals declared as package-private as exposed through the Java API I think there should probably be more Java wrappers to hide functionalities that weren t intended to be public .", "The short answer is - it s a slightly wider form of private .", "From Java Language Spec http : java.sun.com docs books jls third edition html names.html 6.6.1 .. . .. . 6.6.5 Example : Default-Access Fields Methods and Constructors If none of the access modifiers public protected or private are specified a class member or constructor is accessible throughout the package that contains the declaration of the class in which the class member is declared but the class member or constructor is not accessible in any other package .", "I am trying to learn how to use private declarations in Ada and also to understand packaging .", "At this point the Horz and Vert fields in the private type are present but unset they could contain anything .", "When you call Rectangular Form.Vector Basis r its implementation sets the values of those private fields .", "So if you have a class for intermediate operations that needn t to be exposed to API users you are supposed to declare it as package-private .. . .. . Also when you define many classes in the same source file only one class is allowed to be public its name matched the .java file name .", "TurtleToes that s right and this can be a bit confusing in Java 8 since it s actually possible to put default modifier in front of interface methods .", ".. . If a public class has a method or constructor with default access then this method or constructor is not accessible to or inherited by a subclass declared outside this package", "If you use default access for the abstract-class then people only see it if they put their class in your package .", "Protected means that not only classes in the same package but also subclasses regardless of which package those subclasses are in will be able to access it .", "That said the fact that it does not prevent the details from leaking as private would i.e .", "I ll assume that you re familiar with the distinction between public and private and why it s generally good practice to make methods and variables private if they re going to be used solely internally to the class in question .", "But that s not an access modifier", "For example if I have an interface and a factory class that creates instances of that interface I may have the implementation class as a separate file but mark it package-private so others can not use it nor will it clutter the JavaDoc if javadoc set to only show public .", "So if you use some helper classes which have no other use but to help your public classes do something clients need it makes sense to make them package-private as you want to keep things as simple as possible for users of the library .", "Same package class instances also can access protected members. .", "What is the benefit of restricting classes methods fields to be seen by the entire package but not subclasses", "why do not I have to use the methods set Horz A and set Vert A prior to issuing the command .. . .. . Because you re setting the fields of your private record by executing : .. . .. . Rectangular Form.Vector Basis r A Theta D Basis r .. . .. . Review the implementation of Vector Basis r .", "Just add the following file : .. . .. . package de.sciss .. . .. . package object scalainterpreter .. . object aux .. . val Helper root .de.sciss.scalainterpreter.Helper .. . .. . .. . .. . .. . With the above you can still access Helper as de.sciss.scalainterpreter.aux.Helper and it still compiles under windows unlike defining a package aux which does not compile because of the reserved meaning as a file name .", "It is only implied by not specifying the access modifier", "It looks like you didn t notice that Ziyao was using a compound two-word term as opposed to just private .", "Indeed Broadcast.destroy Boolean is declared as private spark so it should not be visible from my code .", "I wonder if they could use some annotation trick to generate warnings on the user when they try using a member that was intended to be private", "dump all of the classes for a given module into exactly the same package -- unwieldy -- Correct but I ve used this approach even in non-trivial cases like 20-30 classes in package .", "i had the same issue at the end i decided to use reflection for instantiating objects and invoke private methods in unit tests packages", "Scala packages are truly hierarchical and private mypackage grants access to classes and objects up to mypackage including all the hierarchical packages that may be between .", "However being in the same package implies nothing about the inheritance relationship between classes -- it s purely a naming convention .", "If a method is public or protected subclasses can still see and call that method even if it s in a different package .", "This is seldom used in practice because the package system turns out to not be so useful for this sort of thing .", "The downside of course being that other classes in the package could call it when they really shouldn t .", "I guess they could have invented another keyword package was already taken but they didn t .", "However let s be pragmatic : de.sciss.scalainterpreter.aux is your package and so should be their sub-packages and nobody should define their own classes there .", "In StringBuilder or rather AbstractStringBuilder where the implementation comes from the char array holding the current value char value and an accessor method to this char getValue are also package-private so various utility methods of String like contentEquals StringBuffer sb and contentEquals CharSequence cs can utilize this for efficiency and faster comparisions without exposing the internal char array to the world .", "I m not the downvoter but I guess it s because it s not quite right an object can access protected members of superclasses regardless of package .", "You d have to dump all of the classes for a given module into exactly the same package which for anything non-trivial is going to get a bit unwieldy ." ] }
{ "confidence": [ 58.07118225097656, 57.02467346191406, 56.82463836669922, 56.78205108642578, 56.376495361328125, 55.27751922607422, 53.76640319824219, 53.103179931640625, 52.735374450683594, 51.29346466064453, 50.955841064453125, 50.2708740234375, 49.557861328125, 48.4212646484375, 48.275360107421875, 48.18524169921875, 46.54303741455078, 41.98919677734375, 39.718544006347656, 33.462135314941406 ], "content": [ "Question : I am a little confused over the term package-private that some of the documentation uses along with the usage of default access . Aren t package-private and default access both synonymous with protected Comment : So there is no keyword whatsoever to express package-private access It is only implied by not specifying the access modifier Comment : TurtleToes that s right and this can be a bit confusing in Java 8 since it s actually possible to put default modifier in front of interface methods . But that s not an access modifier All access modifiers and their scopes is visualized clearly in this table http : stackoverflow.com a 33627846 276052 . Comment : you might also check the tutorial table from docs.oracle.com javase tutorial java javaOO accesscontrol.html http : docs.oracle.com javase tutorial java javaOO accesscontrol.html .. . Answer : default and package-private both are same which means both can be used by any class till they are in same package . The package-private term actually is termed by the meaning of private modifier as private means it is available only in same class and no other classes or subclasses can access it within same package or without . Hence package-private means same as default .", "Question : I am learning Java recently and I came across the notion of package-private classes which is the default if we don t specify anything . But then I realized : .. . .. . 1 . I seldom see the use of package-private class . Is there a reason for this e.g . it has serious drawbacks it is redundant or simply I am not reading enough Are there strong arguments for against its usage 2 . If it is really not useful in most cases why would it be the default 3 . In what situation should we use package-private in the real world I.e . when would it become irreplaceable In other words what are the major pros and cons of the default package-private modifier Comment : +1 For asking why and how - .. . Answer : 1 - Depends on the architecture -Generally if you are writing code just for yourself and on small projects you probably wouldn t use it . In larger projects it can be helpful to ensure that you can control where and how certain methods are called . 2 - Default I.e . not public protected private is not the same as private - its a 4th state . See Java Access Control http : download.oracle.com javase tutorial java javaOO accesscontrol.html .. . .. . 3 - It can make life easier when you re writing libraries that you don t want third parties relying on how you are implementing the underlying code - you just make the API itself public . Comment : @BZ Isn t the default package-private Comment : download.oracle.com javase tutorial java javaOO http : download.oracle.com javase tutorial java javaOO accesscontrol.html Comment : @BZ Which said : If a class has no modifier the default also known as package-private . Thanks for the answer terminology is trivial : Comment : Look at the table of permissions - there is a difference between private and no modifier . No modifier anything in the package can read it - so not truly private . This is a HUGE difference from a private class . Comment : @BZ - the terms default and package-private are often used interchangeably . It looks like you didn t notice that Ziyao was using a compound two-word term as opposed to just private .", "Question : I am a little confused over the term package-private that some of the documentation uses along with the usage of default access . Aren t package-private and default access both synonymous with protected Comment : So there is no keyword whatsoever to express package-private access It is only implied by not specifying the access modifier Comment : TurtleToes that s right and this can be a bit confusing in Java 8 since it s actually possible to put default modifier in front of interface methods . But that s not an access modifier All access modifiers and their scopes is visualized clearly in this table http : stackoverflow.com a 33627846 276052 . Comment : you might also check the tutorial table from docs.oracle.com javase tutorial java javaOO accesscontrol.html http : docs.oracle.com javase tutorial java javaOO accesscontrol.html .. . Answer : Package private and default access are the same . In early releases of the compiler around 1.1.2 3 package was an allowed modifier but ignored meaning the same as no modifier i.e . package-private . Shortly afterwards there was a short lived fashion for putting package as a comment in such situations . Similarly at that time you could declare things like synchronized classes . Neither of them is the same as protected which extends to derived classes in other packages .", "Question : I am a little confused over the term package-private that some of the documentation uses along with the usage of default access . Aren t package-private and default access both synonymous with protected Comment : So there is no keyword whatsoever to express package-private access It is only implied by not specifying the access modifier Comment : TurtleToes that s right and this can be a bit confusing in Java 8 since it s actually possible to put default modifier in front of interface methods . But that s not an access modifier All access modifiers and their scopes is visualized clearly in this table http : stackoverflow.com a 33627846 276052 . Comment : you might also check the tutorial table from docs.oracle.com javase tutorial java javaOO accesscontrol.html http : docs.oracle.com javase tutorial java javaOO accesscontrol.html .. . Answer : The default access for classes is package-private however the default access for interface members is public . e.g . The default access rules for interfaces are not the same as for classes .", "Question : I am a little confused over the term package-private that some of the documentation uses along with the usage of default access . Aren t package-private and default access both synonymous with protected Comment : So there is no keyword whatsoever to express package-private access It is only implied by not specifying the access modifier Comment : TurtleToes that s right and this can be a bit confusing in Java 8 since it s actually possible to put default modifier in front of interface methods . But that s not an access modifier All access modifiers and their scopes is visualized clearly in this table http : stackoverflow.com a 33627846 276052 . Comment : you might also check the tutorial table from docs.oracle.com javase tutorial java javaOO accesscontrol.html http : docs.oracle.com javase tutorial java javaOO accesscontrol.html .. . Answer : From Java Language Spec http : java.sun.com docs books jls third edition html names.html 6.6.1 .. . .. . 6.6.5 Example : Default-Access Fields Methods and Constructors If none of the access modifiers public protected or private are specified a class member or constructor is accessible throughout the package that contains the declaration of the class in which the class member is declared but the class member or constructor is not accessible in any other package . .. . If a public class has a method or constructor with default access then this method or constructor is not accessible to or inherited by a subclass declared outside this package Comment : But what about package-private . That isn t in the JLS .", "Question : I am a little confused over the term package-private that some of the documentation uses along with the usage of default access . Aren t package-private and default access both synonymous with protected Comment : So there is no keyword whatsoever to express package-private access It is only implied by not specifying the access modifier Comment : TurtleToes that s right and this can be a bit confusing in Java 8 since it s actually possible to put default modifier in front of interface methods . But that s not an access modifier All access modifiers and their scopes is visualized clearly in this table http : stackoverflow.com a 33627846 276052 . Comment : you might also check the tutorial table from docs.oracle.com javase tutorial java javaOO accesscontrol.html http : docs.oracle.com javase tutorial java javaOO accesscontrol.html .. . Answer : package-private and default access are synonym.. . An object also can access protected member of the objects whose classes are on the same package. . An object also can access protected member of its superclasses without a condition about their package . As a concrete example Comment : downvoter could explain what is wrong of this explanation . . except bad wording. . Comment : I m not the downvoter but I guess it s because it s not quite right an object can access protected members of superclasses regardless of package .", "Question : I am a little confused over the term package-private that some of the documentation uses along with the usage of default access . Aren t package-private and default access both synonymous with protected Comment : So there is no keyword whatsoever to express package-private access It is only implied by not specifying the access modifier Comment : TurtleToes that s right and this can be a bit confusing in Java 8 since it s actually possible to put default modifier in front of interface methods . But that s not an access modifier All access modifiers and their scopes is visualized clearly in this table http : stackoverflow.com a 33627846 276052 . Comment : you might also check the tutorial table from docs.oracle.com javase tutorial java javaOO accesscontrol.html http : docs.oracle.com javase tutorial java javaOO accesscontrol.html .. . Answer : Yes it s almost the same . The protected modifier specifies that the member can only be accessed within its own package as with package-private and in addition by a subclass of its class in another package . Comment : That was the answer I was looking for thanks Comment : There were a lot of good answers here but this one explained it simple and to the point so I m accepting it Comment : Its worth noting that the default access for interface member is not package-private . Comment : @PeterLawrey Oh What is the default access for interface members then Comment : The default for a field is public static final for a method is public abstract for an enum or annotation is public and for a class it public static", "Question : I am a little confused over the term package-private that some of the documentation uses along with the usage of default access . Aren t package-private and default access both synonymous with protected Comment : So there is no keyword whatsoever to express package-private access It is only implied by not specifying the access modifier Comment : TurtleToes that s right and this can be a bit confusing in Java 8 since it s actually possible to put default modifier in front of interface methods . But that s not an access modifier All access modifiers and their scopes is visualized clearly in this table http : stackoverflow.com a 33627846 276052 . Comment : you might also check the tutorial table from docs.oracle.com javase tutorial java javaOO accesscontrol.html http : docs.oracle.com javase tutorial java javaOO accesscontrol.html .. . Answer : The default access modifier the one where none of them are explicitly given is package-private which means only things in the same package can access them . However being in the same package implies nothing about the inheritance relationship between classes -- it s purely a naming convention . Protected means that not only classes in the same package but also subclasses regardless of which package those subclasses are in will be able to access it . Comment : well your wording about protected is wrong. . Same package class instances also can access protected members. . Comment : You re right my bad . Fixed now :", "Question : I am learning Java recently and I came across the notion of package-private classes which is the default if we don t specify anything . But then I realized : .. . .. . 1 . I seldom see the use of package-private class . Is there a reason for this e.g . it has serious drawbacks it is redundant or simply I am not reading enough Are there strong arguments for against its usage 2 . If it is really not useful in most cases why would it be the default 3 . In what situation should we use package-private in the real world I.e . when would it become irreplaceable In other words what are the major pros and cons of the default package-private modifier Comment : +1 For asking why and how - .. . Answer : Please notice that when you are speaking about classes you have only two options : .. . .. . 1 . public classes .. . 2 . package-private classes .. . .. . The concept of private class is meaningless . Why to make a class that is not used anywhere So if you have a class for intermediate operations that needn t to be exposed to API users you are supposed to declare it as package-private .. . .. . Also when you define many classes in the same source file only one class is allowed to be public its name matched the .java file name . If any other class is defined in the same file it must be package-private .", "Question : I am learning Java recently and I came across the notion of package-private classes which is the default if we don t specify anything . But then I realized : .. . .. . 1 . I seldom see the use of package-private class . Is there a reason for this e.g . it has serious drawbacks it is redundant or simply I am not reading enough Are there strong arguments for against its usage 2 . If it is really not useful in most cases why would it be the default 3 . In what situation should we use package-private in the real world I.e . when would it become irreplaceable In other words what are the major pros and cons of the default package-private modifier Comment : +1 For asking why and how - .. . Answer : One nice thing about package-private is that you can use it to give access to methods you would otherwise consider private to unit test classes . The downside of course being that other classes in the package could call it when they really shouldn t . Comment : i had the same issue at the end i decided to use reflection for instantiating objects and invoke private methods in unit tests packages", "Question : I am learning Java recently and I came across the notion of package-private classes which is the default if we don t specify anything . But then I realized : .. . .. . 1 . I seldom see the use of package-private class . Is there a reason for this e.g . it has serious drawbacks it is redundant or simply I am not reading enough Are there strong arguments for against its usage 2 . If it is really not useful in most cases why would it be the default 3 . In what situation should we use package-private in the real world I.e . when would it become irreplaceable In other words what are the major pros and cons of the default package-private modifier Comment : +1 For asking why and how - .. . Answer : Package Private its used when you have several packages and it means other classes in the same package can access that class or class member as public classes in other packages cannot access its like private like them .", "Question : This question already has an answer here : .. . .. . Pros and cons of package-private classes in Java questions 6470556 pros-and-cons-of-package-private-classes-in-java 8 answers .. . .. . I love access-control in any language but I find that in Java I almost never if ever use the package-private http : docs.oracle.com javase tutorial java javaOO accesscontrol.html access modifier or lack thereof . I realize that inner classes can be private protected or package-private but outer classes can only be package-private or public . Why can an outer class be package-private but not protected What is the benefit of restricting classes methods fields to be seen by the entire package but not subclasses .. . Answer : In many cases peer classes in the same package have the same author thus he knows about the inner way these classes work or in other words he knows about the encapsulated logic of these classes . Thus he can make sure that package-private accesses between classes adhere to the encapsulated logic of the accessed class and that these accesses do not break anything . These direct accesses are often useful for optimizations and for keeping the amount of source code smaller . For the question part why outer classes may be package-private but not protected I have no answer .", "Question : I am learning Java recently and I came across the notion of package-private classes which is the default if we don t specify anything . But then I realized : .. . .. . 1 . I seldom see the use of package-private class . Is there a reason for this e.g . it has serious drawbacks it is redundant or simply I am not reading enough Are there strong arguments for against its usage 2 . If it is really not useful in most cases why would it be the default 3 . In what situation should we use package-private in the real world I.e . when would it become irreplaceable In other words what are the major pros and cons of the default package-private modifier Comment : +1 For asking why and how - .. . Answer : The package-private access level is more restrictive than protected : protected attributes and methods can still be accessed by simply subclassing a class . Protected members are or may be intended for inheritance while package-private members are not . Package-private members are often used so multilpe classes inside a package can access implementation-specific attributes or utility methods . Good examples to this are the package-private constructor of String and the StringBuilder.value char array : .. . .. . So classes inside the java.lang package can efficiently create new Strings if the content is already present in a char without compromising security . You cannot do this from your application because if you could you would have access reference to the internal char array of a String which is immutable reflection not counted . In StringBuilder or rather AbstractStringBuilder where the implementation comes from the char array holding the current value char value and an accessor method to this char getValue are also package-private so various utility methods of String like contentEquals StringBuffer sb and contentEquals CharSequence cs can utilize this for efficiency and faster comparisions without exposing the internal char array to the world .", "Question : This question already has an answer here : .. . .. . Pros and cons of package-private classes in Java questions 6470556 pros-and-cons-of-package-private-classes-in-java 8 answers .. . .. . I love access-control in any language but I find that in Java I almost never if ever use the package-private http : docs.oracle.com javase tutorial java javaOO accesscontrol.html access modifier or lack thereof . I realize that inner classes can be private protected or package-private but outer classes can only be package-private or public . Why can an outer class be package-private but not protected What is the benefit of restricting classes methods fields to be seen by the entire package but not subclasses .. . Answer : I use package-private classes and methods when I want to hide implementation details from users and other classes outside the package . For example if I have an interface and a factory class that creates instances of that interface I may have the implementation class as a separate file but mark it package-private so others can not use it nor will it clutter the JavaDoc if javadoc set to only show public . If you seal your jar file package-private methods can also help restrict who can access these methods . If a method is public or protected subclasses can still see and call that method even if it s in a different package . Unsealed jars allow anyone to make classes in your packages so they will get access to package-private or protected methods", "Question : I am learning Java recently and I came across the notion of package-private classes which is the default if we don t specify anything . But then I realized : .. . .. . 1 . I seldom see the use of package-private class . Is there a reason for this e.g . it has serious drawbacks it is redundant or simply I am not reading enough Are there strong arguments for against its usage 2 . If it is really not useful in most cases why would it be the default 3 . In what situation should we use package-private in the real world I.e . when would it become irreplaceable In other words what are the major pros and cons of the default package-private modifier Comment : +1 For asking why and how - .. . Answer : Apart from encapsulation one of the main advantages of using package-private classes is that they do not appear in the javadoc of your project . So if you use some helper classes which have no other use but to help your public classes do something clients need it makes sense to make them package-private as you want to keep things as simple as possible for users of the library . As an example you can have a look at a library that I have developed . The javadoc http : assylias.github.io jBloomberg apidocs index.html index-all.html only contains 5 interfaces and 12 classes although the source code https : github.com assylias jBloomberg tree master src main java com assylias jbloomberg has a lot more . But what is hidden is mostly internal layers that provide no added-value for a client typically all the abstract base classes are hidden . There are also many examples in the JDK .", "Question : I am learning Java recently and I came across the notion of package-private classes which is the default if we don t specify anything . But then I realized : .. . .. . 1 . I seldom see the use of package-private class . Is there a reason for this e.g . it has serious drawbacks it is redundant or simply I am not reading enough Are there strong arguments for against its usage 2 . If it is really not useful in most cases why would it be the default 3 . In what situation should we use package-private in the real world I.e . when would it become irreplaceable In other words what are the major pros and cons of the default package-private modifier Comment : +1 For asking why and how - .. . Answer : The short answer is - it s a slightly wider form of private . I ll assume that you re familiar with the distinction between public and private and why it s generally good practice to make methods and variables private if they re going to be used solely internally to the class in question . Well as an extension to that - if you re thinking about creating your software in a modular way you might think about a public interface to your module which will have multiple classes inside it collaborating between themselves . In this context it makes perfect sense to make methods public if they re going to be called by consumers private if they re internal to a class and package-private if they re used to call between classes in this module i.e . it s an implementation detail of your module as seen by public callers but spans several classes . This is seldom used in practice because the package system turns out to not be so useful for this sort of thing . You d have to dump all of the classes for a given module into exactly the same package which for anything non-trivial is going to get a bit unwieldy . So the idea is great - make a method accessible to just a handful of nearby classes as a slightly wider private - but the restrictions on how you define that set of classes means it s rarely used useful . Comment : I remember that I read somewhere that subclass could be a substitute for package-private . Will that work Thanks Comment : I can see why someone might have said that - the protected modifier is the same as package-private except that subclasses are also invited to the party . But it would be wrong to create a subclass relationship just for access purposes if one didn t naturally exist . It wouldn t generally make any sense for e.g . an EmailSender class to be a subclass of an DomainObjectFilter class or vice versa . In this situation the method is generally just made public perhaps with a comment saying that it s not conceptually public.. . . Comment : dump all of the classes for a given module into exactly the same package -- unwieldy -- Correct but I ve used this approach even in non-trivial cases like 20-30 classes in package . Anything bigger of course is in need for refactoring . Comment : Couldn t you organize your source files into a directory hierarchy and then during build dump them all into the same directory package before compile That would give you the organizational structure and the benefit of package-private access correct", "Question : I am learning Java recently and I came across the notion of package-private classes which is the default if we don t specify anything . But then I realized : .. . .. . 1 . I seldom see the use of package-private class . Is there a reason for this e.g . it has serious drawbacks it is redundant or simply I am not reading enough Are there strong arguments for against its usage 2 . If it is really not useful in most cases why would it be the default 3 . In what situation should we use package-private in the real world I.e . when would it become irreplaceable In other words what are the major pros and cons of the default package-private modifier Comment : +1 For asking why and how - .. . Answer : Regarding the question of why would it be the default in this context the term default just means the absence of another qualifier . I guess they could have invented another keyword package was already taken but they didn t . In the real world I use default access for utility classes and abstract classes that I don t want people to call or otherwise use from other packages . Let s say you have an interface and two concrete implementations that extend from some abstract-class . You declare your two concrete classes as final because you don t necessarily want people to subclass them see Effective Java . You also don t want people to monkey around with your abstract-class for the same reason . If you use default access for the abstract-class then people only see it if they put their class in your package . It s not bullet proof but I think it s a reasonable use illustration of default access . That said the fact that it does not prevent the details from leaking as private would i.e . doesn t guarantee anything means that it s not a particularly useful convention . Another reason why you haven t see it used more often is that people tend to exclude classes with default access from their javadocs . Comment : He s not misunderstanding the term default he s asking why it is the default access-level . One reason for a default is that something is most often used . There are other reasons and he s asking for them . Comment : I m not sure you re right but I m happy to update the response for clarity .", "Question : I just found out about a pretty weird behaviour of Scala scoping when bytecode generated from Scala code is used from Java code . Consider the following snippet using Spark Spark 1.4 Hadoop 2.6 : .. . .. . This code fails which is expected as I voluntarily destroy a Broadcast before using it but the thing is that in my mental model it should not even compile let alone running fine . Indeed Broadcast.destroy Boolean is declared as private spark so it should not be visible from my code . I ll try looking at the bytecode of Broadcast but it s not my specialty that s why I prefer posting this question . Also sorry I was too lazy to create an example that does not depend on Spark but at least you get the idea . Note that I can use various package-private methods of Spark it s not just about Broadcast . Any idea of what s going on .. . Answer : If we reconstruct this issue with a simpler example : .. . .. . And decompile this in Java : .. . .. . We see that private package in Scala becomes public in Java . Why This comes from the fact that Java private package isn t equivalent to Scala private package . There is a nice explanation in this post http : www.scala-lang.org old node 11418.html : .. . .. . The important distinction is that private mypackage in Scala is not Java package-private however much it looks like it . Scala packages are truly hierarchical and private mypackage grants access to classes and objects up to mypackage including all the hierarchical packages that may be between . I don t have the Scala spec reference for this and my understating here may be hazy I m using 4 http : www.ibm.com developerworks java library j-scala07298 index.html as a reference . Java s packages are not hierarchical and package-private grants access only to classes in that package as well as subclasses of the original class something that Scala s private mypackage does not allow . .. . So package mypackage is both more and less restrictive that Java package-private . For both reasons JVM package-private can t be used to implement it and the only option that allows the uses that Scala exposes in the compiler is public . Comment : Thanks for the answer . Don t you think this is a bit dangerous for API writers Functionalities they never wanted to be exposed end up plainly visible from Java . I wonder if they could use some annotation trick to generate warnings on the user when they try using a member that was intended to be private Comment : @Dici If you plan to interop with Java then yes I definitely think it is something you have to take under consideration especially if this exposes internals you don t want clients to invoke . Although in this particular case you could also call the public Broadcast.destory method shooting yourself in the foot equivalently . Comment : Yup what I meant is that now that I know all Spark internals declared as package-private as exposed through the Java API I think there should probably be more Java wrappers to hide functionalities that weren t intended to be public . My example was just to show the method was actually called . Comment : @Dici This would perhaps be a good question for the Spark mailing list http : apache-spark-user-list.1001560.n3.nabble.com Comment : @Antimony You re right but the effort of using reflection usually makes people think it s not worth it unlike simply invoking a method which is right there . I agree that this can be problematic .", "Question : Because of an issue with package name aux under Windows I am moving a helper class within the package hierarchy of my library from .. . .. . to .. . .. . The class is private to the library i.e . private scalainterpreter object Helper . Now using the Typesafe Migration-Manager http : typesafe.com technology migration-manager obviously it reports that the change is not compatible : .. . .. . But I suspect that if client code does not call into either object the interfaces are still compatible and thus I can use a minor version increase to indicate the change and allow those two versions to be used interchangeably . Correct .. . Answer : You are not specifying if Helper was already package-private before the move . So I ll treat both cases : .. . .. . If it was already package-private : .. . .. . I suspect that the migration-manager reports an incompatibility only because it must stay conservative : packages are open in scala like in java which means that client code might very well define a class package scalainterpreter . So by moving Helper you would indeed break that class . However let s be pragmatic : de.sciss.scalainterpreter.aux is your package and so should be their sub-packages and nobody should define their own classes there . With this additional prerequiste moving Helper is indeed a binary compatible change toward client scala code . As for client java code it s a bit different because even if Helper is package-private its visibility is still public as far as the JVM is concerned and thus the java compiler will happily let client code access Helper thus client java code might very well already access Helper despite it being declared package-private . If it was not package-private before the move : .. . .. . Well tough luck . Client code could very well already access Helper and the move will certainly break that . As a side note you can employ a little trick to make the change source-compatible but alas not binary-compatible . Just add the following file : .. . .. . package de.sciss .. . .. . package object scalainterpreter .. . object aux .. . val Helper root .de.sciss.scalainterpreter.Helper .. . .. . .. . .. . .. . With the above you can still access Helper as de.sciss.scalainterpreter.aux.Helper and it still compiles under windows unlike defining a package aux which does not compile because of the reserved meaning as a file name . But again this is not binary compatible only source compatible . Comment : Thanks . Sorry if it was unclear yes Helper has been package-private before nothing changed regarding its visibility . Comment : Then you re on the safe side provided you had no inline annotation as mentioned by user1296806 . The inline annotation is generally unwarranted anyway as the jitter can most of the time inline your hot spots especially on a server VM . Comment : @user1296806 Considering the sheer size of the library a few hundred occurence of the inline annotations I found less than 100 in the library itself is very low . I would have expected more . It s not like inlining is never useful .", "Question : Because of an issue with package name aux under Windows I am moving a helper class within the package hierarchy of my library from .. . .. . to .. . .. . The class is private to the library i.e . private scalainterpreter object Helper . Now using the Typesafe Migration-Manager http : typesafe.com technology migration-manager obviously it reports that the change is not compatible : .. . .. . But I suspect that if client code does not call into either object the interfaces are still compatible and thus I can use a minor version increase to indicate the change and allow those two versions to be used interchangeably . Correct .. . Answer : Simply put no reason why it wouldn t be . Linkage happens around signatures since the object in question is scoped to the compilation unit clients cannot or rather should not be using it and binary compatibility is therefore not an issue ." ] }
[ "yes-answer-long", "yes-answer-short" ]
access-control
UNK_RELATION
fmpp@preprocessor@45
fmpp -- fmpp is a general-purpose text file @placeholder tool that uses freemarker templates .
{ "confidence": [ 55.70934295654297, 55.699737548828125, 52.16947937011719, 49.76416778564453, 49.481170654296875, 45.31459045410156, 45.31459045410156, 44.977638244628906, 44.76067352294922, 43.116416931152344, 43.0406608581543, 41.93069076538086, 41.771034240722656, 40.28643798828125, 39.81312942504883, 39.81312942504883, 39.09433364868164, 38.110225677490234, 38.110225677490234, 37.90516662597656, 36.464290618896484, 36.420318603515625, 36.16990661621094, 35.70014190673828, 34.386253356933594, 33.38338088989258, 33.339927673339844, 33.339927673339844, 30.9951229095459, 30.611310958862305, 29.772628784179688, 27.079246520996094, 25.82626724243164, 25.644147872924805, 25.239152908325195, 22.996288299560547, 22.40917205810547, 22.30863380432129, 21.88599395751953, 21.88599395751953, 21.88599395751953, 20.708187103271484, 20.50670623779297, 19.550138473510742, 19.42395782470703, 18.023338317871094, 17.878206253051758, 17.606054306030273, 17.5822811126709, 17.075363159179688, 17.075363159179688, 15.66573715209961, 15.66573715209961, 15.289080619812012, 15.289080619812012, 15.238344192504883, 14.779842376708984, 14.681628227233887, 14.681628227233887, 14.681628227233887, 14.681628227233887, 14.681628227233887, 14.681628227233887, 14.681628227233887, 14.681628227233887, 14.378520965576172, 14.245382308959961, 14.226163864135742, 14.001864433288574, 13.451189041137695, 13.451189041137695, 13.145936012268066, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539, 12.741312026977539 ], "content": [ "I have a csv-file which i want to transform with fmpp freemarker .", "I m asking because both FMPP and presumably gulp-freemarker uses the same syntax for the templates .", "My question is can this be done in the template without modifying freemarker or fmpp .", "One sub module uses fmpp freemarker to generate a whole lot of java files which are then fed back into the build .", "I am using FMPP in command-line with a config.fmpp file .", "I found a gulp-freemarker plugin that I thought might be able to substitute for fmpp .", "Anyway my ultimate goal is to achieve the same preprocessing result from gulp-freemarker as with ant fmpp .", "While FMPP has no such feature built-in good idea BTW you can achieve that if you add this to the FMPP configuration :", "FMPP only creates output directories as needed .", "I am trying to build a text file data model for fmpp to interpret and fill in to a template and I have a few questions .", "Is there a parameter to make FMPP fail when it is unable to find a value for a variable in the template", "then why can t you generate that same output with FMPP", "I want to write a FMPP Front End application but the official documentation do not explains how to include the FMPP library in a maven project but the plugin .", "Does anyone know of a Python equivalent for FMPP http : fmpp.sourceforge.net the text file preprocessor", "Or simply searching for fmpp on search.maven.org http : search.maven.org gives the same result immediately .", "I have been trying out fmpp for code generation .", "Using FMPP version 0.9.15 I m following the documentation examples to pull data from a CSV file .", "Is there any better way to do this with fmpp that brute-force processing them over and over", "Whether you use FMPP from a Maven plugin or not the pp hash provides exactly what you need .", "I am trying to set up Cobertura code-coverage on a project which includes auto-generated code created from templates using Freemarker explicitly using the fmpp maven-plugin .", "If you want to just use fmpp with Maven and avoid writing a plugin you could do this : .. . .. . Use the maven-antrun-plugin http : maven.apache.org plugins maven-antrun-plugin and process your files with a small snippet of Ant script using the fmpp Ant task fmpp.sourceforge.net ant.html .", "See : http : freemarker.org docs ref builtins expert.html ref builtin numToDate .. . .. . You will also want to set the date time-format and zone see http : fmpp.sourceforge.net settings.html sect17 .. . .. . Mayble you will have to upgrade FreeMarker in FMPP .", "what should the format of lists be in the data files in order for fmpp to interpret them properly", "Note : I have so far been able to run a basic fmpp ant that renders a signle template file against a data model .", "I have an XML file containing my data model : .. . .. . I load it in fmpp with my config file : .. . .. . In my template I can do : .. . .. . I would like to be able to do : .. . .. . to have my template file independent from my XML structure .", "My usage of FMPP is to read in a data file csv and use multiple templates depending on that data to create multi page reports in html all linked to a main index .", "I m not sure exactly what FMPP does but from a quick glance it seems like a template language .", "FTL template has the following code : .. . .. . this FTL run with FMPP using a XML to fill the data .", "I am using freemarker templates to automatically generate files .", "I found it in the fmpp-maven-plugin dependencies : so just include something like this in the dependencies block in the pom.xml .. . .. . Then use Clean and Build and try using in any java file : .. . .. . Thats it", "I am working with polymer now and want to convert our build to use gulp because fmpp and yuicompressor are choking on some of the js files in polymer due to reserved-words .", "Should be .pipe freemarker .", "Is it possible to set one or more freemarker variable in a case like : .. . .. . and having access to a and b in the freemarker script", "I want to set up an maven-plugin that will take a few freemarker templates and expand each one several times each time with a different set of input values .", "FreeMarker 2.3.17 has introduced number to-date number to time and number to datetime for that .", "possible duplicate of Freemarker : Dynamic interpolation of sub variables http : stackoverflow.com questions 12392822 freemarker-dynamic-interpolation-of-sub-variables", "I m building a freemarker template to generate a jsp view .", "Let s say I have a document defined like so : .. . .. . document.xml .. . .. . page1.xml .. . .. . page2.xml .. . .. . I would like to create an ant task that takes these documents and transforms it into a single document like so : .. . .. . I have decided to go with fmpp FreeMaker for this task although it s not a requirement it seems like it would suit my needs well .", "In the renderer FreeMarker template when you reach the Page element you could call include to insert the referred XML as is .", "What i want to do is to parse a string in bsh and decompose it into several freemarker variables .", "This might just be a copy-paste error from when you wrote your question but pipe freemarker is missing a dot .", "However 1 I am not sure of this and 2 I can not seem to get anything working with gulp-freemarker including their example code from github .", "With my config file : .. . .. . The closest I came is by using .. . .. . But it returns a NodeListModel that cannot be merged into the hash .", "right now it just leaves the text intact with if it cannot resolve a variable .", "Let me add Mako http : makotemplates.org Fine fast tool and it even uses var syntax .", "These are manually written to test the classes created from templates .", "i can do it with a hand-edited jsp css but i dont know how to do it in freemarker without using too much if and labels .", "You can call that function in a loop producing a different output file for each iteration .", "Is it possible", "You can set it in the config.fmpp file .", "Here is the snippet from the build file .", "We have a an ant build file that runs a task to preprocess html template files .", "My config file currently looks like this : sourceRoot : src outputRoot : out dataRoot : data .. . .. . where each of these are directories .", "The name of some directories within the virtual file path have to be changed according to a template for example : .. . .. . flow.name design .. . .. . flow.name implementation .. . .. . .. . Is there a way to achieve this with the template-engine", "Since you can rename output files and the directory can be part of the new name you can influence if in what directory the output file will be created .", "For example if I have a folder with file as follows : .. . .. . it does not replace the project name value of file and folder when it execute and copy it over to the output generated directory .", "Note : Mako Jinja and Cheetah are textual languages they process and generate text .", "When you say set up a maven-plugin do you mean write your own", "Combined with the ant-contrib task ant-contrib.sourceforge.net tasks tasks index.html you should be able to loop quite easily over a set of files .", "I was going to write a plugin yes .", "Have a look at http : fmpp.sourceforge.net pphash.html key changeOutputFile .", "Something strange is going on there because it does fail and by default even aborts the whole batch-processing if you refer to an undefined variable .", "Also it doesn t leave -s in the output because all the and are parsed away before the template could do anything .", "So I suspect the value of those variables is indeed the string or you have some tricky escape in the border footer header settings or something tricky like that .", "If you can provide a minimalistic example to reproduce this I can certainly spot the reason .", "Another question - is there a way to pass in the values as java parameters for example -Dproject.name someProject instead of having the values in the config file", "This information is recorded in the cobertura.ser data file .", "This does not seem right to me - I think I should be testing the generated code both to test the generated classes and the templates and I want to know how the code-coverage for this generated code .", "But I haven t been able to achieve one of the function that I want at this moment which is dynamically replace the folder name and file name .", "the cobertura report task reads the cobertura.ser data file and produces the html report .", "A simple test to print the file location of an auto-generated class e.g .", "System.out.println MyAutoClass.class.getResource MyAutoClass.class confirmed that when the tests are run by cobertura it uses the auto-generated classes in the test-classes folder and not the cobertura compiled classes that had been instrumented .", "The first column is a long value milliseconds since 1.1.1970 which i want to convert into a date and format it as datetime .", "src format : .. . .. . desirable target format : .. . .. . My running template : .. . .. . For column 0 I want to do the conversion .", "I DON T want to write a new model which contains a date .", "any ideas", "For that simply replace the FMPP HOME lib freemarker.jar with the latest version .", "thanx", "I must have overseen this in the documentation .", "One hint for others .", "You have to convert the String first to a number and then to a datetime like this : row h number number to datetime .", "The datetime-format for output can be set with : setting datetime-format yyyy-MM-dd hh : mm : ss", "I have an existing maven project which I am attempting to port to gradle .", "I m new to gradle and was wondering if anyone knows of an easy way to do this .", "Any help would be appreciated .", "My current pom.xml looks like this :", "Sorry should have spent more time googling first .", "This is the solution which worked for me :", "I am in the process of moving a lot of imperative utilities into apache-ant builds and I am having a bit of difficulty coming up with a strategy for a specific use-case .", "Is there a way to define this transformation in a declarative apache-ant task", "The scope of my question is specifically related to the construction of a document from multiple separate sources and what that may look like as an an task .", "Cheers and thanks for your time", "If document.xml has to be XML as oppose to a template that include -s the others .. . then it s not a task that fits FMPP s approach very much but anyway I guess you should use FMPP s renderXml processing mode see http : fmpp.sourceforge.net settings.html processingMode to transform that XML .", "Of course a lot depends on what else you will have to do with these files .", "Can you do it that way", "I guess it can t be done without writing a custom DataLoader .", "I m saying guess because maybe I don t know about a BeanShell trick .", "The closest I could get is using return this.namespace and then test.getVariable a .", "This is too verbose of course .", "Update : Actually the following horror is even closer :" ] }
{ "confidence": [ 71.30722045898438, 70.13246154785156, 68.96382904052734, 65.32176971435547, 61.835289001464844, 60.907257080078125, 60.250640869140625, 58.770896911621094, 58.630001068115234, 58.5558967590332, 58.2414665222168, 55.990692138671875, 52.85764694213867, 51.275936126708984, 50.58966827392578, 49.22239303588867, 46.98565673828125, 43.81003189086914, 37.75017166137695, 29.110794067382812 ], "content": [ "Question : null .. . Answer : new here so I hope this question is adequate . We have a an ant build file that runs a task to preprocess html template files . Here is the snippet from the build file . I am working with polymer now and want to convert our build to use gulp because fmpp and yuicompressor are choking on some of the js files in polymer due to reserved-words . I found a gulp-freemarker plugin that I thought might be able to substitute for fmpp . However 1 I am not sure of this and 2 I can not seem to get anything working with gulp-freemarker including their example code from github . Here is my gulpfile : .. . .. . This seems to run OK - no errors - but there is no apparent output . Since I am a bit new to this stuff I may not know what I should be looking for.. . Anyway my ultimate goal is to achieve the same preprocessing result from gulp-freemarker as with ant fmpp . Can anyone help answer this and point me in the right direction Thanks Ken Comment : This might just be a copy-paste error from when you wrote your question but pipe freemarker is missing a dot . Should be .pipe freemarker . Comment : Yep C P error . I fixed it and thanks Comment : What are the mentioned problematic reserved-words I m asking because both FMPP and presumably gulp-freemarker uses the same syntax for the templates . Comment : Sorry had some PTO and got shuffled to another task for a while . Some of the reserved-words I think I remember as being an issue are instanceof and import .", "Question : I want to set up an maven-plugin that will take a few freemarker templates and expand each one several times each time with a different set of input values . Is there any better way to do this with fmpp that brute-force processing them over and over .. . Answer : Whether you use FMPP from a Maven plugin or not the pp hash provides exactly what you need . Have a look at http : fmpp.sourceforge.net pphash.html key changeOutputFile . You can call that function in a loop producing a different output file for each iteration .", "Question : I want to set up an maven-plugin that will take a few freemarker templates and expand each one several times each time with a different set of input values . Is there any better way to do this with fmpp that brute-force processing them over and over .. . Answer : When you say set up a maven-plugin do you mean write your own If you want to just use fmpp with Maven and avoid writing a plugin you could do this : .. . .. . Use the maven-antrun-plugin http : maven.apache.org plugins maven-antrun-plugin and process your files with a small snippet of Ant script using the fmpp Ant task fmpp.sourceforge.net ant.html . Combined with the ant-contrib task ant-contrib.sourceforge.net tasks tasks index.html you should be able to loop quite easily over a set of files . Comment : I was going to write a plugin yes .", "Question : I have a csv-file which i want to transform with fmpp freemarker . The first column is a long value milliseconds since 1.1.1970 which i want to convert into a date and format it as datetime . src format : .. . .. . desirable target format : .. . .. . My running template : .. . .. . For column 0 I want to do the conversion . I DON T want to write a new model which contains a date . My question is can this be done in the template without modifying freemarker or fmpp . any ideas .. . Answer : FreeMarker 2.3.17 has introduced number to-date number to time and number to datetime for that . See : http : freemarker.org docs ref builtins expert.html ref builtin numToDate .. . .. . You will also want to set the date time-format and zone see http : fmpp.sourceforge.net settings.html sect17 .. . .. . Mayble you will have to upgrade FreeMarker in FMPP . For that simply replace the FMPP HOME lib freemarker.jar with the latest version . Comment : thanx I must have overseen this in the documentation . One hint for others . You have to convert the String first to a number and then to a datetime like this : row h number number to datetime . The datetime-format for output can be set with : setting datetime-format yyyy-MM-dd hh : mm : ss", "Question : Does anyone know of a Python equivalent for FMPP http : fmpp.sourceforge.net the text file preprocessor Follow up : I am reading the docs and looking at the examples for the suggestions given . Just to expand . My usage of FMPP is to read in a data file csv and use multiple templates depending on that data to create multi page reports in html all linked to a main index . Comment : don t make such questions a community wiki .. . Answer : I m not sure exactly what FMPP does but from a quick glance it seems like a template language . Jinja2 http : jinja.pocoo.org 2 is an excellent template system for python . sample :", "Question : I am using freemarker templates to automatically generate files . While this works fine so far - including changing the names of files - I have one additional feature I need . The name of some directories within the virtual file path have to be changed according to a template for example : .. . .. . flow.name design .. . .. . flow.name implementation .. . .. . .. . Is there a way to achieve this with the template-engine Thanks for your help and best regards . .. . Answer : FMPP only creates output directories as needed . Since you can rename output files and the directory can be part of the new name you can influence if in what directory the output file will be created .", "Question : Does anyone know of a Python equivalent for FMPP http : fmpp.sourceforge.net the text file preprocessor Follow up : I am reading the docs and looking at the examples for the suggestions given . Just to expand . My usage of FMPP is to read in a data file csv and use multiple templates depending on that data to create multi page reports in html all linked to a main index . Comment : don t make such questions a community wiki .. . Answer : You could give Cheetah http : www.cheetahtemplate.org a try . I ve used it before with some success .", "Question : null .. . Answer : I am using FMPP in command-line with a config.fmpp file . I have an XML file containing my data model : .. . .. . I load it in fmpp with my config file : .. . .. . In my template I can do : .. . .. . I would like to be able to do : .. . .. . to have my template file independent from my XML structure . With my config file : .. . .. . The closest I came is by using .. . .. . But it returns a NodeListModel that cannot be merged into the hash . Is it possible", "Question : I have an existing maven project which I am attempting to port to gradle . One sub module uses fmpp freemarker to generate a whole lot of java files which are then fed back into the build . I m new to gradle and was wondering if anyone knows of an easy way to do this . Any help would be appreciated . My current pom.xml looks like this : .. . Answer : Sorry should have spent more time googling first . This is the solution which worked for me :", "Question : Does anyone know of a Python equivalent for FMPP http : fmpp.sourceforge.net the text file preprocessor Follow up : I am reading the docs and looking at the examples for the suggestions given . Just to expand . My usage of FMPP is to read in a data file csv and use multiple templates depending on that data to create multi page reports in html all linked to a main index . Comment : don t make such questions a community wiki .. . Answer : Let me add Mako http : makotemplates.org Fine fast tool and it even uses var syntax . Note : Mako Jinja and Cheetah are textual languages they process and generate text . I d order them Mako Jinja Cheetah in term of features and readability but people s preferences vary . Kid and it s successor Genshi http : genshi.edgewall.org are HTML XML aware attribute languages div py : if variable .. . div etc . That s completely different methodology - and tools suitable for HTML or XML only . Comment : Thank you for pointing out Mako it seems to have everything I need .", "Question : Does anyone know of a Python equivalent for FMPP http : fmpp.sourceforge.net the text file preprocessor Follow up : I am reading the docs and looking at the examples for the suggestions given . Just to expand . My usage of FMPP is to read in a data file csv and use multiple templates depending on that data to create multi page reports in html all linked to a main index . Comment : don t make such questions a community wiki .. . Answer : Python has lots of templating engines . It depends on your exact needs . Jinja2 http : jinja.pocoo.org 2 is a good one for example . Kid http : www.kid-templating.org is another .", "Question : I want to write a FMPP Front End application but the official documentation do not explains how to include the FMPP library in a maven project but the plugin . So i want to know how to include the library so i can extend the fmpp.setting.Settings object . .. . Answer : I found it in the fmpp-maven-plugin dependencies : so just include something like this in the dependencies block in the pom.xml .. . .. . Then use Clean and Build and try using in any java file : .. . .. . Thats it Comment : Or simply searching for fmpp on search.maven.org http : search.maven.org gives the same result immediately .", "Question : null .. . Answer : I am trying to build a text file data model for fmpp to interpret and fill in to a template and I have a few questions . 1 . what should the format of lists be in the data files in order for fmpp to interpret them properly Currently I am using the following format : functions : prefix : @Override returnType : public boolean name : configure params : body : throw new UnsupportedOperationException Not supported yet . prefix : @Override returnType : public boolean name : connect params : body : throw new UnsupportedOperationException Not supported yet . .. . .. . 2 . how can I get one template to be reproduced several times to make many output files from one template and many data files all generically named My config file currently looks like this : sourceRoot : src outputRoot : out dataRoot : data .. . .. . where each of these are directories .", "Question : null .. . Answer : I m building a freemarker template to generate a jsp view . Using a layout in 2 columns where each field in a form is floating and occupies the entire width of the column . Each field type is in a independent FTL to easily add and remove fields . FTL template has the following code : .. . .. . this FTL run with FMPP using a XML to fill the data . The problem I am having is when I have to adjust the layout of the view this layout is designed for a form 2 columns and I need to : .. . .. . add a header or more columns to the layout .. . change the background-color or image font-size and color .. . add images to header .. . .. . i don t know how to do it without complicating the FTL with IF marks each part of the CSS and then having a big xml . there are any layouts in freemarket for example i can see or use The idea is to keep using single set of FTLs a web system and a simple web page in java . Comment : You think you should describe more concretely what s the problem with implementing this . On what detail do you stuck Like if you can achieve what you want with a hand-edited JSP CSS can you then why can t you generate that same output with FMPP Comment : i can do it with a hand-edited jsp css but i dont know how to do it in freemarker without using too much if and labels . i improved my question Comment : possible duplicate of Freemarker : Dynamic interpolation of sub variables http : stackoverflow.com questions 12392822 freemarker-dynamic-interpolation-of-sub-variables", "Question : I have been trying out fmpp for code generation . But I haven t been able to achieve one of the function that I want at this moment which is dynamically replace the folder name and file name . For example if I have a folder with file as follows : .. . .. . it does not replace the project name value of file and folder when it execute and copy it over to the output generated directory . Just wonder if anyone has an insight to this problem or suggest any better tools that can do this . Comment : Aint sure but maybe this is what you want : github.com square javapoet https : github.com square javapoet .. . Answer : While FMPP has no such feature built-in good idea BTW you can achieve that if you add this to the FMPP configuration : Comment : Another question - is there a way to pass in the values as java parameters for example -Dproject.name someProject instead of having the values in the config file Comment : You could use projectName : eval System.getProperty project.name inside data . Comment : I have this code data : tdd data data.tdd plugin info : eval System.getProperty project.name but it is not working . Comment : Do I have to escape the characters Comment : As you have a string-literals inside another string literal one should use and the other just like in my comment . Or you can escape the inner too but that s less nice .", "Question : I am in the process of moving a lot of imperative utilities into apache-ant builds and I am having a bit of difficulty coming up with a strategy for a specific use-case . Let s say I have a document defined like so : .. . .. . document.xml .. . .. . page1.xml .. . .. . page2.xml .. . .. . I would like to create an ant task that takes these documents and transforms it into a single document like so : .. . .. . I have decided to go with fmpp FreeMaker for this task although it s not a requirement it seems like it would suit my needs well . Is there a way to define this transformation in a declarative apache-ant task Note : I have so far been able to run a basic fmpp ant that renders a signle template file against a data model . The scope of my question is specifically related to the construction of a document from multiple separate sources and what that may look like as an an task . Cheers and thanks for your time .. . Answer : If document.xml has to be XML as oppose to a template that include -s the others .. . then it s not a task that fits FMPP s approach very much but anyway I guess you should use FMPP s renderXml processing mode see http : fmpp.sourceforge.net settings.html processingMode to transform that XML . In the renderer FreeMarker template when you reach the Page element you could call include to insert the referred XML as is . Of course a lot depends on what else you will have to do with these files .", "Question : Is there a parameter to make FMPP fail when it is unable to find a value for a variable in the template right now it just leaves the text intact with if it cannot resolve a variable . .. . Answer : Something strange is going on there because it does fail and by default even aborts the whole batch-processing if you refer to an undefined variable . Also it doesn t leave -s in the output because all the and are parsed away before the template could do anything . So I suspect the value of those variables is indeed the string or you have some tricky escape in the border footer header settings or something tricky like that . If you can provide a minimalistic example to reproduce this I can certainly spot the reason .", "Question : Using FMPP version 0.9.15 I m following the documentation examples to pull data from a CSV file . If I use command-line with config.fmpp : .. . .. . Or ANT config : .. . .. . I receive the following error either way : .. . .. . On the other hand If I switch to birds : text.. . or birds : splitText.. . I do not get the evaluation error . It looks like csv is still supported in the code . Any idea why the TDD data source is not recognizing the csv function Comment : Isn t there a stack-trace that tells if in what way has this failed That could help . .. . Answer : Did you try adding a space between birds : and csv data birds.csv", "Question : I am trying to set up Cobertura code-coverage on a project which includes auto-generated code created from templates using Freemarker explicitly using the fmpp maven-plugin . I then have unit tests for those auto-generated classes . However these unit tests are not being considered by Cobertura when calculating code-coverage . The auto-generated classes appear in the report but the coverage on those classes is always 0 . First is there some configuration for Cobertura that I m missing This SO question http : stackoverflow.com questions 6467787 cobertura-code-coverage-results-not-complete appears to have been asking a similar question but the accepted answer is that : .. . .. . Generated code should not be tested and should not be used in code-coverage metrics . This does not seem right to me - I think I should be testing the generated code both to test the generated classes and the templates and I want to know how the code-coverage for this generated code . So second is there a good reason why generated code shouldn t be tested Edit : It s also relevant to mention that I am using cobertura using the cobertura-maven-plugin . As such I m not sure if the problem is with cobertura or the maven-plugin or my configuration thereof.. . .. . .. . N.b . to be clear I am not asking about auto-generating the test classes . These are manually written to test the classes created from templates . .. . Answer : This is a partial answer to report what I ve learnt so far.. . .. . .. . First I ve had a look at how cobertura works and it seems to be as follows : .. . .. . the project java classes are amended to include calls to TouchCollector.touch .. . and similar methods throughout the code and compiled . This is the instrumentation task . the tests are run on these cobertura compiled classes and TouchCollector records which lines of the project classes have been reached in the tests . This information is recorded in the cobertura.ser data file . the cobertura report task reads the cobertura.ser data file and produces the html report . So my first thought was that the auto-generated classes were not being instrumented properly . However after decompiling these cobertura class files I can confirm that both normal and auto-generated classes have been instrumented correctly . Also I can confirm that all the tests - including the tests of the auto-generated classes are being run . Then my next question is why when the tests are run the auto-generated classes are not being touched . Further investigation showed that when the test classes were being compiled i.e . test-compile the auto-generated classes are added to project target test-classes . A simple test to print the file location of an auto-generated class e.g . System.out.println MyAutoClass.class.getResource MyAutoClass.class confirmed that when the tests are run by cobertura it uses the auto-generated classes in the test-classes folder and not the cobertura compiled classes that had been instrumented . Then the next question is how to prevent these classes being added to the test-classes folder.. . Well one approach is to exclude the auto-generated classes from being compiled . This can be done by only including the Test classes - e.g . : .. . .. . Or it should be possible to exclude the auto-generated classes which would be preferred - something along the lines of : .. . .. . However this didn t work and I m not quite sure how to get this to work . An alternative could be to move all the auto-generated classes into a single package and then something like the following could be possible : .. . .. . In the end I went for the only including Test.java files", "Question : Is it possible to set one or more freemarker variable in a case like : .. . .. . and having access to a and b in the freemarker script Comment : You can set it in the config.fmpp file . Can you do it that way Comment : What i want to do is to parse a string in bsh and decompose it into several freemarker variables . .. . Answer : I guess it can t be done without writing a custom DataLoader . I m saying guess because maybe I don t know about a BeanShell trick . The closest I could get is using return this.namespace and then test.getVariable a . This is too verbose of course . Update : Actually the following horror is even closer : Comment : ok thank you it suits me . It is not for a production environment ." ] }
[ "yes-answer-long", "yes-answer-short" ]
preprocessor
UNK_RELATION
badimageformatexception@executable@113
badimageformatexception -- the exception that is thrown when the file image of a dynamic link library dll or an @placeholder program is invalid .
{ "confidence": [ 30.28519058227539, 30.000675201416016, 28.660850524902344, 28.505802154541016, 27.86595916748047, 27.49445915222168, 27.44140625, 27.374359130859375, 27.374359130859375, 27.30600357055664, 27.136470794677734, 26.870121002197266, 25.973787307739258, 24.77511978149414, 24.742847442626953, 24.326141357421875, 24.26725196838379, 24.018577575683594, 23.97818374633789, 23.881874084472656, 23.881874084472656, 23.58664321899414, 23.254676818847656, 23.227989196777344, 23.14849853515625, 23.14849853515625, 22.938617706298828, 22.432750701904297, 22.12849235534668, 21.624027252197266, 21.539505004882812, 21.47702407836914, 21.271425247192383, 21.271425247192383, 21.21616554260254, 21.21616554260254, 21.173870086669922, 21.06586456298828, 20.957447052001953, 20.806129455566406, 20.806129455566406, 20.804424285888672, 20.63995361328125, 20.626903533935547, 20.568218231201172, 20.24884796142578, 20.162147521972656, 20.103342056274414, 20.103342056274414, 20.053531646728516, 20.019554138183594, 19.89202117919922, 19.89202117919922, 19.89202117919922, 19.89202117919922, 19.89202117919922, 19.616477966308594, 19.504215240478516, 19.48505973815918, 19.372282028198242, 19.351757049560547, 19.347610473632812, 19.319992065429688, 19.248620986938477, 19.14717674255371, 18.976600646972656, 18.955543518066406, 18.93996810913086, 18.887372970581055, 18.873310089111328, 18.771934509277344, 18.697568893432617, 18.658973693847656, 18.615079879760742, 18.615079879760742, 18.615079879760742, 18.615079879760742, 18.523956298828125, 18.488101959228516, 18.488101959228516, 18.462055206298828, 18.195331573486328, 18.131742477416992, 18.131742477416992, 18.131742477416992, 18.02748680114746, 17.967365264892578, 17.898075103759766, 17.89365577697754, 17.853321075439453, 17.853065490722656, 17.71842384338379, 17.70650863647461, 17.704147338867188, 17.691036224365234, 17.66302490234375, 17.66302490234375, 17.307140350341797, 17.299667358398438 ], "content": [ "first link stackoverflow.com questions 2728560 http : stackoverflow.com questions 2728560 badimageformatexception-when-loading-32-bit-dll-target-is-x86", "Screenshot of Exception message http : i.stack.imgur.com OVaxn.png .. . .. . Also see : Troubleshooting BadImageFormatException http : stackoverflow.com questions 8996653 troubleshooting-badimageformatexception", "But I get BadImageFormatException Exception from HRESULT : 0x8007000B .", "This is a BadImageFormatException .", "Troubleshooting BadImageFormatException http : stackoverflow.com questions 8996653 troubleshooting-badimageformatexception .. . System.BadImageFormatException occurred when build in Release Mode http : stackoverflow.com questions 28719339 system-badimageformatexception-occurred-when-build-in-release-mode", "When I execute the generated file I get a BadImageFormatException .", "Exception from HRESULT : 0x8007000B .. . .. . BadImageFormatException : An attempt was made to load a program with an incorrect format .", "Doesn t the BadImageFormatException get thrown when you attempt to run x64 code on x86", "BadImageFormatException .. . .. . This as far as i can tell is thrown when there are problems with the PLATFORM architecture compatibility x86 x64 .", "I have the following lines-of-code : .. . .. . I am getting the following exception : .. . .. . BadImageFormatException An attempt was made to load a program with an incorrect format .", "My program is occasionally crashing with the following error message : .. . .. . System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation .", "Everytime I get BadImageFormatException .", "What I get is : .. . .. . BadImageFormatException : An attempt was made to load a program with an incorrect format .", "Stack Trace : .. . .. . BadImageFormatException : Empty assembly simple name .", "So I use opencv imgproc.dll but it throws BadImageFormatException http : msdn.microsoft.com en-us library system.badimageformatexception.aspx", "Try looking at this SO question http : stackoverflow.com questions 8996653 troubleshooting-badimageformatexception and this one too http : stackoverflow.com questions 4340362 system-badimageformatexception-an-attempt-was-made-to-load-a-program-with-an-inc .", "Exception occurred while initializing the installation : System.BadImageFormatException : Could not load file or assembly file : C : Program Files xyz xyz Manager xyz.Service.exe or one of its dependencies .", "possible duplicate of Attempt to load Oracle client libraries threw BadImageFormatException http : stackoverflow.com questions 15498391 attempt-to-load-oracle-client-libraries-threw-badimageformatexception", "Opening the 414KB DLL file in NUnit for inspection throws the same exception .", "BadImageFormatException : Could not load file or assembly System.Web.Abstractions Version 3.5.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies .", "Have you seen stackoverflow.com questions 5229310 http : stackoverflow.com questions 5229310 system-badimageformatexception-could-not-load-file-or-assembly", "@NickW it located @ the bin folder next to the .exe other .DLLs work just fine you want me exception stack for the BadImageFormatException", "System.BadImageFormatException its a general exception that use to occur when you are using a 32 bits DLL on a 64 bit enviroment or viceversa .", "when I m trying to load my class file : classLibrary1.dll in the recorder I m getting the following error message .", "A BadImageFormatException is usually due to a mixup with the 32 64 bit settings .", "I am trying to track down the cause of a BadImageFormatException Index not found .", "2005 dll is a .net dll no need to register it with regsvr the main application is a windows service every thing is installed correctly then there is a delay for few minutes and I think it failed to add the .exe file to windows-services .", "BadImageFormatException means 32 64 bit mismatch .", "I need the sqlite3.dll file by itself .", "The program was favoring the 64-bit DLL and causing it to fail .", "stackoverflow.com questions 5229310 http : stackoverflow.com questions 5229310 system-badimageformatexception-could-not-load-file-or-assembly", "C Controller unit tests failing with the below bad image format exception when referenced to service project .", "Also do you have source code for the 2005 DLL", "then you can do a regsvr and register the DLL with Windows afterwards .", "When they are all x64 I get the badImageFormatException on one of those which is a project with no references and which is set to x64 as well .", "You usually see BadImageFormatException when one of your assemblies is x64 and you are running x86 or visa-versa .", "I ve updated my question with the exact exception which is being thrown", "Yesterday everything was working fine but suddenly today when I run ProjectB I get this : .. . .. . BadImageFormatException was unhandled : .. . Could not load file or assembly ProjectA Version 1.0.0.0 Culture neutral PublicKeyToken null or one of its dependencies .", "See this answer for solutions http : stackoverflow.com questions 4657087 system-badimageformatexception-on-running-serivcestack-examples .", "See http : www.fishofprey.com 2009 04 badimageformatexception-in-iis-70-on-64.html", "It s completely valid to ask the OP if this step was necessary as they are trying to solve a BadImageFormatException .", "There s some code that makes a call to an external .dll file .", "When I transfer my source on to a Win7 64-bit machine I get a BadImageFormatException when I try to compile and run the solution targetting AnyCPU .", "The reason for your error is because you have a x86 file trying to load a 64bit dll or Vice versa .", "This is thrown during construction of one of my custom objects .", "From what I understand an assembly specifically built for x86 and running in a 64-bit operating-system can only load libraries built for x86 or a BadImageFormatException will be thrown .", "The exception is thrown on line 2 of the following code : .. . .. . If I comment out the second line of code the third line executes successfully and then the method fails again on the fourth line of code with the same exception .", "It was working without any problem until I added a reference to a x64.net 2.0 dll compiled under VS2005 .", "can you exclude the 2005 DLL and then script it to be placed into system32 or the proper location s", "I don t have 2005 dll source code also I updated msi package as described here : link blogs.msdn.com b heaths archive 2006 02 01 http : blogs.msdn.com b heaths archive 2006 02 01 64-bit-managed-custom-actions-with-visual-studio.aspx", "Exception from HRESULT : 0x8007000B .. . .. . MSDN tells me it might have something to with a DLL file not being loaded in the correct format but I don t even know where to start .", "I have a web service that throws a BadImageFormatException any time I try to run the service from Visual Studio .", "So I tried having my web service-reference all the individual DLLs in MyILMergedAssembly but I still get a BadImageFormatException .", "Thanks to this blog http : www.fishofprey.com 2009 04 badimageformatexception-in-iis-70-on-64.html for sending me in the right direction .", "It comes up with an error of BadImageFormatException was unhandled which i think is because of the system change of where i am opening it .", "Tried as suggested by Graphicsmill frequent asked questions forums for Web Application .. . .. . How to Resolve BadImageFormatException .", "If that is the case you will not be able to make this work as the 64 bit process cannot load assemblies that are compiled for x86 explictily you get the BadImageFormatException mentioned .", "Typically these plugins are made by creating a class-library DLL that references the API assembly .", "This is the message I m getting : .. . .. . System.BadImageFormatException : Could not load file or assembly file : C : Users anirban.m1 Documents Visual Studio 2012 Projects WindowsFormsApplication1 ClassLibrary1 bin Debug ClassLibrary1.dll or one of its dependencies .", "That exception comes from trying to load x86 native dlls in a x64 program or vice versa .", "Exception from HRESULT : 0x8007000B .. . .. . I thought this might have to do with 32-bit and 64 bit applications so I tried both versions of the dll .", "I ve gotten this error when including a native DLL as a resource in my assembly .", "DLL was downloaded from the web but content of the DLL was HTML page : D Try to check if it is binary file if it seems like correct DLL :", "But to replace the DLL the problem was solved .", "In a 64-bit OS an assembly built for Any CPU or x64 will throw the same exception when trying to load an x86 library .", "Exception text : .. . .. . Main Window Exception : The type initializer for X.BLCInterfaceBehavior threw an exception .", "Can you fix the image or remove the link", "How can I get rid of the errors peverify gives and hopefully get rid of the BadImageFormatException that comes up when I try to run my web service", "Exception Details : System.BadImageFormatException : An attempt was made to load a program with an incorrect format .", "exception .", "The .dll was built for 32-bit machines .", "Yes there are some dlls I have them both x64 and for x32 when they are loaded I use the dll their compilation architecture .", "Possible duplicate of Could not load file or assembly .. . An attempt was made to load a program with an incorrect format System.BadImageFormatException http : stackoverflow.com questions 11370344 could-not-load-file-or-assembly-an-attempt-was-made-to-load-a-program-with-a", "This half solved my problem with BadImageFormatException - I forgot to copy over the dependent DLLs .", "@Jerown Mostert : I fully understand the difference between x86 x64 and Any as well as the meaning of a BadImageFormatException .", "NOT A DUPLICATE of the hundreds of BadImageFormatException questions because they all say to set your projects to X86 .", "This post http : vibrantcode.com 2012 05 18 badimageformatexception-the-signature-is-incorrect has a further example .", "Everything has worked fine for the last year until after a check-in yesterday the app started critically failing with BadImageFormatException http : msdn.microsoft.com en-us library system.badimageformatexception.aspx .", "I tried taking ABCpdf10-32.dll out of the bin folder and I get the same error with ABCpdf10-64.dll .", "This is because AnyCPU will run as 64 bit but your DLL is likely compiled as 32-bit DLL .", "missing some dll file what we added in reference list .", "Most relate to IIS configuration which is not the case as this is a compilation error or have the solution as setting the project to allow 32bit platform target which is not suitable for my case : .. . .. . An attempt was made to load a program with an incorrect format even when the platforms are the same http : stackoverflow.com questions 2023766 an-attempt-was-made-to-load-a-program-with-an-incorrect-format-even-when-the-p no good as uses IIS config .. . Could not load file or assembly .. . An attempt was made to load a program with an incorrect format System.BadImageFormatException http : stackoverflow.com questions 11370344 could-not-load-file-or-assembly-an-attempt-was-made-to-load-a-program-with-a no good as is a runtime-error .. . System.BadImageFormatException An attempt was made to load a program with an incorrect format http : stackoverflow.com questions 4340362 system-badimageformatexception-an-attempt-was-made-to-load-a-program-with-an-inc no good as uses 32bit solution .. . Could not load file or assembly xxx or one of its dependencies .", "Then delete all the 32 dll on the folder or subfolders .", "Then delete all the 64 dll on the folder or subfolders .", "This DLL dynamically links a number of win32 native dlls .", ".. . .. . Exception Details : System.BadImageFormatException : Could not load file or assembly Microsoft.ServiceFabric.Data or one of its dependencies .", "I have made a small application from a book about F but when I call the rand.NextDouble method it throws a BadImageFormatException which at first glance looks like it s something to do with images so I have NO idea what I m supposed to do here .", "I have used the aspnet compiler.exe command-line tool with the errorstack option enabled and got the following stack-trace : .. . .. . BadImageFormatException : Could not load file or assembly AssemblyB or one of its dependencies .", ".. . ...at Microsoft.TeamFoundation.Client.TfsConnection.GetServiceT at TFSLibrary.TFSEngine.get WorkItemStore .. . .. . .. . .. . .. . After much research it would seem that this is a related to the DataStoreLoader dll being x86 all other dlls in the manifest are set to MSIL and requesting the WorkItemStore from the TFS service is causing this exception .", "I ve run into this before I think and I vaguely remember needing to delete some temp internet files somewhere but I tried closing VS deleting the bin folder deleting the root folder from framework tempASPfiles.. . but I still get the BadImageFormatException - an attempt was made to load the program with an incorrect format .", "The application is then set to reference the plug-in DLL file and is then also responsible for actually firing up the custom command class when the user requests it .", "DLL : C : Windows Installer MSI29ED.tmp Entrypoint : ManagedInstall MSI s 74 88 12 : 39 : 24 : 727 : Creating MSIHANDLE 86 of type 790531 for thread 12424 DEBUG : Error 2835 : The control ErrorIcon was not found on dialog ErrorDialog The installer has encountered an unexpected error installing this package .", "Dll works fine with console apps .", "This works fine on 32-bit computers but when it s running on a 64-bit machine it throws a format exception .", "What could cause this exception", "But when I want to use libcurl I have this first error message : http : image.noelshack.com fichiers 2015 45 1446669308-2400-noelpush.png in french sorry .. . .. . And later I have a BadImageFormatException .", "I m currently in the process of increasing code-coverage on our software products and have ran into an issue all of my unit tests when compiled using Any CPU are failing due to throwing a BadImageFormatException .", "Executing code that references c : windows system32 hnetcfg.dll to manage the Windows Firewall from this question http : stackoverflow.com questions 1242566 any-way-to-turn-the-internet-off-in-windows-using-c causes a BadImageFormatException as soon as the DLL is loaded .", "Any interaction with it results in the aforementioned exception ." ] }
{ "confidence": [ 36.475460052490234, 36.05432891845703, 34.68135070800781, 34.11293029785156, 34.06259536743164, 33.89476776123047, 33.857852935791016, 33.805267333984375, 33.12467956542969, 32.916114807128906, 32.84209442138672, 32.18926239013672, 31.923736572265625, 31.840328216552734, 31.835922241210938, 31.64072036743164, 31.561031341552734, 31.466785430908203, 31.326934814453125, 31.322046279907227 ], "content": [ "Question : I have a DLL FreeType which is certainly 32-bit header : IMAGE FILE MACHINE I386 . I want to use it from C code using DllImport . Target of my application is x86 IntPtr.Size is 4 process is 32-bit . But I get BadImageFormatException Exception from HRESULT : 0x8007000B . What can be wrong Of course I use 64-bit Windows 7 . Comment : Voting to close as not a real question -- the basis for the question was a misunderstanding the OP found the DLL in question was loading correctly .. . Answer : From what I understand an assembly specifically built for x86 and running in a 64-bit operating-system can only load libraries built for x86 or a BadImageFormatException will be thrown . In a 64-bit OS an assembly built for Any CPU or x64 will throw the same exception when trying to load an x86 library . So assuming nothing incredibly weird is going on I would ensure that you ve set your application to build as x86 by opening the project properties and clicking on the Build tab . Ensure Platform Target is set as x86 and not Any CPU . Alternatively you could try to find a 64-bit version of the DLL for testing purposes . Comment : I am 100 sure that my C app is 32-bit . I even used CORFLAGS to check it : Version : v2.0.50727 CLR Header : 2.5 PE : PE32 CorFlags : 3 ILONLY : 1 32BIT : 1 Signed : 0 Comment : @Eric Smith I was having the same issue...this fixed it . Thank you so much Comment : +1 . Having the same issue and successfully fixed it . Comment : Yes and the same thing happens the other way around . For example if a 64-bit app attempts to load a 32-bit DLL .", "Question : I have the following lines-of-code : .. . .. . I am getting the following exception : .. . .. . BadImageFormatException An attempt was made to load a program with an incorrect format . Exception from HRESULT : 0x8007000B .. . .. . I thought this might have to do with 32-bit and 64 bit applications so I tried both versions of the dll . In addition I also enabled 32-bit applications through IIS . Can someone tell me why I may be getting this error .. . Answer : Right this is a result-of trying to use a 32bit unamanged dll Sqlite on a 64bit pc . See this answer for solutions http : stackoverflow.com questions 4657087 system-badimageformatexception-on-running-serivcestack-examples . Otherwise use a platform-specific Sqlite .NET wrapper : .. . .. . ServiceStack.OrmLite.Sqlite32 https : nuget.org packages ServiceStack.OrmLite.Sqlite32 .. . ServiceStack.OrmLite.Sqlite64 https : nuget.org packages ServiceStack.OrmLite.Sqlite64 Comment : I created a new project cause all my references were messy . Added reference to servicestack and then added the 64 bit wrapper reference . In addition I also modified the project build properties like you suggested . However I am still seeing the following error : Could not load file or assembly ServiceStack.OrmLite.SqliteNET Version 1.0.0.0 Culture neutral PublicKeyToken null or one of its dependencies . An attempt was made to load a program with an incorrect format . Any suggestions Comment : Got it . There was no need for x86 on build when I had the 64 bit wrapper . Dunno why I did that . Thanks for your help", "Question : I have a DLL FreeType which is certainly 32-bit header : IMAGE FILE MACHINE I386 . I want to use it from C code using DllImport . Target of my application is x86 IntPtr.Size is 4 process is 32-bit . But I get BadImageFormatException Exception from HRESULT : 0x8007000B . What can be wrong Of course I use 64-bit Windows 7 . Comment : Voting to close as not a real question -- the basis for the question was a misunderstanding the OP found the DLL in question was loading correctly .. . Answer : Recompile the dll with the option Any CPU in Build - Platform . enter image description here http : i.stack.imgur.com n4f4e.png Comment : That solved my problem Thanks", "Question : Executing code that references c : windows system32 hnetcfg.dll to manage the Windows Firewall from this question http : stackoverflow.com questions 1242566 any-way-to-turn-the-internet-off-in-windows-using-c causes a BadImageFormatException as soon as the DLL is loaded . Opening the 414KB DLL file in NUnit for inspection throws the same exception . I am running Windows 7 . Any solutions .. . Answer : Solved : .. . .. . ...by setting target-platform to x86 .", "Question : I have a DLL FreeType which is certainly 32-bit header : IMAGE FILE MACHINE I386 . I want to use it from C code using DllImport . Target of my application is x86 IntPtr.Size is 4 process is 32-bit . But I get BadImageFormatException Exception from HRESULT : 0x8007000B . What can be wrong Of course I use 64-bit Windows 7 . Comment : Voting to close as not a real question -- the basis for the question was a misunderstanding the OP found the DLL in question was loading correctly .. . Answer : Besides for web-application needs resolve to run 32-Bit Applications in IIS 7 . See http : www.fishofprey.com 2009 04 badimageformatexception-in-iis-70-on-64.html", "Question : null .. . Answer : I get this message when I tray to reach my web site .. . .. . Empty assembly simple name . Description : An unhandled-exception occurred during the execution of the current web request . Please review the stack-trace for more information about the error and where it originated in the code . Exception Details : System.BadImageFormatException : Empty assembly simple name . Source Error : .. . .. . An unhandled-exception was generated during the execution of the current web request . Information regarding the origin and location of the exception can be identified using the exception stack-trace below . Stack Trace : .. . .. . BadImageFormatException : Empty assembly simple name . BadImageFormatException : Could not load file or assembly System.Web.Abstractions Version 3.5.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies . An attempt was made to load a program with an incorrect format . System.Web.UI.ScriptManager.OnInit EventArgs e +0 .. . .. . System.Web.UI.Control.InitRecursive Control namingContainer +333 .. . .. . System.Web.UI.Control.InitRecursive Control namingContainer +210 .. . .. . System.Web.UI.Control.InitRecursive Control namingContainer +210 .. . .. . System.Web.UI.Page.ProcessRequestMain Boolean includeStagesBeforeAsyncPoint Boolean includeStagesAfterAsyncPoint +378 .. . .. . Version Information : Microsoft .NET Framework Version : 2.0.50727.5485 ASP.NET Version : 2.0.50727.5491 .. . .. . I have 2 servers and the site works on one server but not on the other .. . .. . please help Comment : Compare the application pools of the site in both servers check the .net framewrok version Comment : I did . they are the same", "Question : I m building an image-processing application using Emgu CV for x64 and I want to use the filtering functions on images . So I use opencv imgproc.dll but it throws BadImageFormatException http : msdn.microsoft.com en-us library system.badimageformatexception.aspx Comment : Have you seen stackoverflow.com questions 5229310 http : stackoverflow.com questions 5229310 system-badimageformatexception-could-not-load-file-or-assembly Comment : yes all the comments talk about a x64 vs x84 issue i tried changing it before to x64 or AnyCPU but it throw Emgu.CV.CvInvoke exception when i use Emgu CV basic functions Comment : Can you show the exception stack-trace for that error Also where are the OpenCV DLLs located in your solution From memory Emgu expects these to be in a certain location . Comment : @NickW it located @ the bin folder next to the .exe other .DLLs work just fine you want me exception stack for the BadImageFormatException Comment : Could you include the stack traces for both errors .. . Answer : Emgu http : www.emgu.com wiki index.php Main Page is a managed wrapper for OpenCV . Because OpenCV is unmanaged you will need to ensure that you are compiling with the correct settings for the version of Emgu you are using . Based on the exceptions posted in the comments http : pastie.org 5170481 and http : pastie.org 5170499 for reference the Emgu version being compiled against is the x86 one meaning that the OpenCV DLLs it depends on will need to be compiled for 32-bit . For your code to run the Platform target in the Build settings of you project needs to be set to x86 regardless of the bitness of the OS you are running on . To use the 64-bit version of Emgu you will need to download a version compiled for 64-bit you can see the different options here http : sourceforge.net projects emgucv files emgucv 2.4.2 and then set the Platform target to x64 .", "Question : I have a DLL FreeType which is certainly 32-bit header : IMAGE FILE MACHINE I386 . I want to use it from C code using DllImport . Target of my application is x86 IntPtr.Size is 4 process is 32-bit . But I get BadImageFormatException Exception from HRESULT : 0x8007000B . What can be wrong Of course I use 64-bit Windows 7 . Comment : Voting to close as not a real question -- the basis for the question was a misunderstanding the OP found the DLL in question was loading correctly .. . Answer : OK seems like a false alert . It was not related to bitness there was just other DLL missing that freetype depends on . However error messages could be more helpful . Comment : This half solved my problem with BadImageFormatException - I forgot to copy over the dependent DLLs . Unfortunately now I get DllNotFoundException on the original DLL.. . Comment : Please mark this question as answered", "Question : I m currently in the process of increasing code-coverage on our software products and have ran into an issue all of my unit tests when compiled using Any CPU are failing due to throwing a BadImageFormatException . This exception can be circumvented by building the solution using x86 instead of Any CPU however the requirements are such that we need to be able to run them using Any CPU x64 bit . All unit tests involving Moq follow pretty much the same format : .. . .. . I can confirm that this test is successful when it is built using x86 . Does anyone have any ideas on how I can get Moq to play nice when built using Any CPU As an aside I can also confirm that all my projects in the solution are build using the same value Any CPU . I m using Moq v4.0 . EDIT : Here is the full exception : Test method ProductName and the method called threw exception : System.BadImageFormatException : Could not load file or assembly Product name Version 1.0.0.0 Culture neutral PublicKeyToken null or one of its dependencies . An attempt was made to load a program with an incorrect format . Comment : Are you sure it s Moq that s causing the exception Can you post the full text callstack of the exception Comment : It is the likely culprit all other tests which are not running Moq work without issue .. . Answer : This can be caused by missing project or other assembly references . Try making sure you have project references for all the projects in your solution . This post http : vibrantcode.com 2012 05 18 badimageformatexception-the-signature-is-incorrect has a further example . Comment : I will take a look into that and see if that s the case . I ve updated my question with the exact exception which is being thrown", "Question : I m calling functions from a 32-bit unmanaged DLL on a 64-bit system . What I get is : .. . .. . BadImageFormatException : An attempt was made to load a program with an incorrect format . Exception from HRESULT : 0x8007000B .. . .. . At first I had my projects set to the Any CPU platform so I changed them both to x86 but this error is still occurring . That s really the only fix I know for this . The DLLs aren t corrupt or anything because I can use them with other programs that I don t have the source to . I thought that perhaps it wasn t finding a dependency but I checked and they re all there . Plus wouldn t it throw a DllNotFoundException in that case What else can I do And before you say Use a 64-bit unmanaged DLL instead let me point out that there isn t one . Comment : What projects did you change to x86 And how do you execute them when you get the exception through the debugger or manually If the latter did you notice that when you changed to x86 you got a new folder in your bin directory It s basically now bin x86 Debug for the files . Comment : Can you verify that the executable is running in 32-bit mode 32 in the process manager Comment : @Lasse V . Karlsen : Yeah I removed the x86 bit from the output path when I changed the platform in each project . My first project is a DLL that wraps the functions in the unmanaged DLL . The second project is an executable that uses the wrapper in the first DLL . Both are set to x86 . Comment : @JP : Actually the process manager doesn t show it to be running as a 32-bit process . Why is that .. . Answer : In my case it was wrong content of the file . DLL was downloaded from the web but content of the DLL was HTML page : D Try to check if it is binary file if it seems like correct DLL :", "Question : I have a DLL FreeType which is certainly 32-bit header : IMAGE FILE MACHINE I386 . I want to use it from C code using DllImport . Target of my application is x86 IntPtr.Size is 4 process is 32-bit . But I get BadImageFormatException Exception from HRESULT : 0x8007000B . What can be wrong Of course I use 64-bit Windows 7 . Comment : Voting to close as not a real question -- the basis for the question was a misunderstanding the OP found the DLL in question was loading correctly .. . Answer : I had the same Exception in MS Visual C Express 2010 . I checked all build .dll and .exe files with Dependency Walker and MiTeC EXE Explorer everything was build for 32bit In the end it was the following line missing in my .csproj file : .. . .. . I don t know why it was missing .. . I guess MS Visual C Express 2010 is not bugfree", "Question : We ran into an interesting issue that I ve not experienced before . We have a large scale production ASP.NET 3.5 SP1 Web App Project in Visual Studio 2008 SP1 which gets compiled and deployed using a Website Deployment Project . Everything has worked fine for the last year until after a check-in yesterday the app started critically failing with BadImageFormatException http : msdn.microsoft.com en-us library system.badimageformatexception.aspx . The check-in in question doesn t change anything particularly special and the errors are coming from areas of the app not even changed . Using Reflector we inspected the offending methods to find that there were garbage strings in the code which .NET Reflector humorously interpreted as Chinese characters http : img170.yfrog.com i chinesecode.png . We have consistently reproduced this on several machines so it does not appear to be hardware related . Further inspection showed that those garbage strings did not exist in the Assemblies used as inputs to aspnet merge.exe http : msdn.microsoft.com en-us library bb397866.aspx during deployment . aspnet merge.exe Web Deployment Project Output Assemblies Properties : .. . .. . Merge all outputs to a single assembly .. . Merge each individual folder output to its own assembly .. . Merge all pages and control outputs to a single assembly .. . Create a separate assembly for each page and control output .. . .. . In the web-deployment-project properties if we set the merge options to the first option Merge all outputs to a single assembly we experience the issue yet all of the other options work perfectly My question : does anyone know why this is happening Is there a size-limit to aspnet merge.exe s capabilities the resulting merged DLL is around 19.3 MB Are there any other known issues with merging the output of WAPs I would love it if any Assembly format aspnet merge.exe gurus know about any such limitations like this . Seems to me like a 25MB Assembly while big isn t outrageous . Comment : Can you fix the image or remove the link .. . Answer : Doesn t the BadImageFormatException get thrown when you attempt to run x64 code on x86 Comment : That is one of the situations where this occurs msdn.microsoft.com en-us library http : msdn.microsoft.com en-us library system.badimageformatexception.aspx but in this case it isn t that . The individual assemblies work fine by themselves but fail once merged .", "Question : I m calling functions from a 32-bit unmanaged DLL on a 64-bit system . What I get is : .. . .. . BadImageFormatException : An attempt was made to load a program with an incorrect format . Exception from HRESULT : 0x8007000B .. . .. . At first I had my projects set to the Any CPU platform so I changed them both to x86 but this error is still occurring . That s really the only fix I know for this . The DLLs aren t corrupt or anything because I can use them with other programs that I don t have the source to . I thought that perhaps it wasn t finding a dependency but I checked and they re all there . Plus wouldn t it throw a DllNotFoundException in that case What else can I do And before you say Use a 64-bit unmanaged DLL instead let me point out that there isn t one . Comment : What projects did you change to x86 And how do you execute them when you get the exception through the debugger or manually If the latter did you notice that when you changed to x86 you got a new folder in your bin directory It s basically now bin x86 Debug for the files . Comment : Can you verify that the executable is running in 32-bit mode 32 in the process manager Comment : @Lasse V . Karlsen : Yeah I removed the x86 bit from the output path when I changed the platform in each project . My first project is a DLL that wraps the functions in the unmanaged DLL . The second project is an executable that uses the wrapper in the first DLL . Both are set to x86 . Comment : @JP : Actually the process manager doesn t show it to be running as a 32-bit process . Why is that .. . Answer : In my case I was running tests through MSTest and found out that I was deploying both a 32-bit and 64-bit DLL to the test directory . The program was favoring the 64-bit DLL and causing it to fail . TL DR Make sure you only deploy 32-bit DLLs to tests .", "Question : I m calling functions from a 32-bit unmanaged DLL on a 64-bit system . What I get is : .. . .. . BadImageFormatException : An attempt was made to load a program with an incorrect format . Exception from HRESULT : 0x8007000B .. . .. . At first I had my projects set to the Any CPU platform so I changed them both to x86 but this error is still occurring . That s really the only fix I know for this . The DLLs aren t corrupt or anything because I can use them with other programs that I don t have the source to . I thought that perhaps it wasn t finding a dependency but I checked and they re all there . Plus wouldn t it throw a DllNotFoundException in that case What else can I do And before you say Use a 64-bit unmanaged DLL instead let me point out that there isn t one . Comment : What projects did you change to x86 And how do you execute them when you get the exception through the debugger or manually If the latter did you notice that when you changed to x86 you got a new folder in your bin directory It s basically now bin x86 Debug for the files . Comment : Can you verify that the executable is running in 32-bit mode 32 in the process manager Comment : @Lasse V . Karlsen : Yeah I removed the x86 bit from the output path when I changed the platform in each project . My first project is a DLL that wraps the functions in the unmanaged DLL . The second project is an executable that uses the wrapper in the first DLL . Both are set to x86 . Comment : @JP : Actually the process manager doesn t show it to be running as a 32-bit process . Why is that .. . Answer : Also see this answer http : stackoverflow.com a 3010603 7850 which solved the same problem for me . Posted by Luis Mack on 5 12 2010 at 8 : 50 AM I ve found the same problem only for a specific project when compiling on a 64-bit machine . A fix that SEEMS to work is to manually alter one character in the image stream EVERY TIME the usercontrol or form is edited in the designer .. . .. . .. . AAEAAAD AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w .. . .. . .. . Change to .. . .. . .. . AAEAAAD AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w .. . .. . .. . That is 00LjAuMC4w back to 0yLjAuMC4w at the end of the line 00 back to 0y Comment : A brief summary of the link would be helpful @Shaul : Comment : @MarvinThobejane - done Comment : Magnificent . Thanks the briefing adds content to your comment", "Question : Not able to run as web-site in visual-studio-2013 .. . .. . Could not load file or assembly Aurigma.GraphicsMill or one of its dependencies . An attempt was made to load a program with an incorrect format . Exception Details : .. . .. . System.BadImageFormatException : Could not load file or assembly Aurigma.GraphicsMill or one of its dependencies . An attempt was made to load a program with an incorrect format . Tried as suggested by Graphicsmill frequent asked questions forums for Web Application .. . .. . How to Resolve BadImageFormatException . http : www.graphicsmill.com docs gm frequently-asked-questions.htm .. . .. . Any other suggestions to make web-site run in my local-machine through visual-studio-2013 is really helpful . Comment : Sorry I forgot to make the change to relevant application-pool . stackoverflow.com questions 2023766 http : stackoverflow.com questions 2023766 an-attempt-was-made-to-load-a-program-with-an-incorrect-format-even-when-the-p rq 1 .. . Answer : There s a lot of information about this problem . Most of it is about a problem with 64-bit vs 32-bit . Well my exact problem was I was using 64-bit Aurigma.GraphicsMill but my App pool DefaultAppPool had Enable 32-Bit Applications set to True which if you read the description on the bottom of the window says it makes your app run in 32-bit Mode . I was trying to run a 64-bit .dll from a 32-bit application . enter image description here http : i.stack.imgur.com EIeQt.png", "Question : I have a web service that throws a BadImageFormatException any time I try to run the service from Visual Studio . This answer http : stackoverflow.com questions 214223 help-troubleshooting-system-badimageformatexception 214240 214240 to another question suggested running peverify against DLLs to see if there are any problems . While my web service s DLL is fine the web service depends on an ILMerged assembly which does have errors : .. . .. . IL : Error : C : blah MyILMergedAssembly.dll : Encryption .. . .. . Utils.SecureStringExtensions : : SecureEquals offset 0x00000055 found unmanaged pointer expected unmanaged pointer Unexpected type on the stack . .. . IL : Error : C : blah MyILMergedAssembly.dll : Encryption .. . .. . Utils.SecureStringExtensions : : SecureEquals offset 0x0000005D found unmanaged pointer expected unmanaged pointer Unexpected type on the stack . .. . IL : Error : C : blah MyILMergedAssembly.dll : Encryption .. . .. . Utils.SecureStringExtensions : : SecureEquals offset 0x0000007E Unmanaged pointers are not a verifiable type . .. . 3 Error s Verifying . MyILMergedAssembly.dll .. . .. . 188 Warnings .. . .. . I think these stem from my use of Marshal and IntPtr in MyILMergedAssembly but everywhere I do that I have the method declared as unsafe . How can I get rid of the errors peverify gives and hopefully get rid of the BadImageFormatException that comes up when I try to run my web service Edit : it looks like maybe I can t use ILMerge to merge assemblies that have unsafe code . So I tried having my web service-reference all the individual DLLs in MyILMergedAssembly but I still get a BadImageFormatException . Now it gives me the exception on one of the individual assemblies . When I run peverify on that individual assembly I get : .. . .. . IL : Error : C : blah Connection.dll : Connection .. . .. . .ConnectionBase : : .ctor HRESULT 0x80070002 - The system cannot find the file specified . The ConnectionBase class to which it s referring is right there in Connection.dll or at least it should be since the class is defined in the Connection namespace project . Connection has Allow unsafe code checked in its Build options . The constructor in ConnectionBase to which it might be referring is marked as internal . Edit : I ve tried checking Allow unsafe code in the web service project that uses the DLLs with unsafe code . I also tried adding compilerOptions unsafe to the Web.config file for the web service in the system.codedom compilers compiler node . I still get a page with the following when I run the web service though : .. . .. . Could not load file or assembly Connection or one of its dependencies . An attempt was made to load a program with an incorrect format . .. . Answer : Oh man this is annoying . It wasn t unsafe code it wasn t the 32 64-bit target-platform settings on my projects in VS it wasn t ILMerge . I had to set the Enable 32-Bit Applications setting to True on the application-pool in IIS 7 I m in Windows 7 64-bit . After restarting the app pool my web service loads fine . Thanks to this blog http : www.fishofprey.com 2009 04 badimageformatexception-in-iis-70-on-64.html for sending me in the right direction .", "Question : I understand there is lots of these posts around and I ve dealt with these on my own before with no problem except this time . It s because I can t get the debug-information i need out of Windows Azure and hoping someone might be able to help me out . This all work s perfectly fine in my local environment debug release . I m getting this error : Could not load file or assembly Lib or one of its dependencies . An attempt was made to load a program with an incorrect format . Lib does exist in the directory it depends on only System.Drawing mscorlib . Usually I would just attached to AppDomain.Current.AssemblyResolve or check the exception when it s throw . I m not able to do this with Azure because the exception happens during the preload stuff . Is there a way to override create custom assembly loader to intercept this problem I m at a complete loss . Thanks .. . .. . Steve .. . Answer : I hate it when i do this . Post a question on SO because I ve been trying all day then i fix it 10 minutes after . So it seem s i missed a piece of key information which would of helped a lot . BadImageFormatException .. . .. . This as far as i can tell is thrown when there are problems with the PLATFORM architecture compatibility x86 x64 . All of my projects were compiled for Any CPU can be found under project properties Build Platform Target VS2013 . However my Lib project was built for x64 only and the Azure Web Site was running in 32bit mode so was not able to load the 64 bit dll . Two options : .. . .. . 1 . Compile the Lib dll as AnyCPU or 32bit then re-publish .. . 2 . Switch the azure web site to 64 bit . I wen t with option 2 because of what the Lib dll does I need it as 64 bit . So for future reference if anyone else has something like this check the following : .. . .. . 1 . Azure website Platform found under Configure Platform on the old portal .. . 2 . Check all your project s are set for any CPU or a compatible Platform architecture .. . .. . I hope this helps someone else . Thanks .. . .. . Steve .. . .. . EDIT : If anyone else has some more useful information to add for people in the future which might have this problem please do .", "Question : I have a DLL FreeType which is certainly 32-bit header : IMAGE FILE MACHINE I386 . I want to use it from C code using DllImport . Target of my application is x86 IntPtr.Size is 4 process is 32-bit . But I get BadImageFormatException Exception from HRESULT : 0x8007000B . What can be wrong Of course I use 64-bit Windows 7 . Comment : Voting to close as not a real question -- the basis for the question was a misunderstanding the OP found the DLL in question was loading correctly .. . Answer : I had a similar error . I could solve it by adding the ucrtbase.dll or ucrtbased.dll for debug as well as the vcruntime140.dll or vcruntime140d.dll for debug into the directory of the executable . I think the 140 depends on the version number of Visual Studio you are using . ucrtbase.dll usually lies in C : Windows System32 . vcruntime140.dll lies in C : Program Files x86 Microsoft Visual Studio 14.0 Common7 IDE Remote Debugger x86 vcruntime140.dll .. . .. . You can find more information here : http : blogs.msdn.com b vcblog archive 2015 03 03 introducing-the-universal-crt.aspx", "Question : null .. . Answer : I m trying to dynamically generate an executable with the CSharpCodeProvider whose only purpose is to invoke one single method from a specific dll . When I execute the generated file I get a BadImageFormatException . I already set the platform to x86 . When I manually write the code which invokes the method and debug it in Visual Studio it works perfectly fine . This is the code for the executable : .. . .. . Before dynamically compiling the code I add the assembly via .. . .. . I write the executable to the same directory as the dll . EDIT .. . .. . This is the code that I use to invoke the compiler : Comment : I already set the platform to x86 did you do this with options platform : x86 If so you will need to provide the code you use to compile . Comment : Please add the code that actually invokes the compiler . In all likelihood you still have a bitness mismatch like the generated executable being any platform and running on an x64 system while your DLL is x86 . Comment : Are you sure you need to specify a bitness Will Any not suffice Comment : @LaurenceAdams : the OP is generating an executable that references a DLL . If the DLL is x86 and the platform you re running on is x64 the executable will also have to be specified as x86 not Any which will default to x64 . Of course for interoperability the DLL really should have platform Any and then the bitness of your executable doesn t matter . Comment : @Jerown Mostert : I fully understand the difference between x86 x64 and Any as well as the meaning of a BadImageFormatException . The OP seems to randomly state that he she set the platform to x86 . It s completely valid to ask the OP if this step was necessary as they are trying to solve a BadImageFormatException .", "Question : I have a solution with a C project of library and a project JavaScript after that compiled it generates a .winmd file being taken to another project . But this project is built on x86 and I need to compile for x64 to run the application in order x64 get the following error : Comment : My operational system is Windows 8.1 x64 Comment : Error formatted .. . Answer : If I understand you correctly the library-project is compiled specifically to x86 and you are consuming it from the javascript project which is targeting x64 If that is the case you will not be able to make this work as the 64 bit process cannot load assemblies that are compiled for x86 explictily you get the BadImageFormatException mentioned . You options are to compiled the Javascript project in x86 mode which will run on WoW but I m unsure how that relates to winmd files . Your best bet is if you have access to the library-project code to compile it as Any CPU so it can be used by processes running in any bitness . Comment : So I tried to create a new project and copy the classes and .dll files that are referenced in the solution . I m trying to compile the project to Any CPU option but I m getting the same exception . Comment : Are there some native dlls being loaded I see now the error is coming from interop services Comment : Yes there are some dlls I have them both x64 and for x32 when they are loaded I use the dll their compilation architecture ." ] }
[ "yes-answer-long", "yes-answer-short" ]
executable
UNK_RELATION
winsxs@winsxs@105
winsxs -- the windows side-by-side assembly or the component store directory itself usually c : windows @placeholder .
{ "confidence": [ 49.06703567504883, 40.34990692138672, 39.96964645385742, 38.05767822265625, 37.48487854003906, 36.642982482910156, 35.87692642211914, 35.131629943847656, 34.944175720214844, 34.90289306640625, 34.68975830078125, 34.60441589355469, 33.75470733642578, 32.88006591796875, 32.34371566772461, 31.588302612304688, 31.49404525756836, 30.989370346069336, 30.443689346313477, 30.40275001525879, 30.40275001525879, 30.28752326965332, 30.009477615356445, 30.009477615356445, 30.009477615356445, 29.786075592041016, 29.516101837158203, 28.77220916748047, 28.724348068237305, 28.46978759765625, 28.113689422607422, 27.748455047607422, 27.693513870239258, 27.486446380615234, 27.45183753967285, 27.431835174560547, 27.220970153808594, 27.197277069091797, 26.423921585083008, 26.26386070251465, 26.243938446044922, 26.034624099731445, 25.886024475097656, 25.793861389160156, 25.743030548095703, 25.53860092163086, 25.467754364013672, 25.32002067565918, 25.32002067565918, 25.238096237182617, 25.18221092224121, 25.182172775268555, 24.824295043945312, 24.824295043945312, 24.77448272705078, 24.691776275634766, 24.368938446044922, 24.368938446044922, 24.30921173095703, 24.302688598632812, 24.193439483642578, 24.18862533569336, 24.188365936279297, 24.15608024597168, 24.07529067993164, 23.973398208618164, 23.973398208618164, 23.973398208618164, 23.909700393676758, 23.909700393676758, 23.806169509887695, 23.806169509887695, 23.803062438964844, 23.731664657592773, 23.55178451538086, 23.46139144897461, 23.307212829589844, 23.30220603942871, 23.28899574279785, 23.131710052490234, 22.911670684814453, 22.911670684814453, 22.847000122070312, 22.78456687927246, 22.685531616210938, 22.57032012939453, 22.554798126220703, 22.297000885009766, 22.25084686279297, 22.240478515625, 22.171430587768555, 22.171430587768555, 22.03470230102539, 22.03470230102539, 21.975236892700195, 21.975236892700195, 21.77131462097168, 21.742713928222656, 21.72283935546875, 21.72283935546875 ], "content": [ "The VS2008 installer is certainly supposed to install that DLL into the c : windows winsxs side-by-side assembly cache .", "C : Windows winsxs amd64 microsoft.vc90.crt 1fc8b3b9a1e18e3b 9.0.30729.6161 none 08e61857a83bc251 .", "Side-by-Side assemblies WinSxs are difficult to handle .", "On my Windows 7 the file is located only in the folder c : windows winsxs .", "Unfortunately my C : runs on SSD Windows 7 Ultimate is now taking 63.5 GB of space and C : Windows winsxs takes 26.5GB by itself with 16.4GB in C : Windows Installer .", "Which installer installed the below files in my system in the Windows Winsxs folder", "Exact path : C : Windows winsxs x86 microsoft.vc90.debugcrt 1fc8b3b9a1e18e3b 9.0.30729.1 none bb1f6aa1308c35eb msvcr90d.dll", "On Windows 7 when I invoke GetFileVersionInfo on an absolute path for example c : windows system32 taskeng.exe I receive the version information for C : Windows winsxs x86 microsoft-windows-taskscheduler-engine 31bf3856ad364e35 6.1.7600.16385 none e582a352202e02c8 taskeng.exe .. . .. . So to clarify the version c : windows system32 taskeng.exe reported by Windows Explorer is 6.1.7600.16699 .", "Windows seems to think it knows better and redirects me to a different file under the WinSxS directory .", "Background : .. . .. . Windows shared run-time libraries located at C : windows Winsxs folder .. . Inside Winsxs there are two important sub folders also located as policies and Manifests .. . Other than that there are plenty of run-time assemblies located in side each other sub folders .", "Upon further investigation I realized that this is because of Windows Side-by-side assemblies .", "Find the folder in C : WINDOWS WinSxS where your dll is located .", "I checked the Windows 7 machine s WinSxS directory and found .. . .. . I checked the Windows Server 2008 R2 machine s WinSxS directory and found .. . .. . The runtime that is present is newer than what is specified in the manifest and yet the Windows Server 2008 R2 system fails to redirect to the newer runtime .", "I see that on Windows 8 and higher Adobe Flash is distrubted as a SxS versioned assembly in the WinSxS folder : .. . .. . I wrote this small program to try and load Flash using side-by-side to load a specific version : .. . .. . But the app fails to start with a message The application has failed to start because the application configuration is incorrect .", "The load path is the following one : .. . .. . C : Windows winsxs x86 microsoft.vc90.crt 1fc8b3b9a1e18e3b 9.0.30729.6161 none 50934f2ebcb7eb57 .. . .. . The DLL is present at this path with msvcp90.dll and msvcm90.dll .", "Deleting files from winsxs is likely to break other applications or even Windows .", "Why was the assembly not added to WinSxS by the installer", "Place a copy of the side-by-side assembly into the utils folder .", "For this example let s assume it lives here : .. . .. . Do I REALLY need to manually search the c : windows winsxs directory looking for my DLL by name then check the parent directory to see if it contains the correct version", "that does not seem to be the case - the exe is linked against 9.0.21022.8 and 9.0.30729.1 but runs on a clean Windows 7 machine that only has 9.0.30729.4926 in the WinSxS directory .", "Windows has a WinSXS directory which stores old versions of some system files in case you want to roll back a service pack or similar .", "Which is the key point of WinSxS deployment the side-by-side cache stores multiple versions of the DLLs .", "However i can see that this dll is available in the respective folder under C : windows winSxs area .", "I finally found that the manifest was missing from the C : WINDOWS WinSxS Manifests folder .", "Check to see if there is a manifest in C : WINDOWS WinSxS Manifests that matches the folder name of your dll .", "On Windows Server 2008 R2 this executable fails to run with the message : .. . .. . The application has failed to start because its side-by-side configuration is incorrect .", "Here s an example that loads the CRT from the WinSxS directory .", "Well isn t that the whole point of side-by-side", "More specifically this .bat file starts up a JVM java.exe MyMainClass which is configured to run using Windows SxS side-by-side .", "Additionally what does the line INFO : Find publisher policy at C : Windows WinSxS manifests x86 policy.8.0.microsoft.vc80.crt 1fc8b3b9a1e18e3b 8.0.50727.4940 none 516d712b0f495a45.manifest mean", "C : Windows WinSxS Manifests x86 microsoft.vc90.crt 1fc8b3b9a1e18e3b 9.0.30729.4148 none 5090ab56bcba71c2.manifest : .. . Microsoft.VC90.CRT.Manifest : .. . .. . It is not possible to remove the assembly references from the application manifest as the CRT complains that it is not being loaded via SxS .", "I know how to resolve this problem when it is in my own computer just make sure the right dependencies are in the winsxs directory but now it s in the remote desktop using windows azure roles and I have no permission to add the right dependencies into the winsxs directory .", "Under Visual Studio 2008 with the VC90 runtime a manifest was embedded in native images and the runtime libraries were deployed as side-by-side assemblies WinSxS .", "are you sure you don t want the side-by-side version", "One symptom is a side-by-side error when attempting to run the newly built application on a machine that does not have the particular Windows update applied .", "Even though I had uninstalled VS 2008 the test works on my machine because that runtime DLL still exists in the side-by-side cache windir winsxs .", "On verification I realized that the the problem was indeed with the installation of the Win32 assembly into WinSxS .", "I tried installing the Visual Studio 2008 redistributable packages hoping the missing debug .dll would be installed in C : Windows winsxs .", "Go through C Runtime Library WinSxS http : social.msdn.microsoft.com Forums en-US vcmfcatl thread c1dc12ae-f032-4c20-9ff9-c16ea531ca08 prof required .", "The version of c : windows system32 taskeng.exe reported by GetFileVersionInfo is 6.1.7600.16385 .", "Running SxSTrace has it probing for the assembly in GAC 64 and in the application folder after failing to find it in WinSxS .", "I ve added an assembly manifest to my executable defining my dependancy on the version of GdiPlus : .. . .. . Except when I run my application Windows fusion loader gives me some other version of gdiplus.dll from the Side-by-Side folder which I can see in Process Explorer : .. . .. .", "Installed assemblies are not backups they are used at the same time or side-by-side if you will .", "This is a native C++ application which does not provide any specific WinSxS linkages in its manifest .", "I don t think so because checking the version c : windows system32 taskeng.exe via windows-explorer shows a different value .", "WinSxS is not a backup of old system files .", "I also have a policy file for these .dlls in C : WINDOWS WinSxS Policies which was installed by the Visual C++ 2008 SP1 Redistributable Package http : www.microsoft.com download en details.aspx id 5582 .", "I use the dependency-walker dependencywalker.com http : www.dependencywalker.com to see the dependencies of my DLL then I find out that the DLL relied on the MSVCR80.DLL in the C : windows winsxs dir which can not be found in the Azure VM .", "I don t know what the final identifier is in relation to the manifest i.e : C : Windows winsxs x86 microsoft.vc90.crt 1fc8b3b9a1e18e3b 9.0.21022.8 none bcb8 6ed6ac711f91 the bcb86ed6ac711f91 bit isn t found in the manifest so I m not sure how to resolve that :", "Is this WinSxS at work", "I researched a bit on how to install a Win32 assembly in WinSxS and was finally able to get it done with the use of mainfest and catalog files .", "I ve got a C .exe that requires side-by-side deployment of a hand-built manifest .", "The side-by-side error in the question title comes from Dependency Walker .", "Adding a manifest fixes the R6034 error but surfaces the FileLoadException side-by-side issue .", "One hint from there : .. . .. . Go to System Drive Windows WinSxS and look for the directory x86 Microsoft.VC90.DebugCRT 1fc8b3b9a1e18e3b 9.0.21022.8 x-ww 597c3456 .. . .. . If this doesn t exist go to the VS setup and make sure you have all libraries installed under VC++ .", "The Windows 6 SDK includes the VC8 compilers the Windows 7 SDK includes the VC9 compilers and the Windows 7.1 SDK includes the VC10 compilers .", "I figured out that can be done using WinSxS .", "I dynamically load the dll file from WinSxS .", "Your options are to statically build the runtimes into your project or load the DLLs from your application directory with out the Side-By-Side system .", "I can t give a definitive solution but here are some helpful links : .. . .. . David Lenihan s blog on WinSxS http : davidlenihan.com 2007 07 winsxs.html .. . Side-by-side assemblies http : msdn.microsoft.com en-us library aa376307 28VS.85 29.aspx .. . Troubleshooting C C++ Isolated Applications and Side-by-side Assemblies http : msdn.microsoft.com en-us library ms235342 28VS.80 29.aspx .. . Assembly Searching Sequence http : msdn.microsoft.com en-us library aa374224 28VS.85 29.aspx .. . .. . And of course there s a lot more on MSDN if you follow the links .", "So these pre-installed C++ redistribute packages automatically deployed some run-time policies in Winsxs policies .", "Confirmed working on windows-7 x64 .", "I extracted the following assembly from the built DLL : .. . .. . The indicated CRT dlls can be found in the WINSxS directory under x86 Microsoft.VC80.CRT 1fc8b3b9a1e18e3b 8.0.50727.762 x-ww 6b128700 along with a bunch of other versions .", "You ll see that there is a calc.exe in C : Windows SysWOW64 as well .", "WinSxS seems to cache the policy .", "The whole point of side-by-side deployment is that it solves the problem you describe with different programs using different versions of the DLLs .", "I do not know a lot about side-by-side libraries but I have heard about it .", "That worked out well here looks like the side-by-side cache turned into spaghetti .", "I have a Win32 assembly which I ve been deploying though the installer into WinSxS .", "The eventviewer logs the following : .. . .. . sxstrace shows the following : .. . .. . My question is : .. . .. . 1- INFO : Did not find the assembly in WinSxS .", "Before WinSxS was introduced the only other way was to use App Paths http : msdn.microsoft.com en-us library windows desktop ee872121 28v vs.85 29.aspx appPaths settings in registry on per-executable basis .", "I have read articles on how it s bad to reduce space in winsxs but unfortunately Windows completely overwhelms any actual user data files I have on the drive .", "Surely it s merely redirecting you to the actual file that will load when the user runs c : windows system32 taskeng.exe", "My Question : Is there a way I can tell the apps in the utils folder to explicitly look in the . . bin folder for the appropriate side-by-side assembly", "I ve read a lot of posts related to these side-by-side errors .", "I have a Win32 assembly C++ CLI wrapper over my .NET code which is supposed to be installed in WinSxS and should be referenced from that location by client applications using the API .", "Is there a specific reason why you want to use WinSxS", "My next guess is to bodge up the registry entries required to populate the files into the WinSxS directory and populate it myself rather than using the 4 meg program .", "Each of these executables rely on the side-by-side assembly C++ run-time DLLs that we store in bin but we have segregated them into these separate folders for various reasons e.g . the exes in the utils folder are supplemental tools to our primary application and are run infrequently .", "Even Microsoft has moved away from this the latest C++ runtimes no longer use WinSxS .", "Shouldn t uninstalling VS 2008 have caused all of its runtime DLLs to be removed from the side-by-side cache", "Is there a way I can manually remove these old DLLs from the side-by-side cache", "More info here : Application Configuration Files http : msdn.microsoft.com en-us library windows desktop aa374182 28v vs.85 29.aspx .. . .. . EDIT : if you have problems like the application failed to initialize properly or side-by-side configuration is incorrect and you will have them once you start playing with sxs use sxstrace http : technet.microsoft.com en-us library hh875651 28v ws.10 29.aspx tool for diagnostics not available on Windows XP though .", "All the sub-folders inside Winsxs and policies having same naming format .", "I appreciate your reply I guess in this case I am the user which has to re-image the side-by-side cache .", "In other words can I force the application to load exclusively from winSxS or locally which ever is present in both scenarios where the dlls exist in winSxS or not .", "I find the Microsoft.VC80.CRT dlls and the Microsoft.VC80.MFC dlls and also the correspond manifest files all the version numbers is 8.0.50727.6195 in the C : Windows WinSxS and put it in the dir the same as B3DTest.exe my program .", "I put the debug DLLs in C : Windows System32 and had no problem running a debug build on an otherwise naked machine no VS just a remote debugger .", "How do I force my app to not have its file redirected via WinSxS", "However due to the need for elevated-privileges to install to winSxS the click-once install needs to install the files locally to the bin directory of the application .", "This was unexpected - I thought Windows 7 and Windows Server 2008 R2 should be very similar regarding runtime availability .", "The Windows Server 2008 R2 machine only has some updates from Windows Update .", "WinSxS GAC assemblies manifests yada yada yada .", "I do have MSVCR90D.dll in one of Winsxs folders .", "Instead use the web install of the Windows SDK to install the compilers .", "The Windows 7.1 SDK compilers require 610.6MB of hard disk space .", "I keep Windows 7 Ultimate installed on my main PC due to discontinued drivers on Windows 10 and everybody knows why I didn t install Windows 8 8.1 .", "My c : windows assembly gac 32 does not contain a dir named Microsoft.VC80.DebugCRT which the output of sxstrace seems to suggest should exist .", "@Hans : Just deleting from winsxs would be a bad idea .", "Actually you don t have to build the name of the WinSxs dependencie on your own ." ] }
{ "confidence": [ 52.51448440551758, 52.51448440551758, 50.770320892333984, 50.543636322021484, 48.63334655761719, 46.605167388916016, 46.05725860595703, 43.53780746459961, 42.93939971923828, 41.921268463134766, 41.56675720214844, 40.63544845581055, 40.525272369384766, 40.161136627197266, 39.48551940917969, 39.44590759277344, 39.06821060180664, 38.92046356201172, 38.15446472167969, 37.679744720458984 ], "content": [ "Question : I have an application that is required to check the versions of various system EXEs and DLLs to determine if they are vulnerable or not . This is a native C++ application which does not provide any specific WinSxS linkages in its manifest . On Windows 7 when I invoke GetFileVersionInfo on an absolute path for example c : windows system32 taskeng.exe I receive the version information for C : Windows winsxs x86 microsoft-windows-taskscheduler-engine 31bf3856ad364e35 6.1.7600.16385 none e582a352202e02c8 taskeng.exe .. . .. . So to clarify the version c : windows system32 taskeng.exe reported by Windows Explorer is 6.1.7600.16699 . The version of c : windows system32 taskeng.exe reported by GetFileVersionInfo is 6.1.7600.16385 . How do I force my app to not have its file redirected via WinSxS Comment : are you sure you don t want the side-by-side version What s the underlying project goal Comment : Yeah . The goal is to determine if DLLs or EXEs are up to-date or not so I need to be able to specify an exact path and get the version of that file . Windows seems to think it knows better and redirects me to a different file under the WinSxS directory . Comment : Surely it s merely redirecting you to the actual file that will load when the user runs c : windows system32 taskeng.exe And isn t that what you want Comment : I don t think so because checking the version c : windows system32 taskeng.exe via windows-explorer shows a different value . Comment : Well isn t that the whole point of side-by-side My guess is that if GetFileVersionInfo didn t do this it would be doing it wrong . .. . Answer : Are you sure you are looking at the correct fields GetFileVersionInfo gives me the same thing as Explorer with one caveat : the FileVersion in the StringFileInfo is 6.1.7600.16385 whereas the FileVersion in the VS FIXEDFILEINFO is 6.1.7600.16699 . Explorer is showing the FileVersion from the VS FIXEDFILEINFO . I guess Microsoft just didn t update the StringFileInfo for some reason . Comment : You nailed it . We ve always just looked at the string version . I guess MS forgot to update the resource file completely when they updated it .", "Question : I have an application that is required to check the versions of various system EXEs and DLLs to determine if they are vulnerable or not . This is a native C++ application which does not provide any specific WinSxS linkages in its manifest . On Windows 7 when I invoke GetFileVersionInfo on an absolute path for example c : windows system32 taskeng.exe I receive the version information for C : Windows winsxs x86 microsoft-windows-taskscheduler-engine 31bf3856ad364e35 6.1.7600.16385 none e582a352202e02c8 taskeng.exe .. . .. . So to clarify the version c : windows system32 taskeng.exe reported by Windows Explorer is 6.1.7600.16699 . The version of c : windows system32 taskeng.exe reported by GetFileVersionInfo is 6.1.7600.16385 . How do I force my app to not have its file redirected via WinSxS Comment : are you sure you don t want the side-by-side version What s the underlying project goal Comment : Yeah . The goal is to determine if DLLs or EXEs are up to-date or not so I need to be able to specify an exact path and get the version of that file . Windows seems to think it knows better and redirects me to a different file under the WinSxS directory . Comment : Surely it s merely redirecting you to the actual file that will load when the user runs c : windows system32 taskeng.exe And isn t that what you want Comment : I don t think so because checking the version c : windows system32 taskeng.exe via windows-explorer shows a different value . Comment : Well isn t that the whole point of side-by-side My guess is that if GetFileVersionInfo didn t do this it would be doing it wrong . .. . Answer : Here s a PowerShell script to show the difference . FileVersion is a string that is different than the composition of FileMajorPart . FileMinorPart . FileBuildPart . FilePrivatePart .", "Question : null .. . Answer : I see that on Windows 8 and higher Adobe Flash is distrubted as a SxS versioned assembly in the WinSxS folder : .. . .. . I wrote this small program to try and load Flash using side-by-side to load a specific version : .. . .. . But the app fails to start with a message The application has failed to start because the application configuration is incorrect . Running SxSTrace has it probing for the assembly in GAC 64 and in the application folder after failing to find it in WinSxS .", "Question : I m in the middle of writing my own version of the Windows Loader albeit a very simple version and thus far things have worked out fairly well . However I ve run into a little snag when it comes to recursively walking the Import table for the loaded module . For most dependencies things work out well and I can simply recursively load the module . However for some dependencies this just breaks the target process . Upon further investigation I realized that this is because of Windows Side-by-side assemblies . Essentially the dependency in the loaded PE was a different SxS version of the module being used in the target process . In one case the DLL I was loading referenced msvcr90.dll but the target process was using an earlier version of the runtime : msvcr71.dll . Now the windows loader can handle this fine so there s obviously a correct way to do this . I ve read up a bit on Activation Contexts but they haven t really helped me grasp the issue . Calling LoadLibrary itself doesn t resolve the dll to the correct version either .. . .. . Simply returns 0 . Does anyone know .. . .. . a How to detect if an import is a SxS assembly .. . .. . b How to resolve the import into the correct SxS version for the process . I m really stumped on how to do this . I know most of the PE file-format from research now but I m pretty sure the SxS is beyond the scope of PE structure . If you need any more info just comment . The executable doesn t have an external manifest and its embedded manifest doesn t specify the runtime version . It does however contain a copy of msvcr71.dll in its working directory if that helps anyone at all . Cheers . Comment : You are just seeing the top of the iceberg that sank the Titanic . You will also have to deal with manifests either embedded as a resource or provided on disk publisher policies binding redirects registry-free COM dynamic activation through CreateActCtx custom DLL search paths set with SetDllDirectory . The documentation is lousy . Comment : @HansPassant I managed to get this working . You were right in that it was just the tip of the iceburg haha . In the end I had to write a Resource Walker to locate the .dll s internal manifest RT MANIFEST . Next I had to write an assembly stub that handled all the Activation Context stuff . Of course I could ve simply written it in C++ and wrapped it in a .dll with static linkage i.e no SxS then used it to load all the next libraries but it seemed overkill so I did it in assembly . Basically I feed the assembly function a null-delimited string of needed dependencies.. . Comment : as well as the path to the manifest I extracted the internal manifest to a temp file CreateActCtx needs a path to the manifest . It then creates the activation context runs through the null-delimited list of modules and calls GetModuleHandle on each . If GetModuleHandle returns 0 it proceeds to call LoadLibrary . If still 0 it exits the function . I know I skipped over the hardest part by simply using LoadLibrary within the Activation Context but I only really wanted to use my own loader for the main dll not its dependencies . .. . Answer : As a matter of fact SxS dependencies are beyound the scope of the PE Structure As you know the Import Tables of PE enumerate the dependencies names but not their versions . When handling these tables of dependencies the Loader also look at the Manifest of the PE dependent images . Should a Manifest documents one or more libraries e.g msvcr90 advapi32 ... . the loader looks in winsxs folder to find the dependency . Here an article http : www.codeproject.com Articles 88363 Retrieve-the-Assembly-Identities-from-a-Manifest-u that gives an overview of this assembly and how to collect these information in C++ . Comment : Actually you don t have to build the name of the WinSxs dependencie on your own . All you need to do is to probe using CreateActCtx . Should the loader find that the dependency it will built the correct path e.g . x86 microsoft-windows-msvcrt 31bf3856ad364e35 6.1.7601.17744 none d33c3413fd4084 d9 for you Comment : Side-by-Side assemblies WinSxs are difficult to handle . I had this problem during my implementation of PeStudio winitor.com http : www.winitor.com Comment : Thanks for the link it s making things a bit more clear . The only thing is how do you check if a given import name is WinSxS I mean in the manifest Microsoft.VC90.CRT is associated with msvcr90.dll but how is this link established If I first read the manifest to identify WinSxS compatible imports how do I map them to a specific import name Comment : Okay I figured the first thing would be to construct a list of all the possible WinSxS imports by first looking up the image s RT MANIFEST resource and resolving all possible WinSxS dependencies from that . However I m struggling to see how to convert the manifest info to a SxS directory . I don t know what the final identifier is in relation to the manifest i.e : C : Windows winsxs x86 microsoft.vc90.crt 1fc8b3b9a1e18e3b 9.0.21022.8 none bcb8 6ed6ac711f91 the bcb86ed6ac711f91 bit isn t found in the manifest so I m not sure how to resolve that : Comment : It is the job of the loader with the help of WinSxS Manager to resolve the real path of the library . As mentioned in the article the path depends on the language public-key token etc... . Let the loader resolves this for you . Use Activation context Api msdn.microsoft.com en-us library windows desktop http : msdn.microsoft.com en-us library windows desktop aa376620 v vs.85 .aspx", "Question : null .. . Answer : I have a fresh installation for VS 2008 and I made sure to check the x64 compiler and tools during installation . But when I make a x64 debug build of an exe that gives a side-by-side error when attempting to run . The eventviewer logs the following : .. . .. . sxstrace shows the following : .. . .. . My question is : .. . .. . 1- INFO : Did not find the assembly in WinSxS . Why was the assembly not added to WinSxS by the installer 2- The file can be found in the C : Program Files x86 Microsoft Visual Studio 9.0 VC redist Debug NonRedist amd64 Microsoft.VC90.DebugCRT location . Why is the installer installing it here when it would not be used from here 3- I managed to get the program working by taking the files from above location and putting it alongside the executable . But what is the correct way to resolve this situation 4- Whose issue is this Is this the VS setup which is not proper Thanks for your attention . Comment : The VS2008 installer is certainly supposed to install that DLL into the c : windows winsxs side-by-side assembly cache . Why this didn t happen is impossible to guess . Review the installer log files for hints . Comment : Thanks Hans Passant . Are you talking of setupapi.log", "Question : I ve got an executable who s manifest says it depends on .. . .. . On Windows 7 this executable runs with no problem . On Windows Server 2008 R2 this executable fails to run with the message : .. . .. . The application has failed to start because its side-by-side configuration is incorrect . Please see the application event log or use the command-line sxstrace.exe tool for more detail . This was unexpected - I thought Windows 7 and Windows Server 2008 R2 should be very similar regarding runtime availability . Both machines are pretty clean . The Windows 7 machine is a fresh installation with nothing on it . The Windows Server 2008 R2 machine only has some updates from Windows Update . I checked the Windows 7 machine s WinSxS directory and found .. . .. . I checked the Windows Server 2008 R2 machine s WinSxS directory and found .. . .. . The runtime that is present is newer than what is specified in the manifest and yet the Windows Server 2008 R2 system fails to redirect to the newer runtime . Running sxstrace on Windows Server 2008 R2 shows : .. . .. . Running sxstrace on Windows 7 gives : .. . .. . Any ideas how this could be resolved besides installing the VS 2008 runtime and the VS 2008 SP1 runtime I thought the whole idea of the assemblies was that it allowed the system to override the older runtimes and substitute the newer ones . Comment : I m experiencing this too . I ve compared the SXS directories between a Win7 and Server 2008 R2 machine and they seem the same . Furthermore the error seems isolated to just server 2008 R2 - I tested on Windows Vista Server 2008 non R2 Windows 8 and 8.1 Server 2012 and R2 and these all have the 30729 version of the C++ runtime and all redirect appropriately . Only server 2008 R2 has this issue : - .. . Answer : Although in principle WinSxS allows compatible newer versions of assemblies to replace older versions the VS runtimes do not make use of this functionality and bind only to the same version they were compiled against . Either recompile all components of your application against the same version of the library probably best to avoid problems with multiple malloc heaps or install both runtimes . Comment : that does not seem to be the case - the exe is linked against 9.0.21022.8 and 9.0.30729.1 but runs on a clean Windows 7 machine that only has 9.0.30729.4926 in the WinSxS directory . Comment : SxS assemblies have publisher policies that redirect older versions to newer one -- it doesn t happen automatically . Looks like 2008 R2 is missing such a policy for msvc runtime .", "Question : Background : .. . .. . Windows shared run-time libraries located at C : windows Winsxs folder .. . Inside Winsxs there are two important sub folders also located as policies and Manifests .. . Other than that there are plenty of run-time assemblies located in side each other sub folders . All the sub-folders inside Winsxs and policies having same naming format . Eg Folder Names : .. . .. . Run times : x86 Microsoft.VC90.CRT 1fc8b3b9a1e18e3b 9.0.30729.1 x-ww 6f74963e .. . Policies : x86 policy.9.0.Microsoft.VC90.CRT 1fc8b3b9a1e18e3b x-ww b7353f75 .. . .. . As I know first part of the name x86 Microsoft.VC90.CRT 1fc8b3b9a1e18e3b 9.0.30729.1 describe processorArchitecture x86 Name Microsoft.VC90.CRT publicKeyToken 1fc8b3b9a1e18e3b and Version 9.0.30729.1 of the assembly or policy . Question : What is the last part of the assembly x-ww 6f74963e or policy x-ww b7353f75 folder name describes .. . .. . Ok here is the original issue but quite long story . I deployed my C++ MFC application in windows XP computer that previously installed some of C++ redistribute packages and some security patches of run-time assemblies . So these pre-installed C++ redistribute packages automatically deployed some run-time policies in Winsxs policies . those policies force to use new run-time assemblies instead of the one uses and deployed by my application . But some times these newer DLLs not there because of some other application removal or assemblies can be corrupted . So I m finding a way to deploy run time assemblies specifically use for my application it means my app must use the once deployed by it and ignore the policies . So I think this last part of the sub directory name associate with the identity of application . I need to find it . Comment : First of all tag abuse...and I m pretty sure MSDN is where you can figure it out . Comment : What do you mean by tag abuse any irrelevant tag there Comment : What is the practical application of this question I would have thought the folder names were an implementation detail whose significance is irrelevant to anyone outside of Microsoft . Comment : I don t understand why you need to know the names of the folders . The whole point of side-by-side deployment is that it solves the problem you describe with different programs using different versions of the DLLs . Comment : It is explained well in this blog post http : blogs.msdn.com b jonwis archive 2005 12 28 507863.aspx .. . Answer : If you can t trust global cache and on WinXP it is super easy to corrupt it you might have to install private copies of assemblies and override them in your application config . Here is a hack I am using to override some assemblies for debugging purposes : .. . .. . In your exe folder drop the file named yourexename.exe.config with policy information redirecting real assembly version to something that will never exist in global cache . For example : .. . .. . Take contents of the assembly that you want to use drop it into the same folder and edit manifest to have the version you used above . For example .. . .. . In the end you will get following files in your install folder : .. . .. . And your executable will pick up private copy of the dll . More info here : Application Configuration Files http : msdn.microsoft.com en-us library windows desktop aa374182 28v vs.85 29.aspx .. . .. . EDIT : if you have problems like the application failed to initialize properly or side-by-side configuration is incorrect and you will have them once you start playing with sxs use sxstrace http : technet.microsoft.com en-us library hh875651 28v ws.10 29.aspx tool for diagnostics not available on Windows XP though . That will tell you exactly which assembly causes problems . Comment : Actually your answer open me a whole new direction and rally thank you for the new idea . But one more question My application note only include one exe it also include some other DLLs as well . those DLLs also uses same run-time assemblies . So when I change the someassemblyname.manifest files version . I seems to affect other DLLs . because program shows same error . please assist Comment : the error shows by the application is The application failed to initialize properly 0xc0150002 . Click on OK to terminate the application Comment : In this articles first comment I got answer for my DLL issue . msdn.microsoft.com en-us library windows desktop http : msdn.microsoft.com en-us library windows desktop aa374182 28v vs.85 29.aspx . @Eugene : you are a guy should be in Microsoft .", "Question : I ve got an executable who s manifest says it depends on .. . .. . On Windows 7 this executable runs with no problem . On Windows Server 2008 R2 this executable fails to run with the message : .. . .. . The application has failed to start because its side-by-side configuration is incorrect . Please see the application event log or use the command-line sxstrace.exe tool for more detail . This was unexpected - I thought Windows 7 and Windows Server 2008 R2 should be very similar regarding runtime availability . Both machines are pretty clean . The Windows 7 machine is a fresh installation with nothing on it . The Windows Server 2008 R2 machine only has some updates from Windows Update . I checked the Windows 7 machine s WinSxS directory and found .. . .. . I checked the Windows Server 2008 R2 machine s WinSxS directory and found .. . .. . The runtime that is present is newer than what is specified in the manifest and yet the Windows Server 2008 R2 system fails to redirect to the newer runtime . Running sxstrace on Windows Server 2008 R2 shows : .. . .. . Running sxstrace on Windows 7 gives : .. . .. . Any ideas how this could be resolved besides installing the VS 2008 runtime and the VS 2008 SP1 runtime I thought the whole idea of the assemblies was that it allowed the system to override the older runtimes and substitute the newer ones . Comment : I m experiencing this too . I ve compared the SXS directories between a Win7 and Server 2008 R2 machine and they seem the same . Furthermore the error seems isolated to just server 2008 R2 - I tested on Windows Vista Server 2008 non R2 Windows 8 and 8.1 Server 2012 and R2 and these all have the 30729 version of the C++ runtime and all redirect appropriately . Only server 2008 R2 has this issue : - .. . Answer : You can put the VC++ runtime dlls in your application s executable directory and it should work . You ll need the 2 dll s MSVCR and MSVCP and the manifest as well . Off the top of my head just putting all 3 of those files in the application s executable directory should do the trick Comment : Make sure to update version inside manifest to match the version your executable links against or it won t find it either .", "Question : On Windows XP I have an .exe which runs with msvcp90.dll msvcr90.dll and Microsoft.VC90.CRT.manifest in my local application directory . I also have a policy file for these .dlls in C : WINDOWS WinSxS Policies which was installed by the Visual C++ 2008 SP1 Redistributable Package http : www.microsoft.com download en details.aspx id 5582 . I d like to delete this policy file and use an app-config file in my local directory instead . The policy file is : .. . .. . My config file is : .. . .. . Dependency Walker reports side-by-side errors when using the config file instead of the policy file - what s wrong Also should the config file be named application .exe.config or Microsoft.VC90.CRT.config To clarify no errors appear when using the policy file . However the client here is not allowed to install the redistributable package . The MSDN docs http : msdn.microsoft.com en-us library aa374182 VS.85 .aspx state that an app-config file can redirect the application to use different versions of the same assembly per-application configuration http : msdn.microsoft.com en-us library ee710783 v VS.85 .aspx and that it can override an existing policy publisher configuration file if needed . So I think it must be possible to use a local app-config file and that something in the file above is missing or incorrect . Comment : Use the file that you are meant to and get rid of the errors . .. . Answer : It is my understanding that the c runtimes cannot be redirected in this way for security reasons . Your options are to statically build the runtimes into your project or load the DLLs from your application directory with out the Side-By-Side system .", "Question : null .. . Answer : I keep Windows 7 Ultimate installed on my main PC due to discontinued drivers on Windows 10 and everybody knows why I didn t install Windows 8 8.1 . Unfortunately my C : runs on SSD Windows 7 Ultimate is now taking 63.5 GB of space and C : Windows winsxs takes 26.5GB by itself with 16.4GB in C : Windows Installer . I have read articles on how it s bad to reduce space in winsxs but unfortunately Windows completely overwhelms any actual user data files I have on the drive . Is there nothing I can do to reduce this enormous amount of space being used on my SSD C :", "Question : On Windows XP I have an .exe which runs with msvcp90.dll msvcr90.dll and Microsoft.VC90.CRT.manifest in my local application directory . I also have a policy file for these .dlls in C : WINDOWS WinSxS Policies which was installed by the Visual C++ 2008 SP1 Redistributable Package http : www.microsoft.com download en details.aspx id 5582 . I d like to delete this policy file and use an app-config file in my local directory instead . The policy file is : .. . .. . My config file is : .. . .. . Dependency Walker reports side-by-side errors when using the config file instead of the policy file - what s wrong Also should the config file be named application .exe.config or Microsoft.VC90.CRT.config To clarify no errors appear when using the policy file . However the client here is not allowed to install the redistributable package . The MSDN docs http : msdn.microsoft.com en-us library aa374182 VS.85 .aspx state that an app-config file can redirect the application to use different versions of the same assembly per-application configuration http : msdn.microsoft.com en-us library ee710783 v VS.85 .aspx and that it can override an existing policy publisher configuration file if needed . So I think it must be possible to use a local app-config file and that something in the file above is missing or incorrect . Comment : Use the file that you are meant to and get rid of the errors . .. . Answer : Your configuration data is under the runtime node . It should instead be under the windows node . I have to caution that shipping application configuration-files that contain binding redirects is highly discouraged and is inteded for system administrators dealing with an appcompat problem on the machines they adminster . Application developers should instead be authoring their applications to work with the latest revision of the specific version of the CRT they depend on and use the default global policy that ships with that version . In fact starting with Windows 2003 using binding redirects in an application configuration file requires an entry in the application compatibility database .", "Question : null .. . Answer : I encountered this error during an installation .. . .. . An error occurred during the installation of assembly policy.9.0.Microsoft.VC90.MFC version 9.0.21022.8 publicKeyToken 1fc8b3b9a1e18e3b processorArchitecture x86 type win32-policy . I have searched extensively for solutions some had a similar problem but they either did not have solutions or their solutions did not work . Does anyone with experience with these assemblies know why this is happening For more context this was a Windows installer for a USB device firmware configuration tool . Thanks in advance . Comment : If the machine is too messed up to run your software then you want to know about it as soon as possible so you don t waste too much time on it . That worked out well here looks like the side-by-side cache turned into spaghetti . Tell the user to re-image it . Comment : I appreciate your reply I guess in this case I am the user which has to re-image the side-by-side cache . I did some more research into this and came up with instructions like : Dism.exe online Cleanup-Image StartComponentCleanup ResetBase Though these were mostly recommended for a cleanup of the WinSxS folder in terms of size so I m not sure . Is this what you were referring to", "Question : I had VS 2008 . I upgraded to VS 2010 and uninstalled VS 2008 . I have a test that runs on my machine but fails to load on machines in the build lab . After some debugging I realized that the test executable still had a dependency on msvcr90d.dll which is a VC++ 2008 debug runtime library . Even though I had uninstalled VS 2008 the test works on my machine because that runtime DLL still exists in the side-by-side cache windir winsxs . The build lab machine doesn t have the DLL so it won t load there . Shouldn t uninstalling VS 2008 have caused all of its runtime DLLs to be removed from the side-by-side cache Is there a way I can manually remove these old DLLs from the side-by-side cache I d like to be able to easily detect other places where I might still have an out-of-date dependency . Comment : Just delete the files . Comment : @Hans Passant : Even after elevating to administrator I get a dialog saying I cannot delete system files . You need permission to perform this action . You require permission from SYSTEM to make changes to this file . Comment : Erm wait what exact file are you trying to delete . Post the full path . Comment : @Hans : Just deleting from winsxs would be a bad idea . Comment : Exact path : C : Windows winsxs x86 microsoft.vc90.debugcrt 1fc8b3b9a1e18e3b 9.0.30729.1 none bb1f6aa1308c35eb msvcr90d.dll .. . Answer : You first need to take ownership of the containing folder . All the folders there will be owned by SYSTEM or TrustedInstaller . So do this : .. . .. . Right click- Properties- Security tab- Advanced- Owner tab- Edit- Select yourself as owner- tick Replace owner on subcontainers and objects- OK .. . .. . Once you ve done that you can do Right click- Properties- Security tab- Give yourself full control- OK .. . .. . Or if you re familiar with the cacls command you can do it from the command-line . Once you ve got full control you can move the folder which I highly recommend over deleting it . Deleting files from winsxs is likely to break other applications or even Windows .", "Question : Which installer installed the below files in my system in the Windows Winsxs folder Do I require the same file of version 8.0.50727.5592 or higher than from where I would get it .. . Answer : Go through C Runtime Library WinSxS http : social.msdn.microsoft.com Forums en-US vcmfcatl thread c1dc12ae-f032-4c20-9ff9-c16ea531ca08 prof required .", "Question : I have a problem with Visual C++ 2008 . I have installed opencv and I ve created a new program and I build it with no errors . However it complains about not finding MSVCR90D.dll when debugging . In release-mode there is no problem at all . I do have MSVCR90D.dll in one of Winsxs folders . Does anyone know a get-around to this problem Is this a known bug Gerard Comment : I have the same problem . As of 18-07-2009 none of given answers really answers the question . That s why I asked it again here stackoverflow.com questions 1150464 http : stackoverflow.com questions 1150464 Comment : possible duplicate of msvcr90d.dll not found in debug mode http : stackoverflow.com questions 1150464 msvcr90d-dll-not-found-in-debug-mode .. . Answer : I can t give a definitive solution but here are some helpful links : .. . .. . David Lenihan s blog on WinSxS http : davidlenihan.com 2007 07 winsxs.html .. . Side-by-side assemblies http : msdn.microsoft.com en-us library aa376307 28VS.85 29.aspx .. . Troubleshooting C C++ Isolated Applications and Side-by-side Assemblies http : msdn.microsoft.com en-us library ms235342 28VS.80 29.aspx .. . Assembly Searching Sequence http : msdn.microsoft.com en-us library aa374224 28VS.85 29.aspx .. . .. . And of course there s a lot more on MSDN if you follow the links .", "Question : I want to use the Microsft.Web.Administration.dll Assembly . On my Windows 7 the file is located only in the folder c : windows winsxs . Why is the assembly in this folder and is it reccomended to reference from there .. . Answer : I d rather copy it somewhere locally and reference it from there if you really need it . Comment : Only if it is explicitly redistributable . I don t think you can legally ship MS stuff otherwise . Comment : stackoverflow.com questions 10248365 http : stackoverflow.com questions 10248365 is-microsoft-web-administration-dll-redistributable", "Question : Got a fresh Win7 machine with VS2005 installed . I tried to start a MyApp.exe that is built with manifest that says in Manifest.bin : .. . .. . .. . .. . .. . .. . .. . .. . and the result was error message The application has failed to start because it s side-by-side configuration is incorrect.. . Event viewer told me the reason in detail : .. . .. . Activation context generation failed for c : Xxx MyApp.exe . Dependent Assembly Microsoft.VC80.MFC processorArchitecture x86 publicKeyToken 1fc8b3b9a1e18e3b type win32 version 8.0.50727.4053 could not be found . Please use sxstrace.exe for detailed diagnosis . so I browsed the winsxs folder and indeed all 4053-folders were missing . Then i edited Manifest.bin and replaced 4053 with 4927 . The errors reocurred with different version . Then I found out that I got 4927-folder for msvcr80.dll but no 4927-folder for mfc80.dll . Two questions : .. . .. . -Why no 4927-folder for mfc80.dll -How to get all 4053-folders Thanks BR -Matti Comment : Sorry about stupid question about where to update : Found update microsoft.com downloads en http : www.microsoft.com downloads en details.aspx displaylang en FamilyID 766a6af7-ec73-40ff-b072-9112bab119c2 .. . Answer : You should either install Visual C++ redistributable or use merge modules to add the redistributables into your Windows Installer installation package . Or alternatively you should copy MFC libraries in the directory with your application . Libraries that can be used as private assembly in your app directory are located in C : Program Files x86 Microsoft Visual Studio 8 VC redist x86 or in amd64 if your app is 64 bit . Merge modules for Windows Installer MSI are in C : Program Files x86 Common Files Merge Modules . Redistributable package that installs all the libraries can be found in C : Program Files x86 Microsoft Visual Studio 8 SDK v2.0 BootStrapper Packages vcredist x86 vcredist x86.exe for 32-bit programs and in vcredist x64 vcredist x64.exe for 64 bit programs . You can get these files from Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update http : www.microsoft.com downloads en details.aspx displaylang en FamilyID 766a6af7-ec73-40ff-b072-9112bab119c2 . .. . .. . And I think you want to update Visual Studio with this package Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update .", "Question : Windows has a WinSXS directory which stores old versions of some system files in case you want to roll back a service pack or similar . These are stored as hard links so many of the files there point to the same area of disk as your current system files . It also has a Volume Snapshot Service which keeps snapshots of an older version of the entire NTFS volume . My understanding is that this is used by things like backup tools which want to see a momentary snapshot of the entire volume contents . I can see that they re totally different things and sort-of for different purposes but it still seems like duplication . Can anyone explain why one or other of these features wouldn t suffice for all needs .. . Answer : WinSxS is not a backup of old system files . It is a solution to the Dll Hell https : en.wikipedia.org wiki DLL Hell problem . It allows MS and third party developers to install multiple versions of the same dll without conflicting with already installed software and even load different versions of a dll into the same binary at the same time controlled by activation context http : msdn.microsoft.com en-us library windows desktop aa374153 28v vs.85 29.aspx mechanism . At a basic level you can think of it as a fine grained control of PATH variable . Installed assemblies are not backups they are used at the same time or side-by-side if you will . On linux if you were to release an out of repository app in binary form you would use rpath for the similar effect . Although that is not as flexible and less convoluted because of that . Before WinSxS was introduced the only other way was to use App Paths http : msdn.microsoft.com en-us library windows desktop ee872121 28v vs.85 29.aspx appPaths settings in registry on per-executable basis . Those are limited in usefulness and plagued by MAX PATH issues like so many things on Win32 still is . Volume Snapshot is a backup it allows you to restore the system to a previous state when something does go wrong . Snapshots are not meant to be accessible during normal operation . And deleting all snapshots to free up space is not supposed to brick your system . : Comment : Thanks - that s what I needed to know . The bit I was missing was the information about activation contexts and the application manifests . Thanks", "Question : null .. . Answer : I am trying to do the porting of a plugin for an older tierce application to a newer version of it in both architectures x64 and x86 . My porting to x64 works fine . I got issues with the x86 architecture . The plugin I develop is more or less a DLL packaged in a proprietary format . I could compile it . My problem is at runtime . When I launch the tierce application with the plugin installed Windows is complaining about the missing msvcr90.dll . After opening my Process Explorer and browsing through the DLL s loaded by the application I can see this dll . The load path is the following one : .. . .. . C : Windows winsxs x86 microsoft.vc90.crt 1fc8b3b9a1e18e3b 9.0.30729.6161 none 50934f2ebcb7eb57 .. . .. . The DLL is present at this path with msvcp90.dll and msvcm90.dll . I do not know a lot about side-by-side libraries but I have heard about it . I thought the issue could come from the manifest of my DLL . It was embedded in the previous version of my plugin that worked on an older version of the tierce application architecture x86 . I tried to unembed it . Here is the content : .. . .. . The Windows OS I am running on is a x64 OS . I tried the same plugin on a x86 Windows and the application plugin starts without this issue at runtime . I tried installing Microsoft Visual C++ 2008 SP1 Redistributable Package x86 http : www.microsoft.com en-us download confirmation.aspx id 5582 with no success . I am developping the plugin on a Visual C++ 2012 not sure if it matters . I tried looking in System32 folder and the dll is not present . It s not present in SysWOW64 neither . If I copy this msvcr90.dll from its winsxs location to System32 SysWOW64 or even the root folder of the application I get another issue : .. . .. . R6034 : An application has made an attempt to load the C runtime library incorrectly . In this case I can see in the Process Explorer that the application is trying to load msvcr90.dll twice . Is there any workaround Maybe if I change the manifest add some dependency somewhere I just need to make the plugin start on the x64 machine to debug the x86 plugin because it s the dev machine . Running the x86 respectively x64 plugin on a x86 respectively x64 machine works fine for production apparently . Any tip would be greatly appreciated .", "Question : I m doing a experiment on purpose of making a executable program work on windows azure . First i tried to make it work using remote desktop with windows azure roles ref http : msdn.microsoft.com en-us library windowsazure gg443832.aspx I copied my exe into the remote desktop and also some dlls then I use regsvr32.exe to register these dlls then the problem came : side-by-side configuration is incoreect . I know how to resolve this problem when it is in my own computer just make sure the right dependencies are in the winsxs directory but now it s in the remote desktop using windows azure roles and I have no permission to add the right dependencies into the winsxs directory . so here I came to ask for some help thanks in advance PS : I can t change these dlls referenced by my exe . Comment : Just wanted to make sure you re aware that Windows Azure uses stateless VM s . As such any changes to make by remote desktop in the applicatin will be lost if that VM is recycled for any reason . This includes when the Windows Azure Fabri Controller applies any guest OS updates . Given this attempting to port a desktop app to WA wouldn t be my first choice . Comment : Agree with you I will try to use a work role to do these things just like the first answer below . But before that I m trying to realize a prototype through the VM I have to make sure that my executable file can be running on the Azure VM without modifying it also to make sure all those dependency dlls registered successfully then the things remained will be simple to create a worker role like the first answer below .. . Answer : I would say that the problem could be only because a few of the reference DLL are not in the Azure VM so when you deploy your package EXE + DLL you need to be sure you all the components and they are registered in the system . It sure is good that you can log into Azure VM using RDP and test how your deployment works however the best would be to deploy your package through a web-worker and in your can a worker role seems good fit . You still need to dig further to find out why EXE did not work and if you provide more details about the libraries and process we may help but above info is very less to provide suggestions . To solve such problem here is what you should do : .. . .. . 1 . Create a zip file and include all the reference DLL EXE static file needed for your application .. . 2 . Create a Worker role and add this zip file as content and set its property Copy local to true . 3 . Add a CMD Batch file to your Azure Project and write all the steps as below : .. . .. . 3.1 . Unzip the files to a local folder 3.2 . Register all the DLL using Regsvr32 process 3.3 . Setup your exe as ProgramEntryPoint into ServiceDefinition.csdef .. . .. . Using your EXE as ProgramEntryPoint worker role host process will start it and monitor it the setting looks like as below : .. . .. . Once you have above settings you can deploy the Azure Package and then RDP to Azure VM and test if your application has any problem . Comment : Thanks for your answer but before realizing a worker role I m having a try on the VM to find out whether my old executable can be run without changing it . So first I copy the EXE and DLLs into the VM and try to use regsvr32 to register these DLLs then I find out that some of the DLLs cannot be registered because of the side-by-side configuration issue . I use the dependency-walker dependencywalker.com http : www.dependencywalker.com to see the dependencies of my DLL then I find out that the DLL relied on the MSVCR80.DLL in the C : windows winsxs dir which can not be found in the Azure VM . Comment : and I also tried to to copy that MSVCR80.DLL into the directory where my DLL laid but it seems that regsvr32 refused to use this one . Comment : You need to download microsoft.com en-us download details.aspx id 5555 http : www.microsoft.com en-us download details.aspx id 5555 install the C++ runtime instead of using copy the MSVCR80.DLL copy will not work . Comment : When you decided to use Worker role you also need to download VC++ runtime in startup task first ." ] }
[ "yes-answer-long", "yes-answer-short" ]
winsxs
UNK_RELATION
simple-authentication@social-authentication@122
simple-authentication -- simpleauthentication is an asp.net library that makes it really simple to for developers to add @placeholder code to an asp.net application .
{ "confidence": [ 32.60673904418945, 31.203426361083984, 30.31113052368164, 29.661376953125, 29.081729888916016, 24.790966033935547, 24.294925689697266, 23.916431427001953, 23.559585571289062, 23.559585571289062, 22.697111129760742, 22.65922737121582, 22.502574920654297, 22.502574920654297, 21.3038387298584, 19.70144271850586, 18.904451370239258, 18.756099700927734, 18.70966339111328, 17.46228790283203, 17.375225067138672, 17.099124908447266, 16.793262481689453, 16.793262481689453, 16.662700653076172, 16.34986114501953, 16.30350112915039, 15.976461410522461, 15.771928787231445, 15.585607528686523, 15.511831283569336, 15.468433380126953, 15.1475191116333, 14.739465713500977, 14.633674621582031, 14.445582389831543, 14.391983032226562, 14.341791152954102, 14.341791152954102, 14.341791152954102, 14.110509872436523, 13.951194763183594, 13.811304092407227, 13.811304092407227, 13.811304092407227, 13.811304092407227, 13.811304092407227, 13.811304092407227, 13.811304092407227, 13.811304092407227, 13.811304092407227, 13.811304092407227, 13.625699996948242, 13.49059772491455, 12.823654174804688, 12.671963691711426, 12.671963691711426, 12.66299057006836, 12.534514427185059, 12.420164108276367, 12.420164108276367, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457, 12.415989875793457 ], "content": [ "This looks like the code throwing the exception is at https : github.com SimpleAuthentication SimpleAuthentication blob master Code SimpleAuthentication.Core ReflectionHelpers.cs .", "With Simple Authentication we simply handle the authentication with a provider in a simple way .", "I m trying to get social-authentication working in an asp.net-hosted Nancy http : www.nuget.org packages Nancy web app using the WorldDomination SimpleAuthentication plugin for Nancy http : www.nuget.org packages Nancy.SimpleAuthentication .", "Im implementing Facebook authentication using : https : github.com SimpleAuthentication SimpleAuthentication wiki NancyFX-Manual-Setup .. . .. . I would like to configure library in web.config not in Bootstraper.cs but i dont know how to create the redirection route and the callback route .", "I suppose I should contemplate https : github.com SimpleAuthentication SimpleAuthentication issues 144", "I have asked this qustion stackoverflow.com questions 35553969 http : stackoverflow.com questions 35553969 simpleauthentication-core-conflicts-with-nancy-authentication-forms-with-google .", ".. . .. . So assuming you ve pulled in SimpleAuthentication and wired up your IAuthenticationCallbackProvider class .", "Both Nancy and Simple Authentication have done most of the leg work for you : .. . .. . I hope we can make SimpleAuthentication even easier in the future by removing the need for the Forms Auth but for now I think we have a pretty good solution .", "I have a NancyFX web project using SimpleAuthentication that works fine when self-hosting from the terminal .", "We have weird things happening with Sandra.SimpleValidator and FluentValidation as well as SimpleAuthentication all of which do reflection .", "The thing is that Sinatra simple-authentication gem doesn t give me access to its routes to modify them or I don t know how .", "I fixed this with GetLoadableTypes from this post from @haacked http : haacked.com archive 2012 07 23 get-all-types-in-an-assembly.aspx .. . .. . And here it s the PR https : github.com SimpleAuthentication SimpleAuthentication pull 171 .. . .. . I didn t had the problem with Nunit I had the problem with Microsoft.Owin.Security.DataProtection.DpapiDataProtector that it s not implemented in Mono... .", "@Phil simple-authentication is going to make a horribly generic tag name subject to abuse by the clueless .", "I am simple-authentication manual setup because I have different callback URL for register and login .", "If you look at this is the solution I m trying to implement into my site github.com vast sinatra-simple-auth https : github.com vast sinatra-simple-auth", "Please add this code formatted to your original question and indicate which errors you are getting .", "I m trying to use Sinatra simple auth to force users to logon before being able to access the site .", "Every provider has slightly different implementations different naming different promises so we can to consolidate all that into Simple Authentication and make it easier for a developer to implement into their website .", "You can read all about it here : developer.apple.com library ios documentation Swift Conceptual https : developer.apple.com library ios documentation Swift Conceptual BuildingCocoaApps", "can you look to my code .", "The documentation for this can be found here : .. . .. . http : github.com calebd SimpleAuth wiki Instagram .. . .. . Translating it to Swift code can be done using the general translation rules as given in the documentation of Apple : .. . .. . https : developer.apple.com library ios documentation Swift Conceptual BuildingCocoaApps", "I want to have a mobile-application that makes use of windows azure-mobile-services to access and modify those tables .", "There are general translation rules for using Objective-C code in swift .", "Can you look to my code I have errors .", "Firstly you must configure Instagram in your AppDelegate.swift .. . .. . Make sure the SimpleAuthRedirectURIKey is equal to that in your app settings on the instagram developers page https : instagram.com developer clients manage .", "ideally server code could be used to either output the link or not based on role but since durandal and SPA apps don t really work that way with server code i m at a loss .", "i am using the following gem and devise now since devise remove the support for token authentication .", "The thing we thought about tho is 95 of the time the user putting in the authentication most likely already has some form of authentication already .", "The WD demo apps are bereft of request code other than authentication requests and the codebase doesn t appear to contain anything dealing with the normal request cycle .", "Again using TestShib.org as an example if you log in using the simpleSAMLphp application not the module you will see a list of the provided attributes on that page with their names in the left column .", "WorldDomination does not provide much information past the actual authentication process .", "I imagine using the same type of authentication in my MVC application would have got around this but then I would have to have found a way to get the email-address for a google account .", "You can keep your routing information on the server and supply it to the application on initialization .", "You could try this .. . .. . Authenticate : .. . .. . curl -H Content-Type : application json -H Accept : application json -X POST http : localhost : 3000 users sign in -d user : email : [email protected] password : password -c cookie .. . .. . Show : .. . .. . curl -H Content-Type : application json -H Accept : application json -X GET http : localhost : 3000 pages 1.xml -b cookie .. . .. . That works for me .", "i have my API methods locked down but really that s just locking down the data not the navigation to the pages themselves .", "Unfortunately clarifying it by prefixing it with nancy makes it too long to make an acceptable tag.. .", "@Charles - : It s the name of my library .", "Then I would have had to consider how to handle other authentication providers which would have brought other issues .", "Nancy provides for basic and forms-authentication via additional packages and the hooks they provide are pretty straight forward .", "What exactly is the recommended happy path for integrating WorldDomination s social OAuth authentication providers and Nancy", "Please remove extra code from your post .", "Helpful links : .. . .. . http : www.philliphaydon.com 2012 12 18 forms-authentication-with-nancyfx .. . .. . http : www.philliphaydon.com 2013 01 31 oauth-with-nancyfx-and-world-domination-authentication .. . .. . The 2nd link for World Domination although there s a bit of renaming it s mostly the same .", "How to use SimpleAuth Instagram in Swift", "How to import and use auth methods", "This is not a good question and should be down voted .", "You can read how to implement it on github.com calebd SimpleAuth wiki Instagram https : github.com calebd SimpleAuth wiki Instagram .", "Please try and ask a real question if you get stuck .", "@Tom but here is no documentation for Swift", "It only for Objective-C", "I have errors", "Thanks for information .", "Thanks Tom I fixed errors .", "Because we know how Nancy works we have simplified the integration into Nancy by creating the modules for you to handle redirection authentication callback etc .", "It doesnt really answer how to get around the issues highlighted above .", "Both are pretty nice but there is a big documentation gap between the authentication process well covered and identifying the authenticated user during requests other than the initial authenticate request nothing .", "All you really need to do is implement the Forms Auth stuff which is pretty much 1 class and a method call .", "If you re using RavenDB this would look something like : .. . .. . Configured in the bootstrapper like : .. . .. . And that s really it.. .", "I found other issues with windows azure-mobile-services which meant it just wasnt for me .. . .. . Does not seem to be a way of accessing data from a different database namespace with mobile services .. . I was re-writing business logic in the mobile service that I already had in my MVC application which I had unit tested with entity-framework etc .. . .. . It seems simple and straight forward if you follow the examples of mobile services but once you step off that track it becomes very problematic and in my view just not worth it .", "UPDATE : Per recommendation I tried to run some prerelease builds to the same resulting ending up with these binaries : .. . .. . UPDATE : Running the ReflectionHelpers.cs code in isolation shows that the only DLL failing to load is MonoDevelop.NUnit .", "The problem : when I log in with the MVC application I have access to the username and email-address .", "So I am now using web-api within my MVC application .", "I have been trying to create an iOS app with SimpleAuth to authenticate Instagram .", "In my AppDelegate.swift I have : .. . .. . Obviously inserting the client ID and redirect URI where needed .. . .. . And in my ViewController.swift I have : .. . .. . For some reason when the user authorizes my app the responseObject appears to return nil .", "Possible meaning something went wrong .", "I am relatively new to Swift iOS and am not sure what I have done incorrectly .", "Thanks", "Check if error isn t nil and maybe error.description provides enough information to get a hint about what s going wrong", "@HorseT Thanks so much for that .", "I wrote a previous comment with the error which was something todo with the UIWebView not being able to process the URL properly or something strange like that .", "Turned out it was todo with the Redirect URI which I then changed and everything worked perfectly", "Ahh too late .", "Was it the missed second", "Seemed a little bit like that .", "Coding on", "Yeah I m pretty sure it was actually .", "Thanks mate", "Turned out my redirect URI was the reason it was returning nil .", "I changed it and everything worked perfectly", "Thanks to HorseT in the comments above .", "Edit : More in-depth answer below .. . .. . All the following information can be found here https : github.com calebd SimpleAuth .", "enter image description here http : i.stack.imgur.com ZXJWz.png .. . .. . Next you need to authorize the user .", "This simply gets the response and prints the accessToken .", "From here on you can access endpoints https : instagram.com developer endpoints to retrieve further data .", "Hopefully this helps", "Matt im having problem using Instagram API inside my app Can you please tell me how do i redirect the user back to the app after he logged in and pressed the Authorize button", "Thanks", "I edited my above answer : @roimulia", "Hey matt", "I actually succeed doing this last night lol .", "The new instructions from Apple guidelines dosent let you go out of the app to safari you must you webview .", "So i guess the URI could be anything lol .", "am i right", "It dosent matter which address im putting", "Haha thats good", "Yes although the webview is still within the app I believe that the redirect URI still should still match the one on the instagram site .", "@roimulia", "Can i pick any adress", "I mean if i have huge traffic does it matter" ] }
{ "confidence": [ 43.691036224365234, 38.62712097167969, 33.866146087646484, 23.158611297607422, 22.16996955871582, 20.193960189819336, 18.400758743286133, 15.38481330871582, 15.08912467956543, 15.0848388671875, 14.335955619812012 ], "content": [ "Question : null .. . Answer : Im implementing Facebook authentication using : https : github.com SimpleAuthentication SimpleAuthentication wiki NancyFX-Manual-Setup .. . .. . I would like to configure library in web.config not in Bootstraper.cs but i dont know how to create the redirection route and the callback route . Can anyone help Thanks P .", "Question : I m trying to get social-authentication working in an asp.net-hosted Nancy http : www.nuget.org packages Nancy web app using the WorldDomination SimpleAuthentication plugin for Nancy http : www.nuget.org packages Nancy.SimpleAuthentication . TL DRs skip to the question bolded at the bottom of the question . Both are pretty nice but there is a big documentation gap between the authentication process well covered and identifying the authenticated user during requests other than the initial authenticate request nothing . Nancy provides for basic and forms-authentication via additional packages and the hooks they provide are pretty straight forward . WorldDomination does not provide much information past the actual authentication process . There seems to be a distinct lack of Happy Path for the normal who is the user making this request process that has to happen every time a user hits the server . I ve been spending a fair amount of time to figure this part out but my research hasn t led me to any obvious solutions . The WD demo apps are bereft of request code other than authentication requests and the codebase doesn t appear to contain anything dealing with the normal request cycle . My best guess is that I need to integrate with forms auth implementing Nancy s forms auth hooks and using what I get back from WD to populate my own types . This doesn t exactly seem like the happiest of happy paths . In fact it seems to be more of a do lots of work you lazy bastard path . What exactly is the recommended happy path for integrating WorldDomination s social OAuth authentication providers and Nancy I m concentrating on the standard who is this person that requests of me page-lifecycle part here . Bonus points from my hordes of sockpuppet accounts I will create for the purpose for how this happy path handles users logging out as well Comment : @Phil simple-authentication is going to make a horribly generic tag name subject to abuse by the clueless . Can we think of another name Unfortunately clarifying it by prefixing it with nancy makes it too long to make an acceptable tag.. . Comment : @Charles - : It s the name of my library . We called it WorldDomination.Web.Authentication but had too many complaints that it wasn t enterprise and they couldn t use it at work . Comment : @Phill : Call it Simple-Social . Has a nice ring to it . Stick Authentico on it for some flavor and register the .io domain . Instant venture capital . Comment : Also @Will have you moved over to using Nancy.SimpleAuthentication as this has replaced WD.Web.Auth etc. . Comment : @Pure.Krome : Haven t but I haven t actually dropped the hammer on this yet . I will nuget that first thing thanks . .. . Answer : With Simple Authentication we simply handle the authentication with a provider in a simple way . Every provider has slightly different implementations different naming different promises so we can to consolidate all that into Simple Authentication and make it easier for a developer to implement into their website . Thats why the Nancy.SimpleAuthentication package exists . Because we know how Nancy works we have simplified the integration into Nancy by creating the modules for you to handle redirection authentication callback etc . The problem is we simply do not know how you authenticate a user against your website . We can handle the whole forms auth scenario ourselves and I actually plan to in the future . have to implement claims first which I m 60 way through but it will still at bare minimum require you to implement the IAuthenticationCallbackProvider .. . .. . This class is required in order for you to authenticate the user against your database . The thing we thought about tho is 95 of the time the user putting in the authentication most likely already has some form of authentication already . Usually Forms Auth . .. . .. . So assuming you ve pulled in SimpleAuthentication and wired up your IAuthenticationCallbackProvider class . All you really need to do is implement the Forms Auth stuff which is pretty much 1 class and a method call . In the provider you need to call the LoginWithoutRedirect method so that Nancy can create an auth cookie . Then you need to setup the IUserMapper class to tell Nancy how to get the user from the Database . If you re using RavenDB this would look something like : .. . .. . Configured in the bootstrapper like : .. . .. . And that s really it.. . I personally don t think it s a lot of code that you have to write . Both Nancy and Simple Authentication have done most of the leg work for you : .. . .. . I hope we can make SimpleAuthentication even easier in the future by removing the need for the Forms Auth but for now I think we have a pretty good solution . Helpful links : .. . .. . http : www.philliphaydon.com 2012 12 18 forms-authentication-with-nancyfx .. . .. . http : www.philliphaydon.com 2013 01 31 oauth-with-nancyfx-and-world-domination-authentication .. . .. . The 2nd link for World Domination although there s a bit of renaming it s mostly the same . I do plan to do an updated blog post and revamp the wiki when we have polished off Claims . I hope that helps you . Edit : .. . .. . I ve made note to create a more end-to-end solution demo project . Comment : Wow brb creating hordes of socks . Massive thanks . This pretty much answers it . Comment : Links are broken Comment : Thanks @FrankSchwieterman I ve fixed the links . Comment : I am simple-authentication manual setup because I have different callback URL for register and login . But I am experiencing the same problem that when I use Nancy.Authentication.Forms auth with google throws an exception . I have asked this qustion stackoverflow.com questions 35553969 http : stackoverflow.com questions 35553969 simpleauthentication-core-conflicts-with-nancy-authentication-forms-with-google . Please help", "Question : I have a NancyFX web project using SimpleAuthentication that works fine when self-hosting from the terminal . When I self-host from unit tests NUnit runner with Xamarin Studio I receive exception Failed to reflect on the current domain s Assemblies while searching for plugin with error message Could not load file or assembly or one of its dependencies . repeated many times . Any idea why this would fail This looks like the code throwing the exception is at https : github.com SimpleAuthentication SimpleAuthentication blob master Code SimpleAuthentication.Core ReflectionHelpers.cs . I tried a IntPtr.Size measurement to make sure they are running in the same 32 64 bitness in both cases it is running 32-bit . UPDATE : Per recommendation I tried to run some prerelease builds to the same resulting ending up with these binaries : .. . .. . UPDATE : Running the ReflectionHelpers.cs code in isolation shows that the only DLL failing to load is MonoDevelop.NUnit . The NUnit dll is unneeded for this part anyhow . I suppose I should contemplate https : github.com SimpleAuthentication SimpleAuthentication issues 144 Comment : I m 99 sure this is related to an issue we just fixed last night in Nancy with the way we do assembly scanning . Would you be able to test the CI build to see if it solves your problem Comment : I would be happy to but could you point me to the nuget-package or DLLs I should use thanks Comment : We have a MyGet feed . myget.org gallery nancyfx https : www.myget.org gallery nancyfx website myget.org F nancyfx https : www.myget.org F nancyfx feed Comment : github.com NancyFx Nancy pull 1945 https : github.com NancyFx Nancy pull 1945 this was the fix . We have weird things happening with Sandra.SimpleValidator and FluentValidation as well as SimpleAuthentication all of which do reflection . Comment : Unfortunately I didn t see a change . Making an edit to list the versions I ended up with . .. . Answer : I fixed this with GetLoadableTypes from this post from @haacked http : haacked.com archive 2012 07 23 get-all-types-in-an-assembly.aspx .. . .. . And here it s the PR https : github.com SimpleAuthentication SimpleAuthentication pull 171 .. . .. . I didn t had the problem with Nunit I had the problem with Microsoft.Owin.Security.DataProtection.DpapiDataProtector that it s not implemented in Mono... .", "Question : I m trying to use Sinatra simple auth to force users to logon before being able to access the site . So the home page would be the logon then should be able to use the site without being prompted for it . At the moment I could not figure out a way to redirect to the home root page after logon . set : home is working as it should . Comment : Please remove extra code from your post . We don t need to see all of that . Also welcome to SO Comment : Thanks for help unfortunately this created an infinite-loop . To make it clear I don t want the user to be able to do anything without login first not even viewing the index page Comment : But the user has to log in first right They have to access the login route . Comment : Thats right So you mean that the should direct to the logon view right . The thing is that Sinatra simple-authentication gem doesn t give me access to its routes to modify them or I don t know how . If you look at this is the solution I m trying to implement into my site github.com vast sinatra-simple-auth https : github.com vast sinatra-simple-auth Comment : Looks like you need to write a login form yourself .. . Answer : If what you want to do is check if a user is logged in before any routes except you can use this :", "Question : Here is what I want to do . I want to have a MVC web application that I can user to administer tables in my SQL server database windows azure . I want to authenticate with a 3rd party login google twitter facebook etc . I want to have a mobile-application that makes use of windows azure-mobile-services to access and modify those tables . The mobile app will log in with the same providers as above . The problem : when I log in with the MVC application I have access to the username and email-address . When I log in with the mobile-application I get access to a userId google : userId : Google : my-actual-user-id accessToken : the-actual-access-token on the mobile service side but not the email-address or username . So if I want to write a Server side script azure mobile service to get data from the tables what should I use as the unique user identifier The MVC application does not have access to the userid the mobile-application gets on login and the mobile-application does not have access to the username or email-address available via the MVC login OAuthWebSecurity .. . .. . I found this link : http : blogs.msdn.com b carlosfigueira archive 2012 10 25 getting-user-information-on-azure-mobile-services.aspx .. . .. . But looks like you cannot even get the google email using this . So still no way to uniquely identify the user Thanks for any help .. . Answer : It doesnt really answer how to get around the issues highlighted above . I imagine using the same type of authentication in my MVC application would have got around this but then I would have to have found a way to get the email-address for a google account . Then I would have had to consider how to handle other authentication providers which would have brought other issues . I found other issues with windows azure-mobile-services which meant it just wasnt for me .. . .. . Does not seem to be a way of accessing data from a different database namespace with mobile services .. . I was re-writing business logic in the mobile service that I already had in my MVC application which I had unit tested with entity-framework etc .. . .. . It seems simple and straight forward if you follow the examples of mobile services but once you step off that track it becomes very problematic and in my view just not worth it . It is not flexible enough to do anything meaningful... . but that just might be me not using it correctly . So I am now using web-api within my MVC application . Using httpclient in my windows app to contact access this data . It allows me to reuse my business logic and it is much more flexible . If you feel the assessment of windows azure-mobile-services chocolate tea pot is unfair would love to hear an opposing view . Comment : I know its been a while since you asked this question however by chance did you resolve this I am a in similar situation and will like to know how you resolved this issue THanks Comment : I did not use windows azure-mobile-services in the end . It was not flexible enough for me . I created my own restful services instead that can be called from JavaScript and code-behind or anything else you want", "Question : How to use SimpleAuth Instagram in Swift How to import and use auth methods Comment : This is not a good question and should be down voted . You can read how to implement it on github.com calebd SimpleAuth wiki Instagram https : github.com calebd SimpleAuth wiki Instagram . Please try and ask a real question if you get stuck . Comment : @Tom but here is no documentation for Swift It only for Objective-C Comment : There are general translation rules for using Objective-C code in swift . You can read all about it here : developer.apple.com library ios documentation Swift Conceptual https : developer.apple.com library ios documentation Swift Conceptual BuildingCocoaApps .. . Answer : The documentation for this can be found here : .. . .. . http : github.com calebd SimpleAuth wiki Instagram .. . .. . Translating it to Swift code can be done using the general translation rules as given in the documentation of Apple : .. . .. . https : developer.apple.com library ios documentation Swift Conceptual BuildingCocoaApps Comment : can you look to my code . I have errors Comment : Thanks for information . Can you look to my code I have errors . Comment : Please add this code formatted to your original question and indicate which errors you are getting . Comment : Thanks Tom I fixed errors .", "Question : i am using the following gem and devise now since devise remove the support for token authentication . https : github.com gonzalo-bulnes simple token authentication .. . .. . What i am missing here is that I have all the configuration setup but when i hit http : localhost : 3000 user sign in.json using the RestConsole Tester on Google . I am getting the following error : .. . .. . ActionController : : InvalidAuthenticityToken at users sign in.json .. . .. . ActionController : : InvalidAuthenticityToken actionpack 4.0.2 .. . .. . lib action controller metal request forgery protection.rb line 163 .. . .. . .. . def initialize controller .. . @controller controller .. . end .. . .. . def handle unverified request .. . raise ActionController : : InvalidAuthenticityToken .. . end .. . end .. . end .. . .. . protected .. . .. . .. . Any ideas .. . Answer : You could try this .. . .. . Authenticate : .. . .. . curl -H Content-Type : application json -H Accept : application json -X POST http : localhost : 3000 users sign in -d user : email : [email protected] password : password -c cookie .. . .. . Show : .. . .. . curl -H Content-Type : application json -H Accept : application json -X GET http : localhost : 3000 pages 1.xml -b cookie .. . .. . That works for me .", "Question : I have been trying to create an iOS app with SimpleAuth to authenticate Instagram . In my AppDelegate.swift I have : .. . .. . Obviously inserting the client ID and redirect URI where needed .. . .. . And in my ViewController.swift I have : .. . .. . For some reason when the user authorizes my app the responseObject appears to return nil . Possible meaning something went wrong . I am relatively new to Swift iOS and am not sure what I have done incorrectly . Thanks Comment : Check if error isn t nil and maybe error.description provides enough information to get a hint about what s going wrong Comment : @HorseT Thanks so much for that . I wrote a previous comment with the error which was something todo with the UIWebView not being able to process the URL properly or something strange like that . Turned out it was todo with the Redirect URI which I then changed and everything worked perfectly Thanks Comment : Ahh too late . Was it the missed second Seemed a little bit like that . Coding on Comment : Yeah I m pretty sure it was actually . Thanks mate .. . Answer : Turned out my redirect URI was the reason it was returning nil . I changed it and everything worked perfectly Thanks to HorseT in the comments above . Edit : More in-depth answer below .. . .. . All the following information can be found here https : github.com calebd SimpleAuth . Firstly you must configure Instagram in your AppDelegate.swift .. . .. . Make sure the SimpleAuthRedirectURIKey is equal to that in your app settings on the instagram developers page https : instagram.com developer clients manage . enter image description here http : i.stack.imgur.com ZXJWz.png .. . .. . Next you need to authorize the user . This simply gets the response and prints the accessToken . From here on you can access endpoints https : instagram.com developer endpoints to retrieve further data . Hopefully this helps Comment : Matt im having problem using Instagram API inside my app Can you please tell me how do i redirect the user back to the app after he logged in and pressed the Authorize button Thanks Comment : I edited my above answer : @roimulia Comment : Hey matt I actually succeed doing this last night lol . The new instructions from Apple guidelines dosent let you go out of the app to safari you must you webview . So i guess the URI could be anything lol . am i right It dosent matter which address im putting Comment : Haha thats good Yes although the webview is still within the app I believe that the redirect URI still should still match the one on the instagram site . @roimulia Comment : Can i pick any adress I mean if i have huge traffic does it matter", "Question : i am using the following gem and devise now since devise remove the support for token authentication . https : github.com gonzalo-bulnes simple token authentication .. . .. . What i am missing here is that I have all the configuration setup but when i hit http : localhost : 3000 user sign in.json using the RestConsole Tester on Google . I am getting the following error : .. . .. . ActionController : : InvalidAuthenticityToken at users sign in.json .. . .. . ActionController : : InvalidAuthenticityToken actionpack 4.0.2 .. . .. . lib action controller metal request forgery protection.rb line 163 .. . .. . .. . def initialize controller .. . @controller controller .. . end .. . .. . def handle unverified request .. . raise ActionController : : InvalidAuthenticityToken .. . end .. . end .. . end .. . .. . protected .. . .. . .. . Any ideas .. . Answer : Your POST is failing a CSRF https : en.wikipedia.org wiki Cross-site request forgery token check . You can validate this is the case by temporarily removing protect from forgery from your application controller.rb which should make this work . This article https : stackoverflow.com questions 9362910 rails-warning-cant-verify-csrf-token-authenticity-for-json-devise-requests provides a solution for overriding that check on a specific controller which should be safe for login requests .", "Question : what i m trying to do is lock down certain pages in my durandal knockoutjs breezejs SPA app based on a user s authenticated role ie if you re an admin etc you should see pages that others shouldn t . ideally server code could be used to either output the link or not based on role but since durandal and SPA apps don t really work that way with server code i m at a loss . i realize this question has been asked in other forms here i.e . how to use .cshtml server pages with Durandal and this could be an option if perhaps i could get it to work . i have yet to find a very complete example that works for me . any ideas appreciated .. . Answer : You can keep your routing information on the server and supply it to the application on initialization . For example . In the activate method of your shell viewmodel .. . .. . shell.js .. . .. . my datacontext.getRouteInformation gets a json array of route information based on the current users security context and populates the routeInfo observable . that observable is then passed to the map-function to create the users valid routes etc . I know this doesn t fully lock down the html files etc but all of my controllers and actions have authorization attributes on them so the data is protected . Comment : that s a good idea @Excommunicated and one i haven t seen presented yet . i ll give it a shot . and my controllers actions are also locked down in this manner but i wanted that additional level of security . question : so if someone figures out a link that they re not authorized to see it will show the error page in your example correct thanks Comment : correct . For example if they try to go to mysite.com Admin http : mysite.com Admin and they are not an administrator I redirect to the error page but you can redirect them home or anywhere you like. . What this doesn t stop is someone going to mysite.com app views admin.html http : mysite.com app views admin.html . but my html contains nothing other than raw HTML and data-bind attributes so nothing of value . Comment : actually since durandal mainly uses the concept of an API or REST methods what controller actions exactly do you have locked down i have my API methods locked down but really that s just locking down the data not the navigation to the pages themselves . Comment : sorry one more thing is that i have my routes configured in the main.js not shell.js . this was the default when i installed durandal . Comment : you can do them wherever you like . I personally did the routes in the shell as it s where I call activate on the router so I pump in the routes then activate . Just my preference . but main.js should work too .", "Question : I installed simplesamlphp and simplesamlauth . When I try to login I m getting this error can anyone help me to solve this Exception : .. . .. . Error in simplesamlphp auth.module : no valid unique id attribute set . in simplesamlphp auth get authname line 419 of var www html drupal sites all modules contrib simplesamlphp auth simplesamlphp auth.module . .. . Answer : It s occurring because the IdP is not providing the attribute that you ve specified in the Which attribute from simpleSAMLphp should be used as unique identifier for the user field on the module s config page . If for example you are trying to test the module using the IdP at TestShib.org you will get that error because neither the default name in that field nor the other name that s suggested match any of the attributes provided by TestShib.org . So assuming that you have no control over the IdP you need to figure out which among the attributes that are being provided will work as a unique identifier and enter that name in that field . Again using TestShib.org as an example if you log in using the simpleSAMLphp application not the module you will see a list of the provided attributes on that page with their names in the left column ." ] }
[ "yes-answer-long", "yes-answer-short" ]
social-authentication
UNK_RELATION
spark-view-engine@fubumvc@85
spark-view-engine -- spark is a view engine for asp.net-mvc castle project monorail @placeholder nancyfx jessicafx and openrasta frameworks .
{ "confidence": [ 69.9361343383789, 69.9361343383789, 68.05054473876953, 66.74142456054688, 62.8818359375, 62.26090621948242, 60.896018981933594, 60.66508483886719, 60.371177673339844, 59.211570739746094, 58.69612121582031, 58.69612121582031, 58.42778015136719, 58.30918884277344, 58.189857482910156, 58.189857482910156, 56.58711242675781, 56.58711242675781, 56.58711242675781, 55.803321838378906, 55.394683837890625, 54.881858825683594, 54.08584213256836, 54.08584213256836, 54.08584213256836, 53.631412506103516, 51.660606384277344, 51.46138381958008, 51.46138381958008, 51.46138381958008, 51.34125518798828, 51.19146728515625, 50.659969329833984, 50.659969329833984, 50.344947814941406, 49.888465881347656, 49.64889144897461, 49.41881561279297, 49.41881561279297, 49.41881561279297, 49.41881561279297, 49.39224624633789, 48.66965866088867, 48.602298736572266, 48.36580276489258, 48.0355110168457, 47.85745620727539, 47.49844741821289, 47.318687438964844, 47.26366424560547, 47.181514739990234, 47.181514739990234, 47.181514739990234, 47.181514739990234, 47.181514739990234, 47.181514739990234, 47.059932708740234, 46.65781021118164, 46.112525939941406, 45.936981201171875, 45.19322204589844, 45.19322204589844, 45.19322204589844, 44.91409683227539, 44.91409683227539, 44.55705642700195, 44.55705642700195, 44.55705642700195, 44.55705642700195, 44.55705642700195, 44.39384078979492, 44.314064025878906, 43.91938400268555, 43.87522506713867, 43.740535736083984, 43.70683670043945, 43.38604736328125, 42.980010986328125, 42.9559211730957, 42.739990234375, 42.40583801269531, 42.308597564697266, 42.269893646240234, 42.11079025268555, 41.67426681518555, 41.45917510986328, 41.45917510986328, 41.34593963623047, 41.34593963623047, 41.34593963623047, 41.30464172363281, 41.15223693847656, 40.95603942871094, 40.88511276245117, 40.74271011352539, 40.74271011352539, 40.74271011352539, 40.74271011352539, 40.502685546875, 40.502685546875 ], "content": [ "I am using ASP.NET MVC 2 with the Spark view engine .", "I m using the spark-view-engine with my asp.net-mvc application .", "in the Spark View Engine", "This example is using the Spark View Engine syntax but it s functionally identical to the standard ASP.NET MVC view engine is the same as or", "I use spark-view-engine in my MVC 2 project .", "I am using the Spark view engine instead of the built-in view engine .", "I unfortunately do not have the mvc-spark view engine installed .", "Some body tried Spark View Engine http : dev.dejardin.org with asp.net-mvc-2 preview 2", "I use Spark view engine .", "I m developing a website using the Spark view engine .", "Now my project using MVC2 + Spark view engine .", "We are working in a project where Spark view engine has been used .", "I m attempting to use fluent html and the spark-view-engine in my asp.net-mvc application .", "After pushing my asp.net-mvc with spark-view-engine project to our live server yesterday I ve started getting a strange error .", "Is there a way to add a for-loop when using spark-view-engine", "I have an issue that I m trying to diagnose with the spark-view-engine .", "Try to download and use Spark View Engine for MVC3 .", "Try using spark-view-engine http : www.sparkviewengine.com .", "First is for standard view engine second for Spark :", "We use the spark-view-engine v1.5 in our asp.net-mvc 2.0 website .", "For context I m using Spark as an ASP.NET MVC view engine but I m also using it as a templating-engine so an advanced user of my application can type a simple Spark view into a text area and save it render e-mails etc .", "Spark View Engine for MVC3 http : sparkviewengine.codeplex.com releases view 86901", "have you added the spark-view-engine in your global.ascx", "Does any solution exist for VS2012 for spark-view-engine", "I m using the Spark View Engine but the idea should be the same .", "For example Spark View Engine http : sparkviewengine.com .", "With a view engine responsible for rendering both master and view you re hard-pressed to find any solution without duplication or maintainability woes wrapping every spark view or .aspx view so that it can be rendered with the alternate engine .", "I upgraded the Spark view engine as well because I needed to .", "I would like to use the Spark view engine DirectUse for email templating .", "In case of Spark view engine you can render directly to your stream .", "I was wondering if there was a general consensus on the best alternative view engine for asp.net MVC .", "I recently converted my spark project to asp.net-mvc-2 .", "Spark view engine throws an error building any view when the Nancy host is running under supervisor .", "I am trying to render a simple view with the TinyWeb framework and Spark view engine .", "The Spark view implemented for MVC integration is here https : github.com SparkViewEngine spark blob master src Spark.Web.Mvc SparkView.cs and you ll see the Html property exposed which allows your Spark view to access it and invoke helpers .", "Just an idea try to write a custom view engine or tweak Spark s one that will render the requested .spark view using Spark engine and then call WebForms engine passing it the rendered content - I think this should be possible but I have no knowledge about these internals .", "I want to include a spark view in another spark view .", "We currently use the Spark view engine to help render an xml template that is used within our application for reporting purposes .", "Related : stackoverflow.com questions 2612411 http : stackoverflow.com questions 2612411 literals-that-precede-in-spark-view-engine", "The issue I m having currently is only occurring when using the spark-view-engine .", "I m using the spark-view-engine on other websites running on the same box and have never seem this issue .", "There s a solution to this - use a workaround around web forms engine - a single view engine - Spark -", "Since you re currently using Spark you probably have an entry in your global.asax that clears the current view engines and adds in the Spark engine .", "What type is HtmlHelper in Spark view", "Hello SparViewEngine gurus .. . .. . We got a webapplication project in which we have Spark View engine configured .", "The view is written using the razor view engine so you will have to tranfer to Spark .", "This solution doesn t work http : dotnetslackers.com articles aspnet installing-the-spark-view-engine-into-asp-net-mvc-2-preview-2.aspx .", "I have been able to host a spark view in a System.Web.Mvc.ViewUserControl call Html.RenderView from the spark view .", "Enforce strict Model-View separation .. . .. . .. . .. . Brail http : mvccontrib.codeplex.com Wiki View.aspx title Brail .. . .. . Design Goals : .. . .. . The Brail view engine has been ported from MonoRail to work with the Microsoft ASP.NET MVC Framework .", "is a template-engine the same as a view engine", "Example : .. . .. . .. . .. . Spark View Engine http : sparkviewengine.com .. . .. . Design Goals : .. . .. . The idea is to allow the html to dominate the flow and the code to fit seamlessly .", "The Spark View Engine.. . aims to rid your views of tag soup by trying to make everything fluent and readable .", "Can the Spark View Engine handle C Code blocks like Razor can", "For example I have the following in Razor : .. . .. . What would the equivalent of that be in the Spark View Engine", "I had to download the spark-view-engine source code http : sparkviewengine.codeplex.com Release ProjectReleases.aspx ReleaseId 27600 .", "Allthough I don t know the spark-view-engine handles things does it have to compile the views", "I m try to emit a literal dollar-sign opening curly bracket text and closing curly bracket using the Spark view engine .", "Razor is the preferred View Engine for MVC ASPX View Engine is the legacy View Engine and this option is there for backward compatibility .", "Or for a webforms view to work within a spark layout", "If the View Engine in traditional ASP.NET was switchable then you would have been able to use the Spark view engine because it already understands the blah syntax and delegates that rendering but I m afraid the extensibility points are just not there.. . .. . .. . Update I stumbled across this blog post http : world.episerver.com Blogs Cristian-Libardo Dates 2010 11 Spark-View-Engine-on-WebForms which talks about using Spark on the WebForms project - you may have some luck following up on that.. . .. . .. . Hope that helps Rob", "I am using Spark view engine and I am trying to work out a way to get the views to run from a separate AppDomain .", "I ve been using the Bindings http : sparkviewengine.com documentation bindings feature with the spark-view-engine to replace quite a few of my Html helper method calls .", "A bit of simplification up front will save you boatloads of pain in the future and simple plain syntax is the cornerstone of Spark view engine premise .", "It is based on F and includes an ASP.NET MVC view engine but can also be used solely for its capability of creating XHTML .", "This is a c 4.0 internal dsl for generating html and also asp.net-mvc view engine .", "stackoverflow.com questions 1933474 http : stackoverflow.com questions 1933474 what-is-the-difference-between-and-in-the-spark-view-engine", "We used to use the Spark view engine and I m trying to start migrating over to Razor .", "I m not familiar with the Spark view engine but it looks like your form only displays information and has hidden fields", "Where is this getting changed is it part of the spark-view-engine or part of the Response builder in C but that doesn t make sense", "this works very well if you re already using spark as your view engine as we are .", "If the ASP.NET MVC has multiple view engines registered it will query one by one to see whether a view engine can handle the request .", "If you re returning HTML to your client then an engine like Spark might be appropriate .", "I m not familiar NancyFX engine but all engines views should be using a base view .", "You wrote a foreach loop in your Spark view .", "The table in the .spark view looks like this .", "I do this all the time - I make a template and use the NVelocity engine from the castle project not to be confused with an nvelocity VIEW engine to render the template .", "An individual view engine is expected to handle both its master and view .", "But I m unsure as to whether this is possible with the Razor view engine .", "The Spark View Engine http : dev.dejardin.org for example aims to rid your views of tag soup by trying to make everything fluent and readable .", "Add the Typed Model - Make sure you type the Spark View Model .", "Here is the relevant bit of code in my View.spark strongly typed : .. . .. . The same bit of code works just fine if I use an .aspx view : .. . .. . The major point here being EditorFor is new in ASP.NET MVC 2 and in my project I can use that helper in an ASPX view but not a Spark view .", "I know over time that will-change and we ll want to swap in more dynamic information so I ve decided to go ahead and build a web application using ASP.NET MVC2 and the Spark view engine .", "The Application Start looks like .. . .. . My expectation is that since the Spark engine registers before default WebFormViewEngine when browse the Index action in Product controller the Spark engine should be used and WebFormViewEngine should be used for all other urls .", "Looks like the Spark view base https : github.com NancyFx Nancy blob 9d3c650575cba109e620ab163f4fda26a0536036 src Nancy.ViewEngines.Spark NancySparkView.cs doesn t have any helpers defined", "I ve added some of my own helpers to the System.Web.Mvc within my project and got it working with the default asp.net-mvc view engine .", "Pictures say a thousand words and markup samples are like screenshots for view engines : So here s one from my favourite Spark View Engine http : sparkviewengine.com", "I can accept any solution including 3-rd party view engines and libraries - I actually use Spark View Engine I solve the problem using its macros and MvcContrib but did not find a solution there .", "It looks likes spark engine looks .spark files inside of Views folders only instead of Areas folder in additionally .", "By the time the master page is read the spark engine will have already finished and vice-versa .", "You could try to mimic how the master page is rendered within the spark engine .", "Spark .", "Anyway I d say it should be possible but 1 will require complex tweaking of view engines and 2 you ll lose much of the Spark layouts functionality since your .spark views will mostly render as without spark layouts at all .", "ASPX works Spark does not - so this would seem to be a valid test to ensure that everything involved is working properly until I use the spark view instead of the aspx view .", "Here s the view model : .. . .. . In the controller I have : .. . .. . I have in my view using the Spark view engine : .. . .. . This gets rendered as : .. . .. . When I submit the page I get an InvalidCastException : Specified cast is not valid . .", "Now my question is how the view engine is resolved", "The first view engine answers yes process the request .", "How to use certain view engine for certain controller", "I want to migrate to Razor view engine .", "Tried it again after I ve renamed the view to .spark instead of .cshtml and it worked", "You actually didn t show nor your spark view nor the code ." ] }
{ "confidence": [ 74.74305725097656, 72.03207397460938, 71.75353240966797, 71.27259826660156, 70.40538024902344, 69.54913330078125, 67.76093292236328, 67.58489227294922, 67.46189880371094, 67.28449249267578, 66.9676513671875, 66.80156707763672, 66.37281036376953, 66.11128997802734, 65.97459411621094, 65.66416931152344, 65.34586334228516, 65.15696716308594, 65.11476135253906, 64.8932876586914 ], "content": [ "Question : I m rendering Spark templates in a console-application and I m trying to use RenderPartial like so : .. . .. . but I m getting this error when compiling the view : .. . .. . In the Shared global.spark I have added this imports : .. . .. . Everything else renders fine otherwise it s just that Html is not defined . It it makes any difference I m rendering this with an embedded NancyFX engine . Comment : possible duplicate of Nancy - how do you add htmlHelpers into the Spark virew http : stackoverflow.com questions 11782458 nancy-how-do-you-add-htmlhelpers-into-the-spark-virew .. . Answer : I believe the problem isn t within the view itself . I m not familiar NancyFX engine but all engines views should be using a base view . The default is in the web.config in the views folder : .. . .. . Of course you re not using razor this is simply a comparison where Html exists on System.Web.Mvc.WebViewPage . How you configure NancyFX the configuration needs to define the one that supports the HtmlHelpers that either come with MVC or NancyFX I m not sure . After taking a look at Gibhub https : github.com NancyFx Nancy blob master src Nancy.ViewEngines.Razor web.config.transform It looks very similar : .. . .. . And the NancyRazorViewBase has HtmlHelpers on it https : github.com NancyFx Nancy blob master src Nancy.ViewEngines.Razor NancyRazorViewBase.cs so it sounds very much like a configuration issue . Comment : Looks like the Spark view base https : github.com NancyFx Nancy blob 9d3c650575cba109e620ab163f4fda26a0536036 src Nancy.ViewEngines.Spark NancySparkView.cs doesn t have any helpers defined Comment : Aha Nancy Spark too much Comment : Pretty sure I answered this one here : stackoverflow.com questions 11782458 http : stackoverflow.com questions 11782458 nancy-how-do-you-add-htmlhelpers-into-the-spark-virew 11868166", "Question : I created a simple ASP.NET MVC version 1.0 application . I have a ProductController which has one action Index . In the view I created a corresponding Index.aspx under Product subfolder . Then I referenced the Spark dll and created Index.spark under the same Product view folder . The Application Start looks like .. . .. . My expectation is that since the Spark engine registers before default WebFormViewEngine when browse the Index action in Product controller the Spark engine should be used and WebFormViewEngine should be used for all other urls . However the test shows that the Index action for Product controller also uses the WebFormViewEngine . If I comment out the registration of WebFormViewEnginer the last line in the code I can see that the Index action is rendered by Spark engine and the rest urls generates an error since the defualt engine is gone it proves that all my Spark code is correct . Now my question is how the view engine is resolved Why the registration sequence does not take effect .. . Answer : Hmmm.. . Nope - all due respect webforms doesn t do anything beyond a cache-check when useCache is true . Same as Spark . Actually - I think someone might have moved my cheese.. . Spark might have had a quirk added causing a false cache-miss during the useCache true pass . If that s true it s more of a bug than different rules applied to that parameter . .. . .. . Updated : .. . .. . I was looking at MVC 2 originally - which is why I implied @Aaronaught s conclusions were incorrect . MVC 2 does not return a view on the first pass where useCache true which is different in MVC 1.0 which will resolve and populate . So difference is between the way ASP.NET MVC 1.0 and ASP.NET MVC 2 are implemented . Spark and MVC 2 treat the useCache flag the same and the order they are registered will give them priority .", "Question : I m try to emit a literal dollar-sign opening curly bracket text and closing curly bracket using the Spark view engine . How can I get get Spark to emit Hello rather than trying to evaluate a variable name Hello The best that I can come up with is Hello but that seems too complicated and it s hard to read . For context I m using Spark as an ASP.NET MVC view engine but I m also using it as a templating-engine so an advanced user of my application can type a simple Spark view into a text area and save it render e-mails etc . Thanks .. . Answer : There are two ways you can escape the Spark code expressions : .. . .. . 1 . Single item escaping .. . 2 . Entire block escaping .. . .. . Single Item escaping .. . .. . This can be done by using one of three escape chars for each expression type . Rather than explain the following is an example of how you would do this in your spark view : .. . .. . results in the following verbatim output : .. . .. . Entire block escaping .. . .. . You can use the new ignore special tag to output verbatim anything that is inside a block like so : .. . .. . Hope that helps .. . Rob Comment : Thanks for the answer Rob", "Question : I am working with an ASP.NET MVC project which was originally started from the CodeBetter.Canvas http : codebetter.com blogs karlseguin archive 2009 04 28 presenting-codebetter-canvas.aspx project - and I m trying to move to ASP.NET MVC 2 . I successfully upgraded my project using Eilon s upgrade tool http : weblogs.asp.net leftslipper archive 2009 10 19 migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx moved to VS2010 although not yet to .NET 4 . The issue I m having currently is only occurring when using the spark-view-engine . Here is the relevant bit of code in my View.spark strongly typed : .. . .. . The same bit of code works just fine if I use an .aspx view : .. . .. . The major point here being EditorFor is new in ASP.NET MVC 2 and in my project I can use that helper in an ASPX view but not a Spark view . I ve tried upgrading Spark to use MVC 2 http : stackoverflow.com questions 1261576 asp-net-mvc-2-0-prev-1-and-spark 1264289 1264289 as well as MvcContrib and Ninject thinking maybe it was one of those that was freaking out - but so far no luck - I m still seeing the same behavior . Here is the full error message that is thrown from within Spark s BatchCompiler class . Dynamic view compilation failed . 0 0 : warning CS1701 : Assuming assembly reference System.Web.Mvc Version 1.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 matches System.Web.Mvc Version 2.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 you may need to supply runtime policy c : inetpub wwwroot myproject CodeBetter.Canvas.Web Views MyEntity View.spark 9 16 : error CS1061 : System.Web.Mvc.HtmlHelper does not contain a definition for EditorFor and no extension method EditorFor accepting a first argument of type System.Web.Mvc.HtmlHelper could be found are you missing a using directive or an assembly reference Here is the Spark related code in my Global.asax : .. . .. . Also I am referencing System.Web.Mvc.Html in my spark view as mentioned in another SO answer http : stackoverflow.com questions 1081650 cannot-use-html-actionlink-in-asp-net-mvc-spark-files . Comment : I think the real problem here was that I had mistakenly thought that the version of MVCContrib I was using was using the 2.0.0 version of system.web.mvc.dll - it wasn t Crap After updating that spark and ninject - it works .. . Answer : These are the steps I took to resolve the issue with a new MVC 2 project and Spark 1.1 : .. . .. . 1 . Compile against MVC 2.0 - I double checked the references to make sure I was linking to MVC 2 and not MVC 1 . Since this was a new project this was not an issue . 2 . Added System.Web.Mvc.Html - I added System.Web.Mvc.Html to the Spark configuration to make sure that namespace was added to all views . In Global.asax.cs Application Start .. . .. . var settings new SparkSettings .. . .SetDebug true .. . .SetAutomaticEncoding true .. . .AddAssembly Web .. . .AddNamespace Web.Model .. . .AddNamespace System.Collections.Generic .. . .AddNamespace System.Linq .. . .AddNamespace System.Web.Mvc .. . .AddNamespace System.Web.Mvc.Html .. . .. . .. . This can also be done in the webconfig in the Spark View Engine block . 3 . Add the Typed Model - Make sure you type the Spark View Model . In aspx this is done with the Inherits in the page declaration like this : .. . .. . @ Page Title Language C MasterPageFile Views Shared Site.Master .. . Inherits System.Web.Mvc.ViewPage MyModelType .. . .. . .. . in Spark : .. . .. . viewdata model MyModelType", "Question : Some body tried Spark View Engine http : dev.dejardin.org with asp.net-mvc-2 preview 2 I have a problem with AREAS . It looks likes spark engine looks .spark files inside of Views folders only instead of Areas folder in additionally . My question is : .. . .. . Somebody has information how to add it .. . Answer : Spark looks for a constraint or default-value key area in a route to determine the view location . MVC 2 area support does not add this by default you have to do it when declaring your area : .. . .. . Note the area admin inside the defaults object . Comment : i saw that in mvc2 putted area variable in dataToken dictionary . it why spark cannot find it", "Question : I am working with an ASP.NET MVC project which was originally started from the CodeBetter.Canvas http : codebetter.com blogs karlseguin archive 2009 04 28 presenting-codebetter-canvas.aspx project - and I m trying to move to ASP.NET MVC 2 . I successfully upgraded my project using Eilon s upgrade tool http : weblogs.asp.net leftslipper archive 2009 10 19 migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx moved to VS2010 although not yet to .NET 4 . The issue I m having currently is only occurring when using the spark-view-engine . Here is the relevant bit of code in my View.spark strongly typed : .. . .. . The same bit of code works just fine if I use an .aspx view : .. . .. . The major point here being EditorFor is new in ASP.NET MVC 2 and in my project I can use that helper in an ASPX view but not a Spark view . I ve tried upgrading Spark to use MVC 2 http : stackoverflow.com questions 1261576 asp-net-mvc-2-0-prev-1-and-spark 1264289 1264289 as well as MvcContrib and Ninject thinking maybe it was one of those that was freaking out - but so far no luck - I m still seeing the same behavior . Here is the full error message that is thrown from within Spark s BatchCompiler class . Dynamic view compilation failed . 0 0 : warning CS1701 : Assuming assembly reference System.Web.Mvc Version 1.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 matches System.Web.Mvc Version 2.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 you may need to supply runtime policy c : inetpub wwwroot myproject CodeBetter.Canvas.Web Views MyEntity View.spark 9 16 : error CS1061 : System.Web.Mvc.HtmlHelper does not contain a definition for EditorFor and no extension method EditorFor accepting a first argument of type System.Web.Mvc.HtmlHelper could be found are you missing a using directive or an assembly reference Here is the Spark related code in my Global.asax : .. . .. . Also I am referencing System.Web.Mvc.Html in my spark view as mentioned in another SO answer http : stackoverflow.com questions 1081650 cannot-use-html-actionlink-in-asp-net-mvc-spark-files . Comment : I think the real problem here was that I had mistakenly thought that the version of MVCContrib I was using was using the 2.0.0 version of system.web.mvc.dll - it wasn t Crap After updating that spark and ninject - it works .. . Answer : I tried a lot of things mentioned above but just couldn t get a dependent dll that my views used and also referenced MVC 1.0.0.0 to use the MVC 2.0.0.0 so here is what fixed it for me.. . I downloaded the Spark code and added the following line to the BatchCompiler.cs file in the Compile method :", "Question : I was wondering if there was a general consensus on the best alternative view engine for asp.net MVC . So far I know of Spark Brail NHaml but what about others Comment : duplicate : stackoverflow.com questions 523644 http : stackoverflow.com questions 523644 what-templating-engines-are-available-for-asp-net-mvc-framework stackoverflow.com questions 173207 http : stackoverflow.com questions 173207 best-template-engine-for-aspnet-mvc Comment : is a template-engine the same as a view engine if so i did not know that Comment : not exactly the same but I d say that view engines build upon template engines so wherever there s a view engine there s a template-engine underneath Comment : stackoverflow.com questions 1451319 http : stackoverflow.com questions 1451319 asp-net-mvc-view-engine-comparison .. . Answer : I would suggest that you take each of the above View Engines write a view and see which works best for you . You might find that for different applications or even for differnt types of view that the choice of View Engine changes . If you re returning HTML to your client then an engine like Spark might be appropriate . However if the conent you re returning is XML or some other markup JSON for example then Spark won t be much help . NHaml is also focused on XHTML generation . Consider how you want to test your views the skill set of your engineers both developers and testers the level of support you re hoping to get from your View Engine writer if you find bugs how you want those bug fixes deployed and whether your customer has any preference . Basically - try a few see what you like use a mixture of them if you find that makes sense . Oh and here s a good post that lists 4 alternative engines.. . .. . .. . http : codebetter.com blogs jeffrey.palermo archive 2008 01 27 mvccontrib-now-offers-four-4-alternative-view-engines-for-asp-net-mvc.aspx .. . .. . .. . it mentions an XSLT engine that might be appropriate if you re looking to generate XML . Comment : Link s dead Martin.. .", "Question : I am working with an ASP.NET MVC project which was originally started from the CodeBetter.Canvas http : codebetter.com blogs karlseguin archive 2009 04 28 presenting-codebetter-canvas.aspx project - and I m trying to move to ASP.NET MVC 2 . I successfully upgraded my project using Eilon s upgrade tool http : weblogs.asp.net leftslipper archive 2009 10 19 migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx moved to VS2010 although not yet to .NET 4 . The issue I m having currently is only occurring when using the spark-view-engine . Here is the relevant bit of code in my View.spark strongly typed : .. . .. . The same bit of code works just fine if I use an .aspx view : .. . .. . The major point here being EditorFor is new in ASP.NET MVC 2 and in my project I can use that helper in an ASPX view but not a Spark view . I ve tried upgrading Spark to use MVC 2 http : stackoverflow.com questions 1261576 asp-net-mvc-2-0-prev-1-and-spark 1264289 1264289 as well as MvcContrib and Ninject thinking maybe it was one of those that was freaking out - but so far no luck - I m still seeing the same behavior . Here is the full error message that is thrown from within Spark s BatchCompiler class . Dynamic view compilation failed . 0 0 : warning CS1701 : Assuming assembly reference System.Web.Mvc Version 1.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 matches System.Web.Mvc Version 2.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 you may need to supply runtime policy c : inetpub wwwroot myproject CodeBetter.Canvas.Web Views MyEntity View.spark 9 16 : error CS1061 : System.Web.Mvc.HtmlHelper does not contain a definition for EditorFor and no extension method EditorFor accepting a first argument of type System.Web.Mvc.HtmlHelper could be found are you missing a using directive or an assembly reference Here is the Spark related code in my Global.asax : .. . .. . Also I am referencing System.Web.Mvc.Html in my spark view as mentioned in another SO answer http : stackoverflow.com questions 1081650 cannot-use-html-actionlink-in-asp-net-mvc-spark-files . Comment : I think the real problem here was that I had mistakenly thought that the version of MVCContrib I was using was using the 2.0.0 version of system.web.mvc.dll - it wasn t Crap After updating that spark and ninject - it works .. . Answer : Try specifiying the System.Web.Mvc reference in the web.config instead of the Global.ascx.cs file so that you can specify the specific version : .. . .. . This should prevent SPARK from working at all if the wrong version of the MVC assembly is being loaded from somewhere . If the MVC 1.0 Assembly is in the GAC you can clear and reload it as follows : .. . .. . from Visual Studio command-prompt .. . .. . Hope this helps .. . .. . Jeff French Comment : I have the following in the system.web assemblies section of my web.config - is that sufficient add assembly System.Web.Mvc Version 2.0.0.0 Culture neutral PublicKeyToken 31BF3856AD364E35 If not can you elaborate on how why to add the spark section to the web.config Comment : Adding the spark section to the web.config is an alternate way to specify the settings . It is equivilent to what you have in your Global.asax file ie : var settings in new SparkSettings .. . . The reason I suggested moving your settings to the web.config spark section is that you can specify the strong assembly name and type there instead of just telling spark to look for System.Web.Mvc . Also note that this is an Assembly reference in spark in addition to the Namespace references you have already specified in the Global.asax file . Comment : Thanks for the clarification Jeff . This was very helpful however it didn t directly solve my issue I had to search and destroy all references to the old version of the system.web.mvc assembly for real . And you re right if you follow this step it kills spark everywhere if the 1.0 version of system.web.mvc.dll is referenced .", "Question : I am working with an ASP.NET MVC project which was originally started from the CodeBetter.Canvas http : codebetter.com blogs karlseguin archive 2009 04 28 presenting-codebetter-canvas.aspx project - and I m trying to move to ASP.NET MVC 2 . I successfully upgraded my project using Eilon s upgrade tool http : weblogs.asp.net leftslipper archive 2009 10 19 migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx moved to VS2010 although not yet to .NET 4 . The issue I m having currently is only occurring when using the spark-view-engine . Here is the relevant bit of code in my View.spark strongly typed : .. . .. . The same bit of code works just fine if I use an .aspx view : .. . .. . The major point here being EditorFor is new in ASP.NET MVC 2 and in my project I can use that helper in an ASPX view but not a Spark view . I ve tried upgrading Spark to use MVC 2 http : stackoverflow.com questions 1261576 asp-net-mvc-2-0-prev-1-and-spark 1264289 1264289 as well as MvcContrib and Ninject thinking maybe it was one of those that was freaking out - but so far no luck - I m still seeing the same behavior . Here is the full error message that is thrown from within Spark s BatchCompiler class . Dynamic view compilation failed . 0 0 : warning CS1701 : Assuming assembly reference System.Web.Mvc Version 1.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 matches System.Web.Mvc Version 2.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 you may need to supply runtime policy c : inetpub wwwroot myproject CodeBetter.Canvas.Web Views MyEntity View.spark 9 16 : error CS1061 : System.Web.Mvc.HtmlHelper does not contain a definition for EditorFor and no extension method EditorFor accepting a first argument of type System.Web.Mvc.HtmlHelper could be found are you missing a using directive or an assembly reference Here is the Spark related code in my Global.asax : .. . .. . Also I am referencing System.Web.Mvc.Html in my spark view as mentioned in another SO answer http : stackoverflow.com questions 1081650 cannot-use-html-actionlink-in-asp-net-mvc-spark-files . Comment : I think the real problem here was that I had mistakenly thought that the version of MVCContrib I was using was using the 2.0.0 version of system.web.mvc.dll - it wasn t Crap After updating that spark and ninject - it works .. . Answer : I recently converted my spark project to asp.net-mvc-2 . I dont see in what you ve written that you ve switched from using Spark.Web.Mvc to Spark.Web.Mvc2 . Just to be clear Spark.Web.Mvc2 is the project that needs to be recompiled with the new System.Web.Mvc assembly . I had issues with intellisense until i removed all assembly and namespace references from the web.config and put them in the global.spark file and had added the pageBaseType Spark.Web.Mvc2.SparkView attribute to the Spark- Pages node in the web.config . Hope any of that helps . Comment : Thanks for the info I double checked that the latest version of Spark does in-fact include Spark.Web.Mvc2.dll which references system.web.mvc.dll v 2.0.0 . I was able to use this successfully in my project however I still mistakenly had overlooked another reference to v1.0.0 elsewhere", "Question : I was wondering if there was a general consensus on the best alternative view engine for asp.net MVC . So far I know of Spark Brail NHaml but what about others Comment : duplicate : stackoverflow.com questions 523644 http : stackoverflow.com questions 523644 what-templating-engines-are-available-for-asp-net-mvc-framework stackoverflow.com questions 173207 http : stackoverflow.com questions 173207 best-template-engine-for-aspnet-mvc Comment : is a template-engine the same as a view engine if so i did not know that Comment : not exactly the same but I d say that view engines build upon template engines so wherever there s a view engine there s a template-engine underneath Comment : stackoverflow.com questions 1451319 http : stackoverflow.com questions 1451319 asp-net-mvc-view-engine-comparison .. . Answer : In software there are no best alternative . It always depends in your background the company you work for your preferences your tastes etc . Just pick what work best for you for the current project . If you are not sure pick the safe way the MS way : Comment : i hear what you re saying Eduardo and yes the MS way seems like the safe way to go but i read about so many complaints about the MS way namely regarding tag soup . When I look at Spark for example the markup looks much more elegant . I guess I ll just try Spark :", "Question : I am working with an ASP.NET MVC project which was originally started from the CodeBetter.Canvas http : codebetter.com blogs karlseguin archive 2009 04 28 presenting-codebetter-canvas.aspx project - and I m trying to move to ASP.NET MVC 2 . I successfully upgraded my project using Eilon s upgrade tool http : weblogs.asp.net leftslipper archive 2009 10 19 migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx moved to VS2010 although not yet to .NET 4 . The issue I m having currently is only occurring when using the spark-view-engine . Here is the relevant bit of code in my View.spark strongly typed : .. . .. . The same bit of code works just fine if I use an .aspx view : .. . .. . The major point here being EditorFor is new in ASP.NET MVC 2 and in my project I can use that helper in an ASPX view but not a Spark view . I ve tried upgrading Spark to use MVC 2 http : stackoverflow.com questions 1261576 asp-net-mvc-2-0-prev-1-and-spark 1264289 1264289 as well as MvcContrib and Ninject thinking maybe it was one of those that was freaking out - but so far no luck - I m still seeing the same behavior . Here is the full error message that is thrown from within Spark s BatchCompiler class . Dynamic view compilation failed . 0 0 : warning CS1701 : Assuming assembly reference System.Web.Mvc Version 1.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 matches System.Web.Mvc Version 2.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 you may need to supply runtime policy c : inetpub wwwroot myproject CodeBetter.Canvas.Web Views MyEntity View.spark 9 16 : error CS1061 : System.Web.Mvc.HtmlHelper does not contain a definition for EditorFor and no extension method EditorFor accepting a first argument of type System.Web.Mvc.HtmlHelper could be found are you missing a using directive or an assembly reference Here is the Spark related code in my Global.asax : .. . .. . Also I am referencing System.Web.Mvc.Html in my spark view as mentioned in another SO answer http : stackoverflow.com questions 1081650 cannot-use-html-actionlink-in-asp-net-mvc-spark-files . Comment : I think the real problem here was that I had mistakenly thought that the version of MVCContrib I was using was using the 2.0.0 version of system.web.mvc.dll - it wasn t Crap After updating that spark and ninject - it works .. . Answer : The underlying issue is that a version 1.0.0 assembly is still being referenced somewhere in the project . Using reflector http : www.red-gate.com products reflector to examine each assemblies dependencies I found if you re starting with CodeBetter.Canvas project there are three dependent projects that need to be updated to use the 2.0.0 version of system.web.mvc.dll .. . .. . 1 . Spark . Download the latest version of spark from teamcity and use the spark.web.mvc2.dll which references system.web.mvc.dll 2.0.0 Link to detailed instructions . http : stackoverflow.com questions 1261576 asp-net-mvc-2-0-prev-1-and-spark 1264289 1264289 .. . .. . 2 . MVCContrib . Download the latest version of MVCContrib download release http : teamcity.codebetter.com guestAuth repository download bt81 .lastPinned MVCContrib.release.zip download source http : github.com mvccontrib MvcContrib which references the system.web.mvc.dll 2.0.0 . 3 . Ninject . Download the latest version of ninject http : github.com enkari ninject.web.mvc and recompile the VS solution after updating the reference to the 2.0.0 version of system.web.mvc.dll .. . .. . Now replace these dependency s assemblies in your project and update the project references if necessary . All should be well . Comment : Thanks Ian I have the same problem and fixed by following your methods . There was an assembly that references system.web.mvc.dll v1.0 .", "Question : I like the html dominated structure of the sparkviewengine very much . Is there a version of it for WebForms projects I want to use it for generating presentation only html I mean the output will not contain any html-input controls . Or can you recommend an alternative VS.Net 2010 Framework 4.0 .. . .. . thanks for your time .. . Answer : Unfortunately traditional ASP.NET WebForms does not allow the developer to switch out View Engines . There is only one and that s WebForms . Only with ASP.NET MVC did this concept of interchangeable view engines come about which gave you the option . If the View Engine in traditional ASP.NET was switchable then you would have been able to use the Spark view engine because it already understands the blah syntax and delegates that rendering but I m afraid the extensibility points are just not there.. . .. . .. . Update I stumbled across this blog post http : world.episerver.com Blogs Cristian-Libardo Dates 2010 11 Spark-View-Engine-on-WebForms which talks about using Spark on the WebForms project - you may have some luck following up on that.. . .. . .. . Hope that helps Rob", "Question : Is their a solution to generate an email template using an ASP.NET MVC View without having to jump through hoops . Let me elaborate jumping through hoops . The above code is using the current HttpContext to fake a new Context and render the page with RenderPartial we shouldn t have to do this . .. . .. . Another very detailed solution using ControllerContext and .Render : IEmailTemplateService Headers Postback WorkAround http : cowfarm.net p 81 but pretty much doing the same thing with a lot more code . I on the other hand am looking for something that would just render a View without having to POST GET and generates me a simple string that I can send off through my Email code . Something that doesn t run into errors such as posting headers twice or faking some piece of data . EX : .. . .. . .. . .. . See my solution bellow or follow this link : .. . .. . My Solution using spark : 12 30 2009 ASP.NET MVC Email Template Solution http : cowfarm.net p 188 Comment : That s how MS engine works and we can t change it so why bother Doesn t the solution work If it works just use it . There re many things we have to work around for example I recently needed to pass lambdas to custom-attributes but I can t so I just pass strings and live with it . This world is not perfect . Comment : I know that ASP.NET MVC is growing from its older brother ASP.NET and because of it there are down sides . However sometimes as a developer it is important to bring up issues even if they are meaningless to some.. . Maybe the framework is meant to work this way maybe it s not . I don t know this I didn t write it I am just asking if it can work the way I think it should . I am sorry I am just curious . edit : I am also very interested in other solutions : .. . Answer : Try using spark-view-engine http : www.sparkviewengine.com . It is easy to use nicer than standard engine and doesn t require to fake context . You can also use function from this answer http : stackoverflow.com questions 483091 render-a-view-as-a-string 484932 484932 but it requires faking context . This is the way standard view engine works and you can do nothing about that . This is my extension class that is used to generate views to string . First is for standard view engine second for Spark : Comment : Hi LukLed I am familiar with the Spark View Engine and have considered this solution previously you might be right in that this would ultimately be the best way to go . Eventually I might be forced down this path . However I feel that adding a second view engine into my project is just adding code onto what should be a simple solution and in reality not really fixing the original problem but working around it . The other two methods you referenced are what I am trying to avoid . +1 but there just hast to be a better solution : Comment : There s a solution to this - use a workaround around web forms engine - a single view engine - Spark - Comment : The view engines job is to take in the view data and the view template whatever . Generate a string html xml etc representation of it and send it off back to the browser via POST . However those are two separate pieces . The rendering should have nothing to do with how the data gets transported.. . Comment : In case of Spark view engine you can render directly to your stream . In case of standard engine there is no other solution . Look at Reflector and you ll find that standard implementation was designed to output content directly to HttpContext.Current.Response . Although Render method of IView has 2 parameters ViewContext viewContext TextWriter writer second one is just ignored and instead HttpContext.Current.Response is used .", "Question : I created a simple ASP.NET MVC version 1.0 application . I have a ProductController which has one action Index . In the view I created a corresponding Index.aspx under Product subfolder . Then I referenced the Spark dll and created Index.spark under the same Product view folder . The Application Start looks like .. . .. . My expectation is that since the Spark engine registers before default WebFormViewEngine when browse the Index action in Product controller the Spark engine should be used and WebFormViewEngine should be used for all other urls . However the test shows that the Index action for Product controller also uses the WebFormViewEngine . If I comment out the registration of WebFormViewEnginer the last line in the code I can see that the Index action is rendered by Spark engine and the rest urls generates an error since the defualt engine is gone it proves that all my Spark code is correct . Now my question is how the view engine is resolved Why the registration sequence does not take effect .. . Answer : The order in which you register the view engines doesn t matter much . Rather view engines take a set of ViewLocationFormats and if a particular view path fits the formatted name that engine will be used . Only if you have conflicting formats does the registration order matter . In the case of spark views should have the .spark extension . WebFormViewEngine will respond to any with .aspx or .ascx extensions . And of course as mentioned above you can override any of this by changing the ViewLocationFormats supplied to the individual view engines . .. . .. . Updated : .. . .. . I took a look through the source of both SparkViewFactory and WebFormViewEngine or more specifically VirtualPathProviderViewEngine which the latter derives from and I can tell you why you re seeing this strange behaviour . First of all the Find method in the ViewEngineCollection class works like this simplified : .. . .. . In other words it will always try to find a cached view in any engine before resorting to uncached mode . The way in which individual view engines implement this is the second overload of the FindView method which takes a bool argument named useCache . However and here s where it all gets weird - the VirtualPathProviderViewEngine and SparkViewEngine have very different ideas of what the useCache argument means . There s too much code to repost here but the basic idea is : .. . .. . The SparkViewFactory will look only in the cache if useCache is true . If it doesn t find anything it automatically returns a cache miss result - i.e . nothing . On the other hand if useCache is false it will not look in the cache at all it will skip the cache-checking step and go through the normal motions to resolve and create an actual view . The VirtualPathProviderViewEngine on the other hand looks in the cache if useCache is true and if it doesn t find the view in the cache it goes off and creates a new one and adds that to the cache . .. . .. . Both of these approaches work with respect to the way ViewEngineCollection performs its search . In the case of spark it misses on the first iteration of view engines but hits on the second and after that the view is added to the cache . No problem . In the case of VirtualPathProviderViewEngine it misses internally but returns a hit anyway on the first iteration at which point the view is now cached . So you should be able to see where the problem is here . The VirtualPathProviderViewEngine only appears to be taking precedence over the SparkViewEngine because the former always succeeds on the first cached iteration but Spark only succeeds on the second uncached iteration . In plain English Spark really does get asked first but replies : No I don t have that view yet . Try it without the cache instead . WebForms gets asked second but automatically says I didn t have that view but I went and made one for you anyway here it is . . And from that point on the WebFormViewEngine always gets priority because it has the view cached and Spark doesn t . .. . .. . Summary : Spark is getting priority but due to a quirk in the way Spark treats the useCache argument it s getting left in the dust when the Web Form engine is active at the same time . Either WebForm is over-eager or Spark is lazy depending on your perspective . Simply put the solution is not to have conflicting views If you ve registered multiple view engines then you should be treating any view name which can be handled by either both of them as undefined behaviour . Comment : To summarize : Removing Index.aspx file will make Index.spark used . Comment : I still do not quite understand . The ViewLocationFormats is defined in VirtualPathProviderViewEngine it is an internal implementation specific to a view engine . If the ASP.NET MVC has multiple view engines registered it will query one by one to see whether a view engine can handle the request . The first view engine answers yes process the request . In my case both Spark and WebFormViewEngine can handle the request since Index.aspx and Index.spark are there . So why does WebForViewEngine alwasy take precedence Comment : @intangible02 : Tested and verified I dug through the source and now have an explanation for that take a look . Comment : @Aaronaught : fantastic answer Just hope the view engines will standardize the behavior in the future . Comment : @Aaronaught Your conclusions about the behavior of useCache and WebFormViewEngine are incorrect . Sorry for the additional answer but can t include code and not enough chars length for response in comment . I ll update answer to clarify .", "Question : I m using the spark-view-engine with my asp.net-mvc application . In my aspx pages I can succesfully use Html.Actionlink but when I attempt it in spark files it doesnt show up in intellisense and when i try to run it anyway i get : .. . .. . Dynamic view compilation failed . c : Users midas Documents Visual Studio 2008 Projects ChurchMVC ChurchMVC Views Home Index.spark 73 25 : error CS1061 : System.Web.Mvc.HtmlHelper does not contain a definition for ActionLink and no extension method ActionLink accepting a first argument of type System.Web.Mvc.HtmlHelper could be found are you missing a using directive or an assembly reference I do have system.web.mvc referenced and I have added in global.spark . None of that helps . Any ideas .. . Answer : Copied from Rei Rold n s answer in Spark discussion group http : groups.google.com group spark-dev browse 5Fthread thread 5276b265a3880aeb .. . .. . This is where the helpers live .", "Question : I am working with an ASP.NET MVC project which was originally started from the CodeBetter.Canvas http : codebetter.com blogs karlseguin archive 2009 04 28 presenting-codebetter-canvas.aspx project - and I m trying to move to ASP.NET MVC 2 . I successfully upgraded my project using Eilon s upgrade tool http : weblogs.asp.net leftslipper archive 2009 10 19 migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx moved to VS2010 although not yet to .NET 4 . The issue I m having currently is only occurring when using the spark-view-engine . Here is the relevant bit of code in my View.spark strongly typed : .. . .. . The same bit of code works just fine if I use an .aspx view : .. . .. . The major point here being EditorFor is new in ASP.NET MVC 2 and in my project I can use that helper in an ASPX view but not a Spark view . I ve tried upgrading Spark to use MVC 2 http : stackoverflow.com questions 1261576 asp-net-mvc-2-0-prev-1-and-spark 1264289 1264289 as well as MvcContrib and Ninject thinking maybe it was one of those that was freaking out - but so far no luck - I m still seeing the same behavior . Here is the full error message that is thrown from within Spark s BatchCompiler class . Dynamic view compilation failed . 0 0 : warning CS1701 : Assuming assembly reference System.Web.Mvc Version 1.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 matches System.Web.Mvc Version 2.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 you may need to supply runtime policy c : inetpub wwwroot myproject CodeBetter.Canvas.Web Views MyEntity View.spark 9 16 : error CS1061 : System.Web.Mvc.HtmlHelper does not contain a definition for EditorFor and no extension method EditorFor accepting a first argument of type System.Web.Mvc.HtmlHelper could be found are you missing a using directive or an assembly reference Here is the Spark related code in my Global.asax : .. . .. . Also I am referencing System.Web.Mvc.Html in my spark view as mentioned in another SO answer http : stackoverflow.com questions 1081650 cannot-use-html-actionlink-in-asp-net-mvc-spark-files . Comment : I think the real problem here was that I had mistakenly thought that the version of MVCContrib I was using was using the 2.0.0 version of system.web.mvc.dll - it wasn t Crap After updating that spark and ninject - it works .. . Answer : When you downloaded newest Spark sources did you rebuild it using MVC 2 assemblies Did you replace references in Spark project Comment : Yes - I ve re-worded the sentence in my question that said upgraded to the latest version of Spark to Upgraded Spark to use MVC 2 to clarify what I meant there . I have recompiled the Spark source with MVC 2 references and incorporated the resultant assemblies into my MVC project and updated its references . No change in error message . I ve also looked at the assemblies being used in my project in Reflector to verify that they are referencing System.Web.Mvc version 2.0.0.0 . Comment : Did you pass model to view did you define viewdata model Comment : Here is the full content of my view : viewdata model Entity use namespace System.Web.Mvc.Html h2 Entity h2 h3 Name h3 h4 Model.Name h4 Html.EditorFor e e a href Url.Action EntityController c c.Index null Back a Comment : and to clarify - I have a view.aspx and a view.spark - to test one or the other I just rename the one I don t want to use to something else . ASPX works Spark does not - so this would seem to be a valid test to ensure that everything involved is working properly until I use the spark view instead of the aspx view . Thanks for your help and thoughts btw . It s much appreciated - I ve been stumped on this for awhile now . Comment : I am having trouble building new version of Spark . What type is HtmlHelper in Spark view Is it HtmlHelper ot HtmlHelper TModel", "Question : I ve added some of my own helpers to the System.Web.Mvc within my project and got it working with the default asp.net-mvc view engine . By defining the helper like .. . .. . I called it using Html.h h1 some string h1 .. . .. . Now that I am using the spark-view-engine I cannot seem to get this to work . I receive the following error : .. . .. . System.Web.Mvc.HtmlHelper does not contain a definition for h and no extension method h accepting a first argument of type System.Web.Mvc.HtmlHelper could be found are you missing a using directive or an assembly reference How can I get Spark to see the additional helpers EDIT : I ve also added global.spark with using namespace myApp to no avail .. . Answer : Make sure that System.Web.Mvc.HtmlHelper is registered in your web.config within the spark config section . Comment : Received error HtmlHelper is a type not a namespace", "Question : How to use certain view engine for certain controller Now my project using MVC2 + Spark view engine . I want to migrate to Razor view engine . Project so big and I want to do this step-by-step . Comment : I would recommend branching your code and migrating all your views in one go . I personally would never try to support multiple rendering engines in a single instance of a production app Comment : I m do not see any problem . New functional implements using Razor and old rewriting step by step . .. . Answer : It s perfectly possible to run both view engines simultaneously . Since you re currently using Spark you probably have an entry in your global.asax that clears the current view engines and adds in the Spark engine . Something like : .. . .. . MVC is designed to use FindView and FindPartial part of the ViewEngine interface to find the correct view for an action and if it can t find one for the first view engine in the list it moves on to the next viewengine and looks for its appropriate views until there aren t any other view engines to try . It s up to you whether it looks for Razor Views first and then falls back to Spark or the other way round so make sure you place the ViewEngines in the correct order . Or to have the default engines you can delete the ViewEngines.EnginesClear line and make Spark first by using ViewEngines.Engines.Insert 0 .. . .. . .. . If that s not clear then paste in the global.asax code around the Spark bit and I can try to help you more .", "Question : Some body tried Spark View Engine http : dev.dejardin.org with asp.net-mvc-2 preview 2 I have a problem with AREAS . It looks likes spark engine looks .spark files inside of Views folders only instead of Areas folder in additionally . My question is : .. . .. . Somebody has information how to add it .. . Answer : Spark will not automatically check the area views location in the current version . If you re willing to change the source which i assume you are if you re doing mvc 2 stuff here s the fix : .. . .. . You have to modify the file src Spark.Web.Mvc2 Descriptors AreaDescriptorFilter.cs so that it reads as below changes highlighted by : .. . .. . Note : I don t have the machine i did this on with me so the slashes in the format string MIGHT need to be forward slashes . Also it is possible to create this class in your own code and pass it in when you register the view engine but I don t remember the configuraiton code off the top of my head . That s the approach I did since I wanted to modify the spark source as little as possible . Comment : in MVC2 moved area to DataTokens it mean that u must change this row : context.RouteData.Values.TryGetValue area out value to this : context.RouteData.DataTokens.TryGetValue area out value Comment : I m looking at the code right now . The code above is working for me right now running on asp.net-mvc-2 beta the latest release as of today .", "Question : I want to use the htmlHelpers in my spark view but I keep getting the following errors . error CS0234 : The type or namespace name Mvc does not exist in the namespace System.Web are you missing an assembly reference I have added the System.Web.Mvc assembly into the project . I have also added the following code into the module just for the sake of getting it working - I ll probably need to add this code to the bootstrapper --- not sure how to do that yet I also tried adding the namespace to a global.spark file .. . .. . Can someone tell me exactly what I must do to use the htmlHelpers in my spark view please . .. . Answer : The default Spark base view for Nancy doesn t include the public HtmlHelper Html get set property . You can see the default view here https : github.com NancyFx Nancy blob master src Nancy.ViewEngines.Spark NancySparkView.cs . The Spark view implemented for MVC integration is here https : github.com SparkViewEngine spark blob master src Spark.Web.Mvc SparkView.cs and you ll see the Html property exposed which allows your Spark view to access it and invoke helpers . In theory you can inherit from NancySparkView and specify that as your base view in your Spark settings and add that property along with references to System.Web.Mvc etc in that class and your views should then be able to call into the helpers assuming everything is referenced correctly . Hope that helps .. . Rob G" ] }
[ "yes-answer-long", "yes-answer-short" ]
fubumvc
UNK_RELATION
netbeans-7.1@netbeans@39
netbeans-7 .1 -- a specific version of @placeholder ide .
{ "confidence": [ 38.4110221862793, 38.4110221862793, 37.31704330444336, 36.8706169128418, 35.24737548828125, 32.63072967529297, 31.812339782714844, 31.032421112060547, 30.051807403564453, 29.920639038085938, 29.398792266845703, 28.87591552734375, 28.64497947692871, 28.644813537597656, 28.56749725341797, 28.551528930664062, 27.79763412475586, 27.719135284423828, 27.719135284423828, 27.719135284423828, 27.473384857177734, 27.412731170654297, 26.668704986572266, 26.47946548461914, 26.46236801147461, 26.46236801147461, 26.38335418701172, 26.38335418701172, 26.298912048339844, 25.963653564453125, 25.88101577758789, 25.741920471191406, 25.71601104736328, 25.10025405883789, 25.10025405883789, 25.10025405883789, 25.10025405883789, 25.031652450561523, 25.026538848876953, 25.026538848876953, 24.99917221069336, 24.861209869384766, 24.6983642578125, 24.608369827270508, 24.485538482666016, 24.32217788696289, 24.279857635498047, 24.042667388916016, 24.042667388916016, 24.042667388916016, 24.042667388916016, 24.042667388916016, 24.042667388916016, 24.042667388916016, 24.042667388916016, 23.892539978027344, 23.718360900878906, 23.601383209228516, 23.499095916748047, 23.499095916748047, 23.46050453186035, 23.00720977783203, 22.959272384643555, 22.942176818847656, 22.942176818847656, 22.863162994384766, 22.863162994384766, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.618104934692383, 22.441509246826172, 22.441509246826172, 22.441509246826172, 22.441509246826172, 22.441509246826172, 22.40154266357422, 22.360824584960938, 22.360824584960938, 22.360824584960938, 22.22647476196289, 22.215076446533203, 22.142528533935547, 22.044803619384766 ], "content": [ "Netbeans is a very nice PHP Ide that I use everyday .", "This is because Windows uses precompiled binaries to start the Netbeans IDE .", "I tried the solution here https : techknowhow.library.emory.edu blogs sturnbu 2011 05 12 netbeans-7-and-python-ide but this caused NetBeans not to start at all after the loading splash-screen is finished NetBeans crashes .", "I have installed netbeans ide 7.1 and wamp server 2.0 my question is how can i use netbeans ide for debuging and running php code .", "See IDE log org.jmgl.php.messdetecor.BatchInterface org.xml.sax.SAXParseException .. . .. . are above lines indicating me to correct my IDE configuration", "See IDE log org.jmgl.php.codesniffer.BatchInterface org.xml.sax.SAXParseException .. . .. . Configuration exception check settings", "If it does not work : .. . .. . Before I did reset the cached data i found this in NetBeans IDE-LOG : .. . .. . INFO org.jmgl.php.SettingsResolver : No own configuration found under X : xxx nbproject codesniffer.properties .", "In windows-7 you could find the file projectui.properties in C : Users username AppData Roaming NetBeans 7.2.1 config Preferences org netbeans modules .. . .. . I also has found this file for my previous installation NetBeans IDE 7.0 in such path C : Users username Documents .netbeans 7.0 config Preferences org netbeans modules But sure this file is not actual .", "I m working with netbeans 7.1.2 and tomcat 7 .", "What IDE do you using", "I am using Netbeans IDE 7.1 and I was trying to debug my simple program and on the Variable Output Window there is a message which states No variables to display because there is not current thread .", "I had to restart NetBeans .", "Netbeans 6.7 was the last version to support UML .", "Follow steps on this link http : hassoon3.wordpress.com 2011 12 18 developing-php-with-netbeans-7-0-1-and-wamp2-2-server .", "For the life of me I cannot find the menu option to restore the functions methods pane in the bottom left hand corner of the NetBeans IDE .", "You don t need an super-IDE for Javascript .", "I ve tried those solutions though but to no avail what they said should be in the IDE was not such as the Update Manager Does anyone know how to get NetBeans 7.1.1 to show UML diagrams of Java projects", "You can also try and see if you get the same issue if you use a different IDE such as Eclipse .", "I have been unable to find this or a similar file and haven t been able to do it from IDE itself either .", "I changed the function to this : .. . .. . After that modification start your IDE and everything should work fine .", "Maybe you can try to clear netbeans cache .. . .. . 1 . close NetBeans .. . 2 . delete cache folder home user .cache netbeans .. . 3 . open the project and wait for scanning project to finish", "The Solution for this problem could be found here .. . .. . http : sahanlm.blogspot.com 2012 12 netbeans-7-2-crash-on-start.html", "I couldn t compile project in netbeans-7.1 in Widows 7 the error is mkdir.exe stop working I find mkdir.exe in MinGW Msys 1.0 bin and run but didn t solve this problem .", "On a more personal note : From the phpunit support in the major IDEs Netbeans does quite a lot of things right and works well for a lot of people so don t let this bump discourage you from using it from the IDE if thats what you want .", "Launch Netbeans .. . 2 .", "I m using Netbeans 7.1 .", "I ve searched through google and most solutions are for netbeans 6.x and don t work for my version .", "Install the NetBeans 6.9 or older version you were using with no complaints just for Python work .", "Mac OS X path for NetBeans 8.1 : Users YourNameHere Library Application Support NetBeans 8.1 config Preferences org netbeans modules projectui.propertie s", "Currently your NetBeans Python choices are : .. . .. . Try the latest development build updates against your current NetBeans version and mess with breakage at times as noted on the PythonInstall http : wiki.netbeans.org PythonInstall NetBeans wiki page or the link you gave .", "I am using netbeans-7.1 .", "Netbeans already has the feature to create hello world and a sample application for you with no codding required .. . .. . 1 .", "a project.properties and a project.xml and much more : netbeans.org kb docs java project-setup.html ide-concepts https : netbeans.org kb docs java project-setup.html ide-concepts", "You might be having an issue with Netbeans itself .", "I developed an Enterprise application in Netbeans 7.1.2 .", "I know you like NetBeans but PYCHARM RULEZ", "Perfect used in MacOSX with netbeans 7.2.1 thanks", "I am facing some problem while using PHPMD CodeSniffer tolls with NetBeans 7.1 .", "the solution is right-click your package in netbeans go to properties source now go to the jre option and choose your version the programme will now run .", "We re moving our version-control from some old VCS to SVN for ease of integration with IDE s we re using both NetBeans and IBM RAD .", "At least you should have mentioned that you copied DKSan s answer from here so credit goes for him : stackoverflow.com questions 6944002 uml-plugin-for-netbeans-7-0 http : stackoverflow.com questions 6944002 uml-plugin-for-netbeans-7-0 8987726 8987726 .", "Is it a Maven project or a NetBeans project", "Netbeans", "Users YourNameHere can be shortened to So it s Library Application Support NetBeans 8.1 config Preferences org netbeans modules projectui.propertie s", "But sometimes when you change of netbeans version or tomcat version the configuration file get corrupted build-impl.xml .", "Edit : You can install the UML plugin http : stackoverflow.com questions 6944002 uml-plugin-for-netbeans-7-0 8987726 8987726 manually on 7.1 .", "Actually Netbeans supports this for php projects .", "In cmdline everything is OK : .. . .. . Called in NetBeans7.1 : .. . .. . I think this is a NetBeans issue .", "Did you point NetBeans to your bootstrap.php and or phpunit.xml files", "Plus Netbeans should give a warning about using spaces in project names .", "Basically netbeans seems to be running a much older build of my codes .", "I used to use my Netbeans 6.9 for Python development .", "Is there any way I can still code in Python with netbeans", "I am currently using the developer plugins on Netbeans 7.0.1 with no problem .", "I experienced the same when I tried to install it in Netbeans 7.0.1", "I write my first service in Netbeans 7.1.1 and can t deploy it on Tomcat 7 server .", "In Netbeans 7.1.1 .", "Now I m trying to run it in Netbeans 7.1 and I m getting the following for output from Netbeans .. . .. . I ve changed nothing from default in Netbeans when I get this error .", "Preferably this is what I would like Netbeans to do .", "NetBeans does not support what you want to do .", "I started a new Enterprise Application project in Netbeans 7.1.1 and then later deleted the 3 projects project project -war project -ejb from the projects window in the IDE by right clicking them and selecting Delete and also checking Delete all source files in folder on hard disk but it did not remove the projects from my Recent Projects in the Start Page .", "However fairly extensive searching has turned up results for NetBeans 6.5 and lower whereas I am using NetBeans 7.1.1 .", "For example when I type in ci control in the netbeans ide I get the code hint for CI Controller ci auto complete .php while it is pointing towards the correct file it fails to correctly auto complete and leaves me with CI Controller : : get instance after I click enter .", "In Netbeans go to the Files view .", "i use netbeans-7.1", "The project is migrated from an earlier version from Netbeans together with all my other projects .", "The problem is my own compiled version of gdb has no ability to stop on breakpoints in my libraries on NetBeans 7.2 and Eclipse Juno .", "The error message is really not helping you out there : .. . .. . The general suggestion would be to create a phpunit.xml and point Netbeans to it .", "To my knowledge Netbeans creates a main class with such a method automatically whenever you create a new project .", "Even if this doesn t solve your problem then delete the Netbeans cache by deleting the index folder", "If you are using Netbeans how about using one of the tutorials on their Mobility Trail http : netbeans.org kb trails mobility.html", "you can find everything you need at Netbeans PHP learning trail http : netbeans.org kb trails php.html .", "These solutions say to find the file . config Preferences org netbeans modules projectui.properties from the install folder and remove them there .", "You should be able to find this file in : .. . .. . Looks like NetBeans changed to save these preferences on a per-user basis .", "click here for more details http : netbeans-org.1045718.n5.nabble.com How-to-delete-a-project-td2857520.html .. . .. . Thanks", "I searched and it seems to be a bug with NetBeans but I can t find a way around this bug .", "Apparently falling back to Subversion 1.6 is the only way to go at least until NetBeans catches up with 1.7 .", "I am trying very hard to get phpunit working in netbeans with my symfony2 project .", "okey. . if the test suite does not find any tests netbeans takes up there default test suite it apears .", "This seemed to work added PHP comments : .. . .. . However in both cases Netbeans says : .. . .. . TODO : foo -- .. . .. . Is there some way to avoid the --", "Thanks .. . Niklas .. . .. . edit : I ve opened a thread in the netbeans forums http : forums.netbeans.org viewtopic.php p 134343 134343", "I m not currently using Netbeans but would it not be possible to split the comment over separate lines", "I moved to another computer downloaded the latest netbeans-7.1 and now I have no more python plugin .", "You can find whether this is also your problem by inspecting .netbeans var log messages .", "Add org.eclipse.osgi 3.7.1.R37x v20110808-1106.jar at C : Program Files NetBeans 7.1.1 platform lib locale .", "Start NetBeans remove the plugin or the reference with problem later on delete org.eclipse.osgi 3.7.1.R37x v20110808-1106.jar", "Wait for someone in the community to step up with continued development to keep the existing plugin in step with the latest public NetBeans release .", "I have been using Netbeans for several months now and like it a lot .", "I have tried adding a FTP folder in Windows but Netbeans won t open it .", "Yeah this was the route we were planning to go if Netbeans didn t have this feature .", "I have a Netbeans platform program that uses a custom DataEditorSupport and a custom ClonableEditor .", "This FAQ entry http : wiki.netbeans.org FaqI18nProjectEncoding in the NetBeans wiki might be of help .", "Select Default emulator and click on finish .. . 7 .", "I am using Netbeans 7.1 .", "I belive it s not NetBeans fault .", "A NetBeans project is a directory not a single file .", "Here are the version numbers for the software : .. . .. . XAMPP version 1.7.7 .. . PHP version 5.3.8 .. . xdebug version 2.1.1 .. . NetBeans version 7.1.1 .. . Apache version 2.2.21 .. . .. . And I have changed the following settings in my php.ini file : .. . .. . Anyone have a solution", "See also the General Queries API http : bits.netbeans.org dev javadoc org-netbeans-modules-queries index.html and in special the FileEncodingQuery http : bits.netbeans.org dev javadoc org-netbeans-modules-queries org netbeans api queries FileEncodingQuery.html .", "You can start by either checkin gout this http : stackoverflow.com questions 3537769 cant-find-main-class-in-netbeans-6-9 previous SO thread in which a similar I think issue is being discussed or else as a final resort you might want to remove Netbeans and all its files and install an earlier version .", "It looks like you installed your NetBeans with a 32-bit java.exe Edit your netbeans.conf in C : Program Files x86 NetBeans 7.1 etc or C : Program Files NetBeans 7.1 etc and make sure it says replace jdk1.7.0 03 with the version you actually intend on using : .. . .. . and not .. . .. . note that the x86 in Windows means 32-bit or just edit your project and pick a 64-bit JVM ." ] }
{ "confidence": [ 47.32447814941406, 45.68049240112305, 41.52516174316406, 40.92179870605469, 40.91592788696289, 40.65563201904297, 40.3824462890625, 39.730281829833984, 39.69248580932617, 39.50813293457031, 39.50284957885742, 38.86202621459961, 38.57807922363281, 38.42063903808594, 37.01862335205078, 35.598670959472656, 35.452857971191406, 33.947547912597656, 33.458438873291016, 33.32619857788086 ], "content": [ "Question : I have installed netbeans ide 7.1 and wamp server 2.0 my question is how can i use netbeans ide for debuging and running php code . what setting are required for this . Comment : you can find everything you need at Netbeans PHP learning trail http : netbeans.org kb trails php.html . If you have any specific questions I ll be happy to help . Netbeans is a very nice PHP Ide that I use everyday . If you are unfamiliar with building a LAMP stack on windows I would suggest you check out Zend Server CE http : www.zend.com en products server-ce as it will more completely setup the eviroment . Comment : Get your solution here stackoverflow.com questions 10596438 http : stackoverflow.com questions 10596438 how-to-use-netbeans-integration-with-wamp-2-2-21 Comment : How did this get 6K views in 3 min .. . Answer : Follow steps on this link http : hassoon3.wordpress.com 2011 12 18 developing-php-with-netbeans-7-0-1-and-wamp2-2-server . The author provides a simple step-by-step guide . Successfully followed guide using NetBeans 7.4 + WAMP v2.4 .. . .. . Note : Instead of clicking on the General tab within the Tools -- Options menu you will click on the Debugging tab to modify the port .", "Question : I started a new Enterprise Application project in Netbeans 7.1.1 and then later deleted the 3 projects project project -war project -ejb from the projects window in the IDE by right clicking them and selecting Delete and also checking Delete all source files in folder on hard disk but it did not remove the projects from my Recent Projects in the Start Page . I ve searched through google and most solutions are for netbeans 6.x and don t work for my version . These solutions say to find the file . config Preferences org netbeans modules projectui.properties from the install folder and remove them there . I have been unable to find this or a similar file and haven t been able to do it from IDE itself either . How can I remove these Recent Projects Does anyone know of a solution .. . Answer : In windows-7 you could find the file projectui.properties in C : Users username AppData Roaming NetBeans 7.2.1 config Preferences org netbeans modules .. . .. . I also has found this file for my previous installation NetBeans IDE 7.0 in such path C : Users username Documents .netbeans 7.0 config Preferences org netbeans modules But sure this file is not actual .", "Question : I used to use my Netbeans 6.9 for Python development . As well as Java and PHP . I had a cool debugger in PHP with xDebug good Python support . Have no complaints whatsoever . I moved to another computer downloaded the latest netbeans-7.1 and now I have no more python plugin . I tried the solution here https : techknowhow.library.emory.edu blogs sturnbu 2011 05 12 netbeans-7-and-python-ide but this caused NetBeans not to start at all after the loading splash-screen is finished NetBeans crashes . Is there any way I can still code in Python with netbeans Thank you in advance Comment : I know you like NetBeans but PYCHARM RULEZ .. . Answer : Ok I fixed this . Say you ve screwed up your netbeans installation by installing the pythonplugin then this might just work for you provided you re using a non-windows OS . This is because Windows uses precompiled binaries to start the Netbeans IDE . The problem that I solved is that by default a set of classes is not added to the Java classpath which results in a crash . You can find whether this is also your problem by inspecting .netbeans var log messages . If it displays some ClassNotFoundExceptions then we might have the same problem . If not then at least you ve got some pointers on what s going wrong and perhaps you might come up with some solution yourself . .. . .. . The java classpath is constructed in the file : .. . .. . On OSX this could be : .. . .. . In the main loop the function construct classpath is called which in turn calls the function build classpath for two directories . I changed the function to this : .. . .. . After that modification start your IDE and everything should work fine . Good luck Comment : Thanks this worked for me . I ve cleaned up the instructions in your answer . Comment : This worked perfectly for me as well thanks Comment : Perfect used in MacOSX with netbeans 7.2.1 thanks", "Question : I am facing some problem while using PHPMD CodeSniffer tolls with NetBeans 7.1 . After configuration when I run these tools on my code base I am getting some errors under Mess Detector and Code Sniffer that I completely don t understand . Configuration exception check settings See IDE log org.jmgl.php.codesniffer.BatchInterface org.xml.sax.SAXParseException .. . .. . Configuration exception check settings See IDE log org.jmgl.php.messdetecor.BatchInterface org.xml.sax.SAXParseException .. . .. . are above lines indicating me to correct my IDE configuration Please help Comment : This just started happening to me as well . Did you find an answer .. . Answer : Worked for me : .. . .. . Tools -- Options -- PHP -- phpCodeSniffer .. . .. . At the bottom there is a button reset cached data . Hit the button change your file save it everything should work now If it does not work : .. . .. . Before I did reset the cached data i found this in NetBeans IDE-LOG : .. . .. . INFO org.jmgl.php.SettingsResolver : No own configuration found under X : xxx nbproject codesniffer.properties . Those configuration-files are only loaded when there are some default values missing . So it might help to set some default-values sniffs tabsize in Tools -- Options -- PHP -- phpCodeSniffer .", "Question : I used to use my Netbeans 6.9 for Python development . As well as Java and PHP . I had a cool debugger in PHP with xDebug good Python support . Have no complaints whatsoever . I moved to another computer downloaded the latest netbeans-7.1 and now I have no more python plugin . I tried the solution here https : techknowhow.library.emory.edu blogs sturnbu 2011 05 12 netbeans-7-and-python-ide but this caused NetBeans not to start at all after the loading splash-screen is finished NetBeans crashes . Is there any way I can still code in Python with netbeans Thank you in advance Comment : I know you like NetBeans but PYCHARM RULEZ .. . Answer : I am currently using the developer plugins on Netbeans 7.0.1 with no problem . Maybe they simply aren t compatible with the new version yet . I d suggest just getting a 7.0 and using that . Comment : I experienced the same when I tried to install it in Netbeans 7.0.1", "Question : I used to use my Netbeans 6.9 for Python development . As well as Java and PHP . I had a cool debugger in PHP with xDebug good Python support . Have no complaints whatsoever . I moved to another computer downloaded the latest netbeans-7.1 and now I have no more python plugin . I tried the solution here https : techknowhow.library.emory.edu blogs sturnbu 2011 05 12 netbeans-7-and-python-ide but this caused NetBeans not to start at all after the loading splash-screen is finished NetBeans crashes . Is there any way I can still code in Python with netbeans Thank you in advance Comment : I know you like NetBeans but PYCHARM RULEZ .. . Answer : Add org.eclipse.osgi 3.7.1.R37x v20110808-1106.jar at C : Program Files NetBeans 7.1.1 platform lib locale . Start NetBeans remove the plugin or the reference with problem later on delete org.eclipse.osgi 3.7.1.R37x v20110808-1106.jar", "Question : I used to use my Netbeans 6.9 for Python development . As well as Java and PHP . I had a cool debugger in PHP with xDebug good Python support . Have no complaints whatsoever . I moved to another computer downloaded the latest netbeans-7.1 and now I have no more python plugin . I tried the solution here https : techknowhow.library.emory.edu blogs sturnbu 2011 05 12 netbeans-7-and-python-ide but this caused NetBeans not to start at all after the loading splash-screen is finished NetBeans crashes . Is there any way I can still code in Python with netbeans Thank you in advance Comment : I know you like NetBeans but PYCHARM RULEZ .. . Answer : Please see the following link . It works for me : .. . .. . http : wiki.netbeans.org PythonInstall", "Question : I used to use my Netbeans 6.9 for Python development . As well as Java and PHP . I had a cool debugger in PHP with xDebug good Python support . Have no complaints whatsoever . I moved to another computer downloaded the latest netbeans-7.1 and now I have no more python plugin . I tried the solution here https : techknowhow.library.emory.edu blogs sturnbu 2011 05 12 netbeans-7-and-python-ide but this caused NetBeans not to start at all after the loading splash-screen is finished NetBeans crashes . Is there any way I can still code in Python with netbeans Thank you in advance Comment : I know you like NetBeans but PYCHARM RULEZ .. . Answer : The Solution for this problem could be found here .. . .. . http : sahanlm.blogspot.com 2012 12 netbeans-7-2-crash-on-start.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 started a new Enterprise Application project in Netbeans 7.1.1 and then later deleted the 3 projects project project -war project -ejb from the projects window in the IDE by right clicking them and selecting Delete and also checking Delete all source files in folder on hard disk but it did not remove the projects from my Recent Projects in the Start Page . I ve searched through google and most solutions are for netbeans 6.x and don t work for my version . These solutions say to find the file . config Preferences org netbeans modules projectui.properties from the install folder and remove them there . I have been unable to find this or a similar file and haven t been able to do it from IDE itself either . How can I remove these Recent Projects Does anyone know of a solution .. . Answer : Right click on the project name to get the context menu . Select Close Project and that will remove it from the displayed list of projects . click here for more details http : netbeans-org.1045718.n5.nabble.com How-to-delete-a-project-td2857520.html .. . .. . Thanks", "Question : I used to use my Netbeans 6.9 for Python development . As well as Java and PHP . I had a cool debugger in PHP with xDebug good Python support . Have no complaints whatsoever . I moved to another computer downloaded the latest netbeans-7.1 and now I have no more python plugin . I tried the solution here https : techknowhow.library.emory.edu blogs sturnbu 2011 05 12 netbeans-7-and-python-ide but this caused NetBeans not to start at all after the loading splash-screen is finished NetBeans crashes . Is there any way I can still code in Python with netbeans Thank you in advance Comment : I know you like NetBeans but PYCHARM RULEZ .. . Answer : Currently your NetBeans Python choices are : .. . .. . Try the latest development build updates against your current NetBeans version and mess with breakage at times as noted on the PythonInstall http : wiki.netbeans.org PythonInstall NetBeans wiki page or the link you gave . Install the latest development version http : bits.netbeans.org download trunk nightly latest but realize it s not a stable public release . Wait for someone in the community to step up with continued development to keep the existing plugin in step with the latest public NetBeans release . Install the NetBeans 6.9 or older version you were using with no complaints just for Python work . I have had success with older versions and the development build . I am dabbling with other Python aware IDEs while I wait for main stream support but I ve stopped holding my breath .", "Question : I am facing some problem while using PHPMD CodeSniffer tolls with NetBeans 7.1 . After configuration when I run these tools on my code base I am getting some errors under Mess Detector and Code Sniffer that I completely don t understand . Configuration exception check settings See IDE log org.jmgl.php.codesniffer.BatchInterface org.xml.sax.SAXParseException .. . .. . Configuration exception check settings See IDE log org.jmgl.php.messdetecor.BatchInterface org.xml.sax.SAXParseException .. . .. . are above lines indicating me to correct my IDE configuration Please help Comment : This just started happening to me as well . Did you find an answer .. . Answer : I had the same problem . Make sure timezone is set correctly in php.ini If not XML will contain Warning from PHP which makes that XML invalid .", "Question : For the life of me I cannot find the menu option to restore the functions methods pane in the bottom left hand corner of the NetBeans IDE . I am using version 7.1 . I have clearly closed it by accident at one point . Comment : did you mean inspector Comment : @Sanjay No I believe it s called the Navigator - see apzentral.com wp-content uploads 2012 03 http : apzentral.com wp-content uploads 2012 03 ScreenHunter 13-2012-03-18.jpg Comment : press ctrl+7 or goto Windows navigating : .. . Answer : Here you go to enable the navigator in Netbeans 7.1 : .. . .. . Here you go : http : i.stack.imgur.com q9XQA.png", "Question : I started a new Enterprise Application project in Netbeans 7.1.1 and then later deleted the 3 projects project project -war project -ejb from the projects window in the IDE by right clicking them and selecting Delete and also checking Delete all source files in folder on hard disk but it did not remove the projects from my Recent Projects in the Start Page . I ve searched through google and most solutions are for netbeans 6.x and don t work for my version . These solutions say to find the file . config Preferences org netbeans modules projectui.properties from the install folder and remove them there . I have been unable to find this or a similar file and haven t been able to do it from IDE itself either . How can I remove these Recent Projects Does anyone know of a solution .. . Answer : You should be able to find this file in : .. . .. . Looks like NetBeans changed to save these preferences on a per-user basis . Comment : Thanks this worked for me . Do not forget to remove the lines corresponding to recent project url and recent project icons . Comment : Mac OS X path for NetBeans 8.1 : Users YourNameHere Library Application Support NetBeans 8.1 config Preferences org netbeans modules projectui.propertie s Comment : Users YourNameHere can be shortened to So it s Library Application Support NetBeans 8.1 config Preferences org netbeans modules projectui.propertie s", "Question : I used to use my Netbeans 6.9 for Python development . As well as Java and PHP . I had a cool debugger in PHP with xDebug good Python support . Have no complaints whatsoever . I moved to another computer downloaded the latest netbeans-7.1 and now I have no more python plugin . I tried the solution here https : techknowhow.library.emory.edu blogs sturnbu 2011 05 12 netbeans-7-and-python-ide but this caused NetBeans not to start at all after the loading splash-screen is finished NetBeans crashes . Is there any way I can still code in Python with netbeans Thank you in advance Comment : I know you like NetBeans but PYCHARM RULEZ .. . Answer : If you can t change nbexec like suggested by Bas Jacobs e.g . on Windows or don t want to do that you can use the --cp : p startup parameter to append the necessary JARs to the classpath . I only had to add the org.eclipse.osgi 3.7.1.R37x v20110808-1106.jar file so the complete command-line under windows now looks like this :", "Question : I want to install enable the NetBeans plugin for creating and viewing UML diagrams as seen here http : wiki.netbeans.org wiki images b b8 Vista Nimbus Uml Screenshot NBLookAndFeels.JPG . However fairly extensive searching has turned up results for NetBeans 6.5 and lower whereas I am using NetBeans 7.1.1 . I ve tried those solutions though but to no avail what they said should be in the IDE was not such as the Update Manager Does anyone know how to get NetBeans 7.1.1 to show UML diagrams of Java projects .. . Answer : Netbeans 6.7 was the last version to support UML . For 7.1 there s 1 a semi-broken workaround and 2 yWorks UML Doclet http : www.yworks.com en downloads.html yDoc which will let you generate diagrams . See this http : michelelepri.blogspot.com 2012 03 netbeans-70-and-71-uml-plugin.html for more details . Edit : You can install the UML plugin http : stackoverflow.com questions 6944002 uml-plugin-for-netbeans-7-0 8987726 8987726 manually on 7.1 . Comment : I followed the instructions therein to a T but when building the Javadoc I consistently get javadoc : error - Cannot find doclet class ydoc.doclets.YStandard . I confirmed that I m giving it the correct classpath and that the JAR is not corrupted Comment : What do you expect It s a workaround . Comment : @Supuhstar : I updated my post . Comment : that did it . Thanks . Comment : BIG thanks @blackcompe I spend my days looking for yWorks now I found it .", "Question : I want to install enable the NetBeans plugin for creating and viewing UML diagrams as seen here http : wiki.netbeans.org wiki images b b8 Vista Nimbus Uml Screenshot NBLookAndFeels.JPG . However fairly extensive searching has turned up results for NetBeans 6.5 and lower whereas I am using NetBeans 7.1.1 . I ve tried those solutions though but to no avail what they said should be in the IDE was not such as the Update Manager Does anyone know how to get NetBeans 7.1.1 to show UML diagrams of Java projects .. . Answer : How use Visual Paradigm Integrated with Net Beans .. . .. . http : www.visual-paradigm.com tutorials modelinginnetbeans.jsp", "Question : I want to install enable the NetBeans plugin for creating and viewing UML diagrams as seen here http : wiki.netbeans.org wiki images b b8 Vista Nimbus Uml Screenshot NBLookAndFeels.JPG . However fairly extensive searching has turned up results for NetBeans 6.5 and lower whereas I am using NetBeans 7.1.1 . I ve tried those solutions though but to no avail what they said should be in the IDE was not such as the Update Manager Does anyone know how to get NetBeans 7.1.1 to show UML diagrams of Java projects .. . Answer : Here is how to install on 7.1 .. . .. . Add a new configuration to update centers : Tools - Plugins - Settings - Add .. . .. . As the URL copy the following into the textbox : http : dlc.sun.com.edgesuite.net netbeans updates 6.9 uc m1 dev catalog.xml .. . .. . Now on the tab Available Plugins there should be UML in category UML . Install the plugin and its done. . Comment : At least you should have mentioned that you copied DKSan s answer from here so credit goes for him : stackoverflow.com questions 6944002 uml-plugin-for-netbeans-7-0 http : stackoverflow.com questions 6944002 uml-plugin-for-netbeans-7-0 8987726 8987726 . Comment : Well the package installed correctly in NetBeans 7.4 but when I make a reverse engineer project from a Java project the models are simply not imported . Seems like some error with generics : .java line 88 col 96 : unexpected token :", "Question : I am using Netbeans IDE 7.1 and I was trying to debug my simple program and on the Variable Output Window there is a message which states No variables to display because there is not current thread . What does it mean Thanks . : .. . .. . Here s my code : .. . .. . .. . Answer : So you can only see variables while code execution is suspended either through a breakpoint or through you pressing pause while debugging . Then you may also have to select the program s main thread from the list of threads on the left . At that point the variables should show up .", "Question : Error : Could not find or load main class jewelleryerpapplication.GUI.ERPMainMenu Java Result : 1 .. . .. . Actually i am using Net Beans 7.1 and in that i am continuosly getting the same error but un able to get the solution for that even after installing the latest update for that . The solution which i got from some body that create new project and copy the source and library foldes in that Project from the previous which generate the above error . this solution works for me but i need some simpler solution for this problem.Lot of thanks in advance . Don t Forget To Give UpVote It If It Helps . Comment : did you try clean and build Comment : yes i tired cleen and build many times even i close net beans and open it again and clean and build it but that didn t helped me . .. . Answer : I think that the following is happening : .. . .. . If this is a third party application you have not included some jar files on your class path .. . .. . Or which in my opinion is the most likely you do not have a method which has this signature : public static void main String args . This method defines the main entry-point for your application not having it might cause that error when you try and run the project . To my knowledge Netbeans creates a main class with such a method automatically whenever you create a new project . This might be the reason why you are not having this exception when you create a new Project and throw everything in it . You might be having an issue with Netbeans itself . You can start by either checkin gout this http : stackoverflow.com questions 3537769 cant-find-main-class-in-netbeans-6-9 previous SO thread in which a similar I think issue is being discussed or else as a final resort you might want to remove Netbeans and all its files and install an earlier version . You can also try and see if you get the same issue if you use a different IDE such as Eclipse . Comment : No this is not third party application and i am just creating a swing project using NetBeans and i create the application which has public static void main String args function even with the presence of main function i get this exception some time and unable to execute and most of time my application works fine . Comment : @Prog Anila : I have modified my answer . Hopefully what I said will solve your issue .", "Question : In cmdline everything is OK : .. . .. . Called in NetBeans7.1 : .. . .. . I think this is a NetBeans issue . If I run : .. . .. . It s OK . But if I give the test directory it fails . Any temporary solution Comment : Grrr. . line 118 in d : Program Files x86 NetBeans 7.1 php phpunit NetBeansSuite.php shows the solution return self : : rglob Tt est.php run.DIRECTORY SEPARATOR Test filename must be ended ...Test.php Comment : I ve personally found that the PHPUnit support in NetBeans is problematic at best and have ditched it in favor of running unit tests at the command-line instead . Comment : Did you point NetBeans to your bootstrap.php and or phpunit.xml files .. . Answer : When running PHPUnit against a single file it will always open the file and look for a test case inside of it . When running it against a directory what netbeans does it will only look into files that end in Test.php unless something else is specified in the phpunit.xml . If it can t find any Tests it will try to look into the TestSuiteName folder and TestSuiteName .php files hence the error message : .. . .. . Fatal error : Uncaught exception PHPUnit Framework Exception with message Could not find class .. . .. . as it is looking for a not named test suite in the netbeans phpunit harness . The error message is really not helping you out there : .. . .. . The general suggestion would be to create a phpunit.xml and point Netbeans to it . On a more personal note : From the phpunit support in the major IDEs Netbeans does quite a lot of things right and works well for a lot of people so don t let this bump discourage you from using it from the IDE if thats what you want ." ] }
[ "yes-answer-long", "yes-answer-short" ]
netbeans
UNK_RELATION
log4j2@s@218
log4j2 -- log4j 2 is an upgrade to log4j that provides significant improvements over its predecessor log4j 1.x and provides many of the improvements available in logback while fixing some inherent problems in logback @placeholder architecture .
{ "confidence": [ 75.71585845947266, 68.85031127929688, 68.03311157226562, 64.7939224243164, 62.24336242675781, 61.49673080444336, 61.105411529541016, 60.99518585205078, 59.741065979003906, 59.6219482421875, 58.760398864746094, 58.04060363769531, 57.76079177856445, 57.68450164794922, 57.42347717285156, 57.0194206237793, 57.0194206237793, 56.509246826171875, 56.05329513549805, 56.02720260620117, 55.9970588684082, 55.92362976074219, 55.20130157470703, 55.175716400146484, 54.85088348388672, 54.35908508300781, 54.35908508300781, 54.142154693603516, 53.821136474609375, 53.705360412597656, 53.46612548828125, 53.26272964477539, 53.15913772583008, 53.0334587097168, 53.0334587097168, 53.0334587097168, 52.95728302001953, 52.9422607421875, 52.74236297607422, 52.639617919921875, 52.561527252197266, 52.561527252197266, 52.55558395385742, 52.395774841308594, 52.20719528198242, 51.416751861572266, 51.37385940551758, 51.36363220214844, 51.244384765625, 51.181461334228516, 50.889434814453125, 50.84944152832031, 50.638916015625, 50.55210876464844, 50.32572555541992, 50.26435470581055, 50.22518539428711, 50.16716003417969, 50.16367721557617, 50.04689407348633, 50.0156135559082, 49.990238189697266, 49.990238189697266, 49.957908630371094, 49.88301467895508, 49.84814453125, 49.840999603271484, 49.67363357543945, 49.66983413696289, 49.63230895996094, 49.62565612792969, 49.52613067626953, 49.494529724121094, 49.26532745361328, 49.19833755493164, 49.12348937988281, 48.962284088134766, 48.884193420410156, 48.884193420410156, 48.783653259277344, 48.76265335083008, 48.73716354370117, 48.697322845458984, 48.650550842285156, 48.6172981262207, 48.43704605102539, 48.43704605102539, 48.33892059326172, 48.33892059326172, 48.05299758911133, 47.954742431640625, 47.90312576293945, 47.84101486206055, 47.827335357666016, 47.75045394897461, 47.68600082397461, 47.68600082397461, 47.63587188720703, 47.63587188720703, 47.630470275878906 ], "content": [ "Those are descibed only for log4j2 and not for log4j or logback .", "This is a Logback configuration but a the Log4j 2 equivalent will be very similar .", "I ve been comparing different logging tools : Log4J Logback and Log4J2 .", "Add the log4j 2 jars and the adapters for other logging APIs : .. . .. . 1 . log4j-api always .. . 2 . log4j-core always .. . 3 . log4j-1.2-api .. . 4 . log4j-jcl .. . 5 . log4j-slf4j-impl do NOT add log4j-to-slf4j .. . .. . Remove other logging implementations : .. . .. . 1 . log4j-1.2.x .. . 2 . logback-core- .. . 3 . logback-classic- .. . .. . Keep the facades : .. . .. . 1 . commons-logging- .. . 2 . slf4j-api-", "The Log4jServletContainerInitializer is for Log4j 1 not for log4j2 .", "org.apache.log4j.spi.LoggerFactory would be for Log4j 1.x not Log4j 2.x .", "You currently have two logger implementations configured : Log4j 2 and Logback .", "The dependency log4jdbc-log4j2 uses Log4j 2 API and I use spring-boot-starter with logback .", "I m using the log4j 1.x bridge provided by log4j 2 log4j-1.2-api-2.0-rc1.jar .", "I expected Log4j 2 to do better than Logback as claimed by the Log4j 2 website so I want to check if I am doing something wrong in using Log4j 2 .", "The Log4j 2 manual http : logging.apache.org log4j 2.x manual configuration.html is much better than the Log4j 1 documentation and shows many example configurations http : logging.apache.org log4j 2.x manual appenders.html .", "Recently I have experimented with Log4j 2 logging and tried to compare its performance with Logback on my local Mac machine .", "Your classpath should include : .. . .. . log4j-api-2.6.1.jar .. . log4j-core-2.6.1.jar .. . log4j-1.2-api-2.6.1.jar .. . log4j2.xml .. . .. . Your classpath should not include : .. . .. . log4j-1.2.x.jar .. . log4j.properties or log4j.xml these will be ignored by log4j2 anyway .. . .. . See also http : logging.apache.org log4j 2.x faq.html which jars", "If you want to do all your logging with Log4j2 then you need to add the Log4j SLF4J bridge and remove the Logback jars .", "Now the question is how to route calls from the Log4j 2 API to the Logback implementation ideally translating Log4j 2 Markers into SLF4J Markers", "Your configuration file is named log4j2.xml which is meant for log4j 2.x when you are using log4j 1.x .", "You are setting xml code is for Log4j 1.x org.apache.log4j.abcccc but you are using filename syntax log4j2.xml for Log4j version 2.x", "I ve migrated my application to log4j 2 and I ve configured it via log4j2.xml .. . .. . However some of the libraries I m using depend on log4j 1 .", "If you measure logging from multiple threads you ll find that Log4j 2 s fine-grained locking gives much higher throughput than Logback http : logging.apache.org log4j 2.x performance.html fileLoggingComparison .", "the logfile error.log is configured to use a FileAppender in log4j 1 and a RollingFileAppender in log4j 2 .", "You cannot mix log4j2 and log4j-1.x appenders .", "See http : logging.apache.org log4j 2.x log4j-slf4j-impl dependencies.html", "Here is the documentation of the string substitutor that log4j2 uses : https : logging.apache.org log4j log4j-2.2 log4j-core apidocs org apache logging log4j core lookup StrSubstitutor.html .. . .. . To use the same example :", "As of Log4j 2.4 API was added to log4j-core to facilitate programmatic configuration http : logging.apache.org log4j 2.x manual customconfig.html .", "I am facing below error on upgradation of log4j 1.x to log4j2 .", "For testing I have used direct Log4j 2 and Logback without using SLF4J .", "As you can see your test gives a slightly better score for Log4j 2 than Logback on my laptop .", "Check this Documentation link out : http : logging.apache.org log4j 2.x log4j-core apidocs index.html .. . .. . Sample tutorial : http : www.javabeat.net log4j-2-example", "slf4j-log4j12 use log4j 1.2 not log4j 2.X .", "The following APIs in the class org.apache.logging.log4j.core.config.Configurator https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html allow you to change Levels : .. . .. . setAllLevels String Level https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html setAllLevels java.lang.String 20org.apache.logging.log4j.Level .. . setLevel Map https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html setLevel java.util.Map .. . setLevel String Level https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html setLevel java.lang.String 20org.apache.logging.log4j.Level .. . setRootLevel Level https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html setRootLevel org.apache.logging.log4j.Level", "Note : The log4j2-test.json file is on the classpath . .. . .. . I m using apache-log4j-2.0-beta9 binary found here http : logging.apache.org log4j 2.x download.html .", "org.apache.log4j.Priority is a class in Log4j 1.x .", "Log4j 1 .", "Need help from migrating log4j to log4j2 .", "This works quite differently in log4j2 than in log4j-1.2 .", "Are you aware that log4j2 includes a bridge for log4j-1.2", "We use log4j 1.2.x for logging in our product and are looking to migrate to log4j 2.x in near future .", "logging.apache.org log4j 2.x manual https : logging.apache.org log4j 2.x manual appenders.html SyslogAppender", "You ll notice Logger https : logging.apache.org log4j 2.x log4j-api apidocs org apache logging log4j Logger.html no longer declares such a method .", "I m trying to configure and set up Log4j2 only through using ConfigurationFactory http : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config ConfigurationFactory.html and this http : logging.apache.org log4j 2.x manual extending.html reference .", "See the Lookups https : logging.apache.org log4j 2.x manual lookups.html section of the Log4j 2 manual .", "See the docs for the exact order in which Log4j 2 initializes https : logging.apache.org log4j 2.x manual configuration.html .", "I have tried disabling the default GC logging that comes with Log4j 2 using the params : .. . .. . but I still didn t see any improvement over logback .", "in Maven : .. . .. . To use Log4j 2 simply depend on spring-boot-starter-log4j2 rather than spring-boot-starter-log4j .", "log4j-api-2.xx.jar and log4j-core-2.xx.jar", "I migrated a few days ago from Log4J 1.2 to Log4J 2 and in general I m very happy with Log4J 2 .", "Log4j2 provides a FailoverAppender http : logging.apache.org log4j 2.x manual appenders.html FailoverAppender that will invoke the secondary appender if the primary appender fails .", "To have log4j2 work with commons logging you need the commons logging bridge http : logging.apache.org log4j 2.x log4j-jcl .", "Is there any way to specify Log4J 2.x log4j2.xml file location manually like DOMConfigurator in Log4J 1.x without messing with classpath and system-properties", "Log4j 2 has a configuration attribute for that .. . .. . log4j2.xml : .. . .. . log4j 2 will automatically re-read whole configuration every monitorInterval seconds", "Perhaps all you need to do is add the Log4j to SLF4J adapter http : logging.apache.org log4j 2.x log4j-to-slf4j index.html log4j-to-slf4j-2.x.jar .", "It looks like you will need slf4j-api-1.7.2.jar http : www.slf4j.org download.html log4j-to-slf4j-2.0-beta4.jar http : logging.apache.org log4j 2.x log4j-to-slf4j project-summary.html log4j-2.0-beta4.jar http : logging.apache.org log4j 2.x log4j-to-slf4j project-summary.html and log4j-core-2.0-beta4.jar http : logging.apache.org log4j 2.x log4j-core project-summary.html along with any dependencies .", "Log4j 1.2 became End of Life http : blogs.apache.org foundation entry apache logging services project announces in 2015 and users are recommended to upgrade to Log4j 2 .", "It provides a sample log4j.properties file that configures Log4j to match Tomcat s internal logging .", "The log4j2 https : logging.apache.org log4j 2.x manual customconfig.html page shows a few examples on how to add appenders .", "I downloaded log4j2-core-sources.jar and traced the source https : svn.apache.org repos asf logging log4j log4j2 trunk log4j-core src main java org apache logging log4j core pattern AnsiEscape.java .", "And logging.apache.org log4j 2.x manual migration.html http : logging.apache.org log4j 2.x manual migration.html might be useful to read too .", "Spring s listener is for Log4j 1 there s no Spring s equivalent for Log4j 2 which however carries its own .", "Reference : .. . .. . Configuring Log4j 2 : Status Messages http : logging.apache.org log4j 2.x manual configuration.html StatusMessages", "In the documentation of log4j 2 : http : logging.apache.org log4j 2.x manual configuration.html AutomaticConfiguration .. . .. . If a JSON file cannot be located the XML ConfigurationFactory will try to locate log4j2.xml on the classpath .", "The Log4j 2 manual has-many example configurations .", "log4j-1.2-api is an adapter module that ensures your application s calls to the Log4j 1.2 API are delegated to the Log4j 2 implementation .", "Use the log4j-1.2-api adapter to route calls that use the Log4j 1.2 API to the Log4j 2 implementation .", "The same for log4j.xml log4j 2 reads log4j2.xml if I m not mistaken .", "As explained here http : logging.apache.org log4j 2.x manual configuration.html it may be named log4j2.yaml log4j2.json or log4j2.xml depending on used format .", "Finally the configuration you showed seems to be for Log4j 1.2 and will not work with Log4j 2 .", "See also http : logging.apache.org log4j 2.x manual lookups.html", "Looking at the code log4j-to-slf4j does try to convert the Markers : logging.apache.org log4j 2.x log4j-to-slf4j xref org apache http : logging.apache.org log4j 2.x log4j-to-slf4j xref org apache logging slf4j SLF4JLogger.html L92", "Log4j 2 automatically figures it out .", "Put the following jars in CATALINA HOME lib .. . log4j 2 core log4j-core-2.4.1.jar .. . log4j 2 api log4j-api-2.4.1.jar .. . log4j 2 bridge for log4 j 1.0 log4j-1.2-api-2.4.1.jar .. . tomcat-juli-adapters.jar from tomcat extras .. . 2 .", "http : logging.apache.org log4j log4j-2.1 log4j-jcl index.html", "You can use it by removing the old log4j-1.2.17.jar and include these three jars : .. . .. . log4j-api-2.x.jar .. . log4j-core-2.x.jar .. . log4j-1.2-api-2.x.jar .. . .. . This will result in all calls that your application makes to the log4-1.2 API to be routed to the log4j2 implementation .", "I would recommend using the log4j-1.2 adapter that is included in the log4j2 distribution .", "The solution to this problem is to upgrade to Log4j 2.2 which contains the fix to LOG4J2-903 https : issues.apache.org jira browse LOG4J2-903 .", "I added the log4j-jcl jar a s suggested in jcl-bridge http : logging.apache.org log4j 2.x log4j-jcl index.html and got the following execption :", "That gives the following dependencies : .. . .. . log4j-api-2.6.1.jar .. . log4j-core-2.6.1.jar .. . log4j-slf4j-impl-2.6.1.jar routes SLF4J API calls to Log4j 2 .. . log4j-jcl-2.6.1.jar routes Commons Logging API calls to Log4j 2 .. . log4j-jul-2.6.1.jar also set system property java.util.logging.manager to org.apache.logging.log4j.jul.LogManager .. . slf4j-api-1.7.16.jar .. . .. . You don t need : .. . .. . About configuration by default Log4j2 looks for a file called log4j2.xml in the classpath but you can also specify the location http : logging.apache.org log4j 2.x faq.html config location with a system property .", "You only need log4j-api and log4j-to-slf4j", "http : logging.apache.org log4j 2.x manual configuration.html XInclude .. . .. . How to do XInclude of multiple log4j2.xml files", "I recommend you take a look at Log4j2 Markers http : logging.apache.org log4j 2.x manual markers.html .", "The groupId should be org.apache.logging.log4j and the version 2.0.1 as described here : logging.apache.org log4j 2.x maven-artifacts.html http : logging.apache.org log4j 2.x maven-artifacts.html", "Your test shows that the synchronous logging throughput of the Console appender from a single thread is slightly better in Log4j 2 than in Logback .", "see http : logging.apache.org log4j 2.x manual layouts.html .. . .. . and http : www.tutorialspoint.com log4j log4j htmllayout.htm", "Likely your only chance of using log4j2 with tomcat will be to use the log4j 1.x bridge .", "I tried log4j and logback as descibed https : logentries.com doc java from a general Eclipse project and they both worked .", "library .. . log4j-api log4j2 .. . log4j-core log4j2 .. . log4j-web auto-wiring for web-applications .. . .. . My web.xml has : .. . .. . My tomcat conf log4j2.xml is : .. . .. . I have upgraded code under my control com.mycompany.mycode to log4j2 APIs and they work log flawlessly .", "The Log4j 2 performance page http : logging.apache.org log4j 2.x performance.html points to the JMH benchmarks used to produce the results on the page .", "Otherwise I d strongly recommend using Log4j 2 s Async Loggers http : logging.apache.org log4j 2.x manual async.html .", "You can raise this as a feature request on the log4j issue tracker https : issues.apache.org jira browse LOG4J2 or log4j-user mailing list .", "This question is the same question as this question But for log4j2 : log4j : abbreviate shorten package names http : stackoverflow.com questions 7891910 log4j-abbreviate-shorten-package-names", "You might try including the log4j-1.2-api jar from Log4j2 .", "If you want to write a custom filter your best bet is to extend AbstractFilter https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core filter AbstractFilter.html .", "With Log4j this was no problem .", "Plus if you decide for some reason that you want to switch to logback or Log4J 1.2 or whatever instead of Log4J 2.0 you can just switch out the jars on the backend .", "Found a manual logging.apache.org log4j 2.x manual layouts.html https : logging.apache.org log4j 2.x manual layouts.html search for highlight pattern style", "If you re using older Servlet specification details how to enable proper cleaning for log4j2 are available here : https : logging.apache.org log4j 2.x manual webapp.html", "Here s http : logging.apache.org log4j 2.x changelog.html the change log .", "More info : http : logging.apache.org log4j 2.x manual jmx.html", "org.apache.logging.log4j.Logger https : logging.apache.org log4j 2.0 log4j-api apidocs org apache logging log4j Logger.html has no getContext method .", "I am using log4j-1.2-api-2.3.jar and log4j-api-2.3.jar and log4j-core-2.3.jar .", "The documentation http : logging.apache.org log4j 2.x manual configuration.html for log4j2 configuration provides a nice sample XML document equivalent to the default configuration : .. . .. . What would the equivalent file look like as valid YAML" ] }
{ "confidence": [ 103.4588851928711, 102.30948638916016, 97.31402587890625, 94.39262390136719, 92.5039291381836, 85.14043426513672, 84.92756652832031, 83.98897552490234, 80.93746185302734, 80.67012786865234, 77.84165954589844, 76.50245666503906, 76.1452865600586, 74.19483947753906, 72.9343032836914, 71.71128845214844, 71.49427795410156, 71.44084167480469, 70.62628173828125, 70.61444091796875 ], "content": [ "Question : Recently I have experimented with Log4j 2 logging and tried to compare its performance with Logback on my local Mac machine . Surprisingly I see Logback performs better in my test cases . I expected Log4j 2 to do better than Logback as claimed by the Log4j 2 website so I want to check if I am doing something wrong in using Log4j 2 . For testing I have used direct Log4j 2 and Logback without using SLF4J . Also the ConsoleAppender was used for both logging frameworks and the pattern I tested is : .. . .. . The logging test code is : .. . .. . I ran the test 10 times for each logging separately and tried to take the average time taken to process . Unexpectedly logback performed better in each run . I have tried disabling the default GC logging that comes with Log4j 2 using the params : .. . .. . but I still didn t see any improvement over logback . Could anyone confirm whether I am doing is correct or not log4j 2 config : .. . .. . Logback config : Comment : In any case you can do Task.Run logger.info Order successfully processed ABC123 which will run it in another thread so you won t get blocked . Only problem that might occur is fire-and-forget mentality that is if it fails you re not gonna know it . Comment : Hi Stan thanks but this doesnt make any difference to their performance and both frameworks will be benefited by this I am trying to see if i did something wrong in configuring log4j 2 from my end Comment : Please also show your Log4j2 configuration and Logback configuration so people can reproduce your test . Comment : Hi @RemkoPopma configs added .. . Answer : When creating tests like this you really should be using JMH . I would suggest that you look at the tests in the log4j-perf module for examples on how to do this . Also you are only testing a single thread . Many of the issues with logback only show up in multi-threaded cases . You can see this in some of the graphs at http : logging.apache.org log4j 2.x performance.html . Note that all the data in those graphs came from tests in the log4j-perf module that you can run yourself . Also unless you are going to actually log to the console I wouldn t use that in a test since it is the slowest place to log although the next release of log4j will have some improvements to that . Finally if you have questions about our tests please feel free to ask on one of the log4j mailing lists . Remko has been working with some experts in performance-testing and can provide you with good pointers on how to create good meaningful tests . Comment : Hi @rgoers Thanks for your reply", "Question : I d like to use log4jdbc-log4j2 https : code.google.com archive p log4jdbc-log4j2 to log JDBC calls . The documentation providers information how to use it with Log4j2 markers . Is there any way how to rewrite the above code to work with Logback .. . .. . UPDATE : I already tried to put a TurboFilter outside the logger directly inside the configuration element . It however doesn t change the log output . .. . Answer : I believe what you are looking for is called TurboFilters in Logback . See http : logback.qos.ch manual filters.html .. . .. . Update : if I understand your question correctly you have an application that uses the Log4j 2 API or one of its dependencies does . You want to use Logback as the logger implementation . Now the question is how to route calls from the Log4j 2 API to the Logback implementation ideally translating Log4j 2 Markers into SLF4J Markers Perhaps all you need to do is add the Log4j to SLF4J adapter http : logging.apache.org log4j 2.x log4j-to-slf4j index.html log4j-to-slf4j-2.x.jar . Be careful : .. . .. . Use of the SLF4J adapter log4j-to-slf4j-2.x.jar together with the SLF4J bridge log4j-slf4j-impl-2.x.jar should never be attempted as it will cause events to endlessly be routed between SLF4J and Log4j 2 . Comment : Thanks for prompt answer . I already tried it before posting my question and it didn t work for me . I ve updated my question . I m not sure if I can simply use the log4j2 marker name that the library uses . Comment : Your understanding is correct . The dependency log4jdbc-log4j2 uses Log4j 2 API and I use spring-boot-starter with logback . I tried to add dependency to org.apache.logging.log4j : log4j-to-slf4j : 2.5 but it doesn t filter anything I still see all the messages in console . Comment : That s strange . Looking at the code log4j-to-slf4j does try to convert the Markers : logging.apache.org log4j 2.x log4j-to-slf4j xref org apache http : logging.apache.org log4j 2.x log4j-to-slf4j xref org apache logging slf4j SLF4JLogger.html L92 Comment : Perhaps you still see log4j2 output in the console because the log4j2 implementation jar log4j-core is still in the classpath You only need log4j-api and log4j-to-slf4j Comment : I don t have log4j-core among dependencies . I have logback-core and logback-classic . Spring Boot adds org.slf4j : log4j-over-slf4j : 1.7.16 which redirects log4j calls to slf4j . I also added org.slf4j : log4j-over-slf4j : 2.5 as you suggested . In additional to that I also see following dependencies org.apache.logging.log4j : log4j-api : 2.4.1 org.slf4j : jcl-over-slf4j : 1.7.16 org.slf4j : jul-to-slf4j : 1.7.16 org.slf4j : slf4j-api : 1.7.16 .", "Question : I am using log4j2 in my project with -Dlog4j.configurationFile src main resources log4j2.xml . My application loggers write logs in the format specified by the configuration file . I have other dependencies sparkjava hazelcast mongodb sql2o etc. . that also write logs but in different format . I would like those loggers to use my log4j configuration file . How can I do it EDIT : .. . .. . My log4j2.xml looks like this : .. . .. . As I understand it every log message should be relate to the root logger and thus be formatted according to my log4j2.xml configuration file . Comment : can you give us your log4j2.xml log4j2 support APIs : SLF4J Commons Logging Log4j-1.x and java.util.logging . So this logs are collected by log4j2 . You say different format but in the same appenders than log4j2 Comment : @Mr Thorynque I added the file .. . Answer : Add the log4j 2 jars and the adapters for other logging APIs : .. . .. . 1 . log4j-api always .. . 2 . log4j-core always .. . 3 . log4j-1.2-api .. . 4 . log4j-jcl .. . 5 . log4j-slf4j-impl do NOT add log4j-to-slf4j .. . .. . Remove other logging implementations : .. . .. . 1 . log4j-1.2.x .. . 2 . logback-core- .. . 3 . logback-classic- .. . .. . Keep the facades : .. . .. . 1 . commons-logging- .. . 2 . slf4j-api-", "Question : Recently I have experimented with Log4j 2 logging and tried to compare its performance with Logback on my local Mac machine . Surprisingly I see Logback performs better in my test cases . I expected Log4j 2 to do better than Logback as claimed by the Log4j 2 website so I want to check if I am doing something wrong in using Log4j 2 . For testing I have used direct Log4j 2 and Logback without using SLF4J . Also the ConsoleAppender was used for both logging frameworks and the pattern I tested is : .. . .. . The logging test code is : .. . .. . I ran the test 10 times for each logging separately and tried to take the average time taken to process . Unexpectedly logback performed better in each run . I have tried disabling the default GC logging that comes with Log4j 2 using the params : .. . .. . but I still didn t see any improvement over logback . Could anyone confirm whether I am doing is correct or not log4j 2 config : .. . .. . Logback config : Comment : In any case you can do Task.Run logger.info Order successfully processed ABC123 which will run it in another thread so you won t get blocked . Only problem that might occur is fire-and-forget mentality that is if it fails you re not gonna know it . Comment : Hi Stan thanks but this doesnt make any difference to their performance and both frameworks will be benefited by this I am trying to see if i did something wrong in configuring log4j 2 from my end Comment : Please also show your Log4j2 configuration and Logback configuration so people can reproduce your test . Comment : Hi @RemkoPopma configs added .. . Answer : I think it s great that you re trying to independently verify that Log4j2 s performance is really as good as advertised . I ran your test and these are my results . As you can see your test gives a slightly better score for Log4j 2 than Logback on my laptop . So what does these result mean Your test shows that the synchronous logging throughput of the Console appender from a single thread is slightly better in Log4j 2 than in Logback . To get a more complete picture of performance of the logging libraries you also want to compare asynchronous logging different appenders especially the File appender and logging from multiple threads . Asynchronous logging http : logging.apache.org log4j 2.x manual async.html Performance is much faster than synchronous logging and applications that care about performance will usually log asynchronously . I consider async logging performance to be the most important benchmark when comparing logging libraries performance . Console logging is at least 50x slower http : logging.apache.org log4j 2.x performance.html whichAppender than logging to a File . It will slow down your application and should be very carefully used and preferably avoided in a production configuration . So measuring Console logging performance is not very useful . Most applications log to a File so the File appender may be a better place to start a performance investigation . Many applications are multithreaded . Lock contention can slow down your application if the logging library is not carefully designed to deal with this . If you measure logging from multiple threads you ll find that Log4j 2 s fine-grained locking gives much higher throughput than Logback http : logging.apache.org log4j 2.x performance.html fileLoggingComparison . With asynchronous logging the difference is even more pronounced http : logging.apache.org log4j 2.x manual async.html Asynchronous Throughput Comparison with Other Logging Packages . Measuring multithreaded logging needs extra care because you don t want to measure until all threads have started so you ll need a CountDownLatch https : docs.oracle.com javase 7 docs api java util concurrent CountDownLatch.html or something similar . In general I recommend looking at JMH http : openjdk.java.net projects code-tools jmh for a very solid and easy to use benchmarking tool . The Log4j 2 performance page http : logging.apache.org log4j 2.x performance.html points to the JMH benchmarks used to produce the results on the page . For example FileAppenderBenchmark https : github.com apache logging-log4j2 blob master log4j-perf src main java org apache logging log4j perf jmh FileAppenderBenchmark.java . These may be a good starting point to get familiar with JMH and performance-testing in general . Good luck and stay curious Comment : Hi @Remko Thanks for your time in running my code samples . I will take a look JMH and try to compare the results . I will post the results here soon . Comment : How do I clone the Log4j2 repo to my desktop and run the tests locally Comment : Cloning and building : logging.apache.org log4j 2.x build.html https : logging.apache.org log4j 2.x build.html Most JMH benchmarks have javadoc on how to run them . Comment : @RemkoPopma does this performance impact on console logging as well hold true for running within Docker containers I don t know what is causing this negative impact but I would assume that it will be about the same for a docker scenario is this right Comment : I would assume that console logging is slower than file logging in Docker also but I don t have any personal experience with Docker .", "Question : I have a spring-boot application with apache-camel and log4j2 as the underlying log provider . Is it possible to use camel log component to write to the log files as configured by the log4j2.xml Below jar files are there in the classpath : - .. . Answer : You currently have two logger implementations configured : Log4j 2 and Logback . If you want to do all your logging with Log4j2 then you need to add the Log4j SLF4J bridge and remove the Logback jars . I also recommend you use the latest Log4j 2 version 2.6.1 . That gives the following dependencies : .. . .. . log4j-api-2.6.1.jar .. . log4j-core-2.6.1.jar .. . log4j-slf4j-impl-2.6.1.jar routes SLF4J API calls to Log4j 2 .. . log4j-jcl-2.6.1.jar routes Commons Logging API calls to Log4j 2 .. . log4j-jul-2.6.1.jar also set system property java.util.logging.manager to org.apache.logging.log4j.jul.LogManager .. . slf4j-api-1.7.16.jar .. . .. . You don t need : .. . .. . About configuration by default Log4j2 looks for a file called log4j2.xml in the classpath but you can also specify the location http : logging.apache.org log4j 2.x faq.html config location with a system property . The Log4j 2 manual http : logging.apache.org log4j 2.x manual configuration.html is much better than the Log4j 1 documentation and shows many example configurations http : logging.apache.org log4j 2.x manual appenders.html . Comment : Was this answer useful", "Question : Currently in spring-boot 1.3 we could only log access log to a file in the filesystem . Is there any way to actually use the custom logger like log4j2 to log the access log I am currently using undertow with spring-boot but after checking the spring-boot source code the undertow logger is initialized with DefaultAccessLogReceiver which is writing to file . I would like to use the AccessLogHandler if possible and avoid writing a web filter which logs the access . Is there any easy way around this except writing a pull request .. . Answer : Spring Boot has no mandatory logging dependency except for the commons-logging API of which there are many implementations to choose from . To use Logback you need to include it and some bindings for commons-logging on the classpath . The simplest way to do that is through the starter poms which all depend on spring-boot-starter-logging . For a web application you only need spring-boot-starter-web since it depends transitively on the logging starter . For example using Maven : .. . .. . Spring Boot has a LoggingSystem abstraction that attempts to configure logging based on the content of the classpath . If Logback is available it is the first choice . Spring Boot also supports either Log4j or Log4j 2 for logging configuration but only if one of them is on the classpath . If you are using the starter poms for assembling dependencies that means you have to exclude Logback and then include your chosen version of Log4j instead . If you aren t using the starter poms then you need to provide commons-logging at least in addition to your chosen version of Log4j . The simplest path is probably through the starter poms even though it requires some jiggling with excludes .e.g . in Maven : .. . .. . To use Log4j 2 simply depend on spring-boot-starter-log4j2 rather than spring-boot-starter-log4j . Comment : I know this . But it doesn t allow you to log access log to the console . And change its setting . Access log is using the native logger of undertow . Comment : Can you give example from your application what you exactly want to do . In our application we can see logs on console .", "Question : We are building our application with Mule 3.6.1 . In order to overwrite their log we need to use log4j2.xml . I followed the example for making one here : https : logentries.com doc java . When I run our application I am getting : .. . .. . 2015-05-06 09 : 56 : 37 603 ERROR Error processing element Logentries : CLASS NOT FOUND .. . .. . 2015-05-06 09 : 56 : 37 606 ERROR Unable to locate appender le for logger .. . .. . This makes me wonder if I am missing something . I am not sure what those steps mean actually : .. . .. . 1 Install Log4j2 if you are not already using it . 2 Install the Logentries appender . 3 Configure the Logentries appender . Those are descibed only for log4j2 and not for log4j or logback . I tried log4j and logback as descibed https : logentries.com doc java from a general Eclipse project and they both worked . However in the general Eclipse project log4j2 didnt work . There should be some special setting that I am missing but I cant really see what on Apaches site . This is how our Gradle looks like : .. . .. . .. . dependencies .. . compile group : org.apache.logging.log4j name : log4j-api version : 2.2 .. . compile group : org.apache.logging.log4j name : log4j-core version : 2.2 .. . compile group : org.slf4j name : log4j-over-slf4j version : 1.6.4 .. . compile group : com.logentries name : logentries-appender version : RELEASE .. . compile group : log4j name : log4j version : 1.2.16 .. . Answer : Actually I found out what was wrong . The problem was here : .. . .. . compile group : com.logentries name : logentries-appender version : RELEASE .. . .. . This downloaded the following jar : file : C : Projects tralala .mule apps ws-comaround-cfx lib logentries-appender-1.1.20.jar which do not include the support for log4j2 I had to change to .. . .. . compile group : com.logentries name : logentries-appender version : 1.1.30 .. . .. . 1.1.30 version includes the log4j2 support . Interesting why RELEASE as version do not work though . I tried it also in Eclipse and changing the version there worked also fine .", "Question : null .. . Answer : I would like to send the logs of an application on a rsyslog server using the client protocol : Unix socket . Both application and rsyslog server are on the same machine . I ve been comparing different logging tools : Log4J Logback and Log4J2 . Log4J s Syslog appender https : logging.apache.org log4j 1.2 apidocs org apache log4j net SyslogAppender.html doesn t permit it natively . A solution is to use Syslog4J http : www.syslog4j.org and configure our Syslog4JAppender http : syslog4j.org docs javadoc org productivity java syslog4j impl log4j Syslog4jAppender.html this way : .. . .. . Same as Log4J Logback s Syslog appender http : logback.qos.ch apidocs ch qos logback classic net SyslogAppender.html doesn t permit it natively . A solution is to use Syslog4J and logback-syslog4j https : github.com papertrail logback-syslog4j tool and configure our appender this way : .. . .. . Now I m looking for a solution for Log4J 2 but I didn t find any . Do you know one Do these tools will include natively this functionality", "Question : I m trying to configure Tomcat 8 to use Log4j2 for logging . I ve found this reference for Logging in Tomcat using Log4j http : tomcat.apache.org tomcat-8.0-doc logging.html Using Log4j . It provides a sample log4j.properties file that configures Log4j to match Tomcat s internal logging . Most of this looks pretty straightforward to convert for Log4j2 but the section at the end that maps loggers to appenders has me stumped : .. . .. . Has anyone converted this configuration to work with Log4j2 I ve been working from the Log4j2 configuration documentation and have read through the Log4j2 Architecture page http : logging.apache.org log4j 2.0 manual architecture.html but I haven t found much material on how to do this sort of container mapping in Log4j2 . I suppose I could do a separate configuration for each container but I d prefer to keep it in one place as in the sample Log4j configuration . Comment : Have you tried asking on the tomcat-users mailing list tomcat.apache.org lists.html http : tomcat.apache.org lists.html That s where the experts hang out and you re most likely to get an accurate response . Comment : Likely your only chance of using log4j2 with tomcat will be to use the log4j 1.x bridge . logging.apache.org log4j 2.0 manual migration.html http : logging.apache.org log4j 2.0 manual migration.html .. . Answer : After asking this question I spent some more time with setting up log4j2 and this is the log4j2.xml file I came up with . It mimics the configuration described in Logging in Tomcat using Log4j http : tomcat.apache.org tomcat-8.0-doc logging.html Using Log4j . It uses multiple loggers to route messages to separate log files . However getting this to work properly required getting a bunch of other files configured correctly . The tomcat 7 internal logging with log4j2.xml http : stackoverflow.com questions 28446085 tomcat-7-internal-logging-with-log4j2-xml posting from Paramita Banerjee was helpful with this . This file goes in CATALINA HOME bin : .. . .. . tomcat-juli.jar .. . .. . If you re pulling this from the Maven repository you ll get a file named something like tomcat-extras-juli-8.0.15.jar the current version when I wrote this . However it needs to be renamed to tomcat-juli.jar the Tomcat setup scripts use that name in setting up the CLASSPATH . These files go in CATALINA HOME lib : .. . .. . commons-logging-1.2.jar .. . log4j-1.2-api-2.1.jar .. . log4j-api-2.1.jar .. . log4j-core-2.1.jar .. . log4j-jcl-2.1.jar .. . log4j-jul-2.1.jar .. . log4j-web-2.1.jar .. . tomcat-juli-adapters-8.0.15.jar .. . .. . log4j-web-2.1.jar may not be needed here it may just need to be deployed with your web application its use is described in Using Log4j 2 in Web Applications http : logging.apache.org log4j 2.x manual webapp.html . log4j-1.2-api-2.1.jar is needed only if you have applications that use the older log4j 1.2 interface . In CATALINA BASE conf I disabled logging.properties . I used the following setenv.sh script to define the CLASSPATH and LOGGING MANAGER environment-variables correctly for Tomcat . It goes in either CATALINA BASE bin or into CATALINA HOME bin . I put it in CATALINA HOME bin . It is executed by Tomcat s startup scripts if it s present . You might prefer something simpler but this is in keeping with the style of the startup scripts . As Nick mentioned in his response there s also the output to the access log . I haven t tried to do anything with that either . I hope others find this useful . In retrospect it seems pretty straightforward . However there are a lot of parts that have to be just right for it to work and that was a challenge at least for a newbie .", "Question : I ve migrated my application to log4j 2 and I ve configured it via log4j2.xml .. . .. . However some of the libraries I m using depend on log4j 1 . If I run the application using : .. . .. . log4j 1 complains about not finding a configuration file . I m using the log4j 1.x bridge provided by log4j 2 log4j-1.2-api-2.0-rc1.jar . Is it possible to configure both using a single log4j2.xml An alternative I ve tried is configuring both log4j and log4j2 together : .. . .. . My concern is fragmentation of my logging configuration-files and output . I m also concerned about possible conflicts between log4j.xml and log4j2.xml . e.g . the logfile error.log is configured to use a FileAppender in log4j 1 and a RollingFileAppender in log4j 2 . Any advice note .. . .. . This is the error I m seeing : .. . .. . The version of log4j 2 I m using is log4j 2.0 rc1 . answer .. . .. . Seems like activemq-5.8.0.jar was bundled with log4j 1 . The solution was simply to load the log4j 1.x bridge before activemq . .. . Answer : I would recommend using the log4j-1.2 adapter that is included in the log4j2 distribution . That way any libraries coded to the log4j-1.2 API will work with log4j2 without any code changes . Your classpath should include : .. . .. . log4j-api-2.6.1.jar .. . log4j-core-2.6.1.jar .. . log4j-1.2-api-2.6.1.jar .. . log4j2.xml .. . .. . Your classpath should not include : .. . .. . log4j-1.2.x.jar .. . log4j.properties or log4j.xml these will be ignored by log4j2 anyway .. . .. . See also http : logging.apache.org log4j 2.x faq.html which jars Comment : I m already using log4j-1.2-api-2.0.jar in my classpath . There is no log4j-1.2.x.jar in my classpath at all . I was using the method you recommended above but log4j still complains about not being configured properly . Sorry if I wasn t clear in my initial question I ll update to reflect this . Comment : If there is no log4j-1.2.x.jar in the classpath then how can log4j-1.2 still complain the classes doing the complaining should not be on the classpath Comment : I believe it s complaining due to the log4j 1.x bridge . Comment : Log4j2 should find the log4j2.xml config file with the system property you mentioned but the error indicates that this is not the case.. . Have you tried putting log4j2.xml in the classpath without specifying a location with -Dlog4j.configurationFile Comment : Actually its really my fault for using the wrong jar file I just discovered that too . Many thanks for the advice though", "Question : I m trying to configure Tomcat 8 to use Log4j2 for logging . I ve found this reference for Logging in Tomcat using Log4j http : tomcat.apache.org tomcat-8.0-doc logging.html Using Log4j . It provides a sample log4j.properties file that configures Log4j to match Tomcat s internal logging . Most of this looks pretty straightforward to convert for Log4j2 but the section at the end that maps loggers to appenders has me stumped : .. . .. . Has anyone converted this configuration to work with Log4j2 I ve been working from the Log4j2 configuration documentation and have read through the Log4j2 Architecture page http : logging.apache.org log4j 2.0 manual architecture.html but I haven t found much material on how to do this sort of container mapping in Log4j2 . I suppose I could do a separate configuration for each container but I d prefer to keep it in one place as in the sample Log4j configuration . Comment : Have you tried asking on the tomcat-users mailing list tomcat.apache.org lists.html http : tomcat.apache.org lists.html That s where the experts hang out and you re most likely to get an accurate response . Comment : Likely your only chance of using log4j2 with tomcat will be to use the log4j 1.x bridge . logging.apache.org log4j 2.0 manual migration.html http : logging.apache.org log4j 2.0 manual migration.html .. . Answer : I followed the reference for Logging in Tomcat using Log4j http : tomcat.apache.org tomcat-8.0-doc logging.html Using Log4j and added tomcat-juli.jar to the bin dir and I also added tomcat-juli-adapters.jar to the lib dir . Afterwards i added the log4j-api-2.1.jar log4j-core-2.1.jar and log4j-1.2-api-2.1.jar to the lib dir . After that i added log4j2.xml to the lib dir . I kept the configuration fairly simple using a time and size based rolling configuration that zips the archived logs : .. . .. . This way you ll get all logging in the catalina.log . I m still working on getting the accessLog to do the same . EDIT : I found this http : www.shadegrowncode.com site . this way you can direct access logging to the catalina.log . i couldn t get it to log to it s own appender .. . .. . I didn t worry about the logging for manager and host manager since we don t have them in production environments but they might just log to the catalina.log too . I haven t tested it . This was tested on tomcat-7.0.42 it should work in tomcat8 too .", "Question : I am running an example using log4j 2.0-rc1 and log4j.properties file but log4j lib always runs it with the default configuration log level appender etc . I also tried changing the name to log4j2.properties and nothing happened . .. . Answer : Log4j 2 doesn t support the Log4j v1 .properties format anymore yet since v2.4 Log4j supports a Property format but its syntax is totally different from v1 format https : logging.apache.org log4j 2.0 manual configuration.html Properties . New formats are XML JSON and YAML see the documentation http : logging.apache.org log4j 2.x manual configuration.html note : if you used one of these formats in a file called .properties it may be confusing . To specify the location of your configuration file do you use the system property log4j.configurationFile the Log4j class ConfigurationFactory or something else Did you read this manual page http : logging.apache.org log4j 2.x manual migration.html It explains that : Although the Log4j 2 configuration syntax is different than that of Log4j 1.x most if not all of the same functionality is available . .. . .. . So it seems that a legacy Log4j1.x log4j.properties file is not supported as is it must be migrated to v2.x format . The migration seems quite easy though looking at the example in the link I gave above . Here is an extract : .. . .. . Example of Log4j v1.x config file : .. . .. . Same config file migrated to Log4j v2 : Comment : where should this go what should the file be named for log4j2 Comment : As explained here http : logging.apache.org log4j 2.x manual configuration.html it may be named log4j2.yaml log4j2.json or log4j2.xml depending on used format . You can use any file name and any file location you want file extension seems to have to be compliant though as long as you give this name location in your Log4j configuration Comment : Log4j 2 now supports .properties format : logging.apache.org log4j 2.0 manual https : logging.apache.org log4j 2.0 manual configuration.html Properties Comment : @Drew Thanks I updated my answer to reflect this Property format is back but with a different syntax compared to Log4j v1 Comment : @xav Am I the only one who thought this change confusing using a configuration file property to tell where a configuration file is -- instead of a .property file I spent over an hour trying to find the answer to this question for a project when the answer was right in front of me- but I didn t understand it .", "Question : Since I discovered some performance issues with log4j 1.2.x I tried migrating to log4j2 . Now I encountered a problem for which I can t find a solution . I have to rewrite the configuration file that was for log4j 1.2.x into a v2 compatible one . Problem occurs when I reached the property inside of an appender called errorHandler . Here is where errorHandler appears in my log4j 1.2.x context : .. . .. . Could anybody tell me which is the similar property if exists one in the log4j2 for errorHandler Or maybe another alternative in log4j2 that would give me the exactly same result Thanks in advance . .. . Answer : Log4j2 provides a FailoverAppender http : logging.apache.org log4j 2.x manual appenders.html FailoverAppender that will invoke the secondary appender if the primary appender fails . You can have a list of secondary appenders and log4j will try all of them until one succeeds . Note that when using a FailoverAppender you should configure your primary and secondary appenders with ignoreExceptions false . Comment : ok I had already looked over this FailoverAppender but not very carefully but if you said this could be the solution for my issue I ll try again and with more patience . Thanks .", "Question : I m interested in programmatically changing the log level in Log4j2 . I tried looking at their configuration documentation http : logging.apache.org log4j 2.x manual configuration.html but that didn t seem to have anything . I also tried looking in the package : org.apache.logging.log4j.core.config but nothing in there looked helpful either . Comment : If you dont get an answer here try the mail list its generally looked in to once in 2 days by the main authors . Then come back and answer your own question : - .. . Answer : The programmatic approach is rather intrusive . Perhaps you should check JMX support given by Log4J2 : .. . .. . 1 . Enable the JMX port in your application-start up : .. . .. . -Dcom.sun.management.jmxremote.port port num .. . .. . 2 . Use any of the available JMX clients the JVM provides one in JAVA HOME bin jconsole.exe while executing your application . 3 . In JConsole look for the org.apache.logging.log4j2.Loggers bean .. . .. . 4 . Finally change the level of your logger .. . .. . The thing that I like most of this is that you don t have to modify your code or configuration for managing this . It s all external and transparent . More info : http : logging.apache.org log4j 2.x manual jmx.html", "Question : As disscussed in this link : How to create a own Appender in log4j http : stackoverflow.com questions 6072389 how-to-create-a-own-appender-in-log4j .. . .. . For creating a custom appender in log4j 1.x we have to extend the AppenderSkeleton class and implements its append method . Similarly How we can create a custom appender in log4j2 as we dont have AppenderSkelton class to extend and all other appender extend AppenderBase class . .. . Answer : This works quite differently in log4j2 than in log4j-1.2 . In log4j2 you would create a plugin for this . The manual has an explanation with an example for a custom appender here : http : logging.apache.org log4j 2.x manual extending.html Appenders .. . .. . It may be convenient to extend org.apache.logging.log4j.core.appender.AbstractAppender but this is not required . When you annotate your custom Appender class with @Plugin name MyCustomAppender ... . the plugin name becomes the configuration element name so a configuration with your custom appender would then look like this : .. . .. . Note that the packages attribute on the configuration is a comma-separated list of all the packages with custom log4j2 plugins . Log4j2 will search these packages in the classpath for classes annotated with @Plugin . Here is a sample custom appender that prints to the console : .. . .. . For more details on plugins : http : logging.apache.org log4j 2.x manual plugins.html .. . .. . If the manual is not enough it may be useful to look at the source code for the built-in appenders in log4j-core . Comment : It looks like plugin appenders are scanned at startup and cannot be added during runtime . Is that true If so this does not answer the question of how to programmatically alter Log4J 2 behavior . Comment : @ingyhere Programmatically configuring Log4j2 is indeed a separate question . This log4j2 manual page may be a good starting point to find out more : logging.apache.org log4j 2.x manual http : logging.apache.org log4j 2.x manual customconfig.html AddingToCurrent Otherwise you may want to ask a new question . Comment : @Remko I m bit confused then how it would be detected as a Console apernder File appender etc . As an example if I want to print into console using a custom appender how could I do this Thanks Comment : Grant I added a full example . Comment : That is really helpful Thanks Remko .", "Question : The documentation http : logging.apache.org log4j 2.x manual configuration.html for log4j2 configuration provides a nice sample XML document equivalent to the default configuration : .. . .. . What would the equivalent file look like as valid YAML .. . Answer : The equivalent YAML file log4j2.yaml looks like this : .. . .. . This file is automatically loaded assuming that the file is in the classpath and having the required dependencies as described in Automatic Configuration http : logging.apache.org log4j 2.x manual configuration.html AutomaticConfiguration . If you are using Maven the following dependencies are required : .. . .. . Imgur http : i.imgur.com qJkPga2.png Comment : Excellent thank you for including the maven-dependency -- another critical piece that I hadn t considered . Comment : You re welcome . Maybe you forgot to accept some answer . -", "Question : Hi I just downloaded and configured log4j-2 . I am stuck on applying color-codes to the SlowConsole console appender . My console appender is like below . I have two questions .. . .. . 1 . I am new to log4j is this the right way to write xml config file 2 . How can i add two color-codes to each log level for example : DEBUG green - will output light green font But i need it to be dim and bold Comment : It would be great if you could provide a patch for the docs Help is always appreciated .. . Answer : I think I found the solution . I downloaded log4j2-core-sources.jar and traced the source https : svn.apache.org repos asf logging log4j log4j2 trunk log4j-core src main java org apache logging log4j core pattern AnsiEscape.java . You can write it as below .. . .. . I think log4j2 documentation http : logging.apache.org log4j 2.x manual layouts.html and its examples may need to be updated . Comment : Found a manual logging.apache.org log4j 2.x manual layouts.html https : logging.apache.org log4j 2.x manual layouts.html search for highlight pattern style Comment : @HarmeetSingh yeah this answer is bit old now .", "Question : logger.setLevel method is not available in log4j2 API . So how to set log level at run time . .. . Answer : The following APIs in the class org.apache.logging.log4j.core.config.Configurator https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html allow you to change Levels : .. . .. . setAllLevels String Level https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html setAllLevels java.lang.String 20org.apache.logging.log4j.Level .. . setLevel Map https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html setLevel java.util.Map .. . setLevel String Level https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html setLevel java.lang.String 20org.apache.logging.log4j.Level .. . setRootLevel Level https : logging.apache.org log4j 2.x log4j-core apidocs org apache logging log4j core config Configurator.html setRootLevel org.apache.logging.log4j.Level", "Question : I have a new application that is being written using log4j2 to take advantage of some of its new features . One of the libraries it uses is a bit older and was built with log4j 1.x . I m having a problem where the new code in the application writes to the log but the code in the old library does not write to the log . I even have one class which is a subclass of something in the old library and is also called by code in the old library and this code also will not write to the log . I have configured the application to use log4j2 version 2.0.2 and I explicitly excluded log4j when referencing the old library as a maven-dependency . How can I get the code in the old library logging into the same file as my new code Re-writing the old library should be thought of as a last-resort option .. . Answer : Are you aware that log4j2 includes a bridge for log4j-1.2 You can use it by removing the old log4j-1.2.17.jar and include these three jars : .. . .. . log4j-api-2.x.jar .. . log4j-core-2.x.jar .. . log4j-1.2-api-2.x.jar .. . .. . This will result in all calls that your application makes to the log4-1.2 API to be routed to the log4j2 implementation . The FAQ has a diagram http : logging.apache.org log4j 2.x faq.html which jars that may clarify things . Don t forget to remove the old log4j-1.2 jar from the classpath Comment : It seems I was also missing log4j-jcl but I ve got logging working now thanks", "Question : I m trying to use Chainsaw v2 from http : people.apache.org sdeboy I don t want to use zero configuration . Just a simple socketAppender SocketReceiver combo . I m using log4j2 with the following configuration .. . .. . On ChainSaw I m selecting the option Receive events from network with port 4445 . However chainsaw doesnt log anything . I ve verified that the appender configuration is correct on log4j side by using the builtin socketserver .. . .. . So the bug must be on chainsaw side . Any pointers @Scott Comment : After looking at the source code of chainsaw it looks like chainsaw still uses log4j 1.x and has very limited support for log4j2 . In particular it casts incoming log events from socket as log4j 1.x org.apache.log4j.spi.LoggingEvent whereas the log4j2 events that are sent are actually org.apache.logging.log4j.core.LogEvent objects .. . Answer : You re right I got the same issue . I just tried with LogMX http : www.logmx.com instead and it works like a charm : .. . .. . LogMX screenshot http : i.stack.imgur.com TMFKY.png .. . .. . I just had to copy Log4j JARs in LogMX lib directory i.e . log4j-api-2.xx.jar and log4j-core-2.xx.jar Comment : Wow awesome thanks . I ll try it out . I wonder if LogMX explicitly supports log4j2 or its simply working by chance Comment : It explicitly supports Log4j v1 and v2 logmx.com features http : www.logmx.com features Comment : I have a weird problem where logmx captures my application logs but doesnt capture spring logs . I can see them in the console though . Also FYI for other people planning to use logmx the free version limits you to 10 000 logs Comment : You may want to check your Log4j configuration : the appender used for Spring logs may not be the same as for your application logs i.e . not a Socket Appender you may want to check your Loggers Appenders and their additivity . Spring logs may also be filtered by package name for Socket Appender through Log4j filters http : logging.apache.org log4j 2.x manual configuration.html Filters ." ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION