{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'OCR模型免费转Markdown' && linkText !== 'OCR模型免费转Markdown' ) { link.textContent = 'OCR模型免费转Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== '模型下载攻略' ) { link.textContent = '模型下载攻略'; link.href = '/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); \n\n```\n\n"},"Title":{"kind":"string","value":"Determining allowable moves on a grid"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"null"},"CreationDate":{"kind":"string","value":"2009-02-03T18:38:42.367"},"LastActivityDate":{"kind":"string","value":"2013-10-16T17:38:19.407"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:03.680"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":60598,"string":"60,598"},"Tags":{"kind":"list like","value":["javascript","grid"],"string":"[\n \"javascript\",\n \"grid\"\n]"}}},{"rowIdx":242,"cells":{"Id":{"kind":"number","value":510277,"string":"510,277"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":510347,"string":"510,347"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":26,"string":"26"},"ViewCount":{"kind":"number","value":12344,"string":"12,344"},"Body":{"kind":"string","value":"Is there an established algorithm for finding redundant edges in a graph?\n\nFor example, I'd like to find that a->d and a->e are redundant, and then get rid of them, like this:\n\n![alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/Tred-G.png/124px-Tred-G.png) => ![alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Tred-Gprime.png/80px-Tred-Gprime.png)\n\nEdit: Strilanc was nice enough to read my mind for me. \"Redundant\" was too strong of a word, since in the example above, neither a->b or a->c is considered redundant, but a->d is.\n"},"Title":{"kind":"string","value":"Algorithm for Finding Redundant Edges in a Graph or Tree"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-04T06:29:01.697"},"LastActivityDate":{"kind":"string","value":"2019-06-25T08:53:32.533"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:04.730"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":55,"string":"55"},"Tags":{"kind":"list like","value":["algorithm","language-agnostic","tree","graph-theory"],"string":"[\n \"algorithm\",\n \"language-agnostic\",\n \"tree\",\n \"graph-theory\"\n]"}}},{"rowIdx":243,"cells":{"Id":{"kind":"number","value":512145,"string":"512,145"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":562065,"string":"562,065"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":0,"string":"0"},"ViewCount":{"kind":"number","value":210,"string":"210"},"Body":{"kind":"string","value":"Recently I upgraded a couple of CruiseControl.NET server from version 1.3 to version 1.4.2.14. After the upgrade I was pleased to note that the \"View Statistics\" link from the project's web dashboard sported a new view:\n\n![alt text](https://tvl7tg.blu.livefilestore.com/y1pJXOc5a-GHWftIp_G9K6qZpNnt6H-9XKsjtQRNgUZPuf9iDDBrqx8xJr3dpx43CeFyw8qGG2EnNA/CCNetViewStatsNew.PNG)\n\nHowever,\n\nI was quite disappointed to discover that another server that I upgraded in an identical way sported the old-style statistics page:\n\n![alt text](https://tvl7tg.blu.livefilestore.com/y1pVz14MxrzMQ7_4R7p2U92pG79rxcHPuu7nFjlDaeyW5S6ZethkDodIbB4x9vdDa6t9dN33SfQnZw/CCNetViewStatsOld.PNG)\n\nIt seems that there is some configuration setting that didn't get enabled when I upgraded the second server. Any ideas what controls this?\n"},"Title":{"kind":"string","value":"New-fangled \"view statistics\" not working on upgraded CruiseControl.NET server"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-04T16:32:19.077"},"LastActivityDate":{"kind":"string","value":"2009-02-18T17:27:03.377"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:05.737"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":2459,"string":"2,459"},"Tags":{"kind":"list like","value":[".net","cruisecontrol.net","upgrade"],"string":"[\n \".net\",\n \"cruisecontrol.net\",\n \"upgrade\"\n]"}}},{"rowIdx":244,"cells":{"Id":{"kind":"number","value":516228,"string":"516,228"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"null"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":0,"string":"0"},"ViewCount":{"kind":"number","value":437,"string":"437"},"Body":{"kind":"string","value":"I'm trying to write a VBScript function that collects the value of a cell (\"E1\") across all tabs of an Excel document into an array (Reviewers).\n\nI wrote the following code, but the data is not being stored into the array, can someone please tell me what I'm doing wrong?\n\nThis is the code:\n\n![vba screenshot](https://i.stack.imgur.com/ZhiEa.jpg)\n"},"Title":{"kind":"string","value":"How to get the value of a cell across all worksheets"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-05T14:55:57.647"},"LastActivityDate":{"kind":"string","value":"2015-05-28T05:36:30.817"},"LastEditDate":{"kind":"string","value":"2015-05-28T05:26:37.760"},"LastEditorUserId":{"kind":"number","value":4897144,"string":"4,897,144"},"OwnerUserId":{"kind":"null"},"Tags":{"kind":"list like","value":["arrays","vba","excel"],"string":"[\n \"arrays\",\n \"vba\",\n \"excel\"\n]"}}},{"rowIdx":245,"cells":{"Id":{"kind":"number","value":516406,"string":"516,406"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":1381050,"string":"1,381,050"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":20,"string":"20"},"ViewCount":{"kind":"number","value":13448,"string":"13,448"},"Body":{"kind":"string","value":"I'm currently looking at different solutions getting 2 dimensional mathematical formulas into webpages. I think that the wikipedia solution (generating png images from LaTeX sourcecode) is good enough until we get support for MathML in webbrowsers.\n\nI suddenly realized that it might be possible to create a [Google Charts API](http://code.google.com/apis/chart/) equivalent for mathformulas. Has this already been done? Is it even possible due to the strange characters involved in LaTeX-code?\n\nI would like to hit an url like latex2png.org/api/?eq=\"E = mc^2\" and get the following response: ![e=mc^2](https://upload.wikimedia.org/math/f/0/9/f09291a2934068644f41981dd51eb5b0.png)\n\n\nThanks for the answers sofar. However, I am already aware of several tools to generate png images from latex source code (both online and from my commandline), but what I was looking for was a simple way to get the image via an Http GET request. Perhaps such a service does not exist. \n"},"Title":{"kind":"string","value":"LaTeX equivalent to Google Chart API"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-05T15:36:05.570"},"LastActivityDate":{"kind":"string","value":"2022-04-11T08:27:29.330"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:06.073"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":24946,"string":"24,946"},"Tags":{"kind":"list like","value":["math","latex","png","formula"],"string":"[\n \"math\",\n \"latex\",\n \"png\",\n \"formula\"\n]"}}},{"rowIdx":246,"cells":{"Id":{"kind":"number","value":518447,"string":"518,447"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":518469,"string":"518,469"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":5,"string":"5"},"ViewCount":{"kind":"number","value":12244,"string":"12,244"},"Body":{"kind":"string","value":"I'm showing a popup menu to select some values in a QTableWidget. The lowest item is a \"Modify list\" entry, when I select it a new window should automatically appear and the QComboBox should vanish and the cell return to a Qt::DisplayRole state.\n\nNow Qt has all those nice API-calls like `QTableWidget.edit()` and `QTableWidget.editItem()`, what I'm really looking for is a `QTableWidget.endEditing()`, preferably without specifying the index of the cell, though I could get that using this call:\n\n```\ntable.currentIndex()\n```\n\n\n… but I don't know if I can guarantee that the current cell is the cell being edited at all times.\n\nIs there an API to close those kind of editors?\n\n![Popup menu](https://i.stack.imgur.com/esRER.png)\n"},"Title":{"kind":"string","value":"How can I tell a QTableWidget to end editing a cell?"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-05T23:20:56.410"},"LastActivityDate":{"kind":"string","value":"2021-01-18T17:04:14.070"},"LastEditDate":{"kind":"string","value":"2014-01-08T15:04:26.263"},"LastEditorUserId":{"kind":"number","value":24587,"string":"24,587"},"OwnerUserId":{"kind":"number","value":24587,"string":"24,587"},"Tags":{"kind":"list like","value":["qt","pyqt"],"string":"[\n \"qt\",\n \"pyqt\"\n]"}}},{"rowIdx":247,"cells":{"Id":{"kind":"number","value":521881,"string":"521,881"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":521944,"string":"521,944"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":2,"string":"2"},"ViewCount":{"kind":"number","value":939,"string":"939"},"Body":{"kind":"string","value":"You know the one I mean:\n\n![Excel has crashed... again!](https://farm4.static.flickr.com/3429/3258031261_1149df469c_o.jpg)\n\nIs there a way to disable this? \n\nI'm writing an application to automatically test a large number of Excel spreadsheets which are used in a critical environment. Many of these sheets do crazy things which crash Excel. When Excel crashes I want it to terminate ASAP and without user-intervention.\n\n- - - \n"},"Title":{"kind":"string","value":"Can you get rid of the \"Microsoft Office Excel has encountered a problem\" dialog?"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"null"},"CreationDate":{"kind":"string","value":"2009-02-06T19:46:16.063"},"LastActivityDate":{"kind":"string","value":"2009-04-02T14:29:36.677"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:08.113"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":46411,"string":"46,411"},"Tags":{"kind":"list like","value":["windows","excel","crash","ms-office"],"string":"[\n \"windows\",\n \"excel\",\n \"crash\",\n \"ms-office\"\n]"}}},{"rowIdx":248,"cells":{"Id":{"kind":"number","value":522352,"string":"522,352"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":522403,"string":"522,403"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":21,"string":"21"},"ViewCount":{"kind":"number","value":22486,"string":"22,486"},"Body":{"kind":"string","value":"What is the best pattern for having a select all or deselect all checkboxes. Can someone come up with a better way to have it in this form:\n\n![enter image description here](https://i.stack.imgur.com/16WUB.png)\n"},"Title":{"kind":"string","value":"Most usable select all/deselect all checkbox format"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-06T21:55:50.997"},"LastActivityDate":{"kind":"string","value":"2016-07-05T20:09:32.273"},"LastEditDate":{"kind":"string","value":"2015-08-18T08:46:26.120"},"LastEditorUserId":{"kind":"number","value":4374739,"string":"4,374,739"},"OwnerUserId":{"kind":"number","value":5653,"string":"5,653"},"Tags":{"kind":"list like","value":["usability"],"string":"[\n \"usability\"\n]"}}},{"rowIdx":249,"cells":{"Id":{"kind":"number","value":526898,"string":"526,898"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":529894,"string":"529,894"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":7,"string":"7"},"ViewCount":{"kind":"number","value":3801,"string":"3,801"},"Body":{"kind":"string","value":"HI all.\n\nI am working on some code to send/receive SMS messages through Zeep Mobile ([http://zeepmobile.com/developers/](http://zeepmobile.com/developers/)). \n\nI have looked at their google groups and even contacted their support but they've not been very good at communicating back and I am really flying blind now.\n\nI have to get integrated with them (work has required it) and I'm not sure why my code is not working. So, I'm wondering if anyone out there has any C# .Net code that they won't mind sharing so that I may integrate that into my app.\n\nOf course, this is all dependent on whether you have experience with Zeep or not. If you want me post my code, I can do that too. Let me know.\n\nThanks and I really appreciate the help.\n\n**\n\n\n## EDIT: I HAVE ADDED SOURCE CODE HERE IN CASE ANYONE CAN HELP WITH THIS!\n\n\n\n**\n\nPlease forgive the sloppy code. Its just something I threw together to test Zeep and I'm hoping someone can give it a shot. (.Net 3.5 console app in case you want to build it).\n\n```\nusing System;\nusing System.Collections.Generic;\nusing System.Collections.Specialized;\nusing System.Linq;\nusing System.Text;\nusing System.Net;\nusing System.Net.Sockets;\nusing System.Net.Security;\nusing System.Web;\nusing System.Web.Handlers;\nusing System.IO;\nusing System.Security.Cryptography;\nusing System.Security.Cryptography.X509Certificates;\n\n\nnamespace ConsoleApplication1\n{\n\n\n class Program\n {\n public static string API_KEY = \"MY_API_KEY\";\n public static string SECRET_ACCESS_KEY = \"MY_SECRET_KEY\";\n public static string PATTERN_RFC1123 = \"ddd, dd MMM yyyy HH:mm:ss \" + \"GMT\";\n\n static void Main(string[] args)\n {\n // URL for sending message - \n // send_message = \"https://api.zeepmobile.com/messaging/2008-07-14/send_message\";\n // blast_message = \"https://api.zeepmobile.com/messaging/2008-07-14/blast_message\";\n string apiurl = \"https://api.zeepmobile.com/messaging/2008-07-14/blast_message\";\n\n\n // FORMAT must be Sun, 06 Nov 1994 08:49:37 GMT\n string http_date = DateTime.UtcNow.ToString(\"r\");\n // Text to send\n string body = HttpUtility.UrlEncode(\"Test message.\", System.Text.Encoding.UTF8);\n // NOTE: Use 'user_id=22&body=' instead of just 'body=' when sending a message to a user.\n // 22 is a user I have previously registered with ZEEP and is used for testing purposes.\n string parameters = \"body=\" + body; \n // String that will be converted into a signature.\n string canonicalString = API_KEY + http_date + parameters;\n\n\n //------------START HASH COMPUTATION---------------------\n // Compute the Base64 HMACSHA1 value\n HMACSHA1 hmacsha1 = new HMACSHA1(SECRET_ACCESS_KEY.ToByteArray());\n\n // Compute the hash of the input file.\n byte[] hashValue = hmacsha1.ComputeHash(canonicalString.ToByteArray());\n\n String b64Mac = hashValue.ToBase64String();\n String authentication = String.Format(\"Zeep {0}:{1}\", API_KEY, b64Mac);\n //-----------END HASH COMPUTATION------------------------\n\n\n // We are using TCPClient instead of an HTTPWebRequest because we need to manually\n // set the \"Headers\" such as Date, Authorization etc which cannot easily be done with HTTPWebRequest.\n Uri reqUrl = new Uri(apiurl);\n TcpClient client = new TcpClient(reqUrl.Host, reqUrl.Port);\n NetworkStream netStream = client.GetStream();\n // SSLStream is used for secure communication. ZEEP requires the use of SSL to send and SMS.\n System.Net.Security.SslStream sslStream = new System.Net.Security.SslStream(\n netStream, \n false, \n new System.Net.Security.RemoteCertificateValidationCallback(ValidateServerCertificate));\n sslStream.AuthenticateAsClient(reqUrl.Host);\n\n\n // POST content we are going to transmit over the SSL channel. \n // See. http://zeepmobile.com/developers/documentation/messaging/2008-07-14/rest_api#send_message\n System.IO.StreamWriter s = new System.IO.StreamWriter(sslStream);\n s.WriteLine(String.Format(\"POST {0} HTTP/1.1\", \"/api/blast\"));\n s.WriteLine(String.Format(\"Host: {0}\", \"api.zeepmobile.com\"));\n s.WriteLine(String.Format(\"Authorization: Zeep {0}:{1}\", API_KEY, b64Mac));\n s.WriteLine(String.Format(\"Date: {0}\", http_date));\n s.WriteLine(String.Format(\"Content-Type: {0}\", \"application/x-www-form-urlencoded\"));\n s.WriteLine(String.Format(\"Content-Length: {0}\", parameters.Length));\n s.WriteLine(String.Format(\"{0}\", parameters));\n s.Flush();\n\n\n System.IO.StreamReader r = new StreamReader(sslStream);\n string resp = r.ReadToEnd();\n Console.WriteLine(resp);\n r.Close();\n\n }\n\n // The following method is invoked by the RemoteCertificateValidationDelegate.\n // We want to make sure the SSL has no Policy errors and is safe.\n public static bool ValidateServerCertificate(\n object sender,\n X509Certificate certificate,\n X509Chain chain,\n SslPolicyErrors sslPolicyErrors)\n {\n if (sslPolicyErrors == SslPolicyErrors.None)\n return true;\n\n Console.WriteLine(\"Certificate error: {0}\", sslPolicyErrors);\n\n // Do not allow this client to communicate with unauthenticated servers.\n return false;\n }\n\n }\n\n public static class Extensions\n {\n public static byte[] ToByteArray(this string input)\n {\n UTF8Encoding encoding = new UTF8Encoding();\n return encoding.GetBytes(input);\n }\n\n public static string ToBase64String(this byte[] input)\n {\n return Convert.ToBase64String(input);\n }\n }\n}\n```\n\n\n\n## Error\n\n\n\nWhat is happening when I run this code is the error shown in the following image.\n\n![alt text](https://aboutdev.files.wordpress.com/2009/02/error400.jpg)\n"},"Title":{"kind":"string","value":".NET code for SMS"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-09T01:40:43.373"},"LastActivityDate":{"kind":"string","value":"2009-02-09T20:53:24.570"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:11.560"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":64015,"string":"64,015"},"Tags":{"kind":"list like","value":["c#","sms"],"string":"[\n \"c#\",\n \"sms\"\n]"}}},{"rowIdx":250,"cells":{"Id":{"kind":"number","value":527198,"string":"527,198"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":527241,"string":"527,241"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":6,"string":"6"},"ViewCount":{"kind":"number","value":743,"string":"743"},"Body":{"kind":"string","value":"Can anybody please explain how this could possibly happen?\n\nI am completely aware of programming with thread safety in mind and as you can see I am catering for UI updates via a form InvokeRequired check here, everything has been working fine and no changes to break this that I am aware, and now suddenly just as I'm programming other parts of the application (perhaps added to this method at one stage? I just can't remember) I intimitently, receive this error:\n\n![alt text](https://dl.getdropbox.com/u/477279/Stackoverflow/invokeIssue.gif)\n\nFirstly, if InvokeRequired = true, that should mean BeginInvoke() executed, the method is [queued] to be re-called and InvokeRequired should equal false?\n\nI should not receive this exception as it should be catered for?\n\nHope to hear from some multi threading guru's :)\n\nGraham\n"},"Title":{"kind":"string","value":"Impossible (how I hate to use this word) cross threading error?"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-09T05:43:51.450"},"LastActivityDate":{"kind":"string","value":"2009-04-28T17:34:11.057"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:11.903"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":41211,"string":"41,211"},"Tags":{"kind":"list like","value":[".net","multithreading"],"string":"[\n \".net\",\n \"multithreading\"\n]"}}},{"rowIdx":251,"cells":{"Id":{"kind":"number","value":527209,"string":"527,209"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"null"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":3,"string":"3"},"ViewCount":{"kind":"number","value":5118,"string":"5,118"},"Body":{"kind":"string","value":"In Sharepoint document library, when we create a new document library, the default view is 'All Document'. This one:\n\n![alt text](https://i592.photobucket.com/albums/tt5/astri_kusumawardani/crm/docLib_allDOcView_500.jpg)\n\nWe can make a custom view from (at the upper right corner of document library view). I created a new standard view and named it 'Chromed View'. I edited it, then I saw that this view only applied on current document library:\n\n![alt text](https://i592.photobucket.com/albums/tt5/astri_kusumawardani/crm/docLib_chromedView_500.jpg)\n\nThe other document libraries cannot use this view.\n\nI develop a system that triggers document library creation from CRM (the document library's view from CRM Iframe is using that chromed view). The creation itself went well, I can create document library using Sharepoint web services. But I still cannot apply a custom view automatically for that newly created doc lib.\n\nMy question is, can we make a view that is global (not in one document library only) so that we can use that global view for any document library.\n\nThanks b4 for any opinion :) \n"},"Title":{"kind":"string","value":"Global Customized View for Document Libraries in Sharepoint"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"null"},"CreationDate":{"kind":"string","value":"2009-02-09T05:53:00.367"},"LastActivityDate":{"kind":"string","value":"2012-05-31T13:50:56.690"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:12.567"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":61773,"string":"61,773"},"Tags":{"kind":"list like","value":["sharepoint"],"string":"[\n \"sharepoint\"\n]"}}},{"rowIdx":252,"cells":{"Id":{"kind":"number","value":528883,"string":"528,883"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":529063,"string":"529,063"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":4,"string":"4"},"ViewCount":{"kind":"number","value":5626,"string":"5,626"},"Body":{"kind":"string","value":"How can I re-direct the user to the standard SharePoint \"access denied\" page, similar to the image below?\n\nCurrently, I am throwing an UnauthorizedAccessException, but this error message is not as elegant as SP message.\n\n```\nthrow new UnauthorizedAccessException(\"User does not have permission to access this list\");\n```\n\n\nAny help will be highly appreciated.\n\n![alt text](https://lh5.ggpht.com/_6g8ldcvIElU/SjdcWxseJAI/AAAAAAAADXM/r_rAIKUTHeI/s400/SharePoint%20-%20Access%20Denied.JPG)\n"},"Title":{"kind":"string","value":"How to display a standard SharePoint \"Access Denied\" message"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-09T16:35:14.207"},"LastActivityDate":{"kind":"string","value":"2009-06-16T08:50:24.160"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:12.907"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":55503,"string":"55,503"},"Tags":{"kind":"list like","value":["c#","sharepoint","exception"],"string":"[\n \"c#\",\n \"sharepoint\",\n \"exception\"\n]"}}},{"rowIdx":253,"cells":{"Id":{"kind":"number","value":529498,"string":"529,498"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"null"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":11,"string":"11"},"ViewCount":{"kind":"number","value":45207,"string":"45,207"},"Body":{"kind":"string","value":"I looking for a GUI Builder for python\n\ni know it exist, can see it in this image background \n\n![Image](https://i.stack.imgur.com/cOzBl.gif)\n"},"Title":{"kind":"string","value":"GUI Builder for Python"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-09T19:25:11.053"},"LastActivityDate":{"kind":"string","value":"2013-02-18T09:52:51.520"},"LastEditDate":{"kind":"string","value":"2013-02-18T09:52:51.520"},"LastEditorUserId":{"kind":"number","value":1931274,"string":"1,931,274"},"OwnerUserId":{"kind":"null"},"Tags":{"kind":"list like","value":["python"],"string":"[\n \"python\"\n]"}}},{"rowIdx":254,"cells":{"Id":{"kind":"number","value":533462,"string":"533,462"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":534660,"string":"534,660"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":2,"string":"2"},"ViewCount":{"kind":"number","value":1967,"string":"1,967"},"Body":{"kind":"string","value":"![alt text](https://farm4.static.flickr.com/3352/3270044482_610eee066a.jpg?v=0)\n\nI am using the autocomplete YUI feature. However, as you can see I am having trouble aligning the suggestion drop down with the text input when I put a label in front of the text input. I am following [the example here](http://developer.yahoo.com/yui/examples/autocomplete/ac_basic_array_clean.html) exactly except for this snippet of code where I simply replace the H3 with a label element in the form:\n\n```\n
\n\n \n
\n
\n\n\n```\n\n\n(I also had to change the data.js path from a relative to absolute path.)\n\nWhat is the best way to have the suggestion drop down to line up with the text input? I would like a solution that works on all popular modern browsers (FF3, Safari, Chrome, IE), plus IE6. \n"},"Title":{"kind":"string","value":"YUI autocomplete misalignment problem"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"null"},"CreationDate":{"kind":"string","value":"2009-02-10T18:01:14.250"},"LastActivityDate":{"kind":"string","value":"2009-11-24T13:37:09.527"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:13.923"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":32174,"string":"32,174"},"Tags":{"kind":"list like","value":["javascript","html","css","yui"],"string":"[\n \"javascript\",\n \"html\",\n \"css\",\n \"yui\"\n]"}}},{"rowIdx":255,"cells":{"Id":{"kind":"number","value":533650,"string":"533,650"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":533805,"string":"533,805"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":1,"string":"1"},"ViewCount":{"kind":"number","value":704,"string":"704"},"Body":{"kind":"string","value":"I have a sign-up form in my application with several UITextFields. In order to speed up the process I would like to add a next and previous button to a toolbar pinned above the keyboard and allow the user to \"tab\" between the fields using these buttons.\n\nI know I can navigate through the subviews collection on my view, but I was wondering if there was a cleaner way to do this?\n\nThis functionality is implemented in safari as seen in the following screenshot:\n\n![alt text](https://dl.getdropbox.com/u/22784/keyboardToolbar.png)\n"},"Title":{"kind":"string","value":"Next and Previous to navigate text fields"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"null"},"CreationDate":{"kind":"string","value":"2009-02-10T18:54:40.533"},"LastActivityDate":{"kind":"string","value":"2009-02-10T19:30:13.507"},"LastEditDate":{"kind":"null"},"LastEditorUserId":{"kind":"null"},"OwnerUserId":{"kind":"number","value":8918,"string":"8,918"},"Tags":{"kind":"list like","value":["iphone"],"string":"[\n \"iphone\"\n]"}}},{"rowIdx":256,"cells":{"Id":{"kind":"number","value":536676,"string":"536,676"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":543965,"string":"543,965"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":53,"string":"53"},"ViewCount":{"kind":"number","value":45005,"string":"45,005"},"Body":{"kind":"string","value":"I'm using the excellent JQuery UI to do a \"mapping\" so the user can \"map\"\npersons from one program to persons from other program.\n\nusing this simple JQuery:\n\n```\n$(document).ready(function() {\n $(\"div .draggable\").draggable({\n revert: 'valid',\n snap: false\n });\n\n $(\"div .droppable\").droppable({\n hoverClass: 'ui-state-hover',\n helper: 'clone',\n cursor: 'move',\n drop: function(event, ui) {\n $(this)\n .addClass('ui-state-highlight')\n .find(\"img\")\n .removeAttr(\"src\")\n .attr(\"src\", \"_assets/img/icons/check-user-48x48.png\");\n\n $(this).droppable('disable');\n\n $(ui.draggable)\n .addClass('ui-state-highlight')\n .find(\"img\")\n .removeAttr(\"src\")\n .attr(\"src\", \"_assets/img/icons/check-user-48x48.png\");\n\n $(ui.draggable).draggable('disable');\n }\n });\n\n $(\"div .droppable\").bind(\"dblclick\", function() {\n $(this)\n .removeClass('ui-state-highlight')\n .find(\"img\")\n .removeAttr(\"src\")\n .attr(\"src\", \"_assets/img/icons/user-48x48.png\");\n $(this).droppable('enable');\n\n EnableSource($(this));\n });\n});\n```\n\n\nI get to this:\n\n![alt text](https://i.stack.imgur.com/Cyynb.png)\n\n was (if possible) create a line between \n and so it makes the connection between them clear.\n\nI can always do it with numbers inside the boxes, but I really \nwanted to know how to do this using the lines.\n\n.\n"},"Title":{"kind":"string","value":"How to draw a line between draggable and droppable?"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-11T13:08:37.720"},"LastActivityDate":{"kind":"string","value":"2015-05-11T04:57:50.297"},"LastEditDate":{"kind":"string","value":"2015-05-11T04:56:47.270"},"LastEditorUserId":{"kind":"number","value":28004,"string":"28,004"},"OwnerUserId":{"kind":"number","value":28004,"string":"28,004"},"Tags":{"kind":"list like","value":["jquery","html","jquery-ui","drawing","svg"],"string":"[\n \"jquery\",\n \"html\",\n \"jquery-ui\",\n \"drawing\",\n \"svg\"\n]"}}},{"rowIdx":257,"cells":{"Id":{"kind":"number","value":538244,"string":"538,244"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":538334,"string":"538,334"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":12,"string":"12"},"ViewCount":{"kind":"number","value":10234,"string":"10,234"},"Body":{"kind":"string","value":" I have HTML markup to deal with that consists of multiple tables nested inside another table. I would like the \"inner tables\" to all be the same width. I would also like all of the \"inner tables\" to be no wider than the width of the widest \"inner table\" in its natural state.\n\nI do want to simply set the width of all the tables to some fixed percentage, as I do not know in advance what the width of the widest \"inner table\" should be until the HTML page is actually generated.\n\n![Here is a visual example](https://upload.wikimedia.org/wikipedia/en/0/00/Erasene-screen001.png)\n\n[https://en.wikipedia.org/wiki/File:Erasene-screen001.png](https://en.wikipedia.org/wiki/File:Erasene-screen001.png)\n\nI want all tables to be the same width as inner-table-zero. Currently, none of the tables have an assigned width, and that's the way I like it, because I want all inner tables to naturally choose the width of whichever table is widest by default.\n\n Is there any CSS or JQuery or Javascript trick anyone knows that will obtain this desired styling?\n\n I'm about to delete this question because people seem to want to downvote me for not having a good reason for not wanting 100%. I have a good reason ... I also do not know until runtime table will be the \"outermost\" table (this is a recursively-generated structure of potentially unlimited depth).\n"},"Title":{"kind":"string","value":"How to get multiple separate HTML tables to all be the same width as the widest table"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-11T18:58:12.170"},"LastActivityDate":{"kind":"string","value":"2017-09-19T19:27:54.130"},"LastEditDate":{"kind":"string","value":"2017-09-19T19:27:54.130"},"LastEditorUserId":{"kind":"number","value":42223,"string":"42,223"},"OwnerUserId":{"kind":"number","value":42223,"string":"42,223"},"Tags":{"kind":"list like","value":["html","css","user-interface","html-table"],"string":"[\n \"html\",\n \"css\",\n \"user-interface\",\n \"html-table\"\n]"}}},{"rowIdx":258,"cells":{"Id":{"kind":"number","value":541320,"string":"541,320"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":541349,"string":"541,349"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":0,"string":"0"},"ViewCount":{"kind":"number","value":266,"string":"266"},"Body":{"kind":"string","value":"I'm probably thinking about this all wrong but I have the following db tables:\n\n![alt text](https://1ponbw.bay.livefilestore.com/y1pUw3xaKZ7RhtNS3GiC5F1NYMad5ZeYI8Wh-jZ8CDajt7MiKO-6vhVmEm8VhlXMkDZTQz9t5gP4gnskgbvDtAYTA/DBImage.jpg)\n\nWhen I run the EF Wizard in VS2008 I get the following model:\n\n![alt text](https://1ponbw.bay.livefilestore.com/y1pY5xK0aw6ckqcY5IPaIc45Rfjhy-CSMpdd_l4z-4mMGKbhd5N9VIySd72t-0LXBkYseQY0D2W5mEUUaDzhntcQA/EFImage.jpg)\n\nYou'll notice that in the EF model shows that the Entity has no field for EntityTypeID or EntityStatusId. Instead it shows it as a navigation property, so the field appears to not be addressable when I instantiate an Entity (pardon the terminology confusion: Entity is a Table/Class in my name space not in the EF namespace). How can I assign an EntityTypeID and StatusTypeID when instantiating an Entity?\n"},"Title":{"kind":"string","value":"Entity Framework: Model doesn't reflect DB"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"null"},"CreationDate":{"kind":"string","value":"2009-02-12T13:50:23.040"},"LastActivityDate":{"kind":"string","value":"2009-02-12T14:40:01.313"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:18.860"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":48172,"string":"48,172"},"Tags":{"kind":"list like","value":["entity-framework"],"string":"[\n \"entity-framework\"\n]"}}},{"rowIdx":259,"cells":{"Id":{"kind":"number","value":541545,"string":"541,545"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":559018,"string":"559,018"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":9,"string":"9"},"ViewCount":{"kind":"number","value":3300,"string":"3,300"},"Body":{"kind":"string","value":"When you have a table with a Geometry type field (or Geography), you can call the `Reduce()` function to have the shapes reduced in number of vertices. Works very nicely. However, when sevral of the polygons are adjacent (they share parts of their borders), the reduced polygons do not necessarily do so. \n\n\n## Example\n\n\n\nThe SQL batch:\n\n```\nCREATE TABLE #Shapes (\nshape geometry,\nnaam varchar(50)\n )\n\n-- exact:\ninsert into #Shapes (naam, shape) VALUES ('Area A',Geometry::STGeomFromText('POLYGON ((52.084744368912652 5.1304192959796637, 52.085234231548384 5.1304194002877921, 52.085474282948049 5.1304486630822, 52.0857341082301 5.1304792705923319, 52.086134375073016 5.1306082883384079, 52.086594087770209 5.13079824927263, 52.087194303050637 5.1311187236569822, 52.089074697112665 5.1323992793913931, 52.089834430487826 5.1333390253130347, 52.090353938518092 5.1341692635323852, 52.090254480473 5.1342997345712416, 52.090824429301414 5.13520842681262, 52.09141399711384 5.1360295349486274, 52.091884278226644 5.1365492835175246, 52.092085719574243 5.1367767199408263, 52.092194211203605 5.1368992186617106, 52.092494247804545 5.1372492032188495, 52.092884057915427 5.13754907634854, 52.093083867570385 5.137679290259257, 52.093254011290028 5.1378082139755827, 52.093554640188813 5.1380093733314425, 52.094204571098089 5.1384683684445918, 52.094214495038614 5.1384888619650155, 52.093702809136488 5.1390791568504124, 52.0939114689827 5.1395669728517532, 52.0938675517682 5.1396009074524045, 52.093849835848111 5.1396084928439114, 52.093797143315896 5.1396473892964423, 52.093789743114428 5.1396500989447063, 52.093731224210721 5.13969055645838, 52.093728204024956 5.1396938753314316, 52.093717452138662 5.1397007238119841, 52.09355255169794 5.139717671321705, 52.093311328208074 5.1395945930853486, 52.093306955655407 5.1395602072316251, 52.093115365831181 5.1400826557073742, 52.093052050564438 5.1401469679549336, 52.092979203676805 5.1401289247442037, 52.092756105586886 5.1398569964803755, 52.092737412561 5.1397823067194368, 52.09235419591127 5.1398883965623128, 52.092214386788811 5.1400686172528616, 52.092164272349919 5.1401695687556135, 52.09208471653983 5.1403786691371351, 52.0920239102561 5.1405293103307486, 52.091924546519294 5.1407297900877893, 52.091534494888037 5.1407990844454616, 52.091654436912947 5.1401591910829172, 52.091713753540262 5.1397284107361845, 52.091763769509271 5.1391488309018314, 52.091774359305148 5.1390583129178058, 52.09170373348757 5.1383788494901648, 52.0907391263172 5.1386201300192624, 52.090711282333359 5.1385075189173222, 52.090718721970916 5.1384486802853644, 52.090745792724192 5.1383893731981516, 52.090758387919244 5.1383728119598793, 52.090776969445869 5.1383237342815846, 52.090780415022657 5.1383173598065737, 52.090745287947357 5.1382717578671873, 52.090742629869759 5.1382662602414895, 52.090704807080328 5.1382211977615952, 52.0906867091544 5.1381677808240056, 52.090701617482885 5.1380081428639635, 52.090564404382455 5.138029116065514, 52.09062412660569 5.1386488282587379, 52.090704361908138 5.1396187201607972, 52.09069472597912 5.1397384563460946, 52.090674098813906 5.1398086878471076, 52.090624484543433 5.1397491229489587, 52.090589968811038 5.1397359627815975, 52.090441891923547 5.140045978827402, 52.090305342804641 5.1400443047750741, 52.0902322656475 5.139729289803654, 52.090199632104486 5.1394877941347659, 52.090188750764355 5.1393666968215257, 52.0902532400633 5.1393868076773792, 52.09003754449077 5.1387802169192582, 52.090024582457204 5.1386965749382565, 52.090020758565515 5.1386840578634292, 52.0900124781623 5.1386172670806785, 52.090003480669111 5.1385827830526978, 52.08999918546494 5.1385372205978728, 52.089985796017572 5.1384773049503565, 52.089996868744493 5.1384535257238895, 52.090046249330044 5.138385351980105, 52.090212456043091 5.1382693609882955, 52.090183896290647 5.1379786310671935, 52.090166853580648 5.1378115779987894, 52.0899735938292 5.137785307597369, 52.089885840192437 5.1377143466379493, 52.08985487697646 5.137671007309109, 52.089845903217793 5.1376524229999632, 52.089844238944352 5.1376464897766709, 52.089850628050044 5.1375868958421052, 52.089852778393364 5.137576853302618, 52.089863699774533 5.1374888862706634, 52.089867451693863 5.1373642447870225, 52.089883847394958 5.1373361134901643, 52.089941705111414 5.1372730266302824, 52.090002277167514 5.1372403032146394, 52.090108146462811 5.1372361269295483, 52.09006458793673 5.1368091938053615, 52.089683820260689 5.1369396857917309, 52.089193989204269 5.1364887236994123, 52.088854428613558 5.1373995044268668, 52.088474480202422 5.1383894786704332, 52.088474343996495 5.1383894337341189, 52.088464433038652 5.1383690948872287, 52.088414154422111 5.13834898790222, 52.088394471909851 5.1383694768883288, 52.0883943233639 5.1383694719988853, 52.08832395415709 5.1382487505018526, 52.087933741509914 5.1377592226490378, 52.087544413445592 5.1372594955892383, 52.087484167695806 5.1372292107739481, 52.087364645209163 5.1372284211684018, 52.0869538753575 5.1372190437554366, 52.085683952551335 5.1372596949804574, 52.085304662585258 5.137269108556211, 52.085084051657141 5.1370588609653955, 52.084904317976907 5.137469710316509, 52.084444417446747 5.1384497439414369, 52.084454428168293 5.1385195698547266, 52.084484005579725 5.1385092278942466, 52.084537888644263 5.1385357407853007, 52.084511198022149 5.1389506391238067, 52.084534639492631 5.1391157133039087, 52.084215438459069 5.139372929232195, 52.084103818604156 5.1389697602953825, 52.083964082412422 5.1391396226827055, 52.083963935496286 5.139139630831778, 52.083883681101725 5.1390291205607355, 52.083994359437455 5.1386593720505784, 52.084013982437057 5.1385892418004318, 52.084053878448593 5.1383293403318735, 52.084054407430678 5.1377297231794907, 52.084053982747719 5.1375283871311694, 52.084063940448686 5.1371387927792966, 52.084070490673184 5.13703247718513, 52.084070608951151 5.1370323959272355, 52.084217049471441 5.1370617711960529, 52.0842700656977 5.1370595147110754, 52.084318579515468 5.1370449147663777, 52.084365648221834 5.137017846536426, 52.084410294202549 5.1369791406907863, 52.084451525192954 5.1369308069453, 52.084497402298688 5.1368615722581685, 52.084511263761669 5.1368357082828879, 52.084539652187722 5.1367929205345337, 52.084559679031372 5.1367565956898034, 52.084580525973493 5.1367251129565776, 52.0845936126653 5.1367018828692963, 52.084593039704487 5.1366802926640958, 52.084593520236 5.1366613829106731, 52.084592797560617 5.136602794053033, 52.0845930285151 5.1365417347624449, 52.084591784281656 5.1365062294062227, 52.084592622431977 5.1364672367903337, 52.084591892315075 5.1364289335906506, 52.084595442516729 5.13633631542325, 52.084596794845957 5.1363224481129421, 52.084599652094766 5.13625919749029, 52.084600140111739 5.1362545876124468, 52.084603969780289 5.1361925578721053, 52.084604394622147 5.1361672168131918, 52.084607248043845 5.1361305358165161, 52.084609296828042 5.13606852098146, 52.084609103156254 5.1360535530839115, 52.084611643842678 5.1360064989442122, 52.08461217648793 5.1359452261162533, 52.084612038685009 5.1359415214974433, 52.084614087827504 5.1358594063203782, 52.084640604443848 5.1355516116600484, 52.084642857778817 5.135543460957706, 52.084982043160878 5.1354961035347806, 52.085083917947486 5.1345288194715977, 52.085104202153161 5.1343492493033409, 52.08524441709433 5.1330996853375064, 52.085165794240311 5.1330994283780456, 52.085158604676472 5.1330777355575146, 52.084887840552256 5.1328501671087, 52.084870130718066 5.1327825202649118, 52.084810143569484 5.132734818616882, 52.084766256157309 5.1326845148578286, 52.084753367166229 5.1326649976350005, 52.084720281418413 5.1326657184399664, 52.084673544857651 5.1326567681971937, 52.084627489326522 5.13263783371076, 52.084616634761915 5.1326309095602483, 52.084607382304966 5.1326056816615164, 52.084589018020779 5.1325388213153929, 52.084566780831665 5.1324195361230522, 52.08455663616769 5.1322953840717673, 52.084555578185245 5.1322289216332138, 52.084558193339035 5.1321669477038085, 52.084565328201279 5.1320932512171566, 52.084573237691075 5.1320388016756624, 52.084590001497418 5.1319514436181635, 52.084614846622571 5.1318454830907285, 52.084674907008818 5.1317076328407039, 52.084733415627852 5.1315451303962618, 52.084768428234277 5.1314570531469457, 52.084772500442341 5.131445026723668, 52.084790059469135 5.1313976899708305, 52.084790684864267 5.1313653332182225, 52.084789962507784 5.1313581170979887, 52.084786229995423 5.1313093374080232, 52.084781658835709 5.1312665985897183, 52.084776584757492 5.131205978570506, 52.084776126593319 5.1311985920700378, 52.084773858077824 5.1311737054493278, 52.084770929767942 5.1311195062007151, 52.084764682454988 5.1310441740788519, 52.084762406875207 5.1310067452953634, 52.084759807214141 5.1309909871779382, 52.084745739819482 5.1308908765204251, 52.084737451048568 5.1308199469931424, 52.084731393493712 5.1307550501078367, 52.084726219235463 5.130682019587562, 52.084717591805187 5.130595849588774, 52.084696356672794 5.1304316397290677, 52.084744368912652 5.1304192959796637))', 1) );\ninsert into #Shapes (naam, shape) VALUES ('Area B', Geometry::STGeomFromText('POLYGON ((52.089193944586441 5.1364884474314749, 52.089683880347387 5.1369394774090678, 52.090064640389755 5.1368089618626982, 52.090064767515287 5.13680902402848, 52.090108351781964 5.1372362461406738, 52.0900023451254 5.137240494616317, 52.089941830607358 5.1372731845887953, 52.089884013120034 5.1373362265352416, 52.089867649300196 5.13736428650584, 52.089863897534087 5.1374888976570219, 52.089852973818779 5.1375768855214119, 52.089850827719964 5.1375869208953633, 52.08984444080243 5.1376464707614575, 52.089846089016071 5.1376523461555816, 52.089855048116348 5.13767090524721, 52.089885986401136 5.1377142074887443, 52.089973680692943 5.137785122508185, 52.090167043032125 5.1378114717081189, 52.090184094849974 5.1379786091856658, 52.090212659211829 5.138269433286041, 52.090046387117965 5.1383854977954284, 52.089997038751484 5.1384536319841185, 52.089986001565585 5.1384773087642488, 52.0899993844796 5.138537187827751, 52.090003677353721 5.1385827515141784, 52.0900126749184 5.1386172289494425, 52.090020956756526 5.1386840232833055, 52.0900247762911 5.1386965326964855, 52.090037737332914 5.1387801609122805, 52.090253500966355 5.1393869426101446, 52.090253373142332 5.1393870580941439, 52.09018895904866 5.1393668668649326, 52.09019982968524 5.1394877681651483, 52.090232462748588 5.1397292593531256, 52.090305473417473 5.1400441225035083, 52.090441768325739 5.1400458008552627, 52.0905898406636 5.1397357748355716, 52.090624607168138 5.1397489595692605, 52.090674059544682 5.1398083794509937, 52.090694529374325 5.1397384163970843, 52.090704163346672 5.1396187301667995, 52.0906239267189 5.1386488468750029, 52.090564216952771 5.1380289690569043, 52.090701825218275 5.138007998932153, 52.090686907175666 5.1381677433547006, 52.090704979235063 5.1382210930865915, 52.090742795495316 5.13826614478603, 52.090745454392028 5.1382716438933382, 52.090780634433031 5.138317345874384, 52.090777151606311 5.1383238151729582, 52.090758565347642 5.1383729032240808, 52.090745967798135 5.1383894728374937, 52.090718918413778 5.1384487237036574, 52.09071148235433 5.1385074989634694, 52.090739235906476 5.1386199161658359, 52.091703911079094 5.1383786785881966, 52.091774561209604 5.1390583219472319, 52.091763966455993 5.1391488551129392, 52.091713952366263 5.1397284283302724, 52.091654634801671 5.1401592225302011, 52.091534660555041 5.1407988700928273, 52.091924405223438 5.1407296329252166, 52.092023730557614 5.1405292234111544, 52.092084533682055 5.1403785903667165, 52.092164086876437 5.1401694919914007, 52.092214212752879 5.1400685210246593, 52.092354092746973 5.1398882211651653, 52.092737518250942 5.1397820895072073, 52.092756280866688 5.1398568955139261, 52.092979332917338 5.1401287692562034, 52.093051998862443 5.14014675848039, 52.093115186976668 5.1400825616937738, 52.093306944705546 5.1395597066730261, 52.093307103263214 5.139559774659574, 52.093311476645688 5.1395944439214718, 52.093552575019729 5.1397174675798443, 52.093717376162488 5.1397005364784905, 52.093728081547653 5.1396937158987059, 52.093731097411364 5.1396904007997364, 52.093789641978219 5.1396499255206436, 52.09379703433958 5.139647218074332, 52.093849730910733 5.139608321711421, 52.0938674450952 5.1396007388582916, 52.093911277158938 5.13956686834194, 52.093702596845105 5.1390791060402989, 52.094214342534542 5.1384887341409922, 52.094234085874632 5.1384696427267045, 52.094364419566851 5.1384893088412067, 52.094364145770669 5.1383595434017479, 52.094394268468022 5.1381287302356213, 52.09443390479516 5.138148912037261, 52.094484106955747 5.1381194878988437, 52.094514668919146 5.1380682252347469, 52.094674076435417 5.1382088991813486, 52.095094393635229 5.1384881954232995, 52.0952940530714 5.1385585838544232, 52.095604252303019 5.1385889891535044, 52.095554116032766 5.1386696371579523, 52.095534724403237 5.1388492132525849, 52.095524277190037 5.1390082753444624, 52.095594465266913 5.1390487975440919, 52.095594199141487 5.1393494226504117, 52.09559461963309 5.1399783839006, 52.095604153974683 5.1410990775805754, 52.095644179129778 5.1413294123732438, 52.09575448022224 5.1416396433487535, 52.095824270925078 5.1419194503811445, 52.096084321906162 5.1429293346052836, 52.096143952025322 5.1430793148784755, 52.096264120657 5.1433793206233531, 52.096193926805284 5.1433798011214318, 52.096113997035054 5.14339920294765, 52.096024247104872 5.1434492955148228, 52.095944452364236 5.1435387324349744, 52.095874538511147 5.14362958598761, 52.095844099589421 5.143679338650661, 52.095844470186279 5.1438587997111922, 52.095854729064243 5.1440396906996444, 52.095894579105732 5.1441883100385768, 52.095964113250375 5.144369007088244, 52.09580374216273 5.144229786732418, 52.095674295010134 5.1441983953353239, 52.095563816432822 5.14421941922198, 52.095403983902024 5.1442888717546564, 52.095254029380158 5.1443597327452153, 52.094414402963594 5.1447291097138077, 52.094194360597214 5.1448091029165, 52.093554132385179 5.1451087987516075, 52.09298392268829 5.14536870829761, 52.092384074527615 5.1456389861371825, 52.091314621968991 5.1461291963244005, 52.091214230906282 5.1462493549551356, 52.091174073517323 5.1464188823010772, 52.0911739426665 5.146418813848868, 52.09113409327086 5.1462687528401041, 52.091084660668564 5.146199182483377, 52.091033940669149 5.1464488115161657, 52.090953806928624 5.1464084108564867, 52.090854425442245 5.1464496781230418, 52.089684411417693 5.1471287335734814, 52.0895846124041 5.1471190678897267, 52.088994233263378 5.1476095448153067, 52.088864096673205 5.1477386702317744, 52.088784483494237 5.1475289191585034, 52.088713807872537 5.1472491544173726, 52.088664193741309 5.1471487923554067, 52.088594123489734 5.1471287621828763, 52.088524112701435 5.1471597642893574, 52.088323859963566 5.1472586041782051, 52.088194384938106 5.1472490853630006, 52.088083737995476 5.147229231428355, 52.087984558660537 5.1470896604005247, 52.0871439545881 5.144788873847574, 52.086584153570342 5.1431184258301306, 52.086113808001116 5.1425490758657, 52.085764196002856 5.142129332292825, 52.085273851326242 5.1414594290601263, 52.084604130359367 5.1405483337584883, 52.08448414108716 5.1403388837352395, 52.084363697096705 5.1399091542698443, 52.084215331124142 5.1393728284165263, 52.084534444796994 5.1391156225659822, 52.084510998101905 5.1389506384730339, 52.084537685041475 5.1385358115798789, 52.084483979582181 5.1385094355204064, 52.084454281721264 5.138519779080525, 52.084444217151031 5.1384497005492449, 52.084904137838336 5.1374696237373572, 52.08508396637626 5.1370586035773158, 52.085304709049147 5.1372689084542849, 52.085683944402767 5.1372594968589222, 52.08695387118496 5.1372188439127058, 52.087364651495307 5.1372282228088277, 52.087484228890389 5.137229019543156, 52.087544555542991 5.1372593543492258, 52.087933897256818 5.1377590987963755, 52.088324117939919 5.1382486345246434, 52.088394418613781 5.138369242607296, 52.088414155179635 5.1383487726561725, 52.0884645585902 5.1383689332287759, 52.0884744236222 5.1383891381781037, 52.088854240353591 5.1373994332191018, 52.089193944586441 5.1364884474314749))', 1) );\ninsert into #Shapes (naam, shape) VALUES ('Area C', Geometry::STGeomFromText('POLYGON ((52.081104027922265 5.1258389879949391, 52.081314665614627 5.1259588550310582, 52.082414517994039 5.1266395719721913, 52.082954646321014 5.1270186660112813, 52.083513987367041 5.127549389610067, 52.083794155623764 5.1278395495610312, 52.084174386574887 5.1282589976908639, 52.084274505455781 5.1284189013796713, 52.08453426125925 5.1288288246141747, 52.085124507819643 5.1299386160409242, 52.08521465482071 5.1300693768952019, 52.0853342462746 5.1301182725468744, 52.0854241597699 5.1300988405710086, 52.0854743384989 5.1304488354362547, 52.085234220619661 5.130419600171515, 52.084744388967557 5.1304194940048324, 52.08439406089019 5.1305090384557843, 52.083914360133932 5.1306285039224422, 52.083414051565342 5.1307787221157923, 52.082813916262239 5.13094844610896, 52.082724283281529 5.1306586048111562, 52.082483787322417 5.1300093204481527, 52.08225411306649 5.1293789464909949, 52.082194455789093 5.1292188489812043, 52.082134172902443 5.1291885531973094, 52.082084508962 5.1290896165883169, 52.082023798371665 5.1288696515839547, 52.081883911043406 5.1281993770971894, 52.081856097793207 5.12798699515406, 52.081856237724423 5.1279869175050408, 52.082000762340613 5.1280515332473442, 52.082027135184035 5.1280940270517021, 52.0820355968099 5.1281161647869, 52.08205282002023 5.1281410993754166, 52.08213594150827 5.1278323108932256, 52.0820438895719 5.1277594091965328, 52.081953932996839 5.1277496579568833, 52.081884289887846 5.1271693162703134, 52.081813924670755 5.1270196131258938, 52.081552422139794 5.1268787173321471, 52.08152364961375 5.1267665265884057, 52.081485387952739 5.1266524291002371, 52.081442847483068 5.1265567842247837, 52.081396028901857 5.1264795880384764, 52.081344932177927 5.1264208389159505, 52.081293396464417 5.1263833287749234, 52.081279310281388 5.1263776289997622, 52.081249886541627 5.1263603481929749, 52.081222431567454 5.12633884719625, 52.081221418222412 5.1263384295161813, 52.081197269726545 5.126324187265709, 52.081195053295232 5.1263138890499249, 52.081184833077714 5.1262332251062617, 52.0811841667945 5.1261982778874859, 52.081168951815926 5.1261331316782162, 52.081164751928249 5.1260440781433525, 52.081066497950815 5.1259329431923106, 52.081104027922265 5.1258389879949391))', 1) );\ninsert into #Shapes (naam, shape) VALUES ('Area D', Geometry::STGeomFromText('POLYGON ((52.084103860426694 5.1389694481622428, 52.084363892148971 5.1399091025981294, 52.084484331319835 5.1403388143996294, 52.084604299141489 5.1405482272725367, 52.08527401345782 5.1414593127556145, 52.085764355740025 5.1421292096101565, 52.086113962111995 5.1425489480607212, 52.086584335425869 5.1431183374952525, 52.087144145466013 5.1447888108543749, 52.087984736636635 5.1470895681108679, 52.088083857744529 5.1472290623707631, 52.088194406595086 5.14724888795369, 52.088323822820605 5.1472584035787792, 52.088524032849818 5.14715958177112, 52.088594117900357 5.1471285563893616, 52.08866433496587 5.1471486398950219, 52.088713997742161 5.1472490890882909, 52.088784678140655 5.1475289016962051, 52.088534413350153 5.1477695436890123, 52.088604030199349 5.1479895326774567, 52.08846407078854 5.1481186849763318, 52.088304384844378 5.1482683648355305, 52.087993860917578 5.1484991029959017, 52.087834112113342 5.1486196045298129, 52.0874739959836 5.1487791088875383, 52.087183827068657 5.1488594498950988, 52.087034655727216 5.1488792099405627, 52.086844170233235 5.1489094072021544, 52.086553779430687 5.1488890685141087, 52.086283983197063 5.1488190072122961, 52.086004210880986 5.148699401849246, 52.085884556407109 5.148648968199268, 52.085783737245947 5.148579464526847, 52.085444359574467 5.1483186569530517, 52.08505431888625 5.147909271530807, 52.085063869832084 5.14774867403321, 52.085103993769735 5.1475894195027649, 52.085123664481678 5.1475485048696683, 52.084903807879783 5.1472594002206034, 52.084644382136524 5.1469792136778958, 52.08418409107253 5.1464885615278035, 52.0837237383239 5.1459687419701368, 52.083234543621856 5.145409702023275, 52.082664410911732 5.1448292277490495, 52.082063829526305 5.1443087360821664, 52.082091124779964 5.1440836547198483, 52.081992223858833 5.1440890550147742, 52.08196270884946 5.14405638189055, 52.081944186007604 5.1439888756722212, 52.08194406144986 5.1439872064089114, 52.08192484639585 5.1439289392437786, 52.081920254660311 5.1439031759941996, 52.081906982464716 5.1438652367796749, 52.081898384261621 5.143827152704362, 52.081886463514792 5.1437939475605585, 52.081860758494884 5.143810536588699, 52.081833417158236 5.1438379039788957, 52.081759569933638 5.14407270308584, 52.0816137263635 5.1439596123534246, 52.081454453474372 5.1438598307431391, 52.081304313847795 5.14384896773845, 52.080264462672268 5.1430187125121805, 52.079664091113955 5.1425989381968975, 52.079524534521624 5.14249899610877, 52.079534315969795 5.1424492821097374, 52.079674492839317 5.1419992103874552, 52.079703816364884 5.1418385940623406, 52.079714205814525 5.141648898134008, 52.079727753764018 5.1414623958989978, 52.080252137147674 5.1417998058748831, 52.08029427562046 5.1417563394152745, 52.080314928898588 5.1417286938522011, 52.0803562682122 5.1416860464960337, 52.080404439009726 5.1416505186352879, 52.080450373701751 5.1416298456024379, 52.080458209152553 5.1416284950795994, 52.080495744477957 5.141600257018581, 52.080541761592031 5.141581037081778, 52.080577370766676 5.1415776146752092, 52.080586124956035 5.1415745182313319, 52.080565002281219 5.1411468000151217, 52.080635850084946 5.1411388639826328, 52.081214110314008 5.1410789246463136, 52.081586783519015 5.1409964717458934, 52.081614242866635 5.1412574960850179, 52.081570835318416 5.1413511682767421, 52.08156742547277 5.1413547724810877, 52.081523078051127 5.1414396720759816, 52.081520885843375 5.1414458907124478, 52.0815235725604 5.1414493722841144, 52.081564587075263 5.1415304632391781, 52.081586116692051 5.1416122366208583, 52.081591385416651 5.1417623861789625, 52.081744097638875 5.1417384068481624, 52.081754462670077 5.14239915706246, 52.081888611945665 5.1424242914485125, 52.081887235166505 5.1422738104593009, 52.081907565006986 5.1422072551213205, 52.081948822597042 5.1421398329548538, 52.081990273194968 5.1420943139491024, 52.082000561989844 5.1420720012392849, 52.082041298272088 5.1420040489174426, 52.08205503895892 5.1419854623652519, 52.082057312844228 5.1419532595345077, 52.082057383609936 5.141936854692176, 52.082061406905325 5.1418724298121266, 52.082061399472877 5.1418698709458113, 52.082065169426741 5.1418023992023132, 52.08206505025737 5.1417857583146542, 52.082067978335544 5.1417265709023923, 52.082068552136519 5.1417210444026873, 52.08207146529282 5.1416510321596576, 52.082074348499624 5.1415691960222105, 52.082074102712795 5.1415587870869786, 52.082077217031589 5.141500341455882, 52.082077142713729 5.1414836310842942, 52.082064611044075 5.1414689618560345, 52.08204338257201 5.1414488023146987, 52.0820095549712 5.1414023755017455, 52.08195383178483 5.1413428048418419, 52.0819458400365 5.1413370133377612, 52.081897551489291 5.141270585100548, 52.081845151958987 5.1412304241675884, 52.081783577566966 5.1409387167077512, 52.082063805446388 5.1408189585007031, 52.082534100375206 5.1404983382591407, 52.082604082068428 5.1404395992867649, 52.082693810134288 5.1403690781753832, 52.083284175475136 5.1398683352445742, 52.083963928950048 5.1391394941752653, 52.084103860426694 5.1389694481622428))', 1) );\n\nselect naam, shape, shape.Reduce(0.001) as reducedShape from #Shapes\n\ndrop table #Shapes\n```\n\n\nThis returns two sets of polygons. First the unreduced set:\n\n![alt text](https://www.xs4all.nl/~teund/stackoverflow/areas1.png)\n\nThen the reduced set:\n\n![alt text](https://www.xs4all.nl/~teund/stackoverflow/areas2.png)\n\nThese shapes are much simpler and they do have the rough shape correct, but what I would want is to have the border-parts still shared. So they have to be reduced together, in a way. \n\nI think you have to break them up into polylines first (from edge to edge), then Reduce the lines and then reassembling them to polygons again. I have no idea how to do this in T-SQL though.\n\nAny ideas?\n\n \nI've accepted alphadaogg's answer. Both current answers weren't entirely covincing to me, but alphadogg has certainly put in the most effort and I really appreciate any sharing of thoughts. So the bounty goes to him.\n\nI will follow-up with a self-answer later if I find a satisfying method. \n\n: I e-mailed with Isaac Kunen, Program Manager on the SqlServer Geo team. His helpfull response is below:\n\n> Your problem is not at all rare, but\n it isn't something we directly\n support: it's an operation that\n requires knowledge of the topology of\n your figures, and we don't have\n anything like this built in. \n Essentially, you don't want to store\n separate polygons for each\n neighborhood. Rather, you want to\n store curves representing portions of\n boundaries, and reuse these boundaries\n for multiple polygons. When you\n generalize, you generalize the shared\n boundary, and all dependent polygons\n are affected.You could build this yourself---as the\n posters in the thread you cite\n hint---but it may be real effort to do\n so.I don't know the third-party software\n you're using, but this is the other\n option. If you don't want a\n full-fledged GIS, you could use a\n package like the FME from Safe\n Software ([http://www.safe.com](http://www.safe.com)). The\n FME doesn't do general-purpose\n topology, but I believe it has enough\n functionality to do what you're\n looking for. See:\n [http://www.safe.com/products/desktop/under-the-hood.php#3b](http://www.safe.com/products/desktop/under-the-hood.php#3b).I hope this helps.Cheers,-Isaac\n"},"Title":{"kind":"string","value":"How would I generalize multiple adjacent polygons?"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-12T14:40:20.190"},"LastActivityDate":{"kind":"string","value":"2014-06-01T21:46:00.650"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:19.563"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":64963,"string":"64,963"},"Tags":{"kind":"list like","value":["sql-server","sql-server-2008","geolocation","geometry","geospatial"],"string":"[\n \"sql-server\",\n \"sql-server-2008\",\n \"geolocation\",\n \"geometry\",\n \"geospatial\"\n]"}}},{"rowIdx":260,"cells":{"Id":{"kind":"number","value":541839,"string":"541,839"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":543298,"string":"543,298"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":0,"string":"0"},"ViewCount":{"kind":"number","value":2238,"string":"2,238"},"Body":{"kind":"string","value":"I've inserted an image below showing were I currently stand (css version) and where I want to be (tabled based version).\n\nI originally created this layout with tables and I would like to move to a css based version. I have a long way to go.\n\nI'm using Blueprint CSS.\n\nCurrent issues:\n\n- - \n\n![https://lh3.ggpht.com/_wyoBVbEFXVg/SZRAGMj-ocI/AAAAAAAAAqw/O6T987pw6Dw/cssVsTable.gif](https://lh3.ggpht.com/_wyoBVbEFXVg/SZRAGMj-ocI/AAAAAAAAAqw/O6T987pw6Dw/cssVsTable.gif)\n\n```\n\n\n\n \n Heatmap using BluePrint\n \n \n \n \n \n\n\n\n
\n
\n
\n

\n Issuer Heatmap

\n
\n
\n \n
\n \n
\n
\n\n\n```\n\n"},"Title":{"kind":"string","value":"How do I format tabs in Blueprint CSS?"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-12T15:36:43.157"},"LastActivityDate":{"kind":"string","value":"2012-04-09T18:03:00.850"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:19.920"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":38613,"string":"38,613"},"Tags":{"kind":"list like","value":["css","blueprint-css"],"string":"[\n \"css\",\n \"blueprint-css\"\n]"}}},{"rowIdx":261,"cells":{"Id":{"kind":"number","value":546010,"string":"546,010"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":546140,"string":"546,140"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":1,"string":"1"},"ViewCount":{"kind":"number","value":1665,"string":"1,665"},"Body":{"kind":"string","value":"I'm trying to make a little gallery of some school works I've done in my animation class. I want to put 3 images on each line and they are all in divs because I did onion skin wrapping for a dropshadow on them. Unfortunately this makes them all just stick together in two lines across the page. But I want them specifically formatted so I tried to wrap a div of 480px wide around each set of 3. In IE this works great and it looks perfect. However in firefox it does this\n\n![](https://i.stack.imgur.com/TQgQR.jpg)\n\nI can't figure out why it is putting that one left aligned on the second line and therefore screwing up the order of the rest. Here's my code:\n\n```\n\n\n\n\nRyan Merl's Portfolio\n\n\n\n\n\n\n\n\n
\n

\n\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n\n\n```\n\n"},"Title":{"kind":"string","value":"Firefox doesn't align images correctly"},"ContentLicense":{"kind":"string","value":"CC BY-SA 4.0"},"FavoriteCount":{"kind":"null"},"CreationDate":{"kind":"string","value":"2009-02-13T13:54:27.250"},"LastActivityDate":{"kind":"string","value":"2019-03-01T20:02:53.963"},"LastEditDate":{"kind":"string","value":"2019-03-01T20:02:53.963"},"LastEditorUserId":{"kind":"number","value":4751173,"string":"4,751,173"},"OwnerUserId":{"kind":"number","value":2128,"string":"2,128"},"Tags":{"kind":"list like","value":["css","firefox","html"],"string":"[\n \"css\",\n \"firefox\",\n \"html\"\n]"}}},{"rowIdx":262,"cells":{"Id":{"kind":"number","value":547438,"string":"547,438"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":555522,"string":"555,522"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":3,"string":"3"},"ViewCount":{"kind":"number","value":397,"string":"397"},"Body":{"kind":"string","value":"We are using a UITextView with a dark background. As such we have made the text white color in order to be easier to read. The problem is the magnify window that pops up when you hold down your finger to move the insertion point uses white for the text color as well. This makes it impossible to see exactly where the insertion point is. \n\nIs it possible to independently control the text color used in the magnify window?\n\nHere is a screen shot illustrating the problem.\n\n![alt text](https://dl.getdropbox.com/u/22784/magnify-white.png)\n"},"Title":{"kind":"string","value":"How can I control the color of the text used in a magnify window?"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"null"},"CreationDate":{"kind":"string","value":"2009-02-13T19:57:35.737"},"LastActivityDate":{"kind":"string","value":"2009-02-17T04:20:29.300"},"LastEditDate":{"kind":"string","value":"2009-02-16T23:54:20.937"},"LastEditorUserId":{"kind":"number","value":714,"string":"714"},"OwnerUserId":{"kind":"number","value":8918,"string":"8,918"},"Tags":{"kind":"list like","value":["cocoa-touch"],"string":"[\n \"cocoa-touch\"\n]"}}},{"rowIdx":263,"cells":{"Id":{"kind":"number","value":549451,"string":"549,451"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":37389179,"string":"37,389,179"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":100,"string":"100"},"ViewCount":{"kind":"number","value":49224,"string":"49,224"},"Body":{"kind":"string","value":"I'm trying to create an activity that presents some data to the user. The data is such that it can be divided into 'words', each being a widget, and sequence of 'words' would form the data ('sentence'?), the ViewGroup widget containing the words. As space required for all 'words' in a 'sentence' would exceed the available horizontal space on the display, I would like to wrap these 'sentences' as you would a normal piece of text.\n\nThe following code:\n\n```\npublic class WrapTest extends Activity {\n /** Called when the activity is first created. */\n @Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n LinearLayout l = new LinearLayout(this);\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.FILL_PARENT,\n LinearLayout.LayoutParams.WRAP_CONTENT);\n LinearLayout.LayoutParams mlp = new LinearLayout.LayoutParams(\n new ViewGroup.MarginLayoutParams(\n LinearLayout.LayoutParams.WRAP_CONTENT,\n LinearLayout.LayoutParams.WRAP_CONTENT));\n mlp.setMargins(0, 0, 2, 0);\n\n for (int i = 0; i < 10; i++) {\n TextView t = new TextView(this);\n t.setText(\"Hello\");\n t.setBackgroundColor(Color.RED);\n t.setSingleLine(true);\n l.addView(t, mlp);\n }\n\n setContentView(l, lp);\n }\n}\n```\n\n\nyields something like the left picture, but I would want a layout presenting the same widgets like in the right one.\n\n![non-wrapping](https://fnord.se/android/01-have.png) \n\n![wrapping](https://fnord.se/android/01-want.png)\n\nIs there such a layout or combination of layouts and parameters, or do I have to implement my own ViewGroup for this?\n"},"Title":{"kind":"string","value":"Line-breaking widget layout for Android"},"ContentLicense":{"kind":"string","value":"CC BY-SA 4.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-14T17:56:13.057"},"LastActivityDate":{"kind":"string","value":"2022-05-24T18:41:42.713"},"LastEditDate":{"kind":"string","value":"2018-12-25T06:35:50.787"},"LastEditorUserId":{"kind":"number","value":1318946,"string":"1,318,946"},"OwnerUserId":{"kind":"number","value":2010,"string":"2,010"},"Tags":{"kind":"list like","value":["java","android","user-interface","layout"],"string":"[\n \"java\",\n \"android\",\n \"user-interface\",\n \"layout\"\n]"}}},{"rowIdx":264,"cells":{"Id":{"kind":"number","value":550845,"string":"550,845"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"null"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":0,"string":"0"},"ViewCount":{"kind":"number","value":831,"string":"831"},"Body":{"kind":"string","value":"I've been looking through the iPhone's UI catalog and cant seem to find what I'm looking for.\n\nEssentially I want a customizable version of the 'in call' menu as found on the iPhone so I can use my own icons and call my own functions. \n\nExample of 'in call' menu:\n\n![In-call menu](https://i.stack.imgur.com/CqtCG.jpg)\n\nUIAlertView is the nearest thing I have found to it but it is still a way off from what I want. A friend said that someone had coded an open source version but he couldn't recall where it was. I've looked but can't find it.\n\nAny ideas?\n"},"Title":{"kind":"string","value":"Recreating the call menu on the iPhone"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-15T13:10:55.670"},"LastActivityDate":{"kind":"string","value":"2013-07-20T03:40:13.677"},"LastEditDate":{"kind":"string","value":"2013-07-20T03:40:13.677"},"LastEditorUserId":{"kind":"number","value":707111,"string":"707,111"},"OwnerUserId":{"kind":"null"},"Tags":{"kind":"list like","value":["cocoa-touch"],"string":"[\n \"cocoa-touch\"\n]"}}},{"rowIdx":265,"cells":{"Id":{"kind":"number","value":553248,"string":"553,248"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":554109,"string":"554,109"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":3,"string":"3"},"ViewCount":{"kind":"number","value":3058,"string":"3,058"},"Body":{"kind":"string","value":"I'm trying to think an interface for a time-keeping system that will let users see \"at a glance\" how much time still needs to be completed.\n\nThis is complicated by the fact that there are no fixed hours - employees must work at least 6 hours on any given week day, and at the end of each month should have worked 7.5 hours for each week day that month. 7.5 hours either way can be carried over to next month. Employees can also take up to 1 morning and 1 afternoon per month 'flex' time. Time needs should be recorded by 10.15 the following day, but this rule is bent during busy times, and end of week and particularly end of month boundaries become more important.\n\nSo what's the most readable format to display the currently entered time and highlight approaching deadlines for uncompleted entries, while still giving a feeling for how far ahead/behind track the employee is (i.e. if you have a week to go that month and you're 8 hours ahead you could schedule a little extra duvet time).\n\nMy first take was a bar chart for each day with a red line at 6. But this doesn't give you any idea of how far ahead or behind you are for each day or month or whether you are close to missing a deadline...\n\n![bar chart](https://i.stack.imgur.com/YVeuA.png)(Please excuse the horrible mockup)\n\nMaybe I'm trying to convey too much info in one place?\n\n--\n\nHere's a mockup of time recorded v.s. time required as suggested by Dickon Reed\n![graph of time v.s. target](https://i.stack.imgur.com/BM8ev.png)\n\n-- \n\nEDIT: this side works great for stuff like this. i'm going to kick some of these ideas around in the morning and hopefully get something posted back here.\n"},"Title":{"kind":"string","value":"UI design for time tracking"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-16T13:08:55.683"},"LastActivityDate":{"kind":"string","value":"2014-07-03T19:46:37.467"},"LastEditDate":{"kind":"string","value":"2014-07-03T19:46:37.467"},"LastEditorUserId":{"kind":"number","value":1043380,"string":"1,043,380"},"OwnerUserId":{"kind":"number","value":12744,"string":"12,744"},"Tags":{"kind":"list like","value":["user-interface","ui-design"],"string":"[\n \"user-interface\",\n \"ui-design\"\n]"}}},{"rowIdx":266,"cells":{"Id":{"kind":"number","value":554561,"string":"554,561"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":12028699,"string":"12,028,699"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":2,"string":"2"},"ViewCount":{"kind":"number","value":231,"string":"231"},"Body":{"kind":"string","value":"I'm stuck right now with defining the dimension of each line. The list I want to scrape has various colors in it, and what disturbs me the most a selection:\n\n![Example](https://i.stack.imgur.com/Qapho.jpg)\n\nAs you can see the picture I try to analyze got a white background with green text. The selection background is grey with black text. And every second line has a slightly greyer background, but I managed to manipulate the contrast with a ColorMatrix. \n\nJust for reference, I do have some other ColorMatrizes like Greyscale, Negative, SetContrast, SetBrightness and so on.\n\nMy method, which is searching the lines does work good with the most part of the picture, but the selection brakes it.\n\nSo now I'm stuck and don't know what to do. I googled for an hour, but didn't find a solution.\n\n\n---\n\n\n\nI thought, that maybe I can transform the background grey from the selection to white without affecting the text and greyscale the rest of the picture. But I can't find a ColorMatrix which does the job. \n\nDo you know one or got a better solution?\n"},"Title":{"kind":"string","value":"OCR: How to find the right ColorMatrix to define new colors?"},"ContentLicense":{"kind":"string","value":"CC BY-SA 3.0"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-16T21:09:04.187"},"LastActivityDate":{"kind":"string","value":"2015-06-19T21:01:56.500"},"LastEditDate":{"kind":"string","value":"2015-06-19T21:01:56.500"},"LastEditorUserId":{"kind":"number","value":1159643,"string":"1,159,643"},"OwnerUserId":{"kind":"number","value":66674,"string":"66,674"},"Tags":{"kind":"list like","value":["colors","matrix","ocr"],"string":"[\n \"colors\",\n \"matrix\",\n \"ocr\"\n]"}}},{"rowIdx":267,"cells":{"Id":{"kind":"number","value":556747,"string":"556,747"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"null"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":4,"string":"4"},"ViewCount":{"kind":"number","value":1546,"string":"1,546"},"Body":{"kind":"string","value":"I have a UIViewController that allows me to view and edit information of a class.\n\nIt is only allocated once but it's number of rows,sections and data is passed to it depending on the value the user selected. \n\nFor example. Here it is editing a name & type property (Header view of table is too big.. I did this so you will see the weirdness underneath)\n\n![alt text](https://farm4.static.flickr.com/3235/3287818468_19a6292d5d.jpg?v=0)\n\nSo I enter a name and it all displays fine. Then I click on the address property and the detail view now looks like this:\n\n![alt text](https://farm4.static.flickr.com/3345/3286999031_2cc3a8a9b7.jpg?v=0)\n\nEverything Ok so far. If i click cancel and go back to edit the name property it displays fine. \nThe problem is this. I scroll down the address table like so:\n\n![alt text](https://farm4.static.flickr.com/3487/3287818072_f5b8255b2c.jpg?v=0)\n\nAnd then click save/cancel. Now when I go back to edit the name property, the tableview looks like this!\n\n![alt text](https://farm4.static.flickr.com/3596/3286998687_3d362759b3.jpg?v=0)\n\nIt's as though the previous table is still visible through the header view of the table..?\n\nMy viewWillAppear: method for this uiviewcontroller looks like this:\n\n```\n- (void)viewWillAppear:(BOOL)animated {\n\nNSLog(@\"Retain count of poolcopy is %d\\n\\n\", [self.thePoolFacilityCopy retainCount] );\n//This will be a reference to find our which pool Instance field we are editing.\nself.sectionFromParentTable = self.cellPath.section;\n//This will only be used by the arrays\nself.rowFromPreviousTable = self.cellPath.row;\n\nNSString *sectionName; \n\nswitch (self.sectionFromParentTable) {\n case KNameIndex:\n sectionName = @\"name\";\n\n break;\n case KAddressIndex:\n sectionName = @\"address\";\n\n break;\n case KPhoneNumberIndex:\n sectionName = @\"phone\";\n\n break;\n case KWebAddressIndex:\n sectionName = @\"url\";\n\n break;\n case KPricesIndex:\n sectionName = @\"prices\";\n\n break;\n case KPoolIndex:\n sectionName = @\"pools\";\n\n default:\n break;\n}\n\n\n\nself.title = [NSString stringWithFormat:@\"Editing %@\", sectionName];\n\n// use an empty view to position the cells in the vertical center of the portion of the view not covered by \n// the keyboard\n\n\nif (self.sectionFromParentTable == KPhoneNumberIndex || self.sectionFromParentTable == KWebAddressIndex) {\n\n UIView *singleSectionHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 60)];\n self.theTableView.tableHeaderView = singleSectionHeaderView;\n [singleSectionHeaderView release];\n\n self.theTableView.tableFooterView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 10)]autorelease];\n\n}\nelse if (self.sectionFromParentTable == KAddressIndex) {\n UIView *addressHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 0)];\n self.theTableView.tableHeaderView = addressHeaderView;\n [addressHeaderView release];\n\n self.theTableView.tableFooterView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 250)]autorelease];\n}\nelse if (self.sectionFromParentTable == KPoolIndex) {\n UIView *poolHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 2)];\n self.theTableView.tableHeaderView = poolHeaderView;\n [poolHeaderView release];\n\n self.theTableView.tableFooterView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 10)]autorelease];\n\n}\nelse {\n UIView *doubleSectionHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 30)];\n self.theTableView.tableHeaderView = doubleSectionHeaderView;\n [doubleSectionHeaderView release];\n\n self.theTableView.tableFooterView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 10)]autorelease];\n}\n\n\n\n[self.theTableView reloadData];\n```\n\n\n}\n\nIn the picture where the table looks messed up the cellForRowAtIndexPath method is only being called twice, even though there are 3 cells visible (2 normal cells and one weird cell). The weird cell moves with the scroll and is still clickable. \n\nI can fix this problem by commenting out the following lines in this method. However I don't want to have to allocate a new controller everytime someone wants to edit a detail:\n\n```\n- (PoolFacilityDetailEditController *)childController {\n // Instantiate the editing view controller if necessary.\n // if (childController == nil) {\n PoolFacilityDetailEditController *controller = [[PoolFacilityDetailEditController alloc] initWithNibName:@\"PoolFacilityDetailEditController\" bundle:nil];\n self.childController = controller;\n [controller release];\n // }\n return childController;\n}\n```\n\n"},"Title":{"kind":"string","value":"UITableView weirdness! with pictures"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"null"},"CreationDate":{"kind":"string","value":"2009-02-17T13:20:18.410"},"LastActivityDate":{"kind":"string","value":"2012-03-09T14:10:52.510"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:22.680"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":51420,"string":"51,420"},"Tags":{"kind":"list like","value":["iphone","objective-c","cocoa-touch","uitableview"],"string":"[\n \"iphone\",\n \"objective-c\",\n \"cocoa-touch\",\n \"uitableview\"\n]"}}},{"rowIdx":268,"cells":{"Id":{"kind":"number","value":560016,"string":"560,016"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":568183,"string":"568,183"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":1,"string":"1"},"ViewCount":{"kind":"number","value":2983,"string":"2,983"},"Body":{"kind":"string","value":"Here is my setup: one navigation controller, two views\n\nThe first view, the rootview, displays the statusbar and navigation bar (portrait view).\nWhen the rootviewController senses rotation, it hides the nav bar and status bar and then it pushes view 2 onto the navigation controller (in landscape now).\n\nThis part works as expected.\n\nWhen View2 viewcontroller senses rotation (back to portrait), it pops itself of the navigation controller, revealing view 1. View 1 then unhides the status bar and nav bar.\nFrom here, it gets weird. Depending on when I unhide the navigation bar, I get strange results. As you can see below (The beaker photo should be just below the navbar at the top of the screen). \n\nI have tried unhiding the navigation bar in:\n\n- - - \n\nNothing works. Any Idea what is going on? This should be simple, but maybe I am doing things in the wrong places.\n\n![botched screen](https://farm4.static.flickr.com/3642/3289929946_6eca8bed6c.jpg?v=0)\n"},"Title":{"kind":"string","value":"Rotation affecting Navigation Bar unpredictably"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-18T06:09:40.493"},"LastActivityDate":{"kind":"string","value":"2009-02-20T03:33:26.360"},"LastEditDate":{"kind":"string","value":"2017-02-08T14:10:23.397"},"LastEditorUserId":{"kind":"number","value":-1,"string":"-1"},"OwnerUserId":{"kind":"number","value":48311,"string":"48,311"},"Tags":{"kind":"list like","value":["iphone","cocoa-touch"],"string":"[\n \"iphone\",\n \"cocoa-touch\"\n]"}}},{"rowIdx":269,"cells":{"Id":{"kind":"number","value":561300,"string":"561,300"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":561440,"string":"561,440"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":1,"string":"1"},"ViewCount":{"kind":"number","value":1342,"string":"1,342"},"Body":{"kind":"string","value":"\n# The Scenario\n\n\n\nI am building a custom CMS for a communications application. The users can upload images to the server and then later reference them in posts they write using markdown. Images are stored in a database and referenced with a url of the form `images/{id}`. A custom image handler retrieves these and sets a far future expires header so they aren't fetched over and over again. Storing the images in the file system is not an option per the customer.\n\nPosts are stored in the database as markdown and as html for performance.\n\n\n### Markdown\n\n\n\n```\n###Header\nLorem Ipsum dolor sit amet. ![funny cat](images/25)\n```\n\n\n\n### HTML\n\n\n\n```\n

Header

\n

\n Lorem Ipsum dolor sit amet. \"funny\n

\n```\n\n\n\n# The Problem\n\n\n\nThese images are also editable. From a caching perspective this presents a problem. When an image is edited I need to ensure that the browser gets the latest version. I have come up with the following solutions, all of which I have found to be lacking.\n\n\n# Possible Solutions\n\n\n\n\n### Version Field\n\n\n\nStore a version field with the image. Increment it when the image is edited producing urls of the form `images/{id}/version/{version}`.\n\nThis is nice if image urls are always generated from the database. However, I am storing urls in posts as text and would have to preprocess possibly large swaths of text for these requests. Also, linking an image would be troublesome since a url becomes stale after an image is edited. This is probably not a good idea.\n\n\n### New Url\n\n\n\nWhen an image is edited, store it as a new entry in the database.\n\nThis means no version upkeep, but old links and old posts suffer from the same issues. They're never updated. The performance would be good, but the problem remains.\n\n\n### 304 - Not Modified\n\n\n\nStore a last edited field for each image. When a conditional request comes in return http status 304 - Not Modified, reducing bandwidth usage.\n\nThis seems like the best solution I've got so far. The image is cached unless edited, but I've never used this approach before. If there are 50 images on the page there are still 50 requests to the server. Bandwidth will be reduced, but the latency remains. Is this approach worth that cost?\n\n\n# The Question\n\n\n\nI have very little experience in this area and I'm hoping all of you have more. Are any of the above solutions viable? If so what is your experience with them? If not what is a better approach?\n"},"Title":{"kind":"string","value":"Custom Image Handler: Caching Strategy"},"ContentLicense":{"kind":"string","value":"CC BY-SA 2.5"},"FavoriteCount":{"kind":"number","value":0,"string":"0"},"CreationDate":{"kind":"string","value":"2009-02-18T14:37:58.137"},"LastActivityDate":{"kind":"string","value":"2009-02-26T10:25:36.710"},"LastEditDate":{"kind":"string","value":"2009-02-18T15:04:03.267"},"LastEditorUserId":{"kind":"number","value":208,"string":"208"},"OwnerUserId":{"kind":"number","value":208,"string":"208"},"Tags":{"kind":"list like","value":["html","http","caching","httphandler"],"string":"[\n \"html\",\n \"http\",\n \"caching\",\n \"httphandler\"\n]"}}},{"rowIdx":270,"cells":{"Id":{"kind":"number","value":561506,"string":"561,506"},"PostTypeId":{"kind":"number","value":1,"string":"1"},"AcceptedAnswerId":{"kind":"number","value":1193914,"string":"1,193,914"},"ParentId":{"kind":"null"},"Score":{"kind":"number","value":6,"string":"6"},"ViewCount":{"kind":"number","value":6500,"string":"6,500"},"Body":{"kind":"string","value":"I really enjoyed using the [Developer Toolbar](http://www.microsoft.com/en-us/download/details.aspx?id=18359) with IE7, and recently upgraded to IE8 to take advantage of (what appeared to be) more full-featured [developer tools](http://blogs.msdn.com/ie/archive/2008/03/07/improved-productivity-through-internet-explorer-8-developer-tools.aspx). \n\nThe IE8 tool is really excellent (finally rivals FireBug), but I can't seem to inspect inside an iframe, which I could with the IE7 toolbar. \n\nI'd prefer not to downgrade to IE7 because I like some of the other features of the IE8 tools, but the ability to inspect inside an iframe is a deal breaker. \n\nAlso, firebug is of limited utility to me because our site is an internally-deployed intranet app, which means \"browser compatibility\" is a very low priority, major functionality is often broken in FireFox. \n\nHere's what the IE8 tools look like around the iframe\n![](https://i.stack.imgur.com/MOxok.png)\n\nIn firebug, I can see an `` element under the iframe, which I can expand just like the rest of the page\n\nThe `