求救大神 微信php开发打标签tagid问题。

图片说明这样执行后打标签不成功,返回string(66) "{"errcode":45159,"errmsg":"invalid tag id hint: [yD1Ifa01354807]"}",这个openid直接写进去打标签的话是成功的,所以说这个没办法解析字符串变量对么,求救大神。

1个回答

定义字符串有问题。定义$data字符串的时候你最外头用的是单引号,php认为里面的都是字符串也包括里面的$openidvalue。
改成字符串拼接的方式应该就行了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
微信通过后台服务器取消关注公众号的用户

需要实现通过后台服务器取消某些用户对服务号的关注,需要调用微信的什么接口?如何实现?刚接触微信开发..

PHP标签系统和搜索系统

<div class="post-text" itemprop="text"> <p>I'm working on a simple tag product system and search system.. I tried a few methods with explode and arrays but i couldnt make it work.</p> <p>I have 3 tables</p> <ol> <li><code>tags</code> id title</li> <li><code>posts_tags</code> postid tagid</li> <li><code>posts</code></li> </ol> <p>Is there any solution so I can do a multiple-tags search with sql statements, or just for a one single tag? I just want to make a search system so users can search posts by one or more tags.</p> </div>

如何用php代码构建<input>设置值属性

<div class="post-text" itemprop="text"> <p>I'm not sure how word my question clearly, so here's what I'm trying to do with no success so far (simplified code)</p> <p>The end result I need on the page is:</p> <pre><code>&lt;input type="text" class="form-control" id="Colour" name="InputName7" value="&lt;?php echo $InputName7 ; ?&gt;"&gt; </code></pre> <p>I have a function to build this but the value attribute is rendering as a string instead of code... and I end up with "" as the string value. I don't understand why. </p> <p>Here's how I call the function:</p> <pre><code>$newItem = SetItemInputTag("Colour", $ItemCount, "&lt;?php echo $InputName7; ?&gt;", FALSE) </code></pre> <p>Here's function:</p> <pre><code>function SetItemInputTag($TagId, $ItemCount, $TagValue, $Disabled){ $InputTag = "&lt;input type='text' class='form-control' id='" . $TagId . "' name= 'InputName" . $ItemCount . "' disabled value='" . $TagValue . "'&gt;"; return $InputTag; } </code></pre> <p>I appreciate any help I can get!!</p> </div>

Senparc SDK 使用json更新自定义菜单

https://github.com/JeffreySu/WeiXinMPSDK/blob/master/Samples/Senparc.Weixin.MP.Sample.vs2017/Senparc.Weixin.MP.CoreSample/Controllers/MenuController.cs SDK json更新自定义菜单源码 进入搜索CreateMenuFromJson 这个action ![图片说明](https://img-ask.csdn.net/upload/201908/07/1565139213_896310.jpg) buttonGroup=null 调试没走下面这段直接跳catch 错误信息对象的引用未设置到对象的实列 result = CommonApi.CreateMenu(AppId, buttonGroup);

如何替换html标签内的值?

<div class="post-text" itemprop="text"> <p>I want to replace element content with content which is definded in $tagsReplace array but have problem with preg_replace, my current ode:</p> <pre><code>$tagsReplace = array( 'header' =&gt; 'header', 'tag1' =&gt; 'this is tag1', 'tag2' =&gt; 'this is tag2', 'tag3' =&gt; 'this is tag3', 'footer' =&gt; 'footer', ); $content = ' &lt;!DOCTYPE html&gt; &lt;hthml&gt; &lt;header data-edit="true" data-tag-id="header"&gt;&lt;/header&gt; &lt;div data-edit="true" data-tag-id="tag1"&gt;&lt;/div&gt; &lt;div data-edit="true" data-tag-id="tag2"&gt;&lt;/div&gt; &lt;div data-edit="true" data-tag-id="tag3"&gt;&lt;/div&gt; &lt;footer data-edit="true" data-tag-id="footer"&gt;&lt;/footer&gt; &lt;/html&gt; '; $dom = new DOMDocument(); libxml_use_internal_errors(true); $dom-&gt;loadHTML($content); $xpath = new DomXpath($dom); foreach ($xpath-&gt;query('//*[@data-edit="true"]') as $rowNode) { $tagID = $rowNode-&gt;getAttribute('data-tag-id'); $content = preg_replace('/(&lt;div.*?data-edit="true"[^&gt;]*&gt;)(.*?)(&lt;\/div&gt;)/i', '$1'. $tagsReplace[$tagID] . '$3', $content); } echo $content; </code></pre> <p>What i want is to get output like that:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;hthml&gt; &lt;header data-edit="true" data-tag-id="header"&gt;header&lt;/header&gt; &lt;div data-edit="true" data-tag-id="tag1"&gt;this is tag1&lt;/div&gt; &lt;div data-edit="true" data-tag-id="tag2"&gt;this is tag2&lt;/div&gt; &lt;div data-edit="true" data-tag-id="tag3"&gt;this is tag3&lt;/div&gt; &lt;footer data-edit="true" data-tag-id="footer"&gt;footer&lt;/footer&gt; &lt;/html&gt; </code></pre> <p>Current output is:</p> <pre><code> &lt;!DOCTYPE html&gt; &lt;hthml&gt; &lt;header data-edit="true" data-tag-id="header"&gt;&lt;/header&gt; &lt;div data-edit="true" data-tag-id="tag1"&gt;footer&lt;/div&gt; &lt;div data-edit="true" data-tag-id="tag2"&gt;footer&lt;/div&gt; &lt;div data-edit="true" data-tag-id="tag3"&gt;footer&lt;/div&gt; &lt;footer data-edit="true" data-tag-id="footer"&gt;&lt;/footer&gt; &lt;/html&gt; </code></pre> <p>Soo all elements which contain atribute data-edit="true" and data-tag-id has to get content inside them replaced by tagid value which is definded in arra $tagsReplace.</p> </div>

监视PHP变量以获得值的更改

<div class="post-text" itemprop="text"> <p>I am actually trying to monitor a PHP variable (may be as a separate thread but not possible in PHP) and fire a PHP function whenever the value of the variable changes.</p> <p>eg: lets take a variable $_GLOBALS['foo']=1;</p> <p>if at any point in the code, the value of $_GLOBALS['foo'] changes to something else, i want to fire a PHP function immediately.</p> <p>The variable can be anywhere inside a loop or in a function,etc.</p> <p><strong>Why i want this</strong>: I have a variable which stores the last error occured as a text. If the value of the variable changes from "" to something else, i want to trigger an error. My LOGIC may seem a bit strange but this is what i would like to do.</p> <p>Thanx in advance.</p> <p><strong>Edit:</strong> I tried: <a href="https://stackoverflow.com/questions/4682120/how-to-use-monitors-in-php">How to use monitors in PHP?</a> and <a href="https://stackoverflow.com/questions/70855/how-can-one-use-multi-threading-in-php-applications">How can one use multi threading in PHP applications</a> but does not seem to solve the problem.</p> <p><strong>The Code (Thought this could solve some of your doubts on my question):</strong></p> <pre><code>public function addtag($tagarray,$uid,$tagtype="1") { $dbobj=new dboperations(); $uiobj=new uifriend(); $tagid=$uiobj-&gt;randomstring(30,DB_SOCIAL,SOCIAL_TAG,tag_tagid); $c=0; foreach($tagarray as $tags) { $c++; $tagname=$tags["tagname"]; $taguid=$tags["tagid"]; $dbobj-&gt;dbinsert("INSERT INTO ".SOCIAL_TAG." (".tag_tagid.",".tag_fuid.",".tag_tuid.",".tag_tagname.",".tag_tagtype.") VALUES ('$tagid','$uid','$taguid','$tagname','$tagtype')",DB_SOCIAL); } if($c==0) { $lasterror="No tags were added";return ""; } else { return $tagid; } } </code></pre> <p>Here, if i call a error handling function instead of monitoring the variable, it wont be advisable in my case since the error handling function may do any operation like give alert and redirect to a page or any similar operation.</p> <p>I asked this question cause, i thought what if the script does not reach the line return ""; It would affect the project's workflow. Thats what i am worried about.</p> <p>And the variable i was talking about is $lasterror and i have many functions like this where $lasterror is used.</p> </div>

