小编Ram*_*mar的帖子

使用图形API在朋友的墙上发布

在朋友的墙上发布消息,图API.我有使用该应用程序的用户的publish_stream扩展权限.

如果我想在我的墙上张贴,代码就会工作.

是否有任何方法可以在墙上发布或向特定用户的所有朋友发送消息?

请帮忙谢谢!!

以下是代码,但它不起作用.

 $friends = $facebook->api('/me/friends');
    foreach($friends['data'] as $friend){
            $friendsUserId = $friend['id'];
            echo $friendsUserId . "</br>";
            $result = $facebook->api('/$friendsUserId/feed', 'POST', array(                
                    message' => 'Test Message'                ));
            print_r($result);
        }
Run Code Online (Sandbox Code Playgroud)

php message facebook facebook-graph-api

4
推荐指数
2
解决办法
1万
查看次数

Sencha Touch filter通过商店

码:

this.searchField = new Ext.form.Text({
            displayField: 'name',
            valueField: 'name',
            editable: true,
            forceSelection: true,
            triggerAction: 'all',
            emptyText: 'Search...',
            selectOnFocus: true
    });

this.searchButton = new Ext.Button({// The button press will invoke the search action
        text: 'Go',
        handler: this.searchButtonTap,
        scope: this
    });

    this.topToolbar = new Ext.Toolbar({
                   items: [
                { xtype: 'spacer' },    
                    this.searchField,
                    this.searchButton,
                    { xtype: 'spacer' },
                ]
        });

searchButtonTap: function () {

        var searchText = this.searchField.getValue();
        console.log(searchText);
        //console.log(this.myappsList.store.getCount());
        console.log(this.myappsList.store.filter('name', searchText));
        //this.myappsList.store.filter(searchText);

    },
Run Code Online (Sandbox Code Playgroud)

在我的模型中,我有四个领域:

姓名,年龄,性别,Charecteristic

我在这里尝试的是:

在页面上的列表中显示我的数据库的内容,因为列表很长我想搜索,当用户在搜索字段中写入查询并按下搜索按钮时,searchButtonTap 调用处理程序,尝试过滤并显示列表类似于查询中的名称我也尝试过,filterBy但这也没有用.请让我知道什么是错的?

谢谢.

sencha-touch extjs-mvc

2
推荐指数
1
解决办法
4320
查看次数

jQuery动态标记所有选中的复选框

我有以下HTML结构 -

<div class="first_checkbox">
<input type="checkbox" name="checkbox"  class="all-checkbox" value="">
</div>

<table>
    <tr>
        <td>
            <input type="checkbox" name="checkbox-32" id="checkbox-32" value="" style="opacity: 0;" />
        </td>
        <td class="h_pincode">380059</td>
        <td class="b_add2">Nr. Swatik Cross Road, Navrangpura</td>
    </tr>
    <tr>
        <td>
            <input type="checkbox" name="checkbox-34" id="checkbox-34" value="" style="opacity: 0;" />
        </td>
        <td class="h_pincode">380015</td>
    </tr>
</table>
Run Code Online (Sandbox Code Playgroud)

我想要实现的功能是,当我点击第一个单选框时,将检查s中的所有后续复选框.

这样做的JS如下 -

$(function(){
  $(".all-checkbox").on("click", function(){
  $('input[type=checkbox]').each(function(ind, val){
      $(this).prop('checked', 'checked');
      console.log(this.name + ' ' + this.value + ' ' + this.checked);
  });
 });
});
Run Code Online (Sandbox Code Playgroud)

我正确地获得了控制台日志,唯一不同的是,收音机盒没有被检查.

小提琴位于这里 - http://jsfiddle.net/dAJM8/

html javascript jquery

1
推荐指数
1
解决办法
210
查看次数

php中的正则表达式从wiki文本中删除引文

从给定的示例文本中,我希望文本与[[]]和{{}}中包含的文本区分开来

示范文本:

1988年12月11日,年仅15岁零232天,Tendulkar在[[孟买板球队|孟买]]对阵[[古吉拉特板球队]队的首场[[一流板球|一流]]比赛中得分100分|古吉拉特邦],让他成为最年轻的印第安人,在一流的首秀中获得一个世纪的成绩.他在他的第一个Deodhar和Duleep Trophy中打入了一个世纪.{{cite web | url = http://www.espnstar.com/cricket/international-cricket/news/detail/item136972/Sachin-Tendulkar-factfile/ | title = Sachin Tendulkar factfile | publisher = www.espnstar.com |访问日= 2009年8月3日}}他被孟买队长[[Dilip Vengsarkar]]选中后,看到他在篮网中谈判[[卡皮尔开发]],并在本赛季结束时成为孟买最高得分手.他得到583分平均为67.77,并且是整体得分第六高的{{cite web | url = http://blogs.cricinfo.com/link_to_database/ARCHIVE/1980S/1988-89/IND_LOCAL/RANJI/STATS/IND_LOCAL_RJI_AVS_BAT_MOST_RUNS.html | title = 1988-89 Ranji season - Most Runs | publisher = Cricinfo | accessdate = 2009年8月3日}}他在[[Irani Trophy]]决赛中也创造了一个不败的世纪,{{cite web | url = http:// cricketarchive.com/Archive/Scorecards/52/52008.html|title=Rest of India v Delhi in 1989/90 | publisher = Cricketarchive | accessdate = 2009年8月3日}}并在明年被选中参加巴基斯坦之旅一流的海洋 上.

我试过这个:

$patterns = ("/^{{*/", "/*}}$/" );$replacements = "";
  preg_replace($patterns, $replacements, $parts);
  print_r($parts);
Run Code Online (Sandbox Code Playgroud)

还有这个:

$parts …
Run Code Online (Sandbox Code Playgroud)

php regex preg-replace html-parsing

0
推荐指数
1
解决办法
859
查看次数