Search Results

Search found 7 results on 1 pages for 'peeter'.

Page 1/1 | 1 

  • How do I handle priority and propagation in an event system?

    - by Peeter
    Lets say I have a simple event system with the following syntax: object = new Object(); object.bind("my_trigger", function() { print "hello"; }); object.bind("my_trigger", function() { print "hello2"; }); object.trigger("my_trigger"); How could I make sure hello2 is printed out first (I do not want my code to depend on which order the events are binded). Ontop of that, how would I prevent my events from propagating (e.g. I want to stop every other event from being executed)

    Read the article

  • executable in path, findable by which, yet cannot execute without fully qualifying path?

    - by Peeter Joot
    I've got a bizarre seeming shell issue, with a command in the $PATH that the shell (ksh, running on Linux) appears to cowardly refuse to invoke. Without fully qualifying the command, I get: # mycommand /bin/ksh: mycommand: not found [No such file or directory] but the file can be found by which: # which mycommand /home/me/admbin/mycommand I also explicitly see that directory in $PATH: # echo $PATH | tr : '\n' | grep adm /home/me/admbin The exe at that location seems normal: # file /home/me/admbin/mycommand /home/me/admbin/mycommand: setuid setgid ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), not stripped # ls -l mycommand -r-sr-s--- 1 me mygroup 97892 2012-04-11 18:01 mycommand and if I run it explicitly using a fully qualified path: # /home/me/admbin/mycommand I see the expected output. Something is definitely confusing the shell here, but I'm at a loss what it could be? EDIT: finding what looked like a similar question: Binary won't execute when run with a path. Eg >./program won't work but >program works fine I also tested for more than one such command in my $PATH, but find only one: # for i in `echo $PATH | tr : '\n'` ; do test -e $i/mycommand && echo $i/mycommand ; done /home/me/admbin/mycommand

    Read the article

  • Trying to retrieve data with a thermaltake blacX enclosure: Windows 7 believes the drive to be "uninitialized"

    - by Peeter Joot
    I have a laptop that won't boot. It appears to be a power problem ... laptop auto-turns-off within about 10 seconds of pressing the power button (with power buttons lighted temporarily and no display with or without external monitor). I've followed the dell troubleshooting guide which suggested reseating the memory modules and the hard drives, but that didn't help. Before trying to have the laptop serviced, I wanted to get some data off off the hard drive. I bought a thermaltake blacX enclosure, intending to use this to both use to retrieve the drive data with, and then later use as external storage. Following the instructions (insert cables, insert drive power on) goes fine, and Windows 7 on another laptop installs the device driver software. However, no drive letter shows up in 'Computer'. Under Computer-manage-storage I see the drive is there, and there's an option to "initialize" the drive. The Windows "initialize" dialog gives me the option to pick between "MBR" and "GPT" partitioning, which sounds like a good way to destroy the data on the drive. I'm thinking that I've purchased the wrong device for the job (or that my old drive is damaged). The old drive to recover info from is a Western Digital 500G/7200rpm SATA drive if that is relavent. Both the original laptop and the one I'm using for recovery are running Windows 7. Does anybody have experience with using a blacX enclosure to recover data off an already formatted drive?

    Read the article

  • troubleshooting really slow login on a (linux) machine

    - by Peeter Joot
    Within the last couple of weeks, any attempt to login to a specific linux server has gotten really slow. Once I've logged in, things appear to run without significant delay, but some other login like activities (like starting a new screen session) are slow. The machine's been rebooted a couple of times recently and that hasn't helped. , and it doesn't appear to be $PATH search (where $PATH can sometimes include bad NFS mounts), which I've seen historically in our environment. I've also tried completely removing my .profile/.bash*/... type of init files to rule out anything bad there. I also see slow login for at least one other userid on the system. One thing I've noticed is the following message when trying to exit from a screen terminal: Utmp slot not found -> not removed and am wondering if this is related (having a vague recollection that Utmp has something to do with login). Any idea what that message means, or how to fix it, and if it would be related? Failing that, what sort of problem determination tools are available to investigate what is slowing down this login process?

    Read the article

  • BASH_ENV ignored on solaris?

    - by Peeter Joot
    In my .bash_profile, executed for both my interactive and non-interactive logins are BASH_ENV=$HOME/.myinteractivestuff export BASH_ENV doing this for bash on Linux works fine, but on Solaris is not sourced: bash --version GNU bash, version 3.00.16(1)-release (sparc-sun-solaris2.10) Curiously, if I invoke screen within my login shell, BASH_ENV is then read. Are any restrictions on when $BASH_ENV is respected on Solaris? In my case I'm logging in with ssh using putty, but also tried unix to unix ssh, and telnet and see the same. Note that I know that my BASH_ENV variable assignment is being executed since I can echo this variable after login without any trouble (ie: ruling out the obvious possibility that my .bash_profile is also not being read).

    Read the article

  • mod_rewrite and pretty urls

    - by Peeter
    What I'm trying to achieve: 1) http://localhost/en/script.php?param1=random is mapped to http://localhost/script.php?param1=random&language=English This has to work always. 2) http://localhost/en/random/text/here will be mapped to http://localhost/categories.php?term=random/text/here This has to work if random/text/here is 404 What I have at the moment: RewriteEngine on RewriteCond substr(%{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^en/(.+)$ categories.php?lang=English&terms=$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ee/(.+)$ categories.php?lang=Estonian&terms=$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^fi/(.+)$ categories.php?lang=Finnish&terms=$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ru/(.+)$ categories.php?lang=Russian&terms=$1 [L] RewriteRule ^en/(.*) $1?lang=English&%{QUERY_STRING} [L] RewriteRule ^ee/(.*) $1?lang=Estonian&%{QUERY_STRING} [L] RewriteRule ^ru/(.*) $1?lang=Russian&%{QUERY_STRING} [L] RewriteRule ^fi/(.*) $1?lang=Finnish&%{QUERY_STRING} [L] What I've thought: substr(%{REQUEST_FILENAME},3) would fix my problem (as currently /ee/index.php is literally mapped to /ee/index.php instead of just /index.php) Unfortunately I couldn't find a way to manipulate strings :/

    Read the article

  • Get last clicked item id

    - by Peeter Kõbu
    I have function like this: $(document).ready(function () { $("*").click(function () { alert($(this).attr('id').toString()); }); }); And on Page i have something like this: <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <script language="javascript" src="Scripts/jquery-1.4.1.js" type="text/javascript"></script> <div id="div1">Some stuff <div id="div2">Some other stuff <asp:Button ID="Button1" runat="server" Text="Button" /> <div id="div3">More stuff <asp:Button ID="Button2" runat="server" Text="Button" /> </div> </div> </div> If i click something it works fine, but it alerts me three times(or more). For example: I click button2. Alertbox appears with button2.id, then with div3.id, div2.id etc. It shows me all id's under that button. If i try to store this id to variable like this: var storedId = $(this).attr('id').toString(); it stores the last one.That means i get the id of form1. How can i get the first id? The id of clicked button or clicked label or whatever i have on my page.

    Read the article

1