How to center absolutely positioned element in div?

How to center absolutely positioned element in div?

I need to place a div (with position:absolute;) element in the center of my window. But I am having problems doing so, because the width is unknown.I tried this. But it needs to be adjusted as the width is responsive..center { left: 50%;

jQuery animate backgroundColor

jQuery animate backgroundColor

I am trying to animate a change in backgroundColor using jQuery on mouseover.I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroundColor I get and "Invalid Property" js err

In JavaScript can I make a “click” event fire programmatically for a file input element?

In JavaScript can I make a “click” event fire programmatically for a file input element?

I'd like to make a click event fire on an tag programmatically.Just calling click() doesn't seem to do anything or at least it doesn't pop up a file selection dialog.I've been experimenting with capturing events using li

Android Studio: Add jar as library?

Android Studio: Add jar as library?

I'm trying to use the new Android Studio but I can't seem to get it working correctly.I'm using the Gson library to serialize/deserialize JSON-objects. But the library somehow isn't included in the build.I had created a new project with jus

How to check internet access on Android? InetAddress never times out

How to check internet access on Android? InetAddress never times out

I got a AsyncTask that is supposed to check the network access to a host name. But the doInBackground() is never timed out. Anyone have a clue?public class HostAvailabilityTask extends AsyncTask { private Main main

PHP parse/syntax errors; and how to solve them?

PHP parse/syntax errors; and how to solve them?

Everyone runs into syntax errors. Even experienced programmers make typos. For newcomers it's just part of the learning process. However, it's often easy to interpret error messages such as: PHP Parse error: syntax error, unexpected '{' in

CSS very thin font? [closed]

CSS very thin font? [closed]

How do I create very thin fonts with CSS, like at http://www.google.com/landing/newgadgets/ ?Right now I'm using this, but I'm on a mac and I don't think "Helvetica Neue" is supported on windows.h1{ font-size:64px; font-family:Helvetica N

Google static map API getting 403 forbidden when loading from img tag

Google static map API getting 403 forbidden when loading from img tag

What I have is a Google map that shows the location of a property but when I come to print the dynamic maps dont print so good so I decided to implement the Google Static Map image API.http://lpoc.co.uk/properties-for-sale/property/oldgate-

Making GSON & Realm play nice

Making GSON & Realm play nice

I'm trying to use Realm + GSON.If they would work together well, it would be a match made in heaven.However, when I extend my model objects with "extends RealmObject" I get this:10-08 17:00:19.578 12492-12492/appwise.be.gsontestproject E/A

Mockito UnfinishedStubbingException

Mockito UnfinishedStubbingException

I am new to Mockito, I have tried looking into this Exception but I haven´t found a concrete answer. It happens in my code when I use two mocks together, meaning that I give through the constructor of a mock, another mock. Like so:...Operat

Is there a public Google API to access reminders set in Google Now or Google Keep?

Is there a public Google API to access reminders set in Google Now or Google Keep?

The time and location-based reminders in Google Now and Google Keep are different from Google Calendar event reminders. Is there a public API to access these event reminders in Now and Keep? 1:There's no public API for either of these Go

Android SDK source code

Android SDK source code

I need to look at the .java files of the android sdk. I have developed applications before but I never needed to look at them so it wasn't a problem then. I saw there is a jar file android.jar that contains all the class files structured b

Is there any way to integrate OpenCV with PHP?

Is there any way to integrate OpenCV with PHP?

I am trying to develop an application with PHP.There are two possible ways this application will be developed. The first one is to try to do something like www.picnik.com, image processing directly on the browser.The other is to develop CBI

AngularJS: “Error: Unexpected call to method or property access.undefined” only in IE 8

AngularJS: “Error: Unexpected call to method or property access.undefined” only in IE 8

Have you ever had the error "Error: Unexpected call to method or property access.undefined" only IE8? What was causing it? How did you solve it?-- Note: It assumes the same code works fine in Chrome, Firefox, SafariEdit: ContextI'm building

How to add a 'default using' to all cshtml pages?

How to add a 'default using' to all cshtml pages?

I'm creating my first MVC.Net application and I find myself including @using Gideon.Core.Mvc; on almost every page. Is it possible to add it by default to all pages? In Asp.Net I'm able to add default stuff for controls to the web.config, h

WkHTMLtoPDF not loading local CSS and images

WkHTMLtoPDF not loading local CSS and images

I've seen multiple questions that are very similar to this one, so I was hesitant at first to post it. But nothing suggested resolved my issue and I can't seem to figure out what's wrong myself.For a project I made for one client they wante

text field not working in safari

text field not working in safari

I'm working on an online eBay profit forecasting calculator hereI can't seem to get the input fields to work in safari and mobile safari. They work fine in FF & Chrome. I click into them, but nothing shows when I type. I've been searching g

Where can I find examples or tutorials about creating a custom android lockscreen?

Where can I find examples or tutorials about creating a custom android lockscreen?

I'm interested about Android and have been trying to find an example or tutorial about creating a custom lockscreen.I wanna create new lock screen for easy accessibilities.For example fast access to camera.fast access to phone dial.Using Sp

Android : Why Intent.EXTRA_LOCAL_ONLY shows Google Photos

Android : Why Intent.EXTRA_LOCAL_ONLY shows Google Photos

What I'm trying to do in my application is to let the user choose a picture from his phone's gallery(Don't want to get gallery images only but also allowing a user to choose their app of choice). The code I'm using is as follows: Intent int

Is there anyway to get ID3 metadata from an MP3 or Vorbis comments from Ogg via the HTML5 audio elem

Is there anyway to get ID3 metadata from an MP3 or Vorbis comments from Ogg via the HTML5 audio elem

Mozilla Developer Center's HTML5 media guide describes an event for audio and video elements called "loadedmetadata". Is there anyway to get the metadata for files? I am writing an HTML5 extension for Google Chrome and I don't know what the

Google Spell check URI not working

Google Spell check URI not working

http://www.google.com/tbproxy/spell?lang=encan any one help me finding google spell check API Url 1:Check this link and replace test with your suggested word - www.google.com/complete/search?output=toolbar&q=test 2:From searching arou

Is location provider really a battery drain?

Is location provider really a battery drain?

I need to implement location-based service. I don't need fine location, so no GPS is needed.Easiest would be to start listening for locations updates at app start, and leave it ON: mLocationMgr.requestLocationUpdates(LocationManager.NETW

Do commercial (paid) iPhone apps have to pay a license to Google for Maps? [closed]

Do commercial (paid) iPhone apps have to pay a license to Google for Maps? [closed]

I know that happens with commercial websites so I was wondering if commercial iPhone apps that use the MapKit (especially those that generate a lot of traffic) need to get any sort of license from Google Maps as well.My best guess would be

sqlite convert 'dd.MM.yyyy' formated String to date

sqlite convert 'dd.MM.yyyy' formated String to date

i have a sqlite database on my android, whith a datetime column, that contains a date with the Format dd.MM.yyyy.It's not my Database, I'm niot able to change the Dateformat.I want to compare the date in the database with a String, which is

Domains not properly catching errors while testing nodeJS in mocha

Domains not properly catching errors while testing nodeJS in mocha

When running tests that utilize domains for error handling, Mocha still appears to be throwing an error even if a domain handler inside a library should have caught the error. If I execute the code outside of Mocha, it functions correctly l