Invalid JSON:Unexpected non-whitespace character after JSONat line 2, column 1
| {"QuestionId": 31208151, "AnswerCount": 1, "Tags": "<highcharts><padding><boxplot>", "CreationDate": "2015-07-03T13:34:54.387", "AcceptedAnswerId": "31240246", "Title": "highcharts: margin between two boxplot series", "Body": "<p>I have a Highcharts chart containing boxplots. The chart has 1 yaxis and 1 series containing 4 data-arrays which all are on the same yaxis, obviously.</p>\n\n<p>how can i increase the padding between Series<a href=\"https://i.stack.imgur.com/7WAK1.png\" rel=\"nofollow noreferrer\">1</a> and Series[2]? the x-axis is based on categories.</p>\n\n<p><img src=\"https://i.stack.imgur.com/7WAK1.png\" alt=\"enter image description here\"></p>\n\n<p><strong>EDIT:</strong>\nof course, i tried already with groupPadding/pointpadding, but couldn't get it to work. if i apply point/groupPadding to one specific array in series then its width gets smaller. if apply it to the whole series, then the padding is between each of the boxplots. however, i only need the padding between Series<a href=\"https://i.stack.imgur.com/7WAK1.png\" rel=\"nofollow noreferrer\">1</a> and Series[2]. are there any other ways to try?</p>\n\n<p><strong>EDIT2:</strong>\nupdated/changed picture.</p>\n", "Lable": "No"} | |
| {"QuestionId": 31231318, "AnswerCount": 2, "Tags": "<windows><batch-file><cmd>", "CreationDate": "2015-07-05T14:21:33.743", "AcceptedAnswerId": null, "Title": "Why is command start with parameter /wait not working properly?", "Body": "<p>OK this is racking my brain!!! I have one batch file that will start another batch file but every time I run say batch file all it does is open a command window with the title being where the batch file is located. Here is the batch file that's preforming the start /wait command:</p>\n\n<pre><code>::------------------------------ configure power settings ---------------------------\n\n@echo off\n\nstart /wait \"%~d0\\SETUP_POSTOP\\01 Configure Power Settings\\always on.bat\"\n\n::------------------------------ programs and features ------------------------------\n\nstart /wait \"%~d0\\SETUP_POSTOP\\02 Uninstall Unwanted Software\\Programs and Features.bat\"\n</code></pre>\n\n<p>The above batch file is supposed to run \"always on\" batch file but all it does is open another command window. Here is the \"always on\" batch file its trying to start:</p>\n\n<pre><code>@echo off\n\necho DO NOT CLOSE!!!\n\n%windir%\\system32\\powercfg.exe /import \"%~d0\\SETUP_POSTOP\\01 Configure Power Settings\\alwayson.pow\" 2f5ac084-2edf-444a-b1b9-8de872cf798e\n\n%windir%\\system32\\powercfg.exe /setactive 2f5ac084-2edf-444a-b1b9-8de872cf798e\n\nstart /wait %windir%\\System32\\powercfg.cpl\n\nexit\n</code></pre>\n\n<p>I've tried everything and all my research is pointing to a bug in the start command? I'm just up in arms with this one!</p>\n", "Lable": "No"} | |
| {"QuestionId": 31259048, "AnswerCount": 3, "Tags": "<asp.net-mvc><asp.net-mvc-5>", "CreationDate": "2015-07-07T03:03:09.030", "AcceptedAnswerId": null, "Title": "Send data between 2 controllers MVC5", "Body": "<p>My problem: I have a list A selected from database of a controller A, controller A will display list A. In view, each record of list A has a link call controller B (<code>@html.ActionLink(\"text\",\"actionB\",\"controllerB\", new {id=listA.ID})</code>) and i want to send list A to controller B as well. I've searched about how can send data between 2 controller, there are 2 ways are:</p>\n\n<ol>\n<li>Using tempdata</li>\n<li>Using session</li>\n</ol>\n\n<p>But all of those above is not really suitable on this case, can anyone tell me other ways to solve my problems. Thanks </p>\n", "Lable": "No"} | |
| {"QuestionId": 31265392, "AnswerCount": 1, "Tags": "<maven><eclipse-wtp><google-plugin-eclipse><google-eclipse-plugin>", "CreationDate": "2015-07-07T09:56:35.390", "AcceptedAnswerId": null, "Title": "Eclipse Google Plugin - WTP Server - Not creating lib folder", "Body": "<p>since a few days the Eclipse plugins started to show this error.</p>\n\n<p>The project is an App Engine project based on Maven, and the dev-server is launched using the WTP integration provided by the Google Eclipse Plugin.</p>\n\n<blockquote>\n <p>AVVERTENZA: failed\n com.google.appengine.tools.development.DevAppEngineWebAppContext@345541bd{/,C:\\Noovle\\workspace.metadata.plugins\\org.eclipse.wst.server.core\\tmp0\\Ape_Core}:\n <strong>java.lang.NoClassDefFoundError: com/google/appengine/api/utils/SystemProperty</strong></p>\n</blockquote>\n\n<p>Here is the full stack trace when the server is loaded</p>\n\n<pre><code>lug 07, 2015 11:43:12 AM java.util.prefs.WindowsPreferences <init>\nAVVERTENZA: Could not open/create prefs root node Software\\JavaSoft\\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.\nlug 07, 2015 11:43:12 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml\nINFORMAZIONI: Successfully processed C:\\Noovle\\workspace\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\Ape_Core\\WEB-INF/appengine-web.xml\nlug 07, 2015 11:43:12 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml\nINFORMAZIONI: Successfully processed C:\\Noovle\\workspace\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\Ape_Core\\WEB-INF/web.xml\nlug 07, 2015 11:43:13 AM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties\nINFORMAZIONI: Overwriting system property key 'java.util.logging.config.file', value 'C:\\Users\\Nicola\\.m2\\repository\\com\\google\\appengine\\appengine-java-sdk\\1.9.22\\appengine-java-sdk\\appengine-java-sdk-1.9.22\\config\\sdk\\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\\Noovle\\workspace\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\Ape_Core\\WEB-INF\\appengine-web.xml'\nlug 07, 2015 11:43:13 AM com.google.apphosting.utils.jetty.JettyLogger info\nINFORMAZIONI: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger\nlug 07, 2015 11:43:14 AM com.google.apphosting.utils.jetty.JettyLogger info\nINFORMAZIONI: jetty-6.1.x\nlug 07, 2015 11:43:18 AM com.google.apphosting.utils.jetty.JettyLogger warn\nAVVERTENZA: failed com.google.appengine.tools.development.DevAppEngineWebAppContext@345541bd{/,C:\\Noovle\\workspace\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\Ape_Core}: java.lang.NoClassDefFoundError: com/google/appengine/api/utils/SystemProperty\nlug 07, 2015 11:43:18 AM com.google.apphosting.utils.jetty.JettyLogger warn\nAVVERTENZA: failed JettyContainerService$ApiProxyHandler@2b8d9248: java.lang.NoClassDefFoundError: com/google/appengine/api/utils/SystemProperty\nlug 07, 2015 11:43:18 AM com.google.apphosting.utils.jetty.JettyLogger warn\nAVVERTENZA: Error starting handlers\njava.lang.NoClassDefFoundError: com/google/appengine/api/utils/SystemProperty\n at it.noovle.ape.tools.ToolsEnvironment.getApplicationVersion(ToolsEnvironment.java:26)\n</code></pre>\n\n<p>After some analysis I found the problem: when the server is published (or even a new one is created) the <code>lib</code> folder in <code>WEB-INF</code> is not created.</p>\n\n<p>I'm sure about that because if I copy the <code>lib</code> folder from another project (they share the same libraries) the server starts without problems.</p>\n\n<p>I tried a clean start creating a new server, and as expected the <code>lib</code> folder is missing.</p>\n\n<p>In the <code>Error Log</code> tab of Eclipse no problems are shown during the creation and publication of the server</p>\n\n<p>I also need to clarify that if I launch the project with the <code>devserver</code> maven goal, there are no problems at all.</p>\n\n<p>I'm running on Windows 8 with Eclipse Mars (my coworker has Luna instead but same problem is shown).\nThe version of Google Plugin is <code>Google Plugin for Eclipse 4.4 3.8.0.v201410302155-rel-r44</code>. Another coworker of mine has the same version of the plugin with Eclipse Luna and does not show this problem</p>\n\n<p>Is there a way to debug the steps of the WTP plugin to understand why the <code>lib</code> folder is not created?\nWhich is the possible explanation of this behaviour?</p>\n", "Lable": "No"} | |
| {"QuestionId": 31282679, "AnswerCount": 0, "Tags": "<javascript><jquery>", "CreationDate": "2015-07-08T02:47:20.130", "AcceptedAnswerId": null, "Title": ".click(function(e)) - why do I have to click twice for function to work?", "Body": "<p>I have scoured these boards and have seen similar issues yet I still cannot for the life of me figure out why I have to click my dropdown menu twice for the function to fire. After the second click the menu toggles between visible and hidden with a single click as it should.</p>\n\n<p>Here is my script:</p>\n\n<pre><code>$(document).ready(function() {\n\n $('#click-nav .nav-item.has-dropdown').click(function(e) {\n e.preventDefault();\n\n var subNav = $(this).attr('data-sub-nav');\n\n $('#click-nav .has-dropdown-icon').html('+');\n\n if ($(this).hasClass('active')) {\n $(this).removeClass('active');\n $('#secondary-navigation').slideUp(500, 'easeInQuint', function() {\n $('#secondary-navigation .sub-nav').hide();\n });\n } else {\n $('.has-dropdown-icon', this).html('-');\n $('#click-nav .nav-item.has-dropdown.active').removeClass('active');\n $(this).addClass('active');\n $('#secondary-navigation .sub-nav').hide();\n $('#secondary-navigation .sub-nav#' + subNav).show();\n $('#secondary-navigation').slideDown(500, 'easeOutQuint');\n }\n });\n</code></pre>\n\n<p>Here is our website: <a href=\"http://joriebreonn.com/\" rel=\"nofollow\">http://joriebreonn.com/</a> - You can see that upon initial page load you need to click on a menu item with the + twice for the dropdown menu to appear. Yet after you only need to click on menu items once for the function to work.</p>\n\n<p>Obviously I am a novice and appreciate any insight. Thank you so much in advance for your help!</p>\n", "Lable": "No"} | |
| {"QuestionId": 31304452, "AnswerCount": 0, "Tags": "<python-2.7><numpy><bayesian><theano><pymc3>", "CreationDate": "2015-07-08T21:49:51.363", "AcceptedAnswerId": null, "Title": "Using the pymc3 likelihood/posterior outside of pymc3: how?", "Body": "<p>For comparison purposes, I want to utilize the posterior density function outside of PyMC3.</p>\n\n<p>For my research project, I want to find out how well PyMC3 is performing compared to my own custom made code. As such, I need to compare it to our own in-house samplers and likelihood functions.</p>\n\n<p>I think I figured out how to call the internal PyMC3 posterior, but it feels very awkward, and I want to know if there is a better way. Right now I am hand-transforming variables, whereas I should just be able to pass pymc a parameter dictionary and get the posterior density. Is this possible in a straightforward manner?</p>\n\n<p>Thanks a lot!</p>\n\n<p>Demo code:</p>\n\n<pre><code>import numpy as np\nimport pymc3 as pm\nimport scipy.stats as st\n\n# Simple data, with sigma = 4. We want to estimate sigma\nsigma_inject = 4.0\ndata = np.random.randn(10) * sigma_inject\n\n# Prior interval for sigma\na, b = 0.0, 20.0\n\n# Build PyMC model\nwith pm.Model() as model:\n sigma = pm.Uniform('sigma', a, b) # Prior uniform between 0.0 and 20.0\n likelihood = pm.Normal('data', 0.0, sd=sigma, observed=data)\n\n# Write my own likelihood\ndef logpost_self(sig, data):\n loglik = np.sum(st.norm(loc=0.0, scale=sig).logpdf(data)) # Gaussian\n logpr = np.log(1.0 / (b-a)) # Uniform prior\n return loglik + logpr\n\n# Utilize PyMC likelihood (Have to hand-transform parameters)\ndef logpost_pymc(sig, model):\n sigma_interval = np.log((sig - a) / (b - sig)) # Parameter transformation\n ldrdx = np.log(1.0/(sig-a) + 1.0/(b-sig)) # Jacobian\n return model.logp({'sigma_interval':sigma_interval}) + ldrdx\n\nprint(\"Own posterior: {0}\".format(logpost_self(1.0, data)))\nprint(\"PyMC3 posterior: {0}\".format(logpost_pymc(1.0, model)))\n</code></pre>\n", "Lable": "D"} | |
| {"QuestionId": 31329834, "AnswerCount": 1, "Tags": "<python><django><email-integration><mandrill>", "CreationDate": "2015-07-09T23:09:08.387", "AcceptedAnswerId": null, "Title": "Append multiple recipient email and name into EmailMultiAlternatives", "Body": "<p>Hi I have a form mixin which the user inputs a message and sends it to multiple recipients. I am using Mandrill as my email client. I am currently able to send the email to a single recipient, but it fails when inputting more then one user. </p>\n\n<h2>This is the form mixin</h2>\n\n<pre><code>class FormListView(FormMixin, ListView):\n def get(self, request, *args, **kwargs):\n form_class = self.get_form_class()\n self.form = self.get_form(form_class)\n self.object_list = self.get_queryset()\n context = self.get_context_data(object_list=self.object_list, form=self.form)\n return self.render_to_response(context)\n\nclass CardListNew(FormListView):\n form_class = EmailForm\n model = card\n\n def get_queryset(self):\n\n return card.objects.filter(pk__in=[1]).filter(is_published='true')\n\ndef sendmail(request):\n if request.method == 'POST':\n form = EmailForm(request.POST)\n if form.is_valid():\n fullname = form.cleaned_data['name']\n email = form.cleaned_data['email']\n rname = form.cleaned_data['rname']\n remail = form.cleaned_data['remail']\n subject = \"You received an email from \" + fullname\n message = form.cleaned_data['message']\n connection = get_connection()\n connection.open()\n text_content = message\n\n msg = EmailMultiAlternatives(subject, message, email, [remail])\n template_data = {\n 'sender_name': fullname, 'sender_email': email, 'receiver_name': rname, 'receiver_email': remail, 'message': message\n }\n html_content = render_to_string(\"email.html\", template_data)\n msg.attach_alternative( html_content , \"text/html\")\n msg.send()\n connection.close() # Cleanup\n return HttpResponseRedirect('/thank-you/')\n else:\n form = EmailForm()\n\n return render(request, 'card.html') \n</code></pre>\n\n<p>This is the form that submits the email. I currently use the same input name for the receiver email and receiver name. </p>\n\n<pre><code><form role=\"form\" action=\"/sendmail/\" method=\"post\">\n\n<input type=\"text\" name=\"name\" class=\"form-control input\" id=\"input1\" autocomplete=\"off\" placeholder=\"Enter Name\">\n\n<input type=\"text\" name=\"email\" class=\"form-control input\" id=\"input2\" autocomplete=\"off\" placeholder=\"Enter Email\">\n\n<input class='form-control reciptest' name=\"rname\" placeholder='Recipient Name' type='text'>\n\n<input type=\"text\" class=\"form-control emailtest\" name=\"remail\" placeholder=\"Recipient Email\">\n\n<a class=\"btn btn-sm btn-default\" onClick=\"addInput('dynamicInput');\">Add Recipient </a>\n<a class=\"btn btn-sm btn-default\" onClick=\"removeInput('dynamicInput');\">Remove Recipient</a>\n\n<textarea id=\"input3\" name=\"message\" class=\"form-control input\" rows=\"6\" placeholder=\"Not more than 1000 letters\" maxlength=\"1000\"></textarea>\n</code></pre>\n\n<h2>How would I go about in splitting and matching the lists recipients name and email and append it into EmailMultiAlternatives() and template_data?</h2>\n", "Lable": "No"} | |
| {"QuestionId": 31372390, "AnswerCount": 1, "Tags": "<xml><inheritance><xsd><abstract><extend>", "CreationDate": "2015-07-12T20:44:51.937", "AcceptedAnswerId": "31372846", "Title": "Is it possible to instantiate a double-extended complexType?", "Body": "<p>Consider the following scenario:</p>\n\n<p>I want to save elements and their attributes in a database, these elements extend from a common but abstract supertype called \"PersistentElement\". Now some of these elements all have a particular attribute, e.g. they all have a name, and all of these elements again share a common superelement named \"NamedElement\", which again is abstract. That leads to a schema/XSD looking like this: </p>\n\n<pre><code><xs:element name=\"Database\">\n <xs:complexType>\n <xs:sequence>\n <xs:element name=\"elements\" type=\"PersistentElement\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n </xs:sequence>\n </xs:complexType>\n</xs:element>\n\n<xs:complexType name=\"PersistentElement\" abstract=\"true\">\n <xs:attribute name=\"id\" type=\"xs:ID\"/>\n</xs:complexType>\n\n<xs:complexType name=\"NamedElement\" abstract=\"true\">\n <xs:complexContent>\n <xs:extension base=\"PersistentElement\">\n <xs:attribute name=\"name\" type=\"xs:string\"/>\n </xs:extension>\n </xs:complexContent>\n</xs:complexType>\n\n<xs:complexType name=\"ElementWithName\">\n <xs:complexContent>\n <xs:extension base=\"NamedElement\">\n <xs:element name=\"somethingElse\" type=\"xs:string\"/>\n </xs:extension>\n </xs:complexContent>\n</xs:complexType>\n</code></pre>\n\n<p>Now my question:\nis this even possible in XML? The most obvious fix for that would be to make one of the abstract elements a xs:choice-type of element, but just out of curiousity, and because I am still learning, I would like to know if a double extended abstract element is possible. The problem I face is, that I can't (or more exact do not know how to) instantiate a such a element in the corresponding XML file. What I want is:</p>\n\n<pre><code><Database>\n <elements xsi:type=\"ElementWithName\" id = \"E1\" name=\"testElement1\" >\n <somethingElse>bla</somethingElse>\n </elements>\n <elements xsi:type=\"ElementWithName\" id = \"E2\" name=\"testElement2\" >\n <somethingElse>blub</somethingElse>\n </elements> \n</Database>\n</code></pre>\n\n<p>But this gives me an error when I try to validate this, </p>\n\n<pre><code>Cvc-elt.4.2: Cannot Resolve 'ElementWithName' To A Type Definition For Element 'elements'.. Line '13', Column '66'.\nCvc-type.2: The Type Definition Cannot Be Abstract For Element Elements.. Line '13', Column '66'.\nCvc-complex-type.3.2.2: Attribute 'name' Is Not Allowed To Appear In Element 'elements'.. Line '13', Column '66'.\nCvc-complex-type.2.1: Element 'elements' Must Have No Character Or Element Information Item [children], Because The Type's Content Type Is Empty.. Line '16', Column '16'.\n</code></pre>\n", "Lable": "No"} | |
| {"QuestionId": 31374731, "AnswerCount": 1, "Tags": "<php><facebook-graph-api>", "CreationDate": "2015-07-13T02:41:51.650", "AcceptedAnswerId": null, "Title": "Graph facebook api user information", "Body": "<p>How to get user information using <code>graph</code> API. I'm using the below code but its not working except the picture.</p>\n\n<p>Can someone help me with the code. Also is there any book or tutorial available for beginners on how to use facebook php API, I have searched all stack overflow questions, tutorials and books but nothing gives clear understanding.</p>\n\n<p><strong>config.php</strong>:</p>\n\n<pre><code><?php\nsession_start();\n// added in v4.0.0\nrequire_once 'autoload.php';\nuse Facebook\\FacebookSession;\nuse Facebook\\FacebookRedirectLoginHelper;\nuse Facebook\\FacebookRequest;\nuse Facebook\\FacebookResponse;\nuse Facebook\\FacebookSDKException;\nuse Facebook\\FacebookRequestException;\nuse Facebook\\FacebookAuthorizationException;\nuse Facebook\\GraphObject;\nuse Facebook\\Entities\\AccessToken;\nuse Facebook\\HttpClients\\FacebookCurlHttpClient;\nuse Facebook\\HttpClients\\FacebookHttpable;\n// init app with app id and secret\nFacebookSession::setDefaultApplication( '1603681436570557','0a18d7df1638ea4ec2a0c2c5c642089c' );\n// login helper with redirect_uri\n $helper = new FacebookRedirectLoginHelper('http://localhost:8888/trender/fbconfig-tr.php' );\ntry {\n $session = $helper->getSessionFromRedirect();\n} catch( FacebookRequestException $ex ) {\n // When Facebook returns an error\n} catch( Exception $ex ) {\n // When validation fails or other local issues\n}\n// see if we have a session\nif ( isset( $session ) ) {\n // graph api request for user data\n $request = new FacebookRequest( $session, 'GET', '/me' );\n $response = $request->execute();\n // get response\n $graphObject = $response->getGraphObject();\n $fbid = $graphObject->getProperty('id'); // To Get Facebook ID\n $fbfullname = $graphObject->getProperty('name'); // To Get Facebook full name\n $femail = $graphObject->getProperty('email'); // To Get Facebook email ID\n /* ---- Session Variables -----*/\n $_SESSION['FBID'] = $fbid; \n $_SESSION['FULLNAME'] = $fbfullname;\n $_SESSION['EMAIL'] = $femail;\n /* ---- header location after session ----*/\n header(\"Location: home-tr.php\");\n} else {\n $loginUrl = $helper->getLoginUrl();\n header(\"Location: \".$loginUrl);\n}\n?>\n</code></pre>\n\n<h2>html code</h2>\n\n<pre><code><li><?php echo $_SESSION['FULLNAME']; ?></li>\n <li><img src=\"https://graph.facebook.com/<?php echo $_SESSION['FBID']; ?>/picture\"></li>\n <li><img src=\"https://graph.facebook.com/<?php echo $_SESSION['FBID']; ?>/picture\"></li>\n\n <li><img src=\"https://graph.facebook.com/<?php echo $_SESSION['FBID']; ?>/email\"></li>\n <li><img src=\"https://graph.facebook.com/<?php echo $_SESSION['FBID']; ?>/username\"></li>\n <li><img src=\"https://graph.facebook.com/<?php echo $_SESSION['FBID']; ?>/last_name\"></li>\n <li><img src=\"https://graph.facebook.com/<?php echo $_SESSION['FBID']; ?>/birthday\"></li>\n</code></pre>\n", "Lable": "No"} | |
| {"QuestionId": 31393897, "AnswerCount": 1, "Tags": "<python><macos><neural-network><anaconda><caffe>", "CreationDate": "2015-07-13T21:33:17.657", "AcceptedAnswerId": null, "Title": "ImportError: dlopen(...) library not open", "Body": "<p>I am trying to run <a href=\"http://googleresearch.blogspot.co.uk/2015/07/deepdream-code-example-for-visualizing.html\" rel=\"nofollow noreferrer\">Google Research's DeepDream code</a> on a mac running OSx 10.9.5.<br>\nThere are a few dependencies that I had to install. I am using the Anaconda distribution of python and I made sure that I have all the packages required.</p>\n\n<p>The hardest thing was to install Caffe. I have ATLAS installed using fink. Then I have compiled caffe and pycaffe. When I ran 'make runtest' all tests passed. I also ran 'make distribute'.</p>\n\n<p>When I run <a href=\"https://github.com/google/deepdream\" rel=\"nofollow noreferrer\">the notebook released from Google</a>, I get the following error:</p>\n\n<pre><code>---------------------------------------------------------------------------\nImportError Traceback (most recent call last)\n<ipython-input-1-453033db464f> in <module>()\n 11 \n 12 \n---> 13 import caffe\n 14 \n 15 \n\n/Users/Andrea/caffe/python/caffe/__init__.py in <module>()\n----> 1 from .pycaffe import Net, SGDSolver\n 2 from ._caffe import set_mode_cpu, set_mode_gpu, set_device, Layer, get_solver\n 3 from .proto.caffe_pb2 import TRAIN, TEST\n 4 from .classifier import Classifier\n 5 from .detector import Detector\n\n/Users/Andrea/caffe/python/caffe/pycaffe.py in <module>()\n 11 import numpy as np\n 12 \n---> 13 from ._caffe import Net, SGDSolver\n 14 import caffe.io\n 15 \n\nImportError: dlopen(/Users/Andrea/caffe/python/caffe/_caffe.so, 2): Library not loaded: @rpath/libcudart.7.0.dylib\n Referenced from: /Users/Andrea/caffe/python/caffe/_caffe.so\n Reason: image not found\n</code></pre>\n\n<p>What can I do to fix this?</p>\n\n<hr>\n\n<p><img src=\"https://i.stack.imgur.com/aGCqO.png\" alt=\"here is the screendump requested in a comment\"></p>\n", "Lable": "D"} | |
| {"QuestionId": 31420390, "AnswerCount": 1, "Tags": "<python><pyserial>", "CreationDate": "2015-07-15T02:15:36.193", "AcceptedAnswerId": "31421215", "Title": "How to get PySerial to accept 921600 Baud rate", "Body": "<p>We have a motor controller that implements a USB->Virtual COM port that has a fixed baud rate of 921600 (the manual even states that the baud rate cannot be changed). I found that if I use a terminal program like Terminal, I can pass the custom baud rate of 921600 and communicate with the instrument with no issues. We are using Windows 7 pro, 64-bit version.</p>\n\n<p>However, when I tried to do this in PySerial (v.2.7) using Python 2.7.10 (32 bit) like this:</p>\n\n<pre><code>import serial\nser = serial.Serial(\"COM3\",921600)\n</code></pre>\n\n<p>I always encounter error saying that parameter is incorrect.</p>\n\n<blockquote>\n <p>File \"C:\\Python27\\lib\\site-packages\\serial\\serialwin32.py\", line 202, in _reconfigurePort\n raise ValueError(\"Cannot configure port, some setting was wrong. Original message: %r\" % ctypes.WinError())\n ValueError: Cannot configure port, some setting was wrong. Original message: WindowsError(87, 'The parameter is incorrect.')</p>\n</blockquote>\n\n<p>The valid Baudrates seem to be the one listed in serialwin32.py</p>\n\n<pre><code>BAUDRATES = (50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,\n 9600, 19200, 38400, 57600, 115200)\n</code></pre>\n\n<p>When I use any of the baud rate from the list there I can open the serial port (but not necessary able to communicate with the instrument).</p>\n\n<p>Just adding 921600 hundred to this list in serialwin32.py doesn't do anything. I have searched several forums and websites and so far nobody seems to have an answer on how to set this higher baud rate in Windows. The baudrate above 115200 used to be unreliable in older versions of Windows, but I assume that Windows 7 should be able to handle a much higher transfer rate now especially that many USB IC like FTDI and CH430 can handle a much higher baud rate than 115200.</p>\n\n<p>Does anyone know a way to get pySerial to accept a higher baudrate than 115200 in Windows?</p>\n", "Lable": "No"} | |
| {"QuestionId": 31541066, "AnswerCount": 2, "Tags": "<php><wordpress><woocommerce>", "CreationDate": "2015-07-21T13:51:20.100", "AcceptedAnswerId": "31541609", "Title": "Sample Product, change location of Price | Wordpress Woocommerce", "Body": "<p>I am trying to change the location of Price of all sample Products from <strong>the current location, which is below the title</strong> to <strong>just about \"add to cart\"</strong>.<br>\nIf i do it with CSS, that is affecting the responsiveness of the website.<br>\ni want to make this change on a PHP, so that it can impact all the SAMPLE products which i upload now on..<br>\ncan i make any changes on the PHP so that the \"SAMPLE Product\" Price always shows up <strong>just above</strong> \"add to cart\" ? </p>\n\n<p><strong>at present:</strong><br>\n<img src=\"https://i.stack.imgur.com/RzKuW.png\" alt=\"enter image description here\"></p>\n\n<p><strong>what i need is:</strong><br>\n<img src=\"https://i.stack.imgur.com/LJ3UT.png\" alt=\"enter image description here\"></p>\n\n<p><strong>the code in content-single-product.php</strong> </p>\n\n<pre><code><div class=\"single clearfix row-fluid\">\n <div class=\"wrap span6 product-left\">\n <?php\n /**\n * woocommerce_show_product_images hook\n *\n * @hooked woocommerce_show_product_sale_flash - 10\n * @hooked woocommerce_show_product_images - 20\n */\n do_action( 'woocommerce_before_single_product_summary' );\n ?>\n </div>\n <div class=\"span6\">\n <div class=\"product-detail\">\n <?php\n /**\n * woocommerce_single_product_summary hook\n *\n * @hooked woocommerce_template_single_title - 5\n * @hooked woocommerce_template_single_price - 10\n * @hooked woocommerce_template_single_excerpt - 20\n * @hooked woocommerce_template_single_add_to_cart - 30\n * @hooked woocommerce_template_single_meta - 40\n * @hooked woocommerce_template_single_sharing - 50\n */\n do_action( 'woocommerce_single_product_summary' );\n //echo do_shortcode(\"[yith_wcwl_add_to_wishlist]\");\n ?>\n </div>\n </div>\n </div>\n</code></pre>\n", "Lable": "No"} | |
| {"QuestionId": 31629031, "AnswerCount": 1, "Tags": "<android>", "CreationDate": "2015-07-25T17:08:15.523", "AcceptedAnswerId": null, "Title": "Start an application on \"background\" mode", "Body": "<p>I starting an application from a Wearable Listener, but i don't wanna open the app \"visually\", keeping it on background. I mean, if the user press the button to see the open apps, he must be able to see this app. \nHow can i do this? I'm not sure if i'm using the correct terms. </p>\n", "Lable": "No"} | |
| {"QuestionId": 31697141, "AnswerCount": 1, "Tags": "<javascript><html><asp.net><phantomjs><casperjs>", "CreationDate": "2015-07-29T09:57:58.837", "AcceptedAnswerId": null, "Title": "CasperJS cannot click on a DIV button", "Body": "<p>I have been working on a website scraping project using CasperJS. It is an ASPX website. I could login to the site and then fill the form that runs a search but after filling the form I cannot simulate a click on the DIV button. The search runs using AJAX but when I capture page after waiting few seconds it does not show results in the captured image. The Search button is made of DIV and upon clicking it runs other hidden JavaScript functions that send the AJAX request to retrieve the search results.</p>\n\n<p>Here is my code.</p>\n\n<pre><code>var casper = require('casper').create({\n clientScripts: ['js/jquery-1.11.3.min.js']\n});\n\nvar x = require('casper').selectXPath;\n\ncasper.userAgent('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US)');\n\ncasper.start('https://example.com/finder.aspx');\n\ncasper.then(function () {\n this.sendKeys('#UserName', 'xxxxx');\n this.sendKeys('#Password', 'yyyyy');\n console.log('Fill login credentials');\n casper.capture(\"screen1.png\");\n\n this.thenClick('input[type=submit]');\n});\n\ncasper.wait(3000, function () {\n console.log('Login');\n casper.capture(\"screen2.png\");\n});\n\ncasper.then(function () {\n this.fill('form[name=\"searchForm\"]', {\n '$ddType': 'ABCD',\n '$rbGender': '0',\n }, true);\n});\n\ncasper.wait(3000, function () {\n this.sendKeys('#Type_I', 'ABCD');\n this.sendKeys('#ProviderId', '1111111111');\n this.sendKeys('#txtNameFirst', 'My');\n this.sendKeys('#txtNameLast', 'Name');\n this.sendKeys('#txtZipCode', '11111');\n this.sendKeys('#txtBirthDate', '01/11/1987');\n console.log('Form filled');\n casper.capture(\"screen3.png\");\n});\n\ncasper.thenClick('#btnSubmit', function () {\n console.log('Submitted');\n});\n\ncasper.wait(3000, function () {\n casper.capture(\"screen4.png\");\n});\n</code></pre>\n\n<p>This is the button DIV that needs a click.</p>\n\n<pre><code><div id=\"btnSubmit\" class=\"dxb\">\n <span>Submit</span>\n</div>\n</code></pre>\n\n<p>The screen4.png (as same as screen3.png) shows only a filled search form but no \"Loading..\" message (which supposed to be shown upon submit click) or any result. How can I trigger the form submit?\nNormal form submit does not retrieve the search results.</p>\n\n<hr>\n\n<p>PS:\nI tried the following methods to trigger the submit button inside <code>evaluate()</code>.</p>\n\n<p>Enter press while in a text box (which in reality shows the result)</p>\n\n<h1>Method 1</h1>\n\n<pre><code>var e = jQuery.Event(\"keydown\");\ne.which = 13;\n$(\"#txtZipCode\").trigger(e);\n</code></pre>\n\n<h1>Method 2</h1>\n\n<pre><code>this.sendKeys('#txtZipCode', casper.page.event.key.Enter, {keepFocus: true});\n</code></pre>\n\n<p>Clicking on the DIV button.</p>\n\n<h1>Method 1</h1>\n\n<pre><code>$('#btnSubmit div input').trigger('click');\n</code></pre>\n\n<h1>Method 2</h1>\n\n<pre><code>$('#btnSubmit').click();\n</code></pre>\n\n<h1>Method 3</h1>\n\n<pre><code>var mouse = require(\"mouse\").create(casper);\nthis.mouse.click(\"#btnSubmit\");\n</code></pre>\n\n<p>Still no luck.</p>\n", "Lable": "No"} | |
| {"QuestionId": 31784536, "AnswerCount": 2, "Tags": "<ibm-cloud><node-red>", "CreationDate": "2015-08-03T10:01:53.427", "AcceptedAnswerId": null, "Title": "Your application is staging to create bluemix node-red app", "Body": "<p>I am a newbie for the bluemix. I would like to start the Node red app. However the app will never be created, instead the screen always show Your application is staging. I have try this a number of times and changed the server location from UK to USA. However it never works.</p>\n", "Lable": "No"} | |
| {"QuestionId": 31785615, "AnswerCount": 2, "Tags": "<php><oauth>", "CreationDate": "2015-08-03T11:04:56.853", "AcceptedAnswerId": null, "Title": "Invalid OAuth Request in Right Signature", "Body": "<p>I need to integrate my website with right signature for signing documents.But I couldn't figured it out because its continously showing me Invalid OAuth Request.\nI'm running this api by using php library but its keep on showing Invalid OAuth Request.I'm fed up from all this. Run on Browser below url</p>\n\n<p><a href=\"https://RightSignature.com/api/documents.xml\" rel=\"nofollow\">https://RightSignature.com/api/documents.xml</a></p>\n", "Lable": "No"} | |
| {"QuestionId": 31850728, "AnswerCount": 0, "Tags": "<c++><opencv><memory-leaks>", "CreationDate": "2015-08-06T08:34:24.730", "AcceptedAnswerId": null, "Title": "OpenCV's SVM::train_auto memory leak. Is it a bug in library or wrong usage?", "Body": "<p>I'm using <code>OpenCV</code>'s SVM and it seems to have memory leak in <code>train_auto</code> function. <br>\nI run it in <code>Boost::Test</code> environment because it warns user if leak is found on runtime. <br>\nWhen I comment out the <code>train_auto</code> line, there is no leak.</p>\n\n<p>Here is whole code:</p>\n\n<pre><code>#define BOOST_TEST_MODULE SomeTestModule\n#include <boost\\test\\included\\unit_test.hpp>\n#include \"opencv2\\ml\\ml.hpp\"\n#include \"opencv/cv.h\"\n\nBOOST_AUTO_TEST_CASE(SomeTestname) \n{\n // Prepare matrix of class numbers (few ones, few zeros)\n cv::Mat classes = cv::Mat::ones(10, 1, CV_32FC1);\n cv::vconcat(classes, (cv::Mat::zeros(10, 1, CV_32FC1)), classes);\n // Prepare matrix of 2-d feature vectors (random :D )\n cv::Mat featureVectors(20, 2, CV_32FC1);\n cv::randu(featureVectors, -1, 1);\n\n // Set up SVM parameters\n CvSVMParams params;\n params.svm_type = CvSVM::C_SVC;\n params.kernel_type = CvSVM::LINEAR;\n params.term_crit = cvTermCriteria(CV_TERMCRIT_ITER, 100, 1e-6);\n\n // And do the training!\n CvSVM svm;\n svm.train_auto(featureVectors, classes, cv::Mat(), cv::Mat(), params);\n\n}\n</code></pre>\n\n<p>And the output (after runing <code>Boost::Test</code> executable) is:</p>\n\n<pre><code>Running 1 test case...\n\n*** No errors detected\nDetected memory leaks!\nDumping objects ->\n{865} normal block at 0x00D4C6F8, 44 bytes long.\n Data: < y ?q > CD CD CD CD F8 C6 D4 00 79 AD 9E 3F 71 19 D1 BF\n{862} normal block at 0x00D4C750, 44 bytes long.\n Data: < P > CD CD CD CD CD CD CD CD CD CD CD CD 50 C7 D4 00\n{859} normal block at 0x00D4C598, 44 bytes long.\n Data: < ?> CD CD CD CD 98 C5 D4 00 B0 D2 AF D6 FF CB AE 3F\n{856} normal block at 0x00D4C540, 44 bytes long.\n Data: < @ > CD CD CD CD CD CD CD CD CD CD CD CD 40 C5 D4 00\n{853} normal block at 0x00D4C4E8, 44 bytes long.\n Data: < yY- 5 > CD CD CD CD E8 C4 D4 00 79 59 2D AC 35 E9 AF BF\n{850} normal block at 0x00D4C1D0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD D0 C1 D4 00\n{847} normal block at 0x00D4C490, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 90 C4 D4 00\n{844} normal block at 0x00D4C3E0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD E0 C3 D4 00\n{841} normal block at 0x00D4BE60, 44 bytes long.\n Data: < ` > CD CD CD CD CD CD CD CD CD CD CD CD 60 BE D4 00\n{838} normal block at 0x00D4C2D8, 44 bytes long.\n Data: < > CD CD CD CD D8 C2 D4 00 CA 1D 0E 84 8C CA C5 BF\n{835} normal block at 0x00D4BE08, 44 bytes long.\n Data: < y ?q > CD CD CD CD 08 BE D4 00 79 AD 9E 3F 71 19 D1 BF\n{832} normal block at 0x00D4C178, 44 bytes long.\n Data: < x b ^ ?> CD CD CD CD 78 C1 D4 00 D4 62 C7 FF 5E BC B4 3F\n{829} normal block at 0x00D4C018, 44 bytes long.\n Data: < ?> CD CD CD CD 18 C0 D4 00 B0 D2 AF D6 FF CB AE 3F\n{826} normal block at 0x00D4C648, 44 bytes long.\n Data: < H Ua he% > CD CD CD CD 48 C6 D4 00 55 61 05 68 65 25 C2 BF\n{823} normal block at 0x00D4C228, 44 bytes long.\n Data: < ( yY- 5 > CD CD CD CD 28 C2 D4 00 79 59 2D AC 35 E9 AF BF\n{820} normal block at 0x00D4C6A0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD A0 C6 D4 00\n{817} normal block at 0x00D4BF10, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 10 BF D4 00\n{814} normal block at 0x00D4BF68, 44 bytes long.\n Data: < h Ua he% > CD CD CD CD 68 BF D4 00 55 61 05 68 65 25 C2 BF\n{811} normal block at 0x00D4C120, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 20 C1 D4 00\n{808} normal block at 0x00D4C388, 44 bytes long.\n Data: < > CD CD CD CD 88 C3 D4 00 CA 1D 0E 84 8C CA C5 BF\n{805} normal block at 0x00D4C280, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 80 C2 D4 00\n{802} normal block at 0x00D4C800, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 00 C8 D4 00\n{799} normal block at 0x00D4C858, 44 bytes long.\n Data: < X * ?> CD CD CD CD 58 C8 D4 00 A4 88 FF 2A 00 00 F0 3F\n{796} normal block at 0x00D4C5F0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD F0 C5 D4 00\n{793} normal block at 0x00D4BDB0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD B0 BD D4 00\n{790} normal block at 0x00D4C0C8, 44 bytes long.\n Data: < > CD CD CD CD C8 C0 D4 00 DD B5 0B 0F FD FF EF BF\n{787} normal block at 0x00D4BFC0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD C0 BF D4 00\n{784} normal block at 0x00D4C330, 44 bytes long.\n Data: < 0 > CD CD CD CD CD CD CD CD CD CD CD CD 30 C3 D4 00\n{781} normal block at 0x00D4C7A8, 44 bytes long.\n Data: < u @J3 ?> CD CD CD CD A8 C7 D4 00 99 75 88 40 4A 33 CC 3F\n{778} normal block at 0x00D4C070, 44 bytes long.\n Data: < p > CD CD CD CD CD CD CD CD CD CD CD CD 70 C0 D4 00\n{775} normal block at 0x00D4B6A8, 44 bytes long.\n Data: < ? i > CD CD CD CD A8 B6 D4 00 3F 0E 93 08 10 69 B0 BF\n{772} normal block at 0x00D4BAC8, 44 bytes long.\n Data: < 1m F ?> CD CD CD CD C8 BA D4 00 15 31 6D EA 46 ED C4 3F\n{769} normal block at 0x00D4BA70, 44 bytes long.\n Data: < p > CD CD CD CD CD CD CD CD CD CD CD CD 70 BA D4 00\n{766} normal block at 0x00D4B9C0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD C0 B9 D4 00\n{763} normal block at 0x00D4BB20, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 20 BB D4 00\n{760} normal block at 0x00D4BC80, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 80 BC D4 00\n{757} normal block at 0x00D4B758, 44 bytes long.\n Data: < X F 4O ?> CD CD CD CD 58 B7 D4 00 AB 46 D5 34 4F 12 C0 3F\n{754} normal block at 0x00D4B968, 44 bytes long.\n Data: < h M ?> CD CD CD CD 68 B9 D4 00 E5 82 13 4D C8 0A AC 3F\n{751} normal block at 0x00D4BCD8, 44 bytes long.\n Data: < >L \" ?> CD CD CD CD D8 BC D4 00 10 3E 4C 0E 89 22 B6 3F\n{748} normal block at 0x00D4B910, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 10 B9 D4 00\n{745} normal block at 0x00D4B5A0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD A0 B5 D4 00\n{742} normal block at 0x00D4B650, 44 bytes long.\n Data: < P > CD CD CD CD CD CD CD CD CD CD CD CD 50 B6 D4 00\n{739} normal block at 0x00D4BC28, 44 bytes long.\n Data: < ( V ?> CD CD CD CD 28 BC D4 00 AD 56 FC 05 00 00 F0 3F\n{736} normal block at 0x00D4B8B8, 44 bytes long.\n Data: < I ?> CD CD CD CD B8 B8 D4 00 00 00 00 E0 DB 49 90 3F\n{733} normal block at 0x00D4B860, 44 bytes long.\n Data: < ` > CD CD CD CD CD CD CD CD CD CD CD CD 60 B8 D4 00\n{730} normal block at 0x00D4BA18, 44 bytes long.\n Data: < k 4 > CD CD CD CD 18 BA D4 00 6B 06 34 F3 FF FF EF BF\n{727} normal block at 0x00D4B808, 44 bytes long.\n Data: < } j ?> CD CD CD CD 08 B8 D4 00 7D CB 6A E4 D3 AE D1 3F\n{724} normal block at 0x00D4B7B0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD B0 B7 D4 00\n{721} normal block at 0x00D4BBD0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD D0 BB D4 00\n{718} normal block at 0x00D4BB78, 44 bytes long.\n Data: < x M . ?> CD CD CD CD 78 BB D4 00 E0 4D D0 2E 92 D6 A2 3F\n{715} normal block at 0x00D4B700, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 00 B7 D4 00\n{712} normal block at 0x00D4B520, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 20 B5 D4 00\n{709} normal block at 0x00D4B4C8, 44 bytes long.\n Data: < w2 ?> CD CD CD CD C8 B4 D4 00 BD 77 32 01 00 00 F0 3F\n{706} normal block at 0x00D4B470, 44 bytes long.\n Data: < p > CD CD CD CD CD CD CD CD CD CD CD CD 70 B4 D4 00\n{703} normal block at 0x00D4B418, 44 bytes long.\n Data: < @ q > CD CD CD CD 18 B4 D4 00 40 9A 99 19 90 E3 71 BF\n{700} normal block at 0x00D4B3C0, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD C0 B3 D4 00\n{697} normal block at 0x00D4B368, 44 bytes long.\n Data: < h $33{ C ?> CD CD CD CD 68 B3 D4 00 24 33 33 7B F4 43 B3 3F\n{694} normal block at 0x00D4B310, 44 bytes long.\n Data: < > CD CD CD CD CD CD CD CD CD CD CD CD 10 B3 D4 00\n{691} normal block at 0x00D4B2B8, 44 bytes long.\n Data: < _X ?> CD CD CD CD B8 B2 D4 00 D0 FF FF 5F 58 8B 95 3F\n{686} normal block at 0x00D2B148, 44 bytes long.\n Data: < H fff V~?> CD CD CD CD 48 B1 D2 00 C0 66 66 66 F0 56 7E 3F\n{671} normal block at 0x00D197C0, 8 bytes long.\n Data: < z u O> EF 7A FE C5 96 75 E0 4F\nObject dump complete.\n</code></pre>\n\n<p>Is this an <code>OpenCV</code>'s bug or my wrong usage of the library?\nHow to avoid this leak?</p>\n", "Lable": "No"} | |
| {"QuestionId": 31882216, "AnswerCount": 2, "Tags": "<android><file><android-sdcard>", "CreationDate": "2015-08-07T16:08:41.620", "AcceptedAnswerId": null, "Title": "File Properties in Android file system", "Body": "<p>I have a set of files(any document type .txt, .doc,...) in my sdcard folder. These files can be opened, edited and saved back in same location. I want to identify the Edited/Modified files from my application. </p>\n\n<p>I couldn't use the File properties \"created\" and \"last modified\", when saving the file both created and the modified time are reassigned. Please suggest me a solution to find the modified files. Thanks.</p>\n", "Lable": "No"} | |