Resetting the UI of phpstorm - phpstorm

Is there any way to reset the font size without accessing the UI/program? I accidentally changed the font size a little too big and now all the UI is messed up and I can't see anything (not even a button) in phpstorm.

<?xml version="1.0" encoding="UTF-8"?>
<application>
<component name="UISettings">
<option name="FONT_SIZE" value="16" />
<option name="OVERRIDE_NONIDEA_LAF_FONTS" value="true" />
<option name="SHOW_DIRECTORY_FOR_NON_UNIQUE_FILENAMES" value="true" />
</component>
</application>
Nevermind found it! Its located in C:>users\username.WebIde70\config\options
Under ui.lnf.xml.

Related

Can't Understand Deep link and Intent

I want to use deep link to create a Online-Shop App. So Hear me out.
I know I have to use Intent and add <Intent-Filter><Intent-Filter/> tag in my AndroidManifest.xml file but I can't begin to understand how all of it works. There are few packages in pub.dev like flutter_branch_sdk: ^3.4.0 or receive_sharing_intent: ^1.4.5 but I'm hoping for a complete explanation or some sort of guide here. I appreciate the time you spend reading this in advance.
Here we go:
I have a app that has a Payment page. when user clicks on the Pay Now Button, He is transferred to a Safe Payment Gateway and interacts with the page. so there are 2 possible scenarios
He Succeeds in Completing the task and pays for the CARGO.
At this point Browser must Return to my app and gives me a text/message such as success and the app displays the Payment_Successful_Page
He Fails in Completing the task and pays for the CARGO
At this point Browser must Return to my app and gives me a text/message such as failure and the app displays the Payment_Failed_Page
That said If you know how it works maybe you can answer the questions below. (I have gathered the code parts from few documents and guides)
What is the <actvity><actvity/> do and what does the code below configure?
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:launchMode="singleTask"
<intent-filter>
...etc categories
</intent-filter>
</activity>
what does the <action/> do? How should I use it in app?
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.INPUT_METHOD_CHANGED" />
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SEND_MULTIPLE" />
<intent-filter />
how can I work with <category/> and What does the code below says?
what is the tag I should use for my scenario here?
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
how can I work with <data/> and What does the code below says?
How to get that text/message I want from the browser?
How to configure my own website where "example.com" is?
What are scheme and host here and how should it be written? (with 'http://' or without)
<data android:scheme="myapp" android:host="example.com" />
<data android:scheme="https" />
<data android:mimeType="text/plain" />
<data android:mimeType="text/*" />
<data android:mimeType="video/*" />
<data android:mimeType="image/*" />
<data android:mimeType="*/*" />
<data android:scheme="http" android:host="flutterbooksample.com" />
<data android:scheme="https" />

How to achieve this layout using apache tiles 2?

Having problems creating such a layout. Controllers trigger dash content, and the layout should be created. Now I have this definitions, and I am blocked.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
<definition name="masterLayout" template="/WEB-INF/jsp/layout/master.jsp">
<put-attribute name="headerInclude" value="" />
<put-attribute name="body" value="" />
<put-attribute name="footerInclude" value="" />
</definition>
<definition name="dashboardLayout" extends="masterLayout">
<put-attribute name="body" value="dashboardLayoutBody" />
</definition>
<definition name="dashboardLayoutBody" template="/WEB-INF/jsp/layout/dashboard.jsp">
<put-attribute name="menu" value="/WEB-INF/jsp/parts/menu.jsp" />
<put-attribute name="body"/>
</definition>
<!-- this page is triggered -->
<definition name="login_page" extends="masterLayout">
<put-attribute name="body" value="/WEB-INF/jsp/layout/login.jsp" />
</definition>
<!-- this page is triggered -->
<definition name="some_page" extends="dashboardLayout">
<put-attribute name="body" value="/WEB-INF/jsp/content/admin_groups/supervisor.jsp"/>
</definition>
</tiles-definitions>
master layout has this content
<!DOCTYPE html>
<html>
<head>
<!-- Master css, js, meta, tags additions .... -->
<tiles:insertAttribute name="headerInclude"/>
</head>
<body>
<tiles:insertAttribute name="body"/>
<!-- Master css, js, meta, tags additions .... -->
<tiles:insertAttribute name="footerInclude"/>
</body>
</html>
I need somehow to extend template and also have own template, to include menu there
As a new comer to jsp templating, I didn't realized that I can use jsp:include in parallel with Aapache Tiles, which solved the problem.
The main problem was that I couldn't include the menu once only in the dashboard layout, and be used everywhere.
Using only tiles, there is cascade attribute on a put-attribute tag that allow that to be used in other attributes also.
Keep in mind that cascade needs DOCTYPE tiles-definition minimum version 2.1
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
"http://tiles.apache.org/dtds/tiles-config_2_1.dtd">

Add tab to edit product page in magento 2

