headless

Creating Texture in headless LibGDX unit tests

允我心安 提交于 2019-12-12 09:37:13
问题 I am using the LibGDX headless backend to run jUnit tests. This works well for certain tests, but if I try to create a new Texture('myTexture.png'); , I get a NullPointerException. The exact error is: java.lang.NullPointerException at com.badlogic.gdx.graphics.GLTexture.createGLHandle(GLTexture.java:207) To keep things simple, I created a method that does nothing other than load a texture: public class TextureLoader { public Texture load(){ return new Texture("badlogic.jpg"); } } Then, my

Java headless bicubic image resize

♀尐吖头ヾ 提交于 2019-12-12 08:48:53
问题 I need to perform java image crop and resize without an X server. I tried several methods. the first method below works, but outputs a fairly ugly resized image (probably using nearest neighbor algorithm for the resize: static BufferedImage createResizedCopy(Image originalImage, int scaledWidth, int scaledHeight, boolean preserveAlpha) { int imageType = preserveAlpha ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB; BufferedImage scaledBI = new BufferedImage(scaledWidth,

Using octave headless

风流意气都作罢 提交于 2019-12-12 08:39:58
问题 Is there a possibility to use Octave headless. Something like this octave < "5+4" >result.txt 回答1: Using octave --silent --eval 5+4 > result.txt you'll get ans = 9 in result.txt . See octave --help for details about command-line arguments. Yet, there is this infamous ans = that might be remove using sed , e.g. octave --silent --eval 'x=5+4; y=x+1; disp(y)' | sed -e 's/ans = //' >> result.txt which add the appropriate result ( 10 ) in result.txt . It should not be too hard to wrap this into a

MapReduce job in headless environment fails N times due to AM Container exception from container-launch

六月ゝ 毕业季﹏ 提交于 2019-12-12 07:59:39
问题 When running a map reduce job in a headless environment in MacOSX (e.g., when running jobs when ssh'ed as a particular user), I get the following exception or something like it… 2013-12-04 15:08:28,513 WARN org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger: USER=hadoop OPERATION=Application Finished - Failed TARGET=RMAppManager RESULT=FAILURE DESCRIPTION=App failed with state: FAILED PERMISSIONS=Application application_1386194876944_0001 failed 2 times due to AM Container for

Headless webkit wrapper/driver no install for .net

岁酱吖の 提交于 2019-12-12 04:12:17
问题 I'm looking for an embedded headless browser for .net with the following properties: Modern Webkit level of Ajax/HTML5 support and preferably webkit based Headless mode capable (no visible browser), more speed it better Zero install (something like browser.exe and a c# wrapper DLL copied into the project) Reliable for production usage for basic tasks (like screen shots of complex pages), I'm not looking for 99.9999 reliability here, but it needs to be stabler and faster than Selenium, we have

Xvfb image buffering provokes java.awt.Headless exception

ぃ、小莉子 提交于 2019-12-12 03:43:36
问题 My java webapp hosted within a tomcat 7.0.39 needs xvbf to write into images and output them to the client. When I open the servlet which handles the image writing I get the following error message: 15.05.2013 21:24:56 org.apache.catalina.core.ApplicationContext log SCHWERWIEGEND: StandardWrapper.Throwable java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159) at java.awt.Window.<init>(Window.java:414) at java.awt.Frame.<init>(Frame.java:403) at

Limit chrome headless CPU and memory usage

≡放荡痞女 提交于 2019-12-11 17:19:26
问题 I am using selenium to run chrome headless with the following command: system "LC_ALL=C google-chrome --headless --enable-logging --hide-scrollbars --remote-debugging-port=#{debug_port} --remote-debugging-address=0.0.0.0 --disable-gpu --no-sandbox --ignore-certificate-errors &" However it appears that chrome headless is consuming too much memory and cpu,anyone know how we can limit CPU/Memory usage of chrome headless? Or if there is some workaround. Thanks in advance. 回答1: There had been a

Using Selenium, is there another, more reliable, way to use click command on an element in Headless Chrome?

自作多情 提交于 2019-12-11 16:39:37
问题 After 2 days of struggling with an erratic click() command issue in Headless Chrome - in my case an Anchor (a) element with a href tag - and going through various threads advice about chromeOptions (--start-maximized, --window-size, etc...), and trying 12 different ways ( with sendKeys and Actions, and even submit() ) to work around the click() with no success... Using ChromeDriver 77.0, Chrome 77.0.3865.75 and Selenium 3.141.59, my tests are stable in Chrome and they're unstable in Headless

Python Selenium with ChromeDriver Headless: Fails To Start— “DevTools request failed”

拜拜、爱过 提交于 2019-12-11 06:04:44
问题 I've got this running on my Macbook Pro, so in an attempt to transfer it to my server for prolonged use, I have run into a snag. Server is Ubuntu 16.04 (server) and Python 2.7.12. I installed the latest version of selenium using pip, and the latest version of ChromeDriver. I can start it fine from the command line (there is a GPU error but it seems not to cause any problems.) However, when I try to start it from within python, using this code: from selenium import webdriver from selenium

“No X11 DISPLAY variable” - what does it mean?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 05:56:05
问题 I am trying to install a Java application on my Linux machine (Slackware). I have received the following error, and I do not understand it. Could you advise me how to approach the problem? Thank you. Here is what I get: (I see that some X11 DISPLAY variable needs to be set, but what value should I give it and how?) ~$ java -jar gate-5.0-beta1-build3048-installer.jar - ERROR - java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it