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

How to manage a redirect request after a jQuery Ajax call

How to manage a redirect request after a jQuery Ajax call

I'm using $.post() to call a servlet using Ajax and then using the resulting HTML fragment to replace a div element in the user's current page. However, if the session times out, the server sends a redirect directive to send the user to the

Where to put your code - Database vs. Application?

Where to put your code - Database vs. Application?

I have been developing web/desktop applications for about 6 years now. During the course of my career, I have come across application that were heavily written in the database using stored procedures whereas a lot of application just had on

How to find out which .c file contains the .c functions of R internals, on Windows?

How to find out which .c file contains the .c functions of R internals, on Windows?

I want to view the source code of R's match.call function. As it is an internal function, I downloaded the R source code, went to ./src/main/names.c and looked for match.call there. Thus, I found out that the corresponding .c function is ca

Ruby on Rails 4 - simple_form multiple select input

Ruby on Rails 4 - simple_form multiple select input

I have a simple_form input field that looks like this:When I leave multiple: true off, the form submits the chosen value for the parameter :particular_users and I can see the value when debugging using "raise params.inspect". However when I

CSS positioning to fill container: width vs. left/right?

CSS positioning to fill container: width vs. left/right?

Considering:For elements that are absolutely positioned inside a relativelypositioned container.If you want the element to fill the width of the container.The element is also bottom-aligned.Is it best for maximum browser compatibility to se

Force break on any exception thrown in program

Force break on any exception thrown in program

When coding in C# I like not to handle exceptions because it makes it easier to figure out where and why things went wrong. However, I can't give anyone a program that doesn't handle exceptions.Can I somehow force Visual Studio to break on

a wide div with unlimited width

a wide div with unlimited width

I've a big problem!You know, a div default width is 100% (of the parent). And if its content width is more than 100% (100%=1440px), div shows content in multiply lines.Now, if i want, the div shows its content in one line, what should I do?

height style property doesn't work in div elements

height style property doesn't work in div elements

I'm setting a height of 20px on a , though when it renders in the browser, its only 14px high.Any ideas?My Text Here 1:You cannot set height and width for elements with display:inline;. Use display:inline-block; instead.From the CSS2 sp

Laravel Homestead: 403 forbidden on nginx

Laravel Homestead: 403 forbidden on nginx

I just installed Laravel Homestead according to their instructions. When I open http://homestead.app:8000 I get the nginx 403 forbidden HTTP Response.I have tried setting app/storage permissions to 755, but that didn't work, so I reloaded V

Get hostname from Rails controller

Get hostname from Rails controller

I am trying to get the hostname of the machine which a rails application is running on from the controller.What would be the best way to do this taking into account it should work on both windows and linux? 1:There's always:require 'sock

MySQL - Best method to handle this hierarchical data?

MySQL - Best method to handle this hierarchical data?

This is a followup to:MySQL - Is it possible to get all sub-items in a hierarchy?I have an arbitrary-depth adjacency list model table (I am at the point that I can convert it into a nested set model.I read the MySQL data on how to use a nes

Creating Infowindows on features loaded via loadGeoJson()

Creating Infowindows on features loaded via loadGeoJson()

I apologize if this is basic, but I have very limited javascript knowledge.I'm making a map that loads GeoJSON data that I created in ArcGIS reformatted to GeoJSON using ogr2ogr. I've got the map loading and showing the point markers from

How to move an element after another element using JS or jquery?

How to move an element after another element using JS or jquery?

I would like to move one DIV element beside another, it is normally like this: ... ... ... ... ... ... ...

How to make a Windows service with parameters?

How to make a Windows service with parameters?

I have written a Windows service, of which I want to have 1 instance running per customer. This is because the customers each have their own DB with identical schemas; the only difference between the Windows services is that they will each

Custom JavaScript alerts in iOS using PhoneGap HTML

Custom JavaScript alerts in iOS using PhoneGap HTML

My app has a couple of JS alerts and it seems to always display the page name like.index.html Is there a way to change the index.html to my App's name or custom text.Example:My App // Which replaces .index.htmlalert("I am an alert box!");

Convert float to plain string representation

Convert float to plain string representation

SO,The problemMy question is about trivial thing: how to convert numeric string to it's plain ("native") representation. That means: if numeric string is already in plain view, leave it as it is, but if it is in scientific notation, convert

Windows 8 IIS does not load stylesheets and images in asp.net app

Windows 8 IIS does not load stylesheets and images in asp.net app

I just installed Windows 8 on my computer and tried to load my ASP.net application. The page loads with no problems. But none of the images or stylesheets that are located in the App_Themes directory load. I do have a separate folder that h

Bootstrap fluid row columns with different height

Bootstrap fluid row columns with different height

Dynamically I create a set of boxes with slightly different height and want to appear 2, 3 or 4 of them (depending on the screen size) at the same row. I tried the following markup with bootstrap: TwoLines TwoLines

Responsive height proportional to width

Responsive height proportional to width

Is it possible to implement the following logic usic HTML and CSS?width: 100%;height: 30% of width;What I want to implement:If I decrease the width, the height will also decrease proportionally. 1:Padding %This can be achieved by giving

Get Entity Framework 6 use NOLOCK in its underneath SELECT statements

Get Entity Framework 6 use NOLOCK in its underneath SELECT statements

I am using Entity Framework 6 in an MVC 5 project. As you're aware of, SELECT queries in SQL Server perform faster and more efficient if we use WITH (NOLOCK) in them. I checked out a few SQL SELECT statements generated by Entity Framework 6

Converting a querystring into an associative array

Converting a querystring into an associative array

In PHP, I need a function to convert a querystring from an URL, say: http://example.com?key1=value1&key2=value2 into a PHP associative array : array ['key1' => 'value1', 'key2' => 'value2'].I've come up to this piece of code. It works, but

Android: When the keyboard pops up, the layout is invisible. How do I solve this?

Android: When the keyboard pops up, the layout is invisible. How do I solve this?

In my layout, there is a TextView at the bottom of the screen. The problem is that when I click inside the text box to type something, the keyboard covers the text box as a result of which I am not able to see what's happening... Is there a

Gstreamer tcpserversink v0.10 vs 1.0 and HTML5 video tag

Gstreamer tcpserversink v0.10 vs 1.0 and HTML5 video tag

I am embedding a HTML5 video tag in my site, the source being a gstreamer stream.I have a pipeline working on gst 0.10:gst-launch-0.10 -v videotestsrc ! theoraenc ! oggmux ! queue ! tcpserversink port=8080 sync-method=2I can connect to this

Shiny UI: Save the Changes in the Inputs

Shiny UI: Save the Changes in the Inputs

I have quite a problem. I'm trying to run a program with quite a few different settings, which can be set in the ui. In my case the user may need to run the programm with the same settings more than once. My Problem is that if you refresh o