Saving Android Activity state using Save Instance State

Saving Android Activity state using Save Instance State

I've been working on Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example:package com.android.hello;import android.app.Activity;import android.os

How can I check .NET framework 4.5 prerequestics in WiX

How can I check .NET framework 4.5 prerequestics in WiX

I'd like to validate both .NET framework 4.0 and 4.5 should be installed at server before proceeding a installation. Hence I used the following snippet, but I don't know about 4.5 validattion, which was not listed in the link Reference

Change EF 6 Code Generation Strategy from T4

Change EF 6 Code Generation Strategy from T4

In the past I have successfully created edmx files. This was using EF5 and Visual Studio 2012. I have since upgraded to Visual Studio 2013 and EF6. The existing EF 5 code still works, but now I have a problem. I can create edmx files, and a

Why is there a questionmark on the private variable definition?

Why is there a questionmark on the private variable definition?

I am reading an article about the MVVP Pattern and how to implement it with WPF. In the source code there are multiple lines where I cannot figure out what the question marks in it stand for.private DateTime? _value;What does the ? mean in

What's the Best Way to Add One Item to an IEnumerable?

What's the Best Way to Add One Item to an IEnumerable?

Here's how I would add one item to an IEnumerable object://Some IEnumerable objectIEnumerable arr = new string[] { "ABC", "DEF", "GHI" };//Add one itemarr = arr.Concat(new string[] { "JKL" });This is awkward. I don't see a method called so

How can I use strip_tags in regular Ruby code (non-rails)?

How can I use strip_tags in regular Ruby code (non-rails)?

I need to turn HTML into plain text. There's a nice function that does that in ActionView's SanitizeHelper, but I have trouble understanding how I can reference it and use it in a simple test.rb file.http://api.rubyonrails.org/classes/Actio

Using Python, how do you untar purely in memory?

Using Python, how do you untar purely in memory?

I'm working in an environment where I can't save anything to disk. I need to be able to pull tar files and unzip them without saving to disk. This seems to fail:I've tried this but it tosses errors:# fetch.pyfrom cStringIO import StringIOim

Escaping JavaScript string literals in views

Escaping JavaScript string literals in views

Is there a utility function for escaping JavaScript in ASP.NET MVC views? I often need to init a little snippet of JavaScript using some values from the view; for instance I may have something like:I would expect something like:I could, of

NoClassDefFoundError: android.app.ANRManagerProxy

NoClassDefFoundError: android.app.ANRManagerProxy

Does anyone know why this happens? I see this crash reported by my app but I have no idea what it is.java.lang.NoClassDefFoundError: android.app.ANRManagerProxyThread: Binder_3, Exception: java.lang.NoClassDefFoundError: android.app.ANRMana

Convert Uri to String and String to Uri

Convert Uri to String and String to Uri

I'm developing some Application which allows select image from SD Card, save it into database and set this value for ImageView. I need to know way for converting uri to string and string to uri. Now I used getEncodedPath() method of Uri, bu

What's a good PHP Active Record library? [closed]

What's a good PHP Active Record library? [closed]

I've been using CodeIgniter for some quite time, and I've been extremely happy with its Active Record stuff. It's great to query the database with it.Recently I've started a new project and I can't use such a framework anymore.Is there a si

Xcode 5 throws “Library not loaded” error when adding a test target

Xcode 5 throws “Library not loaded” error when adding a test target

I've tried adding a test target on Xcode 5 using the Add Target -> Add Cocoa Touch Unit Testing Bundle. However, when I run the test, I get the following error: 2013-09-24 10:43:14.446 Stack Exchange[48895:c07] Error loading /Users/arieli

C# code for saving an entire web page? (with images/formatting)

C# code for saving an entire web page? (with images/formatting)

I've been struggling to find an exmample of some C# code (I'm using C# Visual Studio 2008 Express) that can programmatically save an entire web page (given a URL) including the images and formatting (e.g. CSS). The intention is that in a s

Updated to OSX 10.9, now getting ruby error using homebrew

Updated to OSX 10.9, now getting ruby error using homebrew

Updated to Mavericks and updated Xcode. Now I am getting this error when trying to use brew. $ brew cleanup/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': /usr

Make EF use local database in App_Data folder

Make EF use local database in App_Data folder

I am using POCO approach on all my projects using Entity Framework. It's all good but I have one problem: It is creating database on my SQL Express, instead I want it to store my database in *.mdf file in App_Data folder. 1:Set an approp

On the iPhone, is it possible to find out which WIFI network we are connected to?

On the iPhone, is it possible to find out which WIFI network we are connected to?

If yes, can we also get additional information about the network configuration?One useful way to do this could be getting the SSID of the current network. Is there an API to do that?Update: I found a similar question here:Can the iPhone SDK

Setting 32-bit x86 build target in Visual C# 2008 Express Edition?

Setting 32-bit x86 build target in Visual C# 2008 Express Edition?

I'm building a C# application that loads a 32-bit COM dll. The compiled application runs fine on 32-bit Windows but barfs on 64 bit Windows because it can't load the 32-bit COM. Is there a way to set a 32-bit build target in VC# 2008 Expres

Are there any Objective-C web frameworks?

Are there any Objective-C web frameworks?

Are there any Objective-C web frameworks? The only frameworks I've found is frothkit.I'm primary looking for a way to write RESTful json web services in Objective-C. 1:GNUStepWeb is a web framework based on the Objective-C version of NeX

Adding an image to title slide using slidify

Adding an image to title slide using slidify

I am using the latest version of Rstudio (and knitr) and I have installed the development version of slidify from github. Slidify allows you to go straight from Rmarkdown to html5slides with 1 click.My issue is that I would like to add an i

System.Text.Encoding.GetEncoding(“iso-8859-1”) throws PlatformNotSupportedException?

System.Text.Encoding.GetEncoding(“iso-8859-1”) throws PlatformNotSupportedException?

See subject, note that this question only applies to the .NET compact framework. This happens on the emulators that ship with Windows Mobile 6 Professional SDK as well as on my English HTC Touch Pro (all .NET CF 3.5). iso-8859-1 stands for

How can I fade tabs in & out with the Twitter Bootstrap framework?

How can I fade tabs in & out with the Twitter Bootstrap framework?

jQuery UI has the option to initialize tabs with the tabs set to fade in/out, like so: $(".selector").tabs({ fx: { opacity: 'toggle' } });Is something similar possible with the Twitter Bootstrap framework tabs? 1:No, but you could add yo

Xcode 5- clang: error: linker command failed with exit code 1 (use -v to see invocation)

Xcode 5- clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm using xcode 5 for my mobile app project. I got this error when I try build the project. ld: warning: directory not found for option '-L\\\\\\\"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WorklightSDK\\\\\\\"' ld: wa

jQuery alternative for document.activeElement

jQuery alternative for document.activeElement

What I wanted to do is figure out whenever the user is engaged with an INPUT or TEXTAREA element and set a variable flag to true... and set that flag to false immediately after the user is no longer engaged with them (ie. they've clicked ou

Can gitconfig options be set conditionally?

Can gitconfig options be set conditionally?

Via Github I use the same set of "dot files" on several different computers and servers. On the Macs and Linux boxes under my direct control I have Sublime Text 2 installed and set up as my git merge and commit editor of choice. However, on

What are the differences between JSP and Facelets? [duplicate]

What are the differences between JSP and Facelets? [duplicate]

This question already has an answer here: Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards? 2 answers I just star