78 Archived Topics
Remove Filter Wasn't sure yet whether to post this publicly. I've adjusted the PHP code snippet for the OAuth. Curl allows you to trap a redirect and this snippet just shows how to do that for the token. The regex searches for the redirect url in the returned header, it can be … | |
I came across this plugin called [baraja](http://tympanus.net/codrops/2012/11/13/baraja-a-plugin-for-spreading-items-in-a-card-like-fashion/) by accident. Looked interesting enough to share. | |
The following snippet will show, how you can pass a data array to a function, and generate a table with N columns. `$data` contains some dummy data, which can come from any data source. Then you call `createHtmlTable` passing the data, the number of columns you want, and a function, … ![]() | |
I want to have the following on SQL Azure: IF EXISTS(SELECT * FROM [sys].[databases] WHERE [name] = db_name() AND [compatibility_level] = 110) BEGIN ALTER PROCEDURE [dbo].[Test] AS BEGIN -- Omitted body containing lots of strings END END or a work-around that does something similar. What follows is what I'm trying … | |
I just happened to come across "Laravel", a framework unknown to me. Has anybody used this one? If so, am looking for a comparison. Where does it fit in the range from small (TinyMVC) to large (Zend, Symfony). | |
Below is a documented code example showing how to use the SQLite3 class to connect and query your database (and check for errors). IMHO using PDO is a better alternative, as this extension uses mixed technology in a non-standard way (objects, arrays and exceptions). If there are any questions let … | |
Below is a documented code example showing how to use the SQLite functions to connect and query your database (and check for errors). Please note that using the SQLite extension is NOT RECOMMENDED. This extension is no longer available in PHP 5.4.0. If you want your scripts to be future … | |
This demo will show a PHP script using a Smarty template. It assumes basic installation. In the folder where you copy the script, there should be a smarty folder containing the Smarty files. You should create a writable `cache` and `templates_c` folder, and a folder called `templates` where the `.tpl` … | |
Below is a documented code example showing how to use the [PDO](http://php.net/pdo) classes/objects to connect and query your database (and check for errors). If there are any questions, or you want to see different features, let me know. UPDATE: I've encountered a problem with PDO and bit fields (MySQL). If … | |
# NOTE # This was a PHP sticky, and I am working to turn it into a development sticky. If you have any comments, additions or other observations, please reply to [this thread](https://www.daniweb.com/community-center/daniweb-community-feedback/threads/505442/read-this-before-posting-sticky). # Before you ask # - Read our [Forum Rules](https://www.daniweb.com/welcome/rules). - Engage your brain! We understand that … | |
Below is a documented code example showing how to use the [MySQLi](http://php.net/manual/en/book.mysqli.php) (MySQL improved) classes/objects to connect and query your database (and check for errors). If there are any questions, or you want to see different features, let me know. | |
Below is a documented code example showing how to use the [MySQL functions](http://php.net/manual/en/book.mysql.php) to connect and query your database (and check for errors). Please note that using the MySQL extension is **NOT RECOMMENDED**. This extension is no longer maintained and will be deprecated soon. If you want your scripts to … | |
Recently bought "Regular Expressions Cookbook 2nd ed." and wanted to share my findings. The book is divided into two parts. The first part (3 chapters) describes tools, skills and programming. The tools chapter shows you what's out there (including his own software). The skills chapter is a tutorial. It describes … | |
In addition to [my post in this thread](http://www.daniweb.com/web-development/php/threads/429740/php-best-practice#post1841569) I've decided to post an extended example, which also implements functions for inserts and updates. I hope the code is straightforward enough. If not, reply and let me know. The table structure I've used for my test is the following: CREATE TABLE … | |
The `ReplaceStrings` function replaces all strings in `APatterns` found in `ASubject` with the value in `AReplacement`. As an example, I added the `RemoveStrings` function which replaces everthing with an empty string, thus deleting all strings found. Usage examples are in the XMLDoc comments. A good test will be to rewrite … | |
I'm looking for a short jQuery snippet to count how many divs I can have horizontally in my browser window. Basically, I'm using a fluid layout, like this: <div id="wrapper"> <div id="content"> <div class="foo" /> <div class="foo" /> Wrapper is 100% width, and foo about 250px wide. What's the simplest … | |
I found that there is a difference with the drawing of a custom bitmap brush, when I subclass TGraphicControl versus TCustomControl. The expected behaviour occurs when using the TCustomControl descendant. Each paint starts with the brush in the same position, no matter the location of the control (top-left). When using … | |
I am looking to encrypt data (preferably XTEA) on my .Net Micro Framework, send it to a webservice in .Net (Azure) and decrypt it there. I found this [URL="http://www.dmcinfo.com/Blog/articleType/ArticleView/articleId/83/Encryption-Compatibility-Between-NET-Micro-Framework-and-the-Full-NET-Framework.aspx"]blog post[/URL] but I am unable to get it to work. The encryption result on .Net differs from the .NetMF. I hope … | |
Updated top 20 list of languages (by usage): [url]http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html[/url] | |
I am looking for some experiences with embedding video's in my website. Until now I had only externally linked video's (which included their own players). Now I have to embed my own. So far I've seen HTML5, Flow player, JW Player and VideoJS. Any recommendations ? Added: Also found [URL="http://praegnanz.de/html5video/"]this … | |
Am wondering if anyone here has already used the [URL="http://www.google.com/+1/button/"]Google Plus One button[/URL] on their website, and whether it is having a positive effect on search results (only for google.com at this time). | |
We are switching to Scrum at work. Although we get help starting this up and get training for it, I'm looking for some good books on the subject. Please do not post just a title, but also an explanation as to why I should read it. | |
SetAutoSubClass() has been deprecated in newer versions of Delphi. Can anyone tell me what to replace it with ? I cannot find it in the Delphi 2009 OLH, nor in the VCL source (Forms). | |
I'm in the process of converting a legacy app from D5 to D2009. I'm getting errors on AnsiToNative, NativeToAnsi (both DBTables) and DbiOpenSPParamList (BDE). Apparantly the parameters for these functions have changed. Does anyone here have a ready example on how I should use these in D2009 ? I was … | |
Anybody knows if this trial is still available for download somewhere ? I need to test something on an older XP installation, and the 2008 trial needs 2003 server to run. | |
Below is the XML response you get from the W3C Validation API: [code=xml] <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <env:Body> <m:markupvalidationresponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:m="http://www.w3.org/2005/10/markup-validator"> <m:uri>http://www.pritaeas.net/</m:uri> <m:checkedby>http://validator.w3.org/</m:checkedby> <m:doctype>-//W3C//DTD XHTML 1.1//EN</m:doctype> <m:charset>utf-8</m:charset> <m:validity>true</m:validity> <m:errors> <m:errorcount>3</m:errorcount> <m:errorlist> <m:error> <m:line>10</m:line> <m:col>1</m:col> </m:error> <m:error> <m:line>12</m:line> <m:col>2</m:col> </m:error> <m:error> <m:line>14</m:line> <m:col>3</m:col> </m:error> </m:errorlist> </m:errors> <m:warnings> <m:warningcount>0</m:warningcount> <m:warninglist> </m:warninglist> … | |
I'm in need of opinions. I currently have several low-traffic Dutch websites, all equipped with an RSS feed built by me. Would it be better for my sites if I promote the feeds at FeedBurner instead of the current on-site ones ? Does it matter for SEO ? Any other … | |
I can reproduce this bug in IE7 (and a colleague in IE6), my link is here: [url]http://www.pritaeas.net/tools/linkfarm/[/url] If you select a tag the list gets filtered and the tag added to the selected div. Unselecting it will reset the taglist, and remove() the tag from the selected div. Selecting another … |
The End.