Search Results

Search found 184 results on 8 pages for 'trevor sullivan'.

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

  • Rails time zone selector: intelligently selecting a default

    - by Tim Sullivan
    When signing up for an account on one of my apps, we need to store the time zone is in. We're using the time zone selector, which is fine, but I'd like to set the default value to something that it likely the user's current time zone. Is there an easy way, either on the server or using JavaScript, to set the time zone selector to the time zone the user is currently in?

    Read the article

  • Does a program exist for checking two similar directories for file differences?

    - by John Sullivan
    Is there a program to compare one folder and all subfolders to another folder and all subfolders for differences in the files contained therein (presence, absence of files, size and list of filenames)? Example of usage: I have 100 DLL files from environment 1 and I want to check if any of them are different (in size and date modified) from the 100 DLL files in environment 2. So I copy and paste all the DLLs in environment 1 into directory A, and all the DLLs in environment 2 into directory B. I then run my "directory comparison" program on directories A and B and find out that, aha, here is a list of 7 DLLs that have different modified dates and times between the two directories. EDIT: OS is windows XP

    Read the article

  • Creating an additional related model with Devise

    - by Tim Sullivan
    I've started to implement a new project using Devise, which is pretty fantastic for handling users. However, when a user signs up, they're not just creating a User model, but also need to create a related Account model that represents the company. Additional users will also belongs_to this Account model. I can't seem to find a hook for this in Devise, though it seems like a pretty common pattern. What's the best practice for this?

    Read the article

  • UNIX-style RegExp Replace running extremely slowly under windows. Help?

    - by John Sullivan
    I'm trying to run a unix regEXP on every log file in a 1.12 GB directory, then replace the matched pattern with ''. Test run on a 4 meg file is took about 10 minutes, but worked. Obviously something is murdering performance by several orders of magnitude. Find: ^(?!.*155[0-2][0-9]{4}\s.*).*$ -- NOTE: match any line NOT starting 152[0-2]NNNN where in is a number 0-9. Replace with: ''. Is there some justifiable reason for my regExp to take this long to replace matching text, or is the program I am using (this is windows / a program called "grepWin") most likely poorly optimized? Thanks.

    Read the article

  • Is there a way to touch-enable scrolling in a WPF ScrollViewer?

    - by Brian Sullivan
    I'm trying to create a form in a WPF application that will allow the user to use iPhone-like gestures to scroll through the available fields. So, I've put all my form controls inside a StackPanel inside a ScrollViewer, and the scrollbar shows up as expected when there are too many elements to be shown on the screen. However, when I try to test this on my touch-enabled device, a panning gesture (placing a finger down on the surface and dragging it upward) does not move the viewable area down as I would expect. When I simply put a number of elements inside a ListView, the touch gestures work just fine. Is there any way to enable the same kind of behavior in a ScrollViewer? My window is structured like this: <Window x:Class="TestTouchScrolling.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded"> <Grid> <ScrollViewer Name="viewer" VerticalScrollBarVisibility="Auto"> <StackPanel Name="panel"> <StackPanel Orientation="Horizontal"> <Label>Label 1:</Label> <TextBox Name="TextBox1"></TextBox> </StackPanel> <StackPanel Orientation="Horizontal"> <Label>Label 2:</Label> <TextBox Name="TextBox2"></TextBox> </StackPanel> <StackPanel Orientation="Horizontal"> <Label>Label 3:</Label> <TextBox Name="TextBox3"></TextBox> </StackPanel> <!-- Lots more like these --> </StackPanel> </ScrollViewer> </Grid>

    Read the article

  • routing in asp.net mvc.

    - by andrew Sullivan
    I have a route routes.MapRoute("BuildingProject", "BuildingProject/{action}/{id}", new { controller = "Home", action = "Index", id = "" }); i want it to behave like default route ie for url that starts with BuildingProject like http://localhost:4030/BuildingProject/DeleteAll. I tried routes.MapRoute("BuildingProject", "BuildingProject/{action}/{id}", new { controller = "Home", action = "", id = "" }); It worked.But on typing localhost:4030/BuildingProject it is not redirecting to it's Index but showing error. .How to do this.

    Read the article

  • iOS Core Data migration: moving something from an entity into a file

    - by Tim Sullivan
    I have a scenario where I'm moving the contents of a blob stored in a core data entity into a file. I need a way to export that data during a migration, where I know the entity that's being converted and save the blob to a file, writing the location of that file into the converted entity's appropriate attribute. I can't seem to find a way to do this. The docs regarding the Three Stage Migration seem to indicate what can be done, but I'm not sure where to define things, or what exactly to define.

    Read the article

  • MySQL developer here -- Nesting with select * finicky in Oracle 10g?

    - by John Sullivan
    I'm writing a simple diagnostic query then attempting to execute it in the Oracle 10g SQL Scratchpad. EDIT: It will not be used in code. I'm nesting a simple "Select *" and it's giving me errors. In the SQL Scratchpad for Oracle 10g Enterprise Manager Console, this statement runs fine. SELECT * FROM v$session sess, v$sql sql WHERE sql.sql_id(+) = sess.sql_id and sql.sql_text <> ' ' If I try to wrap that up in Select * from () tb2 I get an error, "ORA-00918: Column Ambiguously Defined". I didn't think that could ever happen with this kind of statement so I am a bit confused. select * from (SELECT * FROM v$session sess, v$sql sql WHERE sql.sql_id(+) = sess.sql_id and sql.sql_text <> ' ') tb2 You should always be able to select * from the result set of another select * statement using this structure as far as I'm aware... right? Is Oracle/10g/the scratchpad trying to force me to accept a certain syntactic structure to prevent excessive nesting? Is this a bug in scratchpad or something about how oracle works?

    Read the article

  • SQL developer here -- Nesting with select * finicky in Oracle 10g?

    - by John Sullivan
    I am writing a simple diagnostic query I will execute in my Oracle 10g scratchpad. I am trying to do this as part of a step to build the query. In the SQL Scratchpad for Oracle 10g Enterprise Manager Console, this statement runs fine. SELECT * FROM v$session sess, v$sql sql WHERE sql.sql_id(+) = sess.sql_id and sql.sql_text <> ' ' If I try to wrap that up in Select * from () tb2 I get an error, "ORA-00918: Column Ambiguously Defined". I didn't think that could ever happen with this kind of statement so I am a bit confused. select * from (SELECT * FROM v$session sess, v$sql sql WHERE sql.sql_id(+) = sess.sql_id and sql.sql_text <> ' ') tb2 You should always be able to select * from the result set of another select * statement using this structure as far as I'm aware... right? Is Oracle/10g/the scratchpad trying to force me to accept a certain syntactic structure to prevent excessive nesting? Is this a bug in scratchpad or something about how oracle works?

    Read the article

  • WINDOWS: Your computer hangs. You can windows + R (run dialog) but performance is so halted taskMGR

    - by John Sullivan
    The question is, what process are available to try to recover from total system instability before pulling the plug when we can do nothing but programs or batches in the path from the run dialog (windows + r key), and performance is so dead that taskMGR / procEXP / other programs with visual guis are not usable? I am not a windows expert, but ideally someone out there has written a program that does more or less stuff like this: Immediately set (or perhaps I can set from the run prompt) its priority to extremely high, evaluate performance bottlenecks. E.g. is CPU 100%? If so identify offending program(s) or problems. Attempt / log fixes, then provide crude feedback asking the user if his performance has stabilized enough to abort, wait a few seconds, if no feedback continue, etc. etc. Eventually try to do any "system cleanup" if the program decides it cannot recover and perhaps finally provide a series of beeps to the user, or what have you, to say "OK, I give up, time to pull the plug". Ideally create a log, when able. These kinds of horrible hangs are a situation where surely trying something, anything, is better than nothing -- as long as that something is intelligent -- when the alternative is ripping out the power coord. Again, I am not a windows expert, so perhaps there is a much more elegant "hands on" approach I am not aware of.

    Read the article

  • Sys. engineer has decided to dynamically transform all XSLs into DLLs on website build process. DLL

    - by John Sullivan
    Hello, OS: Win XP. Here is my situation. I have a browser based application. It is "wrapped" in a Visual Basic application. Our "Systems Engineer Senior" has decided to spawn DLL files from all of our XSL pages (many of which have duplicate names) upon building a new instance of the website and have the active server pages (ASPX) use the DLL instead. This has created a "known issue" in which ~200 DLL naming conflicts occur and, thus, half of our application is broken. I think a solution to this problem is that, thankfully, we're generating the names of the DLLs and linking them up with our application dynamically. Therefore we can do something kludgy like generate a hash and append it to the end of the DLL file name when we build our website, then always reference the DLL that had some kind of random string / hash appended to its name. Aside from outright renaming the DLLs, is there another way to have multiple DLLs with the same name register for one application? I think the answer is "No, only between different applications using a special technique." Please confirm. Another question I have on my mind is whether this whole idea is a good practice -- converting our XSL pages (which we use in mass -- every time a response from our web app occurs) into DLL functions that call a "function" to do what the XSL page did via an active server page (ASPX), when we were before just sending an XML response to an XSL page via aspx.

    Read the article

  • Customer wants some data to appear after you later delete rows. System giant / not my creation. Fast

    - by John Sullivan
    This is a fairly common problem, it probably has a name, I just don't know what it is. A.) User sees obscure piece of information in Row B of L_OBSCURE_INFO displayed on some screen at a certain point. It is in table L_Obscure_info. B.) Under certain circumstances we want to correctly delete data in L_OBSCURE_INFO. Unfortunately, nobody accounted for the fact that the user might want to backtrack and see some random piece of information that was most recently in L_OBSCURE_INFO. C.) The system is enormous and L_OBSCURE_INFO is used all the time. You have no idea what the ramifications are of implementing some kind of hack and whatever you do, you don't want to introduce more bugs. I think the best approach would be to create an L_OBSCURE_INFO_HISTORY table and record a record in there every time you change data. But god help your ensuring it's accurate in this system where L_OBSCURE_INFO is being touched everywhere and you don't have time to implement L_OBSCURE_INFO_HISTORY. Is there a particularly easy, clever design solution for this kind of problem -- basically an elegant database hack? If not, is this kind of design problem under a particular class of problems or have a name?

    Read the article

  • License For (Mostly) Open Source Website / Service

    - by Ryan Sullivan
    I have an interesting setup and am not sure how to license a website. I know this is not legal advice, and I am not asking for any. There are so many different Open Source Licenses and I do not have the time to read every last one to see which best fits my situation. Really, I am looking for suggestions and a nudge in the right direction. My setup is: I give away for free version of my web service with a clean website interface. The implementation I use in the actual web site is (almost) identical to what I give away. The main service works the exactly the same way, but the website interface to manage features in the service is fairly different. Really the web interfaces have the same exact backend, and the front ends accomplish the same tasks, but the service I offer on my site is very rich and uses a good deal of javascript, where I kept the interface in the version I give away as simple and javascript-less as possible. Mostly so it is easy to understand and integrate into other sites. I am not entirely sure how I should license this. It is more like I develop an open source service but have a separate site built upon it. I like the GPLv3 but I am not sure if I can use it in this case especially since I am making some money off of google ad's on the site and plan on using amazon affiliates as well. Any help would be greatly appreciated. I do want to open it up as much as possible. But I still want to be able to continue with my own implementation. Thanks in advance for any information or help anyone can provide.

    Read the article

  • Core Data: Detecting the type and casting it

    - by Tim Sullivan
    I have set up a Core Data model that includes an entity, Item with a 1-M relationship with the abstract entity Place, so that an item has many places. There are several entities with the parent set to Place. I want to set up several UI elements depending on the descendent place types. I have a loop that looks something like this: for (Place *place in item.places) { } ... but I'm not sure how to detect what type the place is, and how to cast it to the proper type so that I can access its properties. Thanks for any help!

    Read the article

  • Setting a time limit for a transaction in MySQL/InnoDB

    - by Trevor Burnham
    This sprang from this related question, where I wanted to know how to force two transactions to occur sequentially in a trivial case (where both are operating on only a single row). I got an answer—use SELECT ... FOR UPDATE as the first line of both transactions—but this leads to a problem: If the first transaction is never committed or rolled back, then the second transaction will be blocked indefinitely. The innodb_lock_wait_timeout variable sets the number of seconds after which the client trying to make the second transaction would be told "Sorry, try again"... but as far as I can tell, they'd be trying again until the next server reboot. So: Surely there must be a way to force a ROLLBACK if a transaction is taking forever? Must I resort to using a daemon to kill such transactions, and if so, what would such a daemon look like? If a connection is killed by wait_timeout or interactive_timeout mid-transaction, is the transaction rolled back? Is there a way to test this from the console? Clarification: innodb_lock_wait_timeout sets the number of seconds that a transaction will wait for a lock to be released before giving up; what I want is a way of forcing a lock to be released. Update: Here's a simple example that demonstrates why innodb_lock_wait_timeout is not sufficient to ensure that the second transaction is not blocked by the first: START TRANSACTION; SELECT SLEEP(55); COMMIT; With the default setting of innodb_lock_wait_timeout = 50, this transaction completes without errors after 55 seconds. And if you add an UPDATE before the SLEEP line, then initiate a second transaction from another client that tries to SELECT ... FOR UPDATE the same row, it's the second transaction that times out, not the one that fell asleep. What I'm looking for is a way to force an end to this transaction's restful slumber.

    Read the article

  • Using pre-made patch cables on a punch down block?

    - by Trevor Harrison
    I need to add a 24 port switch to my wiring closet. In the (distant) past, I usually just punched each port of the switch to a 110 block on the wall (using hand-made cables), and cross connect between that and the 110 block that has the runs to each workstation. To save time, I'm thinking of buying 12 pre-made drop cables, cutting them in half (so 24 single ended cables), and punching those to my 110 block. The things I'm worried about are wire type (ie. solid vs. strands) and color scheme. I really don't know if they use different wire types (still?), but I remember that being an issue at one point. Can anyone comment on this? (I definitely won't feel comfortable trying to punch stranded wiring on my 110 block) Also, picking up a random pre-built cable I had laying around, I noticed that the color scheme used didn't appear to be T568B, but T568A, which would clash with the rest of my wall. Anyone know of an online source that specifies these things? I've looked at www.cablesforless.com (which does have nicer prices) and www.cablestogo.com (which seem stupid expensive) so far. Cables For Less doesn't specify wiring scheme, Cables To Go does specify T568B. Both seem to specify stranded wires instead of solid.

    Read the article

  • Scan all domain workstations for specific registry key/environmental variable

    - by Trevor
    I'm looking for scripts or software that can scan workstations on a domain for a particular environmental variable (for interest, it was used to store the SOE build version) and generate a report. Accuracy is key, I don't want any workstations skipped or missed. And considering workstations will need to be powered on for anything to remotely read from the registry (and there's no guarantee they will be), that means something that can sit and run continuously for a while, updating its own records as it goes. Does anyone know of such a beast?

    Read the article

  • Installing mod_mono on Ubuntu: handler doesn't seem to get registered

    - by Trevor Johns
    I'm trying to install mod_mono on Apache 2 (Prefork MPM). I'm using Ubuntu Karmic, and just want an auto-hosting setup (so that any .aspx files are executed, similar to how PHP is normally setup). I did the following to install Mono: $ apt-get install libapache2-mod-mono mono-apache-server2 mono-devel $ a2dismod mod_mono $ a2enmod mod_mono_auto I've confirmed that mod_mono is getting loaded by Apache. However, any .aspx pages I try to load are returned unprocessed and still have an application/x-asp-net MIME type. It's as if the mod_mono handler never gets registered with Apache. Here's the contents of /etc/mod_mono_auto.load: LoadModule mono_module /usr/lib/apache2/modules/mod_mono.so And here's /etc/mod_mono_auto.conf: MonoAutoApplication enabled AddType application/x-asp-net .aspx AddType application/x-asp-net .asmx AddType application/x-asp-net .ashx AddType application/x-asp-net .asax AddType application/x-asp-net .ascx AddType application/x-asp-net .soap AddType application/x-asp-net .rem AddType application/x-asp-net .axd AddType application/x-asp-net .cs AddType application/x-asp-net .config AddType application/x-asp-net .dll DirectoryIndex index.aspx DirectoryIndex Default.aspx DirectoryIndex default.aspx I've even tried setting the handler explicitly: AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .asp Nothing seems to help. Any ideas how to get this working?

    Read the article

  • Using Thunderbird and gmail, sent items appear as unread in "All Mail"

    - by Trevor
    I'm using a gmail account in Thunderbird. When I send a message, a new mail notification appears (sound and system try icon), an unread message appears in the gmail All Mail folder, and the account name turns blue. I have to click on "Sent Mail" or "All Mail" to get rid of the notification. Unsubscribing from "All Mail" is not effective (it still turns the account name blue). This seems to be popping up elsewhere (example), but nobody has posted a helpful answer. How do I keep Thunderbird from thinking that a sent message is new unread mail in the All Mail folder?

    Read the article

  • What is the best way to register a domain name in China?

    - by Trevor Allred
    What is the best (cost and safety) to register a .cn domain name? We recently received 2 emails from companies (px-vps.org and one other) in China saying that another company was trying to steal/register our .com domain name in china (.cn). They then gave us a list of 15 domains from China to India that we should register through their company. Now they are saying we need to register for a 5 year minimum at $100 per domain. It's starting to sound like a $10,000 scam. We called 101domains and they said it would be $30 for the registration fee and $30 for the law firm in Shanghai. Who should I go through to avoid spending a lot of money and be sure we don't get ripped off in the process?

    Read the article

  • Is my Windows partition too far down on the disk?

    - by Trevor Alexander
    I have /boot/ on /dev/sda1 (1GB), followed by my Linux root LVM on /dev/sda2 (1.3GB). Finally, I installed Windows 7 on /dev/sda3 in the remaining 700GB of space. When I select Windows 7 in the grub menu, I get something like the following error and am thrown to grub4dos: find --set-root --ignore-floppies --ignore-cd /bootmgr Error 15: file not found Unable to locate necessary tables for adjustment. None of the options in grub4dos return anything but the above error. I heard that 1TB is the upper limit for locating Windows 7 partitions; is this true? How can I fix the above?

    Read the article

  • Understanding NFS4 exports and pseudofilesystem

    - by Trevor Harrison
    I think I understand the way pre-NFS4 exports work, specifically the namespace of the exported point. (ie. export /mnt/blah on server, use mount server:/mnt/blah /my/mnt/point on client) However, I'm having a hard time wrapping my head around NFS4 exports. What I've been able to gather so far is that you export a 'root' by marking it with fsid=0, which you then import on the client side by referring to it as '/'. (ie. exportfs -o fsid=0 /mnt/blah on server, mount server:/ on client) However, after that, it gets a little weird. From my playing around, it seems I can't export anything else thats not under /mnt/blah. For example, exportfs /home/user1 fails when trying to mount from the client unless /mnt/blah/home/user1 exists on the server. If this is the case, what is the difference between exportfs /mnt/blah/subdir1 on server and mount server:/subdir1 on client and just skipping the exportfs and mounting whatever subdir of /mnt/blah you want? Why would you need to export anything other than the root? Its all in the same namespace anyway.

    Read the article

  • How do you add more space to a Fedora (LVM) partition?

    - by Trevor Boyd Smith
    In a nutshell, i have a VM that ran out of space. I increased the size of the VM's harddrive to be 4 times bigger but the OS partition is still only using 1x the space. I need to change the LVM partition to take up the extra 4x space but I don't know how to extend the LVM partition. (NOTE: To make the screenshots given below I had to boot from a live-cd for gnome-partition-manager (aka gparted). Very unfortunately gparted is only able to "detect LVM" and can't do any LVM operations.) Here is what "gparted" shows. Please notice that the "resize" option is not available: The Problem: I can't find good directions<1 on how to grow the LVM partition via GUI or command-line! How do you grow a LVM partition that was created by the default Fedora install? If you are giving command line directions. Please explain what each line of commands does.

    Read the article

  • Smart subdomain routing via reverse proxy

    - by Trevor Hartman
    I have two servers on my home network: OSX Server and an Ubuntu Server. I'd love to have external subdomains osx.mydomain.com point to osx and ubuntu.mydomain.com point to ubuntu. I know the normal way to do this is to have a static external IP address for each, but that's not an option as this is just my home setup. My question is: is there a way to do this with some reverse proxy trickery? OSX is currently the default entry point for all traffic. I was able to setup a reverse proxy on OSX for ubuntu.mydomain.com on port 80, so web traffic was correctly being proxied to my ubuntu. I'd like to ssh and do a bunch of other stuff though!

    Read the article

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