work

g++ on MacOSX doesn't work with -arch ppc64

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to build a Universal binary on MacOSX with g++. However, it doesn't really work. I have tried with this simple dummy code: #include <iostream> using namespace std ; int main () { cout << "Hello" << endl ; } This works fine: % g ++ test . cpp - arch i386 - arch ppc - arch x86_64 - o test % file test test : Mach - O universal binary with 3 architectures test ( for architecture i386 ): Mach - O executable i386 test ( for architecture ppc7400 ): Mach - O executable ppc test ( for architecture x86_64 ): Mach - O 64 - bit

Does window.print() work in all versions of Safari on iPad?

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a few questions regarding Print used in iPad Safari ( window.print() ) Does the same JS method print() work in iPad Safari without needing any update? Do we need to add the printer initially? Does the iOS version matter for AirPrint? In my page, I am using window.print() and it does not even give any popup or even any error. Nothing happens at all. I’m testing on iOS 3.2. Please help. Thank you. 回答1: Not sure about 1. and 2., but as for 3.: To use AirPrint, you need one of the following devices running iOS 4.2 or later (Emphasis mine

jax-ws web service does not work in websphere 8.5

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Been trying to get jax-ws web service working in websphere 8.5 but no success. I have tried Java bean & war packaging, stateless ejb & jar packaging but it just does not work. I am trying to get it work with @webservice annotation. I am not generating any extra artifacts. I am letting websphere figure out during the deployment. During deployment there is no error. After deployment, I try to run wsdl in the browser to see if web service is installed successfully but I get nothing. Not sure if I am doing something wrong during the deployment

Wildcard not working in subprocess call using shlex

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Language: Python v2.6.2 OS: AIX 5.3 I'm using Python to restore some files from a backup to a test system - all commands are called in the manner below, however some just plain don't want to work. #!/usr/bin/python import subprocess, shlex cmd = 'sudo rm -rf /work/TEST/*' arg = shlex.split(cmd) # This does not work p = subprocess.Popen(arg) # This, however, works just fine p = subprocess.Popen(cmd, shell=True) If I remove the *'s from the commands they work fine (well, they work as they should without the wildcards, which is unfortauntely

GIT Bash - how to default to other directory instead of home directory

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am developing on a windows machine. The only place I need for linux command line is Git Bash. The problem is: When I open it, I am in the home directory. I have to change the directory to my workspace, like: cd ../../../d/work_space_for_my_company/project/code_source Can I wrap this in a .sh file so I don't have to hand-type it anymore? This should be simple but I have zero knowledge about Linux command line. I am really appreciated If you can walk me through how to create that .sh file. 回答1: Just write that line to a file "cd.sh", then do

CSS custom cursor doesn&#039;t work in FF/Chrome

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to create a custom cursor using the following image: http://anuary.com/dev/hp/pad3/public/images/hand-cursor.png The image size must be retained. I've tried simply to use body { cursor: url('http://anuary.com/dev/hp/pad3/public/images/hand-cursor.png'); } , though that doesn't work in FF/Chrome. (not even checking other browsers) What's the reason for it not working? 回答1: The problem is not just with your css code lacking second argument but with the image file. If you simply resize, make it smaller (i tried 32px for testing

Android Emulator does not work on Ubuntu after upgrading Android Studio to 2.0 - Qt library not found

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Today, I updgraded my Android Studio installation to version 2.0. I updated it manually (download the .zip, because the update mechanism just telled me that there is a new version but offered no possibility for direct update in Android Studio). When I now try to start an emulator, I receive this error message: ERROR:./android/qt/qt_setup.cpp:33:Qt library not found at /home/kcd/Android/Sdk/tools/lib/qt/lib Could not launch '/home/kcd/Android/Sdk/tools/qemu/linux-x86/qemu-system-x86_64': No such file or directory I checked this directory and

ImageIO.write bmp does not work

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to save an image in bmp format, but it doesn't create any file. If I use "png" instead, everything works fine. Any ideas? //This works fine: ImageIO.write(bi, "png", new File("D:\\MyImage.png")); //This does not work: ImageIO.write(bi, "bmp", new File("D:\\MyImage.bmp")); ImageIO.getWriterFormatNames() gives me "jpg", "bmp", "jpeg" and some others.. Thanks in advance. Jakob 回答1: I just finished debugging a similar problem and I thought I will present my reasoning here, although Jakob has gone ahead with the PNG format. First,

how to make xsl tokenize work

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a huge xsl file but the section where i use "tokenize" to parse through a comma separated string is throwing an error. For simplicity purposes I have broke it down to just test the tokenize piece only and cannot seem to make any progress. I keep getting the following error: Expression expected. tokenize(-->[<--text],',') I tried using some example xsl shared in other posts but never managed to get it to work. I am having a difficult time understanding why my xsl code below is not valid. It seems t be very straightforward but

Strtotime() doesn&#039;t work with dd/mm/YYYY format

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I really like the strtotime() function, but the user manual doesn't give a complete description of the supported date formats. strtotime('dd/mm/YYYY') doesn't work, it works only with mm/dd/YYYY format. If I have date in dd/mm/YYYY format, how can I convert it to YYYY-mm-dd ? I can do it by using explode() function, but I think there are better solutions. 回答1: Here is the simplified solution: $date = '25/05/2010'; $date = str_replace('/', '-', $date); echo date('Y-m-d', strtotime($date)); Result: 2010-05-25 The strtotime documentation reads: