小编Fut*_*ing的帖子

TypeError:'str'不支持缓冲区接口

plaintext = input("Please enter the text you want to compress")
filename = input("Please enter the desired filename")
with gzip.open(filename + ".gz", "wb") as outfile:
    outfile.write(plaintext) 
Run Code Online (Sandbox Code Playgroud)

上面的python代码给出了以下错误:

Traceback (most recent call last):
  File "C:/Users/Ankur Gupta/Desktop/Python_works/gzip_work1.py", line 33, in <module>
    compress_string()
  File "C:/Users/Ankur Gupta/Desktop/Python_works/gzip_work1.py", line 15, in compress_string
    outfile.write(plaintext)
  File "C:\Python32\lib\gzip.py", line 312, in write
    self.crc = zlib.crc32(data, self.crc) & 0xffffffff
TypeError: 'str' does not support the buffer interface
Run Code Online (Sandbox Code Playgroud)

python string gzip

263
推荐指数
5
解决办法
33万
查看次数

拆分字符串的每个字符?

我想将一个字符串拆分成每个单个字符.例如:分裂:"Geeta" to "G", "e", "e" , "t", "a" 我该怎么做?我想分割一个没有任何分隔符的字符串请帮忙.

c# string split

22
推荐指数
3
解决办法
5万
查看次数

通过php查找一周的第一天

可能重复:
获取PHP中的第一天?

嗨,

我想查找本周和上周的第一个和最后一个日期.同样,我想查找当月和上个月的第一个和最后一个日期.

这必须在PHP中完成.请帮忙.

php datetime date

13
推荐指数
1
解决办法
3万
查看次数

Netbeans:java.lang.UnsatisfiedLinkError:java.library.path 中没有启动画面:

我正在尝试启动 Netbeans,但它没有打开。我也尝试使用命令行。但是在命令行中我收到以下错误:

java.lang.UnsatisfiedLinkError: no splashscreen in java.library.path: [/usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib/jni, /lib, /usr/lib]
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:806)
    at java.base/java.lang.System.loadLibrary(System.java:1909)
    at java.desktop/java.awt.SplashScreen$1.run(SplashScreen.java:134)
    at java.desktop/java.awt.SplashScreen$1.run(SplashScreen.java:132)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
    at java.desktop/java.awt.SplashScreen.getSplashScreen(SplashScreen.java:131)
    at org.netbeans.core.startup.Splash.<init>(Splash.java:122)
    at org.netbeans.core.startup.Splash.getInstance(Splash.java:60)
    at org.netbeans.core.startup.Main.start(Main.java:271)
    at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
    at java.base/java.lang.Thread.run(Thread.java:830)
Run Code Online (Sandbox Code Playgroud)

java netbeans

5
推荐指数
2
解决办法
5396
查看次数

如何从MySql中的Url中获取域名

可能重复:
我们如何使用MySQL和正则表达式查找域名

我的db表有一个名为url的列,其中包含以下信息:http : //xyz.com/cat/index/ page = 2 http://www.google.com/webmaster.php http://yahoo.com/ dsdsd/category.aspx

我想获取他们的域名,如:xyz.com google.com yahoo.com

我应该如何在mysql中编写查询以获得上述结果.

请帮忙.

mysql

4
推荐指数
1
解决办法
1862
查看次数

Katalon Studio 未启动

我有 OpenJDK8 和 OpenJDK13。但我无法启动 Katalon Studio。这是日志:

我听说 Katalon 工作室需要 OpenJDK8。有什么方法可以将 katalon studio 定位到 OpenJDK8?

!SESSION 2020-02-29 11:38:44.943 -----------------------------------------------
eclipse.buildId=unknown
java.version=13
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_IN
Command-line arguments:  -os linux -ws gtk -arch x86_64 -data @noDefault

!ENTRY org.eclipse.osgi 4 0 2020-02-29 11:38:49.894
!MESSAGE An error occurred while automatically activating bundle com.kms.katalon.application (27).
!STACK 0
org.osgi.framework.BundleException: Exception in com.kms.katalon.application.KatalonApplicationActivator.start() of bundle com.kms.katalon.application.
    at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:795)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:932)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
    at org.eclipse.osgi.container.Module.doStart(Module.java:581)
    at org.eclipse.osgi.container.Module.start(Module.java:449)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470)
    at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    at …
Run Code Online (Sandbox Code Playgroud)

java eclipse katalon-studio

0
推荐指数
1
解决办法
728
查看次数

标签 统计

java ×2

string ×2

c# ×1

date ×1

datetime ×1

eclipse ×1

gzip ×1

katalon-studio ×1

mysql ×1

netbeans ×1

php ×1

python ×1

split ×1