I'd like to include a file in my .gitconfig that has my github settings - is this possible?
Can I do something like this:
[core]
include = /path/to/file
I use pthreads_attr_getthreadsizes() to get default stack size of one thread, 8MB on my machine.
But when I create 8 threads and allocate a very large stack size to them, say hundreds of MB, the program crash.
So, I guess, shall ("Number of threads" x "stack size of per thread") shall less than a value(virtual memory size)?
What's the easiest way to compute a 3x3 matrix inverse?
I'm just looking for a short code snippet that'll do the trick for non-singular matrices, possibly using Cramer's rule. It doesn't need to be highly optimized. I'd prefer simplicity over speed. I'd rather not link in additional libraries. Primarily I was hoping to have this on Stack Overflow…
Good day.
I'm using Doctrine as ORM for my Zend Framework project. This is the first time I use it. I've followed the ZendCasts Doctrine chapters, and everything works for me, but I needed to perform some profiling;
There is a Doctrine_Connection_Profiler class that should be used to profile the Doctrine Model internal queries, but I've tried to…
I know, it has been made quite clear in a couple of questions/answers before, that volatile is related to the visible state of the c++ memory model and not to multithreading.
On the other hand, this article by Alexandrescu uses the volatile keyword not as a runtime feature but rather as a compile time check to force the compiler into failing to…
Would you write something like:
enum XYZ_TYPE {X=1, Y=2, Z=3};
I saw it and the suffix _TYPE confuses me in the enum context. There is a strong prospect that it is because I am not bright.
I am dealing with a large old codebase that has a lot of these:
try
{
...
}
catch
{
throw;
}
Resharper helpfully marks these and offers the option to "Remove redundant catch", but I don't like having to go through one-by-one, I would like to wipe them out all at once. Is there a way to do that with Resharper, possibly by integrating…
This is a little bit like http://stackoverflow.com/questions/288757/how-to-identify-email-belongs-to-existing-thread-or-conversation but I am more interested in how Entourage 2008 really does threading as opposed to how it ought to.
I have the parent message that has something like
Message-ID: <foo-123@blah.com/>
then some replies…
I'm trying to compile SoundTouch on Android. I started with this configure line:
./configure CPPFLAGS="-I/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/include/" LDFLAGS="-Wl,-rpath-link=/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/lib…
So if your converting from Void* to Type* or from Type* to Void* should you use:
void func(void *p)
{
Params *params = static_cast<Params*>(p);
}
or
void func(void *p)
{
Params *params = reinterpret_cast<Params*>(p);
}
To me static_cast seems the more correct but I've seen both used for the…
I have several TextField columns on my UserProfile object which contain JSON objects. I've also defined a setter/getter property for each column which encapsulates the logic for serializing and deserializing the JSON into python datastructures.
The nature of this data ensures that it will be accessed many times by…
I am trying to do something along the lines of the following where I have a Controller with an method similar to:
public ActionResult Insert(Author author) {
//do something...
}
Where the Author type looks like:
public class Author {
public string FirstName { get; set; }
public string LastName { get; set;…
.NET Platform Invoke advocates declaring pointer types as IntPtr. For example, the following
[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, Int32 wParam, Int32 lParam);
However, I find when interfacing with interesting native interfaces, that have many pointer types,…
For some reason, fading in new buttons using CATransition isn't working for me when it's a newly added button. The fade animation, however, is working on existing subviews.
Code:
// Add new button.
CATransition *animation = [CATransition animation];
[animation setDuration:0.5];
[animation…
I have a vector of vectors:
vector< vector<int> > BigVec;
It contains an arbitrary number of vectors, each of an arbitrary size. I want to delete not duplicate elements of each vector, but any vectors that are the exact same as another. I don't need to preserve the order of…
I have been tasked with integrating image acquisition into a .NET application and I have been looking for an API to use for performing this function. I have come across several "standard" APIs, some have been in existence for a long time, some not so long. I have looked at references to…
It's not hard to find developers who think cursors are gauche but I am wondering how to solve the following problem without one:
Let's say I have a proc called uspStudentDelete that takes as a parameter @StudentID.
uspStudentDelete applies a bunch of cascading soft delete logic,…
This interesting question http://stackoverflow.com/questions/2837267/ concerned how to do a negative look-ahead in MySQL. The poster wanted to get the effect of
Kansas(?! State)
because MySQL doesn't implement look-ahead assertions, a number of answers came up the equivalent
…
I'm implementing a simplistic JIT compiler in a VM I'm writing for fun (mostly to learn more about language design) and I'm getting some weird behavior, maybe someone can tell me why.
First I define a JIT "prototype" both for C and C++:
#ifdef __cplusplus
typedef void*…
I'm trying to create a new environment in my LaTeX document where indentation in the next paragraph following the environment is suppressed.
I have been told (TeXbook and LaTeX source) that by setting \everypar to {\setbox0\lastbox}, the TeX typesetter will execute this at…
Hi Guys,
I have a problem with the jquery-ui dialog box. The problem is that when I close the dialog box and then I click on the link that triggers it, it does not pop-up again unless I refresh the page. How can I call the dialog box back without refreshing the actual…
I'm looking for some advice on how to go about reading the online documentation of various packages classes and methods for java.
i mean all this stuff: http://java.sun.com/javase/6/docs/api/
I need to make my little guy (in a UIIamgeView) jump forward and it has to look natural. I want to know is there a way to do it with CoreAnimation (beginAnimation/commitAnimation)?
I could do it by setting a point in between in the air but the movement looks not…
This question/wiki is more aimed at my fellow freelancers rather than companies or groups...but any and all feedback definitely is welcome.
When quoting jobs for anything over $10,000 I always feel uneasy and unsure about the estimate I'm providing (though, I'm…
I'm putting together a dating site and I'm having a mysql query issue.
This works:
SELECT *
FROM `user`
, `desired_partner`
, `user_personality`
WHERE dob BETWEEN '1957-05-18' AND '1988-05-18'
AND country_id = '190'
AND user.gender_id = '1'
AND…