一个MySql查询按标签过滤结果并返回结果使用的所有标记的列表

<div class="post-text" itemprop="text"> <p>I'm trying to figure out if it is possible to combine two mysql queries into a single one. The first query returns results based on multiple selected tags. The second query returns a list of tags used in the database, ordered by their total count.</p> <p>I have three tables, lets call them: - 'LIB' (contains all images, data, ect.) - 'TAGS' (contains all possible tags and their tag ids) - 'LIBTAGS' (contains records of all tags used in the lib, with LIB ids and TAG ids)</p> <p>Example Tables:</p> <pre><code>LIB --------------- id - 12345 desc - 'A description' file - 'example.jpg' thumb - 'exampleThumb.jpg' TAGS --------------- id - 3500 tag - 'exampletag' LIBTAGS -------------- libid - 12345 tagid - 3500 </code></pre> <p>The first query looks like this:</p> <pre><code>SELECT from LIB l JOIN LIBTAGS lt ON l.id = lt.libid JOIN TAGS t ON lt.tagid = t.id WHERE t.tag IN ('tag1', 'tag2', 'tag3') //varies with number of tags GROUP BY l.id HAVING count(DISTINCT t.tag) = 3 //varies with number of tags </code></pre> <p>This returns results from LIB containing all of the searched tags.</p> <p>The second query looks like this:</p> <pre><code>SELECT lt.tagid, t.*, count(lt.tagid) AS cnt FROM LIBTAGS lt JOIN TAGS t ON lt.tagid = t.id GROUP BY lt.tagid ORDER BY cnt DESC </code></pre> <p>This returns a list of the most used tags ordered by their total count.</p> <p>My goal is to combine these and to return a list of tags (like above) but only for the results of the first query. Can this be done?</p> <p>The purpose of this is to allow users to narrow their results by tags, and then present them with a list of tags which they can further narrow it down by.</p> <p>The output I'm looking for is the ability to loop through results for the first query (from LIB), and an array of tags (or list I can make into an array) from the second query.</p> <p>Any insight or advice is greatly appreciated. Thanks!</p> </div>

WP Admin(帖子列表)中的自定义列,仅显示包含的TagID数组中的标签

<div class="post-text" itemprop="text"> <p>I ahve added a custom column to the regular Posts list in Wordpress admin.</p> <p>No custom taxonomies, it should just show tags that belong to a specific array of tags.</p> <p>i.e: 1 column is for Country 2 column is for Province 3 column is for News Type 4 column is for Article Type etc.</p> <p>There need to be 6 columns like this.</p> <p>The regular tags column will still be there, containing the same tag that this custom column has, the custom columns are needed because of the back-end logic that was requested.</p> <p>so for example:</p> <p>The first custom column should only show tags assigned to a post tags that have specific TagIDs (52,128,97)</p> <p>The second custom column should only show tags assigned to a post tags that have specific TagIDs (875,118,27,881)</p> <p>and so on.</p> <p>I understand that <strong>get_the_tags()</strong> uses <strong>get_the_terms()</strong>, but get_the_terms() can only have 2 parameters, $id and $taxonomy, which is 'post_tag' in this case.</p> <p>This is where I have got so far:</p> <pre><code>add_filter('manage_posts_columns', 'posts_column_custom1_country', 10); add_action('manage_posts_custom_column', 'posts_column_custom1_country_populate', 10, 3); function posts_column_custom1_country($defaults) { $defaults['customtag-country'] = __('Country'); return $defaults; } function posts_column_custom1_country_populate($column_name, $id) { if($column_name === 'customtag-country') { echo get_the_terms( $id, 'post_tag'); } } </code></pre> <p>Notice: Array to string conversion in '...' Which is normal since what it returns is an array not a string.</p> <p>How to I convert it to a string to show the actual tag names (comma separated) just like the default Tags column from Wordpress Core does?</p> <p>Then how can this be set up to include an array of tagIDs so that it doesn't show all the tags assigned to the post.</p> <p>There are 700+ tags used on the Wordpress site in question so excluding 780 for each of these columns only to show the 20 in the array would be a bad solution. How do I do something similar to the include parameter, which get_the_terms doesn't take unfortunately.</p> </div>

如何在php和mysqli中修复重复的标记名称

<div class="post-text" itemprop="text"> <p>I don't know how to explain it, maybe this is understandable. I have 2 table:</p> <ol> <li>Table tags: (tagID: '1', '2', '3') (tagName: 'a', 'b', 'b')</li> <li>Table tag_posts: (postID: '1', '1', '2') (tagID: '1', '2', '3')</li> </ol> <blockquote> <p><strong>Output:</strong> Post 1 tagged (a[id=1], b[id=2]) and post 2 tagged (b[id=3])</p> </blockquote> <p>But, i want result like this:</p> <ol> <li><p>Table tags: (tagID: '1', '2') (TagName: 'a', 'b')</p></li> <li><p>Table tag_posts: (postID: '1', '1', '2') (tagID: '1', '2', '2')</p></li> </ol> <blockquote> <p><strong>Output:</strong> Post 1 tagged (a[id=1], b[id=2]) and post 2 tagged (b[id=2])</p> </blockquote> <p>I want on table "tags" tag name, b is 2; not b = 2 and b = 3 (not double tag name)</p> <p>Php</p> <pre><code>$last_post_id = mysqli_insert_id($connect); foreach($tags as $tag){ $sql = mysqli_query($connect, "SELECT * FROM tb_tags WHERE tagName = '$tag'") or die(mysqli_error()); $row = mysqli_fetch_array($sql); if($row == NULL){ mysqli_query($connect, "INSERT INTO tb_tags (tagName) VALUES ('$tag')") or die(mysqli_error()); $last_tag_id = mysqli_insert_id($connect); mysqli_query($connect, "INSERT INTO tb_tag_posts (postID, tagID) VALUES ('$last_post_id', '$last_tag_id')") or die(mysqli_error()); }else{ // if tags name exists do nothing and take the existing id tag mysqli_query($connect, "INSERT INTO tb_tag_posts (postID, tagID) VALUES ('$last_post_id', '".$row['tagID']."')") or die(mysqli_error()); } } </code></pre> </div>

我想试着用r做天猫评论的爬取,但是就是得不到结果?求问大神看看哪里错了?

