Hi. I'm using a MBP...
In Xcode 3.2 the help/reference pops up in a new window when I ALT, CMD, DOUBLECLICK on a class name**. In previous versions it looks like it used to open up in the bottom pane of the main Xcode window. Can I replicate that in 3.2+?
The problem I'm having is that if either one of the Xcode windows (help or main) ...
I'm getting the following error from g++ while trying to add iterator support for my linked list class.
LinkedList.hpp: In member function ‘Type& exscape::LinkedList::iterator::operator*() [with Type = int]’:
tests.cpp:51: instantiated from here
LinkedList.hpp:412: error: invalid initialization of non-const reference of type ‘int&’ fr...
I wonder if there's any way something like this would be possible for value types...
public static class ExtensionMethods {
public static void SetTo(this Boolean source, params Boolean[] bools) {
for (int i = 0; i < bools.Length; i++) {
bools[i] = source;
}
}
}
then this would be possible:
Boolean a = true, b, c = true, d...
Please stop me if i am doing something wrong. It works but somehow it doesn't appear the right way to me... Look at the member function call in talks.php. Does this look right to you? Is there a better way to solve that? Thanks.
show.php
I am passing my user class by reference:
$talks = new talks($comments, $user);
talks.php:
[.....
I have a project that adds some extensibility to another application through their API. However, I want to be able to use the same project for multiple versions of their application, because most of the code is the same.
However, each version of the application requires a reference to the proper assembly for that version of the software...
I am creating BOOK_Issue table which will contain id of person to whom the book is issued.
i have a column name user_id witch will contain ids from tbl_student as well as tbl_faculty. so how to set user_id field of book_issue table with reference to two primary key columns.
...
Hi,
I'm trying to add a composite scriptreference like this;
ScriptReference scriptReference = new ScriptReference("CSSFriendly.JavaScript.MenuAdapter.js", "CSSFriendly");
scriptReference.NotifyScriptLoaded = false;
scriptManager.CompositeScript.Scripts.Add(scriptReference);
In the CSSFriendly assembly the script resource is defined;
...
I am trying to install the mysql++ in Code::Blocks, but When I try to run the example code I get this error:
undefined reference to __imp___ZN7mysqlpp10ConnectionC1Eb
What I am doing wrong?
...
How can I call a procedure that uses reference cursors from another procedure?
...
Hi all,
What I am trying to do is essentially create two vectors of objects, where some objects are entered into both lists and some are just entered into one. The first problem I found was that when I used push_back() to add an object into both lists the object was copied so that when I changed it from one list the object did not chang...
Hi,
I am just learning C# and I have a problem now. :-)
In C++ I loved to use "const reference" as a parameter to avoid that
the called method changes my passed object.
I read somewhere that I can do sth. similar in C# by using Interfaces.
In the interface I would just put some "getters" to allow the method a readonly access
to my obje...
I saw there is a daemon thread running whenever we create a referenced object using any Reference class like
WeakReference,
FinalReference,
SoftReference,
PhantomReference,
Referemce
And if we have hierarchal thread structure then at each level there is an extra daemon thread initiated.
...
I'd like to brush up on my knowledge of Shell scripting with Bash for a job interview Monday.
What would the preferred book be for someone with an existing knowledge looking to review the topic?
...
I have:
class A{
public $name = 'A';
public $B;
public function B_into_A($b)
{
$this->B = $b;
}
}
class B{
public $name = 'B';
public $A;
public function new_A_into_B($a)
{
$this->A = new $a;
}
}
$a = new A;
$b = new B;
$a->B_into_A($b);
$b->new_A_into_B('A');
Is this a goo...
How would you take a reference to an array slice such that when you modify elements of the slice reference, the original array is modified?
The following code works due to @_ aliasing magic, but seems like a bit of a hack to me:
my @a = 1 .. 10;
my $b = sub{\@_}->(@a[2..7]);
@$b[0, -1] = qw/ < > /;
print "@a\n";
# 1 2 < 4 5 6 7 > 9 10
...
Our team is developing a framework. In a different solution, we have a mobile project (along with other "normal" .NET projects). That mobile project would benefit from using some of the code in the framework. However, the framework is the full .NET version, not the compact framework. How should the mobile project use that framework code?...
I'm looking for a book similar to "Introduction to Algorithms" by Thomas Cormen geared towards DSP algorithms. Is there anything as thorough as Cormen on the DSP market?
EDIT
I should say I'm looking for a book that's analogous to The Joy of Cooking.
...
I'm building a loosely-coupled app, where the main exe project only contains references to an assembly with interfaces. The concrete implementations of those interfaces are in assemblies that are referenced indirectly - via IoC. However, those assemblies' build output doesn't get copied to the bin\Debug folder of the exe, which means m...
#include <stdio.h>
#include <stdlib.h>
void
getstr(char *&retstr)
{
char *tmp = (char *)malloc(25);
strcpy(tmp, "hello,world");
retstr = tmp;
}
int
main(void)
{
char *retstr;
getstr(retstr);
printf("%s\n", retstr);
return 0;
}
gcc would not compile this file,but after adding #include <cstring> I could use g++ to compile this...
hi!
I would like to pass a pointer by reference to a function, such that i can actually change the address the passed pointer is pointing to and i'd like to assign this argument a default value.
something like this:
in the declaration
void myFunc(SomeType* &var=NULL);
and the definition:
void MyClass::myFunc(SomeType* &var){
i...