freebsd

Using a numbered file descriptor from Java

给你一囗甜甜゛ 提交于 2019-12-20 09:55:33
问题 I need to access numbered file descriptors from Java -- other than 0, 1 or 2. How can this be done? I looked at the FileDescriptor class but did'nt find any way to initialize it with a given file descriptor number. As a concrete example lets suppose Java gets called as a child process from another programing language. File descriptors 3 and 4 are provided by the other language for input and output. What I need in Java are InputStream and OutputStream objects connected to these file

Nodejs v0.10.x (freebsd) “X509_STORE_add_cert:cert already in hash table”

时光毁灭记忆、已成空白 提交于 2019-12-20 04:16:34
问题 I'm work with async web api and have a problem in nodejs version higer than v0.8.9 $ uname -a FreeBSD home 9.1-STABLE FreeBSD 9.1-STABLE #0: Fri Feb 1 10:38:27 EET 2013 root@home:/usr/obj/usr/src/sys/HOME amd64 $ node -v v0.10.0 $ node ./client.js events.js:72 throw er; // Unhandled 'error' event ^ Error: 34401711104:error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert already in hash table:../deps/openssl/openssl/crypto/x509/x509_lu.c:357: 34401711104:error:0B07C065:x509

How to add a greek character in png file created by gnuplot

走远了吗. 提交于 2019-12-19 10:02:06
问题 I am using a commercial sever with FreeBSD system without root account. I install gnuplot with my account. But, I can not set up fonts. So, I copy the fonts files in my home directory such as ~/usr/fonts Then, I use followed scripts in my gnuplot files: set term png enhanced font '/home/Tom/usr/fonts/truetype/msttcorefonts/verdana.ttf' set out 'xrd.png' set xlabel '2 {/Symbol q}'; set ylabel 'Count'; set xrange [:]; set yrange [:]; unset key; set border lw 1; plot './data.txt' using 1:2 with

How to add a greek character in png file created by gnuplot

我们两清 提交于 2019-12-19 10:00:11
问题 I am using a commercial sever with FreeBSD system without root account. I install gnuplot with my account. But, I can not set up fonts. So, I copy the fonts files in my home directory such as ~/usr/fonts Then, I use followed scripts in my gnuplot files: set term png enhanced font '/home/Tom/usr/fonts/truetype/msttcorefonts/verdana.ttf' set out 'xrd.png' set xlabel '2 {/Symbol q}'; set ylabel 'Count'; set xrange [:]; set yrange [:]; unset key; set border lw 1; plot './data.txt' using 1:2 with

Insert newline (\n) using sed

假如想象 提交于 2019-12-19 05:12:25
问题 I am trying to scrub some lists into a properly formatted CSV file for database import. My starting file, looks something like this with what is supposed to be each "line" spanning multiple lines like below Mr. John Doe Exclusively Stuff, 186 Caravelle Drive, Ponte Vedra 33487. I created a sed script that cleans up the the file (there's lots of "dirty" formatting like double spaces and spaces before/after commas). The problem is the Zip with the period. I would like to change that period for

Bloated echo command

做~自己de王妃 提交于 2019-12-18 11:57:25
问题 Look at the following implementations of the "echo" command: http://bxr.su/o/bin/echo/echo.c (OpenBSD) http://bxr.su/d/bin/echo/echo.c (DragonFly) http://bxr.su/n/bin/echo/echo.c (NetBSD) http://bxr.su/f/bin/echo/echo.c (FreeBSD) http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/echo.c (GNU) As you go down the list, I'm sure you'll notice the increasing bloat in each implementation. What is the point of a 272 line echo program? 回答1: In their article 'Program Design in the UNIX

php upload file error code 3

风格不统一 提交于 2019-12-18 08:47:21
问题 Upload bigger file( > 10KB) will get error code 3(UPLOAD_ERR_PARTIAL) in $_FILES['file']['error'] and small file( < 10KB) will upload successfully. If the file exceed the limit php post_max_size or upload_max_filesize , it should get error code 1 UPLOAD_ERR_INI_SIZE . However, getting error code 3 UPLOAD_ERR_PARTIAL which is incorrect . I guess it has something wrong with apache setting , and have no idea how to solve this problem. Using below software and its versions php 5.6.17 apache 2.4

Equivalent for GCC's naked attribute

我的未来我决定 提交于 2019-12-18 02:47:06
问题 I've got an application written in pure C, mixed with some functions that contain pure ASM. Naked attribute isn't available for x86 (why? why?!) and my asm functions don't like when prologue and epilogue is messing with the stack. Is it somehow possible to create a pure assembler function that can be referenced from C code parts? I simply need the address of such ASM function. 回答1: Just use asm() outside a function block. The argument of asm() is simply ignored by the compiler and passed

Running a python script as a cron job in FreeBSD

点点圈 提交于 2019-12-17 21:37:13
问题 I'm new to freeBSD. I just set up a server and installed python 3.6. Now i want to have a python script run every day at 15h00, so i tried to set up a cron task. But in some way, the cron task never runs or is giving me errors. Since cron uses mail to report errors and mail doesn't seem to be installed on my server, I have no clue whether the script actually runs or is not running at all. The line added in /etc/crontab is the following: 0 15 * * * root /usr/local/bin/python3.6 /root/myscript

PCRE is compiled without UTF support

妖精的绣舞 提交于 2019-12-17 20:21:31
问题 everyone! FreeBSD noobie looking for some help with integration of PCRE and Apache with mod_php. What I have: FreeBSD 8.2-RELEASE-p3 Apache/2.2.22 (FreeBSD, built from ports) PHP 5.3.10 with Suhosin-Patch (cli) (built: Apr 6 2012 02:58:27) (not from ports) PCRE version 8.30 2012-02-04 Compiled with 8-bit support only UTF-8 support Unicode properties support No just-in-time compiler support Newline sequence is LF \R matches all Unicode newlines Internal link size = 2 POSIX malloc threshold =