Search Results

Search found 112 results on 5 pages for 'emmanuel bernard'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Why are the tags on my site using wordpress being indexed instead of the page?

    - by Bernard
    I can't figure out why my tags are being indexed by google and not my actual posts. So in google, my posts are showing up as mysite.com/tags/post and I of course I want it to look like mysite.com/category/actualpost. Any ideas what could be wrong? My domain is 3 years old and I just started a new focus of an existing site. I can't figure this out! There is no duplicate content, I have a sitemap submitted to webmaster tools and robots.txt...I have everything I need. This is the first time something like this has happened to me. Let me know if anyone has any ideas.

    Read the article

  • Basic example of placing two component on one JPanel container?

    - by Bernard
    Here is my code to add to component (JTextArea and JList) to a panel and put it on the frame. Can I divide half/half by BorderLayout? If yes why mine looks messy one stays up one down? What is the other alternative? Regards, Bernard import java.awt.*; import javax.swing.BorderFactory; import javax.swing.border.Border; import javax.swing.JList; import javax.swing.JScrollPane; import javax.swing.JPanel; import javax.swing.JFrame; import javax.swing.JTextArea; public class SimpleBorder { public static void main(String[] args) { JFrame frame = new JFrame(); frame.setSize(500,500); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Border etched = (Border) BorderFactory.createEtchedBorder(); String[] items = {"A", "B", "C", "D"}; JList list = new JList(items); JTextArea text = new JTextArea(10, 40); JScrollPane scrol = new JScrollPane(text); JScrollPane scrol2 = new JScrollPane(list); JPanel panel= new JPanel(); panel.add(scrol2,BorderLayout.WEST); panel.add(scrol, BorderLayout.EAST); panel.setBorder(etched); frame.add(panel); frame.setVisible(true); } }

    Read the article

  • FFSERVER - streaming an ASF video as Webm output

    - by Emmanuel Brunet
    I'm trying to stream an IP webcam ASF live stream to a ffserver to output a webm video format. The server starts successfully but the ffserver commands used to feed the ffserver fails and generates a core dump. Environment Debian 7.5 ffmpeg 2.2 Input stream $ ffprobe http://account:password@webcam/videostream.asf Input #0, asf, from 'http://admin:alpha1237@webcam/videostream.asf': Duration: N/A, start: 0.000000, bitrate: 32 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 640x480, 25 tbr, 1k tbn, 1k tbc Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, 1 channels, s16p, 32 kb/s ffserver configuration my ffserver configuration is : Port 8091 RTSPPort 554 BindAddress 192.168.1.62 MaxHTTPConnections 1000 MaxClients 100 MaxBandwidth 1000 CustomLog - <Feed webcam.ffm> File /tmp/webcam.ffm FileMaxSize 500M ACL allow localhost ACL allow 192.168.0.0 192.168.255.255 </Feed> <Stream webcam.webm> # Output stream URL definition Feed webcam.ffm # Feed from which to receive video Format webm # Audio settings AudioCodec vorbis AudioBitRate 64 # Audio bitrate # Video settings VideoCodec libvpx VideoSize 640x480 # Video resolution VideoFrameRate 25 # Video FPS AVOptionVideo flags +global_header # Parameters passed to encoder # (same as ffmpeg command-line parameters) AVOptionVideo cpu-used 0 AVOptionVideo qmin 10 AVOptionVideo qmax 42 AVOptionVideo quality good AVOptionAudio flags +global_header PreRoll 15 StartSendOnKey # VideoBitRate 32 # Video bitrate </Stream> <Stream status.html> Format status # Only allow local people to get the status ACL allow localhost ACL allow 192.168.0.0 192.168.255.255 </Stream> ffmpeg feed I run the following command that fails $ ffmpeg -i http://account:password@webcam/videostream.asf http://192.168.1.62:8091/webcam.ffm http://192.168.1.62:8091/webcam.ffm Input #0, asf, from 'http://account:password@webcam/videostream.asf': Duration: N/A, start: 0.000000, bitrate: 32 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 640x480, 25 tbr, 1k tbn, 1k tbc Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, mono, s16p, 32 kb/s [swscaler @ 0x36a80c0] deprecated pixel format used, make sure you did set range correctly Segmentation fault I tryed $ ffmpeg -i http://account:password@webcam/videostream.asf -pix_fmt yuv420p http://192.168.1.62:8091/webcam.ffm But it raises the same error. Thanks for your help Edit For an easy testing (I thought), I tried to publish the whole ASF stream as is, meaning connecting the ASF webcam output stream to the ffserver that outputs ASF format too. And thus with mirrored encoding so I changed the ffserver configuration to ... <Stream webcam.asf> Feed webcam.ffm Format asf VideoFrameRate 25 VideoSize 640X480 VideoBitRate 256 VideoBufferSize 1000 VideoGopSize 30 AudioBitRate 32 StartSendOnKey </Stream> ... And the output is now : Input #0, asf, from 'http://admin:alpha1237@webcam/videostream.asf': Duration: N/A, start: 0.000000, bitrate: 32 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 640x480, 1k tbr, 1k tbn, 1k tbc Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, mono, s16p, 32 kb/s [swscaler @ 0x3d620c0] deprecated pixel format used, make sure you did set range correctly Output #0, ffm, to 'http://192.168.1.62:8091/webcam.ffm': Metadata: creation_time : now encoder : Lavf55.40.100 Stream #0:0: Audio: wmav2, 22050 Hz, mono, fltp, 32 kb/s Metadata: encoder : Lavc55.64.100 wmav2 Stream #0:1: Video: msmpeg4v3 (msmpeg4), yuv420p, 640x480, q=2-31, 256 kb/s, 1k fps, 1000k tbn, 1k tbc Metadata: Stream mapping: Stream #0:1 -> #0:0 (adpcm_ima_wav -> wmav2) Stream #0:0 -> #0:1 (mjpeg -> msmpeg4) Press [q] to stop, [?] for help Segmentation fault I can't even forward the stream.

    Read the article

  • Crazy problem with Nginx, PHP5-FPM on Ubuntu

    - by Emmanuel
    I've been trying to get a domain from shared hosting to my new VPS. Everything was working just 100% fine, and then all of a sudden rewrites stopped working, pictures that should work started returning 404s. I've got no idea why, but for some reason on my site: http://www.onlythebible.com/ only the home page works, all the other pages depend on rewrites which were working perfectly fine at one stage, but all of a sudden stopped working. Some of the pictures like this url: http://www.onlythebible.com/bgsPreview/Matthew-8.10.jpg which doesn't use a rewrite throws a 404? I almost certain it was nothing to do with the nginx configuration. I've got suspicions that it could be something to do with php5-fpm? The funny thing is, all of a sudden it started working again. And then an hour or so later it broke again and has now gone back to only displaying the home-page and all of the links (and some of the pictures) are just showing 404s. Does anyone have an idea of what the problem might be? I'm pretty new to the whole Linux VPS thing, but this just seems very strange. *edit Here's a line from the error log which might shed some light on the problem: 2011/02/06 03:04:59 [error] 2873#0: *220 open() "/usr/local/nginx/html/bgsPreview/Matthew-8.10.jpg" failed (2: No such file or directory), client: 114.77.115.211, server: onlythebible.com, request: "GET /bgsPreview/Matthew-8.10.jpg HTTP/1.1", host: "www.onlythebible.com", referrer: "http://www.onlythebible.com/" I wonder why it's trying to find the file in /usr/local/nginx/html instead of the proper root which is /var/www/ etc... Oh, and for some reason it's just started working again... for how long I don't know. Another thing that was a bit weird, is that the pages on my website are pulled from a database. But when I edited the database, the pages didn't change... It's almost like they've been cached or something.

    Read the article

  • Why is Perl Cgiwrap Sock refusing connection to nginx?

    - by Emmanuel
    Could anyone shed some light on the following line in my nginx error logs. I'm trying to get Perl and Nginx talking to each other, but so far no success. unix:/var/run/nginx/cgiwrap-dispatch.sock failed (111: Connection refused)2011/11/20 09:18:34 [error] 24054#0: *1186 connect() to unix:/var/run/nginx/cgiwrap-dispatch.sock failed (111: Connection refused) while connecting to upstream, client: 150.101.221.75, server: example.com, request: "GET /dspam.cgi HTTP/1.1", upstream: "fastcgi://unix:/var/run/nginx/cgiwrap-dispatch.sock:", host: "example.com" The relevant nginx configs. location ~ \.cgi$ { gzip off; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/fcgiwrap.socket; fastcgi_index index.pl; fastcgi_param SCRIPT_FILENAME /var/www/dspam$fastcgi_script_name; }

    Read the article

  • Can't perform ODBC connection to MySQL server on local network

    - by Emmanuel
    I have a wamp server running on LAN ip address 192.168.1.101 . From the browser on my PC which is on the LAN I can access the webserver and have as well set the phpmyadmin.conf file to be able to access the phpmyadmin interface. This works smoothly. On the wamp server I have a database which I'd need to access from any PC on the LAN using the MySQL Connector/ODBC. The problem is that I do not manage to setup the connection correctly. Here are the paramenters I use: Data Source Name: test_connection Description: test conenction Server: 192.168.1.101 Port: 3306 User: root Password: Database: The error message I get is the following: Connection Failed: [HY000][MySQL][ODBC 5.1 Driver]Can's connect to MySql server on '192.168.1.101' (10060) Would anybody have a hint to set up correctly the connection?

    Read the article

  • VIDEO Streaming - How to output the video timestamp?

    - by Emmanuel Brunet
    I would like to backup an ASF video stream with the time stamp (I mean the original recording date/time) on the output stream ? Usage I convert / store my video using the mkv format (Matroska) with libx264 (video) and aac (audio) codecs. Assume the IP camera webcam user account is account, the password password $ ffmpeg -i http://admin:alpha1237@webcam/videostream.asf -c:v libx264 -s 768X432 -crf 13 -b:v 2500K -pix_fmt yuv420p -c:a libfdk_aac output.mkv This works fine on a tenvis JPT3815W camera How to I need to get the video timestamp available for display as a subtitle or other meta data field managed by standard video players, and ideally to be able to hide it or not during video reading. Does anybody knows how to achieve that ? Thanks in advance for your help.

    Read the article

  • ffserver-2.2 - streaming an ASF video as Webm output with ffserver on Debian 7.5

    - by Emmanuel Brunet
    I'm trying to stream an IP webcam ASF live stream to a ffserver to output a webm video format. The server starts successfully but the ffserver commands used to feed the ffserver fails and generates a core dump. Input stream $ ffprobe http://account:password@webcam/videostream.asf Input #0, asf, from 'http://account:password@webcam/videostream.asf': Duration: N/A, start: 0.000000, bitrate: 32 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 640x480, 25 tbr, 1k tbn, 1k tbc Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, 1 channels, s16p, 32 kb/s ffserver configuration my ffserver configuration is : Port 8091 RTSPPort 554 BindAddress 192.168.1.62 MaxHTTPConnections 1000 MaxClients 100 MaxBandwidth 1000 CustomLog - <Feed webcam.ffm> File /tmp/webcam.ffm FileMaxSize 500M ACL allow localhost ACL allow 192.168.0.0 192.168.255.255 </Feed> <Stream webcam.webm> # Output stream URL definition Feed webcam.ffm # Feed from which to receive video Format webm # Audio settings AudioCodec vorbis AudioBitRate 64 # Audio bitrate # Video settings VideoCodec libvpx VideoSize 640x480 # Video resolution VideoFrameRate 25 # Video FPS AVOptionVideo flags +global_header # Parameters passed to encoder # (same as ffmpeg command-line parameters) AVOptionVideo cpu-used 0 AVOptionVideo qmin 10 AVOptionVideo qmax 42 AVOptionVideo quality good AVOptionAudio flags +global_header PreRoll 15 StartSendOnKey # VideoBitRate 32 # Video bitrate </Stream> <Stream status.html> Format status # Only allow local people to get the status ACL allow localhost ACL allow 192.168.0.0 192.168.255.255 </Stream> ffmpeg feed I run the following command that fails $ ffmpeg -i http://account:password@webcam/videostream.asf http://ffserver_ip:port/webcam.ffm http://192.168.1.62:8091/webcam.ffm Input #0, asf, from 'http://account:password@webcam/videostream.asf': Duration: N/A, start: 0.000000, bitrate: 32 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 640x480, 25 tbr, 1k tbn, 1k tbc Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, mono, s16p, 32 kb/s [swscaler @ 0x36a80c0] deprecated pixel format used, make sure you did set range correctly Segmentation fault I tryed $ ffmpeg -i http://account:password@webcam/videostream.asf -pix_fmt yuv420p http://ffserver_ip:port/webcam.ffm But it raises the same error. Thanks for your help Edit For an easy testing (I thought), I tried to publish the whole ASF stream as is, meaning connecting the ASF webcam output stream to the ffserver that outputs ASF format too. And thus with mirrored encoding so I changed the ffserver configuration to ... <Stream webcam.asf> Feed webcam.ffm Format asf VideoFrameRate 25 VideoSize 640X480 VideoBitRate 256 VideoBufferSize 1000 VideoGopSize 30 AudioBitRate 32 StartSendOnKey </Stream> ... And the output is now : Input #0, asf, from 'http://admin:alpha1237@webcam/videostream.asf': Duration: N/A, start: 0.000000, bitrate: 32 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 640x480, 1k tbr, 1k tbn, 1k tbc Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, mono, s16p, 32 kb/s [swscaler @ 0x3d620c0] deprecated pixel format used, make sure you did set range correctly Output #0, ffm, to 'http://192.168.1.62:8091/webcam.ffm': Metadata: creation_time : now encoder : Lavf55.40.100 Stream #0:0: Audio: wmav2, 22050 Hz, mono, fltp, 32 kb/s Metadata: encoder : Lavc55.64.100 wmav2 Stream #0:1: Video: msmpeg4v3 (msmpeg4), yuv420p, 640x480, q=2-31, 256 kb/s, 1k fps, 1000k tbn, 1k tbc Metadata: Stream mapping: Stream #0:1 -> #0:0 (adpcm_ima_wav -> wmav2) Stream #0:0 -> #0:1 (mjpeg -> msmpeg4) Press [q] to stop, [?] for help Segmentation fault I can't even forward the stream. Thanks for your help again.

    Read the article

  • Postfix - Unable to receive emails from certain domains

    - by Emmanuel
    Got a Postfix-Dovecot-Saslauthd setup on Ubuntu 10.04. Problem is there's (at least) one domain that it refuses to accept emails from. I've been getting emails fine from lots of different domains except one. It's really weird, but could some config file or something be blocking certain domains? or IPs? or something? I know the emails are being sent to me, infact I sent a test one myself from this domain and they're just not showing up.

    Read the article

  • Motion - can't get streaming working from a webcam

    - by Emmanuel Brunet
    I'm trying to record a video stream from my Tenvis IP camera with motion 3.2.12 on Debian 7.5. I used the standard debian package with sudo apt-get install motion Assume my DNS IP cam is webcam, user : admin, password : password /etc/motion/motion.conf Bellow are my configuration file settings : netcam_url http://webcam/videostream.cgi netcam_userpass admin:password target_dir /media/videos/log/motion # The mini-http server listens to this port for requests (default: 0 = disabled) webcam_port 1234 ffmpeg_cap_new on ffmpeg_video_codec mpeg4 output_motion off snapshot_interval 0 # Quality of the jpeg (in percent) images produced (default: 50) webcam_quality 50 # Output frames at 1 fps when no motion is detected and increase to the # rate given by webcam_maxrate when motion is detected (default: off) webcam_motion on # Maximum framerate for webcam streams (default: 1) webcam_maxrate 15 # Restrict webcam connections to localhost only (default: on) webcam_localhost on # Limits the number of images per connection (default: 0 = unlimited) # Number can be defined by multiplying actual webcam rate by desired number of seconds # Actual webcam rate is the smallest of the numbers framerate and webcam_maxrate webcam_limit 0 control_port 8080 control_authentication admin:password Issue #1 when I try display http:/localhost:1234 the browser looks frozen, no HTTP 404 received but it stills waiting for data it seems .. Issue #2 in the output directory motion writes a lot of jpeg snapshots althought I just want to have several video sequenced files. Log I run motion in interactive mode in a terminal, here is the ouput root@mercure:/etc/motion# motion -c motion-1.0.conf [0] Processing thread 0 - config file motion-1.0.conf [0] Motion 3.2.12 Started [0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785 [0] Thread 1 is from motion-1.0.conf [0] motion-httpd/3.2.12 running, accepting connections [0] motion-httpd: waiting for data on port TCP 8080 [1] Thread 1 started [1] Resizing pre_capture buffer to 1 items [1] Started stream webcam server in port 1234 [1] avcodec_open - could not open codec: Operation now in progress [1] ffopen_open error creating (new) file [~/tmp/motion/01-20140603165303.avi]: Operation now in progress [1] File of type 1 saved to: ~/tmp/motion/01-20140603165303-01.jpg [1] Thread exiting [1] Calling vid_close() from motion_cleanup [1] vid_close: calling netcam_cleanup [1] netcam camera handler: finish set, exiting [0] Motion thread 1 restart [1] Thread 1 started [1] Resizing pre_capture buffer to 1 items [1] Started stream webcam server in port 1234 [1] avcodec_open - could not open codec: Resource temporarily unavailable [1] ffopen_open error creating (new) file [~/tmp/motion/01-20140603165329.avi]: Resource temporarily unavailable [1] File of type 1 saved to: ~/tmp/motion/01-20140603165329-00.jpg [1] Thread exiting [1] Calling vid_close() from motion_cleanup [1] vid_close: calling netcam_cleanup [1] netcam camera handler: finish set, exiting [0] Motion thread 1 restart [1] Thread 1 started [1] Resizing pre_capture buffer to 1 items [1] Started stream webcam server in port 1234 [1] avcodec_open - could not open codec: Connection reset by peer [1] ffopen_open error creating (new) file [~/tmp/motion/01-20140603165355.avi]: Connection reset by peer [1] File of type 1 saved to: ~/tmp/motion/01-20140603165355-06.jpg [1] Thread exiting [1] Calling vid_close() from motion_cleanup [1] vid_close: calling netcam_cleanup [0] httpd - Finishing [0] httpd Closing [0] httpd thread exit [1] netcam camera handler: finish set, exiting [0] Motion thread 1 restart [1] Thread 1 started [1] Resizing pre_capture buffer to 1 items [1] Started stream webcam server in port 1234 It doesn't find the codec ... avcodec_open - could not open codec: Operation now in progress I've changed fmpeg_video_codec from mpeg4 to swf the result is the same. When using flv format motion writes a lot of .jpg image but I can't see anything at http://localhost:1234 [1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-00.jpg [1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-01.jpg [1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-02.jpg [1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-03.jpg [1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-04.jpg [1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-05.jpg [1] File of type 1 saved to: ~/tmp/motion/01-20140603171035-06.jpg [1] File of type 1 saved to: ~/tmp/motion/01-20140603171036-00.jpg [1] File of type 1 saved to: ~/tmp/motion/01-20140603171036-01.jpg [1] File of type 1 saved to: ~/tmp/motion/01-20140603171036-02.jpg Any idea just to get the video stream recoded on my local disk ?

    Read the article

  • Motion - takes snapshot without motion detected

    - by Emmanuel Brunet
    I've been installed the standard motion 3.2.12 package on debian 7.5. I would like to get snapshot ONLY when motion is detected, but it still saves a picture every second without any activity in front of the camera. I'm using a TENVIS JPT3815W IP camera motion.conf here is my configuration file setup_mode off target_dir /media/videos/log/webcam netcam_url http://webcam/snapshot.cgi netcam_tolerant_check on netcam_userpass admin:alpha1237 # Output frames at 1 fps when no motion is detected and increase to the # rate given by webcam_maxrate when motion is detected (default: off) webcam_motion off output_all off # detection settings 1-255 default 32 noise_level 50 # Maximum framerate for webcam streams (default: 1) webcam_maxrate 25 pre_capture 0 framerate 25 gap 30 locate on mail [email protected] text_right "FRONT CAMERA %Y/%m/%d - %T" text_double on ffmpeg_cap_new on ffmpeg_cap_motion on ffmpeg_video_codec mpeg4 output_motion off snapshot_interval 0 # Quality of the jpeg (in percent) images produced (default: 50) quality 90 # Restrict webcam connections to localhost only (default: on) webcam_localhost off # Limits the number of images per connection (default: 0 = unlimited) # Number can be defined by multiplying actual webcam rate by desired number of seconds # Actual webcam rate is the smallest of the numbers framerate and webcam_maxrate webcam_limit 0 Issue when I start motion images are stored in /media/videos/log/webcam nearly every second. I hjust want to get images when a motion is detected and the according video clip Any idea where the configuration fails ?

    Read the article

  • WS-Security on iphone, is it possible?

    - by emmanuel.aquino
    Hello, I'm new here and I'm facing a problem. I need to know if it is possible to implement the WS-Security protocol with X.509 certificates on a native iPhone application. I haven't found much information on the web, except this information from Apple about security services. I just want to ask, is it possible? has it been made before?. If it is posbile, can you point me in the right direction?. Thanks in advance.

    Read the article

  • Properties.Settings Ambiguity after adding LINQ to SQL

    - by Emmanuel Smith
    I have recently linked a database to my C# service by creating a LINQ to SQL item in my solution. Everything was fine and dandy as I was continuing to code, but then I suddenly noticed that there where 16 Ambiguity errors. e.g. Ambiguity between 'EmailService.Properties.Settings.defaultInstance' and 'EmailService.Properties.Settings.defaultInstance' What happened was that the database file decided to create it's own Setting.Designer.cs; So now I have a Settings.Designer.cs and a Settings1.Designer.cs (which was created by the LINQ to SQL file) in my Properties folder. Is there anyway that I can change where the database file is referencing its settings so I can delete the duplicate?

    Read the article

  • How do I Emit Escaped XML representation of a Node in my XSLT's HTML Output

    - by Emmanuel
    I'm transforming XML to an HTML document. In this document I want to embed XML markup for a node that was just transformed (the HTML document is a technical spec). For example, if my XML was this: <transform-me> <node id="1"> <stuff type="floatsam"> <details>Various bits</details> </stuff> </node> </transform-me> I'd want my XSLT output to look something like this: <h1>Node 1</h1> <h2>Stuff (floatsam)</h2> Various bits <h2>The XML</h2> &lt;stuff type=&quot;floatsam&quot;&gt; &lt;details&gt;Various bits&lt;/details&gt; &lt;/stuff&gt; I'm hoping there is an XSLT function that I can call in my <stuff> template to which I can pass the current node (.) and get back escaped XML markup for <stuff> and all its descendants. I have a feeling unparsed-text() might be the way to go but can't get it to work.

    Read the article

  • How to get rid of duplicates in regex

    - by Emmanuel Smith
    Suppose I had a string, "cats cats cats and dogs dogs dogs." What regular expression would I use in order to replace that string with,"cats and dogs." i.e. removing duplicates. The expression however must only remove duplicates that follow after each other. For instance: "cats cats cats and dogs dogs dogs and cats cats and dogs dogs" Would return: "cats and dogs and cats and dogs"

    Read the article

  • What is the best way to use whitespace while programming?

    - by Emmanuel Smith
    I'm fairly new to programming and from learning I have seen different ways of formatting code, comments, etc; and have been recommended on different techniques. I mostly program in C#, C++, and Java so I want to know what is the the best way to layout code so that if other people where to go through it, they would be impressed by how simple and easy to understand it is. I would like to know the same thing for commenting as well.

    Read the article

  • Need cause for: double dialer icon in Recents when ACTION_CALL is intercepted and re-sent

    - by Emmanuel
    Note that this happens on Android version 2.1 update1 and 2.2. This seems gone in later versions. Of course I would like to know the workaround. But if there are none, at least if this is a known bug, please provide with a link to the bug. I would also accept the source code fix info or diff where this was fixed. I have an application that intercepts an outgoing call, asks a question to the user, and then depending on the answer it could re-send the call. This works fine. But then when you go to the Recents (hold the Home key) there are two slightly different dialer icons there: one from the dialer application, and a second one for the resending of the call action: This means when you click on the first icon, it opens the dialer. But when you click on the second one, it redials the last number. I tried using android:excludeFromRecents="true" for all my activities. I also tried Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS when I start the call action. No luck.

    Read the article

  • posting php code using jquery .html()

    - by Emmanuel Imwene
    simple query,but it's giving me a headache, i need a division to be updated with a changed session variable each time a user clicks on a name,i figured i'd use .html() using jquery to update the division, i don't know if you can do this, but here goes: $("#inner").html('<?php session_start(); if(file_exists($_SESSION['full'])||file_exists($_SESSION['str'])){ if(file_exists($_SESSION['full'])) { $full=$_SESSION['full']; $handlle = fopen($full, "r"); $contents = fread($handlle, filesize($full)); fclose($handlle); echo $contents; echo '<script type="text/javascript" src="jquery-1.8.0.min (1).js">'; echo '</script>'; echo '<script type="text/javascript">'; echo 'function loadLog(){ var oldscrollHeight = $("#inner").attr("scrollHeight") - 20; $.ajax({ url: \''.$_SESSION['full'].'\', cache: false, success: function(html){ $("#inner").html(html); //Insert chat log into the #chatbox div var newscrollHeight = $("#inner").attr("scrollHeight") - 20; if(newscrollHeight > oldscrollHeight){ $("#inner").animate({ scrollTop: newscrollHeight }, \'normal\'); //Autoscroll to bottom of div } }, }); } setInterval (loadLog, 2500);'; echo '</script>'; } else { $str=$_SESSION['str']; if(file_exists($str)) { $handle = fopen($str, 'r'); $contents = fread($handle, filesize($str)); fclose($handle); echo $contents; $full=$_SESSION['full']; $handlle = fopen($full, "r"); $contents = fread($handlle, filesize($full)); fclose($handlle); echo $contents; echo '<script type="text/javascript" src="jquery-1.8.0.min (1).js">'; echo '</script>'; echo '<script type="text/javascript">'; echo 'function loadLog(){ var oldscrollHeight = $("#inner").attr("scrollHeight") - 20; $.ajax({ url: \''.$_SESSION['str'].'\', cache: false, success: function(html){ $("#inner").html(html); //Insert chat log into the #chatbox div var newscrollHeight = $("#inner").attr("scrollHeight") - 20; if(newscrollHeight > oldscrollHeight){ $("#inner").animate({ scrollTop: newscrollHeight }, \'normal\'); //Autoscroll to bottom of div } }, }); } setInterval (loadLog, 2500);'; echo '</script>'; } } } ?>'); is that legal, if not, how would i accomplish this?

    Read the article

  • Static dictionary in .Net Thread safety

    - by Emmanuel
    Reading msdn documentation for dictionaries it says : "Public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe." Those this mean that with a dictionary such as this : static object syncObject = new object(); static Dictionary<string,MyObject> mydictionary= new Dictionary<string, MyObject>(); Is doing something like the code below unnecessary? lock (syncObject) { context = new TDataContext(); mydictionary.Add("key", myObject); }

    Read the article

  • Too much memory consumed during TFS automated build

    - by Bernard Chen
    We're running TFS 2010 Standard Edition, and we've set up an automated build to run whenever someone checks in code. We run through all of the automated tests (built with MSTest) as part of the build. We've configured the build to run the tests as a 64-bit process, but the QTAgent.exe that runs the tests grows in memory while the tests are running. It is currently reaching 8GB for the ~650 tests we have, and the process has slowed significantly when we went from 450 tests to 650 tests. When we run all of the tests in the local development environment, memory seems to be freed at least with each TestClass and never exceeds a certain level. The process of running all tests has not increased significantly in the local development environment. Is there a way to configure the build service to free up memory with each Test or each TestClass? With the way things are currently running, the build process gets very slow when we start to run out of memory on the machine. Edit: I found the MSTest invocation in the build log and ran it manually and saw the same behavior of runaway memory. I removed the /publish, /publishbuild, /teamproject, /platform, and /flavor parameters from the invocation of MSTest, in case the test runner was holding onto results until the end, but the behavior didn't change. I ran the same command line on a dev box, separate from the build server, and the memory freed up frequently. It seems there must be something wrong/different about the build server that is causing it to behave different, but I'm stumped where to look. I've looked at qtagent.exe.config, mstest.exe.config, versions of both executables. What else might affect this?

    Read the article

  • QoS / PBR Routing Questions

    - by Bernard
    I have a 50Mbs Satellite link and a 10Mbs Microwave link supplying a very remote location. Behind these links, I have a 6,400 seat network - with about 3,000 signed in at any one time. My goal is to send all of the Voip traffic (Google Chat, Magic Jack, Skype, Speakeasy, Vonage, Vonage PC, Yahoo) through the microwave link which has 100ms latency. The rest of the traffic can utilize any remaining bandwidth of the microwave link with excess being diverted to the higher latency (600ms) satellite connection. The problem I've had so far is that most automatic routing configurations weigh the bandwidth heavily for preference - and I'm only wanting latency considered. Additionally, I don't know if this can even be handled with the routing hardware I have at my disposal (Cisco 3640, 3745, & 3845). Any recommendations (or really good starting points) would be greatly appreciated.

    Read the article

  • Importing tab based outline txt file into Word outline

    - by Bernard Vander Beken
    Given a text file containing and outline with tabs to indent each level, I would like to import this into a Word 2007 document so that the each indentation level is converted to a H1, H2, etc heading level. I tried copy pasting the text into the outline view and opening the text file via File, Open. Both did not give the expected result. Level 1 Level 2 Level 3 Level 1 Level 2 Note: I am using spaces instead of tabs to indent this sample.

    Read the article

  • Choosing the right email server.

    - by bernard-productions
    My company is switching email servers and I wanted more input from people who know more about IT. We are a small company that would only have 7-8 users. We use MS outlook and need a compatible solution. Im not sure what server we are switching from but i have been looking at google apps. Exchange is a little more expensive but we are considering that as well. Any suggestions/ recommendations regarding these two or others????

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >