text
stringlengths
74
309k
{"title":"Maximize code tab in eclipse shortcut","tags":["eclipse","editor"],"question_text":"Is there any shortcut for maximizing the tab you are working on in Eclipse? Assume I am working on part of a code and I want to maximize the tab not using the double click on it with the mouse, does anyone know a way?","answer...
{"title":"How to avoid deprecation warning for stub_chain in RSpec 3.0?","tags":["ruby-on-rails","rspec"],"question_text":"When I run a test with stub_chain, I'll get a deprecation warning.\n`describe \"stubbing a chain of methods\" do\n subject { Object.new }\n context \"given symbols representing methods\" do\n it \"...
{"title":"Can you mass edit all files returned in a grep?","tags":["search","vim","command-line","sed","grep"],"question_text":"I want to mass-edit a ton of files that are returned in a grep. (I know, I should get better at sed).\nSo if I do:\n`grep -rnI 'xg_icon-*'`\nHow do I pipe all of those files into vi?","answer_...
{"title":"How can I get a SQL dump of a SQL Server 2008 database?","tags":["sql-server-2008","dump"],"question_text":"How can I get a SQL dump of a SQL Server 2008 database? That is, a .sql file with inserts to regenerate the data in another database, much like mysqldump.","answer_text":"From SQL Server Management Stud...
{"title":"IIS 7.5 remove etag headers from response","tags":["iis","caching","http-headers","iis-7.5","etag"],"question_text":"I know this question has been asked alot of times, however most of them were in 2009-2010.\nI am pretty sure a while back a project I was working on removed them, however I cannot find any way ...
{"title":"Zoom and center a Google Map according to its markers (JavaScript API V3)","tags":["javascript","google-maps","google-maps-api-3"],"question_text":"I think the title is enough, I don't even see how to do this for the V2 and V1 API :\/\nThanks :)","answer_text":"As the other answers suggested, the\n`fitBounds(...
{"title":"Django check if object in ManyToMany field","tags":["django","django-models","django-views"],"question_text":"I have quite a simple problem to solve. I have Partner model which has >= 0 Users associated with it:\n`class Partner(models.Model):\n name = models.CharField(db_index=True, max_length=255)\n slug = m...
{"title":"What's a nice method to factor gaussian integers?","tags":["algorithm","math","complex-numbers","prime-factoring","number-theory"],"question_text":"I already have prime factorization (for integers), but now I want to implement it for gaussian integers but how should I do it? thanks!","answer_text":"This turne...
{"title":"WPF Image Control with Click Event","tags":["wpf","xaml"],"question_text":"I wish to use an\n`<Image>`\nin my WPF Application which responds to mouse clicks. Only the 'Mouse Up' and 'Moue Down' events are available out of the box. I find this rather particular. Is there a way to extend the control or a way to...
{"title":"Unable to run app in Simulator XCode 6.0","tags":["ios","ios8","xcode6","ios-simulator"],"question_text":"After migrating from XCode 5.0 to XCode 6.0 the project fails to run with the following error.\n`An error was encountered while running (Domain = FBSOpenApplicationErrorDomain,\nCode = 4)`\nAny suggestion...
{"title":"How to print stacktrace for an exception Android","tags":["android","android-logcat"],"question_text":"I want to print the stack trace because at the moment I have this running.\n`} catch (IOException e) {\n throw new Error(\"Copying Failed\");\n}`\nAnd I have been told to print\n`e.stacktrace();`\nHow do I d...
{"title":"What is OSGi and what are some examples of its use?","tags":["terminology","osgi"],"question_text":"I've just started hearing the term\nOSGi\nbeing used (while reading tutorials on common Java EE containers such as GlassFish and Spring), however I have been unable to find a simple, straight-forward, easy-to-u...
{"title":"Bootstrap 3 grid with no gap","tags":["css","twitter-bootstrap","twitter-bootstrap-3"],"question_text":"I am trying to create a 2 column grid, with literally a 50% with no margins or padding.\nHow do I achieve this with Bootstrap 3 I tried this but end up with negative margins at tablet\/desktop break points:...
{"title":"Build only one project in a solution from command line","tags":["c#","visual-studio-2010","msbuild"],"question_text":"I have a solution with lots of solution folders with lots of c# projects inside them.\nHow do I build\/rebuild only one of those projects from command line?\nI guess there's some way to do it ...
{"title":"Problem using NSURLRequest to POST data to server","tags":["iphone","cocoa-touch","http"],"question_text":"I create an\n`NSURLRequest`\nto post my data in the iPhone application to a server to proceed the PHP script. My PHP script is look like this.\n`<?php\n $name = $_POST['name'];\n $email = $_POST['email']...
{"title":"Update using LINQ to SQL","tags":["linq","linq-to-sql"],"question_text":"How can I update a record against specific id in LINQ to SQL?","answer_text":"LINQ is a query tool (Q = Query) - so there is no magic LINQ way to update just the single row, except through the (object-oriented) data-context (in the case ...
{"title":"How do you prevent a windows from being moved?","tags":["c#",".net","winforms","user-interface"],"question_text":"How would i go about stopping a form from being moved. I have the form border style set as FixedSingle and would like to keep it this way because it looks good in vista :)","answer_text":"Take a l...
{"title":"Has Mongoose support findAndModify Mongodb method?","tags":["mongodb","mongoose"],"question_text":"Below is the code throwing error \"TypeError: Object # has no method 'findAndModify'\"\nPlease help me on this!\n`\/\/ defining schema for the \"counters\" table\nvar tableSchema = new Schema({\n _id :String,\n ...
{"title":"Complex type is getting null in a ApiController parameter","tags":["c#","ajax","json","asp.net-web-api"],"question_text":"I don\u00c2\u00b4t know why my parameter \"ParametroFiltro Filtro\" is getting null, the other parameters \"page\" and \"pageSize\" is getting OK.\n`public class ParametroFiltro\n{\n publi...
{"title":"how to change jQuery autocomplete plugin default querystring key? (term to that i want)","tags":["jquery","jquery-plugins","autocomplete"],"question_text":"jQuery autocomplete plugin sent request like this\n`mysite.com\/suggestion?term=Sadegh`\nis there any way to change term querystring key to another? i can...
{"title":"Django default_from_email name","tags":["django","django-settings","django-email"],"question_text":"I am looking to add a name to my default_from_email address in Django and wanted to know whether you do this through the settings.py file?\nyou have your different options.\n`DEFAULT_FROM_EMAIL\nEMAIL_HOST\nEMA...
{"title":"Setting the HTML <label> 'for' attribute in JavaScript","tags":["javascript","dom"],"question_text":"How do you set the\n`for`\nattribute of an HTML\n`<label>`\nelement in JavaScript, without using jQuery or any other library?","answer_text":"Use the\n`htmlFor`\nattribute. I assume it has a slightly cryptic n...
{"title":"Pandas aggregate count distinct","tags":["python","pandas"],"question_text":"Let's say I have a log of user activity and I want to generate a report of total duration and the number of unique users per day.\n`import numpy as np\nimport pandas as pd\ndf = pd.DataFrame({'date': ['2013-04-01','2013-04-01','2013-...
{"title":"How to check if a variable is a number or a string?","tags":["ruby"],"question_text":"How to check if a variable is a number or a string in Ruby?","answer_text":"There are several ways:\n`>> 1.class #=> Fixnum\n>> \"foo\".class #=> String\n>> 1.is_a? Numeric #=> true\n>> \"foo\".is_a? String #=> true`","quest...
{"title":"The \"&\" character breaks passwords that are stored in the web.config","tags":["c#","asp.net",".net","asp.net-mvc","configuration"],"question_text":"I have an ASP.NET MVC3 C# .NET Application running on IIS 7.5.\nWe have a Windows NT service account we Impersonate in our code in order to read\/write document...
{"title":"jQuery match only part of id from div","tags":["jquery"],"question_text":"I ran into an unusual situation yesterday night.\nI need to match only part of id. Let me clear you all with an example\nI have few divs like\n`<div id=\"sales_info_1\">... ...... ...... ...... ...<\/div>\n<div id=\"sales_info_2\">... ....
{"title":"How to access previous\/next element while for looping?","tags":["python"],"question_text":"Is there a way to access a list(or tuple, or other iterable)'s next, or previous element while looping through with for loop?\n`l=[1,2,3]\nfor item in l:\n if item==2:\n get_previous(l,item)`","answer_text":"Expressed ...
{"title":"Is there any way to extend an object?","tags":["scala"],"question_text":"In scala, we cannot extend\n`object`\n:\n`object X \nobject Y extends X`\ngives an error\n`error: not found: type X`\nIn my case someone has defined some functionality in an object and I need to extend it (basically add another method). ...
{"title":"Difference between Color.red and Color.RED","tags":["java","colors"],"question_text":"What's the real difference between definitions for\n`setXxx(Color.red)`\nand\n`setXxx(Color.RED)`\n?\nI've found the following explanation on the web. Is it all about naming conventions?\nJava originally defined a few color ...
{"title":"Install Docker Toolbox on a Mac via command line","tags":["osx","automation","docker","docker-toolbox"],"question_text":"I am trying to automate setting up a developer environment on Mac. Part of that setup is installing the\nDocker Toolbox\n. I cannot find any documentation on how do to this via command line...
{"title":"Why do I get this unexpected result using atoi() in C?","tags":["c","atoi"],"question_text":"I don't understand the results of the following C code.\n`main()\n{\n char s[] = \"AAA\";\n advanceString(s);\n}\nvoid advanceString(p[3])\n{\n int val = atoi(p);\n printf(\"The atoi val is %d\\n\",val);\n}`\nHere the...
{"title":"Pickle or json?","tags":["python","json","pickle"],"question_text":"I need to save to disk a little\n`dict`\nobject which keys are\n`str`\ns and values are\n`int`\ns\nand then recover it\n. Something like this:\n`{'juanjo': 2, 'pedro':99, 'other': 333}`\nWhat is the best option and why? Serialize it with\n`pi...
{"title":"sql query distinct with Row_Number","tags":["sql","distinct"],"question_text":"i am fighting with the distinct keyword in\n`sql`\n.\ni just want to display all row numbers of unique (\n`distinct`\n) values in a column & so i tried :\n`SELECT distinct id, ROW_NUMBER() OVER (ORDER BY id) AS RowNum\n FROM table\...
{"title":"Why do we need message brokers like rabbitmq over a database like postgres?","tags":["postgresql","redis","rabbitmq","message-queue","celery"],"question_text":"I am new to message brokers like\n`rabbitmq`\nwhich we can use to create tasks \/ message queues for a scheduling system like\n`celery`\n.\nNow, here ...
{"title":"Import JSON data into Google Spreadsheet","tags":["javascript","google-spreadsheet","google-apps-script"],"question_text":"I am pulling data down from a webservice and it is formated as JSON. I am writing a google apps script for google spreadsheet that will populate the data for me. my problem is, I can't se...
{"title":"Pass by value faster than pass by reference","tags":["c++","pass-by-reference","pass-by-value"],"question_text":"I made a simple program in c++ to compare performance between two approaches - pass by value and pass by reference. Actually pass by value performed better than pass by reference.\nThe conclusion s...
{"title":"How to automate development environment setup?","tags":["automation","agile","development-environment","scrum"],"question_text":"Every time a new developer joins the team or the computer a developer is using changes, the developer needs to do lots of work to setup the local development environment to make the...
{"title":".NET - vs EJB","tags":["java",".net","ejb"],"question_text":"What is the comparable technology of EJB (Enterprise Java Beans) in .net?","answer_text":"Definition of terms is important\nWhen doing comparisons, the definition of terms is important. EJB is a\ncomponent model. It defines persistence, transaction,...
{"title":"Post parameter is always null","tags":["c#",".net","asp.net-web-api","asp.net-web-api-routing"],"question_text":"Since upgrading to RC for WebAPI I'm having some real odd issue when calling POST on my WebAPI.\nI've even gone back to the basic version generated on new project. So:\n`public void Post(string val...
{"title":"Subset of Array in C#","tags":["c#","arrays"],"question_text":"If I have an array with 12 elements and I want a new array with that drops the first and 12th elements. For example, if my array looks like this:\n`__ __ __ __ __ __ __ __ __ __ __ __\na b c d e f g h i j k l\n__ __ __ __ __ __ __ __ __ __ __ __`\...
{"title":"Start and Stop Profiling from Javascript in Chrome","tags":["javascript","google-chrome"],"question_text":"I would love to be able to start and stop the CPU Profiler in the Chrome developer window by making a javascript call. Something like:\n`chrome.cpuprofiler.start(); \n\/\/do expensive operation \nchrome....
{"title":"Error saving in the keychain with iphone sdk","tags":["iphone","ios4","keychain"],"question_text":"I use the\nApple wraper for the keychain\n, and try to save a item on it (running in simulator, ios 4.1).\nI have not experience with the keychain before.\nI get this error:\nCouldn't add the Keychain Item. Erro...
{"title":"What is a magento quote?","tags":["model-view-controller","magento"],"question_text":"I can't understand what is a quote. Can someone give a detailed answer on what are magento quotes, what data they store, what's their lifetime and other relevant information?\nEdit: Please notice the difference: Magento vs M...
{"title":"Combine static libraries","tags":["objective-c","c","xcode","static-libraries"],"question_text":"I tried the approach in this\nquestion\n, but it seems the linux version of\n`ar`\nis not the same as the mac version since I failed to combine the object files again.\nWhat I basically want to do is is merge anot...
{"title":"How to make a machine trust a self-signed Java application","tags":["java","security","certificate","java-web-start","self-signed"],"question_text":"I'm deploying an application using\nJAWS\n, and it worked until late 2013 when I got a warning, and then this morning Java completely blocked it. The message in ...
{"title":"Convert to Method Group Resharper","tags":["c#","resharper"],"question_text":"I have written a method below like this:\n`internal static IList<EmpowerTaxView> GetEmpowerTaxViewsByLongAgencyAndAgencyTaxTypes(\n IList<EmpowerCompanyTaxData> validEmpowerCompanyTaxDatas,\n IList<EmpowerTaxView> empowerTaxViews)\n...
{"title":"What are the different doctypes in html and what do they mean?","tags":["html","xhtml","doctype"],"question_text":"As the title describes, what are the different doctypes available and what do they mean? I notice that the layout looks a little different in IE7 when I switch from\n`<!DOCTYPE HTML PUBLIC \"-\/\...
{"title":"Sql Server Management Studio Object Explorer dissapeared - missing - vanished","tags":["sql-server","ssms"],"question_text":"The SQL Server Management Studio\n`Object Explorer`\nmenu disappeared. The shortcut\n`F8`\nand the\n`view->object explorer`\nmethod neither do anything. I have clicked everything on the...
{"title":"Choosing the right IOS XML parser","tags":["iphone","xml","parsing","sdk"],"question_text":"So There are a million different XML parsers for the iPhone. I have a medium sized XML file that contains alot of duplicate tags (at different points in the hierarchy). I was thinking about TBXML but I was concerned ab...
{"title":"Mocking Asp.net-mvc Controller Context","tags":["asp.net-mvc","unit-testing","mocking","moq","rhino-mocks"],"question_text":"So the controller context depends on some asp.net internals. What are some ways to cleanly mock these up for unit tests? Seems like its very easy to clog up tests with tons of setup whe...
{"title":"Using FolderBrowserDialog in WPF application","tags":["c#",".net","wpf","folderbrowserdialog","windowsformsintegration"],"question_text":"I have a WPF application that I need to have users access directories in. I have searched to the end of the world on how to integrate windows forms into WPF and have found ...
{"title":"Short and sweet sequence of integers in Java","tags":["java","arrays","collections","guava","apache-commons"],"question_text":"There must be a short and sweet way to generate a\n`List<Integer>`\n, or perhaps an array of\n`Integer`\nor\n`int`\n, with sequential values from some start value to an end value.\nTh...
{"title":"How to make an API call using meteor","tags":["javascript","json","api","twitter","meteor"],"question_text":"Ok here is the twitter API,\n`http:\/\/search.twitter.com\/search.atom?q=perkytweets`\nCan any one give me any hint about how to go about calling this API or link using\nMeteor\nUpdate::\nHere is the c...
{"title":"Concurrency model: Erlang vs Clojure","tags":["concurrency","clojure","erlang"],"question_text":"We are going to write a concurrent program using Clojure, which is going to extract keywords from a huge amount of incoming mail which will be cross-checked with a database.\nOne of my teammates has suggested to u...
{"title":"Eclipse Android project, how to reference library within workspace?","tags":["android","eclipse","ide"],"question_text":"I followed some steps I found here (can't find the URL right now, sorry) to convert my Android project in Eclipse to a layout where 99.9% of my code is in a library project, and then I have...
{"title":"NSDate substract one month","tags":["iphone","objective-c","nsdate","nsdatecomponents"],"question_text":"I want two NSInteger year, month to go one month back. e.g. now is\n2011-01\nhow can i get\n2010-12\n. adding is one thing, but i want to substract. hope someone could help me a bit out here.\n`NSDate *dat...
{"title":"A regex to match a substring that isn't followed by a certain other substring","tags":["java","regex","clojure"],"question_text":"I need a regex that will match\n`blahfooblah`\nbut not\n`blahfoobarblah`\nI want it to match only foo and everything around foo, as long as it isn't followed by bar.\nI tried using...
{"title":"Difference between fflush and fsync","tags":["c","windows","fsync","fflush"],"question_text":"I thought fsync() does fflush() internally so using fsync() on a stream is OK. But i am getting unexpected result when executed under network I\/O.\nMy code snippet:\n`FILE* fp = fopen(file,\"wb\"); \n \/* multiple f...
{"title":"How to use <spring:url \/> with an <a> tag?","tags":["spring","spring-mvc","jstl"],"question_text":"Can I use\n`<spring:url value=\"\/something\" \/>`\ninside of an\n`<a>`\ntag?","answer_text":"`<spring:url value=\"\/something\" var=\"url\" htmlEscape=\"true\"\/>\n <a href=\"${url}\">...<\/a>`\nBut you an als...
{"title":"comment and uncomment a block of code","tags":["java","netbeans"],"question_text":"Is there a shortcut in NetBeans to highlight a block of code and comment\/uncomment it?","answer_text":"Try this combination in the Netbeans Editor:\nctrl\n+\nshift\n+\nc","question_code":[],"answer_code":[],"retrieval_text":"\...
{"title":"How can I check a C# variable is an empty string \"\" or null?","tags":["c#"],"question_text":"Possible Duplicate:\nEasier way of writing null or empty?\nI am looking for the simplest way to do a check. I have a variable that can be equal to \"\" or null. Is there just one function that can check if it's not ...
{"title":"Count number of files within a directory in Linux (not using wc)","tags":["linux"],"question_text":"To count the number of files in a directory, I typically use\n`ls directory | wc -l`\nBut is there another command that doesn't use\n`wc`\n?","answer_text":"this is one:\n`ls -l . | egrep -c '^-'`\nNote:\n`ls -...
{"title":"Best C++ RTP\/RTSP library","tags":["c++","udp","sip","rtp","rtsp"],"question_text":"I'm looking for a RTP\/RTSP library in C++. I found\npjsip\nbut it is more C-style. I'm looking for more OO library.","answer_text":"check\nlive555\nUseful libraries and code examples of how to stream stuff from your own app\...
{"title":"How is Lisp's read-eval-print loop different than Python's?","tags":["python","functional-programming","lisp","read-eval-print-loop"],"question_text":"I've encounter a following\nstatement by Richard Stallman\n:\n'When you start a Lisp system, it enters a read-eval-print loop. Most other languages have nothin...
{"title":"Get an attribute of a dom node","tags":["java","xml","jaxp"],"question_text":"I am trying to get an attribute of an xml node example:\n`<Car name=\"Test\">\n<\/Car>`\nI want to grab the name attribute of the car node.\n`DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\nDocumentBuilder db = d...
{"title":"Hive: Convert String to Integer","tags":["hadoop","hive"],"question_text":"I am looking for a Built-in UDF to convert values of a string column to integer in my hive table for sorting using SELECT and ORDER BY. I searched in the Language Manual, but no use. Any other suggestions also welcome.","answer_text":"...
{"title":"Click table rows to select checkbox using jQuery","tags":["jquery","checkbox","html-table"],"question_text":"As I didn't find any question asked before, on how to toggle checkbox on click of a table row, so I would like to share my approach to this...","answer_text":"Inorder to select checkbox of a row inside...
{"title":"How to limit iOS keyboard to numeric input","tags":["ios","keyboard","numeric"],"question_text":"The question pretty much says it all. Is there any way to have the iOS\/iPhone keyboard default to numeric input?","answer_text":"Set the\n`keyboardType`\nproperty of the\n`UITextField`\nto\n`UIKeyboardTypeDecimal...
{"title":"How to getting browser current locale preference using javascript?","tags":["javascript","internet-explorer","firefox","google-chrome","culture"],"question_text":"Does anyone know how to obtain the browser culture from Firefox and Google Chrome using javascript? Note: This is an asp.net 3.5 web application.\n...
{"title":"How does typedef-ing a block works","tags":["objective-c","objective-c-blocks","typedef"],"question_text":"In C\/Obj-C, we do a typedef like this\n`typedef int MYINT;`\nwhich is clear.\nDoing typedef for a block -\n`typedef void (^MyBlock) (int a);`\nNow, we can use\n`MyBlock`\n.\nShouldn't it be like -\n`typ...
{"title":"How to show custom failure messages in ScalaTest?","tags":["scala","scalatest","matcher"],"question_text":"Does anyone know how to show a custom failure message in ScalaTest?\nFor example:\n`NumberOfElements() should equal (5)`\nShows the following message when it fails:\n10 did not equal 5\nBut i want more d...
{"title":"Compare if two variables reference the same object in python","tags":["python"],"question_text":"How to check whether two variables reference the same object?\n`x = ['a', 'b', 'c']\ny = x # x and y reference the same object\nz = ['a', 'b', 'c'] # x and z reference different objects`","answer_text":"Thats what...
{"title":"How to convert DateTime to Eastern Time","tags":["c#","asp.net","datetime"],"question_text":"I'm trying to create an application that triggers some code when the financial markets are open. Basically in pseudo code:\n`if(9:30AM ET < Time.Now < 4:00PM ET) {\/\/do something}`\nIs there a way I can do this using...
{"title":"Printing to the console in Google Apps Script?","tags":["google-apps-script"],"question_text":"I am very new to programming (have taken some of the JS courses on Codecademy). I am trying to create a simple script to determine, if given a spreadsheet with results from a poker game, who should pay whom. I opene...
{"title":"Android BOOT_COMPLETED not received when application is closed","tags":["android","bootcompleted"],"question_text":"I am aware that this question has been asked a lot on the site, however, I cant seem to find a solution. My BOOT_COMPLETED receiver is not called when the application is not running.\nManifest:\...
{"title":"Pros and Cons of Listeners as WeakReferences","tags":["java","design-patterns","observer-pattern","weak-references"],"question_text":"What are the pros and cons of keeping listeners as WeakReferences.\nThe big 'Pro' of course is that:\nAdding a listener as a WeakReference means the listener doesnt need to bot...
{"title":"Internal mechanism of sizeof in C?","tags":["c","gcc","sizeof","flexible-array-member"],"question_text":"I use sizeof to get size of a struct in C, but the result I got is unexpected.\n`struct sdshdr {\n int len;\n int free;\n char buf[];\n};\nint main(){\n printf(\"struct len:%d\\n\",(sizeof(struct sdshdr)))...
{"title":"Silverlight vs Flex","tags":[".net","flex","flash","silverlight"],"question_text":"My company develops several types of applications. A lot of our business comes from doing multimedia-type apps, typically done in Flash. However, now that side of the house is starting to migrate towards doing Flex development....
{"title":"iPhone simulator - simulate 3G connection","tags":["iphone","ios4","ios-simulator"],"question_text":"I am testing the Reachability api, but my physical device only has WiFi access, as I don't have a phone contract. My code needs to distinguish between being connected to 3G\/2G or WiFi. Is it possible to simul...
{"title":"Alert Dialog Two Buttons","tags":["android","alertdialog"],"question_text":"Hello all i have a simple problem i have a alertDialog and i want it to show two buttons i have searched here but it seems the options before don't work anymore and are deprecated.\nAnyone know the new way of doing this you can see my...
{"title":"What are workers, executors, cores in Spark Standalone cluster?","tags":["apache-spark","distributed-computing"],"question_text":"I read\nCluster Mode Overview\nand I still can't understand the different processes in the\nSpark Standalone cluster\nand the parallelism.\nIs worker a JVM process or not? I ran th...
{"title":"How to remove duplicates based on a key in Mongodb?","tags":["mongodb","optimization","duplicates","key"],"question_text":"I have a collection in MongoDB where there are around (~3 million records). My sample record would look like,\n`{ \"_id\" = ObjectId(\"50731xxxxxxxxxxxxxxxxxxxx\"),\n \"source_references\...
{"title":"Parse Starter Project LogIn and Register View Controllers Errors","tags":["ios","parse.com"],"question_text":"When I tried to use the Parse Starter Project (I downloaded it and installed it as per the instructions, but I don't have a developer's license yet, so no push notifications), I got six errors, all ab...
{"title":"-bash: cordova: command not found; or -bash: phonegap: command not found","tags":["cordova"],"question_text":"I am not going to ask a question, but answer one, as I have found this advice nowhere online thus far and have just figured this out myself. It's good to share, right?\nSo on the command line, I did t...
{"title":"System.Runtime.Caching.MemoryCache vs HttpRuntime.Cache - are there any differences?","tags":["c#","asp.net-mvc","c#-4.0","caching"],"question_text":"I'm wondering if there are any differences between\n`MemoryCache`\nand\n`HttpRuntime.Cache`\n, which one is preferred in ASP.NET MVC projects?\nAs far as I unde...
{"title":"jqGrid - How to remove the page selection on the pager but keep the buttons?","tags":["javascript","jquery","jqgrid"],"question_text":"I want to remove the paging buttons on the grid, but I want to keep the add, edit, refresh, etc buttons on the bottom left. I don't want the pager there because I will be disp...
{"title":"Determine if uploaded file is image (any format) on MVC","tags":["c#","asp.net-mvc","razor"],"question_text":"So I'm using this code for view:\n`<form action=\"\" method=\"post\" enctype=\"multipart\/form-data\">\n <label for=\"file\">Filename:<\/label>\n <input type=\"file\" name=\"file\" id=\"file\" \/>\n <...
{"title":"Match everything except for specified strings","tags":["regex"],"question_text":"I know that the following regex will match \"red\", \"green\", or \"blue\".\n`red|green|blue`\nIs there a straightforward way of making it match everything\nexcept\nseveral specified strings?","answer_text":"If you want to make s...
{"title":"SVN keeps corrupting files with \"<<<<<<< .mine\", how to fix?","tags":["c#","visual-studio","svn","tortoisesvn","ankhsvn"],"question_text":"I've got a Visual Studio C# project which is under version control (SVN).\nI've always commited and updated the project without any problems. But a couple of hours ago V...
{"title":"Send to multiple recipients in Rails with ActionMailer","tags":["ruby-on-rails-3","actionmailer"],"question_text":"I'm trying to send multiple emails based on a boolean value in my database. The app is a simple scheduling app and user can mark their shift as \"replacement_needed\" and this should send out ema...
{"title":"Can I have a UIBarButtonItem with a colored image?","tags":["iphone","objective-c","uibarbuttonitem"],"question_text":"I have an image that I want to display on a UIBarButtonItem, but for some reason it only shows the outline of it and the rest is all white. How can I have it actually display the image?\nThan...
{"title":"Put and get String array from shared preferences","tags":["android","arrays","string","sharedpreferences"],"question_text":"I need to save on shared preferences some array of Strings and after that to get them. \nI tried this :\n`prefsEditor.putString(PLAYLISTS, playlists.toString());`\nwhere playlists is a\n...
{"title":"not-null property references a null or transient value","tags":["hibernate"],"question_text":"Facing trouble in saving parent\/child object with hibernate. Any idea would be highly appreciated.\n`org.hibernate.PropertyValueException: not-null property references a null or transient value: example.forms.Invoic...
{"title":"Django: 400 bad request syntax - what does this message mean?","tags":["django","http","hex","ascii","http-status-code-400"],"question_text":"I am using django to build a simple website. When you type the base address (which for now is 127.0.0.1:8000\/), I use django to show a view which does some checks and ...
{"title":"Android: Providing recent search suggestions without searchable activity?","tags":["java","android","searchview"],"question_text":"I have an ActionBar SearchView and I am successfully able to make searches with it. The android documentation does not explain how to implement search suggestions. I do not want t...
{"title":"SortedList vs. SortedDictionary vs. Sort()","tags":[".net","performance","sorting","sortedlist","sorteddictionary"],"question_text":"This is a continuation of questions like\nthis one\n.\nAre there any guidelines for tweaking the performance? I don't mean gains in big-O, just saving some linear time.\nFor exa...
{"title":"Creating a Huge Dummy File in a Matter of Seconds in C#","tags":["c#","file-io"],"question_text":"I want to create a huge dummy file say 1~2 GBs in matter of seconds.\nhere is what I've written in C# :\n`file.writeallbytes(\"filename\",new byte[a huge number]);`\nand another way with indicating the status, wa...
{"title":"Array of Function Pointers Without a typedef","tags":["c++","arrays","syntax","function-pointers","typedef"],"question_text":"Arrays of function pointers can be created like so:\n`typedef void(*FunctionPointer)();\nFunctionPointer FunctionPointers[] = {\/* Stuff here *\/};`\nWhat is the syntax for creating a ...
{"title":"C\/C++ macro\/template blackmagic to generate unique name","tags":["c++","c-preprocessor","raii"],"question_text":"Macros are fine.\nTemplates are fine.\nPretty much whatever it works is fine.\nThe example is OpenGL; but the technique is C++ specific and relies on no knowledge of OpenGL.\nPrecise problem:\nI ...
{"title":"Finding specific pixel colors of a BitmapImage","tags":["wpf","image-processing","bitmap"],"question_text":"I have a WPF BitmapImage which I loaded from a .JPG file, as follows:\n`this.m_image1.Source = new BitmapImage(new Uri(path));`\nI want to query as to what the colour is at specific points. For example,...