instruction
stringlengths
0
30k
MS Team Foundation Server in distributed environments - hints tips tricks needed
|tfs|teamfoundationserver|
Is anyone out there using Team Foundation Server within a team that is geographically distributed? We're in the UK, trying work with a team in Australia and we're finding it quite tough. For example, things are being checked out to us without us asking on a get latest. Even when using a proxy, most thing take a while to happen. Lot's of really annoying little things like this are hardening our arteries, stopping us from delivering code and is frankly creating a user experience akin to pushing golden syrup up a sand dune. Is *anyone* out there actually using TFS in this manner, on a daily basis with (relative) success? If so, do you have any hints, tips, tricks or gotchas that would be worth knowing? P.S. Upgrading to CruiseControl.NET is not an option.
|tfs|teamfoundationserver|visual-studio|
|visual-studio|tfs|teamfoundationserver|
Is anyone out there using Team Foundation Server within a team that is geographically distributed? We're in the UK, trying work with a team in Australia and we're finding it quite tough. Our main two issues are: 1. Things are being checked out to us without us asking on a get latest. 2. Even when using a proxy, most thing take a while to happen. Lot's of really annoying little things like this are hardening our arteries, stopping us from delivering code and is frankly creating a user experience akin to pushing golden syrup up a sand dune. Is *anyone* out there actually using TFS in this manner, on a daily basis with (relative) success? If so, do you have any hints, tips, tricks or gotchas that would be worth knowing? P.S. Upgrading to CruiseControl.NET is not an option.
|visual-studio|tfs|
VS 2008 - Objects disappearing?
|visual-studio|teamfoundationserver|.net|
I've only been using VS 2008 Team Foundation for a few weeks. Over the last few days, I've noticed that sometimes one of my objects/controls on my page just disappears from intellisense. The project builds perfectly and the objects are still in the HTML, but I still can't find the object. Any one else notice this?
|.net|visual-studio|teamfoundationserver|
I've only been using VS 2008 Team Foundation for a few weeks. Over the last few days, I've noticed that sometimes one of my objects/controls on my page just disappears from intellisense. The project builds perfectly and the objects are still in the HTML, but I still can't find the object. Any one else notice this? Edit: For what it's worth, I know if I close VS and then open it up again, it comes back.
|.net|visual-studio|tfs|teamfoundationserver|
|.net|visual-studio|tfs|
If you have a byte[] you should be able to use the BinaryReader class and set values on NewStuff using the available ReadX methods.
I had followed a different tutorial on setting up my xen on ubuntu before 8.04 but now upgraded to 8.04. I used the extra line in my cfg as folows: extra = ' TERM=xterm xencons=tty console=tty1' It allows me to "xm console hostname" from dom0. I think this was from a problem with the xen setup in the version prior to 8.04 (I'm not sure which version that was). I'm not sure if the same change is necessary in 8.04 as I'm an upgrade and didn't change any of my domU configs after the upgrade. Stephen
My first instinct would be the rather unhelpful "Install Linux". You are somewhat <a href="http://tirania.org/blog/archive/2006/Jan-11.html">swimming against the current</a> to try and develop in mono under windows. Installing GTK and everything is a bit of a bother in my experience. If you do feel like using linux, then you could <a href="http://www.ubuntu.com/getubuntu/download">Try Ubuntu</a> Otherwise: There's some information here: <a href="http://www.mono-project.com/Mono:Windows">http://www.mono-project.com/Mono:Windows</a> and it seems the <a href="http://www.cygwin.com">cygwin</a> toolchain might be your best bet. I don't think you're going to be able to avoid makefiles, sadly. I found a slightly more explicit tutorial from <a href="http://www.ondotnet.com/pub/a/dotnet/2005/02/07/monowindows.html">O'Reilly</a>. @modesty: <blockquote>Mono provides the necessary software to develop and run .NET client and server applications on Linux, Solaris, Mac OS X, Windows, and Unix. Sponsored by Novell (http://www.novell.com), the Mono open source project has an active and enthusiastic contributing community and is positioned to become the leading choice for development of Linux applications.</blockquote> -- From the Mono site. [1]: http://www.mono-project.com/Mono:Windows
You can't check for changes without some sort of audit mechanism. You are looking to extract information that ha not been collected. If you just need to know when a record was added or edited, adding a datetime field that gets updated via a trigger when the record is updated would be the simplest choice. If you also need to track when a record has been deleted, then you'll want to use an audit table and populate it from triggers with a row when a record has been added, edited, or deleted.
From what I can see in that context, you don't need to copy SomeByteArray into a buffer. You simply need to get the handle from SomeByteArray, pin it, copy the IntPtr data using PtrToStructure and then release. No need for a copy. That would be: NewStuff ByteArrayToNewStuff(byte[] bytes) { GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); NewStuff stuff = (NewStuff)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(NewStuff)); handle.Free(); return stuff; }
From what I can see in that context, you don't need to copy SomeByteArray into a buffer. You simply need to get the handle from SomeByteArray, pin it, copy the IntPtr data using PtrToStructure and then release. No need for a copy. That would be: NewStuff ByteArrayToNewStuff(byte[] bytes) { GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); NewStuff stuff = (NewStuff)Marshal.PtrToStructure( handle.AddrOfPinnedObject(), typeof(NewStuff)); handle.Free(); return stuff; } Generic version: T ByteArrayToStructure<T>(byte[] bytes) { GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); T stuff = (T)Marshal.PtrToStructure( handle.AddrOfPinnedObject(), typeof(T)); handle.Free(); return stuff; } .
|java|java-io|
VB.NET Empty String Array
|.net|vb.net|string|
How can I create an empty one-dimensional string array?
Like the others, I'm not sure that's such a good idea, but if you really want to do it, then you can create a subclass of SynchronizationContext that allows posting and sending delegates to the target thread (if it's a WinForms thread the work is done for you as such a subclass already exists). The target thread will have to implement some sort of a message pump equivalent though, to receive the delegates.
Not sure why you'd want to, but the C# way would be string[] newArray = new string[0]; I'm guessing that VB won't be too dissimilar to this. If you're building an empty array so you can populate it with values later, you really should consider using List<string> and converting it to an array (if you really need it as an array) with newListOfString.ToArray();
> Without profiling we cannot tell which bit of the program needs optimizing. If you were in a large system, then one would use a profiler to find that the prime number generator is the part that needs optimizing. Profiling a loop with a dozen or so instructions in it is not usually worth while - the overhead of the profiler is significant compared to the loop body, and about the only ways to improve a loop that small is to change the algorithm to do fewer iterations. So IME, once you've eliminated any expensive functions and have a known target of a few lines of simple code, you're better off changing the algorithm and timing an end-to-end run than trying to improve the code by instruction level profiling.
JavaFX video encoding
|video|encoding|javafx|
On [JavaFX's Wikipedia][1] > In May 2008 (...) Sun Also announced a > multi-year agreement with On2 > Technologies to bring comprehensive > video capabilities to the JavaFX > product family using the company's > TrueMotion Video codec. Do you know if it will include encoding capabilities like Flash or just playback? Thanks [1]: http://en.wikipedia.org/wiki/Javafx
On [JavaFX's Wikipedia][1] > In May 2008 (...) Sun Also announced a > multi-year agreement with On2 > Technologies to bring comprehensive > video capabilities to the JavaFX > product family using the company's > TrueMotion Video codec. Do you know if it will include encoding capabilities for webcam video like Flash or just playback/streaming? Thanks [1]: http://en.wikipedia.org/wiki/Javafx
Which font is it? Try using ClearType, not Standard font smoothing. It's in Display properties, Appearance, Effects.
Dim strEmpty(-1) As String
Could it be a problem with the color combination? Some fonts look really ugly on high contrast combinations with a black background. Also, can you see the difference in the fonts in any other application? Which font is it?
I don't think SQL Express would be overkill if you want to learn real-world skills - quite the opposite in fact! That'd be my choice, and whatever I chose, I'd stay clear of Access. Good luck
How do I fire an event when a iframe has finished loading in jQuery?
|jquery|javascript|iframe|
I have to load a pdf within a page (don't ask...) Ideally I would like to have a loading animated gif which is replaced once the pdf is loaded. Thanks
|javascript|jquery|
The first thing to remember is that the cursor can be in three states - a regular insertion cursor at a specific position - a text selection that has a certain bounded area - not active: textarea does not have focus. Has not been used. The IE model uses the Object [document.selection][1], from this we can get a [TextRange][2] object which gives us access to the selection and thus the cursor position(s). The FF model/Opera uses the handy variables [input].selectionStart and selectionEnd. Both models represent a regular ative cursor as a zero-width selection, with the left bound being the cursor position. If the input field does not have focus, you may find that neither is set. I have had good success with the following code to insert a piece of text at the current cursor location, also replacing the current selection, if present. Depending on the exact browser, YMMV. [1]: http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx [2]: http://msdn.microsoft.com/en-us/library/ms535872(VS.85).aspx function insertAtCursor(myField, myValue) { /* selecion model - ie */ if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; } /* field.selectionstart/end firefox */ else if (myField.selectionStart || myField.selectionStart == '0' ) { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); myField.selectionStart = startPos + myValue.length; myField.selectionEnd = startPos + myValue.length; myField.focus(); } // cursor not active/present else { myField.value += myValue; }
The first thing to remember is that the cursor can be in three states - a regular insertion cursor at a specific position - a text selection that has a certain bounded area - not active: textarea does not have focus. Has not been used. The IE model uses the Object [document.selection][1], from this we can get a [TextRange][2] object which gives us access to the selection and thus the cursor position(s). The FF model/Opera uses the handy variables [input].selectionStart and selectionEnd. Both models represent a regular ative cursor as a zero-width selection, with the left bound being the cursor position. If the input field does not have focus, you may find that neither is set. I have had good success with the following code to insert a piece of text at the current cursor location, also replacing the current selection, if present. Depending on the exact browser, YMMV. function insertAtCursor(myField, myValue) { /* selecion model - ie */ if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; } /* field.selectionstart/end firefox */ else if (myField.selectionStart || myField.selectionStart == '0' ) { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); myField.selectionStart = startPos + myValue.length; myField.selectionEnd = startPos + myValue.length; myField.focus(); } // cursor not active/present else { myField.value += myValue; } Bug Note: links are not being correctly marked up in the top para. Selection object: http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx TextRange object: http://msdn.microsoft.com/en-us/library/ms535872(VS.85).aspx [1]: http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx [2]: http://msdn.microsoft.com/en-us/library/ms535872(VS.85).aspx
[Dr. Dobbs Journal][1] is a pretty good broad-based programmer's journal. Covers all manner of material. [1]: http://ddj.com
According to [this blog post by Vance Morrison][1], RuntimeTypeHandle is a value type (struct) that wraps an unmanaged pointer, so Type.GetTypeHandle(obj).Equals(anotherHandle) is faster to use for strict "is exactly the same type" comparisons than obj.GetType().Equals(anotherType) -- the latter creates System.Type instances which are, apparently, heavier. However, it's also less obvious, and definitely falls under the category "micro-optimization" so if you're wondering when you need one over the other, you should probably just use System.Type. [1]: http://blogs.msdn.com/vancem/archive/2006/10/01/779503.aspx
Whats the difference between RuntimeTypeHandle and Type?
|c#|.net|
And why would I use one over the other in my code?
|c#|.net|reflection|
Launching a Python interpreter instance just to select the right binary to run would be much heavier than you need. I'd distribute a shell .rc file which provides aliases. In /shared/bin, you put the various binaries: /shared/bin/toolname-mac, /shared/bin/toolname-debian-x86, /shared/bin/toolname-netbsd-dreamcast, etc. Then, in the common shared shell .rc file, you put the logic to set the aliases according to platform, so that on OSX, it gets <tt>alias toolname=/shared/bin/toolname-mac</tt>, and so forth. This won't work as well if you're adding new tools all the time, because the users will need to reload the aliases. I wouldn't recommend distributing tools this way, though. Testing and qualifying new builds of the tools should be taking up enough time and effort that the extra time required to distribute the tools to the users is trivial. You seem to be optimizing to reduce the distribution time. Replacing tools that quickly in a live environment is all too likely to result in lengthy and confusing downtime if anything goes wrong in writing and building the tools--especially when subtle cross-platform issues creep in.
Maximum number of inodes in a directory?
|linux|unix|bash|command|ls|
Is there a maximum number of inodes in a single directory? I have a directory of 2 million+ files and can't get an the ls command to work against that directory. So now I'm wondering if I've exceeded a limit on inodes in Linux. Is there a limit before a 2^64 numerical limit?
I don't know what the performance would be like for large datasets, but open office has a database program (Base), which is an Access clone and may just be what you are looking for.
The venerable [Dr. Dobbs Journal][1] is still pretty good. It covers multiple platforms, and mixes some fairly hard-core technical articles with lighter fare (interviews with notables, a "Developer Diaries" column that profiles regular-Joe (and Jane) developers from a range of fields). If you are employed and have authority to spend some non-trivial amount of money on tools (or are willing to claim that you do), you can probably get them to send it to you for free. For the Microsoft world, [MSDN Magazine][2] is very useful. Some of their columns are excellent, particularly Jeff Richter's [Concurrent Affairs][3]. [1]: http://www.ddj.com/ [2]: http://msdn.microsoft.com/en-us/magazine/default.aspx [3]: http://msdn.microsoft.com/en-us/magazine/cc501041.aspx
> @DrPizza - this is a very good question, and one that strikes right to the heart of the problem. There are a few reasons why QueueUserWorkItem and the Windows NT thread pool was ruled out (although the Vista one does look interesting, maybe in a few years). Yeah, it looks like it got quite beefed up in Vista, quite versatile now. OK, I'm still a bit unclear about how you wish the priorities to work. If the pool is currently running a task of type A with maximal concurrency of 1 and low priority, and it gets given a new task also of type A (and maximal concurrency 1), but this time with a high priority, what should it do? Suspending the currently executing A is hairy (it could hold a lock that the new task needs to take, deadlocking the system). It can't spawn a second thread and just let it run alongside (the permitted concurrency is only 1). But it can't wait until the low priority task is completed, because the runtime is unbounded and doing so would allow a low priority task to block a high priority task. My presumption is that it is the latter behaviour that you are after?
"the only way I can return this is as an IEnumerable, so I lose my strong typed goodness" that is incorrect. In fact your query is strongly typed, it is just an anonymous type. I think the query you want is more like: var emps = from e in Employees join m in Employees on e.ManagerEmpID equals m.EmpID select new Employee { e, m.FullName }; Which will return IEnumerable<Employee>. Here is [an article](http://www.codeproject.com/KB/architecture/linqrepository.aspx) I wrote on the topic. Linq-to-sql is an ORM. It does not affect the way that you design an N-tiered application. You use it the same way you would use any other ORM.
A (left) inner join only shows rows if there is a matching record on the other (right) side of the join. A (left) outer join shows rows for each record on the left hand side, even if there are no matching rows on the other (right) side of the join. If there is no matching row, the columns for the other (right) side would show NULLs.
@Brian -1 is a good choice for the default value since no "real" rows are likely to have identities less than zero. If it defaulted to 0 or 1 then there'd be a chance that it'd clash with an existing row, causing a primary key violation. For applications that stay offline and create multiple rows before saving, a common practice is to continue counting backwards (-2, -3, -4) for each new row's identity. Then when they're saved, the server can replace them with the true "next" value from the table.
The iPhone SDK is documented to require an Intel-based Mac. Even if some people may be able to have gotten it to run on some other hardware doesn't mean that it will run correctly, that Apple will fix bugs you report, or that it is a supported environment.
Having worked with both approaches (shared domain objects and DTOs) I'd say the big problem with shared domain objects is when you don't control all clients, but from my past experiences I'd usually use DTOs unless it development speed were of the essence. If there's any chance that you won't always be in control of the clients then I'd definately recommend DTOs, because as soon as you share your domain objects with someone else's client application you start tying your internals to someone else's dev cycle. I've also found DTOs useful when working in a versioned service environment, which allowed us to radically change the internals of our app but still accept calls to the old versions of our service interfaces. Finally, if you have a lot of client applications it might also be beneficial to use DTOs as you're then protected with an easily versionable service.
From what I can see in that context, you don't need to copy SomeByteArray into a buffer. You simply need to get the handle from SomeByteArray, pin it, copy the IntPtr data using PtrToStructure and then release. No need for a copy. That would be: NewStuff ByteArrayToNewStuff(byte[] bytes) { GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); NewStuff stuff = (NewStuff)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(NewStuff)); handle.Free(); return stuff; } Generic version: T ByteArrayToStructure<T>(byte[] bytes) { GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); T stuff = (T)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(T)); handle.Free(); return stuff; } Sorry for the bad line lenght, formating won't work if I try to wrap.
From what I can see in that context, you don't need to copy SomeByteArray into a buffer. You simply need to get the handle from SomeByteArray, pin it, copy the IntPtr data using PtrToStructure and then release. No need for a copy. That would be: NewStuff ByteArrayToNewStuff(byte[] bytes) { GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); NewStuff stuff = (NewStuff)Marshal.PtrToStructure( handle.AddrOfPinnedObject(), typeof(NewStuff)); handle.Free(); return stuff; } Generic version: T ByteArrayToStructure<T>(byte[] bytes) { GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); T stuff = (T)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(T)); handle.Free(); return stuff; } ...
For C code, you definitely should definitely use [Flexelint][1]. I used it for nearly 15 years and swear by it. One of the really great features it has is that warnings can be selectively turned off and on via comments in the code ("/* lint -e123*/"). This turned out to be a powerful documentation tool when you wanted to something out of the ordinary. "I am turning off warning X, therefore, there is some good reason I'm doing X." For anybody into interesting C/C++ questions, look at some of their examples on their site and see if you can figure out the bugs without looking at the hints. [1]: http://www.gimpel.com/html/lintinfo.htm
MySQL/Apache Error in PHP MySQL query
|php|mysql|
I am getting the following error: > Access denied for user 'apache'@'localhost' (using password: NO) When using the following code: <?php include("../includes/connect.php"); $query = "SELECT * from story"; $result = mysql_query($query) or die(mysql_error()); echo "<h1>Delete Story</h1>"; if (mysql_num_rows($result) > 0) { while($row = mysql_fetch_row($result)){ echo '<b>'.$row[1].'</b><span align="right"><a href="../process/delete_story.php?id='.$row[0].'">Delete</a></span>'; echo '<br /><i>'.$row[2].'</i>'; } } else { echo "No stories available."; } The connect.php file contains my MySQL connect calls that are working fine with my INSERT queries in another portion of the software. If I comment out the $result = mysql_query line, then it goes through to the else statement. So, it is that line or the content in the if. I have been searching the net for any solutions, and most seem to be related to too many MySQL connections or that the user I am logging into MySQL as does not have permission. I have checked both. I can still perform my other queries elsewhere in the software, and I have verified that the account has the correct permissions. I think I just need an outside perspective as I have been staring at this little block of code all day. If any more information is needed, just let me know.
Note: this answer describes how to get the **character co-ordinates** of the text-cursor/caret. To find the pixel-co-ordinates, you'll need to extend this further. The first thing to remember is that the cursor can be in three states - a regular insertion cursor at a specific position - a text selection that has a certain bounded area - not active: textarea does not have focus. Has not been used. The IE model uses the Object [document.selection][1], from this we can get a [TextRange][2] object which gives us access to the selection and thus the cursor position(s). The FF model/Opera uses the handy variables [input].selectionStart and selectionEnd. Both models represent a regular ative cursor as a zero-width selection, with the left bound being the cursor position. If the input field does not have focus, you may find that neither is set. I have had good success with the following code to insert a piece of text at the current cursor location, also replacing the current selection, if present. Depending on the exact browser, YMMV. function insertAtCursor(myField, myValue) { /* selecion model - ie */ if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; } /* field.selectionstart/end firefox */ else if (myField.selectionStart || myField.selectionStart == '0' ) { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); myField.selectionStart = startPos + myValue.length; myField.selectionEnd = startPos + myValue.length; myField.focus(); } // cursor not active/present else { myField.value += myValue; } Bug Note: links are not being correctly marked up in the top para. Selection object: http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx TextRange object: http://msdn.microsoft.com/en-us/library/ms535872(VS.85).aspx [1]: http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx [2]: http://msdn.microsoft.com/en-us/library/ms535872(VS.85).aspx
AFAIK, Linq to SQL is MSSQL server provider specific. To be honest, SQL Express is pretty lightweight on todays machines. BTW don't confuse LINQ with Linq to SQL. Linq is the underlying technology to provide "query" like support to .NET (amongst other things), where as L2S is effectively a Data Access technology built on top of Linq. Vanilla Linq will work with any ADO.NET provider, which of course Access is one. Entity Framework will work with any compatible provider also but if SQLExpress is too heavy for you then I wouldn't recommend going down this path...
Not sure how credible that source is, but: [http://www.builderau.com.au/program/windows/soa/Getting-started-with-Windows-Server-2008-Core-edition/0,339024644,339288700,00.htm][1] > The Windows Server 2008 Core edition can: > > |> Run the file server role. > > |> Run the Hyper-V virtualization server role. > > |> Run the Directory Services role. > > |> Run the DHCP server role. > > |> Run the IIS Web server role. > > |> Run the DNS server role. > > |> Run Active Directory Lightweight Directory Services. > > |> Run the print server role. > > > The Windows Server 2008 Core edition cannot: > > > |> Run a SQL Server. > > |> Run an Exchange Server. > > |> Run Internet Explorer. > > |> Run Windows Explorer. > > |> Host a remote desktop session. > > |> Run MMC snap-in consoles locally. [1]: http://www.builderau.com.au/program/windows/soa/Getting-started-with-Windows-Server-2008-Core-edition/0,339024644,339288700,00.htm
The following (C#) code should do the trick Uri uri = new Uri("http://www.mywebsite.com:80/pages/page1.aspx"); string requested = uri.Scheme + Uri.SchemeDelimiter + uri.Host + ":" + uri.Port;
I'm going to assume you mean "workspace", not "workstation", as your question doesn't quite make sense to me otherwise. In Visual Studio, go to the Source Control Explorer (View->Other Windows->Source Control Explorer). At the top of the source control explorer window you should have a toolbar with a few buttons. Somewhere on that toolbar (for me it's at the right) there should be a Workspace dropdown. Just select the workspace you want to use from that dropdown.
You should try [BustaName][1]. It basically combines words to create available domain names. You are able to choose similar words for the words that you previously entered. Also try these links out: 1. [Naming a company][2] 2. [77 ways to come up with an idea][3] 3. [Igor Naming Guide][4] (PDF) [1]: http://www.bustaname.com/ [2]: http://creativebits.org/naming_a_company [3]: http://creativebits.org/toolbox/77_ways_to_come_up_with_an_idea [4]: http://www.igorinternational.com/process/igor-naming-guide.pdf
The best solution I have found in my remoting work was to keep the server list in a config file on the client systems and make it updateable. Not the easiest to maintain but was fast and no broadcasting.
I agree with Joseph, my experience with ClickOnce is its great for the vast majority of projects especially in a corporate environment where it makes build, publish and deployment easy. Implementing the "forced upgrade" to ensure users have the latest version when running is so much easier in ClickOnce, and a main reason for my usage of it. Issues with ClickOnce: In a corporate environment it has issues with proxy servers and the workarounds are less than ideal. I've had to deploy a few apps in those cases from UNC paths...but you can't do that all the time. Its "sandbox" is great, until you want to find the executable or create a desktop shortcut. Have not deployed out of 2008 yet so not sure if those issues still exist.
Implementing a log watcher
|c++|c|file|io|
I wondering how in C/C++ you can implement a program (similar to tail -f) that watches for new lines added to a log file and then process them?
See here: [http://stackoverflow.com/questions/18632/how-to-monitor-a-text-file-in-realtime#18635][1] You could either call out to tail and retrieve the stream back into your app, or as it's open source, maybe try to pull it into your own code. Also, it is possible in C++ iostream to open a file for viewing only and just read to the end, while buffering the last 10-20 lines, then output that. [1]: http://stackoverflow.com/questions/18632/how-to-monitor-a-text-file-in-realtime#18635
I shun redundant delegate declarations. private void mCoolObject_CoolEvent(object sender, CoolObjectEventArgs args) { if (InvokeRequired) { Invoke(new Action<object, CoolObjectEventArgs>(mCoolObject_CoolEvent, sender, args)); return; } // do the dirty work of my method here } For non-events, you can use the `System.Windows.Forms.MethodInvoker` delegate or `System.Action`. EDIT: Additionally, every event has a corresponding `EventHandler` delegate so there's no need at all to redeclare one.
If you *are* using the GAC, you can at least do `iisapp.vbs /a "App Pool Name" /r` instead of `iisreset` (it's quicker to recycle a single app pool than to restart IIS).
Coding magazines
|magazines|resources|
So, we have [coding books][1], [coding RSS feeds][2], and [music to code by][3]. Are there any coding magazines that anyone would recommend? [1]: http://stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read [2]: http://stackoverflow.com/questions/5119/what-are-the-best-rss-feeds-for-programmersdevelopers [3]: http://stackoverflow.com/questions/3947/coding-music
|magazines|resources|
|magazines|resources|off-topic|
|magazines|resources|
|resources|magazines|
I subscribe to MSDN magazine, it's a bit thinner now than in years past, but for .NET it covers a variety of topics, it's a good way to keep abreast of new Microsoft offerings. All the content is available online on MSDN, and of course online resources/blogs are a lot more up to date, but sometimes it's nice to have a magazine in your bag for a flight or layover.
I would go with the file system approach. No need to create or maintain a DB with images, it will save you some major headaches in the long run.
There is an firebox add-on called [Password Exporter][1]. It can export to XML or CSV files that can be imported in another browser or computer. [1]: https://addons.mozilla.org/en-US/firefox/addon/2848
This extension will do it for you: [https://addons.mozilla.org/en-US/firefox/addon/2848][1] [1]: https://addons.mozilla.org/en-US/firefox/addon/2848
[Game Developer Magazine][1] has lots of very good articles, though as you might expect they tend to skew towards C++. [1]: http://www.gdmag.com/
The best way is to print out the code, crumple it up, and throw it out. Don't even recycle the paper. You've got an application that is written in 1,000+ line long JSPs. It probably has a god-awful Domain Model (if it even has one at all) and doesn't just MIX presentation with business logic, it BLENDS it and sits there and keeps stirring for hours. There is no way to take out the code that is crappy and move into an MVC Controller class and still be doing the right thing, you'll just end up with a MVC app with an anemic domain model or one that has stuff like Database calls in Controller code, you're still failing. You could try a new app that does the right thing and then have the two apps talk to each other, but that's new complexity in itself. Also you're likely going to be doing the same amount of work that you were going to do if you just started from scratch, but you might have an easier time trying to convince your bosses that this is a better approach.
Not sure how credible [this source is][1], but: > The Windows Server 2008 Core edition can: > > - Run the file server role. > > - Run the Hyper-V virtualization server role. > > - Run the Directory Services role. > > - Run the DHCP server role. > > - Run the IIS Web server role. > > - Run the DNS server role. > > - Run Active Directory Lightweight Directory Services. > > - Run the print server role. > > > The Windows Server 2008 Core edition cannot: > > > - Run a SQL Server. > > - Run an Exchange Server. > > - Run Internet Explorer. > > - Run Windows Explorer. > > - Host a remote desktop session. > > - Run MMC snap-in consoles locally. [1]: http://www.builderau.com.au/program/windows/soa/Getting-started-with-Windows-Server-2008-Core-edition/0,339024644,339288700,00.htm
//author[contains(text(), 'Ritchie')]
Programming WPF by Chris Sells and Ian Griffiths is an excellent way to learn WPF. 5 star rated on Amazon with 50+ reviews. <http://www.amazon.com/Programming-WPF-Chris-Sells/dp/0596510373>
G'day, What about using vi mode instead? Just enter set -o vi Then you can go to the word you want to change and just do a cw or cW depending on what's in the word? Oops, forgot to add you enter a ESC k to o to the previous line in the command history. What do you normally use for an editor? cheers, Rob
G'day, What about using vi mode instead? Just enter set -o vi Then you can go to the word you want to change and just do a cw or cW depending on what's in the word? Oops, forgot to add you enter a ESC k to o to the previous line in the command history. What do you normally use for an editor? cheers, Rob Edit: What I forgot to say in my original reply was that you need to think of the vi command line in bash using thye commands you enter when you are in "ex" mode in vi, i.e. after you've entered the colon. Worst thing is that you need to move around through your command history using the ancient vi commands of h (to the left) and l (to the right). You can use w (or W) to bounce across words though. Once you get used to it though, you have all sorts of commands available, e.g. entering ESC / my_command will look back through you r history, most recent first, to find the first occurrance of the command line containing the text my_command. Once it has found that, you can then use n to find the next occurrance, etc. And N to reverse the direction of the search. I'd go have a read of the man page for bash to see what's available under vi mode. Once you get over the fact that up-arrow and down-arrow are replaced by ESC k, and then j, you'll see that vi mode offers more than emacs mode for command line editing in bash. IMHO natchurly! (-: Emacs? Eighty megs and constantly swapping! cheers, Rob
G'day, What about using vi mode instead? Just enter set -o vi Then you can go to the word you want to change and just do a cw or cW depending on what's in the word? Oops, forgot to add you enter a ESC k to o to the previous line in the command history. What do you normally use for an editor? cheers, Rob Edit: What I forgot to say in my original reply was that you need to think of the vi command line in bash using the commands you enter when you are in "ex" mode in vi, i.e. after you've entered the colon. Worst thing is that you need to move around through your command history using the ancient vi commands of h (to the left) and l (to the right). You can use w (or W) to bounce across words though. Once you get used to it though, you have all sorts of commands available, e.g. entering ESC / my_command will look back through you r history, most recent first, to find the first occurrance of the command line containing the text my_command. Once it has found that, you can then use n to find the next occurrance, etc. And N to reverse the direction of the search. I'd go have a read of the man page for bash to see what's available under vi mode. Once you get over the fact that up-arrow and down-arrow are replaced by ESC k, and then j, you'll see that vi mode offers more than emacs mode for command line editing in bash. IMHO natchurly! (-: Emacs? Eighty megs and constantly swapping! cheers, Rob
**Application.Run** method displays one (or more) forms and initiates the standard message loop which runs until all the forms are closed. You cannot force a return from that method except by closing all your forms or forcing an application shutdown. You can, however, pass an **ApplicationContext** (instad of a new Form()) to Application.Run method and ApplicationContext can be used to launch several forms at once. Your application will only end when all of those are closed. See here: <http://msdn.microsoft.com/en-us/library/system.windows.forms.application.run.aspx> Also, any forms that you Show non-modally will continue to run alongside your main form, which will enable you to have more than one windows that do not block each other. I believe this is actually what you are trying to accomplish.
SciTE http://www.scintilla.org/SciTE.html