使用Google Channel API关闭频道(Closing Channel with Google Channel API)
我使用GWT和Java编写了Google Channel API的客户端/服务器实现。 我已经在互联网上以及渠道API中随处可见,了解如何在完成使用后关闭频道(每个用户一次只能打开一个频道,因此这对我的应用来说非常重要) ,但到目前为止我一无所获。
有谁知道如何向Google发送关闭套接字请求以关闭某个频道的套接字?
I've written a client/server implementation of the Google Channel API using GWT and Java. I've looked everywhere on the internet and also in the Channel API to find out how to close a Channel when you are finished using it (each user can only have one channel open at a time, so this is very important for my app), but so far I've found nothing.
Does anyone know how to send the close socket request to Google to close a certain Channel's socket?
原文:https://stackoverflow.com/questions/26094217
最满意答案
是否可以检查发布的答案是否在回答里面:
是! 验证这样的单选按钮值是非常好的练习。 您阅读的文章是正确的,您不应该盲目信任用户提供的数据。
Is it okay to check whether posted answer is inside aray with answers:
Yes! That is very good practice to validate a radio button value like that. The article you read is correct, you should not blindly trust user supplied data.
相关问答
更多-
您的控制器需要更正: $this->load->library('session'); $list['questions'] = $this->assessment_model->get_list_questions($data['list']); $this->load->view('quiz', $list); 在视图中: session->set_flashdata('Questions', $questions); $this->load->helper( ...
-
注意错误说sort() expects ,而不是usort() expects 。 这是因为PHP将回调解释为内置的sort()方法(它希望第一个参数是一个数组),而不是sort()方法。 尝试将您的方法重命名为其他内容,例如my_sort 。 function my_sort( $a, $b ) { return strlen( $b ) - strlen( $a ); } if ( is_array( $tables ) ) { usort( $tables, 'my_sort' ); ...
-
这一行应该做你想做的事情: awk 'NR==FNR{a[$0];next}NF<3||!($22 in a)' file1 file2 你的问题是,你有var f ,这是一个数字,我想它是列的索引。 但是如果你检查你的代码,你使用f作为值,检查数组中的f ,而不是检查$f 也就是说,如果你给f=22 ,对于file2中的每一行,你检查数组中的常量22。 因此,输出将是file2中的所有行或file2中的标题,这取决于file1中的常量22。 :) this one-liner should do wh ...
-
是否可以检查发布的答案是否在回答里面: 是! 验证这样的单选按钮值是非常好的练习。 您阅读的文章是正确的,您不应该盲目信任用户提供的数据。 Is it okay to check whether posted answer is inside aray with answers: Yes! That is very good practice to validate a radio button value like that. The article you read is correct, you sh ...
-
检查所需条件的常用方法是: (cond [(not (memq 4 (queue->list p))) "yaay"]) 请记住,在Scheme中, 唯一的错误值是#f ,其他一切都被认为是真的 - 包括null , '() , 0 , ""等。 在这种情况下, memq将返回以找到的搜索元素开头的列表 ,否则返回#f ,而not否定结果,这意味着仅当元素不在列表中时条件才为真。 最后一件事 - memq使用eq? 为了比较,使用member ,使用equal? member是一个更好的主意equal ...
-
检查值是否在数组中(Check if a value is into an array)[2022-12-15]
默认情况下,已检查的所有复选框的值将以逗号分隔的列表的形式提交。 因此,如果检查周日和周六并提交表格,您最终会得到: form.repeat_period_week_day= "1,7" 如果你想知道星期六的盒子是否被选中,你可以像这样使用ListFind()函数: ListFind(form.repeat_period_week_day,7) By default, the values of all the checkboxes that were checked will be submitted ... -
在隐藏字段数组中添加和删除值,而不提交表单(Add and Remove values in a hidden field array, without submitting form)[2023-11-11]
你可以添加return false; 在onClick代码中: -
你必须使用双引号: function ifset($check) { if (isset($_POST["$check"])) { $check = $_POST["$check"]; } else { $check = NULL; } return $check; } 但实际上你可以忽略它们。 You have to use double quotes: function ifset($check) { if (isset($_POST["$check"] ...
-
检查值是否在数组中(check if value is in array)[2022-07-30]
$name = $_POST['Name']; foreach($profanities as $profanity) { if (preg_match('/\w' . preg_quote($profanity, '/') . '\w/i', $name) { // Bad word on its own } } 这将仅仅匹配一个坏词...即它会匹配bad Is it bad? 但不是baddy 。 如果要匹配,可以删除单词边界,或者尝试使用strstr() 。 但是,如果 ... -
我基本上不得不废弃这段代码,因为它根本不起作用。 我最终得到的是这样的 casper.test.begin('web site up', 4, function(test) { casper.start(url).then(function() { this.test.assert( this.getCurrentUrl() === url, 'url is the one expected' ); this.test.as ...