PBS 集群 同一个作业编号 能否使两个节点同时处理不同的 shell 命令 10C

假设我有 1000 条 shell 命令,之间各不相同、互不干扰。
能否将其分成两份,各 500 条,通过 qsub 一次性申请 2 个节点,各跑一份。


Csdn user default icon
MPI_Init: Can't read plugin directory

在集群上传MPI程序任务报错,但在ssh界面上运行正常。 报错: wemcsim_mpi: MPI_Init: Can't read plugin directory /public/software/mpi/openmpi1.4.1gnu/lib/linux_amd64/plugins wemcsim_mpi: MPI_Init: No plugins will be available wemcsim_mpi: MPI_Init: Can't read plugin directory 提交任务: #PBS -N csg01 #PBS -q high #PBS -o ./example_2D.output #PBS -e ./example_2D.err #PBS -l nodes=1:ppn=4 /public/software/mpi/openmpi1.4.1gnu/bin/mpirun -np 4 -hostfile $PBS_NODEFILE xx/wemcsim_mpi 执行文件 xx/example_2D.lua 输入文档 ``` ```


我所用的曙光平台GLIBCXX版本比较低,而我没有权限安装高版本的(管理员也不允许安装高版本的),请问我通过PBS脚本能不能指定新版本的路径,该如何编写指定新版本路径的PBS脚本?(附录:./P: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./P))


<div class="post-text" itemprop="text"> <p>How can I get the total rows for pagination within the least amount of processing time?</p> <p>My select SQL in products list is too complex for showing the total pages in pagination. I have to query the SQL with no limit parameter which takes too much time to process. Is there a better way to get the total records?</p> <p>This is my SQL:</p> <pre><code>SELECT DISTINCT p.products_model, p.products_image, pd.products_name, p.products_quantity, p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, products_price_market, p.products_tax_class_id, pd.products_description, IF (pbs.products_id, 1, 0) pdsid, IF ( s. STATUS = 1, s.specials_new_products_price, NULL ) AS specials_new_products_price, IF ( s. STATUS = 1, s.specials_new_products_price, p.products_price ) AS final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status, p.products_recommend, p.products_in_stock FROM jy_products_description pd, jy_products p LEFT JOIN jy_products_best_selling pbs ON p.products_id = pbs.products_id AND pbs.category_id = 77, jy_products_to_categories p2c LEFT JOIN jy_specials s ON p2c.products_id = s.products_id AND s. STATUS = 1, jy_products_attributes pa0 WHERE p.products_status = 1 AND p.products_quantity &gt; 0 AND p.products_id = p2c.products_id AND pd.products_id = p2c.products_id AND p.products_id = pa0.products_id AND pd.language_id = 1 AND p2c.categories_id = 77 ORDER BY pdsid DESC, pbs.sort_by ASC, p.products_ordered </code></pre> <p><img src="https://i.stack.imgur.com/xi3Mg.jpg" alt="enter image description here"></p> </div>


#ifndef A_H_ #define A_H_ class Stonewt { private: enum { Lbs_per_stn = 14 }; enum Mode { Stone, IntPounds, FloatPounds }; Mode m_mode; int mm_stone; double m_left_pbs; double m_pounds; public: Stonewt(); Stonewt(double weight, Mode mode); ~Stonewt(); friend Stonewt operator +(Stonewt& temp1, Stonewt& temp2); friend ostream& operator <<(ostream& os, Stonewt& temp); }; #endif //以上为头文件 #include<iostream> #include"标头.h" using namespace std; Stonewt::Stonewt() { mm_stone = 0; m_left_pbs = 0; m_pounds = 0; } Stonewt::Stonewt(double weight, Mode mode) { m_mode = mode; if (m_mode == Stone) { mm_stone = weight; m_left_pbs = 0; m_pounds = weight*Lbs_per_stn; } else if (m_mode == IntPounds) { mm_stone = (int)weight / Lbs_per_stn; m_left_pbs = (int)weight%Lbs_per_stn; m_pounds = (int)weight*Lbs_per_stn; } else if (m_mode == FloatPounds) { mm_stone = weight / Lbs_per_stn; m_left_pbs = (int)weight%Lbs_per_stn + weight - int(weight); m_pounds = weight*Lbs_per_stn; } else { cout << "模式错误\n"; mm_stone = 0; m_left_pbs = 0; m_pounds = 0; } } Stonewt::~Stonewt() { } Stonewt operator +(Stonewt& temp1, Stonewt& temp2) { Stonewt temp; temp.mm_stone = temp1.mm_stone + temp2.mm_stone; return temp; } ostream& operator<<(ostream& os, Stonewt& temp) { os << "英石:" << temp.mm_stone << " 磅:" << temp.m_left_pbs << endl << "总英石:" << temp.m_pounds << endl; return os; } //以上为类实现文件 在最后一个operator函数中无法访问 temp.mm_stone;temp.m_left_pbs; temp.m_pounds 。但是把类的定义和类方法写在同一个文件上却不抱错不知道为什么,我用的VA2015![图片说明](https://img-ask.csdn.net/upload/201710/01/1506833609_421846.png)


