instruction
stringlengths 0
30k
⌀ |
---|
I'm working on mac OS x 10.4. I have a subversion repository stored on an external drive connected via USB. I created a new python project in Eclipse (using the PyDev plugin). When I use right click Team->Share Project to set up a new prject with subversion, I get the following error:
Error while creating module: org.tigris.subversion.javahl.ClientException: Couldn't open a repository
svn: Unable to open ra_local session to URL
svn: Unable to open repository 'file:///Volumes/svn-repos/Palindrome/Palindrome'
The subversion repository has the following permisions:
drwxrwxrwx 9 cameronl cameronl 306 Aug 23 10:08 svn-repos
The external drive is formatted as Mac OS extended.
I'm completely stumped. Anybody have any suggestions?
|
|macos|eclipse|subversion|
|
|svn|eclipse|macos|
|
Rollbacking bad changes with svn in Eclipse
|
|svn|eclipse|sublicpse|subversive|
|
Let's say I have committed some bad changes to Subversion repository. Then I commit good changes, that I want to keep.
What would be easiest way to roll back those bad changes in Eclipse, and keep the good changes? Assuming that files relating to bad changes are not same as those relating to the good changes. How things change if good changes were made to same files as bad changes?
I am mostly looking a way to do this via Eclipse plugins (Subclipse or Subversive) but commandline commands are also interesting.
|
These are all really good, and some _are_ books (an unpublished oreilly book, for example). I've *'d my favorite ones that helped me the most.
ocaml :
1. *[Introduction to ocaml][1]
2. [Using Understand and unraveling ocaml: practice to theory and vice versa][2]
3. *[Developing Applications using Ocaml - O'Reilly][3]
4. [The Objective Caml System - Official Manual][4]
Haskell :
1. [Explore functional programming with Haskell][6]
2. *[Real World Haskell][7]
3. *[Total Functional Programming][8]
[1]: http://www.seas.upenn.edu/~cis500/cis500-f02/resources/ocaml-intro.pdf
[2]: http://caml.inria.fr/pub/docs/u3-ocaml/index.html
[3]: http://caml.inria.fr/pub/docs/oreilly-book/
[4]: http://caml.inria.fr/pub/docs/manual-ocaml/index.html
[5]: http://beta.stackoverflow.com/questions/16918/beginners-guide-to-haskell#16951
[6]: http://www-128.ibm.com/developerworks/java/library/j-cb07186.html?ca=dgr-lnxw07Haskell
[7]: http://book.realworldhaskell.org/
[8]: http://www.cs.mdx.ac.uk/staffpages/dat/sblp1.pdf
|
These are all really good, written by _academia_ and (some) are _books_ (an unpublished oreilly book --translated from French, but no issues I've found), for example). I've *'d my favorite ones that helped me the most.
**ocaml :**
1. *[Introduction to ocaml][1]
2. [Using Understand and unraveling ocaml: practice to theory and vice versa][2]
3. *[Developing Applications using Ocaml - O'Reilly][3]
4. [The Objective Caml System - Official Manual][4]
**Haskell :**
1. [Explore functional programming with Haskell][6]
2. *[Real World Haskell][7]
3. *[Total Functional Programming][8]
[1]: http://www.seas.upenn.edu/~cis500/cis500-f02/resources/ocaml-intro.pdf
[2]: http://caml.inria.fr/pub/docs/u3-ocaml/index.html
[3]: http://caml.inria.fr/pub/docs/oreilly-book/
[4]: http://caml.inria.fr/pub/docs/manual-ocaml/index.html
[5]: http://beta.stackoverflow.com/questions/16918/beginners-guide-to-haskell#16951
[6]: http://www-128.ibm.com/developerworks/java/library/j-cb07186.html?ca=dgr-lnxw07Haskell
[7]: http://book.realworldhaskell.org/
[8]: http://www.cs.mdx.ac.uk/staffpages/dat/sblp1.pdf
|
These are all really good, written by _academia_ and (some) are _books_ (an unpublished oreilly book --translated from French, but no issues I've found), for example). I've *'d my favorite ones that helped me the most.
**ocaml :**
1. *[Introduction to ocaml][1]
2. [Using Understand and unraveling ocaml: practice to theory and vice versa][2]
3. *[Developing Applications using Ocaml - O'Reilly][3]
4. [The Objective Caml System - Official Manual][4]
5. [A Concise Introduction to Objective Caml][5]
**Haskell :**
1. [Explore functional programming with Haskell][6]
2. *[Real World Haskell][7]
3. *[Total Functional Programming][8]
[1]: http://www.seas.upenn.edu/~cis500/cis500-f02/resources/ocaml-intro.pdf
[2]: http://caml.inria.fr/pub/docs/u3-ocaml/index.html
[3]: http://caml.inria.fr/pub/docs/oreilly-book/
[4]: http://caml.inria.fr/pub/docs/manual-ocaml/index.html
[5]: http://www.csc.villanova.edu/~dmatusze/resources/ocaml/ocaml.html
[6]: http://www-128.ibm.com/developerworks/java/library/j-cb07186.html?ca=dgr-lnxw07Haskell
[7]: http://book.realworldhaskell.org/
[8]: http://www.cs.mdx.ac.uk/staffpages/dat/sblp1.pdf
|
These are all really good, written by _academia_ and (some) are _books_ (an unpublished oreilly book --translated from French, but no issues I've found), for example). I've *'d my favorite ones that helped me the most.
**ocaml :**
1. *[Introduction to ocaml][1]
2. [Using Understand and unraveling ocaml: practice to theory and vice versa][2]
3. *[Developing Applications using Ocaml - O'Reilly][3]
4. [The Objective Caml System - Official Manual][4]
5. [A Concise Introduction to Objective Caml][5]
6. [Practical Ocaml][6]
**Haskell :**
1. [Explore functional programming with Haskell][7]
2. *[Real World Haskell][8]
3. *[Total Functional Programming][9]
[1]: http://www.seas.upenn.edu/~cis500/cis500-f02/resources/ocaml-intro.pdf
[2]: http://caml.inria.fr/pub/docs/u3-ocaml/index.html
[3]: http://caml.inria.fr/pub/docs/oreilly-book/
[4]: http://caml.inria.fr/pub/docs/manual-ocaml/index.html
[5]: http://www.csc.villanova.edu/~dmatusze/resources/ocaml/ocaml.html
[6]: http://www.dleex.com/details/?42162
[7]: http://www-128.ibm.com/developerworks/java/library/j-cb07186.html?ca=dgr-lnxw07Haskell
[8]: http://book.realworldhaskell.org/
[9]: http://www.cs.mdx.ac.uk/staffpages/dat/sblp1.pdf
|
for security reasons. You want to expose certain methods not your whole class
|
WebSphere 6.1 generational gc default nursery size limit
|
|websphere|memory-management|
|
By default the nursery is supposed to be 25% of the heap, we have the initial heap size set to 1GB. With verbose gc on, we see that our nursery is sized at 55-60MB. We have forced the size using -Xmns256M -Xmnx512. Shouldn't this happen automatically?
|
|memory-management|websphere|
|
By default the nursery is supposed to be 25% of the heap, we have the initial heap size set to 1GB. With verbose gc on, we see that our nursery is sized at 55-60MB. We have forced the size using -Xmns256M -Xmnx512M. Shouldn't this happen automatically?
|
I prefer to store image paths in the DB and images on the filesystem (with rsync between servers to keep everything reasonably current).
However, some of the content-management-system stuff I do needs the images in the CMS for several reasons- visibility control (so the asset is held back until the press release goes out), versioning, reformatting (some CMS's will dynamically resize for thumbnails )and ease of use for linking the images into the WYSIWYG pages.
So the rule of thumb for me is to always stash application stuff on the filesystem, unless it's CMS driven.
|
I don't know the rationale for this decision, but I know that you can simulate some of the benefits of multi-threaded programming using setTimeout. You can give the illusion of multiple processes doing things at the same time, though in reality, everything happens in one thread.
Just have your function do a little bit of work, and then call something like:
setTimeout(function () {
... do the rest of the work...
}, 0);
And any other things that need doing (like UI updates, animated images, etc) will happen when they get a chance.
|
If your system clock is set properly and hasn't wrapped around, and if your NIC has its own MAC (i.e. you haven't set a custom MAC) and your NIC vendor has not been recycling MACs (which they are not supposed to do but which has been known to occur), and if your system's GUID generation function is properly implemented, then your system will never generate duplicate GUIDs.
If everyone on earth who is generating GUIDs follows those rules then your GUIDs will be globally unique.
In practice, the number of people who break the rules is low, and their GUIDs are unlikely to "escape". Conflicts are statistically improbable.
|
There are of course a number of different ways to represent a chessboard, and the best way will depend on what is most important to you.
Your two main choices are between speed and code clarity.
If speed is your priority then you must use a 64 bit data type for each set of pieces on the board (e.g. white pawns, black queens, en passant pawns). You can then take advantage of native bitwise operations when generating moves and testing move legality.
If clarity of code is priority then forget bit shuffling and go for nicely abstracted data types like others have already suggested. Just remember that if you go this way you will probably hit a performance ceiling.
To start you off, look at the code for [Crafty][1] (C) and [SharpChess][2] (C#).
[1]: http://en.wikipedia.org/wiki/Crafty
[2]: http://sharpchess.com/
|
On a web page I want to dynamically render very basic flow diagrams, i.e. a few boxes joined by lines. Ideally the user could then click on one of these boxes (DIVs?) and be taken to a different page. Resorting to Flash seems like an overkill. Is anyone aware of any client-side (i.e. server agnostic) Javascript or CSS library/technique that may help achieve this?
|
**[CGAL][1]** is a C++ library that has data structures and algorithms used in Computational Geometry.
[1]: http://cgal.org/
|
Is there a simple way to make html textarea and input type text equally wide?
|
|php|css|html|textarea|
|
Is there a simple way of getting a HTML textarea and an input type="text" to render with (approximately) equal width (in pixels), that works in different browsers?
A CSS/HTML solution would be brilliant. PHP would be OK. I would prefer not to have to use Javascript.
Thanks
/Erik
|
|css|html|textarea|
|
|html|css|textarea|
|
Is there a simple way of getting a HTML textarea and an input type="text" to render with (approximately) equal width (in pixels), that works in different browsers?
A CSS/HTML solution would be brilliant. I would prefer not to have to use Javascript.
Thanks
/Erik
|
Once you create your CodeMemberField instance to represent the static field, you can assign the InitExpression property to the expression you want to use to populate the field.
|
I would recommend moving to a third-party format (by creating your own log4j adapters etc) that both languages understand and can easily marshal / unmarshal, e.g. XML.
|
In my opinion it's only too automated if no one in your production support group can deploy an application manually in a pinch. Automated deployments really cut down on simple but common errors such as configuration mistakes. However, a manual deployment must always be an option.
|
[This post][1] by Omer van Kloeten seems to do what you want. Notice that the output has the line:
private static Foo instance = new Foo();
[1]: http://weblogs.asp.net/okloeten/archive/2005/10/15/427549.aspx
|
If you can find out the on screen position of the part of the page you are interested in, you could compare this with the position of the mouse when you receive the drop event. I'm not sure how practical this is if you can get the info out of the DOM or whatnot.
As an alternative could you implement the mouse events on the bit of the page using javascript?
|
If you are going to do it from a place where you don't have an instance of a page then you need to go one step further (e.g. from a webservice to return html or from a task rendering emails)
var myPage = new System.Web.UI.Page();
var myControl = (Controls.MemberRating)myPage.LoadControl("~/Controls/MemberRating.ascx");
I found this technique on Scott Guithrie's site so I assume it's the legit way to do it in .NET
|
Debugging DLL Called With CeRapiInvoke
|
|windows-mobile|dll|rapi|
|
I'm trying to debug into a C dll that is invoked on a Windows Mobile device using CeRapiInvoke() (Technically RAPI.Invoke() from OpenNETCF) from a Windows box. I'm very familiar with attaching to a process that is already running to debug a loaded dll (I've done it many time with Windows Mobile services) but I can't seem to figure out what process is actually running the dll. Even when running the Remote Process Viewer I don't see any new processes pop up, so it must be something that is already running... Any ideas as to which process to attach to in order to debug into the dll when invoked?
|
I'm trying to debug into a C dll that is invoked on a Windows Mobile device using CeRapiInvoke() (Technically RAPI.Invoke() from OpenNETCF) from a Windows box. I'm very familiar with attaching to a process that is already running to debug a loaded dll (I've done it many time with Windows Mobile services) but I can't seem to figure out what process is actually running the dll. Even when running the Remote Process Viewer I don't see any new processes pop up, so it must be something that is already running... Any ideas as to which process to attach to in order to debug into the dll when invoked?
Edit: After trying to attach to several different processes I found that it was "rapiclnt" that did the trick. Note: Yes, there is intentionally no .exe on that process name as that is how it shows up in the process viewer...I'm not really sure why.
|
I'm trying to debug into a C dll that is invoked on a Windows Mobile device using CeRapiInvoke() (Technically RAPI.Invoke() from OpenNETCF) from a Windows box. I'm very familiar with attaching to a process that is already running to debug a loaded dll (I've done it many time with Windows Mobile services) but I can't seem to figure out what process is actually running the dll. Even when running the Remote Process Viewer I don't see any new processes pop up, so it must be something that is already running... Any ideas as to which process to attach to in order to debug into the dll when invoked?
Edit: After trying to attach to several different processes I found that it was "rapiclnt.exd" that did the trick.
|
If using Apache I'd use mod-rewrite to alias robots.txt to a script that could dynamically generate the necessary content.
|
If using Apache I'd use mod-rewrite to alias robots.txt to a script that could dynamically generate the necessary content.
Edit: If using IIS you could use [ISAPIrewrite][1] to do the same.
[1]: http://www.isapirewrite.com/
|
As an [example Drupal has a scenario][1] of how allowing flash content from users could be a security concern.
[1]: http://drupal.org/node/178192
|
It sounds like the path of least resistance is to fill in the Excel spreadsheet. We have a contractor who does our Access stuff, and for the more complicated reports he uses Excel. I guess complicated == hard to make look good.
|
ChartFX (http://www.softwarefx.com) has been a leader in charting for years. I personally have used several different versions for over 8 years and it is rock solid.
I have re-evaluated charting options periodically, and ChartFX has won in my environment based almost purely on feature set. It is not free or cheap, but it is well worth the price they charge.
-Geoffrey
|
No, LINQ to SQL is very much MS SQL only - think of it as a client driver.
[Microsoft is/was helping Oracle and DataDirect develop providers for Oracle and other non-MS database servers.][1]
[1]: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1623471&SiteID=1
|
kleolb02's answer looks pretty good. another way would be a combination of the [sticky footer][1] and the [min-height hack][2]
[1]: http://ryanfait.com/sticky-footer/
[2]: http://www.dustindiaz.com/min-height-fast-hack/
|
There are a few different ways you can migrate. The tool will pull your history, etc. over, but the more pragmatic and simple way is to lock VSS as a history archive and start fresh:
1. Have everyone check in all changes into VSS, make sure everything builds, etc.
2. Set all VSS databases to "locked" (read-only rights for all users)
3. Get Latest on the entire VSS database into a "clean" set of folders on a workstation
4. Check all of the files into TFS from the workstation
For any history prior to the conversion, folks need to go to VSS, but after a week or two it's realistically unlikely to happen all that often. And you know that the history in VSS is accurate and not corrupted by the conversion process.
|
You can code everything in Java using GWT, and you can integrate existing 3rd party javascript libraries with it. It's very good. I've never used RoR much though, so can't say anything about that.
|
Is there any reason the collection needs to be ordered? Why not simply return an <code>IEnumerable<Employee></code>? This gives the bare minimum that is required - if you later wanted some other form of storage, like a Bag or Set or Tree or whatnot, your contract would remain intact.
|
One thing you might look into is that there is now LINQ to Entities, which leverages the MS Entity Framework, which I believe is DB agnostic. I'm still looking into how it works myself, but if you could create an ADO.NET Data Entity that interfaces with Oracle, you could then use LINQ against that Entity.
|
Actually you shouldn't return a List<Employee> if thats a framework, at least not without thinking it, the recommended class to use is a Collection<T>. The List class has some performance improvements at the cost of server extendability issues. It's in fact an FXCop rule.
You have the reasoning for that in [this article][1]
[1]: http://blogs.msdn.com/fxcop/archive/2006/04/27/585476.aspx
|
@[dave-ward](#30589), I just dug through mounds of javascript. most was ASP.NET generated stuff for validation and AJAX, there's a bunch starting with "WebForm_" that I guess is standard stuff to do the defaultbutton, etc. the only javascript we put on the page is for toggling visibility and doing some custom validation...
edit: I did find the below. I don't understand it though :P the beginning of the form the textarea is in, and a script found later: (note, something on stackoverflow is messing with the underscores)
<form name="Form1" method="post" action="default.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="Form1">
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
|
Vi editing for Visual Studio
|
|editor|vim|visual-studio|ide|
|
I'm used to the vi(m) editor, and am using MS VisualStudio 2005 at work. I couldn't find a free vi add-in (there's one for the 2003 version :-( ). I've googled a bit, saw that there was a 'Google summer of code' project this year to write such an add-in, and am eagerly awaiting the result. I've also heard of ViEmu (not free, and I can't test it at work :( ).
I was wondering if anyone in my situation had found a solution (and/or if anyone had tested ViEmu)?
|
|visual-studio|ide|editor|vim|
|
I'm used to the vi(m) editor, and am using MS VisualStudio 2005 at work. I couldn't find a free vi add-in (there's one for the 2003 version :-( ). I've googled a bit, saw that there was a 'Google summer of code' project this year to write such an add-in, and am eagerly awaiting the result. I've also heard of ViEmu (not free, and I can't test it at work :( ).
I was wondering if anyone in my situation had found a solution (and/or if anyone had tested ViEmu)?
Edit: can't test at work because they are paranoid about what we install on our boxes: it has to go through channels,..., and for 30 days I don't reckon it's worth it (and I have no Windows box at home).
|
|visual-studio|ide|editor|vim|
|
|visual-studio|ide|vim|editor|
|
I'm used to the vi(m) editor, and am using MS VisualStudio 2005 at work. I couldn't find a free vi add-in (there's one for the 2003 version :-( ). I've googled a bit, saw that there was a 'Google summer of code' project this year to write such an add-in, and am eagerly awaiting the result. I've also heard of ViEmu (not free, and I can't test it at work :( ).
I was wondering if anyone in my situation had found a solution (and/or if anyone had tested ViEmu)?
Edit: can't test at work because they are paranoid about what we install on our boxes: it has to go through channels,..., and for 30 days I don't reckon it's worth it (and I have no Windows box at home).
As both answers were quite equivalent, I ended up accepting the first one that came in.
|
I don't like this hack but it seems to do the job both in FF and IE6
span.right {
vertical-align:top;
display:inline-block;
text-align:right;
height:80px;
width:50%;
*width:100%;
background-color:red;
}
Note the *width: 100% which seems to satisfy IE6's requirement and FF ignores it
|
[http://blah.winsmarts.com/2008-4-SharePoint_limits.aspx][1]
for #3: you can index specific columns in a list, but you should still keep the sizes down.
[1]: http://blah.winsmarts.com/2008-4-SharePoint_limits.aspx
|
I'd recommend just using a common class name as well. However, if you're against this for some reason, you could also write a function to create date pickers for all text boxes in your template div (to be called after each duplication). Something like:
function makeDatePickers()
{
$("#template input[type=text]").datepicker();
}
|
It's not a simple answer, sadly. But this might help:
[Recovering from repository corruption][1] (from the Git's user manual).
[1]: http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#recovering-from-repository-corruption
|
SQLServer Native Client Error "Connection Busy With Results From Another Command" in SSIS
|
|sql-server|ssis|connection|
|
I'm getting a "Connection Busy With Results From Another Command" error from a SQLServer Native Client driver when a SSIS package is running. Only when talking to SQLServer 2000. A different part that talks to SQLServer 2005 seems to always run fine. Any thoughts?
|
PGP signatures from Python?
|
|python|security|cross-platform|gnupg|
|
What is the easiest way to create and verify PGP/GPG signatures from within a Python application?
I can call pgp or gpg using subprocess and parse the output, but I was looking for a way that didn't require an external program to be installed (my application is cross-platform mac/windows/unix).
[1]: http://www.dlitz.net/software/pycrypto/
|
[Trac][1] ships with a Python replacement for htpasswd, which I'm sure you could port to your language of choice: [htpasswd.py][2].
[1]: http://trac.edgewall.org
[2]: http://trac.edgewall.org/browser/trunk/contrib/htpasswd.py
|
Is it feasible to design the schema so that the commentable (for lack of a better word) tables follow one of the standard inheritance-modeling patterns? If so, you can have the comment table's FK point to the common parent table.
|
See also [std::remove_if](http://www.sgi.com/tech/stl/remove_if.html) to be able to use a predicate...
|
Just as matt b said, the question is not very clear. Assuming that you are asking about multithreading support in the language: because it isn't needed for 99.999% of the applications running in the browser currently. If you really need it, there are workarounds (like using window.setTimeout).
In general multithreading is very, very, very, very, very, very hard (did I say that it is hard?) to get right, unless you put in extra restrictions (like using only immutable data).
|
Quoting from the [Git FAQ][1]:
> Does git have keyword expansion?
> Not recommended. Keyword expansion causes all sorts of strange problems and
> isn't really useful anyway, especially within the context of an SCM. Outside
> git you may perform keyword expansion using a script. The Linux kernel export
> script does this to set the EXTRA_VERSION variable in the Makefile.
> See gitattributes(5) if you really want to do this. If your translation is not
> reversible (eg SCCS keyword expansion) this may be problematic.
[1]: http://git.or.cz/gitwiki/GitFaq
|
I ended up doing this a lot when working with the Apache POI excel library; I ended up writing helper methods that chained so I could apply formatting, data types, internal cell data, formulas, and cell positioning.
For stuff with lots of little tiny flyweight elements that need to have finicky little tweaks applied it works pretty well.
|
|c#|winapi|interop|
|
Dynamically Rendering asp:Image from BLOB entry in ASP.NET
|
|asp.net|
|
What I want to achieve is this. I want to give the user the ability to upload an image file, store the image in BLOB in SQL Server, and then use this image as a logo in other pages of the site.
I have done this by using
Response.Clear();
Response.ContentType = "image/pjpeg";
Response.BinaryWrite(imageConents);
Response.End();
but to do this, I use a User control in the place where I want to show the image. I want to do it if possible using an asp:Image control, or even a pure old html image control. Is this possible?
Thank you all
|
Where can I find a "Math topic dependency tree" to assist my self-guided refresher on the subject?
|
|math|
|
I'm trying to reteach myself some long forgotten math skills. This is part of a much larger project to effectively "teach myself software development" from the ground up (the details are [here](http://www.appscanadian.ca/archives/cs-101-introduction-to-computer-science/) if you're interested in helping out).
My biggest stumbling block so far has been math - how can I learn about algorithms and asymptotic notation without it??
What I'm looking for is some sort of "dependency tree" showing what I need to know. Is calculus required before discrete? What do I need to know before calculus (read: components to the general "pre-calculus" topic)? What can I cut out to fast track the project ("what can I go back for later")?
Thank!
|
How do I unregister COM dlls initially added with RegSvr32 when the /u arg doesn't work?
|
|regsvr32|com|visualstudioreferences|
|
Right, initially ran:
c:\regsvr32 Amazing.dll
then, (accidentally - I might add) I must have run it again, and (indeed) again when new versions of 'Amazing.dll' were released. Yes - I know *now* I should've run:
c:\regsvr32 /u Amazing.dll
beforehand - but hey! I forgot.
To cut to the chase, when add the COM reference in VS, I can see 3 instances of 'Amazing' all pointing to the same location (c:\Amazing.dll), running regsvr32 /u removes one of the references, the second time - does nothing...
How do I get rid of these references?
Am I looking at a regedit scenario? - If so - what *exactly* happens if I delete one of the keys???
Cheers
Chris
|
|regsvr32|com|visual-studio|
|
|visual-studio|com|regsvr32|
|
Why doesn't 'shell' work in VBscript in VS6?
|
|visual-studio|vbscript|
|
In a macro for Visual Studio 6, I wanted to run an external program, so I typed:
shell("p4 open " + ActiveDocument.FullName)
Which gave me a type mismatch runtime error. What I ended up having to type was this:
Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
strResult = wshShell.Run("p4 open " + ActiveDocument.FullName)
What's going on here? Is that nonsense really necessary, or have I missed something?
|
I think what you want is a const rather than static. I assume what you want is the effect of having a static readonly which is why you always want the value to be 5.
In c# consts are treated exactly the same as a readonly static.
[From the c# docs][1]:
> Even though constants are considered
> static members, a constant-
> declaration neither requires nor
> allows a static modifier.
[1]: http://msdn.microsoft.com/en-us/library/aa645749(VS.71).aspx
|
Make liberal use of [SuppressMessage] attribute to begin with. At least at the beginning. Once you get the count to 0 via the attribute, you then put in a rule that new checkins may not introduce FxCop violations.
Visual Studio 2008 has a nice code analysis feature that allows you to ensure that code analysis runs on every build and you can treat warnings as errors. That might slow things down a bit so I recommend setting up a continuous integration server (like CruiseControl.NET) and having it run code analysis on every checkin.
Once you get it under control and aren't introducing new violations with every checkin, start to tackle whole classes of FxCop violations at a time with the goal of removing the SuppressMessageAttributes that you used.
The way to keep track of which ones you really want to keep is to always add a Justification value to the ones you really want to suppress.
|
I've never heard of such a function, but it would be trivial enough to implement...
def die(msg)
puts msg
exit
end
Then, if this is defined in some .rb file that you include in all your scripts, you are golden.... just because it's not built in doesn't mean you can't do it yourself ;-)
|
> Very simple arithmetic is good. Blind people will be able to answer. (But as Jarod said, beware of operator precedence.) I gather someone could write a parser, but it makes the spamming more costly.
Sufficiently simple, and it will be not difficult to code around it. I see two threats here:
1. random spambots and the human spambots that might back them up; and
2. bots created to game StackOverflow
With simple arithmetic, you might beat off threat #1, but not threat #2.
|
It's highly unlikely that a basic function like **glDrawPixels** might not be working. Have you tried some really simple settings like **GL_RGB** or **GL_RGBA** for format and **GL_UNSIGNED_BYTE** or **GL_FLOAT** for type? If not, can you share with us the smallest possible program which replicates your problem?
|
Avoid the [worst CAPTCHAs of all time][1].
You could do trivia questions in the same way ReCaptcha does printed words. It offers two words, one of which it knows the answer to, another which it doesn't - after enough answers on the second, it now knows the answer to that too. Ask two trivia questions:
A woman needs a man like a fish needs a?
Orange orange orange. Type green.
Of course, this may need to be coupled with other techniques, such as timers or computed secrets. Questions would need to be rotated/retired, so to keep the supply of questions up you could ad-hoc add:
Enter your obvious question:
You don't even need an answer; other humans will figure that out for you. You may have to allow flagging questions as "too hard", like this one: "asdf ejflf asl;jf ei;fil;asfas".
[1]: http://www.docstoc.com/docs/1048763/Worst-Captchas-of-All-Time
|
I would be surprised if you could do something in a _Layouts file that you can't do in a forms template. You have pretty much the same technologies at your disposal.
Looking at the way SharePoint works with ListItems and Layouts pages (for example "Manage Permissions" on a list item), I can see that they pass some variables in via querystrings:
?obj={76113B3A-FABA-4389-BC85-4BB2CC5AB423},6,LISTITEM&List={76113B3A-FABA-4389-BC85-4BB2CC5AB423}
Perhaps they grab the context back each time programmatically using these values.
|
If you're experienced in Java but not in Javascript/CSS, then GWT is going to be a lifesaver (unless you want to learn them, of course). CSS has so many little fiddly details. It is not uncommon to spend half a day fixing a 2 pixel misalignment that only occurs in IE6.
I am not sure about how easy it would be to use ROR for the back end... It is possible, I am sure, since GWT ajax communication is just servlets. But they provide some really nice functionality for passing Java objects back and forth which you won't be able to utilize if your server isn't also using Java.
|
I don't think there are any plugins for Express versions of VS. Googling 'Jamie Cansdale' is the canonical reference for this issue.
|