Search Results

Search found 232 results on 10 pages for 'angus graham'.

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

  • Scriptaculous Drag: How do I offset the dragging element?

    - by Angus Croll
    This is an age old problem - but now I'm using scriptaculous its come back to haunt me. When dragging a tree node over other tree nodes I want mouseover to fire for each node. So I want to position the dragging thing so that its top-left is slightly offset from the mousepointer I could reposition constantly in the onDrag handler but this is jerky and slow can anyone help? - thanks

    Read the article

  • new and delete operator overloading

    - by Angus
    I am writing a simple program to understand the new and delete operator overloading. How is the size parameter passed into the new operator? For reference, here is my code: #include<iostream> #include<stdlib.h> #include<malloc.h> using namespace std; class loc{ private: int longitude,latitude; public: loc(){ longitude = latitude = 0; } loc(int lg,int lt){ longitude -= lg; latitude -= lt; } void show(){ cout << "longitude" << endl; cout << "latitude" << endl; } void* operator new(size_t size); void operator delete(void* p); void* operator new[](size_t size); void operator delete[](void* p); }; void* loc :: operator new(size_t size){ void* p; cout << "In overloaded new" << endl; p = malloc(size); cout << "size :" << size << endl; if(!p){ bad_alloc ba; throw ba; } return p; } void loc :: operator delete(void* p){ cout << "In delete operator" << endl; free(p); } void* loc :: operator new[](size_t size){ void* p; cout << "In overloaded new[]" << endl; p = malloc(size); cout << "size :" << size << endl; if(!p){ bad_alloc ba; throw ba; } return p; } void loc :: operator delete[](void* p){ cout << "In delete operator - array" << endl; free(p); } int main(){ loc *p1,*p2; int i; cout << "sizeof(loc)" << sizeof(loc) << endl; try{ p1 = new loc(10,20); } catch (bad_alloc ba){ cout << "Allocation error for p1" << endl; return 1; } try{ p2 = new loc[10]; } catch(bad_alloc ba){ cout << "Allocation error for p2" << endl; return 1; } p1->show(); for(i = 0;i < 10;i++){ p2[i].show(); } delete p1; delete[] p2; return 0; }

    Read the article

  • read first 1kb of a blob from oracle

    - by Angus
    Hi, I wish to extract just the first 1024 bytes of a stored blob and not the whole file. The reason for this is I want to just extract the metadata from a file as quickly as possible without having to select the whole blob. I understand the following: select dbms_lob.substr(file_blob, 16,1) from file_upload where file_upload_id=504; which returns it as hex. How may I do this so it returns it in binary data without selecting the whole blob? Thanks in advance.

    Read the article

  • how to set a cookie in the address bar?

    - by Craig Angus
    I want to add a cookie so that I can exclude my interaction with my website from google analytics (I don't have access to put files on server as is third party application) Is it possible to set a cookie with javascript by executing code in teh address bar of the browser?

    Read the article

  • upload an m4a file in flex, saving it as a blob in oracle, and retrieving metadata info from it

    - by Angus
    Hi, I currently have a FileUpload.mxml component that uploads a .m4a to an oracle database, retrieves metadata from the file and saves the metadata info in the database. to acheive this I use FileReference() and set up, amoung others, the dispatcher.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, completeHandler); So the file is posted to a php file which saves it as a blob. Once the blob is saved, the script sends a message back to flex to dispatch the upload_complete_data event. In the complete handler, the metadata is then retreived by reading the value back from the database into a custom made meta data reader. The metadata info is then saved via flex. This seems a little long winded. Has anyone else successfully achieved this using a different way?

    Read the article

  • overloading new operator in c++

    - by Angus
    I have a code for best fit algorithm. I want to try to use the best fit algorithm using the operator new. Every time I create an object I should give it from the already allocated memory say, 1]20 2]12 3]15 4]6 5]23 respectively. which ever minimum amount fits to the objects size(eg.21) I wanted to do it for different object types, so I need to write the overloaded operator new to be common functionality for all the class objects. Can I do it through friend functions, or is there any possible way to do it.

    Read the article

  • Programming concepts taken from the arts and humanities

    - by Joey Adams
    After reading Paul Graham's essay Hackers and Painters and Joel Spolsky's Advice for Computer Science College Students, I think I've finally gotten it through my thick skull that I should not be loath to work hard in academic courses that aren't "programming" or "computer science" courses. To quote the former: I've found that the best sources of ideas are not the other fields that have the word "computer" in their names, but the other fields inhabited by makers. Painting has been a much richer source of ideas than the theory of computation. — Paul Graham, "Hackers and Painters" There are certainly other, much stronger reasons to work hard in the "boring" classes. However, it'd also be neat to know that these classes may someday inspire me in programming. My question is: what are some specific examples where ideas from literature, art, humanities, philosophy, and other fields made their way into programming? In particular, ideas that weren't obviously applied the way they were meant to (like most math and domain-specific knowledge), but instead gave utterance or inspiration to a program's design and choice of names. Good examples: The term endian comes from Gulliver's Travels by Tom Swift (see here), where it refers to the trivial matter of which side people crack open their eggs. The terms journal and transaction refer to nearly identical concepts in both filesystem design and double-entry bookkeeping (financial accounting). mkfs.ext2 even says: Writing superblocks and filesystem accounting information: done Off-topic: Learning to write English well is important, as it enables a programmer to document and evangelize his/her software, as well as appear competent to other programmers online. Trigonometry is used in 2D and 3D games to implement rotation and direction aspects. Knowing finance will come in handy if you want to write an accounting package. Knowing XYZ will come in handy if you want to write an XYZ package. Arguably on-topic: The Monad class in Haskell is based on a concept by the same name from category theory. Actually, Monads in Haskell are monads in the category of Haskell types and functions. Whatever that means...

    Read the article

  • What free space thresholds/limits are advisable for 640 GB and 2 TB hard disk drives with ZEVO ZFS on OS X?

    - by Graham Perrin
    Assuming that free space advice for ZEVO will not differ from advice for other modern implementations of ZFS … Question Please, what percentages or amounts of free space are advisable for hard disk drives of the following sizes? 640 GB 2 TB Thoughts A standard answer for modern implementations of ZFS might be "no more than 96 percent full". However if apply that to (say) a single-disk 640 GB dataset where some of the files most commonly used (by VirtualBox) are larger than 15 GB each, then I guess that blocks for those files will become sub optimally spread across the platters with around 26 GB free. I read that in most cases, fragmentation and defragmentation should not be a concern with ZFS. Sill, I like the mental picture of most fragments of a large .vdi in reasonably close proximity to each other. (Do features of ZFS make that wish for proximity too old-fashioned?) Side note: there might arise the question of how to optimise performance after a threshold is 'broken'. If it arises, I'll keep it separate. Background On a 640 GB StoreJet Transcend (product ID 0x2329) in the past I probably went beyond an advisable threshold. Currently the largest file is around 17 GB –  – and I doubt that any .vdi or other file on this disk will grow beyond 40 GB. (Ignore the purple masses, those are bundles of 8 MB band files.) Without HFS Plus: the thresholds of twenty, ten and five percent that I associate with Mobile Time Machine file system need not apply. I currently use ZEVO Community Edition 1.1.1 with Mountain Lion, OS X 10.8.2, but I'd like answers to be not too version-specific. References, chronological order ZFS Block Allocation (Jeff Bonwick's Blog) (2006-11-04) Space Maps (Jeff Bonwick's Blog) (2007-09-13) Doubling Exchange Performance (Bizarre ! Vous avez dit Bizarre ?) (2010-03-11) … So to solve this problem, what went in 2010/Q1 software release is multifold. The most important thing is: we increased the threshold at which we switched from 'first fit' (go fast) to 'best fit' (pack tight) from 70% full to 96% full. With TB drives, each slab is at least 5GB and 4% is still 200MB plenty of space and no need to do anything radical before that. This gave us the biggest bang. Second, instead of trying to reuse the same primary slabs until it failed an allocation we decided to stop giving the primary slab this preferential threatment as soon as the biggest allocation that could be satisfied by a slab was down to 128K (metaslab_df_alloc_threshold). At that point we were ready to switch to another slab that had more free space. We also decided to reduce the SMO bonus. Before, a slab that was 50% empty was preferred over slabs that had never been used. In order to foster more write aggregation, we reduced the threshold to 33% empty. This means that a random write workload now spread to more slabs where each one will have larger amount of free space leading to more write aggregation. Finally we also saw that slab loading was contributing to lower performance and implemented a slab prefetch mechanism to reduce down time associated with that operation. The conjunction of all these changes lead to 50% improved OLTP and 70% reduced variability from run to run … OLTP Improvements in Sun Storage 7000 2010.Q1 (Performance Profiles) (2010-03-11) Alasdair on Everything » ZFS runs really slowly when free disk usage goes above 80% (2010-07-18) where commentary includes: … OpenSolaris has changed this in onnv revision 11146 … [CFT] Improved ZFS metaslab code (faster write speed) (2010-08-22)

    Read the article

  • Using windowmaker with quartz-wm in proxy mode on Snow Leopard

    - by Graham Lee
    I can modify my .xinitrc file to exec /opt/local/bin/wmaker, and get WindowMaker 0.90.2 as my window manager in X11.app. I'd like to use quartz-wm not as a window manager, but to provide the pasteboard integration with Aqua using the --only-proxy flag (see the man page). If I add the following line to .xinitrc: exec /usr/bin/quartz-wm --only-proxy & then WindowMaker never starts, complaining that there's already a window manager running. Is it possible to get the two to play nicely together, or is proxy feature part of the Xquartz server now? It seems that the Xquartz manpage has a number of pasteboard-to-clipboard synchronisation settings, but it's not clear whether quartz-wm needs to be running for those to work.

    Read the article

  • SSH: How to change value in config file in one command

    - by Brian Graham
    How can I change the value of, let's say, PasswordAuthentication in /etc/ssh/sshd_config in commands? As well, remove a # in front of the "key" I wish to value. These don't all have to be in one command. I setup quite a few servers, and remembering where everything is gets exhausting, so I want to get a series of commands I can copy paste and it does the work for me for future reference. Sample values: PermitRootLogin no ChallengeResponseAuthentication no PasswordAuthentication no UsePAM no UseDNS no

    Read the article

  • How to check that all ZFS snapshots within a pool are without holds before destroying that pool

    - by Graham Perrin
    Question Already I can check each snapshot of a filesystem individually, manually. I would prefer to check all at once (all with a single command or script). Please: can that be done with a script? Background From the man page for zfs(8): zfs holds [-H] [-r] snapshot… … -r Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems. I wondered whether recent snapshots are treated as descendants of older snapshot. No: Last login: Sat Dec 8 09:02:26 on ttys003 macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-12-08-081957 NAME TAG TIMESTAMP macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-10-28-212255 NAME TAG TIMESTAMP gjp22@2012-10-28-212255 problem with LocalStorage for WOT for Safari Mon Oct 29 6:44 2012 macbookpro08-centrim:~ gjp22$ zfs hold experiment gjp22@2012-12-08-081957 macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-10-28-212255 NAME TAG TIMESTAMP gjp22@2012-10-28-212255 problem with LocalStorage for WOT for Safari Mon Oct 29 6:44 2012 macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-12-08-081957 NAME TAG TIMESTAMP gjp22@2012-12-08-081957 experiment Sat Dec 8 9:04 2012 macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-10-28-212255 NAME TAG TIMESTAMP gjp22@2012-10-28-212255 problem with LocalStorage for WOT for Safari Mon Oct 29 6:44 2012 macbookpro08-centrim:~ gjp22$

    Read the article

  • How can I create a custom OpenOffice / LibreOffice Writer table AutoFormat scheme?

    - by Merlyn Morgan-Graham
    None of the basic table AutoFormat schemes in LibreOffice Writer have both an alternation style defined and no sum column/row style defined. If they have alternation, they always seem to have sums. Because of this I'd like to define my own table scheme. What is the easiest way to accomplish this? A WYSIWYG isn't totally necessary. I am not scared of editing simple XML files as long as I have examples to work from, and if I don't have to edit base install files. If I can place them in a custom area or my user profile directory then that would be best. If there is a way to get the GUI Add functionality to properly recognize an alternation then that would also be helpful.

    Read the article

  • Is StoreJet Transcend (0x2329) an Advanced Format drive?

    - by Graham Perrin
    I use a 640 GB StoreJet Transcend (0x2329) with ZEVO Community Edition 1.1.1 on OS X 10.8.2. Question Is this drive Advanced Format? Background I submitted a request for technical support to Transcend but the first response was gibberish so I don't expect a reasonable follow-up. Models at http://www.transcend-info.com/Products/CatList.asp?LangNo=0&ModNo=293 are similar but different sizes (not 640 GB). Mine is probably 25M2 (TS640GSJ25M2): Unless I'm missing something, nothing currently in the Transcend support area tells me whether the drive is Advanced Format. From System Information in OS X 10.8.2: StoreJet Transcend: Capacity: 640.14 GB (640,135,028,736 bytes) Removable Media: Yes Detachable Drive: Yes BSD Name: disk3 Product ID: 0x2329 Vendor ID: 0x152d (JMicron Technology Corp.) Version: 0.00 Serial Number: 322549FBA004 Speed: Up to 480 Mb/sec Manufacturer: JMicron History for the ZFS pool shows creation in March 2012 –  macbookpro08-centrim:~ gjp22$ zpool history zhandy | grep create 2012-03-14.17:29:37 zpool create -f -O compression=off -O copies=1 -O casesensitivity=insensitive -O snapdir=visible zhandy /dev/dsk/GPTE_1928482A-7FE4-482D-B692-3EC6B03159BA 2012-06-22.15:51:16 zfs create zhandy/Pocket Time Machine At that time I almost certainly used ZEVO Setup Assistant to create the pool. macbookpro08-centrim:~ gjp22$ zpool get ashift zhandy NAME PROPERTY VALUE SOURCE zhandy ashift 0 default If I discover that the drive is Advanced Format, a different ashift value will be appropriate.

    Read the article

  • Using windowmaker with quartz-wm in proxy mode on Snow Leopard

    - by Graham Lee
    I can modify my .xinitrc file to exec /opt/local/bin/wmaker, and get WindowMaker 0.90.2 as my window manager in X11.app. I'd like to use quartz-wm not as a window manager, but to provide the pasteboard integration with Aqua using the --only-proxy flag (see the man page). If I add the following line to .xinitrc: exec /usr/bin/quartz-wm --only-proxy & then WindowMaker never starts, complaining that there's already a window manager running. Is it possible to get the two to play nicely together, or is proxy feature part of the Xquartz server now? It seems that the Xquartz manpage has a number of pasteboard-to-clipboard synchronisation settings, but it's not clear whether quartz-wm needs to be running for those to work.

    Read the article

  • Reverse proxy 502 bad gateway

    - by Brian Graham
    I have setup a subdomain to proxy my plesk panel, but when saving pages I am getting 502 Bad Gateway error instead of a completion message. I am running CentOS 6. Here is my vhost.conf configuration for http://plesk.domain.tld/: RewriteEngine On RewriteCond %{SERVER_PORT} ^80$ RewriteRule $ https://plesk.domain.tld/ [R,L] Here is my vhost_ssl.conf configuration for https://plesk.domain.tld/: SSLProxyEngine On <Location /> ProxyPass https://localhost:8443/ ProxyPassReverse https://localhost:8443/ </Location> I have more than enough (and I have even checked) RAM, CPU and HDD. There are no spikes. As well, the posted information does save, it just errors when trying to show me a "This information has been saved." green/red block. Here is the relevent error from /var/log/nginx/error.log (IP/Host Filtered): 2014/05/29 02:42:41 [error] 8046#0: *402 upstream prematurely closed connection while reading response header from upstream, client: 173.238.XX.XX, server: plesk.domain.tld, request: "POST /smb/web/edit HTTP/1.1", upstream: "https://198.100.XX.XX:7081/smb/web/edit", host: "plesk.domain.tld", referrer: "https://plesk.domain.tld/smb/web/edit"

    Read the article

  • GitLab post-receive hook not firing

    - by Ben Graham
    Apologies if this isn't the right stackexchange. I have a GitLab install. It was installed over the top of a gitolite install that was only a few days old, and I assume this non-standard setup is at the root of my problem, but I cannot pin it down. The problem is straightforward: post-receive hooks are not fired. This prevents 'project activity' appearing in GitLab. The problem looks like: $ git push #... error: cannot run hooks/post-receive: No such file or directory Hook Exists The post-receive hook/symlink exists and is executable: -rwxr-xr-x 1 git git 470 Oct 3 2012 .gitolite/hooks/common/post-receive lrwxrwxrwx 1 git git 45 Oct 3 2012 repositories/project.git/hooks/post-receive -> /home/git/.gitolite/hooks/common/post-receive It's Executable By GitLab The gitlab user can execute the script (I have removed the /dev/null redirect and fed in blank input to get an 'OK' as output): sudo su - gitlab -c /home/git/.gitolite/hooks/common/post-receive OK GitLab Can Find It GitLab is looking for hooks in the correct location: $ grep hooks /srv/gitlab/gitlab/config/gitlab.yml hooks_path: /home/git/.gitolite/hooks/ and $ bundle exec rake gitlab:app:status RAILS_ENV=production # ... /home/git/.gitolite/hooks/common/post-receive exists? ............YES Environment The env -i line in the hook is commonly cited as an issue. I think that would occur after this problem, but for completeness, redis-cli is found OK: $ env -i redis-cli redis> I've run out of debugging ideas on this one. Does anybody have any suggestions?

    Read the article

  • Plug and Go NAS Storage

    - by graham.reeds
    My wife and I are separating. One of the things we need to extricate is the media we have accumulated over the years. So I am looking for a NAS solution that is a) relatively low-cost, b) reliable and c) easy for a non-geek to use (I don't want to be tech support). All it needs to do is hold our iTunes library, photos, course work and maybe some movies and TV shows that I currently have. She will be connecting via her Netbook. I have seen this thread but the reviews on Amazon aren't particularly favourable. Due to the need for simplicity, WHS and FreeNAS are none-starters. I need redundancy as if a single drive system was to die then she would lose her course work and photos. Is the ReadyNAS the only real solution out there?

    Read the article

  • IPv6 6to4 on Windows Server

    - by Graham Wager
    I'm looking for a relatively simple guide to setting up IPv6 properly on a home network. This network currently has a server (Windows Server 2008R2) running RRAS that establishes connectivity to the internet using a demand-dial PPPoE connection and handles the NAT. It also hosts a DNS server and DHCP. My ISP does not support IPv6, but I have a static IPv4 address. I've read about 6to4 and signed up at tunnelbroker.net, but quickly felt out of my depth. How do I configure my network to use it, and how I should configure my DHCP server with regards to IPv6 addresses?

    Read the article

  • Set a custom start date for week numbers

    - by Graham Wager
    Outlook has the ability to show week numbers down the side of the calendar in monthly view, and on the mini-calendar: In options, you can set the first week of the year, but only to the following three options: This is all very nice, but at work our "year" starts on a different date to match up with accounting periods - it's currently week 37 rather than 45! I'd like Outlook to be able to tell me which week it is at work, so is there any way I can set a custom date to be the first week of the year?

    Read the article

  • Can I configure mod_proxy to use different parameters based on HTTP Method?

    - by Graham Lea
    I'm using mod_proxy as a failover proxy with two balance members. While mod_proxy marks dead nodes as dead, it still routes one request per minute to each dead node and, if it's still dead, will either return 503 to the client (if maxattempts=0) or retry on another node (if it's 0). The backends are serving a REST web service. Currently I have set maxattempts=0 because I don't want to retry POSTs and DELETEs. This means that when one node is dead, each minute a random client will receive a 503. Unfortunately, most of our clients are interpreting codes like 503 as "everything is dead" rather than "that didnt work but please try that again". In order to program some kind of automatic retry for safe requests at the proxy layer, I'd like to configure mod_proxy to use maxattempts=1 for GET and HEAD requests and maxattempts=0 for all other HTTP Methods. Is this possible? (And how? :)

    Read the article

  • IPv6 6to4 on Windows Server

    - by Graham Wager
    I'm looking for a relatively simple guide to setting up an IPv6 tunnel properly. This network currently has a server (Windows Server 2008R2) running RRAS that establishes connectivity to the internet using a demand-dial PPPoE connection and handles the NAT. It also hosts a DNS server and DHCP. My ISP does not support IPv6, but I have a static IPv4 address. I've read about 6to4 and signed up at tunnelbroker.net, but quickly felt out of my depth. How do I configure my network to use it, and how I should configure my DHCP server with regards to IPv6 addresses?

    Read the article

  • Is it possible to make Ctrl+C as responsive as Ctrl+Break in the Windows 7 console?

    - by Peter Graham
    Is it possible to make Ctrl+C act like Ctrl+Break in the Windows 7 cmd.exe console? By default Ctrl+C seems to only send a signal the next time the input buffer is read, where Ctrl+Break sends a signal immediately. This makes Ctrl+C useless for ending processes because when I want to end a process I want to end it immediately. I'm using Ctrl+Break for now but it's far harder to type. It looks like in DOS you can add BREAK=ON to CONFIG.SYS to achieve this, but not in Windows 7?

    Read the article

  • 550 Requested action not taken: mailbox unavailable on OS X server 10.6

    - by Marc Graham
    I recently added a new domain to my mail server. I have 1 main server mail.example.com and several others that have the mx record pointing to mail.example.com. My two new domains have the mx record set correctly. The issue I am experiencing is the 550 Requested action not taken: mailbox unavailable error but only when I send emails to accounts on the new urls from an external email account such as gmail. If i send an email to one of the newly made email addresses with the new url from an email account within the same server it delivers normally. For example.... sending [email protected] to [email protected] receives 550 error sending [email protected] to [email protected] works normal here is a report from wormly.com with server and account names changed for obvious reasons Resolving hostname... Connecting... SMTP -> FROM SERVER: 220 existingmailserver.com ESMTP Service ready SMTP -> FROM SERVER: 250-Requested mail action okay, completed 250-SIZE 0 250-AUTH LOGIN PLAIN CRAM-MD5 250-ETRN 250-8BITMIME 250 OK MAIL FROM: [email protected] SMTP -> FROM SERVER: 250 Requested mail action okay, completed RCPT TO: [email protected] SMTP -> FROM SERVER: 550 Requested action not taken: mailbox unavailable SMTP -> ERROR: RCPT not accepted from server: 550 Requested action not taken: mailbox unavailable Message sending failed.

    Read the article

  • Adding a file path into a formula that is typed into a another cell

    - by Adam Graham
    I have 'C:\Users\Documents...etc.......[file name.xlsx]Work Sheet'!$B:$F in cell B1 i then want to run a vlookup formula to the above file but instead of vlookup(A1,'C:\Users\Documents...etc.......[file name.xlsx]Work Sheet'!$B:$F,2,false) I want to use the cell B1 for the path. Reason is i want the master to look at multiple workbooks and i don't have time to sit and retype. Please help

    Read the article

  • How do I easily elevate when running a .jar file?

    - by Merlyn Morgan-Graham
    When trying to run an installer Jar file, I am getting an error saying that write access is denied to create a directory under the Program Files folder. Right click - Run as Administrator is not available on Jar files (I assume because it is Java.exe that consumes them - they are not themselves treated as directly executable by the shell). What is the quickest and simplest way to run a .Jar file with elevation? I am evaluating this tool to recommend for our dev team, and they will manually install it on their boxes. I'd prefer an option that doesn't require them to type anything.

    Read the article

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