I'm developing extension for magento 2.0. I can not add add tab to edit product page in back end. I try to use event core_block_abstract_prepare_layout_after but I'm not success. Can you help me how to do that.
Thank
In order to add a new tab in the product admin page you need to add a new 'Block' in view -> adminhtml. The layout has to be named catalog_product_new.xml. This is the content of my file (from my personnal module).
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product_tabs">
<block class="Okalm\Igram\Block\Adminhtml\Product\Edit\Tab" name="product.test">
<arguments>
<argument name="label" xsi:type="string" translate="true">Test</argument>
<argument name="url" xsi:type="url" path="test/moderate/index">
<param name="_current">1</param>
</argument>
<argument name="class" xsi:type="string">ajax</argument>
<argument name="group_code" xsi:type="string">advanced</argument>
</arguments>
</block>
<action method="addTab">
<argument name="name" xsi:type="string">product-instagram</argument>
<argument name="block" xsi:type="string">product.test</argument>
</action>
</referenceBlock>

Adding custom CSS to Magento Homepage

I'm trying to add a css file to my CMS homepage by going to CMS > Pages > Home > Design then updating the Layout XML however it keeps adding in /base to the url to show the following:
<reference name="head">
<action method="addJs">
<script>nivo-slider/jquery.nivo.slider.js</script>
</action>
<action method="addCss">
<script>../bootstrap/theme_name/css/nivo-slider.css
</script></action>
</reference>
which outputs the following in view source:
<link rel="stylesheet" type="text/css" href="/skin/frontend/base/default/bootstrap/theme_name/css/nivo-slider.css" media="all" />
I've tried ../ and adding in the absolute link however it just adds it after the /base/
Is there a way I can override the theme trying to add in /base/
Assuming theme_name is your active theme, try to replace <action method="addCss">...</action> with this node:
<action method="addItem"><type>skin_css</type><file>css/nivo-slider.css</file></action>
Base folder is loaded due to the magento fallback. It searchs last in base folder, that's why base is added.
try with below code
<?xml version="1.0">
<layout>
<default>
<reference name="head">
<action method="addItem"><type>skin_css</type><file>css/nivo-slider.css</file></action>
</reference>
</default>
</layout>
hope this will sure help you.

apache tiles not rendering correctly (shows plain text) in struts2

i am working on a struts2 web app where i am using Apache tiles2 framework.
The Code is Working Fine on localhost but when i up the code on server it renders the tiled pages as plain text. can anyone please tell me where is the problem.
i mean to say that the page is displayed as plaintext on browser-side.
this is how it is rendered in browser.. Screenshot - http://i42.tinypic.com/2vnj686.jpg
kindly help me if anyone have a solution....
here is my tiles.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
"http://tiles.apache.org/dtds/tiles-config_2_1.dtd" >
<!-- "http://tiles.apache.org/dtds/tiles-config_2_1.dtd" -->
<tiles-definitions>
<definition name="BaseDef" template="/adminpanel/template/BaseLayout.jsp">
<put-attribute name="title" value="Home Page" />
<put-attribute name="css" value="/adminpanel/template/extracss.jsp" />
<put-attribute name="js" value="/adminpanel/template/js.jsp" />
<put-attribute name="header" value="/adminpanel/template/header.jsp" />
<put-attribute name="body" value="/adminpanel/template/body.jsp" />
<put-attribute name="footer" value="/adminpanel/template/footer.jsp" />
</definition>
<definition name="LatestMaterial" extends="BaseDef">
<put-attribute name="title" value="Latest Exam Material " />
<put-attribute name="css" value="/adminpanel/template/newtablecss2.jsp" />
<put-attribute name="body" value="/adminpanel/Pages/latestexammaterial.jsp" />
</definition>
</tiles-definitions>
here is my BaseLayout.jsp
<%# page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%# taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<tiles:insertAttribute name="css"/>
<tiles:insertAttribute name="js"/>
<title><tiles:insertAttribute name="title" /></title>
</head>
<body>
<div id="main">
<tiles:insertAttribute name="header"/>
<div id="body">
<tiles:insertAttribute name="body"/>
</div></div>
<tiles:insertAttribute name="footer"/>
</body>
</html>
this is how i used it in struts.xml
<package name="wz.admin" extends="struts-default,json-default,tiles-default">
<action name="LatestMaterial" class="org.wz.admin.LatestMaterialAction">
<result type="tiles">LatestMaterial</result>
</action>
</package>
I checked with a fresh mind your code and I think the problem is your struts.xml since everything seems fine. I'm not sure at 100% but try to change your struts.xml into this:
<package name="wz.admin" extends="struts-default" namespace="/">
<result-types>
<result-type name="tiles"
class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
<action name="LatestMaterial" class="org.wz.admin.LatestMaterialAction">
<result type="tiles">LatestMaterial</result>
</action>
</package>
Also, even if the success result is the default one, you should name your results in order to avoid misurdenstand when managing multiple results:
<result name="success" type="tiles">LatestMaterial</result>
This was just a suggestion that my architect gave me when i was working with struts. In the end I found it really usefull.