Im trying to reset $i to 0 and print the word margin...is this doable the way im trying to pull it off?
class="customGal'.($i == '2' ? $i = '0' && 'margin' : NULL).'"
Thanks in advance.
Hi I am setting up a small website sort of like an online portfolio. I made the mistake of signing up for shared-web hosting before asking if they supported stored procedures which took me half the day to figure out they didn't.
Basically i'm looking for a site that offers me PHP5.4+/ Mysql 5.5 + with support for triggers/stored procedures/ and if possible MyphpAdmin 3.5.1.
I also have a domain name I already registered and which I would like to use.
What is my best option to look for hosting provider which offers this functionality or to setup a VPS?
i am using .prepend() to load data after i POST a form with .ajax().
once the new elements are added, my functions won't work on them.
if i link the js file directly in the prepended data, the functions work, but when i POST, i starts multiplying the events.
i have a feeling it has something to do with binding, but i am not able to figure out exactly how to handle it.
any ideas?
thanks!
Hi
how to make our site viewable in top ten of the google search...
I want my website to be available for the user who google with search name social networking or something like ssit How to do that?
I want to group my data by Age and by gender: like this sample data:
Age: 1
Male: 2
Female: 3
Age 1 Total: 5
Age: 2
Male: 6
Female: 3
Age 2 Total: 9
How can I group the data according to age and count all the male and females in that age from mysql database?
We are looking for Web Designers & Developers. Urgent Opening.
Profile:-
a) Have exp. in Designing websites in wordpress
b) Have Creativity in work
c) Send us your work – [email protected]
d) Min Exp. required: 2 + years
e) Can Integrate the Facebook, Twitter & other social networking websites.
To review our profile – please check – www.dicorporation.com & www.ismoip.com
I am using sort field in order to sort records. My code is this
$query = "SELECT max(sort) FROM $this->table LIMIT 1;";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
$sort = $row[0]+1;
$query = "INSERT INTO "$this->table." VALUES ( '', '$ini', '$time', '$ip', '0', '$type', '$sort', '$title', '$image', '0' );";
$result = mysql_query($query) or die(mysql_error());
What is the error here?
I'll try to make myself clear with an example:
Imagine an admin page to add a product to a database (product list). When I open the ADD ITEM page, the item is not yet created (not until I click the submit button), but let's say I want to add categories this product will appear in (with AJAX for example). When I run the AJAX script, i need to tell it which ID (my product) to put these categories in...
How should I do this.?
Is inserting a blank item in the database (to get mysql_insert_id) when the page opens a good way to do this.? Is it prone to conflicts or errors..?
How do you guys do it.?
So i want to open a URL and regex all the image urls from the page.
then i want to curl all of them and check what size they have. in the end i want to get the biggest one
I'm sometimes confused to using which one of them,
say i have a function called getmember($id)
function getmember($id)
{
// now this is the confusing part
// how do i test if a $id was set or not set?
//solution 1
if(empty($id))
{
return false;
}
// solution 2
if(isset($id))
{
return false;
}
}
Thats sometimes not clear tome some times if a parameter in a function is set like function($var="")
Then i do
if($var ==="")
{
return false;
}
What should i use the next time isset ? emtyp ? or ===''
What does reorder() function do in Joomla?
I have a statement for a function of menu "copy" in administrator code for menu as:
$curr->reorder( 'menutype = '.$this->_db->Quote($curr->menutype).' AND parent = '.(int) $curr->parent );
as i Have executed this code it has reordered my id to any other position.. I just need to know is this reorder() function a inbuilt function of joomla? If yes, WHat and how does it do what he has done it to my ids ? :(
I am Newbie to Joomla PLs help
EDIT
How can i get the the reordered output just after calling the function?
I am getting a file "abc.txt" from server and dispaying it in a text area for editing.
<div id="filecontents"> <textarea> CONTENTS OF FILE LARGER THAN 10KB
</textarea> </div>
The contents of the file are potentially large. The user will edit the textarea and add/delete text from any part(not just the end). I want to send ONLY the changes to the server for patching. How do I accomplish this?. Is there a javascript version of the popular linux command(diff). John Resig's diff code may not work as, for me, it will involve additional parsing on server side.
Thanks!
I have a site which has client side and admin side. There is a table called account History.
which contains fields like uid | accountBalance | PaymentStatus | Date.
Now this table has to be updated every month for all the paid users and the table is bulk. So what is the best way to update the table every month.Do i need to select all the uid's and update.
in my plugin i use Custom Post type "wallpapers" and i registered a taxonomy "cat" for categories.. and i created a new db table called wp_resolutions..
resolutions can be manage by admin.. i want to know creating dynamically links for wp_resolutions..
Example:
mydomain.com/wallpapers (this is my custom post type)
mydomain.com/wallpapers/cat (cat is my taxonomy)
mydomain.com/wallpapers/resolutions/full_hd (here my resolutions has to work like this) mydomain.com/wallpapers/resolutions/wide_16_9
wp_resolutions table structure
id, name, slug, width, height, aspect
1, Full HD, full_hd, 1920,1080, 1.78
2, Wide, wide_16_9, 1593, 1323, 1.6
Please refer me some guides...
I'm trying to make an url that adds a / to all hrefs and srcs in a string.
It should only add a / to urls that don't have a http:// at their beginning and that don't have / yet also.
If we have this:
<a href="ABC">...
<img src="DEFG">...
<a href="/HIJ">...
<a href="http://KLMN">...
The results should be something like this:
<a href="/ABC">...
<img src="/DEFG">...
<a href="/HIJ">...
<a href="http://KLMN">...
This is what i've come up till now:
&(href|src)="?!(\/|http::\/\/)(.+)"
And the replace would be
$1="/$2"
It isn't working, though.
What am I doing wrong?
How would the working regex have to look like
Is there an easy way (or a module) in Drupal to distinguish between anonymous users who have never created an account versus those who are returning but are not currently logged in?
For non-returning (ie, completely new) users, I'd like to have a front page that is very streamlined and focused on registration as the call-to-action. However, if someone is a returning user but not currently logged in, I'd like to present a lot more information on the front page and have login as the main call-to-action. I realize both pages would still need to have both login and register options available, I just want to make the focus significantly different between the two.
So I'm trying to get the id from a url for youtube..
here is the url
http://gdata.youtube.com/feeds/api/videos/kffacxfA7G4/related?v=2
then there's also - in the url too.
it wouldn't let me post another url but it's the same as above but with the id ucvkO0x-mL4
how can I grab between videos/ and /related (the id) with regex?
I tried to use txt2re.com which is what I always use, but it's not working for this case..
thanks!
Question edited following the comments. It still doesn't work.
Hi there,
I'm trying to learn how PDO works, but my script:
$database = new PDO('mysql:host=localhost;dbname=***', '***', '***');
$query = $database->prepare("SELECT nombre,
tecnica,
tamanno,
estado FROM obra WHERE anno = ?");
$query->execute(array('2009'));
while ($item = $query->fetch(PDO::FETCH_ASSOC)) {
$item['nombre'];
}
Prints nothing. If I do:
var_dump($query->fetch())
I get bool(false). After reading lots of examples I can't figure out what I'm doing wrong.
Thanks in advance.
hey guys ,
i have used the popular treemenu plugin for my project ,but the only problem i have is with direction .
as you may see , it shows menus in LTR direction and icons of folder and file floating left side
http://jquery.bassistance.de/treeview/demo/
question is how can i change the directio to rtl
believe me , it takes me one day to play with codes but not worked at last
i asked in jquery forum , but it takes 1 week just to accept my question , let alone answering it
however i know , this may be a lot to ask , but help me , if you have time
We are a growing network but we figured we want to keep that the User only would need one account in order to access the network different sites. (Similar to Stackoverflow's login, If you login in to another "site" you use your account credentials and than your account is created). We want our own login system (Username, password) and not OpenId, as we'd probably have that in the future, but the main focus right now is the global login.
How can I do this? Do a Curl request and send back a cookie? Have a "database" just for the login procedure and on first login also create a new "User" in the site specified database?
Suggestions?.
I want to synchronize two directories. And I use
file_get_contents($source) === file_get_contents($dest)
to compare two files. Is there any problem to do this?
Does CodeIgniter provide a Debug Mode, for example, when accessing an Invalid URL?
Ruby on Rails does show debugging Messages when a incorrect URL has been given, and the controller is unable to resolve it using the routes map. How would I enable such debugging messages in CodeIgniter?
The profiler ...
$this->output->enable_profiler(TRUE);
... only affects single classes, but not all routes. So debugging without an actual debugger mode is a little... difficult. :-)