How to close current tab in a browser window?

How to close current tab in a browser window?

I want to create a link on a webpage that would close current active tab in a browser without closing other tabs in the browser. When user clicks close link, an alert message should appear asking user to confirm with two buttons, "YES" and

What are the Xms and Xmx parameters when starting JVMs? [duplicate]

What are the Xms and Xmx parameters when starting JVMs? [duplicate]

This question already has an answer here: How is the default Java heap size determined? 7 answers Please explain the use of Xms and Xmx parameters in J

Returning data from async call in Swift function

Returning data from async call in Swift function

I have created a utility class in my Swift project that handles all the REST requests and responses. I have built a simple REST API so I can test my code. I have created a class method that needs to return an NSArray but because the API cal

How to trigger event in JavaScript?

How to trigger event in JavaScript?

I have attached an event to a text box using addEventListener. It works fine. My problem arose when I wanted to trigger the event programmatically from another function. How can I do it? 1:You can use fireEvent on IE 8 or lower, and w3c'

What is the difference between #include  and #include “filename”?

What is the difference between #include and #include “filename”?

In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows?#include #include "filename" 1:In practice, the difference is in the location whe

Create Excel (.XLS and .XLSX) file from C#

Create Excel (.XLS and .XLSX) file from C#

How can I create an Excel Spreadsheet with C# without requiring Excel to be installed on the machine that's running the code? 1:You can use a library called ExcelLibrary. It's a free, open source library posted on Google Code:ExcelLibrar

This application is modifying the autolayout engine from a background thread, which can lead to engi

This application is modifying the autolayout engine from a background thread, which can lead to engi

I am getting this error This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.This will cause an exception in a future release. I don't know what is causing this

Is there any available API to represent various units of item like KG, Litre, Metre, KM, etc

Is there any available API to represent various units of item like KG, Litre, Metre, KM, etc

In my project, somewhere I have to work with a unitOfIssue of Items. Now, various items of course can have different units of representation. So, I was searching for some API or some way, to elegantly handle this situation.Is there any avai

Localizing attributed UITextView from storyboard

Localizing attributed UITextView from storyboard

I am using the storyboard and have a view where I have subclassed some UITextViews.My problem is that I am using ibtool --generate-strings-file to extract strings from the storyboard for localization and afterwards use ibtool -write on anot

Update AngularJS ng-model only on keypress enter?

Update AngularJS ng-model only on keypress enter?

I have this input field I am using for a search:There are many other filters I use as well (checkboxes, radio, etc) and I have a $watch on filter so any changes will fire a search. The problem is that I don't want the search to fire for the

Failing to run jar file from command line: “no main manifest attribute”

Failing to run jar file from command line: “no main manifest attribute”

I am trying to run a jar file from the console:java -jar ScrumTimeCaptureMaintenence.jarAnd am getting the error: Can't execute jar- file: “no main manifest attribute”As you can see I do in fact have a main file and it runs fine from eclip

How to Use -confirm in PowerShell

How to Use -confirm in PowerShell

I'm trying to take user input and before proceeding I would like get a message on screen and than a confirmation, whether user wants to proceed or not. I'm using the following code but its not working:write-host "Are you Sure You Want To Pr

observeValueForKeyPath not being called

observeValueForKeyPath not being called

I have a ViewController creating an instance of a UIView, and then I register an observer with the instance, such thatlogoAnimation = [[MainLogoAnimation alloc] init];[logoAnimation addObserver:self forKeyPath:@"patrocinioDidLoad" options:(

How do I see the differences between 2 MySQL dumps?

How do I see the differences between 2 MySQL dumps?

I have 2 MySQL dump files. I want to find the table data difference between 2 tables. 1:Use a DIFF tool - here are some graphical ones (both are free):KDIFFwinmerge 2:run mysqldump with "--skip-opt" to get the 2 dumps files i.e:mysqld

Missing script/generate in Rails 3

Missing script/generate in Rails 3

I just installed Rails 3 and created my first app. The install of Rails3 + ruby 1.9 went very smoothly but I am missing the generate script in script/generate.I have created a new app from scratch with no options to verify.Any idea why thi

Warning: connect.static is not a function Use --force to continue

Warning: connect.static is not a function Use --force to continue

I am using YO lessapp project, "grunt-contrib-connect" helps me to start a node js server on 9000 port. Whenever I run grunt serve (start the server) the service is aborted due to the below warning.Running "connect:livereload" (connect) tas

suppress instance method override linker warning framework xcode

suppress instance method override linker warning framework xcode

I have a library that started throwing a couple linker warnings under XCode 4.4. The warnings are along the lines of "ld: warning: instance method 'methodName:' in category from overrides method from class in "The framework still work fine

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

Android: Flush DNS [closed]

Android: Flush DNS [closed]

We recently released an android application that pulls information from an external server. Last week we moved from shared hosting to a dedicated server, that went smoothly up until we started getting complaints that users were getting ser

Why is the fact that Microsoft decided to support jQuery such a big deal?

Why is the fact that Microsoft decided to support jQuery such a big deal?

I don't see what all this fuss is about Microsoft's decision to support JQuery within ASP.NET MVC.There were signs that open-minded people are starting to have some say in the matters of marketing for a while now. And even the way MS does b

Checking when a file was last modified in C# on Windows OS

Checking when a file was last modified in C# on Windows OS

I'm looking to find out a way of seeing when a file was last modified in C#. I have full access to the file. 1:System.IO.File.GetLastWriteTime is what you need. 2:You simply want the File.GetLastWriteTime static method.Example:DateTim

How do you prevent Visual Studio from switching to the Code Analysis tab after each build?

How do you prevent Visual Studio from switching to the Code Analysis tab after each build?

After each build, Visual Studio 2012 switches from the Solution Explorer to the Code Analysis tab, usually with the yellow "No code analysis issues were detected." (Might as well say "TA DA!"). Is there an option to turn off the tab switchi

Remove unused Usings across entire assembly

Remove unused Usings across entire assembly

I am wondering if maybe ReSharper is able to run through every class and remove unused usings? I looked but I don't see an option like this in R# 4.5. Has anyone seen this in Resharper outside of just being able to remove usings in a sing

Rd file name conflict when extending a S4 method of some other package

Rd file name conflict when extending a S4 method of some other package

Actual questionHow do I avoid Rd file name conflicts when a S4 generic and its method(s) are not necessarily all defined in the same package (package containing (some of) the custom method(s) depends on the package containing the generic) a

Excel / VBA - Index Match function using Dynamic Ranges

Excel / VBA - Index Match function using Dynamic Ranges

How to effectively use an Index/Match formula in VBA?Background: I have a worksheet that relies heavily on the use of a formula that retrieves an output based on matching a specific name to its name range as well as a specific date to its