dgraph-io / dgraph

The high-performance database for modern applications
https://dgraph.io
Other
20.34k stars 1.49k forks source link

Bulk loader crashes after stream writer changes #3625

Closed animesh2049 closed 5 years ago

animesh2049 commented 5 years ago

If you suspect this could be a bug, follow the template.

Dgraph version : v1.0.12-rc3-560-g9138f23d Commit SHA-1 : 9138f23d Commit timestamp : 2019-06-30 20:33:53 +0530 Branch : HEAD Go version : go1.12.5

For Dgraph official documentation, visit https://docs.dgraph.io. For discussions about Dgraph , visit https://discuss.dgraph.io. To say hi to the community , visit https://dgraph.slack.com.

Licensed variously under the Apache Public License 2.0 and Dgraph Community License. Copyright 2015-2018 Dgraph Labs, Inc.

{ "DataFiles": "/tmp/small_posts", "DataFormat": "rdf", "SchemaFile": "/home/animesh/dgraph/schema", "OutDir": "./out", "ReplaceOutDir": false, "TmpDir": "tmp", "NumGoroutines": 16, "MapBufSize": 67108864, "SkipMapPhase": false, "CleanupTmp": true, "NumReducers": 1, "Version": false, "StoreXids": false, "ZeroAddr": "localhost:5080", "HttpAddr": "localhost:8080", "IgnoreErrors": false, "CustomTokenizers": "", "NewUids": false, "MapShards": 1, "ReduceShards": 1 } Connecting to zero at localhost:5080 Processing file (1 out of 1): /tmp/small_posts Shard tmp/shards/000 -> Reduce tmp/shards/shard_0/000 2019/07/03 18:32:14 Inter: Biggest(j-1) 00000000 00 00 0d 43 68 6f 73 65 6e 2e 41 6e 73 77 65 72 |...Chosen.Answer| 00000010 00 00 00 00 00 00 02 81 7a c2 ff ff ff ff ff ff |........z.......| 00000020 d8 e5 |..|

vs Smallest(j): 00000000 00 00 0a 48 61 73 2e 41 6e 73 77 65 72 08 00 00 |...Has.Answer...| 00000010 00 00 01 ff ff ff ff ff ff d8 e5 |...........|

: level=1 j=1 numTables=3 github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.(levelHandler).validate /home/animesh/go/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/util.go:55 github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.(levelsController).validate /home/animesh/go/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/util.go:33 github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.(StreamWriter).Flush /home/animesh/go/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/stream_writer.go:184 github.com/dgraph-io/dgraph/dgraph/cmd/bulk.(reducer).run.func1 /home/animesh/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/reduce.go:75 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1337 Levels Controller github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.(levelsController).validate /home/animesh/go/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/util.go:34 github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.(StreamWriter).Flush /home/animesh/go/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/stream_writer.go:184 github.com/dgraph-io/dgraph/dgraph/cmd/bulk.(*reducer).run.func1 /home/animesh/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/reduce.go:75 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1337

github.com/dgraph-io/dgraph/x.Check /home/animesh/go/src/github.com/dgraph-io/dgraph/x/error.go:42 github.com/dgraph-io/dgraph/dgraph/cmd/bulk.(*reducer).run.func1 /home/animesh/go/src/github.com/dgraph-io/dgraph/dgraph/cmd/bulk/reduce.go:76 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1337

animesh2049 commented 5 years ago

Data

