7 lines
6.6 KiB
JSON
7 lines
6.6 KiB
JSON
{"id": "88dcb334-a073-4bc5-a7d2-e86470915067", "text": "Q: Finding IP Address of Oracle Database Server A: <p>Execute this once you login with sqlplus or sqldeveloper</p>\n<pre>SELECT sys_context('userenv','server_host') FROM DUAL;</pre>\n", "tags": ["sql", "database", "oracle-database"]}
|
|
{"id": "3ee53378-5950-4e3b-be35-de2de958e130", "text": "Q: What is the returned value of a subquery based on the count of result rows? A: <p>In scalar context the subquery will return:</p>\n\n<ul>\n<li><code>NULL</code> if <code>0</code> rows returned</li>\n<li>The value returned if <code>1</code> row returned</li>\n<li>An error if <code>2</code> or more rows returned.</li>\n</ul>\n", "tags": ["sql", "rdbms"]}
|
|
{"id": "89b04c52-a98f-4b56-9cc1-9bd10c02ec71", "text": "Q: Wpf or Win Forms - tile editor A: <p>I'm asking because the editor application is supposed to be a fun side project but if one approach took too long compared to the other it's not time efficient. I didn't realise this sort of question would grind someone's gears, sorry. I wasn't expecting either to be easy to learn but if one was built for more complicated programs it's not as useful to me as the other.</p>\n<p>Is this sort of question not welcome on this site?</p>\n", "tags": ["c#", "wpf", "winforms", "game-development", "tile"]}
|
|
{"id": "30cadb9d-3811-45c9-953a-2e21a4c8e8e8", "text": "Q: XREF table in a pdf file A: <p>0000 n 0000057522 00000 n 0000057771 00000 n 0000057791 00000 n 0000058080 00000 n 0000059511</p>\n<p>00000 n 0000059533 00000 n 0000059918 00000 n 0000059939 00000 n 0000061370 00000 n 0000061392 00000 n 0000061777 00000 n</p>\n<p>0000061798 00000 n 0000063229 00000 n 0000063251 00000 n 0000063636 00000 n 0000063657 00000 n 0000065088 00000 n 0000065110</p>\n<p>00000 n 0000065495 00000 n 0000065516 00000 n 0000066947 00000 n 0000066969 00000 n 0000067354 00000 n 0000067375 00000 n</p>\n<p>0000068806 00000 n 0000068828 00000 n 0000069213 00000 n 0000069234 00000 n 0000069287 00000 n 0000069333 00000 n 0000069386</p>\n<p>00000 n 0000069439 00000 n 0000069492 00000 n 0000070575 00000 n 0000085235 00000 n 0000069664 00000 n 0000070554 00000 n</p>\n<p>0000135271 00000 n 0000085258 00000 n 0000085507 00000 n 0000085527 00000 n 0000085816 00000 n 0000086065 00000 n 0000086085</p>\n<p>00000 n 0000086374 00000 n 0000086623 00000 n 0000086643 00000 n 0000086932 00000 n 0000087181 00000 n 0000087201 00000 n</p>\n<p>0000087490 00000 n 0000087739 00000 n 0000087759 00000 n 0000088048 00000 n 0000088297 00000 n 0000088317 00000 n 0000088606</p>\n<p>00000 n 0000088855 00000 n 0000088875 00000 n 0000089164 00000 n 0000089413 00000 n 0000089433 00000 n 0000089722 00000 n</p>\n<p>0000089971 00000 n 0000089991 00000 n 0000090280 00000 n 0000090529 00000 n 0000090549 00000 n 0000090838 00000 n 0000091087</p>\n<p>00000 n 0000091107 00000 n 0000091396 00000 n 0000091645 00000 n 0000091665 00000 n 0000091954 00000 n 0000092203 00000 n</p>\n<p>0000092223 00000 n 0000092512 00000 n 0000092761 00000 n 0000092781 00000 n 0000093070 00000 n 0000093319 00000 n 0000093339</p>\n<p>00000 n 0000093628 00000 n 0000093877 00000 n 0000093897 00000 n 0000094186 00000 n 0000094435 00000 n 0000094455 00000 n</p>\n<p>0000094744 00000 n 0000094993 00000 n 0000095013 00000 n 0000095302 00000 n 0000095551 00000 n 0000095571 00000 n 0000095860</p>\n<p>00000 n 0000096109 00000 n 0000096129 00000 n 0000096418 00000 n 0000096667 00000 n 0000096687 00000 n 0000096976 00000 n</p>\n<p>0000097225 00000 n 0000097245 00000 n 0000097534 00000 n 0000097783 00000 n 0000097803 00000 n 0000098092 00000 n 0000098341</p>\n<p>00000 n 0000098361 00000 n 0000098650 00000 n 0000098899 00000 n 0000098919 00000 n 0000099208 00000 n 0000099457 00000 n</p>\n<p>0000099477 00000 n 0000099766 00000 n 0000100015 00000 n 0000100035 00000 n 0000100324 00000 n 0000100573 00000 n 0000100593</p>\n<p>00000 n 0000100882 00000 n 0000101131 00000 n 0000101151 00000 n 0000101440 00000 n 0000101689 00000 n 0000101709 00000 n</p>\n<p>0000101998 00000 n 0000102247 00000 n 0000102267 00000 n 0000102556 00000 n 0000102805 00000 n 0000102825 00000 n 0000103114</p>\n<p>00000 n 0000103363 00000 n 0000103383 00000 n 0000103672 00000 n 0000103921 00000 n 0000103941 00000 n 0000104230 00000 n</p>\n<p>0000104479 00000 n 0000104499 00000 n 0000104788 00000 n 0000105037 00000 n 0000105057 00000 n 0000105346 00000 n 000010</p>\n", "tags": ["pdf", "iso-32000"]}
|
|
{"id": "1266a957-fbdb-412a-a3be-490783a75282", "text": "Q: Is there a BASIC dialect which uses "==" as the comparison operator? A: <p>Isn't the reason for the double-equal in algol family to distinguish equality from assignment? What, then, would you have us do with the \"LET\" keyword? Abandon it? It was my favorite keyword! So permissive...</p>\n\n<p><a href=\"http://www.freebasic.net/\" rel=\"nofollow noreferrer\">http://www.freebasic.net/</a></p>\n\n<p>Open source, FTW!</p>\n", "tags": ["equality", "assignment-operator", "basic", "comparison-operators"]}
|
|
{"id": "7ceefb54-3d2f-4d9b-96bc-39b86e2c6233", "text": "Q: How to deal with NHibernate parent\\child relationship with childs in ISet and generated IDs? A: <p>I have pretty much te same kind of base-class for my entities like you have.</p>\n\n<p>The base class has overriden Equals / GetHashcode methods, etc...\nIn my implementation of the Equals method in the base class, I check whether the entity is transient (not yet persistent). An entity is transient, when the Id that has been assigned to it, is still the default value. </p>\n\n<p>When this is the case, I do not check the equality based on the Id.<br>\nIf both entities that have to be compared, are transient, I use the ReferenceEquals method in order to determine equality.</p>\n\n<p>In my implementation of <code>GetHashCode</code>, I do this:</p>\n\n<ul>\n<li>I have a private member variable <code>oldHashcode</code> in my entity, which is of a nullable type.</li>\n<li>when oldHashCode is not null, I return <code>oldHashCode</code>.</li>\n<li>else, when the entity is transient, I call <code>base.GetHashCode()</code> and store the returned value in <code>oldHashCode</code>. I return this value.</li>\n<li><p>else, I generate the Hashcode based on the Id. <code>Id.GetHashCode()</code></p>\n\n<pre><code>private int? _oldHashCode;\n\n public override int GetHashCode()\n {\n if( _oldHashCode.HasValue )\n {\n return _oldHashCode.Value;\n }\n\n if( IsTransient )\n {\n _oldHashCode = base.GetHashCode ();\n\n return _oldHashCode.Value;\n }\n\n return Id.GetHashCode (); \n }\n</code></pre></li>\n</ul>\n\n<p>Using this kind of 'strategy', I've never ran into any weird issues 'till now...</p>\n", "tags": ["nhibernate"]}
|