<div class="post-text" itemprop="text"> <p>I have an android application that is sending 1 or more zip files to the server. I'd like to send some additional form data along with the files, because the form data will be used to determine the disposition of the files.</p> <p>I've been able to upload the files using multi-part as a content-type, but I can't seem to get the php on the server side to see both form data and the files.</p> <p>What I'd like to know is how to send form data and a list of files to the server using HTTPUrlConnection on the android side and PHP on the server side.</p> <p>I believe my problem is related to Content-Type and Content-Disposition. I'd really appreciate it if someone could point me at a definitive example, or explain what I'm doing wrong.</p> <p>Thanks for taking the time to look at this problem.'</p> <p>Here's the latest, revised android code:</p> <pre><code>String postDriverUpload(File[] fileList) { HttpURLConnection connection = null; DataOutputStream outputStream = null; String tag = TAG + "postDriverInfo()"; URL url = null; String result = OK_TO_CONTINUE; String targetUrl = server + "/upload.php"; try { url = new URL(targetUrl); } catch (MalformedURLException e) { result = "ERROR: [" + targetUrl + "] can't be parsed into a URL."; Log.e(tag, result, e); return result; } try { connection = (HttpURLConnection) url.openConnection(); } catch (IOException e) { result = "ERROR: IOException."; Log.e(tag, result, e); return result; } // Allow Inputs and Outputs connection.setDoInput(true); connection.setDoOutput(true); connection.setUseCaches(false); // Enable POST method try { connection.setRequestMethod("POST"); } catch (ProtocolException e) { result = "Error: Protocol Exception."; Log.e(tag, result, e); return result; } connection.setRequestProperty("Connection", "Keep-Alive"); connection.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + BOUNDARY); // Encode driver userName List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(); try { nameValuePairs.add(new BasicNameValuePair("userName", driver .getUserName())); Log.d(tag, "Encoded userName='driver' is: " + encodeData(nameValuePairs)); // Create output Stream to send data to server outputStream = new DataOutputStream(connection.getOutputStream()); writeBoundary(outputStream); outputStream .writeBytes("Content-Disposition: form-data; name=\"userName\" " + EOL + EOL); outputStream.writeBytes(driver.getUserName() + EOL); writeBoundary(outputStream); // Starting the Files part outputStream .writeBytes("Content-Disposition: form-data; name=\"files\" " + EOL + EOL); outputStream.writeBytes("Content-Type: multipart/mixed; boundary=" + FILE_BOUNDARY + EOL); // Adding the file parts for (File file : fileList) { writeFileBoundary(outputStream); // write out file String contentType = String.format( "Content-Disposition:file; filename=\"%s\"" + EOL + "Content-Type: application/x-zip-compressed", file.getName()) + EOL + EOL; Log.d(tag, "Content-Type = " + contentType); outputStream.write(contentType.getBytes()); } writeFileBoundary(outputStream); writeBoundary(outputStream); outputStream.flush(); outputStream.close(); } catch (UnsupportedEncodingException e) { result = "Error: UnsupportedEncodingException "; Log.e(tag, result, e); return result; } catch (IOException e) { result = "Error: IOException "; Log.e(tag, result, e); return result; } // Get Response from server (code and message) try { int serverResponseCode = connection.getResponseCode(); String serverResponseMessage = connection.getResponseMessage(); Log.d(tag, "Response Code = " + serverResponseCode); Log.d(tag, "Response Message = " + serverResponseMessage); } catch (IOException e) { result = "Error getting response from server."; Log.e(tag, result, e); return result; } final StringBuilder out = new StringBuilder(); try { BufferedReader in = new BufferedReader(new InputStreamReader( connection.getInputStream())); String line; while (null != (line = in.readLine())) { if (line.contains("ERROR")) { Log.d(tag, "HTTPResponse: " + out.toString()); result = "Error: HTTPResponse: " + out.toString(); break; } out.append(line + " "); } Log.d(tag, "HTTPResponse: " + out.toString()); } catch (IOException e) { Log.w(tag, "WARNING: ", e); } return result; } void writeBoundary(DataOutputStream out) throws IOException { final String twoHyphens = "--"; out.writeBytes(twoHyphens + BOUNDARY + EOL); } void writeFileBoundary(DataOutputStream out) throws IOException { final String twoHyphens = "--"; out.writeBytes(twoHyphens + FILE_BOUNDARY + EOL); } </code></pre> <p>Here's the output of my logging on the Android side. As you can see, the key, userName and value, rbenjamin, are being properly loaded into the $_POST variable, but something isn't right past that point. I delimit the next section with the BOUNDARY, but it seems to be gobbled up into the value for the variable 'files'. I'm close, but I'm still missing something. (I stripped out most of the noise in the log file below.)</p> <pre><code>: Upload Button Clicked. : Compiling upload file : getting delivered SQL = SELECT * FROM deliveryorder WHERE delivereddatetime != '' : uploadEnabled = true : downloadEnabled = false : driverEmail = ray.benjamin@gmail.com : Starting, getting database. : Found 1 drivers. : Processing driver 1 : user name is rbenjamin : email is ray.benjamin@gmail.com : Uploading files using HTTP to : There are 16 files. : Checking download - enabled? false : Encoded userName='driver' is: userName=rbenjamin : Content-Type = Content-Disposition:file; filename="upload20130820_1015.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130820_1048.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1624.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1628.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1645.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1647.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1705.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1709.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1746.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1801.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1804.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1811.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1813.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_1821.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130821_2050.zip" : Content-Type: application/x-zip-compressed : : Content-Type = Content-Disposition:file; filename="upload20130825_1957.zip" : Content-Type: application/x-zip-compressed : : Response Code = 200 : Response Message = OK : HTTPResponse: &lt;!DOCTYPE html&gt; : &lt;html&gt; : &lt;body&gt; : POST is defined.&lt;br&gt;Key = userName"_, Value = rbenjamin&lt;br&gt;Key = files"_, Value = Content-Type: multipart/mixed; boundary=**FILE*BOUNDARY***25WLqf@*** : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130820_1015.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130820_1048.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1624.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1628.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1645.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1647.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1705.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1709.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1746.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1801.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1804.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1811.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1813.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_1821.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130821_2050.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@*** : Content-Disposition:file; filename="upload20130825_1957.zip" : Content-Type: application/x-zip-compressed : --**FILE*BOUNDARY***25WLqf@***&lt;br&gt; : Notice: Undefined index: userName in /var/www-pbs/upload.php on line 15 : Call Stack: : 0.0083 638888 1. {main}() /var/www-pbs/upload.php:0 : User Name is: &lt;br&gt;FILES is defined.&lt;br&gt; : Notice: Undefined index: file in /var/www-pbs/upload.php on line 24 : Call Stack: : 0.0083 638888 1. {main}() /var/www-pbs/upload.php:0 : &lt;p&gt;Dumping _FILES&lt;/p&gt; : Notice: Undefined index: file in /var/www-pbs/upload.php on line 34 : Call Stack: : 0.0083 638888 1. {main}() /var/www-pbs/upload.php:0 : Notice: Undefined index: file in /var/www-pbs/upload.php on line 40 : Call Stack: : 0.0083 638888 1. {main}() /var/www-pbs/upload.php:0 : Upload: &lt;br&gt; : Notice: Undefined index: file in /var/www-pbs/upload.php on line 41 : Call Stack: : 0.0083 638888 1. {main}() /var/www-pbs/upload.php:0 : Type : &lt;br&gt; : Notice: Undefined index: file in /var/www-pbs/upload.php on line 42 : Call Stack: : 0.0083 638888 1. {main}() /var/www-pbs/upload.php:0 : Size : 0 kB&lt;br&gt; : Notice: Undefined index: file in /var/www-pbs/upload.php on line 43 : Call Stack: : 0.0083 638888 1. {main}() /var/www-pbs/upload.php:0 : Stored in: : Notice: Undefined index: file in /var/www-pbs/upload.php on line 45 : Call Stack: : 0.0083 638888 1. {main}() /var/www-pbs/upload.php:0 : Notice: Undefined index: file in /var/www-pbs/upload.php on line 47 : Call Stack: : 0.0083 638888 1. {main}() /var/www-pbs/upload.php:0 : already exists. : &lt;/body&gt; : &lt;/html&gt; : 200 </code></pre> </div>


<div class="post-text" itemprop="text"> <p>I'm trying to get all the text between the two <code>== Quotes ==</code> but I'm having trouble getting preg_match to return anything other than null, my code is:</p> <pre><code>preg_match('/== Quotes == .+ == Quotes/', $quotes_str, $matches); </code></pre> <p><code>[[File:Charlie Chaplin.jpg|thumb|right|I remain just one thing, and one thing only — and that is a [[clown]]. It places me on a far higher plane than any [[politician]].]] '''[[w:Charlie Chaplin| Sir Charles Spencer Chaplin]]''', KBE ([[16 April]] [[1889]] – [[25 December]] [[1977]]) was a British comedic actor and director, usually known by his stage name of '''Charlie Chaplin'''. **== Quotes ==** [[File:Charles-chaplin 1920.jpg|thumb|right|My prodigious [[sin]] was, and still is, being a non-conformist.]] [[File:Charlie chaplin early 1914.gif|thumb|right|I am what I am: an [[individual]], unique and different.]] [[File:CharlieChaplinAndGandhi.jpg |thumb|right|I am an individual and a [[believer]] in [[liberty]]. That is all the [[politics]] I have.]] [[File:Double-alaskan-rainbow.jpg|thumb|right|Look up to the [[sky]] &lt;br&gt; You'll never find [[rainbows]] &lt;br&gt; If you’re looking down.]] * '''[[Wars]], conflict, it's all [[business]]. "One [[murder]] makes a [[villain]]. * "Swing High Little Girl", opening song written and sung by Chaplin for the 1969 re-release of [[w:The Circus (film)|''The Circus'' (1928)]] - [http://www.charliechaplin.com/biography/articles/84-Swing-little-girl Full text online] * [[Life]] is a tragedy when seen in close-up, but a [[comedy]] in long-shot. ** Reported by many sites to have been said by Chaplin upon signing the papers to create the United Artists studio (1919), this is believed to actually be derived from a remark about the same event attributed to '''Richard Rowland''', the head of Metro Pictures: ''"The lunatics have taken charge of the asylum"''; variant derivations or reports of this statement also include "The lunatics have taken over the asylum", and the attribution to Rowland is reported to have occurred at least as early as 1926, in the work ''A Million and One Nights'' by Terry Ramsaye, and as recently as in [http://www.variety.com/index.asp?layout=variety100&amp;content=jump&amp;jump=general&amp;articleID=VR1117930598 ''Variety''] (16 October 2005) ** David Robinson In ''Charlie Chaplin: Comic Genius'' (1996), p. 57, also asserts that a disgruntled film distributor said "The lunatics are taking over the asylum." * Widely attributed to Chaplin and a few others, research done for [http://quoteinvestigator.com/2011/07/16/laughter-day/ "A Day Without Laughter is a Day Wasted" at ''Quote Investigator''] indicate that such expressions date back to that of [[Nicolas Chamfort]], published in [http://books.google.com/books?id=N3tBAAAAcAAJ&amp;q=%22pas+ri%22#v=snippet&amp;q=%22pas%20ri%22&amp;f=false "Historique, Politique et Litteraire, Maximes détachées extraites des manuscrits de Champfort" ''Mercure Français'' (18 July 1795), p. 351]: ''La plus perdue de toutes les journées est celle où l’on n’a pas ri.'' Translations of this into English have been found as early as one in "Laughing" in ''Flowers of Literature'' (1803) by F. Prevost and F. Blagdon : :: I admire the man who exclaimed, “I have lost a day!” because he had neglected to do any good in the course of it; but another has observed that “'''the most lost of all days, is that in which we have not laughed''';” and, I must confess, that I feel myself greatly of his opinion. * As I began to love myself I found that anguish and emotional suffering are only warning signs that I was living against my own [[truth]].&lt;br&gt;Today, I know, this is “AUTHENTICITY". Quoted by many sites and blogs as "speech that Charlie Chaplin gave on his 70th birthday". [http://comoutrosolhos.multiply.com/journal/item/139 Actually, a re-translation (from Portuguese-BR) of a text from the book "When I Loved Myself Enough" by Kim &amp; Alison McMillen (2001).] {{Misattributed end}} **== Quotes about Chaplin ==** [[File:香港迪士尼樂園 (24).JPG|thumb|right|We wanted something appealing, and we thought of a tiny bit of a [[mouse]] that would have something of the wistfulness of Chaplin — a little fellow trying to do the best he could. ~ [[Walt Disney]] ]] * '''With ''[[w:A King in New York|A King in New York]]'' Charles Chaplin was the first film-maker to dare to expose, through [[satire]] and ridicule, the paranoia and [[political]] intolerance which overtook the United States in the Cold War years of the 1940s and 50s.''' *We felt that the public, and especially the [[children]], like animals that are cute and little. [http://www.pbs.org/wnet/americanmasters/database/chaplin_c.html American Masters: Charlie Chaplin] at PBS * [http://www.csse.monash.edu.au/~pringle/silent/chaplin/aaronhale.html Brief bio] * [http://www.chaplinalife.com/ Tribute pages at ''Chaplin : A Life''] {{DEFAULTSORT:Chaplin, Charlie}} [[Category:English people]] [[Category:British actors]] [[Category:Comedians]] [[Category:Agnostics]] [[Category:Humanists]] [[Category:Satirists]] [[Category:Film directors]] [[Category:1970s deaths]]</code></p> </div>


<div class="post-text" itemprop="text"> <pre><code>public static function blowfish($password, $storedpass = false) { //if encrypted data is passed, check it against input ($info) if ($storedpass) { if (substr($storedpass, 0, 60) == crypt($password, "$2a$08$".substr($storedpass, 60))) { return true; } else { return false; } } else { //make a salt and hash it with input, and add salt to end $salt = "143cd669b02e155c3cca6e";//substr(bin2hex(openssl_random_pseudo_bytes(22)), 0, 22); //for ($i = 0; $i &lt; 22; $i++) { //$salt .= substr("./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", mt_rand(0, 63), 1); //} //return 82 char string (60 char hash &amp; 22 char salt) return crypt($password, "$2a$08$".$salt).$salt; } } print(substr($storedpass, 0, 60)."&lt;br /&gt;"); print(crypt($password, "$2a$08$".substr($storedpass, 60))."&lt;br /&gt;"); print(substr($storedpass, 60)); </code></pre> <p>Produces the result:</p> <pre><code>$2a$08$143cd669b02e155c3cca6eM3k8s9BdE4jErJXJ8wSxshJDPcJQVPW $2a$08$143cd669b02e155c3cca6eEiYm6ilW1ZC1PBS07LOh2XSq1NODSKK 143cd669b02e155c3cca6e </code></pre> <p>You can see I was previously generating a random salt of 22 characters, and I know all about PHPASS, that mt_rand() is not a CSPRNG, etc etc. What confuses/concerns me is simply why crypt() (given $password = 'admin') generates a different hash even using a static salt. You can see I've printed the substr($storedpass, 60) which generates the proper salt, but then running the crypt() function (with the same parameters to create the initial $storedpass) it generates a different result, breaking authentication for a (relatively small and not mission-critical) application of mine...</p> </div>

拒绝从'file_name.php'执行脚本,因为它的MIME类型('text / html')不可执行,并且启用了严格的MIME类型检查

<div class="post-text" itemprop="text"> <p>我创建了一个网站。 它在我的本地服务器上正常工作,但是当我把它上传到实时服务器时,它会给我这个错误:</p> <blockquote> <p>Refused to execute script from '<a href="http://www.mahijat.tk/new/wp-content/cache/autoptimize/autoptimize_c648c3203309d095775637e672c00239.php" rel="nofollow noreferrer">http://www.mahijat.tk/new/wp-content/cache/autoptimize/autoptimize_c648c3203309d095775637e672c00239.php</a>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.</p> </blockquote> <p>我的网站地址:<a href="http://www.mahijat.tk/new/" rel="nofollow noreferrer">http://www.mahijat.tk/new/</a> </p> <p>我的index.php文件代码是:</p> <pre><code>&lt;!doctype html&gt; &lt;html lang="en-US" prefix="og: http://ogp.me/ns#" class="no-js "&gt; </code></pre> <p></p> <pre><code>&lt;head&gt;&lt;meta charset="UTF-8"&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;meta property="og:image" content="../pbs.twimg.com/profile_images/601407094277873664/WT2mk28E_400x400.jpg" /&gt; &lt;link type="text/css" media="all" href="wp-content/cache/autoptimize/autoptimize_ac4e9617d860b901a683f7676a3c44be.css" rel="stylesheet" /&gt; &lt;link type="text/css" media="all" href="wp-content/font-awesome/css/font-awesome.min.css" rel="stylesheet" /&gt; </code></pre> </div>


[V200R005C20SPC200] # drop illegal-mac alarm # ipv6 # dns resolve dns server dns server dns proxy enable # wlan ac-global carrier id other ac id 0 # dhcp enable # pki realm default enrollment self-signed # ssl policy default_policy type server pki-realm default # acl name Ethernet0/0/4 2999 rule 5 permit # ---- More ----[42D [42Dacl number 3001 rule 5 permit ip source rule 10 permit ip source rule 15 permit ip source rule 20 permit ip source # qos queue-profile limit queue 3 gts cir 5000 cbs 125000 # traffic classifier c1 operator or if-match acl 3001 # traffic behavior b1 remark local-precedence af3 car cir 6000 pir 10000 cbs 750000 pbs 1250000 mode color-blind green pass yellow pass red discard # traffic policy p1 classifier c1 behavior b1 # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default ---- More ----[42D [42D domain default_admin local-user admin password cipher %@%@UDA-QMYT-G`J!CV3$2A'qO=J%@%@ local-user admin privilege level 15 local-user admin service-type telnet http # firewall zone Local priority 16 # interface Vlanif1 ip address dhcp select interface dhcp server dns-list # interface Ethernet0/0/0 # interface Ethernet0/0/1 # interface Ethernet0/0/2 # interface Ethernet0/0/3 traffic-policy p1 inbound # interface Ethernet0/0/4 tcp adjust-mss 1460 ---- More ----[42D [42D ip address qos car outbound source-ip-address range to cir 5000 cbs 940000 pbs 1565000 green pass yellow pass red discard qos car outbound source-ip-address range to cir 5000 cbs 940000 pbs 1565000 green pass yellow pass red discard qos car outbound source-ip-address range to cir 5000 cbs 940000 pbs 1565000 green pass yellow pass red discard qos car outbound source-ip-address range to cir 5000 cbs 940000 pbs 1565000 green pass yellow pass red discard nat outbound 2999 # interface Cellular0/0/0 # interface NULL0 # info-center timestamp log format-date # snmp-agent local-engineid 800007DB03643E8CB22B97 # http server port 8081 http secure-server ssl-policy default_policy http server enable http secure-server enable # ip route-static Ethernet0/0/4 ip route-static Vlanif1 ip route-static Vlanif1 ip route-static Vlanif1 ---- More ----[42D [42Dip route-static Vlanif1 # user-interface con 0 user-interface vty 0 authentication-mode aaa user privilege level 15 protocol inbound all user-interface vty 1 4 authentication-mode aaa protocol inbound all # wlan ac # return <Huawei>


<div class="post-text" itemprop="text"> <p>I have a working PHP app running in Bluemix that I want to extend to call a RESTful service (Insights for Twitter). I've been able to call the service, retrieve the json body, and use json_decode as follows to create an array:</p> <pre><code>$insightList = json_decode($guzzleResponse -&gt;getBody(), true); </code></pre> <p>However, I can't figure out how to get access to the field I'm interested in. I've searched for solution on the web and tried a few approaches that looked promising, but when I tried to integrate them, I couldn't get them to work. I'm a bit of a PHP novice, so if something doesn't work I'm not sure how to proceed. </p> <p>The json structure is quite complex, with three top-level arrays - <em>search</em>, <em>tweets</em>, and <em>next</em>. I'm interested in the second of these, tweets. It's a pretty complex array - there is one entry per tweet. The field I want right now is tweets.cde.message.body. You can find the full schema here: <a href="https://cdeservice.eu-gb.mybluemix.net/rest-api/#!/messages/getTweets" rel="nofollow">https://cdeservice.eu-gb.mybluemix.net/rest-api/#!/messages/getTweets</a></p> <p>This is the code I have so far:</p> <pre><code> foreach($insightList as $cde) { foreach($cde as $message) { $insight = $message['body']; if(strlen($insight) &gt; 60) { $posts[] = array( 'id' =&gt; 99999999, //Temp; remove links from the text 'text' =&gt; $insight, 'category' =&gt; $insightCategory, 'image' =&gt; 'false' ); } } } </code></pre> <p>Here's a print_r of $insightList:</p> <pre><code> [search] =&gt; Array ( [results] =&gt; 28 [current] =&gt; 28 ) [tweets] =&gt; Array ( [0] =&gt; Array ( [cde] =&gt; Array ( [author] =&gt; Array ( [gender] =&gt; male [parenthood] =&gt; Array ( [isParent] =&gt; unknown ) [location] =&gt; Array ( [country] =&gt; ) [maritalStatus] =&gt; Array ( [isMarried] =&gt; unknown ) ) [content] =&gt; Array ( [sentiment] =&gt; Array ( [evidence] =&gt; Array ( ) [polarity] =&gt; NEUTRAL ) ) ) [message] =&gt; Array ( [postedTime] =&gt; 2015-01-13T09:42:16.000Z [verb] =&gt; share [link] =&gt; http://twitter.com/zWDOM/statuses/554936456477933569 [generator] =&gt; Array ( [displayName] =&gt; Twitter Web Client [link] =&gt; http://twitter.com ) [body] =&gt; RT @VisualSuccess: "Mainframe &amp; Cloud" Magazine wurde soeben publiziert! http://www.twitter.com @zWDOM @Rocket @JohnKnutson_IBM [favoritesCount] =&gt; 0 [objectType] =&gt; activity [actor] =&gt; Array ( [summary] =&gt; Seit über 25 Jahren im Mainframebereich, derzeit als Senior Consultant und IT Architekt für zEnterprise und Projektmanager beim IBM BP Cancom in Köln [image] =&gt; https://pbs.twimg.com/profile_images/424202233463308288/XQquUcnh_normal.jpeg [statusesCount] =&gt; 2309 [utcOffset] =&gt; 3600 [languages] =&gt; Array ( [0] =&gt; de ) [preferredUsername] =&gt; zWDOM [displayName] =&gt; Willi Domroese [postedTime] =&gt; 2009-12-17T01:39:25.000Z [link] =&gt; http://www.twitter.com/zWDOM [verified] =&gt; ) [provider] =&gt; Array ( [displayName] =&gt; Twitter [link] =&gt; http://www.twitter.com [objectType] =&gt; service ) [twitter_filter_level] =&gt; medium [twitter_entities] =&gt; Array ( [urls] =&gt; Array ( [0] =&gt; Array ( [display_url] =&gt; ln.is/paper.li/visua… [indices] =&gt; Array ( [0] =&gt; 77 [1] =&gt; 99 ) [expanded_url] =&gt; http://ln.is/paper.li/visualsucce/7zYNk [url] =&gt; http://www.twitter.com ) ) [hashtags] =&gt; Array ( ) [user_mentions] =&gt; Array ( [0] =&gt; Array ( [indices] =&gt; Array ( [0] =&gt; 3 [1] =&gt; 17 ) [screen_name] =&gt; VisualSuccess [id_str] =&gt; 213337792 [name] =&gt; Predrag Gasic [id] =&gt; 213337792 ) [1] =&gt; Array ( [indices] =&gt; Array ( [0] =&gt; 101 [1] =&gt; 107 ) [screen_name] =&gt; zWDOM [id_str] =&gt; 97334013 [name] =&gt; Willi Domroese [id] =&gt; 97334013 ) [2] =&gt; Array ( [indices] =&gt; Array ( [0] =&gt; 108 [1] =&gt; 115 ) [screen_name] =&gt; Rocket [id_str] =&gt; 870584947 [name] =&gt; Rocket Software [id] =&gt; 870584947 ) [3] =&gt; Array ( [indices] =&gt; Array ( [0] =&gt; 116 [1] =&gt; 132 ) [screen_name] =&gt; JohnKnutson_IBM [id_str] =&gt; 16452310 [name] =&gt; John Knutson [id] =&gt; 16452310 ) ) [trends] =&gt; Array ( ) [symbols] =&gt; Array ( ) ) [twitter_lang] =&gt; de [id] =&gt; tag:search.twitter.com,2005:554936456477933569 [retweetCount] =&gt; 1 [gnip] =&gt; Array ( [urls] =&gt; Array ( [0] =&gt; Array ( [expanded_url] =&gt; http://linkis.com/paper.li/visualsucce/7zYNk [expanded_status] =&gt; 200 [url] =&gt; http://www.twitter.com ) ) [language] =&gt; Array ( [value] =&gt; de ) ) [object] =&gt; Array ( [postedTime] =&gt; 2015-01-13T08:04:48.000Z [verb] =&gt; post [link] =&gt; http://twitter.com/VisualSuccess/statuses/554911928527888384 [generator] =&gt; Array ( [displayName] =&gt; Linkis.com [link] =&gt; http://linkis.com ) [body] =&gt; "Mainframe &amp; Cloud" Magazine wurde soeben publiziert! http://www.twitter.com ://www.twitter.com [objectType] =&gt; activity [actor] =&gt; Array ( [summary] =&gt; ن (N), Wirtschaftsinformatiker | SAP Consultant Logistics #bigdata #appdevelopment #webdesign #eCommerce #SocialMedia #contentmarketing #SmartHome #Journal [image] =&gt; https://pbs.twimg.com/profile_images/2841607223/959b0d23646b1f24bd7b70deac160e2f_normal.jpeg [statusesCount] =&gt; 14185 [utcOffset] =&gt; 3600 [languages] =&gt; Array ( [0] =&gt; de ) [preferredUsername] =&gt; VisualSuccess [displayName] =&gt; Predrag Gasic [postedTime] =&gt; 2010-11-08T17:19:27.000Z [link] =&gt; http://www.twitter.com/VisualSuccess [verified] =&gt; ) [provider] =&gt; Array ( [displayName] =&gt; Twitter [link] =&gt; http://www.twitter.com [objectType] =&gt; service ) [twitter_filter_level] =&gt; low [twitter_entities] =&gt; Array ( [urls] =&gt; Array ( [0] =&gt; Array ( [display_url] =&gt; ln.is/paper.li/visua… [indices] =&gt; Array ( [0] =&gt; 58 [1] =&gt; 80 ) [expanded_url] =&gt; http://ln.is/paper.li/visualsucce/7zYNk [url] =&gt; http://www.twitter.com ) ) [hashtags] =&gt; Array ( ) [user_mentions] =&gt; Array ( [0] =&gt; Array ( [indices] =&gt; Array ( [0] =&gt; 82 [1] =&gt; 88 ) [screen_name] =&gt; zWDOM [id_str] =&gt; 97334013 [name] =&gt; Willi Domroese [id] =&gt; 97334013 ) [1] =&gt; Array ( [indices] =&gt; Array ( [0] =&gt; 89 [1] =&gt; 96 ) [screen_name] =&gt; Rocket [id_str] =&gt; 870584947 [name] =&gt; Rocket Software [id] =&gt; 870584947 ) [2] =&gt; Array ( [indices] =&gt; Array ( [0] =&gt; 97 [1] =&gt; 113 ) [screen_name] =&gt; JohnKnutson_IBM [id_str] =&gt; 16452310 [name] =&gt; John Knutson [id] =&gt; 16452310 ) ) [trends] =&gt; Array ( ) [symbols] =&gt; Array ( ) ) ) ) ) </code></pre> <p>Answers to this question would be greatly appreciated</p> </div>


autoconf版本2.68,automake1.11 错误如下所示: ``` Makefile.am: required file `./README' not found Makefile.am: required file `./ChangeLog' not found autoreconf: automake failed with exit status: 1 autogen.sh: error: autoreconf exited with status 0 ```

PHP:Twitter搜索API - 如何从JSON数据获取推文

<div class="post-text" itemprop="text"> <p>I have a twitter php search script with twitter search api.</p> <p>My code is here:</p> <pre><code>&lt;?php require_once('TwitterAPIExchange.php'); $settings = array( 'oauth_access_token' =&gt; "XXX", 'oauth_access_token_secret' =&gt; "XXX", 'consumer_key' =&gt; "XXX", 'consumer_secret' =&gt; "XXX" ); $url = "https://api.twitter.com/1.1/search/tweets.json"; $requestMethod = "GET"; $getfield = '?f=tweets&amp;vertical=default&amp;q=wish&amp;src=typd'; $twitter = new TwitterAPIExchange($settings); $string = json_decode($twitter-&gt;setGetfield($getfield) -&gt;buildOauth($url, $requestMethod) -&gt;performRequest(),$assoc = TRUE); echo "&lt;pre&gt;"; print_r($string); echo "&lt;/pre&gt;"; ?&gt; </code></pre> <p>And it return to me a sample search result with json. Let me give an example result:</p> <pre><code>Array ( [statuses] =&gt; Array ( [0] =&gt; Array ( [metadata] =&gt; Array ( [iso_language_code] =&gt; en [result_type] =&gt; recent ) [created_at] =&gt; Sat Aug 08 11:54:02 +0000 2015 [id] =&gt; 629983908336005122 [id_str] =&gt; 629983908336005122 [text] =&gt; RT @pilosopo_tasho: "Sometimes I wish I could unmeet, delete, forget people." [source] =&gt; Twitter for Android [truncated] =&gt; [in_reply_to_status_id] =&gt; [in_reply_to_status_id_str] =&gt; [in_reply_to_user_id] =&gt; [in_reply_to_user_id_str] =&gt; [in_reply_to_screen_name] =&gt; [user] =&gt; Array ( [id] =&gt; 1734364392 [id_str] =&gt; 1734364392 [name] =&gt; EL EDWARD [screen_name] =&gt; qwerty12307 [location] =&gt; Tanauan City,Batangas [description] =&gt; | BornAgain | Drummer | Rakker | 7 is ♥ | PogiSInceBirthxD | Artist | God's Servant &amp; Believer | PARAMORE LOVER | https://t.co/CD0EQkiOUM [url] =&gt; [entities] =&gt; Array ( [description] =&gt; Array ( [urls] =&gt; Array ( [0] =&gt; Array ( [url] =&gt; https://t.co/CD0EQkiOUM [expanded_url] =&gt; https://www.facebook.com/WkM.Bobi [display_url] =&gt; facebook.com/WkM.Bobi [indices] =&gt; Array ( [0] =&gt; 114 [1] =&gt; 137 ) ) ) ) ) [protected] =&gt; [followers_count] =&gt; 671 [friends_count] =&gt; 274 [listed_count] =&gt; 2 [created_at] =&gt; Fri Sep 06 07:56:03 +0000 2013 [favourites_count] =&gt; 1050 [utc_offset] =&gt; 28800 [time_zone] =&gt; Beijing [geo_enabled] =&gt; [verified] =&gt; [statuses_count] =&gt; 6590 [lang] =&gt; fil [contributors_enabled] =&gt; [is_translator] =&gt; [is_translation_enabled] =&gt; [profile_background_color] =&gt; 89C9FA [profile_background_image_url] =&gt; http://pbs.twimg.com/profile_background_images/518335320815714304/IP4m7tYf.jpeg [profile_background_image_url_https] =&gt; https://pbs.twimg.com/profile_background_images/518335320815714304/IP4m7tYf.jpeg [profile_background_tile] =&gt; 1 [profile_image_url] =&gt; http://pbs.twimg.com/profile_images/629497679664381952/rcARf_sr_normal.jpg [profile_image_url_https] =&gt; https://pbs.twimg.com/profile_images/629497679664381952/rcARf_sr_normal.jpg [profile_banner_url] =&gt; https://pbs.twimg.com/profile_banners/1734364392/1438919080 [profile_link_color] =&gt; 3B94D9 [profile_sidebar_border_color] =&gt; 000000 [profile_sidebar_fill_color] =&gt; DDEEF6 [profile_text_color] =&gt; 333333 [profile_use_background_image] =&gt; 1 [has_extended_profile] =&gt; [default_profile] =&gt; [default_profile_image] =&gt; [following] =&gt; [follow_request_sent] =&gt; [notifications] =&gt; ) [geo] =&gt; [coordinates] =&gt; [place] =&gt; [contributors] =&gt; [retweeted_status] =&gt; Array ( [metadata] =&gt; Array ( [iso_language_code] =&gt; en [result_type] =&gt; recent ) [created_at] =&gt; Sat Aug 08 11:45:24 +0000 2015 [id] =&gt; 629981732717113344 [id_str] =&gt; 629981732717113344 [text] =&gt; "Sometimes I wish I could unmeet, delete, forget people." [source] =&gt; Hootsuite [truncated] =&gt; [in_reply_to_status_id] =&gt; [in_reply_to_status_id_str] =&gt; [in_reply_to_user_id] =&gt; [in_reply_to_user_id_str] =&gt; [in_reply_to_screen_name] =&gt; [user] =&gt; Array ( [id] =&gt; 938887459 [id_str] =&gt; 938887459 [name] =&gt; Pilosopo Tasyo [screen_name] =&gt; pilosopo_tasho [location] =&gt; Pilipinas [description] =&gt; Matandang Pilosopo | Member: United Influencers | Email: contact@bobongquote.com [url] =&gt; http://t.co/l52iYnJ89G [entities] =&gt; Array ( [url] =&gt; Array ( [urls] =&gt; Array ( [0] =&gt; Array ( [url] =&gt; http://t.co/l52iYnJ89G [expanded_url] =&gt; http://www.bobongquote.com [display_url] =&gt; bobongquote.com [indices] =&gt; Array ( [0] =&gt; 0 [1] =&gt; 22 ) ) ) ) [description] =&gt; Array ( [urls] =&gt; Array ( ) ) ) [protected] =&gt; [followers_count] =&gt; 370638 [friends_count] =&gt; 101 [listed_count] =&gt; 186 [created_at] =&gt; Sat Nov 10 11:43:47 +0000 2012 [favourites_count] =&gt; 3 [utc_offset] =&gt; 28800 [time_zone] =&gt; Beijing [geo_enabled] =&gt; 1 [verified] =&gt; [statuses_count] =&gt; 52812 [lang] =&gt; en [contributors_enabled] =&gt; [is_translator] =&gt; [is_translation_enabled] =&gt; [profile_background_color] =&gt; 022330 [profile_background_image_url] =&gt; http://abs.twimg.com/images/themes/theme15/bg.png [profile_background_image_url_https] =&gt; https://abs.twimg.com/images/themes/theme15/bg.png [profile_background_tile] =&gt; [profile_image_url] =&gt; http://pbs.twimg.com/profile_images/577984458206281728/eOxv_H1X_normal.jpeg [profile_image_url_https] =&gt; https://pbs.twimg.com/profile_images/577984458206281728/eOxv_H1X_normal.jpeg [profile_banner_url] =&gt; https://pbs.twimg.com/profile_banners/938887459/1426637219 [profile_link_color] =&gt; 0084B4 [profile_sidebar_border_color] =&gt; A8C7F7 [profile_sidebar_fill_color] =&gt; C0DFEC [profile_text_color] =&gt; 333333 [profile_use_background_image] =&gt; 1 [has_extended_profile] =&gt; [default_profile] =&gt; [default_profile_image] =&gt; [following] =&gt; [follow_request_sent] =&gt; [notifications] =&gt; ) [geo] =&gt; [coordinates] =&gt; [place] =&gt; [contributors] =&gt; [is_quote_status] =&gt; [retweet_count] =&gt; 66 [favorite_count] =&gt; 59 [entities] =&gt; Array ( [hashtags] =&gt; Array ( ) [symbols] =&gt; Array ( ) [user_mentions] =&gt; Array ( ) [urls] =&gt; Array ( ) ) [favorited] =&gt; [retweeted] =&gt; [lang] =&gt; en ) [is_quote_status] =&gt; [retweet_count] =&gt; 66 [favorite_count] =&gt; 0 [entities] =&gt; Array ( [hashtags] =&gt; Array ( ) [symbols] =&gt; Array ( ) [user_mentions] =&gt; Array ( [0] =&gt; Array ( [screen_name] =&gt; pilosopo_tasho [name] =&gt; Pilosopo Tasyo [id] =&gt; 938887459 [id_str] =&gt; 938887459 [indices] =&gt; Array ( [0] =&gt; 3 [1] =&gt; 18 ) ) ) [urls] =&gt; Array ( ) ) [favorited] =&gt; [retweeted] =&gt; [lang] =&gt; en ) [1] =&gt; Array ( [metadata] =&gt; Array ( [iso_language_code] =&gt; en [result_type] =&gt; recent ) [created_at] =&gt; Sat Aug 08 11:54:02 +0000 2015 [id] =&gt; 629983907157446656 [id_str] =&gt; 629983907157446656 [text] =&gt; RT @disneywords: The most fantastic, magical things can happen, and it all starts with a wish. –Jiminy Cricket (Pinocchio) [source] =&gt; Twitter for Android [truncated] =&gt; [in_reply_to_status_id] =&gt; [in_reply_to_status_id_str] =&gt; [in_reply_to_user_id] =&gt; [in_reply_to_user_id_str] =&gt; [in_reply_to_screen_name] =&gt; [user] =&gt; Array ( [id] =&gt; 960524995 [id_str] =&gt; 960524995 [name] =&gt; Sofi [screen_name] =&gt; sofinur_ [location] =&gt; [description] =&gt; dreamer [url] =&gt; [entities] =&gt; Array ( [description] =&gt; Array ( [urls] =&gt; Array ( ) ) ) [protected] =&gt; [followers_count] =&gt; 205 [friends_count] =&gt; 256 [listed_count] =&gt; 1 [created_at] =&gt; Tue Nov 20 13:52:03 +0000 2012 [favourites_count] =&gt; 20 [utc_offset] =&gt; 25200 [time_zone] =&gt; Bangkok [geo_enabled] =&gt; 1 [verified] =&gt; [statuses_count] =&gt; 3096 [lang] =&gt; id [contributors_enabled] =&gt; [is_translator] =&gt; [is_translation_enabled] =&gt; [profile_background_color] =&gt; 352726 [profile_background_image_url] =&gt; http://abs.twimg.com/images/themes/theme5/bg.gif [profile_background_image_url_https] =&gt; https://abs.twimg.com/images/themes/theme5/bg.gif [profile_background_tile] =&gt; [profile_image_url] =&gt; http://pbs.twimg.com/profile_images/629941184132087809/0NtWuWk8_normal.jpg [profile_image_url_https] =&gt; https://pbs.twimg.com/profile_images/629941184132087809/0NtWuWk8_normal.jpg [profile_banner_url] =&gt; https://pbs.twimg.com/profile_banners/960524995/1434944169 [profile_link_color] =&gt; 6B340A [profile_sidebar_border_color] =&gt; FFFFFF [profile_sidebar_fill_color] =&gt; EADEAA [profile_text_color] =&gt; 333333 [profile_use_background_image] =&gt; 1 [has_extended_profile] =&gt; [default_profile] =&gt; [default_profile_image] =&gt; [following] =&gt; [follow_request_sent] =&gt; [notifications] =&gt; ) [geo] =&gt; [coordinates] =&gt; [place] =&gt; [contributors] =&gt; [retweeted_status] =&gt; Array ( [metadata] =&gt; Array ( [iso_language_code] =&gt; en [result_type] =&gt; recent ) [created_at] =&gt; Sat Aug 08 11:45:39 +0000 2015 [id] =&gt; 629981798701920256 [id_str] =&gt; 629981798701920256 [text] =&gt; The most fantastic, magical things can happen, and it all starts with a wish. –Jiminy Cricket (Pinocchio) [source] =&gt; Hootsuite [truncated] =&gt; [in_reply_to_status_id] =&gt; [in_reply_to_status_id_str] =&gt; [in_reply_to_user_id] =&gt; [in_reply_to_user_id_str] =&gt; [in_reply_to_screen_name] =&gt; [user] =&gt; Array ( [id] =&gt; 126400767 [id_str] =&gt; 126400767 [name] =&gt; Disney Words [screen_name] =&gt; disneywords [location] =&gt; disneywordstwitter@yahoo.com [description] =&gt; We can learn a lot of things from Disney characters, and sometimes they just help us express what we feel. [url] =&gt; http://t.co/d5O0KztA4I [entities] =&gt; Array ( [url] =&gt; Array ( [urls] =&gt; Array ( [0] =&gt; Array ( [url] =&gt; http://t.co/d5O0KztA4I [expanded_url] =&gt; http://disneywords.me [display_url] =&gt; disneywords.me [indices] =&gt; Array ( [0] =&gt; 0 [1] =&gt; 22 ) ) ) ) [description] =&gt; Array ( [urls] =&gt; Array ( ) ) ) [protected] =&gt; [followers_count] =&gt; 3525208 [friends_count] =&gt; 0 [listed_count] =&gt; 7930 [created_at] =&gt; Thu Mar 25 19:13:32 +0000 2010 [favourites_count] =&gt; 0 [utc_offset] =&gt; -25200 [time_zone] =&gt; Pacific Time (US &amp; Canada) [geo_enabled] =&gt; 1 [verified] =&gt; [statuses_count] =&gt; 82010 [lang] =&gt; en [contributors_enabled] =&gt; [is_translator] =&gt; [is_translation_enabled] =&gt; [profile_background_color] =&gt; 030824 [profile_background_image_url] =&gt; http://pbs.twimg.com/profile_background_images/676942340/92934d4a0422a2e865f16a51bfc1fc65.jpeg [profile_background_image_url_https] =&gt; https://pbs.twimg.com/profile_background_images/676942340/92934d4a0422a2e865f16a51bfc1fc65.jpeg [profile_background_tile] =&gt; [profile_image_url] =&gt; http://pbs.twimg.com/profile_images/1175908443/disneywordspp_normal.jpg [profile_image_url_https] =&gt; https://pbs.twimg.com/profile_images/1175908443/disneywordspp_normal.jpg [profile_banner_url] =&gt; https://pbs.twimg.com/profile_banners/126400767/1401374801 [profile_link_color] =&gt; 0C2352 [profile_sidebar_border_color] =&gt; FFFFFF [profile_sidebar_fill_color] =&gt; 64738F [profile_text_color] =&gt; 020A1F [profile_use_background_image] =&gt; 1 [has_extended_profile] =&gt; [default_profile] =&gt; [default_profile_image] =&gt; [following] =&gt; [follow_request_sent] =&gt; [notifications] =&gt; ) [geo] =&gt; [coordinates] =&gt; [place] =&gt; [contributors] =&gt; [is_quote_status] =&gt; [retweet_count] =&gt; 85 [favorite_count] =&gt; 62 [entities] =&gt; Array ( [hashtags] =&gt; Array ( ) [symbols] =&gt; Array ( ) [user_mentions] =&gt; Array ( ) [urls] =&gt; Array ( ) ) [favorited] =&gt; [retweeted] =&gt; [lang] =&gt; en ) [is_quote_status] =&gt; [retweet_count] =&gt; 85 [favorite_count] =&gt; 0 [entities] =&gt; Array ( [hashtags] =&gt; Array ( ) [symbols] =&gt; Array ( ) [user_mentions] =&gt; Array ( [0] =&gt; Array ( [screen_name] =&gt; disneywords [name] =&gt; Disney Words [id] =&gt; 126400767 [id_str] =&gt; 126400767 [indices] =&gt; Array ( [0] =&gt; 3 [1] =&gt; 15 ) ) ) [urls] =&gt; Array ( ) ) [favorited] =&gt; [retweeted] =&gt; [lang] =&gt; en ).......... </code></pre> <p>A part of my search JSON result is above.</p> <p>Now I want to get just tweets ([text]) from this result. </p> <p>How to get all [text] values with php from this JSON?</p> </div>

spring+struts2 启动注入bean成功,运行中bean为null

# web.xml <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> # applicationContext.xml ``` <bean id="tangService" class="com.bander.service.TangService" p:dao-ref="tangDao"/> <bean id="tangDao" class="com.bander.dao.TangDAO" p:sessionFactory-ref="sessionFactory"/> <bean id="searchAction" class="com.bander.action.SearchAction" p:service-ref="tangService"/> ``` 已确认在所有引用bean的类中都有setter和getter,在junit中测试是没有问题的,测试代码如下 ``` ``` @Test public void testService(){ ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); SearchAction action = context.getBean("searchAction", SearchAction.class); PageModel<PoetryBlock> pm = action.getService().searchPoet("李白",1,10); List<PoetryBlock> pbs = pm.getDatas(); for(PoetryBlock pb : pbs){ System.out.println(pb.getTitle()); } } ``` 所以推测是不是我的监听器配得有问题,以至于在web环境下无法使用spring管理bean,大神们帮我看看 ``` ``` ```


<div class="post-text" itemprop="text"> <p>I am using twitterapi to get the friends list in php and I have encoded the result as a json array, but I cannot parse the json array in javascript.I have validated the json array produced by the php and its a valid json array. Below is my code.</p> <h2>php</h2> <pre><code>$friends = array(); $friend_list = array(); $myfriend = array(); $connection = new TwitterOAuth($CONSUMER_KEY, $CONSUMER_SECRET,oauth_token,oauth_token_secret); $friends =$connection-&gt;get("https://api.twitter.com/1.1/friends/list.json?cursor=-1&amp;screen_name=twitterapi&amp;skip_status=true&amp;include_user_entities=false&amp;count=200); foreach($friends as $friend) { if(!empty($friend)) { foreach($friend as $value) { $friend_list['id']=$value-&gt;id; $friend_list['screen_name']= $value-&gt;screen_name; $friend_list['name']= $value-&gt;name; $friend_list['profile_image_url']= $value-&gt;profile_image_url; $friend_list['location']= $value-&gt;location; array_push($myfriend, $friend_list); } } } $newarray = json_encode($myfriend); </code></pre> <p>'</p> <h2>javascript</h2> <pre><code>&lt;script&gt; var obj1 = JSON.parse('&lt;?php echo $newarray ;?&gt;'); console.log(obj1); // am not getting anything in console &lt;/script&gt; </code></pre> <h2>EDITED</h2> <p>output from <code>echo $newarray;</code></p> <pre><code>[ { "id": 50393960, "screen_name": "BillGates", "name": "Bill Gates", "profile_image_url": "http://pbs.twimg.com/profile_images/1884069342/BGtwitter_normal.JPG", "location": "Seattle, WA" }, { "id": 141527741, "screen_name": "prakashraaj", "name": "Prakash Raj", "profile_image_url": "http://pbs.twimg.com/profile_images/2951815972/ab32fb806b480d0dc761805ae4ef9775_normal.jpeg", "location": "india" }, { "id": 88856792, "screen_name": "aamir_khan", "name": "Aamir Khan", "profile_image_url": "http://pbs.twimg.com/profile_images/2254031972/_MG_2190_normal.jpeg", "location": "Mumbai" }, { "id": 107318424, "screen_name": "bipsluvurself", "name": "Bipasha Basu", "profile_image_url": "http://pbs.twimg.com/profile_images/419745345178832896/8JvqwEM9_normal.jpeg", "location": "Mumbai, India" } ] </code></pre> <p>Please help, am stuck with this</p> </div>

php tiny url没有正确链接。 我的网站网址被附加到tinyurl.com,我收到404错误

<div class="post-text" itemprop="text"> <p>This is my tiny url function </p> <pre><code>private function getTinyUrl($url) { return file_get_contents("http://tinyurl.com/api-create.php?url=".$url); } </code></pre> <p>the output is something like <a href="http://tinyurl.com/nj76pbs" rel="nofollow">http://tinyurl.com/nj76pbs</a> so thats good.</p> <p>But when I use the url, it takes me to</p> <pre><code>tinyurl.com/mywebsite.com/code?=fqhfkqhiurhg98y </code></pre> <p>and i get a 404 not found. What to do?</p> </div>


<div class="post-text" itemprop="text"> <p>I'm having a problem when trying to add a URL to a mySQL database.</p> <p>The string is a URL:</p> <pre><code>http://pbs.twimg.com/profile_images/1708867059/405000_10150426314376065_707061064_8645107_703731598_n_normal.jpg </code></pre> <p>The error I get is: </p> <pre><code>Error description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '://pbs.twimg.com/profile_images/1708867059/405000_10150426314376065_707061064_86' at line 1 </code></pre> <p>It seems as though it won't allow me to add a URL, I presume there is something wrong with some of the characters but I don't know what?</p> <p>My SQL is:</p> <pre><code>INSERT INTO accounts (name,consumerkey,consumersecret,pic_url) VALUES ($twitterID,$consumerkey,$consumersecret,$picture_url)" </code></pre> </div>


<div class="post-text" itemprop="text"> <p>What I am doing in the code is basically getting all the ids currently in mysql database. Getting the ids from a JSON array. Comparing them and deleting the ids in the mysql table that are NOT in the JSON array.</p> <pre><code>&lt;?php </code></pre> <p>Getting POST Data (Works)</p> <pre><code> $test = $_POST["data"]; $obj = json_decode($test, true); $data = $obj["myarray"]; </code></pre> <p>First sql query (Works)</p> <pre><code> $sql3 = "select id from pbs"; $current_ids= mysqli_query($connection, $sql3) </code></pre> <p>initialize arrays for IDs (Works)</p> <pre><code> $ids_array= array(); $ids_array2= array(); </code></pre> <p>Get current set of ids from mysql table and putting them in ids_array (Works)</p> <pre><code> while($row = mysqli_fetch_array($current_ids)){ $ids_array[] = $row['id']; } </code></pre> <p>Looping over each JSON array $data i.e [{$val}, {$val}, ...]</p> <pre><code> foreach($data as $val){ </code></pre> <p>This is one of the things I'm unsure about. Can I push each id value into and array? i.e:</p> <p>if $val = {"id": "1", ...} $ids_array2 should have the value "1". If this is correct, I should have an array of new ids that I got from the JSON array.</p> <pre><code> array_push($ids_array2, $val-&gt;id); </code></pre> <p>checks if row is in table by id. If it is, update the mysql row. If it is not, insert a new mysql row (Works)</p> <pre><code> $check = mysqli_query($connection,"SELECT * FROM `pbs` WHERE `id`='".$val["id"]."'"); if(mysqli_num_rows($check)==1){ //Update the row } else{ //Insert the row } } </code></pre> <p>For each item in $ids_array (current set of ids from mysql table). Delete it from table if it is not in $ids_array2 (newset of ids from JSON) where id = $item (Does not work)</p> <pre><code> foreach($ids_array as $item){ if(in_array($item, $ids_array2)==0){ $sql5 = "DELETE FROM pbs WHERE id='"$item"'"; $delete= mysqli_query($connection, $sql5); } } mysqli_close($connection); ?&gt; </code></pre> <p>So what I am trying to do is INSERT, UPDATE and DELETE records depending on the JSON array I get from the client. Thanks!</p> </div>

解析来自James Mallison twitter库的JSON响应

<div class="post-text" itemprop="text"> <p>I am using the Twitter Search API 1.1 to search followers_count</p> <p>I have managed to get the Oauth working with the help of James Mallison at <a href="http://github.com/j7mbo/twitter-api-php" rel="nofollow">http://github.com/j7mbo/twitter-api-php</a>.</p> <p>Here my code :</p> <pre><code>require_once('TwitterAPIExchange.php'); $settings = array( 'oauth_access_token' =&gt; "xxx", 'oauth_access_token_secret' =&gt; "yyy", 'consumer_key' =&gt; "zzz", 'consumer_secret' =&gt; "vvv" ); $url = 'https://api.twitter.com/1.1/users/lookup.json'; $getfield = '?screen_name=twitterapi'; $requestMethod = 'GET'; $twitter = new TwitterAPIExchange($settings); echo $twitter-&gt;setGetfield($getfield) -&gt;buildOauth($url, $requestMethod) -&gt;performRequest(); $response = json_decode($twitter, true); $ed = $response-&gt;followers_count; </code></pre> <p>Here the answer : </p> <pre><code>[{"id":6253282,"id_str":"6253282","name":"Twitter API","screen_name":"twitterapi","location":"San Francisco, CA","description":"The Real Twitter API. I tweet about API changes, service issues and happily answer questions about Twitter and our API. Don't get an answer? It's on my website.","url":"http:\/\/t.co\/78pYTvWfJd","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/78pYTvWfJd","expanded_url":"http:\/\/dev.twitter.com","display_url":"dev.twitter.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":3402865,"friends_count":48,"listed_count":12958,"created_at":"Wed May 23 06:01:13 +0000 2007","favourites_count":27,"utc_offset":-25200,"time_zone":"Pacific Time (US &amp; Canada)","geo_enabled":true,"verified":true,"statuses_count":3535,"lang":"en","status":{"created_at":"Thu May 21 21:12:42 +0000 2015","id":601495856353783808,"id_str":"601495856353783808","text":"RT @TwitterDev: We are excited to announce that the REST API now supports native video upload. https:\/\/t.co\/cWUrgjh8wz http:\/\/t.co\/yaenTQE9\u2026","source":"\u003ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Thu May 21 20:57:40 +0000 2015","id":601492072953151488,"id_str":"601492072953151488","text":"We are excited to announce that the REST API now supports native video upload. https:\/\/t.co\/cWUrgjh8wz http:\/\/t.co\/yaenTQE95N","source":"\u003ca href=\"http:\/\/jonbulava.com\" rel=\"nofollow\"\u003eJon's Developer Testing App\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":160,"favorite_count":189,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[{"url":"https:\/\/t.co\/cWUrgjh8wz","expanded_url":"https:\/\/blog.twitter.com\/2015\/rest-api-now-supports-native-video-upload","display_url":"blog.twitter.com\/2015\/rest-api-\u2026","indices":[79,102]}],"media":[{"id":601491637433475073,"id_str":"601491637433475073","indices":[103,125],"media_url":"http:\/\/pbs.twimg.com\/ext_tw_video_thumb\/601491637433475073\/pu\/img\/XJcHkzdOR2YRMQSC.jpg","media_url_https":"https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/601491637433475073\/pu\/img\/XJcHkzdOR2YRMQSC.jpg","url":"http:\/\/t.co\/yaenTQE95N","display_url":"pic.twitter.com\/yaenTQE95N","expanded_url":"http:\/\/twitter.com\/TwitterDev\/status\/601492072953151488\/video\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"large":{"w":640,"h":360,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"retweet_count":160,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"user_mentions":[{"screen_name":"TwitterDev","name":"TwitterDev","id":2244994945,"id_str":"2244994945","indices":[3,14]}],"urls":[{"url":"https:\/\/t.co\/cWUrgjh8wz","expanded_url":"https:\/\/blog.twitter.com\/2015\/rest-api-now-supports-native-video-upload","display_url":"blog.twitter.com\/2015\/rest-api-\u2026","indices":[95,118]}],"media":[{"id":601491637433475073,"id_str":"601491637433475073","indices":[119,140],"media_url":"http:\/\/pbs.twimg.com\/ext_tw_video_thumb\/601491637433475073\/pu\/img\/XJcHkzdOR2YRMQSC.jpg","media_url_https":"https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/601491637433475073\/pu\/img\/XJcHkzdOR2YRMQSC.jpg","url":"http:\/\/t.co\/yaenTQE95N","display_url":"pic.twitter.com\/yaenTQE95N","expanded_url":"http:\/\/twitter.com\/TwitterDev\/status\/601492072953151488\/video\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"large":{"w":640,"h":360,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"}},"source_status_id":601492072953151488,"source_status_id_str":"601492072953151488","source_user_id":2244994945,"source_user_id_str":"2244994945"}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/656927849\/miyt9dpjz77sc0w3d4vj.png","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/656927849\/miyt9dpjz77sc0w3d4vj.png","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2284174872\/7df3h38zabcvjylnyfe3_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2284174872\/7df3h38zabcvjylnyfe3_normal.png","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/6253282\/1431474710","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false}] Warning: json_decode() expects parameter 1 to be string, object given in ... </code></pre> <p>I don't kwnow why i can't use json_decode</p> <p>Any feedback or ideas on how to reach followers_count correctly would be much appreciated.</p> <p>Cheers</p> </div>


<div class="post-text" itemprop="text"> <p>I've got public key generated with GPG tool:</p> <pre><code>-----BEGIN PGP PUBLIC KEY BLOCK----- mQENBFv2qOMBCADOFa70e+02E6ciLUJ51/+EuSab6oYnL8a3mejhvivU+zK9HZ0c mwgnfvyK9UTDfCmS9Zu9hbCN9BUe6FifugDtEv6KWnGe35CxkBIVBNUk3/RX4lLt mCy8am8rPKyHWwFZ9C9Qr+BHQ1l2DfKTYaoDPCIBvRp8bRqo+XqSUWxqL1tGCzsD ncLuJQJnt3VQnSKSqvVDq7S8oE/5/y9auNRPmm4H4hEYf3aHSa/qkc7n1Tw2cZvk r+BNEdWvxgu1PBS+brlBcHtTWvWnirtvRUvzwmwYzF6RpJd3ednjp0Df5+zW6Fdd 3fzCsAI9vyUiLQrqHEMvE9QSoxP2zOUdzeU7ABEBAAG0DlN0YWNrIE92ZXJmbG93 iQFUBBMBCAA+FiEEHvJGBa/lVGCXrMVYybIAkPbvUM4FAlv2qOMCGwMFCQPDm80F CwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQybIAkPbvUM6UEQf/SfFjWNzK42vj u/TrmL485qEeTbRa2fC2CJ3MixCcSIqOSgqxnD22U/77/+/kk7u1aN4baBX8s9PT bL4TA76OHgjFht1ZKNolN7yL677uJvObKmXOkuydTbMzkxE1hRj/RYn00NM9EFlK 5NIP0FhexPjrgKriIL4sTFMJCr2sg69vOa3nibjMTiu+w/VhtbsKjqTxvpgKO2x0 6BZHGDnVnwC9A27Ei/IBqWxB5tLIVZQdyrlX5+BEH5J1ilnIwrCmaY+pJAMDkRze F6fl9uFt5fftvXyekp0/LtHI1NeinV+n/leZZA0cunk6tae9fK11URUuLuW27K30 s400HUrYjbkBDQRb9qjjAQgA7hny1cgPRkxQNgRnj428nhISFlialJ4bhfh7uXRA 0DncDBB0k8FyOuxfzCLSuHU5tHiJi35q8CSIE3smcjP7nMdqy5qEQVXdOAdakM0H WmP/PGwN+gPAT2g3zfpsv/tIiraHSGMyCpeIrVsiHZ5Fo6Uy9cmA5EerwhrmuDca ElN8LWjTSKt29hNYM5C2pHvv3b7gCUWYP8dBoG1DywN0Hh7yFhtwCpEeL8IMoQL+ H2ztVVqg3O4VSH1tnB9exbH/lT/w4/63DY7b4j3yLmwIrLsX8CxqYfboDhPqVOJ7 JSAJYUJcFMnDqTbSOIvjopH4+sAx1fR30U9gdvuhrGidiwARAQABiQE8BBgBCAAm FiEEHvJGBa/lVGCXrMVYybIAkPbvUM4FAlv2qOMCGwwFCQPDm80ACgkQybIAkPbv UM6HAwgAlH5e41vG7spJn9wa5pXH+Ym4co4nxyJkaqbh3OWpIrZzUGx9VCK46dLS e1mNVpRtfCTqHp3BOrvgTQMLzHyPIP+NYBxSC6Rb5Ht8RSjgEPxbQYo/vFDoyTIl UY6Md2cBOE+5rC5jXGOsfqow4edMtKxqGQrBrRR+tHCHiK8jDUtnjVvVgE+P1G/g huWSoGmk5ljnBoEP4UEjLiKujBSexQuu4PN7gE6D76fQiBh4mrPpoTdbga5IL+Yn dgxWkNYVneLWIhEt+n5g8wsRppbXoK3RGBs06sscawC2OekuOMx/748fBBF+JIz9 UUf+6t3SFc83Cn+EX1EuASpGKMexqA== =ObbS -----END PGP PUBLIC KEY BLOCK----- </code></pre> <p>How can I get details of this key in PHP without using gnupg library?</p> </div>


感觉全世界营销文都在推Python,但是找不到工作的话,又有哪个机构会站出来给我推荐工作? 笔者冷静分析多方数据,想跟大家说:关于超越老牌霸主Java,过去几年间Python一直都被寄予厚望。但是事实是虽然上升趋势,但是国内环境下,一时间是无法马上就超越Java的,也可以换句话说:超越Java只是时间问题罢。 太嚣张了会Python的人!找工作拿高薪这么简单? https://edu....


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


分享外包的组织架构,盈利模式,亲身经历,以及根据一些外包朋友的反馈,写了这篇文章 ,希望对正在找工作的老铁有所帮助


何来 我,一个双非本科弟弟,有幸在 19 届的秋招中得到前东家华为(以下简称 hw)的赏识,当时秋招签订就业协议,说是入了某 java bg,之后一系列组织架构调整原因等等让人无法理解的神操作,最终毕业前夕,被通知调往其他 bg 做嵌入式开发(纯 C 语言)。 由于已至于校招末尾,之前拿到的其他 offer 又无法再收回,一时感到无力回天,只得默默接受。 毕业后,直接入职开始了嵌入式苦旅,由于从未...


文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...


今天下午在朋友圈看到很多人都在发github的羊毛,一时没明白是怎么回事。 后来上百度搜索了一下,原来真有这回事,毕竟资源主义的羊毛不少啊,1000刀刷爆了朋友圈!不知道你们的朋友圈有没有看到类似的消息。 这到底是啥情况? 微软开发者平台GitHub 的一个区块链项目 Handshake ,搞了一个招募新会员的活动,面向GitHub 上前 25万名开发者派送 4,246.99 HNS币,大约价...


前言: 如何悄悄的打开朋友的摄像头,看看她最近过的怎么样,嘿嘿!这次让我带你们来实现这个功能。 注: 这个程序仅限在朋友之间开玩笑,别去搞什么违法的事情哦。 代码 发送邮件 使用python内置的email模块即可完成。导入相应的代码封装为一个send函数,顺便导入需要导入的包 注: 下面的代码有三处要修改的地方,两处写的qq邮箱地址,还有一处写的qq邮箱授权码,不知道qq邮箱授权码的可以去百度一...


从来没讲过运维,因为我觉得运维这种东西不需要太多的知识面,然后我一个做了运维朋友告诉我大错特错,他就是从3K的运维一步步到40K的,甚至笑着说:我现在感觉自己什么都能做。 既然讲,就讲最重要的吧。 监控是整个运维乃至整个产品生命周期中最重要的一环,事前及时预警发现故障,事后提供详实的数据用于追查定位问题。目前业界有很多不错的开源产品可供选择。选择一款开源的监控系统,是一个省时省力、效率最高的方...


一、菱形继承 在介绍虚继承之前介绍一下菱形继承 概念:A作为基类,B和C都继承与A。最后一个类D又继承于B和C,这样形式的继承称为菱形继承 菱形继承的缺点: 数据冗余:在D中会保存两份A的内容 访问不明确(二义性):因为D不知道是以B为中介去访问A还是以C为中介去访问A,因此在访问某些成员的时候会发生二义性 缺点的解决: 数据冗余:通过下面“虚继承”技术来解决(见下) 访问...


跳槽几乎是每个人职业生涯的一部分,很多HR说“三年两跳”已经是一个跳槽频繁与否的阈值了,可为什么市面上有很多程序员不到一年就跳槽呢?他们不担心影响履历吗? PayScale之前发布的**《员工最短任期公司排行榜》中,两家码农大厂Amazon和Google**,以1年和1.1年的员工任期中位数分列第二、第四名。 PayScale:员工最短任期公司排行榜 意外的是,任期中位数极小的这两家公司,薪资...



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

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


华为面试整体流程大致分为笔试,性格测试,面试,综合面试,回学校等结果。笔试来说,华为的难度较中等,选择题难度和网易腾讯差不多。最后的代码题,相比下来就简单很多,一共3道题目,前2题很容易就AC,题目已经记不太清楚,不过难度确实不大。最后一题最后提交的代码过了75%的样例,一直没有发现剩下的25%可能存在什么坑。 笔试部分太久远,我就不怎么回忆了。直接将面试。 面试 如果说腾讯的面试是挥金如土...

和黑客斗争的 6 天!

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


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


刚才邻居打了个电话说:喂小灰,你家wifi的密码是多少,我怎么连不上了。 我。。。 我也忘了哎,就找到了一个好办法,分享给大家: 第一种情况:已经连接上的wifi,怎么知道密码? 打开:控制面板\网络和 Internet\网络连接 然后右击wifi连接的无线网卡,选择状态 然后像下图一样: 第二种情况:前提是我不知道啊,但是我以前知道密码。 此时可以利用dos命令了 1、利用netsh wlan...





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



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




女朋友说:“看你最近挺辛苦的,我送你一个礼物吧。你看看想要什么,我来准备。” 我想了半天,从书到鞋子到电子产品最后到生活用品,感觉自己什么都不缺,然后和她说:“你省省钱吧,我什么都不需要。” 她坚持要送:“不行,你一定要说一个礼物,我想送你东西了。” 于是,我认真了起来,拿起手机,上淘宝逛了几分钟,但还是没能想出来缺点什么,最后实在没办法了:“这样吧,如果你实在想送东西,那你就写一个代理服务器吧”...






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




即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...


如果世界上都是这种不思进取的软件公司,那别说大部分程序员只会写 3 年代码,恐怕就没有程序员这种职业。

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

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


阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...