How to capture the browser window close event?

How to capture the browser window close event?

I want to capture the browser window/tab close event.I have tried the following with jQuery: jQuery(window).bind( "beforeunload", function() { return confirm("Do you really want to close?") })But it works on form submissi

How to change Status Bar text color in iOS 7

How to change Status Bar text color in iOS 7

My application has a dark background, but in iOS 7 the status bar became transparent. So I can't see anything there, only the green battery indicator in the corner. How can I change the status bar text color to white like it is on the home

How do I check if an element is hidden in jQuery?

How do I check if an element is hidden in jQuery?

It is possible to toggle the visibility of an element, using the functions .hide(), .show() or .toggle().How would you test if an element is visible or hidden? 1:Since the question refers to a single element, this code might be more suit

Why aren't variable-length arrays part of the C++ standard?

Why aren't variable-length arrays part of the C++ standard?

I haven't used C very much in the last few years. When I read this question today I came across some C syntax which I wasn't familiar with.Apparently in C99 the following syntax is valid:void foo(int n) { int values[n]; //Declare a varia

Using i and j as variables in Matlab

Using i and j as variables in Matlab

i and j are very popular variable names (see e.g., this question and this one). For example, in loops:for i=1:10, % do something...endAs indices into matrix:mat( i, j ) = 4;Why shouldn't they be used as variable names in Matlab? 1:Be

How to make a Bootstrap 3 dropdown menu open by default when it is inside a collapsed navbar

How to make a Bootstrap 3 dropdown menu open by default when it is inside a collapsed navbar

I'm trying to make my dropdown menu open by default when my collapsed navbar is opened. Here is a fiddle to show my code so far. Currently, if you click on the navbar when it's in a collapsed state, two links and a dropdown menu are reveale

Sub Directory to a different server

Sub Directory to a different server

Is it possible to for a domain e.g. www.myclient.com to have a sub directory hosted on a completly different (our) server?They don't want to point subdomain.myclient.com to our servers so they want it as folder www.myclient/subdomain/Thanks

Gradle build with Java 8

Gradle build with Java 8

I'm trying to build Java 8 project with Gradle 1.6, but I'm stuck on this error:Execution failed for task ':ejb:compileJava'invalid target release: 1.8JAVA_HOME is set as "D:\Program Files\Java\jdk1.8.0", and build.gradle contains these lin

Android emulator won't boot up

Android emulator won't boot up

I'm trying to install android sdk and run my first application on my PC (Win7 64 bit). I followed instructions on http://developer.android.com from the beginning to http://developer.android.com/training/basics/firstapp/running-app.html When

Static keyword in function parameter

Static keyword in function parameter

I've just found this function definition in some embedded code:float round_float_to_4(static float inputval);I'm familiar with other uses for static (global variables, functions and local variables), but this is the first time I see it as s

How to configure custom global interfaces (.d.ts files) for TypeScript?

How to configure custom global interfaces (.d.ts files) for TypeScript?

I've been struggling with this problem for the last few hours and I just can't seem to find anything on the internet that would clearly explain this, supposedly, simple concept.I'm currently working on a ReactJS project which uses Webpack2

jquery $(this).id return Undefined

jquery $(this).id return Undefined

I have two asp radio buttons on a page that are placed in a updatepanel. I wrote a click event for them with jQuery like this:$(document).ready(function () { $(".inputs").click(function () { alert($(this).id); });});But it ret

Label printing development using b-pac SDK in a C# application

Label printing development using b-pac SDK in a C# application

I am developing a C# application of POS system in Visual Studio 2012 RC. I have to print the sales on label printer using Brothers P-Touch QL-500 Label printer.WHAT I HAVE DONE ALREADY.I have installed latest b-pac SDK 3.0Successfully add

Universal application

Universal application

How to make universal app for iphone and ipad. How we detect the device whether it is for iPhone or iPad? 1:in Xcode 3select your target in Xcode, right-click and use the “Upgrade Current Target for iPad…” command.in Xcode 4click on the

Debugging Linux Kernel in VMWare with Windows host

Debugging Linux Kernel in VMWare with Windows host

I'm working on my first ever kernel module so I'm a bit new at this...My module is occasionally producing a panic and I cannot get to the bottom of it using printk. As far as I can tell my options for debugging are:1.) Find the generated OO

gmail integration in ios application

gmail integration in ios application

I am working on an ios Application, recently I have got a new requirement for it i.e. to provide user a option to sign in with gmail . when user hit the sign in button then i want to open gmail login screen and after user enter his credenti

Javascript: Close Popup, Open New Window & Redirect

Javascript: Close Popup, Open New Window & Redirect

I would like to close the current popup, open a new window (tab) and redirect to a specific link. This works extremly easy with my links. I simply add "target="_blank"" and it works just fine (it doesnt close the pop up actually, but minim

how to use the cmake functions get_prerequisites and get_filename_component for target dependency in

how to use the cmake functions get_prerequisites and get_filename_component for target dependency in

We have set up a cmake project with external shared library dependencies. We want to package the binaries and dependencies of our project using CPack. However we are getting different results on windows and linux systems when trying to find

Wicket Label not updated / remains invisible

Wicket Label not updated / remains invisible

I am trying to implement Breadcrumb Navigation on a WebPage that exchanges a content Panel via ajax. It ends up looking like this:Home >> Page >> PanelHere is my page code:public MyPage() { super(); contentContainer = new WebMarkupCo

Iphone - device - linker error

Iphone - device - linker error

I have added libpng to my application. If I build for simulator, everything is OK. When I build application for device, I got linker error: Undefined symbols for architecture armv7: "_png_init_filter_functions_neon", referenced from: _pn

Adding Local User to Local Admin Group

Adding Local User to Local Admin Group

I am writing a C# program to be pushed out the labs I work in. The program is to create a local admin account(itadmin), set the password, set the password to never expire, and add the account to the local Administrators group. The program

Sankey diagram in R

Sankey diagram in R

Attempting to make a fairly generic Sankey diagram with the help of R's networkD3 package. Just for reference--here's the example from the package's manual library(networkD3)library(jsonlite)library(magrittr)energy % fromJSONsankeyNet

How to get back the UIButton border in iOS 7?

How to get back the UIButton border in iOS 7?

I built an old project in iOS SDK 6.1 in Xcode 5. However, the UIbutton is borderless when the app runs on an iPhone running iOS 7. I have checked the .xib is "Builds for" > "Project Deployment Target (5.0)":How can I config Xcode 5 to bui

TS2318: Cannot find global type 'AsyncIterableIterator' - async generator

TS2318: Cannot find global type 'AsyncIterableIterator' - async generator

I have an async generator: async function* foo() { yield "wait..."; await new Promise(r=>setTimeout(r, 900)); yield new Promise(r=>setTimeout(()=>r("okay!"), 100));}async function main() { for await (let item of foo()) { let result =

Undefined symbols for architecture i386: “_utf8_nextCharSafeBody”, referenced from:\"

Undefined symbols for architecture i386: “_utf8_nextCharSafeBody”, referenced from:\"

How to clear this error. Please help me, I don't know about socket processUndefined symbols for architecture i386: "_utf8_nextCharSafeBody", referenced from: _validate_dispatch_data_partial_string in SRWebSocket.old: symbol(s) not fou