Search Results

Search found 24 results on 1 pages for 't j crowder'.

Page 1/1 | 1 

  • 32-bit Ubuntu or 64-bit w/Intel Atom D510 w/4GB RAM?

    - by T.J. Crowder
    (I've seen this question and some related ones, and perhaps this is a duplicate although part of my question is specific to the Atom D510.) I'm going to be installing Ubuntu on a new silent desktop as my latest (and hopefully last) attempt to switch from Windows to Linux for at least most everyday tasks. The new machine is entirely passvely cooled, but as a consequence, not astonishingly powerful — an Atom D510 (dual-core, 1.6GHz, HT) on Intel's D510MO board. That's fine, I won't use it for gaming, (much) video editing, etc. It's a 64-bit processor and I'm maxing the board out at 4GB of RAM (hey, that 1.6 CPU needs all the help it can get), which naturally raises the question of whether to install Ubuntu 64-bit or 32-bit (and if the latter, either live with the missing RAM, or do the PAE kernel dance). Although I've used Linux on servers for years, I'm very nearly a Linux desktop newbie and am not currently in the mood to fight driver wars and such. So if I'm setting myself up for failure with 64-bit, I'll live with the missing ~0.8GB or fiddle with PAE. But if 64-bit is entirely "ready," great, I'm there. So: Do most mainstream apps (now) play nicely with 64-bit Linux? I can't help but notice the "AMD" in the ISO image filename ubuntu-10.04-desktop-amd64.iso and I know AMD lead the way on this stuff — does Ubuntu 64-bit play nicely with Intel processors? Just generally, would you recommend one or the other? (And if anyone has any experience with Ubuntu specifically on the D510 [32-bit or 64-bit] which might lead me one way or t'other, that would be useful.) Thanks in advance.

    Read the article

  • How easy is it to migrate a Linux VM image from one VM env to another?

    - by T.J. Crowder
    If I stick to one of the standard, well-supported VM disk images (like a raw image, or VDI, VMDK, ...), are Linux VMs typically easy to move between VM environments? E.g., between (say) VirtualBox and KVM, or VMWare and Xen? I'm talking here of fully virtualized environments, not paravirtualization requiring support within the guest OS. It seems to me that the kernels in most Linux distributions these days are configured to...keep an open mind and detect things at boot time, so you don't have the issue that you sometimes have moving a Windows VM from one virtualization system to another (I'm thinking particularly of HAL issues that Windows has, like ACPI vs. non-ACPI; I've also just had Windows VMs generally acting strangely when moved from VMWare to VirtualBox, for instance). I'm looking for a general answer, but if it helps, specifically I'm mostly going to be doing this with Ubuntu 8.04 LTS and 10.04 LTS guests. But that could change.

    Read the article

  • Remote NX login to Ubuntu, Gnome can't mount CD/DVD drive

    - by T.J. Crowder
    Even though I'm sitting next to it, I log into my Ubuntu 10.04 LTS system via NX Free Edition from another system at the moment (this is temporary, not worth buying a KVM for). Curiously, though, when I do that Gnome's auto-mounting fails for CD/DVD media (I haven't tried other kinds) with a "Not Authorized" error. For instance here's what happens when I put the Ubuntu 10.04 LTS installation CD in: This does not happen if I log into it locally (not via NX) with the same user account. When using NX, I can mount the media if I go to mount directly: tjc@midnight:~$ sudo mkdir /media/dvd tjc@midnight:~$ sudo mount -r -t iso9660 /dev/sr0 /media/dvd tjc@midnight:~$ ls /media/dvd autorun.inf casper dists install isolinux md5sum.txt pics pool preseed README.diskdefines ubuntu wubi.exe ...which, along with the "not authorized" error, suggests some kind of permissions problem to me (doh). What I find odd is that the same user is involved in both cases (local and via NX). I'm new to Ubuntu on the desktop (used it and other distros on servers for years), so I'm afraid I don't know how this auto-mounting is happening. I think it's handled by the gvfs package and its daemon, but that's about as far as I got (and perhaps I've taken a left turn even getting that far). Although I can work around it with mount, does anyone know how I might get auto-mounting to work?

    Read the article

  • Intel D510MO board - 1000Mbit LAN or not?

    - by T.J. Crowder
    The Intel forum seems to be down (signing in fails with connection refused), but perhaps someone here knows the answer. The Intel D510MO product page says that the LAN is 10/100/1000, but when I look at the NM10 chipset it uses, it says it's just 10/100 (and the detailed PDF spec here backs that up pretty definitively). I don't immediately see anything saying the D510MO has a different LAN controller than the NM10's onboard one, and it would seem odd if it did given the purpose of the board (low power, small footprint; integrated). Does this board support 1000Mbit LAN or not? Anyone have direct knowledge of it? Thanks in advance.

    Read the article

  • How to get rid of a stubborn 'removed' device in mdadm

    - by T.J. Crowder
    One of my server's drives failed and so I removed the failed drive from all three relevant arrays, had the drive swapped out, and then added the new drive to the arrays. Two of the arrays worked perfectly. The third added the drive back as a spare, and there's an odd "removed" entry in the mdadm details. I tried both mdadm /dev/md2 --remove failed and mdadm /dev/md2 --remove detached as suggested here and here, neither of which complained, but neither of which had any effect, either. Does anyone know how I can get rid of that entry and get the drive added back properly? (Ideally without resyncing a third time, I've already had to do it twice and it takes hours. But if that's what it takes, that's what it takes.) The new drive is /dev/sda, the relevant partition is /dev/sda3. Here's the detail on the array: # mdadm --detail /dev/md2 /dev/md2: Version : 0.90 Creation Time : Wed Oct 26 12:27:49 2011 Raid Level : raid1 Array Size : 729952192 (696.14 GiB 747.47 GB) Used Dev Size : 729952192 (696.14 GiB 747.47 GB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 2 Persistence : Superblock is persistent Update Time : Tue Nov 12 17:48:53 2013 State : clean, degraded Active Devices : 1 Working Devices : 2 Failed Devices : 0 Spare Devices : 1 UUID : 2fdbf68c:d572d905:776c2c25:004bd7b2 (local to host blah) Events : 0.34665 Number Major Minor RaidDevice State 0 0 0 0 removed 1 8 19 1 active sync /dev/sdb3 2 8 3 - spare /dev/sda3 If it's relevant, it's a 64-bit server. It normally runs Ubuntu, but right now I'm in the data centre's "rescue" OS, which is Debian 7 (wheezy). The "removed" entry was there the last time I was in Ubuntu (it won't, currently, boot from the disk), so I don't think that's not some Ubuntu/Debian conflict (and they are, of course, closely related). Update: Having done extensive tests with test devices on a local machine, I'm just plain getting anomalous behavior from mdadm with this array. For instance, with /dev/sda3 removed from the array again, I did this: mdadm /dev/md2 --grow --force --raid-devices=1 And that got rid of the "removed" device, leaving me just with /dev/sdb3. Then I nuked /dev/sda3 (wrote a file system to it, so it didn't have the raid fs anymore), then: mdadm /dev/md2 --grow --raid-devices=2 ...which gave me an array with /dev/sdb3 in slot 0 and "removed" in slot 1 as you'd expect. Then mdadm /dev/md2 --add /dev/sda3 ...added it — as a spare again. (Another 3.5 hours down the drain.) So with the rebuilt spare in the array, given that mdadm's man page says RAID-DEVICES CHANGES ... When the number of devices is increased, any hot spares that are present will be activated immediately. ...I grew the array to three devices, to try to activate the "spare": mdadm /dev/md2 --grow --raid-devices=3 What did I get? Two "removed" devices, and the spare. And yet when I do this with a test array, I don't get this behavior. So I nuked /dev/sda3 again, used it to create a brand-new array, and am copying the data from the old array to the new one: rsync -r -t -v --exclude 'lost+found' --progress /mnt/oldarray/* /mnt/newarray This will, of course, take hours. Hopefully when I'm done, I can stop the old array entirely, nuke /dev/sdb3, and add it to the new array. Hopefully, it won't get added as a spare!

    Read the article

  • Simple end-to-end load and bottleneck monitoring for DB-based web sites

    - by T.J. Crowder
    What tools do you use / would you recommend for monitoring a Linux-based, DB-based website's servers for bottlenecks and load? The obvious goal being to know when growth has gotten to the point where it's necessary to scale up (or out) one or more of the bits and pieces because the current system won't be managing the load if an observed trend continues. I'm looking for general recommendations based on standard Linux load metrics, disk I/O metrics, network I/O metrics, etc., but if specifics are helpful: It'll be Tomcat6 using APR (possibly with a Varnish or similar caching and balancing front-end), MySQL, and either Ubuntu 8.04 LTS or 10.04 LTS depending on timing. I know about top, vmstat, iostat, bwmon and the like that collect and parse info from the /proc file system (et. al.); and obviously MySQL provides a lot of queriable performance information. I could use those directly, probably automating periodic monitoring logs with scripts and such. But I have a suspicion that I'd be reinventing a wheel... For example, Hyperic HQ seems to be along the lines of what I'm looking for. Others? Meta: I tend to think of "recommendation" questions as needing to be CW because there's no one right answer, but I see a lot of these here that aren't CWs, so I haven't marked it as one. I'll happily do so if enough people think I should.

    Read the article

  • What would make a noise in a PC on graphics operations on a passively-cooled system?

    - by T.J. Crowder
    I have this system based on the Intel D510MO motherboard, which is basically an Atom D510 (dual-core HT Atom w/built-in GPU), an Intel NM10 chipset, and a Realtek Gigabit LAN controller. It's entirely passively cooled. I noticed almost immediately that there was a kind of very, very soft noise that corresponded with graphics operations, sort of the noise you'd get if you had a sheet of flat paper and slid something really light across it — but more electronic than that. I wrote it off as observation error and/or disk activity triggered by the graphics operation (although the latter seemed like a lot of unnecessary disk activity). It isn't. I got curious enough that I finally did a few controlled experiments, and here's what I've determined: It isn't the HDD. For one thing, the sounds the HDD makes (when seeking, when reading or writing, when just sitting there spinning) is different. For another, I used sudo hdparm -y /dev/sda (I'm using Ubuntu 10.04 LTS) to temporarily put the disk on standby while making sure that non-disk graphics op was happening in a loop. The disk spun down, but the other sound continued, corresponding perfectly with the timing of the graphics op. (Then the disk spun up again, but it takes long enough that I could rule out the HDD.) It isn't the monitor; I ensured the two were well physically-separated and the sound was definitely coming from the main box. It isn't something else in the room; the sound is coming from the box. It isn't cross-talk to an audio circuit coming out the speakers. (It doesn't have any speakers.) It isn't my mouse (e.g., when I'm trying to make graphics ops happen); the sound happens if I set up a recurring operation and don't use the mouse at all, or if I lift the mouse off the table slightly (but enough that the laser still registers movement). It isn't the voices in my head; they never whisper like that. Other observations: It doesn't seem to matter what the graphics operation is; anything that changes what's on the screen seems to do it. I get the sound when moving the mouse over the Chromium tab bar (which makes the tab backgrounds change); I get it when a web page has a counter on it that changes the text on the page: I get it when dragging window contents around. The sound is very, very slightly louder if the graphics op is larger, like scrolling a text area when writing a question on superuser.com, than for smaller operations like the tick counter on the web page. But it's very slight. It's fairly loud (and of good duration) when the op involves color changes to substantial surface areas. For instance, when asking a question here on superuser and you move the cursor between the question box and the tag box, and the help to the right fades out, changes, and fades back in. (Yet another example related to the web browser, so let me say: I hear it when operations completely unrelated to the web browser as well.) It doesn't sound like arcing or anything like that (I'd've shut off the machine Right Quick Like if it did). Moving windows does it. Scrolling windows (by and large) doesn't. I have the feeling I've heard this sort of thing before, when all system fans were on low and such, with other systems — but (again) written it off as observational error. For all the world it's like I'm hearing the CPU working (as opposed to the GPU; note the window scroll thing above) or data being transferred somewhere, but that just seems...unlikely. So what am I hearing? This may seem like a very localized question, but perhaps other silent PC enthusiasts may be interested as well...

    Read the article

  • Will just a couple of thermal "trip" shutdowns typically damage a CPU?

    - by T.J. Crowder
    The short version If a CPU gets so hot that the system turns itself off because of a thermal trip signal just a couple of times, is it likely that the CPU will be damaged? Or does the trip do its job, turning it off before the CPU gets damaged? (This is with all default settings in the BIOS; I haven't raised any temp thresholds or overclocked anything.) The longer version I just got this Intel Atom D510-based fanless system, installed a 2.5" mobile SATA drive and two 2GB PC2-6400s, closed it up, and having checked everything was recognized in the BIOS, set about installing Ubuntu. After a couple of false starts related, I think, to the external DVD drive I was using, I got the install happily running along. About three-fourths or so of the way through the install, having been running less than an hour, the machine turned itself off. I was actually out of the room at the time, but when I came back and turned it back on, it said it had shut down due to a thermal event. I went into the BIOS and saw that (at that point, having just been turned back on after a couple of minutes off), it was running 87C. As near as I can tell from Intel's docs (PDF here), the max "junction" temperature for the CPU is 100C and it will raise a THERMTRIP signal at 125C. Yowsa. Presumably there will be some back-and-forth with the vendor on this, I'm just wondering whether letting it get that hot a couple of times is likely to end up damaging it.

    Read the article

  • CPU load, USB connection vs. NIC

    - by T.J. Crowder
    In general, and understanding the answer may vary by manufacturer and model (and driver, and...), in consumer-grade workstations with integrated NICs, does the NIC rely on the CPU for a lot of help (as is typically the case with a USB controller, for instance), or is it fairly intelligent and capable on its own (like, say, the typical Firewire controller)? Or is the question too general to answer? (If it matters, you can assume Linux.) Background: I'm looking at connecting a device (digital television capture) that will be delivering ~20-50 Mbit/sec of data to a somewhat under-powered workstation. I can get a USB 2 High-speed device, or a network-attached device, and am interested in avoiding impacting the CPU where possible. Obviously, if it's a 100Mbit NIC, that's roughly half its theoretical inbound bandwidth, whereas it's only roughly a tenth of the 480 Mbit/second the USB 2 "High Speed" interface. But if the latter requires a lot of CPU support and the former doesn't...

    Read the article

  • Hot-swap drive got new name, can I change it on-the-fly?

    - by T.J. Crowder
    One of the HDDs in my server's RAID config failed, so I took it out of the array and had the data center hot-swap it. They've done that, but now the new drive is /dev/sdc rather than /dev/sda. I suspect — correct me if I'm wrong — that if I reboot the server, it will be /dev/sda again, so I'm hesitant to add it back to the array as /dev/sdc because I don't want to lay a trap for myself to fall into on the next reboot. I'd just as soon not reboot the server if I don't need to (if I do need to, well, too bad for me). Is there a way I can change the device name from /dev/sdc to /dev/sda without rebooting? This is on Ubuntu 10.04 LTS. It's an md array ("Linux Software RAID"), where currently one of the devices (there are a couple of them) looks like this ("degraded" because I've removed the old /dev/sda from it): # mdadm --detail /dev/md0 /dev/md0: Version : 00.90.03 Creation Time : Sun Oct 11 21:07:54 2009 Raid Level : raid1 Array Size : 97536 (95.27 MiB 99.88 MB) Used Dev Size : 97536 (95.27 MiB 99.88 MB) Raid Devices : 2 Total Devices : 1 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Thu Jun 30 09:31:16 2011 State : clean, degraded Active Devices : 1 Working Devices : 1 Failed Devices : 0 Spare Devices : 0 UUID : 496be7a5:ab9177ed:7792c71e:7dc17aa4 Events : 0.112 Number Major Minor RaidDevice State 0 8 17 0 active sync /dev/sdb1 1 0 0 1 removed Thanks, Update: Reading through the kernel md documentation, I suspect that if the name changes on reboot, it won't matter. (Good design, that.) Here's why: Boot time autodetection of RAID arrays When md is compiled into the kernel (not as module), partitions of type 0xfd are scanned and automatically assembled into RAID arrays. This autodetection may be suppressed with the kernel parameter "raid=noautodetect". As of kernel 2.6.9, only drives with a type 0 superblock can be autodetected and run at boot time. The kernel parameter "raid=partitionable" (or "raid=part") means that all auto-detected arrays are assembled as partitionable. I do have md compiled into the kernel, so I'm rebuilding the array now and will do the reboot to see what happens. Even if it works, the above doesn't answer the question I actually asked, so unless someone comes along and answers that question in the meantime (I'd be interested, even if it's not necessary for what I'm doing this very moment), I'll just delete the question to keep noise down.

    Read the article

  • Problem with GetDefaultPrinter() over a VPN c++

    - by Ian Crowder
    I am writing an application that gets its dimensions from the paper ratio of the default printer of the local computer. This all works well unless the default printer is over a VPN. When this is the case, calling GetDefaultPrinter() takes too long. I need to find a way to put a time constraint on GetDefaultPrinter() and if it exceeds that constraint, break out of the function. Any possible solutions would be great. Thanks, Ian

    Read the article

  • Imagemagick - File Naming

    - by Josh Crowder
    I am using the convert command to convert a pdf to multiple pngs, I need the naming conventions to be slide-##.png at the moment they come out like slide-1.png but because there is 20+ slides when I loop through them to add them into the model the order comes up wrong, so it looks like slide-1.png slide-10.png slide-11.png and so on, how can I force convert to use double numbers like 01 02 03 and so forth or is there a better way to loop through them, this is the code I have at the moment def convert_keynote_to_slides system('convert -size 640x300 ' + keynote.queued_for_write[:original].path + ' ~/rails/arcticfox/public/system/keynotes/slides/'+File.basename( self.keynote_file_name )+'0%d.png') slide_basename = File.basename( self.keynote_file_name ) files = Dir.entries('/Users/joshcrowder/rails/arcticfox/public/system/keynotes/slides') for file in files #puts file if file.include?(slide_basename +'-') self.slides.build("slide" => "#{file}") if file.include?(slide_basename) end end

    Read the article

  • Merging Passed Parameters

    - by Josh Crowder
    I have a two data arrays sent in from a form, one called transloaded and the other video which is the actual form for the model. I need to get [:video_encoded][:url] and save that to [:video][:flash_url] This is the passed arguments or transloaded, when I try and access [:transload][:results][:video_encode] I get nil. print params[:transload] { "assembly_id":"d59b4293b3d79d2ccd1948c02421c6a6", "status":"success", "uploads":{ "video":{ "name":"bbc_one.mp4", "mime":"video/mp4", "ext":"mp4", "size":601104, "meta":{ "width":720, "height":404, "video_fps":25, "video_bitrate":null, "video_format":"avc1", "video_codec":"ffh264", "audio_bitrate":"128k", "audio_codec":"faad", "duration":3.07, "device_vendor":null, "device_name":null, "device_software":null, "latitude":null, "longitude":null }, "url":"http://tmp.transloadit.com/" } }, "results":{ "video_encode":{ "name":"bbc_one.flv", "mime":"video/x-flv", "steps":["encode","export"], "ext":"flv", "size":388317, "meta":{ "width":480, "height":320, "video_fps":25, "video_bitrate":"512k", "video_format":"FLV1", "video_codec":"ffflv", "audio_bitrate":"64k", "audio_codec":"mp3", "duration":3.11, "device_vendor":null, "device_name":null, "device_software":null, "latitude":null, "longitude":null }, "url":"http://s3.transloadit.com/b7deac9c96af6c745e914e25d0350baa/7a/2b09e822265ac2328789b40dcc02ae/bbc_one.flv" }, "video_encode_iphone":{ "name":"bbc_one.qt", "mime":"video/quicktime", "steps":["encode_iphone","export"], "ext":"qt", "size":218236, "meta":{ "width":480, "height":320, "video_fps":25, "video_bitrate":null, "video_format":"avc1", "video_codec":"ffh264", "audio_bitrate":"128k", "audio_codec":"faad", "duration":3.04, "device_vendor":null, "device_name":null, "device_software":null, "latitude":null, "longitude":null }, "url":"http://s3.transloadit.com/31/58bcc80d5345e52a42c9773125e8f0/bbc_one.qt" } } } Here is what I am trying to use video_links = { :flash_url => params[:transload][:results][:video_encode][:url], :mp4_url => params[:transload][:results][:video_encode_iphone][:url] } params[:video].merge(video_links)

    Read the article

  • SyntaxError: Parse Error only happens in safari

    - by Josh Crowder
    Im getting SyntaxError: Parse Error, only on safari. Here is the code in question. <script type="text/javascript"> // I am using transloadit a jquery plugin. which works on every other page and is loading fine on safari by the looks of it. The errors is on line 44 which is export: { Can anyone see anything wrong with that page?

    Read the article

  • PDF to PNG Processor - Paperclip

    - by Josh Crowder
    I am trying to develop a system in which a user can upload a slideshow (pdf) and it'll export each slide as a png. After some digging around I came across a post on here that suggested using a processor. I've had a go, but I cant get the command to run, if it is running then I don't know what is happening because no errors are being shown. Any help would be appreciated! module Paperclip class Slides < Processor def initialize(file, options = {}, attachment = nill) super @file = file @instance = options[:instance] @current_format = File.extname(@file.path) @basename = File.basename(@file.path, @current_format) end def make dst = Tempfile.new( [ @basename, @format].compact.join(".")) dst.binmode command = <<-end_command -size 640x300 #{ File.expand_path(dst.path) } tester.png end_command begin success = Paperclip.run("convert", command.gsub(/\s+/, " "))) rescue PaperclipCommandLineError raise PaperclipError, "There was an error processing the thumbnail for #{@basename}" end end end end I think my problem is with the convert command... When I run that command by hand, it works but it doesn't give the details of each slide it just executes it. What I need to happen is once its made all the slides, pass back the data to a new model... or I know where all the slides are, but once I get to that point I'm not sure what todo.

    Read the article

  • Is it possible to change where things are in Chrome's Developer Tools Script panel?

    - by T.J. Crowder
    When debugging browser-based apps using Google Chrome's Developer Tools, is there a way to change the locations of the various panes? Specifically in the Scripts panel (though I suppose it's a general question). E.g., the Watch Expressions, the Call Stack, the code pane, etc.? The defaults are okay (console at bottom, code pane upper left, a column of Watch Expressions, Call Stack, Scope Vars, etc. in the upper right), but I'd rather swap things around a bit if it's possible. There doesn't seem to be anything to grab (other than for sizing) and I haven't found a way in my searching so far, but there are (still) some things about Chrome's options that aren't ... well-advertised in the UI, shall we say :-), especially around developer tools.

    Read the article

  • Associating Models with Polymorphic

    - by Josh Crowder
    I am trying to associate Contacts with Classes but as two different types. Current_classes and Interested_classes. I know I need to enable polymorphic but I am not sure as to where it needs to be enabled. This is what I have at the moment class CreateClasses < ActiveRecord::Migration def self.up create_table :classes do |t| t.string :class_type t.string :class_name t.string :date t.timestamps end end def self.down drop_table :classes end end class CreateContactsInterestedClassesJoin < ActiveRecord::Migration def self.up create_table 'contacts_interested_classes', :id => false do |t| t.column 'class_id', :integer t.column 'contact_id', :integer end end def self.down drop_table 'contacts_interested_classes' end end class CreateContactsCurrentClassesJoin < ActiveRecord::Migration def self.up create_table 'contacts_current_classes', :id => false do |t| t.column 'class_id', :integer t.column 'contact_id', :integer end end def self.down drop_table 'contacts_current_classes' end end And then inside of my Contacts Model I want to have something like this. class Contact < ActiveRecord::Base has_and_belongs_to_many :classes, :join_table => "contacts_interested_classes", :foreign_key => "class_id" :as => 'interested_classes' has_and_belongs_to_many :classes, :join_table => "contacts_current_classes", :foreign_key => "class_id" :as => 'current_classes' end What am I doing wrong?

    Read the article

  • Bulk stop watching tickets on Lighthouse?

    - by T.J. Crowder
    Via the Lighthouse user interface, is there any way to bulk stop watching tickets? I have more than 150 tickets on a project I want to stop watching, and would just as soon not go into each and every one of them. I thought the bulk edit command might work, but there doesn't appear to be a watch keyword in the bulk edit stuff (which is fair enough, I'm not really editing the tickets). When I go to my profile, I can subscribe or unsubscribe to an entire project, but I'm not seeing a way to do this at the (bulk) ticket level. Looking at a list of the tickets I'm watching, I'm not seeing a way to do anything to all of them (other than the bulk edit command of course). Is there something I'm missing?

    Read the article

  • Is it possible to change the pane locations in Chrome Developer Tools?

    - by T.J. Crowder
    When debugging browser-based apps using Google Chrome's Developer Tools, is there a way to change the locations of the various panes? E.g., the Watch Expressions, the Call Stack, the code pane, etc.? The defaults are okay (console at bottom, code pane upper left, a column of Watch Expressions, Call Stack, Scope Vars, etc. in the upper right), but I'd rather swap things around a bit of it's possible. There doesn't seem to be anything to grab (other than for sizing) and I haven't found a way in my searching so far, but there are (still) some things about Chrome's options that aren't ... well-advertised in the UI, shall we say :-), especially around developer tools.

    Read the article

  • Paperclip Progres bar

    - by Josh Crowder
    I havve been looking around for something that shows the progress of an upload using Paperclip. I can't find any solutions is there any out there? If not is there any particular progress uploader that can be recommended?

    Read the article

  • Splitting PDF to png

    - by Josh Crowder
    I'm using paperclip to upload a pdf. Once the file is uploaded I need to split every page into a png. This is the command I think I need to use convert -size 640x300 fileName.pdf slide.png Now if I run that command from terminal it works fine, but I need a way of getting each slides name so I can add it into a model. What's the best way to achieve this?

    Read the article

  • Named Function Expressions in IE, part 2

    - by Polshgiant
    I asked this question a while back and was happy with the accepted answer. I just now realized, however, that the following technique: var testaroo = 0; (function executeOnLoad() { if (testaroo++ < 5) { setTimeout(executeOnLoad, 25); return; } alert(testaroo); // alerts "6" })(); returns the result I expect. If T.J.Crowder's answer from my first question is correct, then shouldn't this technique not work?

    Read the article

  • Legitimate uses of the Function constructor

    - by Marcel Korpel
    As repeatedly said, it is considered bad practice to use the Function constructor (also see the ECMAScript Language Specification, 5th edition, § 15.3.2.1): new Function ([arg1[, arg2[, … argN]],] functionBody) (where all arguments are strings containing argument names and the last (or only) string contains the function body). To recapitulate, it is said to be slow, as explained by the Opera team: Each time […] the Function constructor is called on a string representing source code, the script engine must start the machinery that converts the source code to executable code. This is usually expensive for performance – easily a hundred times more expensive than a simple function call, for example. (Mark ‘Tarquin’ Wilton-Jones) Though it's not that bad, according to this post on MDC (I didn't test this myself using the current version of Firefox, though). Crockford adds that [t]he quoting conventions of the language make it very difficult to correctly express a function body as a string. In the string form, early error checking cannot be done. […] And it is wasteful of memory because each function requires its own independent implementation. Another difference is that a function defined by a Function constructor does not inherit any scope other than the global scope (which all functions inherit). (MDC) Apart from this, you have to be attentive to avoid injection of malicious code, when you create a new Function using dynamic contents. Lots of disadvantages and it is intelligible that ECMAScript 5 discourages the use of the Function constructor by throwing an exception when using it in strict mode (§ 13.1). That said, T.J. Crowder says in an answer that [t]here's almost never any need for the similar […] new Function(...), either, again except for some advanced edge cases. So, now I am wondering: what are these “advanced edge cases”? Are there legitimate uses of the Function constructor?

    Read the article

  • Save object states in .data or attr - Performance vs CSS?

    - by Neysor
    In response to my answer yesterday about rotating an Image, Jamund told me to use .data() instead of .attr() First I thought that he is right, but then I thought about a bigger context... Is it always better to use .data() instead of .attr()? I looked in some other posts like what-is-better-data-or-attr or jquery-data-vs-attrdata The answers were not satisfactory for me... So I moved on and edited the example by adding CSS. I thought it might be useful to make a different Style on each image if it rotates. My style was the following: .rp[data-rotate="0"] { border:10px solid #FF0000; } .rp[data-rotate="90"] { border:10px solid #00FF00; } .rp[data-rotate="180"] { border:10px solid #0000FF; } .rp[data-rotate="270"] { border:10px solid #00FF00; } Because design and coding are often separated, it could be a nice feature to handle this in CSS instead of adding this functionality into JavaScript. Also in my case the data-rotate is like a special state which the image currently has. So in my opinion it make sense to represent it within the DOM. I also thought this could be a case where it is much better to save with .attr() then with .data(). Never mentioned before in one of the posts I read. But then i thought about performance. Which function is faster? I built my own test following: <!DOCTYPE HTML> <html> <head> <title>test</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript"> function runfirst(dobj,dname){ console.log("runfirst "+dname); console.time(dname+"-attr"); for(i=0;i<10000;i++){ dobj.attr("data-test","a"+i); } console.timeEnd(dname+"-attr"); console.time(dname+"-data"); for(i=0;i<10000;i++){ dobj.data("data-test","a"+i); } console.timeEnd(dname+"-data"); } function runlast(dobj,dname){ console.log("runlast "+dname); console.time(dname+"-data"); for(i=0;i<10000;i++){ dobj.data("data-test","a"+i); } console.timeEnd(dname+"-data"); console.time(dname+"-attr"); for(i=0;i<10000;i++){ dobj.attr("data-test","a"+i); } console.timeEnd(dname+"-attr"); } $().ready(function() { runfirst($("#rp4"),"#rp4"); runfirst($("#rp3"),"#rp3"); runlast($("#rp2"),"#rp2"); runlast($("#rp1"),"#rp1"); }); </script> </head> <body> <div id="rp1">Testdiv 1</div> <div id="rp2" data-test="1">Testdiv 2</div> <div id="rp3">Testdiv 3</div> <div id="rp4" data-test="1">Testdiv 4</div> </body> </html> It should also show if there is a difference with a predefined data-test or not. One result was this: runfirst #rp4 #rp4-attr: 515ms #rp4-data: 268ms runfirst #rp3 #rp3-attr: 505ms #rp3-data: 264ms runlast #rp2 #rp2-data: 260ms #rp2-attr: 521ms runlast #rp1 #rp1-data: 284ms #rp1-attr: 525ms So the .attr() function did always need more time than the .data() function. This is an argument for .data() I thought. Because performance is always an argument! Then I wanted to post my results here with some questions, and in the act of writing I compared with the questions Stack Overflow showed me (similar titles) And true enough, there was one interesting post about performance I read it and run their example. And now I am confused! This test showed that .data() is slower then .attr() !?!! Why is that so? First I thought it is because of a different jQuery library so I edited it and saved the new one. But the result wasn't changing... So now my questions to you: Why are there some differences in the performance in these two examples? Would you prefer to use data- HTML5 attributes instead of data, if it represents a state? Although it wouldn't be needed at the time of coding? Why - Why not? Now depending on the performance: Would performance be an argument for you using .attr() instead of data, if it shows that .attr() is better? Although data is meant to be used for .data()? UPDATE 1: I did see that without overhead .data() is much faster. Misinterpreted the data :) But I'm more interested in my second question. :) Would you prefer to use data- HTML5 attributes instead of data, if it represents a state? Although it wouldn't be needed at the time of coding? Why - Why not? Are there some other reasons you can think of, to use .attr() and not .data()? e.g. interoperability? because .data() is jquery style and HTML Attributes can be read by all... UPDATE 2: As we see from T.J Crowder's speed test in his answer attr is much faster then data! which is again confusing me :) But please! Performance is an argument, but not the highest! So give answers to my other questions please too!

    Read the article

1