Search Results

Search found 1947 results on 78 pages for 'ole martin eide'.

Page 48/78 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • How does a virtual machine work?

    - by Martin
    I've been looking into how programming languages work, and some of them have a so-called virtual machines. I understand that this is some form of emulation of the programming language within another programming language, and that it works like how a compiled language would be executed, with a stack. Did I get that right? With the proviso that I did, what bamboozles me is that many non-compiled languages allow variables with "liberal" type systems. In Python for example, I can write this: x = "Hello world!" x = 2**1000 Strings and big integers are completely unrelated and occupy different amounts of space in memory, so how can this code even be represented in a stack-based environment? What exactly happens here? Is x pointed to a new place on the stack and the old string data left unreferenced? Do these languages not use a stack? If not, how do they represent variables internally?

    Read the article

  • Display arbitrary size 2d image in opengl

    - by Martin Beckett
    I need to display 2d images in opengl using textures. The image dimensions are not necessarily powers of 2. I thought of creating a larger texture and restricting the display to the part I was using but the image data will be shared with openCV so I don't want to copy data a pixel at a time into a larger texture. EDIT - it turns out that even the simplest Intel on board graphics under Windows supports none-power-of-2 textures.

    Read the article

  • How do I get MSDeploy to skip specific folders and file types in folders as CCNet task

    - by Simon Martin
    I want MSDeploy to skip specific folders and file types within other folders when using sync. Currently I'm using CCNet to call MSDeploy with the sync verb to take websites from a build to a staging server. Because there are files on the destination that are created by the application / user uploaded files etc, I need to exclude specific folders from being deleted on the destination. Also there are manifest files created by the site that need to remain on the destination. At the moment I've used -enableRule:DoNotDeleteRule but that leaves stale files on the destination. <exec> <executable>$(MsDeploy)</executable> <baseDirectory>$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\</baseDirectory> <buildArgs>-verb:sync -source:iisApp="$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\" -dest:iisApp="$(website)/$(websiteFolder)" -enableRule:DoNotDeleteRule</buildArgs> <buildTimeoutSeconds>600</buildTimeoutSeconds> <successExitCodes>0,1,2</successExitCodes> </exec> I have tried to use the skip operation but run into problems. Initially I dropped the DoNotDeleteRule and replaced it with (multiple) skip <exec> <executable>$(MsDeploy)</executable> <baseDirectory>$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\</baseDirectory> <buildArgs>-verb:sync -source:iisApp="$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\" -dest:iisApp="$(website)/$(websiteFolder)" -skip:objectName=dirPath,absolutePath="assets" -skip:objectName=dirPath,absolutePath="survey" -skip:objectName=dirPath,absolutePath="completion/custom/complete*.aspx" -skip:objectName=dirPath,absolutePath="completion/custom/surveylist*.manifest" -skip:objectName=dirPath,absolutePath="content/scorecardsupport" -skip:objectName=dirPath,absolutePath="Desktop/docs" -skip:objectName=dirPath,absolutePath="_TempImageFiles"</buildArgs> <buildTimeoutSeconds>600</buildTimeoutSeconds> <successExitCodes>0,1,2</successExitCodes> </exec> But this results in the following: Error: Source (iisApp) and destination (contentPath) are not compatible for the given operation. Error count: 1. So I changed from iisApp to contentPath and instead of dirPath,absolutePath just Directory like this: <exec> <executable>$(MsDeploy)</executable> <baseDirectory>$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\</baseDirectory> <buildArgs>-verb:sync -source:contentPath="$(ProjectsDirectory)$(projectName)$(ProjectsWorkingDirectory)\Website\" -dest:contentPath="$(website)/$(websiteFolder)" -skip:Directory="assets" -skip:Directory="survey" -skip:Directory="content/scorecardsupport" -skip:Directory="Desktop/docs" -skip:Directory="_TempImageFiles"</buildArgs> <buildTimeoutSeconds>600</buildTimeoutSeconds> <successExitCodes>0,1,2</successExitCodes> </exec> and this gives me an error: Illegal characters in path: < buildresults Info: Adding MSDeploy.contentPath (MSDeploy.contentPath). Info: Adding contentPath (C:\WWWRoot\MySite -skip:Directory=assets -skip:Directory=survey -skip:Directory=content/scorecardsupport -skip:Directory=Desktop/docs -skip:Directory=_TempImageFiles). Info: Adding dirPath (C:\WWWRoot\MySite -skip:Directory=assets -skip:Directory=survey -skip:Directory=content/scorecardsupport -skip:Directory=Desktop/docs -skip:Directory=_TempImageFiles). < /buildresults < buildresults Error: Illegal characters in path. Error count: 1. < /buildresults So I need to know how to configure this task so the folders referenced do not have their contents deleted in a sync and that that *.manifest and *.aspx files in the completion/custom folders are also skipped.

    Read the article

  • Can only "agents" build and submit Applications to Apple?

    - by Martin
    I'm afraid I know the answer to this but I'll ask on the longshot chance that I'm wrong: I've been doing some freelance work creating an iPhone application for a company. They've created their own developer account and added me as an team member with "admin" rights. That seems to be the highest assignable rights (with the only higher level being "agent" and belonging only to whoever signed up for the account). Yet, I don't have an option under the provisioning portal to create a distribution certificate or profile. Is there any way to create these myself without having to ask my client for their primary login? They're not particulary tech savy so it would be difficult to walk them through the process to create the necessary certificates (and would require me giving them a certificate request from my computer, etc. etc.). But it seems like there should be some way to create a distribution build without "agent" rights, right? Could Apple seriously expect only one person from a company to do all the building and uploading of apps to the store?

    Read the article

  • Best approach, Dynamic OpenXML in T-SQL

    - by Martin Ongtangco
    hello, i'm storing XML values to an entry in my database. Originally, i extract the xml datatype to my business logic then fill the XML data into a DataSet. I want to improve this process by loading the XML right into the T-SQL. Instead of getting the xml as string then converting it on the BL. My issue is this: each xml entry is dynamic, meaning it can be any column created by the user. I tried using this approach, but it's giving me an error: CREATE PROCEDURE spXMLtoDataSet @id uniqueidentifier, @columns varchar(max) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @name varchar(300); DECLARE @i int; DECLARE @xmlData xml; (SELECT @xmlData = data, @name = name FROM XmlTABLES WHERE (tableID = ISNULL(@id, tableID))); EXEC sp_xml_preparedocument @i OUTPUT, @xmlData DECLARE @tag varchar(1000); SET @tag = '/NewDataSet/' + @name; DECLARE @statement varchar(max) SET @statement = 'SELECT * FROM OpenXML(@i, @tag, 2) WITH (' + @columns + ')'; EXEC (@statement); EXEC sp_xml_removedocument @i END where i pass a dynamically written @columns. For example: spXMLtoDataSet 'bda32dd7-0439-4f97-bc96-50cdacbb1518', 'ID int, TypeOfAccident int, Major bit, Number_of_Persons int, Notes varchar(max)' but it kept on throwing me this exception: Msg 137, Level 15, State 2, Line 1 Must declare the scalar variable "@i". Msg 319, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

    Read the article

  • A queue in C using structs and dynamic memory allocation (linked list)

    - by Martin Pugh
    I am tasked with making a queue data structure in C, as a linked list. Our lecturer gave us a large amount of code to implement a stack, but we have to adapt it to create a queue. The code our lecturer gave us ends up not compiling and segfaulting at the exact same point as the code I wrote for the queue. I'm very new to structs, malloc and C in general, so there could be something painfully obvious I've overlooked. Here is the code I am using: #include <stdio.h> #include <stdlib.h> struct node{ int data; //contains the actual data struct node *prev; //pointer to previous node (Closer to front) struct node *next; //pointer to next node (Closer to back) }; typedef struct node *Nodepointer; struct queue{ Nodepointer front; Nodepointer back; }; typedef struct queue *Queuepointer; main(){ Queuepointer myqueue; //create a queue called myqueue init(myqueue); //initialise the queue Nodepointer new = (Nodepointer)malloc(sizeof(struct node)); myqueue->front = new; } int init(Queuepointer q){ q = (Queuepointer)malloc(sizeof(struct queue)); q->front = NULL; q->back = NULL; } The idea is that the queue struct 'contains' the first and last nodes in a queue, and when a node is created, myqueue is updated. However, I cannot even get to that part (pop and push are written but omitted for brevity). The code is segfaulting at the line myqueue->front = new; with the following gdb output: Program received signal SIGSEGV, Segmentation fault. 0x08048401 in main () at queue.c:27 27 myqueue->front = new; Any idea what I'm doing wrong?

    Read the article

  • How is thread synchronization implemented, at the assembly language level?

    - by Martin
    While I'm familiar with concurrent programming concepts such as mutexes and semaphores, I have never understood how they are implemented at the assembly language level. I imagine there being a set of memory "flags" saying: lock A is held by thread 1 lock B is held by thread 3 lock C is not held by any thread etc But how is access to these flags synchronized between threads? Something like this naive example would only create a race condition: mov edx, [myThreadId] wait: cmp [lock], 0 jne wait mov [lock], edx ; I wanted an exclusive lock but the above ; three instructions are not an atomic operation :(

    Read the article

  • Java resource as file

    - by Martin Riedel
    Is there a way in Java to construct a File instance on a resource retrieved from a jar through the classloader? My application uses some files from the jar (default) or from a filesystem directory specified at runtime (user input). I'm looking for a consistent way of a) loading these files as a stream b) listing the files in the user-defined directory or the directory in the jar respectively Edit: Apparently, the ideal approach would be to stay away from java.io.File altogether. Is there a way to load a directory from the classpath and list its contents (files/entities contained in it)?

    Read the article

  • How to log communication of a WebService running on IIS 6.0?

    - by Martin Kirsche
    I'm running an ASP.NET WebService on IIS 6.0 that shows a lot of HTTP 500 (probably just exceptions from the WebService) inside the log at %systemroot%\System32\LogFiles\W3SVC1 on a customers site. Is it possible to log the content of those HTTP responses and there requests without modifying the WebService using IIS or a plug-in for IIS? I thought of using Wireshark or Fiddler to sniff on the HTTP traffic but I would prefer to just turn on an option inside IIS to make him log the communication (this should not be to hard since it is logging the requested URLs anyway)

    Read the article

  • asp.net 4.0 web forms routing - default/wildcard route

    - by Martin Robins
    I there a simple way when using ASP.NET 4.0 routing with Web Forms to produce a route that will act as some kind of wildcard? It seems to me that within WebForms, you have to specify a route for every page - I am looking for some kind of generic route that can be used where nothing specific is required, perhaps mapping directly from path to path so... http://somedomain.com/folder1/folder2/page would possibly map to folder1/folder2/page.aspx Any suggestions? Thanks

    Read the article

  • Getting config element from ConfigurationElementCollection

    - by Martin
    I have (hopefully) setup ConfigurationElementCollection of my own design with emails as keys. Now what? Hard to find actually on the web. How do I: iterate through it? See if a specific element exists? get a specific element? ...given: YourConfigElement config = ConfigurationManager.GetSection("YourSectionName") as YourConfigElement ; Partial answer Does this work? no, sadly. foreach (X x in config.XCollection.AsQueryable()) ...

    Read the article

  • Are there old versions of Windows UX guidelines somewhere?

    - by Camilo Martin
    Since I've read Windows User Experience Interaction Guidelines (there's a PDF download avaliable) I've found it to be admirably self-deprecating, humbly pointing out their own horrible UI practices long scolded by Joel Spolsky. I'd like to know, however, what they had in mind while they made those mistakes. Is this (terrific) UX Guidelines document something new, or were there previous issues of such? If so, where can I find them? My prayers to Google yielded no leniency.

    Read the article

  • How do I copy object in Qt?

    - by Martin
    I'm using Qt and have some real basic problems. I have created my own widget MyTest that have a variable obj. I need to set this variable obj from an object outside of the widget so that the variable is copied not just a pointer to another object. I get an error message and can't figure out how to do this basic stuff. This is the code I'm using: MyTest.h: class MyTest : public QWidget { Q_OBJECT public: void setObj(QObject &inobj); QObject obj; .... } MyTest.cpp: void MyTest::setObj(QObject &inobj) { obj = inobj; //HERE I get the error message: "illegal access from 'QObject' to protected/private member 'QObject::operator=(const QObject &)'" } main.cpp: int main(int argc, char *argv[]) { QApplication a(argc, argv); QObject *ob = new QObject(); MyTest w; w.setObj(*ob); } Thanks for your help!

    Read the article

  • Memory management in Qt?

    - by Martin
    I'm quite new to Qt and am wondering on some basic stuff with memory management and the life of objects. When do I need to delete / destroy my objects? Is any of this handled automatically? In the example below, which of the objects I create do I need to delete? What happens to the instance variable myOtherClass when myClass is destroyed? What happens if I don't delete / destroy my objects at all, will that be a problem to memory? in MyClass.h: class MyClass { public: MyClass(); ~MyClass(); MyOtherClass *myOtherClass; }; in MyClass.cpp: MyClass::MyClass() { myOtherClass = new MyOtherClass(); MyOtherClass myOtherClass2; QString myString = "Hello"; } As you can see this is quite newbie-easy stuff but where can I learn about this in an easy way? Thanks really much

    Read the article

  • Using Rx to synchronize asynchronous events

    - by Martin Liversage
    I want to put Reactive Extensions for .NET (Rx) to good use and would like to get some input on doing some basic tasks. To illustrate what I'm trying to do I have a contrived example where I have an external component with asyncronous events: class Component { public void BeginStart() { ... } public event EventHandler Started; } The component is started by calling BeginStart(). This method returns immediately, and later, when the component has completed startup, the Started event fires. I want to create a synchronous start method by wrapping the component and wait until the Started event is fired. This is what I've come up with so far: class ComponentWrapper { readonly Component component = new Component(); void StartComponent() { var componentStarted = Observable.FromEvent<EventArgs>(this.component, "Started"); using (var startedEvent = new ManualResetEvent(false)) using (componentStarted.Take(1).Subscribe(e => { startedEvent.Set(); })) { this.componenet.BeginStart(); startedEvent.WaitOne(); } } } I would like to get rid of the ManualResetEvent, and I expect that Rx has a solution. But how?

    Read the article

  • Reduce EBS volume

    - by Martin
    I know about increasing, but is there a way reduce the size of an EBS volume? Like I've put effort into my AMI but soon realized it's way to big for my needs.

    Read the article

  • Problem with entityForName & ManagedObjectContext when extending tutorial material

    - by Martin KS
    Afternoon all, I tried to add a second data entity to the persistent store in the (locations) coredata tutorial code, and then access this in a new view. I think that I've followed the tutorial, and checked that I'm doing a clean build etc, but can't see what to change to prevent it crashing. I'm afraid I'm at my wits end with this one, and can't seem to find the step that I've missed. I've pasted the header and code files below, please let me know if I need to share any more of the code. The crash seems to happen on the line: NSEntityDescription *entity = [NSEntityDescription entityForName:@"Album" inManagedObjectContext:[self managedObjectContext]]; There is one other line in the code that refers to galleryviewcontroller at the moment, and that's in the main application delegate: galleryViewController.managedObjectContext = [self managedObjectContext]; GalleryViewController.h #import <UIKit/UIKit.h> @interface GalleryViewController : UIViewController { NSManagedObjectContext *managedObjectContext; int rowNumber; IBOutlet UILabel *lblMessage; UIBarButtonItem *addButton; NSMutableArray *imagesArray; } @property (readwrite) int rowNumber; @property (nonatomic,retain) UILabel *lblMessage; @property (nonatomic,retain) NSMutableArray *imagesArray; @property (nonatomic, retain) NSManagedObjectContext *managedObjectContext; @property (nonatomic, retain) UIBarButtonItem *addButton; -(void)updateRowNumber:(int)theIndex; -(void)addImage; @end GalleryViewController.m #import "RootViewController.h" #import "LocationsAppDelegate.h" #import "Album.h" #import "GalleryViewController.h" #import "Image.h" @implementation GalleryViewController @synthesize lblMessage,rowNumber,addButton,managedObjectContext; @synthesize imagesArray; /* // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { // Custom initialization } return self; } */ -(void)updateRowNumber:(int)theIndex{ rowNumber=theIndex; LocationsAppDelegate *mainDelegate =(LocationsAppDelegate *)[[UIApplication sharedApplication] delegate]; Album *anAlbum = [mainDelegate.albumsArray objectAtIndex:rowNumber]; lblMessage.text = anAlbum.uniqueAlbumIdentifier; } // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addImage)]; addButton.enabled = YES; self.navigationItem.rightBarButtonItem = addButton; /* Found this in another answer, adding it to the code didn't help. if (managedObjectContext == nil) { managedObjectContext = [[[UIApplication sharedApplication] delegate] managedObjectContext]; } */ NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Album" inManagedObjectContext:[self managedObjectContext]]; [request setEntity:entity]; // Order the albums by creation date, most recent first. NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"imagePath" ascending:NO]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [request setSortDescriptors:sortDescriptors]; [sortDescriptor release]; [sortDescriptors release]; // Execute the fetch -- create a mutable copy of the result. NSError *error = nil; NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy]; if (mutableFetchResults == nil) { // Handle the error. } [self setImagesArray:mutableFetchResults]; int a = 5; int b = 10; for( int i=0; i<[imagesArray count]; i++ ) { if( a == 325 ) { a = 5; b += 70; } UIImageView *any = [[UIImageView alloc] initWithFrame:CGRectMake(a,b,70,60)]; any.image = [imagesArray objectAtIndex:i]; any.tag = i; [self.view addSubview:any]; [any release]; a += 80; } } -(void)addImage{ NSString *msg = [NSString stringWithFormat:@"%i",rowNumber]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Add image to" message:msg delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil]; [alert show]; [alert release]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { [super viewDidUnload]; } - (void)dealloc { [lblMessage release]; [managedObjectContext release]; [super dealloc]; } @end

    Read the article

  • Using Windows media foundation

    - by Martin Beckett
    Ok so my new gig is high performance video (think Google streetview but movies) - the hard work is all embedded capture and image processing but: I was looking at the new MS video offerings to display content = Windows Media Foundation. Is anyone actually using this ? There are no books on the topic. The only documentation is a developer team blog with a single entry 9 months old. I thought we had got past having to learn an MS api by spying on the com control messages! Is it just another wrapper around the same old activeX control?

    Read the article

  • LINQ: Dot Notation vs Query Expression

    - by Martín Marconcini
    I am beginning to use LINQ in general (so far toXML and toSQL). I've seen that sometimes there are two or more ways to achieve the same results. Take this simple example, as far as I understand both return exactly the same thing: SomeDataContext dc = new SomeDataContext(); var queue = from q in dc.SomeTable where q.SomeDate <= DateTime.Now && q.Locked != true orderby (q.Priority, q.TimeCreated) select q; var queue2 = dc.SomeTable .Where( q => q.SomeDate <= DateTime.Now && q.Locked != true ) .OrderBy(q => q.Priority) .ThenBy(q => q.TimeCreated); Besides any mistake I may have made in the syntax or a missing parameter or difference, the idea is that there are two ways to express the same thing; I understand that the first method has some limitations and that the "dot notation" is more complete, but besides that, are there any other advantages?

    Read the article

  • thinking about moving to Trac

    - by Martin
    We're starting development and are at a point where we need a bug tracking site. Our code is in SVN and we're thinking of using Bugzilla, but setup is tricky. I'm considering going for Trac instead. From what I understand, Trac would need to be on the same machine as SVN. I'm really having a hard time parsing through the Trac documentation. What kind of things should I look for when I'll be migrating?

    Read the article

  • Horizontal menu in WP default theme

    - by Martin
    I'm setting up a simple webpage using Wordpress. You can watch it at www.unistore.se. My question is: How can I include a horizontal menu just below the header? I would like to be able to create new links in the menu with the "New page"-function in the wordpress admin. Thanks!

    Read the article

  • Analyzing Windows crash dumps generated on XP/32 machines with Win7/64 ?

    - by Martin
    We have a problem with analyzing our Windows crash-dumps that were created on customer Windows XP/32 boxes on our development machines. Many of our development machines are now Win7/64 boxes, but it appears that the crash-dumps generated under Windows XP cannot full resolve their binary dependency, thereby leading to warnings when displaying the call stacks in Visual Studio (2005). For example, the msvcr80.dll cannot be resolved when loaded from a Win7 machine when the dump was generated on Windows XP: On XP, the WinSxS path appears to be C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\msvcr80.dll -- on Win7, the WinSxS path to the same DLL version seems to be: x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d08d7da0442a985d (I got this info from a forum thread on codeguru that link to an msdn article.) Visual Studio (2005) can now no longer correctly resolve the binaries for the crash-dump. How can I get Visual Studio to resolve all the correct binaries for my dump file? Note: I have already correctly set up the symbol server. The public symbols for most system DLLs (kernel32.dll, etc) and our symbols of our own DLLs are correctly loaded. It is just that the symbols of DLLs that reside in the WinSxS folder are not loaded, because it appears that Vista/7 uses a different path scheme for these DLLs than XP does and therefore Visual Studio cannot find the dll (not the pdb) on the local dev machine and so cannot load the corresponding symbols for the dump file.

    Read the article

  • Do not show partial items in a WPF listbox

    - by David Martin
    I've tried Google and I've tried Bing to no avail. Does anyone here have an idea on how to prevent partial items from appearing in a listbox in WPF? In case that does not make sense here is an example: Listbox is 200 pixels tall - each item is 35 pixels tall. That means I can show 5.7 items. 7/10 of an item is undesirable. I'd like to limit it to showing only 5 items. The user could then scroll to see the additional items. Should I A) try to dynamically size the listbox or ScrollViewer ViewPort so that it fits perfectly? Or B) implement a custom panel that would not arrange a child whose desired height is more than the remaining vertical space? Any thoughts would be greatly appreciated. Last note: If anyone knows of a 3rd party control (listbox or grid) that does this I would be interested in that as well.

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >