Search Results

Search found 2005 results on 81 pages for 'samples'.

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

  • Programatically WPF Fade In (via extension methods)

    - by Dinis Cruz
    I'm trying to write a simple (stand alone) C# extension method to do a Fade-In of a generic WPF UIElement, but the solutions (and code samples) that I found all contain a large number of moving parts (like setting up a story, etc...) For reference here is an example of the type of API method I would like to create. This code will rotate an UIElement according to the values provided (fromValue, toValue, duration and loop) public static T rotate<T>(this T uiElement, double fromValue, double toValue, int durationInSeconds, bool loopAnimation) where T : UIElement { return (T)uiElement.wpfInvoke( ()=>{ DoubleAnimation doubleAnimation = new DoubleAnimation(fromValue, toValue, new Duration(TimeSpan.FromSeconds(durationInSeconds))); RotateTransform rotateTransform = new RotateTransform(); uiElement.RenderTransform = rotateTransform; uiElement.RenderTransformOrigin = new System.Windows.Point(0.5, 0.5); if (loopAnimation) doubleAnimation.RepeatBehavior = RepeatBehavior.Forever; rotateTransform.BeginAnimation(RotateTransform.AngleProperty, doubleAnimation); return uiElement; }); }

    Read the article

  • Parallel CURL function Help .. php

    - by Webby
    Hello.. Firstly let me explain the code below is just a tiny snippet of the code I'm using on the working site. Basically I'm hoping someone can help me rewrite just the function below to enable parallel CURL calls... that way it will fit nicely into the existing code without me having to rewrite the whole from the ground up like some of the samples I've been finding today any ideas? function get_data($url) { $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5); $data = curl_exec($ch); curl_close($ch); return $data; } p.s. $url goes through a huge bunch of urls in a loop already so I'd hole to keep that intact.. Help always appreciated and rewarded

    Read the article

  • Non laggy movement in Flex or WPF

    - by PaN1C_Showt1Me
    I'm trying to learn something about 2D games programming. For this purpose I've downloaded many samples developed in: Flex and Microsoft WPF. I've noticed that all the animations / moving objects are kind of non-smooth. I've seen a Flex example with double buffering which solved the image flickering, but it was laggy too. WPF example too. Just to mentioned, all examples were drawing on Canvas. I'm just curious, is it possible to have a wonderful non-laggy movement on the GUI in Flash or WPF ? (e.g. like a real game, coded in C++)

    Read the article

  • iPhone SDK: My server doesn't support range header requests, does that mean it's impossible for me t

    - by Jessica
    I am currently developing an iPhone app, in which involves downloads of up to 300 mb. I have been told by my hosting service that my server does not support range header requests. However, when I download a file from my server using a download client, like safari download manager, resume options are available and work. Does this mean that they have a work around for servers that don't support range header requests and that I could possibly implement into my iPhone app? Or are they using a technique too complex to implement into the iPhone. If you know of a technique code samples will be greatly appreciated.

    Read the article

  • Code snippets in interview

    - by Maddy
    Hi All, Recently I went to an interview for a C development position. Instead of asking me questions, they just gave me 20 code snippets to find out two logical errors on each one. I just couldn't complete all of the 20 since it took me time to go through each of these code snippets. My question is: Is this the right way to judge a candidate? If yes, how can I improve over my error detection skills so that I don't need to waste a lot of time in the next interview? If possible, please, suggest me some links where I could find lots of samples of such questions (mainly in C). Thanks and regards, Maddy

    Read the article

  • Why does order matter for ImageMagick's -colorspace operation?

    - by Mark Trapp
    Starting with ImageMagick 6, the command style changed to solve a bunch of problems outlined in the Basic Usage document. That document does imply that for simple operations, one should only need to move the options from before the source file to between the source and output files to convert from the "old" style to the "new" style. However, this doesn't seem to work for the -colorspace operation. When I use the following command, I get an output file with the correct colors: convert -colorspace rgb input.pdf output.png But when I try to use the new command style, the -colorspace operation is never applied: convert input.pdf -colorspace rgb output.png Samples: Why does this occur?

    Read the article

  • Entity framework and database logic.

    - by Xavier Devian
    Hi all, i have a question that's being around for several years. As all you know entity framework is an ORM tool that tries to model the database to an object oriented access model. All the samples I've seen are quering directly to the database tables. So, which is the role of the views in the database now?. The views were used to model the database in a more friendly way, that is, several physical tables, one logic table. This was great for example in hidding the complex relational model on stored procedures as queryng the views inside them was much easier than reproducing the query joins over and over on each stored procedure. So the question is, why is entity framework so good if stored procedures can not take benefit of it?

    Read the article

  • Python - Using "Google AJAX Search" API's Local Search Objects

    - by user330739
    Hi! I've just started using Google's search API to find addresses and the distances between those addresses. I used geopy for this, but, I often had the problem of not getting the correct addresses for my queries. I decided to experiment, therefore, with Google's "Local Search" (http://code.google.com/apis/ajaxsearch/local.html). Anyway, I wanted to ask if I could use the "Local Search" objects provided by the API within python. Something tells me that I can't and that I have to use json. Does anyone know if there is a work around? PS: Im trying to make something like this: http://www.google.com/uds/samples/random/lead.html ... except a matrix type deal where the insides will be filled with distances between the addresses. Thanks for reading!

    Read the article

  • Creating a loading screen in HTML5

    - by espais
    I am having some issues finding a decent tutorial for generating a loading style screen with regards to HTML5. To be quite honest I'm not sure exactly where to begin... My project is essentially a simple HTML5 game, where I'll be loading in various sprite sheets and tilesets. They'll be reasonably small, but I'd like to show a little loading spinner instead of a blank screen while all the resources are loaded. Much appreciated if somebody could point me in the right direction, be it decent links or code samples to get me going...my Google-fu is lacking today! For clarification, I need to figure out how to load the resources themselves, as opposed to finding a spinner. For instance, how to calculate that X% has loaded.

    Read the article

  • How can I copy from the browser and paste to vim without unicode problems

    - by dsummersl
    This happens to me all the time: I copy something from a rich text screen (usually a browser) and then paste it into vim. Usually its a code block and then when I go to compile or run or what have you I get all kind of bazaar errors. I scratch my head, and then spend half an hour trying to figure out what is wrong before I realize I've copied some non ASCII characters: dashes, left and right quotes, long underscores, multiplication signs in place of x's, etc. So I ask you: how can I copy non-ASCII into my VIM session without error? Is there a paste mode that automatically 'down samples' unicode to ASCII? Is there a quick/dirty search for non ASCII characters in a file?

    Read the article

  • Newbie question on MvcContrib TestHelpers

    - by Simon Lomax
    Hi, I'm just starting to use the TestHelpers in MvcContrib. I want to try and test an action method on my controller that itself tests if IsAjaxRequest() is true. I've used the same code that is shown in the TestHelper samples to set up the TestControllerBuilder _controller = new StarsController(); _builder = new TestControllerBuilder(); _builder.InitializeController(_controller); So that _controller has all the faked/mocked HttpContext inside it, which is really great. But what do I do now to force IsAjaxRequest() on the internally faked Request object to return true?

    Read the article

  • How to manage toolbars with mvvm and WPF

    - by Michael Stoll
    I'm looking for a smooth method of managing toolbars (and menus) with mvvm in WPF. Consider an UI with tabbed workspaces and heterogenous content (like Visual Studio). There the toolbars should be hidden or visible depending on the active tab. How would you design the view viewmodel for the toolbars? I'd use a collection of toolbar-viewmodels and bind the ToolbarTray to it, but afaik that's not possible. Any recommendations are apreciated. Links to samples, best practice papers, etc. are welcome.

    Read the article

  • Is it possible to reference object within the same object?

    - by fudgey
    I've been messing around with jQuery plugin code and I'm trying to put all of my common variables into a single object for easy access. I have included a few examples below on how I've done this, but I'm wondering how others deal with this problem. Lets say I have this var x = function(options){ var defaults = { ulist : $('ul#list'), listLen : $('ul#list').children().length } $.extend(options, defaults); // do other stuff } What I'm trying to do is use the ulist object in as a base, then find the number of li's I guess I could do this: var x = function(options){ var defaults = { ulist : $('ul#list'), listLen : 0 } defaults.listLen = defaults.ulist.children().length; $.extend(options, defaults); // do other stuff } or this: var x = function(options){ var defaults = { ulist : $('ul#list') }; var defaults2 = { listLen : defaults.ulist.children().length } $.extend(defaults, defaults2); $.extend(options, defaults); // do other stuff } The above code samples are just thrown together, and only meant to get the idea across to you. Anyway, is there a better way to do this?

    Read the article

  • C# Network Printing

    - by tanthiamhuat
    I am able to get the list of network printers via this code: private void Form1_Load(object sender, EventArgs e) { foreach (String printer in PrinterSettings.InstalledPrinters) { listBox1.Items.Add(printer.ToString()); } } For each network printer, I want to extract out more information like: (a) get document information, like number of pages printed, filename, file-size, etc. (b) get computer IP address from which document was printed. (c) get username of who printed the document. How do I achieve the above? any code samples would be appreciated. Do I have to look into Windows Management Instrumentation(WMI) stuffs?

    Read the article

  • Flash in VC++ Documentation

    - by Red Serpent
    Hi I am trying to host a flash object inside an CAxWindow, I have managed to insert a shockwaveflash (SWF) and its working fine. I am trying to find all available API's that are available in the flash ocx. I am unable to find any documentation for the functions in the IShockwaveFlash interface. I know that Adobe doesn't have a documentation for using flash in VC++ but I was wondering if anyone can point me to a place where I can find an UNOFFICIAL documentation for flash.ocx or code samples as the only API that I could find and I'm currently using is "PutMovie". Any help is appreciated...

    Read the article

  • Google Maps API v3 - Directions/Paths breaking KML Overlay Infowindows

    - by Douglas
    I'm in the end stages before content filling and then production on the Google Maps project I've been working on. A number of bugs and such have been thwarted, but this latest one has me relatively stumped. The demo map can be viewed here: http://dougglover.com/samples/finalProduct/ Everything works fine until you create a path using the Directions section(not to be confused with Get Directions). To reproduce the problem, play around with the map, click on a building or two, just to see the functionality. After ensuring that clicking on a building works(brings up an infowindow), choose two buildings to get directions to in the Directions area. It works great with the routing algorithm I've implemented, and the paths show up nicely, and intelligently. The problem being that you can't click buildings anymore to see their info. I'm assuming it has something to do with the z-index error popping up in the console, but I'm not sure how to handle that if it is the problem. Any guidance is greatly appreciated. :)

    Read the article

  • avmutablecomposition insertEmptyTimeRange

    - by smartfaceweb
    I have created an avmutablecomposition and tried to use insertEmptyTimeRange to generate 1 minute of silence. This doesn't appear to be working. I have also tried creating an avmutablecompositiontrack using addMutableTrackWithMediaType:preferredTrackID: and then insertEmptyTimeRange on the track and still no success. To give some background on my app, I allow users to add audio samples a timeline and then playback or export and this is working really well using the av classes. The problem is that I need to make sure that the audio is exactly 1 min (for example). Regardless of the info about my specific app above, is it possible to insert an empty time range into a comp or comptrack?

    Read the article

  • get url:xml why external url does not work

    - by Kazim Cubbali
    I am trying to grab information from an external xml with the following code. It only worked when I uploaded same file to my servers. Why cant I grab information from an external url? <script language="javascript"> // This script uses jQuery to retrieve the news XML file and display the contents $(document).ready(function(){ $.ajax({ type: "GET", url: "www.simplyprofound.com/samples/xml_jquery/sample.xml", dataType: "xml", success: function(xml) { $(xml).find('item').each(function(){ var title = $(this).find('title').text(); var source = $(this).find('source').text(); var description = $(this).find('description').text(); $('<div class="news_title"></div>').html(title).appendTo('#news_wrap'); $('<div class="news_source"></div>').html(source).appendTo('#news_wrap'); $('<div class="news_description"></div>').html(description).appendTo('#news_wrap'); }); } }); }); </script>

    Read the article

  • iPhone transparent images rendering poorly

    - by alku83
    I'm developing an iPad application. I have been provided with a PNG image that contains some transparency - basically a drop shadow. The problem I'm having is that this is rendering poorly within the application, both on the device and in the sim. I can't provide the whole image but I've made up some samples to illustrate. The first is how the image appears in the PSD (correctly that is). The second is how it appears on the device. You can see that the strip of shadow in the middle of the image is distinctly more yellow and poorly looking. Any ideas what I'm doing wrong?

    Read the article

  • Qt on Mac: where to find "configure"

    - by Gil
    hi, I am very new to Mac. I downloaded QT SDK Mac Open source (http://get.qt.nokia.com/qtsdk/qt-sdk-mac-opensource-2010.02.dmg) and installed the Package. I can run qmake, build samples and run demos, but I cannot run configure (in order to build the Qt libraries statically). It says: -bash: No such file or directory. Documentation says I should run this in the "Qt root folder", but what is this folder in Mac? I looked for it in /usr/bin, /usr/local/Qt4.6, /Developer/Tools/Qt. Anyway, what is "configure" on Mac. is it an executable or a script? Thanks a lot

    Read the article

  • Blackberry: RadioButtonFiled and EditFiled in the same line doesn't show EditField?

    - by user187532
    Hi All, I have a RadioGroup and two RadioButtonField added in a VerticalFieldManager. I want put an EditField for the first RadioButtonField horizontally. For ex: I have two RadioButtonField as "Enter number here:" otherwise user can choose "Number from existing Database:" in the second RadioButtonsField. In the first field "Enter number here:" i need provide an EditField horizontally next to first RadioButtonField, for him to type. I am trying to put an EditField horizoally but it doesn't show EditField horizonatally to the first RadioButtonField. May i know how to do that (or) any samples to do that? Thanks.

    Read the article

  • Puzzle - Dynamically change data template control from another data template

    - by Burt
    I have a DataTemplate that contains an Expander with a border in the header. I want the header border to have round corners when collapsed and straight bottom corners when expanded. What would best practice be for achieving this (bonus points for code samples as I am new to XAML)? This is the template that holds the expander: <DataTemplate x:Key="A"> <StackPanel> <Expander Name="ProjectExpander" Header="{Binding .}" HeaderTemplate="{StaticResource B}" > <StackPanel> <Border CornerRadius="0,0,2,2"> This is the expander datatemplate: <DataTemplate x:Key="B"> <Border x:Name="ProjectExpanderHeader" CornerRadius="{Binding local:ItemUserControl.ProjectHeaderBorderRadius, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentPresenter}}}" Background="{StaticResource ItemGradient}" HorizontalAlignment="{Binding HorizontalAlignment, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentPresenter}}, Mode=OneWayToSource}"> <local:ItemContentsUserControl Height="30"/> </Border> </DataTemplate>

    Read the article

  • Capturing HTML input values using a BHO

    - by Meric
    Hi all, i am a complete nobbie to BHO and C++. This is what i want to achieve. Using various code samples, i have been successful in installing a BHO in my Internet Explorer. I am currently making use of the Invoke method to search for DISPID_HTMLDOCUMENTEVENTS2_ONCLICK and have been successful in capturing the event. How can i access a HTML input on the page is filled up with values? (eg. i navigate to www.gmail.com, key in some values into the username and password, and my BHO is activated upon the onclick event?) Code examples or link to documentation would be fantastic help regards Meric

    Read the article

  • Dynamic query to immediate execute?

    - by Curtis White
    I am using the MSDN Dynamic linq to sql package. It allows using strings for queries. But, the returned type is an IQueryable and not an IQueryable<T>. I do not have the ToList() method. How can I this immediate execute without manually enumerating over the IQueryable? My goal is to databind to the Selecting event on a linqtosql datasource and that throws a datacontext disposed exception. I can set the query as the Datasource on a gridview though. Any help greatly appreciated! Thanks. The dynamic linq to sql is the one from the samples that comes with visual studio.

    Read the article

  • Entity Framework 4 with Existing Domain Model

    - by ace
    Hi, Im currently looking at migrating from fluent nHibernate to ADO.Net Entity Framework 4. I have a project containing the domain model (pocos) which I was using for nHibernate mappings. Ive read in blogs that it is possible to use my existing domain model with EF4 but ive seen no examples of it. Ive seen examples of T4 code generation with EF4 but havent come accross an example which shows how to use existing domain model objects with EF4. Im a newby with EF4 and would like to see some samples on how to get this done. Thanks Aiyaz

    Read the article

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