text stringlengths 74 309k |
|---|
{"title":"Best way to create a \"reversed\" list in Python?","tags":["python","reverse","html-lists"],"question_text":"In Python, what is the best way to create a new list whose items are the same as those of some other list, but in reverse order? (I don't want to modify the existing list in place.)\nHere is one soluti... |
{"title":"MySQL: #126 - Incorrect key file for table","tags":["mysql","mysql-error-126"],"question_text":"I got the following error from a MySQL query.\n`#126 - Incorrect key file for table`\nI have not even declared a key for this table, but I do have indices. Does anyone know what could be the problem?","answer_text"... |
{"title":"Rails not decoding JSON from jQuery correctly (array becoming a hash with integer keys)","tags":["jquery","ruby-on-rails","arrays","json","post"],"question_text":"every time I want to post an array of JSON objects with jQuery to Rails, I have this problem.\nIf I stringify the array I can see that jQuery is do... |
{"title":"In Javascript, what is the difference between indexOf() and search()?","tags":["javascript","string"],"question_text":"Being fairly new to Javascript, I'm unable to discern when to use each of these.\nCan anyone help clarify this for me?","answer_text":"If you require a regular expression, use\n`search()`\n. ... |
{"title":"PowerShell: Run command from script's directory","tags":["powershell"],"question_text":"This is probably a pretty basic question, but I don't find the solution right now..\nI have a PowerShell script that does some stuff using the script's current directory. So when inside that directory, running\n`.\\script.... |
{"title":"ASP.NET Identity default Password Hasher, how does it work and is it secure?","tags":["c#","asp.net","security","passwords","asp.net-identity"],"question_text":"I am wondering wether the Password Hasher that is default implemented in the\nUserManager\nthat comes with MVC 5 and ASP.NET Identity Framework, is s... |
{"title":"Why do we declare Loggers static final?","tags":["java","logging"],"question_text":"In Java, why is it best practice to declare a logger\n`static final`\n?\n`private static final Logger S_LOGGER`","answer_text":"`private`\n- so that no other class can\nhijack\nyour logger\n`static`\n- so there is only one log... |
{"title":"RestSharp JSON Parameter Posting","tags":["c#","json","asp.net-mvc-3","rest","restsharp"],"question_text":"I am trying to make a very basic REST call to my MVC 3 API and the parameters I pass in are not binding to the action method.\nClient\n`var request = new RestRequest(Method.POST);\nrequest.Resource = \"A... |
{"title":"How to check if a specific UIViewController's view is currently visible?","tags":["iphone","objective-c"],"question_text":"Possible Duplicate:\nHow to tell if UIViewController's view is visible\nI'm developing an app that processes a constant stream of incoming data from the network and provides a number of d... |
{"title":"Is the != check thread safe?","tags":["java","multithreading","thread-safety","atomic","race-condition"],"question_text":"I know that compound operations such as\n`i++`\nare not thread safe as they involve\nmultiple\noperations.\nBut is checking the reference with itself a thread safe operation?\n`a != a \/\/... |
{"title":"Extract method to already existing interface with ReSharper","tags":["c#","refactoring","resharper"],"question_text":"I'm adding a new method to a class that implements an interface, and I like to use the \"Extract Interface\" refactoring and just add the method to the interface. But it doesn't seem like ReSh... |
{"title":"AngularJS - How to use $routeParams in generating the templateUrl?","tags":["javascript","angularjs"],"question_text":"Our application has 2-level navigating. We want to use AngularJS\n`$routeProvider`\nto dynamically provide templates to an\n`<ng-view \/>`\n. I was thinking of doing something along the lines... |
{"title":"Why do Firefox and Opera ignore max-width inside of display: table-cell?","tags":["html","css","css-tables"],"question_text":"The following code displays correctly in Chrome or IE (the image is 200px wide). In Firefox and Opera the\n`max-width`\nstyle is ignored completely. Why does this happen and is there a... |
{"title":"What are the typical reasons Javascript developed on Firefox fails on IE?","tags":["jquery","firefox","yui","javascript"],"question_text":"I developed some javascript enhanced pages that run fine on recent Firefox and Safari. I missed to check in Internet Explorer, and now I find the pages don't work on IE 6 ... |
{"title":"Mac OS X wants to use system keychain when compiling the project","tags":["ios","xcode","ios4","keychain"],"question_text":"I am asked to type in the system admin user name and password when i compile my XCode project. The whole message is\nMAC OS X wants to make changes.Type an administrator's name and passw... |
{"title":"\"does not name a type\" error","tags":["c++"],"question_text":"I have two classes declared as below:\n`class User\n{\npublic:\n MyMessageBox dataMsgBox;\n};\nclass MyMessageBox\n{\npublic:\n void sendMessage(Message *msg, User *recvr);\n Message receiveMessage();\n vector<Message> *dataMessageList;\n};`\nWhe... |
{"title":"Error: MapFragment cannot be cast to android.support.v4.app.Fragment","tags":["android","google-maps-android-api-2"],"question_text":"First, I watched out here:\nStart FragmentActivity from Activity\nand now I have the following problem:\nMapsActivity:\n`public class MapsActivity extends FragmentActivity {\np... |
{"title":"How is it possible that kill -9 for a process on Linux has no effect?","tags":["linux","process","sysadmin","kill"],"question_text":"I'm writing a plugin to highlight text strings automatically as you visit a web site. It's like the highlight search results but automatic and for many words; it could be used f... |
{"title":"Is there a point to minifying PHP?","tags":["php","minify"],"question_text":"I know you\ncan\nminify PHP, but I'm wondering if there is any point. PHP is an interpreted language so will run a little slower than a compiled language. My question is: would clients see a visible speed improvement in page loads an... |
{"title":"How to programatically dismiss a UISearchBar?","tags":["iphone","cocoa-touch"],"question_text":"I have a standard table view, with a UISearchController implemented via a NIB. I want to mimic what happens when the user clicks \"Cancel\" in the search bar - the normal behaviour is that the search bar goes away ... |
{"title":"Define __MyCompanyName__ in Xcode per project?","tags":["xcode"],"question_text":"I've seen how to define the\n`__MyCompanyName__`\nmacro value that displays in all header comments in XCode by defining it globally via a terminal command:\n`defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{\"O... |
{"title":"How to use cURL to get jSON data and decode the data?","tags":["php","json","api","curl"],"question_text":"So I have a link that returns a jSON object, and I need to have it decoded and put into variables in PHP.\nURL\n`api.php?action=getThreads&hash=123fajwersa&node_id=4&order_by=post_date&order=desc&limit=1... |
{"title":"how to get the browser language using javascript","tags":["javascript"],"question_text":"Possible Duplicate:\nJavaScript for detecting browser language preference\ni want to detect the language of the browser that is entering my site is it En or Fr\nso i can redirect to the En page or the other page\nand can ... |
{"title":"How to set the margin or padding as percentage of height of parent container?","tags":["html","css","vertical-alignment"],"question_text":"I had been racking my brains over creating a vertical alignment in css using the following\n`.base{\n background-color:green;\n width:200px;\n height:200px;\n overflow:aut... |
{"title":"Python urllib2: Receive JSON response from url","tags":["python","json","urllib2"],"question_text":"I am trying to GET a URL using Python and the response is JSON. However, when I run\n`import urllib2\nresponse = urllib2.urlopen('https:\/\/api.instagram.com\/v1\/tags\/pizza\/media\/XXXXXX')\nhtml=response.rea... |
{"title":"What's the point of OOP?","tags":["language-agnostic","oop"],"question_text":"As far as I can tell, in spite of the countless millions or billions spent on OOP education, languages, and tools, OOP has not improved developer productivity or software reliability, nor has it reduced development costs. Few people... |
{"title":"Autotools vs. Cmake vs. Scons","tags":["build","cmake","scons","autotools","build-system"],"question_text":"What are the differences between Autotools, Cmake and Scons?\nWhat are the pros and cons of each of them?","answer_text":"In truth, Autotools' only real 'saving grace' is that it is what all the GNU pro... |
{"title":"Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. Manifest definition does not match the assembly reference","tags":["json","json.net",".net-assembly"],"question_text":"Things I've tried after searching:\n1) in Web.Config put a binding on the old version:\n`<dependentAssembly>\n <a... |
{"title":"List all developers on project in git","tags":["git"],"question_text":"Is it possible to list all users that contributed to project (users that have done commits) in git? Any additional statistics?","answer_text":"To show all users and the number of commits:\n`git shortlog -sn`","question_code":[],"answer_cod... |
{"title":"std::map insert or std::map find?","tags":["c++","optimization","stl","stdmap"],"question_text":"Assuming a map where you want to preserve existing entries. 20% of the time, the entry you are inserting is new data. Is there an advantage to doing std::map::find then std::map::insert using that returned iterato... |
{"title":"use jquery to select a dropdown option","tags":["javascript","jquery","html","select","drop-down-menu"],"question_text":"I was wondering if it's possible to get jQuery to select an option, say the 4th item, in a dropdown box?\n`<select>\n <option><\/option>\n <option><\/option>\n <option><\/option>\n <option>... |
{"title":"Java Collections copy list - I don't understand","tags":["java","list","collections","copy"],"question_text":"I have an\n`ArrayList`\nand I want to copy it exactly. I use utility classes when possible on the assumption that someone spent some time making it correct. So naturally, I end up with the\n`Collectio... |
{"title":"ConnectionTimeout versus SocketTimeout","tags":["java","android","tcp","httpconnection"],"question_text":"Im having a problem with a library I am using, it might be the library or it might be me using it wrong!\nBasically when I do this (Timeout in milliseconds)\n`_ignitedHttp.setConnectionTimeout(1); \/\/ v ... |
{"title":"How do I drop a function if it already exists?","tags":["tsql","sql-server-2000"],"question_text":"I know this must be simple, but how do I preface the creation of a function with a check to see if it already exists? If it exists, I want to drop and re-create it.","answer_text":"`IF EXISTS (\n SELECT * FROM s... |
{"title":"How to access the user profile in a Django template?","tags":["python","django","django-templates"],"question_text":"I'm storing some additional per-user information using the\n`AUTH_PROFILE_MODULE`\n.\nWe can access the user in a Django template using\n`{{ request.user }}`\nbut how do we access fields in the... |
{"title":"iOS Launching Settings -> Restrictions URL Scheme","tags":["ios","iphone","settings","url-scheme","uiapplication"],"question_text":"I've recently discovered the awesome\niOS5 custom Settings URL Scheme\n, which can be explained in detail at this great\nwebsite\n.\nI've found this to work, directing the user t... |
{"title":"C# vs Java generics","tags":["c#","java","generics","comparison"],"question_text":"I have heard that the Java implementation of Generics is not as good as the C# implementation. In that the syntax looks similar, what is it that is substandard about the Java implementation, or is it a religious point of view?"... |
{"title":"How to include package data with setuptools\/distribute?","tags":["python","setuptools","distribute"],"question_text":"When using setuptools\/distribute, I can not get the installer to pull in any\n`package_data`\nfiles. Everything I've read says that the following is the correct way to do it. Can someone ple... |
{"title":"How can I generate an ObjectId with mongoose?","tags":["node.js","mongodb","mongoose"],"question_text":"I'd like to generate a MongoDB\n`ObjectId`\nwith Mongoose. Is there a way to access the\n`ObjectId`\nconstructor from Mongoose?","answer_text":"Yes, you can find the\n`ObjectId`\nconstructor on\n`require('m... |
{"title":"How to change a TextView's style at runtime","tags":["java","android","textview"],"question_text":"I have an android app on which, when the user taps a\n`TextView`\n, I would like to apply a defined style.\nI thought to find a\n`textview.setStyle()`\nbut it doesn't exists. I tried\n`textview.setTextAppearance... |
{"title":"Html.LabelFor Specified Text [ASP.NET MVC 2]","tags":["asp.net-mvc","asp.net-mvc-2"],"question_text":"Anyone got any idea on how to specify text when using\n`Html.LabelFor(c=>c.MyField)`\n. It's just\n`MyField`\nmight not be an appropriate name to display on screen, you may want \"The Super Fantastic Field\" ... |
{"title":"Disable\/turn off inherited CSS3 transitions","tags":["css","css3","transitions","css-transitions"],"question_text":"So i have the following css transitions attached to the a element:\n`a { \n -webkit-transition:color 0.1s ease-in, background-color 0.1s ease-in ; \n -moz-transition:color 0.1s ease-in, backgro... |
{"title":"How to get a index value from foreach loop in jstl","tags":["java","jsp","for-loop","foreach","jstl"],"question_text":"I have a value set in the\n`request`\nobject like the following,\n`String[] categoriesList=null;\ncategoriesList = engine.getCategoryNamesArray();\nrequest.setAttribute(\"categoriesList\", ca... |
{"title":"Linq: \"Or\" equivalent of Where()","tags":[".net","linq","where-clause"],"question_text":"Is there a method in Linq where you can use to build SQL strings like \"...where (a=1) OR (a=2)\"?","answer_text":"You can certainly do it within a Where clause (extension method). If you need to build a complex query d... |
{"title":"Calling constructor from other constructor in same class","tags":["c#","constructor"],"question_text":"I have a class with 2 constructors:\n`public class Lens\n{\n public Lens(string parameter1)\n {\n \/\/blabla\n }\n public Lens(string parameter1, string parameter2)\n {\n \/\/ want to call constructor with 1... |
{"title":"Nohup is not writing log to output file","tags":["python","nohup"],"question_text":"I am using the following command to run a python script in the background:\n`nohup .\/cmd.py > cmd.log &`\nBut it appears that nohup is not writing anything to the log file. cmd.log is created but is always empty. In the pytho... |
{"title":"How to install Laravel 5.0","tags":["php","laravel","composer-php","laravel-5"],"question_text":"I'm having trouble getting a test instance of Laravel 5.0 up and running so I can assist with this transition.\n1) Creating a new app from\nhttps:\/\/github.com\/laravel\/laravel\/tree\/develop\nleads to the follo... |
{"title":"Android quotes within an sql query string","tags":["android","sqlite"],"question_text":"I want to perform a query like the following:\n`uvalue = EditText( some user value );\np_query = \"select * from mytable where name_field = '\" + uvalue + \"'\" ;\nmDb.rawQuery( p_query, null );`\nif the user enters a sing... |
{"title":"Enabling auto layout in iOS 6 while remaining backwards compatible with iOS 5","tags":["ios","ios5","backwards-compatibility","ios6","autolayout"],"question_text":"What is the best way to take advantage of the new auto layout features of iOS 6 while still providing compability with older devices on earlier ve... |
{"title":"How to assign string to bytes array","tags":["go"],"question_text":"I want to assign string to bytes array:\n`var arr [20]byte\nstr := \"abc\"\nfor k, v := range []byte(str) {\n arr[k] = byte(v)\n}`\nHave another method?","answer_text":"Safe and simple:\n`[]byte(\"Here is a string....\")`","question_code":["v... |
{"title":"Confused with the for-comprehension to flatMap\/Map transformation","tags":["scala","map","monads","for-comprehension"],"question_text":"I really don't seem to be understanding Map and FlatMap. What I am failing to understand is how a for-comprehension is a sequence of nested calls to map and flatMap. The fol... |
{"title":"How to quit android application programmatically","tags":["android"],"question_text":"I Found some codes for quit an Android application programatically. By calling any one of the following code in onDestroy() will it quit application entirely?\n`System.runFinalizersOnExit(true)`\n(OR)\n`android.os.Process.ki... |
{"title":"When to use IList and when to use List","tags":["c#",".net"],"question_text":"I know that IList is the interface and List is the concrete type but I still don't know when to use each one. What I'm doing now is if I don't need the Sort or FindAll methods I use the interface. Am I right? Is there a better way t... |
{"title":"Orientation in a UIView added to a UIWindow","tags":["iphone","uiview","orientation","uiwindow"],"question_text":"I have a UIView which is supposed to cover the whole device (UIWindow) to support an image zoom in\/out effect I'm doing using core animation where a user taps a button on a UITableViewCell and I ... |
{"title":"How can I get a precise time, for example in milliseconds in Objective-C?","tags":["iphone","objective-c","cocoa-touch","uikit"],"question_text":"Is there an easy way to get a time very precisely?\nI need to calculate some delays between method calls. More specifically, I want to calculate the speed of scroll... |
{"title":"Comments in Jade","tags":["node.js","jade"],"question_text":"I tried making comments in Jade, but the comments render as text in the HTML. This is my code:\n`doctype html\nhtml(lang='en')\n body\n \/ This should be a comment`\nWhat am I doing something stupid?","answer_text":"As written in the\ngithub officia... |
{"title":"ListView items are not clickable. why?","tags":["android","listview","adaptor"],"question_text":"I have a\n`ListView`\nthat uses a customized adapter, but I can't click on the ListView Item ..\nActivity for list view ..\n`package com.adhamenaya.projects;\nimport java.util.ArrayList;\nimport android.app.Activi... |
{"title":"How to get record created today by rails activerecord?","tags":["ruby-on-rails","date","rails-activerecord"],"question_text":"How should I write the conditional statement for when I want to get all the records which were created today?","answer_text":"`Post.where(\"created_at >= ?\", Time.zone.now.beginning_o... |
{"title":"google maps api for android, getting SHA1 cert instead of MD5","tags":["android","google-maps","md5","sha1","fingerprint"],"question_text":"when i try to get the MD5 fingerprint using\n`keytool`\n, I get a SHA1 fingerprint instead and the google maps doesnt recognize it. How do I get the MD5 fingerprint?","an... |
{"title":"Removing Data From ElasticSearch","tags":["elasticsearch"],"question_text":"I'm new to\nElasticSearch\n. I'm trying to figure out how to remove data from ElasticSearch. I have deleted my indexes. However, that doesn't seem to actually remove the data itself. The other stuff I've seen points to the\nDelete by ... |
{"title":"Is there a human readable programming language?","tags":["nlp","grammar"],"question_text":"I mean, is there a coded language with human style coding?\nFor example:\n`Create an object called MyVar and initialize it to 10;\nTake MyVar and call MyMethod() with parameters. . .`\nI know it's not so useful, but it ... |
{"title":"What is getattr() exactly and how do I use it?","tags":["python","getattr"],"question_text":"I was\nreading about the\n`getattr()`\nfunction\n. The problem is that I still can't grasp the idea of its usage. The only thing I understand about\n`getattr()`\nis that\n`getattr(li, \"pop\")`\nis the same as calling... |
{"title":"Convert HashBytes to VarChar","tags":["sql","sql-server"],"question_text":"I want to get the MD5 Hash of a string value in SQL Server 2005. I do this with the following command:\n`SELECT HashBytes('MD5', 'HelloWorld')`\nHowever, this returns a VarBinary instead of a VarChar value. If I attempt to convert\n`0x... |
{"title":"how to check if List<T> element contains an item with a Particular Property Value","tags":["c#","list","contains"],"question_text":"`public class PricePublicModel\n{\n public PricePublicModel() { }\n public int PriceGroupID { get; set; }\n public double Size { get; set; }\n public double Size2 { get; set; }\n... |
{"title":"How can I make setuptools install a package that's not on PyPI?","tags":["python","setuptools","distutils","pypi"],"question_text":"I've just started working with setuptools and virtualenv. My package requires the latest python-gearman that is only available from GitHub. The python-gearman version that's on P... |
{"title":"How do I ignore ampersands in a SQL script running from SQL Plus?","tags":["sql","oracle","sqlplus"],"question_text":"I have a SQL script that creates a package with a comment containing an ampersand (&). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting wi... |
{"title":"Implicit type conversion rules in C++ operators","tags":["c++","casting","implicit"],"question_text":"I want to be better about knowing when I should cast. What are the implicit type conversion rules in C++ when adding, multiplying, etc. For example,\n`int + float = ?\nint * float = ?\nfloat * int = ?\nint \/... |
{"title":"Do we really need \"enum class\" in C++11?","tags":["c++","enums","c++11","language-lawyer"],"question_text":"When we have,\n`struct E { enum E_ { HELLO }; }; \/\/ 'E' is inheritable`\nthen why do we need,\n`enum class E { HELLO }; \/\/ 'E' is not inheritable`\nIMO 2nd version doesn't offer more features than... |
{"title":"ALTER TABLE in Magento setup script without using SQL","tags":["php","sql","magento","installation","entity-attribute-value"],"question_text":"Jonathon Day\nsays\n\"updates SHOULD NOT be in the form of\n SQL commands\". I haven't come across\n any DDL or DML statments that cannot\n be executed via Magento's c... |
{"title":"Pretty printing JSON from Jackson 2.2's ObjectMapper","tags":["java","json","jackson"],"question_text":"Right now I have an instance of\n`org.fasterxml.jackson.databind.ObjectMapper`\nand would like to get a\n`String`\nwith pretty JSON. All of the results of my Google searches have come up with Jackson 1.x wa... |
{"title":"Why this code throws 'Collection was modified', but when I iterate something before it, it doesn't?","tags":["c#","collections"],"question_text":"`var ints = new List< int >( new[ ] {\n 1,\n 2,\n 3,\n 4,\n 5\n} );\nvar first = true;\nforeach( var v in ints ) {\n if ( first ) {\n for ( long i = 0 ; i < int.Max... |
{"title":"Android Get Current timestamp?","tags":["android","timestamp"],"question_text":"I want to get the current timestamp like that :\n1320917972\n`int time = (int) (System.currentTimeMillis());\nTimestamp tsTemp = new Timestamp(time);\nString ts = tsTemp.toString();`","answer_text":"The solution is :\n`Long tsLong... |
{"title":"Call to undefined method PHP_CodeCoverage_Filter::getInstance()","tags":["ubuntu","phpunit","pear"],"question_text":"I've got a fresh copy of PHPUnit installed on my system (Ubuntu 11), but whenever I type\n`phpunit`\nin the console I get the following error:\n`PHP Fatal error: Call to undefined method PHP_Co... |
{"title":"Change highlight color","tags":["jquery","jquery-ui"],"question_text":"jQuery's highlight method will highlight any div with a yellow background.\nHow do I specify what color to use instead of yellow for highlight?","answer_text":"According to the\ndocumentation\n:\n`$(this).effect(\"highlight\", {color: 'blu... |
{"title":"Return two and more values from a method","tags":["ruby"],"question_text":"Is there any possibility to return multiple values from method? Something like this:\n`def do()\n return [\"a\", 10, SomeObject.new]\nend\n[a, b, c] = do`","answer_text":"`def sumdiff(x, y)\n return x+y, x-y\nend\n#=> nil\nsumdiff(3, 4... |
{"title":"Bash: Print each command before executing?","tags":["bash"],"question_text":"What is the best way to set up a bash script that prints each command before it executes it?\nThat would be great for debugging purposes.\nI already tried this:\n`CMD=\".\/my-command --params >stdout.txt 2>stderr.txt\"\necho $CMD\n`$... |
{"title":"Turn off Chrome\/Safari spell checking by HTML\/css","tags":["html","css","google-chrome","spell-checking"],"question_text":"Is there a way\nfor a web developer\nto turn off Chrome\/Safari\/WebKit's spellchecking on particular\n`input`\nor\n`textarea`\nelements? I mean either by special tag attribute or a pro... |
{"title":"Use CSS to make a span not clickable","tags":["css"],"question_text":"`<html>\n<head>\n<\/head>\n<body>\n<div>\n<a href=\"http:\/\/www.google.com\">\n <span>title<br><\/span>\n <span>description<br><\/span>\n <span>some url<\/span>\n<\/a>\n<\/div>\n<\/body>\n<\/html>`\nI am pretty new to CSS, I have a simple ... |
{"title":"Which characters are illegal within a branch name?","tags":["git","branch","naming"],"question_text":"Which characters are illegal within a branch name?","answer_text":"A branch name can not:\nHave a path component that begins with \".\"\nHave a double dot \"..\"\nHave an ASCII control character, \"~\", \"^\"... |
{"title":"Passing argument to alias in bash","tags":["bash","shell",".bash-profile"],"question_text":"Is it possible to do the following:\nI want to run the following:\n`mongodb bin\/mongod`\nIn my bash_profile I have\n`alias = \".\/path\/to\/mongodb\/$1\"`","answer_text":"An alias will expand to the string it represen... |
{"title":"How to add a border just on the top side of a UIView","tags":["ios","objective-c","xcode","uiview","border"],"question_text":"My question is on the title.\nI don't know how to add a border in a specific side, top or bottom, any side...\n`layer.border`\ndraws the border for the whole view...\nHelp please :S\nT... |
{"title":"\"git rm --cached x\" vs \"git reset head -- x\"?","tags":["git","git-reset","git-index","git-rm"],"question_text":"GitRef.org - Basic\n:\n`git rm`\nwill remove entries from the\n staging area. This is a bit different\n from\n`git reset HEAD`\nwhich \"unstages\"\n files. By \"unstage\" I mean it reverts\n the... |
{"title":"Determine if string is in list in JavaScript","tags":["javascript","string","list"],"question_text":"In SQL we can see if a string is in a list like so:\n`Column IN ('a', 'b', 'c')`\nWhat's a good way to do this in javascript? It's so clunky to do this:\n`if (expression1 || expression2 || str === 'a' || str =... |
{"title":"How To add custom View in map's Annotation's Callout's","tags":["iphone","maps"],"question_text":"Here is my Code i want to add my own custom callout view instead of ios default i know there is only leftCallout and right callout View but i need to add a view tool tip type with my own background and label\n`- ... |
{"title":"What are the benefits to marking a field as `readonly` in C#?","tags":["c#","readonly"],"question_text":"What are the benefits of having a member variable declared as read only? Is it just protecting against someone changing during the lifecycle of the class or are there any compiler speed improvements due to... |
{"title":"Whats the concept of and differences between 'FrameBuffer' and 'RenderBuffer' in OpenGL?","tags":["opengl","rendering","framebuffer"],"question_text":"I'm confused about concept of FrameBuffer and RenderBuffer. I know that they're required to render, but I want to understand them before use.\nI know some bitm... |
{"title":"Delete vs splice on associative array","tags":["javascript","arrays","associative-array"],"question_text":"If I have a JS associative array which is from what I gather is really an object, and I wish to remove an element, using\n`delete myArr[someId]`\nwill set the element to undefined, whilst splice won't wo... |
{"title":"How to open a new file in vim in a new window","tags":["unix","vim"],"question_text":"Is there a way to open vim in a new shell window or tab? I'm used to doing\n`$ mate file`\n, which opens the file in a new window.\nI prefer having one 'central shell' where I issue commands and edit files in other windows o... |
{"title":"XCTest\/XCTest.h not found on old projects built in Xcode 6","tags":["ios","xcode","cocoapods","xctest"],"question_text":"I have a few projects I'm trying to build with Xcode 6 Beta 2. The projects all have some type of library that uses XCTest (Kiwi\/XCTest and Specta) that don't build in Xcode 6 because XCT... |
{"title":"WPF and initial focus","tags":["wpf","focus"],"question_text":"It seems that when a WPF application starts, nothing has focus.\nThis is really weird. Every other framework I've used does just what you'd expect: puts initial focus on the first control in the tab order. But I've confirmed that it's WPF, not jus... |
{"title":"Coffeescript 'this' inside jQuery .each()","tags":["javascript","coffeescript"],"question_text":"I have some coffeescript like the following:\n`class foo:\n @bar = 'bob loblaw'\n processRows: ->\n $(\"#my-table>tr\").each ->\n id = $(this).attr(\"id\")\n @processRow id\n processRow: (id) ->\n console.log @bar... |
{"title":"Where\/How to getIntent().getExtras() in an Android Fragment?","tags":["android","android-intent","android-fragments","android-activity"],"question_text":"With Activities, I used to do this:\nIn Activity 1:\n`Intent i = new Intent(getApplicationContext(), MyFragmentActivity.class);\n i.putExtra(\"name\", item... |
{"title":"Why do I get \"Procedure expects parameter '@statement' of type 'ntext\/nchar\/nvarchar'.\" when I try to use sp_executesql?","tags":["sql","sql-server","tsql","dynamic-sql"],"question_text":"Why do I get this error\n`Procedure expects parameter '@statement' of type 'ntext\/nchar\/nvarchar'.`\nwhen I try to u... |
{"title":"How to configure where to redirect after a log out in Django?","tags":["django","authentication"],"question_text":"Just wondering where I can set the url to redirect to after logout. I know you can set the login url. I want to redirect to my home page.","answer_text":"You don't need to overwrite or wrap anyth... |
{"title":"Lightweight SQL editor for Eclipse","tags":["sql","eclipse","editor","eclipse-plugin"],"question_text":"Is there any simple SQL editor plugin for Eclipse?\nBy simple I mean, the editor does\nNOT\nconnect to any DB, does syntax highlighting and preferably formatting sql is a bonus.","answer_text":"for referenc... |
{"title":"How to wait for a set of threads to complete?","tags":["java","multithreading","parallel-processing","wait"],"question_text":"What is a way to simply wait for all threaded process to finish? For example, let's say I have:\n`public class DoSomethingInAThread implements Runnable{\n public static void main(Strin... |
{"title":"What is aria-label and how should I use it?","tags":["html5","assistive-technology"],"question_text":"A few hours ago I read about the\naria-label\nattribute, which:\nDefines a string value that labels the current element.\nBut in my opinion this is what the\n`title`\nattribute was supposed to do. I looked fu... |
{"title":"What is std::move(), and when should it be used?","tags":["c++","c++11","move-semantics"],"question_text":"What is it?\nWhat does it do?\nWhen should it be used?\nGood links are appreciated.","answer_text":"http:\/\/en.wikipedia.org\/wiki\/C%2B%2B11#Rvalue_references_and_move_constructors\nhttp:\/\/www.open-s... |
{"title":"What is Erlang written in?","tags":["erlang","bootstrapping"],"question_text":"What is Ericsson's implementation of Erlang and Erlang\/OTP written and compiled in? Is is assembly, C or Erlang itself?\nUpdate 1: Thanks to DrJokepu. If I understand correctly, Erlang source-to-VM compiler is written in Erlang it... |
{"title":"Count number of days between two dates","tags":["ruby-on-rails","ruby"],"question_text":"How do I count the number of days between these two dates?\n`start_date = Date.parse \"2012-03-02 14:46:21 +0100\"\nend_date = Date.parse \"2012-04-02 14:46:21 +0200\"`","answer_text":"With the Date (and DateTime) classes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.