Search Results

Search found 1144 results on 46 pages for 'kevin boyd'.

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

  • How to place SuperFetch cache on an SSD?

    - by Ian Boyd
    I'm thinking of adding a solid state drive (SSD) to my existing Windows 7 installation. I know I can (and should) move my paging file to the SSD: Should the pagefile be placed on SSDs? Yes. Most pagefile operations are small random reads or larger sequential writes, both of which are types of operations that SSDs handle well. In looking at telemetry data from thousands of traces and focusing on pagefile reads and writes, we find that Pagefile.sys reads outnumber pagefile.sys writes by about 40 to 1, Pagefile.sys read sizes are typically quite small, with 67% less than or equal to 4 KB, and 88% less than 16 KB. Pagefile.sys writes are relatively large, with 62% greater than or equal to 128 KB and 45% being exactly 1 MB in size. In fact, given typical pagefile reference patterns and the favorable performance characteristics SSDs have on those patterns, there are few files better than the pagefile to place on an SSD. What I don't know is if I even can put a SuperFetch cache (i.e. ReadyBoost cache) on the solid state drive. I want to get the benefit of Windows being able to cache gigabytes of frequently accessed data on a relativly small (e.g. 30GB) solid state drive. This is exactly what SuperFetch+ReadyBoost (or SuperFetch+ReadyDrive) was designed for. Will Windows offer (or let) me place a ReadyBoost cache on a solid state flash drive connected via SATA? A problem with the ReadyBoost cache over the ReadyDrive cache is that the ReadyBoost cache does not survive between reboots. The cache is encrypted with a per-session key, making its existing contents unusable during boot and SuperFetch pre-fetching during login. Update One I know that Windows Vista limited you to only one ReadyBoost.sfcache file (I do not know if Windows 7 removed that limitation): Q: Can use use multiple devices for EMDs? A: Nope. We've limited Vista to one ReadyBoost per machine Q: Why just one device? A: Time and quality. Since this is the first revision of the feature, we decided to focus on making the single device exceptional, without the difficulties of managing multiple caches. We like the idea, though, and it's under consideration for future versions. I also know that the 4GB limit on the cache file was a limitation of the FAT filesystem used on most USB sticks - an SSD drive would be formatted with NTFS: Q: What's the largest amount of flash that I can use for ReadyBoost? A: You can use up to 4GB of flash for ReadyBoost (which turns out to be 8GB of cache w/ the compression) Q: Why can't I use more than 4GB of flash? A: The FAT32 filesystem limits our ReadyBoost.sfcache file to 4GB Can a ReadyBoost cache on an NTFS volume be larger than 4GB? Update Two The ReadyBoost cache is encrypted with a per-boot session key. This means that the cache has to be re-built after each boot, and cannot be used to help speed boot times, or latency from login to usable. Windows ReadyDrive technology takes advantage of non-volatile (NV) memory (i.e. flash) that is incorporated with some hybrid hard drives. This flash cache can be used to help Windows boot, or resume from hibernate faster. Will Windows 7 use an internal SSD drive as a ReadyBoost/*ReadyDrive*/SuperFetch cache? Is it possible to make Windows store a SuperFetch cache (i.e. ReadyBoost) on a non-removable SSD? Is it possible to not encrypt the ReadyBoost cache, and if so will Windows 7 use the cache at boot time? See also SuperUser.com: ReadyBoost + SSD = ? Windows 7 - ReadyBoost & SSD drives? Support and Q&A for Solid-State Drives Using SDD as a cache for HDD, is there a solution? Performance increase using SSD for paging/fetch/cache or ReadyBoost? (Win7) Windows 7 To Boost SSD Performance How to Disable Nonvolatile Caching

    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

  • Chrome "New Tab Page" not showing most frequently visited pages

    - by Ian Boyd
    Google Chrome's*New Tab Page* is not populating the most frequented visted sites grid with anything: It's been sitting like that1 for months. My work machine populates them fine. Edit: Google Chrome Version 4.0.249.892 Edit 2: (Possibly related) Chrome is not storing any history 1i even tried clicking Restore all removed thumbnails 2Updated to 4.0.249.89 just now. Previous build was 78.

    Read the article

  • How to make Google Chrome honor my Windows dpi setting?

    - by Ian Boyd
    Google Chrome doesn't seem to respect my dpi-setting in Windows. i run at 150 dpi, but Chrome ignores that; meaning that images and text are teeeeeeny tiny. i hit Ctrl + + Ctrl + + to zoom in. Unfortunatly every new tab, or new window, defaults to the 100% teeny tiny zoom level. Is it possible for either: Chrome to respect my Windows dpi setting? Chrome to remember my zoom preference? Keywords: chrome, high dpi, accessibility Checked version: 4.0.249.78

    Read the article

  • Where are the Microsoft downloaded app compat updates stored?

    - by Ian Boyd
    Where are the Microsoft application compatibility update settings stored on a Windows XP, Windows Vista, and Windows 7 computer? Microsoft periodically release application compatibility updates (e.g. KB929427), where they list the shims that should be applied to a program in order to workaround known bugs in the software. Where are these app compat flags stored, and how can i see what shims are being applied? i have a feeling that a recent app compat update included a flag to force a particular piece of software, that we use, to require administrator. Because the task is scheduled to run nightly, and the running user does not have administrative privelages, the task is failing to start. The application is requiring to be elevated. It has the UAC shield overlay. The application has no RT_MANIFEST resource, and the compatibility option Run this program as administrator is disabled (per-user and all users). So all that's left is some secret global setting. i know user-specified compat flags are stored in: HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows NT \CurrentVersion \AppCompatFlags \Layers

    Read the article

  • What is causing sudden freezing during running real-time program?

    - by Trevor Boyd Smith
    So I run a high intensive (CPU/GPU) real-time program. During normal execution suddenly everything freezes for 1-4 seconds. I opened "Process Explorer" in the background to help gain insight and maybe identify something. Here is what the CPU/GPU graphs looks like when I align them in time: Notice the 4 distinct drops in both the CPU/GPU. You can see that it goes from some sort of positive CPU/GPU usage to almost zero. These drops in the graph align with when the real-time program suddenly freezes. How do I find what is causing these sudden drops? NOTE: When you put your mouse over the graph it tells you the time, accurate to the second, for where your cursor is. Maybe this mouse over feature could be helpful in some way (e.g. what if you had a log of all processes every 100ms). EDIT: The real-time program is a video game and so I can't watch some sort of instrumentation while the video game is running. I need a solution that let's you look back in time somehow to see what was happening when the slow down occurred. EDIT: RE - Recording Data vs using real-time monitor: So the windows performance recorder is for some reason not recording what I expect it to record. So I switched to using "perfmon" and then opening it's "resource monitor". RE - Setting it up so I can view real-time monitor: In the video game I set it to spectate and then put the video game in "windowed" mode so that I can view the real time display that Resource Monitor has. Now that I can get semi-real time (only once per second... how do you get more than once per second?) I started looking at the various real time data readouts. Getting to the cause: I noticed a strong correlation in high disk IO and low CPU usage (which is also seen by having in-game freezing). How do you use resource monitor to find out who is doing all this offending disk IO?

    Read the article

  • KB980408: Fix for Explorer freezing: does anyone know what app caused it?

    - by Ian Boyd
    Microsoft released an update for Windows 7 today (Tuesday, April 27, 2010): KB980408: The April 2010 stability and reliability update for Windows 7 and Windows Server 2008 R2 is available. The update fixes, among other things: Windows Explorer may stop responding for 30 seconds when a file or a directory is created or renamed after certain applications are installed. i'm not experiencing it on my own Windows 7 machine, but two colleagues at work were experiencing the problem. i would really like to know what applications were causing problems. Microsoft will never call out the misbehaving applications. i want to know what software i should be ridiculing and insulting. And avoid in the future. Did anyone who was experiencing this problem isolate the applications?

    Read the article

  • Should I use "Raid 5 + spare" or "Raid 6"?

    - by Trevor Boyd Smith
    What is "Raid 5 + Spare" (excerpt from User Manual, Sect 4.17.2, P.54): RAID5+Spare: RAID 5+Spare is a RAID 5 array in which one disk is used as spare to rebuild the system as soon as a disk fails (Fig. 79). At least four disks are required. If one physical disk fails, the data remains available because it is read from the parity blocks. Data from a failed disk is rebuilt onto the hot spare disk. When a failed disk is replaced, the replacement becomes the new hot spare. No data is lost in the case of a single disk failure, but if a second disk fails before the system can rebuild data to the hot spare, all data in the array will be lost. What is "Raid 6" (excerpt from User Manual, Sect 4.17.2, P.54): RAID6: In RAID 6, data is striped across all disks (minimum of four) and a two parity blocks for each data block (p and q in Fig. 80) is written on the same stripe. If one physical disk fails, the data from the failed disk can be rebuilt onto a replacement disk. This Raid mode can support up to two disk failures with no data loss. RAID 6 provides for faster rebuilding of data from a failed disk. Both "Raid 5 + spare" and "Raid 6" are SO similar ... I can't tell the difference. When would "Raid 5 + Spare" be optimal? And when would "Raid 6" be optimal"? The manual dumbs down the different raid with 5 star ratings. "Raid 5 + Spare" only gets 4 stars but "Raid 6" gets 5 stars. If I were to blindly trust the manual I would conclude that "Raid 6" is always better. Is "Raid 6" always better?

    Read the article

  • KB980408: Fix for Explorer freezing: does anyone know what app caused it?

    - by Ian Boyd
    Microsoft released an update for Windows 7 today (Tuesday, April 27, 2010): KB980408: The April 2010 stability and reliability update for Windows 7 and Windows Server 2008 R2 is available. The update fixes, among other things: Windows Explorer may stop responding for 30 seconds when a file or a directory is created or renamed after certain applications are installed. i'm not experiencing it on my own Windows 7 machine, but two colleagues at work were experiencing the problem. i would really like to know what applications were causing problems. Microsoft will never call out the misbehaving applications. i want to know what software i should be ridiculing and insulting. And avoid in the future. Did anyone who was experiencing this problem isolate the applications?

    Read the article

  • Debugging an IP Camera

    - by Kevin Boyd
    Further to my previous question on ServerFault here, I finally can view the stream on RTSP however I still cannot view the camera stream in a web browser. The IP camera uses an activeX control in Internet Explorer. And although I can configure the camera settings from IE, I cannot view the stream it shows connecting for a few sec and shows disconnecting. I have forwarded the HTTP, RTSP and Stream ports of the IP camera. the public port is 7071 and private port is 7070. When I try to see the connections in TCPView it shows that the ActiveX control in IE is trying to connect to port 7070 which is quite unusual since it should connect to 7071 Also the state shows SYN_SENT for sometime and then disconnects. I have really no clue what's going on and why?

    Read the article

  • Encrypted WiFi with no password?

    - by Ian Boyd
    Is there any standard that allows a WiFi connection to be encrypted, but not require a password? i know that (old, weak) WEP, and newer WPA/WPA2 require a password (i.e. shared secret). Meanwhile my own wireless connections are "open", and therefore unencrypted. There is no technical reason why i can't have an encrypted link that doesn't require the user to enter any password. Such technology exists today (see public key encryption and HTTPS). But does such a standard exist for WiFi? Note: i only want to protect communications, not limit internet access. i get the sense that no such standard exists (since i'm pretty capable with Google), but i'd like it confirmed. Claraification: i want to protect communcations, not limit internet access. That means users are not required to have a password (or its moral equivalent). This means users are not required: to know a password to know a passphrase to enter a CAPTCHA to draw a secret to have a key fob to know a PIN to use a pre-shared key have a pre-shared file to possess a certificate In other words: it has the same accessibility as before, but is now encrypted.

    Read the article

  • How do I force a restore over an existing database?

    - by Ian Boyd
    I have a database, and i want to force a restore over top of it. I check the option: Overwrite the existing database (WITH REPLACE) But, as expected, SSMS is unable to overwrite the existing database. Of course i don't want different filenames; i want to overwrite the existing database. How do i force a restore over an existing database? And for Google search crawler: File '%s' is claimed by '%s'(4) and '%s"(3). The WITH MOVE clause can be used to relocate one or more files. RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3176) Update The script (before i deleted the database, because i needed to get it done) was: RESTORE DATABASE [HealthCareGovManager] FILE = N'HealthCareGovManager_Data', FILE = N'HealthCareGovManager_Archive', FILE = N'HealthCareGovManager_AuditLog' FROM DISK = N'D:\STAGING\HealthCareGovManager10232013.bak' WITH FILE = 1, MOVE N'HealthCareGovManager_Data' TO N'D:\CGI Data\HealthCareGovManager.MDF', MOVE N'HealthCareGovManager_Archive' TO N'D:\CGI Data\HealthCareGovManager.ndf', MOVE N'HealthCareGovManager_AuditLog' TO N'D:\CGI Data\HealthCareGovManager.ndf', MOVE N'HealthCareGovManager_Log' TO N'D:\CGI Data\HealthCareGovManager.LDF', NOUNLOAD, REPLACE, STATS = 10 I used the UI to delete the existing database, so that i could use the UI to force an overwrite of the (non)existing database. Hopefully there can be an answer so that the next guy can have an answer. No, nobody was in the context of the database (The error message from other connections is quite different from this error, and i only got to see this error after i killed the other connections).

    Read the article

  • Hard Drive Bad Sector marking utility

    - by Kevin Boyd
    I already have Windows XP, During installing Ubuntu(dual boot) the disk drive just stuck up at one place and doesn't seem to move ahead.. Is there a disk bad sector mark utility that just marks these sectors so that the disk doesn't seek them later. I tried running Seagate Seatools on the drive but both the short test and long test fail even before they start even chkdsk /f/r doesn't seem to work as the system locks up at stage four.

    Read the article

  • Any hardware/software routers that support Full Cone NAT?

    - by Ian Boyd
    i'm trying to get Teredo to function on my machine. Most routers, it seems, refuse to forward packets from any host other than the one i specifically connected to first. Teredo requires full Cone NAT in order to function. Does any router, hardware or software, allow full cone NAT? Is this an oversight by the designers of Teredo that nobody, in practice, can use it? i've tried m0n0wall pfsense D-Link Linksys SMC

    Read the article

  • Parent who hates change [closed]

    - by Ian Boyd
    My mother was nearly brought to tears because My Pictures is no longer under My Documents. Everything in Windows (7) works around My Pictures being in its own location, with "Libraries" and everything. Her Picasa wants to index My Pictures, but finds it empty. What's more is that Microsoft created, as a compatibility hack, a junction for anyone who hard-codes My Pictures as being a sub-folder of My Documents: <JUNCTION> My Pictures [C:\Users\Mom\Pictures] What's more is that there is Pictures ? My Pictures I'm about ready to tell her that her new computer is being taken away until she either accepts the changes, or dies. Suggestions?

    Read the article

  • How do I prevent internet access to a group of computers on my network?

    - by Kevin Boyd
    Well I have the following setup... Computer A , B and C are networked.... Computer A is connected to the internet, computer B and C are not setup for internet access currently but I guess its possible with some kind of setting they would eventually be able to access the internet and this is what I would like to prevent. In summary only A should have internet access while A and B and C should still be on intranet. Is this kind of config possible?, what kind of software or setup or tools would I need to achive this?

    Read the article

  • How to change x-axis min/max of Column chart in Excel?

    - by Ian Boyd
    Here i have a column chart of binomial distribution, showing how many times you can expect to roll a six in 235 dice rolls: Note: You could also call it a binomial mass distribution for p=1/6, n=235 Now that graph is kinda squooshed. i'd like to change the Minimum and Maximum on the horizontal axis. i'd like to change them to: Minimum: 22 Maximum: 57 Meaning i want to zoom in on this section of the graph: Bonus points to the reader who can say how the numbers 22 and 57 were arrived at If this were a Scatter graph in Excel, i could adjust the horizintal axis minimum and maximum as i desired: Unfortunately, this is a Column chart, where there are no options to adjust the minimum and maximum limits of the ordinate axis: i can do a pretty horrible thing to the graph in Photoshop, but it's not very useful afterwards: Question: how to a change the x-axis minimum and maximum of a Column chart in Excel (2007)?

    Read the article

  • How should I plan the inheritance structure for my game?

    - by Eric Thoma
    I am trying to write a platform shooter in C++ with a really good class structure for robustness. The game itself is secondary; it is the learning process of writing it that is primary. I am implementing an inheritance tree for all of the objects in my game, but I find myself unsure on some decisions. One specific issue that it bugging me is this: I have an Actor that is simply defined as anything in the game world. Under Actor is Character. Both of these classes are abstract. Under Character is the Philosopher, who is the main character that the user commands. Also under Character is NPC, which uses an AI module with stock routines for friendly, enemy and (maybe) neutral alignments. So under NPC I want to have three subclasses: FriendlyNPC, EnemyNPC and NeutralNPC. These classes are not abstract, and will often be subclassed in order to make different types of NPC's, like Engineer, Scientist and the most evil Programmer. Still, if I want to implement a generic NPC named Kevin, it would nice to be able to put him in without making a new class for him. I could just instantiate a FriendlyNPC and pass some values for the AI machine and for the dialogue; that would be ideal. But what if Kevin is the one benevolent Programmer in the whole world? Now we must make a class for him (but what should it be called?). Now we have a character that should inherit from Programmer (as Kevin has all the same abilities but just uses the friendly AI functions) but also should inherit from FriendlyNPC. Programmer and FriendlyNPC branched away from each other on the inheritance tree, so inheriting from both of them would have conflicts, because some of the same functions have been implemented in different ways on the two of them. 1) Is there a better way to order these classes to avoid these conflicts? Having three subclasses; Friendly, Enemy and Neutral; from each type of NPC; Engineer, Scientist, and Programmer; would amount to a huge number of classes. I would share specific implementation details, but I am writing the game slowly, piece by piece, and so I haven't implemented past Character yet. 2) Is there a place where I can learn these programming paradigms? I am already trying to take advantage of some good design patterns, like MVC architecture and Mediator objects. The whole point of this project is to write something in good style. It is difficult to tell what should become a subclass and what should become a state (i.e. Friendly boolean v. Friendly class). Having many states slows down code with if statements and makes classes long and unwieldy. On the other hand, having a class for everything isn't practical. 3) Are there good rules of thumb or resources to learn more about this? 4) Finally, where does templating come in to this? How should I coordinate templates into my class structure? I have never actually taken advantage of templating honestly, but I hear that it increases modularity, which means good code.

    Read the article

  • How to use Sprockets Rails plugin on Heroku?

    - by Kevin
    Hi, I just deployed my Rails app to Heroku, but the Javascripts that were using Sprockets plugin don't work. I understood that, because my Heroku app is read-only, Sprockets won't work. I've found this sprockets_on_heroku plugin that should do the work, but I don't really get how to use it : I added config.gem sprockets in config/environment.rb I added sprockets in my .gems file I pushed these on Heroku and Sprockets was successfully installed I locally ran script/plugin install git://github.com/jeffrydegrande/sprockets_on_heroku.git and the plugin was successfully installed Nothing changed on Heroku, so I tried to install the plugin on Heroku with heroku plugins:install git://github.com/jeffrydegrande/sprockets_on_heroku.git, which returned sprockets_on_heroku installedbut then, a heroku restartor a heroku pluginscommand would return this: ~/.heroku/plugins/sprockets_on_heroku/init.rb:1: uninitialized constant ActionController (NameError) from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/plugin.rb:25:in `load' from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/plugin.rb:25:in `load!' from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/plugin.rb:22:in `each' from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/plugin.rb:22:in `load!' from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/command.rb:14:in `run' from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/heroku:14 from /opt/local/bin/heroku:19:in `load' from /opt/local/bin/heroku:19 What should I do? Kevin

    Read the article

  • .NET COM Interop on Windows 7 64Bit gives me a headache

    - by Kevin Stumpf
    Hey guys, .NET COM interop so far always has been working quite nicely. Since I upgraded to Windows 7 I don't get my .NET COM objects to work anymore. My COM object is as easy as: namespace Crap { [ComVisible(true)] [Guid("2134685b-6e22-49ef-a046-74e187ed0d21")] [ClassInterface(ClassInterfaceType.None)] public class MyClass : IMyClass { public MyClass() {} public void Test() { MessageBox.Show("Finally got in here."); } } } namespace Crap { [Guid("1234685b-6e22-49ef-a046-74e187ed0d21")] public interface IMyClass { } } assembly is marked ComVisible as well. I register the assembly using regasm /codebase /tlb "path" registers successfully (admin mode). I tried regasm 32 and 64bit. Both time I get the error "ActiveX component cant create object Crap.MyClass" using this vbscript: dim objReg Set objReg = CreateObject("Crap.MyClass") MsgBox typename(objReg) fuslogvw doesn't give me any hints either. That COM object works perfectly on my Vista 32 Bit machine. I don't understand why I haven't been able to google a solution for that problem.. am I really the only person that ever got into that problem? Looking at OleView I see my object is registered successfully. I am able to create other COM objects as well.. it only does not work with my own ones. Thank you, Kevin

    Read the article

  • BackgroundWorker From ASP.Net Application

    - by Kevin
    We have an ASP.Net application that provides administrators to work with and perform operations on large sets of records. For example, we have a "Polish Data" task that an administrator can perform to clean up data for a record (e.g. reformat phone numbers, social security numbers, etc.) When performed on a small number of records, the task completes relatively quickly. However, when a user performs the task on a larger set of records, the task may take several minutes or longer to complete. So, we want to implement these kinds of tasks using some kind of asynchronous pattern. For example, we want to be able to launch the task, and then use AJAX polling to provide a progress bar and status information. I have been looking into using the BackgroundWorker class, but I have read some things online that make me pause. I would love to get some additional advice on this. For example, I understand that the BackgroundWorker will actually use the thread pool from the current application. In my case, the application is an ASP.Net web site. I have read that this can be a problem because when the application recycles, the background workers will be terminated. Some of the jobs I mentioned above may take 3 minutes, but others may take a few hours. Also, we may have several hundred administrators all performing similar operations during the day. Will the ASP.Net application thread pool be able to handle all of these background jobs efficiently while still performing it's normal request processing? So, I am trying to determine if using the BackgroundWorker class and approach is right for our needs. Should I be looking at an alternative approach? Thanks and sorry for such a long post! Kevin

    Read the article

  • Intern working for Indian NGO - Help with PHP 4, advising staff

    - by Kevin Burke
    Hello, For the past three months I've been working for an Indian NGO (http://sevamandir.org), doing some volunteer work in the field but also trying to improve their website, which needs a ton of work. Recently I've been trying to fix the "subscribe to newsletter" button, which is broken. I used filter_var to filter the email input, but when I tried to test this out I got an error. Then I learned that the web host is still using php version 4.3.2 and register_globals is turned on. I've mentioned that they should upgrade their web host before (they are paying around $50 per year for Rediff Web Hosting, complete with 100MB storage and 1 MySQL database). That would add a lot of complexity for the IT staff of 3, who would have to update everyone's email information (I assume? this is a 250-person organization), and have me find a new web host and teach them about it. The staff isn't that sophisticated about web usage - the head guy still uses IE6, and the website's laid out in tables (they use Dreamweaver WYSIWYG to lay out pages). So I've got two options - use regular expressions to filter the email, which I'm not that skilled at doing (and would be more vulnerable to exploitation after I leave), turn off register globals and then try to teach the staff what I'm doing, or try to get them to upgrade their versions of PHP and MySQL and/or change web host. I'd appreciate some advice. Thanks for your help, Kevin

    Read the article

  • Pass a data.frame column name to a function

    - by Kevin Middleton
    I'm trying to write a function to accept a data.frame (x) and a column from it. The function performs some calculations on x and later returns another data.frame. I'm stuck on the best-practices method to pass the column name to the function. The two minimal examples fun1 and fun2 below produce the desired result, being able to perform operations on x$column, using max() as an example. However, both rely on the seemingly (at least to me) inelegant (1) call to substitute() and possibly eval() and (2) the need to pass the column name as a character vector. fun1 <- function(x, column){ do.call("max", list(substitute(x[a], list(a = column)))) } fun2 <- function(x, column){ max(eval((substitute(x[a], list(a = column))))) } df <- data.frame(A = 1:20, B = rnorm(10)) fun1(df, "B") fun2(df, "B") I would like to be able to call the function as fun(df, B), for example. Other options I have considered but have not tried: Pass column as an integer of the column number. I think this would avoid substitute(). Ideally, the function could accept either. with(x, get(column)), but, even if it works, I think this would still require substitute Make use of formula() and match.call(), neither of which I have much experience with. Subquestion: Is do.call() preferred over eval()? Thanks, Kevin

    Read the article

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