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) 我想将一个字符串拆分成每个单个字符.例如:分裂:"Geeta" to "G", "e", "e" , "t", "a"
我该怎么做?我想分割一个没有任何分隔符的字符串请帮忙.
我正在尝试启动 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) 可能重复:
我们如何使用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中编写查询以获得上述结果.
请帮忙.
我有 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)