Daily Archives

Articles indexed Thursday March 25 2010

Page 1/127 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Pasting formatted Excel range into Outlook message

    - by Steph
    Hi everyone, I am using Office 2007 and I would like to use VBA to paste a range of formatted Excel cells into an Outlook message and then mail the message. In the following code (that I lifted from various sources), it runs without error and then sends an empty message... the paste does not work. Can anyone see the problem and better yet, help with a solution? Thanks, -Steph Sub SendMessage(SubjectText As String, Importance As OlImportance) Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient Dim objOutlookAttach As Outlook.Attachment Dim iAddr As Integer, Col As Integer, SendLink As Boolean 'Dim Doc As Word.Document, wdRn As Word.Range Dim Doc As Object, wdRn As Object ' Create the Outlook session. Set objOutlook = CreateObject("Outlook.Application") ' Create the message. Set objOutlookMsg = objOutlook.CreateItem(olMailItem) Set Doc = objOutlookMsg.GetInspector.WordEditor 'Set Doc = objOutlookMsg.ActiveInspector.WordEditor Set wdRn = Doc.Range wdRn.Paste Set objOutlookRecip = objOutlookMsg.Recipients.Add("[email protected]") objOutlookRecip.Type = 1 objOutlookMsg.Subject = SubjectText objOutlookMsg.Importance = Importance With objOutlookMsg For Each objOutlookRecip In .Recipients objOutlookRecip.Resolve ' Set the Subject, Body, and Importance of the message. '.Subject = "Coverage Requests" 'objDrafts.GetFromClipboard Next .Send End With Set objOutlookMsg = Nothing Set objOutlook = Nothing End Sub

    Read the article

  • IPhone accelerometer works even in flat surface.

    - by Amaresh
    I have an imageView in the view. It moves even if the iphone is still for some time. Why is it so ? Also the image does not respond quickly to the movement of the iphone. Here is my code written for this: I have also set the updateInterval and delegate for the accelerometer. #define kVelocityMultiplier 1000; -(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { if(currentPoint.x < 0) { currentPoint.x=0; ballXVelocity=0; } if(currentPoint.x > 480-sliderWidth) { currentPoint.x=480-sliderWidth; ballXVelocity=0; } static NSDate *lastDrawTime; if(currentPoint.x<=480-sliderWidth&&currentPoint.x>=0) { if(lastDrawTime!=nil) { NSTimeInterval secondsSinceLastDraw=-([lastDrawTime timeIntervalSinceNow]); ballXVelocity = ballXVelocity + -acceleration.y*secondsSinceLastDraw; CGFloat xAcceleration=secondsSinceLastDraw * ballXVelocity * kVelocityMultiplier; currentPoint = CGPointMake(currentPoint.x + xAcceleration, 266); } slider.frame=CGRectMake(currentPoint.x, currentPoint.y, sliderWidth, 10); } [lastDrawTime release]; lastDrawTime=[[NSDate alloc]init]; } Can anyone help me out please ?

    Read the article

  • How can I add a link with a UID from a User Reference from a table in Drupal Views

    - by pduncan
    I have the following in Drupal 6: A Master CCK type which contains a User reference field and other fields. There will only be one record per user here. A View of this CCK, shown as a table, with one of the fields being the user ref from the CCK type. This field is initially shown as a user name, linking to the user profile. A Second CCK type which can have several pieces of data about a particular user. A View for this CCK type, displaying information as a table. It takes a user id as an argument (an integer) I want to click on the user name in the master view, and be directed to the detail view for this user. To do this, I tried selecting 'Output this field as a link' on the user field. The thing available for me to replace are: Fields * [field_my_user_ref_uid_1] == Content: User (field_my_user_ref) Arguments * %1 == User: Uid However, the [field_my_user_ref_uid_1] element is replaced by the user name, and %1 seems to get replaced with an empty string. How can I put the user id in here?

    Read the article

  • How to correctly calculate FPS in XNA?

    - by Tomek Tarczynski
    I wrote a component to display current FPS. The most important part of it is: public override void Update(GameTime gameTime) { elapseTime += (float)gameTime.ElapsedRealTime.TotalSeconds; frameCounter++; if (elapseTime > 1) { FPS = frameCounter; frameCounter = 0; elapseTime = 0; } base.Update(gameTime); } In most cases it works ok, but recently I had a problem. When I put following code into Update method of game strange thing starts to happen. if (threadPath == null || threadPath.ThreadState != ThreadState.Running) { ThreadStart ts = new ThreadStart(current.PathFinder.FindPaths); threadPath = new Thread(ts); threadPath.Priority = ThreadPriority.Highest; threadPath.Start(); } Main idea of this code is to run pathFinding algorithm in different thread all the time. By strange things I mean that sometimes FPS drasticly decreases, this is obvious, but displayed FPS changes more often than once a second. If I understand this code FPS can't change more often than once a second. Can someone explain me what's going on?

    Read the article

  • What makes a project suitable for Azure/the cloud?

    - by dotnetdev
    Hi, I have read about Windows Azure but to get deeper into this technology, I need to (obviously) use it. I have a small ASP.NET site which gets little traffic and I am thinking that hosting this on Azure would save me money. Other than this, what other factors would contribute to a project being suitable for the cloud? Thanks

    Read the article

  • twitter API problem

    - by Gabri
    I am using this to get my latest Tweets <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js" ></script> <script type="text/javascript"src="http://twitter.com/statuses/user_timeline/username.json?callback=twitterCallback2&amp;count=2"></script> so i have to get the latest 2 tweets cause i set the count to 2 , sometimes it returns only 1 why is that ?

    Read the article

  • How can I run BitchX when I don't have ssh or shell access?

    - by Christopher
    I just installed an IRC bot, B****X (Don't ask, I don't know - the real name is not censored). I did all of the configuration and chmod'ed the pl files to 755, but running it won't work. My host does not allow SSH/Shell (which is how the documentation says to runs he script), but just going to the URL usually works because of this. However, I get a 500 (Internal Server Error) error. I have logged errors: Possible unintended interpolation of @moz in string at ./bitch.conf line 78 (#1) (W ambiguous) You said something like `@foo' in a double-quoted string but there was no array @foo in scope at the time. If you wanted a literal @foo, then write it as \@foo; otherwise find out what happened to the array you apparently lost track of. [Fri Mar 19 16:31:43 2010] bitch.pl: Possible unintended interpolation of @moz in string at ./bitch.conf line 78. Uncaught exception from user code: [Fri Mar 19 16:31:46 2010] bitch.pl: [[31mFAILED[0m] (connect error: Connection refused) at /usr/local/lib/perl5/5.8.8/CGI/Carp.pm line 354 CGI::Carp::realdie('[Fri Mar 19 16:31:46 2010] bitch.pl: [\x{1b}[31mFAILED\x{1b}[0m] (conne...') called at /usr/local/lib/perl5/5.8.8/CGI/Carp.pm line 446 CGI::Carp::die('[\x{1b}[31mFAILED\x{1b}[0m] (connect error: Connection refused)\x{a}') called at bitch.pl line 555 Thanks in advance

    Read the article

  • trying to find the comment hook I need for wordpress?

    - by beagleguy
    hi all , I'm writing a wordpress plugin that will execute a certain function when a user submits a comment. The only issue is I'm using the hook "comment_post" which works but if that comment gets stopped by akismet I'm still logging that comment but now my numbers are off from what's on the actual site. Is there a comment_approved type hook I should be using instead? thanks!

    Read the article

  • Dataform fields won't appear

    - by dsetton
    Hello! I am trying to learn how to use the Silverlight 3 DataForm control, because I need to define the DataForm fields myself in the XAML code, that is, I don't want to use the AutoGenerateFields property. My problem is: the dataform works perfectly when the AutoGenerateFields is set to true, but when I create a DataForm and set the fields manually and run the application, all I get is an empty blank rectangle where my form and its fields should be. I created a blank Silverligh Navigation Application to test this, and below is the code of the Home.xaml page: <Grid x:Name="LayoutRoot"> <StackPanel> <!-- This doesn't work. It renders a blank rectangle --> <dataFormToolkit:DataForm x:Name="DataForm"> <dataFormToolkit:DataForm.EditTemplate> <DataTemplate> <StackPanel dataFormToolkit:DataField.IsFieldGroup="True"> <dataFormToolkit:DataField> <TextBox Text="Test1" /> </dataFormToolkit:DataField> <dataFormToolkit:DataField> <TextBox Text="Test2" /> </dataFormToolkit:DataField> <dataFormToolkit:DataField> <TextBox Text="Test3" /> </dataFormToolkit:DataField> </StackPanel> </DataTemplate> </dataFormToolkit:DataForm.EditTemplate> </dataFormToolkit:DataForm> <!-- This works. --> <dataFormToolkit:DataForm x:Name="DataForm2"/> </StackPanel> </Grid> To make the second DataForm work, I simply created a Person class, and put the following in Home.xaml.cs: protected override void OnNavigatedTo(NavigationEventArgs e) { Person client = new Person { Age = 10, DateOfBirth = new DateTime(1980, 10, 20), FirstName = "John", LastName = "Doe" }; DataForm2.CurrentItem = client; } You can see what happens when I run the application in the following link: http://dl.dropbox.com/u/1946004/image.PNG (I don't have enough points to post images, so...) Does anyone know what's wrong? Thank you in advance.

    Read the article

  • ASP.NET MVC authentication for iPhone application

    - by manu08
    This is for an ASP.NET MVC application. For browser based access on my normal controllers, I'm using standard forms authentication and auth cookies. My question is how I do the same for an iPhone application. I have a set of RESTful controllers that the iPhone application uses directly, but I'm not sure how to go about authentication... I was thinking of having a special Login method that returns the auth cookie. Then I can use the standard Authentication attribute on the ASP.NET MVC side, but I'm not sure how to handle this on the iPhone side? Can I store this cookie and have it automatically sent with every request? Perhaps there's a better approach altogether?

    Read the article

  • Silverlight Cream for March 24, 2010 -- #819

    - by Dave Campbell
    In this Issue: Nokola, Tim Heuer, Christian Schormann, Brad Abrams, David Kelley, Phil Middlemiss, Michael Klucher, Brandon Watson, Kunal Chowdhury, Jacek Ciereszko, and Unni. Shoutouts: Michael Klucher has a short post up For Love of the Game (Development)…, where he's looking for some input from the developer community. Shawn Hargreaves has a link post up of all the Windows Phone MIX10 presentations Chris Cavanagh has a Soft-Body Physics for Windows Phone 7 post up that goes along with one he did 1-1/2 years ago! Jeff Weber posted An Open Letter To Microsoft Regarding The Silverlight Game Development Community Pete Brown posted his MIX10 Recap ... lots of information, and discussion of what he was up to ... I liked the Trivia app Pete... glad to hear that was yours :) I've changed my mind and added a WP7 tag to SilverlightCream. I'll straighten out all the Mobile plus Silverlight links to point at the WP7 tab hopefully tonight. From SilverlightCream.com: EasyPainter Source Pack 3: Adorners, Mouse Cursors and Frames Nokola has been busy with EasyPainter adding in Custom, Extensible Mouse Cursors and Customizable Adorners with extensible adorner frames, and best of all... all with source code! Simulate Geo Location in Silverlight Windows Phone 7 emulator Among the things we don't have in our WP7 emulators is Geo Location... Tim Heuer comes to the rescue with a simulator for it... too cool, Tim! Blend 4: About Path Layout, Part II Christian Schormann is back with Part 2 of his tutorial sequence on the new Path Layout. Really good info and definitely cool presentations of the control. Silverlight 4 + RIA Services - Ready for Business: Exposing OData Services Brad Abrams continues his series with a post on exposing OData services. This looks like a great tutorial on the topic... will probably resolve some questions I've been having :) No Silverlight and Preloader Experience(ish) - in 10 seconds... David Kelley exposes the code he uses on his site, designed to be friendly to Silverlight and non-Silverlight users alike. Merged Dictionaries of Style Resources and Blend Phil Middlemiss has a nice article up on Merged Dictionaries and using multiple resource dictionaries that the app chooses, but also be compatible with Prism and Blend while not eating your system resources out of house and home. XNA Game Studio and Windows Phone Emulator Compatibility Michael Klucher has a definitive post up about getting your XNA and system up-to-speed for WP7... a must-read if you've been running any of the other XNA drops. Windows Phone 7 301 Redirect Bug Brandon Watson reports a 301 Redirect bug on WP7 ... see the code and how he got it, then follow along as he explains all the debug paths he took and what the resolution (?) really is :) Silverlight 4: How to use the new Printing API? Kunal Chowdhury has a tutorial up on printing with Silverlight 4 RC... from the project layout to printing and then printing a smaller section... all good Printing problem in Silverlight 4.0 RC - loading images in code behind Jacek Ciereszko also is writing about printing, and in his case he had problems with loading an image dynamically and printing it... plus he provides a solution to the 'blank page' problem. ToolboxExampleAttribute - a new extension point in Blend 4 (and a few other extensibility related changes) Unni has an article up about Expression Blend 4's new ToolboxExampleAttribute which allow you to have multiple examples of the same type resulting in different XAML produced. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone    MIX10

    Read the article

  • overriding ctype<wchar_t>

    - by Potatoswatter
    I'm writing a lambda calculus interpreter for fun and practice. I got iostreams to properly tokenize identifiers by adding a ctype facet which defines punctuation as whitespace: struct token_ctype : ctype<char> { mask t[ table_size ]; token_ctype() : ctype<char>( t ) { for ( size_t tx = 0; tx < table_size; ++ tx ) { t[tx] = isalnum( tx )? alnum : space; } } }; (classic_table() would probably be cleaner but that doesn't work on OS X!) And then swap the facet in when I hit an identifier: locale token_loc( in.getloc(), new token_ctype ); … locale const &oldloc = in.imbue( token_loc ); in.unget() >> token; in.imbue( oldloc ); There seems to be surprisingly little lambda calculus code on the Web. Most of what I've found so far is full of unicode ? characters. So I thought to try adding Unicode support. But ctype<wchar_t> works completely differently from ctype<char>. There is no master table; there are four methods do_is x2, do_scan_is, and do_scan_not. So I did this: struct token_ctype : ctype< wchar_t > { typedef ctype<wchar_t> base; bool do_is( mask m, char_type c ) const { return base::do_is(m,c) || (m&space) && ( base::do_is(punct,c) || c == L'?' ); } const char_type* do_is (const char_type* lo, const char_type* hi, mask* vec) const { base::do_is(lo,hi,vec); for ( mask *vp = vec; lo != hi; ++ vp, ++ lo ) { if ( *vp & punct || *lo == L'?' ) *vp |= space; } return hi; } const char_type *do_scan_is (mask m, const char_type* lo, const char_type* hi) const { if ( m & space ) m |= punct; hi = do_scan_is(m,lo,hi); if ( m & space ) hi = find( lo, hi, L'?' ); return hi; } const char_type *do_scan_not (mask m, const char_type* lo, const char_type* hi) const { if ( m & space ) { m |= punct; while ( * ( lo = base::do_scan_not(m,lo,hi) ) == L'?' && lo != hi ) ++ lo; return lo; } return base::do_scan_not(m,lo,hi); } }; (Apologies for the flat formatting; the preview converted the tabs differently.) The code is WAY less elegant. I does better express the notion that only punctuation is additional whitespace, but that would've been fine in the original had I had classic_table. Is there a simpler way to do this? Do I really need all those overloads? (Testing showed do_scan_not is extraneous here, but I'm thinking more broadly.) Am I abusing facets in the first place? Is the above even correct? Would it be better style to implement less logic?

    Read the article

  • How do I get autotest (ZenTest) to see my namespaced stuff?

    - by Blaine LaFreniere
    Autotest is supposed to map my tests to a class, I believe. When I have class Foo and class FooTest, autotest should see FooTest and say, "Hey, this test corresponds to the unit Foo, so I'll look for changes there and re-run tests when changes occur." And that works, however... When I have Foo::Bar and Foo::BarTest, autotest doesn't seem to make the connection, and whenever I edit Foo::Bar, autotest does not re-run Foo::BarTest Am I doing something wrong? EDIT: File structure might be helpful. Here it is: Module and class files: lib/foo.rb lib/foo/bar.rb lib/foo/baz.rb Test files: test/unit/foo/bar.rb test/unit/baz.rb I would think that autotest is able to make the connection between Foo::Bar and Foo::BarTest, but apparently it doesn't.

    Read the article

  • Rails, searchlogic choose categories with checkboxes

    - by atmorell
    Hello, I am useing searchlogic to search some paintings. Each painting belong to a single category. What I would like to do is add multiple checkboxes to my search form, so that users can mark multiple categories. (joined with or) Is this possible with searchlogic? The query I am looking for is something like this: SELECT * FROM paintings WHERE category LIKE "white" OR category LIKE "red"... f.check_box :category (white) f.check_box :category (black) f.check_box :category (red) f.check_box :category (green) etc.

    Read the article

  • How can I can insert the contents of a file into another file right before a specific line

    - by jelbatnigi
    Hi, How can I can insert the contents of a file into another file right before a specific line using sed. example I have file1.xml that has the following: <field tagRef="376"> </field> <field tagRef="377"> </field> <field tagRef="58"> </field> <group ref="StandardMessageTrailer" required="true"/> </fieldList> and file2.xml has the following: <field tagRef="9647"> <description>Offset</description> </field> <field tagRef="9648"> <description>Offset Units/Direction</description> </field> <field tagRef="9646"> <description>Anchor Price</description> </field> how can i insert the contents of file2 into file1 just before so it will look like this: <field tagRef="376"> </field> <field tagRef="377"> </field> <field tagRef="58"> </field> <field tagRef="9647"> <description>Offset</description> </field> <field tagRef="9648"> <description>Offset Units/Direction</description> </field> <field tagRef="9646"> <description>Anchor Price</description> </field> <group ref="StandardMessageTrailer" required="true"/> </fieldList> I know how to insert after that line using sed 'group ref="StandardMessageTrailer"/r file2.xml' file1.xml newfile.xml but I want to insert it before. appreciate the help

    Read the article

  • C Programming - Convert an integer to binary

    - by leo
    Hi guys - i was hopefully after some tips opposed to solutions as this is homework and i want to solve it myself I am firstly very new to C. In fact i have never done any before, though i have previous java experience from modules at university. I am trying to write a programme that converts a single integer in to binary. I am only allowed to use bitwise operations and no library functions Can anyone possibly suggest some ideas about how i would go about doing this. Obviously i dont want code or anything, just some ideas as to what avenues to explore as currenty i am a little confused and have no plan of attack. Well, make that a lot confused :D thanks very much

    Read the article

  • How to create a pdf with a colored border

    - by I-CRE8
    I need to create a pdf using the fpdf class with a colored border that is 15mm thick on the top, right and left and 32mm thick at the bottom (border color is orange for the sake of argument) which leaves a white background in the middle for the text content. How can I best achieve this please ?

    Read the article

  • Ruby syntax checking in vim

    - by roybotnik
    Hi everyone, I use vim with various plugins for editing ruby code. I have proper syntax highlighting set up but I was wondering if anyone knew of a way to get ruby syntax checking, similar to what you might see in an IDE such as visual studio, radrails, etc? Something that would simply turn stuff red or break highlighting when I'm missing an 'end' or have an improperly constructed line of code would be sweet. I googled and came across this plugin, http://github.com/scrooloose/syntastic/tree/master but I was wondering if anyone had any better suggestions.

    Read the article

  • What is missing to Java API?

    - by Jack
    Hello, I started using Java years ago.. and I've always almost found everything I needed inside the standard API provided with JDK SE, apart from specific things that doesn't fit well inside a generic API.. so I was wondering: which are the most important things that the Java API is missing? With important I mean that you often needed them but had to search for a custom library, or things that usually are obviously included but not in Java's one..

    Read the article

  • Extracting, then passing raw data into another class - How to avoid copying twice while maintaining

    - by Kache4
    Consider a class Book with a stl container of class Page. each Page holds a screenshot, like page10.jpg in raw vector<char> form. A Book is opened with a path to a zip, rar, or directory containing these screenshots, and uses respective methods of extracting the raw data, like ifstream inFile.read(buffer, size);, or unzReadCurrentFile(zipFile, buffer, size). It then calls the Page(const char* stream, int filesize) constructor. Right now, it's clear that the raw data is being copied twice. Once to extract to Book's local buffer and a second time in the Page ctor to the Page::vector<char>. Is there a way to maintain encapsulation while getting rid of the middleman buffer?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >