Search Results

Search found 2451 results on 99 pages for 'friend'.

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

  • How to prove writing specifications beats code cowboys?

    - by Andrew Grant
    So I have a problem. Or rather my friend has a problem, since I would never write about my company on an internet forum. At my friend's company specification writing is, shall we say, a little underused. There's a deeply ingrained culture of writing code first and asking questions later, whether it's for a library routine or a new tool to inflict on their long suffering designers. This of course leads to situations where functionality is partially correct, incorrect, or just completely missing ("oh, just save before trying anything you may want to undo"). This usually results in a loss of productivity for those poor designers, or beta periods where bug-fixing is largely spent implementing things correctly. My friend's found his suggestions of writing (and testing against) specifications to be generally well received. Most of his colleagues have embraced the wonderful feeling of discovering false-assumptions on paper, instead of at 11pm on a Sunday in the middle of beta. Viva La Revolution! However there are a few who poo-poo anything that stands between their task and a keyboard. They laugh at the thought of actually designing anything, and write code with merry abandon. Mostly these are senior, long employed developers, reluctant to "waste time". The problem is that this second group of heretics invariably produce things (or at least something) quicker than the first. Subsequently this becomes justification along the lines of "It's pointless to write specifications for something as simple as an image resizer! Oh and those bugs where width!=height or the image uses RLE just need a few tweaks". And now the question :) Other than saying "told you so" at the end of a project, what are some good short-term ways to demonstrate how the practice of writing functional or technical specifications leads to better software in the long run? Cheers!

    Read the article

  • Hello i am using the android code to connect facebook but getting "Facebook Server Error + 104 - Inc

    - by Shalini Singh
    Hello i am using the android code to connect facebook but getting "Facebook Server Error + 104 - Incorrect signature" exception at the place of onLoginSuccess function. code is given bellow .... public class FacebookConnection extends Activity implements LoginListener { private FBRocket fbRocket; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // You need to put in your Facebook API key here: fbRocket = new FBRocket(this, "test", "e2c8deda78b007466c54f48e6359e02e"); // Determine whether there exists a previously-saved Facebook: if (fbRocket.existsSavedFacebook()) { String str =fbRocket.getAPIKey(); Log.e("Api key", str); fbRocket.loadFacebook(); } else { fbRocket.login(R.layout.main); String str =fbRocket.getAPIKey(); Log.e("Api key", str); } } public void onLoginFail() { fbRocket.displayToast("Login failed!"); fbRocket.login(R.layout.main); } public void onLoginSuccess(Facebook facebook) { fbRocket.displayToast("Login success!******************"); // Set the logged-in user's status: try { facebook.setStatus("I am using Facebook -- it's great!"); String uid = facebook.getFriendUIDs().get(0); // Just get the uid of the first friend returned... fbRocket.displayDialog("Friend's name: " + facebook.getFriend(uid).name); // ... and retrieve this friend's name. } catch (ServerErrorException e) { // Check if the exception was caused by not being logged-in: if (e.notLoggedIn()) { // ...if it was, then login again: fbRocket.login(R.layout.main); } else { System.out.println(e); e.printStackTrace(); } } }

    Read the article

  • TypeError: coercing to Unicode: need string or buffer, User found

    - by Clemens
    hi, i have to crawl last.fm for users (university exercise). I'm new to python and get following error: Traceback (most recent call last): File "crawler.py", line 23, in <module> for f in user_.get_friends(limit='200'): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylast.py", line 2717, in get_friends for node in _collect_nodes(limit, self, "user.getFriends", False): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylast.py", line 3409, in _collect_nodes doc = sender._request(method_name, cacheable, params) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylast.py", line 969, in _request return _Request(self.network, method_name, params).execute(cacheable) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylast.py", line 721, in __init__ self.sign_it() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylast.py", line 727, in sign_it self.params['api_sig'] = self._get_signature() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylast.py", line 740, in _get_signature string += self.params[name] TypeError: coercing to Unicode: need string or buffer, User found i use the pylast lib for crawling. what i want to do: i want to get a users friends and the friends of the users friends. the error occurs, when i have a for loop in another for loop. here's the code: network = pylast.get_lastfm_network(api_key = API_KEY, api_secret = API_SECRET, username = username, password_hash = password_hash) user = network.get_user("vidarnelson") friends = user.get_friends(limit='200') i = 1 for friend in friends: user_ = network.get_user(friend) print '#%d %s' % (i, friend) i = i + 1 for f in user_.get_friends(limit='200'): print f any advice? thanks in advance. regards!

    Read the article

  • can I make this select follower/following script more organized? (PHP/Mysql)

    - by ggfan
    In this script, it gets the followers of a user and the people the user is following. Is there a better relationship/database structure to get a user's followers and who they are following? All I have right now is 2 columns to determine their relationship. I feel this is "too simple"? (MYSQL) USER | FRIEND avian gary cend gary gary avian mike gary (PHP) $followers = array(); $followings = array(); $view = $_SESSION['user']; //view is the person logged in $query = "SELECT * FROM friends WHERE user='$view'"; $result = $db->query($query); while($row=$result->fetch_array()) { $follower=$row['friend']; $followers[] = $follower; } print_r($followers); echo "<br/>"; $query2 = "SELECT * FROM friends WHERE friend='$view'"; $result2 = $db->query($query2); while($row2=$result2->fetch_array()) { $following=$row2['user']; $followings[] = $following; } print_r($followings); echo "<br/>"; $mutual = array_intersect($followers, $followings); print_r($mutual); **DISPLAY** Your mutual friends avian Your followers avian You are following avian cen mike (I know avian is in all 3 displays, but I want to keep it that way)

    Read the article

  • Understanding Hibernate saveOrUpdate

    - by Stephano
    The books that I've read regarding hibernate are, at best, reference tomes. They very seldom have good code examples, so I tend to use online resources for those needs. However, I've always had a problem understanding the basic idea of hibernate persistence. I've read the books and understand the concepts, but in practice, I often see results that I don't understand. Perhaps you all can help, as you have in the past. Let's look at a simple example of a dog and a cat that are friends. This isn't a rare occurrence. It also has the benefit of being much more interesting than my business case. We want a function called "saveFriends" that takes a dog name and a cat name. We'll save the Dog and then the Cat. For this example to work, the cat is going to have a reference back to the dog. I understand this isn't an ideal example, but it's cute and works for our purposes. FriendService.java public int saveFriends(String dogName, String catName) { Dog fido = new Dog(); Cat felix = new Cat(); fido.name = dogName; fido = animalDao.saveDog(fido); felix.name = catName; [ex.A]felix.friend = fido; [ex.B]felix.friend = animalDao.getDogByName(dogName); animalDao.saveCat(felix); } AnimalDao.java (extends HibernateDaoSupport) public Dog saveDog(Dog dog) { getHibernateTemplate().saveOrUpdate(dog); return dog } public Cat saveCat(Cat cat) { getHibernateTemplate().saveOrUpdate(cat); return cat; } public Dog getDogByName(String name) { return (Dog) getHibernateTemplate().find("from Dog where name=?", name).get(0); } Now, assume for a minute that I would like to use either example A or example B to save my friend. Is one better than the other to use? I'll understand if neither of those examples work, but please explain why.

    Read the article

  • Custom types as key for a map - C++

    - by Appu
    I am trying to assign a custom type as a key for std::map. Here is the type which I am using as key. struct Foo { Foo(std::string s) : foo_value(s){} bool operator<(const Foo& foo1) { return foo_value < foo1.foo_value; } bool operator>(const Foo& foo1) { return foo_value > foo1.foo_value; } std::string foo_value; }; When used with std::map, I am getting the following error. error C2678: binary '<' : no operator found which takes a left-hand operand of type 'const Foo' (or there is no acceptable conversion) c:\program files\microsoft visual studio 8\vc\include\functional 143 If I change the struct like the below, everything worked. struct Foo { Foo(std::string s) : foo_value(s) {} friend bool operator<(const Foo& foo,const Foo& foo1) { return foo.foo_value < foo1.foo_value; } friend bool operator>(const Foo& foo,const Foo& foo1) { return foo.foo_value > foo1.foo_value; } std::string foo_value; }; Nothing changed except making the operator overloads as friend. I am wondering why my first code is not working? Any thoughts?

    Read the article

  • Extension methods for encapsulation and reusability

    - by tzaman
    In C++ programming, it's generally considered good practice to "prefer non-member non-friend functions" instead of instance methods. This has been recommended by Scott Meyers in this classic Dr. Dobbs article, and repeated by Herb Sutter and Andrei Alexandrescu in C++ Coding Standards (item 44); the general argument being that if a function can do its job solely by relying on the public interface exposed by the class, it actually increases encapsulation to have it be external. While this confuses the "packaging" of the class to some extent, the benefits are generally considered worth it. Now, ever since I've started programming in C#, I've had a feeling that here is the ultimate expression of the concept that they're trying to achieve with "non-member, non-friend functions that are part of a class interface". C# adds two crucial components to the mix - the first being interfaces, and the second extension methods: Interfaces allow a class to formally specify their public contract, the methods and properties that they're exposing to the world. Any other class can choose to implement the same interface and fulfill that same contract. Extension methods can be defined on an interface, providing any functionality that can be implemented via the interface to all implementers automatically. And best of all, because of the "instance syntax" sugar and IDE support, they can be called the same way as any other instance method, eliminating the cognitive overhead! So you get the encapsulation benefits of "non-member, non-friend" functions with the convenience of members. Seems like the best of both worlds to me; the .NET library itself providing a shining example in LINQ. However, everywhere I look I see people warning against extension method overuse; even the MSDN page itself states: In general, we recommend that you implement extension methods sparingly and only when you have to. So what's the verdict? Are extension methods the acme of encapsulation and code reuse, or am I just deluding myself?

    Read the article

  • Understanding Hibernate saveOrUpdate and the Persistence Life Cycle

    - by Stephano
    The books that I've read regarding hibernate are, at best, reference tomes. They very seldom have good code examples, so I tend to use online resources for those needs. However, I've always had a problem understanding the basic idea of hibernate persistence. I've read the books and understand the concepts, but in practice, I often see results that I don't understand. Perhaps you all can help, as you have in the past. Let's look at a simple example of a dog and a cat that are friends. This isn't a rare occurrence. It also has the benefit of being much more interesting than my business case. We want a function called "saveFriends" that takes a dog name and a cat name. We'll save the Dog and then the Cat. For this example to work, the cat is going to have a reference back to the dog. I understand this isn't an ideal example, but it's cute and works for our purposes. FriendService.java public int saveFriends(String dogName, String catName) { Dog fido = new Dog(); Cat felix = new Cat(); fido.name = dogName; fido = animalDao.saveDog(fido); felix.name = catName; [ex.A]felix.friend = fido; [ex.B]felix.friend = animalDao.getDogByName(dogName); animalDao.saveCat(felix); } AnimalDao.java (extends HibernateDaoSupport) public Dog saveDog(Dog dog) { getHibernateTemplate().saveOrUpdate(dog); return dog } public Cat saveCat(Cat cat) { getHibernateTemplate().saveOrUpdate(cat); return cat; } public Dog getDogByName(String name) { return (Dog) getHibernateTemplate().find("from Dog where name=?", name).get(0); } Now, assume for a minute that I would like to use either example A or example B to save my friend. Is one better than the other to use? I'll understand if neither of those examples work, but please explain why.

    Read the article

  • Visual C++ doesn't operator<< overload

    - by PierreBdR
    I have a vector class that I want to be able to input/output from a QTextStream object. The forward declaration of my vector class is: namespace util { template <size_t dim, typename T> class Vector; } I define the operator<< as: namespace util { template <size_t dim, typename T> QTextStream& operator<<(QTextStream& out, const util::Vector<dim,T>& vec) { ... } template <size_t dim, typename T> QTextStream& operator>>(QTextStream& in,util::Vector<dim,T>& vec) { .. } } However, if I ty to use these operators, Visual C++ returns this error: error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'QTextStream' (or there is no acceptable conversion) A few things I tried: Originaly, the methods were defined as friends of the template, and it is working fine this way with g++. The methods have been moved outside the namespace util I changed the definition of the templates to fit what I found on various Visual C++ websites. The original friend declaration is: friend QTextStream& operator>>(QTextStream& ss, Vector& in) { ... } The "Visual C++ adapted" version is: friend QTextStream& operator>> <dim,T>(QTextStream& ss, Vector<dim,T>& in); with the function pre-declared before the class and implemented after. I checked the file is correctly included using: #pragma message ("Including vector header") And everything seems fine. Doesn anyone has any idea what might be wrong?

    Read the article

  • template warnings and error help, (gcc)

    - by sil3nt
    Hi there, I'm working on an container class template (for int,bool,strings etc), and I've been stuck with this error cont.h:56: error: expected initializer before '&' token for this section template <typename T> const Container & Container<T>::operator=(const Container<T> & rightCont){ what exactly have I done wrong there?. Also not sure what this warning message means. cont.h:13: warning: friend declaration `bool operator==(const Container<T>&, const Container<T>&)' declares a non-template function cont.h:13: warning: (if this is not what you intended, make sure the function template has already been declared and add <> after the function name here) -Wno-non-template-friend disables this warning at this position template <typename T> class Container{ friend bool operator==(const Container<T> &rhs,const Container<T> &lhs); public:

    Read the article

  • FBML wallpost by clicking on image or button

    - by psaha
    Hello, I'm creating one facebook application with FBML. What I want is: I have several images like, <fb:tag name="img"> <fb:tag-attribute name="src">http://My_Img_Url_1.jpg</fb:tag-attribute> </fb:tag> <fb:tag name="img"> <fb:tag-attribute name="src">http://My_Img_Url_2.jpg</fb:tag-attribute> </fb:tag> While I click on the image it should open one popup "post to wall" or "Post to your Friend's wall" with the corresponding image My_Img_Url_n.jpg. I can use FBML share button like: METHOD-1 <fb:share-button class="meta"> <meta name="title" content="Image_TITLE"/> <meta name="description" content="Image_Descrip"/> <link rel="image_src" href="http://My_Img_Url_1.jpg"/> <link rel="target_url" href="Some_Target_URL"/> </fb:share-button> OR, METHOD-2: I can call fb:ui <script> FB.init({ appId:'111111111111111', cookie:true, status:true, xfbml:true }); FB.ui({ method: 'feed', name: '', link: '', picture: 'http://My_Img_Url_1.jpg' }); </script> Now the questions are: If I click on any image it will call either METHOD-1 or METHOD-2 and it will popup with that image. How can I do that? If I use <fb:multi-friend-input /> for posting to friend's wall, How can I do?

    Read the article

  • Cannot access or open Facebook messages [migrated]

    - by Ehsan Mamakani
    I was up to sending a very long message, about 90,000 characters, to a friend, I tried several times but I got an error sending the message. Finally, I think part of my message was sent because I could see the characters in my message list under my friend's name. When I clicked the name to see my whole message it wouldn't load the message. And now I can't access any of my messages and I get this message from Facebook: Sorry, messages are temporarily unavailable. Please try again in a few minutes. How can I get access to my messages and conversations again?

    Read the article

  • Good Linux Distro for Disconnected Netbook

    - by MrWizard54
    I'm deployed to Afghanistan with the Army and I have a friend who's netbook had his hard drive take a dump on him. He ordered a new hard drive and I was able to download and burn a copy of Ubuntu to disk from work. However the default install doesn't support most of the media that he wants to watch (AVI files, probably some DIVX video) without installing extra packages. We don't have internet in the tent and really don't have a vaiable option for downloading additional packages through the package manager anywhere here. The computer is a small HP netbook. All my friend wants is to watch ripped movies. Does anyone know of a good way to do either of the following: Download packages seperately and install them via CD A distro that is going to come preloaded with all of the packages and needed to watch just about any type of video file you can think of? Thanks in advance, Andy

    Read the article

  • Linux or Windows for a server?

    - by Matt
    I'm a Linux guy when it comes to (web) servers for the following reasons Legally free Fast software updates (Unless you're running Cent OS :) Powerful CLI management of services Easy to secure (in terms of users and groups) Web server software is, well, built for Linux... Apache, PHP, Python, etc, are Linux programs that get ported to Windows - I'm 90% sure of this Unless the web server needed to run ASP, I wouldn't use Windows. My boss' IT friend is a Windows guy, though. He recently got a server setup in the office to run Microsoft Exchange and some other shit. What I'm asking is, if he wanted to start running websites on this thing, what would be good reasoning to convince him otherwise? He's not very bright in terms of IT and the IT friend is all Windows. So it's two against one here... What would you say to running a Windows web server?

    Read the article

  • One network, two macbooks, one is fast and the other is slow

    - by Brendan
    I really need help for my friend. I know next to nothing about computers. My roommate and I both have macbook pros from the same year running OS X, are both connecting wirelessly to the same xfinity wifi, and while mine runs perfectly fine, my roommate complains that his works very slowly and times out every few seconds. I can't seem to figure out why this is. He is trying to get me to switch internet providers because he is convinced that it is their problem, but this cannot possibly be the issue since it works great on mine. He has an xbox hooked up to the wifi that he says also works poorly. I really can't see switching providers given that I am experiencing absolutely zero problems. How can I help my friend?

    Read the article

  • PCMCIA preventing laptop from booting up

    - by Pongus
    My friend has brought his dead laptop over. It is a Sony Vaio with Windows Vista. When booting up, it blue screens and reboots. I have tried to boot up with Knoppix and this will freeze when starting up PCMCIA. If I start Knoppix with knoppix nopcmcia it disables pcmcia and boots up fine. So I presume there is a problem with the PCMCIA controller on the laptop. My friend does not use any PCMCIA cards, so doesnt really need it. Is there anyway I can similarly disable PCMCIA so that Windows will boot up fine?

    Read the article

  • Troubles with MSVC++ redistributable

    - by Karolis Juodele
    A friend of mine is trying to install AutoCAD. In the install log it is written Install Microsoft Visual C++ 2005 Redistributable (x86) Failed Installation aborted, Result=1603 I've found a site which (hopefully) explains how to solve this: here However, my friend has not been able to uninstall the redistributables. The error message says The feature you are trying to use is on a network resource that is unavailable I've already suggested running this but that didn't help much. Only some of the redistributables could be uninstalled. What can be done? Do you think running some other cleanup tool could work? Or will we have to uninstall manually (how exactly would we do that)?

    Read the article

  • Ubuntu 9.10 is not starting on netbook

    - by anonymous
    I installed Ubuntu 9.10 onto my external hard drive cause it's cool to be able to borrow a friend's laptop and be able to have my entire system. It works on the 2 systems i tested it on: my desktop and my mom's laptop. I had to work on something earlier so i borrowed my friend's netbook. I started it up, chose Ubuntu 9.10.20 and it got to the Ubuntu loading screen with the 3 people holding hands right before user selection then it suddenly went black. Naturally, i freaked out because it wasn't my laptop. I held the power button down and reset the netbook but the screen was still black, it didn't even show the BIOS. I repeated the process without my hard drive, and it was still black without the BIOS showing up. I had to remove the battery, plug it to a power source, and power up to start the netbook up again. Can anyone tell me what happened?

    Read the article

  • PC doesn't boot PC-BSD from USB

    - by turlando
    I've got a problem with a friend's PC: I'm installing a FreeBSD server and to make easier the installation for my friend I'm using the PC-BSD DVD. Surprise! The CD reader doesn't read DVDs, so I'm using a USB stick to perform the install. The PC seems supporting USB boot because I can choose it in the boot sequence, but the PC-BSD installation doesn't start, booting the OS installed in the primary HD. I have not physic access to the PC and I can't have at the moment more informations. What do you think about? Thanks and sorry for my terrible English. Tancredi Orlando.

    Read the article

  • Multisession burn in Imgburn

    - by blntechie
    Is Multisession burn available in Imgburn? If not, any idea whether it will be implemented in future? I almost recommended Imgburn instead of Nero or Roxio to one of my friend. He requires multisession burning and I found no options to enable it,if available in Options. Note: Please don't question the question. Like, Why would you want multisession anyway? or Isn't USB stick/RW Disk is what you need instead of a RO CD/DVD? Please keep the answers in context. I know that I can use USB sticks instead of CD/DVD and my friend require mulisession anyway. May be I can ask him to keep Nero as a backup for this purpose if Imgburn don't support this.

    Read the article

  • 'DNS server isn't responding' error in windows 7 home premium

    - by pradeeptp
    Hi All, I bought a brand new Dell Studio 1558 just last week. It has windows 7 home premium 64-bit installed on it. My friend who is occupying the adjacent room has a laptop with windows XP. Both of us are connecting to the same wireless router of the hotel. My friend is able to connect to the wireless network without any trouble, but when I try to connect, I get the error "DNS service isn't responding". I get this error when I run the troubleshooting option. I met two more people in the same hotel with win XP laptop and they too dont have any problem. I have gone to possibly all the forums and website but I haven't been able to fix this error :(. I have done all the basic troubleshooting but I have no luck yet. Pls help. Following is one forum where the problem seem to have been trouble shooted but not for all. http://social.technet.microsoft.com/Forums/en/w7itpronetworking/thread/eeb84518-903d-46d1-9398-80cf211878d7

    Read the article

  • remote desktop connection help?

    - by robin agrahari
    sir, i have created a web application in eclipse,db2 database server is running on my pc.so i can access the web application through the address http://localhost:8080/LimsWeb i used team viewer software to establish a remote desktop connection. can my friend somehow connect to my pc so that when he types the above url in his browser he will be able to fetch the pages of the application. i was able to do this by connecting with remote desktop mode.but in that case my friend was able to use the application which i created running on my pc only and in the window provided by team viewer.i want that he can run the application on his own computer calling the given url from his own browser. please help

    Read the article

  • FTP restrict user access to a specific folder

    - by Mahdi Ghiasi
    I have created a FTP Site inside IIS 7.5 panel. Now I have access to whole site using administrator username and password. Now, I want to let my friend access a specific folder of that FTP site. (for example, this path: \some\folder\accessible\) I can't create a whole new FTP Site for this purpose, since it says the port is being used by another website. How to create an account for my friend to have access to just an specific folder? P.S: I have read about User Isolation feature of IIS 7.5, but I couldn't find how to create a user just for FTP and set it to a custom path.

    Read the article

  • HTTP Redirect from www.mydomain.com to my amazon ec2 account (instance)?

    - by fabius
    Hello! I have a domain, that is registered at a service provider but my site (wordpress blog) is hosted in a shared account with a friend in another other host service. I want to become seperate from this friend because I'm tired of boring him with my blog downtimes. Now, my problem is that I signed up to Amazon EC2 service and I created a instance (a virtual machine) to host my wordpress blog and now I'd like to redirect mydomain.com to this instance at Amazon EC2 and I don't know how to proceed in order to achieve that. The instance at Amazon EC2 is up and running (it's a 64bit linux machine) but I couldn't redirect mydomain.com to this instance at my host service webpanel. Could someone help me please???

    Read the article

  • How to troubleshoot problems sharing internet connection via WiFi on Mac OS X

    - by sprugman
    I'm at a hotel, plugged into their network via ethernet on my MacBook. I want to share the connection via wifi to two other computers. I went to Prefs Sharing and set up internet sharing. I know it's working because my friend with a Mac access the net fine. My friend with the PC can see the network, but can't connect to it. In the sharing prefs, airport options, I chose these options: Channel: Automatic Enable encryption: yes WEP Key length 40-bit password length: 5 chars (as specified in the instructional text) Update: I tried it with encryption turned off, and it works. Of course, I'd rather not do that... Any ideas?

    Read the article

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