Daily Archives

Articles indexed Monday March 22 2010

Page 12/125 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Objectiveflickr set properties, more than one call

    - by user295944
    I cant to set Meta and set Location in ObjectiveFlickr if I do only one it works fine, but if I do both it only does the first one - (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didCompleteWithResponse:(NSDictionary *)inResponseDictionary { NSLog(@"%s %@ %@", PRETTY_FUNCTION, inRequest.sessionInfo, inResponseDictionary); if (inRequest.sessionInfo == kUploadImageStep) { snapPictureDescriptionLabel.text = @"Setting properties..."; NSLog(@"%@", inResponseDictionary); NSString *photoID = [[inResponseDictionary valueForKeyPath:@"photoid"] textContent]; flickrRequest.sessionInfo = kSetImagePropertiesStep; [flickrRequest callAPIMethodWithPOST:@"flickr.photos.setMeta" arguments:[NSDictionary dictionaryWithObjectsAndKeys:photoID, @"photo_id", @"Snap and Run", @"title", @"Uploaded from my iPhone/iPod Touch", @"description", nil]]; flickrRequest.sessionInfo = kSetImagePropertiesStep; [flickrRequest callAPIMethodWithPOST:@"flickr.photos.geo.setLocation" arguments:[NSDictionary dictionaryWithObjectsAndKeys:photoID, @"photo_id",@"34" ,@"lat",@"-118",@"lon", nil]]; } else if (inRequest.sessionInfo == kSetImagePropertiesStep) { [self updateUserInterface:nil]; snapPictureDescriptionLabel.text = @"Done"; [UIApplication sharedApplication].idleTimerDisabled = NO; } }

    Read the article

  • Java frameworks vs. Javascript frameworks

    - by the_drow
    I am a big fan of the Dojo Toolkit but I see here often that there are Java frameworks that do the same thing but they are not as extensive or as user friendly as Dojo in my opinion. What are the main differences? Can I use Dojo for the GUI and Java as the back-end? Is there a list of Java frameworks for web development?

    Read the article

  • PHP Form Validation Regular Expression, no symbols or numbers

    - by MrEnder
    Ok I am trying to get the users First Name the form gets their name perfectly fine and posts it into a variable. Now I am trying to do error checking else if(!preg_match("/^[\w-]+$/", $firstNameSignup)) { $firstNameSignupError = "Your first name cannot contain numbers or symbols, you entered " . $firstNameSignup; $firstNameSignup = ""; } I tried the above code and it does not like me but my if statement if(!isset($firstNameSignup) || $firstNameSignup == "") { $firstNameSignupError = "You must enter your first name"; } works fine so I know that the error is in that else if statement... most likely in my regular expression any help??? I'm totally at a loss (really new to PHP and regular expressions) Thanks Shelby

    Read the article

  • How do I reset a form in an ajax callback?

    - by B.Gordon
    I am sending a form using simple ajax and returning the results in a div above the form. The problem is that after the form is submitted and validated, I display a thank you and want to reset the form so they don't just press the submit button again... Can't seem to find the right code to do this... <form id="myForm" target="sendemail.php" method="post"> <div id="results"></div> <input type="text" name="value1"> <input type="text" name="value2"> <input type="submit" name="submit"> </form> So, my sendemail.php validation errors and success messages appear in #results without problems. But... when I try to send back a javascript form reset command, it does not work. Naturally I cannot see it in the source code since it is an AJAX callback so I don't know if that is the issue or if I am just using the wrong syntax. echo "<p>Thank you. Your message has been accepted for delivery.</p>"; echo "<script type=\"text/javascript\">setTimeout('document.getElementById('myForm').reset();',1000);</script>"; Any ideas gurus?

    Read the article

  • Extending Django-tagging, adding extra field to each tag?

    - by victorhooi
    heya, We're coding together a Django app to handle reviews of newspaper articles. Each newspaper article model will an arbitrary number of tags associated with it. Also, each tag will have an optional ranking (0 to 10). I was thinking of using django-tagging to do this (http://code.google.com/p/django-tagging/), but I'm not sure of the best way to add the ranking to the system. Should I extend django-tagging somehow? (Not sure if this is possible, without changing django-tagging's actual code?). Or is there a better way of achieving this? Cheers, Victor

    Read the article

  • Traffic Shaping using tc

    - by Simon
    Hi guys, I have a 1.5 Mbit/s link that i want to share with 150 users. My setup is the following: Linux box with 3 NICs eth0 - public ip eth1 - subnet A - 50 users (static ips) eth2 - subnet B - 100 users (via dhcp) I am using squid as a transparent proxy on port 3128. dhcp server using ports 67 and 68. I was creating, but I think packets are not going to the right queues #!/bin/bash DEV=eth0 RATE_MAIN=2048kbit CEIL_MAIN=2048kbit BURST=1b CBURST=1b RATE_DEFAULT=1024kbit CEIL_DEFAULT=$CEIL_MAIN PRIO_DEFAULT=3 RATE_P2P=1024Kbit CEIL_P2P=$CEIL_MAIN PRIO_P2P=4 RATE_IND=32kbit CEIL_IND=$CEIL_DEFAULT tc qdisc del dev $DEV root tc qdisc add dev $DEV root handle 1: htb default 30 tc class add dev $DEV parent 1: classid 1:1 htb rate $RATE_MAIN ceil $CEIL_MAIN tc class add dev $DEV parent 1:1 classid 1:10 htb rate $RATE_DEFAULT ceil $CEIL_MAIN burst $BURST cburst $CBURST prio $PRIO_WEB ## some other sub class for p2p other traffic tc class add dev $DEV parent 1:1 classid 1:20 htb rate $RATE_P2P ceil $CEIL_P2P burst $BURST cburst $CBURST prio $PRIO_P2P $IPS_NET1=50 $IPS_NET2=100 let $IPS=$IPS_NET1+$IPS_NET2 for ((i=1; i<= $IPS; i++)) do let CLASSID=($i+100) let HANDLE=($i+100) tc class add dev $DEV parent 1:10 classid 1:$CLASSID htb rate $RATE_IND ceil $CEIL_IND tc qdisc add dev $DEV parent 1:$CLASSID handle $HANDLE: sfq perturb 10 done ## Generate IP addresses ## IP_ADDRESSES="" # Subnet A BASE_IP=10.10.10. for ((i=2; i<=$IPS_NET1+1; i++)) do TEMP="$BASE_IP$i" IP=ADDRESSES="$IP_ADDRESSES $TEMP" done # Subnet B BASE_IP=192.168.0. for ((i=2; i<=$IPS_NET2+1; i++)) do TEMP="$BASE_IP$i" IP_ADDRESSES="$IP_ADDRESSES $TEMP" done ## FILTERS ## j=1 U32="tc filter add dev $DEV protocol ip parent 1:0 prio $PRIO_DEFAULT u32" for NET in $IP_ADDRESSES; do let CLASSID=($j+100) $U32_DEFAULT match ip src $NET/32 flowid 1:$CLASSID $U32_DEFAULT match ip dst $NET/32 flowid 1:$CLASSID let j=j+1 done Can you guys help me figure out what's wrong with it? basically I want my classes to be 1:1 (1.5 Mbit ) 1:10 (1024 Kbit) 1:20 (1024 Kbit) (200 ips each with 32 kbit)

    Read the article

  • How to make web icon open with specific browser?

    - by David
    I have an icon on my desktop for a website called QUAKE LIVE and I use Google Chrome as my default browser. The website isn't compatible with Google Chrome, but it with Mozilla Firefox. Is there any way to edit the properties of the icon to open with Firefox instead of Chrome?

    Read the article

  • Are there any 5.1 surround audio switches on the market?

    - by thepurplepixel
    (Somewhat related to this question) I have a set of Logitech 5.1 surround speakers, which use 3 stereo 3.5mm TRS connectors (minijacks) to transfer the audio (the typical green/black/orange audio outputs). I have a Griffin Firewave hooked up to my MacBook Pro, and my desktop has a Realtek ALC889 audio chipset. I have looked for a way to, essentially, switch the speaker inputs between my Firewave and my desktop without having to disconnect the cables from one, route them around my desk, and plug them into the other. I'd love to have something like an old Belkin DB-25/LPT switch, but for these audio cables. Of course, purchasing one and soldering my own cables on the connection terminals is always an option, but, is there a reasonably priced 5.1 audio switch (or 3x stereo) on the market that will accomplish the simple task of switching audio outputs between two computers into a set of 5.1 speakers? Thanks in advance!

    Read the article

  • Is there a way to tag MP3 the way you can do with Photos in Live Photo Gallery or Picazza?

    - by bangoker
    I really do love the way you can tag pictures in Windows Live Photo Gallery. I find it incredibly useful to be able to tag the same picture with the tag "Cancun" and have it been automatically included when I look for the tag "Beach", "Trips" and "Fun Pic", since its a child tag of the former and also has a tag for the later. I also like that I can look for rating in the pics. On the other side, tagging MP3 has always been a pain in the ass, because I just find it to hard to classify music! Is it pop? techno? techno-pop? rock? indie-rock? indie-post-classic-pop-techno? I hate how ID3 just have one tag for genre, so I've tried tricks like putting all the genres I think it fits into, and then having lists in Winamp (which I dont use anymore) that filter out words in the ID3 tags (ie, Tag: Genre, Contains: Rock = rock list). But then, what about moods? I want to be able to tag my songs in genres and in moods, you know, happy, concentrate/work, party, romantic (wink wink), etc. Is there any way to do this, preferably in a way in which tags could carry on to other music players? Thanks

    Read the article

  • Lenovo T400S microphone mute button doesn't seem to be working in Windows 7 RTM

    - by spoon16
    The microphone mute button is not working on my T400s running Windows 7 RTM. The speaker mute button works (when I press it the light comes on and sounds goes off). When I click on the microphone button the light doesn't come on and the microphones don't mute. Is there a drive I am missing or something? I can't find a drive for the button on Lenovo site. Anyone out there have this button working?

    Read the article

  • How do I set the title of Terminal.app with the fish shell?

    - by lorin
    I'm trying the fish shell in Mac OS X, intalled using MacPorts. I'd like to have the title of my Terminal window be my current directory. Currently, the title just says Terminal - fish - 80x24 According to the fish documentation, the default fish_title function should provide this behavior. It doesn't do the right thing in Terminal.app, although it does work with iTerm. Defining my own fish_title function doesn't fix the problem. Has anybody been able to get this to work?

    Read the article

  • Piping a bash variable into awk and storing the output

    - by Andrew Smith
    Hello, To illustrate my problem, TEST="Hi my name is John" OUTP=`echo $TEST | awk '{print $3}'` echo $OUTP What I would expect this to do is pass the $TEST variable into awk and store the 3rd word into $OUTP. Instead I get "Hi: not found", as if it is expecting the input to be a file. If I pass just a string instead of a variable, however, there is no problem. What would be the best way to approach this? Thanks all!

    Read the article

  • Content for fans and non fans fbml?

    - by Jamie redmond
    I know that using fb:visible-to-conection allows you to display content to fans but how do I hide content from fans? Example if I have "you must be fan to view this" how do I remove that text when they are a fan? I'm using static fbml app btw. Any help appreciated.

    Read the article

  • Slimbox 2 Plugin, jQuery Flickr, and IE8

    - by Nick H.
    Hello, I am currently developing a site that I make use of two jQuery plugins: Flickr jquery plugin (http://code.google.com/p/jquery-flickr/) Slimbox (http://code.google.com/p/slimbox/) The first plugin is used to pull in flickr photos from a specific account. These photos are displayed as thumbnails on the page. I am then using the second plugin to display larger views of these images. Because the flickr photos are fetched when the page loads, I am calling the Slimbox 2 function like this: $(document).ready(function() { $("#Flickr").flickr(); //Call Flickr plugin $(window).bind('load', function() { $("#Flickr a").slimbox();//Call Slimbox2 }); }); On first testing this seemed to have worked perfectly. I tested multiple versions of FireFox, IE7, IE6, and Safari. Everything is great. However, the Slimbox lightbox effest does not work in IE8. However, if I put IE8 into compatibility mode, everything works as expected. I would like to avoid forcing compatibility mode. There are no javascript errors and I am at a loss for testing. Here is a link to a sample: http://www.njhall.com/JRMcCourt-Builders/index.html#ourwork Any advice would be greatly appreciated. Thanks Nick

    Read the article

  • Good places to share and showcase software on the web?

    - by jay
    Quite simply: is there a place such as DeviantArt, but purely for the purpose of sharing software (and source if preferred)? I'm aware that DA has plenty of software, but only related to customisations and UI hacks. I recently came across some really useful apps I had made from way back and besides posting it on an online code hosting site or a personal portfolio that no one will ever find, is there some more community-ish places on the internet I've missed out on where coding mercenaries share and show off?

    Read the article

  • Pros and Cons of automating Excel using VBA vs .Net

    - by Andy
    I've been tasked with creating a financial planning tool in Excel that would benefit from some custom functions/macros. My initial reaction was to use VBA. I've used it to drive Excel before (say 5 years ago). But I then began to wonder if I would be better off using VSTO. Has anyone has experience using both techs and can list the pros and cons so that I can evaluate which course would be best.

    Read the article

  • Rotate UIViewController to counteract changes in UIInterfaceOrientation

    - by Peter Hajas
    Hi there, I've been searching a lot on this, and can't find anything to help me. I have a UIViewController contained within another UIViewController. When the parent UIViewController rotates, say from Portrait to LandscapeLeft, I want to make it look as though the child didn't rotate. That is to say. I want the child to have the same orientation to the sky regardless of the parent's orientation. If it has a UIButton that's upright in Portrait, I want the right-side of the button to be "up" in UIInterfaceOrientationLandscapeLeft. Is this possible? Currently, I'm doing really gross stuff like this: -(void) rotate:(UIInterfaceOrientation)fromOrientation: toOr:(UIInterfaceOrientation)toOrientation { if(((fromOrientation == UIInterfaceOrientationPortrait) && (toOrientation == UIInterfaceOrientationLandscapeRight)) || ((fromOrientation == UIInterfaceOrientationPortraitUpsideDown) && (toOrientation == UIInterfaceOrientationLandscapeLeft))) { } if(((fromOrientation == UIInterfaceOrientationLandscapeRight) && (toOrientation == UIInterfaceOrientationPortraitUpsideDown)) || ((fromOrientation == UIInterfaceOrientationLandscapeLeft) && (toOrientation == UIInterfaceOrientationPortrait))) { } if(((fromOrientation == UIInterfaceOrientationPortrait) && (toOrientation == UIInterfaceOrientationLandscapeLeft)) || ((fromOrientation == UIInterfaceOrientationPortraitUpsideDown) && (toOrientation == UIInterfaceOrientationLandscapeRight))) { } if(((fromOrientation == UIInterfaceOrientationLandscapeLeft) && (toOrientation == UIInterfaceOrientationPortraitUpsideDown)) || ((fromOrientation == UIInterfaceOrientationLandscapeRight) && (toOrientation == UIInterfaceOrientationPortrait))) { } if(((fromOrientation == UIInterfaceOrientationPortrait) && (toOrientation == UIInterfaceOrientationPortraitUpsideDown)) || ((fromOrientation == UIInterfaceOrientationPortraitUpsideDown) && (toOrientation == UIInterfaceOrientationPortrait))) { } if(((fromOrientation == UIInterfaceOrientationLandscapeLeft) && (toOrientation == UIInterfaceOrientationLandscapeRight)) || ((fromOrientation == UIInterfaceOrientationLandscapeRight) && (toOrientation == UIInterfaceOrientationLandscapeLeft))) { } } which seems like a perfectly good waste of code. Furthermore, I was planning on using CGAffineTransform (like cited here: http://www.crystalminds.nl/?p=1102) but I'm confused about whether I should change the view's dimensions to match what they will be after the rotation. The big nightmare here is that you have to keep track of a global "orientation" variable. If you don't, the illusion is lost and the ViewController is rotated into whatever. I could really use some help on this, thanks!

    Read the article

  • Setting Grouping in UITableView under UINavigationController

    - by climbon
    In my UINavigationController app, my first view is a UITableView. I can't seem to find a way to set the property of this UITableView to 'grouped'. Since UITableView is dynamically generated I don't have the luxury of Interface Builder. Searched forums here and googled other places and closest I saw was to override either initWithStyle or initWithCoder as follows. (id)initWithStyle:(UITableViewStyle)style { if (self = [super initWithStyle:UITableViewStyleGrouped]) { } return self; } However this above function never gets called. when I overrided initWithCoder I could see it worked and I was able to change UITableView contents to grouped. But then title automatically became 'Root View Controller' and none of the cells were active anymore although they got grouped fine. That is while they looked active but if you click on them, those cells won't do anything. But I have seen apps which have their very first view being UITableView is grouped. So there must be a way to do it but I don't know how.

    Read the article

  • How do I remove implementing types from GWT’s Serialization Policy?

    - by Bluu
    The opposite of this question: http://stackoverflow.com/questions/138099/how-do-i-add-a-type-to-gwts-serialization-policy-whitelist GWT is adding undesired types to the serialization policy and bloating my JS. How do I trim my GWT whitelist by hand? Or should I at all? For example, if I put the interface List on a GWT RPC service class, GWT has to generate Javascript that handles ArrayList, LinkedList, Stack, Vector, ... even though my team knows we're only ever going to return an ArrayList. I could just make the method's return type ArrayList, but I like relying on an interface rather than a specific implementation. After all, maybe one day we will switch it up and return e.g. a LinkedList. In that case, I'd like to force the GWT serialization policy to compile for only ArrayList and LinkedList. No Stacks or Vectors. These implicit restrictions have one huge downside I can think of: a new member of the team starts returning Vectors, which will be a runtime error. So besides the question in the title, what is your experience designing around this?

    Read the article

  • cancel a ASIHTTPRequest thread

    - by user262325
    Hello evryone I have some codes to use ASINetworkQueue as multi thread download ASINetworkQueue *networkQueue; [networkQueue setDelegate:self]; [networkQueue setRequestDidFinishSelector:@selector(requestDone:)]; [networkQueue setShowAccurateProgress:true]; NSURL *url = [NSURL URLWithString:s]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDownloadProgressDelegate:a]; [request setTag:index]; [request setTimeOutSeconds:10]; [request setDelegate:self]; [networkQueue addOperation:request]; [networkQueue go]; if I try to use the code below to cancel the thread with index k [[[networkQueue operations] objectAtIndex:k] cancel]; I notice all requests in ASINetworkQueue were cancelled and stop working. Welcome any comment Thanks interdev

    Read the article

  • Issue reading packets from a pcap file. dpkt module. What gives?

    - by Chris
    I am running the following test script to try to read packets from a sample .pcap file I have downloaded. It won't seem to run. I have all of the modules, but no examples seem to be running. import socket import dpkt import sys pcapReader = dpkt.pcap.Reader(file("test1.pcap", "rb")) for ts, data in pcapReader: ether = dpkt.ethernet.Ethernet(data) if ether.type != dpkt.ethernet.ETH_TYPE_IP: raise ip = ether.data src = socket.inet_ntoa(ip.src) dst = socket.inet_ntoa(ip.dst) print "%s -> %s" % (src, dst) For some reason, this is not being interpreted properly. When running it, I get KeyError: 138 module body in test.py at line 4 function __init__ in pcap.py at line 105 Program exited. Why is this? What's wrong?

    Read the article

  • Does this data structure have a name? Sort of a "linked matrix"?

    - by Bob
    Let's say I wanted similar functionality to a doubly linked list but needed a matrix instead so that each node was structured like this: public class Node { Node Up, Down, Left, Right; object Value; } Is there a name for such a structure? I've looked through this Wikipedia listing of data structures but didn't see anything similar. Unless I just missed it.

    Read the article

  • Hanging page loads every n loads

    - by Christian
    Hi Guys I recently moved my site to a new server (Apache 2, PHP5, MySQL5). The site is an Invision based forum. Every few posts / topics it just hangs. The data has been written because if you stop and reload, the post / thread is there. I thought it was a write issue initially, but nope. So, the data is written but the page load never completes. It doesn't leave the page where the data has been input. Whats the best way to trouble shoot this issue? The only thing I have done recently is reduce my MySQL timeouts, but I can't see that being an issue as the values are still big enough and there are no mentions of timeouts in the MySQL log. (For the record there is nothing in PHP's error log either) Thanks in advance!

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >