后台工作者worker_spi示例PostgreSQL(Background Worker worker_spi Example PostgreSQL)
我正在尝试运行PostgreSQL文档中的演示后台工作者示例。 我从以下网址下载: https : //github.com/postgres/postgres/tree/master/src/test/modules/worker_spi
我能够编译代码并创建以下文件:“worker_spi.o”和“worker_spi.so”
然后我运行了worker_spi - 1.0.sql: - \ i worker_spi - 1.0.sql。 最后,在连接到数据库之后,我创建了一个SQL文件中指定的扩展名。 但是,我认为它不起作用。 我是否需要将此“.so”文件放在其他目录中? 任何帮助深表感谢。
I am trying to run the demo background worker example present in PostgreSQL documentation. I downloaded it from: https://github.com/postgres/postgres/tree/master/src/test/modules/worker_spi
I am able to compile the code and the following files are created: "worker_spi.o" and "worker_spi.so"
I then ran worker_spi--1.0.sql with:- \i worker_spi--1.0.sql. Finally, after connecting to the database, I created an extension as specified in SQL file. But, I don't think it is working. Do I need to put this ".so" file in some other directory? Any help is much appreciated.
原文:https://stackoverflow.com/questions/37688437
最满意答案
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UIWebView *wbView = (UIWebView *)[cell.contentView viewWithTag:1]; NSString *embedHTML = @"\ <html><head>\ <style type=\"text/css\">\ body {\ background-color: transparent;\ color: white;\ }\ </style>\ </head><body style=\"margin:0\">\ <embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \ width=\"%0.0f\" height=\"%0.0f\"></embed>\ </body></html>"; NSString *html = [NSString stringWithFormat:embedHTML,url, 64.0, 64.0]; [wbView loadHTMLString:html baseURL:nil]; } "url" is the youtube video url - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [category_table cellForRowAtIndexPath:indexPath]; UIWebView *wbView = (UIWebView *)[cell.contentView viewWithTag:1]; UIButton *btn = [self findButtonInView:wbView]; [btn sendActionsForControlEvents:UIControlEventTouchUpInside]; } // detecting the play button on the you tube video thumbnail - (UIButton *)findButtonInView:(UIView *)view { UIButton *button = nil; if ([view isMemberOfClass:[UIButton class]]) { return (UIButton *)view; } if (view.subviews && [view.subviews count] > 0) { for (UIView *subview in view.subviews) { button = [self findButtonInView:subview]; if (button) return button; } } return button; } - (void)webViewDidFinishLoad:(UIWebView *)_webView { UIButton *button = [self findButtonInView:_webView]; [button sendActionsForControlEvents:UIControlEventTouchUpInside]; }
基本上,我必须在表格单元格中显示缩略图
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UIWebView *wbView = (UIWebView *)[cell.contentView viewWithTag:1]; NSString *embedHTML = @"\ <html><head>\ <style type=\"text/css\">\ body {\ background-color: transparent;\ color: white;\ }\ </style>\ </head><body style=\"margin:0\">\ <embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \ width=\"%0.0f\" height=\"%0.0f\"></embed>\ </body></html>"; NSString *html = [NSString stringWithFormat:embedHTML,url, 64.0, 64.0]; [wbView loadHTMLString:html baseURL:nil]; } "url" is the youtube video url - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [category_table cellForRowAtIndexPath:indexPath]; UIWebView *wbView = (UIWebView *)[cell.contentView viewWithTag:1]; UIButton *btn = [self findButtonInView:wbView]; [btn sendActionsForControlEvents:UIControlEventTouchUpInside]; } // detecting the play button on the you tube video thumbnail - (UIButton *)findButtonInView:(UIView *)view { UIButton *button = nil; if ([view isMemberOfClass:[UIButton class]]) { return (UIButton *)view; } if (view.subviews && [view.subviews count] > 0) { for (UIView *subview in view.subviews) { button = [self findButtonInView:subview]; if (button) return button; } } return button; } - (void)webViewDidFinishLoad:(UIWebView *)_webView { UIButton *button = [self findButtonInView:_webView]; [button sendActionsForControlEvents:UIControlEventTouchUpInside]; }
Basically, i had to show thumbnails in table cell
相关问答
更多-
如何在本地iphone应用中播放YouTube,metacafe等视频?(How to play videos from youtube, metacafe etc in a native iphone app?)[2023-05-15]
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UIWebView *wbView = (UIWebView *)[cell.contentView viewWithTag:1]; NSString *embedHTML = @"\ \