fo

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

匿名 (未验证) 提交于 2019-12-03 02:18:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The following code: Class.forName("com.mysql.jdbc.Driver"); Connection m_connection = DriverManager.getConnection("jdbc:mysql://localhost","root","root"); Throws this exception on getConnection() : java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919) at com

Safari and IE can't read TTF and EOT fonts

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have trouble reading a font in Safari. I converted OTF to TTF - two bold and regular fonts. Both are fine in Chrome and Firefox. But in Safari, only the bold font is works, regular does not. IE does not read the EOT font which I have converted from a website. Is there any better way to convert OTF to EOT? Here is my code: <style type = "text/css" > //Bariol_Bold @font - face { font - family : Bariol_Bold ; src : url ( "fonts/bariol_bold.eot" ); /*For ie browser*/ } @font - face { font - family : Bariol_Bold ; src : url ( "fonts

Why does Browser still sends request for cache-control public with max-age?

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have Amazon S3 objects, and for each object, I have set Cache-Control: public, max-age=3600000 That is roughly 41 days. And I have Amazon CloudFront Distribution set with Minimum TTL also with 3600000. This is the first request after clearing cache. GET /1.0.8/web-atoms.js HTTP/1.1 Host: d3bhjcyci8s9i2.cloudfront.net Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 Accept-Encoding:

How to add sourcemap in React Native for Production?

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I received error log like the following while the app crashed: Fatal Exception: com.facebook.react.modules.core.JavascriptException: onSelect index.android.bundle:20:7148 onPress index.android.bundle:20:2435 But it's not really helpful for me to trouble shoot. How could I enable source map so that I could track down where the issue is ? UPDATE 2018 https://docs.expo.io/versions/latest/guides/using-sentry.html Looks promising ! 回答1: For source mapping here is the way I go about it: In my bundle command for my production build I tell it to

PHPExcel - Error Cyclic Reference in Formula

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I keep reciving this error "Cyclic Reference in Formula". When I am trying to download my excel file. Now when im deleting the '=' from formula's from my file $this -> exportObj -> setActiveSheetIndex ( 0 ) -> setCellValue ( strtoupper ( $this -> abc [ $currentColumn ]). $currentLine , ( str_replace ( "=" , "" , $column )) ); I can download the file but ofcourse the formala won't work.. This is my excel file: http://www.2shared.com/document/SPtnvq6e/excel.html What is wrong with my formulas there? I cant see anything that I'm doing

Angular 2 Material 2 datepicker date format

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need help. I don't know how to change the date format of the material 2 datepicker. I've read documentation but I don't understand what I actually need to do. Output date format which datepicker provides by default is f.e.: 6/9/2017 What I'm trying to achieve is to change format to the 9-Jun-2017 or any other. Documentation https://material.angular.io/components/component/datepicker doesn't help me at all. Thanks in advance 回答1: Here is the only solution I found for this one: First, create const: const MY_DATE_FORMATS = { parse: {

Error: Nonnegative width required in format string at (1)

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to compile a piece of code with gfortran and it's failing with the following error: Error: Nonnegative width required in format string at (1) ../src/powmes.f90:410.20: write(lunit,'(I,E,E,E)') wavenum(k),power(k),nmodes(k),errorexpan(k) 414 if (filepower_fold(1:1) /= '#') then 415 fileout=trim(filepower_fold)//'.waven' 416 if (verbose) write(*,*) 'Output '//trim(fileout) 417 open(file=fileout,form='formatted',status='unknown',unit=lunit,err=2) 418 do k=0,ngrid/2 419 do ifold=0,nfoldpow-1 420 write(lunit,'(I,$)') waven(k,ifold) 421

How to calculate WPF TextBlock width for its known font size and characters?

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Let's say I have TextBlock with text "Some Text" and font size 10.0 . How I can calculate appropriate TextBlock width ? 回答1: Use the FormattedText class. I made a helper function in my code: private Size MeasureString(string candidate) { var formattedText = new FormattedText( candidate, CultureInfo.CurrentCulture, FlowDirection.LeftToRight, new Typeface(this.textBlock.FontFamily, this.textBlock.FontStyle, this.textBlock.FontWeight, this.textBlock.FontStretch), this.textBlock.FontSize, Brushes.Black, new NumberSubstitution(), 1); return new

Is it possible to implement a Python for range loop without an iterator variable?

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to do following without the i ? for i in range(some_number): # do something If you just want to do something N amount of times and don't need the iterator. 回答1: Off the top of my head, no. I think the best you could do is something like this: def loop(f,n): for i in xrange(n): f() loop(lambda: , 5) But I think you can just live with the extra i variable. Here is the option to use the _ variable, which in reality, is just another variable. for _ in range(n): do_something() Note that _ is assigned the last result that returned

Where is Python&#039;s “best ASCII for this Unicode” database?

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have some text that uses Unicode punctuation, like left double quote, right single quote for apostrophe, and so on, and I need it in ASCII. Does Python have a database of these characters with obvious ASCII substitutes so I can do better than turning them all into "?" ? 回答1: Unidecode looks like a complete solution. It converts fancy quotes to ascii quotes, accented latin characters to unaccented and even attempts transliteration to deal with characters that don't have ASCII equivalents. That way your users don't have to see a bunch of ?