Search Results

Search found 3334 results on 134 pages for 'david e anderson'.

Page 64/134 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • How do I convert decimal numbers to binary in Perl?

    - by David
    I am trying to make a program that converts decimal numbers or text into binary numbers in perl. The program asks for user input of a character or string , and then prints out the result to the console. How do I do this? My code I have been working on is below, but i cannot seem to fix it. print "Enter a number to convert: "; chomp($decimal = <STDIN>); print "\nConverting $number to binary...\n"; $remainder = $decimal%2; while($decimal > 0) { $decimal/2; print $remainder; }

    Read the article

  • Debug an Eclipse plugin in a different language?

    - by david
    I'm trying to debug an Eclipse plug-in when it is running in another language (japanese). The problem I'm encountering is: I can't get the Eclipse debugger to run another Eclipse instance in another language. I've got all my strings externalized to resource bundles ... and, when the plug-in is installed in Eclipse on a machine that has it's default language set to Japanese, it runs OK ... but there are a few problems that I need to resolve. I've tried setting the Eclipse -nl parameter to ja_JP along with '-Duser.language=ja -Duser.country=JP' on the VM arguments, but every time Eclipse is launched, everything is in English. Any suggestions on how I can get the debugger to launch the Eclipse instance in Japanese?

    Read the article

  • Downloading & Viewing ePub Books

    - by david
    I have the following requirements for an iPad App and would like to know if it's possible to implement them: Download ePub books and view them in iPads iBooks reader Install the downloaded book in the devices itunes library, so that they are accessibly from the iBooks applications

    Read the article

  • Changing email of a contact in address book

    - by David
    Hey guys, I want to change the email of a contact in address book. my code is as follow. but somehow it doesnt work. do you know why? - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person { CFErrorRef anError = NULL; ABMultiValueRef email = ABMultiValueCreateMutable(kABMultiStringPropertyType); NSString *personEmail = [conversationHistory getReceiver]; ABRecordSetValue(person, kABPersonEmailProperty, email, &anError); CFRelease(email); [self dismissModalViewControllerAnimated:YES]; return NO; }

    Read the article

  • using text and ntext SQL Datatypes in RPG

    - by David Stratton
    I'll preface this with saying that I'm a .NET developer, and am NOT an RPG developer. I'm working with one of our RPG developers to come up with a solution, so any suggestions you provide will get passed to him. We have a scenario where we want our iSeries to read from a SQL Server database. One of the columns is a TEXT column. IN RPG, there is no equivalent data type to use for this. We've gone back and forth on this, and our current plan is to change course, and have our SQL Server write out a text file, which the iSeries can pick up and parse. This is, however, a last resort option, as the data in the file is sensitive, and we'd like to avoid the additional security overhead. We've already got the SQL Server locked down as tight as possible (one user only has read access to this, and that user is an iSeries user.) We don't want to have to worry about transferring files back and forth. However, at this point, we see no other option. We have no in-house Java developers, and need to do this in RPG. So I'm wondering if there are any RPG developers out there who have faced this situation and have any advice.

    Read the article

  • How to convert long timestamp to UTC timestamp on Objective C

    - by David
    Hey I had a iphone app, the code has a method to retrieve current time stamp from iphone and upload to server. Here is my code: long long timestampMillis = (long long)([[NSDate date] timeIntervalSince1970] * 1000); However, one of customer use the app in Japan sent data shown on server is tomorrow time. How can I retrieve UTC timestamp? Thanks advanced

    Read the article

  • WPF Style - value based on another control's property

    - by David Ward
    Is it possible to set the BorderBrush property in a style, to the value of the BorderBrush property of an instance of another control? Something like: <Style x:Key="{x:Type Controls:TimePicker}" TargetType="Controls:TimePicker"> <Setter Property="BorderBrush" Value="[ElementName=txtText Property=BorderBrush]"/> </Style> The reason for this is that I'm using Infragistics controls that have a "Theme" that can be changed and I want my custom control to change border style at the same time.

    Read the article

  • How does the recursion here work?

    - by David
    code 1: public static int fibonacci (int n){ if (n == 0 || n == 1) { return 1; } else { return fibonacci (n-1) + fibonacci (n-2); } } how can you use fibonacci if you haven't gotten done explaining what it is yet? I've been able to understand using recursion in other cases like this: code two: class two { public static void two (int n) { if (n>0) { System.out.println (n) ; two (n-1) ; } else { return ; } } public static void main (String[] arg) { two (12) ; } } In the case of code 2 though n will eventualy reach a point at which it doesnt satisfy n0 and the method will stop calling itself recursivly. in the case of code 2 though i don't see how it would be able to get itself from 1 if n=1 was the starting point to 2 and 3 and 5 and so on. Also i don't see how the line `return fibonacci (n-1) + fibonacci (n-2) would work since fibbonacci n-2 has to contain in some sense fibonacci n-1 in order to wrok but it isn't there yet. I know my question is worded poorly but looking at this is making my mind explode. the book i'm looking at says it will work. how does it work? `

    Read the article

  • Why don't Direct2D and DirectWrite use traditional COM objects?

    - by David Brown
    I'm toying with a little 2D game engine in C# and decided to use Direct2D and DirectWrite for rendering. I know there's the Windows API Code Pack and SlimDX, but I'd really like to dig in and write an interface from scratch. I'm trying to do it without Managed C++, but Direct2D and DirectWrite don't appear to use traditional COM objects. They define interfaces that derive from IUnknown, but there appears to be no way to actually use them from C# with COM interop. There are IIDs in d2d1.h, but no CLSID. Of course, I'm really new to COM interop, so perhaps I'm just missing something. Can someone shed some light on this situation?

    Read the article

  • How to access Actionscript from Javascript in Adobe AIR

    - by David Robinson
    I have an AIR application written in html/javascript and I want to use the Actionscript print functions but I have no experience in Actionscript for AIR. Where do I put the Actionscript code ? Does it go into an mxml file or does it need to be compiled into a Flash application. Where do I put it and how do I include it into the html document ? Finally, how do I call the AS function from Javascript ? =====update===== I know I have to compile either an .mxml or .as file into .swf using mxmlc and I have the following in my .as file: package { import mx.controls.Alert; public class HelloWorld { public function HelloWorld():void { trace("Hello, world!"); } } } Or alternately, this in a .mxml file: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ import mx.controls.Alert; public function HelloWorld():void { Alert.show("hello world!"); trace("Hello, world!"); } ]]> </mx:Script> </mx:Application> This compiles OK, but when I include it in a html file with: <script src="actionscript.swf" type="application/x-shockwave-flash"></script> I get the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::FocusManager/activate() at mx.managers::SystemManager/activateForm() at mx.managers::SystemManager/activate() at mx.core::Application/initManagers() at mx.core::Application/initialize() at actionscript/initialize() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded() at mx.managers::SystemManager/initializeTopLevelWindow() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler() at mx.managers::SystemManager/docFrameListener() Any ideas what that means ?

    Read the article

  • Fluent NHibernate OptimisticLock.None() causes "The string 'none' is not a valid Boolean value."

    - by David Thomas Garcia
    I'm using the following mapping: public class LoadMap : IAutoMappingOverride<Load> { public void Override(AutoMapping<Load> mapping) { mapping.HasMany(x => x.Bids).OptimisticLock.None(); mapping.Version(x => x.Version); } } But when I try to create the session I get the following exception: [FormatException: The string 'none' is not a valid Boolean value.] [XmlSchemaValidationException: The 'optimistic-lock' attribute is invalid - The value 'none' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:boolean' - The string 'none' is not a valid Boolean value.] I'm using NHibernate 2.1.2.4000 and I was using Fluent NHibernate 1.0RTM, but tried the latest build 636 just to be sure this isn't something that was fixed recently or something. As a side note, in case I'm doing this all wrong, I would like to be able to make changes to the .Bids list without incrementing Version. I saw an example on Ayende's blog that did what I wanted with properties.

    Read the article

  • NSFileManager - Copying Files at Startup

    - by David Schiefer
    Hi, I need to copy a few sample files from my app's resource folder and place them in my app's document folder. I came up with the attached code, it compiles fine but it doesn't work. All the directories I refer to do exist. I'm not quite sure what I am doing wrong, could someone point me in the right direction please? NSFileManager*manager = [NSFileManager defaultManager]; NSString*dirToCopyTo = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; NSString*path = [[NSBundle mainBundle] resourcePath]; NSString*dirToCopyFrom = [path stringByAppendingPathComponent:@"Samples"]; NSError*error; NSArray*files = [manager contentsOfDirectoryAtPath:dirToCopyTo error:nil]; for (NSString *file in files) { [manager copyItemAtPath:[dirToCopyFrom stringByAppendingPathComponent:file] toPath:dirToCopyTo error:&error]; if (error) { NSLog(@"%@",[error localizedDescription]); } }

    Read the article

  • Data Driven MSTest: DataRow is always null

    - by David Back
    I am having a problem using Visual Studio data driven testing. I have tried to deconstruct this to the simplest example. I am using Visual Studio 2012. I create a new unit test project. I am referencing system data. My code looks like this: namespace UnitTestProject1 { [TestClass] public class UnitTest1 { [DeploymentItem(@"OrderService.csv")] [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "OrderService.csv", "OrderService#csv", DataAccessMethod.Sequential)] [TestMethod] public void TestMethod1() { try { Debug.WriteLine(TestContext.DataRow["ID"]); } catch (Exception ex) { Assert.Fail(); } } public TestContext TestContext { get; set; } } } I have a very small csv file that I have set the Build Options to to 'Content' and 'Copy Always'. I have added a .testsettings file to the solution, and set enable deployment, and added the csv file. I have tried this with and without |DataDirectory|, and with/without a full path specified (the same path that I get with Environment.CurrentDirectory). I've tried variations of "../" and "../../" just in case. Right now the csv is at the project root level, same as the .cs test code file. I have tried variations with xml as well as csv. TestContext is not null, but DataRow always is. I have not gotten this to work despite a lot of fiddling with it. I'm not sure what I'm doing wrong. Does mstest create a log anywhere that would tell me if it is failing to find the csv file, or what specific error might be causing DataRow to fail to populate? I have tried the following csv files: ID 1 2 3 4 and ID, Whatever 1,0 2,1 3,2 4,3 So far, no dice.

    Read the article

  • INNER JOIN syntax for mySQL using phpmyadmin

    - by David van Dugteren
    SELECT Question.userid, user.uid FROM `question` WHERE NOT `userid`=2 LIMIT 0, 60 INNER JOIN `user` ON `question`.userid=`user`.uid ORDER BY `question`.userid returns Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN User ON question.userid=user.uid ORDER BY question.userid' at line 5 Can't for the life of me figure out what I'm doing wrong here.

    Read the article

  • Powershell: Select-Object with additional calculated difference value

    - by David.Chu.ca
    Let me explain my question. I have a daily report about one PC's free space as in text file (sp.txt) like: DateTime FreeSpace(MB) ----- ------------- 03/01/2010 100.43 DateTime FreeSpace(MB) ----- ------------- 03/02/2010 98.31 .... Then I need to use this file as input to generate a report with difference of free space between dates: DateTime FreeSpace(MB) Change ----- ------------- ------ 03/01/2010 100.43 03/02/2010 98.31 2.12 .... Here are some codes I have to get above result without the additional "Change" calculation: Get-Content "C:\report\sp.txt" ` | where {$_.trim().length -gt 0 -and -not ($_ -like "Date*") -and -not ($_ -like "---*")} ` | Select-Object @{Name='DateTime'; expression={[DateTime]::Parse($_.SubString(0, 10).Trim())}}, ` @{Name='FreeSpace(MB)'; expression={$_.SubString(12, 12).Trim()}}, ` | Sort-Object DateTime ` | Select-Object DateTime, 'FreeSpace(MB)' |ft -AutoSize # how to add additional column Change to this Select-Object? My understanding is that Select-Object will return a collection of objects. Here I create this collection from an input text file(parse each line into parts: datetime and freespace(MB)). In order to calculate the difference between dates, I guess that I need to add additional calculated value to the result of the last Select-Object, or pipe the result to another Select-Object with the calculation as additional property or column. In order to do it, I need to get the previous row's FreeSpace value. Not sure if it is possible and how?

    Read the article

  • CSS IE6 float right

    - by David
    How come when I have a div style at display: block; float: right, in IE6 the div still goes under the text, and not in the middle of it just floated to the right. It works in all other browsers, including IE7+. I need to have display block because if i do display inline, then the menu inside the div is all messed up. .content { display: block; } .float { width: 150px; display: block; float: right; } .nothing { display: inline; } the float class is not to the right of nothing class, its under it in IE6, know a fix?

    Read the article

  • Microsoft Sync Framework with Mutliple Client and Server Database

    - by David Osborn
    I'm working on changes to an application to have a local data store instead of connecting directly to the database server. The client app will then sync changes both ways between the server database and its local data store. I'm trying to implement the syncing solution using Microsoft Sync Framework. To be clear there is no server application, only the database server, but there are multiple clients. I have started implementing two classes that implement FullEnumerationSimpleSyncProvider, one called LocalSyncProvider and one called ServerSyncProvider. The LocalSyncProvider knows how to enumerate, insert, update, delete items from the local data store, and the ServerSyncProvider knows how to enumerate, insert, update, delete items from the database server. They each use the provided SqlMetadataStore and store the two metadata stores (one for the local and one for the server) on the local drive of the client. This means that each client will have its own metadata store for its local data store and its own metadata store for the server database. Is this actually going to work, does there need to exists only one server metadata store, or do I need to be using the Sync Framework differently?

    Read the article

  • Error in WCF service - Silverlight client communication.

    - by David
    I created a WCF service and I planned to consume this in a Silverlight application. So I created the WCF service in the Website host project. The service is a simple WCF service that only returns a number - something like a Hello World WCF-SL. So after adding a service reference in the silverlight client project to the Service URI, after calling async the service method (by using the generated proxy), I get the following exception in the callback method: An error occurred while trying to make a request to URI 'http://localhost:4566/SLService.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. I only created a HelloWorld WCF service with nothing else but a simple method that returns a dumb number and it's hosted on my locally. Must I have clientaccesspolicy.xml or crossdomain.xml? I acces my service locally. Every time I create a new simple/dumb WCF-SL solution, I get this error. I use VS2010 and Silverlight 4. I cannot get a simple/dumb WCF-SL solution working locally. Is there something wrong with the configuration? On another machine in the same network, it does work properly, so I assume something is misconfigured. Any thoughts?

    Read the article

  • concatenate rows of Clob with plsql

    - by david K
    Hi, late considere i conider if got a table who got an Id and a clob content like: create table v_EXAMPLE_L ( nip number, xmlcontent clob ); we insert our data: Insert into V_EXAMPLE_L (NIP,XMLCONTENT) values (17852,'delta548484646846484'); Insert into V_EXAMPLE_L (NIP,XMLCONTENT) values (17852,'omega545648468484'); Insert into V_EXAMPLE_L (NIP,XMLCONTENT) values (17852, 'gamma54564846qsdqsdqsdqsd8484'); i'm trying do do a function that concatenate the rows of the clob that gone be the result of a select , i mean without having to give multiple parameter about the name of table or such , i should only give here the column that contain the clobs , and she should handle the rest!. CREATE OR REPLACE function assemble_clob(q varchar2) return clob is v_clob clob; tmp_lob clob; hold VARCHAR2(4000); --cursor c2 is select xmlcontent from V_EXAMPLE_L where id=17852 cur sys_refcursor; begin OPEN cur FOR q; LOOP FETCH cur INTO tmp_lob; EXIT WHEN cur%NOTFOUND; --v_clob := v_clob || XMLTYPE.getClobVal(tmp_lob.xmlcontent); v_clob := v_clob || tmp_lob; END LOOP; return (v_clob); --return (dbms_xmlquery.getXml( dbms_xmlquery.set_context("Select 1 from dual")) ) end assemble_clob; the function is broken ... (if anybody could give me a help, thanks a lot, and i'm noob in sql so ....). and thanks

    Read the article

  • Databinding a ListBox with SelectionMode = Multiple

    - by David Veeneman
    I have a WPF ListBox that I would like to Enable multiple selection in the ListBox, and Databind the ListBox to my view model. These two requirements appear to be incompatible. My view model has an ObservableCollection<T> property to bind to this ListBox; I set up a binding in XAML from the property to the ListBox.SelectedItems property. When I compiled, I got an error saying that the SelectedItems property was read only and could not be set from XAML. Am I binding to the wrong control property? Is there a way to bind a multiple-selection ListBox in XAML to a view model collection property? Thanks for your help.

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >