instruction stringlengths 0 30k ⌀ |
|---|
[CodePlotter](http://www.codeproject.com/KB/macros/codeplotter.aspx) and [CodePlotter Remixed](http://www.codeproject.com/KB/applications/codeplotterremoded.aspx) |
"The C++ Programming Language" by Bjarne Stroustrup |
How does the Multiview control handle its Viewstate? |
|.net|asp.net|.net-2.0| |
Does the Multiview control contain the viewstate information for each of its views regardless of whether or not the view is currently visible? |
[A better Addin Manager](http://www.codeproject.com/KB/cpp/vs2005addinmgr.aspx)
(Since I'm new, my opinion that other people are right doesn't count, which is pretty silly, but I'll add support for Red-Gate [Reflector]() and its own addons, [Rockscroll], (http://www.hanselman.com/blog/IntroducingRockScroll.aspx) and... |
[A better Addin Manager](http://www.codeproject.com/KB/cpp/vs2005addinmgr.aspx)
|
From the 2-D space there will be 2 valid rectangles that can be built. Without knowing the original matrix projection, you won't know which one is correct. It's the same as the "box" problem: you see two squares, one inside the other, with the 4 inside vertices connected to the 4 respective outside vertices. Are you lo... |
From the 2-D space there will be 2 valid rectangles that can be built. Without knowing the original matrix projection, you won't know which one is correct. It's the same as the "box" problem: you see two squares, one inside the other, with the 4 inside vertices connected to the 4 respective outside vertices. Are you lo... |
I have a list with 2 text fields, and a choice field. How do I use the Lists.asmx web service to insert a new item? I can make a web reference to the lists.asmx service, so you can assume that this is known.
I would like a complete example including code and the XML for the CAML query. Ideally the sample would use C... |
Go with integers for seconds or minutes. Seconds is probably better. you'll never kick yourself for choosing something with too much precision. Also, for your UI, consider using multiple text inputs you don't have to worry about the user actually typing in the ":" properly. It's also much easier to add other constr... |
and int type should do it, storing it as seconds and parsing it back and forth
http://msdn.microsoft.com/en-us/library/ms187745.aspx |
I would say that the first programming language actually *used* was the machine language of the first stored program computer, which I believe was Baby: http://www.computer50.org/ |
If you want the most precise result possible, you should use a higher internal working precision, and then downconvert the result to the desired precision. If you don't mind a few ULPs of error, then you can just repeatedly multiply by 10 as necessary with the desired precision. I would avoid the pow() function, sinc... |
Incomplete file is definitely the place to start looking. I'd print out the file right before the point you parse it to see what's getting sent to the parser. If it's incomplete it will be obvious. If it's invalid, you'll have a little searching to do. |
I think we need to agree on a definition of "programming language" to answer this question in any useful way. Is directly manipulating machine code a programming language? |
Iterators aren't exactly translatable to "the .net way", but they are roughly replaced by IEnumerable < T > and IEnumerator < T >.
Rather than
vector<int> a_vector;
vector<int>::iterator a_iterator;
for(int i= 0; i < 100; i++)
{
a_vector.push_back(i);
}
... |
I don't want to draw attention away from the "last access time" question, but there might be other ways to speed up your builds. Not knowing the context and your project setup, it's hard to say what might be slow, but there might be some things that might help:
Create "uber" builds. That is, create a single compil... |
Removing static file cachebusting in rails |
|ruby-on-rails| |
I have a rails application which is still showing the cachebusting numeric string at the end of the URL for static mode, even though I have put it into the production environment. Can someone tell me what config option I need to set to prevent this behaviour |
Obvious with SQL Server is that the limits for nchar/nvarchar are half of their char/varchar counterparts (unless you migrate everything > 4000 to nvarchar(max)) |
Files on XP: Is turning off "last access time" safe? |
|file-io|windows-xp|performance| |
I'm desperately looking for cheap ways to lower the build times on my home PC. I just read an [article about disabling the Last Access Time attribute][1] of a file on Windows XP, so that simple reads don't write anything back to disk.
> It's really simple too. At a DOS-prompt write:
> `fsutil behavior set disable... |
I'm desperately looking for cheap ways to lower the build times on my home PC. I just read an [article about disabling the Last Access Time attribute][1] of a file on Windows XP, so that simple reads don't write anything back to disk.
> It's really simple too. At a DOS-prompt write:
> `fsutil behavior set disable... |
Note that SQL Server actually does **not** record the last modification date. It does not exist in any system tables.
The Schema Changes History report is actually constructed from the [Default Trace](http://msdn.microsoft.com/en-us/library/ms191006.aspx). Since many admins (and web hosts) turn that off, it may not... |
We've deployed [IOComp][1]'s Plot Pack in both ActiveX and .Net flavors with great success. Great API, incredibly flexible, provides a toolbar that lets users pan/zoom/customize. It's solid, has a long track record, relatively inexpensive, and is very fast.
(I'm not affiliated, by the way.)
[1]: http://io... |
Consider what makes up a Java process.
You have:
- the JVM (a C program)
- JNI Data
- Java byte codes
- Java data
Notably, they ALL live in the C heap (the JVM Heap is part of the C heap, naturally).
In the Java heap is simply Java byte codes and the Java data. But what is also in the Java heap is ... |
Currently C++ doesn't support this. C++0X will support this, using this syntax:
enum class Enum2 : __int64 {Val1, Val2, val3};
|
Problem with SharePoint is that there are a bunch of different ways to do this. If your data is not changing too often and is not overly large it may be worth considering entering it into a list for display.
If you have the Enterprise licence it may be worth getting your data into the BDC and using it there.
you may... |
There are some users listed here: <http://mdp.cti.depaul.edu/who>. |
F3 has been my favorite, opens the definition for the selected item. That and Ctrl-Shift-R that has already been mentioned remove 90% of my need to use the package explorer. Alt-Shift-W > Package Explorer makes life easier when browsing large projects also. |
F3 has been my favorite, opens the definition for the selected item.
Ctrl-Shift-R has an interesting feature, you can use just the uppercase camel letters from a class when searching (such as typing CWAR will show a result for ClassWithAReallyLongName).
Alt-Shift-W > Package Explorer makes life easier when brows... |
Probably not exactly what you are looking for but this is a decent VBA site if you have some programming background. It's not a list of this = that but more of a problem/solution
http://www.mvps.org/access/toc.htm
|
Dean Edwards' [IE7 library][1] copes with some of the Internet Explorer quirks.
[1]: http://dean.edwards.name/IE7/ |
It's important to note that once you generate a core file you'll need to use the gdb tool to look at it. For gdb to make sense of your core file, you must tell gcc to instrument the binary with debugging symbols: to do this, you compile with the -g flag:
$ g++ -g prog.cpp -o prog
Then, you can either set "ul... |
VBA as in what was implemented as part of Office 2000, 2003 and VB6 have been deprecated in favor of .Net technologies. Unless you are maintaining old code stick to python or maybe even go with IronPython for .Net. If you go IronPython, you may have to write some C#/VB.Net helper classes here and there when working w... |
ledit is great on linux for that sort of thing. It's probably easily compiled on solaris.
Clarification: ledit wraps the call to your other command line app, and can even be passed a file to persistently store your history.
Here's the homepage: http://cristal.inria.fr/~ddr/ledit/ |
|c++|performance|file-io|windows-xp| |
@ Kent Fredrick
>My personal opinion of OR Mappers is their existence highlights a design flaw in the popular structure of databases"
I think you're talking about the difference between the relational model and object-oriented model. This is actually why we need ORMs, but the implementations of these models were ... |
.tables
Will list the tables in your database
.schema <tablename>
will list how the table looks
and a
Select * from <tablename>
will print the entire table.. |
.tables
Will list the tables in your database
.schema tablename
will list how the table looks
and a
Select * from tablename
will print the entire table.. |
JVM Choices for Windows CE in general (including Pocket PC and Windows Mobile):
- [CrE-ME][1]
- [Mysaifu][2]
- [Skelmir CEEJ][3]
If you're looking to have a common code base between WinMo and Symbina, you might also look at [Red Five Labs][4]. They have a Symbian runtime that allows you to run COmpact Framework... |
How can MyISAM tables be used more safely? |
|mysql|myisam|innodb|database-integrity| |
I like InnoDB's safety, consistency, and self-checking.
But I need MyISAM's speed and light weight.
How can I make MyISAM less prone to corruption due to crashes, bad data, etc.? It takes forever to go through a check (either CHECK TABLE or myisamchk).
I'm not asking for transactional security -- that's what ... |
|mysql|innodb|myisam|database-integrity| |
I like InnoDB's safety, consistency, and self-checking.
But I need MyISAM's speed and light weight.
How can I make MyISAM less prone to corruption due to crashes, bad data, etc.? It takes forever to go through a check (either CHECK TABLE or myisamchk).
I'm not asking for transactional security -- that's what ... |
The one thing I have really used Y! Pipes for (rather than just playing around with it) is to clean up item titles, merge and finally de-dupe the feeds I got from querying multiple blog search engines with the same search term. This is something I’ve done in several very different contexts, eg. for my own ego surfing, ... |
Smalltalk:
isPalindrome: aString
^ aString reverse = aString
The same but keeping only alpha numeric chars:
isPalindromeKeepingOnlyAlphaNumericChars: aString
|alphaNumerics|
alphaNumerics := aString select: [:each | each isAlphaNumeric].
^ alphaNumerics reverse = al... |
Three versions in Smalltalk, from dumbest to correct.
---
isPalindrome: aString
"Dumbest."
^ aString reverse = aString
---
isPalindrome: aString
"Case insensitive"
|lowercase|
lowercase := aString translateToLowercase.
^ lowercase reverse = lower... |
Three versions in Smalltalk, from dumbest to correct.
---
isPalindrome: aString
"Dumbest."
^ aString reverse = aString
---
isPalindrome: aString
"Case insensitive"
|lowercase|
lowercase := aString translateToLowercase.
^ lowercase reverse = lower... |
Three versions in Smalltalk, from dumbest to correct.
---
In Smalltalk, `=` is the comparison operator:
isPalindrome: aString
"Dumbest."
^ aString reverse = aString
---
The message `#translateToLowercase` returns the string as lowercase:
isPalindrome: aString
"Case ins... |
Additional resource on this issue: http://www.modernblue.com/web-design-blog/tweak-that-gamma/ |
[Project MRU editor](http://www.codeproject.com/KB/dotnet/VSProjectListEditor.aspx)
(Since I'm new, my opinion that other people are right doesn't count, which is pretty silly, but I'll add support for Red-Gate [Reflector]() and its own addons, [Rockscroll], (http://www.hanselman.com/blog/IntroducingRockScroll.aspx)... |
[Project MRU editor](http://www.codeproject.com/KB/dotnet/VSProjectListEditor.aspx)
|
I would try backing up the database on the desktop, and then see if it will restore successfully on the laptop. Doesn't explain your issue but at least you can move forward. |
A Good 3D mesh library |
|graphics|math|3d|mesh| |
I'm looking for a good 3D Mesh library
- Should be able to read popular formats (OFF, OBJ...)
- Should support both half-edge structure and a triangle soup
- Should be tolerant to faults and illegal meshes.
- Basic geometric operations - intersections, normal calculation, etc'
- Most importantly - Should not be ... |
Couldn't you just use a client certificate (signed by you) and establish an HTTPS connection to your server, which has been configured to only accept connections begun with a client certificate signed by you?
|
If this is on windows, you can use sysinternal's procmon to find out if it's checking the right path.
Just filter by path -> contains -> persistence.xml. Procmon will pick up any attempts to open a file named persistenc.xml, and you can check to see the path or paths that get tried.
See here for more detail on p... |
Packed conversion using SSE is by far the fastest method, since you can convert multiple values in the same instruction. ffmpeg has a lot of assembly for this (mostly for converting the decoded output of audio to integer samples); check it for some examples. |
Normally I say put as little in PL/SQL as possible - it is typically a lot less maintainable - at one of my last jobs I really saw how messy and hard to work with it could get.
However, since it is batch processing - and since the input and output are both the DB - it makes good sense to put the logic into PL/SQL ... |
I am a consultant and tend to work in a variety of environments. I carry a Thinkpad running VMWare Server over Ubuntu64 with 4GB of RAM. I've got a 320GB secondary hard drive that I use just for VM's and have 25 or so different virtual machines that I boot up as the circumstances demand.
They're a mix of Linux serve... |
How to double buffer .NET controls on a form? |
|c#|winforms|doublebuffered| |
How can i set the protected DoubleBuffered property of the controls on a form that are suffering from flicker? |
I had this problem once, and I tracked it to some really inefficient SQL code in one of my database's views. Someone had put a complex condition with a subquery into the ON clause for a table join, instead of into the WHERE clause where it belonged. Once I corrected this error, the problem went away. |
That's a good suggestion... and I will definitely look into it (photosynth kind of resparked my interest in this subject - but I've been working on it for months for robochamps) - but it's a sparse implementation - it looks for "good" features (points in the image that should be easily identifiable in other views of th... |
This will get rid of your concurrent modification exception. I won't speak to the efficiency however ;)
List<Blah> list = fillMyList();
List<Blah> temp = new ArrayList<Blah>();
for (Blah blah : list) {
//list.remove(blah); would throw the exception
temp.add(blah);
}
list.... |
Why do you want to do it in SQL? Just write a little script that does the conversion. |
Well, if you care about the consistency of your data, there are reasons to implement code within the database. As others have said, placing code (and/or RI/constraints) inside the database acts to enforce business logic, close to the data itself. And, it provides a common, encapsulated interface, so that your new deve... |
When you project from 3D to 2D you lose information.
In the simple case of a single point the inverse projection would give you an infinite ray through 3d space.
Stereoscopic reconstruction will typically start with two 2d images and project both back to 3D. Then look for an intersection of the two 3D rays produ... |
One main concept to understand in .NET is that **now** is **now** all over the earth no matter what time zone you are in. So if you load a variable with DateTime.Now or DateTime.UtcNow -- the assignment is identical. Your DateTime object knows what timezone you are in and takes that into account regardless of the assi... |
I consider myself lucky, all except "Pair programming" we can do it, but only to solve big issues not on a day-to-day basis. "Collective code ownership" is hard to achieve as well, not doing pair programming we tend to keep the logical next user stories from iteration to iteration. |
[metasploit][1] is a great framework for penetration testing. It's mainly written in Ruby, so if you know that language well, maybe you can hook in there. However, to _use_ metasploit, you don't need to know any language at all.
[1]: http://www.metasploit.com/ |
Consider converting your application to [Eclipse RCP](http://wiki.eclipse.org/index.php/Rich_Client_Platform). It is written in [SWT](http://eclipse.org/swt), and the Eclipse IDE contains packaging tools that generate executables for all major platforms. For windows, it can generate a zip or a folder containing your ... |
How are Integer arrays stored internally, in the JVM? |
|java|jvm| |
An array of ints in java is stored as a block of 32-bit values in memory. How is an array of Integer objects stored? i.e.
int[] vs. Integer[]
I'd imagine that each element in the Integer array is a reference to an Integer object, and that the Integer object has object storage overheads, just like any other ob... |
Expose DependencyProperty |
|wpf|data-binding|user-controls| |
When developing WPF UserControls, what is the best way to expose a DependencyProperty of a child control as a DependencyProperty of the UserControl? The following example shows how I would currently expose the Text property of a TextBox inside a UserControl. Surely there is a better / simpler way to accomplish this?
... |
By "good deployment" are you comparing it with Java's EAR files, which allow you to deploy web applications by uploading a single file to a J2EE server? (And, to a lesser extent, WAR files; EAR files can have WAR files for dependent projects)
I don't think Django or Rails have gotten quite to that point yet, but I c... |
Here's a script that I use for granting permissions to lots of procedures:
DECLARE @DB sysname ; set @DB = DB_NAME()
DECLARE @U sysname ; set @U = QUOTENAME('UserID')
DECLARE @ID integer,
@LAST_ID integer,
@NAME varchar(1000),
@SQL ... |
1. Build your version of Perl 5.10 following any special instructions from the mod_perl documentation. Tell Perl configurator to install in some non-standard place, like /usr/local/perl/5.10.0
2. Use the instructions to build a shared library (or dynamic, or .so) mod_perl against your distribution's Apache, but ma... |
You can just use a regular space, but add "margin-right:_ px" to the h2 css definition to adjust the spacing between tags. |
You can just use a regular space, but add "margin-right:_ px" to the h2 css definition to adjust the spacing between tags. Negative values are allowed too. |
Well, here's where I learned it...
http://www.cs.uiuc.edu/class/sp08/cs273/
Click on the lectures tag, scroll through till you find the lectures on the material you are talking about.
Love my alma mater. God bless them, they never take down their lectures in any class and you can go and read any of them anyti... |
I keep a prioritized list of work tasks and my estimates on what will be in build X and how long (roughly speaking) I expect it to take to write tests, implement code and do whatever else is related. I always take their inputs, discuss what they really want/need and insist that we determine where it fits in the grand ... |
Autosizing Textarea |
|css|html|javascript| |
I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address.
Now I think it would look much nicer, if the textarea I'm using for the main address details would just take up the area of the text in it, and automatically res... |
|javascript|html|css| |
I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address.
Now I think it would look much nicer, if the textarea I'm using for the main address details would just take up the area of the text in it, and automatically res... |
|javascript|html|css|prototype| |
I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address.
Now I think it would look much nicer, if the textarea I'm using for the main address details would just take up the area of the text in it, and automatically res... |
I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address.
Now I think it would look much nicer, if the textarea I'm using for the main address details would just take up the area of the text in it, and automatically res... |