我想尝试在ios应用程序中使用UIWebView登录网页.但是,我不知道怎么能这样做.我正在展示网站
let url = NSURL(string: "http://m.falalem.com")
let request = NSURLRequest(URL: url!)
webView.loadRequest(request)
Run Code Online (Sandbox Code Playgroud)
我想使用我的用户名和密码参数登录此页面.登录页面 - > http://m.falalem.com/Login 登录页面后 - > http://m.falalem.com/User-Info
如何使用uiwebview登录此页面?请帮忙!
我有这个宏将文档中的所有形状转换为图像:
Dim i As Integer, oShp As Shape
For i = ActiveDocument.Shapes.Count To 1 Step -1
Set oShp = ActiveDocument.Shapes(i)
oShp.Select
Selection.Cut
Selection.PasteSpecial Link:=False, dataType:=wdPasteEnhancedMetafile, _
Placement:=wdInLine, DisplayAsIcon:=False
Next i
Run Code Online (Sandbox Code Playgroud)
更新:
我尝试了这段代码但不起作用:(没有错误,也没有结果)
Sub AllEquationToPic()
Dim z As Integer, equation As OMath
For z = ActiveDocument.InlineShapes.Count To 1 Step -1
Set equation = ActiveDocument.OMaths(z)
equation.Range.Select
Selection.Cut
Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile, _
Placement:=wdInLine, DisplayAsIcon:=False
Next z
End Sub
Run Code Online (Sandbox Code Playgroud) 将Restangular添加到项目时会抛出sn [Error: $injector:modulerr]错误.我确保我的一个模块没有抛出这个错误.我已经按照文档设置了它,我从他们的CDN中撤出.如果将Restangular作为依赖项删除它可以工作.
转载如下:
JS:
angular.module('app', ['restangular'])
.controller('Main', function(){
this.msg = 'Hello World'
})
Run Code Online (Sandbox Code Playgroud)
HTML:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/restangular/1.3.1/restangular.js"></script>
<main ng-app="app" ng-controller="Main as vm">
<h1>{{vm.msg}}</h1>
</main>
Run Code Online (Sandbox Code Playgroud)
嗨,在我的项目中,我需要在order by子句的mysql查询中使用index关键字.
我的查询如下所示:
SELECT asset.id, day_part.category, asset.site_id, site.name,
environment.category_1, environment.category_2, county.town, county.county,
site.site_id as siteid, media_owner.contractor_name,
IF (audience_category.impact IS NULL, 0, audience_category.impact) as impact,
tv_region.id as tv_region_id,
metropolitan.id as metropolitan_id,
IF (
price.price_site = -1,
IF(
price.price_tv_region = -1,
price.price_nation,
price.price_tv_region
),
price.price_site
) AS price,
format.name AS format,
format.id AS format_id
FROM asset
JOIN site ON asset.site_id = site.id
JOIN day_part ON asset.day_part_id = day_part.id
JOIN media_owner ON site.media_owner_id = media_owner.id
JOIN area ON site.area_id = area.id
JOIN environment …Run Code Online (Sandbox Code Playgroud) 当我使用以小写字母开头的变量时,页面不显示任何内容。如果我将变量名称更改为以大写字母 (HelloWorld) 开头,则页面将显示内容。
<script type="text/jsx">
var helloWorld = React.createClass({
render : function () {
return (
<div>
<h1>Hello World</h1>
</div>
);
}
});
React.render(<helloWorld/> , document.body);
</script>
Run Code Online (Sandbox Code Playgroud)
谁能告诉我为什么会这样?
如果我在"Xorg/XFree86/XSystem/Mir/Wayland"会话中,我想知道如何检查任何Linux发行版.
如果是,我在Xsession运行命令,如果没有在cli模式下运行命令
我尝试了以下方法:
xtty=`w -hs | awk '{print $2}' | sort -u | sed 's/^[tty \t]*//' | sed -n '$p'` && echo "tty X(org/Free86/System) = $xtty"
Run Code Online (Sandbox Code Playgroud)
但这只是为了知道我在哪个.
在某些发行版中,图形模式位于tty1,tty5,tty6或tty7中.但是,我想知道我是否登录了那个tty,如果我在图形会话中.
有人可以帮我这个吗?
我在模块中有以下定义Helper.
module Helper
let (|InvariantEqualLooooongName|_|) (str : string) arg =
if String.Compare(str, arg, StringComparison.OrdinalIgnoreCase) = 0 then Some()
else None
Run Code Online (Sandbox Code Playgroud)
我想在另一个模块中使用它.
let rec MyFunc .... =
let alias = Helper.InvariantEqualLooooongName // Error: The value, constructor, namespace or type 'InvariantEqualLooooongName' is not defined
match a with
| alias "xxx" :: tail -> .....
| alias "yyyy" :: tail -> ....
| alias "zzzz" :: tail -> ...
| alias "123" :: tail -> ...
Run Code Online (Sandbox Code Playgroud)
但是,它得到了错误
未定义值,构造函数,命名空间或类型"InvariantEqualLooooongName"
如何定义活动模式的别名?
我有一个具有不同计数的DIV的站点,具有不同的TABLES计数,我想总是删除第一个TABLE的第一个TR.使用此代码只有第一个DIV工作.这个jquery有什么问题?
<div style=background:khaki;padding:8>
<table border=1 cellpadding=8>
<tr><td><table border=1 cellpadding=8>
<tr><td>text 1</td><td>text 2</td></tr>
</table></td></tr>
<tr><td>text 3</td></tr>
<tr><td><table border=1 cellpadding=8>
<tr><td>text 4</td><td>text 5</td></tr></table>
</td></tr></table>
text 6
</div>
<br>
<div style=background:coral;padding:8>
<table border=1 cellpadding=8>
<tr><td><table border=1 cellpadding=8>
<tr><td>text 1</td><td>text 2</td></tr>
</table></td></tr>
<tr><td>text 3</td></tr>
<tr><td><table border=1 cellpadding=8>
<tr><td>text 4</td><td>text 5</td></tr></table>
</td></tr></table>
text 6
</div>
Run Code Online (Sandbox Code Playgroud)
$("div tr:eq(0)").css("background","black");