Displaying 111-120 of 275 results.
Resolved: Composer.phar Warning: This development build of composer is over 30 days old
posted by admin on June 21, 2016
I am facing warning statements in my cmd.

Warning: This development build of composer is over 60 days old.Read more
Wiki: Joining Three or More Tables SYNTAXwiki
posted by admin on June 18, 2016
Although each join specification joins only two tables, FROM clauses can contain multiple join specifications. This allows many tables to be joined for a single query.

The ProductVendor table of the AdventureWorks2008R2 database offers a good example of a situation in which joining more than two tables is helpful. The following Transact-SQL query finds the names of all products of a particular subcategory and the names of their vendors:

SELECT p.Name, v.Name
FROM Production.Product p
JOIN Purchasing.ProductVendor pv
ON p.ProductID = pv.ProductID
JOIN Purchasing.Vendor v
ON pv.BusinessEntityID = v.BusinessEntityID
WHERE ProductSubcategoryID = 15
ORDER BY v.Name;
Read more
Resolved: JPG vs. JPEG image formats
posted by admin on June 18, 2016
I often use JPEG images, and I have noticed that there are two very similar file extensions: .jpg, which my mobile's camera and the Preview application use, and .jpeg, with which Image Capture saves the images from scanning with my Canon MX455 printer. LaTeX doesn't seem to distinguish, as I gave it a .jpeg with the extension changed to .jpg and the result seems to be the same as if it had been a .jpg right from the start. I have wondered what the difference between the two is. I have come across this question, and will certainly read through it, though at the moment I'm slightly out of time. However, from what I saw giving it a quick look, it seems not to distinguish the two extensions. In fact, it seems the file type's name is JPEG and the file extension is .jpg:

JPEG (or JPG, for the file extension; Joint Photographic Experts Group)

(excerpted from the first answer there). So is there any big difference between the two extensions? And if so, what is it?Read more
Resolved: MySQL Like string in multiple value by one script
posted by admin on June 18, 2016
I always thought that you could use OR in a LIKE statment to query things in MySQL. So, if I wanted to compare multiple fields in a row to 1 keyword or term:

SELECT * FROM MyTable WHERE Column1 OR Column2 LIKE '%keyword%';

and if I had an array of words to compare:

SELECT * FROM MyTable WHERE Column1 OR Column2 LIKE '%keyword1%'
AND Column1 OR Column2 LIKE '%keyword2%';

I don't believe that syntax is correct, however. Is there an efficient method of writing this aside from something like:

SELECT * FROM MyTable WHERE Column1 LIKE '%keyword1%' OR Column2 LIKE
'%keyword1%' AND Column1 LIKE '%keyword2%' OR Column2 LIKE '%keyword2%';
Read more
Resolved: How to clear browser cache when re-uploading image with same filename, in php?
posted by admin on June 18, 2016
I have a listing of items, that also contains an image thumbnail. Sometimes I need to change the thumbnail image, but keep the filename the same. Is there a way to force the browser to download the newly uploaded image, instead of grabbing one from the browser cache?

This is very pertinent when people update their avatars, which causes confusion for some users, who keep seeing their old avatar, until they clear the browser cache, or restart the browser.Read more
Resolved: PHP filesize MB/KB conversion
posted by admin on June 18, 2016
How can I convert the output of PHP's filesize() function to a nice format with MegaBytes, KiloBytes etc?

like:
  • if the size is less than 1 MB, show the size in KB
  • if it's between 1 MB - 1 GB show it in MB
  • [*] if it's larger - in GBRead more
    Resolved: Replace %2C with a comma in javascript?
    posted by admin on June 18, 2016
    I get string from URL

    #&q=car&category=Car%20Audio%2CAccessories&brand=

    %2C is comma in url, and I want to recover my string with comma

    #&q=car&category=Car%20Audio,Accessories&brand=
    Read more
    Resolved: Yii beforeDelete function not working
    posted by admin on June 3, 2016

    class Buku extends CActiveRecord
    {
    ..
    ..
    protected function beforedelete() {
    if(parent::beforeDelete()) {
    // to do
    }
    }
    }
    Read more
    Resolved: Parse error: syntax error, unexpected '[', expecting ')'
    posted by admin on June 3, 2016
    I have error in oscarotero Embed APP.Read more
    Resolved: error :should not be called statically, assuming $this from incompatible context. only on my machine
    posted by admin on June 3, 2016
    My team members wrote the model function calls in the controller statically such as:

    $data = ModelName::functionName($param);

    while it should be called dynamically such as:

    $model = new Model();
    $data = $model->functionName($param);

    mostly all the calls are made statically. the code is working on the server and on their local machines except for mine. And the static calls are too many to fix without rewriting huge code base.

    I always update my project via composer. My php version is 5.4.

    anyone might know what this is about?Read more