Daily Archives

Articles indexed Friday May 7 2010

Page 19/110 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • want to fetch the friends list of facebook thorough fbconnect in iphone using objective-c ?

    - by uttam
    how to fetch the friends list of facebook in iphone through fbconnect in objective-c? I am using this code (void)getUserName { NSString *fql = [NSString localizedStringWithFormat: @"SELECT uid FROM user WHERE is_app_user = 1 AND uid IN (SELECT uid2 FROM friend WHERE uid1 = %lld)",[FBSession session].uid]; NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"]; [[FBRequest requestWithDelegate:self] call:@"facebook.friends.get" params:params]; } - (void)request:(FBRequest*)request didLoad:(id)result { if ([request.method isEqualToString:@"facebook.fql.query"]) { NSArray* users = result; NSDictionary* user = [users objectAtIndex:0]; NSString* name = [user objectForKey:@"name"]; _label.text = [NSString stringWithFormat:@"Logged in as %@", name]; } else if ([request.method isEqualToString:@"facebook.users.setStatus"]) { NSString* success = result; if ([success isEqualToString:@"1"]) { _label.text = [NSString stringWithFormat:@"Status successfully set"]; } else { _label.text = [NSString stringWithFormat:@"Problem setting status"]; } } else if ([request.method isEqualToString:@"facebook.freinds.get"]) { if(myList==nil) { NSArray* users = result; myList =[[NSArray alloc] initWithArray: users]; for(NSInteger i=0;i<[users count];i++) { NSDictionary* user = [users objectAtIndex:i]; NSString* uid = [user objectForKey:@"uid"]; NSString* fql = [NSString stringWithFormat: @"select name from user where uid == %@", uid]; NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"]; [[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params]; } } else { NSArray* users = result; NSDictionary* user = [users objectAtIndex:0]; NSString* name = [user objectForKey:@"name"]; //txtView.text=[NSString localizedStringWithFormat:@"%@%@,\n",txtView.text,name]; NSLog(name); }} I want to get the friends list from facebook and then search/modify then add it to my addressbook. I know this code is doing this but I don't know how to use it or where do I use it.. If you could please post something or just elaborate on how do I use your code thru fbconnect framework. I have implemented upto get permissions and publish feeds one's wall. But please can you post here about the layout details of the results, like what do Ineed to use on the layout point of view.

    Read the article

  • jquery 1.3 not(:first) problem in IE

    - by sunil-mand99
    Hi, i have 3 div tags of same class, <div class="redc"> <p>sdfs</p> </div> <div class="redc"> <p>sdfs</p> </div> <div class="redc"> <p>sdfs</p> </div> to select div other than first ,$(".redc:not(:first)") works fine in mozilla,but not in IE Please suggest any alternative for IE Note: vesion jquery 1.3

    Read the article

  • Question about [Pure] methods

    - by devoured elysium
    Is the following method Pure? I'd say so, as it doesn't change in anyway the current class, thus, everything we can now currenly "see" in the class, before running this method will still be exactly the same after. Am I correct? class Set { ... public ISet<T> UnionWith(ISet<T> set) { ISet<T> unionSet = ... foreach (Element element in this) { unionSet.Add(element); } foreach (Element element in set) { unionSet.Add(element); } return unionSet; } }

    Read the article

  • Unable to find or obtain a context for request certificate

    - by Kanan
    I am trying to send push notification to iphone. By searching on internet i found that register the P12 file on server with winhttpcertcfg. But when I tried with this command winhttpcertcfg -g -c LOCAL_MACHINE\MY -s "CertificateName" -a "ASPNET" on command window after installing winhttpcertcfg. But I am getting the error "Unable to find or obtain a context for request certificate" Can you please suggest me, how to solve this error?

    Read the article

  • Soften a colour border, maybe with a gradient, programmatically.

    - by ProfK
    I have a narrow header in corporate colour, bright red, with the content below on a just-off-white background. Ive tried softening the long line where these colours meet using border type divs with intermediate backgrounds, but I think I need the original type curved gradient 'area transitions'. I could copy the 1024px wide, and too narrow (vertically), header gif from their web site, and chop it up for eight border images, but that seems clumsy, and I'm looking for something I can apply anywhere, without needing images. I am able to do round borders in the x-y plane, but I'm curious as to how I can apply a gradient to any chosen colour transition. The extra divs I'm using as border elements above and below '#top-section' arose when I was toying with making many divs for one bordered element. This seemed the ultimate in border manipulation, sans code, but very tedious to spec in CSS and lay out a new border for each bordered element. <div id="topsection"> <div style="float: right; width: 300px; padding-right: 5px;"> <div style="font-size: small; text-align: right;"> Provantage Media Management System</div> <div style="font-size: x-small; text-align: right;"> <asp:LoginStatus ID="loginStatus" runat="server" LoginText="Log in" LogoutText="Log out" /> </div> </div> <span style="padding-left: 15px;">Main Menu</span><span id="content-title"> <asp:ContentPlaceHolder ID="titlePlaceHolder" runat="server"> </asp:ContentPlaceHolder> </span> <div style="background-color: white; height: 2px;"> </div> <div style="background-color: white; height: 3px;"></div> And the CSS: #topsection { background-color: #EB2728; color: white; height: 35px; font-size: large; font-weight: bold; }

    Read the article

  • Firefox extension js object initialization

    - by Michael
    Note: this is about Firefox extension, not a js general question. In Firefox extension project I need my javascript object to be initialized just once per Firefox window. Otherwise each time I open my window a new timers will be engaged, new properties will be used, so everything will start from scratch. hope example below will demystify my question :) var StupidExtension { statusBarValue: "Not Initialized Yet", startup: function () { ... // Show statusBarValue in Status Bar Panel }, initTimerToRetrieveStatusBarValueFromNetwork: function () { ... } } so each time you hit Ctrl+N a new window you will see "Not Initialized Yet" and then new timer will be fired, so after some time it retrieve data from network you will see value also on second window and so on. Ideally would be to have just a single timer function running and updating all status bar panels in all Firefox windows. Of course I can do some caching, like saving the value in prefs or some other storage, then show it from there. But I feel like this is artificial. So the question will be is there "native" technique of making static some parts of the object among all Firefox window instances?

    Read the article

  • How to dynamically edit dns entries without restarting the dns server

    - by satish
    I am trying to host multiple sites on a single webapp in a tomcat server. For example www.abc.com, www.xyz.com and several sites fetch content from my webapp hosted on tomcat with apache as the web server. My web app is hosted at www.mysite.com. www.abc.com should forward to www.mysite.com?id=abc www.xyz.com should forward to www.mysite.com?id=xyz Can you tell me how to configure dns entries, apache and tomcat configuration to achieve this scenario?? These site will have to be added dynamically! so is there any way to update the dns entries dynamically without restarting the dns server ... and similarly for apache and tomcat also?? Thanks very much in advance

    Read the article

  • TempDB is Full Issue for SQL Server 2000

    - by Jason N. Gaylord
    Even though the log file shows that there is over 1 GB of free space, we start receiving an error message every 3 or 4 days saying that the TempDB file is full. I know cursors impact the TempDB file, but is there anything else I should be looking at to see why this keeps happening? I've tried running SQL Profiler, but when running it, it slowed down the DB so much that the users were experiencing timeouts. What specific items should I check for in SQL Profiler?

    Read the article

  • C++: Switch statement within while loop?

    - by Jason
    I just started C++ but have some prior knowledge to other languages (vb awhile back unfortunately), but have an odd predicament. I disliked using so many IF statements and wanted to use switch/cases as it seemed cleaner, and I wanted to get in the practice.. But.. Lets say I have the following scenario (theorietical code): while(1) { //Loop can be conditional or 1, I use it alot, for example in my game char something; std::cout << "Enter something\n -->"; std::cin >> something; //Switch to read "something" switch(something) { case 'a': cout << "You entered A, which is correct"; break; case 'b': cout << "..."; break; } } And that's my problem. Lets say I wanted to exit the WHILE loop, It'd require two break statements? This obviously looks wrong: case 'a': cout << "You entered A, which is correct"; break; break; So can I only do an IF statement on the 'a' to use break;? Am I missing something really simple? This would solve a lot of my problems that I have right now.

    Read the article

  • Creating a semi-transparent blurred background WPF

    - by Dave Colwell
    Hi guys, I have a border, i want the background of this border to be partially transparent (opacity 0.8) but i do not want the image behind it to be well defined. The effect i am after is similar to the Windows Vista window border effect, where you can see that something is behind it but you cant tell what it is. A few clarifications: I am working on Windows XP, so i cant use Vista Glass I need this solution to be portable across any windows platform Any help would be appreciated :)

    Read the article

  • Nearmap architecture

    - by portoalet
    Looking at http://www.nearmap.com/, Just wondering if you can approximate how much storage is needed to store the images? (NearMap’s monthly city PhotoMaps are captured at 3cm, 5cm, 7.5cm, or 10cm resolution) And what kind of systems/architecture is suitable to deliver those data/images? (say you are not Google, and want to implement this from scratch, what would you do? ) ie. would you store the images in Hadoop, and use memcache to deliver etc ?

    Read the article

  • Function doesn't work, but it must work

    - by Artem
    private void Main_OnLayoutUpdated(object sender, EventArgs e) { label1.Content = Classes.Global.X.ToString(); Classes.Global.PositionChanged(this); } PositionChanged writes to X new x-position of window. It works, but as soon as I delete label1 it stops working. No errors.

    Read the article

  • Flashvar to included swf (in php)

    - by Chris
    How to pass a flashvar when I include the swf (to make an embedded player) Something like this does not work.. theme-basePath.'/swf/ebook.swf?xml="test"'; header("Content-Type: application/x-shockwave-flash"); readfile($player); ?

    Read the article

  • Subversion has --record-only for merges, how do I do the same in Git ?

    - by Paul Hammant
    I have a repo where 'master' is going in a certain direction, and a second branch 'foo' is going to be divergent for a couple of commits, then track all subsequent changes to 'master' after that. This is all by choice of course. In Subversion you could do a --record-only merge to mark things as "merge has happened" even though no actual changes were committed. i.e. this change the merge-tracking numbers in properties attached to directories in the target branch. I have had a play with.. git merge --no-commit master .. as something I may be able to tinker with before I do the commit, but it is making a hell of a mess of the target branch for part of the change in question (rename followed by delete). There must be an easier way.. ? Paul

    Read the article

  • iPhone OS: Posting an image + text "story" to a user's news feed through the facebook api

    - by nickthedude
    So what I am trying to do is post an image that has been created by a user on an iphone into that users newsfeed. The functionality I am having a hard time understanding if it is possible: Can I pass a local NSURL (or URL?)(to a png file that lives in the documents folder) through a JSON string and onto Facebook? i want to mimic the action of a user going to his/her facebook page, clicking into the textfield for their newsfeeld, uploading an image by clicking the "photos" icon and selecting an image from a local disk and uploading it. I would also like to add some text into the post optionally. I'm just getting started with the Facebook api and it seems pretty tough right now, any help would be appreciated. code examples appreciated. Thanks, Nick

    Read the article

  • Upload Large files(1GB)-ASP.net

    - by Ramya Raj
    I need to upload large files of atleast 1GB file size. I am using ASP.Net, C# and IIS 5.1 as my development platform. I am using HIF.PostedFile.InputStream.Read(fileBytes,0,HIF.PostedFile.ContentLength) before using File.WriteAllBytes(filePath, fileByteArray)(doesnt go here but gives System.OutOfMemoryException' exception) Currently i have set the httpRuntime to executionTimeout="999999" maxRequestLength="2097151"(thats 2GB!) useFullyQualifiedRedirectUrl="true" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="5000" enableVersionHeader="true" requestLengthDiskThreshold="8192" Also i have set maxAllowedContentLength="2097151" (guess its only for IIS7) I have changed IIS connection timeout to 999,999 secs too. I am unable to upload files of even 4578KB(Ajaz-Uploader.zip)

    Read the article

  • Multi-property "transactions" in Core Data / NSManagedObject / NSFetchedResultsController?

    - by Martijn Thé
    Hi, Is it possible to set multiple properties of an NSManagedObject and have the NSFetchedResultsController call controllerDidChangeContent: only once? In other words, is it possible to say something like: [managedObject beginChanges]; [managedObject setPropertyA:@"Foo"]; [managedObject setPropertyB:@"Bar"]; [managedObject commitChanges]; and then have the NSFetchedResultsController call controllerDidChangeContent: (and the other methods) only one time? Thanks!

    Read the article

  • Basic compile issue with QT4

    - by Cobus Kruger
    I've been trying to get a dead simple listing from a university textbook to compile with the newest QT SDK for Windows I downloaded last night. After struggling through the regular nonsense (no make.bat, need to manually add environment variables and so on) I am finally at the point where I can build. But only one of the two libraries seem to work. The .pro file I use is dead simple: SUBDIRS += utils \ dataobjects TEMPLATE = subdirs In each of these two subfolders I have the source for a library. Running QMAKE generates a makefile and running Make runs through all the preliminaries and then fails on the g++ call: g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc --out-implib,libdataobjects.a -shared -mthreads -Wl -Wl,--out-implib,c:\Users\Cobus\workspace\lib\libdataobjects.a -o ..\..\lib\dataobjects.dll object_script.dataobjects.Debug -L"c:\Users\Cobus\Portab~1\Qt\2010.02.1\qt\lib" -LC:\Users\Cobus\workspace\lib -lutils -lQtXmld4 -lQtGuid4 -lQtCored4 c:/users/cobus/portab~1/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lutils The problem seems to be right near the end of the command line, where -lutils is added, indicating that there is a library by the name of utils. While I would have expected to see that, you'll notice the library names after --out include lib in the name, so they become libutils and libdataobjects. I have tried to figure out why this is happening, to no avail. Anyone have an idea what's going on?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >