text
stringlengths
74
309k
{"title":"Weird use of `?:` in `typeid` code","tags":["c++","conditional-operator","micro-optimization","typeid"],"question_text":"In one of the projects I'm working on, I'm seeing this code\n`struct Base {\n virtual ~Base() { }\n};\nstruct ClassX {\n bool isHoldingDerivedObj() const {\n return typeid(1 ? *m_basePtr : ...
{"title":"Store multiple values in single key in json","tags":["arrays","json"],"question_text":"I need to store many values in single key of json. e.g.\n`{\n \"number\" : \"1\",\"2\",\"3\",\n \"alphabet\" : \"a\", \"b\", \"c\"\n}`\nSomething like this. Any pointers?","answer_text":"Use arrays:\n`{\n \"number\": [\"1\"...
{"title":"Undefined variable: $_SESSION","tags":["php","session","cakephp","e-notices"],"question_text":"I'm getting\n`E_NOTICE`\nerrors in a core CakePHP file when it tries to reference a never-set or unset session (\n`cake\/libs\/cake_session.php line 372`\n):\n`function read($name = null) {\n if (is_null($name)) {\n...
{"title":"How to disable default sound effects for all my application or activity","tags":["android"],"question_text":"In my application I am using sound pool for the button click audio effect.\nThe problem is that if in the device's settings \"Audible selection\" is ticked, then my buttons will produce two sounds: the...
{"title":"How to have \"My Cart\" link outside of Top Links?","tags":["magento"],"question_text":"I've only been working on Magento for a few days but already it is so confusing. I'm starting to get my head around it but one problem is doing my head in at the moment.\nMy client wants a shopping basket sort of function ...
{"title":"Using 3-digit color codes rather than 6-digit color codes in CSS","tags":["css","colors","hex","web-optimization"],"question_text":"I recently went through my CSS file and switch all my 6-digit hexadecimal codes to simple 3-digit codes (for example, my\n`#FDFEFF`\ngot shortened to\n`#FFF`\n). It renders prett...
{"title":"What is the difference between \u00e2\u0080\u009cthis\u00e2\u0080\u009d, \u00e2\u0080\u009c$this\u00e2\u0080\u009d and \u00e2\u0080\u009c$(this)\u00e2\u0080\u009d?","tags":["javascript","jquery"],"question_text":"What is the difference between these three forms:\n`this\n$this\n$(this)`","answer_text":"In\ntyp...
{"title":"Postgresql aggregate array","tags":["sql","arrays","postgresql"],"question_text":"Hi I have a two tables\n`Student\n--------\nId Name\n1 John \n2 David\n3 Will\nGrade\n---------\nStudent_id Mark\n1 A\n2 B\n2 B+\n3 C\n3 A`\nIs it possible to make native Postgresql select to get results like this:\n`Name Array ...
{"title":"How to extend the playframework?","tags":["playframework","playframework-1.x"],"question_text":"Sometime it's necessary to extends a framework. Sometimes it's necessary to hook into the request\/response lifecycle, for example for a parameter binding or to write a security module.\nHow could this be done in t...
{"title":"Filters in Laravel 5","tags":["laravel","laravel-5","laravel-filters"],"question_text":"How do we make filters in Laravel 5? Is the idea of\nfilters\ngoing away?","answer_text":"The short answer is no,\nroute filters are\nnot\ngoing away entirely in Laravel 5.0\n(despite some misleading information out there ...
{"title":"Easiest way to sort DOM nodes?","tags":["javascript","dom"],"question_text":"If I have a list like this:\n`<ul id=\"mylist\">\n <li id=\"list-item1\">text 1<\/li>\n <li id=\"list-item2\">text 2<\/li>\n <li id=\"list-item3\">text 3<\/li>\n <li id=\"list-item4\">text 4<\/li>\n<\/ul>`\nWhat's the easiest way to ...
{"title":"What is point of SSL if fiddler 2 can decrypt all calls over HTTPS?","tags":["c#","ssl",".net-4.0","fiddler","encryption"],"question_text":"I asked a question here a while back on how to hide my http request calls and make them more secure in my application. I did not want people to use fiddler 2 to see the c...
{"title":"Why should I use the \"using\" keyword to access my base class method?","tags":["c++","oop","inheritance","using"],"question_text":"I wrote the below code in order to explain my issue. If I comment the line 11 (with the keyword \"using\"), the compiler does not compile the file and displays this error:\n`inva...
{"title":"XML Schema Header & Namespace Config","tags":["xml","xsd","schema"],"question_text":"Migrating from DTD to XSD and for some reason the transition is a bumpy one. I understand how to define the schema once I'm inside the\n`<xs:schema>`\nroot tag, but getting past the header & namespace declaration stuff is pro...
{"title":"Change window location Jquery","tags":["javascript","jquery","ajax","window","location"],"question_text":"I am using ajax to load my website content and want to update the window location when ajax is successful.\nHow can I update the window location to \"\/newpage\"?? I need users to be able to go back and t...
{"title":"Associativity of function call operator in C","tags":["c","associativity"],"question_text":"I was going through the topic of associativity of C operators.\nThere I came across this fact that the function call operator\n`()`\nhas a left to right associativity. But associativity only comes to play when multiple...
{"title":"Formatting doubles for output in C#","tags":["c#","formatting","floating-point","ieee-754"],"question_text":"Running a quick experiment related to\nIs double Multiplication Broken in .NET?\nand reading a couple of articles on C# string formatting, I thought that this:\n`{\n double i = 10 * 0.69;\n Console.Wri...
{"title":"No asp.net features on IIS 7.5","tags":["asp.net","iis-7"],"question_text":"I thought I could see an ASP.NET features panel (I don't know the exact name, though, some of them are .Net Compilation, .Net Roles, .Net Users and so on) on the IIS7 manager when I click a site node in the nodes list of the IIS7 mana...
{"title":"c++ const member function that returns a const pointer.. But what type of const is the returned pointer?","tags":["c++","const"],"question_text":"I apologize if this has been asked, but how do I create a member function in c++ that returns a pointer in the following scenerios:\n1. The returned pointer is cons...
{"title":"Setting a max character length in css","tags":["html","css","html5","css3","text"],"question_text":"I am making responsive website for school and my question is:\nHow do i set a max character length of the sentences(with css) on my website(like 75 characters) that when i have a very large screen,the sentences...
{"title":"Interfaces separated from the class implementation in separate projects?","tags":["c#","design","interface"],"question_text":"We work on a middle-size project (3 developers over more than 6 months) and need to make following decision: We'd like to have interfaces separated from concrete implementation. The fi...
{"title":"Group a list of objects by an attribute : Java","tags":["java","list","grouping"],"question_text":"I need to group a list of objects(Student) using an attribute(Location) of the particular object, the code is like below,\n`public class Grouping {\n \/**\n * @param args the command line arguments\n *\/\n publi...
{"title":"Integrate MuPDF Reader in an app","tags":["android","pdf","android-ndk","render","mupdf"],"question_text":"I am working on some stuff that should be able to read\nPDF\nin my app and I want to put PDF view in my\ncustom layout\n. I had preferred\nAndroid PDF Viewer\nbut when I performed\nzoomIn\n,\nzoomOut\nit...
{"title":"Why is there a performance warning on cast pointer to bool?","tags":["c++","casting","performance"],"question_text":"Extends\n.\nI thought I was being cool when I did something like:\nbool hasParent()\n{\n return this->parentNode ;\n}\nEven with a (bool) cast, the warning still doesn't go away.\nWhere this->p...
{"title":"Elo rating system: start value when players can join the game constantly","tags":["system","rating"],"question_text":"I've implemented an Elo rating system in a game. There is no limit for the number players. Players can join the game constantly so the number of players probably rises gradually.\nHow the Elo ...
{"title":"iOS Launch screen in React Native","tags":["ios","xcode","react-native","asset-catalog"],"question_text":"I'm working with a React Native app and I'm trying to set a customize launch screen but I'm not be able to.\nReact Native creates a LaunchScreen.xib by default, so I've created a LaunchImage inside Images...
{"title":"Tutorial for scipy.cluster.hierarchy","tags":["python","scipy","hierarchical-clustering"],"question_text":"I'm trying to understand how to manipulate a hierarchy cluster but the documentation is too ... technical?... and I can't understand how it works.\nIs there any tutorial that can help me to start with, e...
{"title":"How to automate a process with the sqlite3.exe command line tool?","tags":["sqlite","scripting","batch-file"],"question_text":"I'm trying to bulk load a lot of data ( 5.5 million rows ) into an SQLite database file.\nLoading via INSERTs seems to be far too slow, so I'm trying to use the sqlite3 command line t...
{"title":"javascript anchor avoid scroll to top on click","tags":["javascript"],"question_text":"I created a function in javascript that i add to an anchor as such\njavascript :\n`somefunction = function () {alert('foo')}`\nhtml :\n`<a href=\"#\" onclick=\"return somefunction()\">anchor<\/a>`\neverytime i click on the ...
{"title":"BEGIN - END block atomic transactions in PL\/SQL","tags":["oracle","plsql"],"question_text":"This information should be easy to find, but I haven't had any luck.\nWhen I have a\n`BEGIN - END`\nblock in a PL\/SQL, does it behave as an atomic transaction, that will try to commit on hitting the\n`END`\nblock and...
{"title":"Force application close on system shutdown","tags":["c#","winforms","shutdown"],"question_text":"I have a Windows Forms application that when the Main Window is closing, it displays a basic dialog box, confirming the action. If the user decides to cancel the application exit is cancelled.\nHowever, when the a...
{"title":"Setting session timeout in Rails 3","tags":["ruby-on-rails","ruby-on-rails-3","session","activerecord"],"question_text":"This seems simple: I am trying to get my rails Active Record session to timeout after 2 minutes. So after two minutes I want my users to have to re-login.\nI'm just running\n`rails server`\...
{"title":"iOS 7 dynamic blur effect like in Control Center","tags":["iphone","objective-c","blur","ios7"],"question_text":"I'm trying to make a controller that will be similar to Control Center in iOS7. From WWDC session #226 I've learnt how to get blurred image with different effects\n`UIGraphicsBeginImageContextWithO...
{"title":"what is the .NET equivalent of @Deprecated in java?","tags":["c#",".net","metadata"],"question_text":"Is there an annotation in .NET which allows methods or classes to be deprecated so that their use and their callers are identified by the compiler (cf @Deprecated in Java)","answer_text":"The\n`[Obsolete]`\na...
{"title":"Convert RGB value to HSV","tags":["java","image","rgb","hsv"],"question_text":"I've found a method on the Internet to convert RGB values to HSV values.\nUnfortunately, when the values are R=G=B, I'm getting a NaN, because of the 0\/0 operation.\nDo you know if there is an implemented method for this conversio...
{"title":"Using return vs. not using return in the list monad","tags":["haskell","monads"],"question_text":"I started my Grand Haskell Crusade (GHC :) ) and I am a bit confused with monads and IO functions. Could anyone explain\nsimply\nwhat is the difference between those two functions?\n`f1 = do x <- [1,2]\n [x, x+1]...
{"title":"ASP.NET MVC Model vs ViewModel","tags":["asp.net-mvc","asp.net-mvc-2","model","viewmodel"],"question_text":"OK, I have been hearing discussion about \"ViewModels\" in regards to MS's ASP.NET MVC.\nNow, that is intended to be a specific kind of Model, correct? Not a specific kind of View.\nTo my understanding,...
{"title":"Android: How to turn screen on and off programmatically?","tags":["android"],"question_text":"Before marking this post as a \"duplicate\", I am writing this post because no other post holds the solution to the problem.\nI am trying to turn off the device, then after a few minutes or sensor change, turn it bac...
{"title":"Using \"&times\" word in html changes to \u00c3\u0097","tags":["javascript","jquery","html"],"question_text":"I am using the following code.\nHTML Code :\n`<div class=\"test\">&times<\/div>`\nJavascript:\n`alert($(\".test\").html());`\nI am getting '\u00c3\u0097' in alert. I need to get '&times' as result.\nA...
{"title":"Draw part of a circle","tags":["iphone","objective-c","cocoa-touch"],"question_text":"For an iPhone application I want to draw a circle, that is only for an x percentage filled.\nSomething like this:\nI have no problems calculating the radius, the degrees or the radians, that is no problem. Also drawing the c...
{"title":"How to send HTML email","tags":["android","email","android-intent","html-email"],"question_text":"i found a way to send plain text email using intent:\n`final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);\nemailIntent.setType(\"text\/plain\"); \nemailIntent.putExtra(android.content.Inte...
{"title":"How to make canvas with Swing?","tags":["java","swing","user-interface","java-canvas"],"question_text":"I'm trying to make a paint editor with Java in which I have a toolbar with the objects that I would like to paste in the canvas. I'm using Swing components to make the GUI, but when I looked for the way of ...
{"title":"how to stop flickering C# winforms","tags":["c#","drawing"],"question_text":"I have a program that is essentially like a paint application. However, my program has some flickering issues. I have the following line in my code (which should get rid of flickering - but doesn't):\n`this.SetStyle(ControlStyles.All...
{"title":"Can transient keywords mark a method?","tags":["java","transient"],"question_text":"In a java class java.util.Locale, I find that the keyword transient marked a method.\n`public final class Locale\n implements Cloneable, Serializable\n{\n private static class LocaleNameGetter\n implements sun.util.LocaleServi...
{"title":"What is Entity Framework fluent api?","tags":["c#","entity-framework","orm","entity-framework-4","poco"],"question_text":"I keep hearing about the Entity Framework fluent-api but I am struggling to find a good reference on this. What is it?\nWe use the entity framework and the modeling tool provided. Is that ...
{"title":"Hibernate JPA Sequence (non-Id)","tags":["java","hibernate","jpa","sequence"],"question_text":"Is it possible to use a DB sequence for some column that\nis not the identifier\/is not part of a composite identifier\n?\nI'm using hibernate as jpa provider, and I have a table that has some columns that are gener...
{"title":"Why is there so much \"magic\" in Perl?","tags":["perl"],"question_text":"Looking through the\nperlsub\nand\nperlop\nmanpages I've noticed that there are many references to \"magic\" and \"magical\" there (just search any of them for \"magic\"). I wonder why is Perl so rich in them.\nSome examples:\n`print ++...
{"title":"Why does `int ;` compile fine in C, but not in C++?","tags":["c++","c","gcc","language-lawyer","variable-declaration"],"question_text":"Consider the following program (see live demo\nhere\n).\n`#include <stdio.h>\nint main(void)\n{\n int ; \/\/ Missing variable name\n puts(\"Surprise\");\n}`\nMy compiler, gcc...
{"title":"Using Python Iterparse For Large XML Files","tags":["python","xml","lxml","large-files","elementtree"],"question_text":"I need to write a parser in Python that can process some extremely large files ( > 2 GB ) on a computer without much memory (only 2 GB). I wanted to use iterparse in lxml to do it.\nMy file ...
{"title":"Cannot resolve the collation conflict between","tags":["sql","sql-server-2008","sql-server-2012","collation"],"question_text":"I have moved one of our databases (DB1) from SQL Server 2008 to 2012 and when I run the stored procedures I get the following error\nCannot resolve the collation conflict between \"SQ...
{"title":"UITableView change header title color","tags":["iphone","ios","uitableview","inappsettingskit"],"question_text":"I'm styling the UITableView in\nInAppSettingsKit\nand want to change the color of the header title:\nThe labels\n`Without title`\nand\n`Text Field`\nshould be white. How can this be done?\nThanks."...
{"title":"How to add a custom MACRO when using NDK?","tags":["android-ndk"],"question_text":"I need some custom MACROs in my NDK projects\nhowever I have no ideal how to add and I found no answers\nCould anyone please help?\nMany thanks!","answer_text":"If you would like to add a special definition when compiling your ...
{"title":"How do header and source files in C work?","tags":["c","compilation","header-files"],"question_text":"I've perused the possible duplicates, however none of the answers there are sinking in.\ntl;dr: How are source and header files related in\n`C`\n? Do projects sort out declaration\/definition dependencies imp...
{"title":"How to check the first character in a string in unix","tags":["string","bash","unix","character","exitstatus"],"question_text":"I'm writing a script in unix where I have to check whether the first character in a string is \"\/\" and if it is, branch.\nfor example I have a string\n`\/some\/directory\/file`\nI ...
{"title":"Any performance benefit to \"locking down\" JavaScript objects?","tags":["javascript","ecmascript-5","javascript-1.8"],"question_text":"JavaScript 1.8.5 (ECMAScript 5) adds some interesting methods that\nprevent future modifications\nof a passed object, with varying degrees of thoroughness:\n`Object.preventEx...
{"title":"\"Close Others\" command shortcut in Sublime Text 2","tags":["command","keyboard-shortcuts","sublimetext2","sublimetext"],"question_text":"I am trying to add a shortcut for \"Close Others\" tabs, but can't seem to find the command, here is what I am trying:\n`{ \"keys\": [\"super+alt+w\"], \"command\": \"clos...
{"title":"hide scrollbar while still able to scroll with mouse\/keyboard","tags":["javascript","jquery","html","css"],"question_text":"Possible Duplicate:\nHow to disable browser or element scrollbar, but allow scrolling with wheel or arrow keys?\nI want to know if it is possible to hide the scrollbar, while scrolling ...
{"title":"Regex any ascii character","tags":["regex","ascii"],"question_text":"What is the regex to match\n`xxx[any ascii char here, spaces included]+xxx`\n?\nI am trying\n`xxx[(\\w)(\\W)(\\s)]+xxx`\nbut it doesn't seem to work.","answer_text":"If you really mean\nany\nand ASCII (not e.g. all Unicode characters):\n`xxx...
{"title":"JSF page redirecting from java bean","tags":["java","jsf"],"question_text":"Is there some way how to\nredirect\npage to other page from\n`Java`\nmethod?\nI'm able only to\nforward\nit using:\n`FacesContext.getCurrentInstance().getExternalContext().dispatch(\"\/foo.xhtml\");`\nor using navigation-rules of\n`fa...
{"title":"Creating a two dimensional array in Objective-C","tags":["objective-c"],"question_text":"Whats the easiest way to declare a two dimensional array in Objective-C? I am reading an matrix of numbers from a text file from a website and want to take the data and place it into a 3x3 matrix.\nOnce I read the URL int...
{"title":"What advantage does Monad give us over an Applicative?","tags":["haskell","functional-programming","monads"],"question_text":"I've read\nthis article\n, but didn't understand last section.\nThe author says that Monad gives us context sensitivity, but it's possible to achieve the same result using only an Appl...
{"title":"My pull request has been merged, what to do next?","tags":["git","github"],"question_text":"I recently participated in a project from GitHub. I did the following:\nForked the original repository, cloned it to my local machine, made a branch to fix existing bug, fixed bug being in that branch, pushed that bran...
{"title":"Javascript logical \"!==\" operator?","tags":["javascript","syntax","logical-operators"],"question_text":"I am getting back into web development, and have been trying to go over the nuances of jscript recently. I was pouring through the source of the THREEx extension library built on top of Three.JS and notic...
{"title":"removing #region","tags":["c#",".net","visual-studio-addins","region"],"question_text":"I had to take over a c# project. The guy who developed the software in the first place was deeply in love with\n`#region`\nbecause he wrapped everything with regions. \nIt makes me almost crazy and I was looking for a tool...
{"title":"How to make a blinking (or flashing) cursor on iphone?","tags":["ios","objective-c","uikit"],"question_text":"I'm trying to create a custom \"blinking cursor\" in UIKit, I've tried as shown below, having 2 functions that basically keep calling each other until the cursor is hidden. But this leads to a nice in...
{"title":"Is there a class like Dictionary<> in C#, but for just keys, no values?","tags":["c#","list","dictionary","key"],"question_text":"I guess another way to phrase this would be \"Is there a class like\n`List<>`\nin C#, but optimized for checking whether a particular value is present?\" I'm sure for a small set o...
{"title":"related_name argument not working as expected in Django model?","tags":["python","django"],"question_text":"I recently got a ForeignKey clash in my Django model. I have the need to have two foreign keys (owner, assigned_to) ultimately pointing to the same model (a user).\nFrom what I understand I need a\n`rel...
{"title":"How to set a property of a C# 4 dynamic object when you have the name in another variable","tags":["c#",".net","reflection","dynamic"],"question_text":"I'm looking for a way to modify properties on a\n`dynamic`\nC# 4.0 object with the name of the property known only at runtime.\nIs there a way to do something...
{"title":"Using \"data-toggle\" with Html.ActionLink","tags":["c#","asp.net-mvc-4","html.actionlink"],"question_text":"I want to use \"data-toggle\" wiht actionLink. Like this;\n`Html.ActionLink(\"Delete\", \"Users\", \"Admin\", new { item.UserId , strRole = strRole }, new { id = \"cmdDelete\", href=\"#myAlert\", data-...
{"title":"Why is my mails staying in \u00e2\u0080\u009cbacklog\u00e2\u0080\u009d of Mandrill?","tags":["email","mandrill","backlog"],"question_text":"at previous hour we reached the number of maximum limit of sending emails per hour which is not surprising since we know our limit per hour to send. However, after an hou...
{"title":"How to get 2 digit year w\/ Javascript?","tags":["javascript","date"],"question_text":"I am trying to find some javascript code that will write the current date in this format: mmddyy\nEverything I have found uses 4 digit years and I need 2 digit.","answer_text":"Given a date object:\n`date.getFullYear().toSt...
{"title":"Angular ng-view\/routing not working in PhoneGap","tags":["cordova","routing","angularjs","angular-routing"],"question_text":"I'm having a problem with ngView in PhoneGap.\nEverything seems to be loading just fine and I can even get a basic controller working using ng-controller. But when I try to use routing...
{"title":"Haskell, Scala, Clojure, what to choose for high performance pattern matching and concurrency","tags":["scala","haskell","clojure","programming-languages","ocaml"],"question_text":"I have started work on FP recently after reading a lot of blogs and posts about advantages of FP for concurrent execution and per...
{"title":"Ruby: Proc#call vs yield","tags":["ruby","yield"],"question_text":"What are the behavioural differences between the following two implementations in Ruby of the\n`thrice`\nmethod?\n`module WithYield\n def self.thrice\n 3.times { yield } # yield to the implicit block argument\n end\nend\nmodule WithProcCall\n ...
{"title":"Is it possible to push ViewController with completion block?","tags":["ios","uiviewcontroller"],"question_text":"And how can I do it, there is no such method in documentation.","answer_text":"The better solution would be wrapping the push animation by an CATransaction and set the completionBlock. There's no n...
{"title":"How to remove two chars from the beginning of a line","tags":["python"],"question_text":"I'm a complete Python noob. How can I remove two characters from the beginning of each line in a file? I was trying something like this:\n`#!\/Python26\/\nimport re\nf = open('M:\/file.txt')\nlines=f.readlines()\ni=0;\nfo...
{"title":"Graph API get photo square (100x100)","tags":["facebook","facebook-graph-api"],"question_text":"How can I get facebook photo with selection view user set (if they use large image). If I use type = \"large\" or \"normal\" or \"small\" in path graph then I get image but It's not square and It's not selection vi...
{"title":"How to find out Subversion repository version?","tags":["svn"],"question_text":"How can I determine current version of my repository to see if I need to upgrade it (svnadmin upgrade)?\nIn reality I'm hosting SVN with 3rd party and I want to find out if I need to ask them to upgrade my repos or not.\nI'm askin...
{"title":"Regular Expression Rules in Outlook 2007?","tags":["regex","vba","vbscript","outlook-vba","outlook-2007"],"question_text":"Is it possible to create rules in Outlook 2007 based on a regex string?\nI'm trying to add a filter for messages containing a string such as:\n`4000-10`\n, a four digit number followed by...
{"title":"How to put an image in the center of navigationBar of a UIViewController?","tags":["ios","uinavigationbar"],"question_text":"I have this snippet of code used in viewDidLoad of a UIViewController. I'va no errors. Images exists. I get the background but not the image. Image is a sort of logo.\n`if ([self.naviga...
{"title":"Asp.net mvc 4 on iis6: \"The page cannot be found\"","tags":["iis-6","asp.net-mvc-4"],"question_text":"I am having trouble getting ASP.Net MVC 4 running on IIS 6.\nFirst, i got \"Directory listing denied\"\nand that already solved after I setup extensionless urls based on Phil Haack's blog post:\nASP.NET MVC ...
{"title":"Spring MVC 3 Validation - Unable to find a default provider","tags":["java","validation","spring","spring-mvc","hibernate-validator"],"question_text":"I get an error when trying to set up Spring MVC validation.\n`javax.validation.ValidationException: Unable to find a default provider`\nI read in the documents...
{"title":"Setting ngTrueValue and ngFalseValue to numbers","tags":["angularjs","checkbox","angular-ngmodel"],"question_text":"I have bound a checkbox to a value:\n`<input type=\"checkbox\" ng-model=\"checkbox\" ng-true-value=\"1\" ng-false-value=\"0\" \/>`\nThe value of the checkbox is set to 1 in the controller:\n`fun...
{"title":"requireJS optimizer does not include nested require calls","tags":["javascript","requirejs"],"question_text":"I'm reading through the optimizer documentation for quite a while, but it seems like I can't figure it. The doc says:\nThe optimizer will only combine modules that are specified in arrays\n of string ...
{"title":"SQL Server: How to get all child records given a parent id in a self referencing table","tags":["sql","sql-server-2005","recursion","hierarchy"],"question_text":"Hi I have a table which references itself and I need to be able to select the parent and all it's child records from a given parent Id.\nMy table is...
{"title":"Why is the Aux technique required for type-level computations?","tags":["scala","types","shapeless","type-level-computation"],"question_text":"I'm pretty sure I'm missing something here, since I'm pretty new to Shapeless and I'm learning, but when is the Aux technique actually\nrequired\n? I see that it is us...
{"title":"Equivalence Class Testing vs. Boundary Value Testing","tags":["testing","software-engineering","black-box"],"question_text":"I understand how equivalence testing works. How is it the same or different from boundary value testing?","answer_text":"Equivalence Class Testing\nEC Testing is when you have a number ...
{"title":"How to restrict a program to a single instance","tags":["c#"],"question_text":"I have a console application in C# and I want to restrict my application to run only one instance at a time. How do I achieve this in C#?","answer_text":"I would use a\nMutex\n`static void Main()\n {\n string mutex_id = \"MY_APP\";...
{"title":"how to undo git add before commit","tags":["git","version-control"],"question_text":"Possible Duplicate:\nUndo git add before commit\nWhen i was working on my project I accidently added files using the following command\n`git add file`\nI haven't yet run\n`git commit.`\nHow can I undo or remove these newly ad...
{"title":"How to choose between DTD and XSD","tags":["xml","xsd","dtd"],"question_text":"I want to use either a DTD or an XSD to describe my XML document. I've read that XSDs are better than DTDs since they support namespaces and data types, and that DTDs are older.\nDoes this mean that I should only use XSDs for all f...
{"title":"UIScrollView with pagination + showing part of the previous\/following pages","tags":["ios","iphone","objective-c","uiscrollview","programmatically-created"],"question_text":"I'm trying to create a kind of a \"game mode\" menu similar to the one used by the \"Cut the Rope\" game to select the level pack:\nWha...
{"title":"Python : Getting the Row which has the max value in groups using groupby","tags":["python","pandas"],"question_text":"I hope I can find help for my question. I am searching for a solution for the following problem:\nI have a dataFrame like:\n`Sp Mt Value count\n0 MM1 S1 a **3**\n1 MM1 S1 n 2\n2 MM1 S3 cb 5\n3...
{"title":"Golang: How to pad a number with zeros when printing?","tags":["go"],"question_text":"How can I print a number or make a string with zero padding to make it fixed width?\nFor instance, if I have the number\n`12`\nand I want to make it\n`000012`\n.","answer_text":"The fmt package can do this for you:\n`fmt.Pri...
{"title":"UIButton can't be touched while animated with UIView animateWithDuration","tags":["iphone","objective-c","ios","core-animation","uiviewanimation"],"question_text":"I have the following code:\n`[UIView animateWithDuration:0.3\n delay:0.0\n options:UIViewAnimationCurveEaseOut | UIViewAnimationOptionAllowUserInt...
{"title":"Does a C++11 range-based for loop condition get evaluated every cycle?","tags":["c++","performance","for-loop","c++11","foreach"],"question_text":"`for(auto& entity : memoryManager.getItems()) entity->update(mFrameTime);`\nIf memoryManager contains 1000 items, does\n`memoryManager.getItems()`\nget called 1000...
{"title":"calling javascript on rendering views in BackBone js. post-render callback?","tags":["javascript","view","backbone.js"],"question_text":"behold, a backbone view render call:\n`render: function() {\n $(this.el).html(this.template({title: 'test'})); \/\/#1\n this.renderScatterChart();\n return this;\n},`\nso, I...
{"title":"d3.js and document.onReady","tags":["javascript","d3.js"],"question_text":"I'm just getting started with\nd3.js\nand there is one detail which is completely eluding me: how do I have my code execute only after the DOM is ready to receive input?\nI could, of course, use something like jQuery but that seems exc...
{"title":"How to reduce the space between <p> tags?","tags":["html","css"],"question_text":"I have a page that I'm converting to PDF. This page contains a number of paragraphs and they don't all fit onto a single page. If I could reduce the spacing between the\n`<p>`\ntags, this would help fit more. Is this possible? T...
{"title":"Getting started with NHibernate 3.2 Loquacious API","tags":["c#","nhibernate","mapping-by-code"],"question_text":"I'm starting a new project and I want to use NHibernate 3.2. I know that it can now do something similar to FluentNHibernate and I want to give it a try.\nBut I am having a hard time finding docum...
{"title":"Changing development team in iTunes Connect","tags":["iphone","app-store","itunesconnect"],"question_text":"I'm a member of two Apple development programs and I'm trying to upload a new app. The problem is that every time I log in to itunesconnect it logs me in to one team and I can't find a way to switch tea...