<a href="facebook.com/sharer" target="_blank" >Share this</a>
How do I make this a certain width and height, in a new window, when the user clicks on it?
In firefox, the current code only opens up a new tab (not a new window)
Are unused CSS images downloaded by the browser or ignored?
Eg. in CSS rules which don't match any elements.
.nothingHasThisClass{background:url(hugefile.png);}
Or would this be browser-dependant?
Hi
How do I change my code so that it lists the elements in alphabetical order from a to z. Right now it's ordering from z to a. I can't figure it out and am stuck :-/
String sName1 = ((Address)o).getSurname().toLowerCase();
String sName2 = (this.surname).toLowerCase();
int result = (sName1).compareTo(sName2);
return result;
Thanks :)
I'm just getting my head around java (and OOP for that matter), the only thing I am familiar with is MySQL. I need to keep the DB connection open throughout the duration of the application, as well as a server socket.
I'm not even sure if they both need separate classes, but here's what I have so far:
http://pastebin.com/qzMFFTrY
(it wouldn't all go in a code tag)
The variable I need is con for line 86.
Is there anyway to remove a character from a given position?
Let's say my word is:
PANCAKES
And I want to remove the 2nd letter (in this case, 'A'), so i want PNCAKES as my return.
Translate doesnt work for this.
Replace doesnt work for this.
Regex is damn complicated...
Ideas?
I launched system monitor to kill one program, which didn't responded on any mouse clicks, etc.
But i occasionally killed another process.
so, taskbar was killed. (it was in the bottom of the screen, in the top all is good)
reboot didnt help o_O.
Now I use Alt-Tab and alt-controll-arrows to switch between programs and desktops (it works).
How to launch taskbar again? its very strange that reboot didnt help me.
If I try to get endpoints for every year, for example, and do the following:
xts.data <- xts(1:10000, order.by=seq(from=as.Date("1970-01-01"), by=1, len=10000))
z <- endpoints(xts.data, on="months", k=12)
The return value for this is:
> z
[1] 0 10000
Same with numbers higher than 12. Why would xts simply not return indices of every year or 13th month starting from the beginning. Is it limited by the number of periods in a year? That is if i did:
z <- endpoints(xts.data, on="weeks", k=54)
This seems to work fine.
This is my first time building a responsive site, and as I tailor the CSS for the iPhone I'm running into a problem. The styles all apply correctly, the text changes size and the wrapper changes widths. The problem is the iPhone browser still opens up at a huge width, see the screenshot:
I'm using
@media all and (max-device-width: 480px) {}
to set the specific iPhone css. body {width:;} doesn't work.
Thanks for the help :)
I need a way to get user home directory in C++ program running on Linux. If the same code works on Unix, it would be nice. I don't want to use HOME environment value.
AFAIK, root home directory is /root. Is it OK to create some files/folders in this directory, in the case my program is running by root user?
Possible Duplicate:
What does !! mean in ruby?
Ruby, !! operator (a/k/a the double-bang)
Sometimes I see a Ruby code like this
def sent?
!!@sent_at
end
It seems to be not logical. Is it necessary to use here double !? As far as I'm concerned, it might be just
def sent?
@sent_at
end
UPDATE: then what is the difference between these
def sent?
!!@sent_at
end
def sent?
@sent_at.nil?
end
def sent?
@sent_at == nil
end
I'd like everything to function correctly, except when it's mobile, the entire site will used a set of specific templates.
Also, I'd like to autodetect if it's mobile. If so, then use that set of templates throughout the entire site.
in R , when i use "print", i can see all the values, but how can i save this as a vector
for example, in for loop,
for (i in 1:10), i want the value of A , when i= 1,2,3,4..... but if i use the x=A, it only have the final value of A which is the value when i = 10. so , how can i save the vaule in print(A)
Hello there, I have a div with id kGrowl and inside that div I have a select element with name = mover. I try to use this selector:
$('#kGrowl:contains([name=mover])').length
But it is currently returning 0. How is my selector wrong?
Thanks.
Hello, is there a good regex expression that would be able to compare two dates
like 3/27/2010 to 3/8/2010 to tell if the first date is greater then the second date?
I'd like to compare using javascript
Hi,
I have a problem with JQuery Context Menu ( link text ) and iframe.
If i use it inside, the context menu is naturaly shown inside. But it will be partialy shown.
I am searching how to resolve it.
Please note that the context menu only appear when i click on specific iframe's elements.
thanks :)
In Django, I have a model object in a list.
[object, object, object]
Each object has ".name" which is the title of the thing.
How do I sort alphabetically by this title?
This doesn't work:
catlist.sort(key=lambda x.name: x.name.lower())
I've seen this all over the web
javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnk2','')
Checking headers of the last place I saw it didn't reveal a server side language.
What server side language and/or framework encourages this style of link?
Greetings.
I am querying tables from Microsoft SQL 2008 which have date split across 3 columns: day, month and year. Unfortunately, I do not have control over this because data is coming in to the database daily from a 3rd party source in that format.
I need to add between to a where clause so user can pull records within a range. Would be easy enough if date was in a single column but finding it nearly impossible when its split across three columns.
To display the date, I am doing a
CAST(
CAST(year as varchar(4)) + '-' +
CAST(month as varchar(2)) + '-' +
CAST(day as varchar(2))
as date) AS "date"`
in a select. I tried to put it as a parameter for datediff function or just the regular between but get no results.
Thanks for any help.
With a long but plain html document opened on a mobile device (webkit), how do I ensure that text doesn't crop vertically when scrolling?
I think this should be possible by either adjusting line spacing or adding extra padding.
TIA.
Hi Folks,
Trying to debug something that basically .trim()'s, .val()'s and .length's a textarea input as HTML below (truncated):
<form id="Kontaktanfrage" method="post" action="tests/testform/">
...
<textarea cols="50" rows="8" id="el_12" name="FORM[Kontaktanfrage][el_12]" title="Ihre Nachricht: *" class="textarea required"></textarea>
...
</form>
JavaScript:
function validateField(formId, fieldId) {
if (fieldId) {
var element = "form#"+formId+" input#"+fieldId;
var fieldValue = jQuery.trim(jQuery(element).val());
var fieldLength = fieldValue.length;
var fieldError = "";
if ($(element).is('.textarea.required') && fieldLength == 0) {
fieldError = "error message";
}
}
}
The above if check is never true.
Using JQuery: 1.4.1.
Having seen other examples online, I can't see what the difference should be. Feel free to test it in FireBug at (http://www.initiat.de/tests/testform/). Any help appreciated, can't see what I'm doing wrong.