Search Results

Search found 770 results on 31 pages for 'ar mailer'.

Page 18/31 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Is there any way to kill a zombie process without reboot?

    - by Pedram
    Is there any way to kill a zombie process without reboot?Here is how it happens: I wanted to download a 12GB torrent.After adding the .torrent file, transmission turned into a zombie process.I tried ktorrent too.Same behavior.Finally I could download the file using µTorrent but after closing the program, it turns into a zombie as well. I tried using kill skill and pkill with different options and -9 signal but no success. In some answers in web I found out killing the parent can kill the zombie, but killing wine didn't help either. Is there another way? Edit: ps -o pid,ppid,stat,comm PID PPID STAT COMMAND 7121 2692 Ss bash 7317 7121 R+ ps pstree output: init---GoogleTalkPlugi---4*[{GoogleTalkPlug}] +-NetworkManager---dhclient ¦ +-{NetworkManager} +-acpid +-apache2---5*[apache2] +-atd +-avahi-daemon---avahi-daemon +-bonobo-activati---{bonobo-activat} +-clock-applet +-console-kit-dae---63*[{console-kit-da}] +-cron +-cupsd +-2*[dbus-daemon] +-2*[dbus-launch] +-desktopcouch-se---desktopcouch-se +-explorer.exe +-firefox---run-mozilla.sh---firefox-bin---plugin-containe---8*[{plugin-contain}] ¦ +-14*[{firefox-bin}] +-gconfd-2 +-gdm-binary---gdm-simple-slav---Xorg ¦ ¦ +-gdm-session-wor---gnome-session---bluetooth-apple ¦ ¦ ¦ ¦ +-fusion-icon---compiz---sh---gtk-window-deco ¦ ¦ ¦ ¦ +-gdu-notificatio ¦ ¦ ¦ ¦ +-gnome-panel ¦ ¦ ¦ ¦ +-gnome-power-man ¦ ¦ ¦ ¦ +-gpg-agent ¦ ¦ ¦ ¦ +-nautilus---bash ¦ ¦ ¦ ¦ ¦ +-{nautilus} ¦ ¦ ¦ ¦ +-nm-applet ¦ ¦ ¦ ¦ +-polkit-gnome-au ¦ ¦ ¦ ¦ +-2*[python] ¦ ¦ ¦ ¦ +-qstardict---{qstardict} ¦ ¦ ¦ ¦ +-ssh-agent ¦ ¦ ¦ ¦ +-tracker-applet ¦ ¦ ¦ ¦ +-trackerd ¦ ¦ ¦ ¦ +-wakoopa---wakoopa ¦ ¦ ¦ ¦ ¦ +-3*[{wakoopa}] ¦ ¦ ¦ ¦ +-{gnome-session} ¦ ¦ ¦ +-{gdm-session-wo} ¦ ¦ +-{gdm-simple-sla} ¦ +-{gdm-binary} +-6*[getty] +-gnome-keyring-d---2*[{gnome-keyring-}] +-gnome-screensav +-gnome-settings- +-gnome-system-mo---{gnome-system-m} +-gnome-terminal---bash---ssh ¦ +-bash---pstree ¦ +-gnome-pty-helpe ¦ +-{gnome-terminal} +-gvfs-afc-volume---{gvfs-afc-volum} +-gvfs-fuse-daemo---3*[{gvfs-fuse-daem}] +-gvfs-gdu-volume +-gvfsd +-gvfsd-burn +-gvfsd-http +-gvfsd-metadata +-gvfsd-trash +-hald---hald-runner---hald-addon-acpi ¦ ¦ +-hald-addon-cpuf ¦ ¦ +-hald-addon-inpu ¦ ¦ +-hald-addon-stor ¦ +-{hald} +-hotot---xdg-open ¦ +-3*[{hotot}] +-indicator-apple +-indicator-me-se +-indicator-sessi +-irqbalance +-kded4 +-kdeinit4---kio_http_cache_ ¦ +-klauncher +-kglobalaccel +-knotify4 +-modem-manager +-multiload-apple +-mysqld---10*[{mysqld}] +-named---10*[{named}] +-nmbd +-notification-ar +-notify-osd +-pidgin---{pidgin} +-polkitd +-pulseaudio---gconf-helper ¦ +-2*[{pulseaudio}] +-rsyslogd---2*[{rsyslogd}] +-rtkit-daemon---2*[{rtkit-daemon}] +-services.exe---plugplay.exe---2*[{plugplay.exe}] ¦ +-winedevice.exe---3*[{winedevice.exe}] ¦ +-3*[{services.exe}] +-smbd---smbd +-snmpd +-sshd +-timidity +-trashapplet +-udevd---2*[udevd] +-udisks-daemon---udisks-daemon ¦ +-{udisks-daemon} +-upowerd +-upstart-udev-br +-utorrent.exe---8*[winemenubuilder] ¦ +-{utorrent.exe} +-vnstatd +-winbindd---2*[winbindd] +-2*[winemenubuilder] +-wineserver +-wnck-applet +-wpa_supplicant +-xinetd System monitor and top screenshots which show the zombie process is using resources:

    Read the article

  • How to install custom c library?

    - by arijit
    I just wanted to add a c library to Ubuntu which was created by Harvard University for cs50 course. They provided instructions for how to install the library which is listed below. Debian, Ubuntu First become root, as with: sudo su - Then install the CS50 Library as follows: apt-get install gcc wget http://mirror.cs50.net/library/c/cs50-library-c-3.1.zip unzip cs50-library-c-3.1.zip rm -f cs50-library-c-3.1.zip cd cs50-library-c-3.1 gcc -c -ggdb -std=c99 cs50.c -o cs50.o ar rcs libcs50.a cs50.o chmod 0644 cs50.h libcs50.a mkdir -p /usr/local/include chmod 0755 /usr/local/include mv -f cs50.h /usr/local/include mkdir -p /usr/local/lib chmod 0755 /usr/local/lib mv -f libcs50.a /usr/local/lib cd .. rm -rf cs50-library-c-3.1 I did exactly as directed. But the compiler reported “Undefined reference to a function”--the function was Get String. So, I searched for a solution and found one. It said to use the -l switch. Now when I compile I use something like: gcc –o hello.c hello –lcs50 (I don’t remember the exact command.) However, I cannot use the make command, which is easier to use. I understand that there is some problem with linking the library. What is a good solution to this problem?

    Read the article

  • How to install SpatiaLite 3 on 12.04

    - by Terra
    1) sudo apt-get install libsqlite3-dev libgeos-dev 2) libspatialite-3.0.0-stable$ ./configure Result: configure: error: cannot find proj_api.h, bailing out checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for stdlib.h... (cached) yes checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking for string.h... (cached) yes checking for memory.h... (cached) yes checking math.h usability... yes checking math.h presence... yes checking for math.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for inttypes.h... (cached) yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdint.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking sqlite3.h usability... yes checking sqlite3.h presence... yes checking for sqlite3.h... yes checking sqlite3ext.h usability... yes checking sqlite3ext.h presence... yes checking for sqlite3ext.h... yes checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... no checking for cxx... no checking for cc++... no checking for cl.exe... no checking for FCC... no checking for KCC... no checking for RCC... no checking for xlC_r... no checking for xlC... no checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking dependency style of g++... none checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking how to run the C preprocessor... gcc -E checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... dlltool checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for an ANSI C-conforming const... yes checking for off_t... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for working volatile... yes checking whether lstat correctly handles trailing slash... yes checking whether lstat accepts an empty string... no checking whether lstat correctly handles trailing slash... (cached) yes checking for working memcmp... yes checking whether stat accepts an empty string... no checking for strftime... yes checking for memset... yes checking for sqrt... no checking for strcasecmp... yes checking for strerror... yes checking for strncasecmp... yes checking for strstr... yes checking for fdatasync... yes checking for ftruncate... yes checking for getcwd... yes checking for gettimeofday... yes checking for localtime_r... yes checking for memmove... yes checking for strerror... (cached) yes checking for sqlite3_prepare_v2 in -lsqlite3... yes checking for sqlite3_rtree_geometry_callback in -lsqlite3... yes checking proj_api.h usability... no checking proj_api.h presence... no checking for proj_api.h... no configure: error: cannot find proj_api.h, bailing out

    Read the article

  • Update usb Driver

    - by Enrico Caponi
    i just now start to use Xubuntu, and i install Xubuntu on my second laptop i had in my garage, just for put back in use. On the ASUS xubuntu work really perfect but now after i put on my old laptop i have some little proble. My Laptop old is a Fujitsu Siemens AMILO L7310GW, i explain my problem: The installation works fine, everything is quite good but there are few little problem i have a know idea, how I can fix them... so USB: i have a optical mouse usb and works quite strage, when i tip on terminal "lsusb" the system recognized fine my mouse but the strange thing is the mouse it move like jump around the desktop. what i had done: - update the usbdrive - change mouse - tried mouse on different pc and on both they work fine another problem i don't know where came from: when i take off my mouse, and try to put back doesn't work at all, if i want back i have to restart the OS. and no usb pen or other ar working so for that i think is usb problem. i can tell before Xubuntu whit winXP the usb work fine, but i don't want windows anymore... So i tried almost everything you can find on the net, maybe i have done something wrong so please help me. I tried also to install the new version 12.04, but i came back for the 11.10.

    Read the article

  • install bluetooth in samsung R430, windows 7

    - by voodoomsr
    how can i install the bluetooth driver in this laptop in windows 7. The installation process tells me that i need to activate the bluetooth device to continue, but how can i activate if till that moment the device doesn't exist. There isn't any button or switch to activate the device manually. Edited: it's the np-r430 model. I read somewhere (a users forum, not official info) that for Chile and Argentina this models doesn't have built in the bluetooth device, but the US models have it. Maybe for some political and weird reason they send to south american laptops without that. The link of my notebook's specifications in an AR domain: np-r40

    Read the article

  • Graphics Card Compatability

    - by Aaron
    I am a first time builder and while I have the basic understanding of how to put a computer together, one final thing eludes me. What are the requirements for instaling 2 or more graphics cards on a computer? Example: EVGA 015-P3-1589-AR GeForce GTX 580 (Fermi) FTW Hydro Copper 2 1536MB 384-bit GDDR5 PCI Express 2.0 x16 HDCP Ready SLI Support Video Card ECS NGTX580-1536PI-F GeForce GTX 580 (Fermi) 1536MB 384-bit GDDR5 PCI Express 2.0 x16 HDCP Ready SLI Support Video Card I am not planning on buying either of these cards in the near future. I simply am using them as an example because of the number of differences. As I understand it these two cards will work together (given the proper motherboard) because the only thing that matters is that they are both GeForce GTX 580. Is my assumption correct? If not, why?

    Read the article

  • iis php internal server error

    - by user1633206
    I developed a website, using php/mysql running at IIS Server as CGI Server API. Suddenly it gives me error 500 after two weeks. It has lot of scripts but index.php home is working. But other script that has header redirection What's wrong with my scripts. livehttp addon of firefox says.. GET /allplans.php?lang=ar&cat=1 HTTP/1.1 Host: www.myhost.com... [edited] User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive Cache-Control: max-age=0 HTTP/1.1 500 Internal Server Error Content-Type: text/html Server: Microsoft-IIS/7.5 X-Powered-By: ASP.NET Date: Mon, 03 Sep 2012 08:09:13 GMT Content-Length: 1208 Connection: Keep-Alive

    Read the article

  • Package libxul not fount - Kiwix Wikpedia in Ubuntu Precise 12.04

    - by JHOSmAN
    I'm trying to install the service Kiwix but I need a library that is not available for Ubuntu 12.04 LTS Precise leave the log and if someone could tell me how to install Seller would appreciate. kiwix-0.9# ls aclocal.m4 COMPILE config.sub COPYING install-sh ltmain.sh missing static AUTHORS config.guess configure depcomp kiwix Makefile.am README CHANGELOG config.log configure.ac desktop libxul-dev_1.8.1.16+nobinonly-0ubuntu1_all.deb Makefile.in src root@ubuntu-MM061:/home/ubuntu/Escritorio/kiwix-0.9# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for g++... g++ checking for cl... no checking for cl... no checking for Xcode... no checking for jar... jar checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for ar... ar checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking whether we are using the GNU C++ compiler... (cached) yes checking whether g++ accepts -g... (cached) yes checking dependency style of g++... (cached) gcc3 checking how to run the C++ preprocessor... g++ -E checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for ranlib... (cached) ranlib checking whether make sets $(MAKE)... (cached) yes checking for pkg-config... pkg-config checking for perl... perl checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdint.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... no checking for inline... inline checking for int16_t... yes checking for int32_t... yes checking for int64_t... yes checking for int8_t... yes checking for off_t... yes checking for pid_t... yes checking for size_t... yes checking for uint16_t... yes checking for uint32_t... yes checking for uint64_t... yes checking for uint8_t... yes checking for ptrdiff_t... yes checking vfork.h usability... no checking vfork.h presence... no checking for vfork.h... no checking for fork... yes checking for vfork... yes checking for working fork... yes checking for working vfork... (cached) yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for working strtod... yes checking for getcwd... yes checking for gettimeofday... yes checking for memmove... yes checking for memset... yes checking for pow... yes checking for regcomp... yes checking for sqrt... yes checking for strcasecmp... yes checking for strchr... yes checking for strdup... yes checking for strerror... yes checking for strtol... yes Package libxul was not found in the pkg-config search path. Perhaps you should add the directory containing libxul.pc' to the PKG_CONFIG_PATH environment variable No package 'libxul' found Package libxul was not found in the pkg-config search path. Perhaps you should add the directory containinglibxul.pc' to the PKG_CONFIG_PATH environment variable No package 'libxul' found checking for /stable... no checking for "/nsISupports.idl"... no configure: error: unable to find nsISupports.idl apt-get install libxul Leyendo lista de paquetes... Hecho Creando árbol de dependencias Leyendo la información de estado... Hecho E: No se ha podido localizar el paquete libxul

    Read the article

  • ffmpeg error while segmenting

    - by Tommy Ng
    I'm using ffmpeg and segmenter on Ubuntu 10.04 to create the transport stream from flv/h264 video files and then segment the ts segments for ipad streaming. Some ts files show an error with segmenter - Output #0, mpegts, to '29': Stream #0.0: Video: 0x0000, yuv420p, 480x360, q=2-31, 90k tbn, 25 tbc Stream #0.1: Audio: 0x0000, 0 channels, s16 [mpegts @ 0x11f4ac0]sample rate not set Could not write mpegts header to first output file my ffmpeg command for creating the ts file - ffmpeg -i 1.flv -f mpegts -acodec libfaac -ar 48000 -ab 64k -s 480x360 -vcodec libx264 -b 192k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 192k -bufsize 192k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 480:360 -g 30 -async 2 -y 1.ts my segmenter command - segmenter 1.ts 10 1 1.m3u8 path/to/streams/

    Read the article

  • Creating video with audio and still image for YouTube

    - by scottlabs
    I'm running the following command: ffmpeg -i audio.mp3 -ar 44100 -f image2 -i logo.jpg -r 15 -b 1800 -s 640x480 foo.mov Which successfully outputs a video with my recorded audio and an image on it. When I try and upload this to YouTube it fails to process, regardless of the formats I try: .mov, .avi, .flv, .mp4 Is there some setting I'm missing in the above that would generate a format Youtube will accept? I've tried looking through the ffmpeg documentation but I'm in over my head. I did an experiment by putting a 2 second video with a 30 second mp3. When I uploaded to youtube, the resulting video was only 2 seconds long. So it may be that YouTube looks only to the video track for the length, and since a picture is only a frame long or whatever, maybe that borks it.

    Read the article

  • dynamically include zipfilesets into a WAR

    - by Konstantin
    hi all - a bit of clumsy situation but for the moment we cannot migrate to more straight-forward project layout. We have a project called myServices and it has 2 source folders (yes, I know, but that's the way it is for now) - I'm trying to make build process a bit more flexible so we now have a property called artifact.names that will be parsed by generic build.xml and based on name, it will call either jar or war task, eg. myService-war will create a WAR file with the following zipfilesets included there: myService-war-classes, myService-war-web-inf, myService-war-meta-inf. I want to add a bit more flexibility, and allow having additional zipfilesets, eg. myService-war-etc-1,2 etc - so these will be picked up by the package target automatically. I cannot use "if" inside war target, and also ${ant.refid:myService-war-classes} property is not resolved, so I'm kind of stuck at the moment with my options - how do I dynamically include a zipfileset into a WAR? You can refer to fileset by id, but it MUST be defined then, eg. you can't have it optional on project level. Thank you. Some build.xml snippets: <target name="archive"> <for list="${artifact.names}" param="artifact"> <sequential> <echo>Packaging artifact @{artifact} of project ${project.name}</echo> <property name="display.@{artifact}.packaging" refid="@{artifact}.packaging" /> <echo>${display.@{artifact}.packaging}</echo> <propertyregex property="@{artifact}.archive.type" input="@{artifact}" regexp="([a-zA-Z0-9]*)(\-)([ejw]ar)" select="\3" casesensitive="false"/> <propertyregex property="@{artifact}.base.name" input="@{artifact}" regexp="([a-zA-Z0-9]*)(\-)([ejw]ar)" select="\1" casesensitive="false"/> <echo>${@{artifact}.archive.type}</echo> <if> <then> <war destfile="${jar.dir}/${@{artifact}.base.name}.war" compress="true" needxmlfile="false"> <resources refid="@{artifact}.packaging" /> <zipfileset refid="@{artifact}-classes" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-meta-inf" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-web-inf" erroronmissingdir="false" /> <!-- Additional zipfilesets to package --> <zipfileset refid="@{artifact}-etc-2" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-3" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-4" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-5" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-6" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-7" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-8" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-9" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-10" erroronmissingdir="false" /> </war> </then> <!-- Generic JAR packaging --> <else> <jar destfile="${jar.dir}/@{artifact}.jar" compress="true"> <resources refid="@{artifact}.packaging" /> <zipfileset refid="@{artifact}-meta-inf" erroronmissingdir="false" /> </jar> </else> </if> </sequential> </for> </target>

    Read the article

  • Proguard and two projects using the same android library. broadcasting. ClassNotFoundException

    - by trololo
    The problem:I have got 2 apps. The interact with each other via broadcasting. I have parcelable class in the android library (they send content of class in the library). So after using Proguard I have got ClassNotFondException. How to solve it? 07-03 02:13:51.832: E/AndroidRuntime(6801): FATAL EXCEPTION: main 07-03 02:13:51.832: E/AndroidRuntime(6801): java.lang.RuntimeException: Unable to start receiver <appname>.<name>.ar.free.BRMain: java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = <appname>.a.a.b) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2277) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.app.ActivityThread.access$1500(ActivityThread.java:140) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.os.Handler.dispatchMessage(Handler.java:99) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.os.Looper.loop(Looper.java:137) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.app.ActivityThread.main(ActivityThread.java:4898) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.lang.reflect.Method.invokeNative(Native Method) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.lang.reflect.Method.invoke(Method.java:511) 07-03 02:13:51.832: E/AndroidRuntime(6801): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006) 07-03 02:13:51.832: E/AndroidRuntime(6801): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773) 07-03 02:13:51.832: E/AndroidRuntime(6801): at dalvik.system.NativeStart.main(Native Method) 07-03 02:13:51.832: E/AndroidRuntime(6801): Caused by: java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = <appname>.a.a.b) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.os.Parcel.readSerializable(Parcel.java:2148) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.os.Parcel.readValue(Parcel.java:2016) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.os.Parcel.readMapInternal(Parcel.java:2226) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.os.Bundle.unparcel(Bundle.java:223) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.os.Bundle.getInt(Bundle.java:922) 07-03 02:13:51.832: E/AndroidRuntime(6801): at <appname>.<name>.ar.free.BRMain.onReceive(BRMain.java:35) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2270) 07-03 02:13:51.832: E/AndroidRuntime(6801): ... 10 more 07-03 02:13:51.832: E/AndroidRuntime(6801): Caused by: java.lang.ClassNotFoundException: <appname>.a.a.b 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.lang.Class.classForName(Native Method) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.lang.Class.forName(Class.java:217) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:2301) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.io.ObjectInputStream.readNewClassDesc(ObjectInputStream.java:1660) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:683) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1803) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:787) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2003) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1960) 07-03 02:13:51.832: E/AndroidRuntime(6801): at android.os.Parcel.readSerializable(Parcel.java:2142) 07-03 02:13:51.832: E/AndroidRuntime(6801): ... 16 more 07-03 02:13:51.832: E/AndroidRuntime(6801): Caused by: java.lang.NoClassDefFoundError: <appname>/a/a/b 07-03 02:13:51.832: E/AndroidRuntime(6801): ... 26 more 07-03 02:13:51.832: E/AndroidRuntime(6801): Caused by: java.lang.ClassNotFoundException: <appname>.a.a.b 07-03 02:13:51.832: E/AndroidRuntime(6801): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 07-03 02:13:51.832: E/AndroidRuntime(6801): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 07-03 02:13:51.832: E/AndroidRuntime(6801): ... 26 more

    Read the article

  • Learning to implement DIC in MVC

    - by Tom
    I am learning to apply DIC to MVC project. So, I have sketched this DDD-ish DIC-ready-ish layout to my best understanding. I have read many blogs articles wikis for the last few days. However, I am not confident about implementing it correctly. Could you please demonstrate to me how to put them into DIC the proper way? I prefer Ninject or Windsor after all the readings, but anyDIC will do as long as I can get the correct idea how to do it. Web controller... public class AccountBriefingController { //create private IAccountServices accountServices { get; set; } public AccountBriefingController(IAccountServices accsrv) accountServices = accsrv; } //do work public ActionResult AccountBriefing(string userid, int days) { //get days of transaction records for this user BriefingViewModel model = AccountServices.GetBriefing(userid, days); return View(model); } } View model ... public class BriefingViewModel { //from user repository public string UserId { get; set; } public string AccountNumber {get; set;} public string FirstName { get; set; } public string LastName { get; set; } //from account repository public string Credits { get; set; } public List<string> Transactions { get; set; } } Service layer ... public interface IAccountServices { BriefingViewModel GetBriefing(); } public class AccountServices { //create private IUserRepository userRepo {get; set;} private IAccountRepository accRepo {get; set;} public AccountServices(UserRepository ur, AccountRepository ar) { userRepo = ur; accRepo = ar; } //do work public BriefingViewModel GetBriefing(string userid, int days) { var model = new BriefingViewModel(); //<---is that okay to new a model here?? var user = userRepo.GetUser(userid); if(user != null) { model.UserId = userid; model.AccountNumber = user.AccountNumber; model.FirstName = user.FirstName; model.LastName = user.LastName; //account records model.Credits = accRepo.GetUserCredits(userid); model.Transactions = accRepo.GetUserTransactions(userid, days); } return model; } } Domain layer and data models... public interface IUserRepository { UserDataModel GetUser(userid); } public interface IAccountRepository { List<string> GetUserTransactions(userid, days); int GetUserCredits(userid); } // Entity Framework DBContext goes under here Please point out if my implementation is wrong, e.g.I can feel in AccountServices-GetBriefing - new BriefingViewModel() seems wrong to me, but I don't know how to fit the stud into DIC? Thank you very much for your help!

    Read the article

  • output image is not displayed

    - by gerry chocolatos
    so, im doing an image detection which i have to process on each red, green, n blue element to get the edge map and combine them become one to show the output. but it doesnt show my output image would anyone pls be kind enough to help me? here is my code so far. //get the red element process_red = new int[width * height]; counter = 0; for(int i = 0; i < 256; i++) { for(int j = 0; j < 256; j++) { int clr = buff_red.getRGB(j, i); int red = (clr & 0x00ff0000) >> 16; red = (0xFF<<24)|(red<<16)|(red<<8)|red; process_red[counter] = red; counter++; } } //set threshold value for red element int threshold = 100; for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { int bin = (buff_red.getRGB(x, y) & 0x000000ff); if (bin < threshold) bin = 0; else bin = 255; buff_red.setRGB(x,y, 0xff000000 | bin << 16 | bin << 8 | bin); } } and i do the same way for my green n blue elements. and then i wanted to get to combination of the three by doing it this way: //combine the three elements process_combine = new int[width * height]; counter = 0; for(int i = 0; i < 256; i++) { for(int j = 0; j < 256; j++) { int clr_a = buff_red.getRGB(j, i); int ar = clr_a & 0x000000ff; int clr_b = buff_green.getRGB(j, i); int bg = clr_b & 0x000000ff; int clr_c = buff_blue.getRGB(j, i); int cb = clr_b & 0x000000ff; int alpha = 0xff000000; int combine = alpha|(ar<<16)|(bg<<8)|cb; process_combine[counter] = combine; counter++; } } buff_rgb = new BufferedImage(width,height, BufferedImage.TYPE_INT_ARGB); Graphics rgb; rgb = buff_rgb.getGraphics(); rgb.drawImage(output_rgb, 0, 0, null); rgb.dispose(); repaint(); and to show the output whic is from the combining process, i use a draw method: g.drawImage(buff_rgb,800,100,this); but still it doesnt show the image. can anyone pls help me? ur help is really appreciated. thanks.

    Read the article

  • Ubuntu server has slow performance

    - by Rich
    I have a custom built Ubuntu 11.04 server with a 6 disk software RAID 10 primary drive. On it I'm primarily running a PostgreSQL and a few other utilities that stream data from the web. I often find after a few hours of uptime the server starts to lag with all kinds of processes. For example, it may take 10-15 seconds after log-in to get a shell prompt. It might take 5-10 seconds for top to come up. An ls might take a second or two. When I look at top there is almost no CPU usage. There's a fair amount of memory used by the PostgreSQL server but not enough to bleed into swap. I have no idea where to go from here, other than to suspect the RAID10 (I've only ever had software RAID 1's before). Edit: Output from top: top - 11:56:03 up 1:46, 3 users, load average: 0.89, 0.73, 0.72 Tasks: 119 total, 1 running, 118 sleeping, 0 stopped, 0 zombie Cpu(s): 0.2%us, 0.0%sy, 0.0%ni, 93.5%id, 6.2%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 16325596k total, 3478248k used, 12847348k free, 20880k buffers Swap: 19534176k total, 0k used, 19534176k free, 3041992k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1747 woodsp 20 0 109m 10m 4888 S 1 0.1 0:42.70 python 357 root 20 0 0 0 0 S 0 0.0 0:00.40 jbd2/sda3-8 1 root 20 0 24324 2284 1344 S 0 0.0 0:00.84 init 2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd 3 root 20 0 0 0 0 S 0 0.0 0:00.24 ksoftirqd/0 6 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0 7 root RT 0 0 0 0 S 0 0.0 0:00.01 watchdog/0 8 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/1 10 root 20 0 0 0 0 S 0 0.0 0:00.02 ksoftirqd/1 12 root RT 0 0 0 0 S 0 0.0 0:00.01 watchdog/1 13 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/2 14 root 20 0 0 0 0 S 0 0.0 0:00.00 kworker/2:0 15 root 20 0 0 0 0 S 0 0.0 0:00.00 ksoftirqd/2 16 root RT 0 0 0 0 S 0 0.0 0:00.01 watchdog/2 17 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/3 18 root 20 0 0 0 0 S 0 0.0 0:00.00 kworker/3:0 19 root 20 0 0 0 0 S 0 0.0 0:00.02 ksoftirqd/3 20 root RT 0 0 0 0 S 0 0.0 0:00.01 watchdog/3 21 root 0 -20 0 0 0 S 0 0.0 0:00.00 cpuset 22 root 0 -20 0 0 0 S 0 0.0 0:00.00 khelper 23 root 20 0 0 0 0 S 0 0.0 0:00.00 kdevtmpfs 24 root 0 -20 0 0 0 S 0 0.0 0:00.00 netns 26 root 20 0 0 0 0 S 0 0.0 0:00.00 sync_supers df -h rpsharp@ncp-skookum:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 1.8T 549G 1.2T 32% / udev 7.8G 4.0K 7.8G 1% /dev tmpfs 3.2G 492K 3.2G 1% /run none 5.0M 0 5.0M 0% /run/lock none 7.8G 0 7.8G 0% /run/shm /dev/sda2 952M 128K 952M 1% /boot/efi /dev/md0 5.5T 562G 4.7T 11% /usr/local free -m psharp@ncp-skookum:~$ free -m total used free shared buffers cached Mem: 15942 3409 12533 0 20 2983 -/+ buffers/cache: 405 15537 Swap: 19076 0 19076 tail -50 /var/log/syslog Jul 3 06:31:32 ncp-skookum rsyslogd: [origin software="rsyslogd" swVersion="5.8.6" x-pid="1070" x-info="http://www.rsyslog.com"] rsyslogd was HUPed Jul 3 06:39:01 ncp-skookum CRON[14211]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete) Jul 3 06:40:01 ncp-skookum CRON[14223]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp) Jul 3 07:00:01 ncp-skookum CRON[14328]: (woodsp) CMD (/home/woodsp/bin/mail_tweetupdate # email an update) Jul 3 07:00:01 ncp-skookum CRON[14327]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp) Jul 3 07:00:28 ncp-skookum sendmail[14356]: q63E0SoZ014356: from=woodsp, size=2328, class=0, nrcpts=2, msgid=<[email protected]>, relay=woodsp@localhost Jul 3 07:00:29 ncp-skookum sm-mta[14357]: q63E0Si6014357: from=<[email protected]>, size=2569, class=0, nrcpts=2, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] Jul 3 07:00:29 ncp-skookum sendmail[14356]: q63E0SoZ014356: to=Spencer Wood <[email protected]>,Martin Lacayo <[email protected]>, ctladdr=woodsp (1004/1005), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=62328, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q63E0Si6014357 Message accepted for delivery) Jul 3 07:00:29 ncp-skookum sm-mta[14359]: STARTTLS=client, relay=mx3.stanford.edu., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256 Jul 3 07:00:29 ncp-skookum sm-mta[14359]: q63E0Si6014357: to=<[email protected]>,<[email protected]>, ctladdr=<[email protected]> (1004/1005), delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=152569, relay=mx3.stanford.edu. [171.67.219.73], dsn=2.0.0, stat=Sent (Ok: queued as 8F3505802AC) Jul 3 07:09:08 ncp-skookum CRON[14396]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete) Jul 3 07:17:01 ncp-skookum CRON[14438]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Jul 3 07:20:01 ncp-skookum CRON[14453]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp) Jul 3 07:39:01 ncp-skookum CRON[14551]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete) Jul 3 07:40:01 ncp-skookum CRON[14562]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp) Jul 3 08:00:01 ncp-skookum CRON[14668]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp) Jul 3 08:09:01 ncp-skookum CRON[14724]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete) Jul 3 08:17:01 ncp-skookum CRON[14766]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Jul 3 08:20:01 ncp-skookum CRON[14781]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp) Jul 3 08:39:01 ncp-skookum CRON[14881]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete) Jul 3 08:40:01 ncp-skookum CRON[14892]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp) Output of hdparm -t /dev/sd{a,b,c,d,e,f} This looks suspicious? /dev/sda: Timing buffered disk reads: 2 MB in 4.84 seconds = 423.39 kB/sec /dev/sdb: Timing buffered disk reads: 420 MB in 3.01 seconds = 139.74 MB/sec /dev/sdc: Timing buffered disk reads: 390 MB in 3.00 seconds = 129.87 MB/sec /dev/sdd: Timing buffered disk reads: 416 MB in 3.00 seconds = 138.51 MB/sec /dev/sde: Timing buffered disk reads: 422 MB in 3.00 seconds = 140.50 MB/sec /dev/sdf: Timing buffered disk reads: 416 MB in 3.01 seconds = 138.26 MB/sec

    Read the article

  • Why is SwiftMailer throwing "Internal Server Error"?

    - by Josamoto
    I am using Symfony + SwiftMailer and getting the following error from SwiftMailer: 500 | Internal Server Error | Swift_TransportException Expected response code 220 but got code "", with message "" and can't figure out why. I am using hMailServer on my local machine, and have setup my factories.yml file (as I'm using Symfony) as follows: mailer: class: sfMailer param: logging: %SF_LOGGING_ENABLED% charset: %SF_CHARSET% delivery_strategy: realtime transport: class: Swift_SmtpTransport param: host: splodge.loc port: 25 encryption: ~ username: ~ password: ~ I'm using the following code to send: $message = $this->getMailer()->compose( '[email protected]', '[email protected]', 'Reset Password', 'Message' ); $result = $this->getMailer()->send($message); Has anyone had an issue like this before? I have found that sometimes, and very randomly, the send goes through, but every other time, I get the above error message. So constantly refreshing the page that sends the mail, fails unpredictably, and as the code sometimes works, it's kinda hard to figure out what's wrong. Any help will be highly appreciated!

    Read the article

  • Problems with sending a multipart/alternative email with PHP

    - by saturdayplace
    Here's the script that's builds/sends the email: $boundary = md5(date('U')); $to = $email; $subject = "My Subject"; $headers = "From: [email protected]" . "\r\n". "X-Mailer: PHP/".phpversion() ."\r\n". "MIME-Version: 1.0" . "\r\n". "Content-Type: multipart/alternative; boundary=--$boundary". "\r\n". "Content-Transfer-Encoding: 7bit". "\r\n"; $text = "You really ought remember the birthdays"; $html = '<html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> '; $message = "Multipart Message coming up" . "\r\n\r\n". "--".$boundary. "Content-Type: text/plain; charset=\"iso-8859-1\"" . "Content-Transfer-Encoding: 7bit". $text. "--".$boundary. "Content-Type: text/html; charset=\"iso-8859-1\"". "Content-Transfer-Encoding: 7bit". $html. "--".$boundary."--"; mail("[email protected]", $subject, $message, $headers); It sends the message just fine, and my recipient receives it, but they get the whole thing in text/plain instead of in multipart/alternative. Viewing the source of the received message gives this (lots of cruft removed): Delivered-To: [email protected] Received: by 10.90.100.4 with SMTP id x4cs111413agb; Wed, 25 Mar 2009 16:39:32 -0700 (PDT) Received: by 10.100.153.6 with SMTP id a6mr85081ane.123.1238024372342; Wed, 25 Mar 2009 16:39:32 -0700 (PDT) Return-Path: <[email protected]> --- snip --- Date: Wed, 25 Mar 2009 17:37:36 -0600 (MDT) Message-Id: <[email protected]> To: [email protected] Subject: My Subject From: [email protected] X-Mailer: PHP/4.3.9 MIME-Version: 1.0 Content-Type: text/plain; boundary="--66131caf569f63b24f43d529d8973560" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 Mar 2009 23:38:30.0531 (UTC) FILETIME=[CDC4E530:01C9ADA2] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-5.600.1016-16540.005 X-TM-AS-Result: No--4.921300-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Multipart Message coming up --66131caf569f63b24f43d529d8973560 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit You really ought remember the birthdays --66131caf569f63b24f43d529d8973560 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit <html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> --66131caf569f63b24f43d529d8973560-- It looks like the content-type header is getting changed along the way from multipart/alternative to text/plain. I'm no sysadmin, so if this is a sendmail issue I'm in way over my head. Any suggestions?

    Read the article

  • ActionMailer execution timeout

    - by user275729
    When trying to send an email to the user for reseting their password, I keep getting an execution timed out error. Other mailer functions work, so I know that the config settings are correct. The header reads: "Timeout::Error in Password resetsController#create" Here is the password_resets_controller: def create @user = User.find_by_email(params[:email]) if @user User.deliver_password_reset_instructions(@user.id) flash[:notice] = "Instructions to reset your password have been emailed to you. " + "Please check your email." redirect_to '/' else flash[:notice] = "No user was found with that email address" render :action => :new end end Here is the method inside of User.rb def self.deliver_password_reset_instructions(user_id) user = User.find(user_id) user.reset_perishable_token! Emailer.deliver_password_reset_instructions(user) end Finally, here is the actual method inside of emailer.rb: default_url_options[:host] = "http://0.0.0.0:3000" #development def password_reset_instructions(user) @subject = "FanGamb Password Reset" @from = '[email protected]' @recipients = user.email @sent_on = Time.now @body["edit_password_reset_url"] = edit_password_reset_url(user.perishable_token) @headers["X-SMTPAPI"] = "{\"category\" : \"Password Recovery\"}"#send grid category header end Why is "Password" in the error message referred to causing a timeout::error

    Read the article

  • C# how to correctly dispose of an SmtpClient?

    - by JL
    VS 2010 code analysis reports the following: Warning 4 CA2000 : Microsoft.Reliability : In method 'Mailer.SendMessage()', object 'client' is not disposed along all exception paths. Call System.IDisposable.Dispose on object 'client' before all references to it are out of scope. My code is : public void SendMessage() { SmtpClient client = new SmtpClient(); client.Send(Message); client.Dispose(); DisposeAttachments(); } How should I correctly dispose of client? Update: to answer Jons question, here is the dispose attachments functionality: private void DisposeAttachments() { foreach (Attachment attachment in Message.Attachments) { attachment.Dispose(); } Message.Attachments.Dispose(); Message = null; }

    Read the article

  • rails arguments to after_save observer

    - by ash34
    Hi, I want users to enter a comma-delimited list of logins on the form, to be notified by email when a new comment/post is created. I don't want to store this list in the database so I would use a form_tag_helper 'text_area_tag' instead of a form helper text_field. I have an 'after_save' observer which should send an email when the comment/post is created. As far as I am aware, the after_save event only takes the model object as the argument, so how do I pass this non model backed list of logins to the observer to be passed on to the Mailer method that uses them in the cc list. thanks

    Read the article

  • Have Rails 2.3.x ignore the i18n gem

    - by Jared
    I have a Rails 2.3.5 project that uses the localization features of Rails. I also happen to have Rails 3 beta installed (which depends on the i18n gem). Rails 2.3.5 will happily handle localization on it's own (without i18n installed), however if the i18n gem is available, it makes use of it. Recently I upgraded my gems and now have version 0.3.7 and 0.4.0 of i18n installed. Rails, of course, wants to load and use the latest version which is causing errors in my project. I tried setting the gem version to 0.3.7 which gets around the errors in the web app. However, we're using resque and resque_mailer to delay the sending of messages. When the worker picks up the mailer job from the queue, it ignores my config.gem requirement in environment.rb and uses version 0.4.0 anyway. Ideally, I'd like to tell Rails to just not use the i18n gem at all. How do I do that?

    Read the article

  • Pyparsing CSV string with random quotes

    - by gtfx
    Hey, I have a string like the following: <118date=2010-05-09,time=16:41:27,device_id=FE-2KA3F09000049,log_id=0400147717,log_part=00,type=statistics,subtype=n/a,pri=information,session_id=o49CedRc021772,from="[email protected]",mailer="mta",client_name="example.org,[194.177.17.24]",resolved=OK,to="[email protected]",direction="in",message_length=6832079,virus="",disposition="Accept",classifier="Not,Spam",subject="=?windows-1255?B?Rlc6IEZ3OiDg5fDp5fog+fno5fog7Pf46eHp7S3u4+Tp7SE=?=" I tried using CSV module and it didn't fit, cause i haven't found a way to ignore what's quoted. Pyparsing looked like a better answer but i haven't found a way to declare all the grammars. Currently, i am using my old Perl script to parse it, but i want this written in Python. if you need my Perl snippet i will be glad to provide it. Any help is appreciated.

    Read the article

  • How can I send email attachment without using an additional library in Perl?

    - by CheeseConQueso
    Hey, I was wondering if there is a way to attach files (specifically .csv files) to a mail message in Perl without using MIME::Lite or any other libraries. Right now, I have a 'mailer function' that works fine, but I'm not sure how to adapt it into attaching files. Here is what I have: open(MAIL, "|/usr/sbin/sendmail -t"); print MAIL "To: cheese\@yahoo.com\n"; print MAIL "From: queso\@what.com\n"; print MAIL "Subject: Attached is $filename\n\n"; print MAIL "$message"; close(MAIL); I think this is specific for UNIX.

    Read the article

  • What is "=C2=A0" in MIME encoded, quoted-printable text?

    - by TheSoftwareJedi
    This is an example raw email I am trying to parse: MIME-version: 1.0 Content-type: text/html; charset=UTF-8 Content-transfer-encoding: quoted-printable X-Mailer: Verizon Webmail X-Originating-IP: [x.x.x.x] =C2=A0test testing testing 123 What is =C2=A0? I have tried a half dozen quoted-printable parsers, but none handle this correctly. Honestly, for now, I'm coding: //TODO WTF encoded = encoded.Replace("=C2=A0", ""); Because I can't figure out why that text is there randomly within the MIME content, and isn't supposed to be rendered into anything. By just removing it, I'm getting the desired effect - but WHY?!

    Read the article

  • Email notifications of exceptions happening in a Python app?

    - by ming yeow
    Hi folks, I want to set up email notifications when there is an error happening in my application. In ruby, there is a very elegant solution called ExceptionNotifier, which wraps around the exception handler and uses the built-in mailer to send an email. What is the best way of doing this in Python? I know that this is a very common issue, so would love for any tips that you folks can share! PS: Code samples, pointers to modules would be AWESOME! Thanks!

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >