Invalid JSON:Unexpected non-whitespace character after JSONat line 2, column 1
| {"QuestionId": 28966162, "AnswerCount": 1, "Tags": "<javascript><css3><less>", "CreationDate": "2015-03-10T14:19:14.230", "AcceptedAnswerId": null, "Title": "Loading icon while less modifyVars is compiling", "Body": "<p>I am using <strong>window.less.modifyVars(modified_variables);</strong> on the front-end to reflect the changes. And i want to show <strong>loading icon</strong> while less is compiling. Is there any way to check that less has started compilation and completed.</p>\n", "Lable": "No"} | |
| {"QuestionId": 29080680, "AnswerCount": 1, "Tags": "<javascript>", "CreationDate": "2015-03-16T15:28:00.217", "AcceptedAnswerId": null, "Title": "how to detect if webpage has changed?", "Body": "<p>Assuming I have users on a page of my site.</p>\n\n<p>I update this page on my server but users will not notice the difference until reloading the page.</p>\n\n<p>How can a JavaScript function detect the difference and start reloading the page ?</p>\n\n<p>A solution could be using a timer which reloads the page every second but this causes a lot of traffic?</p>\n", "Lable": "No"} | |
| {"QuestionId": 29102165, "AnswerCount": 2, "Tags": "<neural-network><theano><deep-learning><lstm>", "CreationDate": "2015-03-17T14:45:29.613", "AcceptedAnswerId": null, "Title": "How to perform multi-label learning with LSTM using theano?", "Body": "<p>I have some text data with multiple labels for each document. I want to train a LSTM network using Theano for this dataset. I came across <a href=\"http://deeplearning.net/tutorial/lstm.html\" rel=\"noreferrer\">http://deeplearning.net/tutorial/lstm.html</a> but it only facilitates a binary classification task. If anyone has any suggestions on which method to proceed with, that will be great. I just need an initial feasible direction, I can work on.</p>\n\n<p>thanks,\nAmit</p>\n", "Lable": "D"} | |
| {"QuestionId": 29174518, "AnswerCount": 1, "Tags": "<html><css>", "CreationDate": "2015-03-20T19:35:09.677", "AcceptedAnswerId": "29175386", "Title": "CSS Clipping Text in Dynamic Header", "Body": "<p>I've been trying to get a dynamic header to clip text using the text-overflow:ellipsis, but I can't seem to get everything working that I need.</p>\n\n<p>Have a look at what we've originally implemented here <a href=\"https://dl.orangedox.com/selZdE\" rel=\"nofollow\">https://dl.orangedox.com/selZdE</a> Notice that the file name extends over the controls, this is what we're trying to fix by using something like the text-overflow css property.</p>\n\n<p>This is what I've tried</p>\n\n<p><div class=\"snippet\" data-lang=\"js\" data-hide=\"false\">\r\n<div class=\"snippet-code\">\r\n<pre class=\"snippet-code-css lang-css prettyprint-override\"><code>.toolbar {\r\n width: 100%;\r\n height: 45px;\r\n background-color: #fff;\r\n border-bottom: 1px solid #d5d5d5;\r\n }\r\n \r\n .middle {\r\n text-align: center;\r\n }\r\n \r\n .left {\r\n text-align:left;\r\n }\r\n \r\n .right {\r\n text-align:right;\r\n }\r\n \r\n .border {\r\n border:thin solid silver;\r\n }\r\n \r\n .clip {\r\n overflow: hidden;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n }\r\n \r\n #float > div {\r\n width:32%;\r\n height:100%;\r\n }\r\n \r\n #inline > div {\r\n\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 0;\r\n overflow: visible;\r\n margin-top: 3px;\r\n\r\n }\r\n \r\n .hide {\r\n display:none;\r\n }\r\n \r\n .float-right {\r\n float:right;\r\n }\r\n \r\n .float-left {\r\n float:left;\r\n }</code></pre>\r\n<pre class=\"snippet-code-html lang-html prettyprint-override\"><code> <div id='inline' class=\"toolbar\">\r\n <div class=\"inline left clip\">\r\n Some really really really really really really really really really really really really really long line of text.\r\n </div>\r\n <div class=\"inline middle\">Middle Stuff</div>\r\n <div class=\"inline right\">Right Stuff</div>\r\n </div>\r\n \r\n <br>\r\n <hr>\r\n <h3>Second Attempt</h3>\r\n <br>\r\n \r\n <div id='float' class=\"toolbar\">\r\n <div class=\"border left float-left clip\">\r\n Some really really really really really really really really really really really really really long line of text.\r\n </div>\r\n <div class=\"border middle float-left\">Middle Stuff</div>\r\n <div class=\"border right float-right\">Right Stuff</div>\r\n </div>\r\n\r\n <br>\r\n <hr>\r\n <strong>without the middle</strong>\r\n <br>\r\n \r\n <div id='float' class=\"toolbar\">\r\n <div class=\"border left float-left clip\">\r\n Some really really really really really really really really really really really really really long line of text.\r\n </div>\r\n <div class=\"border middle float-left hide\">Middle Stuff</div>\r\n <div class=\"border right float-right\">Right Stuff</div>\r\n </div></code></pre>\r\n</div>\r\n</div>\r\n</p>\n\n<p>Having a look at the attempts I've tried above</p>\n\n<ol>\n<li>Positioning is correct and removing the middle or the right section allows for the left section to \"grow\" HOWEVER the text overflows in the middle area\n(what we've already implemented</li>\n<li>Left box is now bounded to 33% of the screen allowing for the text overflow to be controlled BUT</li>\n<li>if the middle box isn't present then the left box doesn't automatically resize to over this available space (since it's explicitly set at 33%)</li>\n</ol>\n\n<p>Any ideas on how to better structure this header with overflowing text & controls like this?</p>\n", "Lable": "No"} | |
| {"QuestionId": 29225200, "AnswerCount": 1, "Tags": "<ocaml><opam>", "CreationDate": "2015-03-24T04:46:45.023", "AcceptedAnswerId": null, "Title": "OCaml: Unbound module Core with ~/.ocamlinit setup", "Body": "<p>I have installed a few packages using opam, such as Core and Batteries. The ocamlinit file is as follows:</p>\n\n<pre><code>(* Added by OPAM. *)\n\n#use \"topfind\"\n#thread\n#camlp4o\n#require \"core.top\"\n#require \"core.syntax\"\n#require \"batteries\"\n\nlet () =\n try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")\n with Not_found -> ()\n;;\n</code></pre>\n\n<p>When I run this with utop I can see the modules for Batteries but I cannot see any of the modules for Core. When I try to do <code>open Core</code> or <code>open Core.Std</code> I get an unbound module error. I also tried adding in <code>#require \"core\"</code> and the error persisted.</p>\n\n<p>I'm not sure what the error is since I followed the installation instructions from the book \"Real World OCaml\". </p>\n\n<p>I also see two messages when I start off utop:</p>\n\n<pre><code>No such package: oUnit\" - required by `pa_ounit'\"\nNo such package: pa_pipebang\" - required by `core.syntax'\"\n</code></pre>\n\n<p>I'm not sure if these are related to the problem but when I do <code>opam list ounit</code> and <code>opam list pipebang</code> it shows them as installed.</p>\n", "Lable": "No"} | |
| {"QuestionId": 29247810, "AnswerCount": 3, "Tags": "<c#><asp.net-mvc>", "CreationDate": "2015-03-25T05:01:08.610", "AcceptedAnswerId": "29247935", "Title": "How to display C# code as simple text in the MVC view?", "Body": "<p>I have MVC website, and I would like to show some code snippets as text on my website. Something like this:</p>\n\n<pre><code>List<ImageInfoModel> imgList = new List<ImageInfoModel>();\nstring imgPath = @\"~/Content/Images/ImageGallery/\";\nstring tmbPath = @\"~/Content/Images/ImageGallery/thumbnails/\";\n\nstring imgFullPath = Server.MapPath(imgPath);\nstring tmbFullPath = Server.MapPath(tmbPath);\n</code></pre>\n\n<p>If I simply copy and paste this into my view with <p> code text <p> it messes things up because of @ symbol.</p>\n\n<p>So my question is: How can I display C# code inside my view?</p>\n\n<p>Thanks in advance. </p>\n", "Lable": "No"} | |
| {"QuestionId": 29274208, "AnswerCount": 2, "Tags": "<oracle><replace><plsql><newline>", "CreationDate": "2015-03-26T08:47:24.037", "AcceptedAnswerId": "29274702", "Title": "Oracle Replace char with newline", "Body": "<p>I am trying to replace a char in my Select with an newline. But it doenst work.</p>\n\n<p>Here is the code:</p>\n\n<pre><code>vMsg := to_char(rec.CREATED,'HH24:MI') || ' - ' || replace(rec.FILELIST, '|', chr(13) || chr(10)) || chr(13) || chr(10) || chr(13) || chr(10) || 'Test'\n</code></pre>\n\n<p>But this does not work, it seems like Oracle replaces '|' with ' '</p>\n\n<p>Example input:</p>\n\n<blockquote>\n <p>Audio.hx|Camera.hx|Circle.hx|Color.hx|Component.hx|Core.hx|Debug.hx|Draw.hx|Emitter.hx|Entity.hx|Events.hx|Game.hx|Input.hx|IO.hx|Log.hx|</p>\n</blockquote>\n\n<p>Example output:</p>\n\n<blockquote>\n <p>Audio.hx Camera.hx Circle.hx Color.hx Component.hx Core.hx Debug.hx\n Draw.hx Emitter.hx Entity.hx Events.hx Game.hx Input.hx IO.hx Log.hx</p>\n</blockquote>\n\n<p>What i expected:</p>\n\n<blockquote>\n <p>Audio.hx</p>\n \n <p>Camera.hx</p>\n \n <p>Circle.hx</p>\n \n <p>Color.hx</p>\n \n <p>...</p>\n</blockquote>\n", "Lable": "No"} | |
| {"QuestionId": 29276295, "AnswerCount": 3, "Tags": "<conditional><pug><indentation>", "CreationDate": "2015-03-26T10:35:30.653", "AcceptedAnswerId": "29712619", "Title": "Conditional with parent and child div in JADE", "Body": "<p>Here my actual code :</p>\n\n<pre><code>each val, index in array\n if (index%3 == 0)\n .parent\n .child\n</code></pre>\n\n<p>or this one :</p>\n\n<pre><code>each val, index in array\n if (index%3 == 0)\n .parent\n .child\n else\n .child\n</code></pre>\n\n<p>What i want is, accpeting the condition is true, add the block parent .row, when the condition is not true add the child inside the parent. The final goal is to have this code :</p>\n\n<pre><code> <div class='row'>\n <div class='child'></div>\n <div class='child'></div>\n <div class='child'></div>\n </div>\n <div class='row'>\n <div class='child'></div>\n <div class='child'></div>\n <div class='child'></div>\n </div>\n</code></pre>\n\n<p>But the code i have for the moment with my actual code is :</p>\n\n<pre><code> <div class='row'></div>\n <div class='child'></div>\n <div class='child'></div>\n <div class='child'></div>\n <div class='row'></div>\n <div class='child'></div>\n <div class='child'></div>\n <div class='child'></div>\n</code></pre>\n\n<p>I tried many differents indentations but nothing works, everytime I write the parent in a conditon the block is automaticaly close, I don't know how to keep it open, or re-open it to put the content in it.</p>\n", "Lable": "No"} | |
| {"QuestionId": 29351820, "AnswerCount": 0, "Tags": "<eclipse-rcp>", "CreationDate": "2015-03-30T16:49:27.290", "AcceptedAnswerId": null, "Title": "add Command programmatically to toolbar menu", "Body": "<p>I am programmatically creating new commands via <a href=\"http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fui%2Fcommands%2FICommandService.html\" rel=\"nofollow\">ICommandService</a>#getCommand(String commandId) and am in need of adding these <code>Commands</code> to a <code>MenuManager</code>, but the <code>MenuManager</code> seems to accept only <code>IContributionItem</code> or <code>IAction</code> for its overloaded <code>add()</code> method</p>\n\n<p>Seemingly the <a href=\"http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fui%2Fmenus%2FCommandContributionItemParameter.html\" rel=\"nofollow\">CommandContributionItemParameter</a> can be constructed with the newly made <code>commandId</code>, and from it a <code>CommandContributionItem</code> can be made, and then added to the <code>MenuManager</code></p>\n\n<p>Is this the way to add programmatically created commands to a programmatically created <code>Toolbar</code>? </p>\n\n<p>Any experience with this would be golden, thanks.</p>\n", "Lable": "No"} | |
| {"QuestionId": 29426756, "AnswerCount": 2, "Tags": "<javascript><arrays>", "CreationDate": "2015-04-03T05:34:26.090", "AcceptedAnswerId": "29427108", "Title": "How to build 2 dimensional array from a string of options for a select tag in Javascript?", "Body": "<p>In Javascript, I have a string of options for a select tag. This is my string:</p>\n\n<pre><code>var myOptionsString = '<option id=\"\"></option><option id=\"1\">Self Service</option><option id=\"2\">Administrator</option>';\n</code></pre>\n\n<p>In Javascript, I want to convert it to a 2-dimensional Array where 1st dimension will store the id and 2nd dimension will store the text of an option.</p>\n\n<p>How can I do that? I am looking for Javascript solution; I am open to 3rd party solutions also like jQuery.</p>\n", "Lable": "No"} | |
| {"QuestionId": 29483297, "AnswerCount": 3, "Tags": "<javascript><function><call><apply><invocation>", "CreationDate": "2015-04-07T03:35:38.427", "AcceptedAnswerId": "29483373", "Title": "Apply/Call method in Javascript: What is the first arguments \"this\"?", "Body": "<p>I am confused about using apply or call method correctly.\nI know that apply is passing an array to the function and call is passing strings to a function.\nFor example the code below, what does \"this\"really have to do with the code? if it has nothing to do with this code, then can anyone give me an example when \"this\" is implementing appropriately?</p>\n\n<pre class=\"lang-js prettyprint-override\"><code>function myFunction(a, b) {\n return a * b;\n}\nmyArray = [10,2];\nmyFunction.apply(this, myArray);\n</code></pre>\n\n\n", "Lable": "No"} | |
| {"QuestionId": 29484147, "AnswerCount": 2, "Tags": "<ios><watchkit><apple-watch><xcode-6.2><wkinterfaceimage>", "CreationDate": "2015-04-07T05:06:03.257", "AcceptedAnswerId": "29485957", "Title": "How to run a animated Gif directly by assigning it to Wkinterfaceimage using watchkit in Xcode?", "Body": "<p><em>Here is my doubt !!!</em></p>\n\n<p><strong>How to run a animated gif image directly by getting dynamically from url / NSdata and assigning it to Wkinterfaceimage ???</strong></p>\n\n<p>i am working on the applewatch app development from past few days it's so great.Currently i'm working on the GIf Images assigning to the imageview. I successfuly done by adding the series of images statically in xcode and running it by assigning to Wkinterfaceimage.</p>\n", "Lable": "No"} | |
| {"QuestionId": 29509933, "AnswerCount": 1, "Tags": "<php><laravel>", "CreationDate": "2015-04-08T08:45:22.447", "AcceptedAnswerId": "29510541", "Title": "Larvel5 Global $config var - fetched form db?", "Body": "<p>I have a config table which holds lots of configuration values,\nHow can I create a static helper/class that will be available globally on laravel?</p>\n\n<p>for example, I have a view with the an input:</p>\n\n<p><code><input type=\"text\" value=\"<?= SettingsHelper::getValue('my-settings-key'); ?>\" /></code></p>\n\n<p>And off course i don't want to query each time for it, just one query that gets all the configuration values.</p>\n\n<p>Any ideas?</p>\n", "Lable": "No"} | |
| {"QuestionId": 29514460, "AnswerCount": 1, "Tags": "<python><subprocess><i2c>", "CreationDate": "2015-04-08T12:20:41.130", "AcceptedAnswerId": "29515689", "Title": "i2c address is out of range", "Body": "<p>I have been trying to use the MCP23017 along with my beaglebone.. I have however not received my devices yet, but I have started to get my program ready...\nI am programming the GPIO pins now.. Here I have tried to read and write the pins using i2c commands as follows:\nfor write-- </p>\n\n<pre><code>a=('i2cset', '-y', '0', '0x20', '0x14', '0x01')\nsubprocess.call(a, shell=True)\n</code></pre>\n\n<p>similarly using i2cget for reading.. However when I try to run it , it give me a notification on my screen saying </p>\n\n<pre><code>Usage: i2cset [-f] [-y I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]\nI2CBUS is an integer or an I2C bus name\nADDRESS is an integer (0x03- 0x77)\n</code></pre>\n\n<p>Do I get this notification only because I don't have my device connected yet? Or is it a problem because of using the subprocess module?</p>\n\n<p>Any help is appreciated,</p>\n\n<p>Namita.</p>\n", "Lable": "No"} | |
| {"QuestionId": 29526560, "AnswerCount": 1, "Tags": "<ruby-on-rails><amazon-ec2><cron><whenever>", "CreationDate": "2015-04-08T22:38:39.927", "AcceptedAnswerId": "29532803", "Title": "Executing Rails 'whenever' gem when EC2 Instance Moves", "Body": "<p>I use the 'whenever' gem for my rails cron file in EC2 and it works great. \"Whenever -w\" writes it and I never have to worry about it again. The problem is when my instance has a planned reboot. The rails app get passed to a new instance and the whole process is seamless with no downtime, but the new instance does not have my cron file.</p>\n\n<p>How can I make sure that the cron file gets written when I move to a new instance? Is there a way to run it on app start or something like that? Thanks.</p>\n", "Lable": "No"} | |
| {"QuestionId": 29618653, "AnswerCount": 2, "Tags": "<java><multithreading><performance><concurrency><parallel-processing>", "CreationDate": "2015-04-14T03:27:29.090", "AcceptedAnswerId": "29623035", "Title": "When does performing tasks in parallel is an overkill?", "Body": "<p>I've a piece of java code which constructs an object from xml and takes some nanoseconds to a millisecond depending on object size. Sometimes I've to call that method 1-2 times, sometimes 70-80 times in loop to construct a list of objects.</p>\n\n<p>I tried constructing the objects in parallel, but sometimes it's taking double time than sequential and half the other times. Now my question is are there any guidelines or performance comparison metrics to guide when should multitasking be used and when it's just an overkill?</p>\n\n<p>Sample code that I'm using is:</p>\n\n<pre><code> List<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();\n for (final Integer object : list) {\n Callable<Integer> c = new Callable<Integer>() {\n @Override\n public Integer call() throws Exception {\n return test.m1(object);\n }\n };\n tasks.add(c);\n }\n List<Future<Integer>> results = EXEC.invokeAll(tasks);\n\n for (Future<Integer> fr : results) {\n fr.get();\n }\n</code></pre>\n", "Lable": "No"} | |
| {"QuestionId": 29627660, "AnswerCount": 8, "Tags": "<javascript><jquery><html>", "CreationDate": "2015-04-14T12:43:59.680", "AcceptedAnswerId": "29648522", "Title": "How to get which element was clicked?", "Body": "<p>I have a simple <strong>div</strong> in my <strong>html</strong> as follows:</p>\n\n<pre><code><div id=\"myDiv\">\n....\n\n</div>\n</code></pre>\n\n<p>Also I have set the <strong>onlick</strong> event on the <code>window.click</code> as follows:</p>\n\n<pre><code>window.onclick = function()\n{\n // do something\n } \n</code></pre>\n\n<p>So if I click, anywhere in the <strong>div</strong>, how can I find that this click was made inside <strong>\"myDiv\"</strong></p>\n\n<p><strong>Note : I cannot add the click event on my div, it is generated randomly from jqgrid</strong></p>\n", "Lable": "No"} | |
| {"QuestionId": 29642020, "AnswerCount": 1, "Tags": "<codeigniter>", "CreationDate": "2015-04-15T05:10:27.763", "AcceptedAnswerId": null, "Title": "Connect one controller and one model with other database using codeigneiter", "Body": "<p>By using codeigneiter, I want to connect one controller and one model with another database.</p>\n\n<p>Is it possible?</p>\n\n<p>I am following this post <a href=\"https://stackoverflow.com/questions/312511/codeigniter-i-am-looking-to-use-connect-to-a-different-database-for-one-of-my\">Codeigniter - I am looking to use/connect to a different database for one of my controllers and one model</a>, but I'm not getting any result.</p>\n", "Lable": "No"} | |
| {"QuestionId": 29660988, "AnswerCount": 0, "Tags": "<algorithm><cpu><alu>", "CreationDate": "2015-04-15T21:11:09.807", "AcceptedAnswerId": null, "Title": "What is the appropriate name for this hardware multiplier? Also, where can I find documentation on it to understand what is going on?", "Body": "<p>We're doing some work on a CPU in logism in class. We're going over the ALU, and need now need to know different ways multiplication can take place. Our professor gave us two examples, one called the \"Five Add Time\" and the \"31 Add Time\" (although I do not believe these are the official names of the algorithm), shown here:</p>\n\n<p><img src=\"https://i.stack.imgur.com/W3zjd.png\" alt=\"enter image description here\"></p>\n\n<p>And Here</p>\n\n<p><img src=\"https://i.stack.imgur.com/uC8mn.png\" alt=\"enter image description here\"></p>\n\n<p>What are the proper names for both these algorithms, and is there any documentation that would allow me to better understand what's going on here? I'd google it, but I am really not sure on the specific term I should look up.</p>\n\n<p>Thanks</p>\n", "Lable": "No"} | |