Hi,
I'm completely new to regular expressions, and I need to filter all the words of at least 3 characters (and a maximum size of 16) out of a text. (so I can enter those data into a MySQL database)
Currently, everything works, except for the regular expression:
/^.{3,16}$/
(I constructed this from a tutorial found using Google ;-) ...
I want to take data from a table that'll be almost exactly similiar to the one below, but have it in a line graph. The date values would be on the Y-axis, and it would plot the XP values on the X-axis. Since the numbers for each user vary, I'd need a way to make the distance between each point plotted "relative", I guess.
Any suggesti...
Hi,
I need to change UK spelling to US spelling for the content stored in the database(mysql). Is there any way to do this on the db itself? I found various software's(like a word add-ins) but to use these I need to have the data in a doc format, do the changes and export it back to mysql. Please let me know if there is a method using p...
I have a php script that is running in CLI and I want to display the current percent progress so I was wondering if it is possible to update the STDOUT to display the new percent.
When I use rewind() or fseek() it just throws an error message.
...
Hi,
i want to hide url from user. In this case if i have dedicated server i can open site by ip address directyly but it is shared hosting also i don't want to use frames. I am waitting suggestions, thanks.
...
The PEAR VersionControl_SVN library looks pretty robust, albeit still in alpha - it claims to support all commands including commits. Are there any actual web clients built on the library? I haven't found one, or any web SVN client that handles commits, and I'm wondering if I should build one.
...
I have a PDF which has an image on it (a logo)
I want to open it with PHP and write some text over it and save it back to the file system.
I've done this with the Zend framework before but this project is using code igniter so I need either a standalone lib or a code igniter plugin.
thanks
...
I want to add some classes to a CodeIgniter project that aren't models, views, or controllers. They will most likely be a built in Models/Controllers and used in various ways. Where should I store these classes, and what is the best way to implement them in CodeIgniter? (Or more generally, any MVC-based framework?).
EDIT: Looking throug...
I beginning a project which requires me to use php with a SQL Server database. Although I am using mySQL for years this will be my first project using SQL Server.
Is it better to use PDO than MMSQL.
Are there any "Gotcha"s I should be aware when using SQL Server.
Does SQL Server have any UTF-8 problems?
...
Hi,
I've create an application which uses PHP includes which works great if you don't mind having the PHP include files in the same place as the other files. But I would like to split my code up as neatly as possible. Please see the below file structure:
As you can, I would like all ?.php files to be in the document root and for al...
I am writing a Controller for Codeigniter with a method named "print". The name is important, because I would like to be able to access the page at "http://www.mysite.com/mycontroller/print".
However, I cannot do this because there is the syntax error:
Parse error: syntax error, unexpected T_PRINT, expecting T_STRING
Is there any sp...
In my string I have place holders like: ##NEWSLETTER## , ##FOOTER# ##GOOGLEANALYTICS## etc.
Each of those placeholders is delimited by: ##
I want to find each of thos placeholders and put them in an array.
The tricky part is that what's inside the ## delimiters can be anything.
...
I have to extract defined variable and function names from a js code passed as a text. Example:
$js_code = " var MyVar1 = 'val1'; \n var MyVar2 = 'val2' ; \n function MyFunc() { some code }";
Extracted:
$js_vars = array("MyVar1", "MyVar2");
$js_func = array("MyFunc");
...
Hi
I have a problem with using the ORM and creating a has and belongs to many self join using Kohana 2.3.4
I have this table
Tasks
ID | Title | etc......
I need to be able to link tasks to other tasks, a task can have multiple children, and multiple parents. So I was thinking of having this table.
Tasks_Tasks
ID | task_1_id | tas...
I'm trying to create pdf documents on the fly in an application, i.e. a user clicks a link and a pdf document is displayed to them with some text and some images.
I'm currently using FPDF v1.6 (http://www.fpdf.org/) which supports 24bit (true colour) png's but the problem I have is that this is a legacy application and there's 1000's of...
I am making the jump to EMACS, and I can't find what I need to do in my .emacs file to get php-mode AND all other modes to insert 4 spaces instead of a TAB. Help?
UPDATE:
When I hit tab I still get 8 spaces in a plain file with the given answers. In php-mode I still get 2 spaces. Hitting tab in php mode does nothing, tab in regular EMA...
I'm sure this is an easy one for jQuery experts, but I'm a backend guy, and can't find the best way to do this. I have two arrays in Drupal, one is a list of names of views, and the other is an array that contains a list of displays for each view. Here's the code to populate the two arrays:
//load list of views in to array for select...
I am currently working on a Magento extension, and I have overridden a core controller, which works fine.
I have now added a new action to my controller. Problem is that whenever I call the action a blank page is produced. If I echo something it is displayed correctly.
Therefore I dug into the core of the Customer module and controller...
I am currently building a blog type website for myself. I have used wordpress in the past and really enjoy it, but when it comes to building more than just a blog I usually get bogged down in writing hacks for it.
The site I'm building is going to pretty much be a blog, but with a 'question and answer' side to it (NOT A FORUM - purely Q...
How to make jQuery slider with fixed maximum ... exact like this:
http://jqueryui.com/demos/slider/#rangemin
I manage to do it half way:
$slider = new ZendX_JQuery_Form_Element_Slider('amount');
$slider->setLabel('Set Amount: ');
$slider->setJQueryParams(array('min' => 0, 'max' => 60, 'value' => 15));
I don't know how to display the...