Search Results

Search found 8247 results on 330 pages for 'smart phone'.

Page 53/330 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • Pointer to auto_ptr instead of a classical double pointer

    - by Pin
    Hello. I'm quite new to smart pointers and was trying to refactor some existing code to use auto_ptr. The question I have is about double pointers and their auto_ptr equivalent, if that makes sense. I have a function that accepts a double pointer as its parameter and the function allocates resources for it: void foo ( Image** img ) { ... *img = new Image(); ...} This function is then used like this: Image* img = NULL; foo ( &img ); ... delete img; I want to use auto_ptr to avoid having to call delete explicitly. Is the following correct? void foo ( auto_ptr<Image>* img ); and then auto_ptr<Image> img = NULL; foo ( &img ); Thanks.

    Read the article

  • Is it possible to use the WP7 Panorama or Pivot in SL4?

    - by Detroitpro
    I'm making pretty heavy use of the Panorama and Pivot controls in my WP7 applications. Is it possible to use these same controls in a standard Silverlight (4) application? http://phone.codeplex.com/ I added the dll's, was able to compile and create the controls in my views. However; I was not able to "Scroll". I thought they used the "LeftMouseDown" event handlers but I guess I'm wrong.

    Read the article

  • WP7 PanoramaItem with Icon/Button next to Header

    - by Ramon Bosch
    Windows Phone 7's People hub has an "all" panorama item with "search" and a "new" buttons right next to the header/title. I can't seem to accomplish this with PanoramaItem in Visual Studio using the standard Panorama control. I don't know enough Silverlight/WPF either to be able to position something manually and control transitions/movement correctly. How can I set a button (or any object, for that matter) to go alongside the header of a wp7 PanoramaItem? Thanks!

    Read the article

  • Google 2-step verification: Should my phone know my password? [closed]

    - by Sir Code-A-Lot
    Hi, Just enabled 2-step verification for my Google account. I have installed Google Authenticator on my Android phone, and I set up an application specific password for the Google account associated on my phone. This works great when just using installed apps like Gmail, Calendar and Google Reader. But if I want to access Google Docs, Google Tasks or any other website that requires a Google login, I don't seem to be able to use a application specific password. I have to use my real password and then use Google Authenticator to make a code for the next step. This means if my phone is stolen, revoking the password to my phone is pointless. The phone have already been verified, and all that is needed is my password, which the phones browser will have remembered. I realize that I can take measures to ensure the phones browser doesn't remember my password, but that's just not convenient at all. Am I missing something, or is there no elegant solution to this? Should I just let my phone know my real password? As I see it, being able to login with application specific passwords on websites (which apparently isn't possible) is the only way I can revoke my phones access in a meaningful way.

    Read the article

  • Convert object to enum C#

    - by Shawn Mclean
    I have binded a list of enum to a combobox. Now I want to get the SelectedItem return the enum, which currently returns it as type object. How do I convert this object to my enum? My framework is silverlight on windows-phone-7

    Read the article

  • Using NavigationService without XAML files

    - by UnclePaul
    I'm trying to create some pages in my Windows Phone application without the use of any XAML. Everything is working, however, I'm failing to use NavigationService/ Journal with this approach and all my attempts to utilize it are answered by the usual "No XAML was found at the location {0}'" response. Yes, I can add an almost empty XAML file to get everything working, but is this kind of boiler plate code really necessary? Is it maybe possible to use the UriMapping to map certain Uris to specific classes instead of *.xaml files?

    Read the article

  • What is the order of Android call state change when out going or incoming happened?

    - by CKR666
    The following are the changes in phone state in android CALL_STATE_OFFHOOK CALL_STATE_IDLE CALL_STATE_RINGING When i am making an outgoing call ,one received my call and after some time I or He ends the call. When i have a incoming call ,I received the call and after some time I or He ends the call. Where i want to use the broadcast receiver and Listener and why service is using for doing this.

    Read the article

  • How do I send user to youtube video on ListBoxItem click?

    - by Byron Sommardahl
    I'm creating a Windows Phone 7 app and learning Silverlight in the process. I have a youtube video url and I'd like the user to be able to click a video thumbnail in my list and go to a youtube app to view the video (similar to iPhone). Is this possible? If so, can you share some code to send the user to the video? I already have a MouseLeftButtonUp event handler.

    Read the article

  • WP7 Button inside ListBox only "clicks" every other press

    - by Zik
    I have a button defined inside of a DataTemplate for my list box. <phone:PhoneApplicationPage.Resources> <DataTemplate x:Key="ListTemplate"> <Grid Margin="12,12,24,12"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Button Grid.Column="0" Name="EnableDisableButton" Click="EnableDisableButton_Click" BorderBrush="Transparent"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Image Grid.Row="0" Source="\Images\img.dark.png" Width="48" Height="48" Visibility="{StaticResource PhoneDarkThemeVisibility}" /> <Image Grid.Row="0" Source="\Images\img.light.png" Width="48" Height="48" Visibility="{StaticResource PhoneLightThemeVisibility}" /> <Rectangle Grid.Row="1" Width="48" Height="8" Fill="{Binding CurrentColor}" RadiusX="4" RadiusY="4" /> </Grid> </Button> <Grid Grid.Column="1"> <... more stuff here ...> </Grid> </Grid> </DataTemplate> </phone:PhoneApplicationPage.Resources> What I'm seeing is that the first time I press the button, the Click event fires. The second time I press it, it does not fire. Third press, fires. Fourth press, does not fire. Etc. Originally I had it bound to a command but that was behaving the same way. (I put a Debug.WriteLine() in the event handler so I know when it fires.) Any ideas? It's really odd that the click event only fires every other time.

    Read the article

  • Android App Building

    - by user345526
    So, I'm new to developing apps (altogether) and I thought that it would be fun to start out on the Android. I did the test with "HelloAndroid" app, but I have no clue on how to run the app on my phone via Eclipse. I remember reading about it a long time ago (sometime in February) but I have no idea where to find it. Any help, here?

    Read the article

  • mod_rewrite for selectors with .html

    - by user1720607
    We have a website where the URL looks something like, www.example.com/about.smart.html ( "smart" being selector added on the app server based on the useragent if its a smart phone device) We need to redirect the page to 404 if the URL is changed by the user as like below: www.example.com/about.abc.xyz.smart.html www.example.com/about.smart.abc.html I tried with the below rule, but this redirects to 404 only for 1) and not for 2) RewriteCond %{REQUEST_URI} !^(.*)(-)\.html$ RewriteRule (.*)\.(.*).smart.html$ - [R=404,L] Any pointers on this would be of great help.

    Read the article

  • WP7 listbox binding not working properly

    - by Marco
    A noob error for sure (I started yesterday afternoon developing in WP7), but I'm wasting a lot time on it. I post my class and a little part of my code: public class ChronoLaps : INotifyPropertyChanged { private ObservableCollection<ChronoLap> laps = null; public int CurrentLap { get { return lap; } set { if (value == lap) return; // Some code here .... ChronoLap newlap = new ChronoLap() { // Some code here ... }; Laps.Insert(0, newlap); lap = value; NotifyPropertyChanged("CurrentLap"); NotifyPropertyChanged("Laps"); } } public ObservableCollection<ChronoLap> Laps { get { return laps; } set { if (value == laps) return; laps = value; if (laps != null) { laps.CollectionChanged += delegate { MeanTime = Laps.Sum(p => p.Time.TotalMilliseconds) / (Laps.Count * 1000); NotifyPropertyChanged("MeanTime"); }; } NotifyPropertyChanged("Laps"); } } } MainPage.xaml.cs public partial class MainPage : PhoneApplicationPage { public ChronoLaps History { get; private set; } private void butStart_Click(object sender, EventArgs e) { History = new ChronoLaps(); // History.Laps.Add(new ChronoLap() { Distance = 0 }); LayoutRoot.DataContext = History; } } MainPage.xaml <phone:PhoneApplicationPage> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid Grid.Row="2"> <ScrollViewer Margin="-5,13,3,36" Height="758"> <ListBox Name="lbHistory" ItemContainerStyle="{StaticResource ListBoxStyle}" ItemsSource="{Binding Laps}" HorizontalAlignment="Left" Margin="5,25,0,0" VerticalAlignment="Top" Width="444"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Lap}" Width="40" /> <TextBlock Text="{Binding Time}" Width="140" /> <TextBlock Text="{Binding TotalTime}" Width="140" /> <TextBlock Text="{Binding Distance}" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </ScrollViewer> </Grid> </Grid> </phone:PhoneApplicationPage> Problem is that when I add one or more items to History.Laps collection, my listbox is not refreshed and these items don't appear. But if I remove comment on // History.Laps.Add(new ChronoLap()... line, this item appear and so every other inserted later. More: if I remove that comment and then write History.Laps.Clear() (before or after setting binding) binding is not working anymore. It's like it gets crazy if collection is empty. I really don't understand the reason... UPDATE AND SOLUTION: If i move History = new ChronoLaps(); LayoutRoot.DataContext = History; from butStart_Click to public MainPage() everything works as expected. Can someone explain me the reason?

    Read the article

  • Polymorphic Queue

    - by metdos
    Hello Everyone, I'm trying to implement a Polymorphic Queue. Here is my trial: QQueue <Request *> requests; while(...) { QString line = QString::fromUtf8(client->readLine()).trimmed(); if(...)){ Request *request=new Request(); request->tcpMessage=line.toUtf8(); request->decodeFromTcpMessage(); //this initialize variables in request using tcpMessage if(request->requestType==REQUEST_LOGIN){ LoginRequest loginRequest; request=&loginRequest; request->tcpMessage=line.toUtf8(); request->decodeFromTcpMessage(); requests.enqueue(request); } //Here pointers in "requests" do not point to objects I created above, and I noticed that their destructors are also called. LoginRequest *loginRequest2=dynamic_cast<LoginRequest *>(requests.dequeue()); loginRequest2->decodeFromTcpMessage(); } } Unfortunately, I could not manage to make work Polymorphic Queue with this code because of the reason I mentioned in second comment.I guess, I need to use smart-pointers, but how? I'm open to any improvement of my code or a new implementation of polymorphic queue. Thanks.

    Read the article

  • Why is my code slower using #import "progid:typelib" than using "MFC Class From TypeLib"?

    - by Pakman
    I am writing an automation client in Visual C++ with MFC. If I right-click on my solution » Add » Class, I have the option to select MFC Class From TypeLib. Selecting this option generates source/header files for all interfaces. This allows me to write code such as: #include "CApplication.h" #include "CDocument.h" // ... connect to automation server ... CApplication *myApp = new CApplication(pDisp); CDocument myDoc = myApp->get_ActiveDocument(); Using this method, my benchmarking function that makes about 12000 automation calls takes 1 second. Meanwhile, the following code: #import "progid:Library.Application" Library::IApplicationPtr myApp; // ... connect to automation server ... Library::IDocumentPtr myDoc = myApp->GetActiveDocument(); takes about 2.4 seconds for the same benchmark. I assume the smart-pointer implementation is slowing me down, but I don't know why. Even worse, I'm not sure how to use #import construct to achieve the speeds that the first method yields. Is this possible? How or why not? Thanks for your time!

    Read the article

  • Is boost shared_ptr <XXX> thread safe?

    - by sxingfeng
    I have a question about boost :: shared_ptr. There are lots of thread. class CResource { xxxxxx } class CResourceBase { public: void SetResource(shared_ptr<CResource> res) { m_Res = res; } shared_ptr<CResource> GetResource() { return m_Res; } private: shared_ptr<CResource> m_Res; } CResourceBase base; //---------------------------------------------- Thread A: while (true) { ...... shared_ptr<CResource> nowResource = base.GetResource(); nowResource.doSomeThing(); ... } Thread B: shared_ptr<CResource> nowResource; base.SetResource(nowResource); ... //----------------------------------------------------------- If thread A do not care the nowResource is the newest . Will this part of code have problem? I mean when ThreadB do not SetResource completely, Thread A get a wrong smart point by GetResource? Another question : what does thread-safe mean? If I do not care about whether the resource is newest, will the shared_ptr nowResource crash the program when the nowResource is released or will the problem destroy the shared_point?

    Read the article

  • Automatically converting an A* into a B*

    - by Xavier Nodet
    Hi, Suppose I'm given a class A. I would like to wrap pointers to it into a small class B, some kind of smart pointer, with the constraint that a B* is automatically converted to an A* so that I don't need to rewrite the code that already uses A*. I would therefore want to modify B so that the following compiles... struct A { void foo() {} }; template <class K> struct B { B(K* k) : _k(k) {} //operator K*() {return _k;} //K* operator->() {return _k;} private: K* _k; }; void doSomething(A*) {} void test() { A a; A* pointer_to_a (&a); B<A> b (pointer_to_a); //b->foo(); // I don't need those two... //doSomething(b); B<A>* pointer_to_b (&b); pointer_to_b->foo(); // 'foo' : is not a member of 'B<K>' doSomething(pointer_to_b); // 'doSomething' : cannot convert parameter 1 from 'B<K> *' to 'A *' } Note that B inheriting from A is not an option (instances of A are created in factories out of my control)... Is it possible? Thanks.

    Read the article

  • Why is HttpClient's GetStringAsync is unbelivable slow?

    - by Jason94
    I have a Windows Phone 8 project where I've taken to use the PCL (Portable Class Library) project too since I'm going to build a Win8 app to. However, while calling my api (in Azure) my HttpClient's GetStringAsync is so slow. I threw in a couple of debugs with datetime and GetStringAsync took like 14 seconds! And sometimes it takes longer. What I'm doing is retrieving simple JSON from my Azure API site. My Android client has no problem with getting that same data in a split second... so is there something I'm missing? The setup is pretty straight forward: HttpClient client = new HttpClient(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Add("X-Token", "something"); string responseJSON = await client.GetStringAsync("url"); I've places the debug times right before and after the await there, in between it is 14 seconds! Does someone know why?

    Read the article

  • Storing a large list in isolatedStorage on WP7

    - by Ra
    I'm storing a List with around 3,000 objects in Isolatedstorage using Xml serialize. It takes too long to deserialize this and I was wondering if you have any recommendations to speed it up. The time is tolerable to deserialize up to 500 objects, but takes forever to deserialize 3000. Does it take longer just on the emulator and will be faster on the phone? I did a whole bunch of searching and some article said to use a binary stream reader, but I can't find it. Whether I store in binary or xml doesn't matter, I just want to persist the List. I don't want to look at asynchronous loading just yet...

    Read the article

  • iPhone - phone goes to sleep even if idleTimerDisabled is YES

    - by lostInTransit
    Hi I am using this in my appdelegate's applicationDidFinishLaunching: method to make sure the iPhone doesn't go to sleep during the time the app is open [application setIdleTimerDisabled:YES]; It works great on all screens but on one of the screens the iPhone goes to sleep. I could not figure out how to reproduce this and it seems to happen at random times. Can someone please tell me how to handle this situation. Thanks

    Read the article

  • Good Async pattern for sequential WebClient requests

    - by Omar Shahine
    Most of the code I've written in .NET to make REST calls have been synchronous. Since Silverlight on Windows Phone only supports Async WebClient and HttpWebRequest calls, I was wondering what a good async pattern is for a Class that exposes methods that make REST calls. For example, I have an app that needs to do the following. Login and get token Using token from #1, get a list of albums Using token from #1 get a list of categories etc my class exposes a few methods: Login() GetAlbums() GetCategories() since each method needs to call WebClient using Async calls what I need to do is essentially block calling Login till it returns so that I can call GetAlbums(). What is a good way to go about this in my class that exposes those methods?

    Read the article

  • Windows Series Phone 7 "Cloud"

    - by user275561
    I have been reading up on "Cloud computing" on here and still not getting it. Basically I want to develop for the WP7 http://msdn.microsoft.com/en-us/library/ff402531%28v=VS.92%29.aspx#AppPlat_Overview_Arch Now it mentions everything as being in the "Cloud". Is any server just a cloud? If i have a WCF service or wsdl on my server. Can I consider myself that "Cloud"? Or is there something that a server emits that checks whether or not it is a cloud?

    Read the article

  • j2me MIDP: detecting if phone has a data plan

    - by SB
    Is there a way to determine what kind of data plan a device has so an app provides a less rich experience if a data plan is not available? I imagine the connector factory would still be able to return me an HTTPConnection but it would cost the user serious money for lots of data, and I'd like to be nice and prevent that. I thought there would be a way to query device capabilities in the MIDP API, but maybe it's in CLDC?

    Read the article

  • Displaying a pdf file located on a http server from mobile phone

    - by JCasso
    I have some pdf files located on a http server: Like: http://domain.com/files/file1.pdf http://domain.com/files/file1.pdf http://domain.com/files/file1.pdf I need to display these files on a mobile application using java me. I tried to display them by opening Google Docs Viewer with platformRequest. However it seems Google Docs Viewer uses ajax and many mobile browsers does not support it. Is there an alternative for "Google Docs Viewer" for mobile devices ? Or is there a better solution for this problem ?

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >