Search Results

Search found 22 results on 1 pages for 'slaks'.

Page 1/1 | 1 

  • How to compact a registry hive?

    - by SLaks
    I'm using a (non-administrator) roaming profile, with a size limit of 4MB. As you can imagine, it is extremely difficult to stay within that size limit. I've noticed that NTUser.dat, which holds my HKEY_CURRENT_USER hive, is 2560KB, single-handedly using more than half of that limit. Is there any way to shrink the hive without administrator privileges? I don't mind losing any settings or preferences stored in it.

    Read the article

  • XP CD doesn't offer repair option

    - by SLaks
    I'm fixing an IBM Thinkpad laptop running XP Pro which doesn't boot all the way (It gets past the XP logo boot screen, a movable mouse cursor appears, and it doesn't get any further, even in safe mode) after being bumped a bit. I'd like to do a repair install. I booted it to an XP Pro CD, but the Repair install option (not recovery console) doesn't appear. After pressing F8 to accept the EULA, it says, Loading setupp.ini, then immediately goes to a partition list (it never says Searching for previous installations of Microsoft Windows). If I select the partition, it warns me that there is already a Windows installation in that partition, and that it will be completely obliterated if I continue. (So I know that it does see the contents of the hard disk) I booted the same CD in an XP virtual machine, and it offered to repair the XP installtion in the virtual machine, so the problem isn't with the CD. Does anyone know how make it do a repair install (or have any other ideas to solve the problem?) It might not show up because it's an OEM installation (but not an OEM CD), but that's just a guess.

    Read the article

  • Multiple nt52 entries in bootmgr

    - by SLaks
    I have a machine with Windows XP, Server 2003 R2, and Server 2008 R2. Right now, bootmgr has one entry for Server 2008 R2 and one entry for ntldr, which then leads to the ntldr boot.ini menu. Is it possible to add two different nt52 entries on two partitions so that I can access all three OSes from the bootmgr menu? Right now, Server 2008 and XP are in logical drives on an extended partition, but (I assume) I can image them onto basic partitions if necessary.

    Read the article

  • WiFi N Gigabit Router

    - by SLaks
    I'm looking for a WiFi N Gigabit router. I'll be using an iPod Touch 2G and a 2009 17" MacBook Pro over WiFi, and I need at least 4 gigabit ethernet ports plus a WAN port. What do people recommend? In particular, are there any compatibility issues between different WiFi N drafts that would limit the speed of the MacBook, and is it worth getting dual-band?

    Read the article

  • Multiple nt52 entries in bootmgr

    - by SLaks
    I have a machine with Windows XP, Server 2003 R2, and Server 2008 R2. Right now, bootmgr has one entry for Server 2008 R2 and one entry for ntldr, which then leads to the ntldr boot.ini menu. Is it possible to add two different nt52 entries on two partitions so that I can access all three OSes from the bootmgr menu? Right now, Server 2008 and XP are in logical drives on an extended partition, but (I assume) I can image them onto basic partitions if necessary.

    Read the article

  • LCD monitor reports incorrect maximum resolution

    - by SLaks
    I have four 20" Planar 2010M LCD monitors with a maximum resolution of 1600 x 1200 connected to two nVidia video cards (8600 GT and 7600 GS). I'm running Windows Server 2003 x86. Recently, two of the monitors have started mis-reporting their maximum resolution as 1280 x 1024. When this first happened, I used nVidia's Custom Resolutions feature to force the monitors back to 1600 x 1200. Yesterday, however, I upgraded nVidia's video card driver, and ever since, I cannot get the DVI one back to 1600 x 1200. When I add the custom resolution in nVidia's control panel, if I set either the width or the height to even a single pixel more than 1280 x 1024, nothing changes when I click Test (the monitor doesn't even flash black, although after 15 seconds, it flashes black and doesn't change). After adding Does anyone know what the problem is? Is there anything I can do about it?

    Read the article

  • Matching ID3 Tags to Existing Files

    - by SLaks
    I have a collection of ripped CDs that were transcoded to a very low bitrate. (and I lost the original MP3s) I'd like to re-rip the CDs to a higher bitrate, and apply the ID3 tags from the existing rips to the new files. (These are custom tags; they will not be found in online databases) Is there any way to automatically copy ID3 tags by length and track number, or do I need to write one myself?

    Read the article

  • Windows 8 Killed my SSDs

    - by SLaks
    I have a computer running 2 256GB Crucial M4's (CT256M4SSD2) in a RAID 0 (striped) array on an ASUS P9X79 Pro using Intel's (built-in) RAID system. I recently installed Windows 8 Pro as UEFI on this RAID array. (wiping a fully-function Windows 7 non-UEFI installation) Now, whenever the computer is left running for about an hour, the system no longer sees those drives. Since those drives contain Windows, this leads to various forms of BSODs. If I Intel RSTe (RAID manager) is running at the time, it will say that the disk backing that RAID array has been removed. Once this happens, if I reset the computer, it will no longer boot. Entering BIOS setup shows that the SATA 3 (6Gbps) ports that those disks are connected to are both empty. If I then power down the system completely, then turn it on again, the drives reappear, but the problem repeats after another hour or so. I have inconclusively determined that the problem occurs even if Windows is not running (booted into the installation environment from a UEFI flash drive) I don't think there has been any data corruption since this started happening, although I have had two strange issues with a GIT repo on that disk. sfc /ScanNow and Intel's disk check (in RSTe) both do not find anything. Does anyone know what might cause this?

    Read the article

  • COM Interop without regasm

    - by SLaks
    I'm a limited user, and I need to write an Outlook macro that exposes a C# library in Outlook 2003 and 2007. I do not have any admin privilges at all, not even at install time, so I can't run RegAsm and I can't (I assume) write a managed add-in. Is there any way to call .Net code from VBA in this scenario, or are there any other solutions? This is for personal use only, so an ugly hack is perfectly acceptable (so long as it works)

    Read the article

  • Code Chess: Fibonacci Sequence

    - by SLaks
    Building upon the proven success of Code Golf, I would like to introduce Code Chess. Unlike Code Golf, which strives for concision, Code Chess will strive for cleverness. Can you create a clever or unexpected Fibonacci generator? Your code must print or return either the nth Fibonacci number or the first n Fibonacci numbers.

    Read the article

  • Looking for a .Net ORM

    - by SLaks
    I'm looking for a .Net 3.5 ORM framework with a rather unusual set of requirements: I need to create and alter tables at runtime with schemas defined by my end-users. (Obviously, that wouldn't be strongly-typed; I'm looking for something like a DataTable there) I also want regular strongly-typed partial classes for rows in non-dynamic tables, with custom validation and other logic. (Like normal ORMs) I want to load the entire database (or some entire tables) once, and keep it in memory throughout the life of the (WinForms) GUI. (I have a shared SQL Server with a relatively slow connection) I also want regular LINQ support (like LINQ-to-SQL) for ASP.Net on the shared server (which has a fast connection to SQL Server) In addition to SQL Server, I also want to be able to use a single-file database that would support XCopy deployment (without installing SQL CE on the end-user's machine). (Probably Access or SQLite) Finally, it has to be free (unless it's OpenAccess) I'll probably have to write it myself, as I don't think there is an existing ORM that meets these requirements. However, I don't want to re-invent the wheel if there is one, hence this question. I'm using VS2010, but I don't know when my webhost (LFC) will upgrade to .Net 4.0

    Read the article

  • Change Keyboard Layout for Other Process

    - by SLaks
    I'm writing a program in C# that runs in the background and allows users to use a htokey to switch keyboard layouts in the active window. (Windows only supports CTRL+SHIFT & ALT+SHIFT) I'm using RegisterHotKey to catch the hotkey, & it's working fine. The problem is that I can't find any API to change the keyboard layout for the focused window. ActivateKeyboardLayout and LoadKeyboardLayout can only change the keyboard layout for the calling thread. Does anyone know how to change the keyboard layout for a different thread (the way the Language Bar does)?

    Read the article

  • (this == null) in C#!

    - by SLaks
    Due to a bug that was fixed in C# 4, the following program prints true. (Try it in LINQPad) void Main() { new Derived(); } class Base { public Base(Func<string> valueMaker) { Console.WriteLine(valueMaker()); } } class Derived : Base { string CheckNull() { return "Am I null? " + (this == null); } public Derived() : base(() => CheckNull()) { } } In VS2008 in Release mode, in throws an InvalidProgramException. (In Debug mode, it works fine) In VS2010 Beta 2, it doesn't compile (I didn't try Beta 1); I learned that the hard way Is there any other way to make this == null in pure C#?

    Read the article

  • Code Golf: Numeric Ranges

    - by SLaks
    Mods: Can you please make this Community Wiki? Challenge Compactify a long list of numbers by replacing consecutive runs with ranges. Example Input 1, 2, 3, 4, 7, 8, 10, 12, 13, 14, 15 Output: 1 - 4, 7, 8, 10, 12 - 15 Note that ranges of two numbers should be left as is. (7, 8; not 7 - 8) Rules You can accept a list of integers (or equivalent datatype) as a method parameter, from the commandline, or from standard in. (pick whichever option results in shorter code) You can output a list of strings by printing them, or by returning either a single string or set of strings. Reference Implementation (C#) IEnumerable<string> Sample(IList<int> input) { for (int i = 0; i < input.Count; ) { var start = input[i]; int size = 1; while (++i < input.Count && input[i] == start + size) size++; if (size == 1) yield return start.ToString(); else if (size == 2) { yield return start.ToString(); yield return (start + 1).ToString(); } else if (size > 2) yield return start + " - " + (start + size - 1); } }

    Read the article

  • jQuery detect current thumb and scroll jCarousel accordingly

    - by steve
    Another thanks to SLaks for helping me get the code this far. I'm not quite sure if my last step is even possible with the way I have things set up. A live version of the gallery can be seen here: http://www.studioimbrue.com/index2.php Currently, everything works appropriately. The image and its thumbnail are currently tied together, but the jCarousel itself is still independent. I've added nextThumb.closest('.thumbscontainer').jcarousel('next'); so that when you click the large image, the carousel scrolls to the next row, but that doesn't actually follow any logic. What I'm attempting to do is for jQuery to detect how far down the thumbnail is and when to appropriately scroll the carousel. Is this even possible?

    Read the article

  • Facebook javascript in address bar, possible to replicate?

    - by DoMx
    This is my first experience with stackoverflow and I'm afraid my question asks of a lot for a first. I was looking at this thread: http://stackoverflow.com/questions/2634159/javascrypt-in-the-adress-bar-is-this-malicious and as you will see SLaks has very kindly deobfuscated the javascript and left us with what appears as the Javascript behind the automatic facebook invite code. As I'm fairly new to javascript, I was wondering, what other components were needed to get this code to work? You of course have the functions there and they are called by the obfuscated javascript but how exactly? Would it be possible to replicate this on a page of my own using the information available or is there more to this script I am missing? I am willing to financially assist somebody who could compile a solution for me. Thank you in advance.

    Read the article

  • Lock thread using somthing other than a object

    - by Scott Chamberlain
    when using a lock does the thing you are locking on have to be a object. For example is this legal static DateTime NextCleanup = DateTime.Now; const TimeSpan CleanupInterval = new TimeSpan(1, 0, 0); private static void DoCleanup() { lock ((object)NextCleanup) { if (NextCleanup < DateTime.Now) { NextCleanup = DateTime.Now.Add(CleanupInterval); System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(cleanupThread)); } } return; } EDIT-- From reading SLaks' responce I know the above code would be not valid but would this be? static MyClass myClass = new MyClass(); private static void DoCleanup() { lock (myClass) { // } return; }

    Read the article

  • Custom jQuery Gallery Thumbnail Behavior

    - by steve
    I recently got some help on here from SLaks (thank you) on the behavior of my custom gallery. I'm now trying to fix the way the thumbnails function. I've been toying with it for about an hour but I can't get it to work. Live version of the code: http://www.studioimbrue.com . Currently the code is as follows: $('.thumbscontainer ul li a').click(function() { var li_index = $(this).parents('ul').children('li').index($(this).parent("li")); $(this).parents('.thumbscontainer').parent().find('.captions ul li').fadeOut(); $(this).parents('.thumbscontainer').parent().find('.captions ul li:eq('+li_index+')').fadeIn(); }); $('.container .captions li').click(function() { var nextLi = $(this).fadeOut().next().fadeIn(); if (nextLi.length === 0) //If we're the last one, nextLi = $(this).siblings(':first-child').fadeIn(); }); The only problem is that when the gallery image is clicked, it goes to the next image in the series, yet the thumbnails do not change to the next one in the list. You can take a look at my previous question to see our discussion. Thanks

    Read the article

  • How to construct LambdaExpression with conversion

    - by nerijus
    I need to sort in ajax response grid by column name. Column value is number stored as a string. Let's say some trivial class (in real-life situation there is no possibility to modify this class): class TestObject { public TestObject(string v) { this.Value = v; } public string Value { get; set; } } then simple test: [Test] public void LambdaConstructionTest() { var queryable = new List<TestObject> { new TestObject("5"), new TestObject("55"), new TestObject("90"), new TestObject("9"), new TestObject("09"), new TestObject("900"), }.AsQueryable(); var sortingColumn = "Value"; ParameterExpression parameter = Expression.Parameter(queryable.ElementType); MemberExpression property = Expression.Property(parameter, sortingColumn); //// tried this one: var c = Expression.Convert(property, typeof(double)); LambdaExpression lambda = Expression.Lambda(property, parameter); //// constructs: o=>o.Value var callExpression = Expression.Call(typeof (Double), "Parse", null, property); var methodCallExpression = Expression.Call( typeof(Queryable), "OrderBy", new[] { queryable.ElementType, property.Type }, queryable.Expression, Expression.Quote(lambda)); // works, but sorts by string values. //Expression.Quote(callExpression)); // getting: System.ArgumentException {"Quoted expression must be a lambda"} var querable = queryable.Provider.CreateQuery<TestObject>(methodCallExpression); // return querable; // <- this is the return of what I need. } Sorry for not being clear in my first post as @SLaks answer was correct but I do not know how to construct correct lambda expression in this case.

    Read the article

  • MSTest unit test passes by itself, fails when other tests are run

    - by Sarah Vessels
    I'm having trouble with some MSTest unit tests that pass when I run them individually but fail when I run the entire unit test class. The tests test some code that SLaks helped me with earlier, and he warned me what I was doing wasn't thread-safe. However, now my code is more complicated and I don't know how to go about making it thread-safe. Here's what I have: public static class DLLConfig { private static string _domain; public static string Domain { get { return _domain = AlwaysReadFromFile ? readCredentialFromFile(DOMAIN_TAG) : _domain ?? readCredentialFromFile(DOMAIN_TAG); } } } And my test is simple: string expected = "the value I know exists in the file"; string actual = DLLConfig.Domain; Assert.AreEqual(expected, actual); When I run this test by itself, it passes. When I run it alongside all the other tests in the test class (which perform similar checks on different properties), actual is null and the test fails. I note this is not a problem with a property whose type is a custom Enum type; maybe I'm having this problem with the Domain property because it is a string? Or maybe it's a multi-threaded issue with how MSTest works?

    Read the article

  • Why is .NET faster than C++ in this case?

    - by acidzombie24
    -edit- I LOVE SLaks comment. "The amount of misinformation in these answers is staggering." :D Calm down guys. Pretty much all of you were wrong. I DID make optimizations. It turns out whatever optimizations I made wasn't good enough. I ran the code in GCC using gettimeofday (I'll paste code below) and used g++ -O2 file.cpp and got slightly faster results then C#. Maybe MS didn't create the optimizations needed in this specific case but after downloading and installing mingw I was tested and found the speed to be near identical. Justicle Seems to be right. I could have sworn I use clock on my PC and used that to count and found it was slower but problem solved. C++ speed isn't almost twice as slower in the MS compiler. When my friend informed me of this I couldn't believe it. So I took his code and put some timers onto it. Instead of Boo I used C#. I constantly got faster results in C#. Why? The .NET version was nearly half the time no matter what number I used. C++ version: #include <iostream> #include <stdio.h> #include <intrin.h> #include <windows.h> using namespace std; int fib(int n) { if (n < 2) return n; return fib(n - 1) + fib(n - 2); } int main() { __int64 time = 0xFFFFFFFF; while (1) { int n; //cin >> n; n = 41; if (n < 0) break; __int64 start = __rdtsc(); int res = fib(n); __int64 end = __rdtsc(); cout << res << endl; cout << (float)(end-start)/1000000<<endl; break; } return 0; } C# version: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.ComponentModel; using System.Threading; using System.IO; using System.Diagnostics; namespace fibCSTest { class Program { static int fib(int n) { if (n < 2)return n; return fib(n - 1) + fib(n - 2); } static void Main(string[] args) { //var sw = new Stopwatch(); //var timer = new PAB.HiPerfTimer(); var timer = new Stopwatch(); while (true) { int n; //cin >> n; n = 41; if (n < 0) break; timer.Start(); int res = fib(n); timer.Stop(); Console.WriteLine(res); Console.WriteLine(timer.ElapsedMilliseconds); break; } } } } GCC version: #include <iostream> #include <stdio.h> #include <sys/time.h> using namespace std; int fib(int n) { if (n < 2) return n; return fib(n - 1) + fib(n - 2); } int main() { timeval start, end; while (1) { int n; //cin >> n; n = 41; if (n < 0) break; gettimeofday(&start, 0); int res = fib(n); gettimeofday(&end, 0); int sec = end.tv_sec - start.tv_sec; int usec = end.tv_usec - start.tv_usec; cout << res << endl; cout << sec << " " << usec <<endl; break; } return 0; }

    Read the article

1