compare_oracle / oraclechunk22.json
xPXXX's picture
Upload 10 files
b34f274
Raw
History Blame Contribute Delete
16.1 kB
Invalid JSON:Unexpected non-whitespace character after JSONat line 2, column 1
{"QuestionId": 15268604, "AnswerCount": 8, "Tags": "<html5><html5-video><closed-captions>", "CreationDate": "2013-03-07T10:23:19.527", "AcceptedAnswerId": null, "Title": "HTML5 track captions not showing", "Body": "<p>I am trying to make the simplest html5 video player in the world:</p>\n\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n &lt;head&gt;\n &lt;meta charset=\"utf-8\"&gt;\n &lt;title&gt;ST Media Player&lt;/title&gt;\n &lt;/head&gt;\n &lt;body&gt;\n &lt;video id=\"player\" src=\"http://video-js.zencoder.com/oceans-clip.mp4\" controls&gt;\n &lt;track kind=\"captions\" src=\"_tracks/test.vtt\" default&gt;\n &lt;/video&gt;\n &lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n\n<p>Done!</p>\n\n<p>Now why does the player recognize that there is captions, but doesnt show them? I have tried different video's and subtitle files now. </p>\n", "Lable": "No"}
{"QuestionId": 15355373, "AnswerCount": 1, "Tags": "<ajax><jsf-2><richfaces>", "CreationDate": "2013-03-12T07:15:59.227", "AcceptedAnswerId": null, "Title": "f:ajax parameter passing doesnt work,action is called but value is always NULL", "Body": "<p>I have two bean classes vehicletypes and cars from vehicletypes is a list of vehicles from which one typename is to be selected for cars class.So i am populating the list in car.xhtml by v.name its working fine using combo box.For assigning this typename to cars.name i am using listerner action as shown:</p>\n\n<p>.XHTML Code</p>\n\n<pre><code> &lt;h:selectOneMenu&gt;\n &lt;f:selectItems value=\"#{vehicletypes.veh}\" var=\"v\" itemLabel=\"#{v.name}\" /&gt;\n &lt;f:ajax event=\"change\" listener=\"#{cars.combochange}\" /&gt;\n &lt;f:param name=\"idx\" value=\"#{v.name}\" /&gt;\n &lt;/h:selectOneMenu&gt;\n</code></pre>\n\n<p>Managed bean:</p>\n\n<pre><code>public String getcombochange(FacesContext fc)\n {\n\n Map&lt;String,String&gt; params =fc.getExternalContext().getRequestParameterMap();\n return params.get(\"idx\");\n\n\n }\n public String combochange(){\n\n String type;\n FacesContext fc = FacesContext.getCurrentInstance();\n type= getcombochange(fc);\n System.out.println(\"\\nChange occured Car type assigned\"+type); \n return \"result\";\n }\n</code></pre>\n\n<p>While printing the value of cartype on console using println it always null,Whats wrong in the code i tried to pass a defualt string as param but its also not working.</p>\n\n<hr>\n\n<p>Have tried this way as well but this doesn't call the action itself;</p>\n\n<p><strong>.xhtml</strong></p>\n\n<pre><code>&lt;h:selectOneMenu&gt;\n&lt;f:selectItems value=\"#{vehicletypes.veh}\" var=\"v\" itemLabel=\"#{v.name}\" /&gt;\n&lt;f:ajax event=\"change\" listener=\"#{cars.combochange}\" /&gt;\n&lt;f:attribute name=\"add\" value=\"default\" /&gt;\n&lt;/h:selectOneMenu&gt;\n</code></pre>\n\n<p><strong>Bean Class</strong></p>\n\n<pre><code> public String combochange(ActionEvent event){\n String type = (String)event.getComponent().getAttributes().get(\"add\");\n System.out.println(\"Add pool:\"+type);\n return null;\n }\n</code></pre>\n\n<p>Dont understand why the action is not called.</p>\n", "Lable": "No"}
{"QuestionId": 15469098, "AnswerCount": 2, "Tags": "<unix><vim>", "CreationDate": "2013-03-18T02:58:38.853", "AcceptedAnswerId": null, "Title": "Update current working directory after vim netrw exit", "Body": "<p>Here's the scenario.<br>\nI am on the unix command line (in home directory). I want to browse the directory through </p>\n\n<pre><code>$ vim . \n</code></pre>\n\n<p>thus opening the vim netrw.<br>\nNow I am browsing the directory using the netrw.<br>\nWhat I want here is that when I exit vim netwr, I want my previous current working directory (in this example the home directory) to now become the directory I was previously in vim netrw.<br>\nExample:<br>\nstep 1. now in home directory<br>\nstep 2. vim . (thus opening vim netrw)<br>\nstep 3. go to any directory (~/my/other/folders)<br>\nstep 4. :q (to exit vim)<br>\nstep 5. (here, I want my previous directory to now become ~/my/other/folders </p>\n\n<p>any ideas on how to do it? I was thinking of doing something in .vimrc but I dunno how. Been into google search, but found nothing valuable.</p>\n", "Lable": "No"}
{"QuestionId": 15551478, "AnswerCount": 1, "Tags": "<ruby-on-rails><security><text-parsing>", "CreationDate": "2013-03-21T15:19:53.437", "AcceptedAnswerId": "15552499", "Title": "Rails: what security issues come with extracting text from user-submitted files?", "Body": "<p>If users of an app are able to submit flat text files, and these files have data pulled from them by a program using a regex (which is then returned to the user), how can this be abused?</p>\n\n<p>I know there are concerns with executable files or unsanitized filenames when they're being <em>saved</em>, but I don't know what the risks are with just opening and parsing a file that lasts temporarily in memory.</p>\n\n<p>Thanks.</p>\n", "Lable": "No"}
{"QuestionId": 15798500, "AnswerCount": 0, "Tags": "<c#><winforms><custom-controls>", "CreationDate": "2013-04-03T21:29:57.810", "AcceptedAnswerId": null, "Title": "Dynamically add and remove button c#", "Body": "<p>The essence of my program is the user can click for an amount of textboxes and radiobuttons they want to add by clicking on a button and using a numericUpDown. After clicking the button the program adds a button under the text boxes, but if I change the number of rows the first button stays and a new one gets created. So I would like to know how can I only have the one button? Would it also be possible for me to apply this with removing the textboxes and radiobuttons.</p>\n\n<p>This is my code for the button handler</p>\n\n<pre><code> int length = (int)this.numericUpDownNumComp.Value;\n bool created = false;\n CustomButton c = new CustomButton();\n for(int i = 0; i &lt; length; i++)\n {\n //instantiate and configure the text boxes\n textboxComputer.Add(new TextBox());\n System.Drawing.Point p = new System.Drawing.Point(176, 114 + i * 25);\n //to evoke an object in an ArrayList we use the 'as' keyword\n (textboxComputer[i] as TextBox).Location = p;\n (textboxComputer[i] as TextBox).Size = new System.Drawing.Size(183, 20);\n //use 'as' again here to add the control to the controls Collection\n this.Controls.Add(textboxComputer[i] as TextBox);\n //instantiate and configure the labels\n this.labels.Add(new Label());\n System.Drawing.Point pLabel = new System.Drawing.Point(100, 114 + i * 25);\n (labels[i] as Label).Location = pLabel;\n (labels[i] as Label).Size = new System.Drawing.Size(80, 13);\n\n (labels[i] as Label).Text = @\"Computer \" + (i + 1).ToString() + \":\";\n this.Controls.Add((labels[i] as Label));\n //add some mouse events\n (textboxComputer[i] as TextBox).MouseEnter += new System.EventHandler(this.textBox_mouseEnter);\n (textboxComputer[i] as TextBox).MouseLeave += new System.EventHandler(this.textBox_mouseLeave);\n //add the radio buttons - these are already sized (See RadioButtons.cs) so just need to place at a point\n radioButtons.Add(new RadioButtons());\n (radioButtons[i] as RadioButtons).Location = new System.Drawing.Point(370, 110 + i * 25);\n this.Controls.Add(radioButtons[i] as RadioButtons);\n int last = length - 1;\n\n\n }\n if (created == true)\n {\n this.Controls.Remove(c as Button);\n //(c as Button).Location = new System.Drawing.Point(370, 110 + i * 25 + 25);\n created = false;\n }\n\n created = true;\n this.Controls.Add(c as Button);\n (c as Button).Location = new System.Drawing.Point(370, 110 + length * 25 + 25);\n</code></pre>\n", "Lable": "No"}
{"QuestionId": 15871979, "AnswerCount": 1, "Tags": "<jquery><kendo-ui><html-table><kendo-treeview>", "CreationDate": "2013-04-08T05:39:23.333", "AcceptedAnswerId": null, "Title": "How to align all td in the table in the same row", "Body": "<p>I am using kendo ui treeview. In that I am adding the treeview nodes dynamically, and I am using kendo ui template. I have defined the template like this:</p>\n\n<pre><code> &lt;script id=\"treetemplate\" type=\"text/kendo-ui-template\"&gt;\n\n\n &lt;table id='treeviewtable'&gt;\n\n # if (item.categoryName == \"Textbox\") { # \n &lt;tr&gt;\n &lt;td&gt;\n &lt;label style=\"color:red\"&gt;#=item.label#&lt;/label&gt;\n &lt;/td&gt;\n &lt;td&gt;\n &lt;label&gt;#=item.val#&lt;/label&gt;\n &lt;/td&gt;\n # } #\n\n # if (item.categoryName == \"Dropdown\") { # \n\n &lt;td&gt;\n &lt;label style=\"color:red\"&gt;#=item.label#&lt;/label&gt;\n &lt;/td&gt;\n &lt;td&gt;\n &lt;label&gt;#=item.val#&lt;/label&gt; \n &lt;/td&gt;\n # } #\n\n &lt;/table&gt;\n &lt;/script&gt;\n</code></pre>\n\n<p>I have defined the treeview like this:</p>\n\n<pre><code> var treeview = $(\"#treeview\").kendoTreeView({\n template: kendo.template($(\"#treetemplate\").html()),\n dataSource: homogeneous,\n dataTextField: [\"categoryName\"],\n\n }).data(\"kendoTreeView\");\n\n kendo.init($(\"#treeview-left\"));\n</code></pre>\n\n<p>I have written a ajax and dynamically appending treeview child like this:</p>\n\n<pre><code> var selectedNode = treeview.select();\n\n if (selectedNode.length == 0) {\n selectedNode = null;\n }\n\n treeview.append({\n categoryName: json[i].categoryName, label: json[i].label, val: json[i].val\n }, selectedNode);\n</code></pre>\n\n<p>It is working fine. My question is I want to add the controls in a table format with each tr contains two controls. Like I want to display the textbox and dropdown side by side. \nHow can I do this?</p>\n", "Lable": "No"}
{"QuestionId": 15874072, "AnswerCount": 1, "Tags": "<android><android-camera>", "CreationDate": "2013-04-08T07:59:39.197", "AcceptedAnswerId": "15874729", "Title": "camera intent onActivityResult causes application object and activity to re create", "Body": "<p>The below code is working fine in some devices. but in samsung galaxy y duos and some other devices ,on taking picture and click on save, application object oncreate and activity onCreate are called again.this causes lose of data stored in application object.how to avoid it</p>\n\n<p>Application code as below :</p>\n\n<pre><code>public class MyApplication extends Application {\n\n int a = 0;\n int b = 0;\n int c = 0;\n\n private static final String TAG = \"MyApplication\";\n\n @Override\n public void onCreate() {\n\n super.onCreate();\n\n Log.i(TAG, \"####MyApplication on Craetet called\");\n }\n\n\n}\n</code></pre>\n\n<p>My Activity code as Below</p>\n\n<pre><code>public class MainActivity extends Activity {\n\n private static final int SELECT_CAMERA = 1;\n private static final String TAG = \"MainActivity\";\n MyApplication app;\n TextView tv1, tv2, tv3;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n\n setContentView(R.layout.activity_main);\n super.onCreate(savedInstanceState);\n app = (MyApplication) getApplicationContext();\n Log.i(TAG, \"#### MainActivity onCreate called with values \" + app.a + \" \" + app.b + \" \" + app.c);\n\n Button b = (Button) findViewById(R.id.button1);\n tv1 = (TextView) findViewById(R.id.textView1);\n tv2 = (TextView) findViewById(R.id.textView2);\n tv3 = (TextView) findViewById(R.id.textView3);\n\n tv1.setText(\"\" + app.a);\n tv2.setText(\"\" + app.b);\n tv3.setText(\"\" + app.c);\n\n b.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n app.a = 5;\n app.b = 6;\n app.c = 8;\n\n Log.i(TAG, \"after onclick values \" + app.a + \" \" + app.b + \" \"+ app.c);\n\n Intent intentPicture = new Intent(\n MediaStore.ACTION_IMAGE_CAPTURE);\n\n startActivityForResult(intentPicture, SELECT_CAMERA);\n\n }\n });\n\n }\n\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n if (resultCode == RESULT_OK) {\n if (requestCode == SELECT_CAMERA) {\n\n Log.i(TAG, \"after image selected values \" + app.a + \" \" + app.b\n + \" \" + app.c);\n\n tv1.setText(\"\" + app.a);\n tv2.setText(\"\" + app.b);\n tv3.setText(\"\" + app.c);\n\n }\n }\n }\n\n}\n</code></pre>\n\n<p>my logs are</p>\n\n<pre><code>04-09 23:58:44.888: I/MyApplication(15189): ####MyApplication on Craetet called\n04-09 23:58:45.160: I/MainActivity(15189): #### MainActivity onCreate called with values 0 0 0\n04-10 00:02:30.115: I/MainActivity(15795): after onclick values 5 6 8\n\n\n04-10 00:02:37.550: I/MyApplication(16016): ####MyApplication on Craetet called\n04-10 00:02:37.587: I/MainActivity(16016):#### MainActivity onCreate called with values 0 0 0\n04-10 00:02:37.592: I/MainActivity(16016): after image selected values 0 0 0\n</code></pre>\n", "Lable": "No"}
{"QuestionId": 15913458, "AnswerCount": 1, "Tags": "<python><encoding><base64><decoding>", "CreationDate": "2013-04-09T22:07:21.573", "AcceptedAnswerId": "15913523", "Title": "issues with base64 decoding in Python", "Body": "<p>Hello and thanks for reading. \nI am running into some issues decoding previously encoded files using base64. \nFor example, suppose I want to encode a pdf file using base64. The result is a nice 80 char delimited series of strings. \nThe code that does the encoding (cribbed from this board) is nice and easy:</p>\n\n<pre><code> def encode_file_base64(bin_input):\n flag = 0\n try:\n with open(bin_input, 'rb') as fin, open('tmp.bin_hex', 'w') as fout:\n base64.encode(fin, fout)\n except:\n traceback.print_exc()\n flag = -1\n return flag \n</code></pre>\n\n<p>Now the decoding function:</p>\n\n<pre><code> def decode_file_base64(bin_output):\n flag = 0\n try:\n with open('tmp.bin_hex', 'rb') as fin, open(bin_output, 'w') as fout:\n base64.decode(fin, fout)\n except:\n traceback.print_exc()\n flag = -1\n return flag\n</code></pre>\n\n<p>It does the job, but when I try to open the output file, I am not able to and the file appears to be 'corrupt'. \nI have been struggling with this more than a fair amount and I'm about to give up. I suppose I could use other types of encodings but the BOSS insists on base64 (he must have heard that it's the best...).</p>\n", "Lable": "No"}
{"QuestionId": 15954367, "AnswerCount": 5, "Tags": "<php><mysql><sql><sql-like>", "CreationDate": "2013-04-11T16:44:46.977", "AcceptedAnswerId": "15954499", "Title": "Get exact match with LIKE - SQL/PHP", "Body": "<p>Given the text:</p>\n\n<pre><code>\"Hello, I'm from Hell\",\n\"Hello, I'm from Ell\"\n</code></pre>\n\n<p>and the following SQL clause:</p>\n\n<pre><code>SELECT * FROM table WHERE text LIKE '%ell%'\n</code></pre>\n\n<p>I get both the texts above, but I don't want to get both texts, because I was looking for the text\n\"Ell\" and not \"Hell\"</p>\n\n<p>If anyone knows what I mean, can you help me out?</p>\n\n<p>Thanks in advance!</p>\n\n<p><strong>EDIT:</strong></p>\n\n<p>BETTER EXAMPLE</p>\n\n<p>Like when you want to look for the word 'big' but it can't be part of any other word like 'bigger' or 'biggest'</p>\n", "Lable": "No"}