在这里,我们将给大家分享关于phpcms后台推送功能参数无效dialog.js行1030字符5的知识,同时也会涉及到如何更有效地AgilePLMAPI创建项目之间的关系:参数无效、AndroidDia
在这里,我们将给大家分享关于phpcms 后台推送功能 参数无效 dialog.js 行1030 字符5的知识,同时也会涉及到如何更有效地Agile PLM API 创建项目之间的关系:参数无效、Android Dialog-Dialog 无法充满横屏且下方有间隔、android – aidl.exe创建目录时出错:参数无效、c# – System.Drawing.Graphics.DrawString – “参数无效”异常的内容。
本文目录一览:- phpcms 后台推送功能 参数无效 dialog.js 行1030 字符5
- Agile PLM API 创建项目之间的关系:参数无效
- Android Dialog-Dialog 无法充满横屏且下方有间隔
- android – aidl.exe创建目录时出错:参数无效
- c# – System.Drawing.Graphics.DrawString – “参数无效”异常
phpcms 后台推送功能 参数无效 dialog.js 行1030 字符5
phpcms 后台推送功能 SCRIPT87: 参数无效 dialog.js, 行1030 字符5
phpcms 后台推送功能弹窗解决办法,不能正常弹出窗口,IE可以弹出一次后就不能在次弹出
错误效果如下:
解决办法:
找到 您网站根目录/static/js/dialog.js 的1030行代码,把1030行和1031行代码注释掉。就可以正常弹出了,此方法是临时解决办法,具体解决办法可以等待PHPCMS官方的补丁。
修改后代码为:
01// 新增内容后调整位置
02 if (!arguments[1]) {
03 if (that.config.follow) {
04 that.follow(that.config.follow);
05 } else {
06 width = wrap.offsetWidth - width;
07 height = wrap.offsetHeight - height;
08 left = left - width / 2;
09 top = top - height / 2;
10 //wrap.style.left = Math.max(left, 0) + ''px''; 此行隐藏
11 //wrap.style.top = Math.max(top, 0) + ''px''; 此行隐藏
12 };
13 if (cssWidth && cssWidth !== ''auto'') {
14 wrap.style.width = wrap.offsetWidth + ''px'';
15 };
16 that._autoPositionType();
17 };
Agile PLM API 创建项目之间的关系:参数无效
如何解决Agile PLM API 创建项目之间的关系:参数无效
我正在使用 Agile PLM API 开发 Scala 应用程序。 到目前为止一切正常,添加附件、添加 BOM 项目、创建项目等等。
但是在关系表中创建关系时,我总是收到这个错误:
com.agile.api.APIException: Invalid parameter.
at com.agile.api.pc.Session.createError(Session.java:2039)
at com.agile.api.pc.APIObject.createError(APIObject.java:76)
at com.agile.api.pc.TableRelationships.convertCreateParamMapToVOCells(TableRelationships.java:92)
at com.agile.api.pc.TablePC.doCreateServerRowWithParam(TablePC.java:58)
at com.agile.api.pc.Table.createTableRow(Table.java:267)
at com.agile.api.pc.Table.createRow(Table.java:231)
Agile API 需要一个以属性和值作为参数的哈希图来创建关系。所以这是我的代码:
val cells: java.utils.Map[_,_] = Map(
Attrs.Items.Relationships.CriteriaMet -> null,Attrs.Items.Relationships.TypeImage -> 666,// id of item type as Integer
Attrs.Items.Relationships.Name -> "foo",// name as String
Attrs.Items.Relationships.Description -> "bar",// the description as String
Attrs.Items.Relationships.CurrentStatus -> "Production",// lifecyclephase ''Production'' as a String
Attrs.Items.Relationships.Rule -> null,Attrs.Items.Relationships.Type -> 600 // id of item type as Integer
)
relationshipTable.createRow(cells)
relationTable 实例是 ITable 类型,这种 Map 用于添加 BOM 项和附件,所以我认为这不是这里的问题。
我只是手动查询现有关系的单元格,并将它们的键与我在此映射中使用的常量进行比较,它们是相同的。我真的不知道无效参数是什么。是否缺少一个属性?参数类型是否错误?没有迹象表明出了什么问题。
解决方法
好吧,答案很简单,尽管它的工作方式与 BOM 不同,并且没有记录。
解决方案只是将您要添加为关系的 iitem 传递: 关系表.createRow(iitem)
Android Dialog-Dialog 无法充满横屏且下方有间隔
自定义一个 Dialog, 写完布局后运行,发现 Dialog 无法充满屏幕,就像下边这样:
代码大致如下:
Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.dialog_layout);
Window dialogWindow = dialog.getWindow();
dialogWindow.setGravity(Gravity.BOTTOM);
dialogWindow.getDecorView().setPadding(0, 0, 0, 0);
WindowManager.LayoutParams lp = dialogWindow.getAttributes();
lp.width = WindowManager.LayoutParams.FILL_PARENT;
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
dialogWindow.setAttributes(lp);
dialog.show();
分析
这个问题其实是因为背景的.9 图四周 边距太宽的原因,和宽度设置无关,事实上是填满了的,只是四周是透明的而已。
打开源码中父类 Dialog 的 style 和 theme, 发现 background 属性:
切换到图片所在目录:
发现它是一张.9 图片
解决方法 1:
自定义 style, 继承 Theme.Dialog, 重写背景属性
<style name="dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/white</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
然后代码引用该 style:
Dialog dialog = new Dialog(this,R.style.dialog);
解决方法 2:
在自定义 dialog 中手动用代码设置
dialogWindow.setBackgroundDrawableResource(android.R.color.white);
android – aidl.exe创建目录时出错:参数无效
aidl.exe E 3628 7164 io_delegate.cpp:102] Error while creating directories: Invalid argument
Screenshot of bug
编辑:正如我所见,这是24.0.0的一个错误,但我仍然无法理解如何解决这个问题?
Edit2:我的代码在更新之前工作.
https://code.google.com/p/android/issues/detail?id=202972
解决方法
Error while creating directories: Invalid argument
搜索Google
解决这个问题:
>删除android / sdk / build-tools / 24.0.0-preview>重启Eclispe>该项目建成成功;
c# – System.Drawing.Graphics.DrawString – “参数无效”异常
注意,最好我可以指出的字体是正确构造的(我只是使用10pt的Arial),rect的大小是正的和有效的,画笔是一个白色的SolidBrush,格式标志不影响输出; ie如果我从调用中排除格式标志,我仍然收到错误.
DrawString调用就在底部附近.
public ActionResult RenderText( string fontFamily,float pointSize,string foreColor,string backColor,bool isBold,bool isItalic,bool isvertical,string align,string[] allText,int textIndex) { // method renders a horizontal or vertical text image,taking all the text strings that will be rendered in each image // and sizing the final bitmap according to which text would take the most space,thereby making it possible to render // a selection of text images all at the same size. Response.ContentType = "image/png"; var fmt = StringFormat.GenericTypographic; if(isvertical) fmt.FormatFlags = StringFormatFlags.DirectionVertical; Func<string,Stringalignment> getAlign = (s => { switch(s.ToLower()) { case "right": return Stringalignment.Far; case "center": return Stringalignment.Center; default: return Stringalignment.Near; } }); fmt.LineAlignment = isvertical ? Stringalignment.Center : getAlign(align); fmt.Alignment = isvertical ? getAlign(align) : Stringalignment.Center; var strings = (allText ?? new string[0]).Where(t => t.Length > 0).ToList(); if(strings.Count == 0) strings.Add("[Missing Text]"); FontStyle style = FontStyle.Regular; if(isBold) if(isItalic) style = FontStyle.Bold | FontStyle.Italic; else style = FontStyle.Bold; else if(isItalic) style = FontStyle.Italic; Font font = new Font(fontFamily,pointSize,style,GraphicsUnit.Point); Color fc = foreColor.IsHexColorString() ? foreColor.ToColorFromHex() : foreColor.ToColor(); Color bc = backColor.IsHexColorString() ? backColor.ToColorFromHex() : backColor.ToColor(); var maxSize = new Size(0,0); using(var tmp = new Bitmap(100,200)) using(var gfx = Graphics.FromImage(tmp)) foreach(var txt in strings) { var size = gfx.MeasureString(txt,font,1000,fmt); maxSize = new Size( Math.Max(Convert.ToInt32(isvertical ? size.Height : size.Width),maxSize.Width),Math.Max(Convert.ToInt32(isvertical ? size.Width : size.Height),maxSize.Width) ); } using(var bmp = new Bitmap(maxSize.Width,maxSize.Height)) { using(var gfx = Graphics.FromImage(bmp)) { gfx.CompositingMode = CompositingMode.sourcecopy; gfx.CompositingQuality = CompositingQuality.HighQuality; gfx.SmoothingMode = SmoothingMode.HighQuality; gfx.InterpolationMode = InterpolationMode.HighQualityBicubic; var rect = new RectangleF(new PointF(0,0),maxSize); gfx.FillRectangle(new SolidBrush(bc),rect); gfx.DrawString(strings[textIndex],new SolidBrush(fc),rect,fmt); } bmp.Save(Response.OutputStream,ImageFormat.Png); } return new EmptyResult(); }
解决方法
gfx.CompositingMode = CompositingMode.sourcecopy;
我们今天的关于phpcms 后台推送功能 参数无效 dialog.js 行1030 字符5的分享已经告一段落,感谢您的关注,如果您想了解更多关于Agile PLM API 创建项目之间的关系:参数无效、Android Dialog-Dialog 无法充满横屏且下方有间隔、android – aidl.exe创建目录时出错:参数无效、c# – System.Drawing.Graphics.DrawString – “参数无效”异常的相关信息,请在本站查询。
本文标签: