Posts

magento - How to get the base url of a specific store view in a static block? -

i know in .phtml file example: <?php echo $this->helper('derco_core')->getstoreurl('dcmotosesp')?> i want same thing inside static block. in advance. there no 'clean' way of getting url specific store using shortcodes ( {{store url}} ). ...because store shortcode handler end (see mage_core_model_email_template_filter::storedirective() ): return mage::app()->getstore(mage::getdesign()->getstore())->geturl($path, $params); this means store cannot passed parameter. the following might work it's bit ugly. idea send parameter ___store through $_get telling magento switch specific store. <a href="{{store url="some/url/here" _query="___store=store_code_here"}}">test link</a> (replace 'store_code_here' specific store code). an other option extend method mentioned above , allow receive store_code parameter.

c - How Callback is maintained from Userspace to Kernel Space -

i learning driver , looking watchdog driver code value being written /sys/devices/virtual/wdc_per guess logic how driver gets value userspace , exposed file in user space "sys/devices/virtual/wdc_per" but how value wdc_per reached driver, there must callback maintained in case gpio based watchdog driver , gpio_wdt.c may having callback. but not figure out how happens anybody can me find out userspace kernel space link. first of all, driver, gpio_wdt.c , doesn't seem exist in mainline kernel of date, it's hard comment it. sysfs (usually mounted @ /sys ) easy use. this great example of how create sysfs attributes. basically, create attributes (will become sysfs file names) , register them 2 defined operations (callbacks): store , show , equivalent of resp. write , read . show callback called everytime sysfs file (attribute) read , store when it's written. when writing device driver belongs existing class (most situation), need you...

search - how to configure the synonyms_path in elasticsearch -

i'm pretty new elasticsearch , want use synonyms, added these lines in configuration file: index : analysis : analyzer : synonym : type : custom tokenizer : whitespace filter : [synonym] filter : synonym : type : synonym synonyms_path: synonyms.txt then created index test: "mappings" : { "test" : { "properties" : { "text_1" : { "type" : "string", "analyzer" : "synonym" }, "text_2" : { "search_analyzer" : "standard", "index_analyzer" : "synonym", "type" : "string" }, "text_3" : { "type" : "string", "analyzer" : "synonym" } ...

javascript - How to create custom button Ask seller Ebay -

i creating new custom selling page shop , create button: "ask seller question". have been googling around, unfortunately, couldn't find it. can please share advice? 1 thing found may work: script; honest (as beginner), not sure how link button. <script language="javascript"> (i = 0; < document.links.length; i++) { if (document.links[i].search.indexof("showcoreasksellerquestion") > 0) { document.write('<a href="'+document.links[i].href+'" title="ask question">ask seller question</a>'); break; } } </script> the javascript have work, show link. make button need add css. here can read on how works. css tell html, or in case <a> how look. give tag an id <a id="some-name"> in css this: #some-name{ background: url("yourimagepath") no-repeat; height: [the height in pixels of image] } this easiest thing fi...

Apache Felix - Storing bundles in the assests directory of android application -

i embedding apache felix android app. right now, use following code install bundle: imagebundle = bundlecontext1.installbundle("file:sdcard/download/androidimageviewer_1.0.0.201308221559.jar"); this works ok, requires bundle stored in sdcard of android device. however, don't that. want bundle stored in directory inside android project. example, inside assests folder. there way achieve this? i tried this: imagebundle = bundlecontext1.installbundle("file:assets/bundles/androidimageviewer_1.0.0.201308221559.jar"); and expected, didn't work. the url wrong. correct url like file:///android_asset/androidimageviewer_1.0.0.201308221559.jar as pointed out here .

c# - How to enable button if item selected in a GridView -

i want enable button when grid view item selected update gui in metro apps. button include list view item. below code snippet of want do. please help. <gridview name="searchpanelgrid" selectionmode="single" horizontalalignment="left" scrollviewer.ishorizontalscrollchainingenabled="true" scrollviewer.isverticalscrollchainingenabled ="true" scrollviewer.horizontalscrollbarvisibility="auto" scrollviewer.verticalscrollbarvisibility="auto" scrollviewer.horizontalscrollmode="enabled" scrollviewer.verticalscrollmode="enabled" itemssource="{binding source={staticresource collectionitems}}" grid.row="2"> <gridv...

java - Issue about Jsoup - fetch sub url but show main url -

i use jsoup fetch http://live.wallstreetcn.com/ in android. however, shows context of main url http://wallstreetcn.com/ . why that? doc = jsoup.parse(new url("http://live.wallstreetcn.com"), 10000); list<map<string, string>> list = new arraylist<map<string, string>>(); elements es = doc.getelementsbytag("div"); log.e("", "es:" + es);