Search Results

Search found 4637 results on 186 pages for 'john lubotsky'.

Page 115/186 | < Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >

  • Setting Environment Variables For NMAKE Before Building A 'Makefile Solution'

    - by John Dibling
    I have an MSVC Makefile Project in which I need to set an environment variable before running NMAKE. For x64 builds I needs to set it to one value, and for x86 builds I need to set it to something else. So for example, when doing a build I would want to SET PLATFORM=win64 if I'm building a 64-bit compile, or SET PLATFORM=win32 if I'm building 32-bit. There does not appear to be an option to set environment variables or add a pre-build even for makefile projects. How do I do this? EDIT: Running MSVC 2008

    Read the article

  • Android : Stop image scaling down

    - by John Smith
    Hi, I'm trying to draw an image in a view but having problems trying to maintain the scale of the original image. Basically, I have a small view and I would like to show part of the image in the view. The intention then is to perform a translation on the image so that a different part appears in the view. No matter what I try, either the image is down-scaled automatically to fit the view or the whole image is viewable. I've tried playing about with the settings on BitmapDrawable, ImageView and Layout to no avail. Anyone know a good way to achieve this?

    Read the article

  • How to run a long task in backgroung in iOS applications?

    - by John Canady
    I am developing an application which requires running a task in background. I am trying this by calling a method which will retrieve(download) data from web server through web services. this method will call some more methods which are in different view controller classes. Here when I tap on home button of device, the method is calling but no further execution of the remaining code. This is the code I have written in (void)applicationDidEnterBackground:(UIApplication )application { UIApplication app = [UIApplication sharedApplication]; UIBackgroundTaskIdentifier bgTask = 0; bgTask = [app beginBackgroundTaskWithExpirationHandler:^{ [app endBackgroundTask:bgTask]; bgTask = UIBackgroundTaskInvalid; }]; // Start the long-running task and return immediately. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ // Do the work associated with the task. NSString *updatekey = [[NSUserDefaults standardUserDefaults] objectForKey:@"updatesetting"]; if([updatekey isEqualToString:@"enabled"]) { DataSettingsView *periodicUpdate = [[DataSettingsView alloc] init]; [periodicUpdate updateDataPeriodically]; //[periodicUpdate viewDidLoad]; //[periodicUpdate release]; } [app endBackgroundTask:bgTask]; bgTask = UIBackgroundTaskInvalid; }); } some one please help me in this background execution of long tasks with some example of code. Some help will appreciated and helpful to me.

    Read the article

  • GWT + OSX = SWT issues

    - by John Leonard
    I'm new to GWT development and I'm putting myself through the paces with Google's tutorial but I'm getting errors: java[10574:80f] [Java CocoaComponent compatibility mode]: Enabled 2009-11-06 15:27:38.769 java[10574:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000 I checked my Java prefs and I have Java SE6 (64 bit) as the preferred JVM. I'm really not sure how to clear this up.

    Read the article

  • Hero Class, php classes

    - by John
    I am going to have different classes for a character that a user play. Like "Mage, Warrior" etc. I am thinking of a method like have some CharacterBase class (abstract?) and then I have a child class which is like WarriorClass or something like that. I think the approach is called Factory pattern or something like that. Anyone got a clue of what I'm trying to achieve here, and are there perhaps any better way to do this?

    Read the article

  • VisualSvn Server

    - by John
    Hi all, When I am trying to setup VisualSVN Server in my server. I get error. I can not find solution Error: service VisualSVN Server failed to start. Please check VisualSVN Server log in Event Viewer for more details. Thanks for help.

    Read the article

  • How to use Scanner to accept only valid int as input

    - by John
    I'm trying to make a small program more robust and I need some help with that. Scanner kb = new Scanner(System.in); int num1; int num2 = 0; System.out.print("Enter number 1: "); num1 = kb.nextInt(); while(num2<num1) { System.out.print("Enter number 2: "); num2 = kb.nextInt(); } Number 2 has to be greater than number 1 Also I want the program to automatically check and ignore if the user enters a character instead of a number. Because right now when a user enters for example r instead of a number the program just exits.

    Read the article

  • What's the easy way to test for 304 reponses?

    - by John Mee
    I need to test if my 304 responses are working, but my development environment is pretty hard set on force no-cache. Is there an easy way to modify the max-age value of the cache-control header before it goes out? I'm perhaps a bit optimistic in hoping chrome (or an extension, or FF) has a console command letting me alter the if-modified-since header then send the request. Maybe paste something into a telnet connection?

    Read the article

  • C++ Multiple Inheritance Question

    - by John
    The scenario generating this is quite complex so I'll strip out a few pieces and give an accurate representation of the classes involved. /* This is inherited using SI by many classes, as normal */ class IBase { virtual string toString()=0; }; /* Base2 can't inherit IBase due to other methods on IBase which aren't appropriate */ class Base2 { string toString() { ... } }; /* a special class, is this valid? */ class Class1 : public IBase, public Base2 { }; So, is this valid? Will there be conflicts on the toString? Or can Class1 use Base2::toString to satisfy IBase? Like I say there are lots of other things not shown, so suggestions for major design changes on this example are probably not that helpful... though any general suggestions/advice are welcome.

    Read the article

  • How do I get the output of an Xcode user script to auto indent?

    - by John Gallagher
    The Problem I want to press a key when I have a line highlighted and convert from a single line: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; to a multiline statement: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; What I've Tried I've got a simple ruby script that almost gets me there. #!/usr/bin/env ruby s = STDIN.read s.gsub!(/(:.+?\w) (\w.+?)/,'\1' + "\n\t" +'\2') print s When I set the output to "Replace Selection", I get this: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; When I set the output to "Place on Clipboard", then paste it in, I get the desired result: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; However, this is two keypresses which is clumsy. Any ideas how I can get the replaced text to obey Xcode's auto indent rules?

    Read the article

  • vnc application for iPhone. How to go about building one?

    - by John Stewart
    Alright.. I am on a mission to learn iPhone development as much as possible. At my current job they have requested me if I can build a vnc viewer in iPhone.. there are many vnc apps but i want to learn how to build an app like that.. what would be the architecture of this app how should i organize my app? Any thoughts? comments?

    Read the article

  • Search backward through a string using a regex (in Python)?

    - by John Mulder
    I'm parsing some code and want to match the doxygen comments before a function. However, because I want to match for a specific function name, getting only the immediately previous comment is giving me problems. Is there a way to search backward through a string using the Python Regex library? Is there a better (easier) approach that I'm missing?

    Read the article

  • string s; &s+1; Legal? UB?

    - by John Dibling
    Consider the following code: #include <cstdlib> #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { string myAry[] = { "Mary", "had", "a", "Little", "Lamb" }; const size_t numStrs = sizeof(myStr)/sizeof(myAry[0]); vector<string> myVec(&myAry[0], &myAry[numStrs]); copy( myVec.begin(), myVec.end(), ostream_iterator<string>(cout, " ")); return 0; } Of interest here is &myAry[numStrs]: numStrs is equal to 5, so &myAry[numStrs] points to something that doesn't exist; the sixth element in the array. There is another example of this in the above code: myVec.end(), which points to one-past-the-end of the vector myVec. It's perfecly legal to take the address of this element that doesn't exist. We know the size of string, so we know where the address of the 6th element of a C-style array of strings must point to. So long as we only evaluate this pointer and never dereference it, we're fine. We can even compare it to other pointers for equality. The STL does this all the time in algorithms that act on a range of iterators. The end() iterator points past the end, and the loops keep looping while a counter != end(). So now consider this: #include <cstdlib> #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { string myStr = "Mary"; string* myPtr = &myStr; vector<string> myVec2(myPtr, &myPtr[1]); copy( myVec2.begin(), myVec2.end(), ostream_iterator<string>(cout, " ")); return 0; } Is this code legal and well-defined? It is legal and well-defined to take the address of an array element past the end, as in &myAry[numStrs], so should it be legal and well-defined to pretend that myPtr is also an array?

    Read the article

  • ASP .NET Added Event Handlers to buttons on Page_Load. Event handlers do not fire the first click, b

    - by John
    Background: I am customizing an existing ASP .NET / C# application. It has it's own little "framework" and conventions for developers to follow when extending/customizing its functionality. I am currently extending some of it's administrative functionality, to which the framework provides a contract to enforce implementation of the GetAdministrationInterface() method, which returns System.Web.UI.Control. This method is called during the Page_Load() method of the page hosting the GUI interface. Problem: I have three buttons in my GUI, each of which have been assigned an Event Handler. My administration GUI loads up perfectly fine, but clicking any of the buttons doesn't do what I expect them to do. However, when I click them a second time, the buttons work. I placed breakpoints at the the beginning of each event handler method and stepped through my code. On the first click, none of the event handlers are triggered. On the second click, they are triggered. Any ideas? Example of Button Definition Button btn = new Button(); btn.Text = "Click Me Locked Screen"; bth.Click += new EventHandler(Btn_Click); Example of Event Handler Method Definition void Btn_Click(object sender, EventArgs e) { // Do Something }

    Read the article

  • money_format() options

    - by John Isaacks
    I am looking at the money_format function in php and confused on how to get it to format the way I want. I do not want USD in front of my string, I want a comma every 3 digits and 2 decimal points so 12345.67 will be formated to $12,345.67 Thanks.

    Read the article

  • Jira task hierarchies

    - by John
    Searching online, I see lots of people asking for features to have multiple levels of sub-tasks, and proper sub-task functionality (like FogBugz). But I don't know if it's planned in future versions, or if plugins exist to provide this functionality. Does anyone know?

    Read the article

  • Selecting records with specific month and year in SQL Server 2005

    - by John
    I want to list records with a particular month and year. The table name is 'Arrival' and 'date' is the field that stores the date that the record was added. This is to be done from a C# application. For example, if the user selects month as 'April' and year as '2009' in the application, it will list all the records that were added on April,2009. (I only need the query, hope I can figure out the rest :) )

    Read the article

  • ASP .NET Button event handlers do not fire on the first click, but on the second click after a PostB

    - by John
    Background: I am customizing an existing ASP .NET / C# application. It has it's own little "framework" and conventions for developers to follow when extending/customizing its functionality. I am currently extending some of it's administrative functionality, to which the framework provides a contract to enforce implementation of the GetAdministrationInterface() method, which returns System.Web.UI.Control. This method is called during the Page_Load() method of the page hosting the GUI interface. Problem: I have three buttons in my GUI, each of which have been assigned an Event Handler. My administration GUI loads up perfectly fine, but clicking any of the buttons doesn't do what I expect them to do. However, when I click them a second time, the buttons work. I placed breakpoints at the beginning of each event handler method and stepped through my code. On the first click, none of the event handlers were triggered. On the second click, they fired. Any ideas? Example of Button Definition (within GetAdministrationInterface) public override Control GetAdministrationInterface() { // more code... Button btn = new Button(); btn.Text = "Click Me!"; btn.Click += new EventHandler(Btn_Click); // more code... } Example of Event Handler Method Definition void Btn_Click(object sender, EventArgs e) { // Do Something } Page_Load Method that calls GetAdministrationInterface protected void Page_Load(object sender, System.EventArgs e) { if (!Page.IsAsync) { List<AdministrationInterface> interfaces = <DATABASE CALL>; foreach(AdministrationInteface ai in interfaces) { placeholderDiv.Controls.Add(ai.GetAdministrationInterface()); } } }

    Read the article

  • How can I return an object into PHP userspace from my extension?

    - by John Factorial
    I have a C++ object, Graph, which contains a property named cat of type Category. I'm exposing the Graph object to PHP in an extension I'm writing in C++. As long as the Graph's methods return primitives like boolean or long, I can use the Zend RETURN_*() macros (e.g. RETURN_TRUE(); or RETURN_LONG(123);. But how can I make Graph-getCategory(); return a Category object for the PHP code to manipulate? I'm following the tutorial over at http://devzone.zend.com/article/4486, and here's the Graph code I have so far: #include "php_getgraph.h" zend_object_handlers graph_object_handlers; struct graph_object { zend_object std; Graph *graph; }; zend_class_entry *graph_ce; #define PHP_CLASSNAME "WFGraph" ZEND_BEGIN_ARG_INFO_EX(php_graph_one_arg, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(php_graph_two_args, 0, 0, 2) ZEND_END_ARG_INFO() void graph_free_storage(void *object TSRMLS_DC) { graph_object *obj = (graph_object*)object; delete obj-graph; zend_hash_destroy(obj-std.properties); FREE_HASHTABLE(obj-std.properties); efree(obj); } zend_object_value graph_create_handler(zend_class_entry *type TSRMLS_DC) { zval *tmp; zend_object_value retval; graph_object *obj = (graph_object*)emalloc(sizeof(graph_object)); memset(obj, 0, sizeof(graph_object)); obj-std.ce = type; ALLOC_HASHTABLE(obj-std.properties); zend_hash_init(obj-std.properties, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(obj-std.properties, &type-default_properties, (copy_ctor_func_t)zval_add_ref, (void*)&tmp, sizeof(zval*)); retval.handle = zend_objects_store_put(obj, NULL, graph_free_storage, NULL TSRMLS_CC); retval.handlers = &graph_object_handlers; return retval; } PHP_METHOD(Graph, __construct) { char *perspectives; int perspectives_len; Graph *graph = NULL; zval *object = getThis(); if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &perspectives, &perspectives_len) == FAILURE) { RETURN_NULL(); } graph = new Graph(perspectives); graph_object *obj = (graph_object*)zend_object_store_get_object(object TSRMLS_CC); obj-graph = graph; } PHP_METHOD(Graph, hasCategory) { long perspectiveId; Graph *graph; graph_object *obj = (graph_object*)zend_object_store_get_object(getThis() TSRMLS_CC); graph = obj-graph; if (graph == NULL) { RETURN_NULL(); } if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &perspectiveId) == FAILURE) { RETURN_NULL(); } RETURN_BOOL(graph-hasCategory(perspectiveId)); } PHP_METHOD(Graph, getCategory) { // what to do here? RETURN_TRUE; } function_entry php_getgraph_functions[] = { PHP_ME(Graph,__construct,NULL,ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Graph,hasCategory,php_graph_one_arg,ZEND_ACC_PUBLIC) PHP_ME(Graph,getCategory,php_graph_one_arg,ZEND_ACC_PUBLIC) { NULL, NULL, NULL } }; PHP_MINIT_FUNCTION(getgraph) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, PHP_CLASSNAME, php_getgraph_functions); graph_ce = zend_register_internal_class(&ce TSRMLS_CC); graph_ce-create_object = graph_create_handler; memcpy(&graph_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); graph_object_handlers.clone_obj = NULL; return SUCCESS; } zend_module_entry getgraph_module_entry = { #if ZEND_MODULE_API_NO = 20010901 STANDARD_MODULE_HEADER, #endif PHP_GETGRAPH_EXTNAME, NULL, /* Functions */ PHP_MINIT(getgraph), NULL, /* MSHUTDOWN */ NULL, /* RINIT */ NULL, /* RSHUTDOWN */ NULL, /* MINFO */ #if ZEND_MODULE_API_NO = 20010901 PHP_GETGRAPH_EXTVER, #endif STANDARD_MODULE_PROPERTIES }; #ifdef COMPILE_DL_GETGRAPH extern "C" { ZEND_GET_MODULE(getgraph) } #endif

    Read the article

  • WCF + NserviceBus Names notation

    - by John
    Hi. I trying to create WCF via NserviceBus. Create contract: [ServiceContract] public interface INotifyBusService { [OperationContract(Action = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/Process", ReplyAction = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/ProcessResponse")] ResultType Notify(RequestMessage request); } The problem: When i create a clinet it can't handle this service because expected node with name "Process" in "http://tempuri.org/" namespace. if I do like that [OperationContract(Name = "Process", Action = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/Process", ReplyAction = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/ProcessResponse")] ResultType Notify(RequestMessage request); Everything works fine. Name = "Process" - it's a NServiceBus hardcode, like Enum return type in service method ?

    Read the article

< Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >