tag:blogger.com,1999:blog-57948474427654003892024-02-20T08:29:29.489-08:003 Legged Pony RideFor everything "almost working"Anonymoushttp://www.blogger.com/profile/01060191382036768194noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5794847442765400389.post-51260230616880512222015-08-18T13:44:00.001-07:002015-08-18T13:44:43.227-07:00Ajax parseerror with JSON file all because of cachingI'll keep this short and sweet.<br />
<br />
Pretty simple ajax call<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>var self = this;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$.ajax({<br />
url:'specs.json',<br />
datatype: 'text/json',<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>async: false,<br />
success: function(data) {<br />
self.specsData = data;<br />
cb();<br />
},<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>error: function(textStatus, errorThrown) {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>console.log(errorThrown);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>console.log(textStatus);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
});<br />
<br />
I threw the error in because it had been a few hours and I couldn't figure out why I was still getting a parseerror message.<br />
<br />
I was using iis. I had added the json mime type but it still was throwing this error.<br />
<br />
I hit the IIS logs finally after I wanted to make sure it truley was returning a 200 like the browser was showing in "errorThrown" message.<br />
<br />
2015-08-18 20:22:49 ::1 GET /JStest/specs.json - 80 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/44.0.2403.155+Safari/537.36 304 0 0 0<br />
<br />
What? 304? WTF is 304?<br />
<br />
<h3>
<a href="https://www.blogger.com/null" name="not-modified">Not Modified</a> <a href="https://www.blogger.com/null" name="use-local-copy">304</a></h3>
If the client has done a conditional GET and access is allowed, but the document has not been modified since the date and time specified in <a href="http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#if-modified-since" name="z13">If-Modified-Since</a> field, the server responds with a 304 status code and does not send the document body to the client.<br />
Response headers are as if the client had sent a HEAD request, but limited to only those headers which make sense in this context. This means only headers that are relevant to cache managers and which may have changed independently of the document's Last-Modified date. Examples include Date , Server and Expires .<br />
The purpose of this feature is to allow efficient updates of local cache information (including relevant metainformation) without requiring the overhead of multiple HTTP requests (e.g. a HEAD followed by a GET) and minimizing the transmittal of information already known by the requesting client (usually a caching proxy).<br />
<br />
<br />
Ok. So despite adding the mime type. The browser was told ,"I gave you the file. Use your cache."<br />
<br />
So the cached version of the json still had the wrong mime type.<br />
<br />
Closed and reopened Chrome. Works perfectly.Anonymoushttp://www.blogger.com/profile/01060191382036768194noreply@blogger.com0tag:blogger.com,1999:blog-5794847442765400389.post-79911885980698375432014-02-21T22:08:00.003-08:002014-02-21T22:08:56.639-08:00Report to rule all reports, or at least document them.<div>
<br /></div>
<div>
I was tasked to document SSRS and while having BIdocumenter (DocXpress), I found the documentation produced by it a bit verbose and not printer friendly. 120 reports produced 26k pages of documentation.</div>
<div>
<br /></div>
<div>
So, I took a half day and mapped out the ReportServer Database.</div>
<div>
<br /></div>
<div>
After doing it, I thought I should upload it to the community.</div>
<div>
<br /></div>
<div>
Please check it out at <a href="https://ssrsreportdocumentation.codeplex.com/">https://ssrsreportdocumentation.codeplex.com/</a></div>
<div>
<br /></div>
<div>
I currently only have a version for 2008 but I need to have one done for 2005 before next week and I will try against 2012 as well in a few weeks.</div>
Anonymoushttp://www.blogger.com/profile/01060191382036768194noreply@blogger.com0tag:blogger.com,1999:blog-5794847442765400389.post-84540814360785340832013-06-10T14:32:00.004-07:002013-06-26T15:46:15.763-07:00Parameters cannot be extracted from the SQL commandParameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command....."Syntax error, permission violation, or other nonspecific error".<br />
<br />
Got this while trying to create a parameter inside an OLE DB Source Editor.<br />
<br />
Spent an hour scouring google and couldn't find an answer to my query.<br />
<br />
It was a simple query like:<br />
<br />
/**** My Awesome Query ****/<br />
<br />
Select blah1, blah2, blah3<br />
from myblahtable<br />
Where 1=? and myblahdate > ?<br />
<br />
Then BAM "Syntax error, permission violation, or other nonspecific error".<br />
<br />
Turns out, it was my "/**** My Awesome Query ****/" comment that I left in was making it to hard for the parser to find my question marks.<br />
<br />
Ugh.<br />
<br />
Hope this helps you.<br />
<br />Anonymoushttp://www.blogger.com/profile/01060191382036768194noreply@blogger.com0tag:blogger.com,1999:blog-5794847442765400389.post-54035194470588210832013-03-26T14:27:00.002-07:002013-06-26T15:47:16.249-07:00BIG-IP_cookie_decoder.py 3.+Ugh, this is why I end up coding in mostly microsoft products....versioning of the tools itself.<br />
<br />
Granted, I love open source but I also hate when I end up fixing syntax because I'm always using an IDE or verion of tools not used by the codes original authors. You can try to guess what version of python or cygwin or whatever scripting language/compiler they are using but eventually you just end up fixing the syntax of their code so you can make it work.<br />
<br />
Anyways. If you are looking to decode F5 BigIP cookie entries... here is the following updated python script that will work with 3.3.<br />
<br />
It was found at http://blog.taddong.com/2011/12/cookie-decoder-f5-big-ip.html<br />
<br />
but here is the updated code for python 3.x.x. (I was using 3.2.3 at the time)<br />
<br />
#!/usr/bin/env python<br />
<br />
# Description:<br />
# Python script to decode F5 BIG-IP persistent cookies<br />
#<br />
# Author: Raul Siles (raul _AT_ taddong _DOT_ com)<br />
# Taddong (www.taddong.com)<br />
# Date: 2011-12-06<br />
# Version: 0.1<br />
# Revised: Python version 3.x.x - James Murray (jamesmurrayga _@_ hotmail _DOT_ com)<br />
<br />
# URL: http://www.taddong.com/tools/BIG-IP_cookie_decoder.py<br />
# F5: http://support.f5.com/kb/en-us/solutions/public/6000/900/sol6917.html<br />
# Fix: http://support.f5.com/kb/en-us/solutions/public/7000/700/sol7784.html<br />
<br />
# Credits: (based on) <br />
# http://penturalabs.wordpress.com/2011/03/29/how-to-decode-big-ip-f5-persistence-cookie-values/<br />
<br />
# Example cookie value (encoded string): 1677787402.36895.0000<br />
<br />
import struct<br />
import sys<br />
<br />
if len(sys.argv) != 2:<br />
print ("Usage: %s cookie_value" % sys.argv[0])<br />
exit(1)<br />
<br />
encoded_string = sys.argv[1]<br />
print ("\n[*] String to decode: %s\n" % encoded_string)<br />
<br />
(host, port, end) = encoded_string.split('.')<br />
<br />
print (host, port, end)<br />
<br />
# Hexadecimal details:<br />
(a, b, c, d) = struct.pack("<I", int(host))<br />
#print "HOST: 0x%02X 0x%02X 0x%02X 0x%02X\n" % (a,b,c,d)<br />
<br />
(v) = struct.pack("<H", int(port))<br />
p = "0x%02X%02X" % (v[0],v[1])<br />
#print "PORT: %s\n" % p<br />
#<br />
<br />
print ("[*] Decoded IP: %s.%s.%s.%s" % (a,b,c,d))<br />
print ("[*] Decoded port: %s\n" % (int(p,16)))Anonymoushttp://www.blogger.com/profile/01060191382036768194noreply@blogger.com0