text
stringlengths
74
309k
{"title":"AngularJS Promises, $q, defer","tags":["javascript","angularjs","promise","q"],"question_text":"EDIT\nThe first answer is the elegant one, but, as stated a few times in this question and another questions on stackoverflow, the problem is that the service and the controller run their thing before the data actu...
{"title":"Using Function.prototype.bind with an array of arguments?","tags":["javascript","functional-programming","promise","partial-application"],"question_text":"How can I call Function.prototype.bind with an array of arguments, as opposed to hardcoded arguments? (Not using ECMA6, so no spread operator).\nI'm trying...
{"title":"React vs ReactDOM?","tags":["reactjs"],"question_text":"I'm a bit new to react. I see we have to import two things to get started,\n`React`\nand\n`ReactDOM`\n, can anyone explain the difference. I'm reading through the\nReact documentation\n, but it doesn't say.","answer_text":"React and ReactDOM were only re...
{"title":"Setting selected values for ng-options bound select elements","tags":["angularjs","ng-options"],"question_text":"Fiddle with the relevant code:\nhttp:\/\/jsfiddle.net\/gFCzV\/7\/\nI'm trying to set the selected value of a drop down that is bound to a child collection of an object referenced in an ng-repeat. I...
{"title":"Log4Net \"Could not find schema information\" messages","tags":["web-services","logging","schema","web-config","log4net"],"question_text":"I decided to use\nlog4net\nas a logger for a new webservice project. Everything is working fine, but I get a lot of messages like the one below, for every log4net tag I am...
{"title":"Is it possible to protect from downloading a video from a site","tags":["php"],"question_text":"Is it possible to protect a video from a site from being downloaded?\nWhile users could record a video by using some hardware device, it should not be possible to download a video using some link - exactly like goo...
{"title":"What is Mojarra?","tags":["java","jsf","jsf-2","jsf-1.2"],"question_text":"How is Mojarra different from Sun's JSF Reference Implemenation?\nIs it just a later version? Is it simply a rename?","answer_text":"The Sun JSF Reference Implementation, also known as Sun JSF RI, was named like that, just \"JSF RI\", ...
{"title":"How to run all tests belonging to a certain Category in JUnit 4","tags":["java","unit-testing","junit","junit4"],"question_text":"JUnit 4.8 contains a nice new feature called \"Categories\" that allows you to group certain kinds of tests together. This is very useful, e.g. to have separate test runs for slow ...
{"title":"Python: Automatically initialize instance variables?","tags":["python","class","initialization-list"],"question_text":"I have a python class that looks like this:\n`class Process:\n def __init__(self, PID, PPID, cmd, FDs, reachable, user):`\nfollowed by:\n`self.PID=PID\n self.PPID=PPID\n self.cmd=cmd\n ...`\n...
{"title":"How to turn off brackets\/quotes auto-completion in Visual Studio","tags":["c#","autocomplete","visual-studio-2012"],"question_text":"As it states in the title: how to I turn off brackets\/quotes\/curly braces autocompletion in MSVS? I'm interested in C# and XAML mostly but over text editors would be nice too...
{"title":"HTTP install, error in libpcre","tags":["apache","http"],"question_text":"When i tried to install http in my ubuntu 11.10, i got the following error\n`configure: error: APR not found. Please read the documentation.`\nthen i followed the instructions in [questions\/9436860]:\nApache httpd setup and installatio...
{"title":"SVN \"Already Locked Error\"","tags":["svn","tortoisesvn"],"question_text":"When trying to commit a change to a repository ( where I am the only user ) I get an error\n`Path\n'\/trunk\/TemplatesLibrary\/constraints\/templates\/TP145210GB01_PersonWithOrganizationUniversal.cs'\nis already locked by user 'admin'...
{"title":"Optimization by Java Compiler","tags":["java","optimization","compiler-construction","javac"],"question_text":"Recently, I was reading this\narticle\n.\nAccording to that article, Java Compiler i.e. javac does not perform any optimization while generating bytecode. Is it really true? If so, then can it be imp...
{"title":"How to get the second sub element of every element in a list","tags":["r"],"question_text":"I know I've come across this problem before, but I'm having a bit of a mental block at the moment. and as I can't find it on SO, I'll post it here so I can find it next time.\nI have a dataframe that contains a field r...
{"title":"M_PI works with math.h but not with cmath in Visual Studio","tags":["c++","visual-studio","visual-studio-2010"],"question_text":"I am using Visual Studio 2010. I have read that in C++ it is better to use\n`<cmath>`\nrather than\n`<math.h>`\n.\nBut in the program I am trying to write (Win32 console application...
{"title":"How much memory can a 32 bit process access on a 64 bit operating system?","tags":["windows","memory","wow64"],"question_text":"On Windows, under normal circumstances a 32 bit process can only access 2GB of RAM (or 3GB with a special switch in the boot.ini file). When running a 32 bit process on a 64 bit oper...
{"title":"EmberJS actions - call one action from another when wrapped within `actions`","tags":["javascript","ember.js","publish-subscribe","ember-controllers"],"question_text":"How do you call one action from another action when wrapped within\n`actions`\nin an EmberJS controller?\nOriginal code that uses the now depr...
{"title":"still dyld: Library not loaded","tags":["iphone","objective-c","xcode","ios-simulator","ios6"],"question_text":"I am integrating Facebook in my application. As required frameworks I added to the project.\nBut the app crashes without loading even first screen.\n`dyld: Library not loaded: \/System\/Library\/Fra...
{"title":"Is there a streaming API for JSON?","tags":["json","streaming"],"question_text":"Is DOM the only way to parse JSON?","answer_text":"Some JSON parsers do offer incremental (\"streaming\") parser; for Java, at least following parsers from json.org page offer such an interface:\nJackson\n(pull interface)\nJson-s...
{"title":"Binding Visibility for DataGridColumn in WPF","tags":["wpf","xaml","datagrid","visibility"],"question_text":"How can I hide a column in a WPF\n`DataGrid`\nthrough a Binding?\nThis is what I did:\n`<DataGridTextColumn Header=\"Column header\"\n Binding=\"{Binding ColumnValue}\"\n Width=\"100\"\n ElementStyle=\...
{"title":"Underscore.js - Map Array of key\/value pairs to an Object - One liner","tags":["javascript","underscore.js"],"question_text":"I've been going through the\nunderscore docs\nbut I can't seem to find a method (or nested method call) to do the following transformation:\nLet's say I have the following Javascript ...
{"title":"Roboto font for Android 4+?","tags":["android","fonts","android-4.0","assets"],"question_text":"Do I need to use Roboto font and put it to asset folder if my app will support only Android 4+ devices?\nI would greatly appreciate for your help. Alex. P.S. Sorry for my English:)","answer_text":"You can use Robot...
{"title":"is there a way to get directions in mkmapview using a built in apple API?","tags":["ios","objective-c","mkmapview","apple-maps"],"question_text":"I know google maps are known to be the best maps out there, but i dont want to have to download a bunch of extra libraries and all that. I'd prefer to do something ...
{"title":"Unable to establish SSL connection, how do I fix my SSL cert?","tags":["apache","ssl","openssl","wget"],"question_text":"I'm trying to\n`wget`\nto my own box, and it can't be an internal address in the wget (so says another developer).\nWhen I wget, I get this:\n`wget http:\/\/example.com\n--2013-03-01 15:03:...
{"title":"How to get the row number from a datatable?","tags":["c#","datatable"],"question_text":"I am looping through every row in a datatable:\n`foreach (DataRow row in dt.Rows) {}`\nI would like to get the index of the current row within the dt datatable. for example:\n`int index = dt.Rows[current row number]`\nHow ...
{"title":"Right align and left align text in same HTML table cell","tags":["html","css"],"question_text":"I have a cell in an HTML\n`<table>`\n. I would like part of the cell contents to be left justified and part to be right justified. Is this possible?","answer_text":"If you want them on separate lines do what Balon ...
{"title":"How to get a list of points from a UIBezierPath?","tags":["ios","objective-c","iphone","uibezierpath"],"question_text":"I have a\nUIBezierPath\nthat I need to take a list of points from.\nIn\n`Qt`\nthere is a function called\n`pointAtPercent`\nthat would fit my needs but I can't find anything equivalent in\n`...
{"title":"How often are sales stats updated on iTunes Connect?","tags":["ios","itunesconnect","sales","app-store"],"question_text":"My app was accepted by Apple today and I am trying to figure out how many times it has been downloaded. Does anybody know how often the sales stats are updated on iTunes Connect? Is it onc...
{"title":"Interview : Java Equals","tags":["java"],"question_text":"I was asked this question in interview. Which of the following is better to use\n`MyInput.equals(\"Something\");`\nOr\n`\"Something\".equals(MyInput);`\nThanks","answer_text":"I would go for\n`\"Something\".equals(MyInput);`\nin this case if MyInput is...
{"title":"Get selected date in jqueryui datepicker inline mode","tags":["jquery-ui","calendar"],"question_text":"i am trying to use jqueryui datepicker.I want to use the inline mode.Now i want to know how can i get the selected date when user selects a date.Where to get and how to get ? Please advice","answer_text":"Yo...
{"title":"Setting the Default JSON Serializer in ASP.NET MVC","tags":["c#","asp.net-mvc","asp.net-mvc-4","json.net"],"question_text":"I'm having a hard time finding the answer to this:\nI'm working on an existing application that has been partially converted over to MVC. Whenever a controller responds with a JSON Actio...
{"title":"Passing std::string by Value or Reference","tags":["c++","string","std","move-semantics"],"question_text":"Possible Duplicate:\nAre the days of passing const std::string & as a parameter over?\nShould I pass\n`std::string`\nby value or by reference (to a un-inlined function) if move semantics is supported? An...
{"title":"Definitions of sqrt, sin, cos, pow etc. in cmath","tags":["c++","c","math","cmath","definitions"],"question_text":"Are there any definitions of functions like\n`sqrt()`\n,\n`sin()`\n,\n`cos()`\n,\n`tan()`\n,\n`log()`\n,\n`exp()`\n(these from math.h\/cmath) available ?\nI just wanted to know how do they work."...
{"title":"How to make the class constructor private in Ruby?","tags":["ruby","constructor","access-specifier"],"question_text":"`class A\nprivate\n def initialize\n puts \"wtf?\"\n end\nend\nA.new #still works and calls initialize`\nand\n`class A\nprivate\n def self.new\n super.new\n end\nend`\ndoesn't work altogether\...
{"title":"Can the linker inline functions?","tags":["c","optimization","linker","inline"],"question_text":"In the file\n`file1.c`\n, there is a call to a function that is implemented in the file\n`file2.c`\n.\nWhen I link\n`file1.o`\nand\n`file2.o`\ninto an executable, if the function in\n`file2`\nis very small, will t...
{"title":"How to detect a remote side socket close?","tags":["java","networking","sockets","tcp"],"question_text":"How do you detect if\n`Socket#close()`\nhas been called on a socket on the remote side?","answer_text":"The\n`isConnected`\nmethod won't help, it will return\n`true`\neven if the remote side has closed the...
{"title":"Naming conventions for java methods that return boolean(No question mark)","tags":["java","methods","naming-conventions"],"question_text":"I like using question mark at the end of method\/function names in other languages. Java doesn't let me do this. As a work around, how else can I name boolean returning me...
{"title":"Different WCF Bindings, their differences and compatibility with other platforms","tags":["c#","java","php",".net","wcf"],"question_text":"I am looking for some good technical details on Topic of WCF bindings, I am interested to know following things.\nList of Different WCF Bindings with its special purpose a...
{"title":"IAB startSetup NullPointerException","tags":["android","in-app-purchase","in-app-billing"],"question_text":"I am attempting to setup In-App Billing in my application. I haven't got very far and am running into a null pointer exception when trying to start my IabHelper. I am following\nthis google tutorial\n.\...
{"title":"mapview and cameraupdate in api v2","tags":["android-mapview","google-maps-api-2"],"question_text":"Why the CameraUpdateFactory class is not working in my project?\nThe app crashes if it executes the following command:\n CameraUpdate pino= CameraUpdateFactory.newLatLng(new LatLng(location.getLatitude(), locat...
{"title":"MySQL Case in Select Statement with LIKE operator","tags":["mysql","case"],"question_text":"Is it possible to combine the\n`CASE`\nstatement and the\n`LIKE`\noperator in a MySQL\n`SELECT`\nstatement?\nFor Example, I am trying to query a database that stores data in a single column in either one of two formats...
{"title":"Python: single instance of program","tags":["python","locking"],"question_text":"Is there a Pythonic way to have only one instance of a program running?\nThe only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it...
{"title":"RSpec: how to test Rails logger message expectations?","tags":["logging","rspec","mocking","stubbing"],"question_text":"I am trying to test that the Rails logger receives messages in some of my specs. I am using the\nLogging gem\n.\nLet's say that I have a class like this:\n`class BaseWorker\n def execute\n l...
{"title":"Android: Need to record mic input","tags":["android","audio","audio-recording","audiorecord"],"question_text":"Is there a way to record mic input in android while it is being process for playback\/preview in real time? I tried to use\n`AudioRecord`\nand AudioTrack to do this but the problem is that my device ...
{"title":"detect distance scrolled from top jquery","tags":["jquery"],"question_text":"How can I detect the number of pixels scrolled in a browser window? \nI need this to dynamically adjust the height of a 100% height div...\nI'm using jQuery.\nEDIT: I cannot just use scrollTop() because I'm working with a 100% height...
{"title":"Python - Facebook API - Need a working example","tags":["python","facebook","api","signature","pyfacebook"],"question_text":"Ok, so i've googled around, i've found threads here on stackoverflow and i've checked the official Facebook wiki and.. and what not..\nI now hope that one of you guys sits on a Facebook...
{"title":"How do you insert a template into another template?","tags":["html","django","django-templates"],"question_text":"I have a very basic template (basic_template.html), and want to fill in the with data formatted using another partial template. The basic_template.html might contain several things formatted using...
{"title":"Reverse Singly Linked List Java","tags":["java","singly-linked-list"],"question_text":"Can someone tell me why my code dosent work? I want to reverse a single linked list in java: This is the method (that doesnt work correctly)\n`public void reverseList(){\n Node before = null;\n Node tmp = head;\n Node next ...
{"title":"Map vs Object in JavaScript","tags":["javascript","dictionary","ecmascript-6"],"question_text":"I just discovered chromestatus.com and, after losing several hours of my day, found\nthis feature entry\n:\nMap: Map objects are simple key\/value maps.\nThat confused me. Regular JavaScript objects are dictionarie...
{"title":"Why is squaring a number faster than multiplying two random numbers?","tags":["algorithm","math","bit-manipulation","discrete-mathematics"],"question_text":"Multiplying two binary numbers takes n^2 time, yet squaring a number can be done more efficiently somehow. (with n being the number of bits) How could th...
{"title":"CodeIgniter: Load controller within controller","tags":["php","codeigniter"],"question_text":"I have a\n`home`\ncontroller with an\n`index`\naction that displays a set of featured products. However, the products are managed through a\n`product`\ncontroller including a proprietary model and views.\nHow do I ac...
{"title":"Limiting characters\/words in view - ruby on rails","tags":["ruby-on-rails","ruby"],"question_text":"I am displaying recent comments on the home page of a very simple blog application I am building in Ruby on Rails. I want to limit the number of characters that are displayed from the 'body' column of the comm...
{"title":"How do I find the position of a cursor in a text box? C#","tags":["c#","cursor-position"],"question_text":"I have a standard WinForms TextBox and I want to insert text at the cursor's position in the text. How can I get the cursor's position?\nThanks","answer_text":"Regardless of whether any text is selected,...
{"title":"SQL query execution (with single quotation mark value)","tags":["sql","ruby-on-rails","ruby-on-rails-3","ruby-on-rails-3.1","rails-activerecord"],"question_text":"I have a simple problem with SQL query execution(I know the reason but do not know how to get rid of it).\nI am using MySQL database. Suppose I hav...
{"title":"Replacing the 'auto_link' method in Ruby on Rails 3.1","tags":["ruby-on-rails","ruby","ruby-on-rails-3","methods","replace"],"question_text":"I am using Ruby on Rails 3.0.7 and I know that in the 3.1 version there won't be the\n`auto_link`\nmethod anymore (see the\nactionpack\/lib\/action_view\/helpers\/text_...
{"title":"Is Google Guava \"harder\" to use than Apache Collections?","tags":["java","collections","guava"],"question_text":"I'm thinking of asking my team, of mixed skill levels, to use Google Guava. Prior to Guava, I'd have used the Apache Collections (or its generified version).\nGuava, as opposed to Apache Collecti...
{"title":"Bootstrap button - remove outline on Chrome OS X","tags":["google-chrome","button","focus","twitter-bootstrap-3","outline"],"question_text":"I am looking to achieve this:\nhttp:\/\/getbootstrap.com\/javascript\/#popovers-examples\n- scroll to the \"live Demo\" and hit the red popover button, in Chrome on OS X...
{"title":"Get Device Token in iOS 8","tags":["ios","ios8"],"question_text":"I need device token to implement push notification in my app.\nHow can I get device token since\n`didRegisterForRemoteNotificationsWithDeviceToken`\nmethod is not working on iOS 8.\nI tried this code in app delegate but it is not giving me devi...
{"title":"How to save traceback \/ sys.exc_info() values in a variable?","tags":["python","exception-handling"],"question_text":"I want to save name of the error and the traceback details into a variable..\n`import sys\ntry:\n try:\n print x\n except Exception, ex:\n raise NameError\nexcept Exception, er:\n print \"0\"...
{"title":"How to unit test an object with database queries","tags":["database","unit-testing"],"question_text":"I've heard that unit testing is \"totally awesome\", \"really cool\" and \"all manner of good things\" but 70% or more of my files involve database access (some read and some write) and I'm not sure how to wr...
{"title":"Delete many rows from a table using id in Mysql","tags":["mysql","sql","sql-delete"],"question_text":"I am a Linux admin with only basic knowledge in Mysql Queries\nI want to delete many table entries which are ip address from my table using\nid\n,\ncurrently i am using\n`DELETE from tablename where id=1;\nDE...
{"title":"Finding control within WPF itemscontrol","tags":["wpf","itemscontrol","findcontrol"],"question_text":"Hi i have few a single textbox within the the datatemplate for itemscontrol. When i bind the itemcontrols to a observable collection i get two text boxes. But i need to do some manipulations based on each of ...
{"title":"Android - Is Navigation Drawer from right hand side possible?","tags":["android","navigation-drawer"],"question_text":"http:\/\/developer.android.com\/training\/implementing-navigation\/nav-drawer.html\nAccording to this doc, it doesn't say if it is possible to implement drawer from right hand side. Is it eve...
{"title":"Wait for the collection to fetch everything in backbone","tags":["backbone.js"],"question_text":"I have two set of collections. One is for the categories and the other is for the Items. I ned to wait for the categories to finish fetching everything for me to set the category for the Items to be fetched.\nAlso...
{"title":"Built-in helper to parse User.Identity.Name into Domain\\Username","tags":["c#","asp.net",".net","authentication","active-directory"],"question_text":"Is there any built-in utility or helper to parse\n`HttpContext.Current.User.Identity.Name`\n, e.g.\n`domain\\user`\nto get separately domain name if exists and...
{"title":"How to extract duration time from ffmpeg output?","tags":["linux","bash","ffmpeg"],"question_text":"To get a lot of information about a media file one can do\n`ffmpeg -i <filename>`\nwhere it will output a lot of lines, one in particular\n`Duration: 00:08:07.98, start: 0.000000, bitrate: 2080 kb\/s`\nI would ...
{"title":"Turning off auto-complete for text fields in Firefox","tags":["ruby-on-rails","firefox"],"question_text":"Am supposed to be learning French at the moment, but rather than learning any vocab, I've been mucking around with a rails app that tests vocab - so it displays a word, and I have to type its translation....
{"title":"Ignore parent padding","tags":["html","css"],"question_text":"I'm trying to get my horizontal rule to ignore the parent padding.\nHere's a simple example of what I have:\n`#parent {\npadding:10px;\nwidth:100px;\n}\nhr {\nwidth:100px;\n}`\nYou will find that the horizontal rule extends out of the parent by 10p...
{"title":"In Java, what is the difference between this.method() and method()?","tags":["java","methods"],"question_text":"Is there any difference between calling\n`this.method()`\nand\n`method()`\n(including performance difference)?","answer_text":"The only time it matters is if you are using\n`OuterClass.this.method()...
{"title":"How can I cache objects in ASP.NET MVC?","tags":["asp.net-mvc","caching"],"question_text":"I'd like to cache objects in ASP.NET MVC. I have a\n`BaseController`\nthat I want all Controllers to inherit from. In the BaseController there is a\n`User`\nproperty that will simply grab the User data from the database...
{"title":"What does a zlib header look like?","tags":["header","structure","zlib"],"question_text":"In my project I need to know what a\n`zlib`\nheader looks like. I've heard it's rather simple but I cannot find any description of the zlib header.\nFor example, does it contain a magic number?","answer_text":"zlib magic...
{"title":"Any quick and dirty anti-aliasing techniques for a rotated UIImageView?","tags":["iphone","cocoa-touch","uiimageview","uiimage","antialiasing"],"question_text":"I've got a UIImageView (full frame and rectangular) that i'm rotating with a CGAffineTransform. The UIImage of the UIImageView fills the entire frame...
{"title":"Visual Studio keyboard short-cut to complete default accessors {get; set;}","tags":["c#","visual-studio","keyboard-shortcuts","accessor"],"question_text":"I am looking for a keyboard short-cut to complete creating the default accessors for a property in a C# class.\nSomething like...\nI start typing:\n`public...
{"title":"Uniquely Identifying Reference Types in the Debugger","tags":["c#","visual-studio","debugging","reference-type"],"question_text":"I come from a C++ background, so apologies if this is a non-C# way of thinking, but I just need to know. :)\nIn C++ if I have two pointers, and I want to know if they point to the ...
{"title":"Should I use pt or px?","tags":["css"],"question_text":"What is the difference between\n`pt`\nand\n`px`\nin CSS? Which one should I use and why?","answer_text":"Here you've got a very detailed explanation of their differences\nhttp:\/\/kyleschaeffer.com\/development\/css-font-size-em-vs-px-vs-pt-vs\/\nThe jis...
{"title":"designing large projects in OCaml","tags":["design","functional-programming","ocaml"],"question_text":"What is a best practices to write large software projects in OCaml?\nHow do you structure your projects?\nWhat features of OCaml should and should not be used to simplify code management? Exceptions? First-c...
{"title":"Angularjs - Pass argument to directive","tags":["angularjs","controller","arguments","directive"],"question_text":"Im wondering if there is a way to pass an argument to a directive?\nWhat I want to do is append a directive from the controller like this:\n`$scope.title = \"title\";\n$scope.title2 = \"title2\";...
{"title":"Unable to override onCreateOptionsMenu in ListFragment","tags":["android","override","compatibility","fragment"],"question_text":"I created an app that supports both phone and tablet version so i use the android-support-v4.jar library.\nMy activity extends the ListFragment and I tried to override the onCreate...
{"title":"Subfigs of a figure on multiple pages","tags":["latex","figure","multipage"],"question_text":"I am facing problem of stacking many figures\nThe problem is the stack figure is overriding the page dimension vertically and placing all the figure in one page and not changing the page as the limitation of page is ...
{"title":"Are static methods thread safe","tags":["c#","asp.net","static"],"question_text":"I have a static timer class which will be called by ANY webpage to calculate how long each page has taken to be constructed.\nMy question is are Static classes thread safe? In my example will concurrent users cause a problem wit...
{"title":"What exactly does stringstream do?","tags":["c++"],"question_text":"I am trying to learn C++ since yesterday and I am using this document:\nhttp:\/\/www.cplusplus.com\/files\/tutorial.pdf\n(page 32) . I found a code in the document and I ran it. I tried inputting Rs 5.5 for price and an integer for quantity a...
{"title":"Vagrant \" VM not created.\" when trying to create box from existing VM","tags":["virtual-machine","vagrant"],"question_text":"I imported the precise32 box, then installed some packages and other data on the VM. My plan is to then repackage it into a box, to save on complicated provisioning when sharing.\nHow...
{"title":"How do I resolve \"Missing host to link to! Please provide the :host parameter\"? (RoR)","tags":["ruby-on-rails","ruby","rspec","capybara","ruby-on-rails-4"],"question_text":"I'm following the\nRoR Tutorial\nand I'm stuck at\nListing 9.15\nI getting the following error after running\n'bundle exec rspec spec\/...
{"title":"Using a socks proxy with git for the http transport","tags":["git","proxy"],"question_text":"How to make git use a socks proxy for http transport ?\nI successed in configuring git with GIT_PROXY_COMMAND to use a socks proxy for GIT transport.\nAlso i have configured my .curlrc file to defined the socks proxy ...
{"title":"Android L's Ripple Effect - Touch Feedback for Buttons - Using XML","tags":["android","xml","android-5.0-lollipop","material-design","rippledrawable"],"question_text":"I am trying to understand how to implement the \"Ripple Effect - Touch Feedback\" for buttons and other views. I looked at the questions relat...
{"title":"SQLAlchemy calculated column","tags":["sqlalchemy","calculated-columns"],"question_text":"(New SQLAlchemy user alert) I have three tables: a person, the persons hourly rate starting at a specific date, and daily time reporting. I am looking for the correct way to have the cost for a Time base off of the perso...
{"title":"How I can change a file with Chef?","tags":["chef","chef-recipe"],"question_text":"I have 7 files and 1 war.\nI need to change values when I deploy it.\nI have this:\n`##usuario\n#alfresco.user=*****\nalfresco.user=********\n##pass \n#alfresco.password= sfsfs\nalfresco.password=sfgsf\nalfresco.rutaAnexos=\/gt...
{"title":"How can I create a custom \"pin-drop\" animation using MKAnnotationView?","tags":["iphone","core-animation","mapkit","mkpinannotationview"],"question_text":"I have an instance of\n`MKMapView`\nand would like to use custom annotation icons instead of the standard pin icons supplied by MKPinAnnotationView. So, ...
{"title":"Is a glossy or matte LCD screen better for long coding sessions?","tags":["monitor"],"question_text":"I'm looking at getting a new LCD monitor, but I'm concerned that a glossy monitor might cause more eye strain after a long day of work. I typically spend a lot of time in front of my monitor, so eye strain is...
{"title":"HTML - Newline char in DIV content editable?","tags":["css","html5","html","contenteditable"],"question_text":"I am storing content in the database, for example:\n`Hello\nThis\nis \nText`\nand when I pass that to a textarea, it stays with the new line breaks. But if I pass that text to a div with content edit...
{"title":"How can I change the Visibility of a TextBlock with a Trigger?","tags":["c#","wpf","xaml","triggers"],"question_text":"When I try to compile the following code, I get the error\n'Visibility' member is not valid because it does not have a qualifying type name.\nWhat do I have to change so that I can\nmake the ...
{"title":"Unit testing with Spring Security","tags":["java","security","unit-testing","spring","spring-security"],"question_text":"My company has been evaluating Spring MVC to determine if we should use it in one of our next projects. So far I love what I've seen, and right now I'm taking a look at the Spring Security ...
{"title":"How do I output compressed CSS from Compass?","tags":["css","compression","sass","compass-sass"],"question_text":"How do I configure compass to output smaller or compressed CSS files? I tried\n`compass -s compressed`\nbut that didn't work.","answer_text":"In your\n`config.rb`\nfile:\n`output_style = :compress...
{"title":"Can you have if-then-else logic in SQL?","tags":["sql","sql-server"],"question_text":"I need to do select data from a table based on some kind of priority like so:\n`select product, price from table1 where project = 1\n-- pseudo: if no price found, do this:\nselect product, price from table1 where customer = ...
{"title":"Python time comparison","tags":["python","time","comparison"],"question_text":"How do I compare times in python?\nI see that date comparisons can be done and there's also \"timedelta\", but I'm struggling to find out how to check if the current time (from datetime.now()) is earlier, the same, or later than a ...
{"title":"Unit testing and checking private variable value","tags":["c#","unit-testing","nunit"],"question_text":"I am writing unit tests with C#, NUnit and Rhino Mocks.\nHere are the relevant parts of a class I am testing:\n`public class ClassToBeTested\n{\n private IList<object> insertItems = new List<object>();\n pu...
{"title":"Basic File upload in GWT","tags":["java","google-app-engine","gwt","file-upload"],"question_text":"I'm trying to figure out how to upload one file using GWTs FileUpload widget. I'm using GWT and Google AppEngine with Java but I would like to upload file to my own Linux server. \nI have the following code alre...
{"title":"Multiple Models in a single django ModelForm?","tags":["python","django","django-forms"],"question_text":"Is it possible to have multiple models included in a single\n`ModelForm`\nin django? I am trying to create a profile edit form. So I need to include some fields from the User model\nand\nthe UserProfile m...
{"title":"Incrementing in C++ - When to use x++ or ++x?","tags":["c++","post-increment","pre-increment"],"question_text":"I'm currently learning C++ and I've learned about the incrementation a while ago.\nI know that you can use \"++x\" to make the incrementation before and \"x++\" to do it after.\nStill, I really don'...
{"title":"How to check if IsNumeric","tags":["c#"],"question_text":"Possible Duplicate:\nHow to identify if string contain a number?\nIn VB there's an IsNumeric function, is there something similar in c#?\nTo get around it, I just wrote the code:\n`if (Int32.Parse(txtMyText.Text.Trim()) > 0)`\nI was just wondering if t...