The URL from Yahoo is not working when I try to retrieve quotes from a particular stock. There are several discussion about it, However, it seems nothing is shown regarding VBA macro   Sub Get_Data() Dim URL As String Dim Ticker As String Dim http As New WinHttpRequest Dim sCotes As String Dim Lignes Dim Valeurs Dim i As Long Dim j As Long Dim sLigne As String Dim sValeur As String  Ticker = Range("Ticker")  URL = "https://query1.finance.yahoo.com/v7/finance/download/TECK?period1=1540456339&amp;period2=1571992339&amp;interval=1d&amp;events=history&amp;crumb=kjOZLFv6ch2" http.Send sCotes = http.ResponseText  MsgBox sCotes  Lignes = Split(sCotes, Chr(10)) For i = 1 To UBound(Lignes) 'until the end of the Lignes variable   sLigne = Lignes(i)   Valeurs = Split(sLigne, ",")   For j = 0 To UBound(Valeurs) - 1   Select Case j   Case 0   sValeur = DateSerial(CLng(Left(Valeurs(0), 4)), CLng(Mid(Valeurs(0), 6, 2)), CLng(Right(Valeurs(0), 2)))   Case 5   sValeur = CLng(Valeurs(5))   Case Else   sValeur = CDbl(Replace(Valeurs(j), ".", ","))   End Select   Range("A1").Offset(i, j) = sValeur   Application.StatusBar = Format(Cells(i, 1), "Short Date")   Next Next Application.StatusBar = False  End Sub   Execution error at the step Http.send : "This method cannot be called until the Open method has been called"
122396
What VBA code is required to perform an HTTP POST from an Excel spreadsheet?
94478
I need to do something like this:  &lt;script type="text/javascript"&gt;     token_url = "http://example.com/your_token_url"; &lt;/script&gt;   I'm using the Beta version of MVC, but I can't figure out how to get the absolute url of an action. I'd like to do something like this:  &lt;%= Url.AbsoluteAction("Action","Controller")) %&gt;   Is there a helper or Page method for this?
20150
When using data.stackexchange.com I fail to remember if as [post link] is the correct alias to get the url for the post. Luckily the site has an  link. Unfortunately it is now broken. Can this be fixed?
20340
I am trying to use the "navigateToSObject" to redirect to the detail page. But the method $A.get("e.force:navigateToSObject") is always returning null. I dont have a namespace. SO this isn't namespace related issue I assume.  Here is the code of my component  &lt;aura:component &gt; &lt;aura:attribute name="contactName" type="String"&gt;&lt;/aura:attribute&gt; &lt;aura:attribute name="lastName" type="String"&gt;&lt;/aura:attribute&gt; &lt;aura:attribute name="cid" type="String"&gt;&lt;/aura:attribute&gt; &lt;div onclick="{!c.navigateToRecord}" &gt;       &lt;h1&gt;{!v.lastName}&lt;/h1&gt;     &lt;h3&gt;{!v.contactName}&lt;/h3&gt;     &lt;h3&gt;{!v.cid}&lt;/h3&gt; &lt;/div&gt; &lt;/aura:component&gt;   Here is the code of my java-script controller      ({     navigateToRecord : function(component, event, helper){         var cid=component.get("v.cid")        console.log('inside navigateToRecord '+cid);       var navEvent = $A.get("e.force:navigateToSObject");        navEvent.setParams({         "recordId": cid,            "slideDevName": "detail"     });      navEvent.fire();  } })   I am getting null in navEvent hence am not able to set parameters into it. The error is "Uncaught error in $A.run() : Cannot read property 'setParams' of null"
76641
I need to get item from list sharepoint by Id I use this code and it give me all the items of the list :  &lt;script&gt;  function parseURLParams(url) {         var queryStart = url.indexOf("?") + 1,             queryEnd = url.indexOf("#") + 1 || url.length + 1,             query = url.slice(queryStart, queryEnd - 1),             pairs = query.replace(/\+/g, " ").split("&amp;"),             parms = {}, i, n, v, nv;          if (query === url || query === "") {             return;         }          for (i = 0; i &lt; pairs.length; i++) {             nv = pairs[i].split("=");             n = decodeURIComponent(nv[0]);             v = decodeURIComponent(nv[1]);              if (!parms.hasOwnProperty(n)) {                 parms[n] = [];             }              parms[n].push(nv.length === 2 ? v : null);         }         return parms;     }  $( window ).load(function() {   var urlString = document.URL;  urlParams = parseURLParams(urlString);  ExecuteOrDelayUntilScriptLoaded(retrieveActualite, "sp.js");          var siteUrl = '/sites/securite';      function retrieveActualite() {              var clientContext = new SP.ClientContext(siteUrl);             var oList = clientContext.get_web().get_lists().getByTitle('Actualite');             var camlQuery = new SP.CamlQuery();              camlQuery.set_viewXml('&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=”ID” LookupId="TRUE"/&gt;&lt;Value Type="Text"&gt;' + urlParams.IdArt[0] + '&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;');             this.collListItem = oList.getItems(camlQuery);             clientContext.load(collListItem);             clientContext.executeQueryAsync(onQuerySucceededActualite, onQueryFailed);         }          function onQuerySucceededActualite(sender, args) {              var listItemInfo = '';              var listItemEnumerator = collListItem.getEnumerator();             while (listItemEnumerator.moveNext()) {                 var oListItem = listItemEnumerator.get_current();                   var desc=oListItem.get_item('Description');                 $('#idArticle').append('&lt;label class="titleArticle"&gt;'+oListItem.get_item('Title')+'&lt;/label&gt; &lt;br&gt;&lt;br&gt;&lt;p class="ContenuArticle" &gt;'+desc+'&lt;/p&gt;');                          }         }          function onQueryFailed(sender, args) {              alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());         }       });    &lt;/script&gt;   so how can I get only the considered item ?
104750
I have an Excel file that has a bunch of VBA and macro code in it.  When I open the file in Excel I can choose not to 'enable' them - so the values in the fields all stay as they were during the last save.  I need to manipulate the values as they were last saved - so I don't want the macros (which look at the current date and update values accordingly) to run.  When I open it via our dot net code:   Dim oxlRep As Excel.Application Dim oWBRep As Excel.Workbook Dim oSheetRep As Excel.Worksheet Dim oRngRep As Excel.Range oxlRep.Open(path)   the vb code runs - throwing off the values.  I've been looking for a way to open it without macros, or in 'secure' mode where the macros aren't run.  If I simply double click the file and don't choose to enable macros the values are all there as I want them.    Usually we run this code within the month that the files are created, so we haven't seen this problem in the 3 or 4 years that it has been working.  Now I need to go back to some of the old files and run some archival code...    Anyone have a suggestion?
104638
I'm playing around, trying to write some code to use the  APIs to shorten a URL.  After reading , I tried:     TRIM_API_URL = 'http://api.tr.im/api'    auth_handler = urllib2.HTTPBasicAuthHandler()    auth_handler.add_password(realm='tr.im',                              uri=TRIM_API_URL,                              user=USERNAME,                              passwd=PASSWORD)    opener = urllib2.build_opener(auth_handler)    urllib2.install_opener(opener)    response = urllib2.urlopen('%s/trim_simple?url=%s'                               % (TRIM_API_URL, url_to_trim))    url = response.read().strip()   response.code is 200 (I think it should be 202).  url is valid, but the basic HTTP authentication doesn't seem to have worked, because the shortened URL isn't in my list of URLs (at ).  After reading  I also tried:     TRIM_API_URL = 'api.tr.im/api'    password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm()    password_mgr.add_password(None, TRIM_API_URL, USERNAME, PASSWORD)    auth_handler = urllib2.HTTPBasicAuthHandler(password_mgr)    opener = urllib2.build_opener(auth_handler)    urllib2.install_opener(opener)    response = urllib2.urlopen('http://%s/trim_simple?url=%s'                               % (TRIM_API_URL, url_to_trim))    url = response.read().strip()   But I get the same results.  (response.code is 200 and url is valid, but not recorded in my account at .)  If I use query string parameters instead of basic HTTP authentication, like this:     TRIM_API_URL = 'http://api.tr.im/api'    response = urllib2.urlopen('%s/trim_simple?url=%s&amp;username=%s&amp;password=%s'                               % (TRIM_API_URL,                                  url_to_trim,                                  USERNAME,                                  PASSWORD))    url = response.read().strip()   ...then not only is url valid but it's recorded in my tr.im account. (Though response.code is still 200.)  There must be something wrong with my code though (and not tr.im's API), because  $ curl -u yacitus:xxxx http://api.tr.im/api/trim_url.json?url=http://www.google.co.uk   ...returns:  {"trimpath":"hfhb","reference":"nH45bftZDWOX0QpVojeDbOvPDnaRaJ","trimmed":"11\/03\/2009","destination":"http:\/\/www.google.co.uk\/","trim_path":"hfhb","domain":"google.co.uk","url":"http:\/\/tr.im\/hfhb","visits":0,"status":{"result":"OK","code":"200","message":"tr.im URL Added."},"date_time":"2009-03-11T10:15:35-04:00"}   ...and the URL does appear in my list of URLs on .  And if I run:  $ curl -u yacitus:xxxx http://api.tr.im/api/trim_url.json?url=http://www.google.co.uk   ...again, I get:  {"trimpath":"hfhb","reference":"nH45bftZDWOX0QpVojeDbOvPDnaRaJ","trimmed":"11\/03\/2009","destination":"http:\/\/www.google.co.uk\/","trim_path":"hfhb","domain":"google.co.uk","url":"http:\/\/tr.im\/hfhb","visits":0,"status":{"result":"OK","code":"201","message":"tr.im URL Already Created [yacitus]."},"date_time":"2009-03-11T10:15:35-04:00"}   Note code is 201, and message is "tr.im URL Already Created [yacitus]."  I must not be doing the basic HTTP authentication correctly (in either attempt).  Can you spot my problem?  Perhaps I should look and see what's being sent over the wire?  I've never done that before.  Are there Python APIs I can use (perhaps in pdb)?  Or is there another tool (preferably for Mac OS X) I can use?
67850
I entered a URL with a very long parameter on Stack Exchange.  I have type this url    It shows a blank screen , does not shown any messages.    We need to show a “Page Not Found” message, same as what you did on other Stack Exchange pages.
99555
I am trying to pass the email value from a data extension to HTML. I am using the CloudPagesURL() in my email in attempt to grab the subscriber's email.  Here is my code syntax that I am attempting to use:  Email Code:  &lt;p&gt;&lt;a title="MyPage" href="%%=RedirectTo(CloudPagesURL(505,'Email Address',@EmailAddress))=%%" alias="ThisAlias" conversion="false"&gt;Click to unsubscribe page 505&lt;/a&gt;&lt;/p&gt;   CloudPage AMPScript Code:  %%[  VAR @emailAddress  SET @emailAddress = RequestParameter("emailaddr")  ]%%   Cloudpage HTML Code:  &lt;td width='155' valign='bottom'&gt;&lt;input type='text' name='Name1' value='%%=v(@emailAddress)=%%' id='Name1' /&gt;&lt;/td&gt;   Any reason as to why this doesn't work? My syntax might just be wrong or I might be using the CloudPagesURL() function incorrectly.
10621
There seems to be a problem with making a clickable archive.org URL. For example:     See the .   I am using Chrome. I suspect something about the * in the URL, perhaps because it gets encoded as %2a, causes the URL request to be sent to the current site (meta.stackoverflow.com) which doesn't make sense.
117758
When I type a URL in angle brackets, such as &lt;;, in a comment, the URL is not detected and linked.  Supporting this would allow links to be used more naturally in the flow of text in a comment.  This notation is recommended for embedding URLs in running text by ; quotes are also recommended (I do not know if quotes work or not).
61659
I've created   which works nice. I would really like to download those results as an CSV file. Therefor I click on the provided link on the right hand side of the screen called Download CSV. The result is:  The webpage cannot be found  https://data.stackexchange.com/stackoverflow/csv/202355?UserId=187606 I expected: A file in CSV format. It looks like a regression of  Queries without a parameter work as advertised. Can this be fixed?
26203
I'm trying to direct a browser to a different page. If I wanted a GET request, I might say  document.location.href = 'http://example.com/q=a';   But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I might use the HTML  &lt;form action="http://example.com/" method="POST"&gt;   &lt;input type="hidden" name="q" value="a"&gt; &lt;/form&gt;   Then I would just submit the form from the DOM.  But really I would like JavaScript code that allows me to say  post_to_url('http://example.com/', {'q':'a'});   What's the best cross browser implementation?  Edit   I'm sorry I was not clear. I need a solution that changes the location of the browser, just like submitting a form. If this is possible with , it is not obvious. And this should not be asynchronous, nor use XML, so Ajax is not the answer.
112425
I want to get the URL for my site collection. One way I thought I could do it was using the window.location in javascript and getting it that way.   I know that you can use ECMA script and the client object model to do this but unsure how.  I have tried:  var context = new SP.ClientContext; alert(context.get_url());   This is returning /  How would I get it to include the full URL? i.e. http://mysharepoint:29292/
80203
This error should be a simple one but I cant seem to make it work. The problem lies in the fact that this very same code works earlier in the program. I don's see any reason for it to be sending an error on this instance and not the four previous ones. Reference the code below, and feel free to provide any criticism you may have as it should make me better. If it matters, I am using Sharp Develop 2.2.  Here is an example of the code that works:  void calc2Click(object sender, EventArgs e) {     if (!String.IsNullOrEmpty(tb2_fla.Text) &amp; String.IsNullOrEmpty(tb2_e.Text) | String.IsNullOrEmpty(tb2_fla.Text) &amp; String.IsNullOrEmpty(tb2_e.Text) | String.IsNullOrEmpty(tb2_e.Text))     {         MessageBox.Show("Enter either kVA and Voltage or FLA and Voltage", "Invalid Data Entry", MessageBoxButtons.OK);     }                 if (!String.IsNullOrEmpty(tb2_kva.Text) &amp; !String.IsNullOrEmpty(tb2_e.Text))     {              decimal x, y, z;             x = decimal.Parse(tb2_kva.Text);                   y = decimal.Parse(tb2_e.Text);             z = (x * 1000) / (1.732050808m * y); //the m at the end of the decimal allows for the multiplication of decimals                 tb2_fla.Text = z.ToString();             tb2_fla.Text = Math.Round(z,2).ToString();     }         else     {         if (!String.IsNullOrEmpty(tb2_fla.Text) &amp; !String.IsNullOrEmpty(tb2_e.Text))     {              decimal x, y, z;             x = decimal.Parse(tb2_fla.Text);                   y = decimal.Parse(tb2_e.Text);             z = (x * y * 1.732050808m) / 1000; //the m at the end of the decimal allows for the multiplication of decimals               tb2_kva.Text = Math.Round(z,2).ToString();      }   Here is the example of the code that sends the error in the subject line of this post:  void Calc4Click(object sender, EventArgs e) {         if (!String.IsNullOrEmpty(tb4_fla.Text) &amp;&amp; String.IsNullOrEmpty(tb4_e.Text) || String.IsNullOrEmpty(tb4_kw.Text) &amp; String.IsNullOrEmpty(tb4_e.Text) || String.IsNullOrEmpty(tb4_e.Text))         {   //If values are entered improperly, the following message box will appear         MessageBox.Show("Enter either FLA and Voltage or kW and Voltage", "Invalid Data Entry", MessageBoxButtons.OK);         }              if (!String.IsNullOrEmpty(tb4_fla.Text)&amp;&amp; !String.IsNullOrEmpty(tb4_e.Text)&amp;&amp; String.IsNullOrEmpty(tb4_kw.Text))         {//If the user eneters FLA and Voltage calculate for kW              decimal x, y, z;             x = decimal.Parse(tb4_fla.Text);             y = decimal.Parse(tb4_e.Text);             z = (x*y)*(.8 * 1.732050808m);             tb4_kw.Text = Math.Round(z,0).ToString();          }                         if (!String.IsNullOrEmpty(tb4_kw.Text) &amp;&amp; !String.IsNullOrEmpty(tb4_e.Text) &amp;&amp; String.IsNullOrEmpty(tb4_fla.Text))         {;//If the user enters kW and Voltage calculate for FLA             decimal x, y, z;             x = decimal.Parse(tb4_kw.Text);             y = decimal.Parse(tb4_e.Text);             z = (1000 * x)/(y * 1.732050808m)* .8;             tb4_fla.Text = Math.Round(z,0).ToString();         }      }   I appreciate any help that I can get.  Thank you.
90610
I’m using importdata to retrieve Yahoo stock information, which works fine on individual rows, but when combined with arrayformula to fill down the page when additional symbols are added does not initiate continue. The formula I'm using is:  =arrayformula(ImportData("http://finance.yahoo.com/d/quotes.csv?s="&amp;CONCAT(A2:A,B2:B)&amp;"&amp;f=snk2l1jkm3m4"))    A2:A contains the stock codes B2:B contains the exchange code, e.g., .ax for Australia
6007
How can I check if a given string is a valid URL address?  My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.