xPXXX commited on
Commit
0d91987
·
1 Parent(s): 9ad3a38

Upload 10 files

Browse files
oraclechunk11.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"QuestionId": 7271661, "AnswerCount": 3, "Tags": "<algorithm><crc>", "CreationDate": "2011-09-01T14:17:05.883", "AcceptedAnswerId": "7273055", "Title": "CRC divisor calculation", "Body": "<p>Im trying to understand CRC and I'm getting confused as how to calculate the 'divisor'.</p>\n\n<p>In the <a href=\"http://en.wikipedia.org/wiki/Cyclic_redundancy_check#Computation_of_CRC\" rel=\"noreferrer\">example on wikipedia</a> the divisor is 11 (1011) for input of 11010011101100</p>\n\n<pre><code>11010011101100 000 &lt;--- input left shifted by 3 bits\n1011 &lt;--- divisor (4 bits) = x\u00b3+x+1\n------------------\n01100011101100 000 &lt;--- result\n</code></pre>\n\n<p>How is the divisor calculated? In this example (x\u00b3+x+1) x is 2? Where did the 2 come from?</p>\n", "Lable": "No"}
2
+ {"QuestionId": 7442099, "AnswerCount": 1, "Tags": "<ruby-on-rails><ruby-on-rails-3><paypal><activemerchant>", "CreationDate": "2011-09-16T08:37:02.857", "AcceptedAnswerId": null, "Title": "active_merchant: A field was longer or shorter than the server allows", "Body": "<p>I'm implementing paypal direct payment using activemerchant\nFollowing is the code</p>\n\n<pre><code>def credit_card_details\n credit_card = ActiveMerchant::Billing::CreditCard.new(\n :first_name =&gt; 'Bob',\n :last_name =&gt; 'Bobsen',\n :number =&gt; '4242424242424242',\n :month =&gt; '8',\n :year =&gt; '2012',\n :verification_value =&gt; '123')\n\n errors.add(:expire_year, \"Credit card expired\") if credit_card.expired?\n errors.add(:cc_number, \"invalid credit card details\") unless credit_card.valid?\n\n if credit_card.valid?\n # Capture $10 from the credit card\n amount = 1000\n response = PAYPAL_GATEWAY.purchase(amount, credit_card)\n\n if response.success?\n puts \"Successfully charged $#{sprintf(\"%.2f\", amount / 100)} to the credit card #{credit_card.display_number}\"\n else\n\n raise StandardError, response.inspect\n end\n end\n end\n</code></pre>\n\n<p>I was trying with other credit card details but it was causing \"A field was longer or shorter than the server allows\" this error. So I replaced cc details with one specified in active_merchants github page still no luck. \nI dont understand what is wrong?</p>\n", "Lable": "No"}
3
+ {"QuestionId": 7468149, "AnswerCount": 1, "Tags": "<eclipse><eclipse-rcp><xtext>", "CreationDate": "2011-09-19T08:23:36.633", "AcceptedAnswerId": "13491190", "Title": "XText in a RCP product", "Body": "<p>we want to provide the users of our RCP product with a textual editor for our model. Accordingly, we created an EMF model and a XText grammar. The problem is that our RCP app does not the Eclipse IDE's project structure (i.e., we do not have any workspaces or builders), hence we have some troubles in making the XText editor work... </p>\n\n<p>does anybody have some suggestions? </p>\n\n<p><strong>[EDIT to clarify my question]</strong></p>\n\n<p>I have some plugins with the EMF model &amp; XText stuff. If I run those plugins in a \"standard\" eclipse product, I am able to create and edit textual instances of my model (like in the default XText demo).</p>\n\n<p>However, I need to go a step further: those plugins are required in a RCP product I'm working on. This product does <strong>NOT</strong> leverage the project management of eclipse. Accordingly, my RCP cannot add the XText nature to its projects, hence the default XText editor are not properly working.</p>\n\n<p>When I searched for solutions, I only found links dated 2009 (which is before XText 2.0). Additionally, there is a bug opened on this issue ( <a href=\"https://bugs.eclipse.org/bugs/show_bug.cgi?id=289212\" rel=\"noreferrer\">https://bugs.eclipse.org/bugs/show_bug.cgi?id=289212</a> ) but the last comment was made roughly one year ago...</p>\n", "Lable": "No"}
4
+ {"QuestionId": 7471751, "AnswerCount": 2, "Tags": "<asp.net><asp.net-mvc-3><url-routing><asp.net-mvc-areas>", "CreationDate": "2011-09-19T13:31:49.047", "AcceptedAnswerId": "7471892", "Title": "asp.net mvc 3 areas and url routing configuration", "Body": "<p>I have problem with create ulr routing for asp.net mvc3 application.</p>\n\n<p>My project has this structure : </p>\n\n<ul>\n<li>Areas\n<ul>\n<li>EmployeeReport\n<ul>\n<li>Controllers\n<ul>\n<li>Report </li>\n</ul></li>\n<li>Views\n<ul>\n<li>Report\n<ul>\n<li>List </li>\n<li>....</li>\n</ul></li>\n</ul></li>\n</ul></li>\n</ul></li>\n<li>Controllers\n<ul>\n<li>Login </li>\n</ul></li>\n<li>Viwes\n<ul>\n<li>Login\n<ul>\n<li>... </li>\n</ul></li>\n</ul></li>\n</ul>\n\n<p>EmployeeReportAreaRegistration.cs : \n<code></p>\n\n<pre><code>public class EmployeeReportAreaRegistration : AreaRegistration\n{\n public override string AreaName\n {\n get\n {\n return \"EmployeeReport\";\n }\n }\n\n public override void RegisterArea(AreaRegistrationContext context)\n {\n var routes = context.Routes;\n\n routes.MapRoute(null, \"vykazy/vykazy-zamestnance\", new { Area = \"EmployeeReport\", controller = \"Report\", action = \"List\" });\n\n }\n}\n</code></pre>\n\n<p></code></p>\n\n<p>Global.asax : </p>\n\n<p><code></p>\n\n<pre><code> routes.MapRoute(null, \"prihlasit\", new { controller = \"Login\", action = \"Login\" });\n\n routes.MapRoute(\"Default\", \"{controller}/{action}/{id}\", new { controller = \"Default\", action = \"Welcome\", id = UrlParameter.Optional });\n</code></pre>\n\n<p></code></p>\n\n<pre><code>When i try load \"http://localhost/app_name/vykazy/vykazy-zamestnance\ni get this exception :\n\nThe view 'List' or its master was not found or no view engine supports the searched locations. The following locations were searched:\n~/Views/Report/List.aspx\n~/Views/Report/List.ascx\n~/Views/Shared/List.aspx\n~/Views/Shared/List.ascx\n~/Views/Report/List.cshtml\n~/Views/Report/List.vbhtml\n~/Views/Shared/List.cshtml\n~/Views/Shared/List.vbhtml\n</code></pre>\n\n<p>Well, where I do mistake ?</p>\n\n<p>Thanks</p>\n", "Lable": "No"}
5
+ {"QuestionId": 7544140, "AnswerCount": 2, "Tags": "<python><c><image-processing><opencv>", "CreationDate": "2011-09-25T07:09:43.993", "AcceptedAnswerId": "7545444", "Title": "Why does cvSet2D take in a tuple of doubles, and why is this tuple all 0 save for the first element?", "Body": "<p><code>cvSet2D(matrix, i, j, tuple)</code></p>\n\n<p>Hi. I'm dissecting the Gabor Filter code given in <a href=\"http://www.eml.ele.cst.nihon-u.ac.jp/~momma/wiki/wiki.cgi/OpenCV/Gabor%20Filter.html\" rel=\"nofollow\">http://www.eml.ele.cst.nihon-u.ac.jp/~momma/wiki/wiki.cgi/OpenCV/Gabor%20Filter.html</a> . I have a few questions on cvSet2D especially as used in the following code snippets (as given in the link):</p>\n\n<p>C code:</p>\n\n<pre><code>for (x = -kernel_size/2;x&lt;=kernel_size/2; x++) {\n for (y = -kernel_size/2;y&lt;=kernel_size/2; y++) {\n kernel_val = exp( -((x*x)+(y*y))/(2*var))*cos( w*x*cos(phase)+w*y*sin(phase)+psi);\n cvSet2D(kernel,y+kernel_size/2,x+kernel_size/2,cvScalar(kernel_val));\n cvSet2D(kernelimg,y+kernel_size/2,x+kernel_size/2,cvScalar(kernel_val/2+0.5));\n }\n}\n</code></pre>\n\n<p>Python code:</p>\n\n<pre><code>for x in range(-kernel_size/2+1,kernel_size/2+1):\n for y in range(-kernel_size/2+1,kernel_size/2+1):\n kernel_val = math.exp( -((x*x)+(y*y))/(2*var))*math.cos( w*x*math.cos(phase)+w*y*math.sin(phase)+psi)\n cvSet2D(kernel,y+kernel_size/2,x+kernel_size/2,cvScalar(kernel_val))\n cvSet2D(kernelimg,y+kernel_size/2,x+kernel_size/2,cvScalar(kernel_val/2+0.5))\n</code></pre>\n\n<p>As I'm aware cvSet2D sets the (j, i)th pixel of a matrix to the equivalent color value of the tuple defined in the last parameter. But why does it take in a tuple of doubles? Isn't it more natural to take in a tuple of ints, seeing that a pixel color is defines as a tuple of ints?</p>\n\n<p>Lastly, if I read the docs correctly, the cvScalar method used returns the 4-tuple <code>&lt;given_value_in_double, 0.000000, 0.000000, 0.000000)&gt;</code>. I surmised that cvSet2D takes the first three values and uses it to as the RGB 3-tuple. But, seeing that the output of Gabor Filters are more or less in grayscale, that won't hold being that, the colors produced in my scheme will lean towards red. So, what does cvSet2D do with this tuple?</p>\n\n<p>Thank you for anyone who'll take the bother to explain!</p>\n", "Lable": "No"}
6
+ {"QuestionId": 7564803, "AnswerCount": 2, "Tags": "<asp.net><session><c#-4.0><login>", "CreationDate": "2011-09-27T05:59:01.553", "AcceptedAnswerId": "7566018", "Title": "Using Sessions in an ASP.NET 4.0 Log-In Control", "Body": "<p>I'm currently developing a website using Visual Studio 2010. As you all might know, creating a new website here automatically adds an Account folder which contains webpages like Login.aspx, etc. I am implementing this Login.aspx which contains the ASP.NET Login control. It's now functioning the way it should but I have a few concerns.</p>\n\n<p>Before, I used to create my own UI for the log-in so managing sessions is not a problem to me. But since i'm currently using the Login.aspx which has a CS file almost empty, i don't have an idea where I can start implementing my session. Meaning to say, I don't know how to check programatically if the user has been successfully logged in so I can start implementing my session.</p>\n\n<p>I would very much appreciate any pointer regarding this matter.</p>\n\n<p>Thanks in advance. :)</p>\n", "Lable": "No"}
7
+ {"QuestionId": 7614345, "AnswerCount": 3, "Tags": "<wordpress>", "CreationDate": "2011-09-30T18:09:42.130", "AcceptedAnswerId": "7620012", "Title": "Wordpress query_posts posts_per_page not working", "Body": "<p>Can't figure out why this is not limiting the posts_per_page. It is displaying a very long list of posts, but I only want to show 4</p>\n\n<pre><code>query_posts('posts_per_page=4&amp;post_type=page&amp;pagename=media');\n\nif(have_posts() ) :\nwhile(have_posts()) : the_post();\n</code></pre>\n", "Lable": "No"}
8
+ {"QuestionId": 7672393, "AnswerCount": 2, "Tags": "<c#><asp.net>", "CreationDate": "2011-10-06T09:23:41.143", "AcceptedAnswerId": "7672508", "Title": "ASP.net page_load doesn't detect session", "Body": "<p>I have a problem with using <code>session</code> variable in the <code>page_load</code>. I have a page (<code>members.aspx</code>) which is a members area. </p>\n\n<p>If the user isn't <code>logged</code> in, it will display a form asking them to login. The form submits their details, checks if ok then sets <code>session</code> variables if <code>OK</code>. It then reloads the page.</p>\n\n<p>So if the user has authenticated correctly, it sets <code>Session[\"memberLoggedIn\"] = true</code>. \nMy <code>page_load</code> function then looks like this</p>\n\n<pre><code>protected void Page_Load(object sender, EventArgs e)\n{\n if (Convert.ToBoolean(Session[\"memberLoggedIn\"]) == true) {\n Response.Write(\"OK\");\n }\n}\n</code></pre>\n\n<p>There is more code, but essentially, the \"OK\" should be written. However, it doesn't appear. Even though the <code>session</code> IS set. If I go to the page directly it will then show. It's just for the reloading of the members page from the initial login which stops it. </p>\n\n<p>any ideas?!</p>\n\n<p>======================\nthe code to set the session is</p>\n\n<pre><code>if (logindetails.Count &gt; 0) {\n System.Data.DataRow details = logindetails[0];\n Session[\"memberLoggedIn\"] = true;\n}\n</code></pre>\n\n<p>I then just check if <code>(Convert.ToBoolean(Session[\"memberLoggedIn\"]) == true)</code> on all my pages. To be honest it doesn't seem that reliable and I Think sometimes I need to understand the order in which pages are loaded as when I destroy the session on the log out page, some parts still show the logged in features! (but that's another story....)</p>\n", "Lable": "No"}
9
+ {"QuestionId": 7690627, "AnswerCount": 2, "Tags": "<javascript><dom>", "CreationDate": "2011-10-07T17:17:36.197", "AcceptedAnswerId": "7690653", "Title": "How to retrieve the text of a DOM Text node?", "Body": "<p>For a given Text node in the DOM, one can use one of these properties to retrieve its text: </p>\n\n<ul>\n<li><code>textContent</code></li>\n<li><code>data</code></li>\n<li><code>nodeValue</code></li>\n<li><code>wholeText</code></li>\n</ul>\n\n<p>But which one to use? Which one is the most reliable and cross-browser supported?</p>\n\n<p>(If multiple properties are 100% reliable and cross-browser, then which one would be most appropriate?)</p>\n", "Lable": "No"}
10
+ {"QuestionId": 7707020, "AnswerCount": 2, "Tags": "<javascript><jquery><checkbox>", "CreationDate": "2011-10-09T22:30:50.303", "AcceptedAnswerId": "7707103", "Title": "JS / JQuery - Trouble with getting checkbox values", "Body": "<p>I have many checkboxes in a dynamically produced (ASP) photo gallery. Each checkbox has the name 'photos' and contains a photo ID in the value, like this:</p>\n\n<pre><code>&lt;form name=\"selectForm\" id=\"selectForm\"&gt;\n&lt;input type=\"checkbox\" onclick=\"selectPhoto(&lt;%=rs1.Fields(\"photoID\")%&gt;)\" id=\"checkbox_&lt;%=rs1.Fields(\"photoID\")%&gt;\" class=\"photos\" name=\"photos\" value=\"&lt;%=rs1.Fields(\"photoID\")%&gt;\"&gt;\n&lt;/form&gt;\n</code></pre>\n\n<p>Without submitting a form, when the user clicks the checkbox, I need to create a comma (,) separated list of all the checked values for the checkbox named 'photos'. So this is what I tested but it alerts 'undefined'! The ASP is correct, for those not familiar with it.</p>\n\n<pre><code>function selectPhoto(id) {\n... other stuff that uses id ...\nvar allValues = document.selectForm.photos.value;\nalert(allValues);\n}\n</code></pre>\n\n<p>But as I said above, this returns 'undefined' and I can work out why. When a user selects a photo, I simply need to display a list of all the photo ID's that have been clicked e.g. 1283,1284,1285,1286...</p>\n\n<p>Any ideas what I am doing wrong here? Or is there another way to achieve this?</p>\n", "Lable": "No"}
11
+ {"QuestionId": 7890076, "AnswerCount": 2, "Tags": "<wpf><datagrid><cell>", "CreationDate": "2011-10-25T13:33:36.420", "AcceptedAnswerId": "7890969", "Title": "Access to cell values of a DataGrid in WPF?", "Body": "<p>We have such a scenario that we have a page including a DataGrid, and now we want to get all data from this DataGrid, but without accessing to the underlying item source of it, i.e., we want to access to the data directly from the DataGrid. It seems to be tricky but not impossible. I found many articles, like this: <a href=\"http://code.google.com/p/artur02/source/browse/trunk/DataGridExtensions/DataGridHelper.cs\" rel=\"nofollow\">DataGridHelper</a>, and this: <a href=\"http://techiethings.blogspot.com/2010/05/get-wpf-datagrid-row-and-cell.html\" rel=\"nofollow\">Get WPF DataGrid row and cell</a>, and many other ones. They are basically the same thing: to define the extension methods on DataGrid with help of another GetVisualChild function to find the target DataGridCell object. However, when I am using it, I can't find the target cell. Specifically, Each row in the DataGrid corresponds to one item from a collection of the DataContext, let's say, it is a collection of type \"Employee\", and each column of the DataGrid corresponds one property of class Employee, e.g, the Name, Gender, Age. Now my problem is, the above-mentioned GetCell() function always finds a DataGridCell with one Employee object as its content (the property of Content in DataGridCell), and can't go further into each property, no matter what column index I give it. \nFor example, in the GetCell function, there is one line:\n <code>Dim cell As DataGridCell = DirectCast(presenter.ItemContainerGenerator.ContainerFromIndex(column), DataGridCell)</code>, \nwhere the presenter is a DataGridCellsPresenter I got which representing the row I choose, and as soon as I give the column index, naturally I am expecting it to return the control for selected property at position I specified. But it just doesn't work as expected. Any help would be appreciated!</p>\n", "Lable": "No"}
12
+ {"QuestionId": 7955749, "AnswerCount": 3, "Tags": "<php><datetime>", "CreationDate": "2011-10-31T15:22:39.657", "AcceptedAnswerId": "7955793", "Title": "Changing date formats in PHP < 5.3.0", "Body": "<p>Given a date string in the format m-d-Y (e.g, \"12-09-2011\") how can I display it in the format \"m/d/Y\" <strong>WITHOUT</strong> resorting to regular expressions.</p>\n\n<p>Just in case you missed it: <strong><em>without using regular expressions.</em></strong></p>\n\n<p>I would prefer to use <code>DateTime::createFromFormat()</code> for this problem, but the server I am using currently doesn't have 5.3.0 on it.</p>\n\n<p>I'd also prefer using <code>date('m/d/Y', strtotime(\"12-09-2011\"))</code> but <code>strtotime()</code> doesn't recognize that format properly. It confuses the day and month.</p>\n", "Lable": "No"}
13
+ {"QuestionId": 7979375, "AnswerCount": 5, "Tags": "<c#><textbox><substring>", "CreationDate": "2011-11-02T11:12:25.287", "AcceptedAnswerId": "7979400", "Title": "Using substring in C# textboxes", "Body": "<p>I wanted to display the remaining characters using a label beside my textbox just in case the user input exceeded the maximum length of characters.</p>\n\n<p>This is my code for remaining characters:</p>\n\n<pre><code>private void txtID_TextChanged(object sender, EventArgs e)\n {\n int MaxChars = 10 - txtID.Text.Length;\n labelChars.Text = MaxChars.ToString() + \" characters remaining.\";\n }\n</code></pre>\n\n<p>What I wanted to do now is to prevent the user from entering characters in my textbox when he/she already exceeded the character limit. I'm planning to use the <strong>Substring</strong> property of the textbox but I don't know how. Help me out? Thanks.</p>\n", "Lable": "No"}
oraclechunk12.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {"QuestionId": 8131281, "AnswerCount": 1, "Tags": "<sql><sql-server><sql-server-2008>", "CreationDate": "2011-11-15T03:53:07.083", "AcceptedAnswerId": null, "Title": "SQL Server Script Database with Seed Data", "Body": "<p>I am creating an install script for a Sql server 2008 database using Tasks =>generate Scripts option. This works fine and creates a script including database,schema and seed data.</p>\n\n<p>One problem I notice is that the A Stored procedure is created before the table it refers to is created and this gives error when creating the database.</p>\n", "Lable": "No"}
2
+ {"QuestionId": 8141422, "AnswerCount": 1, "Tags": "<email><replication>", "CreationDate": "2011-11-15T18:44:53.843", "AcceptedAnswerId": "9112771", "Title": "virtual mail replication", "Body": "<p>I have 2 servers that have mail server, both have mysql, dovecot, postfix installed. One of the servers is a Master, second Slave, there is database replication done which works great however mails are not replicated as they are held as files. How should I replicate emails from the Master server into the Slave server?</p>\n", "Lable": "No"}
3
+ {"QuestionId": 8176500, "AnswerCount": 1, "Tags": "<asp.net-mvc-3><reference><assemblies><gac>", "CreationDate": "2011-11-18T00:54:31.660", "AcceptedAnswerId": "8179138", "Title": "MVC3 referencing update-able dependencies", "Body": "<p>I would like create a MVC3 website. I have existing dlls packaged as .net MSI which are installed into the GAC. What is the best way to reference these update-able dlls in MVC3? They will always be installed into the GAC, their version number will be updated accordingly. I don't want to have to manually reference them in my MVC3 project, as every time I re install, the reference will break and I have to update my dependent dll references.</p>\n\n<p>Any input would be appreciated. I have looked around for solutions already but nothing seems straight forward.</p>\n\n<p>Thanks</p>\n", "Lable": "No"}
4
+ {"QuestionId": 8192177, "AnswerCount": 1, "Tags": "<c#>", "CreationDate": "2011-11-19T05:45:32.470", "AcceptedAnswerId": null, "Title": "cannot convert from 'System.IO.TextWriter' to 'System.IO.Stream'", "Body": "<pre><code> var ssh = new SshClient(\"ip\", \"user\", \"pass\");\n var input = new MemoryStream(Encoding.ASCII.GetBytes(\"exit\\r\\n\"));\n\n var shell = ssh.CreateShell(input, Console.Out, Console.Out, \"xterm\", 80, 24, 800, 600, \"\");\n shell.Stopped += delegate(object sender, EventArgs e)\n {\n Console.WriteLine(\"\\nDisconnected...\");\n };\n shell.Start();\n Thread.Sleep(1000 * 1000);\n shell.Stop();\n</code></pre>\n\n<p>error on this line : </p>\n\n<pre><code>var shell = ssh.CreateShell(input, Console.Out, Console.Out, \"xterm\", 80, 24, 800, 600, \"\");\n</code></pre>\n\n<p>Errors :\nError 3 Argument 2: cannot convert from 'System.IO.TextWriter' to 'System.IO.Stream' D:\\applications area\\test\\ConsoleApplication1\\ConsoleApplication1\\Program.cs 19 48 ConsoleApplication1</p>\n\n<p>Error 4 Argument 3: cannot convert from 'System.IO.TextWriter' to 'System.IO.Stream' D:\\applications area\\test\\ConsoleApplication1\\ConsoleApplication1\\Program.cs 19 61 ConsoleApplication1</p>\n\n<p>any solution ?</p>\n", "Lable": "No"}
5
+ {"QuestionId": 8201197, "AnswerCount": 4, "Tags": "<c#><wpf><mvvm><dependency-injection><unity-container>", "CreationDate": "2011-11-20T11:27:50.563", "AcceptedAnswerId": "8201779", "Title": "Should I use Microsoft.Practicies.Unity.IUnityContainer in my MVVM application?", "Body": "<p>Jason Dolinger in his video located here (hot available right now) www.lab49.com/files/videos/Jason%20Dolinger%20MVVM.wmv (from 0.59 to 1.04) uses such code:</p>\n\n<pre><code>public partial App: Application\n{\n protected override void OnStartup(StartupEventArgs e)\n {\n base.OnStartup(e);\n IUnityContainer container = new UnityContainer();\n RandomQuoteSource source = new RandomQuoteSource();\n container.RegisterInstance&lt;IQuoteSource&gt;(source);\n\n WatchList window = container.Resolve&lt;WatchList&gt;();\n window.Show();\n }\n}\n</code></pre>\n\n<p>He uses class IUnityContainer which I can not found. As I understand here we just create a window (so <code>container.Resolve</code> call can be replaced with <code>new WatchList(...</code>, also somehow we associate <code>RandomQouteSource</code> as an implementation for <code>IQouteSource</code>, however I don't have clear understanding how this should be used later.</p>\n\n<p>The questions are:</p>\n\n<ul>\n<li>how do you create main Windows in your MVVM application, do you also use IUnityContainer for that?</li>\n<li>is it good technics in general? is it well-known? is it default way to do these things? what alternativies do I have?</li>\n<li>where can I find Microsoft.Practicies.Unity.dll?</li>\n</ul>\n", "Lable": "No"}
6
+ {"QuestionId": 8235270, "AnswerCount": 1, "Tags": "<c++><templates><map><functional-programming><c++11>", "CreationDate": "2011-11-22T23:15:32.943", "AcceptedAnswerId": "8235391", "Title": "c++ function map implementation", "Body": "<p>I have been playing around with variadic templates in the new c++ standard and came up with a map function (headers + using decs excluded):</p>\n\n<pre><code>template&lt;typename T&gt;\nT square(T i)\n{\n return i * i;\n}\n\ntemplate &lt;typename T, typename... Ts&gt;\nconst tuple&lt;Ts...&gt; map(const T f, const Ts...args)\n{\n return make_tuple(f(args)...);\n}\n\nint main(int c, char *argv[])\n{\n tuple&lt;int, int&gt; t;\n int (*fp) (int) = square;\n\n t = map(fp, 6, 8);\n\n cout &lt;&lt;get&lt;0&gt;(t) &lt;&lt;endl;\n cout &lt;&lt;get&lt;1&gt;(t) &lt;&lt;endl;\n\n return 0;\n}\n</code></pre>\n\n<p>Which works. As long as all the arguments are the same type for map. If I change the main to use a slightly more general form:</p>\n\n<pre><code> tuple&lt;int, float&gt; t;\n\n t = map(square, 6, 8.0f);\n</code></pre>\n\n<p>gcc 4.4 reports:</p>\n\n<pre><code>In function \u2018int main(int, char**)\u2019:\nerror: no matching function for call to \u2018map(&lt;unresolved overloaded function type&gt;, int, float)\u2019\n</code></pre>\n\n<p>Any ideas how to make this work?</p>\n", "Lable": "No"}
7
+ {"QuestionId": 8317802, "AnswerCount": 1, "Tags": "<java><spring><jsp><jstl><el>", "CreationDate": "2011-11-29T21:12:46.927", "AcceptedAnswerId": "8317943", "Title": "NumberFormatException in a jsp with a list", "Body": "<p>This question is another problem im having with my application which is described <a href=\"https://stackoverflow.com/questions/8235049/spring-mvc-binding-issue\">here</a>. My model (a level) has a list of requirements which contains two strings, an id and name. The model looks like this:</p>\n\n<pre><code>public class Level {\nprivate String name;\nprivate int id;\nprivate int points\nprivate List&lt;Requirement&gt; requirements;\n ....\n}\n\npublic class Requirement{\n private String name;\n private String id;\n ....\n}\n</code></pre>\n\n<p>and the jsp looks like this:</p>\n\n<pre><code>&lt;div id=\"allRequirements\"&gt;\n &lt;c:forEach var=\"requirement\" items=\"${RequirementList}\"&gt;\n &lt;div class=\"requirements\"&gt;\n &lt;input type=\"hidden\" value=\"${requirement.id}\" name=\"id\"/&gt;\n &lt;h2&gt;&lt;c:out value=\"${requirement.name}\"/&gt;&lt;/h2&gt;\n &lt;/div&gt;\n &lt;/c:foreach&gt;\n&lt;/div&gt;\n\n&lt;div id=\"requiredRequirements\"&gt;\n &lt;c:forEach var=\"requiredRequirement\" items=\"${level.requirements}\"&gt;\n &lt;div class=\"requirements\"&gt;\n &lt;input type=\"hidden\" value=\"${requiredRequirement.id}\" name=\"id\"/&gt;\n &lt;h2&gt;&lt;c:out value=\"${requiredRequirement.name}\"/&gt;&lt;/h2&gt;\n &lt;/div&gt;\n &lt;/c:foreach&gt;\n&lt;/div&gt;\n</code></pre>\n\n<p>The jsp page renders fine and works like a charm until I added the requiredRequirements loop in which the site throws a <code>java.lang.NumberFormatException: For input string: \"id\"</code> because it tries to parse the string as an int.</p>\n\n<p>Does anyone have any idea why the first loop works and the second loop does not work?</p>\n\n<p><strong>Edit:\nStack trace</strong></p>\n\n<pre><code>java.lang.NumberFormatException: For input string: \"id\"\nat java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)\nat java.lang.Integer.parseInt(Integer.java:447)\nat java.lang.Integer.parseInt(Integer.java:497)\nat javax.el.ListELResolver.coerce(ListELResolver.java:174)\nat javax.el.ListELResolver.getValue(ListELResolver.java:52)\nat javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67)\nat org.apache.el.parser.AstValue.getValue(AstValue.java:169)\nat org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)\nat org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:985)\nat org.apache.jsp.WEB_002dINF.jsp.createOrEdit_005fLevelBody_jsp._jspx_meth_c_005fout_005f0(createOrEdit_005fLevelBody_jsp.java:648)\nat org.apache.jsp.WEB_002dINF.jsp.createOrEdit_005fLevelBody_jsp._jspx_meth_c_005fforEach_005f1(createOrEdit_005fLevelBody_jsp.java:611)\nat org.apache.jsp.WEB_002dINF.jsp.createOrEdit_005fLevelBody_jsp._jspService(createOrEdit_005fLevelBody_jsp.java:207)\nat org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)\nat javax.servlet.http.HttpServlet.service(HttpServlet.java:722)\nat org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)\nat org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)\nat org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)\nat javax.servlet.http.HttpServlet.service(HttpServlet.java:722)\nat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)\nat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\nat org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)\nat org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)\nat org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)\nat org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:927)\nat org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:684)\nat org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:678)\nat org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:103)\nat org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96)\nat org.apache.tiles.renderer.impl.UntypedAttributeRenderer.write(UntypedAttributeRenderer.java:61)\nat org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103)\nat org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:659)\nat org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:337)\nat org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:234)\nat org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:211)\nat org.apache.tiles.jsp.taglib.RenderTag.doEndTag(RenderTag.java:220)\nat org.apache.jsp.WEB_002dINF.jsp.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f3(layout_jsp.java:411)\nat org.apache.jsp.WEB_002dINF.jsp.layout_jsp._jspService(layout_jsp.java:196)\nat org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)\nat javax.servlet.http.HttpServlet.service(HttpServlet.java:722)\nat org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)\nat org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)\nat org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)\nat javax.servlet.http.HttpServlet.service(HttpServlet.java:722)\nat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)\nat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\nat org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)\nat org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)\nat org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)\nat org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:927)\nat org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:684)\nat org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:678)\nat org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:103)\nat org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96)\nat org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)\nat org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103)\nat org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:659)\nat org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:678)\nat org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:633)\nat org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:322)\nat org.apache.tiles.jsp.taglib.InsertDefinitionTag.renderContext(InsertDefinitionTag.java:66)\nat org.apache.tiles.jsp.taglib.InsertTemplateTag.render(InsertTemplateTag.java:81)\nat org.apache.tiles.jsp.taglib.RenderTag.doEndTag(RenderTag.java:220)\nat org.apache.jsp.WEB_002dINF.jsp.createOrEdit_005fLevel_jsp._jspx_meth_tiles_005finsertDefinition_005f0(createOrEdit_005fLevel_jsp.java:87)\nat org.apache.jsp.WEB_002dINF.jsp.createOrEdit_005fLevel_jsp._jspService(createOrEdit_005fLevel_jsp.java:60)\nat org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)\nat javax.servlet.http.HttpServlet.service(HttpServlet.java:722)\nat org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)\nat org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)\nat org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)\nat javax.servlet.http.HttpServlet.service(HttpServlet.java:722)\nat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)\nat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\nat org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)\nat org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)\nat org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)\nat org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)\nat org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)\nat org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)\nat org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)\nat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)\nat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)\nat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)\nat org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)\nat javax.servlet.http.HttpServlet.service(HttpServlet.java:621)\nat javax.servlet.http.HttpServlet.service(HttpServlet.java:722)\nat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)\nat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\nat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)\nat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)\nat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)\nat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)\nat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)\nat org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)\nat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)\nat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)\nat org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:306)\nat org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:323)\nat org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1719)\nat java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)\nat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)\nat java.lang.Thread.run(Thread.java:619)\n</code></pre>\n\n<p>Thanks</p>\n", "Lable": "No"}
8
+ {"QuestionId": 8332143, "AnswerCount": 2, "Tags": "<c#><visual-studio-2010><c#-4.0><silverlight-4.0>", "CreationDate": "2011-11-30T19:57:38.450", "AcceptedAnswerId": null, "Title": "how to do this so it does show \"No Value\" instead of getting caught in an error", "Body": "<p>I am using the following code which works fine as long as I dont have one of the child node (e.g. URL) missing. If it\nis missing then my code errors out. How can I make it to not error out and just return a string \"No Value\" instead.</p>\n\n<p>here is my code</p>\n\n<pre><code>string widgetsInfo = \n loaded.Descendants(\"widget\")\n .Select((w, i) =&gt;\n new\n {\n WidgetIndex = i,\n URL = w.Descendants(\"url\").FirstOrDefault().Value,\n Category = w.Descendants(\"PortalCategoryId\").FirstOrDefault().Value\n })\n .Select(w =&gt; String.Format(\"Index:{0}; URL:{1}; CATEGORY:{2}; \",\n w.WidgetIndex, w.URL, w.Category))\n .Aggregate((acc, next) =&gt; acc + Environment.NewLine + next);\n</code></pre>\n\n<p>here is the xml that I am parsing</p>\n\n<pre><code>string xml = @\"&lt;?xml version='1.0' encoding='UTF-8'?&gt;\n&lt;widgets&gt;\n &lt;widget&gt;\n &lt;url&gt;~/Portal/Widgets/ServicesList.ascx&lt;/url&gt;\n &lt;castAs&gt;ServicesWidget&lt;/castAs&gt;\n &lt;urlType&gt;ascx&lt;/urlType&gt;\n &lt;parameters&gt;\n &lt;PortalCategoryId&gt;3&lt;/PortalCategoryId&gt;\n &lt;/parameters&gt;\n &lt;/widget&gt;\n &lt;widget&gt;\n &lt;url&gt;www.omegacoder.com&lt;/url&gt;\n &lt;castAs&gt;ServicesWidget&lt;/castAs&gt;\n &lt;urlType&gt;htm&lt;/urlType&gt;\n &lt;parameters&gt;\n &lt;PortalCategoryId&gt;41&lt;/PortalCategoryId&gt;\n &lt;/parameters&gt;\n &lt;/widget&gt;\n&lt;/widgets&gt;\";\n</code></pre>\n", "Lable": "No"}
9
+ {"QuestionId": 8573508, "AnswerCount": 4, "Tags": "<eclipse><java>", "CreationDate": "2011-12-20T09:46:21.393", "AcceptedAnswerId": "8573541", "Title": "Get Eclipse IDE to show version of Java RE it's using", "Body": "<p>I've just installed proper JRE rather than the OpenJDK, I was wondering if there is an easy way to find out which RE Eclipse is using? Maybe in a help menu or something.</p>\n\n<p>Thanks</p>\n", "Lable": "No"}
oraclechunk13.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"QuestionId": 8779574, "AnswerCount": 1, "Tags": "<ios><uitableview>", "CreationDate": "2012-01-08T17:25:13.273", "AcceptedAnswerId": "8779703", "Title": "UITableView only with Images", "Body": "<p>I'm developing an iOS App and I want to make a table view, but only with images like the <a href=\"http://i.stack.imgur.com/ZwpkE.jpg\" rel=\"nofollow\">6G Nano images app</a>. Does anyone know how to implement that?</p>\n", "Lable": "No"}
2
+ {"QuestionId": 8877080, "AnswerCount": 2, "Tags": "<c#><wpf><listbox><anonymous-types><multi-select>", "CreationDate": "2012-01-16T07:58:22.020", "AcceptedAnswerId": "8877209", "Title": "Retrieving selected values from ListBox with multiselect", "Body": "<p>I have one WPF ListBox loaded using LINQ:</p>\n\n<pre><code>lbxCalculosSec.ItemsSource = from p in database.CALCULOS\n orderby p.NOMBRECALCULO\n select new { ID = p.IDCALCULO, NOMBRE = p.NOMBRECALCULO + \" - \" + p.DESCRIPCIONCALCULO };\n\nlbxCalculosSec.DisplayMemberPath = \"NOMBRE\";\nlbxCalculosSec.SelectedValuePath = \"ID\";\n</code></pre>\n\n<p>The listbox has multiselect = true. The problem is when I try to retrieve all the SelectedValue's (ID's) from SelectedItems List.</p>\n\n<p>When I inspect one SelectedItem at runtime, the object type is \"&lt;>f__AnonymousType0`2\"</p>\n\n<p>I tried using this:</p>\n\n<pre><code>ItemPropertyInfo ID = null;\n\nlbxCalculosSec.SelectedItem.GetType().GetProperty(\"ID\").GetValue(ID as ItemPropertyInfo, null)\n</code></pre>\n\n<p>But it didn't work.</p>\n\n<p>I need a solution to access ListBox Selected Values (ID fields).</p>\n\n<p>Thank you very much in advance.</p>\n\n<p>Kind Regards.</p>\n", "Lable": "No"}
3
+ {"QuestionId": 8929554, "AnswerCount": 1, "Tags": "<c++><rtti>", "CreationDate": "2012-01-19T16:24:09.210", "AcceptedAnswerId": null, "Title": "Custom run-time type system/ library for C++", "Body": "<p>In an application I'm making at the moment, I have an <code>EventDispatcher</code> class that works with a base <code>Event</code> class. The dispatcher is not templated, it works with the run-time types of each event; this is to allow scripts to inherit from the base <code>Event</code> class and make their own types of events.</p>\n\n<p>It'd like this event dispatcher to handle inheritance of events as well. For example, I have <code>FooEvent</code> that inherits from a <code>FooBaseEvent</code>; whenever a <code>FooEvent</code> occurs, callbacks interested in <code>FooBaseEvent</code> are also notified, but not the other way around.</p>\n\n<p>Is there any library that would make this easier? Remember that inheritance checking should be extended to events defined in scripts as well.</p>\n\n<p>(The scripting language is Python, but that shouldn't matter so much.)</p>\n\n<hr>\n\n<p><strong>Edit:</strong> My <code>EventDispatcher</code> has the following interface (Python):</p>\n\n<pre><code>class EventDispatcher:\n def subscribe(self, event_type, callback) -&gt; EventDispatcher.Subscription\n def post(self, event)\n\n class Subscription:\n def cancel(self)\n def alive(self) -&gt; bool\n</code></pre>\n", "Lable": "No"}
4
+ {"QuestionId": 8974040, "AnswerCount": 2, "Tags": "<php><html><simple-html-dom>", "CreationDate": "2012-01-23T15:27:08.793", "AcceptedAnswerId": "8974103", "Title": "Why is this foreach failing?", "Body": "<p>The script I am using 'gets' a html page and parses is showing only the .jpg images within, but I need to make some modifications and when i do it simply fails...</p>\n\n<p>This works:</p>\n\n<pre><code>include('simple_html_dom.php');\n\nfunction getUrlAddress() {\n $url = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';\n return $url .'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n}\n\n$html = file_get_html($url);\n\nforeach($html-&gt;find('img[src$=jpg]') as $e)\n echo '&lt;img src='.$e-&gt;src .'&gt;&lt;br&gt;';\n</code></pre>\n\n<p>However, there are some problems... I only want to show images over a certain size, plus some site do not display full URL in the img tag and so need to try to get around that too... so I have done the following:</p>\n\n<pre><code>include('simple_html_dom.php');\n\nfunction getUrlAddress() {\n $url = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';\n return $url .'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n}\n\n$html = file_get_html($url);\n\nforeach($html-&gt;find('img[src$=jpg]') as $e)\n $image = $e-&gt;src;\n\n// check to see if src has domain\nif (preg_match(\"/http/\", $e-&gt;src)) { \n $image = $image; \n} else {\n $parts = explode(\"/\",$url);\n $image = $parts['0'].\"//\".$parts[1].$parts[2].$e-&gt;src;\n}\n\n$size = getimagesize($image);\n\necho \"&lt;br /&gt;&lt;br /&gt;size is {$size[0]}\";\necho '&lt;img src='.$image.'&gt;&lt;br&gt;';\n</code></pre>\n\n<p>This works, but only returns the first image.</p>\n\n<p>On the example link below there are 5 images, which the first code shows but does not display them as the src is without the leading domain</p>\n\n<p><a href=\"http://direct.tesco.com/q/R.211-7611.aspx\" rel=\"nofollow\">Example link as mentioned above</a></p>\n\n<p>Is there a better way to do this? And why does the loop fail?</p>\n", "Lable": "No"}
5
+ {"QuestionId": 9036482, "AnswerCount": 3, "Tags": "<java><frame-rate>", "CreationDate": "2012-01-27T16:15:33.333", "AcceptedAnswerId": "9036801", "Title": "Is it good practice to cache parts of a 2D drawing?", "Body": "<p>I'm making a 2D game in Java and one of the main issues causing low FPS (on my slow laptop) is having to re-draw complex structures to a Graphics instance, such as dials with markings.</p>\n\n<p>The dial and its markings will never change unless the window is resized, so I thought it would be a good idea to draw to a <code>BufferedImage</code> and just re-draw the image rather than re-drawing the details. The position of the needle obviously changes, so this can just be drawn on top.</p>\n\n<p>I've never heard about this being done to improve the FPS of 2D games so I'm wondering if it's actually good practice to store a cache of images or if there's a better way to solve this sort of problem? Are there any issues associated with this that I haven't considered?</p>\n", "Lable": "No"}
6
+ {"QuestionId": 9040355, "AnswerCount": 5, "Tags": "<iphone><notifications><message><center>", "CreationDate": "2012-01-27T21:32:37.430", "AcceptedAnswerId": null, "Title": "Alternative to NSDistributedNotificationCenter for comms between iPhone apps", "Body": "<p>I've been looking for a way to compare timestamps between applications on the same phone in real time, and NSDistributedNotificationCenter sounded like an ideal solution since i may not know the names of the apps listening for it, but it sounds like its not available in iOS.</p>\n\n<p>Is there an equivalent way of notifying multiple apps of a time-sensitive event without knowing their name? </p>\n\n<p>Coding for iOS 5+ and assuming the apps in question will register for the notification.</p>\n", "Lable": "No"}
7
+ {"QuestionId": 9060146, "AnswerCount": 1, "Tags": "<objective-c><optional-parameters>", "CreationDate": "2012-01-30T06:26:17.983", "AcceptedAnswerId": "9405083", "Title": "How to make method like UIActionSheet initWithTitle", "Body": "<p>How can i make method with parameter is unlimited array like this :</p>\n\n<pre><code>UIActionSheet *actionSheet = [[[UIActionSheet alloc]\n initWithTitle:@\"Test Title\"\n delegate:self\n cancelButtonTitle:@\"Cancel\"\n destructiveButtonTitle:@\"Destructive\"\n otherButtonTitles: @\"abc\", @\"xyz\",\n nil] autorelease];\n</code></pre>\n\n<p>In above code, parameter otherButtonTitles can have unlimit number of NSString like \"abc\", \"xyz\",..\nCan do this with other type of parameter?<br>\nThanks in advance!.</p>\n", "Lable": "No"}
8
+ {"QuestionId": 9074893, "AnswerCount": 3, "Tags": "<ruby-on-rails>", "CreationDate": "2012-01-31T05:31:54.590", "AcceptedAnswerId": null, "Title": "undefined local variable or method `config' for main:Object - rails", "Body": "<p>When I run the rails application, I get the following error:</p>\n\n<blockquote>\n <p>undefined local variable or method \"config\" for main:Object</p>\n</blockquote>\n\n<p>How can I resolve it?</p>\n", "Lable": "No"}
9
+ {"QuestionId": 9141619, "AnswerCount": 1, "Tags": "<google-maps><jquery-mobile>", "CreationDate": "2012-02-04T14:37:41.407", "AcceptedAnswerId": "18978552", "Title": "After Upgrading JQuery Mobile to 1.0.1, Code Isn't Working", "Body": "<p>This works just fine, with JQM 1.0a1:</p>\n\n<pre class=\"lang-html prettyprint-override\"><code>&lt;!DOCTYPE HTML&gt;\n&lt;html lang=\"en-US\"&gt;\n&lt;head&gt;\n&lt;meta charset=\"UTF-8\"&gt;\n&lt;title&gt;Main Page&lt;/title&gt;\n&lt;link rel=\"stylesheet\" href=\"http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css\" /&gt;\n&lt;script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\"&gt;&lt;/script&gt;\n&lt;script src=\"http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js\"&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n&lt;div data-role=\"page\"&gt;\n&lt;div data-role=\"header\"&gt;&lt;h1&gt;Main Page&lt;/h1&gt;&lt;/div&gt;\n&lt;div data-role=\"content\"&gt;&lt;p&gt;&lt;a href=\"#map\"&gt;Map&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;\n&lt;/div&gt;\n&lt;script type=\"text/javascript\" src=\"http://maps.google.com/maps/api/js?sensor=false\"&gt;&lt;/script&gt;\n&lt;script type=\"text/javascript\"&gt;\n\n $('#map').live(\"pagecreate\", function() {\n initialize(1.359,103.818);\n });\n\n\n function initialize(lat,lng) {\n var latlng = new google.maps.LatLng(lat, lng);\n var myOptions = {\n zoom: 8,\n center: latlng,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n };\n var map = new google.maps.Map(document.getElementById(\"map_canvas\"),myOptions);\n }\n\n\n&lt;/script&gt;\n\n&lt;div id=\"map\" data-role=\"page\" data-theme=\"b\" class=\"page-map\" style=\"width:100%; height:100%;\"&gt;\n&lt;div data-role=\"header\"&gt;&lt;h1&gt;Map Page&lt;/h1&gt;&lt;/div&gt;\n&lt;div data-role=\"content\" style=\"width:100%; height:100%; padding:0;\"&gt; \n &lt;div id=\"map_canvas\" style=\"width:100%; height:100%;\"&gt;&lt;/div&gt;\n&lt;/div&gt;\n&lt;/div&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n\n<p>But the same using JQM 1.0.1 (<a href=\"http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js\" rel=\"nofollow\">http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js</a>) doesn't show the map at all. I tried using <code>$('#map').on</code> and <code>\"pageinit\"</code> to no avail.</p>\n\n<p>What am I missing?</p>\n\n<p><strong>UPDATE</strong>: same behavior with JQuery 1.6.3</p>\n\n<p><strong>UPDATE2</strong>: by giving an absolute size (eg height: 200px; width: 200px;) to the #map-canvas div, it works fine.</p>\n", "Lable": "No"}
10
+ {"QuestionId": 9144856, "AnswerCount": 3, "Tags": "<php><stop-words>", "CreationDate": "2012-02-04T21:48:10.057", "AcceptedAnswerId": null, "Title": "Stop Words into a string", "Body": "<p>I want to create a function in PHP that will return true when it finds that in the string there are some bad words.</p>\n\n<p>Here is an example:</p>\n\n<pre><code>function stopWords($string, $stopwords) {\nif(the words in the stopwords variable are found in the string) {\nreturn true;\n}else{\nreturn false;\n}\n</code></pre>\n\n<p>Please assume that <code>$stopwords</code> variable is an array of values, like:</p>\n\n<pre><code>$stopwords = array('fuc', 'dic', 'pus');\n</code></pre>\n\n<p>How can I do that?</p>\n\n<p>Thanks</p>\n", "Lable": "No"}
11
+ {"QuestionId": 9178734, "AnswerCount": 2, "Tags": "<css><less><mixins>", "CreationDate": "2012-02-07T15:15:05.753", "AcceptedAnswerId": "9189245", "Title": "LESS syntax for .mixin > *", "Body": "<p>I am using LESS and im trying for a type of mixin.</p>\n\n<p>I have this mixin:</p>\n\n<pre><code>.mixin, .mixin &gt; * {\n font:arial;\n}\n</code></pre>\n\n<p>and i want to use it as a mix in so.</p>\n\n<pre><code>.my-class {\n color:#000;\n .mixin;\n}\n</code></pre>\n\n<p>becomes</p>\n\n<pre><code>.my-class {\n color:#000;\n}\n\n.my-class, .my-class &gt; * {\n font:arial;\n}\n</code></pre>\n\n<p>But it doesnt work, probobly because i cannot use mixins like that. Or can I? How do i write them then? Cannot find this information in the documentation of LESS.</p>\n", "Lable": "No"}
12
+ {"QuestionId": 9240763, "AnswerCount": 1, "Tags": "<jquery><for-loop>", "CreationDate": "2012-02-11T13:57:45.603", "AcceptedAnswerId": "9240801", "Title": "Working with for loop and jquery load event for multiple images return only the last loaded one props", "Body": "<p>I'm working with a <code>jQuery plug-in</code> useful to zoom the resized background images with the mouse interaction.</p>\n\n<p>To make it work, I thought to use an <code>array</code> of <code>objects</code> with the <code>width</code> and <code>height</code> of a <code>background-image</code> of every element I bring to it.</p>\n\n<p>To do this I've created an empty <code>img</code> element, set the <code>src</code> attribute to the background image, and once it's loaded getting <code>width</code> and <code>height</code>.</p>\n\n<p>I've thought to handle it starting in a <code>for loop</code> which prepares every image, when the jQuery event <code>load</code> is called I create the new array element with every info about the loaded image.</p>\n\n<p>It seems the <code>load</code> event sets the first loaded image, and apply the same properties to every element loaded after it, how can I avoid this problem?</p>\n\n<pre><code>// this is a portion of the plugin\n\nvar setImageSize = function (i) {\n return function (e) {\n // I use the extend method only to get different zoom animation if they are added by the user\n instances[i] = {id:i, element:this_obj.get(i), settings:$.extend(true, defaults, options)};\n instances[i].settings.bg.url = getBackgroundUrl(i);\n instances[i].settings.bg.width = parseInt($(this).width());\n instances[i].settings.bg.height = parseInt($(this).height());\n updateDefaultValues(instances[i]);\n $(instances[i].element).hover(setRollOver(i), setRollOut(i));\n $(window).resize(getUpdateDefaultValues(i));\n $('#debug').html($('#debug').html() + 'image loaded: ' + i + ' url:' + instances[i].settings.bg.url +'&lt;br/&gt;width: '+ instances[i].settings.bg.width +' height: '+ instances[i].settings.bg.height +'&lt;br&gt;- - - - - &lt;br&gt;');\n $(this).remove();\n }\n}\n\nvar prepareImageSize = function (i) {\n var img = $('&lt;img id=\"jquery-background-zoom-'+i+'\"/&gt;');\n img.hide();\n img.bind('load', setImageSize(i));\n $('body').append(img);\n img.attr('src', getBackgroundUrl(i));\n}\n\nvar init = function () {\n for (var i = 0; i &lt; this_obj.length; i ++) {\n prepareImageSize (i);\n }\n}\n\ninit();\n</code></pre>\n\n<p>I've reported a full working example here at <a href=\"http://jsfiddle.net/tonino/CFPTa/\" rel=\"nofollow\">http://jsfiddle.net/tonino/CFPTa/</a></p>\n\n<p>In the plug-in I've added a script to see how the images are set, then if you try to interact with the images you'll notice the props of every images are overwritten by the last loaded image, I'm not sure how?</p>\n\n<p>It seems like the load event overwrite previous load event or something, how can I fix it?</p>\n", "Lable": "No"}
13
+ {"QuestionId": 9309288, "AnswerCount": 2, "Tags": "<opencl><gpgpu>", "CreationDate": "2012-02-16T10:09:06.443", "AcceptedAnswerId": "9313325", "Title": "OpenCL- waste of host computing power", "Body": "<p>I am new to OpenCL, please tell me that the host cpu can be used only for allocating memory to the device, or we can use it can as an openCL device. (Because after the allocation is done, the host cpu will be idle). </p>\n", "Lable": "No"}
14
+ {"QuestionId": 9366780, "AnswerCount": 1, "Tags": "<php><vb.net><vb.net-2010><awesomium>", "CreationDate": "2012-02-20T18:55:53.723", "AcceptedAnswerId": null, "Title": "Awesomium with .NET VS2010 (ObjectForScripting)", "Body": "<p>I'm having some issues finding examples of how to use the Awesomium web browser control in vb.net with objectforscripting. I know that objectforscripting isn't the same for the webcontrol used with awesomium since its HTML5 and not the traditional IE control that comes with vs 2010.</p>\n\n<p>The issue I'm having is finding any info/examples on how to communicate with the awesomium web browser control with my javascript. It's quite easy with the IE built in control with objectforscripting. I've found samples of how to do it in C# but I don't see any info of how I could do it just in VB. I've searched several things in google and I just can't seem to find anything on how to do it.</p>\n\n<p>So for example, I would have a button in a php page that the webcontrol browsers to and if I click the button it closes the application down. So I need to communicate using window.external with the webcontrol in VB.</p>\n", "Lable": "No"}
oraclechunk14.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {"QuestionId": 9410414, "AnswerCount": 1, "Tags": "<ruby-on-rails><ruby-on-rails-3><model-view-controller><routes><belongs-to>", "CreationDate": "2012-02-23T09:38:47.513", "AcceptedAnswerId": "9410640", "Title": "Rails: Forum has_many topics, saving the association?", "Body": "<p>I might be going about this the wrong way in the first place, so I will give a bit of background first.</p>\n\n<p>As you can tell from the title, I am building a forum from scratch. I thought it was working correctly; however, I am a bit unsure as to how to update/save the forum object from within the topics \"create\" method in it's controller.</p>\n\n<p>What I tried to do:\nIn the \"New\" method, I sent the Forum's id via the routing. So on the new-topic page has a address that looks like this: \"localhost:3000/new-topic/1\". The one being the Forum's id. In the method itself, I try to attach it to the new topic object.</p>\n\n<pre><code>@topic = Topic.new\n@topic.forum = Forum.find(params[:id])\n</code></pre>\n\n<p>My create method then tries to use that forum.</p>\n\n<pre><code>@topic = Topic.new(params[:topic])\n@topic.forum.topics &lt;&lt; @topic #Simplified down.\nif @topic.save\n @topic.forum.save\n...\n</code></pre>\n\n<p>I get the feeling that I am going about this the wrong way. I was looking at someone's tutorial and they got the forum by calling params[:forum_id] but they didn't show they routing they did to achieve that.</p>\n\n<p>How do I do this correctly and/or what is the correct way to route all of this? For the record, I do plan on using this same method for the Topic => Post association. Thanks for any help.</p>\n", "Lable": "No"}
2
+ {"QuestionId": 9490260, "AnswerCount": 1, "Tags": "<c#><json><highcharts>", "CreationDate": "2012-02-28T21:48:00.390", "AcceptedAnswerId": "9575650", "Title": "Pass JSON data from a .NET WebHandler to redraw Pie Highcharts with new series data", "Body": "<p>I want to create a page displaying a default pie chart and a few buttons. When the user clicks on the buttons, the page will get new JSON data from a <code>WebHandler</code> and redraw the chart. I'm using .net 2.0, C#, web forms.</p>\n\n<p>I have this <code>WebHandler</code> <code>json.ashx</code> generating the JSON:</p>\n\n<pre><code>public void ProcessRequest (HttpContext context) { \n String data = String.Empty;\n data += \"[{\\\"Male\\\": 80.0}, {\\\"Female\\\": 20.0}]\";\n context.Response.ContentType = \"application/json\";\n context.Response.Write(data);\n}\n</code></pre>\n\n<p>Here is my script on the aspx page:</p>\n\n<pre><code> var chart = null;\n\n $(document).ready(function () {\n\n var options = {\n chart: {\n renderTo: 'container',\n defaultSeriesType: 'pie'\n },\n tooltip: {\n formatter: function () {\n return '&lt;b&gt;' + this.point.name + '&lt;/b&gt;: ' + this.y + ' (' + this.percentage + '%)';\n }\n },\n plotOptions: {\n pie: {\n allowPointSelect: true,\n cursor: 'pointer',\n dataLabels: {\n enabled: true,\n color: '#000000',\n connectorColor: '#000000',\n formatter: function () {\n return '&lt;b&gt;' + this.point.name + '&lt;/b&gt;: ' + this.y + ' (' + this.percentage + '%)';\n }\n }\n }\n },\n series: [{\n data: [['Yes', 60], ['No', 40]]\n }]\n\n };\n\n var chart = new Highcharts.Chart(options);\n\n\n $(\"#Gender\").click(function () {\n $.get('json.ashx', function (data) {\n options.series = data;\n var chart = new Highcharts.chart(options);\n });\n });\n\n });\n</code></pre>\n\n<p>when I click on the <code>Gender</code> button, it does not generate the new chart. How do I properly parse the JSON data and feed it to the <code>series.data</code> of the new pie chart?</p>\n", "Lable": "No"}
3
+ {"QuestionId": 9519546, "AnswerCount": 1, "Tags": "<c#><asp.net><.net><user-controls><pagination>", "CreationDate": "2012-03-01T16:02:27.417", "AcceptedAnswerId": "11615051", "Title": ".NET C# - Passing parent controls to a pagination .ascx control?", "Body": "<p>On a project I'm working on, I have many &lt;asp:ListView&gt; controls, which are paginated using &lt;asp:DataPager&gt; controls. Instead of copying and pasting the controls to each .aspx page where I have a paginated list, would it be possible to break out the &lt;asp:DataPager&gt; controls into a reusable/modular .ascx control and create a field on it to pass in the PagedControlID?</p>\n\n<p>I've tried this in the past but couldn't not seem to target the PagedControlID in the Parent page.</p>\n\n<p>Here's what I've got so far. Any help would be much appreciated.</p>\n\n<h2>.aspx Page</h2>\n\n<pre><code>&lt;abc:Pagination ID=\"uxPagination\" ListControlID=\"uxEventListView\" runat=\"server\" /&gt;\n</code></pre>\n\n<h2>.ascx Pagination Control</h2>\n\n<pre><code>&lt;asp:DataPager ID=\"uxDataPager\" PageSize=\"1\" runat=\"server\" /&gt;\n</code></pre>\n\n<h2>.ascx.cs Pagination Control</h2>\n\n<pre><code>public partial class ABC_UserControls_Pagination : System.Web.UI.UserControl\n{\n private string listControlID;\n\n public string ListControlID\n {\n get { return listControlID; }\n set { listControlID = value; }\n }\n\n protected void Page_Load(object sender, EventArgs e)\n {\n if (!string.IsNullOrEmpty(ListControlID))\n {\n uxDataPager.PagedControlID = ListControlID;\n }\n }\n}\n</code></pre>\n", "Lable": "No"}
4
+ {"QuestionId": 9604589, "AnswerCount": 2, "Tags": "<powershell><php>", "CreationDate": "2012-03-07T15:46:18.340", "AcceptedAnswerId": "9604661", "Title": "Run PHP CLI from Windows Powershell ISE", "Body": "<p>This question is regarding dollar signs \"$\" <code>$</code> in Windows PowerShell ISE.</p>\n\n<p>I have PHP CLI and want to run one liner command scripts from the prompt in Windows PowerShell ISE.</p>\n\n<p><code>php -r \"$foo = 'foo';\"</code></p>\n\n<p>Just returns <code>Parse error: parse error in Command line code on line 1</code> and I've narrowed it down to the pesky dollar sign which is significant in PowerShell. Can I escape it somehow?</p>\n\n<p>I also tried </p>\n\n<p><code>php -r '$foo = \"foo\";'</code> </p>\n\n<p>and get </p>\n\n<p><code>Notice: Use of undefined constant foo - assumed 'foo' in Command line code on line 1</code></p>\n", "Lable": "No"}
5
+ {"QuestionId": 9917131, "AnswerCount": 2, "Tags": "<python><virtualenv>", "CreationDate": "2012-03-28T23:29:56.047", "AcceptedAnswerId": "9917539", "Title": "virtualenv bug?", "Body": "<p>I am trying to run the following script in my virtualenv:</p>\n\n<pre><code>(python2.7.2-gonvaled1)gonvaled@lycaon:~/.virtualenvs/python2.7.2-gonvaled1$ couchy.py\nTraceback (most recent call last):\n File \"/home/gonvaled/projects/bin/couchy.py\", line 46, in &lt;module&gt;\n from couchdb_support import CouchdbLists\n File \"/home/gonvaled/projects/test_project/python_modules/couchdb_support.py\", line 3615, in &lt;module&gt;\n from asterisk_support import AsteriskSupport\n File \"/home/gonvaled/projects/test_project/python_modules/asterisk_support.py\", line 4, in &lt;module&gt;\n from starpy_support import AmiCommand\n File \"/home/gonvaled/projects/test_project/python_modules/starpy_support.py\", line 7, in &lt;module&gt;\n from starpy import manager, fastagi, utilapplication, menu\n File \"/usr/lib/python2.5/site-packages/starpy/utilapplication.py\", line 2, in &lt;module&gt;\n from basicproperty import common, propertied, basic, weak\n File \"/usr/lib/python2.5/site-packages/basicproperty-0.6.12a-py2.5-linux-i686.egg/basicproperty/common.py\", line 159, in &lt;module&gt;\n from basictypes import datedatetime_types as ddt\n File \"/usr/lib/python2.5/site-packages/basicproperty-0.6.12a-py2.5-linux-i686.egg/basictypes/datedatetime_types.py\", line 4, in &lt;module&gt;\n from dateutil import parser \n File \"/usr/lib/python2.5/site-packages/python_dateutil-2.1-py2.5.egg/dateutil/parser.py\", line 8\n from __future__ import unicode_literals\nSyntaxError: future feature unicode_literals is not defined\n</code></pre>\n\n<p>So somehow python is trying to import from:</p>\n\n<pre><code>/usr/lib/python2.5/site-packages/starpy/utilapplication.py\n</code></pre>\n\n<p>This does not make any sense. My virtualenv is very clean:</p>\n\n<pre><code>(python2.7.2-gonvaled1)gonvaled@lycaon:~/.virtualenvs/python2.7.2-gonvaled1$ python\nPython 2.7.2 (default, Mar 29 2012, 00:31:29) \n[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; import sys\n&gt;&gt;&gt; sys.path \n['', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/site-packages/pip-1.1-py2.7.egg', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/site-packages/Twisted-12.0.0-py2.7-linux-i686.egg', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/site-packages/zope.interface-3.8.0-py2.7-linux-i686.egg', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/site-packages/basicproperty-0.6.12a-py2.7-linux-i686.egg', '/home/gonvaled/projects/gonvaled_settings', '/home/gonvaled/django_apps', '/home/gonvaled/projects/test_project/ipc', '/home/gonvaled/projects/test_project/python_modules', '/home/gonvaled/projects/test_project/gdata', '/home/gonvaled/projects/callisto/libraries', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python27.zip', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/plat-linux2', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/lib-tk', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/lib-old', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/lib-dynload', '/usr/local/python/2.7.2/lib/python2.7', '/usr/local/python/2.7.2/lib/python2.7/plat-linux2', '/usr/local/python/2.7.2/lib/python2.7/lib-tk', '/home/gonvaled/.virtualenvs/python2.7.2-gonvaled1/lib/python2.7/site-packages']\n</code></pre>\n\n<p>And:</p>\n\n<pre><code>(python2.7.2-gonvaled1)gonvaled@lycaon:~/.virtualenvs/python2.7.2-gonvaled1$ pip freeze\nCouchDB==0.9dev\nDateUtils==0.5.1\nTwisted==12.0.0\nbasicproperty==0.6.12a\npystache==0.4.0\npython-dateutil==2.1\npytz==2012b\nsimplejson==2.4.0\nsix==1.1.0\nstarpy==1.0.0a12\nwsgiref==0.1.2\nzope.interface==3.8.0\n</code></pre>\n\n<p>So to summarize: python is importing from <code>/usr/lib/python2.5/site-packages</code> even though I am inside a virtualenv. How can this be?</p>\n", "Lable": "No"}
6
+ {"QuestionId": 10119397, "AnswerCount": 2, "Tags": "<mysql><database-design>", "CreationDate": "2012-04-12T07:38:51.677", "AcceptedAnswerId": "10119466", "Title": "database design with variable columns (mysql)", "Body": "<p>I am working on a problem where I am trying to figure out the best way to design the Db tables for this. Lets say I have multiple books and each book has variable number of pages in it...I need to track page views for every book </p>\n\n<p>e.g. Book 1 = 10 pages , Book 2 = 20 pages, Book 3 and 100 pages and so on \nAs the user views each page in a book, I need to log that information.</p>\n\n<p>The motive is to come up with some aggregation numbers on the %views of each book. I should be able to say e.g. \"70% people read Book 1 upto Page 7 and then drop off\" </p>\n\n<p>I envision it as </p>\n\n<pre><code>book 1 page 1 1000 views\nbook 1 page 2 950 views\nbook 1 page 3 800 views\n.....\n...\nbook 1 page 10 50 views\n</code></pre>\n\n<p>and with this I can generate a drilldown report of sorts</p>\n\n<p>however, with variable page numbers in each book, what is the best way to store this information?</p>\n\n<p>any help would be much appreciated</p>\n", "Lable": "No"}
oraclechunk15.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"QuestionId": 10169237, "AnswerCount": 1, "Tags": "<ios><iphone><uiimage>", "CreationDate": "2012-04-16T05:47:46.133", "AcceptedAnswerId": "10170414", "Title": "UIImage from array", "Body": "<p>I am working with an API which gives me an image as the example below. I am unsure how I can convert this array of values into an image. I have not seen this before.</p>\n\n<p>Does anyone know how I can make the following array of values into a UIImage?</p>\n\n<p><code>[255,216,255,224,0,16,74,70,73,70,0,1,1,1,0,96,...]</code></p>\n", "Lable": "No"}
2
+ {"QuestionId": 10201830, "AnswerCount": 1, "Tags": "<powershell><active-directory><powershell-2.0>", "CreationDate": "2012-04-18T02:04:59.870", "AcceptedAnswerId": "10204290", "Title": "Get-ADComputer and MemberOf", "Body": "<p>I am very new to Powershell and am having an issue when using the <code>Get-ADUser</code> and <code>GetADComputer</code> cmdlets.</p>\n\n<p>I am trying to use the <code>Get-ADComputer</code> and <code>Get-ADUser</code> to retrieve the <code>memberOf</code> from Active-Directory of all the users and computers. It only appears to be retrieving information from users and computers that are in 2 or more groups. Any users/computers that are only in 1 group display nothing.</p>\n\n<p>For example: If UserA is in group Administrators I get no output when I use MemberOf. But if User2 is in both Administrators and Domains Administrators I get some output. However it will only output one of those groups.</p>\n\n<p>Get-ADGroup does the same thing.</p>\n\n<p>Is this normal? I can't imagine it is.</p>\n\n<p>Here is my code:</p>\n\n<pre><code>Get-ADUser -Filter * -Properties * | Select-Object -Property Name,MemberOf | Sort-Object -Property Name\n</code></pre>\n\n<p>Thanks</p>\n", "Lable": "No"}
3
+ {"QuestionId": 10216841, "AnswerCount": 5, "Tags": "<deployment><capistrano>", "CreationDate": "2012-04-18T19:46:28.317", "AcceptedAnswerId": "10290135", "Title": "Passing parameters to Capistrano", "Body": "<p>I'm looking into the possibility of using Capistrano as a generic deploy solution. By \"generic\", I mean not-rails. I'm not happy with the quality of the documentation I'm finding, though, granted, I'm not looking at the ones that presume you are deploying rails. So I'll just try to hack up something based on a few examples, but there are a couple of problems I'm facing right from the start.</p>\n\n<p>My problem is that <code>cap deploy</code> doesn't have enough information to do anything. Importantly, it is missing the tag for the version I want to deploy, and this <em>has</em> to be passed on the command line.</p>\n\n<p>The other problem is how I specify my git repository. Our git server is accessed by SSH on the user's account, but I don't know how to change <code>deploy.rb</code> to use the user's id as part of the scm URL.</p>\n\n<p>So, how do I accomplish these things? </p>\n\n<p><strong>Example</strong></p>\n\n<p>I want to deploy the result of the first sprint of the second release. That's tagged in the git repository as <code>r2s1</code>. Also, let's say user \"johndoe\" gets the task of deploying the system. To access the repository, he has to use the URL <code>johndoe@gitsrv.domain:app</code>. So the remote URL for the repository depends on the user id.</p>\n\n<p>The command lines to get the desired files would be these:</p>\n\n<pre><code>git clone johndoe@gitsrv.domain:app\ncd app\ngit checkout r2s1\n</code></pre>\n", "Lable": "No"}
4
+ {"QuestionId": 10248542, "AnswerCount": 1, "Tags": "<jquery><google-maps>", "CreationDate": "2012-04-20T14:52:09.893", "AcceptedAnswerId": "10251405", "Title": "possible to get the square coordinates using imgAreaSelect and Google Maps?", "Body": "<p>I had seen a site do this a long time ago...</p>\n\n<p>Is it possible to 'crop' an area in GoogleMaps using imgAreaSelect (http://odyniec.net/projects/imgareaselect/) or jCrop and get the coordinates for the square from it?</p>\n\n<p>thx</p>\n", "Lable": "No"}
5
+ {"QuestionId": 10304817, "AnswerCount": 2, "Tags": "<c#><.net><linq><entity-framework-4>", "CreationDate": "2012-04-24T19:36:31.650", "AcceptedAnswerId": null, "Title": "LINQ to EF4 Query Where clause not filtering as expected", "Body": "<p>I've googled for this but can't find anything obviously related, so posting here for some insight. Using LINQ / EF4. Here's the code snippet:</p>\n\n<pre><code> private const string JOB_FAILED = \"Failed\";\n// other code..\n\nvar successfulJobs = context.Jobs.Where(x =&gt; x.Status != JOB_FAILED);\n foreach (Job successfulJob in successfulJobs)\n {\n context.DeleteObject(successfulJob);\n }\n</code></pre>\n\n<p>I would expect successfulJobs to contain all jobs where Job.Status != \"Failed\". However, the code witihn foreach{} executes when Job.Status DOES equal \"Failed\". Am I missing something fundamental here about LINQ\\Lambda?</p>\n\n<p>EDIT: Generated SQL as requested, seems ok.</p>\n\n<pre><code>SELECT \n[Extent1].[Id] AS [Id], \n[Extent1].[Parameters] AS [Parameters], \n[Extent1].[Status] AS [Status], \n[Extent1].[Created] AS [Created], \n[Extent1].[Modified] AS [Modified]\nFROM [bws].[JobRunner_Tasks] AS [Extent1]\nWHERE N'Failed' &lt;&gt; [Extent1].[Status]\n</code></pre>\n", "Lable": "No"}
6
+ {"QuestionId": 10314954, "AnswerCount": 3, "Tags": "<sharepoint><master-pages>", "CreationDate": "2012-04-25T11:47:33.353", "AcceptedAnswerId": null, "Title": "Can the SharePoint 2007 site's MasterPage opened?", "Body": "<p>There was a Sharepoint 2007 site that was maintained without touching the code. People had their masterpage set by using links in the UI, SiteActions>>(under Look &amp; Feel)MasterPage selecting default.master.</p>\n\n<p>Now, they need some changes in the masterpage.</p>\n\n<p>When I opened the site in Sharepoint designer 2007, the masterpage was referenced as MasterPageFile=\"~masterurl/default.master\".</p>\n\n<p>I want to open this master page which they refer to ~masterurl/default.master.</p>\n\n<p>I have checked every .master inside the _catalogs folder but nothing is fruitful.</p>\n\n<p>My task is to identify the masterpage they have used &amp; to modify it.</p>\n\n<p>Help me loacte the master page ~masterurl/default.master</p>\n", "Lable": "No"}
7
+ {"QuestionId": 10397427, "AnswerCount": 4, "Tags": "<git><branch><master>", "CreationDate": "2012-05-01T12:06:50.330", "AcceptedAnswerId": null, "Title": "what should the master branch contain in git", "Body": "<p>I have read about multiple different git branching strategies and I was suprized that the master branch was often used as a 'production-ready' branch and there would be an additional uat and dev branch.\nI'm thinking to set up our git repository with the same 3 branches, but to let 'master' contain the dev code and add a production and uat branch. That way, developers can simply merge to the default git branch (being 'master'). Is there a reason not to do it like that?</p>\n\n<p>gr,</p>\n\n<p>Coen</p>\n", "Lable": "No"}
8
+ {"QuestionId": 10508117, "AnswerCount": 2, "Tags": "<android>", "CreationDate": "2012-05-08T23:53:59.217", "AcceptedAnswerId": "10508135", "Title": "Use onBackPressed to save a file", "Body": "<p>I want to allow users to save a list of favourite items from a list, so I display the full list using a Listview with checkboxes, and the user will check or uncheck items in the list.</p>\n\n<p>When the user presses the back button, I want to be able to save the checked items out to a separate file on the SD card.</p>\n\n<p>I'm using the following method in my Activity:</p>\n\n<pre><code>@Override\n public void onBackPressed() {\n // TODO Auto-generated method stub\n\n }\n</code></pre>\n\n<p>However, the list that I create within my OnCreate method is not available within the onBackPressed method - ie it's out of scope.</p>\n\n<p>If I try and pass the list into the onBackPressed method as follows:</p>\n\n<pre><code>@Override\n public void onBackPressed(ArrayList&lt;HashMap&lt;String, Object&gt;&gt; checked_list) {\n // TODO Auto-generated method stub\n\n }\n</code></pre>\n\n<p>Then I get the error:</p>\n\n<p>\"The method onBackPressed(ArrayList>) of type SetFavourites must override or implement a supertype method\" and Eclipse prompts to remove the @Override.</p>\n\n<p>But when I do this, then the onBackPressed method never gets called.</p>\n\n<p>How can I pass variables into the onBackPressed method so that I can perform actions on data within my Activity before exiting?</p>\n\n<p>Thanks</p>\n", "Lable": "No"}
9
+ {"QuestionId": 10535227, "AnswerCount": 2, "Tags": "<jsf-2><weblogic><myfaces>", "CreationDate": "2012-05-10T13:40:04.973", "AcceptedAnswerId": null, "Title": "No saved view state could be found for the view identifier", "Body": "<p>When I was running my JSF application on Jetty server it was running fine.</p>\n\n<p>But as I moved this to Weblogic server, it started giving me this error.</p>\n\n<pre><code>javax.faces.application.ViewExpiredException: /wsListing.xhtmlNo saved view state could be found for the view identifier: /wsListing.xhtml\nat org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:132)\nat org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)\nat org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)\nat javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)\nat weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)\nat weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)\nat weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)\nat weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)\nat weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)\nat weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)\nat weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)\nat weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)\nat weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)\nat weblogic.security.service.SecurityManager.runAs(Unknown Source)\nat weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)\nat weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)\nat weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1398)\nat weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)\nat weblogic.work.ExecuteThread.run(ExecuteThread.java:172)\n</code></pre>\n\n<p>wsListing.xhtml is given below:</p>\n\n<pre><code> &lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"&gt;\n&lt;html xmlns=\"http://www.w3.org/1999/xhtml\"\n xmlns:h=\"http://java.sun.com/jsf/html\"\n xmlns:f=\"http://java.sun.com/jsf/core\"\n xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n xmlns:p=\"http://primefaces.org/ui\" xmlns:lang=\"en\"&gt;\n\n&lt;f:view xmlns:c=\"http://java.sun.com/jstl/core\"\n xmlns:s=\"http://www.springframework.org/tags\"\n xmlns:form=\"http://www.springframework.org/tags/form\"&gt;\n &lt;h:head&gt;\n &lt;h:outputStylesheet library=\"css\" name=\"../resources/css/style.css\"\n target=\"head\" /&gt;\n &lt;meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /&gt;\n &lt;title&gt;Test Client&lt;/title&gt;\n &lt;link rel=\"shortcut icon\" href=\"../resources/images/favicon.ico\" /&gt;\n &lt;link rel=\"stylesheet\" href=\"../resources/css/style.css\"\n type=\"text/css\" media=\"all\" /&gt;\n &lt;/h:head&gt;\n &lt;h:body&gt;\n &lt;ui:include src=\"header.xhtml\" /&gt;\n &lt;div id=\"home-training-container\"&gt;\n &lt;h:form&gt;\n &lt;table align=\"center\" border=\"1\"&gt;\n &lt;tr&gt;\n &lt;td&gt;&lt;h:commandLink value=\"First Web Service\"\n action=\"#{wsListingBean.action}\"&gt;\n &lt;f:setPropertyActionListener\n target=\"#{wsListingBean.webServiceId}\" value=\"abcService\" /&gt;\n &lt;/h:commandLink&gt;&lt;/td&gt;\n &lt;/tr&gt;\n &lt;tr&gt;\n &lt;td&gt;&lt;h:commandLink value=\"Second Web Service\"\n action=\"#{wsListingBean.action}\"&gt;\n &lt;f:setPropertyActionListener\n target=\"#{wsListingBean.webServiceId}\" value=\"filterabc\" /&gt;\n &lt;/h:commandLink&gt;&lt;/td&gt;\n &lt;/tr&gt;\n &lt;tr&gt;\n &lt;td&gt;Third Web Service&lt;/td&gt;\n &lt;/tr&gt;\n &lt;tr&gt;\n &lt;td&gt;Fourth Web Service&lt;/td&gt;\n &lt;/tr&gt;\n &lt;tr&gt;\n &lt;td&gt;Fifth Web Service&lt;/td&gt;\n &lt;/tr&gt;\n &lt;/table&gt;\n &lt;/h:form&gt;\n &lt;/div&gt;\n &lt;ui:include src=\"footer.xhtml\" /&gt;\n &lt;/h:body&gt;\n&lt;/f:view&gt;\n&lt;/html&gt;\n</code></pre>\n\n<p>When I click on any of the command links then this issue is coming:</p>\n\n<pre><code>&lt;h:commandLink value=\"First Web Service\"\n action=\"#{wsListingBean.action}\"&gt;\n &lt;f:setPropertyActionListener\n target=\"#{wsListingBean.webServiceId}\" value=\"abcService\" /&gt;\n</code></pre>\n\n<p>Anyone having any idea regarding what this view state is?</p>\n", "Lable": "No"}
10
+ {"QuestionId": 10575893, "AnswerCount": 1, "Tags": "<internet-explorer-8><datepicker><css>", "CreationDate": "2012-05-13T23:00:46.723", "AcceptedAnswerId": "27694630", "Title": "JsDatePick's data picker appears all broken in appearance in IE8 when used in my page", "Body": "<p>I tried to use <a href=\"http://javascriptcalendar.org/\" rel=\"nofollow\">JsDatePick</a> .</p>\n\n<p>The example HTML supplied with the tool ran just fine in both FireFox and IE8</p>\n\n<p>However, when I tried to use the picker in my own HTML page with existing structure and CSS:</p>\n\n<ul>\n<li><p>In FireFox it worked fine (the picker appeared as a calendar next to the input field)</p></li>\n<li><p>In IE8, the picker apeared as a VERTICAL column of dates, BELOW my page (e.g. you need to scroll down to see it), e.g.</p>\n\n<pre><code> ----------------------------------------------\n | My main page DIV, sized ~100% page height |\n | |\n | &lt;INPUT FIELD&gt; |\n | |\n | |\n | |\n | |\n | |\n | |\n ----------------------------------------------\n ---- BOTTOM OF PAGE HERE ---\n\n [1] &lt;-- This was meant to be a 5x7\n [2] &lt;-- calendar pop-up appearing\n [3] &lt;-- under the INPUT FIELD\n [...] &lt;-- NOTE that the horizontal position is correct,\n [30] &lt;-- Fully aligned with INPUT FIELD\n</code></pre></li>\n</ul>\n\n<p>Unfortunately, I'm not enough of a CSS expert to even begin understanding how to troubleshoot it.</p>\n\n<ol>\n<li><p>If anyone used JsDatePick, and ran into this problem, any ideas on how to fix are appreciated</p></li>\n<li><p>Barring that, what would be the steps I need to take to troubleshoot this (Seemingly CSS conflict) problem?</p>\n\n<p>The page has its own stylesheets but one of them is 100% class-limited styles, \nwhile the second one has some global styles, BUT nothing with a position defined, and any styles that are not class specific are font style for <code>body</code> and <code>h1</code>.</p></li>\n</ol>\n", "Lable": "No"}
11
+ {"QuestionId": 10577543, "AnswerCount": 1, "Tags": "<oracle><cursor><sys-refcursor>", "CreationDate": "2012-05-14T04:34:38.440", "AcceptedAnswerId": "10581924", "Title": "dbms_sql.to_cursor_number - Getting Invalid Cursor error for SYS_REFCURSOR", "Body": "<p>I have the following code for table and view creation.</p>\n\n<pre><code>create table test_company\n(\n comp_id number\n , comp_name varchar2(500)\n)\n;\ninsert into test_company values(1, 'CompanyA');\ninsert into test_company values(2, 'CompanyB');\ninsert into test_company values(3, 'CompanyC');\ncreate or replace view test_company_view as select * from test_company;\n</code></pre>\n\n<p>And I have the following code for my cursor testing. But <code>dbms_sql.to_cursor_number</code> got error <code>ORA-01001: invalid cursor</code></p>\n\n<pre><code>set serveroutput on;\ndeclare\n reader test_company_view%ROWTYPE;\n datacursor SYS_REFCURSOR;\n v_cursor_id number;\nbegin\n open datacursor for select * from test_company_view;\n v_cursor_id := dbms_sql.to_cursor_number(datacursor); -- ERROR: invalid cursor\n loop fetch datacursor into reader;\n exit when datacursor%NOTFOUND;\n dbms_output.put_line(reader.comp_id);\n end loop;\n close datacursor;\nend;\n</code></pre>\n\n<p>What did I do wrong? Thank you for your helps!</p>\n\n<p>I have tried <code>strongly-typed REF CURSOR</code> and <code>weakly-typed REF CURSOR</code> but they got the same error.</p>\n", "Lable": "No"}
12
+ {"QuestionId": 10606076, "AnswerCount": 3, "Tags": "<c#><.net><datetime><time><datetime-format>", "CreationDate": "2012-05-15T17:44:44.360", "AcceptedAnswerId": "10606297", "Title": "Is there a way to print a calculated time format string in C#?", "Body": "<p>I know the title might be confusing, but I'm not sure how to word it better....</p>\n\n<p>I'm doing this to get the logs of the current hour:</p>\n\n<pre><code>'TraceSink-'yyyy-MM-dd HH'-Hourly.log'\n</code></pre>\n\n<p>How can I get the previous hour? i.e.:</p>\n\n<pre><code>'TraceSink-'yyyy-MM-dd (HH-1)'-Hourly.log'\n</code></pre>\n\n<p>Is there anything possible with time format like that?</p>\n\n<p><strong>EDIT</strong>: I don't have access to the C# code but a exe.config where I can change what goes inside.</p>\n\n<p>Like var on DateTime.ToString(var);</p>\n\n<p>Am I asking too much?</p>\n", "Lable": "No"}
13
+ {"QuestionId": 10707229, "AnswerCount": 2, "Tags": "<javascript><jquery><forms><jquery-ui>", "CreationDate": "2012-05-22T17:45:46.537", "AcceptedAnswerId": "10731817", "Title": "jquery: Disable/Enable button not working after reset", "Body": "<p>I have a form with n multiple choice questions implemented as radio buttons (using <code>jquery-ui</code>). I would like to ensure that all the questions have been answered before allowing the user to submit the form. I am running into two issues while performing this validation:</p>\n\n<ul>\n<li>On initial load, the submit button does not respond to clicks or mouseovers until all questions have a response selected as desired. However, it still appears to be clickable (I would like this to be faded out) </li>\n</ul>\n\n<p><img src=\"https://i.stack.imgur.com/nGabF.png\" alt=\"enter image description here\"></p>\n\n<ul>\n<li>If the reset button is pressed, the submit button is faded out (as desired) but I am unable to re-enable the submit button once the form has been completed.</li>\n</ul>\n\n<p><img src=\"https://i.stack.imgur.com/rXbPs.png\" alt=\"enter image description here\"></p>\n\n<p>This is my first time using javascipt/jquery. What is going wrong? How do I achieve the desired functionality across both cases?</p>\n\n<hr>\n\n<p>Here is the pertinent javascript portion:</p>\n\n<pre><code>$(document).ready(function(){\n $( '.button' ).button ();\n $( '.radio-set' ).buttonset ();\n $( 'input[type=\"submit\"]' ).attr( 'disabled', true );\n\n var progress = 0;\n var total_fields = $('.response').length\n\n /* Track Progress function*/\n $('input[type=\"radio\"]').click( function(){ \n progress = $('input[type=\"radio\"]:checked').length\n $(\".progressbar\").progressbar( {value: ( progress / total_fields ) * 100} )\n console.log(progress, total_fields)\n if( progress == total_fields ){\n console.log( \"Hello from inside the conditional\" )\n $( 'input[type=\"submit\"]' ).removeAttr( 'disabled' );\n } \n });\n\n $( 'input[type=\"reset\"]' ).click( function(){\n progress = 0\n $( \".progressbar\" ).progressbar( {value: 0} )\n $( 'input[type=\"submit\"]' ).attr( 'disabled', true );\n });\n});\n</code></pre>\n\n<p>Example of one of the questions within the form (with bacon filler text):</p>\n\n<pre><code> &lt;div class=\"model_feature\"&gt;\n &lt;span class=\"feature_name\" title=\"M1\"&gt;M1&lt;/span&gt;\n &lt;span class=\"response radio-set\"&gt;\n &lt;label for=\"M1-1\"&gt;1&lt;/label&gt;\n &lt;input type=\"radio\" name=\"M1\" id=\"M1-1\" value=\"1\" class=\"feature-input\" autocomplete=\"off\" /&gt;\n &lt;label for=\"M1-0\"&gt;0&lt;/label&gt;\n &lt;input type=\"radio\" name=\"M1\" id=\"M1-0\" value=\"0\" class=\"feature-input\" autocomplete=\"off\" /&gt;\n &lt;label for=\"M1-Unk\"&gt;Unknown&lt;/label&gt;\n &lt;input type=\"radio\" name=\"M1\" id=\"M1-Unk\" value=\"Unknown\" class=\"feature-input\" autocomplete=\"off\" /&gt;\n &lt;/span &lt;!-- close response --&gt;\n &lt;span class=\"feature_description\"&gt;Chicken spare ribs capicola beef brisket hamburger. Kielbasa filet mignon tail ribeye ball tip ground round.&lt;/span&gt;\n &lt;/div&gt; &lt;!-- close model_feature --&gt;\n</code></pre>\n\n<p>Input and Reset buttons for completeness: </p>\n\n<pre><code> &lt;input type=\"reset\" class=\"button\" id=\"reset-button\" /&gt;\n &lt;input type=\"submit\" class=\"button\" id=\"submit-button\" disabled=\"disabled\" /&gt;\n</code></pre>\n", "Lable": "No"}
oraclechunk16.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"QuestionId": 10852477, "AnswerCount": 1, "Tags": "<asp.net><silverlight><internet-explorer><cookies><browser-cache>", "CreationDate": "2012-06-01T14:47:37.910", "AcceptedAnswerId": null, "Title": "How to simulate Full IE cache for ASP.NET or Silverlight app", "Body": "<p>What is the best approach to similate a browser full cache when debugging a Silverlight or ASP.NET application? There is some intermittent behaviour that I want to make a determination if browser cache or full cookie cache is playing a part in this behaviour I am seeing.</p>\n\n<p>Thanks for the help, in advance :)</p>\n", "Lable": "No"}
2
+ {"QuestionId": 10865201, "AnswerCount": 2, "Tags": "<sql-server><tsql><size>", "CreationDate": "2012-06-02T19:19:10.847", "AcceptedAnswerId": "10865279", "Title": "Database size bigger after delete from table", "Body": "<p>After I delete huge amount of data from a SQL Server database table, the database size increased.</p>\n\n<p>When I run <code>sp_spaceused</code> it shows me 2625.25 MB. It used to be ~ 1800.00 MB before I deleted from table.</p>\n\n<p>Is there any specific reason it keeps growing even if I delete data?</p>\n", "Lable": "No"}
3
+ {"QuestionId": 10868406, "AnswerCount": 1, "Tags": "<.net><c#-4.0><.net-4.0><pia><office-pia>", "CreationDate": "2012-06-03T06:35:48.143", "AcceptedAnswerId": null, "Title": "c#.net 4.0 - no pia - is this all I need?", "Body": "<p>Reference the Microsoft.Office.Interop.Excel and set Embed Interop Type to true? </p>\n\n<p>Will doing so ensure my app is backward compatible? (As long as I use safe methods that work on all versions.)</p>\n\n<p>Or do I have to use something like late binding and all in order for it to be compatible against multiple versions?</p>\n", "Lable": "No"}
4
+ {"QuestionId": 11055976, "AnswerCount": 1, "Tags": "<php><html><wordpress>", "CreationDate": "2012-06-15T18:06:48.877", "AcceptedAnswerId": "11056660", "Title": "How to retrieve attachments from child pages of a specific Page in WordPress?", "Body": "<p>How would I retrieve attachments from all <strong>subpages</strong> of a specific Page ID? </p>\n\n<p>Example:</p>\n\n<p>SPECIFIC PAGE</p>\n\n<ul>\n<li>Child (with attachments) </li>\n<li>Child (with attachments) </li>\n<li>Child (with attachments) </li>\n</ul>\n\n<p>I'm currently using this code to retrieve all attachments site-wide, however I would like to limit this to only pull images from all children of a specific Page.</p>\n\n<pre><code>&lt;?php\n$args = array( 'post_type' =&gt; 'attachment', 'numberposts' =&gt; -1, 'post_status' =&gt; null, 'post_parent' =&gt; null ); \n$attachments = get_posts( $args );\nif ($attachments) {\n foreach ( $attachments as $post ) {\n setup_postdata($post);\n the_title();\n the_attachment_link($post-&gt;ID, false);\n the_excerpt();\n }\n}\n?&gt;\n</code></pre>\n\n<p>Almost there using this code as per Nick's suggestion below:</p>\n\n<pre><code>&lt;?php\n\n$mypages = get_pages('child_of=19');\nforeach ( $mypages as $mypage ) {\n$attachments = get_children(array('post_parent' =&gt; $mypage-&gt;ID, 'numberposts' =&gt; 1, 'post_type' =&gt; 'attachment', 'post_mime_type' =&gt; 'image', 'orderby' =&gt; 'rand'));\n\n\nif ($attachments) {\n\n foreach ( $attachments as $post ) {\n\n setup_postdata($post);\n the_title();\n the_attachment_link($post-&gt;ID, false);\n the_excerpt();\n }\n}\n}\n?&gt;\n</code></pre>\n\n<p>However, there are two remaining issues:</p>\n\n<ol>\n<li>Limiting the amount of <strong>total photos</strong> pulled. Using 'numberposts' only limits the amount of images pulled from each post</li>\n<li>Randomization. Orderby => rand only randomizes the images within each post. I would like to randomly shuffle the order for everything. </li>\n</ol>\n", "Lable": "No"}
5
+ {"QuestionId": 11106123, "AnswerCount": 1, "Tags": "<sql-server-2008><ssas><bids>", "CreationDate": "2012-06-19T17:22:42.033", "AcceptedAnswerId": "11207679", "Title": "How do you apply a Weight Factor to an M2M Dimensional Relationship in SSAS?", "Body": "<p>I have a many-to-many relationship with a weight factor column in the bridge table but I don't know how to make use of this when developing my cube in BIDS. Via Google, I have found many descriptions of what a weight factor is and why you would use one (I understand all this perfectly), but I can't find a practical tutorial of how to configure this in a cube in BIDS.</p>\n\n<p>Click-by-click instructions would be ideal but if some one could at least point me at the right window I could probably figure out the rest. Thanks in advance.</p>\n", "Lable": "No"}
6
+ {"QuestionId": 11190457, "AnswerCount": 3, "Tags": "<android><android-layout>", "CreationDate": "2012-06-25T13:42:16.687", "AcceptedAnswerId": "11194037", "Title": "Memory leaks, singleInstance", "Body": "<p>I've got a couple of activities where I display images with help of <a href=\"https://github.com/thest1/LazyList/blob/master/src/com/fedorvlasov/lazylist/ImageLoader.java\" rel=\"nofollow noreferrer\">this lib</a>. The thing is the app is running out of memory. I tried to gc.clean(), null references, call clear on imageloader object but in vain.</p>\n\n<p>In MAT i've found out that I have multiple objects of the same activity and it a default behaviour, if I'm not mistaken. I used singleInstance to suppress multiple instances and it has helped with memory leaks.</p>\n\n<p>Right now, due to singleInstance, I'm having troubles with navigation. Do you think I should continue with singleInstance or try to fix memory leak with multiple instances ?</p>\n\n<p>Here's ImageView gc roots inspection:\n<img src=\"https://i.stack.imgur.com/iDHCE.jpg\" alt=\"enter image description here\"></p>\n\n<p>UPD:</p>\n\n<pre><code> Bitmap bitmap=null;\n URL imageUrl = new URL(url);\n HttpURLConnection conn = (HttpURLConnection)imageUrl.openConnection();\n conn.setConnectTimeout(30000);\n conn.setReadTimeout(30000);\n conn.setInstanceFollowRedirects(true);\n InputStream is=conn.getInputStream();\n OutputStream os = new FileOutputStream(f);\n Utils.CopyStream(is, os);\n os.close();\n bitmap = decodeFile(f);\n return bitmap;\n\n ImageView imageView = (ImageView) convertView;\n if(convertView == null){\n imageView = new ImageView(_currentActivity);\n }\n</code></pre>\n\n<p>UPD2(navigation strategies):</p>\n\n<p>I've got a constant header with buttons which start home activity(with gallery) and profile activity; secondly there's a subheader wich also holds 3 buttons which point to another 3 activities with listviews(consisting of imageviews + labels).</p>\n\n<p>These header, subheader elements are available on every activity in application; The link-buttons do nothing but:</p>\n\n<pre><code>startActivity(new Intent(getActivity(), MainActivity.class));\n</code></pre>\n\n<p>or</p>\n\n<pre><code>Intent activityIntent = new Intent(getActivity(), SomeActivityWithListViewInside.class);\n// passing some data like list id\nactivityIntent.putExtra(\"list_id\", listId);\nstartActivity(activityIntent);\n</code></pre>\n\n<p>So, those activity instances are caused by those startActivity calls - do you think I should play with singleTop or any other intent parameter to avoid this issue ?</p>\n", "Lable": "No"}
7
+ {"QuestionId": 11217948, "AnswerCount": 1, "Tags": "<r>", "CreationDate": "2012-06-27T00:52:17.860", "AcceptedAnswerId": "11217985", "Title": "call to sapply() works in interactive mode, not in batch mode", "Body": "<p>I need to execute some commands in batch mode (e.g., via Rscript). They work in interactive mode, but not in batch mode. Here is a minimal example: <code>sapply(1:3, is, \"numeric\")</code>. Why does this work in interactive mode but return an error in batch mode? Is there a way to make a command like this work in batch mode?</p>\n\n<p>More specifically, I need to write scripts and to run them in batch mode. They need to call a function (which I didn't write and can't edit) that looks like this:</p>\n\n<pre><code>testfun &lt;- function (...)\n{\n args &lt;- list(...)\n if (any(!sapply(args, is, \"numeric\")))\n stop(\"All arguments must be numeric.\")\n else\n writeLines(\"All arguments look OK.\")\n}\n</code></pre>\n\n<p>I need to pass a list to this function. A command like <code>testfun(list(1, 2, 3))</code> works in interactive mode. But in batch mode, it produces an error: <code>Error in match.fun(FUN) : object 'is' not found</code>. I tried <code>debugger()</code> to get a handle on the problem, but it didn't give me any insight. I also looked through r-help, the R FAQ, R Inferno, but I couldn't find anything that spoke to this problem.</p>\n", "Lable": "No"}
8
+ {"QuestionId": 11241318, "AnswerCount": 1, "Tags": "<centos><virtual-machine><virtualization><virtualbox><samba>", "CreationDate": "2012-06-28T09:05:15.183", "AcceptedAnswerId": "11465419", "Title": "I can ping my centOS virtual machine but I cant access its shared folders", "Body": "<p>so this is the setup:</p>\n\n<p>I have a Windows XP installed, VirtualBox and a centOS 6.2 virtual machine.\nI installed Samba, and currently, my VM and host Windows are in the same subnet.\nI can ping my VM from Windows and vice versa. \nI have a created a shared folder via Samba like this:</p>\n\n<pre><code>[Share]\n path = /home/share\n writable = yes\n guest ok = yes\n guest only = yes\n create mode = 0777\n directory mode = 0777\n share modes = yes\n</code></pre>\n\n<p>*<em>I followed a full tutorial <a href=\"http://www.server-world.info/en/note?os=CentOS_6&amp;p=samba&amp;f=1\" rel=\"nofollow\">here</a></em></p>\n\n<p>My problem now is that, when I try to access such folder like this \\192.xx.xxx.xxx\\home\\share (192.xx.xxx.xxx is the IP address of my VM) from Windows \"Run\",\nWindows can't find it.</p>\n\n<p>P.S. I've turned off my Windows Firewall (although Trend Micro personal firewall is still on)</p>\n", "Lable": "No"}
9
+ {"QuestionId": 11486900, "AnswerCount": 2, "Tags": "<objective-c><cocoa-touch><cocoa><core-data>", "CreationDate": "2012-07-14T19:46:38.080", "AcceptedAnswerId": "11488910", "Title": "NSOperationQueue designated thread", "Body": "<p>I want to use an <code>NSOperationQueue</code> to dispatch CoreData operations. However, operation queue behavior is not always the same (e.g. it dispatches using <code>libdispatch</code> on iOS 4.0/OS 10.6 which uses thread pools) and a queue might not always use the same thread (as <code>NSManagedObjectContext</code> requires).</p>\n\n<p>Can I force a serial <code>NSOperationQueue</code> to execute on a single thread?\nOr do I have to create my own simple queuing mechanism for that?</p>\n", "Lable": "No"}
10
+ {"QuestionId": 11489151, "AnswerCount": 1, "Tags": "<objective-c><nsarray><nscoding>", "CreationDate": "2012-07-15T03:24:14.687", "AcceptedAnswerId": null, "Title": "Saving nested objects and NSArrays in Objective C using NSCoding", "Body": "<p>I'm attempting to save an object that has an NSMutableArray of nested objects. I want to use the NSCoding Protocol to save the file under the documents directory. Do I need to encode every object (including the nested ones) or just the super class itself? Right now I'm only encoding the super class' objects. </p>\n\n<p>To better illustrate what my object hierarchy looks like:</p>\n\n<pre><code>Main Object\n -NSString\n -int\n -NSMutableArray\n -int\n -double\n -char\n</code></pre>\n", "Lable": "No"}
11
+ {"QuestionId": 11494105, "AnswerCount": 3, "Tags": "<c#><awesomium>", "CreationDate": "2012-07-15T17:32:47.137", "AcceptedAnswerId": null, "Title": "C# - Using Awesomium to Interact with Gmail", "Body": "<p>I'm able to navigate to gmail, but then I want to do something as simple as enter the credientials and click the login button.</p>\n\n<pre><code>private void btnSubmit_Click(object sender, EventArgs e)\n{ \n btnSubmit.Enabled = false; \n webGmail.LoadURL(\"http://www.gmail.com\");\n\n webGmail.LoadCompleted += ExecuteSomething;\n}\n\nprivate void ExecuteSomething(object sender, EventArgs eventArgs)\n{\n webGmail.ExecuteJavascript(@\"&lt;script src = 'http://code.jquery.com/jquery-latest.min.js' type = 'text/javascript'&gt;&lt;/script&gt;\");\n webGmail.ExecuteJavascript(@\"$('#Email').val('foo');\");\n webGmail.ExecuteJavascript(@\"$('#Passwd').val('bar');\");\n webGmail.ExecuteJavascript(@\"$('#signIn').click();\");\n}\n</code></pre>\n\n<p>Nothing happens. I know using developer tools with Chrome that you cant modify anything on the page. But is there a way of filling in forms?</p>\n\n<p><strong>Are there any other better headless browsers? I actually need one that supports a web control that I can put into my form so that I can see what is going on. This is mandatory</strong></p>\n", "Lable": "No"}
12
+ {"QuestionId": 11562215, "AnswerCount": 2, "Tags": "<java><eclipse><memory-leaks><threadpool>", "CreationDate": "2012-07-19T13:43:48.553", "AcceptedAnswerId": "11564125", "Title": "Getting compile error using getThreadAllocatedBytes() in ecplise", "Body": "<p>I am trying to monitor my threads in the Quartz scheduler. I need to come up with an estimation of how much memory needed for executing my jobs.</p>\n\n<p>I am trying to use the method:</p>\n\n<pre class=\"lang-java prettyprint-override\"><code> import java.lang.management.ManagementFactory;\n\n ManagementFactory.getThreadMXBean().getThreadAllocationBytes();\n</code></pre>\n\n<p>However, in Eclipse I am getting an error:</p>\n\n<pre><code>The method getThreadAllocationBytes() is undefined for the type ThreadMXBean\n</code></pre>\n\n<p>I searched and found out that the method was introduced in JDK6u25 and since Eclipse is using its own compiler I cannot fix the problem. </p>\n\n<p>Compiling the class without Eclipse seems to be a weak solution since I need to be able to compile the project using Eclipse.</p>\n\n<p>Can you give me some advice on how to fix this problem?</p>\n", "Lable": "No"}
oraclechunk17.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"QuestionId": 11565136, "AnswerCount": 1, "Tags": "<php><cakephp>", "CreationDate": "2012-07-19T16:23:14.880", "AcceptedAnswerId": "11565925", "Title": "CakeEmail - Send HTML and Plain-text message manually", "Body": "<p>I want to send a plain-text and html email from CakePHP using the built-in function, but without touching the .ctp files.</p>\n\n<p>Here's what i want from the CakeEmail : </p>\n\n<pre><code>//Send email to user\n$email = new CakeEmail('default');\n$email-&gt;to($customers['Customer']['email']);\n$email-&gt;subject('Password reset');\n$email-&gt;htmlMessage('&lt;div&gt;Reset the password&lt;/div&gt;');\n$email-&gt;textMessage('Password the reset');\n$email-&gt;send();\n</code></pre>\n\n<p>But apparently, these functions don't exist, so anyone know of an alternative solution?\nI doesn't want to touch the Email folder of CakePHP, as the email layout &amp; content is generated dynamically.</p>\n\n<p>Cake version 2.0.6</p>\n\n<p>Bascially, i want a CakePHP version of this code : <a href=\"http://www.daniweb.com/web-development/php/threads/2959/sending-htmlplain-text-emails\" rel=\"nofollow\">http://www.daniweb.com/web-development/php/threads/2959/sending-htmlplain-text-emails</a>\nCapable of sending both HTML and Plain-text email</p>\n", "Lable": "No"}
2
+ {"QuestionId": 11580132, "AnswerCount": 1, "Tags": "<iphone><facebook><image><post><share>", "CreationDate": "2012-07-20T13:15:24.273", "AcceptedAnswerId": null, "Title": "Post image on Facebook wall through iPhone app", "Body": "<blockquote>\n <p><strong>Possible Duplicate:</strong><br>\n <a href=\"https://stackoverflow.com/questions/750328/documented-process-for-using-facebook-connect-for-the-iphone-to-upload-photos\">Documented process for using facebook connect for the iPhone to upload photos</a> </p>\n</blockquote>\n\n\n\n<p>I have a\u05de iPhone app and would like to know how to make an image which, when clicked, the image will be posted to the user's Facebook profile.</p>\n\n<p>The app is based on Facebook, i mean, you register with your Facebook account.</p>\n", "Lable": "No"}
3
+ {"QuestionId": 11608532, "AnswerCount": 3, "Tags": "<python><comparison><set><python-2.x>", "CreationDate": "2012-07-23T08:03:19.127", "AcceptedAnswerId": "11608544", "Title": "How to hide the 'set' keyword in output while using set in python", "Body": "<p>Ok so I have two lists in python</p>\n\n<pre><code>a = ['bad', 'horrible']\nb = ['bad', 'good']\n</code></pre>\n\n<p>I'm using the set operator to compare the two lists and give an output if a common word exists between the two sets. </p>\n\n<pre><code>print set(a) &amp; set (b)\n</code></pre>\n\n<p>This gives the output as,</p>\n\n<pre><code>set(['bad'])\n</code></pre>\n\n<p>Is there anyway to remove the keyword 'set' in the output??</p>\n\n<p>I want the output to look like</p>\n\n<pre><code>['bad']\n</code></pre>\n", "Lable": "No"}
4
+ {"QuestionId": 11640681, "AnswerCount": 4, "Tags": "<c++><multithreading><mutex>", "CreationDate": "2012-07-24T23:19:52.140", "AcceptedAnswerId": "11640729", "Title": "Thread-safe way to build mutex protection into a C++ class?", "Body": "<p>I'm trying to implement a producer/consumer model multithreaded program in C++ for a project I'm working on. The basic idea is that the main thread creates a second thread to watch a serial port for new data, process the data and put the result in a buffer that is periodically polled by the main thread. I've never written multi-threaded programs before. I've been reading lots of tutorials, but they're all in C. I think I've got a handle on the basic concepts, but I'm trying to c++ify it. For the buffer, I want to create a data class with mutex protection built in. This is what I came up with.</p>\n\n<p>1) Am I going about this the wrong way? Is there a smarter way to implement a protected data class?</p>\n\n<p>2) What will happen in the following code if two threads try to call <code>ProtectedBuffer::add_back()</code> at the same time?</p>\n\n<pre><code>#include &lt;deque&gt;\n#include \"pthread.h\"\n\ntemplate &lt;class T&gt;\nclass ProtectedBuffer {\n std::deque&lt;T&gt; buffer;\n pthread_mutex_t mutex;\npublic:\n void add_back(T data) {\n pthread_mutex_lock(&amp;mutex);\n buffer.push_back(data);\n pthread_mutex_unlock(&amp;mutex);\n }\n void get_front(T &amp;data) {\n pthread_mutex_lock(&amp;mutex);\n data = buffer.front();\n buffer.pop_front();\n pthread_mutex_unlock(&amp;mutex);\n }\n};\n</code></pre>\n\n<p>Edit:\nThanks for all the great suggestions. I've tried to implement them below. I also added some error checking so if a thread somehow manages to try to lock the same mutex twice it will fail gracefully. I think.</p>\n\n<pre><code>#include \"pthread.h\"\n#include &lt;deque&gt;\n\n\nclass Lock {\n pthread_mutex_t &amp;m;\n bool locked;\n int error;\npublic:\n explicit Lock(pthread_mutex_t &amp; _m) : m(_m) {\n error = pthread_mutex_lock(&amp;m);\n if (error == 0) {\n locked = true;\n } else {\n locked = false;\n }\n }\n ~Lock() {\n if (locked)\n pthread_mutex_unlock(&amp;m);\n }\n bool is_locked() {\n return locked;\n }\n};\n\nclass TryToLock {\n pthread_mutex_t &amp;m;\n bool locked;\n int error;\npublic:\n explicit TryToLock(pthread_mutex_t &amp; _m) : m(_m) {\n error = pthread_mutex_trylock(&amp;m);\n if (error == 0) {\n locked = true;\n } else {\n locked = false;\n }\n }\n ~TryToLock() {\n if (locked)\n pthread_mutex_unlock(&amp;m);\n }\n bool is_locked() {\n return locked;\n }\n};\n\ntemplate &lt;class T&gt;\nclass ProtectedBuffer{\n pthread_mutex_t mutex;\n pthread_mutexattr_t mattr;\n std::deque&lt;T&gt; buffer;\n bool failbit;\n\n ProtectedBuffer(const ProtectedBuffer&amp; x);\n ProtectedBuffer&amp; operator= (const ProtectedBuffer&amp; x);\npublic:\n ProtectedBuffer() {\n pthread_mutexattr_init(&amp;mattr);\n pthread_mutexattr_settype(&amp;mattr, PTHREAD_MUTEX_ERRORCHECK);\n pthread_mutex_init(&amp;mutex, &amp;mattr);\n failbit = false;\n }\n ~ProtectedBuffer() {\n pthread_mutex_destroy(&amp;mutex);\n pthread_mutexattr_destroy(&amp;mattr);\n }\n void add_back(T &amp;data) {\n Lock lck(mutex);\n if (!lck.locked()) {\n failbit = true;\n return;\n }\n buffer.push_back(data);\n failbit = false;\n }\n void get_front(T &amp;data) {\n Lock lck(mutex);\n if (!lck.locked()) {\n failbit = true;\n return;\n }\n if (buffer.empty()) {\n failbit = true;\n return;\n }\n data = buffer.front();\n buffer.pop_front();\n failbit = false;\n }\n void try_get_front(T &amp;data) {\n TryToLock lck(mutex);\n if (!lck.locked()) {\n failbit = true;\n return;\n }\n if (buffer.empty()) {\n failbit = true;\n return;\n }\n data = buffer.front();\n buffer.pop_front();\n failbit = false;\n }\n void try_add_back(T &amp;data) {\n TryToLock lck(mutex);\n if (!lck.locked()) {\n failbit = true;\n return;\n }\n buffer.push_back(data);\n failbit = false;\n }\n};\n</code></pre>\n", "Lable": "No"}
5
+ {"QuestionId": 11694623, "AnswerCount": 1, "Tags": "<c#><sql-server-ce>", "CreationDate": "2012-07-27T19:39:47.503", "AcceptedAnswerId": "11694843", "Title": "SQL Server Compact Insertion", "Body": "<p>i want to insert data into sql server Compact edition the database table screenshot is <a href=\"http://www.flickr.com/photos/56760865@N04/7657986538\" rel=\"nofollow\">Here >>> </a>\ni Want to add data in users the addition script is as follows</p>\n\n<pre><code>SqlCeConnection Con = new SqlCeConnection();\nCon.ConnectionString = \"Data Source = 'Database.sdf';\" +\n \"Password='Password';\";\nCon.Open();\nint Amount=Convert.ToInt32(AmBox.Text),\nCode=Convert.ToInt32(MCode.Text),\nNum=Convert.ToInt32(MNum.Text);\nstring Name=Convert.ToString(NBox.Text),\nFName=Convert.ToString(SOBox.Text),\nAddress=Convert.ToString(AdBox.Text);\n\nSqlCeCommand Query =new SqlCeCommand(\"INSERT INTO Users VALUES \" + \n \"(++ID,Name,FName,Address,Code,Num,Amount)\",Con);\nQuery.ExecuteReader();\n</code></pre>\n\n<p>When it runs it generates an error SAYING \"The column name is not valid [Node Name (if any) =,Column name=ID ]</p>\n\n<p>I don't figure out the problem kindly tell me thanks!</p>\n", "Lable": "No"}
6
+ {"QuestionId": 11802853, "AnswerCount": 1, "Tags": "<c#><entity-framework>", "CreationDate": "2012-08-03T20:30:18.343", "AcceptedAnswerId": "11802879", "Title": "Initialize new instance of an entity framework object with constructor?", "Body": "<p>Is it possible to use a constructor with EF entities?</p>\n\n<p>I want to add a new instance of an Entity Framework entity and add it to a List&lt;></p>\n\n<p>i.e.</p>\n\n<pre><code>List&lt;MyObject&gt; objectList = new List&lt;MyObject&gt;();\nobjectList.Add(new MyObject( \"property\" , 1);\n</code></pre>\n\n<p>instead of</p>\n\n<pre><code>List&lt;MyObject&gt; objectList = new List&lt;MyObject&gt;();\nMyObject object = new MyObject();\nobject.Name = \"property1\";\nobject.ID = 1;\nobjectList.Add(object);\n</code></pre>\n", "Lable": "No"}
7
+ {"QuestionId": 11913501, "AnswerCount": 3, "Tags": "<c++><string><cin>", "CreationDate": "2012-08-11T09:29:19.913", "AcceptedAnswerId": "11913546", "Title": "Using while(cin>>x)", "Body": "<blockquote>\n <p><strong>Possible Duplicate:</strong><br>\n <a href=\"https://stackoverflow.com/questions/2735315/c-cin-whitespace-question\">C++ cin whitespace question</a> </p>\n</blockquote>\n\n\n\n<p>I'm having problem trying to understand this piece of code. I'd like to apologize if this question has already been answered but I didn't find it anywhere. I'm a beginner and its a very basic code. The problem is <strong>>></strong> operator stops reading when the first white space \ncharacter is encountered but why is it in this case it outputs the complete input string even if we have white spaces in our string. It outputs every word of the string in separate lines. How is it that <em>cin>>x</em> can take input even after the white space? Plz help me out with the functioning of this code. Thanks in advance.</p>\n\n<pre><code>#include&lt;iostream&gt;\n#include&lt;string&gt;\nusing std::cout;\nusing std::cin;\nusing std::string;\nusing std::endl;\nint main()\n{\nstring s;\nwhile (cin &gt;&gt; s)\ncout &lt;&lt; s &lt;&lt; endl;\nreturn 0;\n}\n</code></pre>\n", "Lable": "No"}
8
+ {"QuestionId": 11934744, "AnswerCount": 2, "Tags": "<php><regex>", "CreationDate": "2012-08-13T12:59:15.440", "AcceptedAnswerId": null, "Title": "Regex : negative assertion", "Body": "<p>I'm stuck with an easy regex to match URLs in a content. The goal is to remove the folder from the links like \"/folder/id/123\" and to replace them with \"id/123\" so it's a short relative one in the same folder.</p>\n\n<p>Actually I did</p>\n\n<pre><code>$pattern = \"/\\/?(\\w+)\\/id\\/(\\d)/i\"\n$replacement = \"id/$2\";\nreturn preg_replace($pattern, $replacement, $text);\n</code></pre>\n\n<p>and it seems to work fine.</p>\n\n<p>However, the last test that I'd like to to is to test that each url matched does NOT containt http://, if it's an external site which also use the same pattern /folder/id/123.</p>\n\n<p>I tried /[^http://] or (?&lt;!html)... and different things without success. Any help would be verys nice :-)</p>\n\n<pre><code> $pattern = \"/(?&lt;!http)\\b\\/?(\\w+)\\/id\\/(\\d)/i\"; ???????\n</code></pre>\n\n<p>Thanks !</p>\n\n<p>Here is some examples : Thanks you VERY MUCH for your help :-)</p>\n\n<pre><code>(these should be replaced, \"same folder\" =&gt; short relative path only)\n&lt;a href=\"/mysite_admin/id/414\"&gt;label&lt;/a&gt; ==&gt; &lt;a href=\"id/414\"&gt;label&lt;/a&gt;\n&lt;a href=\"/mYsITe_ADMIN/iD/29\"&gt;label with UPPERCASE&lt;/a&gt; ==&gt; &lt;a href=\"id/414\"&gt;label with UPPERCASE&lt;/a&gt;\n\n(these should not be replaced, when there is http:// =&gt; external site, nothing to to)\n&lt;a href=\"http://mysite_admin/id/414\"&gt;label&lt;/a&gt; ==&gt; &lt;a href=\"http://mysite_admin/id/414\"&gt;label&lt;/a&gt;\n&lt;a href=\"http://www.google_admin.com\"&gt;label&lt;/a&gt; ==&gt; &lt;a href=\"http://www.google_admin.com\"&gt;label&lt;/a&gt;\n&lt;a href=\"http://anotherwebsite.com/id/32131\"&gt;label&lt;/a&gt; ==&gt; &lt;a href=\"http://anotherwebsite.com/id/32131\"&gt;labelid/32131&lt;/a&gt;\n&lt;a href=\"http://anotherwebsite_admin.com/id/32131\"&gt;label&lt;/a&gt; ==&gt; &lt;a href=\"http://anotherwebsite_admin.com/id/32131\"&gt;label&lt;/a&gt;\n</code></pre>\n", "Lable": "No"}
9
+ {"QuestionId": 11949255, "AnswerCount": 3, "Tags": "<mysql><sql><algorithm><sql-server-2008>", "CreationDate": "2012-08-14T09:16:06.037", "AcceptedAnswerId": "11949727", "Title": "Get Index of each letter series from dictionary database", "Body": "<p>I have dictionary database and i have created one UI interface ,to place buttons alphabetically , on click of each Letter , i want to fetch first word in the Letter series </p>\n\n<p>Is there any trick or sql query by which i can list out, first word of each series against it's index</p>\n\n<p>Note : i also have , Index column for each word in the database.</p>\n", "Lable": "No"}
10
+ {"QuestionId": 12179979, "AnswerCount": 4, "Tags": "<c#><reporting>", "CreationDate": "2012-08-29T14:14:03.563", "AcceptedAnswerId": "12180009", "Title": "How do I get the current Date in C#", "Body": "<p>I am using the Reporting feature in Visual Studio and I need to create a prop/variable to store the current date so I can display it on my form. I cannot seem to find the proper way to do this in the report view.</p>\n\n<p>I originally tried a property of : </p>\n\n<pre><code>public DateTime CurrentDate {get;}\n</code></pre>\n\n<p>This did not work because there is no setter for it. To fix the problem I :</p>\n\n<pre><code>public DateTime CurrentDate{get{return DateTime.Now;}}\n</code></pre>\n\n<p>Thanks for the suggestions. They lead me in the right direction.</p>\n", "Lable": "No"}
11
+ {"QuestionId": 12271173, "AnswerCount": 1, "Tags": "<r><linear-regression><least-squares><lm>", "CreationDate": "2012-09-04T20:51:03.067", "AcceptedAnswerId": "12271589", "Title": "Linear least squares fitting", "Body": "<p>DF</p>\n\n<pre><code> times a b s ex \n1 0 59 140 1e-4 1\n2 20 59 140 1e-4 0 \n3 40 59 140 1e-4 0\n4 60 59 140 1e-4 2\n5 120 59 140 1e-4 20\n6 180 59 140 1e-4 30\n7 240 59 140 1e-4 31\n8 360 59 140 1e-4 37\n9 0 60 140 1e-4 0\n10 20 60 140 1e-4 0\n11 40 60 140 1e-4 0\n12 60 60 140 1e-4 0\n13 120 60 140 1e-4 3300\n14 180 60 140 1e-4 6600\n15 240 60 140 1e-4 7700\n16 360 60 140 1e-4 7700\n# dput(DF) \nstructure(list(times = c(0, 20, 40, 60, 120, 180, 240, 360, 0, \n20, 40, 60, 120, 180, 240, 360), a = c(59, 59, 59, 59, 59, 59, \n59, 59, 60, 60, 60, 60, 60, 60, 60, 60), b = c(140, 140, 140, \n140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140\n), s = c(1e-04, 1e-04, 1e-04, 1e-04, 1e-04, 1e-04, 1e-04, 1e-04, \n1e-04, 1e-04, 1e-04, 1e-04, 1e-04, 1e-04, 1e-04, 1e-04), ex = c(1, \n0, 0, 2, 20, 30, 31, 37, 0, 0, 0, 0, 3300, 6600, 7700, 7700)), .Names = c(\"times\", \n\"a\", \"b\", \"s\", \"ex\"), row.names = c(NA, 16L), class = \"data.frame\")\n</code></pre>\n\n<p>DF2 </p>\n\n<pre><code>prime times mean \n g1 0 1.0000000 \n g1 20 0.7202642 \n g1 40 0.8000305 \n g1 60 1.7430986 \n g1 120 16.5172242 \n g1 180 25.6521268 \n g1 240 33.9140056 \n g1 360 34.5735984 \n #dput(DF2)\n structure(list(times = c(0, 20, 40, 60, 120, 180, 240, 360), \nmean = c(1, 0.7202642, 0.8000305, 1.7430986, 16.5172242, \n25.6521268, 33.9140056, 34.5735984)), .Names = c(\"times\", \n\"mean\"), row.names = c(NA, -8L), class = \"data.frame\")\n</code></pre>\n\n<p>DF is an example of a larger data frame which actually has hundreds of combinations of the 'a','b', and 's' values which result in different 'ex' values. What I want to do is find the combination of 'a','b', and 's' whose 'ex' values (DF) best fit the 'mean' values (DF2) at equivalent 'times'. \nThis fitting will be a comparison of 8 values at a time (ie, times == c(0,20,40,60,120,180,240,360).</p>\n\n<p>In this example, I would want 59, 140, and 1e-4 for the 'a', 'b', and 's' values, because those 'ex' values (DF) best fit the 'mean' values (DF2). </p>\n\n<p>I would like 'a','b', and 's' values for those values which 'ex' (DF) best fits 'mean' (DF2) </p>\n\n<p>Since I want one possible combination of the 'a','b', and 's' values a linear least squares fit model would be best. I would be comparing 8 values at a time -- where 'times' == 0 - 360. \nI don't want 'a', 'b', and 's' values which work best for each individual time point. I want 'a', 'b', and 's' values where all 8 'ex' (DF) best fit all 8 'mean' values (DF2)\nThis is where I need help.</p>\n\n<p>I have never used linear least squares fitting, but I assume what I'm trying to do is possible. </p>\n\n<pre><code> lm(DF2$mean ~ DF$ex,....) # i'm not sure if I should combine the two \n # data frames first then use that as my data argument, then \n # where I would include 'times' as the point of comparison, \n # if that would be used in subset? \n</code></pre>\n", "Lable": "No"}
12
+ {"QuestionId": 12283113, "AnswerCount": 6, "Tags": "<python><list><sublist>", "CreationDate": "2012-09-05T13:55:57.937", "AcceptedAnswerId": null, "Title": "Printing item from a sublist", "Body": "<pre><code>data = [['a','b'], ['a','c']]\nprint data[0[0]]\n&gt;&gt;&gt; 0\n</code></pre>\n\n<p>When I try this, I get an error. How could I print the 1st item from 1st list?</p>\n", "Lable": "No"}
oraclechunk18.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"QuestionId": 12343233, "AnswerCount": 1, "Tags": "<maven><ant><cargo>", "CreationDate": "2012-09-09T21:40:48.437", "AcceptedAnswerId": null, "Title": "Cargo run / start not working, missing Ant dependency?", "Body": "<p>I've been trying to set up the cargo-maven2 plugin (although I am using Maven 3; and this is supposed to be ok) so that I can start a container during the pre-integration-test phase and shut it down in the post-integration test phase.</p>\n\n<p>I'm having no luck. I keep getting this error message:</p>\n\n<pre><code>Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:start (start-container) on project microgivr.web: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:start failed: Unable to load the mojo 'start' in the plugin 'org.codehaus.cargo:cargo-maven2-plugin:1.2.4'. A required class is missing: org/apache/tools/ant/BuildException\n</code></pre>\n\n<p>Easy fix, right? Add Ant as a dependency. So I add:</p>\n\n<pre><code>&lt;dependency&gt;\n&lt;groupId&gt;org.apache.ant&lt;/groupId&gt;\n&lt;artifactId&gt;ant&lt;/artifactId&gt;\n&lt;version&gt;1.8.4&lt;/version&gt;\n&lt;/dependency&gt;\n</code></pre>\n\n<p>(And lord only know why this should need Ant in the first place.)</p>\n\n<p>I can now find org.apache.tools.ant.BuildException on my classpath, but I STILL get this error.</p>\n\n<p>So, thinking this is surely some issue with my own build, I decided to start fresh, using the maven2-cargo-plugin archetype documented here: <a href=\"http://cargo.codehaus.org/Maven2+Archetypes\" rel=\"nofollow\">http://cargo.codehaus.org/Maven2+Archetypes</a></p>\n\n<p>You know what? Same problem!</p>\n\n<p>I've tried different versions of the plugin. I've tried different versions of Ant. No luck.</p>\n\n<p>Someone MUST have run into this before. I see mentions of this issue online, but don't see any solutions.</p>\n\n<p>Any insight is appreciated!</p>\n", "Lable": "No"}
2
+ {"QuestionId": 12370544, "AnswerCount": 9, "Tags": "<java><immutability><mutable><primitive-types>", "CreationDate": "2012-09-11T13:13:08.353", "AcceptedAnswerId": "12370590", "Title": "Why are Java wrapper classes immutable?", "Body": "<p>I know the usual reasons that apply to general immutable classes, viz</p>\n\n<ol>\n<li>can not change as a side effect </li>\n<li>easy to reason about their state </li>\n<li>inherently thread safe </li>\n<li>no need to provide clone/copy constructor/factory copy method </li>\n<li>instance caching</li>\n<li>no need for defensive copies.</li>\n</ol>\n\n<p>However, wrapper classes represent primitive types, and primitive types are mutable. So why aren't wrapper classes mutable?</p>\n", "Lable": "No"}
3
+ {"QuestionId": 12409968, "AnswerCount": 1, "Tags": "<android><eclipse><layout>", "CreationDate": "2012-09-13T15:39:15.470", "AcceptedAnswerId": "12410598", "Title": "How i can make a consumption bar in Android?", "Body": "<p>how i can make a consumption bar?\nI tried using seekbar but its not the expected result so whats the best way to do it?\nIm adding an image where this bar show up as example\nim using eclipse and android sdk plugin</p>\n\n<p><img src=\"https://i.stack.imgur.com/VJWQN.jpg\" alt=\"consumption Bars \"></p>\n", "Lable": "No"}
4
+ {"QuestionId": 12570912, "AnswerCount": 1, "Tags": "<internet-explorer-9><css3>", "CreationDate": "2012-09-24T18:40:24.853", "AcceptedAnswerId": null, "Title": "How to convert text-shadow so IE9 will work", "Body": "<p>How would I set the text-shadow property in ie9 to match the other browsers like I've got it below?</p>\n\n<p>How to use .sysMenu-item text-shadow</p>\n\n<pre><code>.sysMenu-item{padding:8px;padding-top:7px;height:110%;float:left; \n border-right:.2em groove #fff;margin-top:-2px; cursor: pointer;\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.64);\n}\n</code></pre>\n\n<p>--in ie9?</p>\n\n<p>I need the above text-shadow to work in the below css3</p>\n\n<pre><code>html.ie9 .sysMenu-item {\n background-color: white;\n filter: progid:DXImageTransform.Microsoft.Chroma(color=rgba(255, 255, 255, 0.64)) \n progid:DXImageTransform.Microsoft.Alpha(opacity=100) \n progid:DXImageTransform.Microsoft.dropshadow(color=#ffffff,offX=1,offY=1)\n progid:DXImageTransform.Microsoft.dropshadow(color=#ffffff,offX=-1,offY=1)\n progid:DXImageTransform.Microsoft.dropshadow(color=#ffffff,offX=1,offY=-1)\n progid:DXImageTransform.Microsoft.dropshadow(color=#ffffff,offX=-1,offY=-1);\n zoom: 1;\n}\n</code></pre>\n", "Lable": "No"}
5
+ {"QuestionId": 12661862, "AnswerCount": 3, "Tags": "<matlab><utc><epoch>", "CreationDate": "2012-09-30T14:09:27.870", "AcceptedAnswerId": "12663377", "Title": "Converting Epoch to Date in Matlab", "Body": "<p>I have an array of Epoch milliseconds (array of numbers) in Matlab. I would like to convert these into UTC date-time format, such as DD-MM-YYYY HH:MM.</p>\n\n<p>Is there a pre-defined Matlab way to do this or will I have to write my own function?</p>\n", "Lable": "No"}
6
+ {"QuestionId": 12682278, "AnswerCount": 2, "Tags": "<ant><junit>", "CreationDate": "2012-10-01T22:57:15.910", "AcceptedAnswerId": "12685119", "Title": "Junit test error with Ant, no message, no reason given", "Body": "<p>I'm trying to use Junit test with ant.</p>\n\n<p>Since I don't really know how to write Junit test without eclipse, I'll just start with something completely trivial I found online. This should always pass.</p>\n\n<p>Test1.java</p>\n\n<pre><code>import junit.framework.*;\npublic class Test1 extends TestCase {\n @Test\n public void testOne()\n {\n System.out.println(\"Heyy there I'm a test!\");\n assertTrue( \"TestExample\", true );\n }\n} \n</code></pre>\n\n<p>I add to my build.xml these...</p>\n\n<pre><code>49 &lt;target name=\"junit\" depends=\"jar\"&gt;\n50 &lt;junit printsummary=\"withOutAndErr\" fork=\"yes\" showoutput=\"yes\"&gt;\n51 &lt;classpath refid=\"application\"/&gt;\n52 &lt;test name=\"test.Test1\"/&gt;\n53 &lt;/junit&gt;\n54 &lt;/target&gt;\n</code></pre>\n\n<p>So now when I run \"ant junit\" I'm getting</p>\n\n<pre><code>junit:\n [junit] Running test.Test1\n [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec\n</code></pre>\n\n<p>So... that doesn't tell me anything... what was wrong? how to fix it? nothing.\nAnyone knows what's up?</p>\n", "Lable": "No"}
7
+ {"QuestionId": 12689456, "AnswerCount": 1, "Tags": "<tsql>", "CreationDate": "2012-10-02T11:27:45.663", "AcceptedAnswerId": "12689474", "Title": "T SQL: How get all minutes from Time type", "Body": "<p>I have the following code and I want get all minutes from time type.</p>\n\n<pre><code>declare @time time\nset @time = '01:30'\n\ndeclare @minutes int\n\n--select @minutes = convert time to minutes here\n\nselect @minutes -- @minutes == 90\n</code></pre>\n\n<p>Please help.</p>\n", "Lable": "No"}
8
+ {"QuestionId": 12691128, "AnswerCount": 2, "Tags": "<c++><class><operator-overloading>", "CreationDate": "2012-10-02T13:22:56.270", "AcceptedAnswerId": "12691162", "Title": "Operator overloading in C++ and the ampersand", "Body": "<blockquote>\n <p><strong>Possible Duplicate:</strong><br>\n <a href=\"https://stackoverflow.com/questions/1572016/whats-the-ampersand-for-when-used-after-class-name-like-ostream-operator\">What&#39;s the ampersand for when used after class name like ostream&amp; operator &lt;&lt;(&hellip;)?</a> </p>\n</blockquote>\n\n\n\n<p>I am new to C++ and I have probably a very noobish question. I have seen a thing like this:</p>\n\n<pre><code>Vector3f &amp; operator = (Vector3f &amp; obj)\n{\n _item[0] = obj[0];\n _item[1] = obj[1];\n _item[2] = obj[2];\n\n return *this;\n}\n</code></pre>\n\n<p>And I was wondering why is there an ampersand (&amp;) after Vector3f. What kind of magic is it doing? I couldn't find any explanations anywhere. Most importantly, what is the difference between the thing above and</p>\n\n<pre><code>Vector3f operator = (Vector3f obj)\n{\n _item[0] = obj[0];\n _item[1] = obj[1];\n _item[2] = obj[2];\n\n return *this;\n}\n</code></pre>\n", "Lable": "No"}
9
+ {"QuestionId": 12796546, "AnswerCount": 1, "Tags": "<perforce>", "CreationDate": "2012-10-09T09:10:55.837", "AcceptedAnswerId": null, "Title": "Issue while creating workspace in perforce", "Body": "<p>I am not able to create a workspace in perforce. I go to Connection --> New Workspace and then give desired workspace name and workspaceroot and then click \"OK\". And also it does not give any error. But when I try to access the workspace to add files in it,I am not able to access it, it gives error as \"the path is not found\". This means workspace has not been created in my local system. Can you please help here? I am new to perforce so please answer accordingly.</p>\n", "Lable": "No"}
10
+ {"QuestionId": 12801403, "AnswerCount": 2, "Tags": "<php><facebook><apache>", "CreationDate": "2012-10-09T13:40:08.133", "AcceptedAnswerId": "12817244", "Title": "include_path error when trying to access app in localhost", "Body": "<p>I realize that a question thread already exists, but it has been closed since and the OP hadn't responded to the answer. The question thread can be found here: <a href=\"https://stackoverflow.com/questions/5547333/include-path-c-php5-pear\">https://stackoverflow.com/questions/5547333/include-path-c-php5-pear</a></p>\n\n<p>So, my problem is this:</p>\n\n<p>I have my facebook app locally in my htdocs folder (my DocumentRoot) and it requires sdk/src/facebook.php. I receive the following error upon trying to view the page:</p>\n\n<pre><code>Warning: require_once(sdk/src/facebook.php) [function.require-once]: failed to open stream: No such file or directory in D:\\Apache\\Apache2\\htdocs\\www\\immense-headland-4743\\index.php on line 14\n\nFatal error: require_once() [function.require]: Failed opening required 'sdk/src/facebook.php' (include_path='d:\\php\\pear') in D:\\Apache\\Apache2\\htdocs\\www\\immense-headland-4743\\index.php on line 14\n</code></pre>\n\n<p>I have tried variations of the backslash and forward slash in my php.ini file; I have tried set_initial_path() and init_set() in my main index.php - but nothing works. What is going wrong here?</p>\n", "Lable": "No"}
11
+ {"QuestionId": 12883538, "AnswerCount": 3, "Tags": "<android><get><gps><location>", "CreationDate": "2012-10-14T15:18:38.513", "AcceptedAnswerId": "12883565", "Title": "android current location GPS but return null", "Body": "<p>i develop an app to retrieve current location via GPS but it return null i want my app use gps only not 3g or wifi i used bestprovider but it retrieve only when i run it and not always work</p>\n\n<p>this is the java code :</p>\n\n<pre><code> package com.example.loc2;\n\n import android.location.Location;\n import android.location.LocationListener;\n import android.location.LocationManager;\n import android.os.Bundle;\n import android.app.Activity;\n import android.content.Context;\n import android.view.Menu;\n import android.view.View;\n import android.view.View.OnClickListener;\n import android.widget.Button;\n import android.widget.Toast;\n\n public class MainActivity extends Activity {\nprivate static final long MINIMUM_DISTANCE_CHANGE_FOR_UPDATES = 1; // in Meters \nprivate static final long MINIMUM_TIME_BETWEEN_UPDATES = 1000; // in Milliseconds\nprotected LocationManager locationManager;\nprotected Button retrieveLocationButton;\n\n@Override\npublic void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n retrieveLocationButton = (Button) findViewById(R.id.retrieve_location_button);\n\n locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n\n locationManager.requestLocationUpdates(\n LocationManager.GPS_PROVIDER, \n MINIMUM_TIME_BETWEEN_UPDATES, \n MINIMUM_DISTANCE_CHANGE_FOR_UPDATES,\n new MyLocationListener()\n );\n\nretrieveLocationButton.setOnClickListener(new OnClickListener() {\n // @Override\n public void onClick(View v) {\n showCurrentLocation();\n }\n}); \n\n} \n\nprotected void showCurrentLocation() {\n\n Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n\n if (location != null) {\n String message = String.format(\n \"Current Location \\n Longitude: \"+location.getLongitude()+\" \\n Latitude:\"+\n location.getLatitude());\n\n Toast.makeText( MainActivity.this,message,\n Toast.LENGTH_LONG).show();\n }\n\n} \n\nprivate class MyLocationListener implements LocationListener {\n\n public void onLocationChanged(Location location) {\n String message = String.format(\n \"New Location \\n Longitude: %1$s \\n Latitude: %2$s\",\n location.getLongitude(), location.getLatitude()\n );\n Toast.makeText(MainActivity.this, message, Toast.LENGTH_LONG).show();\n }\n\n public void onStatusChanged(String s, int i, Bundle b) {\n Toast.makeText(MainActivity.this, \"Provider status changed\",\n Toast.LENGTH_LONG).show();\n }\n\n public void onProviderDisabled(String s) {\n Toast.makeText(MainActivity.this,\n \"Provider disabled by the user. GPS turned off\",\n Toast.LENGTH_LONG).show();\n }\n\n public void onProviderEnabled(String s) {\n Toast.makeText(MainActivity.this,\n \"Provider enabled by the user. GPS turned on\",\n Toast.LENGTH_LONG).show();\n }\n\n}\n\n}\n</code></pre>\n\n<p>and this is the manifest:\ni used this permission </p>\n\n<pre><code> &lt;manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\npackage=\"com.example.loc2\"\nandroid:versionCode=\"1\"\nandroid:versionName=\"1.0\" &gt;\n\n&lt;uses-sdk\n android:minSdkVersion=\"8\"\n android:targetSdkVersion=\"15\" /&gt;\n&lt;uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/&gt;\n&lt;uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/&gt;\n&lt;uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/&gt;\n\n&lt;application\n android:icon=\"@drawable/ic_launcher\"\n android:label=\"@string/app_name\"\n android:theme=\"@style/AppTheme\" &gt;\n &lt;activity\n android:name=\".MainActivity\"\n android:label=\"@string/title_activity_main\" &gt;\n &lt;intent-filter&gt;\n &lt;action android:name=\"android.intent.action.MAIN\" /&gt;\n\n &lt;category android:name=\"android.intent.category.LAUNCHER\" /&gt;\n &lt;/intent-filter&gt;\n &lt;/activity&gt;\n &lt;/application&gt;\n\n &lt;/manifest&gt;\n</code></pre>\n\n<p>please help </p>\n", "Lable": "No"}
12
+ {"QuestionId": 12898338, "AnswerCount": 3, "Tags": "<javascript><jquery><json><widget><ruby-on-rails-3.2>", "CreationDate": "2012-10-15T14:58:06.990", "AcceptedAnswerId": "12910750", "Title": "Ruby on rails/Javascript widget", "Body": "<p>So here is my point, i tried to follow some tutorial and read all of the references in the end from <a href=\"http://8raystech.com/2011/11/28/how-to-create-embeddable-widgets-with-rails\" rel=\"nofollow\">http://8raystech.com/2011/11/28/how-to-create-embeddable-widgets-with-rails</a></p>\n\n<p>I spent almost 2 days searching for the little mistake I obviously made somewhere since I'm new to ruby on rails.\nI think it might be a route error since when I inspect elements via Chrome, i see the following error:\n<strong>EDIT:</strong></p>\n\n<pre><code>\"GET http://localhost:3000/widget 500 (Internal Server Error)\"\n</code></pre>\n\n<p>I tried many things on it desperately but here is my current code:</p>\n\n<p>My widget controller looks like this: (widget_controller.rb)</p>\n\n<pre><code>class WidgetController &lt; ApplicationController\n def show\n @content = render_to_string(:partial =&gt; 'widget/embed', :layout =&gt; false)\n end\nend\n</code></pre>\n\n<p>My view using javascript (show.erb.html)</p>\n\n<pre><code>(function() {\n document.write(&lt;%= @content.to_json %&gt;)\n})()\n</code></pre>\n\n<p>The partial is not really important i think but here is an example: (_embed.erb.html)</p>\n\n<pre><code>&lt;style&gt;...&lt;/style&gt;\n&lt;div class=\"widget-communication\"&gt;\n &lt;div&gt;Bla bla bla&lt;/div&gt;\n ...\n&lt;/div&gt;\n</code></pre>\n\n<p>and for the last, in the routes.rb</p>\n\n<pre><code>...\nmatch 'widget', to: 'widget#show'\n...\n</code></pre>\n\n<p>So I tested in local to load my widget using this:</p>\n\n<pre><code>&lt;script src=\"http://localhost:3000/widget\" type=\"text/javascript\"&gt;&lt;/script&gt;\n</code></pre>\n", "Lable": "No"}
13
+ {"QuestionId": 12934584, "AnswerCount": 2, "Tags": "<sql><sql-server-2008><stored-procedures>", "CreationDate": "2012-10-17T12:42:59.590", "AcceptedAnswerId": "12934596", "Title": "Error when creating stored procedure", "Body": "<p>I'm noob at stored procedures, I have created a stored procedure that take some parameters from C# page, then send back result as <code>OUTPUT</code> parameter.</p>\n\n<p>I need to do some calculation to get end date, so I end up using a lot of IF statements. However, when I create the stored procedure I get error that I didn't know how to solve, every thing seems correct!.</p>\n\n<p>Here is the stored procedure code:</p>\n\n<pre><code> CREATE PROCEDURE sp_RenewSubscription \n -- Add the parameters for the stored procedure here\n @Reference nvarchar(100),\n @SubscribtionID nvarchar(100),\n @Months int,\n @Result nvarchar(200) OUTPUT\n AS\n\nBEGIN\n -- SET NOCOUNT ON added to prevent extra result sets from\n -- interfering with SELECT statements.\n SET NOCOUNT ON;\n\n DECLARE @EndDate as nvarchar;\n DECLARE @MonthCounts as int;\n\n IF NOT EXISTS(SELECT [Reference] FROM [Norton].[dbo].[SubscriptionStatus] WHERE [Reference] = @Reference)\n SET @Result = '0: Reference ID not found'\n ELSE\n IF NOT EXISTS(SELECT [Reference] FROM [Norton].[dbo].[SubscriptionStatus] WHERE [Reference] = @Reference AND [SubscribtionID] = @SubscribtionID)\n SET @Result = '0: Subscribtion ID not found'\n ELSE\n BEGIN \n SELECT TOP 1 @EndDate = [EndDate], @MonthCounts = [SubscriptionMonthCount] FROM [Norton].[dbo].[SubscriptionStatus] WHERE [Reference] = @Reference AND [SubscribtionID] = @SubscribtionID\n IF @EndDate = '0'\n BEGIN \n UPDATE [Norton].[dbo].[SubscriptionStatus]\n SET [SubscriptionMonthCount] = @Months + @MonthCounts\n WHERE [Reference] = @Reference AND [SubscribtionID] = @SubscribtionID\n END\n ELSE\n BEGIN \n UPDATE [Norton].[dbo].[SubscriptionStatus]\n SET [SubscriptionMonthCount] = @Months\n WHERE [Reference] = @Reference AND [SubscribtionID] = @SubscribtionID\n END\n\n SET @Result = '1: Done Successfully'\n END\nGO\n\nEND\nGO\n</code></pre>\n\n<p>This is error I got:</p>\n\n<blockquote>\n <p>Msg 102, Level 15, State 1, Procedure sp_RenewSubscription, Line 44<br>\n Incorrect syntax near 'END'.<br>\n Msg 102, Level 15, State 1, Line 2<br>\n Incorrect syntax near 'END'.*</p>\n</blockquote>\n\n<p>Thanks,</p>\n", "Lable": "No"}
oraclechunk19.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {"QuestionId": 13157315, "AnswerCount": 1, "Tags": "<macports><homebrew>", "CreationDate": "2012-10-31T11:53:19.723", "AcceptedAnswerId": "13157540", "Title": "homebrew uninstall/move macports UNDO", "Body": "<p>brew doctor told me to move macports: sudo mv /opt/local ~/macports</p>\n\n<p>So I did that and now nothing works properly. What would be the command to move macports back to where it was?</p>\n", "Lable": "No"}
2
+ {"QuestionId": 13429218, "AnswerCount": 2, "Tags": "<python><python-2.7>", "CreationDate": "2012-11-17T09:11:59.167", "AcceptedAnswerId": "13429402", "Title": "Modifying a dictionary with datetime as keys", "Body": "<p>For example:</p>\n\n<pre><code>{datetime.date(2000, 1, 15): [1],\n datetime.date(2000, 1, 14): [5],\n datetime.date(2000, 1, 3): [4],\n datetime.date(2005, 1, 10): [2],\n datetime.date(2005, 1, 16): [4],\n datetime.date(2005, 1, 5): [2]}\n</code></pre>\n\n<p>to just:</p>\n\n<pre><code>{(2000, 1): [10], (2005,1): [8]}\n</code></pre>\n\n<p>basically omitting the day, and adding the values. I can't seem to figure out how to remove <code>datetime.date</code>.</p>\n", "Lable": "No"}
3
+ {"QuestionId": 13436206, "AnswerCount": 1, "Tags": "<ruby-on-rails><ruby><inventory><inventory-management>", "CreationDate": "2012-11-18T00:19:31.917", "AcceptedAnswerId": null, "Title": "Creating a Book Inventory System in Ruby on Rails", "Body": "<p>I'm currently in the process of creating a inventory system designed for books and other paper goods. I want to create the website in Ruby on Rails. What I'm looking for is any examples or ideas that can make that happen.</p>\n\n<p>What I need to happen is when this is set up it'll have the books added, with a current count and a few other details(name, date published, etc.). Now when a delivery comes in they can add to the current count. When books are removed they can of course subtract that from the total. Love all this to be seemless if possible. The more its user friendly the better. </p>\n\n<p>Also when books are reaching a low stock a warning will be shown. Also a list of books alphabetically with all the details and so forth.</p>\n\n<p>I'm at a loss on how exactly to do this efficiently, I'm fairly new to Ruby on Rails but very familiar with HTML, PHP, CSS and so those cause no problems.</p>\n", "Lable": "No"}
4
+ {"QuestionId": 13565177, "AnswerCount": 2, "Tags": "<git><git-merge><git-diff>", "CreationDate": "2012-11-26T12:48:09.050", "AcceptedAnswerId": "13565228", "Title": "How to apply diff between commits to current head in git?", "Body": "<p>I was working on some topic branch on project I participate in. I normally rebase my branches before making a pull request. This time however, due to changes in master, rebasing is a big pain. Lot of conflicts and, what's worse, after manual merging commits look just ugly and loose their point. I would definitely prefer to obtain diff between my branch's head and latest commit present on both branches, then apply this diff to master's head and finally create brand new shiny commits with <code>git add -p</code>. So my question is: how to achieve it? One possibility would be to simply merge master into my topic branch, but is there a more elegant solution? I believe yes.</p>\n\n<p>Thanks for your help.</p>\n\n<p><strong>EDIT</strong>:</p>\n\n<p>One file has been moved on master branch and my commits are altering this file (using it's old name).</p>\n", "Lable": "No"}
5
+ {"QuestionId": 13585178, "AnswerCount": 1, "Tags": "<javascript><html><jsp><tinymce>", "CreationDate": "2012-11-27T13:22:04.560", "AcceptedAnswerId": null, "Title": "TinyMCE with div tag?", "Body": "<p>Below is my JSP code:</p>\n\n<pre><code>&lt;tr&gt;\n &lt;td colspan=\"2\"&gt;custEmail&lt;/td&gt;\n &lt;td colspan=\"5\"&gt;&lt;div id= \"custEmail\"&gt;&lt;p&gt;&lt;strong&gt;Test&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;\n&lt;/tr&gt;\n</code></pre>\n\n<p>Below is the code attaching the <code>div</code> with <a href=\"http://www.tinymce.com\" rel=\"nofollow\" title=\"TinyMCE Editor\">TinyMCE Editor</a></p>\n\n<pre><code>&lt;script type=\"text/javascript\" src=\"tinymce/tinymce.min.js\"&gt;&lt;/script&gt;\n&lt;script type=\"text/javascript\"&gt;\ntinyMCE.init({\n width : \"640\",\n mode : \"exact\",\n elements : \"custEmail\",\n theme : \"advanced\",\n plugins : \"preview\",\n readonly : true,\n theme_advanced_buttons1 : \"forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,formatselect,fontselect,fontsizeselect,sub,sup,|,bold,italic,underline,strikethrough\",\n theme_advanced_buttons2 : \"\",\n theme_advanced_buttons3 : \"\",\n theme_advanced_toolbar_location : \"top\",\n theme_advanced_toolbar_align : \"left\",\n theme_advanced_statusbar_location : \"bottom\",\n theme_advanced_resizing : true\n });\n&lt;/script&gt;\n</code></pre>\n\n<p>But on my HTML page, I see the content as: </p>\n\n<pre><code>&lt;p&gt;&lt;strong&gt;Test&lt;/strong&gt;&lt;/p&gt;\n</code></pre>\n\n<p>Instead of Bold Test. As soon as I change the following:</p>\n\n<pre><code>div id=\"custEmail\" tag to textarea id=\"custEmail\"\n</code></pre>\n\n<p>It works fine. Not sure if I need to have some setting for div tag?</p>\n", "Lable": "No"}
6
+ {"QuestionId": 13665763, "AnswerCount": 1, "Tags": "<ruby-on-rails><model-view-controller><local-variables><renderpartial><partials>", "CreationDate": "2012-12-02T02:07:36.040", "AcceptedAnswerId": "13667544", "Title": "shared partials error undefined method `empty?' for nil:NilClass", "Body": "<p>I've create a partial (<strong>views/cart/_cart.html.erb</strong>) for my applications shopping cart. I'm rendering it in only in my <strong>views/layouts/application.html.erb</strong> file. But when I run it I'm getting a NoMethodError on every page other than the <strong>views/cart/_cart.index.erb</strong>, which I suspect is because it shares the same controller as the partial being rendered.</p>\n\n<p>I've been looking everywhere for an answer &amp; believe it has something to do with how I'm passing variables when rendering the partial, I'll really appreciate it if someone can have a look?</p>\n\n<p>All code can be found here: <a href=\"https://github.com/rossmc/topsnowboards\" rel=\"nofollow\">https://github.com/rossmc/topsnowboards</a></p>\n\n<p>My code for my partial (<strong>views/cart/_cart.html.erb</strong>) begins:</p>\n\n<pre><code>&lt;% @cart = cart%&gt;\n\n&lt;h1&gt;Your Cart&lt;/h1&gt;\n\n&lt;% if @cart.empty? %&gt;\n &lt;p&gt;There is nothing in your shopping Cart&lt;/p&gt;\n&lt;% end %&gt;\n\n&lt;% total = 0 %&gt;\n\n&lt;!-- More code displaying the rest of the cart omitted for brevity \n</code></pre>\n\n<p>The partial is rendered in <strong>views/layouts/application.html.erb</strong> with:</p>\n\n<pre><code>&lt;%= render :partial =&gt; \"/cart/cart\", :locals =&gt; { :cart =&gt; @cart } \n</code></pre>\n\n<p>The <strong>error message</strong> Rails is throwing back at me when I run it is:</p>\n\n<pre><code>NoMethodError in Site#home\n\nShowing Server Side/PROJ-Server Side/app/views/cart/_cart.html.erb where line #5 raised:\n\nundefined method `empty?' for nil:NilClass\n\nExtracted source (around line #5):\n\n2: \n3: &lt;h1&gt;Your Cart&lt;/h1&gt;\n4: \n5: &lt;% if @cart.empty? %&gt;\n6: &lt;p&gt;There is nothing in your shopping Cart&lt;/p&gt;\n7: &lt;% end %&gt;\n8: \n</code></pre>\n", "Lable": "No"}
7
+ {"QuestionId": 13698969, "AnswerCount": 3, "Tags": "<unit-testing><mocking><stub>", "CreationDate": "2012-12-04T08:44:59.977", "AcceptedAnswerId": "13702056", "Title": "What is the difference between mocks, stubs and fake objects", "Body": "<p>Although there are plenty of resources, even here on SO, only two of the terms are compared to each other in these Q/A. </p>\n\n<p>So, in short, what is each one of them? And how they all relate to each other? Or don't they at all?</p>\n", "Lable": "No"}
oraclechunk20.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"QuestionId": 13835353, "AnswerCount": 1, "Tags": "<grails><twitter-bootstrap><gsp>", "CreationDate": "2012-12-12T08:06:25.847", "AcceptedAnswerId": "13843143", "Title": "How to add style to the value attribute of submitToRemote?", "Body": "<p>In my application i use twitter bootstrap to add nice icons to buttons etc. With normal buttons and links i can achieve this by doing..</p>\n\n<pre><code>&lt;g:remoteLink .. code omitted .. class=\"btn\"&gt;\n &lt;i class=\"icon icon-warning-sign\"&gt;&lt;/i&gt; &lt;g:message code=\"default.button.add.label\"/&gt;\n&lt;/g:remoteLink&gt;\n</code></pre>\n\n<p>This results in a nice button with a icon in front of the text..</p>\n\n<p>Now i want to use a submitToRemote:</p>\n\n<pre><code>&lt;g:submitToRemote .. code omitted .. value=\"${message(code: 'default.button.add.label')}\" class=\"btn\"/&gt;\n</code></pre>\n\n<p>But i seem to fail in adding the</p>\n\n<pre><code>&lt;i class=\"icon icon-warning-sign\"&gt;&lt;/i&gt;\n</code></pre>\n\n<p>to the value.. any hints or tips on how to achieve this?</p>\n\n<p>I tried several things like putting this style in the class attribute but this also fails.</p>\n\n<p>Any hints?</p>\n", "Lable": "No"}
2
+ {"QuestionId": 13868582, "AnswerCount": 1, "Tags": "<iphone><xcode><uiwebview><ios6><storyboard>", "CreationDate": "2012-12-13T21:14:12.557", "AcceptedAnswerId": null, "Title": "Auto Adjust Storyboard Webview size according to navigation bar", "Body": "<p>I have a webview in a viewcontroller with a navigation bar and a toolbar. I have a hide toolbar and nav bar button, but when they hide the size of the webview doesn't adjust to fit the screen. I used this code: </p>\n\n<pre><code>-(IBAction)hide:(id)sender {\nmyView.frame = CGRectMake(0,0,320,480);\n[[[self navigationController] navigationBar] setHidden:YES];\n[[[self navigationController] toolbar] setHidden:YES];\n [self.view addSubview:myView];\n }\n\n -(BOOL)canBecomeFirstResponder {\n\nreturn YES;\n\n }\n\n -(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event {\n\nif (event.subtype == UIEventSubtypeMotionShake) {\n\n myView.frame = CGRectMake(0,0,320,382);\n [[[self navigationController] navigationBar] setHidden:NO];\n [[[self navigationController] toolbar] setHidden:NO];\n [self.view addSubview:myView];\n\n}\n\n }\n</code></pre>\n\n<p>They hide properly but how can i adjust the size properly? Im using storyboard btw.</p>\n", "Lable": "No"}
3
+ {"QuestionId": 14045532, "AnswerCount": 3, "Tags": "<bash><sed><awk>", "CreationDate": "2012-12-26T19:55:30.987", "AcceptedAnswerId": "14046171", "Title": "BASH replace char with other char to fill a word", "Body": "<p>I need to replace a selected character with as many copies of another character as necessary to fill up a determined space (exact 12 chars).</p>\n\n<p>Example, replace char '1' with zero or more char '0':</p>\n\n<pre><code>ABC1 =&gt; ABC000000000\nABC1JKL =&gt; ABC000000JKL\n1JKL =&gt; 000000000JKL\n1000 =&gt; 000000000000\nABCDEFGHIJKL1 =&gt; ABCDEFGHIJKL\n1ABCDEFGHIJKL =&gt; ABCDEFGHIJKL\nABCDEFGHIJKL =&gt; ABCDEFGHIJKL\n1EFG1 =&gt; undefined (do not bother with this case)\nEFG =&gt; undefined (do not bother with this case)\n</code></pre>\n", "Lable": "No"}
4
+ {"QuestionId": 14045739, "AnswerCount": 1, "Tags": "<visual-studio-2010><opencv>", "CreationDate": "2012-12-26T20:15:30.960", "AcceptedAnswerId": "14047039", "Title": "Why is this while loop breaking while reading an avi file in opencv?", "Body": "<pre><code>int main(int argc, char* argv[]) {\nofstream file;\nfile.open(\"Motion.dat\");\nint frame_number = 0;\nCvCapture* capture = cvCreateFileCapture(\"Cricketc1.avi\");\nCvCapture* capture1 = cvCreateFileCapture(\"Cricketc1.avi\");\n\nIplImage* imgsize = NULL;\nIplImage *img1 = NULL;\nIplImage *img2 = NULL;\nIplImage *vidFrame = NULL;\nIplImage *imggray1 = NULL;\nIplImage *imggray2 = NULL;\nIplImage *imggray3 = NULL;\n\ncvNamedWindow(\"Video\", 0);\ncvNamedWindow(\"Video1\", 0);\nimgsize = cvQueryFrame(capture1);\nassert(imgsize);\nCvSize sz = cvGetSize(imgsize);\ncvReleaseCapture(&amp;capture1);\nimggray1 = cvCreateImage(sz, IPL_DEPTH_8U, 1);\nimggray2 = cvCreateImage(sz, IPL_DEPTH_8U, 1);\nimggray3 = cvCreateImage(sz, IPL_DEPTH_8U, 1);\n\nwhile (true) {\n frame_number++;\n img1 = cvQueryFrame(capture);\n if(img1-&gt;imageData == NULL)\n break;\n cvCvtColor(img1, imggray1, CV_RGB2GRAY);\n\n img2 = cvQueryFrame(capture);\n if(img2-&gt;imageData == NULL)\n break;\n cvCvtColor(img1, imggray1, CV_RGB2GRAY);\n\n cvAbsDiff( imggray1, imggray2, imggray3 );\n CvScalar sumDiff = cvSum (imggray3);\n cout &lt;&lt; sunDiff.val[0] &lt;&lt; sunDiff.val[1] &lt;&lt; sunDiff.val[2] &lt;&lt; endl;\n cvWaitKey(40);\n}\ncvReleaseCapture(&amp;capture);\ncvDestroyAllWindows();\nfile.close();\nsystem(\"Pause\");\nreturn 0;\n}\n</code></pre>\n\n<p>There are a total of 1251 frames in the video @ 25 fps.</p>\n\n<p>But the loop breaks at <code>frame_number</code> equal to 625, at line <code>if(img2-&gt;imageData == NULL)</code>.</p>\n\n<p>This error mainly comes up if I do any computation in between the while loop. A simple cvShowImage() will work just fine, but any other manipulation around it causes this error to show up.</p>\n\n<p>This is the error that comes up after that :\n<code>Unhandled exception at 0x00221de7 in getMotion2.exe: 0xC0000005: Access violation reading location 0x00000044.</code></p>\n\n<p>What is the problem ?</p>\n", "Lable": "No"}
5
+ {"QuestionId": 14130290, "AnswerCount": 1, "Tags": "<android><oop>", "CreationDate": "2013-01-02T22:31:08.203", "AcceptedAnswerId": null, "Title": "android how to pass an object to a new class", "Body": "<p>I have the following Activity</p>\n\n<pre><code>public class BmiHistory extends Activity {\n\n\npublic Cursor cursor;\n\n@Override\npublic void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n //setContentView(R.layout.bmihistory);\n final DatabaseHandler databaseOpen = new DatabaseHandler(this);\n final SQLiteDatabase db = databaseOpen.getReadableDatabase();\n\n Cursor c1 = db.rawQuery(\"select * from bmi\", null);\n startManagingCursor(c1);\n c1.moveToFirst();\n this.cursor = c1; \n while(!c1.isAfterLast()) {\n System.out.println(c1.getString(2));\n c1.moveToNext();\n }\n c1.close();\n\n\n BmiGraph drawView = new BmiGraph(this);\n drawView.setBackgroundColor(Color.WHITE);\n setContentView(drawView);\n\n}\n\n\n}\n</code></pre>\n\n<p>I have the following class called from this activity</p>\n\n<pre><code>public class BmiGraph extends View {\n\nPaint paint = new Paint();\n\n\npublic BmiGraph(BmiHistory context) {\n super(context);\n // TODO Auto-generated constructor stub\n System.out.println(context.toString());\n}\n\npublic void onDraw(Canvas canvas) {\n paint.setColor(Color.BLACK);\n paint.setStrokeWidth(3);\n ...\n}\n\n\n}\n</code></pre>\n\n<p>My question is how can I make the data from the cursor in the Activity available to the second class in order to plot a graph?</p>\n\n<p>Many thanks</p>\n", "Lable": "No"}
6
+ {"QuestionId": 14236658, "AnswerCount": 0, "Tags": "<php>", "CreationDate": "2013-01-09T13:48:00.493", "AcceptedAnswerId": null, "Title": "I want to fetch all the friends list from facebook by their email address?", "Body": "<blockquote>\n <p><strong>Possible Duplicate:</strong><br>\n <a href=\"https://stackoverflow.com/questions/4331666/how-to-get-facebook-friends-email\">How to get Facebook friends&#39; email?</a> </p>\n</blockquote>\n\n\n\n<p>I want to fetch all the friends list from facebook. can any one lell me the way to get facebook friends list.i am developing a website, and i want there a option to invite my facebook frends by their email address.</p>\n", "Lable": "No"}
7
+ {"QuestionId": 14351709, "AnswerCount": 1, "Tags": "<grails><spring-security><cas>", "CreationDate": "2013-01-16T05:05:22.747", "AcceptedAnswerId": null, "Title": "Issue while deploying new war for a groovy in grails application using CAS for user authentication", "Body": "<p>I am Facing a Problem. I have used CAS to authenticate the user log in for my application . How ever each time when i deploy the application war and browse i receive a Hibernate Exception error, and after continuously refreshing for 5,6 times login page appears. I am unable to track the issue. Please Help.</p>\n\n<p>Here is the log-</p>\n\n<pre><code>Could not synchronize database state with session\norg.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here\n at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)\n at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:574)\n at org.codehaus.groovy.grails.orm.hibernate.validation.HibernateDomainClassValidator.validate(HibernateDomainClassValidator.java:66)\n at org.codehaus.groovy.grails.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:126)\n at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:117)\n at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:59)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n at java.lang.reflect.Method.invoke(Method.java:597)\n at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:188)\n at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)\n at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:132)\n at org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport$_addValidationMethods_closure19.doCall(HibernatePluginSupport.groovy:484)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n at java.lang.reflect.Method.invoke(Method.java:597)\n at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\n at org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod.invoke(ClosureMetaMethod.java:80)\n at org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventListener.onPreUpdate(ClosureEventListener.java:264)\n at org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventTriggeringInterceptor.onPreUpdate(ClosureEventTriggeringInterceptor.java:167)\n at org.hibernate.action.EntityUpdateAction.preUpdate(EntityUpdateAction.java:237)\n at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:88)\n at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)\n at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)\n at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)\n at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)\n at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)\n at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)\n at org.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:390)\n at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:407)\n at org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:343)\n at org.codehaus.groovy.grails.orm.hibernate.metaclass.ListPersistentMethod.doInvokeInternal(ListPersistentMethod.java:53)\n at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractStaticPersistentMethod.invoke(AbstractStaticPersistentMethod.java:64)\n at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractStaticPersistentMethod.invoke(AbstractStaticPersistentMethod.java:57)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n at java.lang.reflect.Method.invoke(Method.java:597)\n at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:188)\n at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)\n at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:132)\n at org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport$_addQueryMethods_closure45.doCall(HibernatePluginSupport.groovy:619)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n at java.lang.reflect.Method.invoke(Method.java:597)\n at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)\n at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)\n at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)\n at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)\n at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)\n at groovy.lang.Closure.call(Closure.java:282)\n at org.codehaus.groovy.runtime.metaclass.ClosureStaticMetaMethod.invoke(ClosureStaticMetaMethod.java:59)\n at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:148)\n at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:88)\n at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)\n at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:55)\n at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)\n at org.codehaus.groovy.grails.plugins.springsecurity.ReflectionUtils.loadAllRequestmaps(ReflectionUtils.groovy:72)\n at org.codehaus.groovy.grails.plugins.springsecurity.RequestmapFilterInvocationDefinition.loadRequestmaps(RequestmapFilterInvocationDefinition.java:64)\n at org.codehaus.groovy.grails.plugins.springsecurity.RequestmapFilterInvocationDefinition.reset(RequestmapFilterInvocationDefinition.java:51)\n at org.codehaus.groovy.grails.plugins.springsecurity.RequestmapFilterInvocationDefinition.initialize(RequestmapFilterInvocationDefinition.java:41)\n at org.codehaus.groovy.grails.plugins.springsecurity.AbstractFilterInvocationDefinition.findConfigAttributes(AbstractFilterInvocationDefinition.java:99)\n at org.codehaus.groovy.grails.plugins.springsecurity.AbstractFilterInvocationDefinition.getAttributes(AbstractFilterInvocationDefinition.java:81)\n at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:171)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:106)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)\n at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:112)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)\n at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)\n at org.codehaus.groovy.grails.plugins.springsecurity.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:40)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)\n at org.springframework.deerwalk.impl.CustomCasAuthenticationFilter.doFilter(CustomCasAuthenticationFilter.java:113)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)\n at org.codehaus.groovy.grails.plugins.springsecurity.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:79)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:167)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:106)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:106)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)\n at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)\n at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)\n at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)\n at java.lang.Thread.run(Thread.java:619)\n</code></pre>\n", "Lable": "No"}
8
+ {"QuestionId": 14426004, "AnswerCount": 1, "Tags": "<android><android-contacts>", "CreationDate": "2013-01-20T15:23:20.410", "AcceptedAnswerId": null, "Title": "Reading the \"me\" contact card", "Body": "<p>Starting with some API, Google decided to add a \"me\" contact, describing info of the device's owner.</p>\n\n<p>How do you read the info of this contact? Is it even possible? And from which API can I assume it exists?</p>\n", "Lable": "No"}
9
+ {"QuestionId": 14444625, "AnswerCount": 2, "Tags": "<javascript><google-maps><angularjs>", "CreationDate": "2013-01-21T18:04:31.190", "AcceptedAnswerId": "14445259", "Title": "AngularJS: map via Google Maps API v3 in a tab", "Body": "<p>I am trying to create a page with tabs (using AngularJS). There is a map (Google Maps API v3) in one of those tabs. When the map is in the tab in foreground everything seems to be OK. But when the map is loaded in the background tab and visible only after the tab is clicked the map is misplaced/cut off and when you try to manipulate with it it's functionality seems to be broken.</p>\n\n<p>I've searched for solutions and I found those tricks with </p>\n\n<pre><code>google.maps.event.trigger(map, 'resize');\nmap.setCenter(center);\n</code></pre>\n\n<p>but it's not working.\nCould you please have a look at <a href=\"http://jsfiddle.net/n4q7Y/5/\">http://jsfiddle.net/n4q7Y/5/</a> and tell me what I missed?</p>\n\n<p>Thank you.</p>\n", "Lable": "No"}
10
+ {"QuestionId": 14445484, "AnswerCount": 2, "Tags": "<web-services><apache-camel><endpoint>", "CreationDate": "2013-01-21T19:06:21.173", "AcceptedAnswerId": null, "Title": "Webservice having \"No such operation: HTTP GET PATH_INFO\"", "Body": "<p>I currently have a SOAP web service and I am trying to access it's endpoint but I keep getting this error:</p>\n\n<pre><code>&lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt;\n &lt;soap:Body&gt;\n &lt;soap:Fault&gt;\n &lt;faultcode&gt;soap:Server&lt;/faultcode&gt;\n &lt;faultstring&gt;\n No such operation: (HTTP GET PATH_INFO: /camel-example-reportincident/webservices/incident)\n &lt;/faultstring&gt;\n &lt;/soap:Fault&gt;\n &lt;/soap:Body&gt;\n &lt;/soap:Envelope&gt;\n</code></pre>\n\n<hr>\n\n<h2>UNIT TEST</h2>\n\n<pre><code>package org.apache.camel.example.reportincident;\n\nimport junit.framework.TestCase;\n\nimport org.apache.camel.CamelContext;\nimport org.apache.camel.impl.DefaultCamelContext;\nimport org.apache.cxf.jaxws.JaxWsProxyFactoryBean;\nimport org.jvnet.mock_javamail.Mailbox;\n\n/**\n * Unit test of our routes\n */\npublic class ReportIncidentRoutesTest extends TestCase {\n\nprivate CamelContext camel;\n\n// should be the same address as we have in our route\nprivate static String ADDRESS = \"cxf://http://localhost:8080/camel-example-reportincident/webservices/incident\"\n + \"?serviceClass=org.apache.camel.example.reportincident.ReportIncidentEndpoint\"\n + \"&amp;wsdlURL=report_incident.wsdl\";\n\nprotected void startCamel() throws Exception {\n camel = new DefaultCamelContext();\n camel.addRoutes(new ReportIncidentRoutes());\n camel.start();\n}\n\nprotected static ReportIncidentEndpoint createCXFClient() {\n // we use CXF to create a client for us as its easier than JAXWS and works\n JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();\n factory.setServiceClass(ReportIncidentEndpoint.class);\n factory.setAddress(ADDRESS);\n return (ReportIncidentEndpoint) factory.create();\n}\n\npublic void testRendportIncident() throws Exception {\n // start camel\n startCamel();\n\n // assert mailbox is empty before starting\n Mailbox inbox = Mailbox.get(\"incident@mycompany.com\");\n assertEquals(\"Should not have mails\", 0, inbox.size());\n\n // create input parameter\n InputReportIncident input = new InputReportIncident();\n input.setIncidentId(\"123\");\n input.setIncidentDate(\"2008-08-18\");\n input.setGivenName(\"Claus\");\n input.setFamilyName(\"Ibsen\");\n input.setSummary(\"Bla\");\n input.setDetails(\"Bla bla\");\n input.setEmail(\"davsclaus@apache.org\");\n input.setPhone(\"0045 2962 7576\");\n\n // create the webservice client and send the request\n ReportIncidentEndpoint client = createCXFClient();\n OutputReportIncident out = client.reportIncident(input);\n\n // assert we got a OK back\n assertEquals(\"0\", out.getCode());\n\n // let some time pass to allow Camel to pickup the file and send it as an email\n Thread.sleep(3000);\n // assert mail box\n assertEquals(\"Should have got 1 mail\", 1, inbox.size());\n\n // stop camel\n camel.stop();\n}\n</code></pre>\n\n<p>}</p>\n\n<p>I am attempting to use CFX endpoint along with my camel routing and when I am putting the endpoint address in the route and then unit testing it I am getting a \"No endpoint could be found for: //path/to/endpoint\".</p>\n\n<p>I am assuming that the fact that I am getting an error when I try to access the endpoint url is the issue but I do not even know where to begin on figuring out how to fix it.</p>\n\n<p>When I hit my webservice on SOAP UI it runs fine as well. Any help would be greatly appreciated, and I can provide any info that is needed.</p>\n", "Lable": "No"}
11
+ {"QuestionId": 14480173, "AnswerCount": 3, "Tags": "<xml><xslt><xml-namespaces>", "CreationDate": "2013-01-23T12:50:26.690", "AcceptedAnswerId": "14480656", "Title": "XSL output XML with no prefix without using the default namespace?", "Body": "<p>I have an XSL where I need to generate output along the lines of this:</p>\n\n<pre><code>&lt;moo xmlns=\"http://api.example.com\"&gt;\n &lt;foo&gt;1358944586848&lt;/foo&gt;\n &lt;bar&gt;\n &lt;a&gt;1&lt;/a&gt;\n &lt;b&gt;2&lt;/b&gt;\n &lt;c&gt;3&lt;/c&gt;\n &lt;/bar&gt;\n&lt;/moo&gt;\n</code></pre>\n\n<p>I could do it like this:</p>\n\n<pre><code>&lt;xsl:stylesheet version=\"2.0\"\n xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\n xmlns=\"http://api.example.com\"&gt;\n\n &lt;xsl:template match=\"/\"&gt;\n &lt;xsl:element name=\"moo\"&gt;\n &lt;!-- and so on --&gt;\n</code></pre>\n\n<p>However, I kind of hate using the xsl prefix in my xsl files cause I feel it clutters it up a lot. Selecting with XPath is easy anyways since you can set <code>xpath-default-namespace</code> to whatever you're transforming from if needed. But there is no <code>element-default-namespace</code> available as far as I can see, so how can I generate the wanted output in a good way?</p>\n\n<p>I know I can do this:</p>\n\n<pre><code>&lt;stylesheet version=\"2.0\"\n xmlns=\"http://www.w3.org/1999/XSL/Transform\"&gt;\n\n &lt;template match=\"/\"&gt;\n &lt;element name=\"moo\" namespace=\"http://api.example.com\"&gt;\n &lt;!-- and so on --&gt;\n</code></pre>\n\n<p>But then I have to set this namespace explicitly on every single element I create, or they will end up with the XSL namespace instead. So is there a clean way to create elements with a certain namespace (without a prefix) and not touching the default namespace of the xsl file?</p>\n\n<hr>\n\n<p><strong>Update:</strong></p>\n\n<p>Figured maybe <code>namespace-alias</code> could do something, but can't figure out how to use it. Tried this, but doesn't seem to make any difference in the output at all:</p>\n\n<pre><code>&lt;stylesheet version=\"2.0\"\n xmlns=\"http://www.w3.org/1999/XSL/Transform\"\nxmlns:out=\"http://api.example.com\"&gt;\n\n&lt;namespace-alias stylesheet-prefix=\"out\" result-prefix=\"\"/&gt;\n\n &lt;template match=\"/\"&gt;\n &lt;element name=\"out:moo\"&gt;\n &lt;!-- and so on --&gt;\n</code></pre>\n\n<p>The <code>namespace-alias</code> thing probably isn't doing what I think it is :p</p>\n\n<p><em><strong>The final solution I used, based on JLRishe's answer</strong></em></p>\n\n<p><em>remove-prefixes.xsl</em></p>\n\n<pre><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;stylesheet version=\"2.0\" xmlns=\"http://www.w3.org/1999/XSL/Transform\"&gt;\n &lt;template match=\"/\"&gt;\n &lt;variable name=\"result\"&gt;\n &lt;next-match /&gt;\n &lt;/variable&gt;\n &lt;apply-templates select=\"$result\" mode=\"remove-prefixes\" /&gt;\n &lt;/template&gt;\n\n &lt;template match=\"*\" priority=\"1\" mode=\"remove-prefixes\"&gt;\n &lt;element name=\"{local-name()}\" namespace=\"{namespace-uri()}\"&gt;\n &lt;apply-templates select=\"@* | node()\" mode=\"remove-prefixes\" /&gt;\n &lt;/element&gt;\n &lt;/template&gt;\n &lt;template match=\"@*|node()\" mode=\"remove-prefixes\"&gt;\n &lt;copy&gt;\n &lt;apply-templates select=\"@* | node()\" mode=\"remove-prefixes\" /&gt;\n &lt;/copy&gt;\n &lt;/template&gt;\n\n&lt;/stylesheet&gt;\n</code></pre>\n\n<p><em>subject.xsl</em></p>\n\n<pre><code>&lt;!-- snip --&gt;\n&lt;import href=\"remove-prefixes.xsl\" /&gt;\n&lt;!-- snip --&gt;\n</code></pre>\n", "Lable": "No"}