Hello all,
I need some help here so I will do my best to explain. I have worked on this all day and had no success (just learning!)
I have:
NSArray *getValue(NSString *iosearch)
{
mach_port_t masterPort;
CFTypeID propID = (CFTypeID) NULL;
unsigned int bufSize;
kern_return_t kr = IOMasterPo...
How can I allow a change in scope without having the table grey out, the search field become first responder and keyboard popup?
I simply want to refresh the data shown based on the scope.
Thanks
Greg
...
There is a question in my programming languages textbook that is as follows:
Write a C function that includes the
following sequence of statements:
x = 21;
int x;
x = 42;
Run the program and explain the
results. Rewrite the same code in C++
and Java and compare the results.
I have written code, and played with i...
Is it possible to allocate locally-scoped memory in assembly?
For example, consider the following (completely contrived) situation:
I have two macros, one of which is dependent on the other. The first is:
minimum MACRO dest, num1, num2
; Finds the minimum of two unsigned numbers, stores the result in dest
And the second is:
tripMin...
In one of the example servers given at golang.org:
package main
import (
"flag"
"http"
"io"
"log"
"template"
)
var addr = flag.String("addr", ":1718", "http service address") // Q=17, R=18
var fmap = template.FormatterMap{
"html": template.HTMLFormatter,
"url+html": UrlHtmlFormatter,
}
var templ = templat...
I was reading up about bypassing objective-c's messaging to gain performance (irrelevant to this specific question) when i found an interesting bit of code:
#import <Cocoa/Cocoa.h>
@interface Fib : NSObject { }
- (long long) cFib: (NSUInteger) number;
@end
@implementation Fib
// c implementation of fib
long long cFibIMP(NSUInteger ...
Hi,
We have an application running on a loadbalanced environment, let say webserver A and B.
The loadbalancing is on the HTTP level, so the loadbalancer directs each user request to one of both webservers.
The scope of the repositories in the application is managed by the spring.net container,
and the application relies on data that ca...
It seems that all Guice's out-of-the-box Scope implementations are inherently Thread-based (or ignore Threads entirely):
Scopes.SINGLETON and Scopes.NO_SCOPE ignore Threads and are the edge cases: global scope and no scope.
ServletScopes.REQUEST and ServletScopes.SESSION ultimately depend on retrieving scoped objects from a ThreadLocal...
In the following code snippet, the Color enum is declared within the Car class in order to limit the scope of the enum and to try not to "pollute" the global namespace.
class Car
{
public:
enum Color
{
RED,
BLUE,
WHITE
};
void SetColor( Car::Color color )
{
_color = color;
}
Car::Color Get...
Im using an existing widget from the jquery-ui labs call selectmenu. It has callback options for the events close and open. The problem is i need in these event to animate a node that is part of the widget but not what its connected to. In order to do this i need access to this node.
for example if i were to actually modify the widget c...
Hi,
In my visual studio project (C++), when i copy a method(meth1) of a particular scope say 'scope1' and paste it in the same code area, it is getting pasted in General Scope.
i.e I want to add a method into a particular scope but when i try it is getting added in general scope. How can i solve this?
For eg:
There is an existing metho...
I apologize if this is a "duh" question. It seems like the answer should be easily googleable, but I haven't found it yet.
I am working on a large Coldfusion application that stores a large amount of session/user data in the Client scope (ie <cfset Client.UserName = "JoshuaC"> ). I did not write this application, and I don't have the lu...
(I am learning Javascript)
Problem: A page I am working on has 2 views, a data entry view with a textbox and a data rendering view. There is a a href src="currentpage#" link that switches between the 2 views. In order to transmit data from view to view, the javascript parses it from the current HTML and pushes it into the correct form f...
Can I define a function which, when called, inserts new locals into the caller's scope? I have a feeling that passing the caller's locals() into the function might work, but is there a way to do what I want without having to do this?
...
Hi. I'm a Dojo n00b.
In jQuery, a DOM node or jQuery object can be passed as an attribute in a query, which sets the scope:
var myScope = $('#someDiv');
$('a',myScope).addClass('red');
$('li',myScope).css('display','inline');
Now, in Dojo I can chain several .query()s after each other, but what should I do if I have a certain DOM nod...
why does this work:
def function1():
a = 10
def function2():
print a
function2()
...
While creating JavaScript with ASP.NET MVC I noticed several scope warnings and realized that I am missing something with understanding the variable scope inside the switch / case statement.
Warning: 'i' is already defined referring to case b and case c
My code looks similar to this:
switch(element) {
case 'a':
for(var i=0; i < c...
Is there any way to get the caller function with something else than debug_backtrace()?
I'm looking for a less greedy way to simulate scopes like friend or internal.
Let's say I have a class A and a class B.
Until now, I've been using debug_backtrace(), which is too greedy (IMHO).
I thought of something like this:
<?php
class A...
I have an array outside:
$myArr = array();
I would like to give my function access to the array outside it so it can add values to it
function someFuntion(){
$myVal = //some processing here to determine value of $myVal
$myArr[] = $myVal;
}
How do I give the function the right scoping to the variable?
...
If yes is there any way to access a var defined in another PHP code snippet tag?
...