|
I have DIV, and UL inside it, with position: absolute. By default left is 0px. I need to move UL to the left on the 100% of UL width. UL right corner would be where DIV left corner begins.
Started by dynback.com on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Without....
Left: -100px;
Have you tried giving the UL the style:
ul { margin-left:-100%; }
That should move it left the same width as the UL, and will render outside the div .
If you know the width of your ul, set the left property to be -that width, e.g .
|
|
Hi,
I would like to check if a string begins with "node" e.g. "node001". Something like
if [ $HOST == user* ] then echo yes fi
How can I do it correctly?
Thanks!
UPDATE:
Thank you so much! I further need to combine expressions to check if HOST is either...
Started by Tim on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
You can select just the part of the string you want to check:
if [ ${HOST:0:4} = user ]
For your follow-up question, you could use an OR :
if [[ $HOST == user1 || $HOST == node* ]]
If you're using a recent bash (v3+) suggest bash regex comparison operator... .
|
|
My goal is to convert a timestamp from MySQL into a JavaScript Date object in an efficient manner. Here is my current snippet that converts the MySQL timestamp into a formatted date in PHP:
<?php // formats timestamp into following format: 2009, 7,...
Started by Knix on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can feed the Date constructor a date in mm/dd/yyyy or yyyy/mm/dd format and it will convert it:
>>> new Date('7/30/2009'); Thu Jul 30 2009... .
JS Date object is a mess.
You have to manually subtract that extra 1 from month number I'm afraid .
|
Ask your Facebook Friends
|
I have a WinForms utility that I use constantly, and enhance regularly. Roughly one million times, I have hit F5 to compile the utility -- and the compile fails because the utility is running, so the EXE is locked and VS cannot write out the new EXE.
...
Started by hoytster on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Perhaps?
<Target....
Open the project file in a text editor, remove the comments around the target and add an Exec task .
I assume that you could write a killer application and have it execute in the BeforeBuild target in the project file of your utility .
|
|
I've written a web application using Catalyst that has a lot of forms and needs to run over https. There are no hard-coded URLs, everything uses $c->uri_for or $c->req->uri . Everything worked great in the development environment using the dev...
Started by mhchaudhry on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
So, you should be able to squeeze $req->base(' https://foo.bar.com/ ') into your code somewhere... .
I read the source, and found that base is a read/write method .
I don't use Catalyst, but the docs for uri_for point to the request object's base method .
|
|
Beginning with a letter I know how to do:
WHERE mov_title REGEXP CONCAT('^(the )?', '$letter')
And this method will work if I substitute $letter with any number, so if its set to 1, it will find all records that begin with 1, but I need it to work for...
Started by Yegor on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
WHERE mov_title REGEXP '^(the )?[0-9]'
(Or set $letter to [0-9] if you want to keep using your existing WHERE clause.)
Another option may be to use the substring function
WHERE substring( post_title, 1, 1 ) between '0' and '9'
Perhaps SQL Wild cards... .
|
|
I have an XML file begining like this:
<?xml version="1.0" encoding="utf-8"?> <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"...
Started by agnieszka on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You may need to inspect your....
Do you have a byte-order-mark (BOM) at the beginning of your XML, and does it match your encoding ? If you chop out your header, you'll also chop out the BOM and if that is incorrect, then subsequent parsing may work.
|
|
I'm using DAYOFWEEK() function in MySQL which returns 1 for sunday . But in my country the week starts with monday , not sunday . Is there any chance to get dayofweek from MySQL formated like: (1 - Monday, 2 - Tuesday, ...) ?
Started by picca on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If you need.
UdfDayOfWeek` ( _date DATETIME, _firstDay TINYINT ) RETURNS tinyint(4) FUNCTION_BLOCK: BEGIN DECLARE) AS SignupDayOfWeek, p.FirstName, p.LastName FROM Profile p;
Use WEEKDAY() instead, it begins on Monday.
|
|
I'm sure this is super easy, but can't seem to figure it out.. I need to select all titles from my database where the title starts with A, or B, or C etc. Here's what I've tried so far:
SELECT * FROM weblinks WHERE catid = 4 AND title LIKE 'A'
but returns...
Started by SoulieBaby on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
For titles starting in 'A' use a % after the A
SELECT * FROM weblinks WHERE catid = 4 AND title LIKE... .
Only works with the LIKE comparison operator.
SELECT * FROM weblinks WHERE catid = 4 AND title LIKE 'A%'
% tells "anything", so it's "A" then anything .
|
|
April 15 Handicapping season begins Preseason is over, now it's for real 2012 Total Earnings: $30
Started by nokids on
, 18 posts
by 12 people.
Answer Snippets (Read the full thread at OttawaGolf):
Let the games begin! Obviously you're not a golfer I'm glad I love this game....and an even better thing that the handicapping season formally begins today.
Wishing you all a great season.
Games.
|