我想使用openssl加密文件.我可以通过使用来做到这一点
openssl des3 -salt -in /pritom/uaeyha_com.sql -out /pritom/a.ss
Run Code Online (Sandbox Code Playgroud)
当我运行此命令时,它会从我那里获取密码两次.我想用脚本设置密码,我用过
openssl des3 -salt -in /pritom/uaeyha_com.sql -out /pritom/a.ss -pass pritom
Run Code Online (Sandbox Code Playgroud)
但它给了我以下错误:
Invalid password argument "pritom"
Error getting password
Run Code Online (Sandbox Code Playgroud)
我现在能做什么?
我有几种方法可以从stackoverflow和google将php数组转换为csv字符串.但是我遇到麻烦,如果我想存储01727499452等手机号码,它会保存为没有前0值.我目前正在使用这段代码: 将数组转换为csv
谁能帮帮我吗.
Array
[1] => Array
(
[0] => Lalu ' " ; \\ Kumar
[1] => Mondal
[2] => 01934298345
[3] =>
)
[2] => Array
(
[0] => Pritom
[1] => Kumar Mondal
[2] => 01727499452
[3] => Bit Mascot
)
[3] => Array
(
[0] => Pritom
[1] => Kumar Mondal
[2] => 01711511149
[3] =>
)
[4] => Array
(
[0] => Raaz
[1] => Mukherzee
[2] => 01911224589
[3] => Khulna University 06
) …Run Code Online (Sandbox Code Playgroud) 我想使用java代码播放.wav文件,该代码位于jar文件中作为资源.我的代码看起来像这样 -
try {
URL defaultSound = getClass().getResource("/images/ads/WindowsNavigationStart.wav");
// getClass().getSy.getResource("/images/ads/WindowsNavigationStart.wav");
File soundFile = new File(defaultSound.toURI());
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(soundFile);
Clip clip = AudioSystem.getClip();
clip.open(audioInputStream);
clip.start( );
} catch (Exception ex) {
ex.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
WindowsNavigationStart.wav文件存在于我的一个jar文件中.但得到以下例外 -
java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.<init>(File.java:363)
at au.com.webscan.wwwizard.app.admin.customfile.UpOneLevelFolder.btnUpFolderActionPerformed(Unknown Source)
at au.com.webscan.wwwizard.app.admin.customfile.UpOneLevelFolder.access$000(Unknown Source)
at au.com.webscan.wwwizard.app.admin.customfile.UpOneLevelFolder$1.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at …Run Code Online (Sandbox Code Playgroud) 我有一个java应用程序,想在mysql数据库中插入阿拉伯语单词,我的代码看起来像
Connection con = null;
String url = "jdbc:mysql://localhost/";
String db = "students";
String driver = "com.mysql.jdbc.Driver";
try {
Class.forName(driver);
con = DriverManager.getConnection(url+db,"root","");
Statement st = con.createStatement();
String name = new String(txtName.getText().getBytes(), "UTF-8");
int val = st.executeUpdate("insert into student(name, roll) VALUES('"+name+"','"+txtRoll.getText()+"')");
} catch (Exception ex) {
ex.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
但它只插入'??????'.我现在能做什么?
假设我的文件a.conf如下
Include /1
Include /2
Include /3
Run Code Online (Sandbox Code Playgroud)
我想用新行替换"Include/2",我在.sh文件中编写代码:
line="Include /2"
rep=""
sed -e "s/${line}/${rep}/g" /root/new_scripts/a.conf
Run Code Online (Sandbox Code Playgroud)
但运行sh文件后,它给我以下错误
sed: -e expression #1, char 14: unknown option to `s'
Run Code Online (Sandbox Code Playgroud) 我创建了一个facebook应用程序.这对我来说可以.但我的问题是始终显示垂直和水平滚动条,当我从Facebook设置使用流体的页面的宽度和高度.我的页面看起来像这个http://karen.webmascot.com/fb/fbone.jpg.我现在能做什么?
我在.sh文件中编写代码并运行它...
die () {
echo >&2 "$@"
exit 1
}
[ "$#" -eq 2 ] || die "2 argument required, $# provided"
echo $2 | grep -E -q '^[0-9]+$' || die "Numeric argument required, $2 provided"
nfile_location = /home/virtual/$1
if [ -f $nfile_location ];
then
chmod -R $2 $nfile_location
echo "Set permission";
exit 1;
else
echo "Not a correct file";
exit 1;
fi
Run Code Online (Sandbox Code Playgroud)
但它不起作用.它显示以下错误,我无法理解,因为我是bash脚本的新手.
/root/new_scripts/setpermission.sh: line 11: nfile_location: command not found
chmod: missing operand after `777'
Try `chmod --help' for …Run Code Online (Sandbox Code Playgroud)