text
stringlengths
74
309k
{"title":"downloading jackson.codehaus.org jar","tags":["json","jar","jackson"],"question_text":"I need to download a json parser so I go to the\njackson.codehaus.org\nwebsite. Instead of a convenient link to click and download the jar\/jars, they have me going in circles. Does anyone know where the jars are -- exactly...
{"title":"Understanding Android's webview addjavascriptinterface","tags":["java","javascript","android","webview"],"question_text":"I know that to interact from Javascript to Java you have to inject a Java object using the addjavascriptInterface method in webview.\nHere is the problem I am facing.\nI register a java ob...
{"title":"Change selected and unfocused Listbox style to not be grayed out","tags":[".net","wpf","listbox"],"question_text":"I have a really simple WPF ListBox with SelectionMode set to Multiple.\n`<ListBox SelectionMode=\"Multiple\" \/>`\nWhen the ListBox loses focus it's really hard to tell what's been selected becau...
{"title":"Entity Framework auto incrementing field, that isnt the Id","tags":["entity-framework","ef-code-first","code-first"],"question_text":"I know this isnt the most ideal solution, but I need to add an auto incrementing field to one of my EF Code First objects. This column id NOT the Id, which is a guid.\nIs there...
{"title":"Objective-C and use of SEL\/IMP","tags":["objective-c"],"question_text":"Another question of mine about\noptimizing Objective C programs\ninspired the following: does anyone have a short example using SEL and IMP when theMethod has two (or more) integers for input?","answer_text":"Here's a\ngood tutorial\nfor...
{"title":"What does 'u' mean in a list?","tags":["python","string","unicode"],"question_text":"This is the first time I've came across this. Just printed a list and each element seems to have a\n`u`\nin front of it i.e.\n`[u'hello', u'hi', u'hey']`\nWhat does it mean and why would a list have this in front of each elem...
{"title":"gdb split view with code","tags":["gdb"],"question_text":"I was just debugging a program in gdb and somehow I found a new feature I've never seen or even heard of before, a split view where I can see and browse the code in addition to giving commands:\nWhat is this? What did I do, or, more specifically, how c...
{"title":"how to convert Image to Data URI for Html with C#?","tags":["c#","html"],"question_text":"I need convert image to Data URL (embedding Image) in the Win-application for HTML and I need \nData URL (embedding Image) to image.","answer_text":"`public static string GetDataURL(string imgFile)\n {\n return \"<img sr...
{"title":"Best practice for using window.onload","tags":["javascript","joomla","joomla1.5","onload"],"question_text":"I develop Joomla websites\/components\/modules and plugins and every so often I require the ability to use JavaScript that triggers an event when the page is loaded. Most of the time this is done using ...
{"title":"Resource interpreted as image but transferred with MIME type text\/html - Magento","tags":["php","magento"],"question_text":"I'm getting below error when uploading a new product image for my Magento shop.\n`Resource interpreted as image but transferred with MIME type text\/html`\nIs there a reason why this is...
{"title":"How can I set UIPickerView at other than the default index?","tags":["ios","uipickerview"],"question_text":"I have an integer having value of 5 and I want to start my UIPickerView with this index, now what should I do?\nnormally UIPickerView is on default 0 index row, but I want it on index which is user defi...
{"title":"Ruby on Rails - Access controller variable from model","tags":["ruby-on-rails","ruby","model","instance"],"question_text":"I am trying to access an instance variable which is set in the controller in the model. The controller is the products controller and the model is the products model. The instance variabl...
{"title":"Can anyone explain servlet mapping?","tags":["java","java-ee","servlets","spring-mvc","web.xml"],"question_text":"I'm trying to write a web application using SpringMVC. Normally I'd just map some made-up file extension to Spring's front controller and live happily, but this time I'm going for REST-like URLs, ...
{"title":"How to detect IE7 and IE8 using jQuery.support","tags":["jquery","internet-explorer","cross-browser"],"question_text":"How can I detect IE 7 and IE 8 using\njQuery.support\nproperties?\nIs it possible to detect the browser versions using jQuery.support or just those blah blah blah browser features?","answer_t...
{"title":"sql - insert into multiple tables in one query","tags":["sql","mysql","multiple-tables","insert-into"],"question_text":"assuming that i have two tables,\n`names`\nand\n`phones`\nand i want to insert data from some input to the tables, in one query- How can it be done?\nPlease, if it can be done, explain the s...
{"title":"Java Collections (LIFO Structure)","tags":["java","collections","stack","queue"],"question_text":"I am looking in the Collections framework of Java for a LIFO Structure (Stack) without any success. Basically I want a really simple stack; my perfect option would be a Deque, but I am in Java 1.5.\nI would like ...
{"title":"Writing C++ modules for node.js","tags":["javascript","c++","node.js","socket.io"],"question_text":"Can anyone can give me a very small framework example of how to impliment a c++ module in node.js?","answer_text":"The repository at\nhttps:\/\/github.com\/kkaefer\/node-cpp-modules\ncontains many small example...
{"title":"Simple bubble sort c#","tags":["c#","arrays","sorting","bubble-sort"],"question_text":"`int[] arr = {800,11,50,771,649,770,240, 9};\nint temp = 0;\nfor (int write = 0; write < arr.Length; write++)\n{\n for (int sort = 0; sort < arr.Length - 1; sort++)\n {\n if (arr[sort] > arr[sort + 1])\n {\n temp = arr[sort...
{"title":"What is the WCF equivalent of HttpContext.Current.Request.RawUrl?","tags":["wcf","url-rewriting","httpcontext","operationcontext","weboperationcontext"],"question_text":"I've got some RESTful services running in a pure WCF context (i.e. ASP.NET compatibility is not enabled, and thus there is no\n`HttpContext....
{"title":"Exposing inner Control properties for binding in WPF","tags":["wpf","binding","user-controls","combobox"],"question_text":"[Edit]: I figured out how to do this on my own. I posted my solution in the hope that it will save someone else a few days of googling. If you are a WPF guru, please look at my solution a...
{"title":"Turn off IDENTITY_INSERT for Dataset insert","tags":["sql-server","dataset","uniqueidentifier"],"question_text":"I am using a dataset to insert data being converted from an older database. The requirement is to maintain the current Order_ID numbers.\nI've tried using:\n`SET IDENTITY_INSERT orders ON;`\nThis w...
{"title":"Android: Error upload image in different android versions","tags":["java","android","web-services"],"question_text":"I am having problem with upload image in different android versions. I need to send images for php server, so i'm using a webservice. I did test with the versions Froyo e Jelly Beans, they work...
{"title":"compile Ruby 2.0 errors without rvm or rbenv , `readline.c:1886:26: error: 'Function' undeclared (first use in this function)`","tags":["ruby","ubuntu-12.04","ubuntu-14.04"],"question_text":"I want to install gitlab, which don't recommend to use any ruby version manager.\nBut\nThis is my OS\n`Linux dqa-dev 3....
{"title":"double negation in C : is it guaranteed to return 0\/1?","tags":["c","standards"],"question_text":"Is\n`!!(x)`\nguaranteed by the standard to return 0\/1?\nNote that I am\nnot\nasking about c++, where a bool type is defined.","answer_text":"Yes, in C99, see \u00c2\u00a76.5.3.3\/4:\nThe result of the logical n...
{"title":"Can Haskell be used to write shell scripts?","tags":["linux","shell","unix","haskell"],"question_text":"Is it possible to write shell scripts in Haskell and if so, how do you do it? Just changing the interpreter like so?\n`#!\/bin\/ghci`","answer_text":"Using\n`ghci`\nwill just load the module in GHCi. To run...
{"title":"How to escape double quotes in as a parameter to an NUnit TestCase?","tags":["vb.net","nunit","escaping","testcase","double-quotes"],"question_text":"I tried writing the following TestCase for an NUnit test written in VB.net:\n`<TestCase(\"FirstNode\", \"<node id=\\\"FirstNode\\\">\")>\nPublic Sub GetNode_Giv...
{"title":"Exception when deploying to IIS: Login failed for user 'IIS APPPOOL\\DefaultAppPool'","tags":["wcf",".net-4.0"],"question_text":"I'm working through some WCF examples in \"Windows Communication Foundation 4 Step By Step\". My resulting application runs fine as long as the service is hosted in casini. It fails...
{"title":"Rake mysql2 \"unknown database\" error","tags":["rake","mysql2"],"question_text":"I'm following instructions from a hand-over package from a previous group. I don't know too much about rails or mysql2. I am on Windows.\nWhen I do:\n`rake db:migrate RAILS_ENV=production`\nThis is the output:\n`C:\\jcccf-goslow...
{"title":"Twitter Bootstrap: Print content of modal window","tags":["javascript","printing","twitter-bootstrap","modal-dialog"],"question_text":"I'm developing a site using Bootstrap which has 28 modal windows with information on different products. I want to be able to print the information in an open modal window. Ea...
{"title":"Looping over elements in jQuery","tags":["javascript","jquery"],"question_text":"I want to loop over the elements of an HTML form, and store the values of the <input> fields in an object. The following code doesn't work, though:\n`function config() {\n $(\"#frmMain\").children().map(function() {\n var child =...
{"title":"How do YOU reduce compile time, and linking time for Visual C++ projects (native C++)?","tags":["c++","visual-c++","compilation"],"question_text":"How do YOU reduce compile time, and linking time for VC++ projects (native C++)?\nPlease specify if each suggestion applies to debug, release, or both.","answer_te...
{"title":"Why \"extends\" precedes \"implements\" in class declaration","tags":["java","extends","implements"],"question_text":"Why implements must always be written after extends in class declaration for example:\n`public class Register extends ActionSupport implements ModelDriven`\nWhy not\n`public class Register imp...
{"title":"HTML image bottom alignment inside DIV container","tags":["html","css","image","alignment","spacing"],"question_text":"I have a div tag with a fixed height. Most of the images have the same height and width.\nI want to align the images at the bottom of the div so that they are nicely arranged. Here is what I ...
{"title":"Get a list of available Content Providers","tags":["android"],"question_text":"Is there a way to programmatically list all available\ncontent providers\non a device? No real use case, I just thought it might be neat to see what apps I have installed on my phone that have exposed content providers.","answer_te...
{"title":"Allowed characters in filename","tags":["special-characters","filenames"],"question_text":"Where can I find a list of allowed characters in filenames, depending on the operating system?\n(e.g. on Linux, the character ':' is allowed in filenames, but not on Windows)","answer_text":"You could start with the\nWi...
{"title":"Menu path in Pathauto","tags":["drupal","drupal-7","pathauto","url-design"],"question_text":"How do I get pathauto under Drupal 7 to generate a URL alias by the full menu path?","answer_text":"Just an update in case anyone comes across this with a more recent version of Pathauto\/Token. This worked for me:\n[...
{"title":"Python xticks in subplots","tags":["python","matplotlib","imshow"],"question_text":"If I plot a single imshow plot I can use\n`fig, ax = plt.subplots()\nax.imshow(data)\nplt.xticks( [4, 14, 24], [5, 15, 25] )`\nto replace my xtick labels.\nNow, I am plotting 12 imshow plots using\n`f, axarr = plt.subplots(4, ...
{"title":"Select distinct by two properties in a list","tags":["c#","list","distinct","linq-to-objects"],"question_text":"I have a\n`list<message>`\nthat contains properties of type\n`Guid`\nand\n`DateTime`\n(as well as other properties). I would like to get rid of all of the items in that list where the\n`Guid`\nand\n...
{"title":"Required attribute 'pageBaseType' not found - YSOD when launching my MVC 3 application","tags":["asp.net-mvc","asp.net-mvc-3"],"question_text":"since this morning I keep getting this error when trying to launch my MVC 3 application:\n`Required attribute 'pageBaseType' not found.`\nGoogle did not reveal much u...
{"title":"How do I peek at the first two bytes in an InputStream?","tags":["java","inputstream","bufferedinputstream"],"question_text":"Should be pretty simple: I have an InputStream where I want to peek at (not read) the first two bytes, i.e. I want the \"current position\" of the InputStream to stil be at 0 after my ...
{"title":"Marionette ItemView how to re-render model on change","tags":["backbone.js","marionette"],"question_text":"I'm using Handlebars template engine.\nso, I have Model:\n`Backbone.Model.extend({\n urlRoot: Config.urls.getClient,\n defaults: {\n contract:\"\",\n contractDate:\"\",\n companyTitle:\"\",\n contacts:[]...
{"title":"GWT RPC data format","tags":["gwt","protocols","rpc"],"question_text":"How does the data format for Google Web Toolkits (GWT) RPC calls look and how are IsSerializable objects transmitted. I know that Java Serializable transmits some kind of binary format, but is this the case with GWT too? (Since I don't exp...
{"title":"Get the list of stored procedures created and \/ or modified on a particular date?","tags":["sql","sql-server","sql-server-2008","sql-server-2005"],"question_text":"I want to find which stored procedure I've created and also I want to find which stored procedure I've modified in my SQL Server on a particular ...
{"title":"Shelve Pending Changes in Team Foundation server","tags":["tfs","codeplex"],"question_text":"I am new to Team Foundation Server, so i was wondering what does \"Shelve Pending Changes\" does in Team foundation server. I am using TFS of project on Codeplex.","answer_text":"Shelve Pending Changes stores your cod...
{"title":"Why do we use rt.jar in a java project?","tags":["java"],"question_text":"What is the necessity of rt.jar ??","answer_text":"It contains all the classes provided in the Java Runtime Environment.\nIf you don't have it on your classpath you will not have access to any of those classes you need to use like java....
{"title":"Implementing a splash screen in iOS","tags":["objective-c","ios","splash-screen","multiple-views"],"question_text":"I'm quite a newbie in Cocoa, Objective-C and iOS development.\nI'd like to implement a View that is just a splash screen and only last for a short time before routing to the main view. Do you ha...
{"title":"Getting windbg without the whole WDK?","tags":["windbg"],"question_text":"Does anyone know how to get ahold of windbg without having to download the entire 620MB WDK ISO?\nAll I can find on the net to download the debugger is this link, which says you have to get the whole WDK:\nhttp:\/\/www.microsoft.com\/wh...
{"title":"How do I do indexOfObject or a proper containsObject","tags":["ios","arrays","swift"],"question_text":"With an array: How do I do\n`indexOfObject`\nor a proper\n`containsObject`\n?\nI mean I know I could just bridge the Array to\n`NSArray`\nand do it there ^^\nBut there must be a 'native' way of doing this\nP...
{"title":"How to generically format a boolean to a Yes\/No string?","tags":["c#","formatting","coding-style","string-formatting"],"question_text":"I would like to display Yes\/No in different languages according to some boolean variable.\nIs there a generic way to format it according to the locale passed to it?\nIf the...
{"title":"How to return a resolved promise from an AngularJS Service using $q?","tags":["javascript","angularjs","promise","angular-promise"],"question_text":"My service is:\n`myApp.service('userService', [\n '$http', '$q', '$rootScope', '$location', function($http, $q, $rootScope, $location) {\n var deferred;\n deferr...
{"title":"Concatenate one NSMutableArray to the end of another NSMutableArray","tags":["objective-c","cocoa","osx"],"question_text":"A simple answer to this super simple question would be great! Here is the pseudcode:\n`NSMutableArray Africa = [Lion, Tiger, Zebra];\nNSMutableArray Canada = [Polar Bear, Beaver , Loon];\...
{"title":"Algorithm to generate anagrams","tags":["algorithm","language-agnostic","puzzle"],"question_text":"What would be the best strategy to generate anagrams.\n`An anagram is a type of word play, the result of rearranging the letters\nof a word or phrase to produce a new word or phrase, using all the original\nlett...
{"title":"How dangerous is it in JavaScript, really, to assume undefined is not overwritten?","tags":["javascript","undefined"],"question_text":"Every time anyone mentions testing against\n`undefined`\n,\nit's pointed out\nthat\n`undefined`\nis not a keyword so\nit could be set to\n`\"hello\"`\n, so\nyou should use\n`t...
{"title":"Does Msbuild recognise any build configurations other than DEBUG|RELEASE","tags":["visual-studio-2005","msbuild"],"question_text":"I created a configuration named Test via Visual Studio which currently just takes all of DEBUG settings, however I employ compiler conditions to determine some specific actions if...
{"title":"Stack level too deep when using carrierwave versions","tags":["ruby-on-rails","ruby","carrierwave","sidekiq"],"question_text":"I'm trying to use a\nsidekiq worker\n, which more or less saves a image file to database (using carrierwave). There are few files to save, which are a keyframes extracted from a video...
{"title":"The use of map or grep in Perl","tags":["perl"],"question_text":"I've been writing perl code full-time for a couple months now(bioinformatics), and am always trying to improve my skills. Just today, it dawned on me that I never use map or grep. Looking back through my code I realize these tools could save me ...
{"title":"How to ensure a timestamp is always unique?","tags":["c#",".net","datetime","concurrency"],"question_text":"I'm using timestamps to temporally order concurrent changes in my program, and require that each timestamp of a change be unique. However, I've discovered that simply calling\n`DateTime.Now`\nis insuffi...
{"title":"jQuery :FadeOut not working with table Rows","tags":["jquery","fadeout"],"question_text":"I have the following HTML table is rendered to my browser.I am creating this table from my ASP.NET codebehind file.\n`<table Class=\"tblTradeInCart\">\n <tr class=\"tblCartHeader\">\n <td>Item<\/td>\n <td>Model<\/td>\n <...
{"title":"PHP: Get the Latest File Addition in a Directory","tags":["php"],"question_text":"How to get the latest file name, or the file path that is added into a directory?","answer_text":"`$path = \"\/path\/to\/my\/dir\"; \n$latest_ctime = 0;\n$latest_filename = ''; \n$d = dir($path);\nwhile (false !== ($entry = $d->...
{"title":"Python: Is it possible to make a class iterable using the standard syntax?","tags":["python","syntax","attributes","static-methods","loops"],"question_text":"I have inherited a project with many large classes constituent of nothing but class objects (integers, strings, etc). I'd like to be able to check if an...
{"title":"jQuery, find if element has any text","tags":["jquery","text"],"question_text":"I am dealing with some generated spans and I would like to find which one of them does not contain any text.\nThe markup is:\n`<span id=\"layer6\">\n <span class=\"drag col\"> Some text<\/span>\n <span class=\"drag col\"> More tex...
{"title":"Is there 'byte' data type in C++?","tags":["c++"],"question_text":"If exists is there header file to include?\nThis code give compilation error:\n`#include <iostream>\nusing namespace std;\nint main()\n{\n byte b = 2;\n cout << b << endl;\n return 0;\n}`","answer_text":"No, there is no type called \"\n`byte`\...
{"title":"failed to delete buffer. No buffer to delete","tags":["php","codeigniter","phpexcel"],"question_text":"I am trying to generate an excel file with the extension .xlsx from the code below. I am able to download the file very well but when I open it with excel sheet, I receive the following warning error .. Exce...
{"title":"WCF Datacontract, some fields do not deserialize","tags":["wcf","datacontractserializer"],"question_text":"Problem:\nI have a WCF service setup to be an endpoint for a call from an external system. The call is sending plain xml. I am testing the system by sending calls into the service from Fiddler using the ...
{"title":"If an Int can't be null, what does null.asInstanceOf[Int] mean?","tags":["scala",null],"question_text":"As a test, I wrote this code:\n`object Ambig extends App {\n def f( x:Int ) { println(\"Int\" ) }\n def f( x:String ) { println(\"String\") }\n f( null.asInstanceOf[Int ] )\n f( null.asInstanceOf[String] )\...
{"title":"Why is width: 100% not working on div {display: table-cell}?","tags":["html","css","vertical-alignment","flexslider","css-tables"],"question_text":"I'm trying to vertically and horizontally center some content overlaying an image slide (flexslider). There were some similar questions to this one, but I couldn'...
{"title":"How to handle add to list event?","tags":["c#","events","list","event-handling"],"question_text":"I have a list like this:\n`List<Controls> list = new List<Controls>`\nHow to handle adding new position to this list?\nWhen I do:\n`myObject.myList.Add(new Control());`\nI would like to do something like this in ...
{"title":"Why is Visual Studio constantly crashing?","tags":["visual-studio","version-control","crash","visual-sourcesafe"],"question_text":"Visual Studio randomly crashes when adding\/removing references and projects.\nAny thoughts why? Will installing Sp1 help?\nEDIT: I do not work with any addons except SourceSafe. ...
{"title":"How can I reseed an identity column in a T-SQL table variable?","tags":["sql-server","tsql","table-variable"],"question_text":"I have a T-SQL\ntable variable\n(not a table) which has an auto incrementing identity column. I want to clear all data from this variable and reset the identity column value to 1. How...
{"title":"Android mkdir not making folder","tags":["android","mkdir"],"question_text":"Tonight I am currently having issues doing something that I thought would be simple... making a folder in \/mnt\/sdcard.\nI have set the follow permission:\n`<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"...
{"title":"Storing datetime as UTC in PHP\/MySQL","tags":["php","mysql","timezone"],"question_text":"Everywhere I read about converting time to a user's timezone says that the best method is to store a date and time in UTC then just add the user's timezone offset to this time.\nHow can I store a date in UTC time? I use ...
{"title":"Is this the best way in C# to convert a delimited string to an int array?","tags":["c#","string"],"question_text":"Given the string below:\n`string str = \"1,2,3\";`\nWill this be the best extension to convert it to an\n`int`\narray?\n`static class StringExtensions\n{\n public static int[] ToIntArray(this str...
{"title":"Extending singletons in PHP","tags":["php","inheritance","singleton","anti-patterns"],"question_text":"I'm working in a web app framework, and part of it consists of a number of services, all implemented as singletons. They all extend a Service class, where the singleton behaviour is implemented, looking some...
{"title":"XmlSerializer List Item Element Name","tags":["c#","xmlserializer"],"question_text":"I have a class\n`PersonList`\n`[XmlRoot(\"Persons\")]\nPersonList : List<Human>`\nwhen I serialize this to XML, by default it will produce something like this:\n`<Persons>\n <Human>...<\/Human>\n <Human>...<\/Human>\n<\/Perso...
{"title":"CSS3 Keyframe Animations: End and stay on the last frame","tags":["javascript","css","css3","animation","less"],"question_text":"I've run into some difficulty trying to play a CSS3 keyframe animation and have the relevant element stick at the last frame after the animation has completed. To my understanding, ...
{"title":"Skip the headers in PreferenceActivity when there's only one header","tags":["android","preferenceactivity"],"question_text":"I added preference-headers to my app so that the preference screen would not look broken on Honeycomb and tablet sized ICS. However, I only have one header at the moment so you have to...
{"title":"Deleting the current session with Rack::Session::Cookie","tags":["ruby","session","sinatra","rack"],"question_text":"I feel like I'm missing something obvious here, and I'm hoping that as soon as I post this someone will shame me with the google search link I was missing :-)\n`enable :sessions\nget '\/logout'...
{"title":"onPostExecute not being called in AsyncTask (Handler runtime exception)","tags":["android","android-asynctask","alarmmanager"],"question_text":"I have an\n`AsyncTask`\nthat fetches some data and then updates the UI with this new data. It has been working fine for months, but I recently added a feature that di...
{"title":"Is there a way to use ON DUPLICATE KEY to Update all that I wanted to insert?","tags":["mysql","insert","on-duplicate-key"],"question_text":"I know that you can use\n`ON DUPLICATE KEY UPDATE`\nto update a certain value if there is a record for that key already,\nI can do this:\n`INSERT INTO `tableName` (`a`,`...
{"title":"Write a program that will print \"C\" if compiled as an (ANSI) C program, and \"C++\" if compiled as a C++ program","tags":["c++","c","compiler-specific"],"question_text":"Taken from\nhttp:\/\/www.ocf.berkeley.edu\/~wwu\/riddles\/cs.shtml\nIt looks very compiler specific to me. Don't know where to look for?",...
{"title":"Bootstrap 3 truncate long text inside rows of a table in a responsive way","tags":["html5","css3","responsive-design","twitter-bootstrap-3","truncate"],"question_text":"I'm using bootsrap 3 tables, when i put large text in the table it gets wrapped on several lines, but i want it to be truncated with three do...
{"title":"Are there any drawbacks to using localStorage instead of Cookies?","tags":["javascript","html","html5","cookies","local-storage"],"question_text":"On my previous websites, I used to use a cookie to display a pre-home page only on the first visit. That worked great (\nsee for example here\n), but using cookies...
{"title":"pop_back() return value?","tags":["c++","vector"],"question_text":"Why doesn't\n`pop_back()`\nhave a return value? I have Googled regarding this and found out that it makes it more efficient. Is this the only reason for making it so in the standard?","answer_text":"Efficiency has little (or nothing, really) t...
{"title":"Prevent ID autogeneration on copy-paste in Visual Studio 2008 ASP.NET Web Form","tags":["asp.net","visual-studio-2008","copy-paste"],"question_text":"If I have the following in an ASP.NET Web Form:\n`<asp:TextBox runat=\"server\" ID=\"tbxUser\"\/>`\nand I copy and paste that line in the same page, I usually g...
{"title":"Checking whether an object conforms to two separate protocols in Objective-C","tags":["objective-c","cocoa","cocoa-touch","protocols","compile-time"],"question_text":"In Objective-C when you declare an instance variable you can check if it conforms to a protocol on assignment at compile time like so:\n`id <My...
{"title":"Access to disposed closure in C#?","tags":["c#",".net","multithreading"],"question_text":"I'm investigating Microsoft enterprise library (data application block) -- The samples sln.\nThey have a sample of reading data asynchronously (\n`IAsync`\n, although the new ver (6) also support\n`async`\n).\nBut Reshar...
{"title":"Generating a dense matrix from a sparse matrix in numpy python","tags":["python","arrays","numpy","scipy","sparse-matrix"],"question_text":"I have a Sqlite database that contains following type of schema:\n`termcount(doc_num, term , count)`\nThis table contains terms with their respective counts in the docume...
{"title":"Java 1.6 - determine symbolic links","tags":["java","java-6"],"question_text":"In a DirectoryWalker class I want to find out if a File instance is actually a symbolic link to a directory (assuming, the walker walks on UNIX systems). Given, I already know the instance is a directory, would the following be a r...
{"title":"Hiding tabBar showing black bar in Ios7","tags":["ios","xcode"],"question_text":"I am using this code to hide the TabBar:\n`self.tabBarController.tabBar.hidden=YES;`\nI am hiding tabBarController in my project.but it showing black bar in bottom of the view in Ios7.When i go back to the same view it is looking...
{"title":"Why DateTime.ParseExact(String, String, IFormatProvider) need the IFormatProvider?","tags":["c#","datetime","iformatprovider"],"question_text":"If we're using the\n`ParseExact`\nmethod for\nexact\ndate-time's parsing using a specified format, why do we need to provide a IFormatProvider object? what is the poi...
{"title":"Creating Rooms in Socket.io","tags":["javascript","node.js","sockets","socket.io"],"question_text":"I would like to ask for your help. I'm having a hard time in my client side of socket.io, I would like to call this code in my client side to create a room in socket.io:\n`var rooms = [];\nsocket.on('create', f...
{"title":"Value was either too large or too small for an Int32","tags":["c#","asp.net"],"question_text":"Possible Duplicate:\nWhat is the maximum value for a int32?\n`Mobileno = Convert.ToInt32(txmobileno.Text);`\nerror i amm getting while inserting in to database","answer_text":"Why on earth would you use an integer o...
{"title":"Windows batch file to delete .svn files and folders","tags":["batch-file","svn","delete-file"],"question_text":"In order to delete all \".svn\" files\/folders\/subfolders in \"myfolder\" I use this simple line in a batch file:\n`FOR \/R myfolder %%X IN (.svn) DO (RD \/S \/Q \"%%X\")`\nThis works, but if there...
{"title":"Gracefully shutting down sidekiq processes","tags":["ruby","sidekiq"],"question_text":"Does anyone know how to find sidekiq's pidfile to gracefully shut it down?\nRunning\n`ps ax | grep sidekiq`\nand then running\n`sidekiqctl stop <pid from grep>`\nconsistently gives a\n`no such pidfile`\nerror?\nCntl-C and C...
{"title":"What are the differences between flex-basis and width?","tags":["css","css3","flexbox"],"question_text":"There have been questions and articles about this, but nothing conclusive as far as I can tell. The best summary I could find is\nflex-basis\nallows you to specify the initial\/starting size of the element...
{"title":"Special (magic) methods in Python","tags":["python"],"question_text":"What are all the special (magic) methods in Python? The\n`__xxx__`\nmethods, that is.\nI'm often looking for a way to override something which I know is possible to do through one of these methods, but I'm having a hard time to find how sin...
{"title":"Hide text node in element, but not children","tags":["css","textnode"],"question_text":"I'm having a little trouble with CSS and can't seem to find a solution. I have this HTML\n`<div id=\"closelink\">\n <a href=\"\">Close<\/a>\n Click to close\n<\/div>`\nNow I want to hide the text \u00c2\u00abClick to close...
{"title":"How to hide parent tabbar when pushing controller in navigationController","tags":["iphone","uinavigationcontroller","uitabbarcontroller"],"question_text":"I have an application with a tab bar controller and each view contains a navigation controller. My MainWindow looks as follows:\nEverything works fine as ...
{"title":"Keep div at the bottom of another div - css","tags":["css"],"question_text":"`<div id=outer>\n<div id=\"copyright\">\n <span id=\"yr\">\u00c2\u00a9 1965 - 2010<\/span>\n <span id=\"f\"><\/span>\n <span id=\"d\"><\/span>\n <\/div>\n<\/div>`\nI want the #copyright to be at the bottom of #outer\nHere is the css ...
{"title":"How to select only one sibling with jQuery?","tags":["jquery","siblings"],"question_text":"I have this code:\n`<ul>\n <li class=\"foo\">foo text<\/li>\n <li class=\"foo2\">foo2 text<\/li>\n <!-- more li here -->\n <li class=\"bar\">bar text<\/li>\n <li class=\"bar2\">bar2 text<\/li>\n <!-- more li here -->\n ...