<ph0> <Timestamp> "2018-07-02T17:55:27.247" .
<ph0> <Author> <u6786713> .
<ph0> <Post> <p4> .
<ph0> <Text> "Convert Decimal to Double?" .
<ph0> <Type> "Title" .
<p4> <Title> <ph0> .
<t-c#> <Timestamp> "2018-07-02T17:55:27.247" .
<t-c#> <Tag.Text> "c#" .
<t-c#> <Type> "Tag" .
<p4> <Tag> <t-c#> .
<t-floating-point> <Timestamp> "2018-07-02T17:55:27.247" .
<t-floating-point> <Tag.Text> "floating-point" .
<t-floating-point> <Type> "Tag" .
<p4> <Tag> <t-floating-point> .
<t-type-conversion> <Timestamp> "2018-07-02T17:55:27.247" .
<t-type-conversion> <Tag.Text> "type-conversion" .
<t-type-conversion> <Type> "Tag" .
<p4> <Tag> <t-type-conversion> .
<t-double> <Timestamp> "2018-07-02T17:55:27.247" .
<t-double> <Tag.Text> "double" .
<t-double> <Type> "Tag" .
<p4> <Tag> <t-double> .
<t-decimal> <Timestamp> "2018-07-02T17:55:27.247" .
<t-decimal> <Tag.Text> "decimal" .
<t-decimal> <Type> "Tag" .
<p4> <Tag> <t-decimal> .
<ph1> <Timestamp> "2018-07-02T17:55:27.247" .
<ph1> <Author> <u6786713> .
<ph1> <Post> <p4> .
<ph1> <Text> "<p>I want to use a track-bar to change a form's opacity.</p>\n\n<p>This is my code:</p>\n\n<pre><code>decimal trans = trackBar1.Value / 5000;\nthis.Opacity = trans;\n</code></pre>\n\n<p>When I build the application, it gives the following error:</p>\n\n<blockquote>\n  <p>Cannot implicitly convert type <code>'decimal'</code> to <code>'double'</code>.</p>\n</blockquote>\n\n<p>I tried using <code>trans</code> and <code>double</code> but then the control doesn't work. This code worked fine in a past VB.NET project.</p>\n" .
<ph1> <Type> "Body" .
<p4> <Body> <ph1> .
<p4> <Id> "4" .
<p4> <Type> "Question" .
<p4> <Chosen.Answer> <p7> .
<p4> <Has.Answer> <p7> .
<p4> <Owner> <u8> .
<p4> <ViewCount> "40863" .
<p4> <Timestamp> "2008-07-31T21:42:52.667" .
<ph2> <Timestamp> "2016-03-19T06:05:48.487" .
<ph2> <Author> <u63550> .
<ph2> <Post> <p6> .
<ph2> <Text> "Percentage width child element in absolutely positioned parent on Internet Explorer 7" .
<ph2> <Type> "Title" .
<p6> <Title> <ph2> .
<t-html> <Timestamp> "2016-03-19T06:05:48.487" .
<t-html> <Tag.Text> "html" .
<t-html> <Type> "Tag" .
<p6> <Tag> <t-html> .
<t-css> <Timestamp> "2016-03-19T06:05:48.487" .
<t-css> <Tag.Text> "css" .
<t-css> <Type> "Tag" .
<p6> <Tag> <t-css> .
<t-css3> <Timestamp> "2016-03-19T06:05:48.487" .
<t-css3> <Tag.Text> "css3" .
<t-css3> <Type> "Tag" .
<p6> <Tag> <t-css3> .
<t-internet-explorer-7> <Timestamp> "2016-03-19T06:05:48.487" .
<t-internet-explorer-7> <Tag.Text> "internet-explorer-7" .
<t-internet-explorer-7> <Type> "Tag" .
<p6> <Tag> <t-internet-explorer-7> .
<ph3> <Timestamp> "2016-03-19T06:05:48.487" .
<ph3> <Author> <u63550> .
<ph3> <Post> <p6> .
<ph3> <Text> "<p>I have an absolutely positioned <code>div</code> containing several children, one of which is a relatively positioned <code>div</code>. When I use a <strong>percentage-based width</strong> on the child <code>div</code>, it collapses to '0' width on <a href=\"http://en.wikipedia.org/wiki/Internet_Explorer_7\" rel=\"noreferrer\">Internet&nbsp;Explorer&nbsp;7</a>, but not on Firefox or Safari.</p>\n\n<p>If I use <strong>pixel width</strong>, it works. If the parent is relatively positioned, the percentage width on the child works.</p>\n\n<ol>\n<li>Is there something I'm missing here?</li>\n<li>Is there an easy fix for this besides the <em>pixel-based width</em> on the\nchild?</li>\n<li>Is there an area of the CSS specification that covers this?</li>\n</ol>\n" .
<ph3> <Type> "Body" .
<p6> <Body> <ph3> .
<p6> <Id> "6" .
<p6> <Type> "Question" .
<p6> <Chosen.Answer> <p31> .
<p6> <Has.Answer> <p31> .
<p6> <Owner> <u9> .
<p6> <ViewCount> "17804" .
<p6> <Timestamp> "2008-07-31T22:08:08.620" .
<ph4> <Timestamp> "2017-12-16T05:06:57.613" .
<ph4> <Author> <u4020527> .
<ph4> <Post> <p7> .
<ph4> <Text> "" .
<ph4> <Type> "Title" .
<p7> <Title> <ph4> .
<ph5> <Timestamp> "2017-12-16T05:06:57.613" .
<ph5> <Author> <u4020527> .
<ph5> <Post> <p7> .
<ph5> <Text> "<p>An explicit cast to double like this isn't necessary:</p>\n\n<pre><code>double trans = (double) trackBar1.Value / 5000.0;\n</code></pre>\n\n<p>Identifying the constant as <code>5000.0</code> (or as <code>5000d</code>) is sufficient:</p>\n\n<pre><code>double trans = trackBar1.Value / 5000.0;\ndouble trans = trackBar1.Value / 5000d;\n</code></pre>\n" .
<ph5> <Type> "Body" .
<p7> <Body> <ph5> .
<p7> <Id> "7" .
<p7> <Type> "Answer" .
<p4> <Has.Answer> <p7> .
<p7> <Owner> <u9> .
<p7> <ViewCount> "0" .
<p7> <Timestamp> "2008-07-31T22:17:57.883" .
<ph6> <Timestamp> "2018-04-21T17:48:14.477" .
<ph6> <Author> <u3956566> .
<ph6> <Post> <p9> .
<ph6> <Text> "How do I calculate someone's age in C#?" .
<ph6> <Type> "Title" .
<p9> <Title> <ph6> .
<t-c#> <Timestamp> "2018-04-21T17:48:14.477" .
<t-c#> <Tag.Text> "c#" .
<t-c#> <Type> "Tag" .
<p9> <Tag> <t-c#> .
<t-.net> <Timestamp> "2018-04-21T17:48:14.477" .
<t-.net> <Tag.Text> ".net" .
<t-.net> <Type> "Tag" .
<p9> <Tag> <t-.net> .
<t-datetime> <Timestamp> "2018-04-21T17:48:14.477" .
<t-datetime> <Tag.Text> "datetime" .
<t-datetime> <Type> "Tag" .
<p9> <Tag> <t-datetime> .
<ph7> <Timestamp> "2018-04-21T17:48:14.477" .
<ph7> <Author> <u3956566> .
<ph7> <Post> <p9> .
<ph7> <Text> "<p>Given a <code>DateTime</code> representing a person's birthday, how do I calculate their age in years?  </p>\n" .
<ph7> <Type> "Body" .
<p9> <Body> <ph7> .
<p9> <Id> "9" .
<p9> <Type> "Question" .
<p9> <Chosen.Answer> <p1404> .
<p9> <Has.Answer> <p1404> .
<p9> <Owner> <u1> .
<p9> <ViewCount> "538212" .
<p9> <Timestamp> "2008-07-31T23:40:59.743" .
<ph8> <Timestamp> "2017-06-04T15:51:19.780" .
<ph8> <Author> <u6479704> .
<ph8> <Post> <p11> .
<ph8> <Text> "Calculate relative time in C#" .
<ph8> <Type> "Title" .
<p11> <Title> <ph8> .
<t-c#> <Timestamp> "2017-06-04T15:51:19.780" .
<t-c#> <Tag.Text> "c#" .
<t-c#> <Type> "Tag" .
<p11> <Tag> <t-c#> .
<t-datetime> <Timestamp> "2017-06-04T15:51:19.780" .
<t-datetime> <Tag.Text> "datetime" .
<t-datetime> <Type> "Tag" .
<p11> <Tag> <t-datetime> .
<t-time> <Timestamp> "2017-06-04T15:51:19.780" .
<t-time> <Tag.Text> "time" .
<t-time> <Type> "Tag" .
<p11> <Tag> <t-time> .
<t-datediff> <Timestamp> "2017-06-04T15:51:19.780" .
<t-datediff> <Tag.Text> "datediff" .
<t-datediff> <Type> "Tag" .
<p11> <Tag> <t-datediff> .
<t-relative-time-span> <Timestamp> "2017-06-04T15:51:19.780" .
<t-relative-time-span> <Tag.Text> "relative-time-span" .
<t-relative-time-span> <Type> "Tag" .
<p11> <Tag> <t-relative-time-span> .
<ph9> <Timestamp> "2017-06-04T15:51:19.780" .
<ph9> <Author> <u6479704> .
<ph9> <Post> <p11> .
<ph9> <Text> "<p>Given a specific <code>DateTime</code> value, how do I display relative time, like:</p>\n\n<ul>\n<li>2 hours ago</li>\n<li>3 days ago</li>\n<li>a month ago</li>\n</ul>\n" .
<ph9> <Type> "Body" .
<p11> <Body> <ph9> .
<p11> <Id> "11" .
<p11> <Type> "Question" .
<p11> <Chosen.Answer> <p1248> .
<p11> <Has.Answer> <p1248> .
<p11> <Owner> <u1> .
<p11> <ViewCount> "146339" .
<p11> <Timestamp> "2008-07-31T23:55:37.967" .
<ph10> <Timestamp> "2018-01-12T16:10:22.637" .
<ph10> <Author> <u1271898> .
<ph10> <Post> <p12> .
<ph10> <Text> "" .
<ph10> <Type> "Title" .
<p12> <Title> <ph10> .
<ph11> <Timestamp> "2018-01-12T16:10:22.637" .
<ph11> <Author> <u1271898> .
<ph11> <Post> <p12> .
<ph11> <Text> "<p>Here's how I do it</p>\n\n<pre class=\"lang-csharp prettyprint-override\"><code>var ts = new TimeSpan(DateTime.UtcNow.Ticks - dt.Ticks);\ndouble delta = Math.Abs(ts.TotalSeconds);\n\nif (delta &lt; 60)\n{\n  return ts.Seconds == 1 ? \"one second ago\" : ts.Seconds + \" seconds ago\";\n}\nif (delta &lt; 120)\n{\n  return \"a minute ago\";\n}\nif (delta &lt; 2700) // 45 * 60\n{\n  return ts.Minutes + \" minutes ago\";\n}\nif (delta &lt; 5400) // 90 * 60\n{\n  return \"an hour ago\";\n}\nif (delta &lt; 86400) // 24 * 60 * 60\n{\n  return ts.Hours + \" hours ago\";\n}\nif (delta &lt; 172800) // 48 * 60 * 60\n{\n  return \"yesterday\";\n}\nif (delta &lt; 2592000) // 30 * 24 * 60 * 60\n{\n  return ts.Days + \" days ago\";\n}\nif (delta &lt; 31104000) // 12 * 30 * 24 * 60 * 60\n{\n  int months = Convert.ToInt32(Math.Floor((double)ts.Days / 30));\n  return months &lt;= 1 ? \"one month ago\" : months + \" months ago\";\n}\nint years = Convert.ToInt32(Math.Floor((double)ts.Days / 365));\nreturn years &lt;= 1 ? \"one year ago\" : years + \" years ago\";\n</code></pre>\n\n<p>Suggestions? Comments? Ways to improve this algorithm?</p>\n" .
<ph11> <Type> "Body" .
<p12> <Body> <ph11> .
<p12> <Id> "12" .
<p12> <Type> "Answer" .
<p11> <Has.Answer> <p12> .
<p12> <Owner> <u1> .
<p12> <ViewCount> "0" .
<p12> <Timestamp> "2008-07-31T23:56:41.303" .
<ph12> <Timestamp> "2018-12-24T22:47:42.787" .
<ph12> <Author> <u9752662> .
<ph12> <Post> <p13> .
<ph12> <Text> "Determine a user's timezone" .
<ph12> <Type> "Title" .
<p13> <Title> <ph12> .
<t-html> <Timestamp> "2018-12-24T22:47:42.787" .
<t-html> <Tag.Text> "html" .
<t-html> <Type> "Tag" .
<p13> <Tag> <t-html> .
<t-browser> <Timestamp> "2018-12-24T22:47:42.787" .
<t-browser> <Tag.Text> "browser" .
<t-browser> <Type> "Tag" .
<p13> <Tag> <t-browser> .
<t-timezone> <Timestamp> "2018-12-24T22:47:42.787" .
<t-timezone> <Tag.Text> "timezone" .
<t-timezone> <Type> "Tag" .
<p13> <Tag> <t-timezone> .
<t-user-agent> <Timestamp> "2018-12-24T22:47:42.787" .
<t-user-agent> <Tag.Text> "user-agent" .
<t-user-agent> <Type> "Tag" .
<p13> <Tag> <t-user-agent> .
<t-timezone-offset> <Timestamp> "2018-12-24T22:47:42.787" .
<t-timezone-offset> <Tag.Text> "timezone-offset" .
<t-timezone-offset> <Type> "Tag" .
<p13> <Tag> <t-timezone-offset> .
<ph13> <Timestamp> "2018-12-24T22:47:42.787" .
<ph13> <Author> <u9752662> .
<ph13> <Post> <p13> .
<ph13> <Text> "<p>Is there a standard way for a web server to be able to determine a user's timezone within a web page? </p>\n\n<p>Perhaps from an HTTP header or part of the <code>user-agent</code> string?</p>\n" .
<ph13> <Type> "Body" .
<p13> <Body> <ph13> .
<p13> <Id> "13" .
<p13> <Type> "Question" .
<p13> <Owner> <u9> .
<p13> <ViewCount> "171063" .
<p13> <Timestamp> "2008-08-01T00:42:38.903" .
<ph14> <Timestamp> "2017-02-25T17:42:17.810" .
<ph14> <Author> <u6495084> .
<ph14> <Post> <p14> .
<ph14> <Text> "Difference between Math.Floor() and Math.Truncate()" .
<ph14> <Type> "Title" .
<p14> <Title> <ph14> .
<t-.net> <Timestamp> "2017-02-25T17:42:17.810" .
<t-.net> <Tag.Text> ".net" .
<t-.net> <Type> "Tag" .
<p14> <Tag> <t-.net> .
<t-math> <Timestamp> "2017-02-25T17:42:17.810" .
<t-math> <Tag.Text> "math" .
<t-math> <Type> "Tag" .
<p14> <Tag> <t-math> .
<ph15> <Timestamp> "2017-02-25T17:42:17.810" .
<ph15> <Author> <u6495084> .
<ph15> <Post> <p14> .
<ph15> <Text> "<p>What is the difference between <a href=\"http://msdn.microsoft.com/en-us/library/9a6a2sxy.aspx\" rel=\"noreferrer\"><code>Math.Floor()</code></a> and <a href=\"http://msdn.microsoft.com/en-us/library/system.math.truncate.aspx\" rel=\"noreferrer\"><code>Math.Truncate()</code></a> in .NET?</p>\n" .
<ph15> <Type> "Body" .
<p14> <Body> <ph15> .
<p14> <Id> "14" .
<p14> <Type> "Question" .
<p14> <Owner> <u11> .
<p14> <ViewCount> "119555" .
<p14> <Timestamp> "2008-08-01T00:59:11.177" .
<ph16> <Timestamp> "2019-01-20T13:50:51.557" .
<ph16> <Author> <u567854> .
<ph16> <Post> <p16> .
<ph16> <Text> "Filling a DataSet or DataTable from a LINQ query result set" .
<ph16> <Type> "Title" .
<p16> <Title> <ph16> .
<t-c#> <Timestamp> "2019-01-20T13:50:51.557" .
<t-c#> <Tag.Text> "c#" .
<t-c#> <Type> "Tag" .
<p16> <Tag> <t-c#> .
<t-linq> <Timestamp> "2019-01-20T13:50:51.557" .
<t-linq> <Tag.Text> "linq" .
<t-linq> <Type> "Tag" .
<p16> <Tag> <t-linq> .
<t-web-services> <Timestamp> "2019-01-20T13:50:51.557" .
<t-web-services> <Tag.Text> "web-services" .
<t-web-services> <Type> "Tag" .
<p16> <Tag> <t-web-services> .
<t-.net-3.5> <Timestamp> "2019-01-20T13:50:51.557" .
<t-.net-3.5> <Tag.Text> ".net-3.5" .
<t-.net-3.5> <Type> "Tag" .
<p16> <Tag> <t-.net-3.5> .
<ph17> <Timestamp> "2019-01-20T13:50:51.557" .
<ph17> <Author> <u567854> .
<ph17> <Post> <p16> .
<ph17> <Text> "<p>How do you expose a LINQ query as an ASMX web service? Usually, from the business tier, I can return a typed <code>DataSet</code> or <code>DataTable</code> which can be serialized for transport over ASMX.</p>\n\n<p>How can I do the same for a LINQ query? Is there a way to populate a typed <code>DataSet</code> or <code>DataTable</code> via a LINQ query?</p>\n\n<pre><code>public static MyDataTable CallMySproc()\n{\n    string conn = \"...\";\n\n    MyDatabaseDataContext db = new MyDatabaseDataContext(conn);\n    MyDataTable dt = new MyDataTable();\n\n    // execute a sproc via LINQ\n    var query = from dr\n                in db.MySproc().AsEnumerable\n                select dr;\n\n    // copy LINQ query resultset into a DataTable -this does not work !    \n    dt = query.CopyToDataTable();\n\n    return dt;\n}\n</code></pre>\n\n<p>How can I get the result set of a LINQ query into a <code>DataSet</code> or <code>DataTable</code>? Alternatively, is the LINQ query serializable so that I can expose it as an ASMX web service?</p>\n" .
<ph17> <Type> "Body" .
<p16> <Body> <ph17> .
<p16> <Id> "16" .
<p16> <Type> "Question" .
<p16> <Chosen.Answer> <p12446> .
<p16> <Has.Answer> <p12446> .
<p16> <Owner> <u2> .
<p16> <ViewCount> "81312" .
<p16> <Timestamp> "2008-08-01T04:59:33.643" .
<ph18> <Timestamp> "2011-10-21T21:29:17.160" .
<ph18> <Author> <u546051> .
<ph18> <Post> <p17> .
<ph18> <Text> "Binary Data in MySQL" .
<ph18> <Type> "Title" .
<p17> <Title> <ph18> .
<t-mysql> <Timestamp> "2011-10-21T21:29:17.160" .
<t-mysql> <Tag.Text> "mysql" .
<t-mysql> <Type> "Tag" .
<p17> <Tag> <t-mysql> .
<t-database> <Timestamp> "2011-10-21T21:29:17.160" .
<t-database> <Tag.Text> "database" .
<t-database> <Type> "Tag" .
<p17> <Tag> <t-database> .
<t-binary-data> <Timestamp> "2011-10-21T21:29:17.160" .
<t-binary-data> <Tag.Text> "binary-data" .
<t-binary-data> <Type> "Tag" .
<p17> <Tag> <t-binary-data> .
<t-data-storage> <Timestamp> "2011-10-21T21:29:17.160" .
<t-data-storage> <Tag.Text> "data-storage" .
<t-data-storage> <Type> "Tag" .
<p17> <Tag> <t-data-storage> .
<ph19> <Timestamp> "2011-10-21T21:29:17.160" .
<ph19> <Author> <u546051> .
<ph19> <Post> <p17> .
<ph19> <Text> "<p>How do I store binary data in <a href=\"http://en.wikipedia.org/wiki/MySQL\" rel=\"noreferrer\">MySQL</a>?</p>\n" .
<ph19> <Type> "Body" .
<p17> <Body> <ph19> .
<p17> <Id> "17" .
<p17> <Type> "Question" .
<p17> <Chosen.Answer> <p26> .
<p17> <Has.Answer> <p26> .
<p17> <Owner> <u2> .
<p17> <ViewCount> "70957" .
<p17> <Timestamp> "2008-08-01T05:09:55.993" .
<ph20> <Timestamp> "2016-06-02T05:56:26.060" .
<ph20> <Author> <u126039> .
<ph20> <Post> <p18> .
<ph20> <Text> "" .
<ph20> <Type> "Title" .
<p18> <Title> <ph20> .
<ph21> <Timestamp> "2016-06-02T05:56:26.060" .
<ph21> <Author> <u126039> .
<ph21> <Post> <p18> .
<ph21> <Text> "<p>For a table like this:</p>\n\n<pre><code>CREATE TABLE binary_data (\n    id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY,\n    description CHAR(50),\n    bin_data LONGBLOB,\n    filename CHAR(50),\n    filesize CHAR(50),\n    filetype CHAR(50)\n);\n</code></pre>\n\n<p>Here is a PHP example:</p>\n\n<pre><code>&lt;?php\n    // store.php3 - by Florian Dittmer &lt;dittmer@gmx.net&gt;\n    // Example php script to demonstrate the storing of binary files into\n    // an sql database. More information can be found at http://www.phpbuilder.com/\n?&gt;\n\n&lt;html&gt;\n    &lt;head&gt;&lt;title&gt;Store binary data into SQL Database&lt;/title&gt;&lt;/head&gt;\n\n    &lt;body&gt;\n        &lt;?php\n            // Code that will be executed if the form has been submitted:\n\n            if ($submit) {\n                // Connect to the database (you may have to adjust\n                // the hostname, username or password).\n\n                mysql_connect(\"localhost\", \"root\", \"password\");\n                mysql_select_db(\"binary_data\");\n\n                $data = mysql_real_escape_string(fread(fopen($form_data, \"r\"), filesize($form_data)));\n\n                $result = mysql_query(\"INSERT INTO binary_data (description, bin_data, filename, filesize, filetype) \".\n                                    \"VALUES ('$form_description', '$data', '$form_data_name', '$form_data_size', '$form_data_type')\");\n\n                $id= mysql_insert_id();\n                print \"&lt;p&gt;This file has the following Database ID: &lt;b&gt;$id&lt;/b&gt;\";\n\n                mysql_close();\n            } else {\n\n                // else show the form to submit new data:\n        ?&gt;\n        &lt;form method=\"post\" action=\"&lt;?php echo $PHP_SELF; ?&gt;\" enctype=\"multipart/form-data\"&gt;\n            File Description:&lt;br&gt;\n            &lt;input type=\"text\" name=\"form_description\"  size=\"40\"&gt;\n            &lt;input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"1000000\"&gt;\n            &lt;br&gt;File to upload/store in database:&lt;br&gt;\n            &lt;input type=\"file\" name=\"form_data\"  size=\"40\"&gt;\n            &lt;p&gt;&lt;input type=\"submit\" name=\"submit\" value=\"submit\"&gt;\n        &lt;/form&gt;\n\n        &lt;?php\n            }\n        ?&gt;\n    &lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n" .
<ph21> <Type> "Body" .
<p18> <Body> <ph21> .
<p18> <Id> "18" .
<p18> <Type> "Answer" .
<p17> <Has.Answer> <p18> .
<p18> <ViewCount> "0" .
<p18> <Timestamp> "2008-08-01T05:12:44.193" .
<ph22> <Timestamp> "2019-05-15T01:33:48.730" .
<ph22> <Author> <u3768871> .
<ph22> <Post> <p19> .
<ph22> <Text> "What is the fastest way to get the value of π?" .
<ph22> <Type> "Title" .
<p19> <Title> <ph22> .
<t-performance> <Timestamp> "2019-05-15T01:33:48.730" .
<t-performance> <Tag.Text> "performance" .
<t-performance> <Type> "Tag" .
<p19> <Tag> <t-performance> .
<t-algorithm> <Timestamp> "2019-05-15T01:33:48.730" .
<t-algorithm> <Tag.Text> "algorithm" .
<t-algorithm> <Type> "Tag" .
<p19> <Tag> <t-algorithm> .
<t-language-agnostic> <Timestamp> "2019-05-15T01:33:48.730" .
<t-language-agnostic> <Tag.Text> "language-agnostic" .
<t-language-agnostic> <Type> "Tag" .
<p19> <Tag> <t-language-agnostic> .
<t-unix> <Timestamp> "2019-05-15T01:33:48.730" .
<t-unix> <Tag.Text> "unix" .
<t-unix> <Type> "Tag" .
<p19> <Tag> <t-unix> .
<t-pi> <Timestamp> "2019-05-15T01:33:48.730" .
<t-pi> <Tag.Text> "pi" .
<t-pi> <Type> "Tag" .
<p19> <Tag> <t-pi> .
<ph23> <Timestamp> "2019-05-15T01:33:48.730" .
<ph23> <Author> <u3768871> .
<ph23> <Post> <p19> .
<ph23> <Text> "<p>I'm looking for the fastest way to obtain the value of π, as a personal challenge. More specifically, I'm using ways that don't involve using <code>#define</code> constants like <code>M_PI</code>, or hard-coding the number in.</p>\n\n<p>The program below tests the various ways I know of. The inline assembly version is, in theory, the fastest option, though clearly not portable. I've included it as a baseline to compare against the other versions. In my tests, with built-ins, the <code>4 * atan(1)</code> version is fastest on GCC 4.2, because it auto-folds the <code>atan(1)</code> into a constant. With <code>-fno-builtin</code> specified, the <code>atan2(0, -1)</code> version is fastest.</p>\n\n<p>Here's the main testing program (<code>pitimes.c</code>):</p>\n\n<pre class=\"lang-c prettyprint-override\"><code>#include &lt;math.h&gt;\n#include &lt;stdio.h&gt;\n#include &lt;time.h&gt;\n\n#define ITERS 10000000\n#define TESTWITH(x) {                                                       \\\n    diff = 0.0;                                                             \\\n    time1 = clock();                                                        \\\n    for (i = 0; i &lt; ITERS; ++i)                                             \\\n        diff += (x) - M_PI;                                                 \\\n    time2 = clock();                                                        \\\n    printf(\"%s\\t=&gt; %e, time =&gt; %f\\n\", #x, diff, diffclock(time2, time1));   \\\n}\n\nstatic inline double\ndiffclock(clock_t time1, clock_t time0)\n{\n    return (double) (time1 - time0) / CLOCKS_PER_SEC;\n}\n\nint\nmain()\n{\n    int i;\n    clock_t time1, time2;\n    double diff;\n\n    /* Warmup. The atan2 case catches GCC's atan folding (which would\n     * optimise the ``4 * atan(1) - M_PI'' to a no-op), if -fno-builtin\n     * is not used. */\n    TESTWITH(4 * atan(1))\n    TESTWITH(4 * atan2(1, 1))\n\n#if defined(__GNUC__) &amp;&amp; (defined(__i386__) || defined(__amd64__))\n    extern double fldpi();\n    TESTWITH(fldpi())\n#endif\n\n    /* Actual tests start here. */\n    TESTWITH(atan2(0, -1))\n    TESTWITH(acos(-1))\n    TESTWITH(2 * asin(1))\n    TESTWITH(4 * atan2(1, 1))\n    TESTWITH(4 * atan(1))\n\n    return 0;\n}\n</code></pre>\n\n<p>And the inline assembly stuff (<code>fldpi.c</code>) that will only work for x86 and x64 systems:</p>\n\n<pre class=\"lang-c prettyprint-override\"><code>double\nfldpi()\n{\n    double pi;\n    asm(\"fldpi\" : \"=t\" (pi));\n    return pi;\n}\n</code></pre>\n\n<p>And a build script that builds all the configurations I'm testing (<code>build.sh</code>):</p>\n\n<pre><code>#!/bin/sh\ngcc -O3 -Wall -c           -m32 -o fldpi-32.o fldpi.c\ngcc -O3 -Wall -c           -m64 -o fldpi-64.o fldpi.c\n\ngcc -O3 -Wall -ffast-math  -m32 -o pitimes1-32 pitimes.c fldpi-32.o\ngcc -O3 -Wall              -m32 -o pitimes2-32 pitimes.c fldpi-32.o -lm\ngcc -O3 -Wall -fno-builtin -m32 -o pitimes3-32 pitimes.c fldpi-32.o -lm\ngcc -O3 -Wall -ffast-math  -m64 -o pitimes1-64 pitimes.c fldpi-64.o -lm\ngcc -O3 -Wall              -m64 -o pitimes2-64 pitimes.c fldpi-64.o -lm\ngcc -O3 -Wall -fno-builtin -m64 -o pitimes3-64 pitimes.c fldpi-64.o -lm\n</code></pre>\n\n<p>Apart from testing between various compiler flags (I've compared 32-bit against 64-bit too because the optimizations are different), I've also tried switching the order of the tests around. But still, the <code>atan2(0, -1)</code> version still comes out on top every time.</p>\n" .
<ph23> <Type> "Body" .
<p19> <Body> <ph23> .
<p19> <Id> "19" .
<p19> <Type> "Question" .
<p19> <Chosen.Answer> <p531> .
<p19> <Has.Answer> <p531> .
<p19> <Owner> <u13> .
<p19> <ViewCount> "46438" .
<p19> <Timestamp> "2008-08-01T05:21:22.257" .
<ph24> <Timestamp> "2008-08-01T15:26:37.087" .
<ph24> <Author> <u17> .
<ph24> <Post> <p22> .
<ph24> <Text> "" .
<ph24> <Type> "Title" .
<p22> <Title> <ph24> .
<ph25> <Timestamp> "2008-08-01T15:26:37.087" .
<ph25> <Author> <u17> .
<ph25> <Post> <p22> .
<ph25> <Text> "<p>The best way that I know of because of leap years and everything is:</p>\n\n<pre><code>DateTime birthDate = new DateTime(2000,3,1);\nint age = (int)Math.Floor((DateTime.Now - birthDate).TotalDays / 365.25D);\n</code></pre>\n\n<p>Hope this helps.</p>\n" .
<ph25> <Type> "Body" .
<p22> <Body> <ph25> .
<p22> <Id> "22" .
<p22> <Type> "Answer" .
<p9> <Has.Answer> <p22> .
<p22> <Owner> <u17> .
<p22> <ViewCount> "0" .
<p22> <Timestamp> "2008-08-01T12:07:19.500" .
<ph26> <Timestamp> "2016-03-11T08:26:05.063" .
<ph26> <Author> <u5195227> .
<ph26> <Post> <p24> .
<ph26> <Text> "Throw an error in a MySQL trigger" .
<ph26> <Type> "Title" .
<p24> <Title> <ph26> .
<t-mysql> <Timestamp> "2016-03-11T08:26:05.063" .
<t-mysql> <Tag.Text> "mysql" .
<t-mysql> <Type> "Tag" .
<p24> <Tag> <t-mysql> .
<t-database> <Timestamp> "2016-03-11T08:26:05.063" .
<t-database> <Tag.Text> "database" .
<t-database> <Type> "Tag" .
<p24> <Tag> <t-database> .
<t-triggers> <Timestamp> "2016-03-11T08:26:05.063" .
<t-triggers> <Tag.Text> "triggers" .
<t-triggers> <Type> "Tag" .
<p24> <Tag> <t-triggers> .
<ph27> <Timestamp> "2016-03-11T08:26:05.063" .
<ph27> <Author> <u5195227> .
<ph27> <Post> <p24> .
<ph27> <Text> "<p>If I have a <code>trigger</code> <code>before the update</code> on a table, how can I throw an error that prevents the update on that table?</p>\n" .
<ph27> <Type> "Body" .
<p24> <Body> <ph27> .
<p24> <Id> "24" .
<p24> <Type> "Question" .
<p24> <Chosen.Answer> <p49> .
<p24> <Has.Answer> <p49> .
<p24> <Owner> <u22> .
<p24> <ViewCount> "69759" .
<p24> <Timestamp> "2008-08-01T12:12:19.350" .
<ph28> <Timestamp> "2018-08-22T16:02:31.843" .
<ph28> <Author> <u23> .
<ph28> <Post> <p25> .
<ph28> <Text> "How to use the C socket API in C++ on z/OS" .
<ph28> <Type> "Title" .
<p25> <Title> <ph28> .
<t-c++> <Timestamp> "2018-08-22T16:02:31.843" .
<t-c++> <Tag.Text> "c++" .
<t-c++> <Type> "Tag" .
<p25> <Tag> <t-c++> .
<t-c> <Timestamp> "2018-08-22T16:02:31.843" .
<t-c> <Tag.Text> "c" .
<t-c> <Type> "Tag" .
<p25> <Tag> <t-c> .
<t-sockets> <Timestamp> "2018-08-22T16:02:31.843" .
<t-sockets> <Tag.Text> "sockets" .
<t-sockets> <Type> "Tag" .
<p25> <Tag> <t-sockets> .
<t-mainframe> <Timestamp> "2018-08-22T16:02:31.843" .
<t-mainframe> <Tag.Text> "mainframe" .
<t-mainframe> <Type> "Tag" .
<p25> <Tag> <t-mainframe> .
<t-zos> <Timestamp> "2018-08-22T16:02:31.843" .
<t-zos> <Tag.Text> "zos" .
<t-zos> <Type> "Tag" .
<p25> <Tag> <t-zos> .
<ph29> <Timestamp> "2018-08-22T16:02:31.843" .
<ph29> <Author> <u23> .
<ph29> <Post> <p25> .
<ph29> <Text> "<p>I'm having issues getting the C sockets API to work properly in C++ on <code>z/OS</code>.</p>\n\n<p>Although I am including <code>sys/socket.h</code>, I still get compile time errors telling me that <code>AF_INET</code> is not defined.</p>\n\n<p>Am I missing something obvious, or is this related to the fact that being on <code>z/OS</code> makes my problems much more complicated?</p>\n\n<hr>\n\n<p><strong>Update</strong>: Upon further investigation, I discovered that there is an <code>#ifdef</code> that I'm hitting. Apparently <code>z/OS</code> isn't happy unless I define which \"type\" of sockets I'm using with:</p>\n\n<pre><code>#define _OE_SOCKETS\n</code></pre>\n\n<p>Now, I personally have no idea what this <code>_OE_SOCKETS</code> is actually for, so if any <code>z/OS</code> sockets programmers are out there (all 3 of you), perhaps you could give me a rundown of how this all works?</p>\n\n<hr>\n\n<p>Test App</p>\n\n<pre><code>#include &lt;sys/socket.h&gt;\n\nint main()\n{\n    return AF_INET;\n}\n</code></pre>\n\n<p>Compile/Link Output:</p>\n\n<pre><code>cxx -Wc,xplink -Wl,xplink -o inet_test inet.C\n\n\"./inet.C\", line 5.16: CCN5274 (S) The name lookup for \"AF_INET\" did not find a declaration.\nCCN0797(I) Compilation failed for file ./inet.C. Object file not created.\n</code></pre>\n\n<hr>\n\n<p>A check of sys/sockets.h does include the definition I need, and as far as I can tell, it is not being blocked by any #ifdef statements.</p>\n\n<p>I have however noticed it contains the following:</p>\n\n<pre><code>#ifdef __cplusplus\n  extern \"C\" {\n#endif\n</code></pre>\n\n<p>which encapsulates basically the whole file. Not sure if it matters.</p>\n" .
<ph29> <Type> "Body" .
<p25> <Body> <ph29> .
<p25> <Id> "25" .
<p25> <Type> "Question" .
<p25> <Chosen.Answer> <p1443907> .
<p25> <Has.Answer> <p1443907> .
<p25> <Owner> <u23> .
<p25> <ViewCount> "10858" .
<p25> <Timestamp> "2008-08-01T12:13:50.207" .
<ph30> <Timestamp> "2016-06-02T05:55:17.060" .
<ph30> <Author> <u126039> .
<ph30> <Post> <p26> .
<ph30> <Text> "" .
<ph30> <Type> "Title" .
<p26> <Title> <ph30> .
<ph31> <Timestamp> "2016-06-02T05:55:17.060" .
<ph31> <Author> <u126039> .
<ph31> <Post> <p26> .
<ph31> <Text> "<p>The answer by phpguy is correct but I think there is a lot of confusion in the  additional details there.</p>\n\n<p>The basic answer is in a <code>BLOB</code> data type / attribute domain. <strong>BLOB</strong> is short for Binary Large Object and that column data type is specific for handling binary data.</p>\n\n<p>See <a href=\"http://dev.mysql.com/doc/refman/5.7/en/blob.html\" rel=\"noreferrer\">the relevant manual page for MySQL</a>.</p>\n" .
<ph31> <Type> "Body" .
<p26> <Body> <ph31> .
<p26> <Id> "26" .
<p26> <Type> "Answer" .
<p17> <Has.Answer> <p26> .
<p26> <Owner> <u48> .
<p26> <ViewCount> "0" .
<p26> <Timestamp> "2008-08-01T12:16:22.167" .
<ph32> <Timestamp> "2008-08-01T13:16:49.127" .
<ph32> <Author> <u17> .
<ph32> <Post> <p27> .
<ph32> <Text> "" .
<ph32> <Type> "Title" .
<p27> <Title> <ph32> .
<ph33> <Timestamp> "2008-08-01T13:16:49.127" .
<ph33> <Author> <u17> .
<ph33> <Post> <p27> .
<ph33> <Text> "<p>@jeff</p>\n\n<p>IMHO yours seems a little long.  However it does seem a little more robust with support for \"yesterday\" and \"years\".  But in my experience when this is used the person is most likely to view the content in the first 30 days.  It is only the really hardcore people that come after that.  So that is why I usually elect to keep this short and simple.</p>\n\n<p>This is the method I am currently using on one of my websites.  This only returns a relative day, hour, time.  And then the user has to slap on \"ago\" in the output.</p>\n\n<pre><code>public static string ToLongString(this TimeSpan time)\n{\n    string output = String.Empty;\n\n    if (time.Days &gt; 0)\n        output += time.Days + \" days \";\n\n    if ((time.Days == 0 || time.Days == 1) &amp;&amp; time.Hours &gt; 0)\n        output += time.Hours + \" hr \";\n\n    if (time.Days == 0 &amp;&amp; time.Minutes &gt; 0)\n        output += time.Minutes + \" min \";\n\n    if (output.Length == 0)\n        output += time.Seconds + \" sec\";\n\n    return output.Trim();\n}\n</code></pre>\n" .
<ph33> <Type> "Body" .
<p27> <Body> <ph33> .
<p27> <Id> "27" .
<p27> <Type> "Answer" .
<p11> <Has.Answer> <p27> .
<p27> <Owner> <u17> .
<p27> <ViewCount> "0" .
<p27> <Timestamp> "2008-08-01T12:17:19.357" .
<ph34> <Timestamp> "2008-08-01T12:19:17.417" .
<ph34> <Author> <u19> .
<ph34> <Post> <p29> .
<ph34> <Text> "" .
<ph34> <Type> "Title" .
<p29> <Title> <ph34> .
<ph35> <Timestamp> "2008-08-01T12:19:17.417" .
<ph35> <Author> <u19> .
<ph35> <Post> <p29> .
<ph35> <Text> "<p>There are no HTTP headers that will report the clients timezone so far although it has been suggested to include it in the HTTP specification.</p>\n\n<p>If it was me, I would probably try to fetch the timezone using clientside JavaScript and then submit it to the server using Ajax or something.</p>\n" .
<ph35> <Type> "Body" .
<p29> <Body> <ph35> .
<p29> <Id> "29" .
<p29> <Type> "Answer" .
<p13> <Has.Answer> <p29> .
<p29> <Owner> <u19> .
<p29> <ViewCount> "0" .
<p29> <Timestamp> "2008-08-01T12:19:17.417" .
<ph36> <Timestamp> "2008-08-01T12:22:40.797" .
<ph36> <Author> <u13> .
<ph36> <Post> <p30> .
<ph36> <Text> "" .
<ph36> <Type> "Title" .
<p30> <Title> <ph36> .
<ph37> <Timestamp> "2008-08-01T12:22:40.797" .
<ph37> <Author> <u13> .
<ph37> <Post> <p30> .
<ph37> <Text> "<p>I've had no trouble using the BSD sockets API in C++, in GNU/Linux. Here's the sample program I used:</p>\n\n<pre><code>#include &lt;sys/socket.h&gt;\n\nint\nmain()\n{\n    return AF_INET;\n}\n</code></pre>\n\n<p>So my take on this is that z/OS is probably the complicating factor here, however, because I've never used z/OS before, much less programmed in it, I can't say this definitively. :-P</p>\n" .
<ph37> <Type> "Body" .
<p30> <Body> <ph37> .
<p30> <Id> "30" .
<p30> <Type> "Answer" .
<p25> <Has.Answer> <p30> .
<p30> <Owner> <u13> .
<p30> <ViewCount> "0" .
<p30> <Timestamp> "2008-08-01T12:22:40.797" .
<ph38> <Timestamp> "2016-03-19T06:10:52.170" .
<ph38> <Author> <u63550> .
<ph38> <Post> <p31> .
<ph38> <Text> "" .
<ph38> <Type> "Title" .
<p31> <Title> <ph38> .
<ph39> <Timestamp> "2016-03-19T06:10:52.170" .
<ph39> <Author> <u63550> .
<ph39> <Post> <p31> .
<ph39> <Text> "<p>The parent <code>div</code> needs to have a defined <code>width</code>, either in pixels or as a percentage. In Internet&nbsp;Explorer&nbsp;7, the parent <code>div</code> needs a defined <code>width</code> for child percentage <code>div</code>s to work correctly.</p>\n" .
<ph39> <Type> "Body" .
<p31> <Body> <ph39> .
<p31> <Id> "31" .
<p31> <Type> "Answer" .
<p6> <Has.Answer> <p31> .
<p31> <ViewCount> "0" .
<p31> <Timestamp> "2008-08-01T12:22:51.593" .
<ph40> <Timestamp> "2017-05-23T12:03:01.573" .
<ph40> <Author> <u-1> .
<ph40> <Post> <p33> .
<ph40> <Text> "" .
<ph40> <Type> "Title" .
<p33> <Title> <ph40> .
<ph41> <Timestamp> "2017-05-23T12:03:01.573" .
<ph41> <Author> <u-1> .
<ph41> <Post> <p33> .
<ph41> <Text> "<p><code>Math.Floor</code> rounds down, <code>Math.Ceiling</code> rounds up, and <code>Math.Truncate</code> rounds towards zero. Thus, <code>Math.Truncate</code> is like <code>Math.Floor</code> for positive numbers, and like <code>Math.Ceiling</code> for negative numbers. Here's the <a href=\"http://msdn.microsoft.com/en-us/library/system.math.truncate.aspx\" rel=\"noreferrer\">reference</a>.</p>\n\n<p>For completeness, <code>Math.Round</code> rounds to the nearest integer. If the number is exactly midway between two integers, then it rounds towards the even one. <a href=\"http://msdn.microsoft.com/en-us/library/system.math.round.aspx\" rel=\"noreferrer\">Reference.</a></p>\n\n<p>See also: <a href=\"https://stackoverflow.com/questions/14/whats-the-difference-between-math-floor-and-math-truncate-in-c/580252#580252\">Pax Diablo's answer</a>. Highly recommended!</p>\n" .
<ph41> <Type> "Body" .
<p33> <Body> <ph41> .
<p33> <Id> "33" .
<p33> <Type> "Answer" .
<p14> <Has.Answer> <p33> .
<p33> <Owner> <u13> .
<p33> <ViewCount> "0" .
<p33> <Timestamp> "2008-08-01T12:26:39.773" .
<ph42> <Timestamp> "2018-05-30T15:53:47.560" .
<ph42> <Author> <u5321363> .
<ph42> <Post> <p34> .
<ph42> <Text> "Unloading a ByteArray using Actionscript 3" .
<ph42> <Type> "Title" .
<p34> <Title> <ph42> .
<t-arrays> <Timestamp> "2018-05-30T15:53:47.560" .
<t-arrays> <Tag.Text> "arrays" .
<t-arrays> <Type> "Tag" .
<p34> <Tag> <t-arrays> .
<t-actionscript-3> <Timestamp> "2018-05-30T15:53:47.560" .
<t-actionscript-3> <Tag.Text> "actionscript-3" .
<t-actionscript-3> <Type> "Tag" .
<p34> <Tag> <t-actionscript-3> .
<t-flex> <Timestamp> "2018-05-30T15:53:47.560" .
<t-flex> <Tag.Text> "flex" .
<t-flex> <Type> "Tag" .
<p34> <Tag> <t-flex> .
<ph43> <Timestamp> "2018-05-30T15:53:47.560" .
<ph43> <Author> <u5321363> .
<ph43> <Post> <p34> .
<ph43> <Text> "<p>How do I forcefully unload a <code>ByteArray</code> from memory using ActionScript 3?</p>\n\n<p>I have tried the following:</p>\n\n<pre><code>// First non-working solution\nbyteArray.length = 0;\nbyteArray = new ByteArray();\n\n// Second non-working solution\nfor ( var i:int=0; i &lt; byteArray.length; i++ ) {\n    byteArray[i] = null;\n}\n</code></pre>\n" .
<ph43> <Type> "Body" .
<p34> <Body> <ph43> .
<p34> <Id> "34" .
<p34> <Type> "Question" .
<p34> <ViewCount> "8866" .
<p34> <Timestamp> "2008-08-01T12:30:57.630" .
<ph44> <Timestamp> "2016-11-30T07:50:37.517" .
<ph44> <Author> <u2571493> .
<ph44> <Post> <p36> .
<ph44> <Text> "Check for changes to an SQL Server table?" .
<ph44> <Type> "Title" .
<p36> <Title> <ph44> .
<t-sql> <Timestamp> "2016-11-30T07:50:37.517" .
<t-sql> <Tag.Text> "sql" .
<t-sql> <Type> "Tag" .
<p36> <Tag> <t-sql> .
<t-sql-server> <Timestamp> "2016-11-30T07:50:37.517" .
<t-sql-server> <Tag.Text> "sql-server" .
<t-sql-server> <Type> "Tag" .
<p36> <Tag> <t-sql-server> .
<t-datatable> <Timestamp> "2016-11-30T07:50:37.517" .
<t-datatable> <Tag.Text> "datatable" .
<t-datatable> <Type> "Tag" .
<p36> <Tag> <t-datatable> .
<t-rdbms> <Timestamp> "2016-11-30T07:50:37.517" .
<t-rdbms> <Tag.Text> "rdbms" .
<t-rdbms> <Type> "Tag" .
<p36> <Tag> <t-rdbms> .
<ph45> <Timestamp> "2016-11-30T07:50:37.517" .
<ph45> <Author> <u2571493> .
<ph45> <Post> <p36> .
<ph45> <Text> "<p>How can I monitor an SQL Server database for changes to a table without using triggers or modifying the structure of the database in any way? My preferred programming environment is <a href=\"http://en.wikipedia.org/wiki/.NET_Framework\" rel=\"noreferrer\">.NET</a> and C#.</p>\n\n<p>I'd like to be able to support any <a href=\"http://en.wikipedia.org/wiki/Microsoft_SQL_Server#Genesis\" rel=\"noreferrer\">SQL Server 2000</a> SP4 or newer. My application is a bolt-on data visualization for another company's product. Our customer base is in the thousands, so I don't want to have to put in requirements that we modify the third-party vendor's table at every installation.</p>\n\n<p>By <em>\"changes to a table\"</em> I mean changes to table data, not changes to table structure.</p>\n\n<p>Ultimately, I would like the change to trigger an event in my application, instead of having to check for changes at an interval.</p>\n\n<hr>\n\n<p>The best course of action given my requirements (no triggers or schema modification, SQL Server 2000 and 2005) seems to be to use the <code>BINARY_CHECKSUM</code> function in <a href=\"http://en.wikipedia.org/wiki/Transact-SQL\" rel=\"noreferrer\">T-SQL</a>. The way I plan to implement is this:</p>\n\n<p>Every X seconds run the following query:</p>\n\n<pre><code>SELECT CHECKSUM_AGG(BINARY_CHECKSUM(*))\nFROM sample_table\nWITH (NOLOCK);\n</code></pre>\n\n<p>And compare that against the stored value. If the value has changed, go through the table row by row using the query:</p>\n\n<pre><code>SELECT row_id, BINARY_CHECKSUM(*)\nFROM sample_table\nWITH (NOLOCK);\n</code></pre>\n\n<p>And compare the returned checksums against stored values.</p>\n" .
<ph45> <Type> "Body" .
<p36> <Body> <ph45> .
<p36> <Id> "36" .
<p36> <Type> "Question" .
<p36> <Chosen.Answer> <p352> .
<p36> <Has.Answer> <p352> .
<p36> <Owner> <u32> .
<p36> <ViewCount> "55146" .
<p36> <Timestamp> "2008-08-01T12:35:56.917" .
<ph46> <Timestamp> "2019-01-20T13:50:37.530" .
<ph46> <Author> <u567854> .
<ph46> <Post> <p39> .
<ph46> <Text> "Reliable timer in a console application" .
<ph46> <Type> "Title" .
<p39> <Title> <ph46> .
<t-c#> <Timestamp> "2019-01-20T13:50:37.530" .
<t-c#> <Tag.Text> "c#" .
<t-c#> <Type> "Tag" .
<p39> <Tag> <t-c#> .
<t-.net> <Timestamp> "2019-01-20T13:50:37.530" .
<t-.net> <Tag.Text> ".net" .
<t-.net> <Type> "Tag" .
<p39> <Tag> <t-.net> .
<t-vb.net> <Timestamp> "2019-01-20T13:50:37.530" .
<t-vb.net> <Tag.Text> "vb.net" .
<t-vb.net> <Type> "Tag" .
<p39> <Tag> <t-vb.net> .
<t-timer> <Timestamp> "2019-01-20T13:50:37.530" .
<t-timer> <Tag.Text> "timer" .
<t-timer> <Type> "Tag" .
<p39> <Tag> <t-timer> .
<ph47> <Timestamp> "2019-01-20T13:50:37.530" .
<ph47> <Author> <u567854> .
<ph47> <Post> <p39> .
<ph47> <Text> "<p>I am aware that in <a href=\"http://en.wikipedia.org/wiki/.NET_Framework\" rel=\"nofollow noreferrer\">.NET</a> there are three timer types (see <em><a href=\"http://msdn.microsoft.com/en-us/magazine/cc164015.aspx\" rel=\"nofollow noreferrer\">Comparing the Timer Classes in the .NET Framework Class Library</a></em>). I have chosen a threaded timer as the other types can drift if the main thread is busy, and I need this to be reliable.</p>\n\n<p>The way this timer works in the control of the timer is put on another thread so it can always tick along with the work begin completed on the parent thread when it is not busy.</p>\n\n<p>The issue with this timer in a console application is that while the timer is ticking along on another thread the main thread is not doing anything to the application closes.</p>\n\n<p>I tried adding a <code>while true</code> loop, but then the main thread is too busy when the timer does go off.</p>\n" .
<ph47> <Type> "Body" .
<p39> <Body> <ph47> .
<p39> <Id> "39" .
<p39> <Type> "Question" .
<p39> <Chosen.Answer> <p45> .
<p39> <Has.Answer> <p45> .
<p39> <Owner> <u33> .
<p39> <ViewCount> "5714" .
<p39> <Timestamp> "2008-08-01T12:43:11.503" .
<ph48> <Timestamp> "2015-12-14T20:05:51.823" .
<ph48> <Author> <u4595675> .
<ph48> <Post> <p42> .
<ph48> <Text> "Best way to allow plugins for a PHP application" .
<ph48> <Type> "Title" .
<p42> <Title> <ph48> .
<t-php> <Timestamp> "2015-12-14T20:05:51.823" .
<t-php> <Tag.Text> "php" .
<t-php> <Type> "Tag" .
<p42> <Tag> <t-php> .
<t-plugins> <Timestamp> "2015-12-14T20:05:51.823" .
<t-plugins> <Tag.Text> "plugins" .
<t-plugins> <Type> "Tag" .
<p42> <Tag> <t-plugins> .
<t-architecture> <Timestamp> "2015-12-14T20:05:51.823" .
<t-architecture> <Tag.Text> "architecture" .
<t-architecture> <Type> "Tag" .
<p42> <Tag> <t-architecture> .
<t-hook> <Timestamp> "2015-12-14T20:05:51.823" .
<t-hook> <Tag.Text> "hook" .
<t-hook> <Type> "Tag" .
<p42> <Tag> <t-hook> .
<ph49> <Timestamp> "2015-12-14T20:05:51.823" .
<ph49> <Author> <u4595675> .
<ph49> <Post> <p42> .
<ph49> <Text> "<p>I am starting a new web application in PHP and this time around I want to create something that people can extend by using a plugin interface. </p>\n\n<p>How does one go about writing 'hooks' into their code so that plugins can attach to specific events?</p>\n" .
<ph49> <Type> "Body" .
<p42> <Body> <ph49> .
<p42> <Id> "42" .
<p42> <Type> "Question" .
<p42> <Chosen.Answer> <p77> .
<p42> <Has.Answer> <p77> .
<p42> <Owner> <u37> .
<p42> <ViewCount> "33883" .
<p42> <Timestamp> "2008-08-01T12:50:18.587" .
<ph50> <Timestamp> "2012-10-14T12:20:15.140" .
<ph50> <Author> <u967315> .
<ph50> <Post> <p44> .
<ph50> <Text> "" .
<ph50> <Type> "Title" .
<p44> <Title> <ph50> .
<ph51> <Timestamp> "2012-10-14T12:20:15.140" .
<ph51> <Author> <u967315> .
<ph51> <Post> <p44> .
<ph51> <Text> "<p>Consider using a <a href=\"http://msdn.microsoft.com/en-us/library/system.threading.manualresetevent.aspx\" rel=\"noreferrer\" title=\"MSDN Reference\">ManualResetEvent</a> to block the main thread at the end of its processing, and call <code>Reset()</code> on it once the timer's processing has finished.  If this is something that needs to run constantly, consider moving this into a service process instead of a console app.</p>\n" .
<ph51> <Type> "Body" .
<p44> <Body> <ph51> .
<p44> <Id> "44" .
<p44> <Type> "Answer" .
<p39> <Has.Answer> <p44> .
<p44> <Owner> <u35> .
<p44> <ViewCount> "0" .
<p44> <Timestamp> "2008-08-01T12:55:42.413" .
<ph52> <Timestamp> "2012-10-14T12:20:06.700" .
<ph52> <Author> <u967315> .
<ph52> <Post> <p45> .
<ph52> <Text> "" .
<ph52> <Type> "Title" .
<p45> <Title> <ph52> .
<ph53> <Timestamp> "2012-10-14T12:20:06.700" .
<ph53> <Author> <u967315> .
<ph53> <Post> <p45> .
<ph53> <Text> "<p>You can use something like <code>Console.ReadLine()</code> to block the main thread, so other background threads (like timer threads) will still work. You may also use an <a href=\"http://msdn.microsoft.com/en-us/library/system.threading.autoresetevent.aspx\" rel=\"noreferrer\">AutoResetEvent</a> to block the execution, then (when you need to) you can call Set() method on that AutoResetEvent object to release the main thread. Also ensure that your reference to Timer object doesn't go out of scope and garbage collected.</p>\n" .
<ph53> <Type> "Body" .
<p45> <Body> <ph53> .
<p45> <Id> "45" .
<p45> <Type> "Answer" .
<p39> <Has.Answer> <p45> .
<p45> <Owner> <u39> .
<p45> <ViewCount> "0" .
<p45> <Timestamp> "2008-08-01T12:56:37.920" .
<ph54> <Timestamp> "2017-04-12T17:19:03.337" .
<ph54> <Author> <u2246271> .
<ph54> <Post> <p48> .
<ph54> <Text> "Multiple submit buttons in an HTML form" .
<ph54> <Type> "Title" .
<p48> <Title> <ph54> .
<t-html> <Timestamp> "2017-04-12T17:19:03.337" .
<t-html> <Tag.Text> "html" .
<t-html> <Type> "Tag" .
<p48> <Tag> <t-html> .
<t-form-submit> <Timestamp> "2017-04-12T17:19:03.337" .
<t-form-submit> <Tag.Text> "form-submit" .
<t-form-submit> <Type> "Tag" .
<p48> <Tag> <t-form-submit> .
<t-html-form> <Timestamp> "2017-04-12T17:19:03.337" .
<t-html-form> <Tag.Text> "html-form" .
<t-html-form> <Type> "Tag" .
<p48> <Tag> <t-html-form> .
<t-submit-button> <Timestamp> "2017-04-12T17:19:03.337" .
<t-submit-button> <Tag.Text> "submit-button" .
<t-submit-button> <Type> "Tag" .
<p48> <Tag> <t-submit-button> .
<ph55> <Timestamp> "2017-04-12T17:19:03.337" .
<ph55> <Author> <u2246271> .
<ph55> <Post> <p48> .
<ph55> <Text> "<p>Let's say you create a Wizard in an HTML form. One button goes back, and one goes forward.  Since the <em>back</em> button appears first in the markup when you press Enter it will use that button to submit the form. </p>\n\n<p>Example:</p>\n\n<p><div class=\"snippet\" data-lang=\"js\" data-hide=\"false\" data-console=\"true\" data-babel=\"false\">\r\n<div class=\"snippet-code\">\r\n<pre class=\"snippet-code-html lang-html prettyprint-override\"><code>&lt;form&gt;\r\n  &lt;!-- put your cursor in this field and press Enter --&gt;\r\n  &lt;input type=\"text\" name=\"field1\" /&gt;\r\n\r\n  &lt;!-- This is the button that will submit --&gt;\r\n  &lt;input type=\"submit\" name=\"prev\" value=\"Previous Page\" /&gt;\r\n\r\n  &lt;!-- But this is the button that I WANT to submit --&gt;\r\n  &lt;input type=\"submit\" name=\"next\" value=\"Next Page\" /&gt;\r\n&lt;/form&gt;</code></pre>\r\n</div>\r\n</div>\r\n</p>\n\n<p>What I would like to do, is get to decide which button is used to submit the form when a user presses Enter. That way, when you press Enter the Wizard will move to the next page, not the previous. Do you have to use <code>tabindex</code> to do this?</p>\n" .
<ph55> <Type> "Body" .
<p48> <Body> <ph55> .
<p48> <Id> "48" .
<p48> <Type> "Question" .
<p48> <Chosen.Answer> <p31910> .
<p48> <Has.Answer> <p31910> .
<p48> <Owner> <u40> .
<p48> <ViewCount> "205333" .
<p48> <Timestamp> "2008-08-01T13:01:17.303" .
<ph56> <Timestamp> "2019-05-15T01:15:24.680" .
<ph56> <Author> <u6083675> .
<ph56> <Post> <p49> .
<ph56> <Text> "" .
<ph56> <Type> "Title" .
<p49> <Title> <ph56> .
<ph57> <Timestamp> "2019-05-15T01:15:24.680" .
<ph57> <Author> <u6083675> .
<ph57> <Post> <p49> .
<ph57> <Text> "<p><a href=\"https://web.archive.org/web/20180330233216/http://www.brokenbuild.com/blog/2006/08/15/mysql-triggers-how-do-you-abort-an-insert-update-or-delete-with-a-trigger/\" rel=\"nofollow noreferrer\">Here is one hack</a> that may work. It isn't clean, but it looks like it might work:</p>\n\n<p>Essentially, you just try to update a column that doesn't exist.</p>\n" .
<ph57> <Type> "Body" .
<p49> <Body> <ph57> .
<p49> <Id> "49" .
<p49> <Type> "Answer" .
<p24> <Has.Answer> <p49> .
<p49> <Owner> <u43> .
<p49> <ViewCount> "0" .
<p49> <Timestamp> "2008-08-01T13:02:51.900" .
<ph58> <Timestamp> "2017-01-26T17:38:44.893" .
<ph58> <Author> <u3735690> .
<ph58> <Post> <p51> .
<ph58> <Text> "" .
<ph58> <Type> "Title" .
<p51> <Title> <ph58> .
<ph59> <Timestamp> "2017-01-26T17:38:44.893" .
<ph59> <Author> <u3735690> .
<ph59> <Post> <p51> .
<ph59> <Text> "<p>Why don't you want to use triggers?  They are a good thing if you use them correctly.  If you use them as a way to enforce referential integrity that is when they go from good to bad.  But if you use them for monitoring, they are not really considered taboo.</p>\n" .
<ph59> <Type> "Body" .
<p51> <Body> <ph59> .
<p51> <Id> "51" .
<p51> <Type> "Answer" .
<p36> <Has.Answer> <p51> .
<p51> <Owner> <u17> .
<p51> <ViewCount> "0" .
<p51> <Timestamp> "2008-08-01T13:07:52.810" .
<ph60> <Timestamp> "2008-08-01T13:08:59.127" .
<ph60> <Author> <u23> .
<ph60> <Post> <p52> .
<ph60> <Text> "" .
<ph60> <Type> "Title" .
<p52> <Title> <ph60> .
<ph61> <Timestamp> "2008-08-01T13:08:59.127" .
<ph61> <Author> <u23> .
<ph61> <Post> <p52> .
<ph61> <Text> "<p>Have a look at this article</p>\n\n<p><a href=\"http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html\" rel=\"noreferrer\">http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html</a></p>\n\n<p>IANA actionscript programmer, however the feeling I'm getting is that, because the garbage collector might not run when you want it to.</p>\n\n<p>Hence\n<a href=\"http://www.craftymind.com/2008/04/09/kick-starting-the-garbage-collector-in-actionscript-3-with-air/\" rel=\"noreferrer\">http://www.craftymind.com/2008/04/09/kick-starting-the-garbage-collector-in-actionscript-3-with-air/</a></p>\n\n<p>So I'd recommend trying out their collection code and see if it helps</p>\n\n<pre><code>private var gcCount:int;\nprivate function startGCCycle():void{\n    gcCount = 0;\n    addEventListener(Event.ENTER_FRAME, doGC);\n}\nprivate function doGC(evt:Event):void{\n    flash.system.System.gc();\n    if(++gcCount &gt; 1){\n        removeEventListener(Event.ENTER_FRAME, doGC);\n        setTimeout(lastGC, 40);\n    }\n}\nprivate function lastGC():void{\n    flash.system.System.gc();\n}\n</code></pre>\n" .
<ph61> <Type> "Body" .
<p52> <Body> <ph61> .
<p52> <Id> "52" .
<p52> <Type> "Answer" .
<p34> <Has.Answer> <p52> .
<p52> <Owner> <u23> .
<p52> <ViewCount> "0" .
<p52> <Timestamp> "2008-08-01T13:08:59.127" .
<ph62> <Timestamp> "2014-07-10T21:03:46.907" .
<ph62> <Author> <u1668244> .
<ph62> <Post> <p53> .
<ph62> <Text> "" .
<ph62> <Type> "Title" .
<p53> <Title> <ph62> .
<ph63> <Timestamp> "2014-07-10T21:03:46.907" .
<ph63> <Author> <u1668244> .
<ph63> <Post> <p53> .
<ph63> <Text> "<p>(I'm not positive about this, but...)</p>\n\n<p>AS3 uses a non-deterministic garbage collection. Which means that unreferenced memory will be freed up whenever the runtime feels like it (typically not unless there's a reason to run, since it's an expensive operation to execute). This is the same approach used by most modern garbage collected languages (like C# and Java as well).</p>\n\n<p>Assuming there are no other references to the memory pointed to by <code>byteArray</code> or the items within the array itself, the memory will be freed at some point after you exit the scope where <code>byteArray</code> is declared.</p>\n\n<p>You can force a garbage collection, though you really shouldn't. If you do, do it only for testing... if you do it in production, you'll hurt performance much more than help it.</p>\n\n<p>To force a GC, try (yes, twice):</p>\n\n<pre><code>flash.system.System.gc();\nflash.system.System.gc();\n</code></pre>\n\n<p><a href=\"http://www.craftymind.com/2008/04/09/kick-starting-the-garbage-collector-in-actionscript-3-with-air/\" rel=\"noreferrer\">You can read more here</a>.</p>\n" .
<ph63> <Type> "Body" .
<p53> <Body> <ph63> .
<p53> <Id> "53" .
<p53> <Type> "Answer" .
<p34> <Has.Answer> <p53> .
<p53> <Owner> <u34> .
<p53> <ViewCount> "0" .
<p53> <Timestamp> "2008-08-01T13:08:59.487" .
<ph64> <Timestamp> "2014-07-14T07:55:42.730" .
<ph64> <Author> <u2354564> .
<ph64> <Post> <p56> .
<ph64> <Text> "" .
<ph64> <Type> "Title" .
<p56> <Title> <ph64> .
<ph65> <Timestamp> "2014-07-14T07:55:42.730" .
<ph65> <Author> <u2354564> .
<ph65> <Post> <p56> .
<ph65> <Text> "<p>Give your submit buttons same name like this:</p>\n\n<pre><code>&lt;input type=\"submit\" name=\"submitButton\" value=\"Previous Page\" /&gt;\n&lt;input type=\"submit\" name=\"submitButton\" value=\"Next Page\" /&gt;\n</code></pre>\n\n<p>When the user presses enter and the <em>Request</em> goes to server, you can check the value for <code>submitButton</code> on your server-side code which contains a collection of form <code>name/value</code> pairs. For example in classic ASP:</p>\n\n<pre class=\"lang-vb prettyprint-override\"><code>If Request.Form(\"submitButton\") = \"Previous Page\" Then\n    ' Code for Previous Page\nElseIf Request.Form(\"submitButton\") = \"Next Page\" Then\n    ' Code for Next Page\nEnd If\n</code></pre>\n\n<p>Reference: <a href=\"http://www.chami.com/tips/internet/042599I.html\" rel=\"noreferrer\">Using multiple submit buttons on a single form</a></p>\n" .
<ph65> <Type> "Body" .
<p56> <Body> <ph65> .
<p56> <Id> "56" .
<p56> <Type> "Answer" .
<p48> <Has.Answer> <p56> .
<p56> <Owner> <u39> .
<p56> <ViewCount> "0" .
<p56> <Timestamp> "2008-08-01T13:10:16.473" .
<ph66> <Timestamp> "2015-07-06T22:50:09.980" .
<ph66> <Author> <u875317> .
<ph66> <Post> <p58> .
<ph66> <Text> "" .
<ph66> <Type> "Title" .
<p58> <Title> <ph66> .
<ph67> <Timestamp> "2015-07-06T22:50:09.980" .
<ph67> <Author> <u875317> .
<ph67> <Post> <p58> .
<ph67> <Text> "<p>Would it be possible for you to change the previous button type into a button like this:  </p>\n\n<pre><code>&lt;input type=\"button\" name=\"prev\" value=\"Previous Page\" /&gt;\n</code></pre>\n\n<p>Now the Next button would be the default, plus you could also add the <code>default</code> attribute to it so that your browser will highlight it like so:</p>\n\n<pre><code>&lt;input type=\"submit\" name=\"next\" value=\"Next Page\" default /&gt;\n</code></pre>\n\n<p>Hope that helps.</p>\n" .
<ph67> <Type> "Body" .
<p58> <Body> <ph67> .
<p58> <Id> "58" .
<p58> <Type> "Answer" .
<p48> <Has.Answer> <p58> .
<p58> <Owner> <u37> .
<p58> <ViewCount> "0" .
<p58> <Timestamp> "2008-08-01T13:14:30.303" .
<ph68> <Timestamp> "2018-01-30T16:56:45.910" .
<ph68> <Author> <u3919949> .
<ph68> <Post> <p59> .
<ph68> <Text> "How do I get a distinct, ordered list of names from a DataTable using LINQ?" .
<ph68> <Type> "Title" .
<p59> <Title> <ph68> .
<t-c#> <Timestamp> "2018-01-30T16:56:45.910" .
<t-c#> <Tag.Text> "c#" .
<t-c#> <Type> "Tag" .
<p59> <Tag> <t-c#> .
<t-linq> <Timestamp> "2018-01-30T16:56:45.910" .
<t-linq> <Tag.Text> "linq" .
<t-linq> <Type> "Tag" .
<p59> <Tag> <t-linq> .
<t-.net-3.5> <Timestamp> "2018-01-30T16:56:45.910" .
<t-.net-3.5> <Tag.Text> ".net-3.5" .
<t-.net-3.5> <Type> "Tag" .
<p59> <Tag> <t-.net-3.5> .
<ph69> <Timestamp> "2018-01-30T16:56:45.910" .
<ph69> <Author> <u3919949> .
<ph69> <Post> <p59> .
<ph69> <Text> "<p>I have a <code>DataTable</code> with a <code>Name</code> column. I want to generate a collection of the unique names ordered alphabetically. The following query ignores the <em>order by</em> clause.</p>\n\n<pre><code>var names =\n    (from DataRow dr in dataTable.Rows\n    orderby (string)dr[\"Name\"]\n    select (string)dr[\"Name\"]).Distinct();\n</code></pre>\n\n<p>Why does the <code>orderby</code> not get enforced?</p>\n" .
<ph69> <Type> "Body" .
<p59> <Body> <ph69> .
<p59> <Id> "59" .
<p59> <Type> "Question" .
<p59> <Chosen.Answer> <p43110> .
<p59> <Has.Answer> <p43110> .
<p59> <Owner> <u45> .
<p59> <ViewCount> "24053" .
<p59> <Timestamp> "2008-08-01T13:14:33.797" .
<ph70> <Timestamp> "2014-07-11T14:58:07.480" .
<ph70> <Author> <u2354564> .
<ph70> <Post> <p60> .
<ph70> <Text> "" .
<ph70> <Type> "Title" .
<p60> <Title> <ph70> .
<ph71> <Timestamp> "2014-07-11T14:58:07.480" .
<ph71> <Author> <u2354564> .
<ph71> <Post> <p60> .
<ph71> <Text> "<p>Unfortunately when it comes to memory management in <em>Flash/actionscript</em> there isn't a whole lot you can do. ActionScript was designed to be easy to use (so they didn't want people to have to worry about memory management)</p>\n\n<p>The following is a workaround, instead of creating a <code>ByteArray</code> variable try this.</p>\n\n<pre><code>var byteObject:Object = new Object();\n\nbyteObject.byteArray = new ByteArray();\n\n...\n\n//Then when you are finished delete the variable from byteObject\ndelete byteObject.byteArray;\n</code></pre>\n\n<p>Where <code>byteArray</code> is a dynamic property of <code>byteObject</code>, you can free the memory that was allocated for it.</p>\n" .
<ph71> <Type> "Body" .
<p60> <Body> <ph71> .
<p60> <Id> "60" .
<p60> <Type> "Answer" .
<p34> <Has.Answer> <p60> .
<p60> <Owner> <u41> .
<p60> <ViewCount> "0" .
<p60> <Timestamp> "2008-08-01T13:14:40.007" .
<ph72> <Timestamp> "2017-12-21T14:55:01.680" .
<ph72> <Author> <u1695458> .
<ph72> <Post> <p61> .
<ph72> <Text> "Microsoft Office 2007 file type, Mime types and identifying characters" .
<ph72> <Type> "Title" .
<p61> <Title> <ph72> .
<t-mime> <Timestamp> "2017-12-21T14:55:01.680" .
<t-mime> <Tag.Text> "mime" .
<t-mime> <Type> "Tag" .
<p61> <Tag> <t-mime> .
<t-file-type> <Timestamp> "2017-12-21T14:55:01.680" .
<t-file-type> <Tag.Text> "file-type" .
<t-file-type> <Type> "Tag" .
<p61> <Tag> <t-file-type> .
<t-office-2007> <Timestamp> "2017-12-21T14:55:01.680" .
<t-office-2007> <Tag.Text> "office-2007" .
<t-office-2007> <Type> "Tag" .
<p61> <Tag> <t-office-2007> .
<ph73> <Timestamp> "2017-12-21T14:55:01.680" .
<ph73> <Author> <u1695458> .
<ph73> <Post> <p61> .
<ph73> <Text> "<p>Where can I find a list of all of the MIME types and the identifying characters for Microsoft Office 2007 files?</p>\n\n<p>I have an upload form that is restricting uploads based on the extensions and identifying characters, but I cannot seem to find the Office 2007 MIME types.</p>\n\n<p>Can anyone help?</p>\n" .
<ph73> <Type> "Body" .
<p61> <Body> <ph73> .
<p61> <Id> "61" .
<p61> <Type> "Question" .
<p61> <ViewCount> "2738" .
<p61> <Timestamp> "2008-08-01T13:17:20.640" .
<ph74> <Timestamp> "2014-08-19T23:17:56.597" .
<ph74> <Author> <u1248536> .
<ph74> <Post> <p62> .
<ph74> <Text> "" .
<ph74> <Type> "Title" .
<p62> <Title> <ph74> .
<ph75> <Timestamp> "2014-08-19T23:17:56.597" .
<ph75> <Author> <u1248536> .
<ph75> <Post> <p62> .
<ph75> <Text> "<p><strong>The problem is that the Distinct\n operator does not grant that it will\n maintain the original order of\n values.</strong></p>\n\n<p>So your query will need to work like this</p>\n\n<pre><code>var names = (from DataRow dr in dataTable.Rows\n             select (string)dr[\"Name\"]).Distinct().OrderBy( name =&gt; name );\n</code></pre>\n" .
<ph75> <Type> "Body" .
<p62> <Body> <ph75> .
<p62> <Id> "62" .
<p62> <Type> "Answer" .
<p59> <Has.Answer> <p62> .
<p62> <Owner> <u45> .
<p62> <ViewCount> "0" .
<p62> <Timestamp> "2008-08-01T13:18:37.640" .
<ph76> <Timestamp> "2017-01-02T03:57:33.723" .
<ph76> <Author> <u5898312> .
<ph76> <Post> <p65> .
<ph76> <Text> "" .
<ph76> <Type> "Title" .
<p65> <Title> <ph76> .
<ph77> <Timestamp> "2017-01-02T03:57:33.723" .
<ph77> <Author> <u5898312> .
<ph77> <Post> <p65> .
<ph77> <Text> "<p><a href=\"http://www.bram.us/2007/05/25/office-2007-mime-types-for-iis/\" rel=\"noreferrer\">Office 2007 MIME Types for IIS</a></p>\n\n<ul>\n<li><code>.docm</code>, application/vnd.ms-word.document.macroEnabled.12</li>\n<li><code>.docx</code>, application/vnd.openxmlformats-officedocument.wordprocessingml.document</li>\n<li><code>.dotm</code>, application/vnd.ms-word.template.macroEnabled.12</li>\n<li><code>.dotx</code>, application/vnd.openxmlformats-officedocument.wordprocessingml.template</li>\n<li><code>.potm</code>, application/vnd.ms-powerpoint.template.macroEnabled.12</li>\n<li><code>.potx</code>, application/vnd.openxmlformats-officedocument.presentationml.template</li>\n<li><code>.ppam</code>, application/vnd.ms-powerpoint.addin.macroEnabled.12</li>\n<li><code>.ppsm</code>, application/vnd.ms-powerpoint.slideshow.macroEnabled.12</li>\n<li><code>.ppsx</code>, application/vnd.openxmlformats-officedocument.presentationml.slideshow</li>\n<li><code>.pptm</code>, application/vnd.ms-powerpoint.presentation.macroEnabled.12</li>\n<li><code>.pptx</code>, application/vnd.openxmlformats-officedocument.presentationml.presentation</li>\n<li><code>.xlam</code>, application/vnd.ms-excel.addin.macroEnabled.12</li>\n<li><code>.xlsb</code>, application/vnd.ms-excel.sheet.binary.macroEnabled.12</li>\n<li><code>.xlsm</code>, application/vnd.ms-excel.sheet.macroEnabled.12</li>\n<li><code>.xlsx</code>, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</li>\n<li><code>.xltm</code>, application/vnd.ms-excel.template.macroEnabled.12</li>\n<li><code>.xltx</code>, application/vnd.openxmlformats-officedocument.spreadsheetml.template</li>\n</ul>\n" .
<ph77> <Type> "Body" .
<p65> <Body> <ph77> .
<p65> <Id> "65" .
<p65> <Type> "Answer" .
<p61> <Has.Answer> <p65> .
<p65> <Owner> <u35> .
<p65> <ViewCount> "0" .
<p65> <Timestamp> "2008-08-01T13:20:44.283" .
<ph78> <Timestamp> "2012-05-04T09:03:54.213" .
<ph78> <Author> <u1039608> .
<ph78> <Post> <p66> .
<ph78> <Text> "Paging a collection with LINQ" .
<ph78> <Type> "Title" .
<p66> <Title> <ph78> .
<t-linq> <Timestamp> "2012-05-04T09:03:54.213" .
<t-linq> <Tag.Text> "linq" .
<t-linq> <Type> "Tag" .
<p66> <Tag> <t-linq> .
<t-.net-3.5> <Timestamp> "2012-05-04T09:03:54.213" .
<t-.net-3.5> <Tag.Text> ".net-3.5" .
<t-.net-3.5> <Type> "Tag" .
<p66> <Tag> <t-.net-3.5> .
<ph79> <Timestamp> "2012-05-04T09:03:54.213" .
<ph79> <Author> <u1039608> .
<ph79> <Post> <p66> .
<ph79> <Text> "<p>How do you page through a collection in LINQ given that you have a <code>startIndex</code> and a <code>count</code>?</p>\n" .
<ph79> <Type> "Body" .
<p66> <Body> <ph79> .
<p66> <Id> "66" .
<p66> <Type> "Question" .
<p66> <Chosen.Answer> <p4521> .
<p66> <Has.Answer> <p4521> .
<p66> <Owner> <u17> .
<p66> <ViewCount> "4414" .
<p66> <Timestamp> "2008-08-01T13:20:46.890" .
<ph80> <Timestamp> "2012-05-04T09:04:26.523" .
<ph80> <Author> <u1039608> .
<ph80> <Post> <p68> .
<ph80> <Text> "" .
<ph80> <Type> "Title" .
<p68> <Title> <ph80> .
<ph81> <Timestamp> "2012-05-04T09:04:26.523" .
<ph81> <Author> <u1039608> .
<ph81> <Post> <p68> .
<ph81> <Text> "<p>It is very simple with the <code>Skip</code> and <code>Take</code> extension methods.</p>\n\n<pre><code>var query = from i in ideas\n            select i;\n\nvar paggedCollection = query.Skip(startIndex).Take(count);\n</code></pre>\n" .
<ph81> <Type> "Body" .
<p68> <Body> <ph81> .
<p68> <Id> "68" .
<p68> <Type> "Answer" .
<p66> <Has.Answer> <p68> .
<p68> <Owner> <u17> .
<p68> <ViewCount> "0" .
<p68> <Timestamp> "2008-08-01T13:22:04.483" .
<ph82> <Timestamp> "2012-05-25T21:09:03.593" .
<ph82> <Author> <u63550> .
<ph82> <Post> <p71> .
<ph82> <Text> "" .
<ph82> <Type> "Title" .
<p71> <Title> <ph82> .
<ph83> <Timestamp> "2012-05-25T21:09:03.593" .
<ph83> <Author> <u63550> .
<ph83> <Post> <p71> .
<ph83> <Text> "<p>Here's a general description of a technique for calculating pi that I learnt in high school.</p>\n\n<p>I only share this because I think it is simple enough that anyone can remember it, indefinitely, plus it teaches you the concept of \"Monte-Carlo\" methods -- which are statistical methods of arriving at answers that don't immediately appear to be deducible through random processes.</p>\n\n<p>Draw a square, and inscribe a quadrant (one quarter of a semi-circle) inside that square (a quadrant with radius equal to the side of the square, so it fills as much of the square as possible)</p>\n\n<p>Now throw a dart at the square, and record where it lands -- that is, choose a random point anywhere inside the square. Of course, it landed inside the square, but is it inside the semi-circle? Record this fact.</p>\n\n<p>Repeat this process many times -- and you will find there is a ratio of the number of points inside the semi-circle versus the total number thrown, call this ratio x.</p>\n\n<p>Since the area of the square is r times r, you can deduce that the area of the semi circle is x times r times r (that is, x times r squared). Hence x times 4 will give you pi. </p>\n\n<p>This is not a quick method to use. But it's a nice example of a Monte Carlo method. And if you look around, you may find that many problems otherwise outside your computational skills can be solved by such methods.</p>\n" .
<ph83> <Type> "Body" .
<p71> <Body> <ph83> .
<p71> <Id> "71" .
<p71> <Type> "Answer" .
<p19> <Has.Answer> <p71> .
<p71> <Owner> <u49> .
<p71> <ViewCount> "0" .
<p71> <Timestamp> "2008-08-01T13:37:59.723" .
<ph84> <Timestamp> "2016-12-30T06:56:18.310" .
<ph84> <Author> <u2909897> .
<ph84> <Post> <p72> .
<ph84> <Text> "How do I add existing comments to RDoc in Ruby?" .
<ph84> <Type> "Title" .
<p72> <Title> <ph84> .
<t-ruby> <Timestamp> "2016-12-30T06:56:18.310" .
<t-ruby> <Tag.Text> "ruby" .
<t-ruby> <Type> "Tag" .
<p72> <Tag> <t-ruby> .
<t-rdoc> <Timestamp> "2016-12-30T06:56:18.310" .
<t-rdoc> <Tag.Text> "rdoc" .
<t-rdoc> <Type> "Tag" .
<p72> <Tag> <t-rdoc> .
<ph85> <Timestamp> "2016-12-30T06:56:18.310" .
<ph85> <Author> <u2909897> .
<ph85> <Post> <p72> .
<ph85> <Text> "<p>I want to format my existing comments as 'RDoc comments' so they can be viewed using <code>ri</code>.</p>\n\n<p>What are some recommended resources for starting out using RDoc?</p>\n" .
<ph85> <Type> "Body" .
<p72> <Body> <ph85> .
<p72> <Id> "72" .
<p72> <Type> "Question" .
<p72> <Owner> <u25> .
<p72> <ViewCount> "1357" .
<p72> <Timestamp> "2008-08-01T13:38:27.133" .
<ph86> <Timestamp> "2008-08-01T13:54:25.510" .
<ph86> <Author> <u13> .
<ph86> <Post> <p73> .
<ph86> <Text> "" .
<ph86> <Type> "Title" .
<p73> <Title> <ph86> .
<ph87> <Timestamp> "2008-08-01T13:54:25.510" .
<ph87> <Author> <u13> .
<ph87> <Post> <p73> .
<ph87> <Text> "<p>@Jax: The <code>extern \"C\"</code> thing matters, very very much. If a header file doesn't have one, then (unless it's a C++-only header file), you would have to enclose your <code>#include</code> with it:</p>\n\n<pre><code>extern \"C\" {\n#include &lt;sys/socket.h&gt;\n// include other similarly non-compliant header files\n}\n</code></pre>\n\n<p>Basically, anytime where a C++ program wants to link to C-based facilities, the <code>extern \"C\"</code> is vital. In practical terms, it means that the names used in external references will not be mangled, like normal C++ names would. <a href=\"http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html\" rel=\"noreferrer\">Reference.</a></p>\n" .
<ph87> <Type> "Body" .
<p73> <Body> <ph87> .
<p73> <Id> "73" .
<p73> <Type> "Answer" .
<p25> <Has.Answer> <p73> .
<p73> <Owner> <u13> .
<p73> <ViewCount> "0" .
<p73> <Timestamp> "2008-08-01T13:40:16.443" .
<ph88> <Timestamp> "2008-08-01T13:44:35.843" .
<ph88> <Author> <u50> .
<ph88> <Post> <p76> .
<ph88> <Text> "" .
<ph88> <Type> "Title" .
<p76> <Title> <ph88> .
<ph89> <Timestamp> "2008-08-01T13:44:35.843" .
<ph89> <Author> <u50> .
<ph89> <Post> <p76> .
<ph89> <Text> "<p>I believe the easiest way would be to follow Jeff's own advice and have a look around existing code. Try looking at Wordpress, Drupal, Joomla and other well known PHP-based CMS's to see how their API hooks look and feel. This way you can even get ideas you may have not thought of previously to make things a little more rubust.</p>\n\n<p>A more direct answer would be to write general files that they would \"include_once\" into their file that would provide the usability they would need. This would be broken up into categories and NOT provided in one MASSIVE \"hooks.php\" file. Be careful though, because what ends up happening is that files that they include end up having more and more dependencies and functionality improves. Try to keep API dependencies low. I.E fewer files for them to include.</p>\n" .
<ph89> <Type> "Body" .
<p76> <Body> <ph89> .
<p76> <Id> "76" .
<p76> <Type> "Answer" .
<p42> <Has.Answer> <p76> .
<p76> <Owner> <u50> .
<p76> <ViewCount> "0" .
<p76> <Timestamp> "2008-08-01T13:44:35.843" .
<ph90> <Timestamp> "2017-02-20T11:18:33.207" .
<ph90> <Author> <u4380409> .
<ph90> <Post> <p77> .
<ph90> <Text> "" .
<ph90> <Type> "Title" .
<p77> <Title> <ph90> .
<ph91> <Timestamp> "2017-02-20T11:18:33.207" .
<ph91> <Author> <u4380409> .
<ph91> <Post> <p77> .
<ph91> <Text> "<p>You could use an Observer pattern.  A simple functional way to accomplish this:</p>\n\n<pre><code>&lt;?php\n\n/** Plugin system **/\n\n$listeners = array();\n\n/* Create an entry point for plugins */\nfunction hook() {\n    global $listeners;\n\n    $num_args = func_num_args();\n    $args = func_get_args();\n\n    if($num_args &lt; 2)\n        trigger_error(\"Insufficient arguments\", E_USER_ERROR);\n\n    // Hook name should always be first argument\n    $hook_name = array_shift($args);\n\n    if(!isset($listeners[$hook_name]))\n        return; // No plugins have registered this hook\n\n    foreach($listeners[$hook_name] as $func) {\n        $args = $func($args); \n    }\n    return $args;\n}\n\n/* Attach a function to a hook */\nfunction add_listener($hook, $function_name) {\n    global $listeners;\n    $listeners[$hook][] = $function_name;\n}\n\n/////////////////////////\n\n/** Sample Plugin **/\nadd_listener('a_b', 'my_plugin_func1');\nadd_listener('str', 'my_plugin_func2');\n\nfunction my_plugin_func1($args) {\n    return array(4, 5);\n}\n\nfunction my_plugin_func2($args) {\n    return str_replace('sample', 'CRAZY', $args[0]);\n}\n\n/////////////////////////\n\n/** Sample Application **/\n\n$a = 1;\n$b = 2;\n\nlist($a, $b) = hook('a_b', $a, $b);\n\n$str  = \"This is my sample application\\n\";\n$str .= \"$a + $b = \".($a+$b).\"\\n\";\n$str .= \"$a * $b = \".($a*$b).\"\\n\";\n\n$str = hook('str', $str);\necho $str;\n?&gt;\n</code></pre>\n\n<p><strong>Output:</strong></p>\n\n<pre><code>This is my CRAZY application\n4 + 5 = 9\n4 * 5 = 20\n</code></pre>\n\n<p><strong>Notes:</strong></p>\n\n<p>For this example source code, you must declare all your plugins before the actual source code that you want to be extendable.  I've included an example of how to handle single or multiple values being passed to the plugin.  The hardest part of this is writing the actual documentation which lists what arguments get passed to each hook.</p>\n\n<p>This is just one method of accomplishing a plugin system in PHP.  There are better alternatives, I suggest you check out the WordPress Documentation for more information.</p>\n\n<p><em>Sorry, it appears underscore characters are replaced by HTML entities by Markdown?  I can re-post this code when this bug gets fixed.</em></p>\n\n<p><em>Edit: Nevermind, it only appears that way when you are editing</em></p>\n" .
<ph91> <Type> "Body" .
<p77> <Body> <ph91> .
<p77> <Id> "77" .
<p77> <Type> "Answer" .
<p42> <Has.Answer> <p77> .
<p77> <Owner> <u40> .
<p77> <ViewCount> "0" .
<p77> <Timestamp> "2008-08-01T13:46:00.097" .
<ph92> <Timestamp> "2012-10-14T11:54:40.347" .
<ph92> <Author> <u967315> .
<ph92> <Post> <p78> .
<ph92> <Text> "" .
<ph92> <Type> "Title" .
<p78> <Title> <ph92> .
<ph93> <Timestamp> "2012-10-14T11:54:40.347" .
<ph93> <Author> <u967315> .
<ph93> <Post> <p78> .
<ph93> <Text> "<p>It sounds like <code>this.Opacity</code> is a double value, and the compiler doesn't like you trying to cram a decimal value into it.</p>\n" .
<ph93> <Type> "Body" .
<p78> <Body> <ph93> .
<p78> <Id> "78" .
<p78> <Type> "Answer" .
<p4> <Has.Answer> <p78> .
<p78> <Owner> <u55> .
<p78> <ViewCount> "0" .
<p78> <Timestamp> "2008-08-01T13:53:06.357" .
<ph94> <Timestamp> "2016-03-10T03:47:08.200" .
<ph94> <Author> <u415755> .
<ph94> <Post> <p79> .
<ph94> <Text> "Getting Subclipse in Aptana to work with the newest release of Subversion" .
<ph94> <Type> "Title" .
<p79> <Title> <ph94> .
<t-eclipse> <Timestamp> "2016-03-10T03:47:08.200" .
<t-eclipse> <Tag.Text> "eclipse" .
<t-eclipse> <Type> "Tag" .
<p79> <Tag> <t-eclipse> .
<t-svn> <Timestamp> "2016-03-10T03:47:08.200" .
<t-svn> <Tag.Text> "svn" .
<t-svn> <Type> "Tag" .
<p79> <Tag> <t-svn> .
<t-aptana> <Timestamp> "2016-03-10T03:47:08.200" .
<t-aptana> <Tag.Text> "aptana" .
<t-aptana> <Type> "Tag" .
<p79> <Tag> <t-aptana> .
<t-subclipse> <Timestamp> "2016-03-10T03:47:08.200" .
<t-subclipse> <Tag.Text> "subclipse" .
<t-subclipse> <Type> "Tag" .
<p79> <Tag> <t-subclipse> .
<ph95> <Timestamp> "2016-03-10T03:47:08.200" .
<ph95> <Author> <u415755> .
<ph95> <Post> <p79> .
<ph95> <Text> "<p>The version of <strong>Subclipse (1.2.4)</strong> currently available through Aptana's automatic <em>Plugins Manager</em> does not work with the newest version of Subversion.</p>\n\n<p>I see on the Subclipse website however that they have 1.4.2 out for Eclipse. So I added a <a href=\"http://subclipse.tigris.org/update_1.4.x\" rel=\"noreferrer\">new remote update site</a> to my Update manager. When I tried to install it, it told me I needed <strong>Mylyn 3.0.0</strong>. So after much searching I found Mylyn 3.0.0 and added <a href=\"http://download.eclipse.org/tools/mylyn/update/e3.3\" rel=\"noreferrer\">another new remote update site</a> to my update manager. Then when I tried to install that, it told me I needed <strong>org.eclipse.ui 3.3.0</strong> or equivalent.</p>\n\n<p>Looking at the configuration details for Aptana, it looks like it is built against eclipse 3.2.2.</p>\n\n<p>Does anyone know if there is a way to upgrade the version of Eclipse Aptana that is built against to 3.3.0? Or if there is some other way to get Subclipse to work with the very newest version of Subversion?</p>\n\n<p>I know this isn't necessarily a \"programming\" question, but I hope it's ok since it's highly relevant to the programming experience.</p>\n" .
<ph95> <Type> "Body" .
<p79> <Body> <ph95> .
<p79> <Id> "79" .
<p79> <Type> "Question" .
<p79> <Chosen.Answer> <p62853> .
<p79> <Has.Answer> <p62853> .
<p79> <Owner> <u58> .
<p79> <ViewCount> "10825" .
<p79> <Timestamp> "2008-08-01T13:56:33.837" .
<ph96> <Timestamp> "2017-04-28T13:42:44.903" .
<ph96> <Author> <u3641067> .
<ph96> <Post> <p80> .
<ph96> <Text> "SQLStatement.execute() - multiple queries in one statement" .
<ph96> <Type> "Title" .
<p80> <Title> <ph96> .
<t-flex> <Timestamp> "2017-04-28T13:42:44.903" .
<t-flex> <Tag.Text> "flex" .
<t-flex> <Type> "Tag" .
<p80> <Tag> <t-flex> .
<t-actionscript-3> <Timestamp> "2017-04-28T13:42:44.903" .
<t-actionscript-3> <Tag.Text> "actionscript-3" .
<t-actionscript-3> <Type> "Tag" .
<p80> <Tag> <t-actionscript-3> .
<t-air> <Timestamp> "2017-04-28T13:42:44.903" .
<t-air> <Tag.Text> "air" .
<t-air> <Type> "Tag" .
<p80> <Tag> <t-air> .
<ph97> <Timestamp> "2017-04-28T13:42:44.903" .
<ph97> <Author> <u3641067> .
<ph97> <Post> <p80> .
<ph97> <Text> "<p>I've written a database generation script in <a href=\"http://en.wikipedia.org/wiki/SQL\" rel=\"noreferrer\">SQL</a> and want to execute it in my <a href=\"http://en.wikipedia.org/wiki/Adobe_Integrated_Runtime\" rel=\"noreferrer\">Adobe AIR</a> application:</p>\n\n<pre><code>Create Table tRole (\n    roleID integer Primary Key\n    ,roleName varchar(40)\n);\nCreate Table tFile (\n    fileID integer Primary Key\n    ,fileName varchar(50)\n    ,fileDescription varchar(500)\n    ,thumbnailID integer\n    ,fileFormatID integer\n    ,categoryID integer\n    ,isFavorite boolean\n    ,dateAdded date\n    ,globalAccessCount integer\n    ,lastAccessTime date\n    ,downloadComplete boolean\n    ,isNew boolean\n    ,isSpotlight boolean\n    ,duration varchar(30)\n);\nCreate Table tCategory (\n    categoryID integer Primary Key\n    ,categoryName varchar(50)\n    ,parent_categoryID integer\n);\n...\n</code></pre>\n\n<p>I execute this in Adobe AIR using the following methods:</p>\n\n<pre><code>public static function RunSqlFromFile(fileName:String):void {\n    var file:File = File.applicationDirectory.resolvePath(fileName);\n    var stream:FileStream = new FileStream();\n    stream.open(file, FileMode.READ)\n    var strSql:String = stream.readUTFBytes(stream.bytesAvailable);\n    NonQuery(strSql);\n}\n\npublic static function NonQuery(strSQL:String):void {\n    var sqlConnection:SQLConnection = new SQLConnection();\n    sqlConnection.open(File.applicationStorageDirectory.resolvePath(DBPATH));\n    var sqlStatement:SQLStatement = new SQLStatement();\n    sqlStatement.text = strSQL;\n    sqlStatement.sqlConnection = sqlConnection;\n    try {\n        sqlStatement.execute();\n    } catch (error:SQLError) {\n        Alert.show(error.toString());\n    }\n}\n</code></pre>\n\n<p>No errors are generated, however only <code>tRole</code> exists. It seems that it only looks at the first query (up to the semicolon- if I remove it, the query fails). Is there a way to call multiple queries in one statement?</p>\n" .
<ph97> <Type> "Body" .
<p80> <Body> <ph97> .
<p80> <Id> "80" .
<p80> <Type> "Question" .
<p80> <Chosen.Answer> <p124> .
<p80> <Has.Answer> <p124> .
<p80> <Owner> <u26> .
<p80> <ViewCount> "5306" .
<p80> <Timestamp> "2008-08-01T13:57:07.033" .
<ph98> <Timestamp> "2012-10-14T12:18:19.590" .
<ph98> <Author> <u967315> .
<ph98> <Post> <p81> .
<ph98> <Text> "" .
<ph98> <Type> "Title" .
<p81> <Title> <ph98> .
<ph99> <Timestamp> "2012-10-14T12:18:19.590" .
<ph99> <Author> <u967315> .
<ph99> <Post> <p81> .
<ph99> <Text> "<p>I believe you have answered your own question...</p>\n\n<p><code>System.totalMemory</code> gives you the total amount of memory being \"used\", not allocated. It is accurate that your application may only be using 20mb, but it has 5mb that is free for future allocations.</p>\n\n<p>I'm not sure if the Adobe docs would shed light on the way that it manages memory...</p>\n" .
<ph99> <Type> "Body" .
<p81> <Body> <ph99> .
<p81> <Id> "81" .
<p81> <Type> "Answer" .
<p34> <Has.Answer> <p81> .
<p81> <Owner> <u41> .
<p81> <ViewCount> "0" .
<p81> <Timestamp> "2008-08-01T14:03:22.230" .
<ph100> <Timestamp> "2008-08-01T14:06:28.560" .
<ph100> <Author> <u51> .
<ph100> <Post> <p82> .
<ph100> <Text> "" .
<ph100> <Type> "Title" .
<p82> <Title> <ph100> .
<ph101> <Timestamp> "2008-08-01T14:06:28.560" .
<ph101> <Author> <u51> .
<ph101> <Post> <p82> .
<ph101> <Text> "<p>Have a DTS job (or a job that is started by a windows service) that runs at a given interval. Each time it is run, it gets information about the given table by using the system <a href=\"http://msdn.microsoft.com/en-us/library/ms186778.aspx\" rel=\"noreferrer\">INFORMATION_SCHEMA</a> tables, and records this data in the data repository. Compare the data returned regarding the structure of the table with the data returned the previous time. If it is different, then you know that the structure has changed.</p>\n\n<p>Example query to return information regarding all of the columns in table ABC (ideally listing out just the columns from the INFORMATION_SCHEMA table that you want, instead of using *select ** like I do here):</p>\n\n<pre><code>select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'ABC'\n</code></pre>\n\n<p>You would monitor different columns and INFORMATION_SCHEMA views depending on how exactly you define \"changes to a table\".</p>\n" .
<ph101> <Type> "Body" .
<p82> <Body> <ph101> .
<p82> <Id> "82" .
<p82> <Type> "Answer" .
<p36> <Has.Answer> <p82> .
<p82> <Owner> <u51> .
<p82> <ViewCount> "0" .
<p82> <Timestamp> "2008-08-01T14:06:28.560" .
<ph102> <Timestamp> "2008-10-18T18:26:59.070" .
<ph102> <Author> <u5469> .
<ph102> <Post> <p84> .
<ph102> <Text> "" .
<ph102> <Type> "Title" .
<p84> <Title> <ph102> .
<ph103> <Timestamp> "2008-10-18T18:26:59.070" .
<ph103> <Author> <u5469> .
<ph103> <Post> <p84> .
<ph103> <Text> "<p>If you use a return type of <code>IEnumerable</code>, you can return your <strong>query</strong> variable directly.</p>\n" .
<ph103> <Type> "Body" .
<p84> <Body> <ph103> .
<p84> <Id> "84" .
<p84> <Type> "Answer" .
<p16> <Has.Answer> <p84> .
<p84> <Owner> <u60> .
<p84> <ViewCount> "0" .
<p84> <Timestamp> "2008-08-01T14:10:55.757" .
<ph104> <Timestamp> "2018-05-30T15:51:16.253" .
<ph104> <Author> <u5321363> .
<ph104> <Post> <p85> .
<ph104> <Text> "Flat file databases" .
<ph104> <Type> "Title" .
<p85> <Title> <ph104> .
<t-php> <Timestamp> "2018-05-30T15:51:16.253" .
<t-php> <Tag.Text> "php" .
<t-php> <Type> "Tag" .
<p85> <Tag> <t-php> .
<t-sql> <Timestamp> "2018-05-30T15:51:16.253" .
<t-sql> <Tag.Text> "sql" .
<t-sql> <Type> "Tag" .
<p85> <Tag> <t-sql> .
<t-database> <Timestamp> "2018-05-30T15:51:16.253" .
<t-database> <Tag.Text> "database" .
<t-database> <Type> "Tag" .
<p85> <Tag> <t-database> .
<t-flat-file> <Timestamp> "2018-05-30T15:51:16.253" .
<t-flat-file> <Tag.Text> "flat-file" .
<t-flat-file> <Type> "Tag" .
<p85> <Tag> <t-flat-file> .
<ph105> <Timestamp> "2018-05-30T15:51:16.253" .
<ph105> <Author> <u5321363> .
<ph105> <Post> <p85> .
<ph105> <Text> "<p>What are the best practices around creating flat file database structures in PHP?</p>\n\n<p>A lot of the more mature PHP flat file frameworks I see out there attempt to implement SQL-like query syntax, which is over the top for my purposes in most cases (I would just use a database at that point).</p>\n\n<p>Are there any elegant tricks out there to get good performance and features with a small code overhead?</p>\n" .
<ph105> <Type> "Body" .
<p85> <Body> <ph105> .
<p85> <Id> "85" .
<p85> <Type> "Question" .
<p85> <Chosen.Answer> <p154> .
<p85> <Has.Answer> <p154> .
<p85> <Owner> <u59> .
<p85> <ViewCount> "52878" .
<p85> <Timestamp> "2008-08-01T14:19:52.510" .
<ph106> <Timestamp> "2014-07-11T14:42:28.547" .
<ph106> <Author> <u2354564> .
<ph106> <Post> <p86> .
<ph106> <Text> "" .
<ph106> <Type> "Title" .
<p86> <Title> <ph106> .
<ph107> <Timestamp> "2014-07-11T14:42:28.547" .
<ph107> <Author> <u2354564> .
<ph107> <Post> <p86> .
<ph107> <Text> "<p>A more generic answer for the generic question \"Decimal vs Double?\": <strong>Decimal</strong> for monetary calculations to preserve the precision, <strong>Double</strong> for scientific calculations that do not get affected by small differences. Since Double is a type which is native to the CPU (internal representation is stored in <em>base 2</em>), calculations made with Double perform better then Decimal (which is represented in <em>base 10</em> internally).</p>\n" .
<ph107> <Type> "Body" .
<p86> <Body> <ph107> .
<p86> <Id> "86" .
<p86> <Type> "Answer" .
<p4> <Has.Answer> <p86> .
<p86> <Owner> <u39> .
<p86> <ViewCount> "0" .
<p86> <Timestamp> "2008-08-01T14:23:28.087" .
<ph108> <Timestamp> "2015-08-24T17:19:04.537" .
<ph108> <Author> <u4551041> .
<ph108> <Post> <p87> .
<ph108> <Text> "" .
<ph108> <Type> "Title" .
<p87> <Title> <ph108> .
<ph109> <Timestamp> "2015-08-24T17:19:04.537" .
<ph109> <Author> <u4551041> .
<ph109> <Post> <p87> .
<ph109> <Text> "<p>One framework I'm considering would be for a blogging platform. Since just about any possible view of data you would want would be sorted by date, I was thinking about this structure:</p>\n\n<p>One directory per content node:</p>\n\n<pre><code>./content/YYYYMMDDHHMMSS/\n</code></pre>\n\n<p>Subdirectories of each node including  </p>\n\n<pre><code>/tags  \n/authors  \n/comments  \n</code></pre>\n\n<p>As well as simple text files in the node directory for pre- and post-rendered content and the like.</p>\n\n<p>This would allow a simple PHP <a href=\"http://us3.php.net/glob\" rel=\"noreferrer\"><code>glob()</code></a> call (and probably a reversal of the result array) to query on just about anything within the content structure:</p>\n\n<pre><code>glob(\"content/*/tags/funny\");  \n</code></pre>\n\n<p>Would return paths including all articles tagged \"funny\".</p>\n" .
<ph109> <Type> "Body" .
<p87> <Body> <ph109> .
<p87> <Id> "87" .
<p87> <Type> "Answer" .
<p85> <Has.Answer> <p87> .
<p87> <Owner> <u59> .
<p87> <ViewCount> "0" .
<p87> <Timestamp> "2008-08-01T14:26:22.793" .
<ph110> <Timestamp> "2018-05-31T01:36:13.093" .
<ph110> <Author> <u5321363> .
<ph110> <Post> <p88> .
<ph110> <Text> "Is gettimeofday() guaranteed to be of microsecond resolution?" .
<ph110> <Type> "Title" .
<p88> <Title> <ph110> .
<t-linux> <Timestamp> "2018-05-31T01:36:13.093" .
<t-linux> <Tag.Text> "linux" .
<t-linux> <Type> "Tag" .
<p88> <Tag> <t-linux> .
<t-winapi> <Timestamp> "2018-05-31T01:36:13.093" .
<t-winapi> <Tag.Text> "winapi" .
<t-winapi> <Type> "Tag" .
<p88> <Tag> <t-winapi> .
<t-visual-c++> <Timestamp> "2018-05-31T01:36:13.093" .
<t-visual-c++> <Tag.Text> "visual-c++" .
<t-visual-c++> <Type> "Tag" .
<p88> <Tag> <t-visual-c++> .
<t-unix> <Timestamp> "2018-05-31T01:36:13.093" .
<t-unix> <Tag.Text> "unix" .
<t-unix> <Type> "Tag" .
<p88> <Tag> <t-unix> .
<t-timer> <Timestamp> "2018-05-31T01:36:13.093" .
<t-timer> <Tag.Text> "timer" .
<t-timer> <Type> "Tag" .
<p88> <Tag> <t-timer> .
<ph111> <Timestamp> "2018-05-31T01:36:13.093" .
<ph111> <Author> <u5321363> .
<ph111> <Post> <p88> .
<ph111> <Text> "<p>I am porting a game, that was originally written for the Win32 API, to Linux (well, porting the OS X port of the Win32 port to Linux).</p>\n\n<p>I have implemented <code>QueryPerformanceCounter</code> by giving the uSeconds since the process start up:     </p>\n\n<pre><code>BOOL QueryPerformanceCounter(LARGE_INTEGER* performanceCount)\n{\n    gettimeofday(&amp;currentTimeVal, NULL);\n    performanceCount-&gt;QuadPart = (currentTimeVal.tv_sec - startTimeVal.tv_sec);\n    performanceCount-&gt;QuadPart *= (1000 * 1000);\n    performanceCount-&gt;QuadPart += (currentTimeVal.tv_usec - startTimeVal.tv_usec);\n\n    return true;\n}\n</code></pre>\n\n<p>This, coupled with <code>QueryPerformanceFrequency()</code> giving a constant 1000000 as the frequency, works well <b>on my machine</b>, giving me a 64 bit variable that contains <code>uSeconds</code> since the program's start up.</p>\n\n<p>So <em>is this portable?</em> I don't want to discover it works differently if the kernel was compiled in a certain way or anything like that. I am fine with it being non-portable to something other than Linux, however.</p>\n" .
<ph111> <Type> "Body" .
<p88> <Body> <ph111> .
<p88> <Id> "88" .
<p88> <Type> "Question" .
<p88> <Chosen.Answer> <p98> .
<p88> <Has.Answer> <p98> .
<p88> <Owner> <u61> .
<p88> <ViewCount> "38954" .
<p88> <Timestamp> "2008-08-01T14:36:18.640" .
<ph112> <Timestamp> "2017-08-24T17:01:23.503" .
<ph112> <Author> <u58> .
<ph112> <Post> <p90> .
<ph112> <Text> "How do you branch and merge with TortoiseSVN?" .
<ph112> <Type> "Title" .
<p90> <Title> <ph112> .
<t-svn> <Timestamp> "2017-08-24T17:01:23.503" .
<t-svn> <Tag.Text> "svn" .
<t-svn> <Type> "Tag" .
<p90> <Tag> <t-svn> .
<t-tortoisesvn> <Timestamp> "2017-08-24T17:01:23.503" .
<t-tortoisesvn> <Tag.Text> "tortoisesvn" .
<t-tortoisesvn> <Type> "Tag" .
<p90> <Tag> <t-tortoisesvn> .
<t-branch> <Timestamp> "2017-08-24T17:01:23.503" .
<t-branch> <Tag.Text> "branch" .
<t-branch> <Type> "Tag" .
<p90> <Tag> <t-branch> .
<t-branching-and-merging> <Timestamp> "2017-08-24T17:01:23.503" .
<t-branching-and-merging> <Tag.Text> "branching-and-merging" .
<t-branching-and-merging> <Type> "Tag" .
<p90> <Tag> <t-branching-and-merging> .
<ph113> <Timestamp> "2017-08-24T17:01:23.503" .
<ph113> <Author> <u58> .
<ph113> <Post> <p90> .
<ph113> <Text> "<p>How do you <a href=\"http://svnbook.red-bean.com/en/1.8/svn.branchmerge.html\" rel=\"noreferrer\">branch and merge</a> with Apache Subversion using the TortoiseSVN client? </p>\n" .
<ph113> <Type> "Body" .
<p90> <Body> <ph113> .
<p90> <Id> "90" .
<p90> <Type> "Question" .
<p90> <Chosen.Answer> <p1466832> .
<p90> <Has.Answer> <p1466832> .
<p90> <Owner> <u58> .
<p90> <ViewCount> "54970" .
<p90> <Timestamp> "2008-08-01T14:41:24.277" .
<ph114> <Timestamp> "2008-08-01T14:45:37.403" .
<ph114> <Author> <u61> .
<ph114> <Post> <p92> .
<ph114> <Text> "" .
<ph114> <Type> "Title" .
<p92> <Title> <ph114> .
<ph115> <Timestamp> "2008-08-01T14:45:37.403" .
<ph115> <Author> <u61> .
<ph115> <Post> <p92> .
<ph115> <Text> "<p><a href=\"http://svnbook.red-bean.com/\" rel=\"noreferrer\">Version Control with Subversion</a></p>\n\n<p>A very good resource for source control in general. Not really TortoiseSVN specific, though.</p>\n" .
<ph115> <Type> "Body" .
<p92> <Body> <ph115> .
<p92> <Id> "92" .
<p92> <Type> "Answer" .
<p90> <Has.Answer> <p92> .
<p92> <Owner> <u61> .
<p92> <ViewCount> "0" .
<p92> <Timestamp> "2008-08-01T14:45:37.403" .
<ph116> <Timestamp> "2008-08-01T15:01:13.003" .
<ph116> <Author> <u25> .
<ph116> <Post> <p93> .
<ph116> <Text> "" .
<ph116> <Type> "Title" .
<p93> <Title> <ph116> .
<ph117> <Timestamp> "2008-08-01T15:01:13.003" .
<ph117> <Author> <u25> .
<ph117> <Post> <p93> .
<ph117> <Text> "<p>From my experience, and from what I've read across the internet, the answer is \"No,\" it is not guaranteed.  It depends on CPU speed, operating system, flavor of Linux, etc.</p>\n" .
<ph117> <Type> "Body" .
<p93> <Body> <ph117> .
<p93> <Id> "93" .
<p93> <Type> "Answer" .
<p88> <Has.Answer> <p93> .
<p93> <Owner> <u25> .
<p93> <ViewCount> "0" .
<p93> <Timestamp> "2008-08-01T14:46:53.097" .
<ph118> <Timestamp> "2012-10-14T12:28:51.043" .
<ph118> <Author> <u967315> .
<ph118> <Post> <p98> .
<ph118> <Text> "" .
<ph118> <Type> "Title" .
<p98> <Title> <ph118> .
<ph119> <Timestamp> "2012-10-14T12:28:51.043" .
<ph119> <Author> <u967315> .
<ph119> <Post> <p98> .
<ph119> <Text> "<p>Maybe. But you have bigger problems. <code>gettimeofday()</code> can result in incorrect timings if there are processes on your system that change the timer (ie, ntpd). On a \"normal\" linux, though, I believe the resolution of <code>gettimeofday()</code> is 10us. It can jump forward and backward and time, consequently, based on the processes running on your system. This effectively makes the answer to your question no.</p>\n\n<p>You should look into <code>clock_gettime(CLOCK_MONOTONIC)</code> for timing intervals. It suffers from several less issues due to things like multi-core systems and external clock settings.</p>\n\n<p>Also, look into the <code>clock_getres()</code> function.</p>\n" .
<ph119> <Type> "Body" .
<p98> <Body> <ph119> .
<p98> <Id> "98" .
<p98> <Type> "Answer" .
<p88> <Has.Answer> <p98> .
<p98> <Owner> <u2089740> .
<p98> <ViewCount> "0" .
<p98> <Timestamp> "2008-08-01T14:53:47.497" .
<ph120> <Timestamp> "2017-09-12T18:12:53.697" .
<ph120> <Author> <u6761181> .
<ph120> <Post> <p99> .
<ph120> <Text> "" .
<ph120> <Type> "Title" .
<p99> <Title> <ph120> .
<ph121> <Timestamp> "2017-09-12T18:12:53.697" .
<ph121> <Author> <u6761181> .
<ph121> <Post> <p99> .
<ph121> <Text> "<blockquote>\n  <p>The actual resolution of gettimeofday() depends on the hardware architecture. Intel processors as well as SPARC machines offer high resolution timers that measure microseconds. Other hardware architectures fall back to the system’s timer, which is typically set to 100 Hz. In such cases, the time resolution will be less accurate. </p>\n</blockquote>\n\n<p>I obtained this answer from <a href=\"http://web.archive.org/web/20160711223333/http://www.informit.com/guides/content.aspx?g=cplusplus&amp;seqNum=272\" rel=\"nofollow noreferrer\">High Resolution Time Measurement and Timers, Part I</a></p>\n" .
<ph121> <Type> "Body" .
<p99> <Body> <ph121> .
<p99> <Id> "99" .
<p99> <Type> "Answer" .
<p88> <Has.Answer> <p99> .
<p99> <Owner> <u25> .
<p99> <ViewCount> "0" .
<p99> <Timestamp> "2008-08-01T14:55:08.477" .
<ph122> <Timestamp> "2018-10-13T13:07:16.667" .
<ph122> <Author> <u63550> .
<ph122> <Post> <p103> .
<ph122> <Text> "" .
<ph122> <Type> "Title" .
<p103> <Title> <ph122> .
<ph123> <Timestamp> "2018-10-13T13:07:16.667" .
<ph123> <Author> <u63550> .
<ph123> <Post> <p103> .
<ph123> <Text> "<p>JavaScript is the easiest way to get the client's local time. I would suggest using an <a href=\"http://en.wikipedia.org/wiki/XMLHttpRequest\" rel=\"nofollow noreferrer\">XMLHttpRequest</a> to send back the local time, and if that fails, fall back to the timezone detected based on their IP address.</p>\n\n<p>As far as geolocation, I've used <a href=\"http://www.maxmind.com/app/ip-location\" rel=\"nofollow noreferrer\">MaxMind GeoIP</a> on several projects and it works well, though I'm not sure if they provide timezone data. It's a service you pay for and they provide monthly updates to your database. They provide wrappers in several web languages.</p>\n" .
<ph123> <Type> "Body" .
<p103> <Body> <ph123> .
<p103> <Id> "103" .
<p103> <Type> "Answer" .
<p13> <Has.Answer> <p103> .
<p103> <Owner> <u72> .
<p103> <ViewCount> "0" .
<p103> <Timestamp> "2008-08-01T15:11:59.987" .
<ph124> <Timestamp> "2018-06-08T15:37:29.390" .
<ph124> <Author> <u6296561> .
<ph124> <Post> <p104> .
<ph124> <Text> "Anatomy of a \"Memory Leak\"" .
<ph124> <Type> "Title" .
<p104> <Title> <ph124> .
<t-.net> <Timestamp> "2018-06-08T15:37:29.390" .
<t-.net> <Tag.Text> ".net" .
<t-.net> <Type> "Tag" .
<p104> <Tag> <t-.net> .
<t-performance> <Timestamp> "2018-06-08T15:37:29.390" .
<t-performance> <Tag.Text> "performance" .
<t-performance> <Type> "Tag" .
<p104> <Tag> <t-performance> .
<t-memory-leaks> <Timestamp> "2018-06-08T15:37:29.390" .
<t-memory-leaks> <Tag.Text> "memory-leaks" .
<t-memory-leaks> <Type> "Tag" .
<p104> <Tag> <t-memory-leaks> .
<t-com-interop> <Timestamp> "2018-06-08T15:37:29.390" .
<t-com-interop> <Tag.Text> "com-interop" .
<t-com-interop> <Type> "Tag" .
<p104> <Tag> <t-com-interop> .
<ph125> <Timestamp> "2018-06-08T15:37:29.390" .
<ph125> <Author> <u6296561> .
<ph125> <Post> <p104> .
<ph125> <Text> "<p>In .NET perspective:</p>\n\n<ul>\n<li>What is a <a href=\"https://en.wikipedia.org/wiki/Memory_leak\" rel=\"noreferrer\">memory leak</a>?</li>\n<li>How can you determine whether your application leaks? What are the effects?</li>\n<li>How can you prevent a memory leak?</li>\n<li>If your application has memory leak, does it go away when the process exits or is killed? Or do memory leaks in your application affect other processes on the system even after process completion?</li>\n<li>And what about unmanaged code accessed via COM Interop and/or P/Invoke?</li>\n</ul>\n" .
<ph125> <Type> "Body" .
<p104> <Body> <ph125> .
<p104> <Id> "104" .
<p104> <Type> "Question" .
<p104> <Chosen.Answer> <p112> .
<p104> <Has.Answer> <p112> .
<p104> <Owner> <u39> .
<p104> <ViewCount> "11925" .
<p104> <Timestamp> "2008-08-01T15:12:34.837" .
<ph126> <Timestamp> "2008-08-01T15:19:25.900" .
<ph126> <Author> <u61> .
<ph126> <Post> <p107> .
<ph126> <Text> "" .
<ph126> <Type> "Title" .
<p107> <Title> <ph126> .
<ph127> <Timestamp> "2008-08-01T15:19:25.900" .
<ph127> <Author> <u61> .
<ph127> <Post> <p107> .
<ph127> <Text> "<p>I guess in a managed environment, a leak would be you keeping an unnecessary reference to a large chunk of memory around.</p>\n" .
<ph127> <Type> "Body" .
<p107> <Body> <ph127> .
<p107> <Id> "107" .
<p107> <Type> "Answer" .
<p104> <Has.Answer> <p107> .
<p107> <Owner> <u61> .
<p107> <ViewCount> "0" .
<p107> <Timestamp> "2008-08-01T15:19:25.900" .
<ph128> <Timestamp> "2011-11-20T13:46:24.733" .
<ph128> <Author> <u1288> .
<ph128> <Post> <p108> .
<ph128> <Text> "Best Subversion clients for Windows Vista (64bit)" .
<ph128> <Type> "Title" .
<p108> <Title> <ph128> .
<t-windows> <Timestamp> "2011-11-20T13:46:24.733" .
<t-windows> <Tag.Text> "windows" .
<t-windows> <Type> "Tag" .
<p108> <Tag> <t-windows> .
<t-svn> <Timestamp> "2011-11-20T13:46:24.733" .
<t-svn> <Tag.Text> "svn" .
<t-svn> <Type> "Tag" .
<p108> <Tag> <t-svn> .
<t-64-bit> <Timestamp> "2011-11-20T13:46:24.733" .
<t-64-bit> <Tag.Text> "64-bit" .
<t-64-bit> <Type> "Tag" .
<p108> <Tag> <t-64-bit> .
<ph129> <Timestamp> "2011-11-20T13:46:24.733" .
<ph129> <Author> <u1288> .
<ph129> <Post> <p108> .
<ph129> <Text> "<p>I've been using <a href=\"http://tortoisesvn.tigris.org/\" rel=\"noreferrer\">TortoiseSVN </a> in a Windows environment for quite some time.  It seems very feature-complete and nicely integrated into the Windows shell, and more importantly, it's fairly painless to teach to colleagues with little or no experience with source control.  <strong>However</strong>, since we have moved to Windows Vista 64bit, Tortoise has been very buggy and has seemed to cause lots of explorer.exe abnormalities and crashes.  This has happened both with older versions of the software and the latest version (1.5.1 build 13563).</p>\n\n<p>I was curious if anyone has suggestions for other Subversion clients that will run on Windows (specifically Vista 64bit).  Developers here use a variety of text editors so using Visual Studio or Dreamweaver for SVN is not ideal.</p>\n\n<p>I have heard great things about <a href=\"http://www.zennaware.com/cornerstone/\" rel=\"noreferrer\">Cornerstone</a>, and would love something similar for Windows if it exists.</p>\n\n<hr>\n\n<p>I'm correlating the Vista/explorer problems with Tortoise because they normally occur when I'm using the functionality in Tortoise.  Sometimes bringing up the \"merge\" screen will cause the GUI to start acting very strange and eventually hang or crash.</p>\n\n<p>I did not see 1.5.2 -- I'm installing now, maybe that will fix some of my issues.</p>\n" .
<ph129> <Type> "Body" .
<p108> <Body> <ph129> .
<p108> <Id> "108" .
<p108> <Type> "Question" .
<p108> <Chosen.Answer> <p111> .
<p108> <Has.Answer> <p111> .
<p108> <Owner> <u72> .
<p108> <ViewCount> "15087" .
<p108> <Timestamp> "2008-08-01T15:22:29.467" .
<ph130> <Timestamp> "2019-01-20T13:49:56.720" .
<ph130> <Author> <u567854> .
<ph130> <Post> <p109> .
<ph130> <Text> "Decoding T-SQL CAST in C#/VB.NET" .
<ph130> <Type> "Title" .
<p109> <Title> <ph130> .
<t-c#> <Timestamp> "2019-01-20T13:49:56.720" .
<t-c#> <Tag.Text> "c#" .
<t-c#> <Type> "Tag" .
<p109> <Tag> <t-c#> .
<t-sql> <Timestamp> "2019-01-20T13:49:56.720" .
<t-sql> <Tag.Text> "sql" .
<t-sql> <Type> "Tag" .
<p109> <Tag> <t-sql> .
<t-vb.net> <Timestamp> "2019-01-20T13:49:56.720" .
<t-vb.net> <Tag.Text> "vb.net" .
<t-vb.net> <Type> "Tag" .
<p109> <Tag> <t-vb.net> .
<t-ascii> <Timestamp> "2019-01-20T13:49:56.720" .
<t-ascii> <Tag.Text> "ascii" .
<t-ascii> <Type> "Tag" .
<p109> <Tag> <t-ascii> .
<t-hex> <Timestamp> "2019-01-20T13:49:56.720" .
<t-hex> <Tag.Text> "hex" .
<t-hex> <Type> "Tag" .
<p109> <Tag> <t-hex> .
<ph131> <Timestamp> "2019-01-20T13:49:56.720" .
<ph131> <Author> <u567854> .
<ph131> <Post> <p109> .
<ph131> <Text> "<p>Recently our site has been deluged with the resurgence of the <a href=\"https://en.wikipedia.org/wiki/Asprox_botnet\" rel=\"nofollow noreferrer\">Asprox botnet</a> <a href=\"http://en.wikipedia.org/wiki/SQL_injection\" rel=\"nofollow noreferrer\">SQL injection</a> attack. Without going into details, the attack attempts to execute SQL code by encoding the <a href=\"http://en.wikipedia.org/wiki/Transact-SQL\" rel=\"nofollow noreferrer\">T-SQL</a> commands in an ASCII encoded BINARY string. It looks something like this:</p>\n\n<pre><code>DECLARE%20@S%20NVARCHAR(4000);SET%20@S=CAST(0x44004500...06F007200%20AS%20NVARCHAR(4000));EXEC(@S);--\n</code></pre>\n\n<p>I was able to decode this in SQL, but I was a little wary of doing this since I didn't know exactly what was happening at the time.</p>\n\n<p>I tried to write a simple decode tool, so I could decode this type of text without even touching <a href=\"http://en.wikipedia.org/wiki/Microsoft_SQL_Server\" rel=\"nofollow noreferrer\">SQL&nbsp; Server</a>. The main part I need to be decoded is:</p>\n\n<pre><code>CAST(0x44004500...06F007200 AS\nNVARCHAR(4000))\n</code></pre>\n\n<p>I've tried all of the following commands with no luck:</p>\n\n<pre><code>txtDecodedText.Text =\n    System.Web.HttpUtility.UrlDecode(txtURLText.Text);\ntxtDecodedText.Text =\n    Encoding.ASCII.GetString(Encoding.ASCII.GetBytes(txtURLText.Text));\ntxtDecodedText.Text =\n    Encoding.Unicode.GetString(Encoding.Unicode.GetBytes(txtURLText.Text));\ntxtDecodedText.Text =\n    Encoding.ASCII.GetString(Encoding.Unicode.GetBytes(txtURLText.Text));\ntxtDecodedText.Text =\n    Encoding.Unicode.GetString(Convert.FromBase64String(txtURLText.Text));\n</code></pre>\n\n<p>What is the proper way to translate this encoding without using SQL Server? Is it possible? I'll take VB.NET code since I'm familiar with that too.</p>\n\n<hr>\n\n<p>Okay, I'm sure I'm missing something here, so here's where I'm at.</p>\n\n<p>Since my input is a basic string, I started with just a snippet of the encoded portion - 4445434C41 (which translates to DECLA) - and the first attempt was to do this...</p>\n\n<pre><code>txtDecodedText.Text = Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(txtURL.Text));\n</code></pre>\n\n<p>...and all it did was return the exact same thing that I put in since it converted each character into is a byte.</p>\n\n<p>I realized that I need to parse every two characters into a byte manually since I don't know of any methods yet that will do that, so now my little decoder looks something like this:</p>\n\n<pre><code>while (!boolIsDone)\n{\n    bytURLChar = byte.Parse(txtURLText.Text.Substring(intParseIndex, 2));\n    bytURL[intURLIndex] = bytURLChar;\n    intParseIndex += 2;\n    intURLIndex++;\n\n    if (txtURLText.Text.Length - intParseIndex &lt; 2)\n    {\n        boolIsDone = true;\n    }\n}\n\ntxtDecodedText.Text = Encoding.UTF8.GetString(bytURL);\n</code></pre>\n\n<p>Things look good for the first couple of pairs, but then the loop balks when it gets to the \"4C\" pair and says that the string is in the incorrect format.</p>\n\n<p>Interestingly enough, when I step through the debugger and to the GetString method on the byte array that I was able to parse up to that point, I get \",-+\" as the result.</p>\n\n<p>How do I figure out what I'm missing - do I need to do a \"direct cast\" for each byte instead of attempting to parse it?</p>\n" .
<ph131> <Type> "Body" .
<p109> <Body> <ph131> .
<p109> <Id> "109" .
<p109> <Type> "Question" .
<p109> <Chosen.Answer> <p2585> .
<p109> <Has.Answer> <p2585> .
<p109> <Owner> <u71> .
<p109> <ViewCount> "4701" .
<p109> <Timestamp> "2008-08-01T15:23:05.190" .
<ph132> <Timestamp> "2015-11-30T21:14:09.740" .
<ph132> <Author> <u3393505> .
<ph132> <Post> <p110> .
<ph132> <Text> "" .
<ph132> <Type> "Title" .
<p110> <Title> <ph132> .
<ph133> <Timestamp> "2015-11-30T21:14:09.740" .
<ph133> <Author> <u3393505> .
<ph133> <Post> <p110> .
<ph133> <Text> "<p>I will concur with Bernard as to in .net what a mem leak would be.</p>\n\n<p>You could profile your application to see its memory use, and determine that if its managing a lot of memory when it should not be you could say it has a leak.</p>\n\n<p>In managed terms I will put my neck on the line to say it does go away once the process is killed/removed.</p>\n\n<p>Unmanaged code is its own beast and if a leak exists within it, it will follow a standard mem. leak definition.</p>\n" .
<ph133> <Type> "Body" .
<p110> <Body> <ph133> .
<p110> <Id> "110" .
<p110> <Type> "Answer" .
<p104> <Has.Answer> <p110> .
<p110> <Owner> <u36> .
<p110> <ViewCount> "0" .
<p110> <Timestamp> "2008-08-01T15:23:33.817" .
<ph134> <Timestamp> "2008-08-01T15:27:23.093" .
<ph134> <Author> <u146270> .
<ph134> <Post> <p111> .
<ph134> <Text> "" .
<ph134> <Type> "Title" .
<p111> <Title> <ph134> .
<ph135> <Timestamp> "2008-08-01T15:27:23.093" .
<ph135> <Author> <u146270> .
<ph135> <Post> <p111> .
<ph135> <Text> "<p>I have been using the 64Bit version of TortoiseSVN for ages and I have never had issues with it on Windows 64Bit or Vista 64Bit. I am currently not aware of any other similiar SVN clients that do work on Vista. Is it possible the problem could lie within the configuration of TortoiseSVN or even the installation of Vista? Is the problem occurring on Vista native or SP 1?</p>\n" .
<ph135> <Type> "Body" .
<p111> <Body> <ph135> .
<p111> <Id> "111" .
<p111> <Type> "Answer" .
<p108> <Has.Answer> <p111> .
<p111> <Owner> <u146270> .
<p111> <ViewCount> "0" .
<p111> <Timestamp> "2008-08-01T15:27:23.093" .
<ph136> <Timestamp> "2018-05-14T20:34:56.370" .
<ph136> <Author> <u7232508> .
<ph136> <Post> <p112> .
<ph136> <Text> "" .
<ph136> <Type> "Title" .
<p112> <Title> <ph136> .
<ph137> <Timestamp> "2018-05-14T20:34:56.370" .
<ph137> <Author> <u7232508> .
<ph137> <Post> <p112> .
<ph137> <Text> "<p>The best explanation I've seen is in Chapter 7 of the free <a href=\"http://codebetter.com/karlseguin/2008/06/25/foundations-of-programming-ebook/\" rel=\"noreferrer\">Foundations of Programming e-book</a>.</p>\n\n<p>Basically, in <strong>.NET</strong> a memory leak occurs when referenced objects are rooted and thus cannot be garbage collected. This occurs accidentally when you hold on to references beyond the intended scope.</p>\n\n<p>You'll know that you have leaks when you start getting OutOfMemoryExceptions or your memory usage goes up beyond what you'd expect (<strong>PerfMon</strong> has nice memory counters). </p>\n\n<p>Understanding <strong>.NET</strong>'s memory model is your best way of avoiding it. Specifically, understanding how the garbage collector works and how references work — again, I refer you to chapter 7 of the e-book. Also, be mindful of common pitfalls, probably the most common being events. If object <strong>A</strong> is registered to an event on object <strong>B</strong>, then object <strong>A</strong> will stick around until object <strong>B</strong> disappears because <strong>B</strong> holds a reference to <strong>A</strong>. The solution is to unregister your events when you're done. </p>\n\n<p>Of course, a good memory profile will let you see your object graphs and explore the nesting/referencing of your objects to see where references are coming from and what root object is responsible (<a href=\"http://www.red-gate.com/products/ants_memory_profiler/index.htm\" rel=\"noreferrer\">red-gate ants profile</a>, JetBrains dotMemory, <a href=\"http://memprofiler.com/\" rel=\"noreferrer\">memprofiler</a> are really good choices, or you can use the text-only <strong>WinDbg</strong> and <strong>SOS</strong>, but I'd strongly recommend a commercial/visual product unless you're a real guru).</p>\n\n<p>I believe unmanaged code is subject to its typical memory leaks, except that shared references are managed by the garbage collector. I could be wrong about this last point.</p>\n" .
<ph137> <Type> "Body" .
<p112> <Body> <ph137> .
<p112> <Id> "112" .
<p112> <Type> "Answer" .
<p104> <Has.Answer> <p112> .
<p112> <Owner> <u34> .
<p112> <ViewCount> "0" .
<p112> <Timestamp> "2008-08-01T15:28:12.543" .
<ph138> <Timestamp> "2008-08-01T15:32:11.337" .
<ph138> <Author> <u60> .
<ph138> <Post> <p113> .
<ph138> <Text> "" .
<ph138> <Type> "Title" .
<p113> <Title> <ph138> .
<ph139> <Timestamp> "2008-08-01T15:32:11.337" .
<ph139> <Author> <u60> .
<ph139> <Post> <p113> .
<ph139> <Text> "<p>I'll second Diago's answer.  I use TortoiseSVN on Vista x64 pretty heavily.</p>\n\n<p>I did upgrade directly from an older version to 1.5.2 though, and never used 1.5.1.  Have you tried 1.5.2?</p>\n" .
<ph139> <Type> "Body" .
<p113> <Body> <ph139> .
<p113> <Id> "113" .
<p113> <Type> "Answer" .
<p108> <Has.Answer> <p113> .
<p113> <Owner> <u60> .
<p113> <ViewCount> "0" .
<p113> <Timestamp> "2008-08-01T15:32:11.337" .
<ph140> <Timestamp> "2013-11-07T16:52:15.250" .
<ph140> <Author> <u761095> .
<ph140> <Post> <p114> .
<ph140> <Text> "" .
<ph140> <Type> "Title" .
<p114> <Title> <ph140> .
<ph141> <Timestamp> "2013-11-07T16:52:15.250" .
<ph141> <Author> <u761095> .
<ph141> <Post> <p114> .
<ph141> <Text> "<p>TortoiseSVN in combination with VisualSVN for Visual Studio.</p>\n" .
<ph141> <Type> "Body" .
<p114> <Body> <ph141> .
<p114> <Id> "114" .
<p114> <Type> "Answer" .
<p108> <Has.Answer> <p114> .
<p114> <Owner> <u17> .
<p114> <ViewCount> "0" .
<p114> <Timestamp> "2008-08-01T15:32:42.473" .
<ph142> <Timestamp> "2008-08-01T15:34:43.873" .
<ph142> <Author> <u58> .
<ph142> <Post> <p116> .
<ph142> <Text> "" .
<ph142> <Type> "Title" .
<p116> <Title> <ph142> .
<ph143> <Timestamp> "2008-08-01T15:34:43.873" .
<ph143> <Author> <u58> .
<ph143> <Post> <p116> .
<ph143> <Text> "<p>I too get explorer crashes in Vista (I'm not in the 64Bit version though). I'm using Vista Super Saijen (or whatever they are calling the most expensive version). I'm not having any bugs with Tortoise.</p>\n\n<p>My explorer does, however, crash about every other day (sometimes multiple times a day if it's having an \"off\" day). I'm not positive it's being caused by TortoiseSVN though. From what I hear, the explorer just crashes a lot in Vista...</p>\n\n<p>Have you tried uninstalling Tortoise and using Windows for a day or two and seeing if it still crashes? Do you restart your computer at least once a day (It seems the longer I go between restarts, the worse the crashes get)?</p>\n" .
<ph143> <Type> "Body" .
<p116> <Body> <ph143> .
<p116> <Id> "116" .
<p116> <Type> "Answer" .
<p108> <Has.Answer> <p116> .
<p116> <Owner> <u58> .
<p116> <ViewCount> "0" .
<p116> <Timestamp> "2008-08-01T15:34:43.873" .
<ph144> <Timestamp> "2017-12-22T18:44:57.273" .
<ph144> <Author> <u2384186> .
<ph144> <Post> <p120> .
<ph144> <Text> "ASP.NET Site Maps" .
<ph144> <Type> "Title" .
<p120> <Title> <ph144> .
<t-sql> <Timestamp> "2017-12-22T18:44:57.273" .
<t-sql> <Tag.Text> "sql" .
<t-sql> <Type> "Tag" .
<p120> <Tag> <t-sql> .
<t-asp.net> <Timestamp> "2017-12-22T18:44:57.273" .
<t-asp.net> <Tag.Text> "asp.net" .
<t-asp.net> <Type> "Tag" .
<p120> <Tag> <t-asp.net> .
<t-xml> <Timestamp> "2017-12-22T18:44:57.273" .
<t-xml> <Tag.Text> "xml" .
<t-xml> <Type> "Tag" .
<p120> <Tag> <t-xml> .
<t-sitemap> <Timestamp> "2017-12-22T18:44:57.273" .
<t-sitemap> <Tag.Text> "sitemap" .
<t-sitemap> <Type> "Tag" .
<p120> <Tag> <t-sitemap> .
<ph145> <Timestamp> "2017-12-22T18:44:57.273" .
<ph145> <Author> <u2384186> .
<ph145> <Post> <p120> .
<ph145> <Text> "<p>Does anyone have experience creating <strong>SQL-based ASP.NET</strong> site-map providers?</p>\n\n<p>I have the default XML file <code>web.sitemap</code> working properly with my Menu and <strong>SiteMapPath</strong> controls, but I'll need a way for the users of my site to create and modify pages dynamically.</p>\n\n<p>I need to tie page viewing permissions into the standard <code>ASP.NET</code> membership system as well.</p>\n" .
<ph145> <Type> "Body" .
<p120> <Body> <ph145> .
<p120> <Id> "120" .
<p120> <Type> "Question" .
<p120> <Owner> <u83> .
<p120> <ViewCount> "1341" .
<p120> <Timestamp> "2008-08-01T15:50:08.537" .
<ph146> <Timestamp> "2015-10-27T09:34:09.503" .
<ph146> <Author> <u2553431> .
<ph146> <Post> <p123> .
<ph146> <Text> "Java lib or app to convert CSV to XML file?" .
<ph146> <Type> "Title" .
<p123> <Title> <ph146> .
<t-java> <Timestamp> "2015-10-27T09:34:09.503" .
<t-java> <Tag.Text> "java" .
<t-java> <Type> "Tag" .
<p123> <Tag> <t-java> .
<t-xml> <Timestamp> "2015-10-27T09:34:09.503" .
<t-xml> <Tag.Text> "xml" .
<t-xml> <Type> "Tag" .
<p123> <Tag> <t-xml> .
<t-csv> <Timestamp> "2015-10-27T09:34:09.503" .
<t-csv> <Tag.Text> "csv" .
<t-csv> <Type> "Tag" .
<p123> <Tag> <t-csv> .
<t-data-conversion> <Timestamp> "2015-10-27T09:34:09.503" .
<t-data-conversion> <Tag.Text> "data-conversion" .
<t-data-conversion> <Type> "Tag" .
<p123> <Tag> <t-data-conversion> .
<ph147> <Timestamp> "2015-10-27T09:34:09.503" .
<ph147> <Author> <u2553431> .
<ph147> <Post> <p123> .
<ph147> <Text> "<p>Is there an existing application or library in <em>Java</em> which will allow me to convert a <code>CSV</code> data file to <code>XML</code> file?  </p>\n\n<p>The <code>XML</code> tags would be provided through possibly the first row containing column headings.</p>\n" .
<ph147> <Type> "Body" .
<p123> <Body> <ph147> .
<p123> <Id> "123" .
<p123> <Type> "Question" .
<p123> <Chosen.Answer> <p183> .
<p123> <Has.Answer> <p183> .
<p123> <Owner> <u78> .
<p123> <ViewCount> "69515" .
<p123> <Timestamp> "2008-08-01T16:08:52.353" .
<ph148> <Timestamp> "2018-08-27T01:12:05.427" .
<ph148> <Author> <u8708364> .
<ph148> <Post> <p124> .
<ph148> <Text> "" .
<ph148> <Type> "Title" .
<p124> <Title> <ph148> .
<ph149> <Timestamp> "2018-08-27T01:12:05.427" .
<ph149> <Author> <u8708364> .
<ph149> <Post> <p124> .
<ph149> <Text> "<p>I wound up using this. It is a kind of a hack, but it actually works pretty well. </p>\n\n<p>The only thing is you have to be very careful with your semicolons. : D</p>\n\n<pre><code>var strSql:String = stream.readUTFBytes(stream.bytesAvailable);      \nvar i:Number = 0;\nvar strSqlSplit:Array = strSql.split(\";\");\nfor (i = 0; i &lt; strSqlSplit.length; i++){\n    NonQuery(strSqlSplit[i].toString());\n}\n</code></pre>\n" .
<ph149> <Type> "Body" .
<p124> <Body> <ph149> .
<p124> <Id> "124" .
<p124> <Type> "Answer" .
<p80> <Has.Answer> <p124> .
<p124> <Owner> <u26> .
<p124> <ViewCount> "0" .
<p124> <Timestamp> "2008-08-01T16:09:47.687" .
<ph150> <Timestamp> "2010-01-20T08:27:13.130" .
<ph150> <Author> <u202431> .
<ph150> <Post> <p126> .
<ph150> <Text> "How would you access Object properties from within an object method?" .
<ph150> <Type> "Title" .
<p126> <Title> <ph150> .
<t-java> <Timestamp> "2010-01-20T08:27:13.130" .
<t-java> <Tag.Text> "java" .
<t-java> <Type> "Tag" .
<p126> <Tag> <t-java> .
<t-php> <Timestamp> "2010-01-20T08:27:13.130" .
<t-php> <Tag.Text> "php" .
<t-php> <Type> "Tag" .
<p126> <Tag> <t-php> .
<t-oop> <Timestamp> "2010-01-20T08:27:13.130" .
<t-oop> <Tag.Text> "oop" .
<t-oop> <Type> "Tag" .
<p126> <Tag> <t-oop> .
<t-theory> <Timestamp> "2010-01-20T08:27:13.130" .
<t-theory> <Tag.Text> "theory" .
<t-theory> <Type> "Tag" .
<p126> <Tag> <t-theory> .
<ph151> <Timestamp> "2010-01-20T08:27:13.130" .
<ph151> <Author> <u202431> .
<ph151> <Post> <p126> .
<ph151> <Text> "<p>What is the \"purist\" or \"correct\" way to access an object's properties from within an object method that is not a getter/setter method?</p>\n\n<p>I know that from outside of the object you should use a getter/setter, but from within would you just do:</p>\n\n<p>Java:</p>\n\n<pre><code>String property = this.property;\n</code></pre>\n\n<p>PHP:</p>\n\n<pre><code>$property = $this-&gt;property;\n</code></pre>\n\n<p>or would you do:</p>\n\n<p>Java:</p>\n\n<pre><code>String property = this.getProperty();\n</code></pre>\n\n<p>PHP:</p>\n\n<pre><code>$property = $this-&gt;getProperty();\n</code></pre>\n\n<p>Forgive me if my Java is a little off, it's been a year since I programmed in Java...</p>\n\n<p><strong>EDIT:</strong></p>\n\n<p>It seems people are assuming I am talking about private or protected variables/properties only. When I learned OO I was taught to use getters/setters for every single property even if it was public (and actually I was told never to make any variable/property public). So, I may be starting off from a false assumption from the get go. It appears that people answering this question are maybe saying that you should have public properties and that those don't need getters and setters, which goes against what I was taught, and what I was talking about, although maybe that needs to be discussed as well. That's probably a good topic for a different question though...</p>\n" .
<ph151> <Type> "Body" .
<p126> <Body> <ph151> .
<p126> <Id> "126" .
<p126> <Type> "Question" .
<p126> <Chosen.Answer> <p127> .
<p126> <Has.Answer> <p127> .
<p126> <Owner> <u58> .
<p126> <ViewCount> "13015" .
<p126> <Timestamp> "2008-08-01T16:10:30.337" .
<ph152> <Timestamp> "2008-08-01T16:32:17.110" .
<ph152> <Author> <u35> .
<ph152> <Post> <p127> .
<ph152> <Text> "" .
<ph152> <Type> "Title" .
<p127> <Title> <ph152> .
<ph153> <Timestamp> "2008-08-01T16:32:17.110" .
<ph153> <Author> <u35> .
<ph153> <Post> <p127> .
<ph153> <Text> "<p>This has religious war potential, but it seems to me that if you're using a getter/setter, you should use it internally as well - using both will lead to maintenance problems down the road (e.g. somebody adds code to a setter that <em>needs</em> to run every time that property is set, and the property is being set internally w/o that setter being called).</p>\n" .
<ph153> <Type> "Body" .
<p127> <Body> <ph153> .
<p127> <Id> "127" .
<p127> <Type> "Answer" .
<p126> <Has.Answer> <p127> .
<p127> <Owner> <u35> .
<p127> <ViewCount> "0" .
<p127> <Timestamp> "2008-08-01T16:13:47.600" .
<ph154> <Timestamp> "2008-08-01T16:19:04.283" .
<ph154> <Author> <u26> .
<ph154> <Post> <p128> .
<ph154> <Text> "" .
<ph154> <Type> "Title" .
<p128> <Title> <ph154> .
<ph155> <Timestamp> "2008-08-01T16:19:04.283" .
<ph155> <Author> <u26> .
<ph155> <Post> <p128> .
<ph155> <Text> "<p>It depends on how the property is used. For example, say you have a student object that has a name property. You could use your Get method to pull the name from the database, if it hasn't been retrieved already. This way you are reducing unnecessary calls to the database.</p>\n\n<p>Now let's say you have a private integer counter in your object that counts the number of times the name has been called. You may want to not use the Get method from inside the object because it would produce an invalid count.</p>\n" .
<ph155> <Type> "Body" .
<p128> <Body> <ph155> .
<p128> <Id> "128" .
<p128> <Type> "Answer" .
<p126> <Has.Answer> <p128> .
<p128> <Owner> <u26> .
<p128> <ViewCount> "0" .
<p128> <Timestamp> "2008-08-01T16:19:04.283" .
<ph156> <Timestamp> "2015-10-10T10:25:12.217" .
<ph156> <Author> <u4800955> .
<ph156> <Post> <p129> .
<ph156> <Text> "How to export data from SQL Server 2005 to MySQL" .
<ph156> <Type> "Title" .
<p129> <Title> <ph156> .
<t-mysql> <Timestamp> "2015-10-10T10:25:12.217" .
<t-mysql> <Tag.Text> "mysql" .
<t-mysql> <Type> "Tag" .
<p129> <Tag> <t-mysql> .
<t-sql-server> <Timestamp> "2015-10-10T10:25:12.217" .
<t-sql-server> <Tag.Text> "sql-server" .
<t-sql-server> <Type> "Tag" .
<p129> <Tag> <t-sql-server> .
<t-csv> <Timestamp> "2015-10-10T10:25:12.217" .
<t-csv> <Tag.Text> "csv" .
<t-csv> <Type> "Tag" .
<p129> <Tag> <t-csv> .
<t-sql-server-2005> <Timestamp> "2015-10-10T10:25:12.217" .
<t-sql-server-2005> <Tag.Text> "sql-server-2005" .
<t-sql-server-2005> <Type> "Tag" .
<p129> <Tag> <t-sql-server-2005> .
<t-bcp> <Timestamp> "2015-10-10T10:25:12.217" .
<t-bcp> <Tag.Text> "bcp" .
<t-bcp> <Type> "Tag" .
<p129> <Tag> <t-bcp> .
<ph157> <Timestamp> "2015-10-10T10:25:12.217" .
<ph157> <Author> <u4800955> .
<ph157> <Post> <p129> .
<ph157> <Text> "<p>I've been banging my head against <code>SQL Server 2005</code> trying to get a lot of data out.  I've been given a database with nearly 300 tables in it and I need to turn this into a MySQL database.  My first call was to use bcp but unfortunately it doesn't produce valid CSV - strings aren't encapsulated, so you can't deal with any row that has a string with a comma in it (or whatever you use as a delimiter) and I would still have to hand write all of the create table statements, as obviously CSV doesn't tell you anything about the data types.</p>\n\n<p>What would be better is if there was some tool that could connect to both SQL Server and MySQL, then do a copy. You lose views, stored procedures, trigger, etc, but it isn't hard to copy a table that only uses base types from one DB to another... is it?</p>\n\n<p>Does anybody know of such a tool?  I don't mind how many assumptions it makes or what simplifications occur, as long as it supports integer, float, datetime and string. I have to do a lot of pruning, normalising, etc. anyway so I don't care about keeping keys, relationships or anything like that, but I need the initial set of data in fast!</p>\n" .
<ph157> <Type> "Body" .
<p129> <Body> <ph157> .
<p129> <Id> "129" .
<p129> <Type> "Question" .
<p129> <Owner> <u48> .
<p129> <ViewCount> "94496" .
<p129> <Timestamp> "2008-08-01T16:22:42.420" .
<ph158> <Timestamp> "2013-11-26T00:02:16.310" .
<ph158> <Author> <u1102512> .
<ph158> <Post> <p133> .
<ph158> <Text> "" .
<ph158> <Type> "Title" .
<p133> <Title> <ph158> .
<ph159> <Timestamp> "2013-11-26T00:02:16.310" .
<ph159> <Author> <u1102512> .
<ph159> <Post> <p133> .
<ph159> <Text> "<p>This may be too basic or limited of a solution, but couldn't you do a <a href=\"http://java.sun.com/j2se/7/docs/api/java/lang/String.html#split(java.lang.String)\" rel=\"nofollow noreferrer\"><code>String.split()</code></a> on each line of the file, remembering the result array of the first line to generate the XML, and just spit each line's array data out with the proper XML elements padding each iteration of a loop?</p>\n" .
<ph159> <Type> "Body" .
<p133> <Body> <ph159> .
<p133> <Id> "133" .
<p133> <Type> "Answer" .
<p123> <Has.Answer> <p133> .
<p133> <Owner> <u59> .
<p133> <ViewCount> "0" .
<p133> <Timestamp> "2008-08-01T16:31:43.430" .
<ph160> <Timestamp> "2019-06-01T01:56:45.287" .
<ph160> <Author> <u10221765> .
<ph160> <Post> <p134> .
<ph160> <Text> "XSD DataSets and ignoring foreign keys" .
<ph160> <Type> "Title" .
<p134> <Title> <ph160> .
<t-.net> <Timestamp> "2019-06-01T01:56:45.287" .
<t-.net> <Tag.Text> ".net" .
<t-.net> <Type> "Tag" .
<p134> <Tag> <t-.net> .
<t-database> <Timestamp> "2019-06-01T01:56:45.287" .
<t-database> <Tag.Text> "database" .
<t-database> <Type> "Tag" .
<p134> <Tag> <t-database> .
<t-xsd> <Timestamp> "2019-06-01T01:56:45.287" .
<t-xsd> <Tag.Text> "xsd" .
<t-xsd> <Type> "Tag" .
<p134> <Tag> <t-xsd> .
<ph161> <Timestamp> "2019-06-01T01:56:45.287" .
<ph161> <Author> <u10221765> .
<ph161> <Post> <p134> .
<ph161> <Text> "<p>I have a pretty standard table set-up in a current application using the <a href=\"https://en.wikipedia.org/wiki/.NET_Framework\" rel=\"nofollow noreferrer\">.NET</a> <a href=\"https://en.wikipedia.org/wiki/XML_Schema_%28W3C%29\" rel=\"nofollow noreferrer\">XSD</a> <code>DataSet</code> and <code>TableAdapter</code> features. My <code>contracts</code> table consists of some standard contract information, with a column for the <code>primary department</code>. This column is a <a href=\"https://en.wikipedia.org/wiki/Foreign_key\" rel=\"nofollow noreferrer\">foreign key</a> to my <code>Departments</code> table, where I store the basic <code>department name</code>, <code>id</code>, <code>notes</code>. This is all setup and functioning in my <a href=\"https://en.wikipedia.org/wiki/Microsoft_SQL_Server\" rel=\"nofollow noreferrer\">SQL Server</a>.</p>\n\n<p>When I use the XSD tool, I can drag both tables in at once and it auto detects/creates the foreign key I have between these two tables. This works great when I'm on my main page and am viewing contract data.</p>\n\n<p>However, when I go to my administrative page to modify the department data, I typically do something like this:</p>\n\n<pre><code>Dim dtDepartment As New DepartmentDataTable()\nDim taDepartment As New DepartmentTableAdapter()\n\ntaDepartment.Fill(dtDepartment)\n</code></pre>\n\n<p>However, at this point an exception is thrown saying to the effect that there is a foreign key reference broken here, I'm guessing since I don't have the <code>Contract DataTable</code> filled.</p>\n\n<p>How can I fix this problem? I know I can simply remove the foreign key from the XSD to make things work fine, but having the additional integrity check there and having the XSD schema match the SQL schema in the database is nice.</p>\n" .
<ph161> <Type> "Body" .
<p134> <Body> <ph161> .
<p134> <Id> "134" .
<p134> <Type> "Question" .
<p134> <Chosen.Answer> <p206> .
<p134> <Has.Answer> <p206> .
<p134> <Owner> <u71> .
<p134> <ViewCount> "828" .
<p134> <Timestamp> "2008-08-01T16:33:38.183" .
<ph162> <Timestamp> "2008-08-01T16:36:42.080" .
<ph162> <Author> <u72> .
<ph162> <Post> <p135> .
<ph162> <Text> "" .
<ph162> <Type> "Title" .
<p135> <Title> <ph162> .
<ph163> <Timestamp> "2008-08-01T16:36:42.080" .
<ph163> <Author> <u72> .
<ph163> <Post> <p135> .
<ph163> <Text> "<p>Rolling your own PHP solution will certainly work though I'm not sure if there is a good way to automatically duplicate the schema from one DB to the other (maybe this was your question).</p>\n\n<p>If you are just copying data, and/or you need custom code anyway to convert between modified schemas between the two DB's, I would recommend using PHP 5.2+ and the PDO libraries.  You'll be able to connect using PDO ODBC (and use MSSQL drivers).  I had a lot of problems getting large text fields and multi-byte characters from MSSQL into PHP using other libraries.</p>\n" .
<ph163> <Type> "Body" .
<p135> <Body> <ph163> .
<p135> <Id> "135" .
<p135> <Type> "Answer" .
<p129> <Has.Answer> <p135> .
<p135> <Owner> <u72> .
<p135> <ViewCount> "0" .
<p135> <Timestamp> "2008-08-01T16:36:42.080" .
<ph164> <Timestamp> "2008-08-01T16:43:30.880" .
<ph164> <Author> <u72> .
<ph164> <Post> <p139> .
<ph164> <Text> "" .
<ph164> <Type> "Title" .
animesh2049 commented 5 years ago

Schema

AboutMe: string .
Author: uid @reverse .
Owner: uid @reverse .
DisplayName: string .
Location: string .
Reputation: int .
Score: int .
Text: string @index(fulltext) .
Tag.Text: string @index(hash) .
Type: string @index(exact) .
ViewCount: int @index(int) .
Vote: uid @reverse .
Title: uid @reverse .
Body: uid @reverse .
Post: uid @reverse .
PostCount: int @index(int) .
Tags: uid @reverse .
Timestamp: datetime .
GitHubID: string @index(hash) .
Has.Answer: uid @reverse @count .
Chosen.Answer: uid @count .
Comment: uid @reverse .
Upvote: uid @reverse .
Downvote: uid @reverse .
Tag: uid @reverse .
manishrjain commented 5 years ago

Thanks for sharing the data and the schema. I'll get this fixed today.