text
stringlengths
74
309k
{"title":"jqGrid horizontal scrollbar","tags":["jquery","jquery-plugins","jqgrid","scrollbar","horizontal-scrolling"],"question_text":"I developed AJAX interface with jQuery and jqGrid.\nHow I can remove horizontal scrollbar from my jqGrid table?\nhttp:\/\/dskarataev.ru\/jqgrid.png\nIf I set\n`autowidth: true`\n, then ...
{"title":"Cartesian product of 2 lists in Haskell","tags":["haskell","combinatorics","cartesian-product"],"question_text":"I wish to produce the Cartesian product of 2 lists in Haskell, but I cannot work out how to do it. The cartesian product gives all combinations of the list elements:\n`xs = [1,2,3]\nys = [4,5,6]\nc...
{"title":"Objective-C property that is readonly publicly, but has a private setter","tags":["objective-c","properties"],"question_text":"I'd like to use the\n`@property`\nsyntax to declare a synthesized property that is publicly readonly but has a setter that can be called privately from within the class.\nSince it's O...
{"title":"Difference between try-finally and try-catch","tags":["java","try-catch","try-finally"],"question_text":"What's the difference between\n`try {\n fooBar();\n} finally {\n barFoo();\n}`\nand\n`try {\n fooBar();\n} catch(Throwable throwable) {\n barFoo(throwable); \/\/ Does something with throwable, logs it, or ...
{"title":"Need to log asp.net webapi 2 request and response body to a database","tags":["c#","asp.net-web-api"],"question_text":"I am using Microsoft Asp.net WebApi2 hosted on IIS. I very simply would like to log the request body (xml or json) and the response body for each post.\nThere is nothing special about this pr...
{"title":"How can I write an iPhone app entirely in JavaScript without making it just a web app?","tags":["javascript","iphone","objective-c"],"question_text":"I don't want to take the time to learn Obj-C. I've spent 7+ years doing web application programming. Shouldn't there be a way to use the WebView and just write ...
{"title":"-[NSNull length]: unrecognized selector sent to JSON objects","tags":["ios","json"],"question_text":"I'm developing an iOS 5.0+ app with latest SDK.\nI get a very strange error with this code:\n`- (NSMutableURLRequest*)setupRequestWithService:(NSString*)service andMethod:(NSString*)method\n{\n NSString* url =...
{"title":"Automatically update version number","tags":["c#","visual-studio","versioning"],"question_text":"I would like the version property of my application to be incremented for each build but I'm not sure on how to enable this functionality in Visual Studio (2005\/2008). I have tried to specify the AssemblyVersion ...
{"title":"NSViewController and multiple subviews from a Nib","tags":["cocoa","interface-builder","nib","nsviewcontroller"],"question_text":"I'm having a difficult time wrapping my head around loading views with Interface Builder and NSViewController.\nMy goal is to have a view which meets the following description: Top...
{"title":"sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings","tags":["python","unicode","sqlite3","zlib"],"question_text":"Using SQLite3 in Python, I am trying to store a compressed version of a snippet of UTF-8 HTML code.\nCode looks like th...
{"title":"Correct way to do HTML5 checkbox","tags":["html","html5"],"question_text":"I can't seem to find an example anywhere... what's the correct way of doing a HTML5 checkbox?","answer_text":"As far as I know and\nthe docs state\n, nothing fundamental has changed. The basic markup is\n`<input name=\"your_name\" valu...
{"title":"CSS selector for targeting only immediate children and not other identical descendants","tags":["javascript","css","mootools","css-selectors"],"question_text":"I have nested sortable list that can have items dynamically added or removed and can be nested n-levels deep. On nesting, a new ul element is injected...
{"title":"XSD - how to allow elements in any order any number of times?","tags":["xml","xsd"],"question_text":"I am trying to create an XSD, and trying to write the definition with the following requirement:\nAllow child element specified to appear any number of times (0 to unbounded)\nAllow child elements to be in any...
{"title":"How to find the duration of difference between two dates in java?","tags":["java","date-arithmetic"],"question_text":"I have two objects of\nDateTime\n, which need to find the\nduration of their difference\n,\nI have the following code but not sure how to continue it to get to the expected results as followin...
{"title":"Programmatically access currency exchange rates","tags":["php","currency","finance"],"question_text":"I'm setting up an online ordering system but I'm in Australia and for international customers I'd like to show prices in US dollars or Euros so they don't have to make the mental effort to convert from Austra...
{"title":"How do I get the UI thread Dispatcher?","tags":["wpf","multithreading","dispatcher"],"question_text":"Is there any way to get the UI thread's\n`Dispatcher`\nwhen you have no reference to any UI elements?","answer_text":"You can grab the UI Dispatcher from the static application instance:\n`Application.Current...
{"title":"How to use random in BATCH script?","tags":["windows","random","windows-xp","batch-file"],"question_text":"How to use random in BATCH script?","answer_text":"`%RANDOM%`\ngives you a random number between 0 and 32767.\nUsing an expression like\n`SET \/A test=%RANDOM% * 100 \/ 32768 + 1`\n, you can change the r...
{"title":"How do I use jQuery to select all children except a select element","tags":["jquery","drop-down-menu"],"question_text":"I have a div (let's say the id is \"container\") with many elements in it, including a select element. I'd like to select all everything in the div except the select.\nThings I've tried:\n`$...
{"title":"Enabling browser's form auto-filling","tags":["html","forms","google-chrome"],"question_text":"I am making a signup form for my website. It contains various standard form fields. Such as: name, address, phone number, user name, password, etc.\nWhen I double-click on a field (in Chrome 16), so I can auto-fill ...
{"title":"Dynamic SQL - EXEC(@SQL) versus EXEC SP_EXECUTESQL(@SQL)","tags":["sql","sql-server","dynamic"],"question_text":"What are the real world pros and cons of executing a dynamic SQL command in a stored procedure in SQL Server using\n`EXEC (@SQL)`\nversus\n`EXEC SP_EXECUTESQL @SQL`\n?","answer_text":"`sp_executesq...
{"title":".NET 3.5 chart controls exception: Error executing child request for ChartImg.axd","tags":[".net",".net-3.5","charts"],"question_text":"Anyone getting this error when using the new free chart controls MS bought from Dundas?\n\"Error executing child request for ChartImg.axd\"\nOn the MSDN forum they suggested ...
{"title":"What do \"module.exports\" and \"exports.methods\" mean in NodeJS \/ Express?","tags":["javascript","node.js","express","module","export"],"question_text":"Looking at a random\nsource file\nof the\n`express`\nframework for\n`NodeJS`\n, there are two lines of the code that I do not understand (these lines of c...
{"title":"git tag vs. release\/beta branches?","tags":["git","tags","branch"],"question_text":"I've been using git for about a year and would like to use tagging to, well, tag commits at different versions. I've found lots of info on the commands to use to work with tags, but what I'd like to know is why use tagging at...
{"title":"Implement Comet \/ Server push in Google App Engine in Python","tags":["python","google-app-engine","comet","server-push","channel-api"],"question_text":"How can I implement Comet \/ Server push in Google App Engine in Python?","answer_text":"We just announced the Channel API to do comet push with App Engine ...
{"title":"mysql GROUP_CONCAT duplicates","tags":["sql","mysql","group-concat"],"question_text":"I make my join from a farmTOanimal table like this. There is a similar farmTotool table\n`id | FarmID | animal\n 1 | 1 | cat\n 2 | 1 | dog`\nWhen I join my tables in a view, I get a result that looks like this\n`FarmID | ani...
{"title":"How can the last command's wall time be put in the Bash prompt?","tags":["bash","time","prompt"],"question_text":"Is there a way to embed the last command's elapsed wall time in a\nBash\nprompt? I'm hoping for something that would look like this:\n`[last: 0s][\/my\/dir]$ sleep 10\n[last: 10s][\/my\/dir]$`\nBa...
{"title":"Why Integer class caching values in the range -128 to 127?","tags":["java","caching"],"question_text":"Regarding my previous Question,\nConfusion in method Integer.valueOf(String)\n, we know that\n`Integer`\n`class`\nhas a cache which stores values between\n`-128`\nand\n`127`\n.\nJust wondering, why\nbetween ...
{"title":"converting double to integer in java","tags":["java","casting","double","rounding"],"question_text":"In Java, I want to convert a double to an integer, I know if you do this:\n`double x = 1.5;\nint y = (int)x;`\nyou get y=1. If you do this:\n`int y = (int)Math.round(x);`\nYou'll likely get 2. However, I am wo...
{"title":"How to setup a private Git repository on GitHub? Is it even possible?","tags":["git","github"],"question_text":"I intend to share my source code on an invite-only basis to a few dozen users maybe. The source code itself should not be public. Participants are allowed and encouraged to submit their changes. So ...
{"title":"@IBDesignable error: IB Designables: Failed to update auto layout status: Interface Builder Cocoa Touch Tool crashed","tags":["ios","xcode","uistoryboard","ibdesignable","ibinspectable"],"question_text":"I have a very simple subclass of UITextView that adds the \"Placeholder\" functionality that you can find ...
{"title":"Is begin() == end() for any empty() vector?","tags":["c++","stdvector"],"question_text":"I have long assumed that for any empty\n`std::vector`\nV\n,\n`V.begin() == V.end()`\n. Yet I see nothing in the C++ specification that states this to\nalways\nbe true. Is it necessarily true or does it just happen to be t...
{"title":"stop all instances of node.js server","tags":["javascript","windows","node.js","express","port"],"question_text":"This is my first time working with Node.js and I ran into this problem:\nI have started a Node server through the plugin of an IDE. Unfortunately, I cannot use the IDE's terminal. So I tried to ru...
{"title":"How to make a query with group_concat in sql server","tags":["sql-server","sql-server-group-concat"],"question_text":"I know that in sql server we cannot use\n`Group_concat`\nfunction but here is one issue i have in which i need to\n`Group_Concat`\nmy query.I google it found some logic but not able to correct...
{"title":"How do I find which transaction is causing a \"Waiting for table metadata lock\" state?","tags":["mysql"],"question_text":"I am trying to perform some DDL on a table and\n`SHOW PROCESSLIST`\nresults in a \" Waiting for table metadata lock \" message.\nHow can I find out which transaction is not yet closed?\nI...
{"title":"Maven 3 - Worth it?","tags":["maven-3"],"question_text":"Maven 3 beta is out since a couple of weeks and I just want to get your views on the feature list for Maven 3. Because to me, only two major features were added\nParallel execution of of project in the build lifecycle\nCustom lifecycle\nEverything else ...
{"title":"Java JVM profiling, thread status - what does \"Monitor\" status mean?","tags":["java","multithreading","jvm"],"question_text":"I use visualVM connect a multi thread Java application, thread has 4 status, namely running, sleeping, wait, Monitor. What does this Monitoring status mean? What's the difference bet...
{"title":"C++ function argument safety","tags":["c++","c++14"],"question_text":"In a function that takes several arguments of the same type, how can we guarantee that the caller doesn't mess up the ordering?\nFor example\n`void allocate_things(int num_buffers, int pages_per_buffer, int default_value ...`\nand later\n`\...
{"title":"How to list imported modules?","tags":["python"],"question_text":"How to enumerate all imported modules?\nE.g. I would like to get ['os', 'sys'] for from this code\n`import os\nimport sys`","answer_text":"`import sys\nsys.modules.keys()\u00e2\u0080\u008b\u00e2\u0080\u008b\u00e2\u0080\u008b`\nAn approximation ...
{"title":"How is an instance initializer different from a constructor?","tags":["java","instantiation"],"question_text":"In other words, why would you need an instance initializer? What difference or advantage do you have in writing a instance initializer over a constructor?","answer_text":"This seems to explain it wel...
{"title":"How to show SQL queries run in the Rails console?","tags":["ruby-on-rails","activerecord"],"question_text":"When I run queries (e.g.\n`MyModel.where(...)`\nor\n`record.associated_things`\n) in the console, how can I see the actual database queries being run so I can gain more understanding of what is happenin...
{"title":"UIDatePicker - Upon Date Changed","tags":["iphone","objective-c","uidatepicker"],"question_text":"I have just started using UIDatePicker in my iPad app, but is there a way of checking when the date has been changed?\nI want to do something when the date is changed. Hope you can help, thanks.","answer_text":"W...
{"title":"How to get the OS on which PHP is running?","tags":["php","operating-system"],"question_text":"For building a unix\/dos specific script I need to know on which kind of operating system I am.\nHow do i get this information?\n`phpinfo();`\ntells me a lot more and not very clear whether I'm running on unix or no...
{"title":"<ol> with numbers another color","tags":["html","css","colors","html-lists"],"question_text":"`<ol>\n <li>test<\/li>\n <li>test<\/li>\n<\/ol>`\nwill show as:\ntest\ntest\nI want to have numbers coloured and text black!\nI can edit the css, but I do not have access to the HTML.","answer_text":"The\nCSS spec\ng...
{"title":"Time displayed in Logcat","tags":["android","time","android-logcat"],"question_text":"I need to get the Android device timestamp in the format hh:mm:ss:SS. I am able to view the time displayed in the Logcat of Eclipse. Is it the computer's time or is it the Android device's time?","answer_text":"From the\ndoc...
{"title":"Setting up a deployment \/ build \/ CI cycle for PHP projects","tags":["php","continuous-integration","phing","phpundercontrol"],"question_text":"I am a lone developer most of my time, working on a number of big, mainly PHP-based projects. I want to professionalize and automate how changes to the code base ar...
{"title":"Dynamic Sorting within SQL Stored Procedures","tags":["sql","tsql","stored-procedures","sorting"],"question_text":"This is an issue that I've spent hours researching in the past. It seems to me to be something that should have been addressed by modern\nRDBMS\nsolutions but as yet I have not found anything tha...
{"title":"Why is the F# version of this program 6x faster than the Haskell one?","tags":["performance","haskell","f#"],"question_text":"Haskell version(1.03s):\n`module Main where\n import qualified Data.Text as T\n import qualified Data.Text.IO as TIO\n import Control.Monad\n import Control.Applicative ((<$>))\n impor...
{"title":"Defining TypeScript callback type","tags":["types","callback","typescript"],"question_text":"I've got the following class in TypeScript:\n`class CallbackTest\n{\n public myCallback;\n public doWork(): void\n {\n \/\/doing some work...\n this.myCallback(); \/\/calling callback\n }\n}`\nI am using the class lik...
{"title":"Error installing bcrypt with pip on OS X: cant find ffi.h (libffi is installed)","tags":["python","osx","pip","bcrypt","libffi"],"question_text":"I'm getting this error when trying to install bcrypt with pip. I have libffi installed in a couple places (the Xcode OS X SDK, and from homebrew), but I don't know ...
{"title":"How to apply a logical operator to all elements in a python list","tags":["python"],"question_text":"I have a list of booleans in python. I want to AND (or OR or NOT) them and get the result. The following code works but is not very pythonic.\n`def apply_and(alist):\n if len(alist) > 1:\n return alist[0] and ...
{"title":"Why would you use an assignment in a condition?","tags":["variable-assignment","condition"],"question_text":"In many languages assignments are legal in conditions. I never understood the reason behind this. Why would you write:\n`if (var1 = var2) {\n ...\n}`\ninstead of:\n`var1 = var2;\nif (var1) {\n ...\n}`"...
{"title":"Implicit Type cast in C#","tags":["c#"],"question_text":"I have a question about the implicit type conversion\nWhy does this implicit type conversion work in C#? I've learned that implicit code usually don't work.\nI have a code sample here about implicit type conversion\n`char c = 'a';\n int x = c;\n int n =...
{"title":"Why isn't this 'for' loop valid?","tags":["c++","arrays","c++11"],"question_text":"Consider:\n`int ia[3][4];\nfor (auto row : ia)\n for (auto col : row)`\nThe first\n`for`\niterates through ia, whose elements are arrays of size 4.\nBecause\n`row`\nis not a reference, when the compiler initializes\n`row`\nit w...
{"title":"When to catch java.lang.Error?","tags":["java","exception","error-handling","exception-handling"],"question_text":"In what situations should one catch\n`java.lang.Error`\non an application?","answer_text":"Generally, never.\nHowever, sometimes you need to catch specific Errors.\nIf you're writing framework-is...
{"title":"Are empty HTML5 data attributes valid?","tags":["html5","custom-data-attribute","html5-data"],"question_text":"I'd like to write a simple jQuery plugin that displays inline modals under specified elements. My idea is for the script to auto-init based on data attributes specified on elements.\nA very basic exa...
{"title":"Attach debugger to IOS app after launch","tags":["ios","xcode","debugging"],"question_text":"I have an issue I am troubleshooting which occurs very infrequently and doesn't seem to happen when I have things running under Xcode.\nIs it possible to run an app normally (i.e. from Springboard) until my issue occu...
{"title":"Compiling Qt 4.8.x for Visual Studio 2012","tags":["c++","qt","visual-studio-2012"],"question_text":"What steps should I take to compile Qt (version 4.8.x) for Visual Studio 2012?\nI already carefully followed the instructions in the accepted answer of\nthis question\n(which is for VS 2010), but WebKit module...
{"title":"How to set fixed background position from right side in css?","tags":["css"],"question_text":"In this case\n`li {background: url(\"..\/img\/grey-arrow-next.png\") no-repeat right center;\n border-bottom: 1px solid #D4E8EB}`\nI want\n`20px`\nspace in right side before to background image and I can't give margi...
{"title":"How to make <div> fill <td> height","tags":["html","css","html-table"],"question_text":"This question's answer needs an update, since browsers have changed\nOriginal question\nI've looked through several posts on StackOverflow, but haven't been able to find an answer to this rather simple question.\nI have an...
{"title":"How do I put different types in a dictionary in the Swift Language?","tags":["swift","dictionary"],"question_text":"Swift only allows a dictionary to contain a single type.\nHere's the definition that is taken from the Swift book:\nA dictionary is a container that stores multiple values of the same type\n[......
{"title":"How to disable the gridview rows border","tags":["asp.net"],"question_text":"Can we disable the gridview horizontal line ? I want to display grid without horizontal lines\nhelp me thank you.","answer_text":"Set\n`GridLines=\"None\"`\non your\n`GridView`","question_code":[],"answer_code":[],"retrieval_text":"\...
{"title":"A call to PInvoke function '[...]' has unbalanced the stack","tags":["c#","c++","pinvoke","unmanaged","managed"],"question_text":"I'm getting this weird error on some stuff I've been using for quite a while. It may be a new thing in Visual Studio 2010 but I'm not sure.\nI'm trying to call a unamanged function...
{"title":"find the most frequent number in a numpy vector","tags":["python","numpy"],"question_text":"Suppose I have the following:\n`a = [1,2,3,1,2,1,1,1,3,2,2,1]`\nHow to find the most frequent number in this list in a neat way?","answer_text":"If your list contains all non-negative ints, you should take a look at nu...
{"title":"Does Android support JDK 6 or 7","tags":["android","java-7","jdk6"],"question_text":"I am new to Android development. Can I use my existing Java code developed using JDK 7 in Android?\nThe functions use xerces dom and xslt and xpathapi. Currently when I installed Android Eclipse ADT environment these function...
{"title":"What is a Java String's default initial value?","tags":["java","string"],"question_text":"Consider a Java String Field named\n`x`\n.\nWhat will be the initial value of\n`x`\nwhen an object is created for the class x;\nI know that for\n`int`\nvariables, the default value is assigned as\n`0`\n, as the instances...
{"title":"Determine if current PowerShell Process is 32-bit or 64-bit?","tags":["scripting","powershell","64bit","32-bit"],"question_text":"When running a PowerShell script on a x64-bit OS platform, how can you determine\nin the script\nwhat version of PowerShell (32-bit or 64-bit) the script is running on?\nBackground...
{"title":"Scheduled run of stored procedure on SQL server","tags":["sql-server","tsql"],"question_text":"Is it possible to set up somehow Microsoft SQL Server to run a stored procedure on regular basis?","answer_text":"Yes, in MS SQL Server, you can create scheduled jobs. In SQL Management Studio, navigate to the serve...
{"title":"Fast performing and thread safe observable collection","tags":["wpf","thread-safety","observablecollection","icollectionview"],"question_text":"`ObservableCollection`\ns raise notifications for each action performed on them. Firstly they dont have bulk add or remove calls, secondly they are not thread safe.\n...
{"title":"Multiple WHERE Clauses with LINQ extension methods","tags":["c#","linq"],"question_text":"I have a LINQ query that looks like the following:\n`DateTime today = DateTime.UtcNow;\nvar results = from order in context.Orders\n where ((order.OrderDate <= today) && (today <= order.OrderDate))\n select order;`\nI am...
{"title":"How to handle floats and decimal separators with html5 input type number","tags":["javascript","jquery","mobile","floating-point","html-input"],"question_text":"Im building web app which is mainly for mobile browsers. Im using input fields with number type, so (most) mobile browsers invokes only number keyboa...
{"title":"Free space in a CMD shell","tags":["windows","cmd"],"question_text":"Is there a way to get the amount of free diskspace of a disk or a folder in a CMD\nwithout having to install some thirdparty applications?\nI have a CMD that copies a big file to a given directory and could of course use\nthe errorlevel retu...
{"title":"Is there a compiler hint for GCC to force branch prediction to always go a certain way?","tags":["c++","gcc","intel","pragma","branch-prediction"],"question_text":"For the Intel architectures, is there a way to instruct the GCC compiler to generate code that always forces branch prediction a particular way in...
{"title":"iPhone: Convert date string to a relative time stamp","tags":["iphone","objective-c","cocoa","datetime","time"],"question_text":"I've got a timestamp as a string like:\nThu, 21 May 09 19:10:09 -0700\nand I'd like to convert it to a relative time stamp like '20 minutes ago' or '3 days ago'.\nWhat's the best wa...
{"title":"UICollectionView cell subviews do not resize","tags":["ios","size","cell","subview","uicollectionview"],"question_text":"In a CollectionView, some cells should have an additional subview or layer. The CollectionView can be told to resize it's cells, thus all content needs to resize appropriately.\nCurrently, ...
{"title":"Android Alternate row Colors in ListView","tags":["android","listview"],"question_text":"`public class ListView extends ListActivity {\nstatic String item;\npublic void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,\n android.R.layout.simple...
{"title":"Efficient Python Daemon","tags":["python","daemon"],"question_text":"I was curious how you can run a python script in the background, repeating a task every 60 seconds. I know you can put something in the background using &, is that effeictive for this case?\nI was thinking of doing a loop, having it wait 60s...
{"title":"C# ListView Column Width Auto","tags":["c#",".net","winforms","listview","width"],"question_text":"How can I set the column width of a c# winforms\n`listview`\ncontrol to auto. Something like width = -1 \/ -2 ?","answer_text":"You gave the answer: -2 will autosize the column to the length of the text in the c...
{"title":"Memory leaks with custom font for set custom font","tags":["android","android-layout","android-intent","android-emulator","android-listview"],"question_text":"The following code for setting custom fonts slows down my whole app. how do i modify it to avoid memory leaks and increase the speed and manage memory ...
{"title":"dompdf fails to load","tags":["php","pdf","include","dompdf"],"question_text":"I am trying to get dompdf running on an in-house server. With the default config.inc.php settings, I get the following when running the equivalent of the demo 'Hello Wolrd' script:\n`Warning: require_once(\/var\/www\/dompdf-master\...
{"title":"Change position of Google Maps API's \"My location\" button","tags":["java","android","google-maps-android-api-2","android-maps-v2"],"question_text":"I am using the Google Maps Android API v2, and I need a way to chance the position of the \"My Location\" button.\nI get the \"My Location\" button like this:\n...
{"title":"Creating breakpoint in Xcode for unrecognized selector","tags":["objective-c","cocoa","debugging","xcode4","breakpoints"],"question_text":"Is it possible to set the breakpoint in Xcode to have the debugger stop\nonly\non unrecognized selector?\nI have other exceptions that are triggering, and I only want to t...
{"title":"cucumber vs. RSpec","tags":["ruby-on-rails","rspec","cucumber"],"question_text":"I want to start diving into BDD. I have never used TDD before and am\nnot sure if I should start by learning RSpec and then jump to Cucumber\nor just go straight to using Cucumber.\nI have been reading on the internet about both ...
{"title":"Django not sending emails to admins","tags":["python","django"],"question_text":"According to the\ndocumentation\n, if\n`DEBUG`\nis set to\n`False`\nand something is provided under the\n`ADMINS`\nsetting, Django will send an email whenever the code raises a 500 status code. I have the email settings filled ou...
{"title":"Datatable vs Dataset","tags":["c#","dataset","datatable"],"question_text":"I currently use a DataTable to get results from a database which I can use in my code.\nHowever, many example on the web show using a DataSet instead and accessing the table(s) through the collections method.\nIs there any advantage, p...
{"title":"Why is std::map implemented as a red-black tree?","tags":["c++","dictionary","data-structures","stl","binary-search-tree"],"question_text":"Why is std::map implemented as a\nred-black tree\n?\nThere are several balanced\nbinary search trees\n(BSTs) out there. What were design trade-offs in choosing a red-blac...
{"title":"UIPageViewController: return the current visible view","tags":["iphone","ios","uipageviewcontroller"],"question_text":"How do you know what is the current page\/view displayed inside an\n`UIPageViewController`\n?\nI have overridden the\n`viewDidAppear`\nmethod of my child views, so that they send an id to the...
{"title":"How to get \"printf\" messages written in NDK application?","tags":["android","c","android-ndk","jni","logging"],"question_text":"if i am defining such function in java file\n`\/** \n * Adds two integers, returning their sum\n *\/\n public native int add( int v1, int v2 );`\nso i need to code in c file\n`JNIE...
{"title":"\"Native typeface cannot be made\" only for some people","tags":["android","fonts","typeface"],"question_text":"I have an app that changes the font typeface for some elements. It works well for most of the people, but maybe a 0.5% get an exception when trying to change the font. The significant part of the st...
{"title":"Buiding Hadoop with Eclipse \/ Maven - Missing artifact jdk.tools:jdk.tools:jar:1.6","tags":["java","maven","maven-2","hadoop","cloudera"],"question_text":"I am trying to import cloudera's\norg.apache.hadoop:hadoop-client:2.0.0-cdh4.0.0\nfrom cdh4 maven repo\nin a maven project in eclipse 3.81, m2e plugin, wi...
{"title":"Change font of UINavigationController title","tags":["iphone","fonts","sdk","uinavigationcontroller","title"],"question_text":"Can I change the font of my UINavigationController? -->\ntitle","answer_text":"As of iOS 5 you can change the font via the appearance proxy.\nhttp:\/\/developer.apple.com\/library\/io...
{"title":"Common programming mistakes for Clojure developers to avoid","tags":["clojure"],"question_text":"What are some common mistakes made by Clojure developers, and how can we avoid them?\nFor example; newcomers to Clojure think that the\n`contains?`\nfunction works the same as\n`java.util.Collection#contains`\n. H...
{"title":"A Base Class pointer can point to a derived class object. Why is the vice-versa not true?","tags":["c++"],"question_text":"A Base Class pointer can point to a derived class object. Why is the vice-versa not true without casting?\nLogically a base class would not have enough information of the derived class bu...
{"title":"opengl: glFlush() vs. glFinish()","tags":["c++","c","opengl"],"question_text":"I'm having trouble distinguishing the practical difference between calling glFlush() and glFinish().\nThe docs say that glFlush() and glFinish() will push all buffered operations to opengl so that one can be assured they will all b...
{"title":"What is console.log in jQuery?","tags":["javascript","jquery"],"question_text":"Possible Duplicate:\nWhat is the console.log used for in jQuery?\nWhat is\n`console.log`\n? What is it used for in jQuery?","answer_text":"jQuery and\n`console.log`\nare unrelated entities, although useful when used together.\nIf ...
{"title":"Best way for retrieving single record results in LINQ to SQL","tags":["linq","linq-to-sql"],"question_text":"If I query a table with a condition on the key field as in:\n`var user = from u in dc.Users\n where u.UserName == usn\n select u;`\nI know that I will either get zero results or one result. Should I st...
{"title":"What is the aspnet_client folder for under the IIS structure?","tags":["iis"],"question_text":"I notice that there's frequently an aspnet_client folder under the standard IIS web folder structure. What is this used for? Is it needed?","answer_text":"In the .NET 1.1 days and before, this folder provided ASP.NE...
{"title":"How does the (function() {})() construct work and why do people use it?","tags":["javascript"],"question_text":"`(function() {})()`\nand its jQuery-specific cousin\n`(function($) {})(jQuery)`\npop up all the time in Javascript code.\nHow do these constructs work, and what problems do they solve?\nExamples app...
{"title":"Keeping it simple and how to do multiple CTE in a query","tags":["sql-server","tsql","common-table-expression"],"question_text":"I have this simple T-SQL query, it emits a bunch of columns from a table and also joins information from other\nrelated\ntables.\nMy data model is simple. I have a scheduled event, ...
{"title":"iPhone\/iPad: Save (Private) Application Settings?","tags":["iphone","ios","ipad","settings"],"question_text":"I'm aware of\n`NSUserDefaults`\nfor saving\/restoring user preferences. What is the equivalent class for an application? For example, a 'last run' field, or 'don't show this prompt again'. My intenti...
{"title":"MVVM Light RelayCommand Parameters","tags":["c#","wpf","mvvm-light","relaycommand"],"question_text":"I'm having an issue with passing a parameter to a relaycommand using the GalaSoft MVVM Light framework. I know that mvvm light's implementation of relaycommand doesn't use lambda parameters, so I did some rese...