我想试着用r做天猫评论的爬取,但是就是得不到结果?求问大神看看哪里错了 site<-"https://rate.tmall.com/list_detail_rate.htm?itemId=575864782677&spuId=1038237949&sellerId=2261312144&order=3&currentPage=1&append=1&content=1&tagId=&posi=&picture=0&groupId=&ua=098" webpage<-read_html(site,encoding="utf-8") date1<-html_nodes(webpage,'.tm-rate-date') date<-html_text(date1) print(date1)

如何通过asana api获取其名称的标签ID?

<div class="post-text" itemprop="text"> <p>I want asana tag id if i provide tag name via asana api call. Is there any method from which i can directly achieve this?</p> <p>Alternative, i can get all the tags in workspace and filter through it matching with my id but this will be long process.</p> <p>Any method like <code>getTagID(tagName)</code> ?? yes i can get reverse of this <code>getTag(tagId)</code></p> <p>FYI, i am using php wrapper for asana api (<a href="https://github.com/ajimix/asana-api-php-class" rel="nofollow">https://github.com/ajimix/asana-api-php-class</a>)</p> <p>Thanks.</p> </div>

Steam - 如果用户已登录,则此页面可用。 如何用PHP获取它?

<div class="post-text" itemprop="text"> <p>This is my first question here :)</p> <p>I have on my mind a little feature for my website. And I am trying to find a way how to do it.</p> <p>If user is logged in on Steam, he can access this page: <a href="http://store.steampowered.com/dynamicstore/userdata/?id=STEAMID" rel="nofollow noreferrer">http://store.steampowered.com/dynamicstore/userdata/?id=STEAMID</a></p> <p>and it contains information about his wishlist and owned games.</p> <p>Result for logged user:</p> <pre><code>{"rgWishlist":[500,1300,1620,7020,8340,8870,8980,9350,10090,10130,10400,10680,12200,16600,17580,22320,24780,28000,32160,33990,39000,42170,42700,45710,49540,50130,51100,55000,65710,96800,102500,102810,105600,110800,113020,113400,115320,200490,202310,204030,204080,204530,205100,207000,208200,208670,209060,209160,211420,211820,212480,213670,214250,218230,219740,219990,220200,221100,223430,223710,224260,225540,225840,227300,228300,228380,228760,229580,230840,231200,231430,232090,233370,233450,233610,233720,234080,235460,235800,236370,238960,239140,239820,239840,240760,241930,242050,242550,242760,242840,244030,244160,244210,244910,245490,247730,248860,249380,250520,250620,251110,251170,251490,251570,251850,252490,255220,256290,256390,257790,258180,260230,261530,261570,261740,262060,263760,265950,266330,267060,269030,269350,269650,271590,272920,273110,274190,274520,275100,275850,278440,281690,281840,281940,282070,282140,284160,285900,286540,286570,287700,287980,288260,289070,290060,290790,290930,292730,293340,293460,293520,293740,293760,294860,296550,296710,298110,298900,300380,301520,301860,303430,303940,304390,304650,304930,305620,306760,307780,310510,311210,312530,313630,314280,315440,317100,318230,319450,321370,321450,321560,322680,325520,326120,327060,327560,327740,327860,327890,328070,329430,330770,331120,331450,332200,334230,334780,335560,337000,339850,340490,341800,341950,343780,344480,346010,346440,346610,348030,352950,356180,357600,358040,359840,360430,361550,362680,365160,365590,368360,373180,373420,374410,375820,375900,378610,379430,380150,381210,383870,384000,384110,384190,387290,388880,391040,391220,392000,395200,396750,396900,399780,399820,400360,402710,402840,405820,405950,408650,408920,414510,415200,416550,417880,418240,419460,420570,424840,426170,427520,431600,431650,432720,433850,436110,437350,439550,442780,444560,444580,446750,449330,457210,457760,457860,460920,461840,462030,463210,474960,480490,481110,485860,489830,497700,498330,501300,505630,507010,512790,513300,513570,524220,530890,537050,567320,580200,582270,612570,660990,433340,414340,441790,506900,350280,386180],"rgOwnedPackages":[418,34,482,20,7877,12762,8312,11183,13533,14870,15740,14361,17250,18029,13503,14559,7970,8386,4821,13743,1845,1062,15756,599,2788,14906,2075,15185,15731,11838,18011,14603,8882,12129,7968,8546,13883,14759,16805,4109,27566,17933,28315,40,636,6497,14997,17948,14367,13379,18369,11072,19223,27546,6516,6749,13452,1472,531,1484,13046,15157,11698,7479,2015,13436,17638,2109,2644,8861,11746,12382,987,25544,27973,11734,14842,7978,17423,1235,1290,461,25926,4776,12225,1679,30200,2208,30191,30192,6183,402,27106,25939,7209,11071,8451,904,26550,27495,30323,12339,25526,17641,27035,32889,18485,12328,216,36144,30701,31060,29006,17880,30352,30170,36483,44417,34369,26358,29976,28999,30960,43996,45063,45074,32887,45658,45585,25882,8314,33374,27237,38506,1259,29616,42634,30888,33977,30939,17038,1505,11112,47182,34149,47066,1214,2030,38928,32861,20944,20945,6822,45159,45071,21112,21065,47235,16631,21042,7944,21158,39544,16986,27276,38853,47987,2355,2658,30306,41229,21293,40847,21430,30750,34200,20671,21387,19074,38595,52998,21492,48830,51336,33201,50323,48754,7490,30891,41485,41464,43316,53602,38036,44220,56067,29360,39531,8562,13895,17516,33817,1493,20857,21250,43355,37194,4160,30043,37191,55568,7416,15142,42858,36422,11687,34774,44751,35502,49587,53296,21199,59107,14729,46804,68160,29727,47245,13754,37993,27238,69126,39303,40957,57082,55943,32263,39667,45469,43616,25839,52512,41626,43922,40470,1488,8173,34879,48074,14795,46786,43386,614,41220,21423,66255,20905,48765,21395,74706,72493,50278,28545,57715,49943,43349,42586,30256,26495,31185,38265,21031,1422,78237,75178,37393,59789,8198,298,68091,21443,32133,42580,78252,40158,39637,40523,52089,12028,29884,40679,84435,68051,75585,57795,21076,34665,76474,4549,56694,40537,66920,51051,1056,1494,29907,18867,35545,34780,61597,56218,74609,35574,42970,17631,44452,72760,82581,60018,81134,91381,91032,20872,59490,64160,21245,62974,71743,58391,38335,39269,56669,1515,33052,42816,65491,75919,29526,47927,55940,94153,35794,62725,94160,20783,94161,70369,21270,51117,93621,93537,31131,39922,28540,95395,67756,549,88108,51069,76039,21259,76757,65013,21408,20923,77600,33076,34759,8560,55793,56461,77649,42991,38001,27835,16092,73534,49661,65172,41226,30371,29890,46469,40685,26901,59341,6148,20947,20729,20932,17888,61576,34329,40817,27263,34807,40772,13568,56358,49122,8716,28816,34170,35704,13646,29855,30542,31565,30377,28955,32308,33113,15003,30792,34134,35746,46180,46824,53158,28931,32061,34822,26183,13989,30999,17172,26266,12456,15055,1465,14840,4819,11611,28596,18265,26375,16699,7706,16640,16767,15919,27322,17607,18769,15136,13616,16586,14909,97595,33677,59012,49741,2047,15979,1942,100703,88321,75916,82563,33064,72664,93613,27812,37103,49673,21409,20786,55353,47144,39996,48123,14290,64995,64820,72610,56926,12152,30948,8049,38214,37402,42474,77425,34795,28021,41068,38559,55062,547,40476,28097,28927,106060,15205,27293,89667,100138,34022,702,37125,64451,72593,14193,30251,39982,38271,48191,38268,51424,54949,64412,89925,34599,25743,16204,50909,76384,89803,1170,6124,67169,29165,29905,45549,59469,1405,50205,98632,42792,82994,39442,37433,35891,34088,26984,14205,30918,103508,11684,15568,31119,35084,41578,109048,102336,87910,20766,65888,30855,35824,51178,43782,46023,39171,79937,84065,53277,61381,56276,21444,54377,14683,48958,33832,35896,26445,45725,28788,95455,96800,107116,63925,75379,80561,41717,8533,114751,33177,64212,35999,54361,21087,50492,111285,49753,80664,76760,82080,52656,18362,119931,105607,34861,59177,102519,21362,12542,17697,63041,33604,31087,27400,26778,13165,28514,43899,45976,50844,29391,34269,78571,54017,33498,18063,76477,20986,127006,130344,133966,50695,43773,88823,79399,50167,102507,86784,29509,82715,58383,44663,273,2702,34251,63907,40284,51421,56792,39499,140321,96590,102996,75922,67694,66026,30765,1769,32765,29048,16892,17322,79659,72683,64541,46905,44607,44739,63618,51418,1386,18047,18050,18051,342,11381,63651,49213,38250,33570,52402,72129,31384,47261,72317,50054,35501,50489,45882,30674,49566,117654,11840,63723,75794,41691,57566,133704,16377,134394,35680,15015,51504,43679,78524,64454,7342,40572,96490,53493,86904,38650,80233,2314,6181,20718,20719,147541,100846,131135,53724,13756,50820,42551,35390,41177,8433,98503,40612,30287,27780,151940,45279,87688,118580,34641,50666,8566,8567,82524,73787,18120,134418,7117,73321,112932,54903,37197,61123,34140,152198,161693,56219,63678,50518,88364,46564,45025,116814,65168,103951,119309,35779,105083,149433,117118,29074,126197,54785,96879,119495,77126,50061,101220,15982,6268,65482,67159,76287,73562,11630,157210,168670,164638,133592,165210,159761,152127,34647,102184,69982,85370,143378,140189,95795,94270,74780,114373,68925,130669,101362,44120,33915,117460,39430,46156,52167,50578,152112,179323,27708,38760,33912,115225,39439,38778,107027,39253,105530,139324,55366,42837,48889,52894,31558,29888,114054,182905,183411,149204,34128,6888,64005,44117,32284,111470,69092,30499,6646,55616,76705,88533,38297,38991,16332,68569,79686,112110,72402,29168,28499,77567,21115,103386,101060,74150,141611,147048,59621,36558,87427,0,190219,41312,131680,194057,76668,32278,151924,143440,18575,107528,53656,62651,126818,68094,4113,8558,90085,43296,976,52490,8559,119722,11376,58985,141524,7377,99158,55985,34933,12100,65033,61326,116031,196877,96084,77742,172509,31128,85099,76124,174698,29760,31047,6637,84755,74493,84005,146690,129415,73454,38495,118674,165909,48282,201157,52757],"rgOwnedApps":[10,20,30,40,50,60,70,80,100,130,220,320,340,360,364,380,400,420,440,459,520,550,564,570,575,620,730,1250,1255,1500,1510,1520,1530,2270,2400,2420,2430,2500,2590,2800,2810,2820,2840,2850,2990,3020,3700,3730,3830,3840,4000,4500,4540,4550,4560,4720,4760,4800,4920,6880,7000,7510,7520,7670,7760,7860,8000,8140,8190,8600,8790,8930,9000,9010,9200,9241,9480,11020,11050,11180,11190,11240,11280,11330,11340,11360,11370,11390,11420,12130,12210,12220,12310,12390,12750,12900,15120,15560,16450,16720,16730,16860,16861,16862,16863,16864,16865,16866,16867,16868,16870,16871,17080,17300,17330,17340,17410,17450,17460,17470,17570,17710,18300,18500,18507,18820,19200,19680,21010,21100,22100,22200,22230,22330,22333,22370,22490,22610,22641,22650,22670,23300,23310,23380,23460,23490,24240,24420,24740,24800,24936,24939,27000,27900,28050,28060,28061,29130,29800,31280,32360,32370,32460,32800,33100,34270,34276,34490,34491,34492,34493,34494,34495,34496,34497,34498,34870,34900,35080,35083,35086,35087,35089,35090,35091,35093,35094,35095,35096,35097,35098,35101,35102,35130,35134,35137,35140,35320,35420,35428,35450,35700,35720,35725,38210,38220,38720,38740,39160,39190,40300,40390,40391,40392,40393,40800,41070,41500,42500,42910,42914,42918,43000,43012,43110,44620,44630,44650,44660,44670,44680,44690,45410,45450,46250,46410,46440,46450,46460,46500,46510,46520,47790,47799,47830,47843,48000,50300,50620,55100,55110,55113,55114,55115,55230,55380,55381,55382,55385,55386,55387,55388,55389,55390,55391,55392,55395,55396,55397,55398,55399,55400,57300,57640,57680,57690,57900,57925,61310,63000,63003,63004,63380,65790,67370,71115,71117,71120,71165,72701,72705,72709,72713,72770,72771,72772,72773,72774,72850,73032,73115,91100,91310,91342,91345,91346,91600,91604,91605,91606,91607,91608,91612,91613,91614,91615,91617,91618,92000,92100,92400,92600,92620,92621,92622,94400,95000,95300,96000,97000,98100,98200,98400,98421,98500,99300,99610,99611,99612,99613,99614,99700,102000,102001,102002,102003,102029,102600,102621,102622,102623,104200,105000,105300,107100,108100,108710,108726,108800,110400,113200,113204,113205,115110,116100,200010,200230,200260,200269,200390,200396,200397,200410,200510,200519,200610,200620,200730,201280,201310,201700,201790,201801,201802,201804,201805,201810,202750,203160,203180,203230,203250,203730,203750,203810,203830,204060,204075,204100,204112,204180,204240,204300,204450,204470,204482,204483,204630,204900,204901,204902,205230,205350,205730,205790,205870,205910,205950,206190,206524,207020,207040,207140,207570,207610,207690,208140,208157,208500,208600,208610,208750,208790,208791,208792,208793,208795,208796,208797,208798,208799,208800,208806,208807,208808,208809,208810,208811,208812,208813,208814,208817,208818,209190,209230,209771,209772,209790,209819,210150,210170,210450,210770,210934,210936,210942,210943,210950,210970,211050,211160,211280,211400,212050,212780,213311,213312,214150,214190,214340,214360,214420,214490,214550,214970,215530,215550,215630,216110,217100,217690,217920,218510,218620,218640,219150,219640,219680,219890,219910,220160,220440,220460,220740,220780,220820,220860,220900,221260,221640,221910,222730,222880,222890,223220,223530,224220,224960,225080,225300,225320,225360,225420,227080,227220,227280,227480,228200,228221,228400,229330,229810,229870,230190,230820,230886,231020,231040,231160,231330,232430,232644,232750,233130,233230,233250,233290,233432,233550,233740,234140,234190,234510,234570,234630,234650,234940,235210,235250,235720,235820,236150,237110,237350,238320,238430,238460,238910,239200,239430,241240,241320,241430,241910,242780,242880,243120,243200,243450,244630,244690,244710,244730,244870,245150,245170,245280,246420,246620,246700,246900,247020,247950,248190,248470,248490,248530,248550,248570,248610,248710,248730,248820,248970,249050,249230,249650,249680,249700,249990,250030,250400,250580,251130,251310,251630,251730,251910,252330,252550,252570,252750,252850,252890,252950,253030,253290,253610,253690,253900,253960,253980,254260,254420,254421,254422,254423,254440,255280,255300,255320,255520,256190,257120,257510,257750,257850,257890,258050,258520,258543,258751,258890,258950,259470,259550,259600,259830,261110,261160,261161,261180,261680,261760,262260,262280,262390,262410,262690,262940,263020,263280,263320,263360,263420,263560,263740,264080,264120,264200,264240,264520,264730,265210,265300,265330,265380,265690,265790,265830,265930,266010,266110,266370,266490,267381,267580,267660,267960,268081,268320,268540,269050,269210,269490,269710,269810,270010,270450,270490,270550,270850,271240,271570,271750,271840,272040,272350,273840,274290,274500,274880,274900,274920,275470,275530,275670,278360,278570,279110,279111,279112,279260,279440,279540,279560,279580,279720,279920,280740,280830,280910,281280,281410,281990,282440,282760,283180,284240,284460,284930,284990,285010,285330,285500,285580,285840,286040,287100,287340,287390,288160,288650,289280,289320,289600,289730,289731,289733,289734,289760,290280,290320,290770,291070,291270,291480,291550,291610,291650,292410,292570,292600,292620,293180,293320,293940,294230,295250,295530,295690,295730,295790,296050,296470,296630,296770,296910,297350,297490,298140,298260,298480,298520,298810,299170,299460,300060,300580,301190,301200,301480,301910,302130,302510,302710,303210,303390,303470,304240,304430,305050,305380,306410,307010,307550,307580,307880,308420,308580,310070,310560,311250,311340,311480,311730,311820,312960,312990,313070,313080,313250,314710,315060,315260,315430,315600,316010,316670,317360,317400,317440,317710,318220,318940,319480,319550,319630,319910,320140,320540,320820,320840,321040,321150,321480,321620,321920,322022,322190,322500,322970,323060,323320,323580,323720,324060,324070,324750,324760,324770,324810,325060,325090,325462,326190,326410,327090,327270,327410,328600,328820,328821,329370,329770,329830,330450,330830,331710,332500,332580,333650,333930,334070,334770,335240,335300,336030,337040,337960,338140,338320,338550,339400,339790,340280,342300,342580,343710,343740,344510,345130,345220,345390,345520,345700,346180,346560,346950,347430,347440,350470,351030,351510,351740,352520,354850,355590,355740,355760,356570,358270,358380,358470,358640,359060,359350,359800,359960,360520,360640,360650,360940,361700,361710,361720,361730,361740,361750,361760,361770,361780,362180,362190,362200,362210,362220,362230,362240,362250,362260,362270,362280,362410,362890,363940,363970,365300,365770,365940,367580,368010,368230,368370,368730,368870,368900,369180,370360,371330,371400,371500,371510,372900,373550,373551,373990,374353,374354,374460,374570,377120,377160,378490,379720,381120,382490,383790,384250,384310,384570,385200,385270,385490,385560,385720,385760,385770,387985,387986,387987,388050,388420,389190,389590,389591,390040,390340,390570,390910,391270,391540,391720,392020,393650,394760,395150,395160,395170,395860,395980,396030,396530,396790,396800,397060,397340,397620,398850,399670,400110,400250,400370,400430,400630,402330,402570,404700,405500,405530,406150,406220,406940,407840,408120,408370,408600,409710,410590,411560,412880,412940,413160,413850,413851,413852,413853,413854,413855,413856,413857,413858,413859,416270,416610,416770,417860,418610,419500,420000,422970,425580,426290,427270,427780,428420,429180,431270,431560,432020,432150,432470,432950,437570,441650,441870,443080,443810,446870,447850,447880,448510,449760,450050,450130,450590,450670,452640,455400,455470,456470,456480,458250,458260,458270,458280,458300,458310,458320,459910,461070,461910,462270,462370,462780,463150,465520,465930,466500,469010,469820,470260,473090,473530,475150,478330,479170,481380,481830,484910,484920,489520,491130,491390,491830,492690,493280,493530,495460,495470,496300,497810,497811,497812,497813,498320,498660,499520,501690,502490,503110,503590,505430,506590,507490,508740,509430,510590,510850,511310,512300,513550,516700,520720,526790,528300,531810,532000,533240,533860,537324,537560,538590,554350,559500,561522,561530,561531,561552,562800,564310,564323,567090,567290,573230,573920,575630,576740,577401,581700,583190,585280,585281,585282,585283,587650,588430,600420,606730,612560,618310,624820,633130,635640,635880,645970],"rgPackagesInCart":[],"rgAppsInCart":[],"rgRecommendedTags":[{"tagid":3835,"name":"Post-apokalyptick\u00e9"},{"tagid":1695,"name":"S otev\u0159en\u00fdm sv\u011btem"},{"tagid":4182,"name":"Pro jednoho hr\u00e1\u010de"},{"tagid":3834,"name":"S pr\u016fzkumem prost\u0159ed\u00ed"},{"tagid":19,"name":"Ak\u010dn\u00ed"},{"tagid":1774,"name":"St\u0159\u00edle\u010dky"},{"tagid":1663,"name":"FPS"},{"tagid":122,"name":"RPG"},{"tagid":492,"name":"Nez\u00e1visl\u00e9"},{"tagid":21,"name":"Dobrodru\u017en\u00e9"},{"tagid":4166,"name":"Atmosferick\u00e9"},{"tagid":3839,"name":"Z pohledu prvn\u00ed osoby"},{"tagid":597,"name":"Nen\u00e1ro\u010dn\u00e9"},{"tagid":1742,"name":"S bohat\u00fdm p\u0159\u00edb\u011bhem"},{"tagid":3859,"name":"Pro v\u00edce hr\u00e1\u010d\u016f"},{"tagid":3942,"name":"Sci-fi"},{"tagid":1756,"name":"S v\u00fdborn\u00fdm soundtrackem"},{"tagid":4231,"name":"Ak\u010dn\u00ed RPG"},{"tagid":1697,"name":"Z pohledu t\u0159et\u00ed osoby"},{"tagid":3810,"name":"Sandboxov\u00e9"}],"rgIgnoredApps":[],"rgIgnoredPackages":[]} </code></pre> <p>I would like to access this page, but if I try to access it via PHP, it's empty (no valuable information). </p> <p>Result without being logged in:</p> <pre><code>{"rgWishlist":[],"rgOwnedPackages":[],"rgOwnedApps":[],"rgPackagesInCart":[],"rgAppsInCart":[],"rgRecommendedTags":[{"tagid":492,"name":"Nez\u00e1visl\u00e9"},{"tagid":19,"name":"Ak\u010dn\u00ed"},{"tagid":21,"name":"Dobrodru\u017en\u00e9"},{"tagid":597,"name":"Nen\u00e1ro\u010dn\u00e9"},{"tagid":9,"name":"Strategick\u00e9"},{"tagid":599,"name":"Simulace"},{"tagid":122,"name":"RPG"},{"tagid":113,"name":"Free to play"},{"tagid":4182,"name":"Pro jednoho hr\u00e1\u010de"},{"tagid":128,"name":"Masivn\u011b multiplayerov\u00e9"}],"rgIgnoredApps":[],"rgIgnoredPackages":[]} </code></pre> <p>I read that it may be possible with cURL, but I didn't find a way to do it.</p> <p>My plan so far is to create a link on my website. If user clicks, he is shown content of the Steam page and he has to copy all of it to a form and send it. It works, but it is complicated for the user.</p> <p>Is there any trick to do it? Or is it considered unsafe and "hacking"?</p> <p>I tried to use <em>file_get_contents()</em> and also this:</p> <pre><code>$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://store.steampowered.com/dynamicstore/userdata/?id=STEAMID"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); </code></pre> </div>

