This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Auto Fit Text To Image | |
* | |
* Write text to image using a target width, height, and starting font size. | |
* | |
* @author Clif Griffin | |
* @url http://cgd.io/2014/auto-fit-text-to-an-image-with-php-and-wordpress | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------- V5 ------------------------------ | |
---Updated on 7/19/19 | |
----Tutorial Videos------------------------------------------------ | |
-----How to use: https://www.youtube.com/watch?v=F_tvWzF3x18 | |
-----Youtube Channel: https://www.youtube.com/c/Kriptutorial |
Magento GraphQL endpoints must support EAV entities such as Products. GraphQL specification requires all complex types eventually to be represented as structures of scalar types. Mixed/any types are not supported.
We have couple options to choose from and would be glad to hear your opinion on that.
Schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class FontMeta based on several stackoverflow answers. | |
* | |
* @method string getCopyright() | |
* @method string getFontFamily() | |
* @method string getFontSubFamily() | |
* @method string getFontIdentifier() | |
* @method string getFontName() |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS `pk_il`; | |
CREATE TABLE `pk_il` ( | |
`il_id` int(2) NOT NULL COMMENT 'plaka kodu', | |
`il_adi` varchar(255) NOT NULL, | |
PRIMARY KEY (`il_id`), | |
KEY `il_adi` (`il_adi`) USING BTREE | |
) ENGINE=MyISAM; | |
-- ---------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PictureCallback jpegCallback=new PictureCallback(){ | |
@Override | |
public void onPictureTaken(byte[] data, Camera camera) { | |
if(data !=null){ | |
/* I use Galaxy S3 and Supported PictureSize was width = 3264px, height = 2448px, prop = 1.3333334 | |
Because inSampleSize should be integer, I set maxSize a fraction of srcSize(Supported Picturesize) | |
*/ | |
int maxSize = 816; | |
mCamera.stopPreview(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ======================================== | |
# Testing n-gram analysis in ElasticSearch | |
# ======================================== | |
curl -X DELETE localhost:9200/test | |
curl -X PUT localhost:9200/test -d ' | |
{ | |
"settings" : { | |
"index" : { | |
"analysis" : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [unsolved question] How to get google like autosuggest term list by token by elasticsearch | |
# mapping including a tokenizer and a filter | |
curl -XPUT 'http://127.0.0.1:9200/files/?pretty=1' -d ' | |
{ | |
"settings" : { | |
"analysis" : { | |
"analyzer" : { | |
"filename_search" : { | |
"tokenizer" : "filename", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.create_index_with_mappings | |
Tire.index Settings.elasticsearch_product_index do | |
create :settings => { | |
:number_of_shards => 1, | |
:number_of_replicas => 1, | |
:analysis => { | |
:filter => { | |
:name_ngrams => { | |
:side => 'front', | |
:type => 'edgeNGram', |
NewerOlder