我刚刚在我的1.6.1 prestashop中启用了多重存储,并在我的默认商店之外添加了一个新商店.
默认店铺地址: http ://lak-lak.ir
新的多店地址: http ://lak-lak.ir/ghods
似乎在新店的主页上一切都很好,但是对于联系我们,最佳搜索和其他页面的页面,Prestashop显示404错误页面.
怎么解决这个问题?
我的商店也启用了PS URL重写.
这是.htaccess文件的内容:
# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
RewriteEngine on
#Domain: lak-lak.ir
RewriteCond %{HTTP_HOST} ^lak-lak.ir$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api$ api/ [L]
RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
# Images …Run Code Online (Sandbox Code Playgroud) I have android application with custom themes which was developed 2-3 year ago.
I had this stylable in my attr.xml resouce file:
<declare-styleable name="EVETextViewPlus">
<attr name="customFont" format="string" />
<attr name="pageStripFont" format="string" />
</declare-styleable>
Run Code Online (Sandbox Code Playgroud)
And I've used this inside my style_warm.xml resource file:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
<style name="style_display_page_title_warm">
<item name="my.app.package.:pageStripFont">fonts/b_titr.ttf</item>
<item name="android:textSize">25dp</item>
<item name="android:textColor">@color/colorDisplayPageTitle</item>
</style>
....
Run Code Online (Sandbox Code Playgroud)
When I'm going to sign my app, it checks for errors and prompts:
Cannot resolve symbol 'my.app.package:pageStripFont'
I should mention my.app.package is package …
android gradle android-theme android-styles android-attributes
我用下面的语法:
var invoices = from invoice in dbContext.eve_Invoices
select new
{
invoice.CreatorID,
invoice.DateChange,
invoice.DateCreation,
invoice.DatePrint,
invoice.Discount,
invoice.DiscountPercentage,
invoice.DiscountType,
invoice.Fare,
invoice.ID,
invoice.InvoiceStatus,
invoice.NumberOfItems,
invoice.Packaging,
invoice.PrintID,
invoice.RawPrice,
invoice.RoundOff,
invoice.ServiceCharge,
invoice.ServingType,
invoice.TableID,
invoice.Tax,
invoice.TotalPrice,
invoice.ValidityStatus,
PersianYear = invoice.DateCreation != null ? pc.GetYear((DateTime)invoice.DateCreation) : 0,
PersianMonth = invoice.DateCreation != null ? pc.GetDayOfMonth((DateTime)invoice.DateCreation) : 0,
PersianDay = invoice.DateCreation != null ? pc.GetDayOfMonth((DateTime)invoice.DateCreation) : 0
};
Run Code Online (Sandbox Code Playgroud)
除了新字段之外,有没有办法传递发票的所有字段,例如:
var invoices = from invoice in dbContext.eve_Invoices
select new
{
invoice.*,
PersianYear = invoice.DateCreation != …Run Code Online (Sandbox Code Playgroud) 我在 android 应用程序中有一个 SQLITE 数据库。为了提高应用程序性能,我想在将数据库添加到 Android 应用程序之前对其进行一些改进。
为了做到这一点:
我想删除/替换帐户表的名称字段中的特殊字符。这些特殊字符的 Unicode 范围为 8204-8207 (0x200C ~ 0x200F)。更新帐户表的正确 SQL 语法是什么?
我有活动a。然后我将 b 放入 backsatck 并显示它;
我想调用c,这样a就不会再次被调用,但是我想从BackStack中弹出B,这样从CI返回希望它返回到A。
这是场景:
A->B
C调用:A->C
C在back上关闭Pressed: return back to A
但是,当我从 backstack 中弹出 B(以便用 C 替换它)时,片段 A onResume 被调用,并且不允许 B 正常显示。我还用过:
fragmentManager.popBackStack(null,FragmentManager.POP_BACK_STACK_INCLUSIVE);`
Run Code Online (Sandbox Code Playgroud)
但这并不能解决问题。这是 switchFragments 的代码:
fragmentManager.popBackStack(null,
FragmentManager.POP_BACK_STACK_INCLUSIVE);
if (fragment != null) {
FragmentTransaction transaction = fragmentManager
.beginTransaction();
transaction.replace(R.id.content_frame, fragment, tag);
// Only ArticlDetailFragment is added to the back stack.
if (!(fragment instanceof HomeFragment)
/* && isItNotification == false */) {
if (debug == 1)
Log.v("DEBUG_TAG", "MainAcitivy switchContent2");
transaction.addToBackStack(tag);
}
transaction.commit();
contentFragment = fragment;
}
Run Code Online (Sandbox Code Playgroud)
HomeFragment就是这里所说的A。
我的创建剃刀视图中有以下代码片段:
@Html.EditorFor(model => model.UnitPrice)
Run Code Online (Sandbox Code Playgroud)
尝试直接设置UnitPriceusing 语句,如下所示:
@Model.UnitPrice = 100;
Run Code Online (Sandbox Code Playgroud)
我得到类似空指针异常的信息:Object reference not set to an instance of an object.
如何在发布之前为字段分配常量值以创建发布方法?
据我所知,有些类不应该被混淆,而且它们的名称必须像"活动"一样持久化.但是我希望我的代码中的其他类和包被重命名.这build.gradle里面是app文件夹:apply plugin:'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "apt.eve.good.morning"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
}
Run Code Online (Sandbox Code Playgroud)
我将这个proguard配置用于我的应用程序(app\proguard-rules.pro):
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-useuniqueclassmembernames
-verbose
-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * { …Run Code Online (Sandbox Code Playgroud) 我正在尝试返回 JObject 作为我的操作结果。我已经使用Newtonsoft.Json和JsonNetResult 的对象转换为JsonResult。对于普通对象,我使用以下语法将对象序列化为 JsonResult:
return new JsonResult
{
ContentType = "application/json",
ContentEncoding = System.Text.Encoding.UTF8,
Data = myResult,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
};
Run Code Online (Sandbox Code Playgroud)
这myResult是所需对象的实例,但是Newtonsoft.Json.Linq.JObject,如下所示为 JObject ( )尝试此操作,将返回无效结果,即[[[]]]:
JObject jsonObject = new JObject();
jsonObject["error"] = "invalid_id";
return new JsonResult
{
ContentType = "application/json",
ContentEncoding = System.Text.Encoding.UTF8,
Data = jsonObject,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
};
Run Code Online (Sandbox Code Playgroud)
在这种情况下如何序列化 JObject?
在请求授予 Android 危险权限期间,是否有任何方法可以发送捆绑包/附加内容(就像我们对意图所做的那样)?
在为android授予危险权限的正常过程中,我们应该ActivityCompat.requestPermissions(...)根据文档调用如下定义:
void requestPermissions (Activity activity, String[] permissions,int requestCode)
Run Code Online (Sandbox Code Playgroud)
可以看出,没有选项可以在权限请求中发送任何额外信息。目前,我在活动中使用静态参数在获得我的许可后恢复它们。
我想知道有什么选择吗?
android-permissions android-bundle runtime-permissions dangerous-permissions
我有一个SearchFragment类扩展了其中的类BaseFragment,onResume并被onStop覆盖如下:
@Override
public void onResume() {
checkEventBusRegistration();
super.onResume();
}
@Override
public void onStop() {
EventBus.getDefault().unregister(this);
super.onStop();
}
public void checkEventBusRegistration()
{
if(!EventBus.getDefault().isRegistered(this))
{
EventBus.getDefault().register(this);
}
}
Run Code Online (Sandbox Code Playgroud)
SearchFragment是显示搜索结果列表的片段。通过单击每个项目,通过以下调用在其他片段上显示产品的详细信息:
getFragmentManager().beginTransaction().replace(R.id.container, new ProductDetailFragment()).addToBackStack(null).commit();
Run Code Online (Sandbox Code Playgroud)
此外,我的片段中的其他一些事件也不起作用。我的片段有一个listView,它没有响应notifyDataSetChanged()。
从中返回后ProductDetailFragment,不会触发eventbus订阅者,并且某些事件(例如notifyDataSetChanged属于我的listview的适配器)不会响应并且不会在UI上反映更改。
从中返回ProductDetailFragment时,当控制权到达SearchFragment.onResumeeventbus 时,调试行的代码仍在注册,并且不需要再次注册,但是生成的事件不会触发订阅者。
如果有帮助,这里是我的片段触发的生命周期事件:
有关创建片段的生命周期事件:
onAttach
onCreate
onCreateView
onViewCreated
onViewCreated
onStart
onResume
onCreateOptionsMenu
onPrepareOptionsMenu
Run Code Online (Sandbox Code Playgroud)
通过替换此片段离开该片段时的生命周期事件:
onPause
onStop
onDestroyView
onDestroyOptionsMenu
Run Code Online (Sandbox Code Playgroud)
返回此片段的生命周期事件:
onCreateView
onViewCreated
onViewCreated
onStart
onResume
onCreateOptionsMenu
onPrepareOptionsMenu
Run Code Online (Sandbox Code Playgroud) android android-fragments notifydatasetchanged fragment-lifecycle greenrobot-eventbus
android ×4
c# ×3
asp.net-mvc ×2
database ×1
gradle ×1
json.net ×1
linq ×1
linq-to-sql ×1
obfuscation ×1
php ×1
prestashop ×1
razor ×1
rdlc ×1
sql ×1
sql-update ×1
sqlite ×1