body stringlengths 25 86.7k | comments list | answers list | meta_data dict | question_id stringlengths 1 6 |
|---|---|---|---|---|
Extensible Markup Language (XML) is a structured document format that defines human- and machine-readable encoding rules. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:24:15.337",
"Id": "8084",
"Score": "0",
"Tags": null,
"Title": null
} | 8084 |
<p><a href="https://en.wikipedia.org/wiki/Scala_(programming_language)" rel="nofollow">Scala</a> is a general purpose programming language principally targeting the Java Virtual Machine. Designed to express common programming patterns in a concise, elegant, and type-safe way, it fuses both imperative and functional pro... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:25:23.920",
"Id": "8085",
"Score": "0",
"Tags": null,
"Title": null
} | 8085 |
Scala is a general purpose programming language principally targeting the Java Virtual Machine. Designed to express common programming patterns in a concise, elegant, and type-safe way, it fuses both imperative and functional programming styles. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:25:23.920",
"Id": "8086",
"Score": "0",
"Tags": null,
"Title": null
} | 8086 |
<p>AJAX is a set of techniques that run on the client to create interactive websites. It allows updates to the current page to be made in more or less real-time without having to reload the page from the server.</p>
<p><a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" rel="nofollow">AJAX on Wikipedia</a></... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:26:37.023",
"Id": "8087",
"Score": "0",
"Tags": null,
"Title": null
} | 8087 |
AJAX (Asynchronous Javascript And XML) is a popular technique for creating interactive websites, allowing web content to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:26:37.023",
"Id": "8088",
"Score": "0",
"Tags": null,
"Title": null
} | 8088 |
<p><strong>Strong Programming Features VB.Net</strong></p>
<p><strong>VB.Net</strong> has numerous strong programming features that make it endearing to multitude of programmers worldwide.Some of these features are furnished below</p>
<ul>
<li>Boolean Conditions </li>
<li>Automatic Garbage Collection</li>
<li>Standa... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:27:00.190",
"Id": "8089",
"Score": "0",
"Tags": null,
"Title": null
} | 8089 |
Visual Basic .NET (VB.NET) is an object-oriented computer programming language that can be viewed as an evolution of Microsoft's Visual Basic 6 (VB6) but implemented on the Microsoft .NET Framework. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:27:00.190",
"Id": "8090",
"Score": "0",
"Tags": null,
"Title": null
} | 8090 |
<p>jQuery UI is an Extension of the jQuery Library.</p>
| [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:32:42.247",
"Id": "8091",
"Score": "0",
"Tags": null,
"Title": null
} | 8091 |
jQuery UI is the official jQuery user interface library. It provides interactions, widgets, effects, and theming for creating highly interactive web applications. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:32:42.247",
"Id": "8092",
"Score": "0",
"Tags": null,
"Title": null
} | 8092 |
iOS is an operating system for mobile devices developed by Apple Inc. that is currently used in their iPhone, iPod touch, iPad, and Apple TV (2nd generation) devices. It shares a lot with Mac OS X, but is optimized for touch-based interfaces. Use this tag for questions about iOS-specific code. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:33:37.267",
"Id": "8094",
"Score": "0",
"Tags": null,
"Title": null
} | 8094 |
<p><a href="http://en.wikipedia.org/wiki/Thread_safety" rel="nofollow">From Wikipedia</a>:</p>
<blockquote>
<p><strong>Thread safety</strong> is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is <strong>thread-safe</strong>
if it only manipulates shared data st... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:35:12.273",
"Id": "8095",
"Score": "0",
"Tags": null,
"Title": null
} | 8095 |
A piece of code is thread-safe if it only manipulates data structures in a way that allows consistent execution of this code by multiple threads. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:35:12.273",
"Id": "8096",
"Score": "0",
"Tags": null,
"Title": null
} | 8096 |
<h1>About Bash</h1>
<p>There are a variety of interpreters that receive commands either interactively or as a sequence of commands from a file. The <a href="http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29" rel="nofollow">Bourne-again shell</a> (Bash) is one such interpreter. Bash implements the standard <a href="ht... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:36:01.320",
"Id": "8097",
"Score": "0",
"Tags": null,
"Title": null
} | 8097 |
BASH is the GNU Bourne Again SHell, the successor to the classic Unix Bourne sh (shell). It's the default shell for various GNU systems. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:36:01.320",
"Id": "8098",
"Score": "0",
"Tags": null,
"Title": null
} | 8098 |
<p>API, for code implementing an Application Programming Interface. A program's API defines the proper way for a developer to request services from that program, site and/or service. Do NOT use this tag if the code simply uses an already existing API. This tag is purely for questions which implement one in the questio... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 4.0",
"CreationDate": "2012-01-21T15:36:28.917",
"Id": "8099",
"Score": "0",
"Tags": null,
"Title": null
} | 8099 |
API, for code implementing (NOT using) an Application Programming Interface. A program's API defines the proper way for a developer to request services from that program, site and/or service. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 4.0",
"CreationDate": "2012-01-21T15:36:28.917",
"Id": "8100",
"Score": "0",
"Tags": null,
"Title": null
} | 8100 |
<p>HTML5 is a core technology <a href="http://en.wikipedia.org/wiki/Markup_language" rel="nofollow">markup language</a> of the Internet used for structuring and presenting content for the <a href="http://en.wikipedia.org/wiki/World_Wide_Web" rel="nofollow">World Wide Web</a>. As of October 28, 2014 this is the final an... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:37:43.957",
"Id": "8101",
"Score": "0",
"Tags": null,
"Title": null
} | 8101 |
HTML5 (Hyper Text Markup Language, version 5) is an umbrella term for recent web technologies. It is also the latest iteration of HTML, and became a W3C Recommendation in October 2014, introducing new elements and APIs. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:37:43.957",
"Id": "8102",
"Score": "0",
"Tags": null,
"Title": null
} | 8102 |
<h1>Definition (Wikipedia):</h1>
<blockquote>
<p>Windows Forms (WinForms) is the name given to the graphical application programming interface (API) included as a part of Microsoft .NET Framework, providing access to native Microsoft Windows interface elements by wrapping the extant Windows API in managed code.</p>
... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:38:26.123",
"Id": "8103",
"Score": "0",
"Tags": null,
"Title": null
} | 8103 |
WinForms is the informal term given to the graphical application programming interface (API) included as a part of Microsoft's .NET Framework, providing access to the native Microsoft Windows interface elements by wrapping the existing Windows API in managed code. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:38:26.123",
"Id": "8104",
"Score": "0",
"Tags": null,
"Title": null
} | 8104 |
<p>ANSI Common Lisp, the programmable programming language.</p>
<p>We have a <a href="http://en.wikipedia.org/wiki/Common_Lisp" rel="nofollow">Wikipedia page</a> on Common Lisp, an online version of the <a href="http://www.lispworks.com/documentation/HyperSpec/Front/" rel="nofollow">ANSI Common Lisp standard</a> and a... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:39:25.093",
"Id": "8105",
"Score": "0",
"Tags": null,
"Title": null
} | 8105 |
Common Lisp, or ANSI Common Lisp, is a standardized version of the Lisp programming language intended for production-strength power and libraries. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:39:25.093",
"Id": "8106",
"Score": "0",
"Tags": null,
"Title": null
} | 8106 |
<p>Since different languages may use different RNGs, a question with this tag must also be tagged with the language being used.</p>
<p>All questions pertaining to create random numbers or random distributions: good or bad random number generators (RNGs), how to create specific distributions (gaussian, log-normal) with... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:42:13.433",
"Id": "8107",
"Score": "0",
"Tags": null,
"Title": null
} | 8107 |
This tag is for questions pertaining to random numbers, whether pseudo random or truly random. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:42:13.433",
"Id": "8108",
"Score": "0",
"Tags": null,
"Title": null
} | 8108 |
<p><a href="http://en.wikipedia.org/wiki/Queue_%28data_structure%29" rel="nofollow">From Wikipedia</a>:</p>
<blockquote>
<p>In computer science, a <strong>queue</strong> is a particular kind of
abstract data type or collection in which the entities in the
collection are kept in order and the principal (or only) ... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:43:11.217",
"Id": "8109",
"Score": "0",
"Tags": null,
"Title": null
} | 8109 |
A queue is an ordered, first-in-first-out (FIFO) data structure. Typical implementations of queues support pushing elements to the back and popping them off the front position. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:43:11.217",
"Id": "8110",
"Score": "0",
"Tags": null,
"Title": null
} | 8110 |
<p><a href="http://en.wikipedia.org/wiki/Memory_management" rel="nofollow">From Wikipedia</a>:</p>
<blockquote>
<p><strong>Memory management</strong> is the act of managing computer memory. The essential requirement of memory management is to provide ways to
dynamically allocate portions of memory to programs at t... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:43:26.287",
"Id": "8111",
"Score": "0",
"Tags": null,
"Title": null
} | 8111 |
Memory management is the act of managing computer memory by allocating portions of memory to programs as well as freeing memory so that it can be re-used. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:43:26.287",
"Id": "8112",
"Score": "0",
"Tags": null,
"Title": null
} | 8112 |
Locking allows different types of resources to be locked by a transaction. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:45:35.737",
"Id": "8114",
"Score": "0",
"Tags": null,
"Title": null
} | 8114 |
<p><a href="http://en.wikipedia.org/wiki/Exception_handling" rel="nofollow">From Wikipedia</a>:</p>
<blockquote>
<p><strong>Exception handling</strong> is the process of responding to the occurrence,
during computation, of <em>exceptions</em> – anomalous or exceptional events
requiring special processing – often... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:46:27.843",
"Id": "8115",
"Score": "0",
"Tags": null,
"Title": null
} | 8115 |
An exception is a rarely occurring (exceptional!) condition that requires deviation from the program's normal flow. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:46:27.843",
"Id": "8116",
"Score": "0",
"Tags": null,
"Title": null
} | 8116 |
Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:47:38.603",
"Id": "8118",
"Score": "0",
"Tags": null,
"Title": null
} | 8118 |
<blockquote>
<p>The PHP Data Objects (PDO) extension defines a lightweight, consistent
interface for accessing databases in PHP. PDO provides a <em>data-access</em>
abstraction layer, which means that, regardless of which database
you're using, you use the same functions to issue queries and fetch
data. </p>
... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:48:13.503",
"Id": "8119",
"Score": "0",
"Tags": null,
"Title": null
} | 8119 |
PDO is a PHP extension that serves as a data access abstraction layer for accessing databases. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:48:13.503",
"Id": "8120",
"Score": "0",
"Tags": null,
"Title": null
} | 8120 |
Zend Framework is an open source, object-oriented web application framework implemented in PHP 5 and licensed under the New BSD License. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:49:33.580",
"Id": "8122",
"Score": "0",
"Tags": null,
"Title": null
} | 8122 |
Historically, Hibernate facilitated the storage and retrieval of Java domain objects via Object/Relational Mapping. Today, Hibernate is a collection of related projects enabling developers to utilize POJO-style domain models in their applications in ways extending well beyond Object/Relational Mapping.
| [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T15:50:11.783",
"Id": "8124",
"Score": "0",
"Tags": null,
"Title": null
} | 8124 |
Swing is a GUI toolkit packaged with the standard Java SDK since version 1.2.
| [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:07:08.387",
"Id": "8126",
"Score": "0",
"Tags": null,
"Title": null
} | 8126 |
Scripting is a form of programming generally characterized by low formality, loose typing, and no requirement for explicit compilation. There are numerous scripting languages, and these are used in a wide variety of scenarios - command-line applications, GUIs, server-side applications, extension modules. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:07:44.297",
"Id": "8128",
"Score": "0",
"Tags": null,
"Title": null
} | 8128 |
<p>Reflection is the process by which a program can perform introspection. This introspection usually involves the ability to observe and modify its own structure and behavior at runtime. From theoretical perspective reflection relates to the fact that program instructions are stored as data. The distinction between pr... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:08:28.400",
"Id": "8129",
"Score": "0",
"Tags": null,
"Title": null
} | 8129 |
Reflection is the process by which a program can observe and modify its own structure and behavior at runtime. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:08:28.400",
"Id": "8130",
"Score": "0",
"Tags": null,
"Title": null
} | 8130 |
<p>See also: <a href="/questions/tagged/floating-point" class="post-tag" title="show questions tagged 'floating-point'" rel="tag">floating-point</a></p>
| [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:13:54.880",
"Id": "8131",
"Score": "0",
"Tags": null,
"Title": null
} | 8131 |
Use this tag for questions about using, storing or manipulating integral values of all types and sizes, including concerns about overflow. Not for code that casually happens to use integers. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:13:54.880",
"Id": "8132",
"Score": "0",
"Tags": null,
"Title": null
} | 8132 |
<p>In computer programming, an enumerated type (also called enumeration or enum) is a data type consisting of a set of named values called elements, members or enumerators of the type. The enumerator names are usually identifiers that behave as constants in the language. A variable that has been declared as having an e... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:14:37.797",
"Id": "8133",
"Score": "0",
"Tags": null,
"Title": null
} | 8133 |
A data type consisting of a set of named values called elements, members or enumerators of the type. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:14:37.797",
"Id": "8134",
"Score": "0",
"Tags": null,
"Title": null
} | 8134 |
<p><strong>The Integrated Development Environment (<em>IDE</em>) for VB 6.0</strong></p>
<p>One of the most significant changes in Visual Basic 6.0 is the Integrated Development Environment (IDE). IDE is a term commonly used in the programming world to describe the interface and environment that we use to create our a... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:15:48.870",
"Id": "8135",
"Score": "0",
"Tags": null,
"Title": null
} | 8135 |
Visual Basic 6.0 (VB6) is the "third-generation" event-driven programming language and integrated development environment (IDE) from Microsoft for its COM programming model. It was also considered a relatively easy programming language to learn and use, because of its graphical development features and BASIC heritage. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:15:48.870",
"Id": "8136",
"Score": "0",
"Tags": null,
"Title": null
} | 8136 |
<p>In computing, a <em>shell</em> is a user interface for access to an operating system's services. In general, operating system shells use either a <em>command-line interface</em> (CLI) or <em>graphical user interface</em> (GUI), depending on a computer's role and particular operation. It is named a shell because it i... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 4.0",
"CreationDate": "2012-01-21T16:16:29.650",
"Id": "8137",
"Score": "0",
"Tags": null,
"Title": null
} | 8137 |
<p>The <code>mysqli</code> PHP extension is the successor to the <a href="/questions/tagged/mysql" class="post-tag" title="show questions tagged 'mysql'" rel="tag">mysql</a> PHP extension. The extension's principle features consist of:</p>
<ul>
<li>An object-oriented interface</li>
<li>Support for prepared statements<... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:17:02.083",
"Id": "8139",
"Score": "0",
"Tags": null,
"Title": null
} | 8139 |
The MySQLi extension, or as it is sometimes known, the MySQL Improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The MySQLi extension is included with PHP versions 5 and later. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:17:02.083",
"Id": "8140",
"Score": "0",
"Tags": null,
"Title": null
} | 8140 |
<p><a href="http://codeigniter.com/" rel="nofollow noreferrer"><img src="https://ellislab.com/_user_guide_src_ci/images/ci_logo_flame.jpg" alt="PHP"></a></p>
<p><a href="http://codeigniter.com/" rel="nofollow noreferrer">CodeIgniter</a> is an open-source <a href="http://www.php.net/" rel="nofollow noreferrer">PHP</a> ... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:18:20.520",
"Id": "8141",
"Score": "0",
"Tags": null,
"Title": null
} | 8141 |
CodeIgniter is an open-source PHP web development framework created by EllisLab Inc. The framework implements the Model-View-Controller design pattern. It is praised for its performance and the quality of its documentation. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:18:20.520",
"Id": "8142",
"Score": "0",
"Tags": null,
"Title": null
} | 8142 |
<p>A makefile is usually an input file for the build control language/tool make.
The <code>make</code> utility and the corresponding makefile format is <a href="http://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html" rel="nofollow">standardized by POSIX</a>.</p>
| [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:19:33.420",
"Id": "8143",
"Score": "0",
"Tags": null,
"Title": null
} | 8143 |
A makefile is usually an input file for the build control language/tool make.
| [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:19:33.420",
"Id": "8144",
"Score": "0",
"Tags": null,
"Title": null
} | 8144 |
<p>Sorting is the process of applying some order to a collection of items. There are various algorithms for doing this, including <a href="/questions/tagged/mergesort" class="post-tag" title="show questions tagged 'mergesort'" rel="tag">mergesort</a> and <a href="/questions/tagged/quick-sort" class="post-tag" t... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:20:10.470",
"Id": "8145",
"Score": "0",
"Tags": null,
"Title": null
} | 8145 |
Sorting is the process of applying some order to a collection of items. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:20:10.470",
"Id": "8146",
"Score": "0",
"Tags": null,
"Title": null
} | 8146 |
<p><a href="http://en.wikipedia.org/wiki/Singleton_pattern" rel="nofollow">From Wikipedia</a>:</p>
<blockquote>
<p>In software engineering, the <strong>singleton pattern</strong> is a design pattern
that restricts the Instantiation of a class to one object. This is
useful when exactly one object is needed to coo... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:22:45.287",
"Id": "8147",
"Score": "0",
"Tags": null,
"Title": null
} | 8147 |
The singleton is a design pattern to ensure that exactly one application-wide instance of a particular class exists. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:22:45.287",
"Id": "8148",
"Score": "0",
"Tags": null,
"Title": null
} | 8148 |
ASP.NET MVC 2 is the second major version of the ASP.NET MVC platform, it has since been outdated by ASP.NET MVC 3. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:23:36.033",
"Id": "8150",
"Score": "0",
"Tags": null,
"Title": null
} | 8150 |
Quicksort is a sorting algorithm invented by C. A. R. Hoare that has an average-case complexity of O(n log n), worst-case complexity of O(n^2). It is one of the fastest general-purpose sorting algorithms in practice. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:25:26.657",
"Id": "8152",
"Score": "0",
"Tags": null,
"Title": null
} | 8152 |
Asynchronous programming is simply allowing some portions of code to be executed on separate threads.
It makes your applications perform better, be more responsive, and use the resources of the system they are running on to the fullest extent.
| [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:26:49.460",
"Id": "8154",
"Score": "0",
"Tags": null,
"Title": null
} | 8154 |
<p>OpenGL (or Open Graphics Library) is a cross-language, multi-platform application programming interface (API) specification for 2D and 3D graphics rendering. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional sof... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 4.0",
"CreationDate": "2012-01-21T16:28:24.013",
"Id": "8155",
"Score": "0",
"Tags": null,
"Title": null
} | 8155 |
OpenGL is a graphics standard and API which targets the desktop, workstation and mobile segments. OpenGL is used for applications like CAD software and computer games. It is also cross-platform and with bindings for several programming languages.
Use this tag together with the appropriate language tag for code that ... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 4.0",
"CreationDate": "2012-01-21T16:28:24.013",
"Id": "8156",
"Score": "0",
"Tags": null,
"Title": null
} | 8156 |
Windows Communication Foundation is a part of the .NET Framework that provides a unified programming model for rapidly building service-oriented applications. This integrates various other(.net\java\MSMQ) technologies. The primary focus on the interoperability of different stacks of communication.
| [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:28:40.317",
"Id": "8158",
"Score": "0",
"Tags": null,
"Title": null
} | 8158 |
"Don't Repeat Yourself", or DRY, is a software development philosophy which aims at reducing redundancy and code repetition. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:29:49.317",
"Id": "8160",
"Score": "0",
"Tags": null,
"Title": null
} | 8160 |
An iterator is an object-oriented programming pattern which for the most part functions similarly to a pointer to an object inside a collection with the added ability to traverse through the collection in a defined manner, agnostic of the actual implementation or even object addresses in physical memory. Iterators may ... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T16:30:35.820",
"Id": "8162",
"Score": "0",
"Tags": null,
"Title": null
} | 8162 |
<p>I use this Matlab code:</p>
<pre><code>load ~/emailAnalysis/results.txt
results=results(size(results,1)-400:size(results,1),:)
temp = results(:,3)-1238370000;
h=plot(temp,smooth(results(:,1)),':b')
set(h,'LineWidth',1)
ylim([0 80])
xlim([max(temp)-(86400*7),max(temp)-1])
set(gca,'XGrid','on')
ylabel('Emails')
hold ... | [] | [
{
"body": "<pre><code>clear all;\nload('results.txt');\ntime = results(:,3) - 1238370000;\n</code></pre>\n\n<p>There's no need to plot all of the points if you're going to restrict the range to the past week. So I'd suggest you find the index where the time is less than a week ago and limit your plotting to tha... | {
"AcceptedAnswerId": "8892",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T18:10:53.287",
"Id": "8165",
"Score": "3",
"Tags": [
"performance",
"matlab",
"r"
],
"Title": "Generate graph in Matlab"
} | 8165 |
<p>I'm trying to devise a way to calculate the <strong>mean differences</strong> (the absolute average differences between any two values in a set), of sub-arrays (starting from arbitrary indices) in an <code>int</code> array. I'll be placing the bounds of each subarray in to "buckets" of differing mean difference magn... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-20T23:32:22.273",
"Id": "12746",
"Score": "5",
"body": "Could you, instead of just posting your code, provide some (links to) hints on the actual math which you are trying to implement, as well as pseudocode of your algorithm? This wou... | [
{
"body": "<p>Let us have two functions:</p>\n\n<pre><code>aggr_sum(a, i, j) : |a[i]-a[j]| +....+ |a[j-1]-a[j]|\nsum_difference(a,i,j): sum of difference of all elements from a[i]...a[j]\n</code></pre>\n\n<p>You can calculate aggr_sum for all values of i and j in O(n^2) time:</p>\n\n<pre><code>aggr_sum(a, i, j)... | {
"AcceptedAnswerId": null,
"CommentCount": "14",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-20T23:23:02.017",
"Id": "8174",
"Score": "8",
"Tags": [
"java",
"algorithm",
"complexity"
],
"Title": "Calculating the mean differences of subarrays"
} | 8174 |
<p>A prime (or prime number) is a number divisible only by itself and one.<br>
The first 5 prime numbers are: 2, 3, 5, 7, 11. </p>
<p>Prime numbers are commonly used in hashing and encryption algorithms. Most notably, many encryptions rely on using very large primes.</p>
<p>There is no known relationship between prim... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T23:42:03.870",
"Id": "8177",
"Score": "0",
"Tags": null,
"Title": null
} | 8177 |
Primes or prime numbers are numbers which are divisible only by themselves and one, starting with 2, 3, 5, 7, 11.... They are commonly used in encryption and hashing algorithms. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-21T23:42:03.870",
"Id": "8178",
"Score": "0",
"Tags": null,
"Title": null
} | 8178 |
<p>I find it a bit odd in ASP.NET MVC that the <code>Html</code> helper extensions, like <code>Html.EditorFor</code>, take a <code>Func<T1, TResult></code> where the <code>T1</code> argument is just the already in scope <code>Model</code> variable, e.g.:</p>
<pre><code>@Html.EditorFor(x => x.Name)
</code></pr... | [] | [
{
"body": "<p>I think MVC's way of suggesting that it needs a direct member of the <code>Model</code> class.</p>\n\n<p>What (I think) MVC is doing in the <code>x => x.Name</code> case is analyze the expression and make sure its composed of a single node, which is a property/field of the input parameter (no n... | {
"AcceptedAnswerId": "8191",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-22T03:18:50.050",
"Id": "8181",
"Score": "2",
"Tags": [
"c#",
"asp.net-mvc-3"
],
"Title": "ASP.NET MVC Html.XXFor OK to discard lambda argument and just use Model directly?"
} | 8181 |
<p><a href="http://jondavidjohn.com/blog/2012/01/imperfect-human-list-card-shuffle-in-python" rel="nofollow">I've got this <code>humanoid_shuffle</code> I wrote in Python</a>. I've been wanting to learn C so as an exercise I ported it to C. As this is my first venture into C and even the ideas of memory management and ... | [] | [
{
"body": "<p>Before I do a C review I just want to do a literal translation of your python so you can compare it. Personally I think you can make your C look identical to your python (a small amount of extra work required for memory management and the array like container but otherwise the same).</p>\n\n<pre><... | {
"AcceptedAnswerId": "8206",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-22T03:22:40.817",
"Id": "8182",
"Score": "5",
"Tags": [
"beginner",
"c",
"memory-management",
"simulation",
"shuffle"
],
"Title": "Human (imperfect) array (card) shuffle wr... | 8182 |
<p>I am looking for feedback on my doubly linked list implementation that I have written in Java. I am looking for specific feedback on the efficiency of my code, as well as my usage of generics. I am pretty new to using generics in Java, and I'm not quite sure that I am using them correctly yet. </p>
<p>My node class... | [] | [
{
"body": "<p>My answer only deals with the \"testing\" part of your question, not the review of the classes themselves.</p>\n\n<p>If I can start with a question - are you expecting <code>LLNode</code> to be used by other classes? Or is it only for use by <code>DoublyLinkedList</code>? If it's the latter, the... | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-22T05:30:36.700",
"Id": "8185",
"Score": "3",
"Tags": [
"java",
"performance",
"unit-testing",
"linked-list"
],
"Title": "Generic Linked List Implementation in Java"
} | 8185 |
<p>I have a form that I need to resubmit to the action if a checkbox is TRUE. This is to facilitate chained select boxes with javascript turned off.
Ideally I would instanciate the form object at the end only, just before sending it to the view, but as you can see I need it beforehand. </p>
<p>The form takes paramete... | [] | [
{
"body": "<p>I did it like this in the end, I'm not sure if it's the best way and I would welcome comments.</p>\n\n<pre><code>public function editcontactdetailsAction() {\n\n $auth = Zend_Auth::getInstance();\n $id = $auth->getidentity();\n $user = $this->em->getRepository('Entiti... | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-20T16:46:04.037",
"Id": "8193",
"Score": "3",
"Tags": [
"php",
"zend-framework"
],
"Title": "Zend form parameters - how to change after instanciated"
} | 8193 |
<p>So say I have a method that does a bunch of stuff, and I want to refactor this method to take a different type of parameter:</p>
<pre><code>public object A(MyObject a)
{
// does a bunch of crap with a
// then calls another method
this.B(a);
}
</code></pre>
<p>Now even method <code>B()</code> does a lo... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-22T22:43:37.340",
"Id": "12813",
"Score": "0",
"body": "Is simpleInstrument merely a base case of the CompoundInstrument? If so the RecursiveDelegate is not written properly as any recursive method naturally must handle it's base case.... | [
{
"body": "<p>If I understand your question correctly I would refactor your method by implementing the template pattern in an OO or functional way whatever suits you best. Look at this excellent article for more information on the two options <a href=\"http://www.codeproject.com/KB/architecture/TMDPvsLambda.asp... | {
"AcceptedAnswerId": null,
"CommentCount": "2",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-20T14:28:13.253",
"Id": "8198",
"Score": "1",
"Tags": [
"c#",
".net"
],
"Title": "Refactoring different type of param to reduce duplicate code"
} | 8198 |
<p>I'd like to refactor the following code:</p>
<pre><code>case @request.path
when '/'
Rack::Response.new do |response|
do_stuff
end
when '/env' then Rack::Response.new(@env.to_html)
end
</code></pre>
<p>And extract <code>Rack::Response.new</code>, something like the following:</p>
<pre><code>Rack::Response.... | [] | [
{
"body": "<p>In order to pass a block to a function, you need to prefix it with an ampersand.</p>\n\n<pre><code>block_or_string = case @request.path\n when '/' then Proc.new { |response| do_stuff }\n when '/env' then @end.to_html\nend\n\nresponse = if block_or_string.is_a?(Proc)\n Rack::Response.new(&... | {
"AcceptedAnswerId": "8216",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-22T20:31:45.153",
"Id": "8203",
"Score": "2",
"Tags": [
"ruby"
],
"Title": "how to pass a block to a function as a parameter"
} | 8203 |
<p>Recently I was asked to write algorithm to rearrange elements in two-dimensional array in spiral order.</p>
<p>Input array: Output array:</p>
<pre><code>[ 1, 2, 3, 4] [ 1, 2, 3, 4 ]
[ 5, 6, 7, 8] = > [ 8, 12, 11, 10 ]
[ 9, 10, 11, 12] [ 9, 5, 6, 7 ]... | [] | [
{
"body": "<p>I'm not sure what exactly about your code made it a \"show-stopper.\" Your use of <code>tmpArray</code> has a bit of a <a href=\"http://en.wikipedia.org/wiki/Code_smell\" rel=\"nofollow\">smell</a> to it. There are issues of readability (why does the line <code>for(var i=c1;i<=c2;i++)</code> on... | {
"AcceptedAnswerId": "8210",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-23T04:16:27.450",
"Id": "8207",
"Score": "5",
"Tags": [
"javascript",
"algorithm",
"array"
],
"Title": "Rearrange elements in two-dimensional array spiral order"
} | 8207 |
<p>This snippets works, but I think it can be optimized:</p>
<pre><code>/* highlight input, if it is empty */
$(function() {
var highlight_if_no_val=function () {
$(this).toggleClass('highlight-input', !$(this).val());
}
$('#id_index-EditForm-gpnr').keyup(highlight_if_no_val).each(highlight_if_no_v... | [] | [
{
"body": "<p>Just a thought ... with explination:</p>\n\n<pre><code>// Move your variable function outside of your ready call to make it accessible later\n// if needed, for instance in another script call from a dynamically drawn in view,\n// Alsot, shorten the name so as to save milliseconds on call time, ... | {
"AcceptedAnswerId": "9307",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-23T11:16:18.993",
"Id": "8212",
"Score": "5",
"Tags": [
"javascript",
"jquery"
],
"Title": "Highlight input if empty"
} | 8212 |
<p>I recently started cleaning up my projects and decided that I want to create a personal repository of useful bits of code. I found this bitmap code between them and heavily edited it and I'd appreciate if someone could review it, because I'm not that used to bitwise operations and such. Is the code portable enough, ... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2016-05-30T18:32:34.880",
"Id": "242703",
"Score": "0",
"body": "To anyone that is still following this post, I commited the code to github [here](https://github.com/DictumMortuum/clib).\n\nI also added all of your comments as issues. Thanks f... | [
{
"body": "<p>If you expect your code will ever be used from C++ (which a lot of C code is) then you should not use any identifiers with a double underscore.</p>\n\n<pre><code>#ifndef BITMAP__\n // ^^ May cause problems in C++\n</code></pre>\n\n<p>As this is reserved for the implementation in C++. ... | {
"AcceptedAnswerId": null,
"CommentCount": "1",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-23T11:39:27.493",
"Id": "8213",
"Score": "12",
"Tags": [
"c",
"image",
"bitwise"
],
"Title": "Bitmap implementation"
} | 8213 |
<p>I'm trying to create URL parse class., so i can check URL Segment / part, </p>
<p>Example:</p>
<ol>
<li><a href="http://localhost/myproject/class/method/arg/other" rel="nofollow">http://localhost/myproject/class/method/arg/other</a> (localhost) </li>
<li><a href="http://www.myproject.com/class/method/arg/other" r... | [] | [
{
"body": "<p>Just a quick note: there is some duplication in the two branches of the first <code>if</code>. You could write the following:</p>\n\n<pre><code><?php\n public function segment($arg=null)\n {\n $this->url = str_replace(BASEDIR,'',$_SERVER['REQUEST_URI']);\n if(isset($_GET)... | {
"AcceptedAnswerId": "8215",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-23T13:31:44.823",
"Id": "8214",
"Score": "2",
"Tags": [
"php"
],
"Title": "URL segment class"
} | 8214 |
<p>This code is for continuing the execution after an exception, and this is ugly:</p>
<pre><code> int step=0;
do{
try{
switch(step)
{
case 0:
step=1;
methodAAAAACanThrowException();
break;
... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-23T18:41:39.113",
"Id": "12849",
"Score": "2",
"body": "The fact that you want do this is a bad sign. Why do you want to do this? What kind of function is this? What kind of methods is it calling? Chances are a better way to design you... | [
{
"body": "<p>How about something like this?</p>\n\n<p>Define a one-method interface like so:</p>\n\n<pre><code>public interface TryAndLogFailure { void execute(); }\n</code></pre>\n\n<p>Then define a method which takes an object which implements the interface and does your exception handling for you:</p>\n\n<p... | {
"AcceptedAnswerId": "8225",
"CommentCount": "1",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-23T17:10:02.353",
"Id": "8222",
"Score": "2",
"Tags": [
"java",
"exception-handling",
"exception"
],
"Title": "Exception handling continuing the excecution"
} | 8222 |
<p>I want to be able to convert a list of objects into a string csv format. I've written this extension method below but have a feeling I'm missing something as this seems like potentially a common thing to want to do.</p>
<pre><code>private static readonly char[] csvChars = new[] { ',', '"', ' ', '\n', '\r' };
publ... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T17:48:46.640",
"Id": "12890",
"Score": "0",
"body": "You are excluding null values. Shouldn't a null value still be represented in the CSV output? Depends on what you're using this for, I suppose."
}
] | [
{
"body": "<p><a href=\"http://en.wikipedia.org/wiki/Comma-separated_values#Basic_rules\" rel=\"nofollow noreferrer\">If your items contain a comma, carriage return or other special CSV character, you must delimit it with quotation marks</a>.</p>\n\n<pre><code>namespace CsvStuff\n{\n using System;\n using... | {
"AcceptedAnswerId": "8229",
"CommentCount": "1",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-23T20:47:55.270",
"Id": "8228",
"Score": "6",
"Tags": [
"c#",
"csv"
],
"Title": "Converting a list to a CSV string"
} | 8228 |
<p>I'd like some feedback on my implementation to get all the permutations of a set.</p>
<p>Eg:</p>
<pre><code>@Test
public void test()
{
def data = [["A","B"],["A","B","C","D"],["D","E","F"]]
def expected = toResultSet("ABD,ABE,ABF,ACD,ACE,ACF,ADE,ADF,BAD,BAE,BAF,BCD,BCE,BCF,BDE,BDF");
def result = SetPe... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T18:43:53.773",
"Id": "12892",
"Score": "0",
"body": "Are you deliberately using `Collection<Object>`, or is this something that should be handled by making the collections generic?"
},
{
"ContentLicense": "CC BY-SA 3.0",
... | [
{
"body": "<p>There's a number of things going on here, but the first thing that comes to mind is that you're placing an object on the heap that you simply discard (the entire class) for no apparent reason (speaking logically, not in terms of objects created). Given that you don't appear to keep the object at ... | {
"AcceptedAnswerId": "8267",
"CommentCount": "3",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-23T22:31:18.817",
"Id": "8230",
"Score": "2",
"Tags": [
"java",
"algorithm"
],
"Title": "Getting permutations of a set"
} | 8230 |
<p>I have following code that is used of one time skipping some functionality(actually do something only one time until <code>SkipSomeStuff</code> is <code>true</code>):</p>
<pre><code>private bool _skipSomeStuff;
public bool SkipSomeStuff
{
set
{
_skipSomeStuff = value;
}
get
{
if (_skipSomeStu... | [] | [
{
"body": "<p>It is very confusing to set a property just to discover that it returns something else just after you set it. Properties are supposed to keep the value you give them. (At least logically)</p>\n\n<p>And since your SkipSomeStuff property is public, you have no guarantee you won't access that propert... | {
"AcceptedAnswerId": "8233",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-23T23:34:53.020",
"Id": "8232",
"Score": "3",
"Tags": [
"c#"
],
"Title": "One time property reading"
} | 8232 |
<p>I'm attempting to create a linked list of length n using Python. I have the simple list implemented, a working concatenation function, and a working create_list function; however, I just want to know if there is a more efficient method at making the linked list than using my concatenate function (made for testing).<... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T01:06:36.780",
"Id": "12864",
"Score": "1",
"body": "do you really need a linked list?"
},
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-26T14:50:25.270",
"Id": "12985",
"Score": "0",
"body": "... | [
{
"body": "<p>Just assign to the previous node's <code>next</code> attribute directly in the loop:</p>\n\n<pre><code>def create_list(n):\n for i in range(n):\n c = cell.Cell(n)\n if i == 0:\n lst = c\n else:\n prev.next = c\n prev = c\n return lst\n</code>... | {
"AcceptedAnswerId": "8327",
"CommentCount": "2",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T01:02:06.747",
"Id": "8237",
"Score": "6",
"Tags": [
"python",
"algorithm"
],
"Title": "Faster way to create linked list of length n in Python"
} | 8237 |
<p>I have a code which was not refactored at all. I refactored it to some extent, but stuck at a point where I cannot think of anything further.</p>
<p><strong>Tractor.java:</strong></p>
<pre><code>package com.farm;
public class Tractor implements MethodsInterface {
private int[] position;
private int[] fi... | [] | [
{
"body": "<p>First, the code compares Strings using <code>==</code>. This will compare the <em>reference</em> rather than the contents of the String. Use <a href=\"http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#compareTo%28java.lang.String%29\" rel=\"nofollow\"><code>String.compareTo(String)</c... | {
"AcceptedAnswerId": "8244",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T01:59:40.990",
"Id": "8238",
"Score": "6",
"Tags": [
"java",
"object-oriented"
],
"Title": "Farm tractor implementation"
} | 8238 |
<p>I have the following code to do remember-me style login:</p>
<pre><code><?php
session_start();
if(!isset($_SESSION['login'])) $_SESSION['login'] = 0;
if(isset($_COOKIE['web_login_cookie']) && $_SESSION['login'] == 0) {
$sql = mysql_query("SELECT * FROM users");
while($row = mysql_fetch_array($sql... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T11:16:23.603",
"Id": "12871",
"Score": "0",
"body": "Calculating and comparing every user's cookie every time will be insanely slow rather soon i think.\nThree links to read: http://stackoverflow.com/questions/549/the-definitive-gui... | [
{
"body": "<p>With that:<code>$_COOKIE['web_login_cookie'] == $pass</code>, you store password (hash) in cookie.\nbest, not to be put in the cookie. Just said the status of connection in the session (server side).</p>\n\n<p>Control the login/password with PHP et put just <code>$_SESSION['login'] = 1</code> in s... | {
"AcceptedAnswerId": "8251",
"CommentCount": "4",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T10:18:48.597",
"Id": "8245",
"Score": "4",
"Tags": [
"php",
"mysql",
"authentication"
],
"Title": "PHP login cookie authentication"
} | 8245 |
<p>How expensive is this query?</p>
<p>Lets say for example if I don't have a field called <code>total_comments</code> in my <code>blog</code> table. All I want to know is the blog has comments or not.</p>
<pre><code>SELECT EXISTS (SELECT true FROM comments WHERE blog_id = b.id) as has_comments FROM blogs b
</code></... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T11:20:53.333",
"Id": "12872",
"Score": "0",
"body": "It depends on how often you execute the query."
},
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T15:20:05.920",
"Id": "12886",
"Score": "0",
... | [
{
"body": "<p>UPDATE: Ah...I've reread your original query. When I first read it, I thought that you were only retrieving this for a single blog, but now I see that you're retrieving for every blog record.</p>\n\n<p>This might be inefficient, though I'm not sure. I suppose it depends on how good MySQL is at de... | {
"AcceptedAnswerId": "8258",
"CommentCount": "2",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T10:30:55.207",
"Id": "8246",
"Score": "2",
"Tags": [
"mysql",
"sql"
],
"Title": "MySQL query: blog entry has comments or not"
} | 8246 |
<p>I looked at the <a href="http://pypi.python.org/pypi?:action=list_classifiers" rel="nofollow">pypi classifiers</a> and <a href="http://wiki.python.org/moin/PyPiXmlRpc" rel="nofollow">some guide</a> to help me write the following script, and here's me wondering if it can be improved:</p>
<pre><code>import xmlrpc.cli... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-26T08:03:35.633",
"Id": "12968",
"Score": "0",
"body": "[**a more complete script**](http://stackoverflow.com/a/9012768)"
},
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2014-09-24T18:57:08.127",
"Id": "116565",... | [
{
"body": "<pre><code>import xmlrpc.client\n\n# pypi language version classifiers\nPY3 = [\"Programming Language :: Python :: 3\"]\n</code></pre>\n\n<p>Why do you have a single string in a list?</p>\n\n<pre><code>PY2 = [\"Programming Language :: Python :: 2\"]\nPY27 = [\"Programming Language :: Python :: 2.7\... | {
"AcceptedAnswerId": "8260",
"CommentCount": "8",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T19:07:49.007",
"Id": "8259",
"Score": "5",
"Tags": [
"python"
],
"Title": "Checking which pypi packages are Py3k-only"
} | 8259 |
<p>I've been working on this class for a while now and would appreciate some feedback, even if it's just nitpicking. I've added basic instructions on how to use the class below along with some questions.</p>
<pre><code><?php
/**
* @category Security
* @version 1.0
* @author First Last <email@mail.... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2014-06-03T14:10:22.753",
"Id": "91698",
"Score": "0",
"body": "This question has a lot of views, so I'm assuming people are using your code. Would you mind posting your completed class in an edit?"
},
{
"ContentLicense": "CC BY-SA 3.0... | [
{
"body": "<p>Your code looks very good. I like the way you are using Dependency Injection. This code is a good example for other people to follow.</p>\n\n<p>Here are just a few points, seeing as no-one else has answered.</p>\n\n<blockquote>\n <p><strong>1. How can I improve the existing code?</strong> </p>\... | {
"AcceptedAnswerId": "8445",
"CommentCount": "8",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T20:06:28.613",
"Id": "8261",
"Score": "27",
"Tags": [
"php",
"security",
"session"
],
"Title": "Custom session handler class - is it robust enough?"
} | 8261 |
<p>I am using this code for a fast JSON API without routes.</p>
<p>Does this code contain any useless parts? Is the class loader efficient enough? Are there any better options? Is <code>ReflectionMethod</code> slow if used once?</p>
<pre><code><?php
/*
* Init stuff
*/
session_start();
define('ROOT', realpath... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T23:09:04.390",
"Id": "12910",
"Score": "0",
"body": "Have you benchmarked it?"
},
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T23:12:08.443",
"Id": "12911",
"Score": "0",
"body": "You mean ... | [
{
"body": "<p>I don't think there are any useless parts. It's quite easy to read actually!</p>\n\n<ol>\n<li>No validation at all of $_GET and $_POST? It doesn't look like namespaces support relative navigations, but that seems a bit dangerous, except if you can Always Trust User Input.</li>\n<li>The \"init stuf... | {
"AcceptedAnswerId": null,
"CommentCount": "4",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T20:09:19.927",
"Id": "8262",
"Score": "7",
"Tags": [
"php",
"performance",
"reflection",
"controller",
"url-routing"
],
"Title": "Dispatcher for a JSON API without routes"... | 8262 |
<p>I'm a complete beginner in Python and programming in general. I made a program for <strong><a href="http://www.spotify.com/us/jobs/tech/best-before/" rel="nofollow">Spotify's Best Before puzzle</a></strong>. It was accepted. I have looked a litle around on internet and looked at other solutions to the problem, and e... | [] | [
{
"body": "<p>First of all, the code is hard to read because :</p>\n\n<ul>\n<li>almost all the functions access global values. it is much better to send a value as a parameter, it makes the flow explicit.</li>\n<li>the list is modified in place; again this makes hard to know which version of the list a function... | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T20:18:44.847",
"Id": "8263",
"Score": "4",
"Tags": [
"python"
],
"Title": "Spotify puzzle problem in python"
} | 8263 |
<p>In our software we enable certain features based on the existence of a flag. The <code>Flags</code> class is a static class used to determine the existence of such a flag.</p>
<p>I came across one piece of logic that I wrote that I feel could benefit from refactoring. The boolean logic works, but I think it's dif... | [] | [
{
"body": "<p>If you control the MenuItemDefinition class, why not just add a feature tag to it?</p>\n\n<pre><code>public class MenuItemDefinition\n{\n public string MethodName { get; set; }\n public string Feature { get; set; }\n}\n\n// each instance\nnew MenuItemDefinition { MethodName = \"NewWidget\", ... | {
"AcceptedAnswerId": "8276",
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-24T22:03:14.427",
"Id": "8264",
"Score": "5",
"Tags": [
"c#",
"linq"
],
"Title": "Lambda .Where() expression to return selected/flagged objects"
} | 8264 |
<p>I've probably done some pretty horrendous things here, but I'm throwing it out for people to give me some feedback that I can start using to immediately improve my Clojure coding style.</p>
<p>Additional suggestions would be performance enhancements as well as areas where I could use transients if it is advisable.<... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-09-20T10:07:06.597",
"Id": "25646",
"Score": "0",
"body": "This is not \"Viterbi\", but \"applying Viterbi to part-of-speech tagging\". The Viterbi is very useful in other areas, not only NLP. I would have liked to comment on the actual a... | [
{
"body": "<p>First of all, good job! This is obviously a complex algorithm and it looks like it's working.</p>\n\n<p>I'm going to do this incrementally. So I'll save this and keep editing as I go. And since it's so long, I won't get to everything. Plus I don't understand the algorithm too well.</p>\n\n<p>First... | {
"AcceptedAnswerId": null,
"CommentCount": "5",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-25T03:35:34.500",
"Id": "8270",
"Score": "8",
"Tags": [
"clojure",
"machine-learning",
"natural-language-processing"
],
"Title": "Using Viterbi algorithm to analyze sentences"
} | 8270 |
<p>I ran into an issue where I was doing this:</p>
<pre><code>dictionary1 = {}
dictionary2 = {}
foo = dictionary1.get('foo', dictionary1.get('bar', dictionary2.get('baz')))
</code></pre>
<p>I.e. if the value isn't supplied in one dict, it would fall back on the next and then on the next. In this case <code>dictionary... | [] | [
{
"body": "<p>Your code attempts to fetch the values of <em>all</em> keys when it probably only really needs one. You do not want to be doing this.</p>\n\n<p>I think it would be better to create a list representing the priorities of what values you wish to retrieve and attempt to retrieve them.</p>\n\n<pre><co... | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-25T05:43:42.427",
"Id": "8272",
"Score": "2",
"Tags": [
"python"
],
"Title": "How can I make handling multiple {}.get('value', {}.get('foo')) pretty?"
} | 8272 |
<p>As part of my project, a game, I have progress bars with countdown timers. These are updated every 250ms, to keep a relatively smooth animation if the countdown time is short.</p>
<p>Here's my function:</p>
<pre><code>var time_format = function(time) {
var elms, names, ret, i, n;
elms = [
time / 29... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-26T13:28:08.647",
"Id": "62838",
"Score": "0",
"body": "You cand use n = elms[i] >> 0. Bit operations are faster."
}
] | [
{
"body": "<p>Try this:</p>\n\n<pre><code>var time_format = (function() {\n\n var names = \"yr mo w d h m s\".split(\" \");\n\n return function(time) {\n var elms, ret, i, n;\n elms = [\n time / 29030400,\n time / 2419200 % 12,\n time / 604800 % 4,\n ... | {
"AcceptedAnswerId": "8274",
"CommentCount": "1",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-25T05:47:43.923",
"Id": "8273",
"Score": "2",
"Tags": [
"javascript"
],
"Title": "JavaScript function for printing a countdown"
} | 8273 |
<p><strong>PL/SQL</strong> (Procedural Language/Structured Query Language) is Oracle Corporation's procedural language extension for SQL.</p>
<p>Oracle clearly distinguishes between SQL and PL/SQL so PL/SQL should not be confused with regular SQL. Plain DML statements should be tagged with <a href="/questions/tagged/sq... | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 4.0",
"CreationDate": "2012-01-25T15:17:55.490",
"Id": "8279",
"Score": "0",
"Tags": null,
"Title": null
} | 8279 |
PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural language extension for SQL. Questions about PL/SQL should probably be tagged "oracle" as well. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-25T15:17:55.490",
"Id": "8280",
"Score": "0",
"Tags": null,
"Title": null
} | 8280 |
Oracle is a relational DBMS (Database Management System) created by Oracle Corporation. | [] | [] | {
"AcceptedAnswerId": null,
"CommentCount": "0",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-25T15:18:32.587",
"Id": "8282",
"Score": "0",
"Tags": null,
"Title": null
} | 8282 |
<blockquote>
<p>By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.</p>
</blockquote>
<pre><code>fib = (x) ->
return 0 if x == 0
return 1 if x == 1
return fib(x-1) + fib(x-2)
i = 2
fib_sum = 0
while (fib i) < 4000000
n = fib ... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-25T16:29:39.573",
"Id": "12935",
"Score": "0",
"body": "1) If your code is working, an advice would be to go to the thread corresponding to that problem on projecteuler. It's always pretty interesting.\n\n\n2) If your code isn't workin... | [
{
"body": "<h2>Better CoffeeScript</h2>\n\n<p>First of all, if you're going to use CoffeeScript, then use its full potential and do away with <code>h</code>:</p>\n\n<pre><code>limit = 4000000\nsum = 0 \n\n[a, b] = [1, 1]\n\nwhile b < limit\n sum += b if b % 2 is 0\n [a, b] = [b, a + b]\n\nconsole.log sum\n... | {
"AcceptedAnswerId": null,
"CommentCount": "2",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-25T16:13:53.487",
"Id": "8283",
"Score": "4",
"Tags": [
"javascript",
"functional-programming",
"project-euler",
"coffeescript",
"fibonacci-sequence"
],
"Title": "Project Eul... | 8283 |
<p>I am running through a file and inserting elements one by one. The counties all contain specific county codes which are duplicated many times throughout the file. I am looking for a way to assign these codes to a specific county while ignoring duplicate county codes.</p>
<p>I have two versions I wrote below with ru... | [
{
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-02-01T05:52:30.913",
"Id": "13321",
"Score": "0",
"body": "Python 2.5 supports a [`defaultdict`](http://blog.ludovf.net/python-collections-defaultdict/), which might save some time with the \"if county in code_info\" checks."
}
] | [
{
"body": "<p>I think you're pretty close to optimal here. I made a few tweaks, to avoid some conditionals by using sets instead. I don't actually know if it'll run faster; you'll need to benchmark it, and it likely depends on the breakdown of how many dupes per county there are.</p>\n\n<pre><code>def get_codes... | {
"AcceptedAnswerId": null,
"CommentCount": "1",
"ContentLicense": "CC BY-SA 3.0",
"CreationDate": "2012-01-25T17:48:51.273",
"Id": "8284",
"Score": "2",
"Tags": [
"python",
"optimization",
"parsing",
"csv"
],
"Title": "Parsing files with county codes"
} | 8284 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.