daniel7912
Members
-
Joined
-
Last visited
Reputation Activity
-
daniel7912 reacted to SniderDK in How to install/use phpseclib?yes, don't see why not
-
daniel7912 reacted to SniderDK in How to install/use phpseclib?you would be better of using the shh2 package on PECL http://pecl.php.net/package/ssh2
copying files from server > server is actually really easy with it!
http://uk.php.net/manual/en/function.ssh2-scp-send.php#refsect1-function.ssh2-scp-send-examples
hope you find that interesting
Command to run to install on linux (because its a beta package you have to specify the channel... it is 6 year old code so don't take the beta bit to seriously)
-
daniel7912 reacted to Skateside in 2 Javascript functions clashing?Remove your inline load script from the body tag and the window.onload assignment. Add this function to your scripts.
function addEvent(elem, evt, func) { if (elem.addEventListener) { elem.addEventListener(evt, func, false); } else if (elem.attachEvent) { elem.attachEvent('on' + evt, function() { func.call(elem, window.event); }); } }
Now pass your load functions to that addEvent function:
// Your inline load event: addEvent(window, 'load', function () { setInterval('loadTime()', 200); }); // Your big function a little lower down: addEvent(window, 'load', function (){ stopwatch('Start'); });
-
daniel7912 reacted to webdeveloper93 in Best way to use Timezones?Yes it should correct itself automatically on daylight savings
-
daniel7912 reacted to Jay Gilford in PHP current date as variable$date_entered = date('d-m-Y', strtotime($result3[0]));
-
Something like this
$sql = mysqli_query($mysqli,"SELECT count(*) as `name_count` FROM table WHERE name = '$name'"); $rel = mysqli_fetch_assoc($sql); $counted_name = $rel['name_count'];
-
daniel7912 reacted to Jay Gilford in PHP current date as variableYes, putting something in single quotes within your query means it's interpreted as a string. NOW() is a MySQL function and therefore doesn't require the quotes around it.
NOW() will insert the date (and time if you have a date time column).
'NOW()' will try and insert literally that text, which of course MySQL won't use
-
daniel7912 reacted to Jay Gilford in PHP current date as variable$date = date('d-m-Y');
-
daniel7912 reacted to Monie in Checking if record exists in databaseI believe that there is a better way of doing this, but this is the only solution that i have in mind right now
Just before you perform your INSERT statement, in order for you to check if the the user already in the database (I assume the primary key in your database is referring to the name value) with this simple statement:
$sql = "SELECT name FROM competition_entrants WHERE name = '$name'"; $result = mysql_query($sql,$connection) or die(mysql_error()); $row = mysql_fetch_array($result); $num = mysql_num_rows($result); if($num){ // The registered user exist in the database, so you can skip the insert statement! exit; } else{ //User do not exist in the database, peform the Insert statement here! mysql_query("INSERT INTO competition_entrants (name, lastname, email, recommender) VALUES ('".$this->data["Map"]["first_name"]."', '".$this->data["Map"]["last_name"]."', '".$this->data["Map"]["email"]."', '".$user["Profile"]["full_name"]."')"); exit; }
Hope this helps!
-
Hmmmm good question, I'd propose something like this...
Numbers - This table would hold the branches and their phone number
Openings - The days the branch is open
Openings_times - The times the branch is open in the openings days.
Holidays - Specifies timeframes which a branch wouldn't be open, e.g christmas/new year. I know you didn't ask for it but I bet your client will
-- -- Table structure for table `holidays` -- CREATE TABLE IF NOT EXISTS `holidays` ( `id` int(11) NOT NULL AUTO_INCREMENT, `branch_id` int(11) NOT NULL, `begins_at` datetime NOT NULL, `ends_at` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -- Dumping data for table `holidays` -- INSERT INTO `holidays` (`id`, `branch_id`, `begins_at`, `ends_at`) VALUES (1, 1, '2011-04-03 00:00:00', '2011-04-13 00:00:00'); -- -------------------------------------------------------- -- -- Table structure for table `numbers` -- CREATE TABLE IF NOT EXISTS `numbers` ( `id` int(11) NOT NULL AUTO_INCREMENT, `number` varchar(32) DEFAULT NULL, `branch` varchar(32) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `numbers` -- INSERT INTO `numbers` (`id`, `number`, `branch`) VALUES (1, '0131 1231234', 'Edinburgh'), (2, '0141 1231234', 'Glasgow'), (3, '01324 1234567', 'Dundee'), (4, '01224 1234567', 'Aberdeen'); -- -------------------------------------------------------- -- -- Table structure for table `openings` -- CREATE TABLE IF NOT EXISTS `openings` ( `id` int(11) NOT NULL AUTO_INCREMENT, `branch_id` int(11) NOT NULL, `dotw` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; -- -- Dumping data for table `openings` -- INSERT INTO `openings` (`id`, `branch_id`, `dotw`) VALUES (1, 1, 2), (2, 1, 3), (3, 1, 4), (4, 1, 5), (5, 1, 6); -- -------------------------------------------------------- -- -- Table structure for table `openings_times` -- CREATE TABLE IF NOT EXISTS `openings_times` ( `id` int(11) NOT NULL AUTO_INCREMENT, `opening_id` int(11) NOT NULL, `open` time NOT NULL, `close` time NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; -- -- Dumping data for table `openings_times` -- INSERT INTO `openings_times` (`id`, `opening_id`, `open`, `close`) VALUES (1, 1, '09:00:00', '12:00:00'), (2, 1, '13:00:00', '17:30:00'), (3, 2, '09:00:00', '12:00:00'), (4, 2, '13:00:00', '17:30:00'), (5, 3, '09:00:00', '12:00:00'), (6, 3, '13:00:00', '17:30:00'), (7, 4, '09:00:00', '12:00:00'), (8, 4, '13:00:00', '17:30:00'), (9, 5, '09:00:00', '12:00:00'), (10, 5, '13:00:00', '17:30:00'), (11, 6, '09:00:00', '13:00:00');
This query would pull out all branches/phone numbers that were currently open at the time of query.
SELECT n.number, n.branch FROM numbers n INNER JOIN openings o ON n.id = o.`branch_id` AND o.dotw = DAYOFWEEK(CURRENT_DATE()) INNER JOIN openings_times t ON n.id = t.opening_id LEFT JOIN holidays h ON h.branch_id = n.id WHERE ( UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) BETWEEN UNIX_TIMESTAMP(CONCAT(CURRENT_DATE(), ' ', t.open)) AND UNIX_TIMESTAMP(CONCAT(CURRENT_DATE(), ' ', t.close)) ) AND ( UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) NOT BETWEEN UNIX_TIMESTAMP(h.begins_at) AND UNIX_TIMESTAMP(h.ends_at) )
You'd need to test it extensively to see if it works properly, I've only tested it with one branch open 5 days a week, 0900-1200 then 1300-1730 mon to thurs and 0900 to 1300 on friday. Obviously if you were going to use it for branches in different timezones, you'd need to set the timezone in mysql e.g SET SESSION timezone=EST otherwise you'd need to use PHP to calculate the different and supply the dates rather than using CURRENT_DATE. Having wrote all this, I've realised that using TIME_TO_SEC might be more efficient than concatenating a string to use as a date. Hope this helps anyway.
-
I think its to do with the holiday join, just get rid of it for now...
SELECT * FROM numbers n INNER JOIN openings o ON n.id = o.`branch_id` AND o.dotw = DAYOFWEEK(CURRENT_DATE()) INNER JOIN openings_times t ON o.id = t.opening_id WHERE ( UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) BETWEEN UNIX_TIMESTAMP(CONCAT(CURRENT_DATE(), ' ', t.open)) AND UNIX_TIMESTAMP(CONCAT(CURRENT_DATE(), ' ', t.close)) )
-
daniel7912 reacted to notbanksy in Job InterviewIf I was interviewing a web designer, I'd want to ask questions such as:
What is your design process?
How important do you think validation is?
Are you comfortable negotiating and communicating with clients?
What is your ideal project?
Can you give an example of a web site you think shows good design and say why?
The same as above, but for a badly designed website.
What other related skills do you have?
What CMS's or frameworks are you familiar with?
What are you learning at the moment?
How would you deal with a difficult / angry client?
Mac or PC? (kidding!)
What makes you tick as an individual?
Good luck with the interview
-
daniel7912 reacted to neil0wen in Job InterviewIt is also very important to just relax and treat it more like a discussion rather than an interview. After all this is also to find out whether you want the position. In my last interview I suggested that I came in for a day (unpaid) to find out whether I was suited to the role, this went down very well.
In most interviews employers are looking for a confident person who is a pleasure to be around. Relax, smile and ask a few questions.
Ask for £2k above what you want. They may offer you less, but by asking for more, shows what you feel about your worth!
-
daniel7912 reacted to bazzie in Job InterviewHi there,
I have done a fair few interviews, here are some of my thoughts, as with all things in life just take the bits that you think are useful and don't worry about the rest! I think notbanksy had some great suggestions; these are a little more generic. I agree with BlueDreamer, consider the whole opportunity not just the salary, this could be a great stepping stone to greater things.
1.One of the things that really annoyed me as an interviewer is when the candidate hadn't bothered to do any research into the role / company. We always asked a question about why they might like to work for this firm and why they would be suited to working for us. In this case, that would absolutely extend to reviewing the website of the company where you are applying for the job. You can reference this in one of your answers and make the point that you have done your research. This might even extend to thinking about who their main competition might be and taking a peek at them as well. We generally only asked candidates about who they thought our competition were when they were already in the industry though - not new to it.
2. Its great that you are working, be prepared to talk about what you like / dislike about your current role. And what you would like to see in your next role. Be honest, there is nothing wrong with saying that you are looking for them to train / teach you in new skills, thats not to say that while they are doing that you can't be working your socks off for them!
3. If they provided you with a decent job spec then be prepared to tailor your answers to that specification, that will make it easier for the interviewer to "tick off" certain competencies. If the spec asks for a well organised person then have a good example of this. So the answer is less like "I am well organised" and more like "I have always strived to be well organised, and this really helped me in xx situation where my good organisation skills allowed me to achieve yy". Examples from jobs are better, but nothing wrong with reference university etc if that’s more appropriate.
4. On the salary front, you can just be honest and say what you earn now and that given the travel etc you would like to improve on that if possible. That said, you recognise that this role could be a great step toward your longer term career goals and so as with all things in life you are prepared to be flexible for the right opportunity. Once you know you want the job, and they know they want you, then you haggle.
5. Always have some questions for the interviewer, around the company, the role or the package. Feel free to reference something they said earlier and ask them to expand on it, shows you were listening and you have patience!
6. Always ask for drink of water. Then if they throw a tough question your way, take moment to reach out and have a drink while you think about your answer, I have seen candidates rush into answers they could have answered better if they had taken a moment beforehand.
neil0wen mentioned being relaxed, which is good advice. Style is something that is very personal though and just be yourself and you should be fine. You can always respond to the interviewer to a certain extent as they often set the tone for the interview (formal vs. chatty) just be prepared for either. Jokes are generally not a good idea though, whilst these can on rare occasions make an amazing impression, 9 out of 10 times they don't.
Best of luck - bit of an epic on my part, sorry!
Bazz
-
daniel7912 reacted to lazytycoon in SEO BacklinkingThe easiest tool to use to see an estimate of traffic, and get some idea on variances of keywords is - https://adwords.google.com/select/KeywordToolExternal?forceLegacy=true
Set it to look at only exact though.
How many keywords? That varies, but the more the better. I have sites targeting only 1 keyword, but others targeting 100s and have had sites chasing 10,000s. Take a look at all of the keywords, and don't ignore the short tail high competition keywords, sometimes ranking in the top 10-20 pages for the short tail can have enough influence to rank you on the 1st page for 100s of long tail searches. And as I guess your in this for the long haul, why not have the goal to rank for web design in 1-2 years??
-
daniel7912 reacted to lazytycoon in SEO BacklinkingThis forum has dofollow links... Look at your profile page. These are very very valuable, we can make sure the page is relevant and by posting on a lot of post we create a nice internal link profile for that profile page. The trackback links on the blogs may also be dofollow but I cant see any in there at the moment.
Also, since when were nofollow links not valuable? A sig link on here is nofollow but still provides some traffic, still helps hide dofollow links in siteexplorer and nofollow links are still followed so will provide some value and help a link profile look more natural...
Daniel, 1st start with some directories. In about a day you can sub to over 300 directories, do a search for them and use roboform to autofil all the fields. 2nd, do a search for dofollow profiles, you will find loads, just copy their instructions and 3rd find a load of dofollow blogs to comment on. You can also write, spin and submit articles. These work very well.
-
daniel7912 got a reaction from cavking in SEO Backlinkingare you talking about 'receive'? It took me a while but I found it, will have to fix little errors but thats really picky lol
-
daniel7912 reacted to RobertG in SEO BacklinkingAgain this is frowned upon, this only works in the short term. You might as well put keywords off page. Google say in there words of advice, any forum, blog, link spamming will be bad for your seo!
Plus i have a few blogs, forums etc and people who do this on my sites (spam links) only pee me off so in all it only give you a bad name in both search engines and the customers you are trying to attract
-
daniel7912 reacted to EpicWebs in Horizontal scrolling news feedHere is the majority of the code which does this neat little trick from ebuyer, good luck!
<div class="newsHeadline">Latest News:</div><div id="newsholder" class="news"> <ul id="news"> <li> <a href="http://www.ebuyer.com/news/ViewSonic-brings-out-VG28-LCD-range-1759.html">ViewSonic brings out VG28 LCD range</a> </li> <li> <a href="http://www.ebuyer.com/news/Gran-Turismo-5-offers-more-features-1758.html">Gran Turismo 5 offers more features</a> </li> <li> <a href="http://www.ebuyer.com/news/Toshiba-Satellite-A660-15T-has-a-fantastic-keyboard-1763.html">Toshiba Satellite A660-15T 'has a fantastic keyboard'</a> </li> <li> <a href="http://www.ebuyer.com/news/Panasonic-Viera-TX-L37G20-delivers-nice-pictures-and-solid-sound-1762.html">Panasonic Viera TX-L37G20 delivers 'nice pictures and solid sound'</a> </li> </ul> </div>
And they are then using this...
<script type="text/javascript" src="http://static.ebuyer.com/js/jquery.newsticker.js">
Give that a try, good luck
- I havent tried it myself yet.
-
daniel7912 reacted to Lev in dotted lines around linksa, a:active {
outline: none;
}
-
daniel7912 reacted to BlueDreamer in dotted lines around links...do that and you immediately make your site in inaccessible for people who rely on it, such as those who navigate by keyboard, have poor eyesight and rely on visual clues etc.
If you inists on removing it then use something like a background colour to indicate what links are in focus.
-
Hi Daniel,
you can setup your clients as new users in WordPress and assign them the role of "Editor" instead of "Admin". This will ensure they can't see the plugins or setting menus among others.
Check out this article form the WordPress codex for further clarification.
http://codex.wordpress.org/Roles_and_Capabilities
You may also find our White Label CMS plugin useful to clean up the dashboard.
Check it out here: http://www.videousermanuals.com/white-label-cms/
We love WordPress and we hope you enjoy using it too.
Cheers.
-
Best bet is to create fixed width container e.g.
<div id="container"> content goes here </div> #container { width:960px; margin:0 auto; }
That will work in 99% of browsers, but always double check
-
To add on from what Faevilangel has said - 960 is pretty much industry-standard for fixed-width site templates now. Is the fluid 100% width design essential?
-
It's probably for the best. You have to bear in mind that whilst you may be used to 1280x1024, others will have much higher resolutions such as 1680x1050. Having a website stretching across a 23" screen does look really ugly with all the content stretched out to huge widths.