数据库中的标签系统实现

<div class="post-text" itemprop="text"> <p>Current Structure</p> <p><strong>table [Tags]</strong></p> <pre><code>TagID TagName </code></pre> <p><strong>table [Stores]</strong></p> <pre><code>StoreID StoreName StoreCategory StoreTagID </code></pre> <p>this will only make the store have one tag , how can I implement it to allow more than one tag I made tags group but not working also parsing but its usless like tagid:tagname,tagid:tagname...... for the same row but not efficient. </p> </div>

oracle 存储过程 返回复合数据类型(index by表) ibatis如何接受

最近有个问题一直困扰着,希望各位能给予帮助。 先贴代码: 1 <parameterMap class="map" id="UserIndexParam"> 2 <parameter property="PRM_USERID" javaType="java.lang.Object" 3 jdbcType="Object" mode="IN" /> 4 <parameter property="PRM_OBJECTS" javaType="java.sql.ResultSet" 5 jdbcType="ARRAY" mode="OUT" typeHandler="com.diy.object.entity.ObjectTypeHandler" /> 6 <parameter property="PRM_TAGS" javaType="java.sql.ResultSet" 7 jdbcType="ARRAY" mode="OUT" typeHandler="com.diy.tag.entity.TagsTypeHandler" /> 8 <parameter property="PRM_APPCODE" javaType="java.lang.String" 9 jdbcType="VARCHAR" mode="OUT" /> 10 <parameter property="PRM_ERRMSG" javaType="java.lang.String" 11 jdbcType="VARCHAR" mode="OUT" /> 12 </parameterMap> 13 14 <procedure id="prc_user_index" parameterMap="UserIndexParam"> 15 {call 16 PKG_USER.PRC_USER_INDEXVIEW(?,?,?,?,?)} 17 </procedure> 这个ibatis的配置文件. 在网上查了很久,说是用typeHandler和jdbcType来解决解决oracle复合类型, 1 package com.diy.tag.entity; 2 3 import java.sql.CallableStatement; 4 import java.sql.PreparedStatement; 5 import java.sql.ResultSet; 6 import java.sql.SQLException; 7 import java.util.ArrayList; 8 import java.util.List; 9 10 import oracle.sql.Datum; 11 import oracle.sql.STRUCT; 12 13 import com.ibatis.sqlmap.engine.type.TypeHandler; 14 15 public class TagsTypeHandler implements TypeHandler { 16 17 /** 18 * @Description: 这个方法重点 19 * @param cs 20 * @param arg1 21 * @throws SQLException 22 */ 23 public java.lang.Object getResult(CallableStatement cs, int arg1) 24 throws SQLException { 25 List<Tag> list = new ArrayList<Tag>(); 26 ResultSet rs = cs.getArray(arg1).getResultSet(); 27 while (rs.next()) { 28 Datum[] data = ((STRUCT)rs.getObject(2)).getOracleAttributes(); 29 Tag tag = new Tag(); 30 if (data[0] != null) { 31 tag.setTagid(new Long(data[0].getBytes().toString())); 32 } 33 list.add(tag); 34 } 35 return list; 36 } 37 38 @Override 39 public boolean equals(java.lang.Object arg0, String arg1) { 40 // TODO Auto-generated method stub 41 return false; 42 } 43 44 @Override 45 public java.lang.Object getResult(ResultSet arg0, String arg1) 46 throws SQLException { 47 // TODO Auto-generated method stub 48 return null; 49 } 50 51 @Override 52 public java.lang.Object getResult(ResultSet arg0, int arg1) 53 throws SQLException { 54 // TODO Auto-generated method stub 55 return null; 56 } 57 58 59 60 @Override 61 public void setParameter(PreparedStatement arg0, int arg1, 62 java.lang.Object arg2, String arg3) throws SQLException { 63 // TODO Auto-generated method stub 64 65 } 66 67 @Override 68 public java.lang.Object valueOf(String arg0) { 69 // TODO Auto-generated method stub 70 return null; 71 } 72 73 } 这个是java代码,其中一个handler处理类 1 --定义 object表 对象 2 TYPE object_arr IS TABLE OF OBJECT%ROWTYPE INDEX BY BINARY_INTEGER; 3 4 --定义 tag index_by表 5 TYPE table_tag IS TABLE OF TAGS_INFO INDEX BY BINARY_INTEGER; 这个定义的oracle复合类型 1 PROCEDURE PRC_USER_INDEXVIEW(PRM_USERID IN VARCHAR2, 2 PRM_OBJECTS OUT PKG_COMM.OBJECT_ARR, 3 PRM_TAGS OUT PKG_COMM.table_tag, 4 PRM_APPCODE OUT VARCHAR2, 5 PRM_ERRMSG OUT VARCHAR2) IS 6 N_FLAG NUMBER; 7 VAR_FIRSTTAG VARCHAR2(100); 8 VAR_DUSERID VARCHAR2(100); 9 --用户兴趣标签 10 CURSOR CUR_USERTAG IS 11 SELECT C.TAGID, C.NAME 12 FROM USERSDETIAL A, TAGRELATION B, TAG C 13 WHERE A.DUSERSID = B.DUSERSID 14 AND B.TAGID = C.TAGID 15 AND A.DUSERSID = VAR_DUSERID; 16 --公共兴趣标签 17 CURSOR CUR_USERPUB IS 18 SELECT T.* 19 FROM (SELECT ROWNUM AS RNUM, 20 COUNT(A.DUSERSID) AS CNUM, 21 B.TAGID, 22 B.NAME 23 FROM TAGRELATION A, TAG B 24 WHERE A.TAGID = B.TAGID 25 GROUP BY A.TAGID) T 26 WHERE RNUM <= 8 27 ORDER BY T.CNUM DESC; 28 --object 29 CURSOR CUR_OBJ(VAR_TAGID VARCHAR2) IS 30 SELECT ROWNUM AS RN, A.* 31 FROM OBJECT A 32 WHERE trim(A.TAGID) = VAR_TAGID 33 AND ROWNUM < 30; 34 35 REC_USERTAG CUR_USERTAG%ROWTYPE; 36 REC_USERPUB CUR_USERPUB%ROWTYPE; 37 REC_OBJ OBJECT%ROWTYPE; 38 BEGIN 39 PRM_APPCODE := PKG_COMM.DEF_OK; 40 PRM_ERRMSG := ''; 41 42 IF PRM_USERID IS NULL THEN 43 PRM_APPCODE := PKG_COMM.DEF_ERR; 44 PRM_ERRMSG := '参数未定义'; 45 RETURN; 46 END IF; 47 --用户详细ID是否存在 48 SELECT B.DUSERSID 49 INTO VAR_DUSERID 50 FROM USERS A, USERSDETIAL B 51 WHERE A.USERID = B.USERSID 52 AND A.USERID = PRM_USERID; 53 IF VAR_DUSERID IS NULL THEN 54 PRM_APPCODE := PKG_COMM.DEF_ERR; 55 PRM_ERRMSG := '参数无效'; 56 RETURN; 57 END IF; 58 --1.判断是否为有效用户 59 SELECT NVL(A.FLAG, 1) 60 INTO N_FLAG 61 FROM USERS A, USERSDETIAL B 62 WHERE A.Userid = B.USERSID 63 AND B.DUSERSID = VAR_DUSERID; 64 65 IF N_FLAG = 1 THEN 66 PRM_APPCODE := PKG_COMM.DEF_ERR; 67 PRM_ERRMSG := '用户已被禁止登录'; 68 RETURN; 69 END IF; 70 71 --2.判断用户是否有兴趣tag 72 73 FOR REC_USERTAG IN CUR_USERTAG LOOP 74 75 IF CUR_USERTAG%ROWCOUNT = 0 THEN 76 --获取公共兴趣游标 77 FOR REC_USERPUB IN CUR_USERPUB LOOP 78 IF CUR_USERPUB%ROWCOUNT = 1 THEN 79 VAR_FIRSTTAG := REC_USERPUB.TAGID; 80 END IF; 81 PRM_TAGS(CUR_USERPUB%ROWCOUNT).TAGID := REC_USERPUB.TAGID; 82 PRM_TAGS(CUR_USERPUB%ROWCOUNT).TAGNAME := REC_USERPUB.NAME; 83 END LOOP; 84 ELSIF CUR_USERTAG%ROWCOUNT = 1 THEN 85 VAR_FIRSTTAG := REC_USERTAG.TAGID; 86 END IF; 87 PRM_TAGS(CUR_USERTAG%ROWCOUNT).TAGID := REC_USERTAG.TAGID; 88 PRM_TAGS(CUR_USERTAG%ROWCOUNT).TAGNAME := REC_USERTAG.NAME; 89 END LOOP; 90 91 IF PRM_TAGS.count <> 0 THEN 92 --3. 取出object 93 FOR REC_OBJ IN CUR_OBJ(VAR_FIRSTTAG) LOOP 94 PRM_OBJECTS(CUR_OBJ%ROWCOUNT).OWNERID := REC_OBJ.OWNERID; 95 PRM_OBJECTS(CUR_OBJ%ROWCOUNT).OBJECTID := REC_OBJ.OBJECTID; 96 PRM_OBJECTS(CUR_OBJ%ROWCOUNT).DBUSID := REC_OBJ.DBUSID; 97 PRM_OBJECTS(CUR_OBJ%ROWCOUNT).DUSERSID := REC_OBJ.DUSERSID; 98 PRM_OBJECTS(CUR_OBJ%ROWCOUNT).TAGID := REC_OBJ.TAGID; 99 PRM_OBJECTS(CUR_OBJ%ROWCOUNT).LOVENUM := REC_OBJ.LOVENUM; 100 PRM_OBJECTS(CUR_OBJ%ROWCOUNT).INRUDUCTION := REC_OBJ.INRUDUCTION; 101 PRM_OBJECTS(CUR_OBJ%ROWCOUNT).CATAGROY := REC_OBJ.CATAGROY; 102 PRM_OBJECTS(CUR_OBJ%ROWCOUNT).Imagepath := REC_OBJ.Imagepath; 103 104 END LOOP; 105 END IF; 106 107 EXCEPTION 108 WHEN OTHERS THEN 109 PRM_APPCODE := PKG_COMM.DEF_ERR; 110 PRM_ERRMSG := '获取主界面数据失败' || '错误原因:' || PRM_ERRMSG || '-' || SQLERRM || 111 '错误行数:' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE(); 112 END; 这个是存储过程的实现,过程没有问题,plsql调试正常!!! 现在我可以确定问题在 1.ibatis xml文件中jdbcType 和typeHandler的配置问题 1 <parameter property="PRM_OBJECTS" javaType="java.sql.ResultSet" 2 5 jdbcType="ARRAY" mode="OUT" typeHandler="com.diy.object.entity.ObjectTypeHandler" /> 3 6 <parameter property="PRM_TAGS" javaType="java.sql.ResultSet" 4 7 jdbcType="ARRAY" mode="OUT" typeHandler="com.diy.tag.entity.TagsTypeHandler" /> 2.java typeHandler类的返回值 还有一个附带的问题:index by 表不能在数据库中存储,而嵌套表可以存储在数据库中。是不是说index by 表 像java 方法中声明的变量,方法结束,其变量的生命周期就结束了??? 谢谢!!!

请问大神,Echarts如何点击div改变图的大小?

我想做到点击后放大,再点击缩小,请问该怎么做? 附上jsp ``` <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/views/include/taglib.jsp"%> <html> <head> <title>温度管理</title> </head> <div id="d" style="width: 150px; height: 68px;" ></div> <body> <script type="text/javascript" src="/jeesite/static/js/echarts/echarts.js"></script> <script type="text/javascript" src="/jeesite/static/jquery/jquery-1.8.3.js"></script> <script type="text/javascript"> var myChart = echarts.init(document.getElementById('d')) option = { title : { text : '实时温度', textStyle : { fontSize : 20, color : [ '#3398DB' ], } }, //颜色渐变 visualMap : { min : 0, max : 80, left : 'left', top : 'bottom', text : [ '高', '低' ], // 文本,默认为数值文本 calculable : true, inRange : { color : [ '#00FF00', '#32CD32', '#2E8B57', '#FF0000', '#B22222', '#8B0000' ] } }, color : [ '#3398DB' ], tooltip : { trigger : 'axis', axisPointer : { // 坐标轴指示器,坐标轴触发有效 type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' }, feature : { mark : { show : true }, dataView : { show : true, readOnly : false }, restore : { show : true }, savaAsImage : { shwo : true } } }, grid : { left : '3%', right : '4%', bottom : '3%', containLabel : true }, grid : { y2 : 140 }, xAxis : [ { type : 'category', data : [], axisTick : { alignWithLabel : true }, axisLabel : { interval : 0, rotate : -30, } }, { type : 'category', data : [], axisTick : { alignWithLabel : true }, axisLabel : { interval : 0, rotate : -30, } } ], legend : { data : [ '当前温度' ] }, yAxis : [ { type : 'value' } ], series : [ { name : "", type : 'bar', barWidth : '60%', //顶部显示温度'top' label : { normal : { show : true, position : 'top' } }, data : [] } ] }; var tagId = []; var temperature = [];//温度信息 var addTime = [];//读取时间 var remarks = [];//备注信息 $.ajax({ type : "post", async : true, //异步请求:同步请求将会锁住浏览器,用户其他操作必须等待请求完成才可以执行 url : "${ctx}/temperature/tblTem/allTem", data : { }, dataType : "json", success : function(result) { //请求成功时执行该函数内容,result即为服务器返回的json对象 // alert('实时温度系统'); for (var i = 0; i < result.length; i++) { temperature.push(result[i].temperature); addTime.push(result[i].addTime); remarks.push(result[i].remarks); tagId.push(result[i].tagId); } myChart.setOption({ xAxis : [ { data : addTime }, { type : "category", data : remarks } ], series : [ { type : 'bar', data : temperature, //画直线 markLine : { data : [ { name : '起始', xAxis : 0, yAxis : 55 }, { name : '结束', value : 40, xAxis : 0, yAxis : 40 } ], } } ] }) } }); myChart.setOption(option); //打印数据 console.warn(remarks, addTime, temperature); </script> <script language="JavaScript"> function myrefresh() { window.location.reload(); } setTimeout('myrefresh()', 60000); //指定1分钟刷新一次 </script> </body> </html> ```

PHP-MySQL标记

<div class="post-text" itemprop="text"> <p>I have a comics website which currently allows users to choose which comics they view by category: Charts, Office, Life, Misc, etc.</p> <p>I'd like to implement a tagging system, similar to what we have here on StackOverflow, which will describe more of the content of each comic rather than its category. Ex: In Charts category, I have several business related...</p> <p>My simple solution would be to handle it just how I've handled my categorization- </p> <ol> <li>Create a "Tags" table with tagid, tagname, tagdescription</li> <li>Add a tagid_ForeignKey field in comics table, and add a tag to each post.</li> <li>When a user clicks on a tag, it will show only those posts with that tag... or if there is also a category specified, it will show that specific category with that specific tag.</li> </ol> <hr> <p>This approach, however, seems to limit me to one tag per category. What if I have a comic that is business and relationships related... so It'd need both of those tags.</p> <p>How would I be able to attach multiple tags per comic?</p> <hr> <p><strong>EDIT:</strong> </p> <p>A few more questions: </p> <p>1) What do I insert into my new relational table... anything?</p> <p>2) Also, for <code>while ($row = $tag-&gt;fetch_assoc()) {</code>, how can I loop through a table if there is a join? Isn't that an associative array?</p> <p>3) The issue is that I am echoing out the tag choices as such, so once a user clicks on a link, how would you be able to allow them to then click on another link to assign a 2nd tag?</p> <p><img src="https://i.stack.imgur.com/4ZTra.png" alt="enter image description here"></p> <pre><code>function getTags() { include 'dbconnect.php'; global $site; $tag = $mysqli-&gt;query("SELECT tagid, tagname FROM tags"); //$tag = $mysqli-&gt;query("SELECT * FROM comics c INNER JOIN comictags ct ON (c.comicID = ct.comicID) WHERE ct.tag_id IN (1, 2, 3) GROUP BY c.comic_id"); mysqli_close($mysqli); while ($row = $tag-&gt;fetch_assoc()) { echo "&lt;a href='?action=homepage&amp;site=" . $site . "&amp;tag=" . $row['tagid'] . "&amp;tagname=" . $row['tagname'] . "'/&gt;" . $row['tagname'] . "&lt;/a&gt;&lt;br /&gt;"; } } </code></pre> </div>

如何获取产品标签ID [关闭]

<div class="post-text" itemprop="text"> <p>I want to get 8 product using by tag how to get current product tag id.</p> <pre><code> $tagId = 1; // I want to get id on view.html $collection = Mage::getResourceModel('tag/product_collection') -&gt;addAttributeToSelect('sku') -&gt;addAttributeToSelect('name') -&gt;addTagFilter($tagId); print_r($collection-&gt;getData()); </code></pre> </div>

nginx启动问题 提示伪静态错误

大家帮忙看看 2017/08/10 13:27:01 [emerg] 4065#0: unknown directive "<IfModule" in /www/gaorenhui/.htaccess:5 伪静态是否有什么问题 <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^(.*)newtag-(\d+)/$ $1/Home/Index/zzsList/tagid/$2 RewriteRule ^(.*)newtag-(\d+)/page-(\d+)/$ $1/Home/Index/zzsList/tagid/$2/p/$3 RewriteRule ^(.*)404.html$ $1/Home/Index/error404

如何编写此SQL语句以获取广告和发布? (PHP / MySQL的)

<div class="post-text" itemprop="text"> <p>I am a little confused on the logic of how to write this SQL statement. When a user clicks on a tag, say HTML, it would display all the posts with HTML as its tag. (a post can have multiple tags)</p> <p><strong>I have three tables:</strong></p> <ol> <li>Posting--&gt;posting_id, title, detail, etc</li> <li>tags--&gt;tagID, tagname</li> <li>postingtag--&gt;posting_id, tagID</li> </ol> <p>I want to display all the title of the post and the date added. </p> <pre><code> global $dbc; $tagID=$_GET['tagID']; //the GET is set by URL //part I need help with. I need another WHERE statment to get to the posting table $query = "SELECT p.title,p.date_added, t.tagname FROM posting as p, postingtag as pt, tags as t WHERE t.tagID=$tagID"; $data = mysqli_query($dbc, $query); echo '&lt;table&gt;'; echo '&lt;tr&gt;&lt;td&gt;&lt;b&gt;Title&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Date Posted&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;'; while ($row = mysqli_fetch_array($data)) { echo '&lt;tr&gt;&lt;td&gt;'.$row['title'].'&lt;/td&gt;'; echo '&lt;td&gt;'.$row['date_added'].'&lt;/td&gt;&lt;/tr&gt;'; } echo '&lt;/table&gt;'; } </code></pre> <p>I am fairly new to mySQL so still trying to figure out the logic of it all :)</p> </div>

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

将一个接口响应时间从2s优化到 200ms以内的一个案例

一、背景 在开发联调阶段发现一个接口的响应时间特别长,经常超时,囧… 本文讲讲是如何定位到性能瓶颈以及修改的思路,将该接口从 2 s 左右优化到 200ms 以内 。 二、步骤 2.1 定位 定位性能瓶颈有两个思路,一个是通过工具去监控,一个是通过经验去猜想。 2.1.1 工具监控 就工具而言,推荐使用 arthas ,用到的是 trace 命令 具体安装步骤很简单,大家自行研究。 我的使用步骤是...

学历低,无法胜任工作,大佬告诉你应该怎么做

微信上收到一位读者小涛的留言,大致的意思是自己只有高中学历,经过培训后找到了一份工作,但很难胜任,考虑要不要辞职找一份他能力可以胜任的实习工作。下面是他留言的一部分内容: 二哥,我是 2016 年高中毕业的,考上了大学但没去成,主要是因为当时家里经济条件不太允许。 打工了三年后想学一门技术,就去培训了。培训的学校比较垃圾,现在非常后悔没去正规一点的机构培训。 去年 11 月份来北京找到了一份工...

JVM内存结构和Java内存模型别再傻傻分不清了

JVM内存结构和Java内存模型都是面试的热点问题,名字看感觉都差不多,网上有些博客也都把这两个概念混着用,实际上他们之间差别还是挺大的。 通俗点说,JVM内存结构是与JVM的内部存储结构相关,而Java内存模型是与多线程编程相关,本文针对这两个总是被混用的概念展开讲解。 JVM内存结构 JVM构成 说到JVM内存结构,就不会只是说内存结构的5个分区,而是会延展到整个JVM相关的问题,所以先了解下

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Google 与微软的浏览器之争

浏览器再现“神仙打架”。整理 | 屠敏头图 | CSDN 下载自东方 IC出品 | CSDN(ID:CSDNnews)从 IE 到 Chrome,再从 Chrome 到 Edge,微软与...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

立即提问
相关内容推荐