text
stringlengths
74
309k
{"title":"What is the \"proper\" way to cast Hibernate Query.list() to List<Type>?","tags":["java","hibernate","generics"],"question_text":"I'm a newbie with Hibernate, and I'm writing a simple method to return a list of objects\nmatching a specific filter.\n`List<Foo>`\nseemed a natural return type.\nWhatever I do, I ...
{"title":"Questions about the Prototype Pattern","tags":["design-patterns","prototype-pattern"],"question_text":"I am learning about the different design patterns and I have a strong feeling I am missing an essential piece (or pieces) in understanding this particular pattern.\nIn all the websites I have viewed and in t...
{"title":"Creating directory hard links in MacOS X?","tags":["osx","hardlink"],"question_text":"How can I create a hard link to a directory in OSX?\nThis feature has been added to their file system in 10.5 (for time machine), but I could not find any information on actually using it from the command line.","answer_text...
{"title":"What do 1.#INF00, -1.#IND00 and -1.#IND mean?","tags":["c++","c"],"question_text":"I'm messing around with some C code using floats and I'm getting 1.#INF00, -1.#IND00 and -1.#IND when I try to print floats in the screen. What does those values mean? I believe that 1.#INF00 means positive infinity, but what a...
{"title":"Limitations of Visual Studio 2012 Express Desktop","tags":["visual-studio","visual-studio-2012","desktop"],"question_text":"I'm in the process of deciding whether or not to use Visual Studio 2012 Express for Desktop or purchase a retail copy of Visual Studio 2012 Professional for my desktop program. The progr...
{"title":"Check if a hash's keys include all of a set of keys","tags":["ruby"],"question_text":"I'm looking for a better way to do\n`if hash.key? :a &&\n hash.key? :b &&\n hash.key? :c &&\n hash.key? :d`\npreferably something like\n`hash.includes_keys? [ :a, :b, :c, :d ]`\nI came up with\n`hash.keys & [:a, :b, :c, :d] ...
{"title":"Injecting Dependencies in config() modules - AngularJS","tags":["javascript","angularjs"],"question_text":"Currently in app.js i have the following routes:\n`var gm = angular.module('gm', ['gm.services','gm.directives','gm.filters','gm.controllers','ngSanitize']);\ngm.config(['$routeProvider', 'Path', functio...
{"title":"How to render Django forms.ChoiceField as Twitter Bootstrap dropdown","tags":["django","django-forms","twitter-bootstrap","django-crispy-forms"],"question_text":"What is the most efficient way (in terms of programming\/maintenance effort, elegance) to render a Django forms.ChoiceField as a Twitter Bootstrap d...
{"title":"C# - is it possible to mark overriden method as final","tags":["c#",".net","inheritance"],"question_text":"In C#, is it possible to mark an overridden virtual method as final so implementers cannot override it? How would I do it?\nAn example may make it easier to understand:\n`class A\n{\n abstract void DoAct...
{"title":"Arguments in @selector","tags":["iphone","cocoa","cocoa-touch"],"question_text":"Is there any way that I can pass arguments in selector?\nexample:\nI have this method\n`- (void)myMethod:(NSString*)value1 setValue2:(NSString*)value2{\n}`\nand I need to call this function through a selector passing two argument...
{"title":"How to set commands output as a variable in a batch file","tags":["windows","batch-file"],"question_text":"Is it possible to set a statement's output of a batch file to a variable, for example:\n`findstr testing > %VARIABLE%\necho %VARIABLE%`","answer_text":"`FOR \/F \"tokens=* USEBACKQ\" %%F IN (`command`) D...
{"title":"Get BinData UUID from Mongo as string","tags":["mongodb"],"question_text":"I currently have some ids stored in Mongo as UUIDs (necessary for processing). They get returned like this:\n`\"_id\" : new BinData(3, \"JliB6gIMRuSphAD2KmhzgQ==\")`\nWhat would be an easy way to turn this value into a string for debug...
{"title":"How to change the name of a gist in github?","tags":["github","gist"],"question_text":"Is there a way to change the name of a gist (github) ?, apparently it is ordering the files of the gist in alphabetical order, an naming the gist according to the file that appears first.","answer_text":"Even better, you ca...
{"title":"PHP standard input?","tags":["php","file-io","stdin"],"question_text":"I know PHP is usually used for web development, where there\nis\nno standard input, but PHP claims to be usable as a general-purpose scripting language, if you do follow it's funky web-based conventions. I know that PHP prints to\n`stdout`...
{"title":"BIGINT mysql performance compared to INT","tags":["mysql"],"question_text":"I'm trying to find out if my table will get less performant if I change the primary key to BIGINT(20). At the moment, I'm using INT(7) and have about\n300.000 entries already with large IDs (7 or 8 digits)\n.\nI searched a lot already...
{"title":"Very strange behavior of operator 'is' with methods","tags":["python","python-2.7","methods","python-internals"],"question_text":"Why is the first result\n`False`\n, should it not be\n`True`\n?\n`>>> from collections import OrderedDict\n>>> OrderedDict.__repr__ is OrderedDict.__repr__\nFalse\n>>> dict.__repr_...
{"title":"Why don't I need to check if references are invalid\/null?","tags":["c++","reference",null],"question_text":"Reading\nhttp:\/\/www.cprogramming.com\/tutorial\/references.html\n, it says:\nIn general, references should always\n be valid because you must always\n initialize a reference. This means\n that barrin...
{"title":"Property with type SEL in Objective-c","tags":["objective-c","properties","selector"],"question_text":"I'd like to declare a property with type\n`SEL`\nlike this:\n`@property (nonatomic, assign) SEL mySelector;`\nIs \"\n`assign`\n\" correct here? Perhaps\n`assign`\ncan be omitted?","answer_text":"assign is th...
{"title":"iOS can't alloc new object in switch case","tags":["ios","objective-c","switch-statement"],"question_text":"I have a switch case like this:\n`switch ([weatherCode intValue]) {\n case 1:\n ...\n break;\n case 2:\n ....\n break;\n }`\nBut i want to alloc an object in that case, like\n`NSString *string = @\"hell...
{"title":"What is the most efficient way to convert an int to a String?","tags":["java","string"],"question_text":"Say I have:\n`int someValue = 42;`\nNow I want to convert that int value to a String. Which way is more efficient?\n`\/\/ One\nString stringValue = Integer.toString(someValue);\n\/\/ Two\nString stringValu...
{"title":"How I can get the calling methods in C#","tags":["c#","reflection"],"question_text":"Possible Duplicate:\nHow can I find the method that called the current method?\nI need a way to know the name of calling methods in C#.\nFor instance:\n`private void doSomething()\n{\n\/\/ I need to know who is calling me? (m...
{"title":"UIRefreshControl on viewDidLoad","tags":["ios","uitableview","uirefreshcontrol"],"question_text":"I'm using the following code to create a UIRefreshControl:\n`- (void) viewDidLoad\n{\n [super viewDidLoad];\n UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];\n [refreshControl addTarget:self a...
{"title":"AndroidDebugKey Keystore was tampered with, or password was incorrect","tags":["java","android","google-maps","keystore","keytool"],"question_text":"Whenever I enter in the terminal:\nkeytool -list -alias androiddebugkey -keystore ~\/.android\/debug.keystore\n-storepass android -keypass android\nIt asks me fo...
{"title":"ImportError: No module named 'Tkinter'","tags":["python","tkinter"],"question_text":"For some reason I can't use the\n`Tkinter`\nmodule..\nI have no idea what could cause it, and it's so annoying, is there anything wrong with this line?\n`import Tkinter`\nAlso tried running it, in the python terminal, still d...
{"title":"Getting the index of a particular item in array","tags":["c#","arrays"],"question_text":"i want to retrieve the index of an array but i know only a part of the actual value in the array for example i am storing author name in the array dynamically say \"author = 'xyz' \"\ni want to find the index of array ite...
{"title":"Reload specific UITableView cell in iOS","tags":["iphone","ios","uitableview"],"question_text":"I have a\n`UITableView`\n. I want to update the table data based on selection made. Right now I use\n`[mytable reloadData]`\n; I want to know if there is any way where I can just update the particular cell which is...
{"title":"Is it possible to build MSBuild files (visual studio sln) from the command line in Mono?","tags":["msbuild","mono"],"question_text":"Is it possible to build Visual Studio solutions without having to fire up MonoDevelop?","answer_text":"Current status (Mono 2.10, 2011): xbuild is now able to build all versions...
{"title":"How can i get the path of the current user's \"Application Data\" folder?","tags":["c#"],"question_text":"1)how can i find out the Windows Installation drive in which the user is working.? I need this to navigate to the\nApplicationData\nin DocumentsandSettings.\n2)Also how can i get the\nuser name\ntoo so th...
{"title":"Why did Underscore.js remove support for AMD?","tags":["javascript","underscore.js","requirejs","js-amd"],"question_text":"1.3.0 \u00e2\u0080\u0094 Jan. 11, 2012 Removed AMD (RequireJS) support from Underscore. If you'd like to use Underscore with RequireJS, you can load it as a normal script, wrap or patch y...
{"title":"removing the # from window.location.hash","tags":["jquery","window.location"],"question_text":"I have this simple script:\n`$(document).ready(function(){\nvar $yoyo = window.location.hash;\nalert($yoyo);\n});`\nBut I need to get rid of the # symbol as I'll be using the variable to locate div ids. I've tried u...
{"title":"Inter-fragment communication applied to Nested Fragments?","tags":["android","android-fragments"],"question_text":"The Android developers site has a\ngreat article\non how to use interfaces to communicate between:\nA\n`Fragment`\nand its hosting\n`Activity`\nTwo\n`Fragment`\ns hosted by the same\n`Activity`\n...
{"title":"Sorting options elements alphabetically using jQuery","tags":["javascript","jquery","html","sorting"],"question_text":"I'm trying to get my head around sorting the option elements within a select alphabetically. Ideally, I'd like to have this as a seperate function where I can just pass in the select element ...
{"title":"How do I get the deleted-branch back in git?","tags":["git"],"question_text":"I'm trying to use git for our software development. I found that if I delete a branch in git, I could lose my code forever. That surprised me. I thought as a version control system, it should be able to let me do anything (even stup...
{"title":"How to use markdown for maven project site?","tags":["maven","markdown","maven-site-plugin"],"question_text":"How to start with project documentation using maven and markdown markup language?\nMaven site default is APT, which is uncomfortable to learn just to do thing maven way.\n(Usually nobody in a team wil...
{"title":"Lazy logger message string evaluation","tags":["python","logging"],"question_text":"I'm using standard python logging module in my python application:\nimport logging\nlogging.basicConfig(level=logging.INFO)\nlogger = logging.getLogger(\"log\")\nwhile True:\n logger.debug('Stupid log message \" + ' '.join([st...
{"title":"PDF TEXT Extraction","tags":["pdf","ghostscript","text-extraction"],"question_text":"I would like to extract text from a portion (using coordinates) of PDF using Ghostscript.\nCan anyone helpme out?","answer_text":"Yes, with Ghostscript, you\ncan\nextract text from PDFs. But no, it is not the best tool for th...
{"title":"When I try to run the Xcode simulator I get the error 'Stop \u00e2\u0080\u009c(null)\u00e2\u0080\u009d?'","tags":["ios","xcode","ios-simulator","xcode7"],"question_text":"I just updated to Xcode 7 and ran an app on a live device. Now for some reason, I get an error when I try to run an app in a simulator.\n`S...
{"title":"How to build .NET 4.6 Framework app without Visual Studio installed?","tags":["msbuild",".net-4.6"],"question_text":"Until now, I could build .NET 4.5.2 using command line\n`c:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild MySolution.sln`\nThe only what I need to install on a computer was .NET Frame...
{"title":"What is the most appropriate data type for storing an IP address in SQL server?","tags":["sql","sql-server","types","ip-address","ipv4"],"question_text":"What should be the most recommended datatype for storing an IPv4 address in SQL server?\nOr maybe someone has already created a user SQL data-type (.Net ass...
{"title":"How to change the current tab highlighter color in Android ViewPager?","tags":["android","android-layout","android-viewpager","android-view"],"question_text":"Here is my layout inside\n`ViewPager`\n. I would like to change the color of the current tab highlighter which is below the text. Actually it is showin...
{"title":"Valid JavaBeans names for boolean getter methods","tags":["java","boolean","naming-conventions","javabeans"],"question_text":"I know most variable names will work with \"is\", such as\n`isBlue()`\n, but is \"has\" also a valid prefix, like\n`hasProperty()`\n?","answer_text":"According to the\nJavaBeans specif...
{"title":"Testing if value is a function","tags":["javascript","typeof","onsubmit"],"question_text":"I need to test whether the value of a form's\n`onsubmit`\nis a function. The format is typically\n`onsubmit=\"return valid();\"`\n. Is there a way to tell if this is a function, and if it's callable? Using typeof just r...
{"title":"'min (& max) not a member of std' errors when building OpenCV 2.4.6 on Windows 8 for Visual Studio 2012","tags":["visual-c++","opencv","visual-studio-2012","build"],"question_text":"I'm trying to build OpenCV 2.4.6 on Windows 8 in Visual Studio 2012. Having downloaded the source from\nhttps:\/\/github.com\/It...
{"title":"Is it possible to have a ViewPager inside of a ScrollView?","tags":["android","scrollview","android-viewpager"],"question_text":"I'm trying to use a ViewPager inside of a ScrollView, but the ViewPager does not appear. If I remove the ScrollView the ViewPager appears fine.\nI've created a simple test project w...
{"title":"How to solve java.lang.OutOfMemoryError trouble in Android","tags":["android","bitmap","out-of-memory","bitmapfactory","setbackground"],"question_text":"Altough I have very small size image in drawable folder, I am getting this error from users. And I am not using any bitmap function in code. At least intenti...
{"title":"How to pass needed parameters to script in Powershell ISE?","tags":["powershell","parameter-passing","powershell-ise"],"question_text":"See Title.\nI specified needed parameters in the head of a script:\n`param ($G_ARCHIVE = $(throw \"Need file to upload!\"),\n $G_LOGFILE = $(throw \"Need logfile!\"))`\nWhen ...
{"title":"error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup","tags":["c++","linker"],"question_text":"I don't know what's wrong with it.. I can't find where the error is, commenting out the implementation doesn't resolve the error either.\nHeader File\n`#ifndef MAIN_SAVITCH_SEQUE...
{"title":"One liner in Ruby for displaying a prompt, getting input, and assigning to a variable?","tags":["ruby","input"],"question_text":"Often I find myself doing the following:\n`print \"Input text: \"\ninput = gets.strip`\nIs there a graceful way to do this in one line? Something like:\n`puts \"Input text: #{input ...
{"title":"Highlight exception throwers in IntelliJ IDEA","tags":["java","eclipse","intellij-idea"],"question_text":"I recently moved from Eclipse to IntelliJ IDEA, and there is a feature that I'm missing. In Eclipse, when you placed the caret on a checked exception, in throws declaration or catch block, it would highli...
{"title":"Jquery's fadein 'slow' is too fast","tags":["jquery"],"question_text":"i'm using the jquery fadein fadeout with the slow option, but it's still a little too fast for me.\nnow i've read that you can only choose between fast and slow, but is there a way to make it slower?","answer_text":"You have two options. T...
{"title":"How can I init a text field in a UIAlertView","tags":["iphone","ios","ios5","uialertview"],"question_text":"The updated\n`UIAlertView`\nnow has a style which allows a Text input field in\n`UIAlertView`\ni.e.\n`alert.alertViewStyle = UIAlertViewStylePlainTextInput;`\nThis works well but I wanted to init the in...
{"title":"Closures: why are they so useful?","tags":["oop","functional-programming","closures"],"question_text":"As an\nOO\ndeveloper, maybe I have difficulty seeing its value. What added value do they give? Do they fit in an OO world?","answer_text":"You can see it as a generalization of a class.\nYour class holds som...
{"title":"Why do SQL databases use a write-ahead log over a command log?","tags":["sql","database","logging","transactions","voltdb"],"question_text":"I read about Voltdb's\ncommand log\n. The command log records the transaction invocations instead of each row change as in a write-ahead log. By recording only the invoc...
{"title":"removeObserver with NSNotification... what am I doing wrong?","tags":["ios","objective-c","nsnotification"],"question_text":"Basically, I have a view1 which at some point, calls view2 (via\n`presentModalViewController:animated:`\n). When a certain\n`UIButton`\nin view2 is pressed, view2 is calls a notificatio...
{"title":"Application idle time","tags":["android"],"question_text":"In my application there are three activities A -> B -> C -> A. I want to detect application's idle time, so that after 15 mins it will pop up a message irrespective of activity. what is the best method to implement this.","answer_text":"I would be doi...
{"title":"How to get second last field from a cut command","tags":["unix","awk","cut"],"question_text":"I have a set of data as input and need the second last field based on deleimiter. The lines may have different numbers of delimiter. How can I get second last field ?\nexample input\n`text,blah,blaah,foo\nthis,is,ano...
{"title":"List with items returns empty","tags":["c#",".net","list","process"],"question_text":"I have created a simple List function but if I Loop through the List it's empty. It should not be!\n`\/\/ List function \n public class process_hook\n {\n public static List<String> pro_hook = new List<String>\n (new String[...
{"title":"why are java constants declared static?","tags":["java"],"question_text":"Why are java constants declared static ?\n`class Foo{\n static final int FII = 2 ;\n}`\nIn this I understand the use of final? Buy why does it have to be static? Why should it be a class variable, and not an instance variable?","answer_...
{"title":"how can I fire Onclick event programatically in android?","tags":["android","onclicklistener"],"question_text":"I have a custom view withe 2 lineat layouts : the first is the view's header and the second is the the details view.\nIn the custom view, the OnClickListener of the header Linearlayout is already de...
{"title":"SVN - Change working copy to point at new svn path","tags":["svn","path","working-copy"],"question_text":"I've got a SVN Repository that has moved to a new address\/path. However, I've got a working copy with uncommitted source code still pointing to the old (now invalid) repository path. How do you change a ...
{"title":"MySQL update CASE WHEN\/THEN\/ELSE","tags":["mysql"],"question_text":"I am trying to update a LARGE MyISAM table (25 million records) using a CLI script. The table is not being locked\/used by anything else.\nI figured instead of doing single UPDATE queries for each record, I might as well utilize the CASE fe...
{"title":"How to get the file path from HTML input form in Firefox 3","tags":["html","file-upload","firefox-3"],"question_text":"We have simple HTML form with\n`<input type=\"file\">`\n, like shown below:\n`<form>\n <label for=\"attachment\">Attachment:<\/label>\n <input type=\"file\" name=\"attachment\" id=\"attachmen...
{"title":"Size of an NSArray","tags":["ios","objective-c","arrays"],"question_text":"How do you get the size of an\n`NSArray`\nand print it in the console using\n`NSLog`\n?","answer_text":"`int size = [array count];\nNSLog(@\"there are %d objects in the array\", size);`","question_code":[],"answer_code":["int size = [a...
{"title":"Dart vs Polymer vs Bootstrap","tags":["javascript","twitter-bootstrap","dart","polymer"],"question_text":"What's the difference between those three things?\nAs far as I understand:\nBootstrap is a library which helps you to use nice pre-made elements on your webpage\nDart is another language which helps you t...
{"title":"Why use WinDbg vs the Visual Studio (VS) debugger?","tags":["visual-studio","windbg"],"question_text":"What are the major reasons for using\nWinDbg\nvs the Visual Studio debugger?\nAnd is it commonly used as a complete replacement for the Visual Studio debugger, or more for when the need arises.","answer_text...
{"title":"Javascript extends class","tags":["javascript","extends"],"question_text":"What is the right\/best way to extend a javascript class so Class B inherits everything from the class A (class B extends A)?","answer_text":"Take a look at\nSimple JavaScript Inheritance\nand\nInheritance Patterns in JavaScript\n.\nTh...
{"title":"LINQ - Where not exists","tags":["linq","exists"],"question_text":"What is the equivalent of following statement in LINQ:\n`Select t1.appname, t1.julianDte, t1.cat \nFrom table1 t1 \nWhere NOT EXISTS \n ( Select * \n from table t2 \n where t1.cat = t2.cat AND t2.julianDte < t1.julianDte )`","answer_text":"Try...
{"title":"How do I set a field value in an C# Expression tree?","tags":["c#","lambda","expression-trees"],"question_text":"Given:\n`FieldInfo field = <some valid string field on type T>;\nParameterExpression targetExp = Expression.Parameter(typeof(T), \"target\");\nParameterExpression valueExp = Expression.Parameter(ty...
{"title":"Console.log in Dart Language","tags":["console","dart"],"question_text":"How can I log into the browser console, like\n`console.log`\nin JavaScript, from the Dart language?","answer_text":"Simple:\n`print('This will be logged to the console in the browser.');`\nA basic top-level\n`print`\nfunction is always a...
{"title":"React \/ Redux and Multilingual (Internationalization) Apps - Architecture","tags":["architecture","internationalization","reactjs","translation","redux"],"question_text":"I'm building an app that will need to be available in multiple languages and locales.\nMy question is not purely technical, but rather abo...
{"title":"int array to byte array","tags":["c#","arrays","type-conversion"],"question_text":"I know how to do this the long way (create a byte array of the necessary size, then used a for loop and casting every element from the int array), but was wondering if there was a faster way.\nseems the way above would break if...
{"title":"How to disable redirection after login_check in Symfony 2","tags":["php","symfony2"],"question_text":"I need to disable redirection after login check, because I need to get only that the login was success or not. After submission \/login_check url give me the right data, but keep redirecting to \/login (on fa...
{"title":"What's Mongoose error Cast to ObjectId failed for value XXX at path \"_id\"?","tags":["mongodb","mongoose"],"question_text":"When sending a request to\n`\/customers\/41224d776a326fb40f000001`\nand a document with\n`_id`\n`41224d776a326fb40f000001`\ndoes not exist,\n`doc`\nis\n`null`\nand I'm returning a\n`404...
{"title":"How to get the number of threads in a Java process","tags":["java","multithreading"],"question_text":"How can I see the number of threads in a Java process?","answer_text":"`java.lang.Thread.activeCount()`\nIt will return the number of active threads in the\ncurrent thread's thread group\n.\ndocs:\nhttp:\/\/d...
{"title":"FactoryGirl build_stubbed strategy with a has_many association","tags":["ruby-on-rails","factory-girl"],"question_text":"Given a standard has_many relationship between two objects. For a simple example, let's go with:\n`class Order < ActiveRecord::Base\n has_many :line_items\nend\nclass LineItem < ActiveRecor...
{"title":"Is there a recommended format for multi-line imports?","tags":["python","python-2.7","pep8"],"question_text":"I have read there are three ways for coding multi-line imports in python\nWith slashes:\n`from Tkinter import Tk, Frame, Button, Entry, Canvas, Text, \\\n LEFT, DISABLED, NORMAL, RIDGE, END`\nDuplicat...
{"title":"Undefined symbols for architecture when add adMob","tags":["objective-c","xcode","admob"],"question_text":"I'm adding admob to my project, but I get this error:\nUndefined symbols for architecture i386:\n`\"_OBJC_CLASS_$_EKEvent\", referenced from:\n objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)\n \"_OBJ...
{"title":"How can i make a catch all route to handle '404 page not found' queries for ASP.NET MVC?","tags":["asp.net-mvc","routes","http-status-code-404"],"question_text":"Is it possible to create a final route that catches all .. and bounces the user to a 404 view in ASP.NET MVC?\nNOTE: I don't want to set this up in ...
{"title":"Can't find ADO.NET Entity Model Browser Window in vs2010","tags":["entity-framework","visual-studio-2010","ado.net","entity-model"],"question_text":"I want to update my ADO.NET Entities Framework Model from the database, but I cannot find the\nEntity Model Browser Window\n. There is an example of how to updat...
{"title":"Visual Studio - Page not found","tags":["visual-studio","tfs"],"question_text":"Today I selected \"Work Items\" as I have a million times before but this time I was met with this error along the top of my \"Team Explorer\" tab:\n\"Page [some long GUID] not found.\"\nThis also happened for \"Pending changes\"....
{"title":"Magit revert single file","tags":["git","emacs","magit"],"question_text":"The question is about Magit major mode for Emacs function and less so about how to do this via command line interface.\nI only have a local Git repository. How would I restore a selected file to its previous version? I believe that the ...
{"title":"Change the stored procedure definer","tags":["mysql","stored-procedures"],"question_text":"I have a around one hundred stored routines in my MySQL database with with most of them have 'root' as the definer.\nI have another mysql account named 'abc', how to change the definer of all routines to 'abc'.\nIs it p...
{"title":"docker rmi cannot remove images, with: no such id","tags":["docker"],"question_text":"I have a lot of images. When I try to remove them with\n`docker rmi`\n`$ sudo docker rmi acd33a9490dc\nError response from daemon: No such id: 75ce1f6710bab109a7d7cbee056fa8a0c7fa913e81c88e2a55121149dda80ee9\n2014\/07\/14 10...
{"title":"Difference com.sun.jersey and org.glassfish.jersey","tags":["java","glassfish","jersey","sun"],"question_text":"What is the difference between\n`com.sun.jersey`\nand\n`org.glassfish.jersey`\n?\nCurrently I have my REST service working on\n`com.sun.jersey`\nand I want to write tests, but I can't find a good tu...
{"title":"Deprecation of the static keyword... no more?","tags":["c++","static","c++11","standards"],"question_text":"In C++ it is possible to use the\n`static`\nkeyword within a translation unit to affect the visibility of a symbol (either variable or function declaration).\nIn n3092, this was deprecated:\nAnnex D.2\n...
{"title":"How to show user-friendly error page in browser when runtime exception is thrown by servlet?","tags":["jsp","jsf","facelets","custom-error-pages"],"question_text":"I'm developing web-application with JSF. I tested it as I was able to but from time to time runtime exceptions are thrown.\nSo, how to redirect us...
{"title":"iOS how to set app icon and launch images","tags":["ios","xcode","icons","archive","launchimage"],"question_text":"OMG, I just barely figured out the old system, and now they've changed it again.\nHow do I set the images so that I can archive and validate my app? The screen looks like this now:\nSo the first ...
{"title":"How can I delete a repository in the new Bitbucket","tags":["git","bitbucket"],"question_text":"The\ndocumentation\nis out of date\nThe new interface does not have the configuration button:","answer_text":"Log into your Bitbucket account. Navigate to the repository you want to delete. Click the repository's s...
{"title":"Flask broken pipe with requests","tags":["python","ubuntu","python-2.7","flask"],"question_text":"I'd like to send a local REST request in a flask app, like this:\n`from flask import Flask, url_for, request\nimport requests\napp = Flask(__name__)\n@app.route(\"\/<name>\/hi\", methods=[\"POST\"])\ndef hi_perso...
{"title":"Interface type cannot be statically allocated?","tags":["objective-c","xcode","interface","compiler-errors","memory-management"],"question_text":"I tried to put this in the header file of my view object:\n`@property (nonatomic) UIColor color;`\nto store the color that lines should be drawn with in this view.\...
{"title":"An error occurred while installing mysql2 (0.3.11)","tags":["ruby-on-rails","ruby"],"question_text":"I am a rails beginner,and I get a demo from\nhttps:\/\/github.com\/rubytaiwan\/jobs.ruby.tw\nbut when I try to run this demo,I got an error.\nI run follow\n`bundle`\nI got the error\n`An error occurred while i...
{"title":"NSDate for first day of the month","tags":["iphone","cocoa-touch","nsdate","nscalendar"],"question_text":"This is quite a simple concept, but as of yet I have been unable to find an elegant (and calendar locale independent) solution. I need to find the first day of the month for an arbitrary\n`NSDate`\n. For ...
{"title":"Accessing Items In a ordereddict","tags":["python","collections","dictionary","python-3.x","ordereddictionary"],"question_text":"Lets say I have the following code:\n`import collections\nd = collections.OrderedDict()\nd['foo'] = 'python'\nd['bar'] = 'spam'`\nIs there a way I can access the items in a numbered...
{"title":"Defining a HTML \"template\" to append using JQuery","tags":["javascript","jquery","json"],"question_text":"I have got an array which I am looping through. Every time a condition is true, I want to append a copy of the\n`HTML`\ncode below to a container element with some values.\nWhere can I put this HTML to ...
{"title":"Methods in Ruby: objects or not?","tags":["ruby","object","methods","language-features"],"question_text":"Inspired by\nthis discussion\n, after some googling I wasn't able to find an answer to a pretty simple question regarding methods in Ruby: are methods objects or not?\nThere are different opinions\nhere\n...
{"title":"Declare multiple variables in JavaScript","tags":["javascript","variables","declare"],"question_text":"I want to declare multiple variables in a function:\n`function foo() {\n var src_arr = new Array();\n var caption_arr = new Array();\n var fav_arr = new Array();\n var hidden_arr = new Array();\n}`\nIs this ...
{"title":"How to rescue OmniAuth::Strategies::OAuth2::CallbackError?","tags":["ruby-on-rails","ruby-on-rails-3","callback","oauth-2.0","omniauth"],"question_text":"I am building a Rails application with\nOmniauth\nfor log in service.To authenticate Google I am using\nOmniAuth Google OAuth2 Strategy\n.\nWhen user clicks...
{"title":"When using object initializers, why does the compiler generate an extra local variable?","tags":["c#",".net","c#-3.0"],"question_text":"While answering a question on SO yesterday, I noticed that if an object is initialized using an Object Initializer, the compiler creates an extra local variable.\nConsider th...
{"title":"Write file from assembly resource stream to disk","tags":["c#",".net"],"question_text":"I can't seem to find a more efficient way to \"copy\" an embedded resource to disk, than the following:\n`using (BinaryReader reader = new BinaryReader(\n assembly.GetManifestResourceStream(@\"Namespace.Resources.File.ext\...
{"title":"JPA\/Criteria API - Like & equal problem","tags":["java","jpa","jpa-2.0","criteria-api"],"question_text":"I'm trying to use Criteria API in my new project:\n`public List<Employee> findEmps(String name) {\n CriteriaBuilder cb = em.getCriteriaBuilder();\n CriteriaQuery<Employee> c = cb.createQuery(Employee.clas...