ArrayList with different types of objects

public static void main (String[] args) { SalariedEmployee se = new SalariedEmployee(); HourlyEmployee he = new HourlyEmployee(); se.setName("Simos"); se.setAfm("111440000"); se.setSalary(4500); he.setName("Chatzis"); he.setA

Full screen Arch Linux in virtual box

I have a problem with Arch linux in virtual box. I have installed Arch linux in VB but when I try to go fullscreen it does not work, (it displays only in a small square at the center). I tried to install guest additions according to wiki, but it stil

Android | Stop TabLayout reload / refresh my fragments

I've a similar tab layout, with 4 tabs. When I go from tab 0 to tab 2 and then I come back to tab 0, Fragment0 is reloaded.. Same problem when I go from a tab to another "away" tab. I would to load Fragment only first time and re-use them, witho

Javascript sounds in Android and Iphone browser

I'm developing simple javascript game, which should be embeded in Android and Iphone in-app browser. I have problem with sounds. I tried this, works good on PC, but not working on android and works strange with big delays on iphone. init: var hitSoun

Several notifications in different places brilliant application

I made a simple example to show my problem, which is: how to set notifications at different places independently of each others (let's say I want each notification to be displayed at the top right and left, respectively) ``` library(shiny) ui <- flui

When a unicode key is entered, is it UTF-8 / UTF-16 or what?

Using windows (XP for argument sake) When you have a foreign language e.g. arabic and they type a key on the keyboard and you have an editor that stores that code in a string then is it encoded as UTF-8/UTF-16 etc? Why I'm asking is that I'm looking

Modal popup on the output window

Trying to figure out how to make a modal pop up on browser window exit. I know how to do an alert box, but I want to have users answer a questionnaire on exit, instead of a basic "are you sure you want to leave" alert box. window.onbeforeunload

Jquery's automatic acquisition gains value

auto complete is working fine. I put a hidden value for saving the value of auto complete by this method my code : $("#cityOp").autocomplete({ source : function(request, response) { var city_value = jQuery("#cityOp").val(); $.ajax({ ur

Cronjob does not echo?

I have a script to check if mysql is running. #!/bin/sh SERVICE='mysql' if ps ax | grep -v grep | grep $SERVICE > /dev/null then echo "$SERVICE service running, everything is fine" else echo "$SERVICE is not running" echo "$SER

CSS centering multiple images in rows (pyramidal formation)

http://jsfiddle.net/XKL6E/ How can I centre these images so they form a pyramid (overlapping each other halfway)?If you don't care to support IE7, you can use display: inline-block instead of float: left and just center the whole chunk: http://jsfidd

UITableView with UISwitch

I use storyboard and Auto Layout. I add UISwitch to my cell with tag 5. When I choose first UISwitch and scroll down I see that other UISwitch is also turned on and if I scroll up my first UISwitch is turned off. How to fix this? My code: - (UITableV

Using EXEC () to Recreate a Stored Procedure Finds No Errors

I'm checking the validity of existing stored procedures, by obtaining their definition and running the ALTER statement on them. The problem I have is that any stored procedure which doesn't compile (because a dependency has gone) isn't being flagged

Why will my loop not work? (Python)

Yes, this is homework. I'm just trying to understand why this doesn't seem to work. I'm trying to find the longest substring in a string that's in alphabetical order. I make a list of random letters, and say the length is 19. When I run my code, it p

date problem due to the dated function between

I have following query: SELECT datediff(d, 0, sauda_date), Scrip_Code, SUM(CASE WHEN Buy_sell = 1 THEN Trade_Qty ELSE 0 END) AS BuyQty, SUM(CASE WHEN Buy_sell = 1 THEN Market_Rate ELSE 0 END) AS BuyRate, SUM(CASE WHEN Buy_sell = 1 THEN Trade_Qty * Ma

Matlab: How to avoid artefacts in filled contour plots

I am trying to export filled contour plots from Matlab as vector graphics to include in a Latex file. My current methodology is: contourf(x,y,v_mag,20), axis([0,width,0,height]),daspect('manual') ; grid off colormap jet h = colorbar; caxis([0 v_lid])

L.circleMarker leaflet

how to replace circle with icon in L.circleMarker var style_station = { radius: 12, stroke:false, weight: 1, opacity: 1, fillOpacity: 1, // color: '#00ABDC', }; $.getJSON("url", function(stationexits){ exitlayer = L.geoJson(stationexits, { onEac

How do I insert data into the table with a join sql?

i have 2 tables on db. First table: users id|name|mail|password|group second table scores id|name|score The idea is get the name from users using the id (this id already know because i get that by php), then insert a score in table scores using the n

Will a new operator return NULL?

Possible Duplicate: Will new return NULL in any case? Say i have a class Car and i create an object Car *newcar = new Car(); if(newcar==NULL) //is it valid to check for NULL if new runs out of memory { } On a standards-conforming C++ implementation,

How do I read a private field in Java?

I have a poorly designed class in a 3rd-party JAR and I need to access one of its private fields. For example, why should I need to choose private field is it necessary? class IWasDesignedPoorly { private Hashtable stuffIWant; } IWasDesignedPoorly ob