compare_oracle / oraclechunk32.json
xPXXX's picture
Upload 10 files
1634593
Raw
History Blame Contribute Delete
28.3 kB
Invalid JSON:Unexpected non-whitespace character after JSONat line 2, column 1
{"QuestionId": 22829007, "AnswerCount": 1, "Tags": "<android><json><parsing><google-maps-markers>", "CreationDate": "2014-04-03T05:58:14.713", "AcceptedAnswerId": null, "Title": "How to add markers on map by parsed json array", "Body": "<p>I'm working on a project which calls to a remote server for data. Server gives latitude, longitude and some information. I can able to make call to server and get the response. But i'm not getting how to extract data from that response and plot markers on map.</p>\n\n<p>here is my code</p>\n\n<p>public class NearActivity extends Activity implements LocationListener {</p>\n\n<pre><code>GoogleMap gMap;\nprivate LocationManager locationManager;\nprivate String provider;\n\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_near);\n gMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n\n locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n provider = locationManager.getBestProvider(criteria, false);\n Location location = locationManager.getLastKnownLocation(provider);\n\n if (location != null) {\n\n new HttpGetTask().execute();\n\n gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n location.getLatitude(), location.getLongitude()), 14));\n\n gMap.addMarker(new MarkerOptions()\n .position(\n new LatLng(location.getLatitude(), location\n .getLongitude())).title(\"I'm here\"));\n }\n\n}\n\n@Override\nprotected void onPause() {\n // TODO Auto-generated method stub\n super.onPause();\n locationManager.removeUpdates(this);\n}\n\n@Override\nprotected void onResume() {\n // TODO Auto-generated method stub\n super.onResume();\n locationManager.requestLocationUpdates(provider, 400, 1, this);\n}\n\n@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n // Inflate the menu; this adds items to the action bar if it is present.\n getMenuInflater().inflate(R.menu.near, menu);\n return true;\n}\n\n@Override\npublic void onLocationChanged(Location location) {\n // TODO Auto-generated method stub\n\n}\n\n@Override\npublic void onProviderDisabled(String provider) {\n // TODO Auto-generated method stub\n Toast.makeText(this, \"Disabled provider \" + provider,\n Toast.LENGTH_SHORT).show();\n\n}\n\n@Override\npublic void onProviderEnabled(String provider) {\n // TODO Auto-generated method stub\n Toast.makeText(this, \"Enabled new provider \" + provider,\n Toast.LENGTH_SHORT).show();\n\n}\n\n@Override\npublic void onStatusChanged(String provider, int status, Bundle extras) {\n // TODO Auto-generated method stub\n\n}\n\nprivate class HttpGetTask extends AsyncTask&lt;Void, Void, String&gt; {\n\n Double lat = locationManager.getLastKnownLocation(provider)\n .getLatitude();\n Double lng = locationManager.getLastKnownLocation(provider)\n .getLongitude();\n\n String URL = \"http:/?xyz.around_me.json?app_id=test&amp;lat=\"\n + lat + \"&amp;lng=\" + lng;\n\n AndroidHttpClient mClient = AndroidHttpClient.newInstance(\"\");\n\n @Override\n protected String doInBackground(Void... params) {\n\n HttpGet request = new HttpGet(URL);\n ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler();\n\n try {\n\n return mClient.execute(request, responseHandler);\n\n } catch (ClientProtocolException exception) {\n exception.printStackTrace();\n } catch (IOException exception) {\n exception.printStackTrace();\n }\n return null;\n }\n\n @Override\n protected void onPostExecute(String result) {\n\n if (null != mClient)\n mClient.close();\n Log.v(\"Response\", result);\n // Toast.makeText(getBaseContext(), result,\n // Toast.LENGTH_SHORT).show();\n\n try {\n\n\n JSONArray json = new JSONArray(result);\n\n for (int i = 0; i &lt; json.length(); i++) {\n JSONObject e = json.getJSONObject(i);\n String point = e.getString(\"point\");\n Log.v(\"POINT\", point);\n\n String[] point2 = point.split(\",\");\n double lat1 = Double.parseDouble(point2[0]);\n double lng1 = Double.parseDouble(point2[1]);\n\n Log.v(\"LLDN\", \"\"+lat1+\"&amp;\"+lng1);\n\n gMap.addMarker(new MarkerOptions().title(e\n .getString(\"name\")).position(new LatLng(lat1, lng1)));\n }\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }\n}\n</code></pre>\n\n<p>}</p>\n\n<p>here is my json response</p>\n\n<pre><code>[\n{\npoint: \"77.606706,12.967060\",\ndistance: \"1.41\",\nid: 5686,\nph: \"1234\",\nname: \"zxcvb\",\nLS: \" asdfrewrtet\"\n},\n{\npoint: \"77.606706,12.967060\",\ndistance: \"1.41\",\nid: 5686,\nph: \"1234\",\nname: \"zxcvb\",\nLS: \" asdfrewrtet\"\n},\n{\npoint: \"77.606706,12.967060\",\ndistance: \"1.41\",\nid: 5686,\nph: \"1234\",\nname: \"zxcvb\",\nLS: \" asdfrewrtet\"\n},\n]\n</code></pre>\n\n<p>Anybody help me to extract data from this response.?\nIf i extract data i can place marker.</p>\n", "Lable": "No"}
{"QuestionId": 22928273, "AnswerCount": 1, "Tags": "<javascript><jquery><html><jquery-ui-dialog>", "CreationDate": "2014-04-08T05:30:15.407", "AcceptedAnswerId": "23105376", "Title": "Adding you tube player (iFrame) in jQuery modal dialog", "Body": "<p>I have some images in my <code>HTML</code> and _I need to play embedded you tube video videos on click of each image which should load/play in a <a href=\"http://jqueryui.com/dialog/#default\" rel=\"nofollow noreferrer\">jQuery UI dialog</a>. Basically like a <strong>pop up video player.</strong></p>\n\n<p>So here is what i have done to play/attach video with each image. I have three images and i have added the unique video id in my custom <code>data-attribute</code> which i taken from you tube.</p>\n\n<h3>HTML</h3>\n\n<pre><code>&lt;div id=\"ImageBox\"&gt;\n &lt;img src=\"img1.png\" class=\"playVideo\" alt=\"\" id=\"image1\" data-videoId=\"v6jg8g\"/&gt;\n &lt;img src=\"img2.png\" class=\"playVideo\" alt=\"\" id=\"image2\" data-videoId=\"re84hj\"/&gt;\n &lt;img src=\"img3.png\" class=\"playVideo\" alt=\"\" id=\"image3\" data-videoId=\"dhj3fk\"/&gt;\n&lt;/div&gt;\n\n&lt;!-- HTML for jQuery modal dialog --&gt;\n&lt;div id=\"MyVideoPlayer\"&gt;\n &lt;div&gt;\n &lt;strong id=\"videoTitle\"&gt;title for video&lt;/strong&gt;\n &lt;img src=\"closeButton.png\" id=\"Close\" alt=\"Close\" /&gt;\n &lt;/div&gt;\n &lt;iframe src=\"https://www.youtube.com/embed/MyVideoId?wmode=opaque&amp;autoplay=1&amp;autohide=1&amp;showinfo=0&amp;controls=2&amp;rel=0&amp;enablejsapi=1\" id=\"Player\" width=\"100%\" height=\"100%\"&gt;&lt;/iframe&gt;\n&lt;/div&gt;\n</code></pre>\n\n<blockquote>\n <p>Note: I am using <code>iframe embed</code> method from <a href=\"https://developers.google.com/youtube/player_parameters#Manual_IFrame_Embeds\" rel=\"nofollow noreferrer\"><strong>you tube player\n API</strong></a>\n to embed videos.</p>\n</blockquote>\n\n<p>For JavaScript/jQuery section, I came up with two choices here.</p>\n\n<p><strong>1. Because i am working in a ASP.NET MVC 3 app, i can set the unique video id to <code>@ViewBag</code> in script and assign to <code>iFrame</code> like this...</strong></p>\n\n<pre><code>$('#ImagesBlock .playVideo').click(function(){\n var myId = $(this).attr('data-videoId');\n '@ViewBag.VideoId' = myId;\n $('#MyVideoPlayer').dialog(\n { width: 'auto' },\n { height: 'auto' },\n { draggable: false },\n { resizable: false },\n { closeOnEscape: false },\n { modal: true },\n { show: { effect: \"fade\", duration: 200} }\n }); \n});\n</code></pre>\n\n<p><strong>2. Assign the updated <code>iFrame</code> src with new video id each time dialog\n opens.</strong></p>\n\n<pre><code>$('#imagesBlock .playVideo').click(function(){\n var myId = $(this).attr('data-videoId');\n\n var src = 'https://www.youtube.com/embed/'+ myId +'?wmode=opaque&amp;autoplay=1&amp;autohide=1\n &amp;showinfo=0&amp;controls=2&amp;rel=0&amp;enablejsapi=1';\n\n $('#MyVideoPlayeriframe').attr('src', src); \n $('#MyVideoPlayer').dialog(\n { width: 'auto' },\n { height: 'auto' },\n { draggable: false },\n { resizable: false },\n { closeOnEscape: false },\n { modal: true },\n { show: { effect: \"fade\", duration: 200} }\n }); \n});\n</code></pre>\n\n<p>Which one should I go with. I found some references though,</p>\n\n<ul>\n<li><a href=\"https://stackoverflow.com/questions/17804992/embedded-jwplayer-into-jquery-dialog\">Embedded jwplayer into jQuery Dialog</a></li>\n<li><a href=\"https://stackoverflow.com/questions/15887106/how-to-get-embedded-video-into-modal-dialog\">https://stackoverflow.com/questions/15887106/how-to-get-embedded-video-into-modal-dialog</a></li>\n<li><a href=\"http://plugins.jquery.com/jquery.mb.YTPlayer/\" rel=\"nofollow noreferrer\">jQuery mb.YTPlayer</a></li>\n</ul>\n\n<p>Is there any way i can make it little more simplified and re-usable in future. Please advise with your wise opinion.</p>\n", "Lable": "No"}
{"QuestionId": 22941798, "AnswerCount": 0, "Tags": "<php><mysql>", "CreationDate": "2014-04-08T15:42:05.710", "AcceptedAnswerId": null, "Title": "Delete dir and data from mysql", "Body": "<p>I use form which one upload file into folder and info(name, size) into database.So i want to make deleting form which one delete file and data from database. </p>\n\n<pre><code>&lt;?php\ninclude '../dbc.php'; \n$tbl_name=\"image\"; // Table name\n\n$sql=\"SELECT * FROM $tbl_name\";\n$result=mysql_query($sql);\n\n//detect file\n$directory = \"../../Upload/\"; \n$images = scandir($directory);\n$ignore = Array(\".\", \"..\");\n?&gt;\n\n &lt;table width=\"800px\" style=\"background:white;margin:50px auto; font-size:13px;\" border=\"1\" cellpadding=\"3\"&gt;\n &lt;tr&gt;\n &lt;td colspan=\"3\"&gt;&lt;strong&gt;Delete:&lt;/strong&gt; &lt;/td&gt;\n &lt;/tr&gt;\n\n &lt;tr&gt;\n &lt;td width=\"40%\" align=\"center\"&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;\n &lt;td width=\"10%\" align=\"center\"&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt;\n &lt;td width=\"5%\" align=\"center\"&gt;&lt;strong&gt;Delete&lt;/strong&gt;&lt;/td&gt;\n &lt;/tr&gt;\n\n &lt;?php\n while($rows=mysql_fetch_array($result)){\n ?&gt;\n &lt;tr id='del'&gt;\n &lt;td&gt;&lt;?php echo $rows['name']; ?&gt;&lt;/td&gt;\n &lt;td&gt;&lt;?php echo number_format($rows['imgSize'], 2) ?&gt; MB&lt;/td&gt;\n &lt;td&gt;&lt;a name=\"delete\" href=\"delData1.php?id=&lt;?php echo $rows['imgId']; \n ?&gt;\"&gt;Delete&lt;/a&gt;&lt;/td&gt;\n &lt;/tr&gt;\n\n &lt;?php\n }\n ?&gt;\n\n &lt;/table&gt;\n &lt;?php\n mysql_close();\n ?&gt;\n</code></pre>\n\n<p>delData1.php</p>\n\n<pre><code>&lt;?php\ninclude '../dbc.php';\n$tbl_name=\"image\"; // Table name\n// get value of id that sent from address bar\n$id=$_GET['id'];\n\n$filename = $_POST['filename'];\n$path = $_POST['directory'];\nif(file_exists($path.\"/\".$filename)) { \n unlink($path.\"/\".$filename); //delete file\n}\n\n// Delete data in mysql from row that has this id\n$sql=\"DELETE FROM $tbl_name WHERE imgId='$id'\";\n$result=mysql_query($sql);\n\n// if successfully deleted\nif($result){\n rmdir('$name');\necho \"Deleted\";\necho \"&lt;BR&gt;\";\nheader(\"Location:Data.php\");\n}\n\nelse {\necho \"ERROR\";\n}\n?&gt;\n</code></pre>\n\n<p>It's delete data from database, but file stay in folder.</p>\n", "Lable": "No"}
{"QuestionId": 22955744, "AnswerCount": 2, "Tags": "<c++><stl>", "CreationDate": "2014-04-09T07:33:06.100", "AcceptedAnswerId": "22955831", "Title": "Polymorphism between std::unordered_set and std::vector?", "Body": "<p>I have a function in my code which takes in a C++ container object, and reads each element in it using a loop. The function looks a bit like this:</p>\n\n<pre><code>void function(std::unordered_set&lt;unsigned int&gt; container)\n{\n for(auto it = container.begin(); it != container.end(); it++)\n {\n /* Do something */\n }\n}\n</code></pre>\n\n<p>However, I would like this function to also accept containers of type std::vector. As you can see from the code, the body of the function need not be aware of the type of the container (it can just access each element using *it). How can I achieve this without having redundancy in my code?</p>\n", "Lable": "No"}
{"QuestionId": 22991866, "AnswerCount": 1, "Tags": "<mysql>", "CreationDate": "2014-04-10T15:04:12.130", "AcceptedAnswerId": "23016362", "Title": "get list of active employees at a store", "Body": "<p>I have a table with data of employees and where they worked and how much they sold. These employees tend to move around from store location every couple of months. </p>\n\n<p>Sometimes when a employee moves some of his sales still get credited to the old sales location due to business reasons.</p>\n\n<p>Here is a snapshot of the data:</p>\n\n<pre><code>location_id | employee_id | name | unit_sold | month \n2 | abc | john |12 | 3\n1 | abc | john |1 | 3\n5 | rst | bob |11 | 2\n2 | qwe | tim |12 | 3\n1 | gsd | jim |1 | 3\n1 | uio | joe |11 | 3\n1 | abc | john |50 | 1\n</code></pre>\n\n<p>So notice that John has worked at 2 locations in month 3. On location=1 he sold 1 item and location=2 he sold 12. His actual place of employement is the location that has the higher unit_sold for the latest queried month. Also notice that John sold 50 units in month one at location =1 but that is not his work location in month=3.</p>\n\n<p>Here is what my query needs to do:</p>\n\n<p>Get a list of all current employees that work at location =? during time range x to y. </p>\n\n<p>Current means that they must still be active in the latest month. Also if an employee has worked at more that one location during the latest month of the time range then he should only be included if the location being queried was the place he sold the most units that month. </p>\n\n<p>Here is my try so far.</p>\n\n<pre><code>SELECT \n employee_id,\n NAME \nFROM\n mytable \nWHERE location_id = '1' \n AND month BETWEEN '1' \n AND '3' \n AND (employee_id, `month`, location_id) IN \n (SELECT \n employee_id,\n `month`,\n location_id \n FROM\n mytable \n WHERE month BETWEEN '1' \n AND '3') \nGROUP BY employee_id \n</code></pre>\n\n<p>It returns order employees as well in the response.</p>\n\n<p>Here is the <a href=\"http://sqlfiddle.com/#!2/e8dcd/2\" rel=\"nofollow\">SQLFiddle</a></p>\n", "Lable": "No"}
{"QuestionId": 23077278, "AnswerCount": 1, "Tags": "<html>", "CreationDate": "2014-04-15T07:33:32.690", "AcceptedAnswerId": "23077846", "Title": "I linked a text to a page but it did not work", "Body": "<p>I linked a text in view page to a function but it did not work I do not know what is the problem. It worked in one page but note in another page I mean it did not work for two Previous pages</p>\n\n<pre><code>&lt;a href=\"acontrol/show_sec\"&gt;back&lt;/a&gt;\n</code></pre>\n", "Lable": "No"}
{"QuestionId": 23162429, "AnswerCount": 1, "Tags": "<actionscript-3><flash><flashdevelop>", "CreationDate": "2014-04-18T21:13:02.017", "AcceptedAnswerId": "23165739", "Title": "Doing a Tutorial for a AS3 Flash game in FlashDevelop; how do i do the things that mention source.fla", "Body": "<p>Student doing AS3, I use FlashDevelop and I am wanting to follow and use this tutorial to help me create a tower defence game: <a href=\"http://www.flashgametuts.com/tutorials/as3/how-to-create-a-tower-defense-game-in-as3-part-1/\" rel=\"nofollow\">http://www.flashgametuts.com/tutorials/as3/how-to-create-a-tower-defense-game-in-as3-part-1/</a></p>\n\n<p>I have started a new project > ActionScript 3 > ActionScript 3 Project and all I have is the Main.as which contains: </p>\n\n<pre><code>package \n{\nimport flash.display.Sprite;\nimport flash.events.Event;\n\n/**\n * ...\n * @author Duncan John Bunting\n */\npublic class Main extends Sprite \n{\n\n public function Main():void \n {\n if (stage) init();\n else addEventListener(Event.ADDED_TO_STAGE, init);\n }\n\n private function init(e:Event = null):void \n {\n removeEventListener(Event.ADDED_TO_STAGE, init);\n // entry point\n }\n\n}\n}\n</code></pre>\n\n<p>It mentions saving files to the same place the source.fla file is (I do not have this) and just before the 3rd block of code, it says \"Now, we must return back to the main .fla file. Create a new layer to place actions in, and add the following code:\"</p>\n\n<p>How do I do this in FlashDevelop, since I do not have a source.fla? or is it not possible in FlashDevelop? </p>\n\n<p>If it is not possible, can someone please point me in the direction of a tutorial that creates a game in FlashDevelop using ActionScript3.</p>\n\n<p>Thanks.</p>\n", "Lable": "No"}
{"QuestionId": 23185904, "AnswerCount": 1, "Tags": "<python><django><import><path>", "CreationDate": "2014-04-20T18:07:04.320", "AcceptedAnswerId": "23186419", "Title": "Python 2.7 extremelly persisting error", "Body": "<p>I have this module</p>\n\n<pre><code>import os\nimport sys\n\nsys.path.append(\"C:\\pysec-master\")\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"pysec-master.settings\")\n\nfrom pysec.models import *\n\n\"\"\"get a file from the index. it may or may not be present on our hard disk. if it's not, it will be downloaded\nthe first time we try to access it, or you can call .download() explicitly\"\"\"\nfiling = Index.objects.filter(form='10-K',cik=1090872).order_by('-date')[0]\n\nprint filing.name\n\n\"\"\"initialize XBRL parser and populate an attribute called fields with a dict of 50 common terms\"\"\"\nx = latest.xbrl()\n\nprint x.fields['FiscalYear']\n\nprint x.fields\n\n\"\"\"fetch arbitrary XBRL tags representing eiter an Instant or a Duration in time\"\"\"\nprint 'Tax rate', x.GetFactValue('us-gaap:EffectiveIncomeTaxRateContinuingOperations','Duration')\n\nif x.loadYear(1): \n \"\"\"Most 10-Ks have two or three previous years contained in them for the major values. This call switches the contexts\n to the prior year (set it to 2 or 3 instead of 1 to go back further) and reloads the fundamental concepts.\n Any calls to GetFactValue will use that year's value from that point on.\"\"\"\n\n print x.fields['FiscalYear']\n\n print x.fields\n\n print 'Tax rate', x.GetFactValue('us-gaap:EffectiveIncomeTaxRateContinuingOperations','Duration')\n</code></pre>\n\n<p>I am trying to run it for a week now and whenever i hit <kbd>F5</kbd> to run it i get this error:</p>\n\n<pre><code>Traceback (most recent call last):\n File \"C:\\pysec-master\\pysec\\example.py\", line 8, in &lt;module&gt;\n from pysec.models import *\n File \"C:\\pysec-master\\pysec\\models.py\", line 4, in &lt;module&gt;\n from django.db import models\n File \"C:\\Python27\\lib\\site-packages\\django\\db\\models\\__init__.py\", line 5, in &lt;module&gt;\n from django.db.models.query import Q\n File \"C:\\Python27\\lib\\site-packages\\django\\db\\models\\query.py\", line 17, in &lt;module&gt;\n from django.db.models.deletion import Collector\n File \"C:\\Python27\\lib\\site-packages\\django\\db\\models\\deletion.py\", line 4, in &lt;module&gt;\n from django.db.models import signals, sql\n File \"C:\\Python27\\lib\\site-packages\\django\\db\\models\\sql\\__init__.py\", line 4, in &lt;module&gt;\n from django.db.models.sql.subqueries import *\n File \"C:\\Python27\\lib\\site-packages\\django\\db\\models\\sql\\subqueries.py\", line 12, in &lt;module&gt;\n from django.db.models.sql.query import Query\n File \"C:\\Python27\\lib\\site-packages\\django\\db\\models\\sql\\query.py\", line 22, in &lt;module&gt;\n from django.db.models.sql import aggregates as base_aggregates_module\n File \"C:\\Python27\\lib\\site-packages\\django\\db\\models\\sql\\aggregates.py\", line 9, in &lt;module&gt;\n ordinal_aggregate_field = IntegerField()\n File \"C:\\Python27\\lib\\site-packages\\django\\db\\models\\fields\\__init__.py\", line 116, in __init__\n self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE\n File \"C:\\Python27\\lib\\site-packages\\django\\conf\\__init__.py\", line 54, in __getattr__\n self._setup(name)\n File \"C:\\Python27\\lib\\site-packages\\django\\conf\\__init__.py\", line 49, in _setup\n self._wrapped = Settings(settings_module)\n File \"C:\\Python27\\lib\\site-packages\\django\\conf\\__init__.py\", line 132, in __init__\n % (self.SETTINGS_MODULE, e)\nImportError: Could not import settings 'pysec-master.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named pysec-master.settings\n</code></pre>\n\n<p>If you need any other module from the projects please tell me and i will edit my question and put it in. The original files from the project are <a href=\"https://github.com/lukerosiak/pysec\" rel=\"nofollow\">here</a>.</p>\n\n<p>The project is named <code>pysec-master</code> and it is on this directory: <code>C:\\pysec-master</code></p>\n\n<p>The project is structured like this</p>\n\n<pre><code>C:\\pysec-master(file)\n|__C:\\pysec-master\\local_settings.py\n|__C:\\pysec-master\\manage.py\n|__C:\\pysec-master\\settings.py\n|__C:\\Python27\\pysec(file)\n |__C:\\pysec-master\\pysec\\__init__.py\n |__C:\\pysec-master\\pysec\\example.py\n |__C:\\pysec-master\\pysec\\models.py\n |__C:\\pysec-master\\pysec\\xbrl.py\n |__C:\\pysec-master\\pysec\\xbrl_fundamentals.py\n</code></pre>\n\n<p>My environment variables are:</p>\n\n<p><code>Path</code> --> <code>C:\\Python27;C:\\Python27\\Scripts;C:\\pysec-master</code></p>\n\n<p><code>PYTHONPATH</code> --> <code>C:\\pysec-master;C:\\;</code></p>\n\n<p>When i type <code>sys.path</code> i get</p>\n\n<pre><code>['C:\\\\Python27\\\\Lib\\\\idlelib', 'C:\\\\pysec-master', 'C:\\\\pysec-master\\\\pysec', \n\n'C:\\\\Windows\\\\system32\\\\python27.zip', 'C:\\\\Python27\\\\DLLs', 'C:\\\\Python27\\\\lib', \n\n'C:\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\Python27', \n\n'C:\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\pysec-master']\n</code></pre>\n\n<p>I have checked:</p>\n\n<ul>\n<li>The environmental variables to be in accord</li>\n<li>Set the <code>DJANGO_MODULE_SETTINGS</code></li>\n</ul>\n\n<p>So what is the problem and how can i fix it?</p>\n", "Lable": "No"}
{"QuestionId": 23249433, "AnswerCount": 1, "Tags": "<matlab>", "CreationDate": "2014-04-23T15:51:36.370", "AcceptedAnswerId": "23249509", "Title": "Matlab: about default value(s) returned by a matlab function with multiple return values?", "Body": "<p>To define a function with multiple return values it should be like </p>\n\n<pre><code>function [x, y] = name_function(a, b, c) \n</code></pre>\n\n<p>So when I call the function, normally I will use</p>\n\n<pre><code>[x, y] = name_function(a, b, c) \n</code></pre>\n\n<p>But what if I used</p>\n\n<pre><code>z = name_function(a, b, c) \n</code></pre>\n\n<p>What would z be?\nI tried and it is x got returned. So I think if I use the grammar like this, it will always get the first return value, am I right? Any reference?</p>\n\n<p>It seems not like that. Because</p>\n\n<pre><code>d = eig(A)\n[V,D] = eig(A)\n</code></pre>\n\n<p>How can I know how to make sure about this when I define a function in Matlab?</p>\n", "Lable": "No"}
{"QuestionId": 23271209, "AnswerCount": 1, "Tags": "<php><html><forms>", "CreationDate": "2014-04-24T14:03:02.013", "AcceptedAnswerId": null, "Title": "Fetching data off a page, from a form", "Body": "<p>I'm trying to add this (www.dha.gov.za/status/index.php) to my page. I want a form to post to the page and then print the result on my page, with out any redirecting.\nThe form is pretty simple:</p>\n\n<pre><code>&lt;form action=\"http://www.dha.gov.za/status/index.php\" method=\"POST\"&gt;\n&lt;label&gt;ENTER ID Number &lt;/label&gt;&lt;br /&gt;\n&lt;INPUT NAME=\"id\" TYPE=\"text\" MAXLENGTH=13 SIZE=13 style=\"font-size:32px;\" /&gt;\n&lt;INPUT TYPE=submit NAME=\"vstatus\" VALUE=\"ID Application\" &gt;\n&lt;INPUT TYPE=submit NAME=\"vstatus\" VALUE=\"Passport Application\" &gt;\n&lt;INPUT TYPE=submit NAME=\"vstatus\" VALUE=\"Marital\"&gt;\n&lt;INPUT TYPE=submit NAME=\"vstatus\" VALUE=\"Alive or Deceased\"&gt;\n&lt;INPUT TYPE=submit NAME=\"vstatus\" VALUE=\"ID Duplicate\"&gt;\n&lt;INPUT TYPE=submit NAME=\"vstatus\" VALUE=\"Permit Application\"&gt;\n&lt;/form&gt;\n</code></pre>\n\n<p>For example if I type in my ID number and click \"Marital\", I get redirected to a page which says \"MARRIAGE STATUS = SINGLE\", I want to stay on the same page as the form, and display this and all the other possible \"Submit\" buttons, Passport application, ID application etc.</p>\n\n<p>I CANNOT see the PHP portion of the file (www.dha.gov.za/status/index.php) or its contents, I can just see the output of POSTing to it. It is this output that I want to display.</p>\n", "Lable": "No"}
{"QuestionId": 23363399, "AnswerCount": 3, "Tags": "<c><performance><algorithm><math>", "CreationDate": "2014-04-29T11:28:46.300", "AcceptedAnswerId": "23364295", "Title": "Randomly sample an array with a fixed number of zeros", "Body": "<p>I have optimized code to randomly sample an array containing -1s, 0s and 1s with probabilities 1/4,1/2,1/4. It looks like</p>\n\n<pre><code>#define n (12)\nunsigned int x,y=34353,z=57768,w=1564; //PRNG seeds\n/* xorshift PRNG\n * Taken from https://en.wikipedia.org/wiki/Xorshift#Example_implementation\n * Used under CC-By-SA */\nu_int32_myRand() {\n unsigned int t;\n t = x ^ (x &lt;&lt; 11);\n x = y; y = z; z = w;\n return w = w ^ (w &gt;&gt; 19) ^ t ^ (t &gt;&gt; 8);\n}\n\nx=(int)time(NULL); //seed PRNG\nunsigned int k\nint F[n];\nfor(k=0; k&lt;n; k++) {\n F[k]=(1-(myRand()&amp;3))%2; \n }\n</code></pre>\n\n<p>How can I modify this so that it only returns arrays that have exactly n/3 zeros in them and still have it fast?</p>\n", "Lable": "No"}
{"QuestionId": 23377773, "AnswerCount": 1, "Tags": "<c#><visual-studio-2013><publish-profiles>", "CreationDate": "2014-04-30T00:43:46.620", "AcceptedAnswerId": null, "Title": "Visual Studio 2013 Publish Profiles saving inconsistently", "Body": "<p>When I modify an existing publish profile, Visual Studio 2013 Update 1 does not always save the corresponding pubxml file in the /Properties folder. I'm playing a constant game of modifying files until my changes are registered correctly in the file system.</p>\n\n<p>For example, one publish profile that I edited and \"saved\" using the prompt has its pubxml file marked as delete. I suspect the profiles are cached and Visual Studio 2013 is not reflecting what's in the file system in real time.</p>\n\n<p>The save prompt only shows up when I go to another profile or hit the publish button. It would be nice to have a save button that would force the pubxml files to show the latest.</p>\n\n<p>Does anyone have a clear workaround this? I had a similar experience with web.config transformation in the same project and ended up editing the project file.</p>\n\n<p>I'm certain this is not bound to the specific project I am currently dealing with as I see the same behavior in other projects. I never had this issue in Visual Studio 2010.</p>\n\n<p>You'll not see this issue if you have just created new profiles. I am only seeing this behavior when I modify the existing profiles.</p>\n", "Lable": "No"}