Search Results

Search found 487 results on 20 pages for 'reg'.

Page 3/20 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How do i get the reg string from the handle integer?

    - by Tom
    Hi, ive got the reg handles (as ints) being outputted, but i need to convert this to the HKLM/bla/bla.... I know that the 5 Root Keys are 0x80000000Y where Y is a value from 0 to 4, but i'm also getting much smaller values which represent nodes lower down in the registry leaves.

    Read the article

  • Windows 7 File Associations .mov

    - by Paul Mung
    I created a new windows 7 SP1 base image. Everything is all fine and dandy with that. So i am now installing standard applications I would like Quicktime to manage .mov files. The only problem is WMP (Windows Media Player) won't give up the association to .mov files. It's driving me crazy... i've been reading threads on how to fix file associations. I would like to do it via registry, powershell or cmdline. I cannot use GPO I've tried the following: assoc .mov=QuickTime.mov ftype QuickTime.mov="%ProgramFiles(x86)\QuickTime\QuickTimePlayer.exe" Reg add HKCU\Software\Microsoft\windows\CurrentVersion\Explorere\FileExts\.mov\UserChoice" /v Progid /d QuickTime.mov /f Reg add HKCU\Software\Microsoft\windows\CurrentVersion\Explorere\FileExts\.mov\OpenWithList" /v a /d QuickTimePlayer.exe /f Reg add "HKCU\Software\Microsoft\windows\CurrentVersion\Explorere\FileExts\.mov\OpenWithList" /v b /d wmplayer.exe /f Reg add HKCU\Software\Microsoft\windows\CurrentVersion\Explorere\FileExts\.mov\OpenWithList" /v MRUList /d ab /f Reg add HKCU\Software\Microsoft\windows\CurrentVersion\Explorere\FileExts\.mov\OpenWithProgids" /v Quicktime.mov /t REG_NONE /d 0000 /f Reg add HKCU\Software\Microsoft\windows\CurrentVersion\Explorere\FileExts\.mov\OpenWithProgids" /v WMP11.AssocFile.MOV /t REG_NONE /d 0000 /f

    Read the article

  • nginx returning authentication in IE

    - by James MacLeod
    I am having a few issues with an nginx server. I have a site setup that keeps requesting authentication when accessed from IE but in firefox and safari the site is fine no request for authentication. Reading around the web I can see that it could be the gzip that may be causing errors, but the other sites are working without issue. Here is the config: user sysadmin sysadmin; worker_processes 8; error_log logs/error.log debug; events { worker_connections 1024; } http { passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9; passenger_ruby /usr/bin/ruby1.8; include mime.types; default_type application/octet-stream; client_header_timeout 3m; client_body_timeout 3m; client_max_body_size 5m; send_timeout 3m; client_header_buffer_size 1k; large_client_header_buffers 4 4k; gzip on; gzip_min_length 1100; gzip_buffers 4 8k; gzip_types text/plain; output_buffers 1 32k; postpone_output 1460; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 75 20; server { listen 80; server_name .reg-power.com .reg-power.co.uk .reg-power.eu .reg-power.eu.com .reg-power.net .reg-power.org .reg-power.org.uk .reg-power.uk.com .regegen.eu .regpower.co.uk .regpower.eu .regpower.eu.com .regpower.net .regpower.org .regpower.org.uk .regpower.uk.com .renegen.com .renegen.eu .renewableenergygeneration.co.uk .renewableenergygeneration.com reg.rails1.flowhost.co.uk; root /home/sysadmin/reg/current/public; passenger_enabled on; rails_env production; index index.html; } server { listen 80; server_name media.reg-power.com; root /home/sysadmin/admin/current/public; index index.html; } server { listen 80; server_name admin.reg-power.com admin.rails1.flowhost.co.uk; root /home/sysadmin/admin/current/public; passenger_enabled on; rails_env production; index index.html; } server { listen 80; server_name .livingfuels.co.uk livingfuels.rails1.flowhost.co.uk; root /home/sysadmin/livingfuels/current/public; passenger_enabled on; rails_env production; index index.html; } server { listen 80; server_name .regbiopower.com .regbiopower.co.uk regbiopower.rails1.flowhost.co.uk; root /home/sysadmin/regbiopower/current/public; passenger_enabled on; rails_env production; index index.html; } server { listen 80; server_name .clpwindprojects.co.uk clp.rails1.flowhost.co.uk; access_log /home/sysadmin/clp/logs/access.log; location / { root /home/sysadmin/clp; index index.php; if (-f $request_filename) { expires 30d; break; } if (!-e $request_filename) { rewrite ^(.+)$ /index.php?q=$1 last; } } location ~ .php$ { fastcgi_pass 127.0.0.1:49232; #this must point to the socket spawn_fcgi is running on. fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/sysadmin/clp$fastcgi_script_name; # same path as above fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT /home/sysadmin/clp; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; } } } As you can see there is no reference to a http authentication

    Read the article

  • Locating Rogue Perl Script

    - by Gary Garside
    I've been trying to source the location of a perl script which is causing havoc on a server which i control. I'm also trying to find out exactly how this script was installed on the server - my best guess is through a wordpress exploit. The server is a basic web setup running Ubuntu 9.04, Apache and MySQL. I use IPTables for firewall, the site runs around 20 sites and the load never really creeps above 0.7. From what i can see the script is making outbound connection to other servers (most likely trying to brute force entry). Here is a top dump of one of the processes: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 22569 www-data 20 0 22784 3216 780 R 100 0.2 47:00.60 perl The command the process is running is /usr/sbin/sshd . I've tried to find an exact file name but im having no luck... i've ran a lsof -p PID and here is the output: COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME perl 22569 www-data cwd DIR 8,6 4096 2 / perl 22569 www-data rtd DIR 8,6 4096 2 / perl 22569 www-data txt REG 8,6 10336 162220 /usr/bin/perl perl 22569 www-data mem REG 8,6 26936 170219 /usr/lib/perl/5.10.0/auto/Socket/Socket.so perl 22569 www-data mem REG 8,6 22808 170214 /usr/lib/perl/5.10.0/auto/IO/IO.so perl 22569 www-data mem REG 8,6 39112 145112 /lib/libcrypt-2.9.so perl 22569 www-data mem REG 8,6 1502512 145124 /lib/libc-2.9.so perl 22569 www-data mem REG 8,6 130151 145113 /lib/libpthread-2.9.so perl 22569 www-data mem REG 8,6 542928 145122 /lib/libm-2.9.so perl 22569 www-data mem REG 8,6 14608 145125 /lib/libdl-2.9.so perl 22569 www-data mem REG 8,6 1503704 162222 /usr/lib/libperl.so.5.10.0 perl 22569 www-data mem REG 8,6 135680 145116 /lib/ld-2.9.so perl 22569 www-data 0r FIFO 0,6 157216 pipe perl 22569 www-data 1w FIFO 0,6 197642 pipe perl 22569 www-data 2w FIFO 0,6 197642 pipe perl 22569 www-data 3w FIFO 0,6 197642 pipe perl 22569 www-data 4u IPv4 383991 TCP outsidesoftware.com:56869->server12.34.56.78.live-servers.net:www (ESTABLISHED) My gut feeling is outsidesoftware.com is also under attacK? Or possibly being used as a tunnel. I've managed to find a number of rouge files in /tmp and /var/tmp, here is a brief output of one of these files: #!/usr/bin/perl # this spreader is coded by xdh # xdh@xxxxxxxxxxx # only for testing... my @nickname = ("vn"); my $nick = $nickname[rand scalar @nickname]; my $ircname = $nickname[rand scalar @nickname]; #system("kill -9 `ps ax |grep httpdse |grep -v grep|awk '{print $1;}'`"); my $processo = '/usr/sbin/sshd'; The full file contents can be viewed here: http://pastebin.com/yenFRrGP Im trying to achieve a couple of things here... Firstly i need to stop these processes from running. Either by disabling outbound SSH or any IP Tables rules etc... these scripts have been running for around 36 hours now and my main concern is to stop these things running and respawning by themselves. Secondly i need to try and source where and how these scripts have been installed. If anybody has any advise on what to look for in access logs or anything else i would be really grateful. Thanks in advance

    Read the article

  • Attach radeon driver to specific PCI devices?

    - by genpfault
    I have two Radeon cards in this machine, a 6570 and a 6950: lspci | grep VGA: 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Turks [Radeon HD 6570] 02:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Cayman PRO [Radeon HD 6950] I'm trying to get VGA passthrough to work with KVM on Debian Wheezy, passing through the 6950 as a secondary video card to a Windows 7 guest. This works fine if I blacklist the radeon kernel module via /etc/modprobe.d/. If I remove the blacklist to run X11 (or even just a KMS console) on the 6570 the radeon module seems to attach to both cards: dmesg | egrep "01:00.0|02:00.0|radeon": pci 0000:01:00.0: [1002:6759] type 0 class 0x000300 pci 0000:01:00.0: reg 10: [mem 0xe0000000-0xefffffff 64bit pref] pci 0000:01:00.0: reg 18: [mem 0xf7e20000-0xf7e3ffff 64bit] pci 0000:01:00.0: reg 20: [io 0xe000-0xe0ff] pci 0000:01:00.0: reg 30: [mem 0xf7e00000-0xf7e1ffff pref] pci 0000:01:00.0: supports D1 D2 pci 0000:02:00.0: [1002:6719] type 0 class 0x000300 pci 0000:02:00.0: reg 10: [mem 0xd0000000-0xdfffffff 64bit pref] pci 0000:02:00.0: reg 18: [mem 0xf7d20000-0xf7d3ffff 64bit] pci 0000:02:00.0: reg 20: [io 0xd000-0xd0ff] pci 0000:02:00.0: reg 30: [mem 0xf7d00000-0xf7d1ffff pref] pci 0000:02:00.0: supports D1 D2 vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none vgaarb: device added: PCI:0000:02:00.0,decodes=io+mem,owns=none,locks=none vgaarb: bridge control possible 0000:02:00.0 vgaarb: bridge control possible 0000:01:00.0 pci 0000:01:00.0: Boot video device [drm] radeon kernel modesetting enabled. radeon 0000:01:00.0: setting latency timer to 64 radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used) radeon 0000:01:00.0: GTT: 512M 0x0000000040000000 - 0x000000005FFFFFFF [drm] radeon: 1024M of VRAM memory ready [drm] radeon: 512M of GTT memory ready. radeon 0000:01:00.0: irq 46 for MSI/MSI-X radeon 0000:01:00.0: radeon: using MSI. [drm] radeon: irq initialized. radeon 0000:01:00.0: WB enabled [drm] radeon: ib pool ready. [drm] radeon: power management initialized fbcon: radeondrmfb (fb0) is primary device fb0: radeondrmfb frame buffer device [drm] Initialized radeon 2.12.0 20080528 for 0000:01:00.0 on minor 0 radeon 0000:02:00.0: enabling device (0000 -> 0003) radeon 0000:02:00.0: setting latency timer to 64 radeon 0000:02:00.0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used) radeon 0000:02:00.0: GTT: 512M 0x0000000080000000 - 0x000000009FFFFFFF [drm] radeon: 2048M of VRAM memory ready [drm] radeon: 512M of GTT memory ready. radeon 0000:02:00.0: irq 49 for MSI/MSI-X radeon 0000:02:00.0: radeon: using MSI. [drm] radeon: irq initialized. radeon 0000:02:00.0: WB enabled [drm] radeon: ib pool ready. [drm] radeon: power management initialized fb1: radeondrmfb frame buffer device [drm] Initialized radeon 2.12.0 20080528 for 0000:02:00.0 on minor 1 [drm] radeon: finishing device. radeon 0000:02:00.0: ffff88041a941800 unpin not necessary [drm] radeon: ttm finalized pci-stub 0000:02:00.0: claimed by stub pci-stub 0000:02:00.0: irq 49 for MSI/MSI-X This causes the Win7 VM to bluescreen on boot. How can I configure things so that the radeon module only attaches to the 6570 and not the 6950?

    Read the article

  • Pulling out two separate words from a string using reg expressions?

    - by Marvin
    I need to improve on a regular expression I'm using. Currently, here it is: ^[a-zA-Z\s/-]+ I'm using it to pull out medication names from a variety of formulation strings, for example: SULFAMETHOXAZOLE-TRIMETHOPRIM 200-40 MG/5ML PO SUSP AMOX TR/POTASSIUM CLAVULANATE 125 mg-31.25 mg ORAL TABLET, CHEWABLE AMOXICILLIN TRIHYDRATE 125 mg ORAL TABLET, CHEWABLE AMOX TR/POTASSIUM CLAVULANATE 125 mg-31.25 mg ORAL TABLET, CHEWABLE Amoxicillin 1000 MG / Clavulanate 62.5 MG Extended Release Tablet The resulting matches on these examples are: SULFAMETHOXAZOLE-TRIMETHOPRIM AMOX TR/POTASSIUM CLAVULANATE AMOXICILLIN TRIHYDRATE AMOX TR/POTASSIUM CLAVULANATE Amoxicillin The first four are what I want, but on the fifth, I really need "Amoxicillin / Clavulanate". How would I pull out patterns like "Amoxicillin / Clavulanate" (in fifth row) while missing patterns like "MG/5 ML" (in the first row)?

    Read the article

  • [ZF & jQuery] How can I access an URL using AJAX, receive no response, but just manipulate HTML?

    - by rasouza
    I don't know if it's better used with AJAX (tell me, otherwise) but here is my problem: Assuming i'm using Zend Framework, I have a table with several registries from a database with a delete button on each row. That's like this [...] <tbody> <?php foreach ($row as $reg) { ?> <tr <?php if ($reg['value'] < 0) { echo "class='error'"; } ?>> <td><?php echo $reg['creditor'] ?></td> <td><?php echo $reg['debtor'] ?></td> <td><?php echo $reg['reason'] ?></td> <td>R$ <?php echo number_format(abs($reg['value']), 2, ',', ' ')?></td> <td><a href="#" id="<?php echo $reg['id']; ?>" class="delete"><img src="http://192.168.0.102/libraries/css/blueprint/plugins/buttons/icons/cross.png" alt=""/></a></td> </tr> <?php } ?> </tbody> [...] I would like to .fadeOut() and delete (through the link history/delete/id/ROW_ID ) a table row when clicked in the respective delete button. My deleteAction() has no render. It really shouldn't have one, it just deletes a row in the database. Still, how can I make it happen? I tried: // TR Fading when deleted $('.delete') .click(function() { $.ajax({ type: 'GET', url: 'history/delete/id/'+$(this).attr('id'), success: function() { $(this).parent().parent().fadeOut(); } }); return false; }); without success

    Read the article

  • Help with this reg. exp. in PHP

    - by Jonathan
    Hi, i don't know about regular expressions, I asked here for one that: gets either anything up to the first parenthesis/colon or the first word inside the first parenthesis. This was the answer: preg_match('/(?:^[^(:]+|(?<=^\\()[^\\s)]+)/', $var, $match); I need an improvement, I need to get either anything up to the first parenthesis/colon/quotation marks or the first word inside the first parenthesis. So if I have something like: $var = 'story "The Town in Hell"s Backyard'; // I get this: $match = 'story'; $var = "screenplay (based on)"; // I get this: $match = 'screenplay'; $var = "(play)"; // I get this: $match = 'play'; $var = "original screen"; // I get this: $match = 'original screen'; Thanks!

    Read the article

  • [jQuery] What would be the best way to perform a basic CRUD using AJAX

    - by rasouza
    I'm having trouble to make a simple CRUD in my site. I have a table of registries <table> <tbody> <?php foreach ($row as $reg) { ?> <tr <?php if ($reg['value'] < 0) { echo "class='error'"; } ?>> <td><?php echo $reg['creditor'] ?></td> <td><?php echo $reg['debtor'] ?></td> <td><?php echo $reg['reason'] ?></td> <td>R$ <?php echo number_format(abs($reg['value']), 2, ',', ' ')?></td> <td><a **href="<?php echo $this->baseUrl(); ?>/history/delete/id/<?php echo $reg['id']; ?>"** class="delete"><img src="http://192.168.0.102/libraries/css/blueprint/plugins/buttons/icons/cross.png" alt=""/></a></td> </tr> <?php } ?> </tbody> </table> which I would like to perform a simple delete in these rows using AJAX (preferenciably with jQuery). The question is: do I have to create a function in JS and add onmouseclick event in the HTML? is there a more consistent way for doing this, like adding $('.delete').click() directly in the js file? If so, how do I pass the row ID for the ajax function? What I really want is to know how to pass the row ID to $.ajax() jQuery function through a clean! way

    Read the article

  • PHP reg expr. replace ALL URLs except img src URLs

    - by zilveer
    Hi, I have searched but havent been able to find my answer. It follows like: I would like to replace all URL in a string to links except the URLs within img src tag. I have a regular expression for replacing all the URLs to links, but would like it to NOT replace the URLs within img src="" attribute. How can i do this? Here is the code for replacing all URLs: /*** make sure there is an http:// on all URLs ***/ $str = preg_replace("/([^\w\/])(www\.[a-z0-9\-]+\.[a-z0-9\-]+)/i", "$1http://$2",$str); /*** make all URLs links ***/ $str = preg_replace("/([\w]+:\/\/[\w-?&;#~=\.\/\@]+[\w\/])/i","<a target=\"_blank\" href=\"$1\">$1</a>",$str); /Regards

    Read the article

  • How to tell statd to use portmap on a non-localhost ipadress?

    - by jneves
    How can I make statd connect to other IP address other than 127.0.0.1? I have a server that is connected to 2 different networks (one is public, another a private). I want it to provide a NFS share for only the private network. The host in an ubuntu 8.04. The private ip address is 192.168.1.202 I changed /etc/default/portmap to add: OPTIONS="-i 192.168.1.202" The command lsof -n | grep portmap returns: portmap 10252 daemon cwd DIR 202,0 4096 2 / portmap 10252 daemon rtd DIR 202,0 4096 2 / portmap 10252 daemon txt REG 202,0 15248 13461 /sbin/portmap portmap 10252 daemon mem REG 202,0 83708 32823 /lib/tls/i686/cmov/libnsl-2.7.so portmap 10252 daemon mem REG 202,0 1364388 32817 /lib/tls/i686/cmov/libc-2.7.so portmap 10252 daemon mem REG 202,0 31304 16588 /lib/libwrap.so.0.7.6 portmap 10252 daemon mem REG 202,0 109152 16955 /lib/ld-2.7.so portmap 10252 daemon 0u CHR 1,3 960 /dev/null portmap 10252 daemon 1u CHR 1,3 960 /dev/null portmap 10252 daemon 2u CHR 1,3 960 /dev/null portmap 10252 daemon 3u unix 0xecc8c3c0 4332992 socket portmap 10252 daemon 4u IPv4 4332993 UDP 192.168.1.202:sunrpc portmap 10252 daemon 5u IPv4 4332994 TCP 192.168.1.202:sunrpc (LISTEN) portmap 10252 daemon 6u REG 0,12 289 3821511 /var/run/portmap_mapping I defined in /etc/hosts the following: 192.168.1.202 server.local In /etc/default/nfs-common I changed STATDOPTS to: STATDOPTS="--name server.local" Yet when I run /etc/init.d/nfs-common start if fails to start. The log shows: Jun 8 06:37:44 cookwork-web1 rpc.statd[9723]: Version 1.1.2 Starting Jun 8 06:37:44 cookwork-web1 rpc.statd[9723]: Flags: Jun 8 06:37:44 cookwork-web1 rpc.statd[9723]: unable to register (statd, 1, udp). An strace -f rpc.statd -n server.local results in a lot of lines, including this one: sendto(9, "\200]3\362\0\0\0\0\0\0\0\2\0\1\206\240\0\0\0\2\0\0\0\1"..., 56, 0, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("127.0.0.1")}, 16) = 56

    Read the article

  • Why do I need to set up Autologon values in registry twice before it works and can i fix this?

    - by jJack
    Background: As part an automated testing suite I am building, I need to set up Autologon on my virtual machines 'on demand'. By on demand, I mean that I don't want to necessarily pre-configure my VM or any snapshot to have Autologon set up already, for security reasons and also a huge business case. My solution so far: I'm copying a script to the guest machine and then using Sysinternals PsExec to execute it. The script is: reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v DefaultUserName /t REG_SZ /d myusername reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v DefaultPassword /t REG_SZ /d myfakepassword reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v DefaultDomainName /t REG_SZ /d mydomain reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v ForceAutoLogon /t REG_SZ /d 1 reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v AutoAdminLogon /t REG_SZ /d 1 reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoLogonChecked" /f /ve /d 1 Note: I don't believe AutoLogonChecked is required for machines post Windows 2000 but I'm doing it just in case for now. Maybe ForceAutoLogon isn't either, not sure yet. The Problem: I see PsExec executes this properly and all the values are in the registry, however when I restart the machine, the user isn't automatically logged on...When I run this a second time then restart the machine, the user is finally logged on. A diff between the registry states shows that the first time I run this, it is missing both the "1" for AutoAdminLogon, and also the DefaultPassword key. The second time I execute it, these values are correctly intact as I intended. So, what is going on here? Is this expected? This post claims in the end that it really all just works (the problem was that a logoff script was setting off the values). Doesn't seem to work for me however.

    Read the article

  • [PHP] using the magic __set() method with 2D arrays

    - by Spoonface
    If I have the following registry class: Class registry { private $_vars; public function __construct() { $this->_vars = array(); } public function __set($key, $val) { $this->_vars[$key] = $val; } public function __get($key) { if (isset($this->_vars[$key])) return $this->_vars[$key]; } public function printAll() { print "<pre>".print_r($this->_vars,true)."</pre>"; } } $reg = new registry(); $reg->arr = array(1,2,3); $reg->arr = array_merge($reg->arr,array(4)); $reg->printAll(); Would there be an easier way to push a new item onto the 'arr' array? This code: 'array[] = item' doesn't work with the magic set method, and I couldn't find any useful info with google. Thanks for your time!

    Read the article

  • Do word boundaries work on symbol characters?

    - by Shawn31313
    I'm trying to implement word boundaries in my emoticons feature for a chat. But for some reason I can't seem to get the word boundaries to work. I am new to regex. So when I do: var reg = /\b\Hi\b/gi; var str = 'HiHiHi Hi HiHiHi Hi'; alert(str.replace(reg, '')); This happens: Jsfiddle It actually works fine, and does remove those 2 Hi's that are standing alone. But when I change the reg to an escaped smiley and then change the string: var reg = /\b\:\)\b/gi; var str = 'HiHi:) :) HiHiHi :)'; alert(str.replace(reg, '')); This happens: Jsfiddle It just doesn't work. The string stays the same. Is it that word boundaries can't be used on symbols? If so, how does Facebook do it on their chats?

    Read the article

  • Parsing some results returned by nokogiri in ruby, getting an error message

    - by Khat
    The following code returns an error: require 'nokogiri' require 'open-uri' @doc = Nokogiri::HTML(open("http://www.amt.qc.ca/train/deux-montagnes/deux-montagnes.aspx")) #@doc = Nokogiri::HTML(File.open("deux-montagnes.html")) stations = @doc.xpath("//area") stations.each { |station| str = station reg = /href="(.*)" title="(.*)"/ href = reg.match(str)[1] title = reg.match(str)[2] page = /.*\/(.*).aspx$/.match(href)[1] puts href puts title puts page base_url = "http://www.amt.qc.ca" complete_url = base_url + href puts complete_url } ERROR: station_names_from_map.rb:9:in `block in <main>': undefined method `[]' for nil:NilClass (NoMethodError) from /opt/local/lib/ruby1.9/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:213:in `block in each' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:212:in `upto' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:212:in `each' from station_names_from_map.rb:7:in `<main>' shell returned 1 While this code works: str = '<area shape="poly" alt="Deux-Montagnes" coords="59,108,61,106,65,106,67,108,67,113,65,115,61,115,59,113" href="/train/deux-montagnes/deux-montagnes.aspx" title="Deux-Montagnes">' reg = /href="(.*)" title="(.*)"/ href = reg.match(str)[1] title = reg.match(str)[2] page = /.*\/(.*).aspx$/.match(href)[1] puts href puts title puts page base_url = "http://www.amt.qc.ca" complete_url = base_url + href puts complete_url Any reason why?

    Read the article

  • Getting registry information using Python

    - by Willy
    I am trying to pull registry info from many servers and put them all into one txt file. I got the code working fine in a .bat file. I hear that there is a way simpler way to do this in Python. I am intrigued and delighted to hear this. Can anyone help finish my code: My working bat file: echo rfsqlcl01app >> foo.txt reg query "\\rfsqlcl01app\HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\On Access Scanner\McShield\Configuration\Default" >> foo.txt echo GLADGSQL01 >> foo.txt reg query "\\GLADGSQL01\HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\On Access Scanner\McShield\Configuration\Default" >> foo.txt echo GLADGWEB01 >> foo.txt reg query "\\GLADGWEB01\HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\On Access Scanner\McShield\Configuration\Default" >> foo.txt echo PAPERVISION >> foo.txt My python code structure: >>> server_list = open('server_test.txt', 'r') >>> for line in server_list: print r'reg query \\%s\blah\blah\blah' % line.strip() reg query \\foo\blah\blah\blah reg query \\moo\blah\blah\blah reg query \\boo\blah\blah\blah >>> server_list.close()

    Read the article

  • Why do I need to set up Autologon values in registry twice in before it works and can I fix this?

    - by jJack
    Background: As part an automated testing suite I am building, I need to set up Autologon on my virtual machines 'on demand'. By on demand, I mean that I don't want to necessarily pre-configure my VM or any snapshot to have Autologon set up already, for security reasons and also a huge business case. My solution so far: I'm copying a script to the guest machine and then using Sysinternals PsExec to execute it. The script is: reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v DefaultUserName /t REG_SZ /d myusername reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v DefaultPassword /t REG_SZ /d myfakepassword reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v DefaultDomainName /t REG_SZ /d mydomain reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v ForceAutoLogon /t REG_SZ /d 1 reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /f /v AutoAdminLogon /t REG_SZ /d 1 reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoLogonChecked" /f /ve /d 1 Note: I don't believe AutoLogonChecked is required for machines post Windows 2000 but I'm doing it just in case for now. Maybe ForceAutoLogon isn't either, not sure yet. The Problem: I see PsExec executes this properly and all the values are in the registry, however when I restart the machine, the user isn't automatically logged on...When I run this a second time then restart the machine, the user is finally logged on. A diff between the registry states shows that the first time I run this, it is missing both the "1" for AutoAdminLogon, and also the DefaultPassword key. The second time I execute it, these values are correctly intact as I intended. So, what is going on here? Is this expected? This post claims in the end that it really all just works (the problem was that a logoff script was setting off the values). Doesn't seem to work for me however. Note this seems unique to Windows 7, does not occur in Windows XP Also note that you don't need PsExec to recreate the issue - just modify the registry yourself EDIT/update: Login interactively and run script (so, not executing it remotely), logging off automatically logs me back in (so, it works) remotely execute the script in guest when I'm interactively logged in, logging off automatically logs me back in (so, it works) remotely execute the script in guest when with non-interactive session if I log in afterwards (so, interactive now) then back off, it logs me back in (so, it then works) EDIT/update 2: This only occurs for Win7x86, Win7x64, Win8x64. This does not occur for Windows XP

    Read the article

  • MySQL not releasing temp file descriptors

    - by Wakaru44
    Since a few days ago, we’ve been experiencing some serious problems with our MySQL installation: MySQL keeps opening temporal files (normal behaviour) but these files are never released. The consequence is that, eventually, the disk space is exhausted and we have to restart the service and clean up /tmp manually. Using lsof, we see something like this: mysqld 16866 mysql 5u REG 8,3 0 692 /tmp/ibyWJylQ (deleted) mysqld 16866 mysql 6u REG 8,3 0 707 /tmp/ibf5adsT (deleted) mysqld 16866 mysql 7u REG 8,3 0 728 /tmp/ibGjPRyW (deleted) mysqld 16866 mysql 8u REG 8,3 0 5678 /tmp/ibMQDLMZ (deleted) mysqld 16866 mysql 13u REG 8,3 0 5679 /tmp/ibQAnM42 (deleted) Maybe it's not related, but when we shutdown the server, the files are finally freed, and we can see the following warnings in the MySQL log: 121029 7:44:27 [Warning] /usr/local/mysql/bin/mysqld: Forcing close of thread 1333 user: 'xxx' 121029 7:44:27 [Warning] /usr/local/mysql/bin/mysqld: Forcing close of thread 1156 user: 'yyy' 121029 7:44:27 [Warning] /usr/local/mysql/bin/mysqld: Forcing close of thread 1151 user: 'zzz' where 'xxx', 'yyy' and 'zzz' are distinct mysql users (and the only 3 users with active connections to the database). We have a few theories: There is a problem in the OS, that keeps file handlers open. Could it be possible that the OS "delete" operation blocks the threads until shutdown? This may explain the warning at shutdown and the fact that files are finally deleted when the process dies. Until now, data sets were so small that temp files were relatively small and there was enough time to release the file handles without exhausting disk space. We are using Mysql 5.5 on a RHEL 6.2 with the default kernel.

    Read the article

  • Do Spambots have access to unlimited IP addresses?

    - by Reg Gordon
    I have been attacked for weeks by the same spambot trying to brute force the login page. I have a login security module now installed on my Drupal 6 website and it bans on IP after x amount of attempts. It's been going on for ever and I have banned about 1000 IP addresses. Is there any point in me banning on IP due to the spambot having access to unlimited IP addresses or will they run out of them eventually?

    Read the article

  • Can ECC registred RAM 512 MB DDR-400 be used on thinclients - specifically Neoware CA10/CA22?

    - by Ramaswami Murugan
    Can ECC registered RAM 512 MB DDR-400 be used on thin clients - specifically Neoware CA10/CA22? Neoware thin clients (now HP Thin clients e100/e140) have 2 slots for a max of 1 Gb of DDR-400 RAM (184 Pin PC3200). I notice that the price of ECC reg RAM is considerably less than that of non-reg RAM ($10 for ECC reg 512 MB vs $24 for non-ECC reg 512 MB) so this approach is worth it for me to upgrade my memory on numerous thin clients (approx 40). The BIOS is Phoenix E686 and the chipset is VIA 800MHz - 1 Ghz.

    Read the article

  • How to associate all file types within Wine with its corresponding native application?

    - by MestreLion
    This is easily done for a single file type, as answered in How to associate a file type within Wine with a native application?, by creating a .reg for the desired filetype. But this is for AVI only. I use some wine apps (uTorrent, Soulseek, Eudora, to name a few) that can launch a wide range of files. Email attachments, for example, can be JPG, DOC, PDF, PPS... its impossible (and not desirable) to track down all possible file types that one may receive in an email or download in a torrent. So I neeed a solution to be more generic and broad. I need the file association to honor whatever native app is currently configured. And I want this to be done for all file types configured in my system. I've already figured out how to make the solution generic. Simply replacing the launched app in .reg for winebrowser, like this: [HKEY_CLASSES_ROOT\.pdf] @="PDFfile" "Content Type"="application/pdf" [HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command] @="C:\\windows\\system32\\winebrowser.exe \"%1\"" Ive tested this and it works correctly. Since winebrowser uses xdg-open as a backend, and converts my windows path to a Unix one, the correct (Linux) app is launched. So I need a "batch" updater to wine's registry, sort of a wine-update-associations script that I can run whenever a new app is installed. Maybe a tool that can: List all Mime Types types in my system that have a default, installed app associated Extract all the needed info (glob, mime type, etc) Generate the .REG file in the above format The tricky part is: i've searched a LOT to find info about how association is done in Ubuntu 10.10 onwards, and documentation is scarce and confusing, to say the least. Freedesktop.org has no complete spec, and even Gnome docs are obsolete. So far I've gathered 4 files that contain association info, but im clueless on which (or why) to use, or how to use them to generate the .reg file: ~/.local/share/applications/mimeapps.list ~/.local/share/applications/miminfo.cache /usr/share/applications/miminfo.cache /etc/gnome/defaults.list Any help, script or explanation would be greatly appreciated! Thanks!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >