elasticlunr
Version:
Lightweight full-text search engine in Javascript for browser search and offline search.
702 lines (701 loc) • 205 kB
JSON
{
"total": 105507,
"page": 1,
"pagesize": 100,
"questions": [
{
"tags": [
"javascript",
"jquery",
"html"
],
"answer_count": 0,
"favorite_count": 0,
"question_timeline_url": "/questions/6414827/timeline",
"question_comments_url": "/questions/6414827/comments",
"question_answers_url": "/questions/6414827/answers",
"question_id": 6414827,
"owner": {
"user_id": 807067,
"user_type": "unregistered",
"display_name": "Barcino",
"reputation": 1,
"email_hash": "a4aec9f48b0281995da5b2223b3ac213"
},
"creation_date": 1308589530,
"last_activity_date": 1308589530,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 6,
"score": 0,
"community_owned": false,
"title": "Why does my checkbox return the wrong state?",
"body": "<p>I'm really confused. I have the following:</p>\n\n<pre><code><input class=\"check-box\" \n id=\"Data__Correct\" \n name=\"Data.Correct\" \n type=\"checkbox\" value=\"Data.Correct\" />\n</code></pre>\n\n<p>When I put a check in the checkbox and check with fiddler I see it's sending back:</p>\n\n<pre><code>Data.Correct False\n</code></pre>\n\n<p>I thought it should be the other way around. What's happening?</p>\n"
},
{
"tags": [
"php",
"javascript",
"jquery",
"html",
"div"
],
"answer_count": 2,
"accepted_answer_id": 6414808,
"favorite_count": 1,
"question_timeline_url": "/questions/6414614/timeline",
"question_comments_url": "/questions/6414614/comments",
"question_answers_url": "/questions/6414614/answers",
"question_id": 6414614,
"owner": {
"user_id": 798662,
"user_type": "registered",
"display_name": "Eric",
"reputation": 161,
"email_hash": "25601fc3740f83926598cc89dc604e5f"
},
"creation_date": 1308588228,
"last_edit_date": 1308589468,
"last_activity_date": 1308589468,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 31,
"score": 0,
"community_owned": false,
"title": "Fairly easy JQuery Input Selection location problem",
"body": "<p>I am having a problem with getting my JQuery javascript code to apply to the select box elements that it is supposed to. What's happening is that the select boxes are not following the actions that are specified in the javascript code. They are simply staying disabled and checked (see code below) instead of changing based on the first checkbox's selection.</p>\n\n<p>I believe it is a problem regarding how I specify the location of the select boxes in the javascript code, but I don't know how to go about fixing it. Then again, I could be wrong about that too.</p>\n\n<p>If you have any insight on this or can correct the code, please do! Cheers.</p>\n\n<hr>\n\n<h2>HTML:</h2>\n\n<pre><code><div class=\"medium_box\">\n <form name=\"searchform\" class=\"FECKsearch\" method=\"get\" onSubmit=\"return dosearch();\">\n <input name=\"s\" id=\"searchBox\" class=\"input\" type=\"text\" value=\"\" onfocus=\"myFocusHandler(this);\" onblur=\"myBlurHandler(this);\" size=\"18\" maxlength=\"50\">\n <input type=\"submit\" name=\"searchsubmit\" class=\"button\" value=\"Go\" />\n\n <span class=\"searcher\">International: <input type=\"checkbox\" id=\"International\" checked=\"yes\"></input></span>\n <span class=\"searcher1\">Americas: <input type=\"checkbox\" id=\"Americas\" disabled checked=\"yes\"></input></span>\n <span class=\"searcher1\">Europe: <input type=\"checkbox\" id=\"Europe\" disabled checked=\"yes\"></input></span>\n Asia: <input type=\"checkbox\" id=\"Asia\" disabled checked=\"yes\"></input>\n </form> \n</div>\n</code></pre>\n\n<h2>Javascript:</h2>\n\n<pre><code>$('#International').click(function() {\nvar paramChangeBoxes = $('input:checkbox');\nif ($(this).is(':checked')) {\n $('#Americas').attr('checked', 'checked');\n $('#Americas').attr('disabled', 'disabled');\n $('#Europe').attr('checked', 'checked');\n $('#Europe').attr('disabled', 'disabled');\n $('#Asia').attr('checked', 'checked');\n $('#Asia').attr('disabled', 'disabled');\n}\nelse {\n paramChangeBoxes.removeAttr('disabled');\n $('#Americas').removeAttr('disabled');\n $('#Europe').removeAttr('disabled');\n $('#Asia').removeAttr('disabled');\n\n }\n});\n</code></pre>\n\n<hr>\n\n<h1>Update & Solution:</h1>\n\n<p>Cheers to <a href=\"http://stackoverflow.com/users/763228/john\">John</a> for the code <code>$('#International').live(\"click\",function() {</code> which corrected the error of the JQuery code not functioning. Apparently if you are importing the code from a remote file you must include the \"live\" portion inside of your coding.</p>\n\n<p>Thanks again John!</p>\n"
},
{
"tags": [
"javascript",
"jquery",
"html",
"file-upload"
],
"answer_count": 2,
"favorite_count": 0,
"bounty_closes_date": 1308660760,
"bounty_amount": 50,
"question_timeline_url": "/questions/6296451/timeline",
"question_comments_url": "/questions/6296451/comments",
"question_answers_url": "/questions/6296451/answers",
"question_id": 6296451,
"owner": {
"user_id": 393751,
"user_type": "registered",
"display_name": "ibhbuhbuhb",
"reputation": 92,
"email_hash": "2a06a2827b2baa70da6c7ac35acfcb5e"
},
"creation_date": 1307638388,
"last_edit_date": 1308056144,
"last_activity_date": 1308589363,
"up_vote_count": 7,
"down_vote_count": 0,
"view_count": 212,
"score": 7,
"community_owned": false,
"title": "problem in file upload",
"body": "<p>I have the following markup:</p>\n\n<pre><code> <select multiple=\"multiple\" id=\"targetFilesList\" style=\"width:200px;height:110px;\">\n </select>\n <input type=\"button\" value=\"Get\" id=\"btnGet\" />\n</code></pre>\n\n<p>and following javascript:</p>\n\n<pre><code> $(function()\n {\n $('#btnGet').click(function()\n {\n var fileupload = $(\"<input type='file' name='filetoupload' style='visibility:hidden;'/>\");\n $('body').append(fileupload);\n\n fileupload[0].onchange = function()\n {\n $('#targetFilesList').append('<option >' + fileupload.val() + '</option>');\n return false;\n }\n fileupload.click();\n });\n });\n</code></pre>\n\n<p>Scenario is that i have to upload multiple files and once user has chosen the file to be uploaded i have to show the file name to user.Then,on submitting the form i will upload all the files.For this,on clicking the get button i am adding a fileupload control dynamically\nand initialise onchange event of the fileupload control just added. The problem in chrome 12 on clicking get button fileupload control does not get opened but in firefox4 and ie8 it is working.\nAny idea why?</p>\n"
},
{
"tags": [
"php",
"javascript",
"facebook",
"twitter",
"share"
],
"answer_count": 0,
"favorite_count": 0,
"question_timeline_url": "/questions/6414782/timeline",
"question_comments_url": "/questions/6414782/comments",
"question_answers_url": "/questions/6414782/answers",
"question_id": 6414782,
"owner": {
"user_id": 807063,
"user_type": "unregistered",
"display_name": "ponens",
"reputation": 6,
"email_hash": "28f14a601696f114e84c5be712032c73"
},
"creation_date": 1308589336,
"last_activity_date": 1308589336,
"up_vote_count": 1,
"down_vote_count": 0,
"view_count": 3,
"score": 1,
"community_owned": false,
"title": "Provide link/Redirect after a 'Like' or 'Share' on Facebook or a 'Share' on Twitter",
"body": "<p>basically what I want to do is forward people to a download link once they either 'like' my page on Facebook or post a link of the page to their profile (whatever is easier) and something similar for Twitter.</p>\n\n<p>I have seen some bands do this when promoting a free download — to download the new song you must post this to your profile etc.</p>\n\n<p>Anybody know how I could go about this? (This isn't a 'can you do it for me' question, I just need a point in the right direction regarding API's or any examples) </p>\n\n<p>Thanks.</p>\n"
},
{
"tags": [
"javascript",
"jquery"
],
"answer_count": 8,
"accepted_answer_id": 6412781,
"favorite_count": 0,
"question_timeline_url": "/questions/6412607/timeline",
"question_comments_url": "/questions/6412607/comments",
"question_answers_url": "/questions/6412607/answers",
"question_id": 6412607,
"owner": {
"user_id": 256439,
"user_type": "registered",
"display_name": "Sandra Schlichting",
"reputation": 1327,
"email_hash": "c4b17df9c9b2f33a96eb84f92054f708"
},
"creation_date": 1308579341,
"last_edit_date": 1308586824,
"last_activity_date": 1308589242,
"up_vote_count": 2,
"down_vote_count": 0,
"view_count": 67,
"score": 2,
"community_owned": false,
"title": "Passing argument to function. What's wrong?",
"body": "<p>In this <a href=\"http://jsfiddle.net/littlesandra88/EcCTx/\" rel=\"nofollow\">jsFiddle</a></p>\n\n<p>am I trying to pass an argument to a function, but it doesn't receive the argument or it isn't executed.</p>\n\n<pre><code><a href=\"javascript:addRemove('7249');\">Details</a>\n</code></pre>\n\n<p>JQuery</p>\n\n<pre><code>$(document).ready(function() {\n\n function addRemove(u) {\n alert(u);\n }\n\n});\n</code></pre>\n\n<p>Any ideas what's wrong and how to fix it?</p>\n"
},
{
"tags": [
"c#",
"javascript",
"matlab"
],
"answer_count": 0,
"favorite_count": 0,
"question_timeline_url": "/questions/6414755/timeline",
"question_comments_url": "/questions/6414755/comments",
"question_answers_url": "/questions/6414755/answers",
"question_id": 6414755,
"owner": {
"user_id": 662770,
"user_type": "registered",
"display_name": "shahar_m",
"reputation": 291,
"email_hash": "4590affff8ab7bda7cbc2a3d766f02bd"
},
"creation_date": 1308589121,
"last_activity_date": 1308589121,
"up_vote_count": 1,
"down_vote_count": 0,
"view_count": 9,
"score": 1,
"community_owned": false,
"title": "Convert Matlab Fuzzy Logic toolbox fis file to c# / c++ / javascript",
"body": "<p>I have a Matlab program that is partially relies on Matlab's Fuzzy logic toolbox, which I want to convert to c# program (and later on to objective-c, but let's keep this for later).\nIs ther any means to convert my fuzzy logic fis file into c# (or c++, or maybe even javascript)?</p>\n\n<p>P.S. I know the <code>deploytool</code> can convert my program to exe, but I don't want to rely on <code>matlab runtime</code> component and dlls but to make it a complete c# (or c++) program.</p>\n"
},
{
"tags": [
"javascript",
"html5",
"browser",
"cross-browser"
],
"answer_count": 2,
"accepted_answer_id": 5560986,
"favorite_count": 3,
"question_timeline_url": "/questions/5306132/timeline",
"question_comments_url": "/questions/5306132/comments",
"question_answers_url": "/questions/5306132/answers",
"question_id": 5306132,
"owner": {
"user_id": 471795,
"user_type": "registered",
"display_name": "kanaka",
"reputation": 3994,
"email_hash": "b2bd81c28bcafeea19ac72e554859ec0"
},
"creation_date": 1300148053,
"last_edit_date": 1308589105,
"last_activity_date": 1308589105,
"up_vote_count": 6,
"down_vote_count": 0,
"view_count": 274,
"score": 6,
"community_owned": false,
"title": "Translate Javascript keyCode into charCode for non-U.S. keyboard layout (i.e. azerty)",
"body": "<p>Quick background:</p>\n\n<ul>\n<li>when a key is pressed in a browser, three events are generated: <strong>keyDown</strong>, <strong>keyPress</strong> and <strong>keyUp</strong>.</li>\n<li><strong>keyDown</strong> and <strong>keyUp</strong> have a <strong>keyCode</strong> property which is approximately the physical key pressed.</li>\n<li><strong>keyPress</strong> also has <strong>charCode</strong> property set which takes into account modifier keys and keyboard layout (A and a have same keyCode but a different charCode).</li>\n<li>all three events have properties that indicate which modifier keys were pressed during those events.</li>\n</ul>\n\n<p>I'm the main <a href=\"https://github.com/kanaka/noVNC\" rel=\"nofollow\">noVNC</a> developer and I have a tough problem: noVNC needs the translated <strong>charCode</strong> value without using the <strong>keyPress</strong> event for the following reasons:</p>\n\n<ul>\n<li>noVNC needs to send the keyDown and keyUp events separately to the VNC server (otherwise it's not a completely functional VNC client).</li>\n<li>more importantly, noVNC needs to prevent the default keyboard actions while connected which means calling the <strong>preventDefault()</strong> method of the <strong>keyDown</strong> event. This has the side-effect of also preventing the <strong>keyPress</strong> event from firing.</li>\n</ul>\n\n<p>Due to differences in keyboard layouts (i.e. different keyCode to charCode mappings) I've determine that noVNC will need a lookup table for different keyboard layouts.</p>\n\n<p><strong>But here is the real problem:</strong> on alternate layouts, some different physical keys have the <strong>SAME</strong> keyCode. For example, with an <strong>azerty</strong> (French) keyboard layout the '-' (dash) and '_' underscore keys both generate keyCode 189. Ack!!!</p>\n\n<p>So ... how do I get proper keyCode to charCode mapping and prevent default browser actions at the same time?</p>\n\n<p>BTW, I suspect the solution to this will be applicable to other interactive web applications and HTML5 games since you often want to be able to know full information about the key pressed without triggering any additional browser response to that keypress.</p>\n\n<p>Useful links:</p>\n\n<ul>\n<li><a href=\"http://kanaka.github.com/noVNC/noVNC/tests/keyboard.html\" rel=\"nofollow\">Here</a> is an useful test page that show the three events and some other useful properties.</li>\n<li><a href=\"http://unixpapa.com/js/key.html\" rel=\"nofollow\">Summary</a> of the crazy state of key events in Javascript (thanks @Tim)</li>\n<li>Quirksmode <a href=\"http://www.quirksmode.org/js/keys.html\" rel=\"nofollow\">Detecting keystrokes</a></li>\n<li>Quirksmode <a href=\"http://www.quirksmode.org/dom/events/tests/keys.html\" rel=\"nofollow\">Events - key events</a></li>\n<li><a href=\"https://github.com/kanaka/noVNC/issues/#issue/21\" rel=\"nofollow\">noVNC issue</a> with more discussion of the problem.</li>\n</ul>\n\n<p><strong>Solution</strong>: see my post below.</p>\n"
},
{
"tags": [
"javascript",
"ruby-on-rails"
],
"answer_count": 1,
"favorite_count": 0,
"question_timeline_url": "/questions/6413951/timeline",
"question_comments_url": "/questions/6413951/comments",
"question_answers_url": "/questions/6413951/answers",
"question_id": 6413951,
"owner": {
"user_id": 51382,
"user_type": "registered",
"display_name": "willcodejavaforfood",
"reputation": 12699,
"email_hash": "d5c948086776fc91b4c7abff56bb7672"
},
"creation_date": 1308584996,
"last_activity_date": 1308588759,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 17,
"score": 0,
"community_owned": false,
"title": "How do I update my model object before a create/update?",
"body": "<p>It's me the big rails newbie. I have another problem.</p>\n\n<p>This is my partial for _care_point.html.erb</p>\n\n<pre><code><div id='<%=dom_id(care_point) %>' class='draggable node_chin'>\n <div id=<%=\"node_#{care_point.id}\" %> class='node'><%= care_point.body %>\n </div>\n <textarea class='node_input'><%= care_point.body %></textarea>\n <%= link_to 'Close', [care_map, care_point], :method => :post, :remote => true, :class => 'close' %>\n <%= link_to 'Delete', [care_map, care_point], :confirm => \"Are you sure?\", :method => :delete, :remote => true, :class => 'delete' %>\n</div>\n</code></pre>\n\n<p>When I click the Close link the request is sent to the server as expected. All the fields are null though. How do I make sure that my model object is kept updated before it is sent to the server? Do I have to use the form functionality or can I just update it with Javascript somehow?</p>\n\n<p>Cheers</p>\n"
},
{
"tags": [
"javascript",
"jquery",
"ajax",
"jquery-ajax"
],
"answer_count": 1,
"favorite_count": 0,
"question_timeline_url": "/questions/6414530/timeline",
"question_comments_url": "/questions/6414530/comments",
"question_answers_url": "/questions/6414530/answers",
"question_id": 6414530,
"owner": {
"user_id": 484082,
"user_type": "registered",
"display_name": "blasteralfred",
"reputation": 505,
"email_hash": "cd867e89325fe74445707fb6b4364be8"
},
"creation_date": 1308587719,
"last_edit_date": 1308588455,
"last_activity_date": 1308588636,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 45,
"score": 0,
"community_owned": false,
"title": "Change background using Javascript - AJAX - jQuery",
"body": "<p>I have a table as below;</p>\n\n<pre><code><table style=\"width: 100%; border: solid 1px #666600; min-width: 800px\" cellpadding=\"0\" cellspacing=\"0\">\n<tr>\n<td id=\"aaa\">&nbsp;</td>\n<td class=\"content\" >&nbsp;</td>\n<td class=\"content\" >&nbsp;</td>\n<td class=\"content\" >&nbsp;</td>\n<td class=\"content\" >&nbsp;</td>\n<td class=\"content\" >&nbsp;</td>\n<td class=\"content\" >&nbsp;</td>\n<td id=\"bbb\">&nbsp;</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n<td class=\"title\" >&nbsp;</td>\n<td class=\"title\" >&nbsp;</td>\n<td class=\"title\" >&nbsp;</td>\n<td class=\"title\" >&nbsp;</td>\n<td class=\"title\" >&nbsp;</td>\n<td class=\"title\" >&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n</table>\n</code></pre>\n\n<p>I am using jquery ajax and i have script as below;</p>\n\n<pre><code>$(document).ready( function() {\nvar i = 1;\n$.ajax({\n type: 'POST',\n url: 'ajax.php',\n data: 'id=' + i,\n dataType: 'json',\n cache: false,\n success: function(result) {\n $('.title').each(function(index){\n values = result[index].split('*');\n indexa = values[0];\n indexb = values[1];\n if((result[index])){\n $(this).html(indexb);\n }else{\n $(this).html(\"&nbsp;\");\n }\n });\n },\n });\n});\n</code></pre>\n\n<p>The php file will return <code>[\"data1*abc\",\"data2*abc\",\"data3*abc\",\"data4*abc\",\"data5*abc\",\"data6*abc\"]</code> for i=1, <code>[\"data7*abc\",\"data8*abc\",\"data9*abc\",\"data10*abc\",\"data11*abc\",\"data12*abc\"]</code> for i=2 etc etc.. The text in <code>class=\"title\"</code> changes accordingly with respect to the data, as <code>abc</code> or whatever it is..</p>\n\n<p>You can see another cell above every title cell having <code>class=\"content\"</code>. I have a php file, <code>ajax2.php</code>, which will return an image name with respect to a <code>$_POST[\"data1\"]</code> and <code>$_POST[\"data2\"]</code>. The <code>$_POST[\"data1\"]</code> portion should have value <code>indexa</code> and <code>$_POST[\"data2\"]</code> portion should have value <code>indexb</code> from javascript for each ajax request. The images are placed in images folder and the data returned by php file will be only <code>image_name.extension</code>.</p>\n\n<p>In short, I want to change the background image of content cell above title cell to change when data / text in corresponding title cell changes. Anybody tell me how to do the AJAX request and change background image (change background image url).</p>\n\n<p>I think it will be something like;</p>\n\n<p><code>$(.content).css({ 'background-image':'url(images/' + imagename });</code></p>\n\n<p>You can see my fiddle <a href=\"http://jsfiddle.net/blasteralfred/BFht7/\" rel=\"nofollow\"><strong>here</strong></a></p>\n\n<p>Thanks in advance..</p>\n"
},
{
"tags": [
"javascript"
],
"answer_count": 3,
"accepted_answer_id": 4047114,
"favorite_count": 0,
"question_timeline_url": "/questions/4047072/timeline",
"question_comments_url": "/questions/4047072/comments",
"question_answers_url": "/questions/4047072/answers",
"question_id": 4047072,
"owner": {
"user_id": 457827,
"user_type": "registered",
"display_name": "Johnson",
"reputation": 304,
"email_hash": "1ce4f00aae1dbed39c2899dbd85e4169"
},
"creation_date": 1288299036,
"last_activity_date": 1308588573,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 70,
"score": 0,
"community_owned": false,
"title": "JS: setInterval and blur.",
"body": "<p>I have this:</p>\n\n<pre><code>$(window).blur(function() {\n setInterval(function() {\n $.ajax({\n type: \"POST\",\n url: \"imback.php\",\n data: {\n mode: 'ajax',\n getUpdates: 'auto',\n },\n success: function(msg){\n document.title = msg + titleOrig;\n }\n });\n }, 35000);\n</code></pre>\n\n<p>Works fine.</p>\n\n<p>Although, if you have been blur, and then when you focus back, it will keep making the ajax call, it doesnt stop sending ajax call after interval 35 seconds. </p>\n\n<p>How can i fix this?\n })</p>\n"
},
{
"tags": [
"javascript",
"xml"
],
"answer_count": 2,
"favorite_count": 0,
"question_timeline_url": "/questions/4272538/timeline",
"question_comments_url": "/questions/4272538/comments",
"question_answers_url": "/questions/4272538/answers",
"question_id": 4272538,
"owner": {
"user_id": 519506,
"user_type": "unregistered",
"display_name": "Erin",
"reputation": 6,
"email_hash": "dcc375d4184c9ce18bedc0db1391cb2f"
},
"creation_date": 1290641828,
"last_edit_date": 1308588407,
"last_activity_date": 1308588407,
"up_vote_count": 1,
"down_vote_count": 0,
"view_count": 398,
"score": 1,
"community_owned": false,
"title": "How can I parse XML in javascript in both IE and firefox?",
"body": "<p>I'm trying to write a single piece of code to parse javascript in both IE and firefox.</p>\n\n<p>The following works in IE, and functions without complaining in firefox</p>\n\n<pre><code>function XmlDom(sXml){\n var oXml;\n if (window.ActiveXObject) {\n // ie\n oXml = new ActiveXObject(\"Microsoft.XMLDOM\");\n oXml.resolveExternals = false;\n oXml.async = false;\n oXml.loadXML(sXml);\n }\n else if (window.DOMParser){\n\n var parser = new DOMParser(); \n oXml = parser.parseFromString(sXml, \"text/xml\");\n\n }\nreturn oXml\n}\n</code></pre>\n\n<p>The following works in IE, but gives errors (because childNodes doesn't exist) under Firefox</p>\n\n<pre><code>var oXml = XmlDom(sourceXML);\nvar listHtml = \"\";\nif (oXml.firstChild != null) {\n var childNodes = null;\n try {\n childNodes = oXml.lastChild.lastChild.firstChild.childNodes;\n }\n if (childNodes != null && childNodes.length > 0) {\n\n for (var i = 0; i < childNodes.length; i++) {\n\n var vehicleName = NodeText(SelectSingleNode(childNodes[i], 'VehicleName', 'VehicleName'));\n var vehicleId = NodeText(SelectSingleNode(childNodes[i], 'VehicleId', 'VehicleId'));\n\n }\n }\n}\n</code></pre>\n\n<p>Using jquery gives me correct behavior under firefox, but doesn't quite work in IE (it finds the correct number of vehicles, but each one has a null id and name)</p>\n\n<pre><code> $(sourceXml).find(\"Table1\").each(function() {\n var vehicleId = $(this).find(\"VehicleId\").text();\n var vehicleName = $(this).find(\"VehicleName\").text();\n });\n</code></pre>\n\n<p>I firmly believe that both these approaches <em>should</em> work. But something is going wrong. I'd love a hand.</p>\n\n<pre><code><?xml version=\"1.0\" encoding=\"utf-16\"?>\n<DataSet>\n <xs:schema id=\"NewDataSet\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:msprop=\"urn:schemas-microsoft-com:xml-msprop\">\n <xs:element name=\"NewDataSet\" msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\">\n <xs:complexType>\n <xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\">\n <xs:element name=\"Table1\">\n <xs:complexType>\n <xs:sequence>\n <xs:element name=\"VehicleId\" msprop:metadatacolumnname=\"VehicleId\" msprop:caption=\"VehicleId\" type=\"xs:string\" minOccurs=\"0\" />\n <xs:element name=\"VehicleName\" msprop:metadatacolumnname=\"VehicleName\" msprop:caption=\"VehicleName\" type=\"xs:string\" minOccurs=\"0\" />\n <xs:element name=\"SendAlarms\" msprop:metadatacolumnname=\"SendAlarms\" msprop:caption=\"SendAlarms\" type=\"xs:string\" minOccurs=\"0\" />\n </xs:sequence>\n </xs:complexType>\n </xs:element>\n </xs:choice>\n </xs:complexType>\n </xs:element>\n </xs:schema>\n <diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\">\n<NewDataSet>\n <Table1 diffgr:id=\"Table11\" msdata:rowOrder=\"0\" diffgr:hasChanges=\"inserted\">\n <VehicleId>8</VehicleId>\n <VehicleName>AIS Gate</VehicleName>\n <SendAlarms>False</SendAlarms>\n </Table1>\n <Table1 diffgr:id=\"Table12\" msdata:rowOrder=\"1\" diffgr:hasChanges=\"inserted\">\n <VehicleId>82</VehicleId>\n <VehicleName>Amigos</VehicleName>\n <SendAlarms>False</SendAlarms>\n </Table1> \n</NewDataSet>\n</diffgr:diffgram>\n</DataSet>\n</code></pre>\n"
},
{
"tags": [
"javascript",
"json",
"apple",
"dashcode"
],
"answer_count": 0,
"favorite_count": 0,
"question_timeline_url": "/questions/6414613/timeline",
"question_comments_url": "/questions/6414613/comments",
"question_answers_url": "/questions/6414613/answers",
"question_id": 6414613,
"owner": {
"user_id": 706742,
"user_type": "registered",
"display_name": "Nero F. RoxXx",
"reputation": 8,
"email_hash": "bc2da610ac397822eeb3405b7718a9d9"
},
"creation_date": 1308588222,
"last_activity_date": 1308588222,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 2,
"score": 0,
"community_owned": false,
"title": "Using Dashcode's List Controller without their DataSource option",
"body": "<p>I'm working on my own custom google calendar, so far i'm able to get everything to work, i've loaded all the data and everything works great, each event shows up on a select box.</p>\n\n<p>What i want to do now is to load each event name on the LIST part. How exactly can i do that? i'm very lost with it.</p>\n\n<p>I looked at the sample code that dashcode has for the list part but i really am lost with populating the list in real time, can somebody help me? i can provide more info as needed, thanks!</p>\n"
},
{
"tags": [
"javascript",
"google-maps",
"marker"
],
"answer_count": 1,
"favorite_count": 0,
"question_timeline_url": "/questions/6413244/timeline",
"question_comments_url": "/questions/6413244/comments",
"question_answers_url": "/questions/6413244/answers",
"question_id": 6413244,
"owner": {
"user_id": 365251,
"user_type": "registered",
"display_name": "markzzz",
"reputation": 1345,
"email_hash": "586ed1e5c3543cf7c304861c1240efdf"
},
"creation_date": 1308581995,
"last_edit_date": 1308583496,
"last_activity_date": 1308588085,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 16,
"score": 0,
"community_owned": false,
"title": "How to set the google-maps marker as it is showed on the original website",
"body": "<p>Try to Search the first address on google maps, and click on it :</p>\n\n<p>it will show us a marker with a photo (if avaiable), description, and some links.\nI'd like to add the same marker in my web application.</p>\n\n<p>Which API I need to use? At the moment I just make my own string and append it :</p>\n\n<pre><code>var finestra='';\nfinestra += '<div style=\"position:relative;width:200px;\">';\nfinestra += '<div style=\"position:relative;float:left; color:#000000;\" class=canale>';\nfinestra += 'Archimede<br />Via Brennero,12<br />38100 Trento(TN)<br />c.+39 555555555';\nfinestra += '</div>';\nfinestra += '</div>';\n\nvar marker = createMarker(map.getCenter());\nmap.setCenter(new GLatLng(46.084989,11.118851), 16, G_NORMAL_MAP);\nmap.addOverlay(marker);\nmarker.openInfoWindowHtml(finestra); \n</code></pre>\n\n<p>But I need the same marker as google maps show on the original website.\nIs it possible?</p>\n"
},
{
"tags": [
"javascript",
"jquery",
"internet",
"internet-explorer-9",
"explorer"
],
"answer_count": 0,
"favorite_count": 1,
"question_timeline_url": "/questions/6414578/timeline",
"question_comments_url": "/questions/6414578/comments",
"question_answers_url": "/questions/6414578/answers",
"question_id": 6414578,
"owner": {
"user_id": 807033,
"user_type": "unregistered",
"display_name": "Mario",
"reputation": 1,
"email_hash": "15116221263b5450dd8abff3cc7a8ea9"
},
"creation_date": 1308588053,
"last_activity_date": 1308588053,
"up_vote_count": 0,
"down_vote_count": 1,
"view_count": 14,
"score": -1,
"community_owned": false,
"title": "Javascript slider not showing in IE9",
"body": "<p>We have an automatic slider on this website, <a href=\"http://www.realcapfinancial.com\" rel=\"nofollow\">http://www.realcapfinancial.com</a> and it has been working on all browsers. IE9 doesnt seem to work. It comes up with and error, no object line 298... character 2 etc. I forget what it says but I can't check it again since I'm at work using a mac.</p>\n\n<p>Any help is perfect, thank you</p>\n"
},
{
"tags": [
"javascript",
"node.js",
"socket.io",
"nowjs"
],
"answer_count": 2,
"favorite_count": 0,
"question_timeline_url": "/questions/6409944/timeline",
"question_comments_url": "/questions/6409944/comments",
"question_answers_url": "/questions/6409944/answers",
"question_id": 6409944,
"owner": {
"user_id": 578963,
"user_type": "registered",
"display_name": "DasAntonym",
"reputation": 53,
"email_hash": "90d33a04aa3d2ba5230831650d449714"
},
"creation_date": 1308566372,
"last_activity_date": 1308588014,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 21,
"score": 0,
"community_owned": false,
"title": "NowJS manually initiating a new connection after a lost connection",
"body": "<p>i have a case where clients connect to a node.js server running nowjs and remain connected for a fairly long time (about 30 minutes). on some browsers though the connection gets dropped after a while and the client disconnects.</p>\n\n<p>i implemented a disconnect handler on the client side like this:</p>\n\n<pre><code>now.core.on('disconnect', function () {\n // we should reconnect here, maybe after a short timeout\n});\n</code></pre>\n\n<p>what i am unclear about is how exactly to trigger a reconnect. this might be something blatantly obvious to experienced users but i didn't manage to figure this out.</p>\n\n<p>the now.js script initializes on page load and after that i can use the now object, but i can't figure out how to repeat this process without reloading the page.</p>\n\n<p>thanks!</p>\n"
},
{
"tags": [
"javascript",
"regex",
"comma"
],
"answer_count": 1,
"favorite_count": 0,
"question_timeline_url": "/questions/6413444/timeline",
"question_comments_url": "/questions/6413444/comments",
"question_answers_url": "/questions/6413444/answers",
"question_id": 6413444,
"owner": {
"user_id": 806905,
"user_type": "unregistered",
"display_name": "Frederick Thompson",
"reputation": 11,
"email_hash": "5698d4707354e0b9e4ba6f22a0be84d8"
},
"creation_date": 1308582827,
"last_edit_date": 1308586491,
"last_activity_date": 1308587996,
"up_vote_count": 2,
"down_vote_count": 0,
"view_count": 61,
"score": 2,
"community_owned": false,
"title": "Regex Comma Separated Emails",
"body": "<p>I am trying to get this Regex statement to work</p>\n\n<p><code>^([_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})+(\\s?[,]\\s?|$))+$</code></p>\n\n<p>for a string of comma separated emails in a <code>textbox</code> using <code>jQuery('#textbox').val();</code> which passes the values into the Regex statement to find errors for a string like:</p>\n\n<p><code>\"test@test.com, test1@test.com,test2@test.com\"</code></p>\n\n<p>But for some reason it is returning an error. I tried running it through <a href=\"http://regexpal.com/\" rel=\"nofollow\">http://regexpal.com/</a> but i'm unsure ?</p>\n\n<p><strong>NB:</strong> This is just a basic client-side test. I validate emails via the <code>MailClass</code> on the server-side using .NET4.0 - so don't jump down my throat re-this. The aim here is to eliminate simple errors.</p>\n\n<p><strong>Escaped Version:</strong> </p>\n\n<p><code>^([_a-z0-9-]+(\\\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\\\.[a-z0-9-]+)*(\\\\.[a-z]{2,3})+(\\\\s?[,]\\\\s?|$))+$</code></p>\n"
},
{
"tags": [
"javascript",
"javascript-library"
],
"answer_count": 2,
"favorite_count": 0,
"question_timeline_url": "/questions/6414240/timeline",
"question_comments_url": "/questions/6414240/comments",
"question_answers_url": "/questions/6414240/answers",
"question_id": 6414240,
"owner": {
"user_id": 806937,
"user_type": "unregistered",
"display_name": "simplified.",
"reputation": 1,
"email_hash": "e30b781f0306f0b46f32b17733b8398d"
},
"creation_date": 1308586242,
"last_edit_date": 1308586843,
"last_activity_date": 1308587979,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 35,
"score": 0,
"community_owned": false,
"title": "Constant Variables in Javascript",
"body": "<p>I am trying to have some const global variables which I can use in the javascript and I came out with this code and picking up from some answers referred in SO. But it seems that I have a little mistake somewhere which I couldn't spot. Can someone help me with this?</p>\n\n<p>in testQuery.js</p>\n\n<pre><code>(function (window, undefined) {\n\n var testQuery = function(obj) {\n if (!(this instanceof testQuery)) {\n return new testQuery(obj);\n }\n }\n\n var MYGLOBALS = function() {\n var globals = {\n foo : \"bar\",\n batz : \"blah\" \n }\n\n return {\n getValue : function(s) {\n return globals[s];\n }\n }\n }();\n\n window.testQuery = testQuery;\n\n}) (window);\n</code></pre>\n\n<hr>\n\n<p>and in the html javascript tag i have this line of code.</p>\n\n<p>in testQuery.html file</p>\n\n<pre><code><html>\n <head>\n <script src=\"testQuery.js\"></script>\n <script>\n\n function onClick() {\n\n alert(MYGLOBALS.getValue(\"foo\"));\n }\n\n </script>\n </head>\n\n <body>\n\n <input type=\"button\" onclick=\"onClick()\">\n\n </body>\n\n</html>\n</code></pre>\n"
},
{
"tags": [
"javascript",
"internet-explorer-8",
"frame",
"hang",
"google-chrome-frame"
],
"answer_count": 0,
"favorite_count": 0,
"question_timeline_url": "/questions/6414558/timeline",
"question_comments_url": "/questions/6414558/comments",
"question_answers_url": "/questions/6414558/answers",
"question_id": 6414558,
"owner": {
"user_id": 467240,
"user_type": "registered",
"display_name": "mtyson",
"reputation": 40,
"email_hash": "acd22ce8d834f8548c4200bec5fe6c40"
},
"creation_date": 1308587934,
"last_activity_date": 1308587934,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 5,
"score": 0,
"community_owned": false,
"title": "In IE8 with Chrome Frame, after Download, App hangs",
"body": "<p>Here's a strange one. Throwing it out there to see if anyone has any thoughts.</p>\n\n<p>This problem only occurs with IE8 with Chrome Frame installed. However, some machines with IE8 and chrome frame do <em>not</em> have the problem.</p>\n\n<p>When a user downloads a file, the app stops responding (the file is successfully downloaded). Links still work, but all JS appears to be blocked. If the user re-loads the browser, the app works fine, and re-downloading (even the same file) no longer causes the app to hang.</p>\n\n<p>I should add that only a small number of users have this issue (so its definitely something in the app causing the problem). The problem seems to require: certain user, certain setup with IE8+chrome frame.</p>\n"
},
{
"tags": [
"java",
"javascript",
"xml",
"regex",
"parsing"
],
"answer_count": 5,
"accepted_answer_id": 3047464,
"favorite_count": 0,
"question_timeline_url": "/questions/3047391/timeline",
"question_comments_url": "/questions/3047391/comments",
"question_answers_url": "/questions/3047391/answers",
"question_id": 3047391,
"owner": {
"user_id": 107721,
"user_type": "registered",
"display_name": "wojtek_z",
"reputation": 20,
"email_hash": "45e2bb34105769aaae7dbf841b37da84"
},
"creation_date": 1276621727,
"last_activity_date": 1308587918,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 225,
"score": 0,
"community_owned": false,
"title": "Parsing complex string using regex",
"body": "<p>My regex skills are not very good and recently a new data element has thrown my parser into a loop</p>\n\n<p>Take the following string</p>\n\n<p>\"+USER=Bob Smith-GROUP=Admin+FUNCTION=Read/FUNCTION=Write\"</p>\n\n<p>Previously I had the following for my regex : [+\\\\-/]</p>\n\n<p>Which would turn the result into </p>\n\n<p>USER=Bob Smith<br>\nGROUP=Admin<br>\nFUNCTION=Read<br>\nFUNCTION=Write<br>\nFUNCTION=Read </p>\n\n<p>But now I have values with dashes in them which is causing bad output</p>\n\n<p>New string looks like \"+USER=Bob Smith-GROUP=Admin+FUNCTION=Read/FUNCTION=Write/FUNCTION=Read-Write\"</p>\n\n<p>Which gives me the following result , and breaks the key = value structure.</p>\n\n<p>USER=Bob Smith<br>\nGROUP=Admin<br>\nFUNCTION=Read<br>\nFUNCTION=Write<br>\nFUNCTION=Read<br>\nWrite </p>\n\n<p>Can someone help me formulate a valid regex for handling this or point me to some key / value examples. Basically I need to be able to handle + - / signs in order to get combinations.</p>\n"
},
{
"tags": [
"javascript",
"jquery",
"jquery-plugins",
"jqplot",
"time-format"
],
"answer_count": 0,
"favorite_count": 0,
"question_timeline_url": "/questions/6414438/timeline",
"question_comments_url": "/questions/6414438/comments",
"question_answers_url": "/questions/6414438/answers",
"question_id": 6414438,
"owner": {
"user_id": 576364,
"user_type": "registered",
"display_name": "mcbobo",
"reputation": 3,
"email_hash": "7c269209b6935ebf04de6171e6da80a5"
},
"creation_date": 1308587186,
"last_edit_date": 1308587719,
"last_activity_date": 1308587719,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 12,
"score": 0,
"community_owned": false,
"title": "jQuery jqPlot library 12 hour Time Y-Axis Inversion issue",
"body": "<p>I've started using jqPlot recently. The generated graphs look amazing and I love it. There are a few little things to learn here and there, but overall it's great.</p>\n\n<p>I'm using the stacked bar generation and came into a werid issue. Basically, I want a 12 hour time from hours 0 - 24 on the Y axis, days on the X axis, and plot seconds of a certain activity on the graph. But also, I want the days (midnight) to start at the top of the graph, and come to the bottom.</p>\n\n<p>I can flip the data easily with an inverse of the 'min' and 'max', but the issue arises when I try to flip the ticks; essentially, the \"time\".</p>\n\n<p>I have my series defaults set to a hidden axis:</p>\n\n<pre><code>seriesDefaults: {\n renderer: $.jqplot.BarRenderer,\n yaxis: 'y2axis'\n},\n</code></pre>\n\n<p>And I put a placeholder series ( with the values all 0's, eg: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] ) to associate with a separate yaxis to plot the date ticks:</p>\n\n<pre><code>series: [\n { show: true, yaxis: 'yaxis', }\n],\n</code></pre>\n\n<p>I can flip the values by changing the min and max on the default y axis and hiding it:</p>\n\n<pre><code>y2axis:{\n min: 24,\n max: 0,\n showTicks: false\n}\n</code></pre>\n\n<p>Then I set the ticks, and format them with the DateAxisRenderer:</p>\n\n<pre><code>yaxis:{\n renderer:$.jqplot.DateAxisRenderer,\n ticks: ['0', '2', '4', '6', '8', '10', '12', '14', '16', '18', '20', '22', '24'],\n tickOptions: { formatString: '%I:%M %p' }\n}\n</code></pre>\n\n<p>This creates a yaxis with the time's from 12:00 AM to 12:00PM back to 12:00 AM in that format. but in increasing order from the bottom of the graph.</p>\n\n<p>Obviously, flipping the min and max on the 'yaxis' would accomplish nothing, as there is only place holder values, and it only flips the values. How would I go about to flip the axis values so that the time goes (from the bottom) 24, 22, 20... etc, etc, ?</p>\n\n<p>Thanks for your help in advance.</p>\n"
},
{
"tags": [
"javascript",
"jquery",
"firefox"
],
"answer_count": 6,
"accepted_answer_id": 6414466,
"favorite_count": 0,
"question_timeline_url": "/questions/6414376/timeline",
"question_comments_url": "/questions/6414376/comments",
"question_answers_url": "/questions/6414376/answers",
"question_id": 6414376,
"owner": {
"user_id": 533617,
"user_type": "unregistered",
"display_name": "David19801",
"reputation": 822,
"email_hash": "cba0529762ef11ebc58637b537a42acd"
},
"creation_date": 1308586914,
"last_activity_date": 1308587629,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 24,
"score": 0,
"community_owned": false,
"title": "Can I see what jquery is sending to an external server?",
"body": "<p>I am on a website...it has jquery and is sending some requests using javascript out to a php page. </p>\n\n<p>Is their any way to see what data it is sending out from my computer and/or which URLs it is talking to?</p>\n\n<p>I am using firefox and can load software if their is any needed.</p>\n\n<p>EDIT - I have downloaded firebug and have the page loaded. Any idea what option I need to select?</p>\n"
},
{
"tags": [
"javascript",
"html",
"text-editor",
"textwrapping"
],
"answer_count": 1,
"favorite_count": 0,
"question_timeline_url": "/questions/6414473/timeline",
"question_comments_url": "/questions/6414473/comments",
"question_answers_url": "/questions/6414473/answers",
"question_id": 6414473,
"owner": {
"user_id": 807019,
"user_type": "unregistered",
"display_name": "neutreno",
"reputation": 1,
"email_hash": "86e6ff8f75f9daef42d53b7f8002fd95"
},
"creation_date": 1308587382,
"last_activity_date": 1308587609,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 17,
"score": 0,
"community_owned": false,
"title": "How to cause live text wrap while image/element is being dragged, in javascript?",
"body": "<p>I want to make a text editor which incorporates this sort of effect (see video). However, I have no idea how this would be possible with javascript.</p>\n\n<p><a href=\"http://www.youtube.com/watch?v=mYnj4Mz9g9g\" rel=\"nofollow\">http://www.youtube.com/watch?v=mYnj4Mz9g9g</a></p>\n\n<p>Any ideas would be amazing!</p>\n\n<p>Thanks</p>\n"
},
{
"tags": [
"javascript",
"javascript-events"
],
"answer_count": 4,
"favorite_count": 0,
"question_timeline_url": "/questions/6414123/timeline",
"question_comments_url": "/questions/6414123/comments",
"question_answers_url": "/questions/6414123/answers",
"question_id": 6414123,
"owner": {
"user_id": 540394,
"user_type": "registered",
"display_name": "jurchiks",
"reputation": 50,
"email_hash": "b12346cb9e2e217ae6741e6af3ee6852"
},
"creation_date": 1308585694,
"last_edit_date": 1308585896,
"last_activity_date": 1308587324,
"up_vote_count": 0,
"down_vote_count": 0,
"view_count": 27,
"score": 0,
"community_owned": false,
"title": "javascript trigger function on event from a script, not explicitly from html",
"body": "<p>So I'm making a registration form ATM, I have it like I want it so far except the excess JavaScript code to check the values realtime (onmouseover, onmouseout, onblur etc.).<br>\nA small sample: </p>\n\n<pre><code><tr>\n <td>\n <label for=\"name\"\n onmouseover=\"fieldSelected('name', '', 3);\"\n onmouseout=\"checkValue('name', '', 3);\">\n Enter your name:\n </label>\n </td>\n <td>\n <input type=\"text\"\n id=\"name\"\n name=\"name\"\n onmouseover=\"fieldSelected('name', '', 3);\"\n onmouseout=\"checkValue('name', '', 3);\"\n onblur=\"checkValue('name', '', 3);\">\n </td>\n</tr>\n</code></pre>\n\n<p>fieldSelected makes the field background yellow if the value of the specified element (first parameter) matches the second parameter (default value) or is shorter than third parameter.<br>\nYou mouseover the label or the input field and it changes the bg first to yellow, then to red (since you didn't input anything).<br>\ncheckValue changes the field background to either red or green depending on the value (same parameters).<br>\nYou enter something in the input field, switch to another field and it changes the background color. </p>\n\n<p>Now, as you will probably notice, there's a LOT of JavaScript function calls right there (5 per each input/select field). It would be great if someone would know a way to attach those event triggers from another place (I don't usually code this dirty), not directly in the form like this and preferably to multiple IDs at once. I have jQuery here, but I'm really no expert in JavaScript. </p>\n\n<p>Or maybe there's a simpler way to do this? I want that the field background color changes on all those events for maximum int