I'm taking a tutorial for X-code that says this:
"Go into the code and change the references from DrinkArray to DrinksDirections."
What exactly does it mean?
Problem:
I want to do this operation
select name from pragma table_info(my_awesome_table)
However, it yields a syntax error. I have the sneaking suspicion this is possible, but it doesn't seem to be documented as usable in the SELECT docs with sqlite.
I need to display an unknown length sequence of dictionaries with unknown keys efficiently in a data grid. This sequence is the result of a potentially slow LINQ query that could contain any number of results.
At first I thought that VirtualMode on DataGridView was what I was looking for but it appears that the number of rows and columns must be…
It seems that NHibernate needs to have an id tag specified as part of the mapping. This presents a problem for views as most of the time (in my experience) a view will not have an Id. I have mapped views before in nhibernate, but they way I did it seemed to be be messy to me.
Here is a contrived example of how I am doing it currently.
…
Is there some way in objective C to see if an instance is being touched such as:
- (void)viewDidLoad {
[super viewDidLoad];
if (recordButton.touched = YES) {
NSLog (@"record button got touched");
}
}
Can't they just make these things easy?
Could someone help?
This may be a long short or not even possible but no harm in asking.
What I am trying to do is monitor an application for any new windows it creates in its MDI control. I have implemented hooking in C# and can capture the MDICREATE window message but because I need to get information about the window after is has been created the…
I have the following dummy class structure and I am trying to find out how to get the properties from each instance of the class People in PeopleList. I know how to get the properties from a single instance of People but can't for the life of me figure out how to get it from PeopleList. I am sure this is really straightforward but…
While there are multiple ways to reverse bit order in a byte, I'm curious as to what is the "simplest" for a developer to implement. And by reversing I mean:
1110 -> 0111
0010 -> 0100
This is similar to, but not a duplicate of this PHP question.
I'm using jsdom with node.js and I'm trying to get it to provide me with some indication that an http error has occurred. I've set up a test server that simply returns an http 500 header for all requests, but when I attempt to load it with jsdom, jsdom doesn't throw any error and doesn't seem to provide me with any information that…
I have searched and have been unable to verify how the GCC compiler will handle inlining getters and setters when declaration is in .h file and definition is in .cpp file.
Most seem to say that GCC can't see across these source file barriers and won't be able to inline these at all, while others disagree. I have looked at the…
So, I've run into this sort of thing a few times in C++ where I'd really like to write something like
case (a,b,c,d) of
(true, true, _, _ ) => expr
| (false, true, _, false) => expr
| ...
But in C++, I invariably end up with something like this:
bool c11 = color1.count(e.first)>0;
bool c21 =…
I'm using a ListView component to list up some informations at a RSS feed, but when the user clicks the row, I want to change into a detailed view of that RSS Item, so far I've done this:
function parseFeed(feed) {
var html = "";
for(var i = 0; i < feed.items.length && i < 5; i++) {
var…
I have a class Application that I need to override with INotifyPropertyChanged events. I have written the logic to override the original class and ended up creating SuperApplication
I am pulling the data from a library though, and cannot change the loading logic. I just need a way to get the data from the original…
Hello,
I want to know if exist some free SVN hosting server that you don't need to have a project to host your C++ files, because i don't have a project and i want to store my C++ in an SVN server, but like here in OpenSVN you can upload your C++ files, but you need to have a project, i want a server that you can…
The title may not really explain what I'm really trying to get at, couldn't really think of a way to describe what I mean.
I was wondering if it is good practice to check the arguments that a function accepts for nulls or empty before using them. I have this function which just wraps some hash creation like so.
…
I am unable to get this event to fire:
$("#about").click(function()
{ //I have put alert("foo") here, won't fire
$("#about_stuff").toggle();
});
snip
<li ><a href="#a" id="about">About</a>
I've tested the toggle line in Firebug and it successfully works - I am at my wits end,…
I just upgraded my prototyping tuple to a record. Someday it may become a real class. In the meantime, I want to translate code like this:
type Example = int * int
let examples = [(1,2); (3,4); (5,6)]
let field1s = Seq.map (fst >> printfn "%d") examples
to this:
type Example = {
Field1 : int
Field2…
I was wondering if there is a nice IF NOT EXISTS for checking columns and indexes in SQLite, or do I need to bring back the entire database schema and validate against that?
I have a 4D array of measurements in Matlab. Each dimension represents a different parameter for the measurement. I want to find the maximum and minimum value and the index (i.e. which parameter) of each.
What's the best way to do it? I figure I can take the max of the max of the max in each dimension, but…
I'm trying to solve problem 50 on Project Euler. Don't give me the answer or solve it for me, just try to answer this specific question.
The goal is to find the longest sum of consecutive primes that adds to a prime below one million. I use wrote a sieve to find all the primes below n, and I have confirmed…
I have a string in my code that I receive that contains some html tags. It is not part of the HTML page being displayed so I cannot grab the html tag contents using the DOM (i.e. document.getElementById('tag id').firstChild.data);
So, for example within the string of text would appear a tag like this:
…
I'm trying to allow an external .txt file that is read by a Java script be able to have some comments in the beginning of the file so others can easily edit it and add more to it.
But if the file contains # (the sign designated for a line that is a comment) it just returns the error that there is a "Format…
Say I want to know if F# has a library function of type
('T -> bool) -> 'T list -> int
ie, something that counts how many items of a list that a function returns true for. (or returns the index of the first item that returns true)
I used to use the big list at the MSR site for F# before the…
I read a bit about a previous attempt to make a C++ standard for embedded platforms where they specifically said multiple inheritance was bad and thus not supported. From what I understand, this was never implemented as a mainstream thing and most embedded C++ compilers support most standard C++…