tags

Android NfcV get information command returns only one byte

回眸只為那壹抹淺笑 提交于 2020-01-04 13:40:16
问题 I'm writing an app for reading binary infos of NFC tags. Here's the code of the NFC intent handler function: protected void onNewIntent(@NonNull Intent intent) { try { Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); NfcV nfcV = NfcV.get(tag); byte[] cmdInfo = new byte[]{(byte) 0x02, (byte) 0x2b}; // 'Get info' command byte[] answer = nfcV.transceive(cmdInfo); // Read info from tag. ... } catch(IOException e) { ... } } If I run this function reading an NFC tag on a Samsung S3 Neo

Android NfcV get information command returns only one byte

最后都变了- 提交于 2020-01-04 13:39:28
问题 I'm writing an app for reading binary infos of NFC tags. Here's the code of the NFC intent handler function: protected void onNewIntent(@NonNull Intent intent) { try { Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); NfcV nfcV = NfcV.get(tag); byte[] cmdInfo = new byte[]{(byte) 0x02, (byte) 0x2b}; // 'Get info' command byte[] answer = nfcV.transceive(cmdInfo); // Read info from tag. ... } catch(IOException e) { ... } } If I run this function reading an NFC tag on a Samsung S3 Neo

XMLWorkerHelper performance slow

廉价感情. 提交于 2020-01-04 09:28:14
问题 I am using itext 5.3 in java to generate PDF. I was using HTMLWorker.parseToList(Reader, StyleSheet) to convert part to String which contains HTML tags like Bold, Italic, href etc to PDF. I don't want to generate complete HTML to PDF instead a part of text in PDF will be HTML. For example, strings like "This is test bold text" to convert part of text to be bold. The performance is good with HTMLWorker . Since its deprecated now, I started using XMLWorkerHelper.parseXHtml(ElementHandler,

PHP DOMDocument / XPath: Get HTML-text and surrounded tags

依然范特西╮ 提交于 2020-01-04 07:47:18
问题 I am looking for this functionality: Given is this html-Page: <body> <h1>Hello, <b>world!</b> </h1> </body> I want to get an array that only contains the DISTINCT text elements (no duplicates) and an array of the tags that surround the text elements: The result to the above "html" would be an array that looks like this: array => "Hello," surrounded by => "h1" and "body" "world!" surrounded by => "b", "h1" and "body" I alreday do this: $res=$xpath->query("//body//*/text()"); which gives me the

The jQueryUI ajax tabs example doesn't work

99封情书 提交于 2020-01-04 06:21:32
问题 I'm playing with jQueryUI, with the development-bundle, but having issues. So instead I'm trying another approach. Check out the example here: http://jqueryui.com/demos/tabs/ajax.html Click "Tab 2" and "Tab 3". Everything works fine. Now, I viewed and copied the html source code into a local file, and replaced all relative paths to absolute paths as such: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Tabs - Content via Ajax</title> <link rel="stylesheet" href

The jQueryUI ajax tabs example doesn't work

£可爱£侵袭症+ 提交于 2020-01-04 06:21:06
问题 I'm playing with jQueryUI, with the development-bundle, but having issues. So instead I'm trying another approach. Check out the example here: http://jqueryui.com/demos/tabs/ajax.html Click "Tab 2" and "Tab 3". Everything works fine. Now, I viewed and copied the html source code into a local file, and replaced all relative paths to absolute paths as such: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Tabs - Content via Ajax</title> <link rel="stylesheet" href

Helper for tag html a

佐手、 提交于 2020-01-04 04:57:29
问题 is there any helper in asp.net MVC3 <a href="www.google.com">Go to Google </a> ? Not for an action but to a static link 回答1: I don't believe there is, but I'm not sure why you would want one. You'd actually end up with more code: <a href="http://www.google.com/">Go to Google</a> <%: Html.Link("http://www.google.com/", "Go to Google") %> @Html.Link("http://www.google.com/", "Go to Google") Update: If you want to create a Link() helper like that above, you would use an extension method: public

Setting the base tag of a dynamically created iframe

别等时光非礼了梦想. 提交于 2020-01-04 04:44:07
问题 I'm trying to dynamically create an iframe and set it's base tag before it is created. ifrm = document.createElement("IFRAME"); ifrm.setAttribute("src", "test.html"); ifrm.style.width = 400+"px"; ifrm.style.height = 100+"px"; //before creating it, can we set he base tag? //I.E. <base href="http://example.com/MyFolder/" /> var bt = ifrm.contentDocument.createElement("base"); bt.setAttribute("href", "http://www.example.com/Folder/"); ifrm.contentDocument.getElementsByTagName("head")[0]

HtmlAgilityPack getting page title and H1 tags

ぐ巨炮叔叔 提交于 2020-01-03 21:00:37
问题 Hey all i am trying to get the page title and H1 tags from a webpage by doing the following doc.LoadHtml(htmlSourceCode) txtTitle.Text = doc.GetElementsByTagName("title").InnerText() txtH1.Text = doc.GetElementsByTagName("H1").InnerText() For Each channel In doc.DocumentNode.SelectNodes(".//meta[@name='description']") txtDescription.Text = channel.Attributes("content").Value Next The only code above that works is the txtDescription part. Both the title and H1 do not. What type of syntax do i

Enable PHP short tags using .htaccess

冷暖自知 提交于 2020-01-03 17:32:06
问题 I have Apache set up on my own Centos server with several virtual web servers, and I wish to enable PHP short tags for only one of those web servers which is located at /var/www/ostickets/html . I can successfully enable short tags by adding short_open_tag=On to php.ini, however, I don't wish to globally do so, but only the one site. I've tried the following, however, nothing is displayed. I've looked at various logs, and cannot detect any errors. Is it possible that I inadvertently disabled